@forge/cli 9.1.0-next.6 → 9.1.1-next.3
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 +66 -0
- package/npm-shrinkwrap.json +47 -48
- package/out/analytics-client/analytics-client.js +12 -39
- package/out/analytics-client/analytics-message-handler.js +27 -28
- package/out/autocomplete/index.js +2 -1
- package/out/autocomplete/util.js +1 -1
- package/out/bin/postinstall.js +1 -1
- package/out/command-line/command.js +116 -132
- package/out/command-line/controller/autocomplete-controller.js +0 -1
- package/out/command-line/controller/default-environment-controller.js +0 -8
- package/out/command-line/controller/deploy-controller.js +9 -25
- package/out/command-line/controller/feedback-controller.js +0 -2
- package/out/command-line/controller/install-controller.js +5 -11
- package/out/command-line/controller/lint-controller.js +1 -3
- package/out/command-line/controller/pre-command-controller.js +0 -6
- package/out/command-line/controller/prerequisites-controller.js +0 -3
- package/out/command-line/controller/settings-controller.js +57 -60
- package/out/command-line/controller/tunnel-controller.js +1 -7
- package/out/command-line/dependency-injection.js +2 -2
- package/out/command-line/errors.js +0 -1
- package/out/command-line/register-authentication-command.js +1 -1
- package/out/command-line/register-environment-variables-commands.js +8 -6
- package/out/command-line/register-installation-commands.js +7 -5
- package/out/command-line/register-log-commands.js +1 -1
- package/out/command-line/register-settings-commands.js +5 -3
- package/out/command-line/register-storage-commands.js +2 -1
- package/out/command-line/sentry.js +1 -4
- package/out/command-line/version-info.js +1 -1
- package/out/command-line/view/analytics-settings-view.js +0 -1
- package/out/command-line/view/deploy-view.js +0 -1
- package/out/command-line/view/install-view.js +0 -1
- package/out/command-line/view/lint-view.js +0 -2
- package/out/command-line/view/lite-lint-view.js +0 -2
- package/out/command-line/view/settings-view.js +0 -1
- package/out/command-line/view/tunnel-view.js +4 -4
- package/out/deploy/deployer/deploy-monitor-graphql-client.js +1 -2
- package/out/deploy/deployer/deployer.js +6 -13
- package/out/deploy/deployer/trigger-deploy-graphql-client.js +0 -1
- package/out/deploy/package-upload-deploy.js +0 -4
- package/out/deploy/packager/archiver.js +15 -19
- package/out/deploy/packager/nativeui-bundler.js +1 -6
- package/out/deploy/packager/packager.js +1 -7
- package/out/deploy/packager/runtime-bundler.d.ts +2 -3
- package/out/deploy/packager/runtime-bundler.d.ts.map +1 -1
- package/out/deploy/packager/runtime-bundler.js +5 -14
- package/out/deploy/uploader/artifact-graphql-client.js +0 -1
- package/out/deploy/uploader/uploader.js +0 -5
- package/out/entities/graphql-client.js +2 -2
- package/out/entities/list-indexes.js +0 -1
- package/out/environment/create-environment.js +1 -6
- package/out/environment/delete-environment.js +1 -6
- package/out/environment/graphql-client.js +3 -6
- package/out/environment/list-environment.js +0 -2
- package/out/environment-variables/delete-environment-variable.js +1 -6
- package/out/environment-variables/graphql-client.js +0 -1
- package/out/environment-variables/list-environment-variables.js +1 -6
- package/out/environment-variables/set-environment-variable.js +1 -6
- package/out/installations/graphql-client.js +22 -29
- package/out/installations/install-app-site.js +0 -2
- package/out/installations/site-translation/cloudid-products.js +0 -1
- package/out/installations/uninstall-app.js +0 -2
- package/out/migration-keys/graphql-client.js +4 -4
- package/out/providers/configure-provider.js +1 -6
- package/out/providers/graphql-client.js +0 -1
- package/out/service/cached-config-service.js +0 -1
- package/out/service/custom-entities-service.js +2 -4
- package/out/service/docker-service.js +1 -5
- package/out/service/installation-service.js +4 -7
- package/out/service/lint-service.js +0 -2
- package/out/service/lite-lint-service.js +0 -2
- package/out/service/migration-keys-service.js +0 -2
- package/out/service/port-finding-service.js +0 -1
- package/out/service/resource-packaging-service.js +0 -5
- package/out/service/resources-uploader-service.js +0 -2
- package/out/service/tunnel-analytics-service.js +3 -10
- package/out/service/tunnel-service.js +10 -19
- package/out/storage/local-file-storage.js +2 -2
- package/out/webtrigger/get-webtrigger-url.js +0 -4
- package/out/webtrigger/graphql-client.js +1 -2
- package/out/workers/analytics-message-worker.js +0 -3
- package/out/workers/version-check-worker.js +0 -1
- package/package.json +8 -8
|
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TunnelAnalyticsService = void 0;
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
5
|
class TunnelAnalyticsService {
|
|
6
|
-
analyticsClientReporter;
|
|
7
|
-
cliDetails;
|
|
8
6
|
constructor(analyticsClientReporter, cliDetails) {
|
|
9
7
|
this.analyticsClientReporter = analyticsClientReporter;
|
|
10
8
|
this.cliDetails = cliDetails;
|
|
@@ -18,15 +16,10 @@ class TunnelAnalyticsService {
|
|
|
18
16
|
this.analyticsClientReporter.reportSuccess('close tunnel', creds, {});
|
|
19
17
|
}
|
|
20
18
|
reportTunnelFailure(creds, errorName, attributes) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
version: this.cliDetails?.version,
|
|
24
|
-
latest: this.cliDetails?.latest,
|
|
25
|
-
isLatest: (0, cli_shared_1.isLatestCLIVersion)(this.cliDetails),
|
|
26
|
-
...attributes
|
|
27
|
-
};
|
|
19
|
+
var _a, _b;
|
|
20
|
+
attributes = Object.assign({ error: errorName, version: (_a = this.cliDetails) === null || _a === void 0 ? void 0 : _a.version, latest: (_b = this.cliDetails) === null || _b === void 0 ? void 0 : _b.latest, isLatest: (0, cli_shared_1.isLatestCLIVersion)(this.cliDetails) }, attributes);
|
|
28
21
|
if (attributes.isUserError === undefined) {
|
|
29
|
-
attributes = {
|
|
22
|
+
attributes = Object.assign(Object.assign({}, attributes), { isUserError: false });
|
|
30
23
|
}
|
|
31
24
|
this.analyticsClientReporter.reportInvokeFailure('tunnel', creds, attributes);
|
|
32
25
|
}
|
|
@@ -14,7 +14,7 @@ exports.CONTAINER_NAME = `forge-tunnel-docker-${process.pid}`;
|
|
|
14
14
|
const PATH_DOCKER_NGROK_CONFIG = '/opt/provided-ngrok-config.yml';
|
|
15
15
|
const cliDetails = (0, version_info_1.getCLIDetails)();
|
|
16
16
|
let versionTags;
|
|
17
|
-
if (cliDetails
|
|
17
|
+
if ((cliDetails === null || cliDetails === void 0 ? void 0 : cliDetails.version) !== undefined) {
|
|
18
18
|
if (process.env.FORGE_IN_LOCAL_E2E === 'true') {
|
|
19
19
|
versionTags = ['e2e'];
|
|
20
20
|
}
|
|
@@ -41,7 +41,6 @@ class InvalidDebugStartingPortNumber extends cli_shared_1.UserError {
|
|
|
41
41
|
}
|
|
42
42
|
exports.InvalidDebugStartingPortNumber = InvalidDebugStartingPortNumber;
|
|
43
43
|
class TunnelServiceBase {
|
|
44
|
-
cachedConfigService;
|
|
45
44
|
constructor(cachedConfigService) {
|
|
46
45
|
this.cachedConfigService = cachedConfigService;
|
|
47
46
|
}
|
|
@@ -54,11 +53,6 @@ class TunnelServiceBase {
|
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
55
|
class InProcessTunnelService extends TunnelServiceBase {
|
|
57
|
-
ui;
|
|
58
|
-
startTunnelCommand;
|
|
59
|
-
tunnelInteractor;
|
|
60
|
-
configFilePortFindingService;
|
|
61
|
-
analyticsService;
|
|
62
56
|
constructor(ui, startTunnelCommand, tunnelInteractor, configFilePortFindingService, cachedConfigService, analyticsService) {
|
|
63
57
|
super(cachedConfigService);
|
|
64
58
|
this.ui = ui;
|
|
@@ -95,20 +89,19 @@ class InProcessTunnelService extends TunnelServiceBase {
|
|
|
95
89
|
}
|
|
96
90
|
exports.InProcessTunnelService = InProcessTunnelService;
|
|
97
91
|
class SandboxTunnelServiceBase extends TunnelServiceBase {
|
|
98
|
-
configFilePortFindingService;
|
|
99
|
-
cachedConfigService;
|
|
100
92
|
constructor(configFilePortFindingService, cachedConfigService) {
|
|
101
93
|
super(cachedConfigService);
|
|
102
94
|
this.configFilePortFindingService = configFilePortFindingService;
|
|
103
95
|
this.cachedConfigService = cachedConfigService;
|
|
104
96
|
}
|
|
105
97
|
async getTunnelProcessEnvironment(tunnelOptions, debugEnabled, { email, token }, port, cspReporterPort, resourcePorts) {
|
|
98
|
+
var _a;
|
|
106
99
|
const graphqlGateway = (0, cli_shared_1.getGraphqlGateway)();
|
|
107
100
|
return [
|
|
108
101
|
{ key: 'APP_FOLDER', value: '/app' },
|
|
109
102
|
{ key: 'FORGE_EMAIL', value: email },
|
|
110
103
|
{ key: 'FORGE_API_TOKEN', value: token },
|
|
111
|
-
{ key: 'ENVIRONMENT_KEY', value: tunnelOptions.environment
|
|
104
|
+
{ key: 'ENVIRONMENT_KEY', value: (_a = tunnelOptions.environment) !== null && _a !== void 0 ? _a : 'default' },
|
|
112
105
|
{ key: 'TUNNEL_INSPECTOR_ENABLED', value: (!!tunnelOptions.debug).toString() },
|
|
113
106
|
{ key: 'FORGE_GRAPHQL_GATEWAY', value: graphqlGateway },
|
|
114
107
|
{ key: 'VERBOSE_MODE', value: `${debugEnabled}` },
|
|
@@ -140,7 +133,8 @@ class SandboxTunnelServiceBase extends TunnelServiceBase {
|
|
|
140
133
|
Object.keys(process.env)
|
|
141
134
|
.filter((variable) => variable.startsWith('FORGE_USER_VAR_'))
|
|
142
135
|
.forEach((name) => {
|
|
143
|
-
|
|
136
|
+
var _a;
|
|
137
|
+
vars.push({ key: name, value: (_a = process.env[name]) !== null && _a !== void 0 ? _a : 'undefined' });
|
|
144
138
|
});
|
|
145
139
|
return vars;
|
|
146
140
|
}
|
|
@@ -154,10 +148,7 @@ class LocalTunnelService extends SandboxTunnelServiceBase {
|
|
|
154
148
|
const env = this.formatEnvForLocalTunnel(environment);
|
|
155
149
|
const process = (0, cross_spawn_1.spawn)('forge-tunnel', [], {
|
|
156
150
|
stdio: 'inherit',
|
|
157
|
-
env: {
|
|
158
|
-
...env,
|
|
159
|
-
FORGE_DEV_TUNNEL: 'true'
|
|
160
|
-
}
|
|
151
|
+
env: Object.assign(Object.assign({}, env), { FORGE_DEV_TUNNEL: 'true' })
|
|
161
152
|
});
|
|
162
153
|
if (onError) {
|
|
163
154
|
process.on('error', onError);
|
|
@@ -172,14 +163,13 @@ class LocalTunnelService extends SandboxTunnelServiceBase {
|
|
|
172
163
|
}
|
|
173
164
|
exports.LocalTunnelService = LocalTunnelService;
|
|
174
165
|
class DockerTunnelService extends SandboxTunnelServiceBase {
|
|
175
|
-
dockerService;
|
|
176
|
-
analyticsService;
|
|
177
166
|
constructor(configFilePortFindingService, cachedConfigService, dockerService, analyticsService) {
|
|
178
167
|
super(configFilePortFindingService, cachedConfigService);
|
|
179
168
|
this.dockerService = dockerService;
|
|
180
169
|
this.analyticsService = analyticsService;
|
|
181
170
|
}
|
|
182
171
|
async run(tunnelOptions, creds, debugEnabled) {
|
|
172
|
+
var _a;
|
|
183
173
|
await this.validateDockerVersion(creds, debugEnabled);
|
|
184
174
|
const startPort = 8000 + Math.round(Math.random() * 100);
|
|
185
175
|
const port = await (0, portfinder_1.getPortPromise)({ port: startPort });
|
|
@@ -200,7 +190,8 @@ class DockerTunnelService extends SandboxTunnelServiceBase {
|
|
|
200
190
|
exports.IMAGE_NAME
|
|
201
191
|
]);
|
|
202
192
|
docker.on('exit', () => this.analyticsService.reportTunnelClosed(creds));
|
|
203
|
-
docker.stderr
|
|
193
|
+
(_a = docker.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (error) => {
|
|
194
|
+
var _a;
|
|
204
195
|
const errorMessage = error;
|
|
205
196
|
let errorJson;
|
|
206
197
|
try {
|
|
@@ -213,7 +204,7 @@ class DockerTunnelService extends SandboxTunnelServiceBase {
|
|
|
213
204
|
this.analyticsService.reportTunnelFailure(creds, tunnelErrorDetails.name, tunnelErrorDetails.attributes);
|
|
214
205
|
}
|
|
215
206
|
else {
|
|
216
|
-
process.stderr
|
|
207
|
+
(_a = process.stderr) === null || _a === void 0 ? void 0 : _a.write(errorMessage);
|
|
217
208
|
}
|
|
218
209
|
});
|
|
219
210
|
this.dockerService.startCleanupWorker([docker.pid], exports.CONTAINER_NAME);
|
|
@@ -7,8 +7,6 @@ const fs = tslib_1.__importStar(require("fs"));
|
|
|
7
7
|
const env_paths_1 = tslib_1.__importDefault(require("env-paths"));
|
|
8
8
|
const fs_extra_1 = require("fs-extra");
|
|
9
9
|
class LocalFileStorage {
|
|
10
|
-
static STORAGE_PATHS = (0, env_paths_1.default)('forge-cli');
|
|
11
|
-
static FOLDER = LocalFileStorage.STORAGE_PATHS.data;
|
|
12
10
|
constructor() {
|
|
13
11
|
if (!fs.existsSync(LocalFileStorage.FOLDER)) {
|
|
14
12
|
(0, fs_extra_1.mkdirpSync)(LocalFileStorage.FOLDER);
|
|
@@ -51,3 +49,5 @@ class LocalFileStorage {
|
|
|
51
49
|
}
|
|
52
50
|
}
|
|
53
51
|
exports.LocalFileStorage = LocalFileStorage;
|
|
52
|
+
LocalFileStorage.STORAGE_PATHS = (0, env_paths_1.default)('forge-cli');
|
|
53
|
+
LocalFileStorage.FOLDER = LocalFileStorage.STORAGE_PATHS.data;
|
|
@@ -3,10 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GetWebTriggerURLCommand = void 0;
|
|
4
4
|
const ari_1 = require("@forge/util/packages/ari");
|
|
5
5
|
class GetWebTriggerURLCommand {
|
|
6
|
-
getAppConfig;
|
|
7
|
-
webTriggerClient;
|
|
8
|
-
appEnvironmentClient;
|
|
9
|
-
webTriggerGraphqlClient;
|
|
10
6
|
constructor(getAppConfig, webTriggerClient, appEnvironmentClient, webTriggerGraphqlClient) {
|
|
11
7
|
this.getAppConfig = getAppConfig;
|
|
12
8
|
this.webTriggerClient = webTriggerClient;
|
|
@@ -10,12 +10,11 @@ class WebTriggerCreationError extends cli_shared_1.GraphQlMutationError {
|
|
|
10
10
|
exports.WebTriggerCreationError = WebTriggerCreationError;
|
|
11
11
|
class MissingWebTriggerUrlError extends cli_shared_1.GraphQlMutationError {
|
|
12
12
|
constructor(requestId) {
|
|
13
|
-
super(cli_shared_1.Text.webtrigger.error.creationError(`Web Trigger URL not found after successful creation, requestId: ${requestId
|
|
13
|
+
super(cli_shared_1.Text.webtrigger.error.creationError(`Web Trigger URL not found after successful creation, requestId: ${requestId !== null && requestId !== void 0 ? requestId : 'N/A'}`), { requestId });
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
exports.MissingWebTriggerUrlError = MissingWebTriggerUrlError;
|
|
17
17
|
class WebTriggerGraphQLClient {
|
|
18
|
-
graphQLClient;
|
|
19
18
|
constructor(graphQLClient) {
|
|
20
19
|
this.graphQLClient = graphQLClient;
|
|
21
20
|
}
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AnalyticsMessageWorker = void 0;
|
|
4
4
|
class AnalyticsMessageWorker {
|
|
5
|
-
storage;
|
|
6
|
-
messageHandler;
|
|
7
|
-
cachedConfigService;
|
|
8
5
|
constructor(storage, messageHandler, cachedConfigService) {
|
|
9
6
|
this.storage = storage;
|
|
10
7
|
this.messageHandler = messageHandler;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VersionCheckWorker = void 0;
|
|
4
4
|
const version_info_1 = require("../command-line/version-info");
|
|
5
5
|
class VersionCheckWorker {
|
|
6
|
-
workerInfo;
|
|
7
6
|
constructor(workerInfo) {
|
|
8
7
|
this.workerInfo = workerInfo;
|
|
9
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.1-next.3",
|
|
4
4
|
"description": "A command line interface for managing Atlassian-hosted apps",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"postinstall": "node -e \"fs.existsSync('./out/bin/postinstall.js') && require('./out/bin/postinstall.js')\""
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@forge/bundler": "4.15.
|
|
22
|
-
"@forge/cli-shared": "4.0.
|
|
21
|
+
"@forge/bundler": "4.15.11-next.2",
|
|
22
|
+
"@forge/cli-shared": "4.0.1-next.2",
|
|
23
23
|
"@forge/egress": "1.2.13",
|
|
24
|
-
"@forge/lint": "5.0.
|
|
25
|
-
"@forge/manifest": "7.
|
|
26
|
-
"@forge/runtime": "5.
|
|
27
|
-
"@forge/tunnel": "5.0.
|
|
28
|
-
"@forge/util": "1.4.3
|
|
24
|
+
"@forge/lint": "5.0.2-next.2",
|
|
25
|
+
"@forge/manifest": "7.2.0-next.2",
|
|
26
|
+
"@forge/runtime": "5.7.0-next.0",
|
|
27
|
+
"@forge/tunnel": "5.0.2-next.3",
|
|
28
|
+
"@forge/util": "1.4.3",
|
|
29
29
|
"@sentry/node": "7.100.1",
|
|
30
30
|
"ajv": "^8.12.0",
|
|
31
31
|
"archiver": "^6.0.2",
|