@forge/cli 6.8.2 → 6.9.0-next.22
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 +237 -0
- package/npm-shrinkwrap.json +211 -209
- 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 +110 -7
- 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/version-info.js +1 -1
- 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/deploy-monitor-graphql-client.d.ts +2 -7
- package/out/deploy/deployer/deploy-monitor-graphql-client.d.ts.map +1 -1
- package/out/deploy/deployer/deploy-monitor-graphql-client.js +4 -10
- package/out/deploy/deployer/deployer.d.ts +9 -9
- package/out/deploy/deployer/deployer.d.ts.map +1 -1
- package/out/deploy/deployer/deployer.js +24 -25
- 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/out/service/tunnel-service.d.ts +4 -1
- package/out/service/tunnel-service.d.ts.map +1 -1
- package/out/service/tunnel-service.js +10 -1
- package/package.json +15 -15
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteEnvironmentCommand = void 0;
|
|
4
|
+
class DeleteEnvironmentCommand {
|
|
5
|
+
constructor(client, getAppConfig) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
this.getAppConfig = getAppConfig;
|
|
8
|
+
}
|
|
9
|
+
async batchExecute(details) {
|
|
10
|
+
const { id: appId } = await this.getAppConfig();
|
|
11
|
+
return this.client.deleteEnvironments(Object.assign(Object.assign({}, details), { appId }));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.DeleteEnvironmentCommand = DeleteEnvironmentCommand;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { AppEnvironmentType, GraphQLClient, UserError } from '@forge/cli-shared';
|
|
2
2
|
import { AppEnvironmentDetails, CreateEnvironmentClient } from './create-environment';
|
|
3
3
|
import { ListEnvironmentClient, ListEnvironmentDetails } from './list-environment';
|
|
4
|
+
import { BatchDeleteEnvironmentDetails, DeleteEnvironmentClient, DeleteEnvironmentDetails, DeleteEnvironmentOutput } from './delete-environment';
|
|
5
|
+
export declare const APP_HAS_INSTALLATIONS_CODE = "APP_HAS_INSTALLATIONS";
|
|
4
6
|
export declare class MissingAppError extends UserError {
|
|
5
7
|
}
|
|
6
|
-
export declare class GraphqlClient implements CreateEnvironmentClient, ListEnvironmentClient {
|
|
8
|
+
export declare class GraphqlClient implements CreateEnvironmentClient, ListEnvironmentClient, DeleteEnvironmentClient {
|
|
7
9
|
private readonly graphqlClient;
|
|
8
10
|
constructor(graphqlClient: GraphQLClient);
|
|
9
11
|
createEnvironment(details: AppEnvironmentDetails): Promise<void>;
|
|
@@ -12,5 +14,7 @@ export declare class GraphqlClient implements CreateEnvironmentClient, ListEnvir
|
|
|
12
14
|
key: string;
|
|
13
15
|
lastDeployedAt: string;
|
|
14
16
|
}[]>;
|
|
17
|
+
deleteEnvironments(details: BatchDeleteEnvironmentDetails): Promise<DeleteEnvironmentOutput[]>;
|
|
18
|
+
deleteEnvironment(details: DeleteEnvironmentDetails): Promise<true>;
|
|
15
19
|
}
|
|
16
20
|
//# sourceMappingURL=graphql-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/environment/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,
|
|
1
|
+
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/environment/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAKlB,aAAa,EAIb,SAAS,EACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAElE,qBAAa,eAAgB,SAAQ,SAAS;CAAG;AAEjD,qBAAa,aAAc,YAAW,uBAAuB,EAAE,qBAAqB,EAAE,uBAAuB;IAC/F,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,iBAAiB,CAAC,OAAO,EAAE,qBAAqB;IAgDhD,eAAe,CAAC,OAAO,EAAE,sBAAsB;;;;;IAmC/C,kBAAkB,CAAC,OAAO,EAAE,6BAA6B;IAkBzD,iBAAiB,CAAC,OAAO,EAAE,wBAAwB;CAuDjE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GraphqlClient = exports.MissingAppError = void 0;
|
|
3
|
+
exports.GraphqlClient = exports.MissingAppError = exports.APP_HAS_INSTALLATIONS_CODE = void 0;
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
+
exports.APP_HAS_INSTALLATIONS_CODE = 'APP_HAS_INSTALLATIONS';
|
|
5
6
|
class MissingAppError extends cli_shared_1.UserError {
|
|
6
7
|
}
|
|
7
8
|
exports.MissingAppError = MissingAppError;
|
|
@@ -78,5 +79,61 @@ class GraphqlClient {
|
|
|
78
79
|
};
|
|
79
80
|
});
|
|
80
81
|
}
|
|
82
|
+
async deleteEnvironments(details) {
|
|
83
|
+
const results = [];
|
|
84
|
+
for (const environmentKey of details.environmentKeys) {
|
|
85
|
+
try {
|
|
86
|
+
const success = await this.deleteEnvironment(Object.assign(Object.assign({}, details), { environmentKey }));
|
|
87
|
+
results.push({ environmentKey, successful: success });
|
|
88
|
+
}
|
|
89
|
+
catch (err) {
|
|
90
|
+
results.push({ environmentKey, successful: false, error: err });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return results;
|
|
94
|
+
}
|
|
95
|
+
async deleteEnvironment(details) {
|
|
96
|
+
const mutation = `
|
|
97
|
+
mutation forge_cli_deleteEnvironment($input: DeleteAppEnvironmentInput!) {
|
|
98
|
+
ecosystem {
|
|
99
|
+
deleteAppEnvironment(input: $input) {
|
|
100
|
+
success
|
|
101
|
+
errors {
|
|
102
|
+
message
|
|
103
|
+
extensions {
|
|
104
|
+
errorType
|
|
105
|
+
statusCode
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
const { response: { ecosystem: { deleteAppEnvironment } }, requestId } = await this.graphqlClient.mutate(mutation, {
|
|
113
|
+
input: {
|
|
114
|
+
appAri: details.appId,
|
|
115
|
+
environmentKey: details.environmentKey
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
if (!deleteAppEnvironment) {
|
|
119
|
+
throw new cli_shared_1.GraphQlMutationError(`Unable to get a response (requestId: ${requestId || 'unknown'})`, {
|
|
120
|
+
requestId
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
const { success, errors } = deleteAppEnvironment;
|
|
124
|
+
const error = (0, cli_shared_1.getError)(errors);
|
|
125
|
+
let errorMessage = error.message;
|
|
126
|
+
if (error.code === exports.APP_HAS_INSTALLATIONS_CODE) {
|
|
127
|
+
errorMessage = cli_shared_1.Text.deleteEnvironment.hasInstallationError(details.environmentKey, cli_shared_1.environmentToOption);
|
|
128
|
+
}
|
|
129
|
+
if (!success) {
|
|
130
|
+
throw new cli_shared_1.GraphQlMutationError(`${errorMessage} (requestId: ${requestId || 'unknown'})`, {
|
|
131
|
+
requestId,
|
|
132
|
+
code: error.code,
|
|
133
|
+
statusCode: error.statusCode
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
return success;
|
|
137
|
+
}
|
|
81
138
|
}
|
|
82
139
|
exports.GraphqlClient = GraphqlClient;
|
|
@@ -33,7 +33,7 @@ export declare class MissingTaskIdError extends Error {
|
|
|
33
33
|
export declare class InstallationRequestFailedError extends BaseError {
|
|
34
34
|
private readonly userError;
|
|
35
35
|
readonly code?: string | undefined;
|
|
36
|
-
constructor(userError: boolean, code?: string | undefined, message?: string);
|
|
36
|
+
constructor(userError: boolean, code?: string | undefined, message?: string, requestId?: string | undefined);
|
|
37
37
|
isUserError(): boolean;
|
|
38
38
|
}
|
|
39
39
|
export declare class MissingAppError extends UserError {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/installations/graphql-client.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,sBAAsB,EAItB,aAAa,EACb,oBAAoB,EAMpB,KAAK,EAGL,SAAS,EACT,SAAS,EAEV,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EACL,yBAAyB,EACzB,YAAY,EACZ,0BAA0B,EAC1B,6BAA6B,EAC9B,MAAM,iCAAiC,CAAC;AACzC,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AC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC;IAoC7D,qBAAqB,CAAC,IAAI,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC;IAmB7F,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAKzD,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;YAS5E,sBAAsB;YAoCtB,mBAAmB;IAiBjC,OAAO,CAAC,yBAAyB;YAOnB,sBAAsB;YAoBtB,6BAA6B;YAmC7B,mBAAmB;IAsEpB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAyChH"}
|
|
@@ -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 {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawn } from 'cross-spawn';
|
|
2
|
-
import { HiddenError, PersonalApiCredentials, PersonalApiCredentialsValidated, UI } from '@forge/cli-shared';
|
|
2
|
+
import { HiddenError, PersonalApiCredentials, PersonalApiCredentialsValidated, UI, UserError } from '@forge/cli-shared';
|
|
3
3
|
import { StartTunnelCommand, TunnelInteractor } from '@forge/tunnel';
|
|
4
4
|
import { DockerService } from './docker-service';
|
|
5
5
|
import { ConfigFilePortFindingService } from './port-finding-service';
|
|
@@ -15,6 +15,9 @@ export declare class HiddenDockerTunnelError extends HiddenError {
|
|
|
15
15
|
export declare type TunnelService = {
|
|
16
16
|
run(tunnelOptions: TunnelOptions, creds: PersonalApiCredentialsValidated, debugEnabled: boolean, onError?: (err: Error) => Promise<void>): Promise<void>;
|
|
17
17
|
};
|
|
18
|
+
export declare class DebugNotSupportedError extends UserError {
|
|
19
|
+
constructor();
|
|
20
|
+
}
|
|
18
21
|
export declare class InProcessTunnelService implements TunnelService {
|
|
19
22
|
private readonly ui;
|
|
20
23
|
private readonly startTunnelCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tunnel-service.d.ts","sourceRoot":"","sources":["../../src/service/tunnel-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAMpC,OAAO,EAIL,WAAW,EACX,sBAAsB,EACtB,+BAA+B,
|
|
1
|
+
{"version":3,"file":"tunnel-service.d.ts","sourceRoot":"","sources":["../../src/service/tunnel-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAMpC,OAAO,EAIL,WAAW,EACX,sBAAsB,EACtB,+BAA+B,EAE/B,EAAE,EACF,SAAS,EACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGrE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAKD,eAAO,MAAM,cAAc,wBAAwB,CAAC;AAcpD,eAAO,MAAM,UAAU,QAEuB,CAAC;AAE/C,qBAAa,uBAAwB,SAAQ,WAAW;CAAG;AAE3D,oBAAY,aAAa,GAAG;IAC1B,GAAG,CACD,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,+BAA+B,EACtC,YAAY,EAAE,OAAO,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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DockerTunnelService = exports.LocalTunnelService = exports.InProcessTunnelService = exports.HiddenDockerTunnelError = exports.IMAGE_NAME = exports.CONTAINER_NAME = void 0;
|
|
3
|
+
exports.DockerTunnelService = exports.LocalTunnelService = exports.InProcessTunnelService = exports.DebugNotSupportedError = exports.HiddenDockerTunnelError = exports.IMAGE_NAME = exports.CONTAINER_NAME = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const cross_spawn_1 = require("cross-spawn");
|
|
6
6
|
const os_1 = tslib_1.__importDefault(require("os"));
|
|
@@ -31,6 +31,12 @@ exports.IMAGE_NAME = process.env.FORGE_DEV_DOCKER_TUNNEL
|
|
|
31
31
|
class HiddenDockerTunnelError extends cli_shared_1.HiddenError {
|
|
32
32
|
}
|
|
33
33
|
exports.HiddenDockerTunnelError = HiddenDockerTunnelError;
|
|
34
|
+
class DebugNotSupportedError extends cli_shared_1.UserError {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(cli_shared_1.Text.tunnel.inspectorUnsupported);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.DebugNotSupportedError = DebugNotSupportedError;
|
|
34
40
|
class InProcessTunnelService {
|
|
35
41
|
constructor(ui, startTunnelCommand, tunnelInteractor, configFilePortFindingService) {
|
|
36
42
|
this.ui = ui;
|
|
@@ -40,6 +46,9 @@ class InProcessTunnelService {
|
|
|
40
46
|
}
|
|
41
47
|
async run(tunnelOptions, creds, debugEnabled, onError) {
|
|
42
48
|
try {
|
|
49
|
+
if (tunnelOptions.debug === true) {
|
|
50
|
+
throw new DebugNotSupportedError();
|
|
51
|
+
}
|
|
43
52
|
const resourcePortMap = await this.configFilePortFindingService.findPorts();
|
|
44
53
|
const tunnel = await this.startTunnelCommand.execute({
|
|
45
54
|
environmentKey: tunnelOptions.environment || process.env.ENVIRONMENT_KEY || 'default',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.0-next.22",
|
|
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.
|
|
22
|
-
"@forge/cli-shared": "3.10
|
|
23
|
-
"@forge/egress": "1.1
|
|
24
|
-
"@forge/lint": "3.
|
|
25
|
-
"@forge/manifest": "4.
|
|
21
|
+
"@forge/bundler": "4.6.6-next.16",
|
|
22
|
+
"@forge/cli-shared": "3.11.0-next.10",
|
|
23
|
+
"@forge/egress": "1.2.0-next.1",
|
|
24
|
+
"@forge/lint": "3.3.0-next.15",
|
|
25
|
+
"@forge/manifest": "4.10.0-next.3",
|
|
26
26
|
"@forge/runtime": "4.3.2",
|
|
27
|
-
"@forge/tunnel": "3.3.
|
|
27
|
+
"@forge/tunnel": "3.3.5-next.17",
|
|
28
28
|
"@forge/util": "1.2.3",
|
|
29
29
|
"@sentry/node": "^7.29.0",
|
|
30
30
|
"ajv": "^6.12.6",
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
"dayjs": "^1.9.7",
|
|
40
40
|
"didyoumean": "^1.2.2",
|
|
41
41
|
"env-paths": "^2.2.1",
|
|
42
|
-
"form-data": "^3.0.
|
|
42
|
+
"form-data": "^3.0.1",
|
|
43
43
|
"fs-extra": "^8.1.0",
|
|
44
44
|
"hidefile": "^3.0.0",
|
|
45
45
|
"latest-version": "^5.1.0",
|
|
46
|
-
"lodash": "^4.17.
|
|
47
|
-
"mkdirp": "^1.0.
|
|
46
|
+
"lodash": "^4.17.21",
|
|
47
|
+
"mkdirp": "^1.0.4",
|
|
48
48
|
"node-fetch": "2.6.7",
|
|
49
49
|
"node-machine-id": "^1.1.12",
|
|
50
|
-
"omelette": "^0.4.
|
|
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",
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
"@types/jest": "^29.1.2",
|
|
69
69
|
"@types/js-yaml": "^3.12.2",
|
|
70
70
|
"@types/minimatch": "^3.0.5",
|
|
71
|
-
"@types/mkdirp": "^1.0.
|
|
71
|
+
"@types/mkdirp": "^1.0.2",
|
|
72
72
|
"@types/node": "14.18.42",
|
|
73
73
|
"@types/node-fetch": "^2.5.7",
|
|
74
|
-
"@types/omelette": "^0.4.
|
|
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",
|