@forge/cli 0.0.0-experimental-383053a → 0.0.0-experimental-3b4aabe
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 +3872 -7
- package/README.md +18 -19
- package/npm-shrinkwrap.json +3100 -3556
- package/out/analytics-client/analytics-client.d.ts +3 -1
- package/out/analytics-client/analytics-client.d.ts.map +1 -1
- package/out/analytics-client/analytics-client.js +5 -1
- package/out/autocomplete/autocomplete-config.json +232 -212
- package/out/autocomplete/index.d.ts.map +1 -1
- package/out/autocomplete/index.js +12 -8
- package/out/autocomplete/isSupportedShell.d.ts +2 -0
- package/out/autocomplete/isSupportedShell.d.ts.map +1 -0
- package/out/autocomplete/isSupportedShell.js +11 -0
- package/out/autocomplete/types.d.ts +5 -1
- package/out/autocomplete/types.d.ts.map +1 -1
- package/out/autocomplete/util.d.ts +1 -1
- package/out/autocomplete/util.d.ts.map +1 -1
- package/out/autocomplete/util.js +3 -3
- package/out/bin/cli.js +0 -2
- package/out/bin/postinstall.js +10 -1
- package/out/command-line/anon-user-id.js +6 -10
- package/out/command-line/command.d.ts +28 -8
- package/out/command-line/command.d.ts.map +1 -1
- package/out/command-line/command.js +190 -49
- package/out/command-line/controller/assertUnreachable.d.ts +2 -0
- package/out/command-line/controller/assertUnreachable.d.ts.map +1 -0
- package/out/command-line/controller/assertUnreachable.js +7 -0
- package/out/command-line/controller/autocomplete-controller.d.ts +2 -1
- package/out/command-line/controller/autocomplete-controller.d.ts.map +1 -1
- package/out/command-line/controller/autocomplete-controller.js +29 -3
- package/out/command-line/controller/deploy-controller.d.ts +13 -2
- package/out/command-line/controller/deploy-controller.d.ts.map +1 -1
- package/out/command-line/controller/deploy-controller.js +79 -5
- package/out/command-line/controller/getNodeVersion.d.ts +2 -0
- package/out/command-line/controller/getNodeVersion.d.ts.map +1 -0
- package/out/command-line/controller/getNodeVersion.js +7 -0
- package/out/command-line/controller/install-controller.d.ts +5 -4
- package/out/command-line/controller/install-controller.d.ts.map +1 -1
- package/out/command-line/controller/install-controller.js +31 -56
- package/out/command-line/controller/lint-controller.js +1 -1
- package/out/command-line/controller/pre-command-controller.d.ts +8 -1
- package/out/command-line/controller/pre-command-controller.d.ts.map +1 -1
- package/out/command-line/controller/pre-command-controller.js +22 -2
- package/out/command-line/controller/prerequisites-controller.d.ts +11 -0
- package/out/command-line/controller/prerequisites-controller.d.ts.map +1 -0
- package/out/command-line/controller/prerequisites-controller.js +34 -0
- package/out/command-line/controller/settings-controller.d.ts +19 -0
- package/out/command-line/controller/settings-controller.d.ts.map +1 -0
- package/out/command-line/controller/settings-controller.js +48 -0
- package/out/command-line/controller/stubController.d.ts +9 -0
- package/out/command-line/controller/stubController.d.ts.map +1 -0
- package/out/command-line/controller/stubController.js +15 -0
- package/out/command-line/dependency-injection.d.ts +13 -3
- package/out/command-line/dependency-injection.d.ts.map +1 -1
- package/out/command-line/dependency-injection.js +53 -22
- package/out/command-line/index.d.ts +2 -38
- package/out/command-line/index.d.ts.map +1 -1
- package/out/command-line/index.js +22 -43
- package/out/command-line/register-app-commands.d.ts.map +1 -1
- package/out/command-line/register-app-commands.js +2 -12
- package/out/command-line/register-authentication-command.d.ts.map +1 -1
- package/out/command-line/register-authentication-command.js +1 -16
- package/out/command-line/register-autocomplete-commands.d.ts +0 -2
- package/out/command-line/register-autocomplete-commands.d.ts.map +1 -1
- package/out/command-line/register-autocomplete-commands.js +2 -9
- package/out/command-line/register-deployment-commands.d.ts +8 -0
- package/out/command-line/register-deployment-commands.d.ts.map +1 -1
- package/out/command-line/register-deployment-commands.js +1 -0
- package/out/command-line/register-environment-variables-commands.d.ts +1 -1
- package/out/command-line/register-environment-variables-commands.d.ts.map +1 -1
- package/out/command-line/register-environment-variables-commands.js +27 -10
- package/out/command-line/register-installation-commands.d.ts +4 -1
- package/out/command-line/register-installation-commands.d.ts.map +1 -1
- package/out/command-line/register-installation-commands.js +39 -23
- package/out/command-line/register-log-commands.d.ts +1 -0
- package/out/command-line/register-log-commands.d.ts.map +1 -1
- package/out/command-line/register-log-commands.js +26 -3
- package/out/command-line/register-providers-commands.d.ts +3 -0
- package/out/command-line/register-providers-commands.d.ts.map +1 -0
- package/out/command-line/register-providers-commands.js +43 -0
- package/out/command-line/register-settings-commands.d.ts +3 -0
- package/out/command-line/register-settings-commands.d.ts.map +1 -0
- package/out/command-line/register-settings-commands.js +37 -0
- package/out/command-line/register-webtrigger-commands.d.ts.map +1 -1
- package/out/command-line/register-webtrigger-commands.js +9 -11
- package/out/command-line/unique-machine-id.d.ts +1 -0
- package/out/command-line/unique-machine-id.d.ts.map +1 -1
- package/out/command-line/unique-machine-id.js +3 -12
- package/out/command-line/version-info.d.ts +1 -0
- package/out/command-line/version-info.d.ts.map +1 -1
- package/out/command-line/version-info.js +3 -2
- package/out/command-line/view/analytics-settings-view.d.ts +7 -0
- package/out/command-line/view/analytics-settings-view.d.ts.map +1 -0
- package/out/command-line/view/analytics-settings-view.js +18 -0
- package/out/command-line/view/deploy-view.d.ts +7 -1
- package/out/command-line/view/deploy-view.d.ts.map +1 -1
- package/out/command-line/view/deploy-view.js +25 -3
- package/out/command-line/view/install-view.d.ts +5 -3
- package/out/command-line/view/install-view.d.ts.map +1 -1
- package/out/command-line/view/install-view.js +19 -10
- package/out/command-line/view/lint-view.d.ts +3 -2
- package/out/command-line/view/lint-view.d.ts.map +1 -1
- package/out/command-line/view/lint-view.js +3 -0
- package/out/command-line/view/lite-lint-view.d.ts +3 -2
- package/out/command-line/view/lite-lint-view.d.ts.map +1 -1
- package/out/command-line/view/lite-lint-view.js +3 -0
- package/out/command-line/view/settings-view.d.ts +8 -0
- package/out/command-line/view/settings-view.d.ts.map +1 -0
- package/out/command-line/view/settings-view.js +21 -0
- package/out/deploy/deployer/deploy-monitor-graphql-client.js +1 -1
- package/out/deploy/deployer/deployer.d.ts.map +1 -1
- package/out/deploy/deployer/deployer.js +17 -1
- package/out/deploy/deployer/trigger-deploy-graphql-client.d.ts.map +1 -1
- package/out/deploy/deployer/trigger-deploy-graphql-client.js +9 -6
- package/out/deploy/packager/archiver.d.ts +3 -2
- package/out/deploy/packager/archiver.d.ts.map +1 -1
- package/out/deploy/packager/archiver.js +10 -2
- package/out/deploy/packager/packager.d.ts.map +1 -1
- package/out/deploy/packager/packager.js +20 -20
- package/out/deploy/uploader/artifact-graphql-client.d.ts.map +1 -1
- package/out/deploy/uploader/artifact-graphql-client.js +12 -9
- package/out/environment-variables/graphql-client.d.ts +1 -1
- package/out/environment-variables/graphql-client.d.ts.map +1 -1
- package/out/environment-variables/graphql-client.js +19 -13
- package/out/environment-variables/list-environment-variables.d.ts +2 -2
- package/out/environment-variables/list-environment-variables.d.ts.map +1 -1
- package/out/installations/graphql-client.d.ts +19 -13
- package/out/installations/graphql-client.d.ts.map +1 -1
- package/out/installations/graphql-client.js +168 -61
- package/out/installations/install-app-site.d.ts +2 -12
- package/out/installations/install-app-site.d.ts.map +1 -1
- package/out/installations/install-app-site.js +3 -14
- package/out/installations/uninstall-app.d.ts +5 -3
- package/out/installations/uninstall-app.d.ts.map +1 -1
- package/out/installations/uninstall-app.js +7 -7
- package/out/migration-keys/graphql-client.d.ts +8 -0
- package/out/migration-keys/graphql-client.d.ts.map +1 -0
- package/out/migration-keys/graphql-client.js +55 -0
- package/out/providers/configure-provider.d.ts +19 -0
- package/out/providers/configure-provider.d.ts.map +1 -0
- package/out/providers/configure-provider.js +14 -0
- package/out/providers/graphql-client.d.ts +12 -0
- package/out/providers/graphql-client.d.ts.map +1 -0
- package/out/providers/graphql-client.js +47 -0
- package/out/service/cached-config-service.d.ts +8 -0
- package/out/service/cached-config-service.d.ts.map +1 -0
- package/out/service/cached-config-service.js +16 -0
- package/out/service/installation-service.d.ts +13 -13
- package/out/service/installation-service.d.ts.map +1 -1
- package/out/service/installation-service.js +38 -23
- package/out/service/lint-service.d.ts +2 -2
- package/out/service/lint-service.d.ts.map +1 -1
- package/out/service/lint-service.js +3 -3
- package/out/service/lite-lint-service.d.ts +3 -3
- package/out/service/lite-lint-service.d.ts.map +1 -1
- package/out/service/lite-lint-service.js +2 -2
- package/out/service/migration-keys-service.d.ts +19 -0
- package/out/service/migration-keys-service.d.ts.map +1 -0
- package/out/service/migration-keys-service.js +14 -0
- package/out/service/port-finding-service.d.ts +12 -0
- package/out/service/port-finding-service.d.ts.map +1 -0
- package/out/service/port-finding-service.js +34 -0
- package/out/service/resource-packaging-service.d.ts +4 -4
- package/out/service/resource-packaging-service.d.ts.map +1 -1
- package/out/service/resource-packaging-service.js +9 -22
- package/out/service/tunnel-service.d.ts +6 -2
- package/out/service/tunnel-service.d.ts.map +1 -1
- package/out/service/tunnel-service.js +53 -12
- package/out/webtrigger/get-webtrigger-url.d.ts +10 -4
- package/out/webtrigger/get-webtrigger-url.d.ts.map +1 -1
- package/out/webtrigger/get-webtrigger-url.js +11 -18
- package/out/webtrigger/graphql-client.d.ts +14 -0
- package/out/webtrigger/graphql-client.d.ts.map +1 -0
- package/out/webtrigger/graphql-client.js +52 -0
- package/out/workers/analytics-message-worker.d.ts +3 -1
- package/out/workers/analytics-message-worker.d.ts.map +1 -1
- package/out/workers/analytics-message-worker.js +9 -2
- package/out/workers/forge-cli-workers.js +6 -1
- package/package.json +19 -18
- package/out/bin/preinstall.d.ts +0 -3
- package/out/bin/preinstall.d.ts.map +0 -1
- package/out/bin/preinstall.js +0 -9
- package/out/command-line/cli-prerequisites.d.ts +0 -3
- package/out/command-line/cli-prerequisites.d.ts.map +0 -1
- package/out/command-line/cli-prerequisites.js +0 -37
|
@@ -3,10 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DeployView = void 0;
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
5
|
const lint_1 = require("@forge/lint");
|
|
6
|
+
const cs_ari_1 = require("@forge/util/packages/cs-ari");
|
|
6
7
|
class DeployView {
|
|
7
8
|
constructor(ui) {
|
|
8
9
|
this.ui = ui;
|
|
9
10
|
}
|
|
11
|
+
getLogger() {
|
|
12
|
+
return this.ui;
|
|
13
|
+
}
|
|
10
14
|
displayStart(environment) {
|
|
11
15
|
this.ui.info(cli_shared_1.Text.deploy.cmd.start1(environment, cli_shared_1.environmentToOption));
|
|
12
16
|
}
|
|
@@ -27,9 +31,27 @@ class DeployView {
|
|
|
27
31
|
displayNoLintProblems() {
|
|
28
32
|
this.ui.info(cli_shared_1.LogColor.trace(cli_shared_1.Text.lint.noProblems) + '\n');
|
|
29
33
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
displayConnectKeyChangeWarning(environment, migrationKey, connectKey) {
|
|
35
|
+
this.ui.warn(cli_shared_1.Text.deploy.connectKeyChange.connectKeyChangeWarning(environment, migrationKey, connectKey));
|
|
36
|
+
}
|
|
37
|
+
displayConnectKeyDeleteWarning(environment) {
|
|
38
|
+
this.ui.warn(cli_shared_1.Text.deploy.connectKeyChange.connectKeyDeleteWarning(environment));
|
|
39
|
+
}
|
|
40
|
+
displayMPACAppConnectKeyChangeError(mpacAppKey, connectKey) {
|
|
41
|
+
this.ui.info(cli_shared_1.Text.deploy.connectKeyChange.mpacAppConnectKeyChangeError(mpacAppKey, connectKey));
|
|
42
|
+
}
|
|
43
|
+
async promptToContinueDeletingConnectKey() {
|
|
44
|
+
return await this.ui.confirm(cli_shared_1.Text.deploy.connectKeyChange.continueDelete);
|
|
45
|
+
}
|
|
46
|
+
async promptToContinueChangingConnectKey() {
|
|
47
|
+
return await this.ui.confirm(cli_shared_1.Text.deploy.connectKeyChange.continueChange);
|
|
48
|
+
}
|
|
49
|
+
async reportDeploymentProgress(id, environment, showDistributionPageLink, deployCallback) {
|
|
50
|
+
const result = await this.ui.displayProgress(() => deployCallback(), cli_shared_1.Text.deploy.cmd.start2(environment, cli_shared_1.environmentToOption), cli_shared_1.Text.deploy.cmd.success);
|
|
51
|
+
this.ui.info(cli_shared_1.Text.deploy.cmd.successDetails(environment, cli_shared_1.environmentToOption));
|
|
52
|
+
if (environment === 'production' && showDistributionPageLink) {
|
|
53
|
+
this.ui.info(cli_shared_1.Text.deploy.cmd.distributePageLink(cs_ari_1.parseAppAri(cs_ari_1.parse(id)).appId));
|
|
54
|
+
}
|
|
33
55
|
return result;
|
|
34
56
|
}
|
|
35
57
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { Installation } from '../../service/installation-service';
|
|
2
1
|
import { UI } from '@forge/cli-shared';
|
|
2
|
+
import { AppEnvironmentPermissions, Installation } from '../../service/installation-service';
|
|
3
3
|
interface InstallOrUpgradeCommandText {
|
|
4
4
|
listScopes: (scopes: string[]) => string;
|
|
5
|
-
|
|
5
|
+
listEgressAddresses: (egressAddresses: string[]) => string;
|
|
6
|
+
permissionsMismatch: (environment: string) => string;
|
|
7
|
+
promptForPermissionsConfirmation: (permissionsMismatchInDevelopment: boolean) => string;
|
|
6
8
|
}
|
|
7
9
|
export declare class NoScopesError extends Error {
|
|
8
10
|
}
|
|
9
11
|
export declare class InstallView {
|
|
10
12
|
private readonly ui;
|
|
11
13
|
constructor(ui: UI);
|
|
12
|
-
|
|
14
|
+
promptForPermissionsConfirmation({ scopes, egressAddresses, addedScopes }: AppEnvironmentPermissions, manifestScopes: string[], manifestEgressAddresses: string[], environment: string, confirmScopes: boolean, nonInteractive: boolean, text: InstallOrUpgradeCommandText): Promise<boolean>;
|
|
13
15
|
promptForUpgrade(installations: Installation[]): Promise<Installation>;
|
|
14
16
|
}
|
|
15
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/install-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"install-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/install-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,EAAE,EAA8B,MAAM,mBAAmB,CAAC;AAGjH,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAE7F,UAAU,2BAA2B;IACnC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;IACzC,mBAAmB,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;IAC3D,mBAAmB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IACrD,gCAAgC,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,MAAM,CAAC;CACzF;AAED,qBAAa,aAAc,SAAQ,KAAK;CAAG;AAE3C,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,EAAE;IAEtB,gCAAgC,CAC3C,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,EAAE,yBAAyB,EACnE,cAAc,EAAE,MAAM,EAAE,EACxB,uBAAuB,EAAE,MAAM,EAAE,EACjC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,OAAO,EACvB,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,OAAO,CAAC;IAoCN,gBAAgB,CAAC,aAAa,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC;CAqBpF"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InstallView = exports.NoScopesError = void 0;
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
+
const lodash_1 = require("lodash");
|
|
5
6
|
class NoScopesError extends Error {
|
|
6
7
|
}
|
|
7
8
|
exports.NoScopesError = NoScopesError;
|
|
@@ -9,19 +10,27 @@ class InstallView {
|
|
|
9
10
|
constructor(ui) {
|
|
10
11
|
this.ui = ui;
|
|
11
12
|
}
|
|
12
|
-
async
|
|
13
|
-
const isDefaultEnvironment = (env) => env === cli_shared_1.optionToEnvironment(cli_shared_1.DEFAULT_ENVIRONMENT_OPTION);
|
|
13
|
+
async promptForPermissionsConfirmation({ scopes, egressAddresses, addedScopes }, manifestScopes, manifestEgressAddresses, environment, confirmScopes, nonInteractive, text) {
|
|
14
14
|
if (scopes.length === 0) {
|
|
15
15
|
throw new NoScopesError();
|
|
16
16
|
}
|
|
17
|
-
if (
|
|
18
|
-
this.ui.info(text.
|
|
17
|
+
if (addedScopes.length)
|
|
18
|
+
this.ui.info(text.listScopes(addedScopes));
|
|
19
|
+
if (egressAddresses.length)
|
|
20
|
+
this.ui.info(text.listEgressAddresses(egressAddresses));
|
|
21
|
+
const cleanedManifestScopes = [...new Set(['read:me', ...manifestScopes])];
|
|
22
|
+
const groupedManifestEgressAddresses = [];
|
|
23
|
+
let permissionsMismatchWithManifest = false;
|
|
24
|
+
if (cli_shared_1.environmentToOption(environment) === cli_shared_1.DEFAULT_ENVIRONMENT_OPTION) {
|
|
25
|
+
const scopesMismatch = !lodash_1.isEqual([...cleanedManifestScopes].sort(), [...scopes].sort());
|
|
26
|
+
const egressAddressesMismatch = !lodash_1.isEqual([...groupedManifestEgressAddresses].sort(), [...egressAddresses].sort());
|
|
27
|
+
permissionsMismatchWithManifest = scopesMismatch || egressAddressesMismatch;
|
|
28
|
+
if (permissionsMismatchWithManifest) {
|
|
29
|
+
this.ui.warn(text.permissionsMismatch(cli_shared_1.environmentToOption(environment)));
|
|
30
|
+
}
|
|
19
31
|
}
|
|
20
|
-
|
|
21
|
-
this.ui.
|
|
22
|
-
}
|
|
23
|
-
if (!confirmScopes) {
|
|
24
|
-
const scopesConfirmationResult = await this.ui.confirm(cli_shared_1.Text.install.promptForScopesConfirmation);
|
|
32
|
+
if (!confirmScopes && !nonInteractive) {
|
|
33
|
+
const scopesConfirmationResult = await this.ui.confirm(text.promptForPermissionsConfirmation(permissionsMismatchWithManifest));
|
|
25
34
|
if (scopesConfirmationResult)
|
|
26
35
|
this.ui.emptyLine();
|
|
27
36
|
return scopesConfirmationResult;
|
|
@@ -29,7 +38,7 @@ class InstallView {
|
|
|
29
38
|
return true;
|
|
30
39
|
}
|
|
31
40
|
async promptForUpgrade(installations) {
|
|
32
|
-
const installationIndex = await this.ui.promptForSingleChoiceTable(cli_shared_1.Text.upgradeContext.promptInstallation, cli_shared_1.Text.upgradeContext.overview, ['Environment', 'Site', 'Product', '
|
|
41
|
+
const installationIndex = await this.ui.promptForSingleChoiceTable(cli_shared_1.Text.upgradeContext.promptInstallation, cli_shared_1.Text.upgradeContext.overview, ['Environment', 'Site', 'Product', 'Version'], installations.map(({ id, environmentKey, product, site, version }) => ({
|
|
33
42
|
names: [
|
|
34
43
|
cli_shared_1.environmentToOption(environmentKey),
|
|
35
44
|
site,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { UI } from '@forge/cli-shared';
|
|
2
|
-
import { LintFixState, LintResult } from '@forge/lint';
|
|
2
|
+
import { LintFixState, LintLogger, LintResult } from '@forge/lint';
|
|
3
3
|
export declare class LintView {
|
|
4
4
|
private readonly ui;
|
|
5
5
|
private lintResultReporter;
|
|
6
|
-
constructor(ui: UI, lintResultReporter?: (logger: Pick<import("@forge/cli-shared").Logger, "info">, lintResults: LintResult[], showSummary?: boolean | undefined) => void);
|
|
6
|
+
constructor(ui: UI, lintResultReporter?: (logger: Pick<import("@forge/cli-shared/src").Logger, "info">, lintResults: LintResult[], showSummary?: boolean | undefined) => void);
|
|
7
7
|
reportLintResult(results: LintResult[]): void;
|
|
8
8
|
reportFixResult(result: LintFixState): void;
|
|
9
|
+
getLogger(): LintLogger;
|
|
9
10
|
showBlurb(): void;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=lint-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/lint-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,EAAE,EAAY,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAqB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"lint-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/lint-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,EAAE,EAAY,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAqB,MAAM,aAAa,CAAC;AAEtF,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAM,OAAO,CAAC,kBAAkB;gBAAlC,EAAE,EAAE,EAAE,EAAU,kBAAkB,uIAAoB;IAE5E,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI;IAI7C,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAU3C,SAAS,IAAI,UAAU;IAIvB,SAAS,IAAI,IAAI;CAGzB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { UI } from '@forge/cli-shared';
|
|
2
|
-
import { LintResult } from '@forge/lint';
|
|
2
|
+
import { LintLogger, LintResult } from '@forge/lint';
|
|
3
3
|
export declare class LiteLintView {
|
|
4
4
|
private readonly ui;
|
|
5
5
|
private reporter;
|
|
6
|
-
constructor(ui: UI, reporter?: (logger: Pick<import("@forge/cli-shared").Logger, "info">, lintResults: LintResult[], showSummary?: boolean | undefined) => void);
|
|
6
|
+
constructor(ui: UI, reporter?: (logger: Pick<import("@forge/cli-shared/src").Logger, "info">, lintResults: LintResult[], showSummary?: boolean | undefined) => void);
|
|
7
7
|
reportErrors(report: LintResult[]): void;
|
|
8
|
+
getLogger(): LintLogger;
|
|
8
9
|
}
|
|
9
10
|
//# sourceMappingURL=lite-lint-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lite-lint-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/lite-lint-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAqB,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"lite-lint-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/lite-lint-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAqB,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAExE,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAM,OAAO,CAAC,QAAQ;gBAAxB,EAAE,EAAE,EAAE,EAAU,QAAQ,uIAAoB;IAElE,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI;IAKxC,SAAS,IAAI,UAAU;CAG/B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UI } from '@forge/cli-shared';
|
|
2
|
+
export declare class SettingsView {
|
|
3
|
+
private readonly ui;
|
|
4
|
+
constructor(ui: UI);
|
|
5
|
+
showSettings(preferences: [string, string, boolean | undefined][]): void;
|
|
6
|
+
setSuccess(setting: string, value: string): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=settings-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/settings-view.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAEvC,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,EAAE;IAE5B,YAAY,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC,EAAE;IAWjE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAIjD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SettingsView = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
|
|
6
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
7
|
+
class SettingsView {
|
|
8
|
+
constructor(ui) {
|
|
9
|
+
this.ui = ui;
|
|
10
|
+
}
|
|
11
|
+
showSettings(preferences) {
|
|
12
|
+
const table = new cli_table3_1.default(Object.assign(Object.assign({}, cli_shared_1.TableStyle.default), { head: ['Setting', 'Description', 'Value'] }));
|
|
13
|
+
preferences.forEach(([preference, desc, value]) => table.push([preference, desc, value !== null && value !== void 0 ? value : 'Not set']));
|
|
14
|
+
this.ui.info(table.toString());
|
|
15
|
+
}
|
|
16
|
+
setSuccess(setting, value) {
|
|
17
|
+
this.ui.info(cli_shared_1.Text.settings.set.success(setting, value));
|
|
18
|
+
this.ui.emptyLine();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.SettingsView = SettingsView;
|
|
@@ -14,7 +14,7 @@ class DeployMonitorGraphqlClient {
|
|
|
14
14
|
}
|
|
15
15
|
async getDeployment({ appId, environmentKey, deploymentId }) {
|
|
16
16
|
const result = await this.graphqlClient.query(`
|
|
17
|
-
query
|
|
17
|
+
query forge_cli_getApplicationDeploymentStatus($appId: ID!, $environmentKey: String!, $id: ID!) {
|
|
18
18
|
appDeployment(appId: $appId, environmentKey: $environmentKey, id: $id) {
|
|
19
19
|
status
|
|
20
20
|
errorDetails {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployer.d.ts","sourceRoot":"","sources":["../../../src/deploy/deployer/deployer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAOjB,KAAK,EAEL,EAAE,EAEH,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAsB,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAItE,qBAAa,wBAAyB,SAAQ,KAAK;CAAG;AACtD,qBAAa,sBAAuB,SAAQ,KAAK;CAAG;AACpD,qBAAa,mCAAoC,SAAQ,KAAK;CAAG;AAEjE,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,sBAAsB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrG;AAyBD,qBAAa,gBAAiB,YAAW,QAAQ;IAE7C,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAJF,gBAAgB,EAAE,iBAAiB,EACnC,YAAY,EAAE,mBAAmB,EACjC,mBAAmB,EAAE,mBAAmB,EACxC,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,EAAE;IAGZ,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,sBAAsB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAMlG,QAAQ;IAcT,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;;;;YA2BpG,iBAAiB;IAa/B,OAAO,CAAC,gBAAgB;IAsBxB,OAAO,CAAC,0BAA0B;IA6BlC,OAAO,CAAC,gBAAgB;
|
|
1
|
+
{"version":3,"file":"deployer.d.ts","sourceRoot":"","sources":["../../../src/deploy/deployer/deployer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAOjB,KAAK,EAEL,EAAE,EAEH,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAsB,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAItE,qBAAa,wBAAyB,SAAQ,KAAK;CAAG;AACtD,qBAAa,sBAAuB,SAAQ,KAAK;CAAG;AACpD,qBAAa,mCAAoC,SAAQ,KAAK;CAAG;AAEjE,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,sBAAsB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrG;AAyBD,qBAAa,gBAAiB,YAAW,QAAQ;IAE7C,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAJF,gBAAgB,EAAE,iBAAiB,EACnC,YAAY,EAAE,mBAAmB,EACjC,mBAAmB,EAAE,mBAAmB,EACxC,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,EAAE;IAGZ,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,sBAAsB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAMlG,QAAQ;IAcT,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;;;;YA2BpG,iBAAiB;IAa/B,OAAO,CAAC,gBAAgB;IAsBxB,OAAO,CAAC,0BAA0B;IA6BlC,OAAO,CAAC,gBAAgB;CA+BzB"}
|
|
@@ -120,10 +120,26 @@ class ArtifactDeployer {
|
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
122
|
handleErrorEvent(errorDetails) {
|
|
123
|
+
var _a;
|
|
123
124
|
if (errorDetails) {
|
|
124
125
|
const { code, message } = errorDetails;
|
|
125
126
|
if (code === 'APP_CODE_SNAPSHOT_FAILED') {
|
|
126
|
-
throw new AppSnapshotFailedError(cli_shared_1.Text.snapshot.error('App code error', message));
|
|
127
|
+
throw new AppSnapshotFailedError(cli_shared_1.Text.snapshot.error('App code snapshot error', message));
|
|
128
|
+
}
|
|
129
|
+
if (code === 'APP_CODE_SNAPSHOT_TIMEOUT') {
|
|
130
|
+
throw new AppSnapshotFailedError(cli_shared_1.Text.snapshot.timeout);
|
|
131
|
+
}
|
|
132
|
+
if (code === 'ENVIRONMENT_UPDATE_VALIDATION_FAILED') {
|
|
133
|
+
const causeMessage = (_a = errorDetails === null || errorDetails === void 0 ? void 0 : errorDetails.fields) === null || _a === void 0 ? void 0 : _a.validationResult.message.replace(/Upsert.*Details /, '');
|
|
134
|
+
if ((causeMessage === null || causeMessage === void 0 ? void 0 : causeMessage.startsWith('Invalid URL')) && causeMessage.includes('EGRESS')) {
|
|
135
|
+
throw new AppDeploymentFailedError(cli_shared_1.Text.deploy.egressURL.invalidURLError(causeMessage));
|
|
136
|
+
}
|
|
137
|
+
else if (causeMessage === null || causeMessage === void 0 ? void 0 : causeMessage.startsWith('Egress permission URL')) {
|
|
138
|
+
throw new AppDeploymentFailedError(cli_shared_1.Text.deploy.egressURL.tooManyURLCharactersError(causeMessage));
|
|
139
|
+
}
|
|
140
|
+
else if (causeMessage === null || causeMessage === void 0 ? void 0 : causeMessage.includes('permission URLs provided, exceeding')) {
|
|
141
|
+
throw new AppDeploymentFailedError(cli_shared_1.Text.deploy.egressURL.tooManyUrlsError(causeMessage));
|
|
142
|
+
}
|
|
127
143
|
}
|
|
128
144
|
if (code === 'HOSTED_RESOURCE_TOO_MANY_FILES') {
|
|
129
145
|
throw new HostedResourceDeploymentFailedError(cli_shared_1.Text.hostedResources.error(message));
|
|
@@ -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,
|
|
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;CACjC;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACxD;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;CAuC5D"}
|
|
@@ -14,12 +14,14 @@ class TriggerDeployGraphQLClient {
|
|
|
14
14
|
}
|
|
15
15
|
async deploy(deploymentDetails) {
|
|
16
16
|
const deployAppQuery = `
|
|
17
|
-
mutation
|
|
17
|
+
mutation forge_cli_deployApplication($input: CreateAppDeploymentInput!) {
|
|
18
18
|
createAppDeployment(input: $input) {
|
|
19
19
|
success
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
errors {
|
|
21
|
+
message
|
|
22
|
+
extensions {
|
|
23
|
+
errorType
|
|
24
|
+
}
|
|
23
25
|
}
|
|
24
26
|
deployment {
|
|
25
27
|
id
|
|
@@ -27,11 +29,12 @@ class TriggerDeployGraphQLClient {
|
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
`;
|
|
30
|
-
const { response: { createAppDeployment: { deployment,
|
|
32
|
+
const { response: { createAppDeployment: { deployment, success, errors } }, requestId } = await this.graphqlClient.mutate(deployAppQuery, {
|
|
31
33
|
input: deploymentDetails
|
|
32
34
|
});
|
|
35
|
+
const error = cli_shared_1.getError(errors);
|
|
33
36
|
if (!success) {
|
|
34
|
-
throw new cli_shared_1.GraphQlMutationError(`${message} (requestId: ${requestId || 'unknown'})`,
|
|
37
|
+
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
35
38
|
}
|
|
36
39
|
if (!deployment) {
|
|
37
40
|
throw new NoDeploymentError();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import { Logger } from '@forge/cli-shared';
|
|
2
3
|
export interface Archiver {
|
|
3
4
|
addFile(fileName: string, contents: Buffer): void;
|
|
4
|
-
|
|
5
|
+
addRootDependencyFiles(filePaths: string[], logger: Logger): void;
|
|
5
6
|
finalise(): Promise<string>;
|
|
6
7
|
onWarning(cb: (err: Error) => void): void;
|
|
7
8
|
onEntry(cb: (filePath: string) => void): void;
|
|
@@ -13,7 +14,7 @@ export declare class ZipArchiver implements Archiver {
|
|
|
13
14
|
private rejects;
|
|
14
15
|
constructor();
|
|
15
16
|
addFile(fileName: string, contents: Buffer): void;
|
|
16
|
-
|
|
17
|
+
addRootDependencyFiles(fileNames: string[], logger: Logger): void;
|
|
17
18
|
finalise(): Promise<string>;
|
|
18
19
|
onWarning(cb: (err: Error) => void): void;
|
|
19
20
|
onEntry(cb: (filePath: string) => void): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../../src/deploy/packager/archiver.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../../src/deploy/packager/archiver.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAClD,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAClE,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;CAC/C;AAED,qBAAa,WAAY,YAAW,QAAQ;IAC1C,OAAO,CAAC,OAAO,CAAmB;IAClC,OAAO,CAAC,QAAQ,CAAqC;IACrD,OAAO,CAAC,QAAQ,CAAsC;IACtD,OAAO,CAAC,OAAO,CAAmC;;IAU3C,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIjD,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAWjE,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAS3B,SAAS,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI;IAIlC,OAAO,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;IAQ7C,OAAO,CAAC,cAAc,CAIpB;IAEF,OAAO,CAAC,OAAO,CAIb;CACH"}
|
|
@@ -4,6 +4,7 @@ exports.ZipArchiver = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const archiver_1 = tslib_1.__importDefault(require("archiver"));
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
|
+
const path_1 = require("path");
|
|
7
8
|
const tmp_1 = tslib_1.__importDefault(require("tmp"));
|
|
8
9
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
9
10
|
class ZipArchiver {
|
|
@@ -30,8 +31,15 @@ class ZipArchiver {
|
|
|
30
31
|
addFile(fileName, contents) {
|
|
31
32
|
this.archive.append(contents, { name: fileName });
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
addRootDependencyFiles(fileNames, logger) {
|
|
35
|
+
const currentDirectory = process.cwd();
|
|
36
|
+
fileNames.forEach((fileName) => {
|
|
37
|
+
const filePath = path_1.join(currentDirectory, fileName);
|
|
38
|
+
if (fs_1.existsSync(filePath)) {
|
|
39
|
+
logger.debug(cli_shared_1.Text.deploy.taskPackage.packageFile(fileName, filePath));
|
|
40
|
+
this.archive.file(filePath, { name: fileName });
|
|
41
|
+
}
|
|
42
|
+
});
|
|
35
43
|
}
|
|
36
44
|
finalise() {
|
|
37
45
|
return new Promise((resolve, reject) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packager.d.ts","sourceRoot":"","sources":["../../../src/deploy/packager/packager.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"packager.d.ts","sourceRoot":"","sources":["../../../src/deploy/packager/packager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACvC,SAAS,CAAC,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC3C,QAAQ,CAAC,EAAE;QACT,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,YAAa,SAAQ,KAAK;CAAG;AAE1C,qBAAa,WAAY,YAAW,QAAQ;IAExC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFN,eAAe,EAAE,MAAM,QAAQ,EAC/B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO;IAGrB,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;CA0DtE"}
|
|
@@ -30,29 +30,29 @@ class AppPackager {
|
|
|
30
30
|
path: path_1.join(currentDirectory, 'src', handler)
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
archiver.addFile(`${name}.js`, Buffer.from(output[name]));
|
|
47
|
-
}
|
|
48
|
-
if (sourceMap) {
|
|
33
|
+
if (entryPoints.length > 0) {
|
|
34
|
+
let bundlerResponse;
|
|
35
|
+
try {
|
|
36
|
+
bundlerResponse = await this.bundle(process.cwd(), entryPoints);
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
throw new BundlerError(e.message);
|
|
40
|
+
}
|
|
41
|
+
const { output, sourceMap, metadata } = bundlerResponse;
|
|
42
|
+
if (metadata) {
|
|
43
|
+
moduleList = metadata.modules;
|
|
44
|
+
}
|
|
45
|
+
this.logger.debug(cli_shared_1.Text.deploy.taskPackage.packageBundledFiles);
|
|
49
46
|
for (const { name } of entryPoints) {
|
|
50
|
-
archiver.addFile(`${name}.js
|
|
47
|
+
archiver.addFile(`${name}.js`, Buffer.from(output[name]));
|
|
48
|
+
}
|
|
49
|
+
if (sourceMap) {
|
|
50
|
+
for (const { name } of entryPoints) {
|
|
51
|
+
archiver.addFile(`${name}.js.map`, Buffer.from(sourceMap[name]));
|
|
52
|
+
}
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
|
-
|
|
54
|
-
this.logger.debug(cli_shared_1.Text.deploy.taskPackage.packageManifest(manifestPath));
|
|
55
|
-
archiver.addManifestFile(manifestPath);
|
|
55
|
+
archiver.addRootDependencyFiles(cli_shared_1.dependencyFileNames, this.logger);
|
|
56
56
|
const archivePath = await archiver.finalise();
|
|
57
57
|
this.logger.debug(cli_shared_1.Text.deploy.taskPackage.archiveCreated(archivePath));
|
|
58
58
|
return { archivePath, moduleList };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-graphql-client.d.ts","sourceRoot":"","sources":["../../../src/deploy/uploader/artifact-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EAIb,0BAA0B,
|
|
1
|
+
{"version":3,"file":"artifact-graphql-client.d.ts","sourceRoot":"","sources":["../../../src/deploy/uploader/artifact-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EAIb,0BAA0B,EAG3B,MAAM,mBAAmB,CAAC;AAE3B,UAAU,4BAA4B;IACpC,aAAa,EAAE,0BAA0B,EAAE,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACtD,4BAA4B,CAC1B,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,4BAA4B,CAAC,CAAC;CAC1C;AAED,qBAAa,oBAAqB,SAAQ,KAAK;;CAI9C;AAED,qBAAa,oBAAqB,SAAQ,KAAK;;CAI9C;AAED,qBAAa,eAAgB,SAAQ,KAAK;;CAIzC;AAED,qBAAa,qBAAsB,YAAW,cAAc;IAC9C,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,YAAY,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAwCrD,4BAA4B,CACvC,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,4BAA4B,CAAC;CA+CzC"}
|
|
@@ -26,24 +26,27 @@ class ArtifactGraphQLClient {
|
|
|
26
26
|
}
|
|
27
27
|
async getUploadUrl(appDetails) {
|
|
28
28
|
const artifactQuery = `
|
|
29
|
-
mutation
|
|
29
|
+
mutation forge_cli_getDeploymentUrl($input: CreateAppDeploymentUrlInput!) {
|
|
30
30
|
createAppDeploymentUrl(input: $input) {
|
|
31
31
|
success
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
errors {
|
|
33
|
+
message
|
|
34
|
+
extensions {
|
|
35
|
+
errorType
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
deploymentUrl
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
`;
|
|
40
|
-
const { response: { createAppDeploymentUrl: { deploymentUrl, success,
|
|
42
|
+
const { response: { createAppDeploymentUrl: { deploymentUrl, success, errors } }, requestId } = await this.graphqlClient.mutate(artifactQuery, {
|
|
41
43
|
input: {
|
|
42
44
|
appId: appDetails.id
|
|
43
45
|
}
|
|
44
46
|
});
|
|
47
|
+
const error = cli_shared_1.getError(errors);
|
|
45
48
|
if (!success) {
|
|
46
|
-
throw new cli_shared_1.GraphQlMutationError(`${message} (requestId: ${requestId || 'unknown'})`,
|
|
49
|
+
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
47
50
|
}
|
|
48
51
|
if (!deploymentUrl) {
|
|
49
52
|
throw new NoDeploymentURLError();
|
|
@@ -52,13 +55,12 @@ class ArtifactGraphQLClient {
|
|
|
52
55
|
}
|
|
53
56
|
async getHostedResourcesUploadUrls(appDetails, environmentKey, resourceKeys) {
|
|
54
57
|
const artifactQuery = `
|
|
55
|
-
mutation
|
|
58
|
+
mutation forge_cli_getHostedResourcesUploadUrls($input: CreateHostedResourceUploadUrlInput!) {
|
|
56
59
|
createHostedResourceUploadUrl(input: $input) {
|
|
57
60
|
success
|
|
58
61
|
errors {
|
|
59
62
|
message
|
|
60
63
|
extensions {
|
|
61
|
-
statusCode
|
|
62
64
|
errorType
|
|
63
65
|
}
|
|
64
66
|
}
|
|
@@ -77,8 +79,9 @@ class ArtifactGraphQLClient {
|
|
|
77
79
|
resourceKeys
|
|
78
80
|
}
|
|
79
81
|
});
|
|
82
|
+
const error = cli_shared_1.getError(errors);
|
|
80
83
|
if (!success) {
|
|
81
|
-
throw new cli_shared_1.GraphQlMutationError(`${
|
|
84
|
+
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
82
85
|
}
|
|
83
86
|
if (!preSignedUrls) {
|
|
84
87
|
throw new NoPresignedUrlsError();
|
|
@@ -9,7 +9,7 @@ export declare class MissingAppEnvironmentError extends Error {
|
|
|
9
9
|
export declare class GraphqlClient implements SetEnvironmentVariableClient, DeleteEnvironmentVariableClient, ListEnvironmentVariablesClient {
|
|
10
10
|
private readonly graphqlClient;
|
|
11
11
|
constructor(graphqlClient: GraphQLClient);
|
|
12
|
-
listEnvironmentVariables(details: ListAppEnvironmentVariablesDetails): Promise<import("@forge/cli-shared").AppEnvironmentVariable[]>;
|
|
12
|
+
listEnvironmentVariables(details: ListAppEnvironmentVariablesDetails): Promise<import("@forge/cli-shared/src").AppEnvironmentVariable[] | null | undefined>;
|
|
13
13
|
setEnvironmentVariable(details: SetAppEnvironmentVariableDetails): Promise<void>;
|
|
14
14
|
deleteEnvironmentVariable(details: DeleteAppEnvironmentVariableDetails): Promise<void>;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/environment-variables/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/environment-variables/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAAwB,MAAM,mBAAmB,CAAC;AAElF,OAAO,EACL,6BAA6B,IAAI,mCAAmC,EACpE,+BAA+B,EAChC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,8BAA8B,IAAI,kCAAkC,EACpE,8BAA8B,EAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,6BAA6B,IAAI,gCAAgC,EACjE,4BAA4B,EAC7B,MAAM,4BAA4B,CAAC;AAEpC,qBAAa,eAAgB,SAAQ,KAAK;CAAG;AAC7C,qBAAa,0BAA2B,SAAQ,KAAK;CAAG;AAExD,qBAAa,aACX,YAAW,4BAA4B,EAAE,+BAA+B,EAAE,8BAA8B;IAC5F,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,wBAAwB,CAAC,OAAO,EAAE,kCAAkC;IAkCpE,sBAAsB,CAAC,OAAO,EAAE,gCAAgC;IAyChE,yBAAyB,CAAC,OAAO,EAAE,mCAAmC;CAuCpF"}
|
|
@@ -14,7 +14,7 @@ class GraphqlClient {
|
|
|
14
14
|
}
|
|
15
15
|
async listEnvironmentVariables(details) {
|
|
16
16
|
const query = `
|
|
17
|
-
query
|
|
17
|
+
query forge_cli_getAppEnvironmentVariables($appId: ID!, $key: String!) {
|
|
18
18
|
app(id: $appId) {
|
|
19
19
|
name
|
|
20
20
|
description
|
|
@@ -43,17 +43,19 @@ class GraphqlClient {
|
|
|
43
43
|
}
|
|
44
44
|
async setEnvironmentVariable(details) {
|
|
45
45
|
const mutation = `
|
|
46
|
-
mutation
|
|
46
|
+
mutation forge_cli_setAppEnvironmentVariable($input: SetAppEnvironmentVariableInput!) {
|
|
47
47
|
setAppEnvironmentVariable(input: $input) {
|
|
48
48
|
success
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
errors {
|
|
50
|
+
message
|
|
51
|
+
extensions {
|
|
52
|
+
errorType
|
|
53
|
+
}
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
`;
|
|
56
|
-
const { response: { setAppEnvironmentVariable: {
|
|
58
|
+
const { response: { setAppEnvironmentVariable: { success, errors } }, requestId } = await this.graphqlClient.mutate(mutation, {
|
|
57
59
|
input: {
|
|
58
60
|
environment: {
|
|
59
61
|
appId: details.appId,
|
|
@@ -66,23 +68,26 @@ class GraphqlClient {
|
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
});
|
|
71
|
+
const error = cli_shared_1.getError(errors);
|
|
69
72
|
if (!success) {
|
|
70
|
-
throw new cli_shared_1.GraphQlMutationError(`${message} (requestId: ${requestId || 'unknown'})`,
|
|
73
|
+
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
71
74
|
}
|
|
72
75
|
}
|
|
73
76
|
async deleteEnvironmentVariable(details) {
|
|
74
77
|
const mutation = `
|
|
75
|
-
mutation
|
|
78
|
+
mutation forge_cli_deleteAppEnvironmentVariable($input: DeleteAppEnvironmentVariableInput!) {
|
|
76
79
|
deleteAppEnvironmentVariable(input: $input) {
|
|
77
80
|
success
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
errors {
|
|
82
|
+
message
|
|
83
|
+
extensions {
|
|
84
|
+
errorType
|
|
85
|
+
}
|
|
81
86
|
}
|
|
82
87
|
}
|
|
83
88
|
}
|
|
84
89
|
`;
|
|
85
|
-
const { response: { deleteAppEnvironmentVariable: {
|
|
90
|
+
const { response: { deleteAppEnvironmentVariable: { success, errors } }, requestId } = await this.graphqlClient.mutate(mutation, {
|
|
86
91
|
input: {
|
|
87
92
|
environment: {
|
|
88
93
|
appId: details.appId,
|
|
@@ -91,8 +96,9 @@ class GraphqlClient {
|
|
|
91
96
|
key: details.key
|
|
92
97
|
}
|
|
93
98
|
});
|
|
99
|
+
const error = cli_shared_1.getError(errors);
|
|
94
100
|
if (!success) {
|
|
95
|
-
throw new cli_shared_1.GraphQlMutationError(`${message} (requestId: ${requestId || 'unknown'})`,
|
|
101
|
+
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
96
102
|
}
|
|
97
103
|
}
|
|
98
104
|
}
|
|
@@ -11,12 +11,12 @@ export interface AppEnvironmentVariable {
|
|
|
11
11
|
encrypt: boolean;
|
|
12
12
|
}
|
|
13
13
|
export interface ListEnvironmentVariablesClient {
|
|
14
|
-
listEnvironmentVariables(details: AppEnvironmentVariablesDetails): Promise<AppEnvironmentVariable[]>;
|
|
14
|
+
listEnvironmentVariables(details: AppEnvironmentVariablesDetails): Promise<AppEnvironmentVariable[] | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
export declare class ListEnvironmentVariablesCommand {
|
|
17
17
|
private readonly client;
|
|
18
18
|
private readonly getAppConfig;
|
|
19
19
|
constructor(client: ListEnvironmentVariablesClient, getAppConfig: AppConfigProvider);
|
|
20
|
-
execute(details: EnvironmentVariablesDetails): Promise<AppEnvironmentVariable[]>;
|
|
20
|
+
execute(details: EnvironmentVariablesDetails): Promise<AppEnvironmentVariable[] | null | undefined>;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=list-environment-variables.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-environment-variables.d.ts","sourceRoot":"","sources":["../../src/environment-variables/list-environment-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,8BAA+B,SAAQ,2BAA2B;IACjF,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,8BAA8B;IAC7C,wBAAwB,
|
|
1
|
+
{"version":3,"file":"list-environment-variables.d.ts","sourceRoot":"","sources":["../../src/environment-variables/list-environment-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,8BAA+B,SAAQ,2BAA2B;IACjF,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,8BAA8B;IAC7C,wBAAwB,CACtB,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,sBAAsB,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;CACzD;AAED,qBAAa,+BAA+B;IAExC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,MAAM,EAAE,8BAA8B,EACtC,YAAY,EAAE,iBAAiB;IAGrC,OAAO,CAAC,OAAO,EAAE,2BAA2B;CAO1D"}
|