@forge/cli 11.1.0 → 11.2.0-next.17-experimental-02bb545
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +231 -0
- package/npm-shrinkwrap.json +56 -157
- package/out/bin/cli.d.ts.map +1 -1
- package/out/bin/cli.js +8 -0
- package/out/command-line/command.d.ts +6 -5
- package/out/command-line/command.d.ts.map +1 -1
- package/out/command-line/command.js +24 -10
- package/out/command-line/controller/install-controller.d.ts.map +1 -1
- package/out/command-line/controller/install-controller.js +8 -3
- package/out/command-line/dependency-injection.d.ts +1 -2
- package/out/command-line/dependency-injection.d.ts.map +1 -1
- package/out/command-line/dependency-injection.js +3 -5
- package/out/command-line/register-app-commands.d.ts.map +1 -1
- package/out/command-line/register-app-commands.js +6 -9
- package/out/command-line/uninstall-command-helpers.d.ts +2 -2
- package/out/command-line/uninstall-command-helpers.d.ts.map +1 -1
- package/out/command-line/uninstall-command-helpers.js +8 -8
- package/out/deploy/deployer/deployer.d.ts +6 -1
- package/out/deploy/deployer/deployer.d.ts.map +1 -1
- package/out/deploy/deployer/deployer.js +21 -7
- package/out/deploy/deployer/trigger-deploy-graphql-client.d.ts +9 -2
- package/out/deploy/deployer/trigger-deploy-graphql-client.d.ts.map +1 -1
- package/out/deploy/deployer/trigger-deploy-graphql-client.js +1 -1
- package/out/deploy/packager/runtime-bundler.d.ts +3 -3
- package/out/deploy/packager/runtime-bundler.d.ts.map +1 -1
- package/out/deploy/packager/runtime-bundler.js +5 -4
- package/out/installations/installation-helper.d.ts.map +1 -1
- package/out/installations/installation-helper.js +3 -2
- package/package.json +10 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import commander, { CommanderError } from 'commander';
|
|
2
2
|
import { CamelCase } from 'type-fest';
|
|
3
3
|
import { AnalyticsClientReporter } from '../analytics-client/analytics-client';
|
|
4
|
-
import { Logger, CLIDetails, CredentialGetter, PersonalApiCredentialsValidated, ErrorWithAnalytics, ErrorAnalytics,
|
|
4
|
+
import { Logger, CLIDetails, CredentialGetter, PersonalApiCredentialsValidated, ErrorWithAnalytics, ErrorAnalytics, SupportedProduct, SupportedProductsService } from '@forge/cli-shared';
|
|
5
5
|
import { PreCommandController } from './controller/pre-command-controller';
|
|
6
6
|
import * as autocomplete from '../autocomplete/types';
|
|
7
7
|
import { StubController } from './controller/stubController';
|
|
@@ -34,6 +34,7 @@ declare type ParseOpts<OptsStr extends string, Default extends string | boolean
|
|
|
34
34
|
} : never : never;
|
|
35
35
|
export declare type DefaultOpts = {
|
|
36
36
|
verbose?: boolean;
|
|
37
|
+
color: boolean;
|
|
37
38
|
};
|
|
38
39
|
declare type AnyArgs = string[];
|
|
39
40
|
declare type ParseArgs<ArgsStr extends string> = ArgsStr extends `${infer _} ${infer Rest}` ? [string, ...ParseArgs<Rest>] : [];
|
|
@@ -46,7 +47,6 @@ export declare class Command<Args extends AnyArgs = [], Opts extends AnyOpts = D
|
|
|
46
47
|
private readonly cliDetails;
|
|
47
48
|
private readonly credentialStore;
|
|
48
49
|
private readonly defaultEnvironmentController;
|
|
49
|
-
private readonly featureFlagService;
|
|
50
50
|
private readonly supportedProductsService;
|
|
51
51
|
get verbose(): boolean;
|
|
52
52
|
private static isError;
|
|
@@ -61,7 +61,7 @@ export declare class Command<Args extends AnyArgs = [], Opts extends AnyOpts = D
|
|
|
61
61
|
private readonly requiresAnalyticsConsent;
|
|
62
62
|
private readonly requiredOptionFlags;
|
|
63
63
|
private readonly preconditionFn;
|
|
64
|
-
static program(ui: Logger, analyticsClient: AnalyticsClientReporter, preCommandController: PreCommandController, cliDetails: CLIDetails | undefined, credentialStore: CredentialGetter, defaultEnvironmentController: DefaultEnvironmentController,
|
|
64
|
+
static program(ui: Logger, analyticsClient: AnalyticsClientReporter, preCommandController: PreCommandController, cliDetails: CLIDetails | undefined, credentialStore: CredentialGetter, defaultEnvironmentController: DefaultEnvironmentController, supportedProductsService: SupportedProductsService): Command<[], DefaultOpts>;
|
|
65
65
|
private constructor();
|
|
66
66
|
private clone;
|
|
67
67
|
version(str: string, flags?: string): Command<Args, Opts>;
|
|
@@ -69,6 +69,7 @@ export declare class Command<Args extends AnyArgs = [], Opts extends AnyOpts = D
|
|
|
69
69
|
deprecatedCommand(oldName: string, newName: string, stubController: StubController): void;
|
|
70
70
|
description(desc: string): Command<Args, Opts>;
|
|
71
71
|
option<OptsStr extends string, Default extends string | boolean | undefined = undefined>(flags: OptsStr, description: string, defaultValue?: Default): Command<Args, Opts & ParseOpts<OptsStr, Default>>;
|
|
72
|
+
hiddenOption<OptsStr extends string, Default extends string | boolean | undefined = undefined>(flags: OptsStr, defaultValue?: Default): Command<Args, Opts & ParseOpts<OptsStr, Default>>;
|
|
72
73
|
precondition(fn: PreconditionCallback<Args, Opts, void>): Command<Args, Opts>;
|
|
73
74
|
precondition<More extends AnyOpts>(fn: PreconditionCallback<Args, Opts, More>): Command<Args, Opts & More>;
|
|
74
75
|
requireManifestFile(): Command<Args, Opts>;
|
|
@@ -106,8 +107,8 @@ export declare class Command<Args extends AnyArgs = [], Opts extends AnyOpts = D
|
|
|
106
107
|
export declare function getAutocompleteConfig(cmd: commander.Command): autocomplete.AutocompleteConfig;
|
|
107
108
|
export declare function validateContext({ supportedProductsService, site, product }: {
|
|
108
109
|
supportedProductsService: SupportedProductsService;
|
|
109
|
-
site?: string;
|
|
110
|
-
product?: string;
|
|
110
|
+
site?: string | boolean;
|
|
111
|
+
product?: string | boolean;
|
|
111
112
|
}): {
|
|
112
113
|
site?: URL;
|
|
113
114
|
product?: SupportedProduct;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/command-line/command.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,cAAc,EAAU,MAAM,WAAW,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC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IAAI,EAAE,IAAI,GAAG;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC;IAIrD,uBAAuB,IAAI,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;IAI9C,yBAAyB,IAAI,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;IAIvD,OAAO,CAAC,8BAA8B;IAW/B,eAAe,mBACJ,WAAW,IAAI,EAAE,IAAI,CAAC,4BAC7B,WAAW,IAAI,EAAE,IAAI,CAAC,mBAmG/B;YAGY,kBAAkB;YAUlB,mBAAmB;IAQjC,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,oBAAoB;IAuBrB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI;IAIlC,UAAU,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;YAehD,cAAc;IAqC5B,OAAO,CAAC,eAAe;IA0BvB,qBAAqB,IAAI,YAAY,CAAC,kBAAkB;CAGzD;AAiCD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,SAAS,CAAC,OAAO,GAAG,YAAY,CAAC,kBAAkB,CAY7F;AAED,wBAAgB,eAAe,CAAC,EAC9B,wBAAwB,EACxB,IAAI,EACJ,OAAO,EACR,EAAE;IACD,wBAAwB,EAAE,wBAAwB,CAAC;IACnD,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B,GAAG;IAAE,IAAI,CAAC,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAsB7C"}
|
|
@@ -35,7 +35,6 @@ class Command {
|
|
|
35
35
|
cliDetails;
|
|
36
36
|
credentialStore;
|
|
37
37
|
defaultEnvironmentController;
|
|
38
|
-
featureFlagService;
|
|
39
38
|
supportedProductsService;
|
|
40
39
|
get verbose() {
|
|
41
40
|
return this.cmd.opts().verbose;
|
|
@@ -64,18 +63,20 @@ class Command {
|
|
|
64
63
|
requiresAnalyticsConsent;
|
|
65
64
|
requiredOptionFlags = [];
|
|
66
65
|
preconditionFn = [];
|
|
67
|
-
static program(ui, analyticsClient, preCommandController, cliDetails, credentialStore, defaultEnvironmentController,
|
|
68
|
-
const cmd = new Command(ui, analyticsClient, preCommandController, cliDetails, credentialStore, defaultEnvironmentController,
|
|
69
|
-
return cmd
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
static program(ui, analyticsClient, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, supportedProductsService) {
|
|
67
|
+
const cmd = new Command(ui, analyticsClient, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, supportedProductsService, {});
|
|
68
|
+
return cmd
|
|
69
|
+
.version(cliDetails?.version ?? 'unknown', '--version')
|
|
70
|
+
.hiddenOption('--no-color')
|
|
71
|
+
.option('--verbose', cli_shared_1.Text.optionVerbose);
|
|
72
|
+
}
|
|
73
|
+
constructor(ui, analyticsClient, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, supportedProductsService, { cmd, analyticsName, requiresAuthentication, requiresAnalyticsConsent, requiredOptionFlags, preconditionFn }) {
|
|
72
74
|
this.ui = ui;
|
|
73
75
|
this.analyticsClient = analyticsClient;
|
|
74
76
|
this.preCommandController = preCommandController;
|
|
75
77
|
this.cliDetails = cliDetails;
|
|
76
78
|
this.credentialStore = credentialStore;
|
|
77
79
|
this.defaultEnvironmentController = defaultEnvironmentController;
|
|
78
|
-
this.featureFlagService = featureFlagService;
|
|
79
80
|
this.supportedProductsService = supportedProductsService;
|
|
80
81
|
this.cmd = cmd || new commander_1.default.Command();
|
|
81
82
|
this.analyticsName = analyticsName;
|
|
@@ -92,7 +93,7 @@ class Command {
|
|
|
92
93
|
this.cmd.configureHelp({ sortSubcommands: true });
|
|
93
94
|
}
|
|
94
95
|
clone(overrides) {
|
|
95
|
-
return new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, this.credentialStore, this.defaultEnvironmentController, this.
|
|
96
|
+
return new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, this.credentialStore, this.defaultEnvironmentController, this.supportedProductsService, {
|
|
96
97
|
cmd: this.cmd,
|
|
97
98
|
analyticsName: this.analyticsName,
|
|
98
99
|
requiresAuthentication: this.requiresAuthentication,
|
|
@@ -111,10 +112,12 @@ class Command {
|
|
|
111
112
|
.command(name, opts)
|
|
112
113
|
.allowUnknownOption(false)
|
|
113
114
|
.allowExcessArguments(false);
|
|
114
|
-
const subCommand = new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, this.credentialStore, this.defaultEnvironmentController, this.
|
|
115
|
+
const subCommand = new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, this.credentialStore, this.defaultEnvironmentController, this.supportedProductsService, {
|
|
115
116
|
cmd,
|
|
116
117
|
analyticsName: Command.concatenateNames(this.analyticsName, cmd.name())
|
|
117
|
-
})
|
|
118
|
+
})
|
|
119
|
+
.hiddenOption('--no-color')
|
|
120
|
+
.option('--verbose', cli_shared_1.Text.optionVerbose);
|
|
118
121
|
return subCommand;
|
|
119
122
|
}
|
|
120
123
|
deprecatedCommand(oldName, newName, stubController) {
|
|
@@ -131,6 +134,11 @@ class Command {
|
|
|
131
134
|
this.cmd.option(flags, description, defaultValue);
|
|
132
135
|
return this;
|
|
133
136
|
}
|
|
137
|
+
hiddenOption(flags, defaultValue) {
|
|
138
|
+
const option = new commander_1.Option(flags).hideHelp().default(defaultValue);
|
|
139
|
+
this.cmd.addOption(option);
|
|
140
|
+
return this;
|
|
141
|
+
}
|
|
134
142
|
precondition(fn) {
|
|
135
143
|
return this.clone({ preconditionFn: [...this.preconditionFn, fn] });
|
|
136
144
|
}
|
|
@@ -431,9 +439,15 @@ function validateContext({ supportedProductsService, site, product }) {
|
|
|
431
439
|
let maybeSupportedProduct = undefined;
|
|
432
440
|
let maybeSiteUrl = undefined;
|
|
433
441
|
if (product !== undefined) {
|
|
442
|
+
if (typeof product === 'boolean') {
|
|
443
|
+
throw new cli_shared_1.ValidationError(cli_shared_1.Text.error.missingProductNameValue);
|
|
444
|
+
}
|
|
434
445
|
maybeSupportedProduct = supportedProductsService.validateSupportedProduct(product);
|
|
435
446
|
}
|
|
436
447
|
if (site) {
|
|
448
|
+
if (typeof site === 'boolean') {
|
|
449
|
+
throw new cli_shared_1.ValidationError(cli_shared_1.Text.error.missingSiteUrlValue);
|
|
450
|
+
}
|
|
437
451
|
maybeSiteUrl = supportedProductsService.validateSite(site, maybeSupportedProduct);
|
|
438
452
|
}
|
|
439
453
|
return { site: maybeSiteUrl, product: maybeSupportedProduct };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/install-controller.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,iBAAiB,EAEjB,UAAU,EAEV,EAAE,EAYF,wBAAwB,EAGzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAA2C,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAClH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAYD,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,WAAW,EAAE,MAAM;CAGhC;AASD,qBAAa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACtC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBANxB,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,EAAE,EACN,qBAAqB,EAAE,qBAAqB,EAC5C,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,WAAW,EACxB,wBAAwB,EAAE,wBAAwB;YAGvD,cAAc;YAmBd,gBAAgB;YA8ChB,iBAAiB;YAyBjB,aAAa;YA0Bb,gBAAgB;IAwB9B,OAAO,CAAC,uCAAuC;IAa/C,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,qBAAqB;IAgB7B,OAAO,CAAC,qBAAqB,CAK3B;IAEW,GAAG,CAAC,EACf,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,aAAa,EACb,OAAO,EACP,YAAY,EACZ,eAAe,EACf,cAAc,EACf,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"install-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/install-controller.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,iBAAiB,EAEjB,UAAU,EAEV,EAAE,EAYF,wBAAwB,EAGzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAA2C,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAClH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAA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,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA8HnC,OAAO,CAAC,qBAAqB,CA8B3B;IAEF,OAAO,CAAC,0BAA0B,CA8BhC;YAEY,kBAAkB;IAUhC,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,oBAAoB;IA8B5B,OAAO,CAAC,uBAAuB;YAoBjB,8CAA8C;IAY5D,OAAO,CAAC,+BAA+B,CAWrC;CACH"}
|
|
@@ -250,7 +250,7 @@ class InstallController {
|
|
|
250
250
|
else {
|
|
251
251
|
const allowedProducts = this.supportedProductsService.getSupportedSecondaryProductsForXPA([]);
|
|
252
252
|
if (products.some((product) => !allowedProducts.includes(product))) {
|
|
253
|
-
throw new cli_shared_1.ValidationError(cli_shared_1.Text.error.
|
|
253
|
+
throw new cli_shared_1.ValidationError(cli_shared_1.Text.error.invalidContext(allowedProducts));
|
|
254
254
|
}
|
|
255
255
|
if (requiredProducts.includes(products[0])) {
|
|
256
256
|
this.ui.info(cli_shared_1.Text.install.installingToRequiredProduct(products[0]));
|
|
@@ -272,8 +272,13 @@ class InstallController {
|
|
|
272
272
|
const productsToUpgrade = nonTechnicalInstallations
|
|
273
273
|
.filter((installation) => !installation.version.isLatest)
|
|
274
274
|
.map((installation) => installation.product);
|
|
275
|
-
const
|
|
276
|
-
|
|
275
|
+
const allInstalledProducts = nonTechnicalInstallations
|
|
276
|
+
.flatMap((install) => {
|
|
277
|
+
const secondaryProducts = install.secondaryProducts ?? [];
|
|
278
|
+
return [...secondaryProducts, install.product];
|
|
279
|
+
})
|
|
280
|
+
.filter((product) => product !== undefined);
|
|
281
|
+
const productsToInstall = uniqueProductsFromScopes.filter((product) => !allInstalledProducts.includes(product));
|
|
277
282
|
if (productsToInstall.length === 0 && productsToUpgrade.length === 0)
|
|
278
283
|
return;
|
|
279
284
|
this.ui.warn(cli_shared_1.Text.install.multiProductScopesDetected(productsToInstall, productsToUpgrade, site.host, environment));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CLIDetails, CommandLineUI, ConfigFile, CreateAppCommand,
|
|
1
|
+
import { CLIDetails, CommandLineUI, ConfigFile, CreateAppCommand, GetAppOwnerQuery, LoginCommand, LogoutCommand, RegisterAppCommand, ViewAppLogsCommand, UserRepositoryImpl, SupportedProductsService } from '@forge/cli-shared';
|
|
2
2
|
import { AnalyticsClientReporter } from '../analytics-client/analytics-client';
|
|
3
3
|
import { PackageUploadDeployCommand } from '../deploy';
|
|
4
4
|
import { DeleteEnvironmentVariableCommand } from '../environment-variables/delete-environment-variable';
|
|
@@ -60,7 +60,6 @@ export declare const getDependencies: (cliDetails: CLIDetails | undefined) => Pr
|
|
|
60
60
|
listEntitiesIndexesCommand: ListEntitiesIndexesCommand;
|
|
61
61
|
};
|
|
62
62
|
services: {
|
|
63
|
-
featureFlagService: FeatureFlagService;
|
|
64
63
|
installationsService: InstallationService;
|
|
65
64
|
migrationKeysService: MigrationKeysService;
|
|
66
65
|
customEntitiesService: CustomEntitiesService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-injection.d.ts","sourceRoot":"","sources":["../../src/command-line/dependency-injection.ts"],"names":[],"mappings":"AAIA,OAAO,EASL,UAAU,EACV,aAAa,EAEb,UAAU,EAGV,gBAAgB,
|
|
1
|
+
{"version":3,"file":"dependency-injection.d.ts","sourceRoot":"","sources":["../../src/command-line/dependency-injection.ts"],"names":[],"mappings":"AAIA,OAAO,EASL,UAAU,EACV,aAAa,EAEb,UAAU,EAGV,gBAAgB,EAKhB,gBAAgB,EAQhB,YAAY,EACZ,aAAa,EAOb,kBAAkB,EAIlB,kBAAkB,EAElB,kBAAkB,EAKlB,wBAAwB,EACzB,MAAM,mBAAmB,CAAC;AAc3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAML,0BAA0B,EAG3B,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,gCAAgC,EAAE,MAAM,sDAAsD,CAAC;AAExG,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,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAGhF,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAG3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAKpE,eAAO,MAAM,eAAe,eAAsB,UAAU,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsYvE,CAAC;AAGF,aAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC7D,oBAAY,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC"}
|
|
@@ -95,7 +95,6 @@ const getDependencies = async (cliDetails) => {
|
|
|
95
95
|
const appConfigWriter = (0, cli_shared_1.configFileWriterForSection)(cli_shared_1.appConfigKey, cli_shared_1.appConfigShape, configFile);
|
|
96
96
|
const userRepository = new cli_shared_1.UserRepositoryImpl(createGraphQLClient, ui);
|
|
97
97
|
const credentialStore = (0, cli_shared_1.getCredentialStore)(ui, userRepository);
|
|
98
|
-
const featureFlagService = new cli_shared_1.FeatureFlagService(ui, cliDetails, credentialStore, appConfigReader);
|
|
99
98
|
const statsigService = new cli_shared_1.StatsigService(ui, cliDetails, credentialStore, appConfigReader);
|
|
100
99
|
const supportedProductsService = new cli_shared_1.SupportedProductsService();
|
|
101
100
|
const settingsView = new settings_view_1.SettingsView(ui);
|
|
@@ -156,7 +155,7 @@ const getDependencies = async (cliDetails) => {
|
|
|
156
155
|
const archiveUploader = new deploy_1.AppArchiveUploader(assertiveAppConfigReader, uploaderArtifactClient, fileUploader, ui, new resources_uploader_service_1.ResourcesUploaderService(fileReader));
|
|
157
156
|
const deployer = new deploy_1.ArtifactDeployer(assertiveAppConfigReader, triggerDeployClient, deployMonitorClient, cli_shared_1.pause, ui);
|
|
158
157
|
const sandboxBundle = new bundler_1.SandboxBundler(ui);
|
|
159
|
-
const nodeBundle =
|
|
158
|
+
const nodeBundle = (0, bundler_1.getNodeBundler)(ui, (0, bundler_1.getWrapperProvider)({ fileSystemReader: fileReader, statsigService }), configFile, statsigService);
|
|
160
159
|
const sandboxRuntimeBundler = new runtime_bundler_1.SandboxRuntimeBundler(archiverFactory, ui, sandboxBundle, fileReader, configFile);
|
|
161
160
|
const nodeRuntimeBundler = new runtime_bundler_1.NodeRuntimeBundler(archiverFactory, ui, nodeBundle, fileReader, configFile);
|
|
162
161
|
const nativeUiBundler = new bundler_1.NativeUIBundler(ui);
|
|
@@ -182,7 +181,7 @@ const getDependencies = async (cliDetails) => {
|
|
|
182
181
|
const nodePackageUploadDeployCommand = new deploy_1.PackageUploadDeployCommand(nodeAppPackager, archiveUploader, deployer, resourcePackagingService, i18nResourceBundlingService);
|
|
183
182
|
const roaService = new roa_service_1.RoaService(assertiveAppConfigReader, new graphql_client_8.RoaEligibilityClient(graphQLClient));
|
|
184
183
|
const deployController = new deploy_controller_1.DeployController(assertiveAppConfigReader, configFile, lintService, installationsService, roaService, migrationKeysService, customEntitiesService, appEnvironmentClient, deployView, sandboxPackageUploadDeployCommand, nodePackageUploadDeployCommand, createEnvironmentCommand);
|
|
185
|
-
const createSandbox = async (cfg) => new tunnel_2.NodeSandbox(cfg);
|
|
184
|
+
const createSandbox = async (cfg) => new tunnel_2.NodeSandbox(cfg, statsigService);
|
|
186
185
|
const functionHost = new tunnel_1.LocalFunctionHost(configFile, ui, null, createSandbox);
|
|
187
186
|
const localInvocationService = new tunnel_1.LocalInvocationService(configFile, ui, runtime_1.notImplementedInspector);
|
|
188
187
|
const startTunnelCommand = new tunnel_1.StartTunnelCommand(assertiveAppConfigReader, new tunnel_1.LocalDevelopmentServer(localInvocationService, ui, configFile, fileReader, statsigService), new tunnel_1.CloudflareCreateTunnelService(ui), new tunnel_1.RegisterTunnelServiceImpl(new tunnel_1.TunnelGraphqlClient(graphQLClient)), functionHost, runtime_1.notImplementedInspector, ui, configFile);
|
|
@@ -198,7 +197,7 @@ const getDependencies = async (cliDetails) => {
|
|
|
198
197
|
const stubController = new stubController_1.StubController();
|
|
199
198
|
const prerequisitesController = new prerequisites_controller_1.PrerequisitesController(ui, cliDetails);
|
|
200
199
|
const defaultEnvironmentController = new default_environment_controller_1.DefaultEnvironmentController(ui, credentialStore, cachedConfigService, assertiveAppConfigReader, userRepository, createEnvironmentCommand, listEnvironmentCommand, getAppOwnerQuery);
|
|
201
|
-
cmd = command_1.Command.program(ui, analyticsClientReporter, preCommandController, cliDetails, credentialStore, defaultEnvironmentController,
|
|
200
|
+
cmd = command_1.Command.program(ui, analyticsClientReporter, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, supportedProductsService);
|
|
202
201
|
await supportedProductsService.initializeWithSupportedProducts(statsigService);
|
|
203
202
|
return {
|
|
204
203
|
ui,
|
|
@@ -230,7 +229,6 @@ const getDependencies = async (cliDetails) => {
|
|
|
230
229
|
listEntitiesIndexesCommand
|
|
231
230
|
},
|
|
232
231
|
services: {
|
|
233
|
-
featureFlagService,
|
|
234
232
|
installationsService,
|
|
235
233
|
migrationKeysService,
|
|
236
234
|
customEntitiesService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-app-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-app-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAqB,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG/G,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAuBtD,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKrD;
|
|
1
|
+
{"version":3,"file":"register-app-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-app-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAqB,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG/G,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAuBtD,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKrD;AA4CD,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAC1B,OAAO,CAQT;AAED,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAW7E;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,oBAAoB,CACxC,EAAE,EAAE,aAAa,EACjB,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,MAAM,EACZ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,2BAA2B,GACnD,OAAO,CAAC,sBAAsB,CAAC,CAuBjC;AAmJD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,QAGlD"}
|
|
@@ -123,8 +123,9 @@ async function promptAndSelectTemplate(ui, createAppCommand, template, directory
|
|
|
123
123
|
if (!template) {
|
|
124
124
|
ui.info(cli_shared_1.Text.create.overviewTemplates);
|
|
125
125
|
const templates = await ui.displayTemporaryMessage(() => createAppCommand.getAvailableTemplates(), cli_shared_1.Text.create.waitTemplates);
|
|
126
|
+
const templatesWithoutCsuik = templates.filter((template) => !template.includes('csuik'));
|
|
126
127
|
const type = await ui.promptForList(cli_shared_1.Text.create.promptCategory, Object.values(TemplateCategory));
|
|
127
|
-
const filteredTemplates = filterTemplatesByCategory(
|
|
128
|
+
const filteredTemplates = filterTemplatesByCategory(templatesWithoutCsuik, type);
|
|
128
129
|
template = await selectedTemplate(filteredTemplates, type, ui);
|
|
129
130
|
template = modifyTemplateByCategory(template, type);
|
|
130
131
|
if (!directory) {
|
|
@@ -141,27 +142,23 @@ function filterTemplatesByCategory(templates, category) {
|
|
|
141
142
|
.filter((name) => {
|
|
142
143
|
switch (category) {
|
|
143
144
|
case TemplateCategory.BACKEND:
|
|
144
|
-
return (!name.includes('ui-kit') &&
|
|
145
|
-
!name.includes('csuik') &&
|
|
146
|
-
!name.includes('custom-ui') &&
|
|
147
|
-
!name.includes('rovo') &&
|
|
148
|
-
name !== 'blank');
|
|
145
|
+
return (!name.includes('ui-kit') && !name.includes('custom-ui') && !name.includes('rovo') && name !== 'blank');
|
|
149
146
|
case TemplateCategory.CUSTOM_UI:
|
|
150
147
|
return name.includes('custom-ui');
|
|
151
148
|
case TemplateCategory.UI_KIT_2:
|
|
152
|
-
return name.includes('
|
|
149
|
+
return name.includes('ui-kit');
|
|
153
150
|
case TemplateCategory.ROVO:
|
|
154
151
|
return name.includes('rovo');
|
|
155
152
|
default:
|
|
156
153
|
return true;
|
|
157
154
|
}
|
|
158
155
|
})
|
|
159
|
-
.map((name) => name.replace('-ui-kit', '').replace('-custom-ui', '').replace('-
|
|
156
|
+
.map((name) => name.replace('-ui-kit', '').replace('-custom-ui', '').replace('-rovo', ''));
|
|
160
157
|
}
|
|
161
158
|
function modifyTemplateByCategory(template, category) {
|
|
162
159
|
switch (category) {
|
|
163
160
|
case TemplateCategory.UI_KIT_2:
|
|
164
|
-
return `${template}-
|
|
161
|
+
return `${template}-ui-kit`;
|
|
165
162
|
case TemplateCategory.CUSTOM_UI:
|
|
166
163
|
return `${template}-custom-ui`;
|
|
167
164
|
case TemplateCategory.ROVO:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall-command-helpers.d.ts","sourceRoot":"","sources":["../../src/command-line/uninstall-command-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAItD,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QAAE,
|
|
1
|
+
{"version":3,"file":"uninstall-command-helpers.d.ts","sourceRoot":"","sources":["../../src/command-line/uninstall-command-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAItD,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAClH;AAMD,eAAO,MAAM,iCAAiC,0BAA2B,YAAY,EAAE,KAAG,MAAM,EA8B/F,CAAC;AAEF,eAAO,MAAM,6BAA6B,YAC/B,MAAM,EAAE,wBACK,MAAM,EAAE,yBACP,YAAY,EAAE,KACpC,CAAC,YAAY,EAAE,EAAE,YAAY,EAAE,CAiBjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,cACtB,MAAM,uBACI,MAAM,6CACgB,YAAY,kBAuBxD,CAAC;AAEF,eAAO,MAAM,yBAAyB,yBACd,YAAY,EAAE,yBACb,YAAY,EAAE,6CACM,YAAY,kBAsDxD,CAAC"}
|
|
@@ -4,8 +4,8 @@ exports.performMultipleUninstalls = exports.performSingleUninstall = exports.get
|
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
5
|
const shared_1 = require("../installations/shared");
|
|
6
6
|
const errors_1 = require("./errors");
|
|
7
|
-
function
|
|
8
|
-
return secondaryCount ? `${productDisplayName} (
|
|
7
|
+
function addRequiredSuffix(productDisplayName, secondaryCount) {
|
|
8
|
+
return secondaryCount ? `${productDisplayName} (Required)` : productDisplayName;
|
|
9
9
|
}
|
|
10
10
|
const getMultiChoiceOptionsForUninstall = (filteredInstallations) => {
|
|
11
11
|
return filteredInstallations.reduce((acc, { id, environmentKey, site, product, secondaryProducts, secondaryContexts }, idx) => {
|
|
@@ -13,13 +13,13 @@ const getMultiChoiceOptionsForUninstall = (filteredInstallations) => {
|
|
|
13
13
|
names: [
|
|
14
14
|
(0, cli_shared_1.environmentToOption)(environmentKey),
|
|
15
15
|
site,
|
|
16
|
-
|
|
16
|
+
addRequiredSuffix((0, cli_shared_1.productDisplayName)(product), secondaryProducts?.length)
|
|
17
17
|
],
|
|
18
18
|
value: id,
|
|
19
19
|
extra: {
|
|
20
20
|
installationIdx: idx,
|
|
21
21
|
product: product,
|
|
22
|
-
|
|
22
|
+
required: !!secondaryProducts?.length
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
if (secondaryProducts) {
|
|
@@ -28,7 +28,7 @@ const getMultiChoiceOptionsForUninstall = (filteredInstallations) => {
|
|
|
28
28
|
acc.push({
|
|
29
29
|
names: [(0, cli_shared_1.environmentToOption)(environmentKey), site, (0, cli_shared_1.productDisplayName)(secondaryProduct)],
|
|
30
30
|
value: id,
|
|
31
|
-
extra: {
|
|
31
|
+
extra: { optional: true, contextAri, installationIdx: idx, product: secondaryProduct }
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -39,14 +39,14 @@ exports.getMultiChoiceOptionsForUninstall = getMultiChoiceOptionsForUninstall;
|
|
|
39
39
|
const getInstallationsFromSelection = (options, selectedSitesIndexes, filteredInstallations) => {
|
|
40
40
|
const firstUninstall = options
|
|
41
41
|
.filter((_, idx) => selectedSitesIndexes.includes(idx))
|
|
42
|
-
.filter(({ extra }) => !extra?.
|
|
42
|
+
.filter(({ extra }) => !extra?.required)
|
|
43
43
|
.map(({ extra }) => ({
|
|
44
44
|
...filteredInstallations[extra.installationIdx],
|
|
45
|
-
...(extra.
|
|
45
|
+
...(extra.optional && { context: extra.contextAri, product: extra.product })
|
|
46
46
|
}));
|
|
47
47
|
const secondUninstall = options
|
|
48
48
|
.filter((_, idx) => selectedSitesIndexes.includes(idx))
|
|
49
|
-
.filter(({ extra }) => extra?.
|
|
49
|
+
.filter(({ extra }) => extra?.required)
|
|
50
50
|
.map(({ extra }) => filteredInstallations[extra.installationIdx]);
|
|
51
51
|
return [firstUninstall, secondUninstall];
|
|
52
52
|
};
|
|
@@ -19,6 +19,11 @@ export declare class HostedResourceDeploymentFailedError extends BaseError {
|
|
|
19
19
|
export declare class ManifestValidationFailedError extends UserError {
|
|
20
20
|
constructor(requestId?: string | undefined, message?: string);
|
|
21
21
|
}
|
|
22
|
+
export declare class ExistingInstallationsError extends BaseError {
|
|
23
|
+
private readonly userError;
|
|
24
|
+
constructor(userError?: boolean, requestId?: string | undefined, message?: string);
|
|
25
|
+
isUserError(): boolean;
|
|
26
|
+
}
|
|
22
27
|
export interface Deployer {
|
|
23
28
|
deploy(environmentKey: string, artifactUrl: string, hostedResourceUploadId?: string, majorVersion?: number): Promise<void>;
|
|
24
29
|
}
|
|
@@ -31,7 +36,7 @@ export declare class ArtifactDeployer implements Deployer {
|
|
|
31
36
|
constructor(getConfiguredApp: AppConfigProvider, deployClient: TriggerDeployClient, deployMonitorClient: DeployMonitorClient, pause: Pause, ui: UI);
|
|
32
37
|
deploy(environmentKey: string, artifactUrl: string, hostedResourceUploadId?: string, majorVersion?: number): Promise<void>;
|
|
33
38
|
private doDeploy;
|
|
34
|
-
pollAndCheckEvents(appId: string, environmentKey: string, deploymentId: string, totalStreamed: number): Promise<{
|
|
39
|
+
pollAndCheckEvents(appId: string, environmentKey: string, deploymentId: string, totalStreamed: number, requestId: string): Promise<{
|
|
35
40
|
status: AppDeploymentStatus;
|
|
36
41
|
totalStreamed: number;
|
|
37
42
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployer.d.ts","sourceRoot":"","sources":["../../../src/deploy/deployer/deployer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAKjB,mBAAmB,EAGnB,KAAK,EAEL,EAAE,EACF,SAAS,EAET,SAAS,EACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAsB,MAAM,iCAAiC,CAAC;AAC1F,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"deployer.d.ts","sourceRoot":"","sources":["../../../src/deploy/deployer/deployer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAKjB,mBAAmB,EAGnB,KAAK,EAEL,EAAE,EACF,SAAS,EAET,SAAS,EACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAsB,MAAM,iCAAiC,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAyB,MAAM,iCAAiC,CAAC;AAG7F,qBAAa,wBAAyB,SAAQ,SAAS;IAEnD,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,GAAE,OAAe,EAC3C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,CAAC,EAAE,MAAM;IAIX,WAAW,IAAI,OAAO;CAG9B;AACD,qBAAa,sBAAuB,SAAQ,SAAS;IAEjD,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,GAAE,OAAe,EAC3C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,CAAC,EAAE,MAAM;IAIX,WAAW,IAAI,OAAO;CAG9B;AACD,qBAAa,mCAAoC,SAAQ,SAAS;IAE9D,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,GAAE,OAAe,EAC3C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,CAAC,EAAE,MAAM;IAIX,WAAW,IAAI,OAAO;CA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xB,OAAO,CAAC,0BAA0B;IA6BlC,OAAO,CAAC,gBAAgB;CAwDzB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArtifactDeployer = exports.ManifestValidationFailedError = exports.HostedResourceDeploymentFailedError = exports.AppSnapshotFailedError = exports.AppDeploymentFailedError = void 0;
|
|
3
|
+
exports.ArtifactDeployer = exports.ExistingInstallationsError = exports.ManifestValidationFailedError = exports.HostedResourceDeploymentFailedError = exports.AppSnapshotFailedError = exports.AppDeploymentFailedError = void 0;
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
5
|
const DEPLOYMENT_EVENT_POLL_INTERVAL = 500;
|
|
6
6
|
class AppDeploymentFailedError extends cli_shared_1.BaseError {
|
|
@@ -42,6 +42,17 @@ class ManifestValidationFailedError extends cli_shared_1.UserError {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
exports.ManifestValidationFailedError = ManifestValidationFailedError;
|
|
45
|
+
class ExistingInstallationsError extends cli_shared_1.BaseError {
|
|
46
|
+
userError;
|
|
47
|
+
constructor(userError = false, requestId, message) {
|
|
48
|
+
super(requestId, `${message} (requestId: ${requestId || 'unknown'})`);
|
|
49
|
+
this.userError = userError;
|
|
50
|
+
}
|
|
51
|
+
isUserError() {
|
|
52
|
+
return this.userError;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.ExistingInstallationsError = ExistingInstallationsError;
|
|
45
56
|
function isTransitionEvent(event) {
|
|
46
57
|
return event.__typename === 'AppDeploymentTransitionEvent';
|
|
47
58
|
}
|
|
@@ -66,8 +77,8 @@ class ArtifactDeployer {
|
|
|
66
77
|
}
|
|
67
78
|
async deploy(environmentKey, artifactUrl, hostedResourceUploadId, majorVersion) {
|
|
68
79
|
const { id } = await this.getConfiguredApp();
|
|
69
|
-
const deploymentId = await this.doDeploy(id, environmentKey, artifactUrl, hostedResourceUploadId, majorVersion);
|
|
70
|
-
await this.monitorDeployment(id, environmentKey, deploymentId);
|
|
80
|
+
const { deploymentId, requestId } = await this.doDeploy(id, environmentKey, artifactUrl, hostedResourceUploadId, majorVersion);
|
|
81
|
+
await this.monitorDeployment(id, environmentKey, deploymentId, requestId);
|
|
71
82
|
}
|
|
72
83
|
async doDeploy(appId, environmentKey, artifactUrl, hostedResourceUploadId, majorVersion) {
|
|
73
84
|
return await this.deployClient.deploy({
|
|
@@ -78,8 +89,8 @@ class ArtifactDeployer {
|
|
|
78
89
|
majorVersion
|
|
79
90
|
});
|
|
80
91
|
}
|
|
81
|
-
async pollAndCheckEvents(appId, environmentKey, deploymentId, totalStreamed) {
|
|
82
|
-
const { stages, status, errorDetails
|
|
92
|
+
async pollAndCheckEvents(appId, environmentKey, deploymentId, totalStreamed, requestId) {
|
|
93
|
+
const { stages, status, errorDetails } = await this.deployMonitorClient.getDeployment({
|
|
83
94
|
appId,
|
|
84
95
|
environmentKey,
|
|
85
96
|
deploymentId
|
|
@@ -100,11 +111,11 @@ class ArtifactDeployer {
|
|
|
100
111
|
totalStreamed
|
|
101
112
|
};
|
|
102
113
|
}
|
|
103
|
-
async monitorDeployment(appId, environmentKey, deploymentId) {
|
|
114
|
+
async monitorDeployment(appId, environmentKey, deploymentId, requestId) {
|
|
104
115
|
let totalStreamed = 0;
|
|
105
116
|
let status = cli_shared_1.AppDeploymentStatus.InProgress;
|
|
106
117
|
while (status !== cli_shared_1.AppDeploymentStatus.Done) {
|
|
107
|
-
const checks = await this.pollAndCheckEvents(appId, environmentKey, deploymentId, totalStreamed);
|
|
118
|
+
const checks = await this.pollAndCheckEvents(appId, environmentKey, deploymentId, totalStreamed, requestId);
|
|
108
119
|
totalStreamed = checks.totalStreamed;
|
|
109
120
|
status = checks.status;
|
|
110
121
|
await this.pause(DEPLOYMENT_EVENT_POLL_INTERVAL);
|
|
@@ -169,6 +180,9 @@ class ArtifactDeployer {
|
|
|
169
180
|
if (causeMessage?.toLowerCase().includes('egress')) {
|
|
170
181
|
throw new AppDeploymentFailedError(true, requestId, cli_shared_1.Text.deploy.egressURL.error(causeMessage));
|
|
171
182
|
}
|
|
183
|
+
if (causeMessage?.toLowerCase().includes('existing installations')) {
|
|
184
|
+
throw new ExistingInstallationsError(true, requestId, cli_shared_1.Text.deploy.crossContext.error);
|
|
185
|
+
}
|
|
172
186
|
break;
|
|
173
187
|
}
|
|
174
188
|
case 'HOSTED_RESOURCE_TOO_MANY_FILES':
|
|
@@ -6,8 +6,12 @@ export interface TriggerDeployDetails {
|
|
|
6
6
|
hostedResourceUploadId?: string;
|
|
7
7
|
majorVersion?: number;
|
|
8
8
|
}
|
|
9
|
+
export declare type TriggerDeployResponse = {
|
|
10
|
+
deploymentId: string;
|
|
11
|
+
requestId: string;
|
|
12
|
+
};
|
|
9
13
|
export interface TriggerDeployClient {
|
|
10
|
-
deploy(details: TriggerDeployDetails): Promise<
|
|
14
|
+
deploy(details: TriggerDeployDetails): Promise<TriggerDeployResponse>;
|
|
11
15
|
}
|
|
12
16
|
export declare class NoDeploymentError extends Error {
|
|
13
17
|
constructor();
|
|
@@ -15,6 +19,9 @@ export declare class NoDeploymentError extends Error {
|
|
|
15
19
|
export declare class TriggerDeployGraphQLClient implements TriggerDeployClient {
|
|
16
20
|
private readonly graphqlClient;
|
|
17
21
|
constructor(graphqlClient: GraphQLClient);
|
|
18
|
-
deploy(deploymentDetails: TriggerDeployDetails): Promise<
|
|
22
|
+
deploy(deploymentDetails: TriggerDeployDetails): Promise<{
|
|
23
|
+
deploymentId: string;
|
|
24
|
+
requestId: string;
|
|
25
|
+
}>;
|
|
19
26
|
}
|
|
20
27
|
//# sourceMappingURL=trigger-deploy-graphql-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-deploy-graphql-client.d.ts","sourceRoot":"","sources":["../../../src/deploy/deployer/trigger-deploy-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAId,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"trigger-deploy-graphql-client.d.ts","sourceRoot":"","sources":["../../../src/deploy/deployer/trigger-deploy-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAId,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,oBAAY,qBAAqB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACvE;AAED,qBAAa,iBAAkB,SAAQ,KAAK;;CAI3C;AAED,qBAAa,0BAA2B,YAAW,mBAAmB;IACxD,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,MAAM,CAAC,iBAAiB,EAAE,oBAAoB;;;;CA4C5D"}
|
|
@@ -45,7 +45,7 @@ class TriggerDeployGraphQLClient {
|
|
|
45
45
|
if (!deployment) {
|
|
46
46
|
throw new NoDeploymentError();
|
|
47
47
|
}
|
|
48
|
-
return deployment.id;
|
|
48
|
+
return { deploymentId: deployment.id, requestId: requestId || 'unknown' };
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
exports.TriggerDeployGraphQLClient = TriggerDeployGraphQLClient;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Bundler, EntryPoint } from '@forge/bundler';
|
|
2
|
-
import { Handler, Logger, FileSystemReader,
|
|
2
|
+
import { Handler, Logger, FileSystemReader, ConfigReader, type I18nResourceBundle } from '@forge/cli-shared';
|
|
3
3
|
import { App } from '@forge/manifest';
|
|
4
4
|
import { Archiver } from './archiver';
|
|
5
5
|
export interface RuntimeBundleResult {
|
|
@@ -11,8 +11,8 @@ export declare class RuntimeBundler {
|
|
|
11
11
|
private readonly logger;
|
|
12
12
|
private readonly bundler;
|
|
13
13
|
protected readonly fileSystemReader: FileSystemReader;
|
|
14
|
-
private readonly
|
|
15
|
-
constructor(archiverFactory: () => Archiver, logger: Logger, bundler: Bundler, fileSystemReader: FileSystemReader,
|
|
14
|
+
private readonly configReader;
|
|
15
|
+
constructor(archiverFactory: () => Archiver, logger: Logger, bundler: Bundler, fileSystemReader: FileSystemReader, configReader: ConfigReader);
|
|
16
16
|
protected packageCode(archiver: Archiver, entryPoints: EntryPoint[]): Promise<string[]>;
|
|
17
17
|
protected packageDependencies(archiver: Archiver): Promise<void>;
|
|
18
18
|
protected packageAll(archiver: Archiver, handlers: Handler[], packageConfig: App['package']): Promise<string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-bundler.d.ts","sourceRoot":"","sources":["../../../src/deploy/packager/runtime-bundler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAA+B,UAAU,EAAkB,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAEL,OAAO,EACP,MAAM,EAEN,gBAAgB,EAEhB,
|
|
1
|
+
{"version":3,"file":"runtime-bundler.d.ts","sourceRoot":"","sources":["../../../src/deploy/packager/runtime-bundler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,E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EAAE,GAAG,CAAC,SAAS,CAAC,GAC7B,OAAO,CAAC,mBAAmB,CAAC;CAWhC;AAED,qBAAa,qBAAsB,SAAQ,cAAc;IAC1C,MAAM,CACjB,QAAQ,EAAE,OAAO,EAAE,EACnB,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,GAC7B,OAAO,CAAC,mBAAmB,CAAC;CAMhC;AAED,qBAAa,kBAAmB,SAAQ,cAAc;cACpC,UAAU,CACxB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,OAAO,EAAE,EACnB,aAAa,EAAE,GAAG,CAAC,SAAS,CAAC,GAC5B,OAAO,CAAC,MAAM,EAAE,CAAC;CASrB"}
|
|
@@ -12,13 +12,13 @@ class RuntimeBundler {
|
|
|
12
12
|
logger;
|
|
13
13
|
bundler;
|
|
14
14
|
fileSystemReader;
|
|
15
|
-
|
|
16
|
-
constructor(archiverFactory, logger, bundler, fileSystemReader,
|
|
15
|
+
configReader;
|
|
16
|
+
constructor(archiverFactory, logger, bundler, fileSystemReader, configReader) {
|
|
17
17
|
this.archiverFactory = archiverFactory;
|
|
18
18
|
this.logger = logger;
|
|
19
19
|
this.bundler = bundler;
|
|
20
20
|
this.fileSystemReader = fileSystemReader;
|
|
21
|
-
this.
|
|
21
|
+
this.configReader = configReader;
|
|
22
22
|
}
|
|
23
23
|
async packageCode(archiver, entryPoints) {
|
|
24
24
|
const moduleList = [];
|
|
@@ -44,7 +44,8 @@ class RuntimeBundler {
|
|
|
44
44
|
return moduleList;
|
|
45
45
|
}
|
|
46
46
|
async packageDependencies(archiver) {
|
|
47
|
-
|
|
47
|
+
const manifest = JSON.stringify(await this.configReader.readConfig());
|
|
48
|
+
archiver.addFile(cli_shared_1.manifestFileName, Buffer.from(manifest));
|
|
48
49
|
for (const fileName of cli_shared_1.dependencyFileNames) {
|
|
49
50
|
if (!this.fileSystemReader.fileExists(fileName)) {
|
|
50
51
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installation-helper.d.ts","sourceRoot":"","sources":["../../src/installations/installation-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,OAAO,
|
|
1
|
+
{"version":3,"file":"installation-helper.d.ts","sourceRoot":"","sources":["../../src/installations/installation-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,OAAO,EAAkD,EAAE,EAAmB,MAAM,mBAAmB,CAAC;AAExG,wBAAgB,sBAAsB,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAWtE;AAED,wBAAsB,wBAAwB,CAC5C,EAAE,EAAE,EAAE,EACN,aAAa,EAAE,YAAY,EAAE,EAC7B,uBAAuB,EAAE,MAAM,EAC/B,yBAAyB,EAAE,MAAM,GAChC,OAAO,CAAC,YAAY,CAAC,CAoBvB"}
|