Skip to content

Commit a4941db

Browse files
committed
invokedFromApi
1 parent 3617d8e commit a4941db

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/commands/deployWorkspaceProject/DeployWorkspaceProjectConfirmStep.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ export class DeployWorkspaceProjectConfirmStep extends OverwriteConfirmStepBase<
5959
}
6060

6161
public shouldPrompt(context: DeployWorkspaceProjectContext): boolean {
62-
return !context.apiEntryPoint;
62+
return !context.invokedFromApi;
6363
}
6464
}

src/commands/deployWorkspaceProject/DeployWorkspaceProjectContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export type DeployWorkspaceProjectContext =
2828

2929
// Properties that only get set from the API entry-point
3030
type DeployWorkspaceProjectApiContext = {
31-
apiEntryPoint?: boolean;
31+
invokedFromApi?: boolean;
3232
skipContainerAppCreation?: boolean;
3333
};
3434

src/commands/deployWorkspaceProject/deployWorkspaceProject.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export interface DeployWorkspaceProjectResults {
4141

4242
export async function deployWorkspaceProject(context: IActionContext & Partial<DeployWorkspaceProjectContext>, item?: ContainerAppItem | ManagedEnvironmentItem): Promise<DeployWorkspaceProjectResults> {
4343
ext.outputChannel.appendLog(
44-
context.apiEntryPoint ?
44+
context.invokedFromApi ?
4545
localize('beginCommandExecutionApi', '--------Initializing deploy workspace project (Azure Container Apps - API)--------') :
4646
localize('beginCommandExecution', '--------Initializing deploy workspace project--------'));
4747

@@ -64,7 +64,7 @@ export async function deployWorkspaceProject(context: IActionContext & Partial<D
6464
});
6565

6666
let activityContext: Partial<ExecuteActivityContext>;
67-
if (context.apiEntryPoint) {
67+
if (context.invokedFromApi) {
6868
activityContext = {};
6969
} else {
7070
activityContext = await createActivityContext();
@@ -218,18 +218,18 @@ export async function deployWorkspaceProject(context: IActionContext & Partial<D
218218

219219
await wizard.prompt();
220220

221-
if (!wizardContext.apiEntryPoint) {
221+
if (!wizardContext.invokedFromApi) {
222222
wizardContext.activityTitle = localize('deployWorkspaceProjectActivityTitle', 'Deploy workspace project to container app "{0}"', wizardContext.containerApp?.name || wizardContext.newContainerAppName);
223223
}
224224

225225
ext.outputChannel.appendLog(
226-
wizardContext.apiEntryPoint ?
226+
wizardContext.invokedFromApi ?
227227
localize('beginCommandExecutionApi', '--------Deploying workspace project (Azure Container Apps - API)--------') :
228228
localize('beginCommandExecution', '--------Deploying workspace project--------'));
229229

230230
await wizard.execute();
231231

232-
if (!wizardContext.apiEntryPoint) {
232+
if (!wizardContext.invokedFromApi) {
233233
displayNotification(wizardContext);
234234
}
235235

@@ -238,7 +238,7 @@ export async function deployWorkspaceProject(context: IActionContext & Partial<D
238238
ext.branchDataProvider.refresh();
239239

240240
ext.outputChannel.appendLog(
241-
wizardContext.apiEntryPoint ?
241+
wizardContext.invokedFromApi ?
242242
localize('finishCommandExecutionApi', '--------Finished deploying workspace project (Azure Container Apps - API)--------') :
243243
localize('finishCommandExecution', '--------Finished deploying workspace project--------'));
244244

src/commands/deployWorkspaceProject/deployWorkspaceProjectApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export async function deployWorkspaceProjectApi(context: IActionContext, deployW
4444
dockerfilePath: dockerfilePath ? Uri.file(dockerfilePath).fsPath : undefined,
4545
skipContainerAppCreation,
4646
shouldSaveDeploySettings: !!shouldSaveDeploySettings,
47-
apiEntryPoint: true,
47+
invokedFromApi: true,
4848
} as Partial<DeployWorkspaceProjectContext>)
4949
);
5050
}

src/commands/deployWorkspaceProject/getDefaultValues/getDefaultContainerAppsResources/getDefaultContainerAppsResources.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function getDefaultContainerAppsResources(
2626
): Promise<DefaultContainerAppsResources> {
2727
context.telemetry.properties.promptedForEnvironment = 'false'; // Initialize the default value
2828

29-
if (!context.apiEntryPoint) {
29+
if (!context.invokedFromApi) {
3030
// If a tree item is provided that can be used to deduce default context values, try to use those first
3131
if (item) {
3232
return await getContainerAppResourcesFromItem(context, item);

0 commit comments

Comments
 (0)