@forge/cli 6.12.0 → 6.13.0-next.8
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 +105 -0
- package/npm-shrinkwrap.json +81 -77
- package/out/analytics-client/analytics-client.d.ts +1 -1
- package/out/analytics-client/analytics-client.d.ts.map +1 -1
- package/out/analytics-client/analytics-client.js +3 -1
- package/out/command-line/command.d.ts.map +1 -1
- package/out/command-line/command.js +1 -4
- package/out/command-line/controller/default-environment-controller.d.ts.map +1 -1
- package/out/command-line/controller/default-environment-controller.js +2 -2
- package/out/command-line/controller/deploy-controller.d.ts +5 -2
- package/out/command-line/controller/deploy-controller.d.ts.map +1 -1
- package/out/command-line/controller/deploy-controller.js +22 -5
- package/out/command-line/controller/install-controller.d.ts.map +1 -1
- package/out/command-line/controller/install-controller.js +5 -5
- package/out/command-line/controller/settings-controller.d.ts.map +1 -1
- package/out/command-line/controller/settings-controller.js +7 -4
- package/out/command-line/controller/tunnel-controller.d.ts +3 -3
- package/out/command-line/controller/tunnel-controller.d.ts.map +1 -1
- package/out/command-line/controller/tunnel-controller.js +3 -3
- package/out/command-line/dependency-injection.d.ts +5 -2
- package/out/command-line/dependency-injection.d.ts.map +1 -1
- package/out/command-line/dependency-injection.js +19 -13
- package/out/command-line/environment.d.ts.map +1 -1
- package/out/command-line/environment.js +1 -1
- package/out/command-line/register-app-commands.d.ts.map +1 -1
- package/out/command-line/register-app-commands.js +23 -24
- package/out/command-line/register-environment-commands.d.ts.map +1 -1
- package/out/command-line/register-environment-commands.js +2 -2
- package/out/command-line/register-environment-variables-commands.d.ts.map +1 -1
- package/out/command-line/register-environment-variables-commands.js +4 -4
- package/out/command-line/register-installation-commands.d.ts.map +1 -1
- package/out/command-line/register-installation-commands.js +2 -2
- package/out/command-line/register-providers-commands.d.ts.map +1 -1
- package/out/command-line/register-providers-commands.js +1 -2
- package/out/command-line/register-storage-commands.d.ts.map +1 -1
- package/out/command-line/register-storage-commands.js +4 -2
- package/out/command-line/view/deploy-view.d.ts +4 -2
- package/out/command-line/view/deploy-view.d.ts.map +1 -1
- package/out/command-line/view/deploy-view.js +13 -5
- package/out/command-line/view/install-view.js +1 -1
- package/out/command-line/view/settings-view.d.ts +1 -0
- package/out/command-line/view/settings-view.d.ts.map +1 -1
- package/out/command-line/view/settings-view.js +5 -0
- package/out/command-line/view/tunnel-view.d.ts.map +1 -1
- package/out/command-line/view/tunnel-view.js +1 -1
- package/out/entities/graphql-client.d.ts +1 -1
- package/out/entities/graphql-client.d.ts.map +1 -1
- package/out/entities/graphql-client.js +5 -7
- package/out/entities/list-indexes.d.ts +7 -7
- package/out/entities/list-indexes.d.ts.map +1 -1
- package/out/entities/list-indexes.js +4 -48
- package/out/environment/graphql-client.d.ts.map +1 -1
- package/out/environment/graphql-client.js +1 -1
- package/out/installations/graphql-client.d.ts.map +1 -1
- package/out/installations/graphql-client.js +1 -1
- package/out/service/custom-entities-service.d.ts +12 -0
- package/out/service/custom-entities-service.d.ts.map +1 -0
- package/out/service/custom-entities-service.js +76 -0
- package/out/service/docker-service.d.ts +2 -1
- package/out/service/docker-service.d.ts.map +1 -1
- package/out/service/docker-service.js +2 -2
- package/out/service/tunnel-analytics-service.d.ts +6 -2
- package/out/service/tunnel-analytics-service.d.ts.map +1 -1
- package/out/service/tunnel-analytics-service.js +11 -1
- package/out/service/tunnel-service.d.ts +7 -3
- package/out/service/tunnel-service.d.ts.map +1 -1
- package/out/service/tunnel-service.js +31 -5
- package/package.json +6 -6
|
@@ -5,7 +5,7 @@ const cli_shared_1 = require("@forge/cli-shared");
|
|
|
5
5
|
const manifest_1 = require("@forge/manifest");
|
|
6
6
|
class NoDeploymentError extends Error {
|
|
7
7
|
constructor(environment) {
|
|
8
|
-
super(cli_shared_1.Text.install.error.noDeploymentFound(
|
|
8
|
+
super(cli_shared_1.Text.install.error.noDeploymentFound(environment));
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
exports.NoDeploymentError = NoDeploymentError;
|
|
@@ -49,7 +49,7 @@ class InstallController {
|
|
|
49
49
|
});
|
|
50
50
|
return false;
|
|
51
51
|
}
|
|
52
|
-
}, text.cmd.start(environment, environmentType
|
|
52
|
+
}, text.cmd.start(environment, environmentType), (alreadyUpdated) => {
|
|
53
53
|
if (alreadyUpdated) {
|
|
54
54
|
return cli_shared_1.Text.upgrade.alreadyUpdated.spinner;
|
|
55
55
|
}
|
|
@@ -143,11 +143,11 @@ class InstallController {
|
|
|
143
143
|
return;
|
|
144
144
|
const isAlreadyUpdated = await this.installOrUpgrade(upgrade, environment, environmentType, site, product, id, text);
|
|
145
145
|
if (isAlreadyUpdated) {
|
|
146
|
-
this.ui.info(cli_shared_1.Text.upgrade.alreadyUpdated.banner(environment,
|
|
146
|
+
this.ui.info(cli_shared_1.Text.upgrade.alreadyUpdated.banner(environment, product, site.host));
|
|
147
147
|
}
|
|
148
148
|
else {
|
|
149
149
|
this.ui.emptyLine();
|
|
150
|
-
this.ui.info(text.success.banner(environment, environmentType,
|
|
150
|
+
this.ui.info(text.success.banner(environment, environmentType, product, site.host));
|
|
151
151
|
const uniqueProductsFromScopes = this.getUniqueInstallationProductsFromScopes(environmentScopes);
|
|
152
152
|
if (!uniqueProductsFromScopes || uniqueProductsFromScopes.length <= 1)
|
|
153
153
|
return;
|
|
@@ -162,7 +162,7 @@ class InstallController {
|
|
|
162
162
|
const productsToInstall = uniqueProductsFromScopes.filter((product) => !installedProducts.includes(product));
|
|
163
163
|
if (productsToInstall.length === 0 && productsToUpgrade.length === 0)
|
|
164
164
|
return;
|
|
165
|
-
this.ui.warn(cli_shared_1.Text.install.multiProductScopesDetected(productsToInstall, productsToUpgrade, site.host, environment
|
|
165
|
+
this.ui.warn(cli_shared_1.Text.install.multiProductScopesDetected(productsToInstall, productsToUpgrade, site.host, environment));
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
async extractAddedScopes({ addedScopes }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/settings-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,iBAAiB,EAEjB,kBAAkB,EAInB,MAAM,mBAAmB,CAAC;AAK3B,eAAO,MAAM,2BAA2B,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"settings-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/settings-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,iBAAiB,EAEjB,kBAAkB,EAInB,MAAM,mBAAmB,CAAC;AAK3B,eAAO,MAAM,2BAA2B,wBAAwB,CAAC;AAcjE,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAHlB,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,iBAAiB,EAC/B,kBAAkB,EAAE,kBAAkB;IAGzD,OAAO,CAAC,YAAY,CA4BlB;YAEY,QAAQ;YAKR,mBAAmB;IAKjC,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,gBAAgB;YAIV,UAAU;IAWX,iBAAiB;IAWjB,YAAY,CAAC,IAAI,CAAC,EAAE,OAAO;IAY3B,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAgB1D"}
|
|
@@ -20,7 +20,6 @@ class SettingsController {
|
|
|
20
20
|
const parsedValue = this.parseBoolean(value);
|
|
21
21
|
this.cachedConfigService.setAnalyticsPreferences(parsedValue);
|
|
22
22
|
},
|
|
23
|
-
display: (value) => value,
|
|
24
23
|
isAvailable: () => true
|
|
25
24
|
},
|
|
26
25
|
'default-environment': {
|
|
@@ -36,8 +35,9 @@ class SettingsController {
|
|
|
36
35
|
const appId = await this.getAppId();
|
|
37
36
|
this.cachedConfigService.setDefaultEnvironment(appId, environment);
|
|
38
37
|
},
|
|
39
|
-
|
|
40
|
-
isAvailable: async () => (await this.validateAppManifest()).success && (await this.featureFlagService.isConcurrentDevEnabled())
|
|
38
|
+
getDisplayValue: (value) => cli_shared_1.Text.env.displayEnvironment(value, cli_shared_1.AppEnvironmentType.Development),
|
|
39
|
+
isAvailable: async () => (await this.validateAppManifest()).success && (await this.featureFlagService.isConcurrentDevEnabled()),
|
|
40
|
+
additionalInfo: cli_shared_1.Text.settings.defaultEnvironment.info
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}
|
|
@@ -97,8 +97,11 @@ class SettingsController {
|
|
|
97
97
|
const publicSettings = await this.getPublicSettings();
|
|
98
98
|
throw new cli_shared_1.ValidationError(cli_shared_1.Text.settings.set.invalidSetting(publicSettings));
|
|
99
99
|
}
|
|
100
|
+
if (setting.additionalInfo) {
|
|
101
|
+
this.settingsView.showAdditionalInfo(setting.additionalInfo);
|
|
102
|
+
}
|
|
100
103
|
await setting.set(value);
|
|
101
|
-
const displayValue = setting.
|
|
104
|
+
const displayValue = setting.getDisplayValue ? setting.getDisplayValue(value) : value;
|
|
102
105
|
this.settingsView.setSuccess(preference, displayValue);
|
|
103
106
|
}
|
|
104
107
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandLineUI,
|
|
1
|
+
import { CommandLineUI, ConfigFile, PersonalApiCredentialsValidated } from '@forge/cli-shared';
|
|
2
2
|
import { TunnelAnalyticsService } from '../../service/tunnel-analytics-service';
|
|
3
3
|
import { DockerTunnelService, TunnelOptions, TunnelService } from '../../service/tunnel-service';
|
|
4
4
|
import { TunnelView } from '../view/tunnel-view';
|
|
@@ -8,8 +8,8 @@ export declare class TunnelController {
|
|
|
8
8
|
private readonly localTunnelService;
|
|
9
9
|
private readonly dockerTunnelService;
|
|
10
10
|
private readonly tunnelView;
|
|
11
|
-
private readonly
|
|
12
|
-
constructor(analyticsService: TunnelAnalyticsService, nodeTunnelService: TunnelService, localTunnelService: TunnelService, dockerTunnelService: DockerTunnelService, tunnelView: TunnelView,
|
|
11
|
+
private readonly configFile;
|
|
12
|
+
constructor(analyticsService: TunnelAnalyticsService, nodeTunnelService: TunnelService, localTunnelService: TunnelService, dockerTunnelService: DockerTunnelService, tunnelView: TunnelView, configFile: ConfigFile);
|
|
13
13
|
run(tunnelOptions: TunnelOptions, ui: CommandLineUI): Promise<void>;
|
|
14
14
|
runDockerTunnel(tunnelOptions: TunnelOptions, creds: PersonalApiCredentialsValidated, debugEnabled: boolean): Promise<void>;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tunnel-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/tunnel-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"tunnel-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/tunnel-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,UAAU,EAIV,+BAA+B,EAEhC,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU;gBALV,gBAAgB,EAAE,sBAAsB,EACxC,iBAAiB,EAAE,aAAa,EAChC,kBAAkB,EAAE,aAAa,EACjC,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU;IAG5B,GAAG,CAAC,aAAa,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBnE,eAAe,CAC1B,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,+BAA+B,EACtC,YAAY,EAAE,OAAO,GACpB,OAAO,CAAC,IAAI,CAAC;CAuBjB"}
|
|
@@ -4,19 +4,19 @@ exports.TunnelController = void 0;
|
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
5
|
const docker_service_1 = require("../../service/docker-service");
|
|
6
6
|
class TunnelController {
|
|
7
|
-
constructor(analyticsService, nodeTunnelService, localTunnelService, dockerTunnelService, tunnelView,
|
|
7
|
+
constructor(analyticsService, nodeTunnelService, localTunnelService, dockerTunnelService, tunnelView, configFile) {
|
|
8
8
|
this.analyticsService = analyticsService;
|
|
9
9
|
this.nodeTunnelService = nodeTunnelService;
|
|
10
10
|
this.localTunnelService = localTunnelService;
|
|
11
11
|
this.dockerTunnelService = dockerTunnelService;
|
|
12
12
|
this.tunnelView = tunnelView;
|
|
13
|
-
this.
|
|
13
|
+
this.configFile = configFile;
|
|
14
14
|
}
|
|
15
15
|
async run(tunnelOptions, ui) {
|
|
16
16
|
const creds = await (0, cli_shared_1.getCredentialStore)(ui).getCredentials();
|
|
17
17
|
const localTunnelErrorCallback = this.tunnelView.getTunnelErrorHandler(cli_shared_1.exitOnError);
|
|
18
18
|
this.tunnelView.dockerPreamble(tunnelOptions.environment);
|
|
19
|
-
if (await this.
|
|
19
|
+
if ((await this.configFile.runtimeType()) === cli_shared_1.RuntimeType.nodejs) {
|
|
20
20
|
return await this.nodeTunnelService.run(tunnelOptions, creds, ui.debugEnabled);
|
|
21
21
|
}
|
|
22
22
|
if (process.env.FORGE_DEV_TUNNEL) {
|
|
@@ -8,6 +8,7 @@ import { ConfigureProviderCommand } from '../providers/configure-provider';
|
|
|
8
8
|
import { AddContributorCommand } from '../contributors/add-contributor';
|
|
9
9
|
import { ListContributorsCommand } from '../contributors/list-contributors';
|
|
10
10
|
import { RemoveContributorsCommand } from '../contributors/remove-contributors';
|
|
11
|
+
import { ListEntitiesIndexesCommand } from '../entities/list-indexes';
|
|
11
12
|
import { CreateEnvironmentCommand } from '../environment/create-environment';
|
|
12
13
|
import { ListEnvironmentCommand } from '../environment/list-environment';
|
|
13
14
|
import { DeleteEnvironmentCommand } from '../environment/delete-environment';
|
|
@@ -15,6 +16,7 @@ import { InstallAppSiteCommand } from '../installations/install-app-site';
|
|
|
15
16
|
import { UninstallAppCommand } from '../installations/uninstall-app';
|
|
16
17
|
import { InstallationService } from '../service/installation-service';
|
|
17
18
|
import { MigrationKeysService } from '../service/migration-keys-service';
|
|
19
|
+
import { CustomEntitiesService } from '../service/custom-entities-service';
|
|
18
20
|
import { GetWebTriggerURLCommand } from '../webtrigger/get-webtrigger-url';
|
|
19
21
|
import { WorkersStarter } from '../workers/workers-starter';
|
|
20
22
|
import { Command } from './command';
|
|
@@ -28,7 +30,6 @@ import { SettingsController } from './controller/settings-controller';
|
|
|
28
30
|
import { TunnelController } from './controller/tunnel-controller';
|
|
29
31
|
import { StubController } from './controller/stubController';
|
|
30
32
|
import { PrerequisitesController } from './controller/prerequisites-controller';
|
|
31
|
-
import { ListEntitiesIndexesCommand } from '../entities/list-indexes';
|
|
32
33
|
import { DefaultEnvironmentController } from './controller/default-environment-controller';
|
|
33
34
|
export declare const getDependencies: (cliDetails: CLIDetails | undefined) => Promise<{
|
|
34
35
|
ui: CommandLineUI;
|
|
@@ -46,7 +47,8 @@ export declare const getDependencies: (cliDetails: CLIDetails | undefined) => Pr
|
|
|
46
47
|
installAppSiteCommand: InstallAppSiteCommand;
|
|
47
48
|
uninstallAppCommand: UninstallAppCommand;
|
|
48
49
|
getAppOwnerQuery: GetAppOwnerQuery;
|
|
49
|
-
|
|
50
|
+
sandboxPackageUploadDeployCommand: PackageUploadDeployCommand;
|
|
51
|
+
nodePackageUploadDeployCommand: PackageUploadDeployCommand;
|
|
50
52
|
setEnvironmentVariableCommand: SetEnvironmentVariableCommand;
|
|
51
53
|
deleteEnvironmentVariableCommand: DeleteEnvironmentVariableCommand;
|
|
52
54
|
listEnvironmentVariablesCommand: ListEnvironmentVariablesCommand;
|
|
@@ -65,6 +67,7 @@ export declare const getDependencies: (cliDetails: CLIDetails | undefined) => Pr
|
|
|
65
67
|
featureFlagService: FeatureFlagService;
|
|
66
68
|
installationsService: InstallationService;
|
|
67
69
|
migrationKeysService: MigrationKeysService;
|
|
70
|
+
customEntitiesService: CustomEntitiesService;
|
|
68
71
|
credentialStore: import("@forge/cli-shared").CredentialStore;
|
|
69
72
|
};
|
|
70
73
|
controllers: {
|
|
@@ -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,EAGhB,kBAAkB,EAGlB,gBAAgB,EAQhB,YAAY,EACZ,aAAa,EAOb,kBAAkB,EAIlB,kBAAkB,EAEnB,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,OAAO,EAAE,+BAA+B,EAAE,MAAM,qDAAqD,CAAC;AACtG,OAAO,EAAE,6BAA6B,EAAE,MAAM,mDAAmD,CAAC;AAIlG,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAG3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;
|
|
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,EAGhB,kBAAkB,EAGlB,gBAAgB,EAQhB,YAAY,EACZ,aAAa,EAOb,kBAAkB,EAIlB,kBAAkB,EAEnB,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,OAAO,EAAE,+BAA+B,EAAE,MAAM,qDAAqD,CAAC;AACtG,OAAO,EAAE,6BAA6B,EAAE,MAAM,mDAAmD,CAAC;AAIlG,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAG3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAEtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAM7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAQtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAI3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAG3E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAWlE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAIhF,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAE3F,eAAO,MAAM,eAAe,eAAsB,UAAU,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoWvE,CAAC;AAGF,aAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AAC3D,oBAAY,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC"}
|
|
@@ -20,6 +20,7 @@ const add_contributor_1 = require("../contributors/add-contributor");
|
|
|
20
20
|
const list_contributors_1 = require("../contributors/list-contributors");
|
|
21
21
|
const remove_contributors_1 = require("../contributors/remove-contributors");
|
|
22
22
|
const graphql_client_4 = require("../contributors/graphql-client");
|
|
23
|
+
const list_indexes_1 = require("../entities/list-indexes");
|
|
23
24
|
const graphql_client_5 = require("../entities/graphql-client");
|
|
24
25
|
const create_environment_1 = require("../environment/create-environment");
|
|
25
26
|
const list_environment_1 = require("../environment/list-environment");
|
|
@@ -40,6 +41,7 @@ const resources_uploader_service_1 = require("../service/resources-uploader-serv
|
|
|
40
41
|
const tunnel_analytics_service_1 = require("../service/tunnel-analytics-service");
|
|
41
42
|
const tunnel_service_1 = require("../service/tunnel-service");
|
|
42
43
|
const migration_keys_service_1 = require("../service/migration-keys-service");
|
|
44
|
+
const custom_entities_service_1 = require("../service/custom-entities-service");
|
|
43
45
|
const local_file_storage_1 = require("../storage/local-file-storage");
|
|
44
46
|
const get_webtrigger_url_1 = require("../webtrigger/get-webtrigger-url");
|
|
45
47
|
const worker_info_1 = require("../workers/worker-info");
|
|
@@ -67,7 +69,6 @@ const prerequisites_controller_1 = require("./controller/prerequisites-controlle
|
|
|
67
69
|
const runtime_bundler_1 = require("../deploy/packager/runtime-bundler");
|
|
68
70
|
const nativeui_bundler_1 = require("../deploy/packager/nativeui-bundler");
|
|
69
71
|
const sentry_1 = require("./sentry");
|
|
70
|
-
const list_indexes_1 = require("../entities/list-indexes");
|
|
71
72
|
const default_environment_controller_1 = require("./controller/default-environment-controller");
|
|
72
73
|
const getDependencies = async (cliDetails) => {
|
|
73
74
|
let cmd;
|
|
@@ -137,7 +138,8 @@ const getDependencies = async (cliDetails) => {
|
|
|
137
138
|
const viewAppLogsCommand = new cli_shared_1.ViewAppLogsCommand(assertiveAppConfigReader, appEnvironmentClient, globalEdgeClient, logsClient);
|
|
138
139
|
const appOauthClientGraphql = new cli_shared_1.AppOauthClientGraphqlClient(graphQLClient);
|
|
139
140
|
const entitiesClient = new graphql_client_5.EntitiesGraphqlClient(graphQLClient);
|
|
140
|
-
const
|
|
141
|
+
const customEntitiesService = new custom_entities_service_1.CustomEntitiesService(assertiveAppConfigReader, appOauthClientGraphql, entitiesClient);
|
|
142
|
+
const listEntitiesIndexesCommand = new list_indexes_1.ListEntitiesIndexesCommand(customEntitiesService);
|
|
141
143
|
const bitbucketTranslation = new site_translation_1.BitbucketTranslator();
|
|
142
144
|
const cloudProductTranslation = new site_translation_1.CloudIdTranslator(graphQLClient);
|
|
143
145
|
const installationsClient = new graphql_client_7.InstallationsGraphqlClient(graphQLClient, cloudProductTranslation, bitbucketTranslation, cli_shared_1.pause);
|
|
@@ -150,10 +152,11 @@ const getDependencies = async (cliDetails) => {
|
|
|
150
152
|
const triggerDeployClient = new deploy_1.TriggerDeployGraphQLClient(graphQLClient);
|
|
151
153
|
const archiveUploader = new deploy_1.AppArchiveUploader(assertiveAppConfigReader, uploaderArtifactClient, fileUploader, ui, new resources_uploader_service_1.ResourcesUploaderService(fileReader));
|
|
152
154
|
const deployer = new deploy_1.ArtifactDeployer(assertiveAppConfigReader, triggerDeployClient, deployMonitorClient, cli_shared_1.pause, ui);
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
+
const sandboxRuntimeBundler = new runtime_bundler_1.RuntimeBundler(archiverFactory, ui, bundler_1.sandboxBundle);
|
|
156
|
+
const nodeRuntimeBundler = new runtime_bundler_1.RuntimeBundler(archiverFactory, ui, bundler_1.nodeBundle);
|
|
155
157
|
const nativeUiBundler = new nativeui_bundler_1.NativeUIBundler(ui, bundler_1.nativeUiBundle);
|
|
156
|
-
const
|
|
158
|
+
const sandboxAppPackager = new deploy_1.AppPackager(sandboxRuntimeBundler, nativeUiBundler, ui);
|
|
159
|
+
const nodeAppPackager = new deploy_1.AppPackager(nodeRuntimeBundler, nativeUiBundler, ui);
|
|
157
160
|
const getWebTriggerURLCommand = new get_webtrigger_url_1.GetWebTriggerURLCommand(assertiveAppConfigReader, installationsClient, appEnvironmentClient, webTriggerGraphqlClient);
|
|
158
161
|
const autocompleteController = new autocomplete_controller_1.AutocompleteController(ui);
|
|
159
162
|
const installationsService = new installation_service_1.InstallationService(assertiveAppConfigReader, installationsClient, installationsClient);
|
|
@@ -167,21 +170,22 @@ const getDependencies = async (cliDetails) => {
|
|
|
167
170
|
const bridgeScriptService = new cli_shared_1.BridgeScriptService();
|
|
168
171
|
const iframeResizerScriptService = new cli_shared_1.IframeResizerScriptService();
|
|
169
172
|
const resourcePackagingService = new resource_packaging_service_1.ResourcePackagingService(archiverFactory, fileReader, process.cwd(), bridgeScriptService, iframeResizerScriptService);
|
|
170
|
-
const
|
|
171
|
-
const
|
|
173
|
+
const sandboxPackageUploadDeployCommand = new deploy_1.PackageUploadDeployCommand(sandboxAppPackager, archiveUploader, deployer, resourcePackagingService);
|
|
174
|
+
const nodePackageUploadDeployCommand = new deploy_1.PackageUploadDeployCommand(nodeAppPackager, archiveUploader, deployer, resourcePackagingService);
|
|
175
|
+
const deployController = new deploy_controller_1.DeployController(assertiveAppConfigReader, configFile, lintService, installationsService, migrationKeysService, customEntitiesService, appEnvironmentClient, deployView, sandboxPackageUploadDeployCommand, nodePackageUploadDeployCommand, createEnvironmentCommand);
|
|
172
176
|
const createSandbox = async (cfg) => new runtime_1.NodeSandbox(cfg);
|
|
173
|
-
const functionHost = new tunnel_1.LocalFunctionHost(configFile, ui, null, createSandbox
|
|
177
|
+
const functionHost = new tunnel_1.LocalFunctionHost(configFile, ui, null, createSandbox);
|
|
174
178
|
const localInvocationService = new tunnel_1.LocalInvocationService(configFile, ui, runtime_1.notImplementedInspector);
|
|
175
|
-
const startTunnelCommand = new tunnel_1.StartTunnelCommand(assertiveAppConfigReader, new tunnel_1.LocalDevelopmentServer(localInvocationService, ui, configFile
|
|
179
|
+
const startTunnelCommand = new tunnel_1.StartTunnelCommand(assertiveAppConfigReader, new tunnel_1.LocalDevelopmentServer(localInvocationService, ui, configFile), new tunnel_1.NgrokCreateTunnelService(ui), new tunnel_1.RegisterTunnelServiceImpl(new tunnel_1.TunnelGraphqlClient(graphQLClient)), functionHost, runtime_1.notImplementedInspector, ui, configFile);
|
|
176
180
|
const tunnelInteractor = new tunnel_1.TunnelInteractor(ui);
|
|
177
181
|
const configFilePortFindingService = new port_finding_service_1.ConfigFilePortFindingService(configFile);
|
|
178
|
-
const
|
|
182
|
+
const tunnelAnalyticsService = new tunnel_analytics_service_1.TunnelAnalyticsService(analyticsClientReporter, cliDetails);
|
|
183
|
+
const nodeTunnelService = new tunnel_service_1.InProcessTunnelService(ui, startTunnelCommand, tunnelInteractor, configFilePortFindingService, tunnelAnalyticsService);
|
|
179
184
|
const tunnelView = new tunnel_view_1.TunnelView(ui);
|
|
180
185
|
const localTunnelService = new tunnel_service_1.LocalTunnelService(configFilePortFindingService);
|
|
181
186
|
const dockerService = new docker_service_1.DockerService();
|
|
182
|
-
const tunnelAnalyticsService = new tunnel_analytics_service_1.TunnelAnalyticsService(analyticsClientReporter);
|
|
183
187
|
const dockerTunnelService = new tunnel_service_1.DockerTunnelService(configFilePortFindingService, dockerService, tunnelAnalyticsService);
|
|
184
|
-
const tunnelController = new tunnel_controller_1.TunnelController(tunnelAnalyticsService, nodeTunnelService, localTunnelService, dockerTunnelService, tunnelView,
|
|
188
|
+
const tunnelController = new tunnel_controller_1.TunnelController(tunnelAnalyticsService, nodeTunnelService, localTunnelService, dockerTunnelService, tunnelView, configFile);
|
|
185
189
|
const stubController = new stubController_1.StubController();
|
|
186
190
|
const prerequisitesController = new prerequisites_controller_1.PrerequisitesController(ui, featureFlagService, cliDetails);
|
|
187
191
|
const defaultEnvironmentController = new default_environment_controller_1.DefaultEnvironmentController(ui, credentialStore, featureFlagService, cachedConfigService, assertiveAppConfigReader, loginCommand, createEnvironmentCommand, listEnvironmentCommand, getAppOwnerQuery);
|
|
@@ -202,7 +206,8 @@ const getDependencies = async (cliDetails) => {
|
|
|
202
206
|
installAppSiteCommand,
|
|
203
207
|
uninstallAppCommand,
|
|
204
208
|
getAppOwnerQuery,
|
|
205
|
-
|
|
209
|
+
sandboxPackageUploadDeployCommand,
|
|
210
|
+
nodePackageUploadDeployCommand,
|
|
206
211
|
setEnvironmentVariableCommand,
|
|
207
212
|
deleteEnvironmentVariableCommand,
|
|
208
213
|
listEnvironmentVariablesCommand,
|
|
@@ -221,6 +226,7 @@ const getDependencies = async (cliDetails) => {
|
|
|
221
226
|
featureFlagService,
|
|
222
227
|
installationsService,
|
|
223
228
|
migrationKeysService,
|
|
229
|
+
customEntitiesService,
|
|
224
230
|
credentialStore
|
|
225
231
|
},
|
|
226
232
|
controllers: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/command-line/environment.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/command-line/environment.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,yBAAyB,cAAe,MAAM,KAAG,MAK7D,CAAC;AAEF,eAAO,MAAM,sBAAsB,cAAe,MAAM,KAAG,MAK1D,CAAC;AAEF,eAAO,MAAM,sBAAsB,cAAe,MAAM,KAAG,MAE1D,CAAC"}
|
|
@@ -12,7 +12,7 @@ const validateEnvironmentOption = (userValue) => {
|
|
|
12
12
|
exports.validateEnvironmentOption = validateEnvironmentOption;
|
|
13
13
|
const validateDevEnvironment = (userValue) => {
|
|
14
14
|
if ([cli_shared_1.STAGING_ENVIRONMENT_KEY, cli_shared_1.PRODUCTION_ENVIRONMENT_KEY].includes(userValue)) {
|
|
15
|
-
throw new cli_shared_1.ValidationError(cli_shared_1.Text.env.developmentOnly(userValue
|
|
15
|
+
throw new cli_shared_1.ValidationError(cli_shared_1.Text.env.developmentOnly(userValue));
|
|
16
16
|
}
|
|
17
17
|
return userValue;
|
|
18
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-app-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-app-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EAEtB,aAAa,EACb,gBAAgB,
|
|
1
|
+
{"version":3,"file":"register-app-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-app-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EAEtB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAsBtD,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAY7E;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,kBAAkB,EAAE,kBAAkB,EACtC,IAAI,EAAE,MAAM,EACZ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,2BAA2B,GACnD,OAAO,CAAC,sBAAsB,CAAC,CAwGjC;AA+CD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,QAGlD"}
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
6
|
const sanitize_filename_1 = tslib_1.__importDefault(require("sanitize-filename"));
|
|
7
7
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
8
|
-
const cli_shared_2 = require("@forge/cli-shared");
|
|
9
8
|
var TemplateCategory;
|
|
10
9
|
(function (TemplateCategory) {
|
|
11
10
|
TemplateCategory["SHOW_ALL"] = "Show All";
|
|
@@ -16,12 +15,12 @@ var TemplateCategory;
|
|
|
16
15
|
})(TemplateCategory || (TemplateCategory = {}));
|
|
17
16
|
function ensureDirectoryDoesntExist(directory) {
|
|
18
17
|
if (fs_1.default.existsSync(directory)) {
|
|
19
|
-
throw new
|
|
18
|
+
throw new cli_shared_1.ValidationError(cli_shared_1.Text.create.error.directory.exists(directory));
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
21
|
function ensureValidNameLength(name) {
|
|
23
22
|
if (name.length <= 0 || name.length > 50) {
|
|
24
|
-
throw new
|
|
23
|
+
throw new cli_shared_1.ValidationError(cli_shared_1.Text.create.error.name.tooLong());
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
function directoryNameFromAppName(appName) {
|
|
@@ -37,7 +36,7 @@ exports.directoryNameFromAppName = directoryNameFromAppName;
|
|
|
37
36
|
async function createCommandHandler(ui, createAppCommand, featureFlagService, name, { template, directory }) {
|
|
38
37
|
if (directory) {
|
|
39
38
|
ensureDirectoryDoesntExist(directory);
|
|
40
|
-
ui.info(
|
|
39
|
+
ui.info(cli_shared_1.Text.create.intro(directory));
|
|
41
40
|
}
|
|
42
41
|
else {
|
|
43
42
|
directory = directoryNameFromAppName(name) || template;
|
|
@@ -45,12 +44,12 @@ async function createCommandHandler(ui, createAppCommand, featureFlagService, na
|
|
|
45
44
|
ensureDirectoryDoesntExist(directory);
|
|
46
45
|
}
|
|
47
46
|
const currentDirectory = process.cwd();
|
|
48
|
-
ui.info(
|
|
47
|
+
ui.info(cli_shared_1.Text.create.introWithCurrentDirectory(currentDirectory));
|
|
49
48
|
}
|
|
50
|
-
ui.info(
|
|
49
|
+
ui.info(cli_shared_1.Text.ctrlC);
|
|
51
50
|
if (!name) {
|
|
52
|
-
ui.info(
|
|
53
|
-
name = await ui.promptForText(
|
|
51
|
+
ui.info(cli_shared_1.Text.create.overviewAppName);
|
|
52
|
+
name = await ui.promptForText(cli_shared_1.Text.create.promptName);
|
|
54
53
|
if (!directory) {
|
|
55
54
|
directory = directoryNameFromAppName(name) || template;
|
|
56
55
|
if (directory) {
|
|
@@ -60,10 +59,10 @@ async function createCommandHandler(ui, createAppCommand, featureFlagService, na
|
|
|
60
59
|
}
|
|
61
60
|
ensureValidNameLength(name);
|
|
62
61
|
if (!template) {
|
|
63
|
-
ui.info(
|
|
64
|
-
const templates = await ui.displayTemporaryMessage(() => createAppCommand.getAvailableTemplates(),
|
|
62
|
+
ui.info(cli_shared_1.Text.create.overviewTemplates);
|
|
63
|
+
const templates = await ui.displayTemporaryMessage(() => createAppCommand.getAvailableTemplates(), cli_shared_1.Text.create.waitTemplates);
|
|
65
64
|
const enableCSUIK = await featureFlagService.readFlag('forge-cli-enable-csuik');
|
|
66
|
-
const type = await ui.promptForList(
|
|
65
|
+
const type = await ui.promptForList(cli_shared_1.Text.create.promptCategory, Object.values(TemplateCategory).filter((category) => enableCSUIK || category !== TemplateCategory.UI_KIT_2));
|
|
67
66
|
const filteredTemplates = type === TemplateCategory.SHOW_ALL
|
|
68
67
|
? templates
|
|
69
68
|
: templates
|
|
@@ -83,7 +82,7 @@ async function createCommandHandler(ui, createAppCommand, featureFlagService, na
|
|
|
83
82
|
}
|
|
84
83
|
})
|
|
85
84
|
.map((name) => name.replace('-ui-kit', '').replace('-custom-ui', '').replace('-csuik', ''));
|
|
86
|
-
template = await ui.promptForList(
|
|
85
|
+
template = await ui.promptForList(cli_shared_1.Text.create.promptTemplate, filteredTemplates);
|
|
87
86
|
if (type === TemplateCategory.UI_KIT) {
|
|
88
87
|
template = `${template}-ui-kit`;
|
|
89
88
|
}
|
|
@@ -101,35 +100,35 @@ async function createCommandHandler(ui, createAppCommand, featureFlagService, na
|
|
|
101
100
|
ui.emptyLine();
|
|
102
101
|
directory = directory;
|
|
103
102
|
const args = { name, template, directory };
|
|
104
|
-
const result = await ui.displayProgress(() => createAppCommand.execute(args),
|
|
105
|
-
ui.info(
|
|
103
|
+
const result = await ui.displayProgress(() => createAppCommand.execute(args), cli_shared_1.Text.create.cmd.start, cli_shared_1.Text.create.cmd.success(name));
|
|
104
|
+
ui.info(cli_shared_1.Text.create.cmd.successDetails(directory, result.environments));
|
|
106
105
|
return result;
|
|
107
106
|
}
|
|
108
107
|
exports.createCommandHandler = createCommandHandler;
|
|
109
108
|
function registerCreateCommands({ cmd, ui, commands: { createAppCommand }, services: { featureFlagService } }) {
|
|
110
109
|
cmd
|
|
111
110
|
.command('create [name]')
|
|
112
|
-
.description(
|
|
113
|
-
.option('-t, --template <template name>',
|
|
114
|
-
.option('-d, --directory <directory name>',
|
|
111
|
+
.description(cli_shared_1.Text.create.cmd.desc)
|
|
112
|
+
.option('-t, --template <template name>', cli_shared_1.Text.create.optionTemplate)
|
|
113
|
+
.option('-d, --directory <directory name>', cli_shared_1.Text.create.optionDirectory)
|
|
115
114
|
.action((name, options) => createCommandHandler(ui, createAppCommand, featureFlagService, name, options));
|
|
116
115
|
}
|
|
117
116
|
function registerRegisterCommand({ cmd, ui, commands: { registerAppCommand } }) {
|
|
118
117
|
cmd
|
|
119
118
|
.command('register [name]')
|
|
120
|
-
.description(
|
|
119
|
+
.description(cli_shared_1.Text.register.cmd.desc)
|
|
121
120
|
.requireManifestFile()
|
|
122
121
|
.action(async (name) => {
|
|
123
|
-
ui.info(
|
|
124
|
-
ui.info(
|
|
122
|
+
ui.info(cli_shared_1.Text.register.intro);
|
|
123
|
+
ui.info(cli_shared_1.Text.ctrlC);
|
|
125
124
|
ui.emptyLine();
|
|
126
125
|
if (!name) {
|
|
127
|
-
ui.info(
|
|
128
|
-
name = await ui.promptForText(
|
|
126
|
+
ui.info(cli_shared_1.Text.create.overviewAppName);
|
|
127
|
+
name = await ui.promptForText(cli_shared_1.Text.create.promptName);
|
|
129
128
|
ui.emptyLine();
|
|
130
129
|
}
|
|
131
|
-
const result = await ui.displayProgress(() => registerAppCommand.execute({ name }),
|
|
132
|
-
ui.info(
|
|
130
|
+
const result = await ui.displayProgress(() => registerAppCommand.execute({ name }), cli_shared_1.Text.register.cmd.start, cli_shared_1.Text.register.cmd.success(name));
|
|
131
|
+
ui.info(cli_shared_1.Text.register.cmd.successDetails(result.environments));
|
|
133
132
|
return result;
|
|
134
133
|
});
|
|
135
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-environment-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-environment-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EAMH,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAA2B,MAAM,mCAAmC,CAAC;AAMtG,UAAU,qBAAqB;IAC7B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,wBAAwB,OAC/B,EAAE,4BACoB,wBAAwB,mBACjC,MAAM,kBAoBxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,OAAc,EAAE,0BAA0B,sBAAsB,kBAiClG,CAAC;AAEF,eAAO,MAAM,wBAAwB,OAC/B,EAAE,WACG,qBAAqB,0BACN,sBAAsB,4BACpB,wBAAwB,kBAmCnD,CAAC;
|
|
1
|
+
{"version":3,"file":"register-environment-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-environment-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EAMH,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAA2B,MAAM,mCAAmC,CAAC;AAMtG,UAAU,qBAAqB;IAC7B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,wBAAwB,OAC/B,EAAE,4BACoB,wBAAwB,mBACjC,MAAM,kBAoBxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,OAAc,EAAE,0BAA0B,sBAAsB,kBAiClG,CAAC;AAEF,eAAO,MAAM,wBAAwB,OAC/B,EAAE,WACG,qBAAqB,0BACN,sBAAsB,4BACpB,wBAAwB,kBAmCnD,CAAC;AAyIF,eAAO,MAAM,gBAAgB,SAAU,YAAY,KAAG,IAOrD,CAAC"}
|
|
@@ -16,7 +16,7 @@ const createEnvironmentHandler = async (ui, createEnvironmentCommand, environmen
|
|
|
16
16
|
const args = {
|
|
17
17
|
environmentKey: (0, cli_shared_1.optionToEnvironment)(environmentKey)
|
|
18
18
|
};
|
|
19
|
-
await ui.displayProgress(() => createEnvironmentCommand.execute(args), cli_shared_1.Text.createEnvironment.cmd.start, cli_shared_1.Text.createEnvironment.cmd.success(environmentKey, cli_shared_1.AppEnvironmentType.Development
|
|
19
|
+
await ui.displayProgress(() => createEnvironmentCommand.execute(args), cli_shared_1.Text.createEnvironment.cmd.start, cli_shared_1.Text.createEnvironment.cmd.success(environmentKey, cli_shared_1.AppEnvironmentType.Development));
|
|
20
20
|
ui.emptyLine();
|
|
21
21
|
ui.info(cli_shared_1.Text.createEnvironment.successMessage);
|
|
22
22
|
};
|
|
@@ -121,7 +121,7 @@ const displayDeleteResult = (ui, deletedEnvironments, deleteSuccessful) => {
|
|
|
121
121
|
const successfulDelete = deletedEnvironments.filter((env) => env.successful);
|
|
122
122
|
const failedDelete = deletedEnvironments.filter((env) => !env.successful);
|
|
123
123
|
successfulDelete.forEach(({ environmentKey }) => {
|
|
124
|
-
ui.info(cli_shared_1.Text.deleteEnvironment.individualSuccessMessage(environmentKey, cli_shared_1.AppEnvironmentType.Development
|
|
124
|
+
ui.info(cli_shared_1.Text.deleteEnvironment.individualSuccessMessage(environmentKey, cli_shared_1.AppEnvironmentType.Development));
|
|
125
125
|
});
|
|
126
126
|
failedDelete.forEach(({ error }) => {
|
|
127
127
|
if (error !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-environment-variables-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-environment-variables-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"register-environment-variables-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-environment-variables-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA8B,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,+BAA+B,EAAE,MAAM,qDAAqD,CAAC;AA2EtG,wBAAsB,qCAAqC,CACzD,EAAE,EAAE,EAAE,EACN,+BAA+B,EAAE,+BAA+B,EAChE,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,OAAO,iBAwBd;AA4BD,eAAO,MAAM,gBAAgB,qBAAsB,YAAY,KAAG,IAOjE,CAAC"}
|
|
@@ -13,7 +13,7 @@ const registerSetEnvironmentVariableCommand = ({ cmd, ui, commands: { setEnviron
|
|
|
13
13
|
.option('--encrypt', cli_shared_1.Text.varsSet.optionSecret, false)
|
|
14
14
|
.environmentOption()
|
|
15
15
|
.action(async (key, value, { environment, encrypt }) => {
|
|
16
|
-
ui.info(cli_shared_1.Text.varsSet.overview(environment, (0, cli_shared_1.guessEnvironmentType)(environment)
|
|
16
|
+
ui.info(cli_shared_1.Text.varsSet.overview(environment, (0, cli_shared_1.guessEnvironmentType)(environment)));
|
|
17
17
|
ui.info(cli_shared_1.Text.ctrlC);
|
|
18
18
|
ui.emptyLine();
|
|
19
19
|
if (!value && !encrypt) {
|
|
@@ -47,7 +47,7 @@ const registerDeleteEnvironmentVariableCommand = ({ cmd, ui, commands: { deleteE
|
|
|
47
47
|
.description(cli_shared_1.Text.varsUnset.cmd.desc)
|
|
48
48
|
.environmentOption()
|
|
49
49
|
.action(async (key, { environment }) => {
|
|
50
|
-
ui.info(cli_shared_1.Text.varsUnset.cmd.start(environment, (0, cli_shared_1.guessEnvironmentType)(environment)
|
|
50
|
+
ui.info(cli_shared_1.Text.varsUnset.cmd.start(environment, (0, cli_shared_1.guessEnvironmentType)(environment)));
|
|
51
51
|
ui.info(cli_shared_1.Text.ctrlC);
|
|
52
52
|
await deleteEnvironmentVariableCommand.execute({ environment, key });
|
|
53
53
|
ui.info(cli_shared_1.Text.varsUnset.cmd.success(key));
|
|
@@ -67,8 +67,8 @@ async function listEnvironmentVariableCommandHandler(ui, listEnvironmentVariable
|
|
|
67
67
|
value: encrypted ? cli_shared_1.Text.varsList.encryptedValue : value
|
|
68
68
|
})), {
|
|
69
69
|
json,
|
|
70
|
-
emptyMessage: cli_shared_1.Text.varsList.empty(environment, (0, cli_shared_1.guessEnvironmentType)(environment)
|
|
71
|
-
preMessage: cli_shared_1.Text.varsList.overview(environment, (0, cli_shared_1.guessEnvironmentType)(environment)
|
|
70
|
+
emptyMessage: cli_shared_1.Text.varsList.empty(environment, (0, cli_shared_1.guessEnvironmentType)(environment)),
|
|
71
|
+
preMessage: cli_shared_1.Text.varsList.overview(environment, (0, cli_shared_1.guessEnvironmentType)(environment)),
|
|
72
72
|
postMessage: cli_shared_1.Text.varsList.postfix,
|
|
73
73
|
format: {
|
|
74
74
|
encrypted: (value) => (value ? '✔' : '')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-installation-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-installation-commands.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAY1B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAK/D,wBAAsB,eAAe,CAAC,EACpC,IAAI,EACJ,OAAO,EACR,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAW/C;AAoDD,eAAO,MAAM,sBAAsB,cACtB,MAAM,6CAC0B,YAAY,
|
|
1
|
+
{"version":3,"file":"register-installation-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-installation-commands.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAY1B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAK/D,wBAAsB,eAAe,CAAC,EACpC,IAAI,EACJ,OAAO,EACR,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAW/C;AAoDD,eAAO,MAAM,sBAAsB,cACtB,MAAM,6CAC0B,YAAY,kBAuBxD,CAAC;AAEF,eAAO,MAAM,yBAAyB,oBACnB,YAAY,EAAE,6CACY,YAAY,kBA8CxD,CAAC;AAgEF,eAAO,MAAM,gBAAgB,qBAAsB,YAAY,KAAG,IAejE,CAAC"}
|
|
@@ -66,7 +66,7 @@ const performSingleUninstall = async (installId, { ui, commands: { uninstallAppC
|
|
|
66
66
|
message: cli_shared_1.Text.uninstall.cmd.success(false)
|
|
67
67
|
}));
|
|
68
68
|
const uninstallMessageFormat = installation.successful ? cli_shared_1.Text.uninstall.done : cli_shared_1.Text.uninstall.failed;
|
|
69
|
-
const uninstallMessage = uninstallMessageFormat((0, cli_shared_1.capitalizeProduct)(installation.product), installation.site, installation.environmentKey,
|
|
69
|
+
const uninstallMessage = uninstallMessageFormat((0, cli_shared_1.capitalizeProduct)(installation.product), installation.site, installation.environmentKey, false);
|
|
70
70
|
if (installation.successful) {
|
|
71
71
|
ui.info(uninstallMessage);
|
|
72
72
|
}
|
|
@@ -88,7 +88,7 @@ const performMultipleUninstalls = async (appsToUninstall, { ui, commands: { unin
|
|
|
88
88
|
const deferredErrors = [];
|
|
89
89
|
uninstalledApps.forEach((uninstall) => {
|
|
90
90
|
const uninstallMessageFormat = uninstall.successful ? cli_shared_1.Text.uninstall.done : cli_shared_1.Text.uninstall.failed;
|
|
91
|
-
const formattedMessage = uninstallMessageFormat((0, cli_shared_1.capitalizeProduct)(uninstall.product), uninstall.site, uninstall.environmentKey,
|
|
91
|
+
const formattedMessage = uninstallMessageFormat((0, cli_shared_1.capitalizeProduct)(uninstall.product), uninstall.site, uninstall.environmentKey, hasMultipleNonIdentityApps);
|
|
92
92
|
if (uninstall.successful && uninstall.product !== 'identity') {
|
|
93
93
|
ui.info(formattedMessage);
|
|
94
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-providers-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-providers-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"register-providers-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-providers-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AA8DtD,eAAO,MAAM,gBAAgB,SAAU,YAAY,KAAG,IAErD,CAAC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerCommands = void 0;
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
-
const cli_shared_2 = require("@forge/cli-shared");
|
|
6
5
|
const registerConfigureProviderCommand = ({ cmd, ui, commands: { configureProviderCommand }, configFile }) => {
|
|
7
6
|
cmd
|
|
8
7
|
.command('providers')
|
|
@@ -13,7 +12,7 @@ const registerConfigureProviderCommand = ({ cmd, ui, commands: { configureProvid
|
|
|
13
12
|
.option('-s, --oauth-client-secret [oauthClientSecret]', cli_shared_1.Text.configureProvider.optionClientSecret)
|
|
14
13
|
.environmentOption()
|
|
15
14
|
.action(async (providerKey, { environment, oauthClientSecret }) => {
|
|
16
|
-
ui.info(cli_shared_1.Text.configureProvider.overview(environment
|
|
15
|
+
ui.info(cli_shared_1.Text.configureProvider.overview(environment));
|
|
17
16
|
ui.info(cli_shared_1.Text.ctrlC);
|
|
18
17
|
ui.emptyLine();
|
|
19
18
|
const availableProviders = await configFile.getAuthProviders();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-storage-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-storage-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA6B,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAKtD,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,UAAU;;GAG/D;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,eAAe,EACrB,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,0BAA0B,EAAE,EAAE,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"register-storage-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-storage-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA6B,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAKtD,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,UAAU;;GAG/D;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,eAAe,EACrB,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,0BAA0B,EAAE,EAAE,EAAE,YAAY,iBAmB/D;AAqBD,eAAO,MAAM,gBAAgB,SAAU,YAAY,KAAG,IAOrD,CAAC"}
|
|
@@ -14,11 +14,13 @@ async function listIndexes(data, configFile, { ui, commands: { listEntitiesIndex
|
|
|
14
14
|
if (!entities.length) {
|
|
15
15
|
throw new Error(cli_shared_1.Text.entitiesIndexesList.missingEntities);
|
|
16
16
|
}
|
|
17
|
-
const result = await listEntitiesIndexesCommand.execute((0, cli_shared_1.optionToEnvironment)(data.environment || 'development')
|
|
17
|
+
const result = await listEntitiesIndexesCommand.execute((0, cli_shared_1.optionToEnvironment)(data.environment || 'development'));
|
|
18
18
|
ui.table([
|
|
19
19
|
['entityName', 'Entity name'],
|
|
20
20
|
['indexName', 'Index name'],
|
|
21
|
-
['indexStatus', 'Index status']
|
|
21
|
+
['indexStatus', 'Index status'],
|
|
22
|
+
['partition', 'Partition'],
|
|
23
|
+
['range', 'Range']
|
|
22
24
|
], result.indexes);
|
|
23
25
|
}
|
|
24
26
|
exports.listIndexes = listIndexes;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AppEnvironmentDetails, UI } from '@forge/cli-shared';
|
|
1
|
+
import { AppEnvironmentDetails, AppEnvironmentType, UI } from '@forge/cli-shared';
|
|
2
2
|
import { LintResult } from '@forge/lint';
|
|
3
3
|
import { DeploymentResult } from '../register-deployment-commands';
|
|
4
4
|
export declare class DeployView {
|
|
5
5
|
private readonly ui;
|
|
6
6
|
constructor(ui: UI);
|
|
7
7
|
getLogger(): UI;
|
|
8
|
-
displayStart(environment: string): void;
|
|
8
|
+
displayStart(environment: string, environmentType: AppEnvironmentType): void;
|
|
9
9
|
displayListAppInstallationsError(): void;
|
|
10
10
|
displayLintRunning(): void;
|
|
11
11
|
displayOutdatedInstallationsMessage(): void;
|
|
@@ -21,6 +21,8 @@ export declare class DeployView {
|
|
|
21
21
|
promptToContinueDeletingConnectKey(): Promise<boolean>;
|
|
22
22
|
promptToContinueChangingConnectKey(): Promise<boolean>;
|
|
23
23
|
promptToCreateEnvironment(): Promise<boolean>;
|
|
24
|
+
promptToContinueDeploymentWhileReindexing(): Promise<boolean>;
|
|
25
|
+
displaySuccessfulDeploymentWhileReindexing(): void;
|
|
24
26
|
reportDeploymentProgress({ appAri, name, environmentKey, environmentType }: AppEnvironmentDetails, showDistributionPageLink: boolean, deployCallback: () => Promise<DeploymentResult>): Promise<DeploymentResult>;
|
|
25
27
|
}
|
|
26
28
|
//# 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,qBAAqB,
|
|
1
|
+
{"version":3,"file":"deploy-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/deploy-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAkB,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAClG,OAAO,EAAE,UAAU,EAAqB,MAAM,aAAa,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,EAAE;IAE5B,SAAS,IAAI,EAAE;IAIf,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,kBAAkB,GAAG,IAAI;IAI5E,gCAAgC,IAAI,IAAI;IAIxC,kBAAkB,IAAI,IAAI;IAI1B,mCAAmC,IAAI,IAAI;IAK3C,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAKjD,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,IAAI;IAKlD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI3C,qBAAqB,IAAI,IAAI;IAI7B,8BAA8B,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAInG,8BAA8B,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAIzD,mCAAmC,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAIjF,iCAAiC,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAM5D,wCAAwC,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAK7D,kCAAkC,IAAI,OAAO,CAAC,OAAO,CAAC;IAItD,kCAAkC,IAAI,OAAO,CAAC,OAAO,CAAC;IAItD,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC;IAM7C,yCAAyC,IAAI,OAAO,CAAC,OAAO,CAAC;IAKnE,0CAA0C,IAAI,IAAI;IAK5C,wBAAwB,CACnC,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,eAAe,EAAE,EAAE,qBAAqB,EACxE,wBAAwB,EAAE,OAAO,EACjC,cAAc,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,GAC9C,OAAO,CAAC,gBAAgB,CAAC;CAY7B"}
|