@forge/cli 0.0.0-experimental-819498d → 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 +2889 -7
- package/README.md +18 -19
- package/npm-shrinkwrap.json +3036 -3598
- package/out/autocomplete/autocomplete-config.json +16 -26
- package/out/bin/cli.js +0 -2
- package/out/bin/postinstall.js +1 -1
- package/out/command-line/anon-user-id.js +6 -10
- package/out/command-line/command.d.ts +7 -1
- package/out/command-line/command.d.ts.map +1 -1
- package/out/command-line/command.js +39 -9
- 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 +67 -5
- package/out/command-line/controller/install-controller.d.ts +2 -1
- package/out/command-line/controller/install-controller.d.ts.map +1 -1
- package/out/command-line/controller/install-controller.js +28 -32
- package/out/command-line/controller/lint-controller.js +1 -1
- package/out/command-line/controller/pre-command-controller.js +1 -1
- 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/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 +11 -3
- package/out/command-line/dependency-injection.d.ts.map +1 -1
- package/out/command-line/dependency-injection.js +34 -17
- package/out/command-line/index.d.ts.map +1 -1
- package/out/command-line/index.js +4 -0
- package/out/command-line/register-app-commands.d.ts.map +1 -1
- package/out/command-line/register-app-commands.js +1 -9
- package/out/command-line/register-authentication-command.d.ts.map +1 -1
- package/out/command-line/register-authentication-command.js +0 -16
- 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-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 +22 -7
- package/out/command-line/register-installation-commands.d.ts +1 -1
- package/out/command-line/register-installation-commands.d.ts.map +1 -1
- package/out/command-line/register-installation-commands.js +19 -13
- 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-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.map +1 -1
- package/out/command-line/unique-machine-id.js +1 -10
- 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/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 +21 -3
- package/out/command-line/view/install-view.d.ts +5 -5
- package/out/command-line/view/install-view.d.ts.map +1 -1
- package/out/command-line/view/install-view.js +20 -15
- 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/deploy/deployer/deploy-monitor-graphql-client.js +1 -1
- package/out/deploy/deployer/trigger-deploy-graphql-client.js +1 -1
- 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.js +2 -2
- package/out/environment-variables/graphql-client.d.ts +1 -1
- package/out/environment-variables/graphql-client.js +3 -3
- package/out/installations/graphql-client.d.ts +7 -8
- package/out/installations/graphql-client.d.ts.map +1 -1
- package/out/installations/graphql-client.js +70 -32
- package/out/installations/install-app-site.d.ts +2 -8
- package/out/installations/install-app-site.d.ts.map +1 -1
- package/out/installations/install-app-site.js +2 -3
- package/out/installations/uninstall-app.d.ts +0 -1
- package/out/installations/uninstall-app.d.ts.map +1 -1
- package/out/installations/uninstall-app.js +2 -4
- 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/installation-service.d.ts +13 -11
- package/out/service/installation-service.d.ts.map +1 -1
- package/out/service/installation-service.js +38 -13
- 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 +2 -2
- 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/resource-packaging-service.d.ts +3 -2
- package/out/service/resource-packaging-service.d.ts.map +1 -1
- package/out/service/resource-packaging-service.js +6 -2
- package/out/service/tunnel-service.d.ts.map +1 -1
- package/out/service/tunnel-service.js +6 -4
- 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/forge-cli-workers.js +1 -1
- package/package.json +14 -13
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-webtrigger-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-webtrigger-commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register-webtrigger-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-webtrigger-commands.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AA+BtD,eAAO,MAAM,gBAAgB,mFAM1B,YAAY,SA8Bd,CAAC"}
|
|
@@ -4,7 +4,6 @@ exports.registerCommands = void 0;
|
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
5
|
const cli_shared_2 = require("@forge/cli-shared");
|
|
6
6
|
const cli_shared_3 = require("@forge/cli-shared");
|
|
7
|
-
const cli_shared_4 = require("@forge/cli-shared");
|
|
8
7
|
const getAvailableWebTriggers = (appConfig) => {
|
|
9
8
|
const output = new Map();
|
|
10
9
|
if (appConfig.modules && appConfig.modules.webtrigger) {
|
|
@@ -18,7 +17,7 @@ async function getValidWebtriggers(configFile) {
|
|
|
18
17
|
const manifest = await configFile.readConfig();
|
|
19
18
|
const availableWebTriggers = getAvailableWebTriggers(manifest);
|
|
20
19
|
if (!availableWebTriggers.size) {
|
|
21
|
-
throw new
|
|
20
|
+
throw new cli_shared_3.ValidationError(cli_shared_2.Text.webtrigger.error.noWebtriggers);
|
|
22
21
|
}
|
|
23
22
|
return availableWebTriggers;
|
|
24
23
|
}
|
|
@@ -32,26 +31,25 @@ exports.registerCommands = ({ cmd, ui, graphqlGateway, configFile, commands: { g
|
|
|
32
31
|
const availableWebTriggers = await getValidWebtriggers(configFile);
|
|
33
32
|
if (functionKey) {
|
|
34
33
|
if (!availableWebTriggers.has(functionKey)) {
|
|
35
|
-
throw new
|
|
34
|
+
throw new cli_shared_3.ValidationError(cli_shared_2.Text.webtrigger.error.funcKey);
|
|
36
35
|
}
|
|
37
36
|
return functionKey;
|
|
38
37
|
}
|
|
39
38
|
else {
|
|
40
39
|
const options = [...availableWebTriggers.keys()];
|
|
41
|
-
return await ui.promptForList(
|
|
40
|
+
return await ui.promptForList(cli_shared_2.Text.webtrigger.promptFuncKey, options);
|
|
42
41
|
}
|
|
43
42
|
};
|
|
44
43
|
cmd
|
|
45
44
|
.command('webtrigger [installationId]')
|
|
46
45
|
.requireAppId()
|
|
47
|
-
.description(
|
|
48
|
-
.option('-f, --functionKey [function]',
|
|
46
|
+
.description(cli_shared_2.Text.webtrigger.cmd)
|
|
47
|
+
.option('-f, --functionKey [function]', cli_shared_2.Text.webtrigger.optionFuncKey)
|
|
49
48
|
.precondition(manifestDefinesTriggers(configFile))
|
|
50
49
|
.action(async (installationId, { functionKey }) => {
|
|
51
|
-
ui.info(
|
|
52
|
-
const installId = await
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
ui.info(cli_shared_3.Text.webtrigger.copy(url));
|
|
50
|
+
ui.info(cli_shared_2.Text.webtrigger.overviewFuncKey);
|
|
51
|
+
const installId = await cli_shared_1.getInstallationId(ui, installationId);
|
|
52
|
+
const url = await getWebTriggerURLCommand.execute(installId, await validateWebtriggerKey(functionKey));
|
|
53
|
+
ui.info(cli_shared_2.Text.webtrigger.copy(url));
|
|
56
54
|
});
|
|
57
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique-machine-id.d.ts","sourceRoot":"","sources":["../../src/command-line/unique-machine-id.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAW9C,eAAO,MAAM,YAAY,QAAO,
|
|
1
|
+
{"version":3,"file":"unique-machine-id.d.ts","sourceRoot":"","sources":["../../src/command-line/unique-machine-id.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAW9C,eAAO,MAAM,YAAY,QAAO,MACgE,CAAC"}
|
|
@@ -15,13 +15,4 @@ const generateMachineId = () => {
|
|
|
15
15
|
return uuid_1.default();
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
exports.getMachineId = () =>
|
|
19
|
-
const cachedConf = cli_shared_1.CachedConf.getCache(exports.FORGE_CLI_PACKAGE);
|
|
20
|
-
const storedMachineId = cachedConf.get(MACHINE_ID_CACHE_KEY);
|
|
21
|
-
if (storedMachineId) {
|
|
22
|
-
return storedMachineId;
|
|
23
|
-
}
|
|
24
|
-
const newMachineId = generateMachineId();
|
|
25
|
-
cachedConf.set(MACHINE_ID_CACHE_KEY, newMachineId);
|
|
26
|
-
return newMachineId;
|
|
27
|
-
};
|
|
18
|
+
exports.getMachineId = () => cli_shared_1.CachedConf.getCache(exports.FORGE_CLI_PACKAGE).cached(MACHINE_ID_CACHE_KEY, generateMachineId);
|
|
@@ -2,6 +2,7 @@ export declare const VERSION_CACHE_KEY = "latest";
|
|
|
2
2
|
export declare const VERSION_CACHE_INTERVAL: number;
|
|
3
3
|
import { CLIDetails } from '@forge/cli-shared';
|
|
4
4
|
export declare const getCLIDetails: () => CLIDetails | undefined;
|
|
5
|
+
export declare const supportedNodeVersion = "14.x || 16.x";
|
|
5
6
|
export declare const cacheLatestVersion: (name: string) => Promise<void>;
|
|
6
7
|
export declare const clearVersionCache: (name: string) => void;
|
|
7
8
|
//# sourceMappingURL=version-info.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-info.d.ts","sourceRoot":"","sources":["../../src/command-line/version-info.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,sBAAsB,QAAsB,CAAC;AAE1D,OAAO,EAAc,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3D,eAAO,MAAM,aAAa,QAAO,UAAU,GAAG,SAgB7C,CAAC;AAEF,eAAO,MAAM,kBAAkB,SAAgB,MAAM,KAAG,OAAO,CAAC,IAAI,CAInE,CAAC;AAEF,eAAO,MAAM,iBAAiB,SAAU,MAAM,SAG7C,CAAC"}
|
|
1
|
+
{"version":3,"file":"version-info.d.ts","sourceRoot":"","sources":["../../src/command-line/version-info.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,sBAAsB,QAAsB,CAAC;AAE1D,OAAO,EAAc,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3D,eAAO,MAAM,aAAa,QAAO,UAAU,GAAG,SAgB7C,CAAC;AAEF,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD,eAAO,MAAM,kBAAkB,SAAgB,MAAM,KAAG,OAAO,CAAC,IAAI,CAInE,CAAC;AAEF,eAAO,MAAM,iBAAiB,SAAU,MAAM,SAG7C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.clearVersionCache = exports.cacheLatestVersion = exports.getCLIDetails = exports.VERSION_CACHE_INTERVAL = exports.VERSION_CACHE_KEY = void 0;
|
|
3
|
+
exports.clearVersionCache = exports.cacheLatestVersion = exports.supportedNodeVersion = exports.getCLIDetails = exports.VERSION_CACHE_INTERVAL = exports.VERSION_CACHE_KEY = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const latest_version_1 = tslib_1.__importDefault(require("latest-version"));
|
|
6
6
|
exports.VERSION_CACHE_KEY = 'latest';
|
|
@@ -15,13 +15,14 @@ exports.getCLIDetails = () => {
|
|
|
15
15
|
name: packageInfo.name,
|
|
16
16
|
version: packageInfo.version,
|
|
17
17
|
latest: latest,
|
|
18
|
-
|
|
18
|
+
compatibleNodeVersion: packageInfo.engines.node
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
catch (_a) {
|
|
22
22
|
return undefined;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
+
exports.supportedNodeVersion = '14.x || 16.x';
|
|
25
26
|
exports.cacheLatestVersion = async (name) => {
|
|
26
27
|
const latest = await latest_version_1.default(name);
|
|
27
28
|
const cachedConf = cli_shared_1.CachedConf.getCache(name);
|
|
@@ -4,12 +4,18 @@ import { DeploymentResult } from '../register-deployment-commands';
|
|
|
4
4
|
export declare class DeployView {
|
|
5
5
|
private readonly ui;
|
|
6
6
|
constructor(ui: UI);
|
|
7
|
+
getLogger(): UI;
|
|
7
8
|
displayStart(environment: string): void;
|
|
8
9
|
displayLintRunning(): void;
|
|
9
10
|
displayOutdatedInstallationsMessage(): void;
|
|
10
11
|
displayLintErrors(lintResults: LintResult[]): void;
|
|
11
12
|
displayLintWarnings(warnings: number): void;
|
|
12
13
|
displayNoLintProblems(): void;
|
|
13
|
-
|
|
14
|
+
displayConnectKeyChangeWarning(environment: string, migrationKey: string, connectKey: string): void;
|
|
15
|
+
displayConnectKeyDeleteWarning(environment: string): void;
|
|
16
|
+
displayMPACAppConnectKeyChangeError(mpacAppKey: string, connectKey: string): void;
|
|
17
|
+
promptToContinueDeletingConnectKey(): Promise<boolean>;
|
|
18
|
+
promptToContinueChangingConnectKey(): Promise<boolean>;
|
|
19
|
+
reportDeploymentProgress(id: string, environment: string, showDistributionPageLink: boolean, deployCallback: () => Promise<DeploymentResult>): Promise<DeploymentResult>;
|
|
14
20
|
}
|
|
15
21
|
//# sourceMappingURL=deploy-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/deploy-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAuC,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAqB,UAAU,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,qBAA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,wBAAwB,CACnC,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,MAAM,EACnB,wBAAwB,EAAE,OAAO,EACjC,cAAc,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,GAC9C,OAAO,CAAC,gBAAgB,CAAC;CAY7B"}
|
|
@@ -8,6 +8,9 @@ class DeployView {
|
|
|
8
8
|
constructor(ui) {
|
|
9
9
|
this.ui = ui;
|
|
10
10
|
}
|
|
11
|
+
getLogger() {
|
|
12
|
+
return this.ui;
|
|
13
|
+
}
|
|
11
14
|
displayStart(environment) {
|
|
12
15
|
this.ui.info(cli_shared_1.Text.deploy.cmd.start1(environment, cli_shared_1.environmentToOption));
|
|
13
16
|
}
|
|
@@ -28,9 +31,24 @@ class DeployView {
|
|
|
28
31
|
displayNoLintProblems() {
|
|
29
32
|
this.ui.info(cli_shared_1.LogColor.trace(cli_shared_1.Text.lint.noProblems) + '\n');
|
|
30
33
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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));
|
|
34
52
|
if (environment === 'production' && showDistributionPageLink) {
|
|
35
53
|
this.ui.info(cli_shared_1.Text.deploy.cmd.distributePageLink(cs_ari_1.parseAppAri(cs_ari_1.parse(id)).appId));
|
|
36
54
|
}
|
|
@@ -1,17 +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
|
-
|
|
6
|
-
|
|
5
|
+
listEgressAddresses: (egressAddresses: string[]) => string;
|
|
6
|
+
permissionsMismatch: (environment: string) => string;
|
|
7
|
+
promptForPermissionsConfirmation: (permissionsMismatchInDevelopment: boolean) => string;
|
|
7
8
|
}
|
|
8
9
|
export declare class NoScopesError extends Error {
|
|
9
10
|
}
|
|
10
11
|
export declare class InstallView {
|
|
11
12
|
private readonly ui;
|
|
12
13
|
constructor(ui: UI);
|
|
13
|
-
|
|
14
|
-
promptForScopesConfirmation(environmentScopes: string[], manifestScopes: string[] | undefined, environment: string, confirmScopes: boolean, text: InstallOrUpgradeCommandText): Promise<boolean>;
|
|
14
|
+
promptForPermissionsConfirmation({ scopes, egressAddresses, addedScopes }: AppEnvironmentPermissions, manifestScopes: string[], manifestEgressAddresses: string[], environment: string, confirmScopes: boolean, nonInteractive: boolean, text: InstallOrUpgradeCommandText): Promise<boolean>;
|
|
15
15
|
promptForUpgrade(installations: Installation[]): Promise<Installation>;
|
|
16
16
|
}
|
|
17
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,23 +10,27 @@ class InstallView {
|
|
|
9
10
|
constructor(ui) {
|
|
10
11
|
this.ui = ui;
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
async promptForScopesConfirmation(environmentScopes, manifestScopes, environment, confirmScopes, text) {
|
|
16
|
-
if (environmentScopes.length === 0) {
|
|
13
|
+
async promptForPermissionsConfirmation({ scopes, egressAddresses, addedScopes }, manifestScopes, manifestEgressAddresses, environment, confirmScopes, nonInteractive, text) {
|
|
14
|
+
if (scopes.length === 0) {
|
|
17
15
|
throw new NoScopesError();
|
|
18
16
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
+
}
|
|
26
31
|
}
|
|
27
|
-
if (!confirmScopes) {
|
|
28
|
-
const scopesConfirmationResult = await this.ui.confirm(text.
|
|
32
|
+
if (!confirmScopes && !nonInteractive) {
|
|
33
|
+
const scopesConfirmationResult = await this.ui.confirm(text.promptForPermissionsConfirmation(permissionsMismatchWithManifest));
|
|
29
34
|
if (scopesConfirmationResult)
|
|
30
35
|
this.ui.emptyLine();
|
|
31
36
|
return scopesConfirmationResult;
|
|
@@ -33,7 +38,7 @@ class InstallView {
|
|
|
33
38
|
return true;
|
|
34
39
|
}
|
|
35
40
|
async promptForUpgrade(installations) {
|
|
36
|
-
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 }) => ({
|
|
37
42
|
names: [
|
|
38
43
|
cli_shared_1.environmentToOption(environmentKey),
|
|
39
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"}
|
|
@@ -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 {
|
|
@@ -14,7 +14,7 @@ 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
20
|
errors {
|
|
@@ -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 };
|
|
@@ -26,7 +26,7 @@ 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
32
|
errors {
|
|
@@ -55,7 +55,7 @@ class ArtifactGraphQLClient {
|
|
|
55
55
|
}
|
|
56
56
|
async getHostedResourcesUploadUrls(appDetails, environmentKey, resourceKeys) {
|
|
57
57
|
const artifactQuery = `
|
|
58
|
-
mutation
|
|
58
|
+
mutation forge_cli_getHostedResourcesUploadUrls($input: CreateHostedResourceUploadUrlInput!) {
|
|
59
59
|
createHostedResourceUploadUrl(input: $input) {
|
|
60
60
|
success
|
|
61
61
|
errors {
|
|
@@ -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[] | null | undefined>;
|
|
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
|
}
|
|
@@ -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,7 +43,7 @@ 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
49
|
errors {
|
|
@@ -75,7 +75,7 @@ class GraphqlClient {
|
|
|
75
75
|
}
|
|
76
76
|
async deleteEnvironmentVariable(details) {
|
|
77
77
|
const mutation = `
|
|
78
|
-
mutation
|
|
78
|
+
mutation forge_cli_deleteAppEnvironmentVariable($input: DeleteAppEnvironmentVariableInput!) {
|
|
79
79
|
deleteAppEnvironmentVariable(input: $input) {
|
|
80
80
|
success
|
|
81
81
|
errors {
|
|
@@ -21,7 +21,9 @@ export declare class UpgradeError extends GraphQlMutationError {
|
|
|
21
21
|
}
|
|
22
22
|
export declare class EnvironmentNotFoundError extends Error {
|
|
23
23
|
}
|
|
24
|
-
export declare class
|
|
24
|
+
export declare class MissingTaskIdError extends Error {
|
|
25
|
+
}
|
|
26
|
+
export declare class InstallationRequestFailedError extends Error {
|
|
25
27
|
}
|
|
26
28
|
export declare class MissingAppError extends Error {
|
|
27
29
|
}
|
|
@@ -40,12 +42,9 @@ export declare class InstallationsGraphqlClient implements InstallAppClient, Lis
|
|
|
40
42
|
private readonly pause;
|
|
41
43
|
static buildInstallationContext(product: string, cloudId: string): string;
|
|
42
44
|
constructor(graphqlClient: GraphQLClient, pause: Pause);
|
|
43
|
-
installAppIntoSite({ environmentKey, site, product, appId }: AppInstallSiteDetails): Promise<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
upgradeInstallation({ site, product, environmentKey, appId }: AppInstallSiteDetails): Promise<{
|
|
47
|
-
installationId: string;
|
|
48
|
-
}>;
|
|
45
|
+
installAppIntoSite({ environmentKey, site, product, appId }: AppInstallSiteDetails): Promise<void>;
|
|
46
|
+
upgradeInstallation({ site, product, environmentKey, appId }: AppInstallSiteDetails): Promise<void>;
|
|
47
|
+
private monitorAppInstallOrUpgrade;
|
|
49
48
|
uninstallApp(input: AppUninstallationInput): Promise<boolean>;
|
|
50
49
|
uninstallMultipleApps(apps: AppUninstallationInput[]): Promise<Partial<UninstallAppOutput>[]>;
|
|
51
50
|
listInstallations(appId: string): Promise<Installation[]>;
|
|
@@ -56,6 +55,6 @@ export declare class InstallationsGraphqlClient implements InstallAppClient, Lis
|
|
|
56
55
|
private resolveInstallationsHostnames;
|
|
57
56
|
private getAllInstallations;
|
|
58
57
|
private getCloudId;
|
|
59
|
-
|
|
58
|
+
getVersions(appId: string, environmentKey: string, firstN?: number): Promise<AppEnvironment['versions']>;
|
|
60
59
|
}
|
|
61
60
|
//# sourceMappingURL=graphql-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/installations/graphql-client.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EACL,cAAc,EAGd,aAAa,EACb,oBAAoB,EAEpB,KAAK,EACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO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