@forge/tunnel 1.9.1-next.1 → 2.0.0-next.4

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 CHANGED
@@ -1,5 +1,37 @@
1
1
  # @forge/tunnel
2
2
 
3
+ ## 2.0.0-next.4
4
+
5
+ ### Minor Changes
6
+
7
+ - 35172f2: Add ngrok debug logs
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [35172f2]
12
+ - @forge/cli-shared@3.0.0-next.2
13
+ - @forge/bundler@3.0.12-next.2
14
+
15
+ ## 2.0.0-next.3
16
+
17
+ ### Patch Changes
18
+
19
+ - @forge/cli-shared@3.0.0-next.1
20
+ - @forge/bundler@3.0.12-next.1
21
+
22
+ ## 2.0.0-next.2
23
+
24
+ ### Major Changes
25
+
26
+ - 5972825c: Refuse to store credentials in plaintext
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [edab85a5]
31
+ - Updated dependencies [5972825c]
32
+ - @forge/cli-shared@3.0.0-next.0
33
+ - @forge/bundler@3.0.12-next.0
34
+
3
35
  ## 1.9.1-next.1
4
36
 
5
37
  ### Patch Changes
@@ -0,0 +1 @@
1
+ log_level: debug
package/out/index.js CHANGED
@@ -14,7 +14,7 @@ const fileWriter = new cli_shared_1.FileSystemWriter();
14
14
  const configFile = new cli_shared_1.ConfigFile(fileReader, fileWriter);
15
15
  const appConfigReader = cli_shared_1.configFileReaderForSection(cli_shared_1.appConfigKey, cli_shared_1.appConfigShape, configFile);
16
16
  const assertiveAppConfigReader = cli_shared_1.assertiveAppConfigProvider(appConfigReader);
17
- const credentialsGetter = cli_shared_1.getCredentialsStoreProvider(ui);
17
+ const credentialsGetter = cli_shared_1.getCredentialStore(ui);
18
18
  const authenticator = new cli_shared_1.PersonalTokenAuthenticator(credentialsGetter);
19
19
  const createGraphQLClient = (auth) => {
20
20
  const minimalGraphQLRunner = new cli_shared_1.MinimalGraphQLRunner(auth, graphqlGateway, tunnelling_1.getCliDetails());
@@ -1 +1 @@
1
- {"version":3,"file":"create-tunnel-service.d.ts","sourceRoot":"","sources":["../../../src/tunnelling/services/create-tunnel-service.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,mBAAmB;IAClC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAQD,qBAAa,wBAAyB,YAAW,mBAAmB;IAGtD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,QAAQ,CAAqB;gBAER,MAAM,EAAE,MAAM;IAE9B,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAU3C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;CAkB1C"}
1
+ {"version":3,"file":"create-tunnel-service.d.ts","sourceRoot":"","sources":["../../../src/tunnelling/services/create-tunnel-service.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAIjD,MAAM,WAAW,mBAAmB;IAClC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAQD,qBAAa,wBAAyB,YAAW,mBAAmB;IAGtD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,QAAQ,CAAqB;gBAER,MAAM,EAAE,MAAM;IAE9B,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAyB3C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;CAkB1C"}
@@ -5,6 +5,8 @@ const tslib_1 = require("tslib");
5
5
  const ngrok = tslib_1.__importStar(require("ngrok"));
6
6
  const url_1 = require("url");
7
7
  const cli_shared_1 = require("@forge/cli-shared");
8
+ const fs_1 = require("fs");
9
+ const path_1 = tslib_1.__importDefault(require("path"));
8
10
  class NgrokError extends Error {
9
11
  constructor() {
10
12
  super(cli_shared_1.Text.tunnel.error.ngrok);
@@ -15,8 +17,22 @@ class NgrokCreateTunnelService {
15
17
  this.logger = logger;
16
18
  }
17
19
  async establishTunnel(port) {
20
+ const configDir = process.env.CONFIG_DIR
21
+ ? process.env.CONFIG_DIR
22
+ : path_1.default.join(__dirname, '..', '..', '..', 'config');
23
+ const configFile = `${configDir}/ngrok.yml`;
18
24
  try {
19
- this.endpoint = await ngrok.connect(port);
25
+ const options = {
26
+ addr: port,
27
+ configPath: fs_1.existsSync(configFile) ? configFile : '',
28
+ onStatusChange: (status) => {
29
+ this.logger.debug(cli_shared_1.Text.tunnel.tunnelStatusChange(status));
30
+ },
31
+ onLogEvent: (data) => {
32
+ this.logger.debug(`${data}`);
33
+ }
34
+ };
35
+ this.endpoint = await ngrok.connect(options);
20
36
  this.logger.debug(cli_shared_1.Text.tunnel.startedTunnel(this.endpoint));
21
37
  return new url_1.URL(this.endpoint);
22
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/tunnel",
3
- "version": "1.9.1-next.1",
3
+ "version": "2.0.0-next.4",
4
4
  "description": "Tunnel functionality for Forge CLI",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
@@ -16,8 +16,8 @@
16
16
  "postbuild": "chmod +x out/*.js"
17
17
  },
18
18
  "dependencies": {
19
- "@forge/bundler": "3.0.11",
20
- "@forge/cli-shared": "2.6.2",
19
+ "@forge/bundler": "3.0.12-next.2",
20
+ "@forge/cli-shared": "3.0.0-next.2",
21
21
  "@forge/csp": "^1.11.0",
22
22
  "@forge/isolated-vm": "3.3.10",
23
23
  "@forge/runtime": "2.3.0-next.1",
@@ -31,7 +31,7 @@
31
31
  "uuid": "^3.4.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@forge/manifest": "^4.0.0",
34
+ "@forge/manifest": "^4.1.0-next.0",
35
35
  "@types/express": "^4.17.2",
36
36
  "@types/express-mung": "^0.5.2",
37
37
  "@types/jest": "^26.0.0",
@@ -42,8 +42,5 @@
42
42
  "@types/uuid": "^3.4.7",
43
43
  "node-fetch": "2.6.1",
44
44
  "supertest": "^6.1.3"
45
- },
46
- "optionalDependencies": {
47
- "keytar": "^7.0.0"
48
45
  }
49
46
  }