@forge/tunnel 6.3.2-next.2 → 6.3.2-next.21

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,149 @@
1
1
  # @forge/tunnel
2
2
 
3
+ ## 6.3.2-next.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [9b1b358]
8
+ - @forge/cli-shared@8.9.0-next.17
9
+ - @forge/bundler@6.1.11-next.21
10
+
11
+ ## 6.3.2-next.20
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [9f537fe]
16
+ - @forge/cli-shared@8.9.0-next.16
17
+ - @forge/bundler@6.1.11-next.20
18
+
19
+ ## 6.3.2-next.19
20
+
21
+ ### Patch Changes
22
+
23
+ - @forge/bundler@6.1.11-next.19
24
+ - @forge/cli-shared@8.9.0-next.15
25
+
26
+ ## 6.3.2-next.18
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [16bf52e]
31
+ - @forge/cli-shared@8.9.0-next.14
32
+ - @forge/bundler@6.1.11-next.18
33
+
34
+ ## 6.3.2-next.17
35
+
36
+ ### Patch Changes
37
+
38
+ - @forge/bundler@6.1.11-next.17
39
+ - @forge/cli-shared@8.9.0-next.13
40
+
41
+ ## 6.3.2-next.16
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [118f8af]
46
+ - @forge/cli-shared@8.9.0-next.12
47
+ - @forge/bundler@6.1.11-next.16
48
+
49
+ ## 6.3.2-next.15
50
+
51
+ ### Patch Changes
52
+
53
+ - @forge/bundler@6.1.11-next.15
54
+ - @forge/cli-shared@8.9.0-next.11
55
+
56
+ ## 6.3.2-next.14
57
+
58
+ ### Patch Changes
59
+
60
+ - Updated dependencies [6ab8f99]
61
+ - @forge/cli-shared@8.9.0-next.10
62
+ - @forge/bundler@6.1.11-next.14
63
+
64
+ ## 6.3.2-next.13
65
+
66
+ ### Patch Changes
67
+
68
+ - @forge/bundler@6.1.11-next.13
69
+ - @forge/cli-shared@8.9.0-next.9
70
+
71
+ ## 6.3.2-next.12
72
+
73
+ ### Patch Changes
74
+
75
+ - @forge/bundler@6.1.11-next.12
76
+ - @forge/cli-shared@8.9.0-next.8
77
+
78
+ ## 6.3.2-next.11
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies [8cac1e4]
83
+ - @forge/csp@5.3.0-next.2
84
+ - @forge/bundler@6.1.11-next.11
85
+
86
+ ## 6.3.2-next.10
87
+
88
+ ### Patch Changes
89
+
90
+ - 49bbec0: Display local port by default when tunneling
91
+ - Updated dependencies [49bbec0]
92
+ - @forge/cli-shared@8.9.0-next.7
93
+ - @forge/bundler@6.1.11-next.10
94
+
95
+ ## 6.3.2-next.9
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies [5efbe5a]
100
+ - @forge/cli-shared@8.9.0-next.6
101
+ - @forge/bundler@6.1.11-next.9
102
+
103
+ ## 6.3.2-next.8
104
+
105
+ ### Patch Changes
106
+
107
+ - ef033a5: support container identity when tunneling
108
+ - Updated dependencies [ef033a5]
109
+ - @forge/cli-shared@8.8.2-next.5
110
+ - @forge/bundler@6.1.11-next.8
111
+
112
+ ## 6.3.2-next.7
113
+
114
+ ### Patch Changes
115
+
116
+ - @forge/bundler@6.1.11-next.7
117
+ - @forge/cli-shared@8.8.2-next.4
118
+
119
+ ## 6.3.2-next.6
120
+
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies [ee02b2c]
124
+ - @forge/csp@5.3.0-next.1
125
+ - @forge/bundler@6.1.11-next.6
126
+
127
+ ## 6.3.2-next.5
128
+
129
+ ### Patch Changes
130
+
131
+ - @forge/bundler@6.1.11-next.5
132
+ - @forge/cli-shared@8.8.2-next.3
133
+
134
+ ## 6.3.2-next.4
135
+
136
+ ### Patch Changes
137
+
138
+ - @forge/bundler@6.1.11-next.4
139
+
140
+ ## 6.3.2-next.3
141
+
142
+ ### Patch Changes
143
+
144
+ - @forge/bundler@6.1.11-next.3
145
+ - @forge/cli-shared@8.8.2-next.2
146
+
3
147
  ## 6.3.2-next.2
4
148
 
5
149
  ### Patch Changes
@@ -17,7 +17,7 @@ class TunnelInteractor {
17
17
  }
18
18
  logTunnelStatus(localPort, tunnelOptions) {
19
19
  this.logger.info('');
20
- this.logger.info(cli_shared_1.Text.tunnel.startedServer(localPort, this.logger.debugEnabled) + '\n');
20
+ this.logger.info(cli_shared_1.Text.tunnel.startedServer(localPort) + '\n');
21
21
  if (tunnelOptions.url) {
22
22
  this.logger.warn(cli_shared_1.Text.tunnel.selfManagedTunnel(tunnelOptions.url, localPort));
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tunnel-graphql-client.d.ts","sourceRoot":"","sources":["../../src/graphql/tunnel-graphql-client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,EACL,aAAa,EAGb,oBAAoB,EAGpB,kBAAkB,EAClB,cAAc,EACf,MAAM,mBAAmB,CAAC;AAY3B,qBAAa,sBAAuB,SAAQ,oBAAqB,YAAW,kBAAkB;IAC5F,OAAO,CAAC,MAAM,CAAC,cAAc,CAAqD;IAClF,OAAO,CAAC,SAAS,CAAC,CAAS;gBAGzB,OAAO,EAAE,MAAM,EACf,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;QAAE,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;IAMjG,aAAa,IAAI,cAAc;IAK/B,WAAW,IAAI,OAAO;CAG9B;AAWD,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,QAAQ,CAAC,EAAE;QACT,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,GAAG,CAAC;KAChB,EAAE,CAAC;CACL;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EA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cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IA2DxE,gBAAgB,CACpB,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,MAAM,EACtB,iBAAiB,EAAE,iBAAiB,GACnC,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IA0C/B,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAsC1E"}
@@ -1,18 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TunnelGraphqlClient = exports.RegisterAppTunnelError = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const cli_shared_1 = require("@forge/cli-shared");
5
- const cli_shared_2 = require("@forge/cli-shared");
6
+ const path_1 = tslib_1.__importDefault(require("path"));
7
+ const fs_1 = tslib_1.__importDefault(require("fs"));
6
8
  class CreateAppTunnelError extends cli_shared_1.GraphQlMutationError {
7
9
  constructor(message, { requestId, code, statusCode }) {
8
- super(cli_shared_2.Text.tunnel.error.create(message), { requestId, code, statusCode });
10
+ super(cli_shared_1.Text.tunnel.error.create(message), { requestId, code, statusCode });
9
11
  }
10
12
  }
11
13
  class RegisterAppTunnelError extends cli_shared_1.GraphQlMutationError {
12
14
  static userErrorCodes = ['ENVIRONMENT_MISMATCH', 'ENVIRONMENT_NOT_FOUND'];
13
15
  errorCode;
14
16
  constructor(message, { requestId, code, statusCode }) {
15
- super(cli_shared_2.Text.tunnel.error.create(message), { requestId, code, statusCode });
17
+ super(cli_shared_1.Text.tunnel.error.create(message), { requestId, code, statusCode });
16
18
  this.errorCode = code;
17
19
  }
18
20
  getAttributes() {
@@ -27,7 +29,7 @@ class RegisterAppTunnelError extends cli_shared_1.GraphQlMutationError {
27
29
  exports.RegisterAppTunnelError = RegisterAppTunnelError;
28
30
  class DeleteAppTunnelError extends cli_shared_1.GraphQlMutationError {
29
31
  constructor(message, { requestId, code, statusCode }) {
30
- super(cli_shared_2.Text.tunnel.error.delete(message), { requestId, code, statusCode });
32
+ super(cli_shared_1.Text.tunnel.error.delete(message), { requestId, code, statusCode });
31
33
  }
32
34
  }
33
35
  class TunnelGraphqlClient {
@@ -50,10 +52,11 @@ class TunnelGraphqlClient {
50
52
  tunnelId
51
53
  tunnelToken
52
54
  tunnelUrl
55
+ tunnelK8AuthToken
53
56
  }
54
57
  }
55
58
  `;
56
- const { response: { registerTunnel: { success, errors, tunnelId, tunnelToken, tunnelUrl } }, requestId } = await this.graphqlClient.mutate(mutation, {
59
+ const { response: { registerTunnel: { success, errors, tunnelId, tunnelToken, tunnelUrl, tunnelK8AuthToken } }, requestId } = await this.graphqlClient.mutate(mutation, {
57
60
  input: {
58
61
  appId,
59
62
  environmentKey
@@ -67,6 +70,13 @@ class TunnelGraphqlClient {
67
70
  statusCode: error.statusCode
68
71
  });
69
72
  }
73
+ if (tunnelK8AuthToken) {
74
+ const k8sAuthTokenPath = path_1.default.join(process.cwd(), cli_shared_1.CONTAINER_SERVICE_ASSETS, cli_shared_1.K8S_AUTH_TOKEN_FILENAME);
75
+ if (!fs_1.default.existsSync(path_1.default.dirname(k8sAuthTokenPath))) {
76
+ fs_1.default.mkdirSync(path_1.default.dirname(k8sAuthTokenPath), { recursive: true });
77
+ }
78
+ fs_1.default.writeFileSync(k8sAuthTokenPath, tunnelK8AuthToken);
79
+ }
70
80
  return {
71
81
  id: tunnelId,
72
82
  token: tunnelToken,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/tunnel",
3
- "version": "6.3.2-next.2",
3
+ "version": "6.3.2-next.21",
4
4
  "description": "Tunnel functionality for Forge CLI",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -11,9 +11,9 @@
11
11
  "compile": "tsc -b -v"
12
12
  },
13
13
  "dependencies": {
14
- "@forge/bundler": "6.1.11-next.2",
15
- "@forge/cli-shared": "8.8.2-next.1",
16
- "@forge/csp": "5.3.0-next.0",
14
+ "@forge/bundler": "6.1.11-next.21",
15
+ "@forge/cli-shared": "8.9.0-next.17",
16
+ "@forge/csp": "5.3.0-next.2",
17
17
  "@forge/runtime": "6.1.1",
18
18
  "@forge/util": "^2.0.1",
19
19
  "cheerio": "^1.1.0",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@atlassian/xen-test-util": "^4.2.0",
36
- "@forge/manifest": "11.0.0-next.0",
36
+ "@forge/manifest": "11.0.0-next.8",
37
37
  "@types/express": "^4.17.21",
38
38
  "@types/jest": "^29.5.14",
39
39
  "@types/node": "20.19.1",