@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.
Files changed (36) hide show
  1. package/CHANGELOG.md +147 -0
  2. package/npm-shrinkwrap.json +107 -377
  3. package/out/command-line/command.d.ts.map +1 -1
  4. package/out/command-line/command.js +1 -1
  5. package/out/command-line/controller/default-environment-controller.js +1 -1
  6. package/out/command-line/controller/settings-controller.d.ts +1 -1
  7. package/out/command-line/controller/settings-controller.d.ts.map +1 -1
  8. package/out/command-line/controller/settings-controller.js +1 -23
  9. package/out/command-line/controller/tunnel-controller.d.ts +2 -3
  10. package/out/command-line/controller/tunnel-controller.d.ts.map +1 -1
  11. package/out/command-line/controller/tunnel-controller.js +2 -5
  12. package/out/command-line/dependency-injection.d.ts.map +1 -1
  13. package/out/command-line/dependency-injection.js +6 -6
  14. package/out/command-line/view/tunnel-view.d.ts +1 -1
  15. package/out/command-line/view/tunnel-view.d.ts.map +1 -1
  16. package/out/command-line/view/tunnel-view.js +2 -2
  17. package/out/installations/graphql-client.d.ts +0 -3
  18. package/out/installations/graphql-client.d.ts.map +1 -1
  19. package/out/installations/graphql-client.js +4 -17
  20. package/out/installations/site-translation/bitbucket.d.ts +4 -3
  21. package/out/installations/site-translation/bitbucket.d.ts.map +1 -1
  22. package/out/installations/site-translation/cloudid-products.d.ts +4 -4
  23. package/out/installations/site-translation/cloudid-products.d.ts.map +1 -1
  24. package/out/installations/site-translation/cloudid-products.js +6 -5
  25. package/out/installations/site-translation/site-translation.d.ts +3 -5
  26. package/out/installations/site-translation/site-translation.d.ts.map +1 -1
  27. package/out/service/cached-config-service.d.ts +0 -2
  28. package/out/service/cached-config-service.d.ts.map +1 -1
  29. package/out/service/cached-config-service.js +0 -7
  30. package/out/service/tunnel-analytics-service.d.ts +2 -3
  31. package/out/service/tunnel-analytics-service.d.ts.map +1 -1
  32. package/out/service/tunnel-analytics-service.js +2 -4
  33. package/out/service/tunnel-service.d.ts +4 -10
  34. package/out/service/tunnel-service.d.ts.map +1 -1
  35. package/out/service/tunnel-service.js +6 -38
  36. 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
- featureFlagService;
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
- featureFlagService;
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
- featureFlagService;
187
- constructor(configFilePortFindingService, cachedConfigService, dockerService, analyticsService, featureFlagService) {
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.4.1",
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.17.5",
22
- "@forge/cli-shared": "5.3.2",
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.1",
25
- "@forge/manifest": "7.5.3",
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.3.4",
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",