@forge/cli 10.4.1 → 10.5.0-next.11
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 +147 -0
- package/npm-shrinkwrap.json +107 -377
- package/out/command-line/command.d.ts.map +1 -1
- package/out/command-line/command.js +1 -1
- package/out/command-line/controller/default-environment-controller.js +1 -1
- package/out/command-line/controller/settings-controller.d.ts +1 -1
- package/out/command-line/controller/settings-controller.d.ts.map +1 -1
- package/out/command-line/controller/settings-controller.js +1 -23
- package/out/command-line/controller/tunnel-controller.d.ts +2 -3
- package/out/command-line/controller/tunnel-controller.d.ts.map +1 -1
- package/out/command-line/controller/tunnel-controller.js +2 -5
- package/out/command-line/dependency-injection.d.ts.map +1 -1
- package/out/command-line/dependency-injection.js +6 -6
- package/out/command-line/view/tunnel-view.d.ts +1 -1
- package/out/command-line/view/tunnel-view.d.ts.map +1 -1
- package/out/command-line/view/tunnel-view.js +2 -2
- package/out/installations/graphql-client.d.ts +0 -3
- package/out/installations/graphql-client.d.ts.map +1 -1
- package/out/installations/graphql-client.js +4 -17
- package/out/installations/site-translation/bitbucket.d.ts +4 -3
- package/out/installations/site-translation/bitbucket.d.ts.map +1 -1
- package/out/installations/site-translation/cloudid-products.d.ts +4 -4
- package/out/installations/site-translation/cloudid-products.d.ts.map +1 -1
- package/out/installations/site-translation/cloudid-products.js +6 -5
- package/out/installations/site-translation/site-translation.d.ts +3 -5
- package/out/installations/site-translation/site-translation.d.ts.map +1 -1
- package/out/service/cached-config-service.d.ts +0 -2
- package/out/service/cached-config-service.d.ts.map +1 -1
- package/out/service/cached-config-service.js +0 -7
- package/out/service/tunnel-analytics-service.d.ts +2 -3
- package/out/service/tunnel-analytics-service.d.ts.map +1 -1
- package/out/service/tunnel-analytics-service.js +2 -4
- package/out/service/tunnel-service.d.ts +4 -10
- package/out/service/tunnel-service.d.ts.map +1 -1
- package/out/service/tunnel-service.js +6 -38
- package/package.json +6 -6
|
@@ -12,7 +12,6 @@ const cli_shared_1 = require("@forge/cli-shared");
|
|
|
12
12
|
const version_info_1 = require("../command-line/version-info");
|
|
13
13
|
const DISABLE_TTY = process.env.DISABLE_TTY === 'true';
|
|
14
14
|
exports.CONTAINER_NAME = `forge-tunnel-docker-${process.pid}`;
|
|
15
|
-
const PATH_DOCKER_NGROK_CONFIG = '/opt/provided-ngrok-config.yml';
|
|
16
15
|
const cliDetails = (0, version_info_1.getCLIDetails)();
|
|
17
16
|
let versionTags;
|
|
18
17
|
if (cliDetails?.version !== undefined) {
|
|
@@ -46,13 +45,6 @@ class TunnelServiceBase {
|
|
|
46
45
|
constructor(cachedConfigService) {
|
|
47
46
|
this.cachedConfigService = cachedConfigService;
|
|
48
47
|
}
|
|
49
|
-
ngrokConfigPath() {
|
|
50
|
-
const path = this.cachedConfigService.getNgrokConfigPath();
|
|
51
|
-
if (!path) {
|
|
52
|
-
throw new cli_shared_1.UserError(cli_shared_1.Text.tunnel.error.noNgrokConfig);
|
|
53
|
-
}
|
|
54
|
-
return path;
|
|
55
|
-
}
|
|
56
48
|
}
|
|
57
49
|
class InProcessTunnelService extends TunnelServiceBase {
|
|
58
50
|
ui;
|
|
@@ -60,27 +52,21 @@ class InProcessTunnelService extends TunnelServiceBase {
|
|
|
60
52
|
tunnelInteractor;
|
|
61
53
|
configFilePortFindingService;
|
|
62
54
|
analyticsService;
|
|
63
|
-
|
|
64
|
-
constructor(ui, startTunnelCommand, tunnelInteractor, configFilePortFindingService, cachedConfigService, analyticsService, featureFlagService) {
|
|
55
|
+
constructor(ui, startTunnelCommand, tunnelInteractor, configFilePortFindingService, cachedConfigService, analyticsService) {
|
|
65
56
|
super(cachedConfigService);
|
|
66
57
|
this.ui = ui;
|
|
67
58
|
this.startTunnelCommand = startTunnelCommand;
|
|
68
59
|
this.tunnelInteractor = tunnelInteractor;
|
|
69
60
|
this.configFilePortFindingService = configFilePortFindingService;
|
|
70
61
|
this.analyticsService = analyticsService;
|
|
71
|
-
this.featureFlagService = featureFlagService;
|
|
72
62
|
}
|
|
73
63
|
async run(tunnelOptions, creds, debugEnabled, onError) {
|
|
74
64
|
try {
|
|
75
65
|
const resourcePortMap = await this.configFilePortFindingService.findPorts();
|
|
76
|
-
const ngrokConfig = (await this.featureFlagService.isCloudflareTunnelEnabled())
|
|
77
|
-
? undefined
|
|
78
|
-
: this.ngrokConfigPath();
|
|
79
66
|
const tunnel = await this.startTunnelCommand.execute({
|
|
80
67
|
environmentKey: tunnelOptions.environment || process.env.ENVIRONMENT_KEY || 'default',
|
|
81
68
|
resourcePortMap,
|
|
82
|
-
host: 'localhost'
|
|
83
|
-
ngrokConfig
|
|
69
|
+
host: 'localhost'
|
|
84
70
|
});
|
|
85
71
|
const monitor = await this.tunnelInteractor.watchApp(tunnel, tunnelOptions);
|
|
86
72
|
const manifestFileWatcher = this.tunnelInteractor.watchAndWarnOnManifestChanges(manifest_1.MANIFEST_FILE);
|
|
@@ -101,18 +87,13 @@ exports.InProcessTunnelService = InProcessTunnelService;
|
|
|
101
87
|
class SandboxTunnelServiceBase extends TunnelServiceBase {
|
|
102
88
|
configFilePortFindingService;
|
|
103
89
|
cachedConfigService;
|
|
104
|
-
|
|
105
|
-
constructor(configFilePortFindingService, cachedConfigService, featureFlagService) {
|
|
90
|
+
constructor(configFilePortFindingService, cachedConfigService) {
|
|
106
91
|
super(cachedConfigService);
|
|
107
92
|
this.configFilePortFindingService = configFilePortFindingService;
|
|
108
93
|
this.cachedConfigService = cachedConfigService;
|
|
109
|
-
this.featureFlagService = featureFlagService;
|
|
110
94
|
}
|
|
111
95
|
async getTunnelProcessEnvironment(tunnelOptions, debugEnabled, { email, token }, port, cspReporterPort, resourcePorts) {
|
|
112
96
|
const graphqlGateway = (0, cli_shared_1.getGraphqlGateway)();
|
|
113
|
-
const ngrokConfig = (await this.featureFlagService.isCloudflareTunnelEnabled())
|
|
114
|
-
? []
|
|
115
|
-
: this.getNgrokConfigEnvironment();
|
|
116
97
|
return [
|
|
117
98
|
{ key: 'APP_FOLDER', value: '/app' },
|
|
118
99
|
{ key: 'FORGE_EMAIL', value: email },
|
|
@@ -125,16 +106,12 @@ class SandboxTunnelServiceBase extends TunnelServiceBase {
|
|
|
125
106
|
...this.getInspectorPortEnvironment(port),
|
|
126
107
|
...this.getCspReporterPortEnvironment(cspReporterPort),
|
|
127
108
|
...this.getResourcePortEnvironment(resourcePorts),
|
|
128
|
-
...this.getUserEnvironmentVariables()
|
|
129
|
-
...ngrokConfig
|
|
109
|
+
...this.getUserEnvironmentVariables()
|
|
130
110
|
];
|
|
131
111
|
}
|
|
132
112
|
getInspectorPortEnvironment(port) {
|
|
133
113
|
return [{ key: 'TUNNEL_INSPECTOR_PORT', value: port.toString() }];
|
|
134
114
|
}
|
|
135
|
-
getNgrokConfigEnvironment() {
|
|
136
|
-
return [{ key: 'NGROK_CONFIG', value: this.ngrokConfigPath() }];
|
|
137
|
-
}
|
|
138
115
|
getCspReporterPortEnvironment(cspReporterPort) {
|
|
139
116
|
if (cspReporterPort) {
|
|
140
117
|
return [{ key: 'CSP_REPORTER_PORT', value: cspReporterPort.toString() }];
|
|
@@ -183,12 +160,10 @@ exports.LocalTunnelService = LocalTunnelService;
|
|
|
183
160
|
class DockerTunnelService extends SandboxTunnelServiceBase {
|
|
184
161
|
dockerService;
|
|
185
162
|
analyticsService;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
super(configFilePortFindingService, cachedConfigService, featureFlagService);
|
|
163
|
+
constructor(configFilePortFindingService, cachedConfigService, dockerService, analyticsService) {
|
|
164
|
+
super(configFilePortFindingService, cachedConfigService);
|
|
189
165
|
this.dockerService = dockerService;
|
|
190
166
|
this.analyticsService = analyticsService;
|
|
191
|
-
this.featureFlagService = featureFlagService;
|
|
192
167
|
}
|
|
193
168
|
async run(tunnelOptions, creds, debugEnabled) {
|
|
194
169
|
await this.validateDockerVersion(creds, debugEnabled);
|
|
@@ -265,7 +240,6 @@ class DockerTunnelService extends SandboxTunnelServiceBase {
|
|
|
265
240
|
if (process.env.FORGE_DEV_DOCKER_TUNNEL) {
|
|
266
241
|
const monorepoRoot = (0, path_1.join)(__dirname, '../../../..');
|
|
267
242
|
options.push(`-v=${monorepoRoot}:/monorepo:cached`);
|
|
268
|
-
options.push(`-v=${monorepoRoot}/node_modules/ngrok/docker-bin:/monorepo/node_modules/ngrok/bin`);
|
|
269
243
|
options.push(`-v=${monorepoRoot}/node_modules/cloudflared/docker-bin:/monorepo/node_modules/cloudflared/bin`);
|
|
270
244
|
}
|
|
271
245
|
if (process.env.FORGE_TUNNEL_MOUNT_DIRECTORIES) {
|
|
@@ -274,14 +248,8 @@ class DockerTunnelService extends SandboxTunnelServiceBase {
|
|
|
274
248
|
options.push(`-v=${mount}:cached`);
|
|
275
249
|
});
|
|
276
250
|
}
|
|
277
|
-
if (!(await this.featureFlagService.isCloudflareTunnelEnabled())) {
|
|
278
|
-
options.push('--mount', `type=bind,source=${this.ngrokConfigPath()},target=${PATH_DOCKER_NGROK_CONFIG}`);
|
|
279
|
-
}
|
|
280
251
|
return options;
|
|
281
252
|
}
|
|
282
|
-
getNgrokConfigEnvironment() {
|
|
283
|
-
return [{ key: 'NGROK_CONFIG', value: PATH_DOCKER_NGROK_CONFIG }];
|
|
284
|
-
}
|
|
285
253
|
async getCommonOptions() {
|
|
286
254
|
return ['--rm', `--name`, exports.CONTAINER_NAME, '--platform', 'linux/amd64'];
|
|
287
255
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.5.0-next.11",
|
|
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 \"fs.existsSync('./out/bin/postinstall.js') && require('./out/bin/postinstall.js')\""
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@forge/bundler": "4.
|
|
22
|
-
"@forge/cli-shared": "5.
|
|
21
|
+
"@forge/bundler": "4.18.0-next.10",
|
|
22
|
+
"@forge/cli-shared": "5.4.0-next.9",
|
|
23
23
|
"@forge/egress": "1.2.13",
|
|
24
|
-
"@forge/lint": "5.3.
|
|
25
|
-
"@forge/manifest": "7.
|
|
24
|
+
"@forge/lint": "5.3.2-next.9",
|
|
25
|
+
"@forge/manifest": "7.6.0-next.6",
|
|
26
26
|
"@forge/runtime": "5.10.1",
|
|
27
|
-
"@forge/tunnel": "5.
|
|
27
|
+
"@forge/tunnel": "5.4.0-next.11",
|
|
28
28
|
"@forge/util": "1.4.4",
|
|
29
29
|
"@sentry/node": "7.100.1",
|
|
30
30
|
"ajv": "^8.12.0",
|