@forge/tunnel 6.0.1 → 6.0.2-experimental-a6c1d53
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 +163 -0
- package/out/command/start-tunnel-command.d.ts +1 -1
- package/out/command/start-tunnel-command.d.ts.map +1 -1
- package/out/command/start-tunnel-command.js +2 -4
- package/out/servers/csp-reporter-server.d.ts.map +1 -1
- package/out/servers/csp-reporter-server.js +1 -1
- package/out/servers/custom-ui-tunnel-server.d.ts.map +1 -1
- package/out/servers/custom-ui-tunnel-server.js +0 -2
- package/out/servers/dev-server.d.ts +1 -3
- package/out/servers/dev-server.d.ts.map +1 -1
- package/out/servers/dev-server.js +1 -18
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,168 @@
|
|
|
1
1
|
# @forge/tunnel
|
|
2
2
|
|
|
3
|
+
## 6.0.2-experimental-a6c1d53
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [aebd633]
|
|
8
|
+
- Updated dependencies [abf0bb1]
|
|
9
|
+
- @forge/csp@4.2.0-experimental-a6c1d53
|
|
10
|
+
- @forge/bundler@6.1.1-experimental-a6c1d53
|
|
11
|
+
|
|
12
|
+
## 6.0.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- e118b07: Remove remnants of sandbox runtime
|
|
17
|
+
- Updated dependencies [0402460]
|
|
18
|
+
- Updated dependencies [8d843ca]
|
|
19
|
+
- Updated dependencies [7abca30]
|
|
20
|
+
- Updated dependencies [cfde21e]
|
|
21
|
+
- Updated dependencies [4623865]
|
|
22
|
+
- Updated dependencies [e118b07]
|
|
23
|
+
- Updated dependencies [a26c603]
|
|
24
|
+
- Updated dependencies [8e9a8b5]
|
|
25
|
+
- Updated dependencies [73f3108]
|
|
26
|
+
- Updated dependencies [d544fc6]
|
|
27
|
+
- @forge/cli-shared@8.2.0
|
|
28
|
+
- @forge/bundler@6.1.1
|
|
29
|
+
- @forge/csp@4.2.0
|
|
30
|
+
- @forge/runtime@6.0.2
|
|
31
|
+
|
|
32
|
+
## 6.0.2-next.16
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- @forge/bundler@6.1.1-next.16
|
|
37
|
+
- @forge/cli-shared@8.2.0-next.16
|
|
38
|
+
|
|
39
|
+
## 6.0.2-next.15
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- @forge/bundler@6.1.1-next.15
|
|
44
|
+
- @forge/cli-shared@8.2.0-next.15
|
|
45
|
+
|
|
46
|
+
## 6.0.2-next.14
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- @forge/bundler@6.1.1-next.14
|
|
51
|
+
- @forge/cli-shared@8.2.0-next.14
|
|
52
|
+
|
|
53
|
+
## 6.0.2-next.13
|
|
54
|
+
|
|
55
|
+
### Patch Changes
|
|
56
|
+
|
|
57
|
+
- Updated dependencies [4623865]
|
|
58
|
+
- @forge/cli-shared@8.2.0-next.13
|
|
59
|
+
- @forge/bundler@6.1.1-next.13
|
|
60
|
+
|
|
61
|
+
## 6.0.2-next.12
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- Updated dependencies [8d843ca]
|
|
66
|
+
- @forge/cli-shared@8.2.0-next.12
|
|
67
|
+
- @forge/bundler@6.1.1-next.12
|
|
68
|
+
|
|
69
|
+
## 6.0.2-next.11
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- Updated dependencies [0402460]
|
|
74
|
+
- @forge/cli-shared@8.2.0-next.11
|
|
75
|
+
- @forge/bundler@6.1.1-next.11
|
|
76
|
+
|
|
77
|
+
## 6.0.2-next.10
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- Updated dependencies [cfde21e]
|
|
82
|
+
- @forge/cli-shared@8.2.0-next.10
|
|
83
|
+
- @forge/csp@4.2.0-next.0
|
|
84
|
+
- @forge/bundler@6.1.1-next.10
|
|
85
|
+
|
|
86
|
+
## 6.0.2-next.9
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- Updated dependencies [0402460]
|
|
91
|
+
- @forge/cli-shared@8.2.0-next.9
|
|
92
|
+
- @forge/bundler@6.1.1-next.9
|
|
93
|
+
|
|
94
|
+
## 6.0.2-next.8
|
|
95
|
+
|
|
96
|
+
### Patch Changes
|
|
97
|
+
|
|
98
|
+
- Updated dependencies [8e9a8b5]
|
|
99
|
+
- @forge/cli-shared@8.2.0-next.8
|
|
100
|
+
- @forge/bundler@6.1.1-next.8
|
|
101
|
+
|
|
102
|
+
## 6.0.2-next.7
|
|
103
|
+
|
|
104
|
+
### Patch Changes
|
|
105
|
+
|
|
106
|
+
- @forge/bundler@6.1.1-next.7
|
|
107
|
+
- @forge/cli-shared@8.2.0-next.7
|
|
108
|
+
|
|
109
|
+
## 6.0.2-next.6
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- e118b07: Remove remnants of sandbox runtime
|
|
114
|
+
- Updated dependencies [e118b07]
|
|
115
|
+
- @forge/cli-shared@8.2.0-next.6
|
|
116
|
+
- @forge/runtime@6.0.2-next.0
|
|
117
|
+
- @forge/bundler@6.1.1-next.6
|
|
118
|
+
|
|
119
|
+
## 6.0.2-next.5
|
|
120
|
+
|
|
121
|
+
### Patch Changes
|
|
122
|
+
|
|
123
|
+
- Updated dependencies [d544fc6]
|
|
124
|
+
- @forge/cli-shared@8.2.0-next.5
|
|
125
|
+
- @forge/bundler@6.1.1-next.5
|
|
126
|
+
|
|
127
|
+
## 6.0.2-next.4
|
|
128
|
+
|
|
129
|
+
### Patch Changes
|
|
130
|
+
|
|
131
|
+
- Updated dependencies [73f3108]
|
|
132
|
+
- @forge/cli-shared@8.2.0-next.4
|
|
133
|
+
- @forge/bundler@6.1.1-next.4
|
|
134
|
+
|
|
135
|
+
## 6.0.2-next.3
|
|
136
|
+
|
|
137
|
+
### Patch Changes
|
|
138
|
+
|
|
139
|
+
- Updated dependencies [a26c603]
|
|
140
|
+
- @forge/cli-shared@8.2.0-next.3
|
|
141
|
+
- @forge/bundler@6.1.1-next.3
|
|
142
|
+
|
|
143
|
+
## 6.0.2-next.2
|
|
144
|
+
|
|
145
|
+
### Patch Changes
|
|
146
|
+
|
|
147
|
+
- Updated dependencies [05d33ea]
|
|
148
|
+
- @forge/cli-shared@8.2.0-next.2
|
|
149
|
+
- @forge/bundler@6.1.1-next.2
|
|
150
|
+
|
|
151
|
+
## 6.0.2-next.1
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- Updated dependencies [7abca30]
|
|
156
|
+
- @forge/bundler@6.1.1-next.1
|
|
157
|
+
- @forge/cli-shared@8.1.1-next.1
|
|
158
|
+
|
|
159
|
+
## 6.0.2-next.0
|
|
160
|
+
|
|
161
|
+
### Patch Changes
|
|
162
|
+
|
|
163
|
+
- @forge/bundler@6.1.1-next.0
|
|
164
|
+
- @forge/cli-shared@8.1.1-next.0
|
|
165
|
+
|
|
3
166
|
## 6.0.1
|
|
4
167
|
|
|
5
168
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-tunnel-command.d.ts","sourceRoot":"","sources":["../../src/command/start-tunnel-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,EAAmB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAI1G,OAAO,EACL,iBAAiB,EAKlB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,C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,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAV7B,OAAO,CAAC,aAAa,CAAmE;IACxF,OAAO,CAAC,iBAAiB,CAAgC;gBAGtC,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,iBAAiB,EAC5B,aAAa,EAAE,mBAAmB,EAClC,YAAY,EAAE,qBAAqB,EACnC,YAAY,EAAE,qBAAqB,EACnC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU;IAGzC,OAAO,CAAC,YAAY,CASlB;IAEF,OAAO,CAAC,qBAAqB,CAuB3B;IAEF,OAAO,CAAC,gCAAgC,CAiCtC;IAEW,OAAO,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CA8C9E"}
|
|
@@ -50,17 +50,15 @@ class StartTunnelCommand {
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
startResourceBasedTunnelsServers = async (resourceDetails, options) => {
|
|
53
|
-
const portMap = options.resourcePortMap ?? JSON.parse(process.env.RESOURCE_PORT_MAP ?? '{}');
|
|
54
53
|
const { permissions = {}, remotes = [], translations: i18nConfig } = await this.configFile.readConfig();
|
|
55
|
-
const
|
|
56
|
-
const cspReporterPort = process.env.CSP_REPORTER_PORT ? parseInt(process.env.CSP_REPORTER_PORT, 10) : availablePort;
|
|
54
|
+
const cspReporterPort = await (0, portfinder_1.getPortPromise)({ port: 4000 });
|
|
57
55
|
if (resourceDetails.length === 0)
|
|
58
56
|
return [];
|
|
59
57
|
this.cspReporterServer = new servers_1.CspReporterServer(cspReporterPort, this.logger, new node_cache_1.default());
|
|
60
58
|
await this.cspReporterServer.start();
|
|
61
59
|
return await Promise.all(resourceDetails.map(async (rd) => {
|
|
62
60
|
const { key, resourceType } = rd;
|
|
63
|
-
const port =
|
|
61
|
+
const port = options.resourcePortMap[key];
|
|
64
62
|
const tunnelServer = resourceType === 'nativeUI' ? servers_1.NativeUITunnelServer : servers_1.CustomUITunnelServer;
|
|
65
63
|
this.tunnelServers[key] = new tunnelServer({
|
|
66
64
|
...rd,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csp-reporter-server.d.ts","sourceRoot":"","sources":["../../src/servers/csp-reporter-server.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,OAAO,EAAqB,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAmB,MAAM,mBAAmB,CAAC;AAE5D,OAAO,SAAS,MAAM,YAAY,CAAC;AAYnC,qBAAa,iBAAiB;IAM1B,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAU;IAC9B,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAM;gBAGhB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS;IAwBnC,MAAM,IAAI,OAAO;IAIX,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"csp-reporter-server.d.ts","sourceRoot":"","sources":["../../src/servers/csp-reporter-server.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,OAAO,EAAqB,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAmB,MAAM,mBAAmB,CAAC;AAE5D,OAAO,SAAS,MAAM,YAAY,CAAC;AAYnC,qBAAa,iBAAiB;IAM1B,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAU;IAC9B,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAM;gBAGhB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS;IAwBnC,MAAM,IAAI,OAAO;IAIX,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IActB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAK5B"}
|
|
@@ -39,7 +39,7 @@ class CspReporterServer {
|
|
|
39
39
|
this.server.on('error', (err) => {
|
|
40
40
|
const error = err;
|
|
41
41
|
if (error.code === 'EADDRINUSE') {
|
|
42
|
-
reject(new cli_shared_1.UserError(`Port ${this.port} is already in use
|
|
42
|
+
reject(new cli_shared_1.UserError(`Port ${this.port} is already in use.`));
|
|
43
43
|
}
|
|
44
44
|
else {
|
|
45
45
|
reject(err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-ui-tunnel-server.d.ts","sourceRoot":"","sources":["../../src/servers/custom-ui-tunnel-server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom-ui-tunnel-server.d.ts","sourceRoot":"","sources":["../../src/servers/custom-ui-tunnel-server.ts"],"names":[],"mappings":"AAEA,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;IA2C3D,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"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CustomUITunnelServer = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const net_1 = tslib_1.__importDefault(require("net"));
|
|
6
5
|
const url_1 = require("url");
|
|
7
6
|
const express_1 = tslib_1.__importDefault(require("express"));
|
|
8
7
|
const http_proxy_middleware_1 = require("http-proxy-middleware");
|
|
@@ -29,7 +28,6 @@ class CustomUITunnelServer extends resource_tunnel_server_1.ResourceTunnelServer
|
|
|
29
28
|
}
|
|
30
29
|
this.app.use(this.getCustomUIHtmlTransformMiddleware(permissions, remotes));
|
|
31
30
|
if (tunnel) {
|
|
32
|
-
net_1.default.setDefaultAutoSelectFamily?.(true);
|
|
33
31
|
const { port: tunnelPort } = tunnel;
|
|
34
32
|
this.proxy = (0, http_proxy_middleware_1.createProxyMiddleware)({
|
|
35
33
|
target: `http://${this.tunnelArgs.host}:${tunnelPort}`,
|
|
@@ -34,10 +34,8 @@ export declare class LocalDevelopmentServer implements DevelopmentServer {
|
|
|
34
34
|
private readonly i18nResourceBundlingService;
|
|
35
35
|
private app;
|
|
36
36
|
private httpServer;
|
|
37
|
-
private permissions;
|
|
38
|
-
private remotes;
|
|
39
37
|
constructor(invocationService: InvocationService, logger: Logger, configFile: ConfigFile, fileSystemReader: FileSystemReader, statsigService: StatsigService, i18nResourceBundlingService: I18nResourceBundlingService);
|
|
40
|
-
start(port?: number,
|
|
38
|
+
start(port?: number, _permissions?: Permissions, _remotes?: Remotes): Promise<StartDevServerResult>;
|
|
41
39
|
stop(): Promise<void>;
|
|
42
40
|
compileAndWatch(watch: BundlerWatch, tunnelOptions?: TunnelOptions): Promise<BundlerOutput>;
|
|
43
41
|
getApp(): express.Application;
|
|
@@ -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,EACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,UAAU,EAEV,gBAAgB,EAChB,2BAA2B,EAC3B,MAAM,EACN,cAAc,EAEd,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAe,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAKvD,MAAM,WAAW,gBAAiB,SAAQ,KAAK;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC7F;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,iBAAiB,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;I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@ class LocalDevelopmentServer {
|
|
|
26
26
|
i18nResourceBundlingService;
|
|
27
27
|
app;
|
|
28
28
|
httpServer;
|
|
29
|
-
permissions;
|
|
30
|
-
remotes;
|
|
31
29
|
constructor(invocationService, logger, configFile, fileSystemReader, statsigService, i18nResourceBundlingService) {
|
|
32
30
|
this.invocationService = invocationService;
|
|
33
31
|
this.logger = logger;
|
|
@@ -63,9 +61,7 @@ class LocalDevelopmentServer {
|
|
|
63
61
|
}
|
|
64
62
|
}));
|
|
65
63
|
}
|
|
66
|
-
async start(port = 0,
|
|
67
|
-
this.permissions = permissions;
|
|
68
|
-
this.remotes = remotes;
|
|
64
|
+
async start(port = 0, _permissions, _remotes) {
|
|
69
65
|
this.httpServer = await new Promise((resolve, reject) => {
|
|
70
66
|
const httpServer = this.app.listen({ port });
|
|
71
67
|
httpServer.on('error', reject).on('listening', () => resolve(httpServer));
|
|
@@ -109,19 +105,6 @@ class LocalDevelopmentServer {
|
|
|
109
105
|
}
|
|
110
106
|
});
|
|
111
107
|
request.variables = [...envVars].sort((a, b) => a.key.localeCompare(b.key));
|
|
112
|
-
const allowList = this.permissions?.external?.fetch?.backend
|
|
113
|
-
?.map((item) => {
|
|
114
|
-
if (typeof item === 'string')
|
|
115
|
-
return item;
|
|
116
|
-
if ('address' in item)
|
|
117
|
-
return item.address;
|
|
118
|
-
return this.remotes?.find((remote) => remote.key === item.remote)?.baseUrl;
|
|
119
|
-
})
|
|
120
|
-
.filter((item) => typeof item === 'string') ?? undefined;
|
|
121
|
-
request._meta = {
|
|
122
|
-
...request._meta,
|
|
123
|
-
fetchAllowList: allowList
|
|
124
|
-
};
|
|
125
108
|
try {
|
|
126
109
|
const invokeResults = await this.invocationService.invoke(request.handler, request);
|
|
127
110
|
if (!invokeResults.success) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/tunnel",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2-experimental-a6c1d53",
|
|
4
4
|
"description": "Tunnel functionality for Forge CLI",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"compile": "tsc -b -v"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@forge/bundler": "6.1.
|
|
15
|
-
"@forge/cli-shared": "8.
|
|
16
|
-
"@forge/csp": "4.
|
|
17
|
-
"@forge/runtime": "6.0.
|
|
14
|
+
"@forge/bundler": "6.1.1-experimental-a6c1d53",
|
|
15
|
+
"@forge/cli-shared": "8.2.0",
|
|
16
|
+
"@forge/csp": "4.2.0-experimental-a6c1d53",
|
|
17
|
+
"@forge/runtime": "6.0.2",
|
|
18
18
|
"chokidar": "^3.6.0",
|
|
19
19
|
"cloudflared": "^0.7.0",
|
|
20
20
|
"express": "^4.18.3",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@atlassian/xen-test-util": "^4.2.0",
|
|
33
|
-
"@forge/manifest": "10.
|
|
33
|
+
"@forge/manifest": "10.2.0",
|
|
34
34
|
"@types/express": "^4.17.21",
|
|
35
35
|
"@types/jest": "^29.5.14",
|
|
36
36
|
"@types/node": "20.19.1",
|