Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Bicep.Cli/Helpers/Deploy/DeploymentProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public async Task Deploy(RootConfiguration bicepConfig, DeployCommandsConfig con
Template = BinaryData.FromString(template),
};

if (usingConfig.Location is {} location)
if (usingConfig.Location is { } location)
{
stacksData.Location = location;
}
Expand Down Expand Up @@ -236,7 +236,7 @@ public async Task Deploy(RootConfiguration bicepConfig, DeployCommandsConfig con
}

var armDeploymentContent = new ArmDeploymentContent(deploymentProperties);
if (usingConfig.Location is {} location)
if (usingConfig.Location is { } location)
{
armDeploymentContent.Location = location;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1872,10 +1872,10 @@ param resourceGroupLocation string
[
"[7] Use more recent API version for 'fake.Resources/resourceGroups'. '2419-05-10' is 1151 days old, should be no more than 730 days old, or the most recent. Acceptable versions: 2421-05-01, 2421-04-01, 2421-01-01, 2420-10-01, 2420-08-01"
]);
}
}

[TestMethod]
public void SubscriptionDeployment_Pass()
[TestMethod]
public void SubscriptionDeployment_Pass()
{
CompileAndTestWithFakeDateAndTypes(@"
targetScope='subscription'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ public void RoleDefinitionFunction_ShouldExistAndRequireInlining()
{
function.Name.Should().Be("roleDefinitions");
function.Overloads.Should().HaveCount(1, "Function 'roleDefinitions' should have exactly one overload");

var overload = function.Overloads[0];
overload.Flags.HasFlag(FunctionFlags.RequiresInlining).Should().BeFalse(
"Function 'roleDefinitions' should not have the RequiresInlining flag set");

// Verify parameters
overload.FixedParameters.Should().HaveCount(1, "Function 'roleDefinitions' should have exactly one parameter");
overload.FixedParameters[0].Name.Should().Be("roleName");
overload.FixedParameters[0].Type.Should().Be(LanguageConstants.String);
overload.FixedParameters[0].Required.Should().BeTrue();

// Verify return type
overload.TypeSignatureSymbol.Should().BeOfType<ObjectType>();
var returnType = (ObjectType)overload.TypeSignatureSymbol;
returnType.Properties.Should().HaveCount(2, "The return type should have exactly two properties");

returnType.Properties.Should().ContainKey("id").WhoseValue.TypeReference.Should().Be(LanguageConstants.String);
returnType.Properties.Should().ContainKey("roleDefinitionId").WhoseValue.TypeReference.Should().Be(LanguageConstants.String);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,16 @@ export function ExportToolbar() {
} finally {
setExportInProgress(false);
}
}, [canvasElement, exporting, setExportInProgress, store, backgroundMode, padding, exportBackgroundColor, exportFileStem]);
}, [
canvasElement,
exporting,
setExportInProgress,
store,
backgroundMode,
padding,
exportBackgroundColor,
exportFileStem,
]);

const [paddingText, setPaddingText] = useState(String(padding));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

import type { D3ZoomEvent } from "d3-zoom";
import type { PropsWithChildren } from "react";
import type { ReactElement } from "react";

import { select } from "d3-selection";
import { zoom, zoomIdentity } from "d3-zoom";
import { RESET } from "jotai/utils";
import { frame } from "motion/react";
import { useEffect, useLayoutEffect, useRef, type ReactElement } from "react";
import { useEffect, useLayoutEffect, useRef } from "react";
import { panZoomControlAtom, panZoomDimensionsAtom, panZoomTransformAtom, useSetAtom } from "./atoms";

import "d3-transition";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
// Licensed under the MIT License.

import type { PropsWithChildren } from "react";
import type { ReactElement } from "react";

import { useCallback, useRef, type ReactElement } from "react";
import { useCallback, useRef } from "react";
import styled from "styled-components";
import { usePanZoomTransformListener } from "./usePanZoomTransformListener";

Expand Down
16 changes: 4 additions & 12 deletions src/vscode-bicep/src/commands/showVisualizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ async function openView(
export class ShowVisualizerCommand implements Command {
public readonly id = "bicep.showVisualizer";

public constructor(
private readonly viewManager: BicepVisualizerViewManager,
) {}
public constructor(private readonly viewManager: BicepVisualizerViewManager) {}

public async execute(
context: IActionContext,
Expand All @@ -42,9 +40,7 @@ export class ShowVisualizerCommand implements Command {
export class ShowVisualizerToSideCommand implements Command {
public readonly id = "bicep.showVisualizerToSide";

public constructor(
private readonly viewManager: BicepVisualizerViewManager,
) {}
public constructor(private readonly viewManager: BicepVisualizerViewManager) {}

public async execute(
context: IActionContext,
Expand All @@ -57,9 +53,7 @@ export class ShowVisualizerToSideCommand implements Command {
export class ShowVisualDesignerCommand implements Command {
public readonly id = "bicep.showVisualDesigner";

public constructor(
private readonly viewManager: VisualDesignerViewManager,
) {}
public constructor(private readonly viewManager: VisualDesignerViewManager) {}

public async execute(
context: IActionContext,
Expand All @@ -72,9 +66,7 @@ export class ShowVisualDesignerCommand implements Command {
export class ShowVisualDesignerToSideCommand implements Command {
public readonly id = "bicep.showVisualDesignerToSide";

public constructor(
private readonly viewManager: VisualDesignerViewManager,
) {}
public constructor(private readonly viewManager: VisualDesignerViewManager) {}

public async execute(
context: IActionContext,
Expand Down
7 changes: 6 additions & 1 deletion src/vscode-bicep/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ import { PostExtractionCommand } from "./commands/PostExtractionCommand";
import { ShowDeployPaneCommand, ShowDeployPaneToSideCommand } from "./commands/showDeployPane";
import { ShowModuleSourceFileCommand } from "./commands/ShowModuleSourceFileCommand";
import { ShowSourceFromVisualizerCommand } from "./commands/showSourceFromVisualizer";
import { ShowVisualizerCommand, ShowVisualizerToSideCommand, ShowVisualDesignerCommand, ShowVisualDesignerToSideCommand } from "./commands/showVisualizer";
import {
ShowVisualDesignerCommand,
ShowVisualDesignerToSideCommand,
ShowVisualizerCommand,
ShowVisualizerToSideCommand,
} from "./commands/showVisualizer";
import { SuppressedWarningsManager } from "./commands/SuppressedWarningsManager";
import * as surveys from "./feedback/surveys";
import { setGlobalStateKeysToSyncBetweenMachines } from "./globalState";
Expand Down
6 changes: 4 additions & 2 deletions src/vscode-bicep/src/visualizer/app/components/Graph/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ export function createStylesheet(theme: DefaultTheme): StylesheetStyle[] {
"background-color": childlessNode.backgroundColor,
"background-image": "data(backgroundDataUri)",
"border-width": childlessNode.borderWidth,
"border-color": (node: cytoscape.NodeSingular) => (node.data("hasError") === true ? errorIndicatorColor : childlessNode.borderColor),
"border-color": (node: cytoscape.NodeSingular) =>
node.data("hasError") === true ? errorIndicatorColor : childlessNode.borderColor,
"border-opacity": childlessNode.borderOpacity,
},
},
Expand All @@ -121,7 +122,8 @@ export function createStylesheet(theme: DefaultTheme): StylesheetStyle[] {
"background-position-x": 12,
"background-position-y": 8,
"border-width": containerNode.borderWidth,
"border-color": (node: cytoscape.NodeSingular) => (node.data("hasError") === true ? errorIndicatorColor : containerNode.borderColor),
"border-color": (node: cytoscape.NodeSingular) =>
node.data("hasError") === true ? errorIndicatorColor : containerNode.borderColor,
"border-opacity": containerNode.borderOpacity,
"background-opacity": containerNode.backgroundOpacity,
"padding-top": "40px",
Expand Down