@forge/tunnel 6.3.2-next.7-experimental-4cf7fd3 → 6.3.2-next.8
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,16 +1,13 @@
|
|
|
1
1
|
# @forge/tunnel
|
|
2
2
|
|
|
3
|
-
## 6.3.2-next.
|
|
3
|
+
## 6.3.2-next.8
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- Updated dependencies [
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- @forge/csp@5.3.0-next.1-experimental-4cf7fd3
|
|
12
|
-
- @forge/cli-shared@8.8.2-next.4-experimental-4cf7fd3
|
|
13
|
-
- @forge/bundler@6.1.11-next.7-experimental-4cf7fd3
|
|
7
|
+
- ef033a5: support container identity when tunneling
|
|
8
|
+
- Updated dependencies [ef033a5]
|
|
9
|
+
- @forge/cli-shared@8.8.2-next.5
|
|
10
|
+
- @forge/bundler@6.1.11-next.8
|
|
14
11
|
|
|
15
12
|
## 6.3.2-next.7
|
|
16
13
|
|
|
@@ -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,
|
|
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,EAIf,MAAM,mBAAmB,CAAC;AAa3B,qBAAa,sBAAuB,SAAQ,oBAAqB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c,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
|
|
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(
|
|
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(
|
|
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(
|
|
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.
|
|
3
|
+
"version": "6.3.2-next.8",
|
|
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.
|
|
15
|
-
"@forge/cli-shared": "8.8.2-next.
|
|
16
|
-
"@forge/csp": "5.3.0-next.1
|
|
14
|
+
"@forge/bundler": "6.1.11-next.8",
|
|
15
|
+
"@forge/cli-shared": "8.8.2-next.5",
|
|
16
|
+
"@forge/csp": "5.3.0-next.1",
|
|
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.3
|
|
36
|
+
"@forge/manifest": "11.0.0-next.3",
|
|
37
37
|
"@types/express": "^4.17.21",
|
|
38
38
|
"@types/jest": "^29.5.14",
|
|
39
39
|
"@types/node": "20.19.1",
|