@forge/tunnel 5.10.5-next.2 → 5.11.0-next.10-experimental-76b1041
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 +90 -0
- package/out/sandbox/node-sandbox.d.ts.map +1 -1
- package/out/sandbox/node-sandbox.js +2 -1
- package/out/servers/custom-ui-tunnel-server.d.ts.map +1 -1
- package/out/servers/dev-server.d.ts +3 -0
- package/out/servers/dev-server.d.ts.map +1 -1
- package/out/servers/dev-server.js +26 -0
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,95 @@
|
|
|
1
1
|
# @forge/tunnel
|
|
2
2
|
|
|
3
|
+
## 5.11.0-next.10-experimental-76b1041
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 30d2f61: Add forge container tunnel MVP
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 3af315d: Use .cjs extension for the single wrapper
|
|
12
|
+
- 1f8d16f: Update node dev types
|
|
13
|
+
- Updated dependencies [95349f5]
|
|
14
|
+
- Updated dependencies [27be197]
|
|
15
|
+
- Updated dependencies [a23892e]
|
|
16
|
+
- Updated dependencies [27f557d]
|
|
17
|
+
- Updated dependencies [b011fe9]
|
|
18
|
+
- Updated dependencies [3b2ffa9]
|
|
19
|
+
- Updated dependencies [3af315d]
|
|
20
|
+
- Updated dependencies [7c02425]
|
|
21
|
+
- Updated dependencies [3b2ffa9]
|
|
22
|
+
- Updated dependencies [1f8d16f]
|
|
23
|
+
- Updated dependencies [30d2f61]
|
|
24
|
+
- @forge/bundler@4.23.2-next.10-experimental-76b1041
|
|
25
|
+
- @forge/csp@3.9.0-next.0-experimental-76b1041
|
|
26
|
+
- @forge/cli-shared@7.0.0-next.9-experimental-76b1041
|
|
27
|
+
- @forge/runtime@5.10.8-experimental-76b1041
|
|
28
|
+
|
|
29
|
+
## 5.11.0-next.10
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- @forge/bundler@4.23.2-next.10
|
|
34
|
+
- @forge/cli-shared@7.0.0-next.9
|
|
35
|
+
|
|
36
|
+
## 5.11.0-next.9
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- @forge/bundler@4.23.2-next.9
|
|
41
|
+
- @forge/cli-shared@7.0.0-next.8
|
|
42
|
+
|
|
43
|
+
## 5.11.0-next.8
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- @forge/bundler@4.23.2-next.8
|
|
48
|
+
- @forge/cli-shared@7.0.0-next.7
|
|
49
|
+
|
|
50
|
+
## 5.11.0-next.7
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- @forge/bundler@4.23.2-next.7
|
|
55
|
+
- @forge/cli-shared@7.0.0-next.6
|
|
56
|
+
|
|
57
|
+
## 5.11.0-next.6
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Updated dependencies [27f557d]
|
|
62
|
+
- @forge/cli-shared@7.0.0-next.5
|
|
63
|
+
- @forge/bundler@4.23.2-next.6
|
|
64
|
+
|
|
65
|
+
## 5.11.0-next.5
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- 3af315d: Use .cjs extension for the single wrapper
|
|
70
|
+
- Updated dependencies [3af315d]
|
|
71
|
+
- @forge/cli-shared@7.0.0-next.4
|
|
72
|
+
- @forge/bundler@4.23.2-next.5
|
|
73
|
+
|
|
74
|
+
## 5.11.0-next.4
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- @forge/bundler@4.23.2-next.4
|
|
79
|
+
- @forge/cli-shared@7.0.0-next.3
|
|
80
|
+
|
|
81
|
+
## 5.11.0-next.3
|
|
82
|
+
|
|
83
|
+
### Minor Changes
|
|
84
|
+
|
|
85
|
+
- 30d2f61: Add forge container tunnel MVP
|
|
86
|
+
|
|
87
|
+
### Patch Changes
|
|
88
|
+
|
|
89
|
+
- Updated dependencies [30d2f61]
|
|
90
|
+
- @forge/cli-shared@7.0.0-next.2
|
|
91
|
+
- @forge/bundler@4.23.2-next.3
|
|
92
|
+
|
|
3
93
|
## 5.10.5-next.2
|
|
4
94
|
|
|
5
95
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox/node-sandbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox/node-sandbox.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,aAAa,EACb,SAAS,EAIV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,qBAAa,WAAY,YAAW,OAAO;IAOvC,OAAO,CAAC,QAAQ,CAAC,cAAc;IANjC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkD;gBAG1E,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,aAAa,EACtC,cAAc,EAAE,cAAc;IAmDjD,OAAO,CAAC,YAAY;IAOd,OAAO,CACX,oBAAoB,EAAE,oBAAoB,EAC1C,gBAAgB,EAAE,aAAa,EAC/B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAChC,OAAO,CAAC,gBAAgB,CAAC;IA+B5B,IAAI,IAAI,IAAI;CAGb"}
|
|
@@ -6,6 +6,7 @@ const child_process_1 = require("child_process");
|
|
|
6
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
7
|
const readline_1 = tslib_1.__importDefault(require("readline"));
|
|
8
8
|
const uuid_1 = require("uuid");
|
|
9
|
+
const bundler_1 = require("@forge/bundler");
|
|
9
10
|
const runtime_1 = require("@forge/runtime");
|
|
10
11
|
const RUNNER = path_1.default.join(__dirname, '..', '..', 'out', 'sandbox', 'sandbox-runner.js');
|
|
11
12
|
class NodeSandbox {
|
|
@@ -24,7 +25,7 @@ class NodeSandbox {
|
|
|
24
25
|
let handlerName;
|
|
25
26
|
let handlerEnv;
|
|
26
27
|
if (useSingleWrapper) {
|
|
27
|
-
fileName = path_1.default.join(appPath,
|
|
28
|
+
fileName = path_1.default.join(appPath, bundler_1.NODE_RUNTIME_CODE_FILE);
|
|
28
29
|
handlerName = 'main';
|
|
29
30
|
handlerEnv = '__forge__.main';
|
|
30
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-ui-tunnel-server.d.ts","sourceRoot":"","sources":["../../src/servers/custom-ui-tunnel-server.ts"],"names":[],"mappings":"AAGA,OAAgB,EAAE,OAAO,EAAqB,MAAM,SAAS,CAAC;AAG9D,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAE1F,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"custom-ui-tunnel-server.d.ts","sourceRoot":"","sources":["../../src/servers/custom-ui-tunnel-server.ts"],"names":[],"mappings":"AAGA,OAAgB,EAAE,OAAO,EAAqB,MAAM,SAAS,CAAC;AAG9D,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAE1F,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAgC,MAAM,cAAc,CAAC;AAMrG,qBAAa,oBAAqB,SAAQ,oBAAqB,YAAW,iBAAiB;IAM7E,OAAO,CAAC,QAAQ,CAAC,UAAU;IALvC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAU;IAC9B,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA6B;IACnD,OAAO,CAAC,MAAM,CAAqB;gBAEN,UAAU,EAAE,wBAAwB;IA4D3D,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IAkBhD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IASd,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC;IAK5C,MAAM,IAAI,OAAO;IAIjB,OAAO,CAAC,gCAAgC;IAoBxC,OAAO,CAAC,sBAAsB;CAO/B"}
|
|
@@ -7,6 +7,9 @@ import { BundlerWatch, BundlerOutput } from '@forge/bundler';
|
|
|
7
7
|
import { ConfigFile, FileSystemReader, I18nResourceBundlingService, Logger, StatsigService, TunnelOptions } from '@forge/cli-shared';
|
|
8
8
|
import { ExternalRequestBody } from '@forge/runtime';
|
|
9
9
|
import { Permissions, Remotes } from '@forge/manifest';
|
|
10
|
+
export interface ProxyServerError extends Error {
|
|
11
|
+
code?: string;
|
|
12
|
+
}
|
|
10
13
|
export interface DevelopmentServer {
|
|
11
14
|
start(port?: number, permissions?: Permissions, remotes?: Remotes): Promise<StartDevServerResult>;
|
|
12
15
|
stop(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/servers/dev-server.ts"],"names":[],"mappings":";;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAKL,YAAY,EACZ,aAAa,EAEd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,UAAU,EAEV,gBAAgB,EAChB,2BAA2B,EAC3B,MAAM,EAEN,cAAc,EAEd,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAe,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE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,CAAC,CAAC;CACrE;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ/E;AAED,qBAAa,sBAAuB,YAAW,iBAAiB;IAO5D,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,2BAA2B;IAX9C,OAAO,CAAC,GAAG,CAAsB;IACjC,OAAO,CAAC,UAAU,CAA0B;IAC5C,OAAO,CAAC,WAAW,CAA0B;IAC7C,OAAO,CAAC,OAAO,CAAsB;gBAGlB,iBAAiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,EAC9B,2BAA2B,EAAE,2BAA2B;IAuC9D,KAAK,CAAC,IAAI,SAAI,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAe5F,IAAI;IAIJ,eAAe,CAC1B,KAAK,EAAE,YAAY,EACnB,aAAa,GAAE,aAA2C,GACzD,OAAO,CAAC,aAAa,CAAC;IAkClB,MAAM,IAAI,OAAO,CAAC,WAAW;IAI7B,gBAAgB,EAAE,OAAO,CAAC,OAAO,CA6CtC;CACH"}
|
|
@@ -7,6 +7,7 @@ const bundler_1 = require("@forge/bundler");
|
|
|
7
7
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
8
8
|
const runtime_1 = require("@forge/runtime");
|
|
9
9
|
const util_1 = require("../util");
|
|
10
|
+
const http_proxy_middleware_1 = require("http-proxy-middleware");
|
|
10
11
|
async function stopServer(server) {
|
|
11
12
|
if (!server) {
|
|
12
13
|
return;
|
|
@@ -35,8 +36,33 @@ class LocalDevelopmentServer {
|
|
|
35
36
|
this.statsigService = statsigService;
|
|
36
37
|
this.i18nResourceBundlingService = i18nResourceBundlingService;
|
|
37
38
|
this.app = (0, express_1.default)();
|
|
39
|
+
this.app.disable('x-powered-by');
|
|
40
|
+
this.app.disable('etag');
|
|
38
41
|
this.app.use(express_1.default.json({ limit: '6mb' }));
|
|
39
42
|
this.app.post(`/:fnKey`, this.handleInvocation);
|
|
43
|
+
const FORGE_SERVICE_PORT = 7071;
|
|
44
|
+
this.app.use(/^\/forge\/.*\/.*/, (0, http_proxy_middleware_1.createProxyMiddleware)({
|
|
45
|
+
target: `http://localhost:${FORGE_SERVICE_PORT}`,
|
|
46
|
+
pathRewrite: { '^/forge/[^/]*': '' },
|
|
47
|
+
logLevel: 'info',
|
|
48
|
+
logProvider: () => {
|
|
49
|
+
return {
|
|
50
|
+
log: this.logger.trace,
|
|
51
|
+
debug: this.logger.trace,
|
|
52
|
+
info: this.logger.trace,
|
|
53
|
+
warn: this.logger.warn,
|
|
54
|
+
error: this.logger.error
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
onProxyReq: (proxyReq) => {
|
|
58
|
+
this.logger.info(cli_shared_1.Text.tunnel.container.invoke(proxyReq, FORGE_SERVICE_PORT));
|
|
59
|
+
},
|
|
60
|
+
onError: (err, _, res) => {
|
|
61
|
+
const message = cli_shared_1.Text.tunnel.container.error(err.code ?? err.message);
|
|
62
|
+
this.logger.warn(message);
|
|
63
|
+
res.status(500).send(message);
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
40
66
|
}
|
|
41
67
|
async start(port = 0, permissions, remotes) {
|
|
42
68
|
this.permissions = permissions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/tunnel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.11.0-next.10-experimental-76b1041",
|
|
4
4
|
"description": "Tunnel functionality for Forge CLI",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"compile": "tsc -b -v"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@forge/bundler": "4.23.2-next.
|
|
15
|
-
"@forge/cli-shared": "7.0.0-next.
|
|
16
|
-
"@forge/csp": "3.9.0-next.0",
|
|
17
|
-
"@forge/runtime": "5.10.8",
|
|
14
|
+
"@forge/bundler": "4.23.2-next.10-experimental-76b1041",
|
|
15
|
+
"@forge/cli-shared": "7.0.0-next.9-experimental-76b1041",
|
|
16
|
+
"@forge/csp": "3.9.0-next.0-experimental-76b1041",
|
|
17
|
+
"@forge/runtime": "5.10.8-experimental-76b1041",
|
|
18
18
|
"cloudflared": "^0.7.0",
|
|
19
19
|
"chokidar": "^3.6.0",
|
|
20
|
-
"express": "^4.
|
|
20
|
+
"express": "^4.21.2",
|
|
21
21
|
"express-intercept": "^1.1.0",
|
|
22
22
|
"http-proxy-middleware": "^2.0.6",
|
|
23
23
|
"node-cache": "^5.1.2",
|
|
@@ -30,14 +30,15 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@atlassian/xen-test-util": "^4.2.0",
|
|
33
|
-
"@forge/manifest": "9.4.0-next.
|
|
33
|
+
"@forge/manifest": "9.4.0-next.5-experimental-76b1041",
|
|
34
34
|
"@types/express": "^4.17.21",
|
|
35
35
|
"@types/jest": "^29.5.12",
|
|
36
|
-
"@types/node": "
|
|
36
|
+
"@types/node": "22.2.0",
|
|
37
37
|
"@types/supertest": "^2.0.16",
|
|
38
38
|
"@types/tmp": "^0.2.6",
|
|
39
39
|
"@types/uuid": "^9.0.8",
|
|
40
40
|
"@types/which": "^3.0.4",
|
|
41
|
+
"nock": "13.5.4",
|
|
41
42
|
"supertest": "^6.3.3"
|
|
42
43
|
},
|
|
43
44
|
"publishConfig": {
|