@forge/cli 6.8.3-next.9 → 6.9.0
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 +196 -0
- package/npm-shrinkwrap.json +163 -165
- package/out/command-line/dependency-injection.d.ts +2 -0
- package/out/command-line/dependency-injection.d.ts.map +1 -1
- package/out/command-line/dependency-injection.js +3 -0
- package/out/command-line/register-environment-commands.d.ts +7 -0
- package/out/command-line/register-environment-commands.d.ts.map +1 -1
- package/out/command-line/register-environment-commands.js +105 -4
- package/out/command-line/register-environment-variables-commands.d.ts +3 -0
- package/out/command-line/register-environment-variables-commands.d.ts.map +1 -1
- package/out/command-line/register-environment-variables-commands.js +25 -22
- package/out/command-line/view/tunnel-view.d.ts.map +1 -1
- package/out/command-line/view/tunnel-view.js +1 -1
- package/out/deploy/deployer/deployer.d.ts +4 -6
- package/out/deploy/deployer/deployer.d.ts.map +1 -1
- package/out/deploy/deployer/deployer.js +12 -16
- package/out/environment/delete-environment.d.ts +27 -0
- package/out/environment/delete-environment.d.ts.map +1 -0
- package/out/environment/delete-environment.js +14 -0
- package/out/environment/graphql-client.d.ts +5 -1
- package/out/environment/graphql-client.d.ts.map +1 -1
- package/out/environment/graphql-client.js +58 -1
- package/out/installations/graphql-client.d.ts +1 -1
- package/out/installations/graphql-client.d.ts.map +1 -1
- package/out/installations/graphql-client.js +11 -10
- package/out/service/resources-uploader-service.js +3 -3
- package/package.json +9 -9
|
@@ -45,8 +45,8 @@ class MissingTaskIdError extends Error {
|
|
|
45
45
|
}
|
|
46
46
|
exports.MissingTaskIdError = MissingTaskIdError;
|
|
47
47
|
class InstallationRequestFailedError extends cli_shared_1.BaseError {
|
|
48
|
-
constructor(userError, code, message) {
|
|
49
|
-
super(message);
|
|
48
|
+
constructor(userError, code, message, requestId) {
|
|
49
|
+
super(requestId, message);
|
|
50
50
|
this.userError = userError;
|
|
51
51
|
this.code = code;
|
|
52
52
|
}
|
|
@@ -186,14 +186,14 @@ class InstallationsGraphqlClient {
|
|
|
186
186
|
var _a, _b, _c, _d;
|
|
187
187
|
let status = cli_shared_1.AppTaskState.Pending;
|
|
188
188
|
while (status !== cli_shared_1.AppTaskState.Complete) {
|
|
189
|
-
const { state, errors } = await this.getAppInstallationTask(taskId);
|
|
189
|
+
const { state, errors, requestId } = await this.getAppInstallationTask(taskId);
|
|
190
190
|
status = state;
|
|
191
191
|
if (status === cli_shared_1.AppTaskState.Failed) {
|
|
192
192
|
const error = errors === null || errors === void 0 ? void 0 : errors[0];
|
|
193
193
|
const statusCode = (_a = error === null || error === void 0 ? void 0 : error.extensions) === null || _a === void 0 ? void 0 : _a.statusCode;
|
|
194
194
|
const isUserError = statusCode && statusCode >= 400 && statusCode < 500 ? true : false;
|
|
195
195
|
const code = (_c = (_b = error === null || error === void 0 ? void 0 : error.extensions) === null || _b === void 0 ? void 0 : _b.errorType) !== null && _c !== void 0 ? _c : undefined;
|
|
196
|
-
throw new InstallationRequestFailedError(isUserError, code, (_d = error === null || error === void 0 ? void 0 : error.message) !== null && _d !== void 0 ? _d : undefined);
|
|
196
|
+
throw new InstallationRequestFailedError(isUserError, code, (_d = error === null || error === void 0 ? void 0 : error.message) !== null && _d !== void 0 ? _d : undefined, requestId);
|
|
197
197
|
}
|
|
198
198
|
if (status !== cli_shared_1.AppTaskState.Complete)
|
|
199
199
|
await this.pause(exports.UNINSTALLATION_EVENT_POLL_INTERVAL);
|
|
@@ -267,7 +267,7 @@ class InstallationsGraphqlClient {
|
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
`;
|
|
270
|
-
const { appInstallationTask } = await this.graphqlClient.query(query, {
|
|
270
|
+
const { appInstallationTask, requestId } = await this.graphqlClient.query(query, {
|
|
271
271
|
id: taskId
|
|
272
272
|
});
|
|
273
273
|
if (!appInstallationTask) {
|
|
@@ -276,7 +276,8 @@ class InstallationsGraphqlClient {
|
|
|
276
276
|
const { state, errors } = appInstallationTask;
|
|
277
277
|
return {
|
|
278
278
|
errors,
|
|
279
|
-
state
|
|
279
|
+
state,
|
|
280
|
+
requestId
|
|
280
281
|
};
|
|
281
282
|
}
|
|
282
283
|
async monitorUninstallApp(taskId) {
|
|
@@ -326,7 +327,7 @@ class InstallationsGraphqlClient {
|
|
|
326
327
|
environmentType,
|
|
327
328
|
context: installation.installationContext,
|
|
328
329
|
site,
|
|
329
|
-
version: installation.
|
|
330
|
+
version: installation.appEnvironmentVersion || {
|
|
330
331
|
isLatest: false
|
|
331
332
|
}
|
|
332
333
|
};
|
|
@@ -341,13 +342,13 @@ class InstallationsGraphqlClient {
|
|
|
341
342
|
nodes {
|
|
342
343
|
id
|
|
343
344
|
installationContext
|
|
344
|
-
version {
|
|
345
|
-
isLatest
|
|
346
|
-
}
|
|
347
345
|
appEnvironment {
|
|
348
346
|
key
|
|
349
347
|
type
|
|
350
348
|
}
|
|
349
|
+
appEnvironmentVersion {
|
|
350
|
+
isLatest
|
|
351
|
+
}
|
|
351
352
|
}
|
|
352
353
|
pageInfo {
|
|
353
354
|
hasNextPage
|
|
@@ -6,12 +6,12 @@ const cli_shared_1 = require("@forge/cli-shared");
|
|
|
6
6
|
const form_data_1 = tslib_1.__importDefault(require("form-data"));
|
|
7
7
|
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
8
8
|
class ResourceUploadError extends cli_shared_1.BaseError {
|
|
9
|
-
constructor(userError) {
|
|
10
|
-
super('Failed to upload resource to S3');
|
|
9
|
+
constructor(userError = false, requestId) {
|
|
10
|
+
super(requestId, 'Failed to upload resource to S3');
|
|
11
11
|
this.userError = userError;
|
|
12
12
|
}
|
|
13
13
|
isUserError() {
|
|
14
|
-
return
|
|
14
|
+
return this.userError;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
class ResourcesUploaderService {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.0",
|
|
4
4
|
"description": "A command line interface for managing Atlassian-hosted apps",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"postinstall": "node -e \"process.exitCode = fs.existsSync('./out/bin/postinstall.js')\" || node ./out/bin/postinstall.js"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@forge/bundler": "4.6.6
|
|
22
|
-
"@forge/cli-shared": "3.11.0
|
|
23
|
-
"@forge/egress": "1.
|
|
24
|
-
"@forge/lint": "3.3.0
|
|
25
|
-
"@forge/manifest": "4.10.0
|
|
21
|
+
"@forge/bundler": "4.6.6",
|
|
22
|
+
"@forge/cli-shared": "3.11.0",
|
|
23
|
+
"@forge/egress": "1.2.0",
|
|
24
|
+
"@forge/lint": "3.3.0",
|
|
25
|
+
"@forge/manifest": "4.10.0",
|
|
26
26
|
"@forge/runtime": "4.3.2",
|
|
27
|
-
"@forge/tunnel": "3.3.5
|
|
27
|
+
"@forge/tunnel": "3.3.5",
|
|
28
28
|
"@forge/util": "1.2.3",
|
|
29
29
|
"@sentry/node": "^7.29.0",
|
|
30
30
|
"ajv": "^6.12.6",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"node-machine-id": "^1.1.12",
|
|
50
50
|
"omelette": "^0.4.17",
|
|
51
51
|
"ora": "^4.0.3",
|
|
52
|
-
"portfinder": "^1.0.
|
|
52
|
+
"portfinder": "^1.0.32",
|
|
53
53
|
"sanitize-filename": "^1.6.3",
|
|
54
54
|
"semver": "^6.3.0",
|
|
55
55
|
"tmp": "^0.1.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@types/omelette": "^0.4.2",
|
|
75
75
|
"@types/semver": "^6.0.1",
|
|
76
76
|
"@types/tmp": "^0.1.0",
|
|
77
|
-
"@types/unzipper": "^0.10.
|
|
77
|
+
"@types/unzipper": "^0.10.5",
|
|
78
78
|
"@types/uuid": "^3.4.10",
|
|
79
79
|
"jest": "^29.1.2",
|
|
80
80
|
"jest-fixtures": "^0.6.0",
|