@forge/tunnel 5.0.2 → 5.1.0-next.0
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 +13 -0
- package/out/command/interactors/function-change-watcher.d.ts.map +1 -1
- package/out/command/interactors/function-change-watcher.js +11 -6
- package/out/command/interactors/multi-compiler-watcher.d.ts +2 -1
- package/out/command/interactors/multi-compiler-watcher.d.ts.map +1 -1
- package/out/command/interactors/multi-compiler-watcher.js +3 -2
- package/out/command/interactors/tunnel-interactor.d.ts.map +1 -1
- package/out/command/interactors/tunnel-interactor.js +2 -2
- package/out/servers/dev-server.d.ts +3 -3
- package/out/servers/dev-server.d.ts.map +1 -1
- package/out/servers/dev-server.js +2 -3
- package/out/util/sandboxes-container.d.ts +1 -0
- package/out/util/sandboxes-container.d.ts.map +1 -1
- package/out/util/sandboxes-container.js +5 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @forge/tunnel
|
|
2
2
|
|
|
3
|
+
## 5.1.0-next.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ee4e0a1: allow app developer choose location to save the bundled app code
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [ee4e0a1]
|
|
12
|
+
- @forge/cli-shared@4.1.0-next.0
|
|
13
|
+
- @forge/bundler@4.16.0-next.0
|
|
14
|
+
- @forge/runtime@5.8.0-next.0
|
|
15
|
+
|
|
3
16
|
## 5.0.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-change-watcher.d.ts","sourceRoot":"","sources":["../../../src/command/interactors/function-change-watcher.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"function-change-watcher.d.ts","sourceRoot":"","sources":["../../../src/command/interactors/function-change-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AAE,MAAM,EAAE,aAAa,EAAE,aAAa;CAY7F"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LocalFunctionHost = exports.MEMORY_LIMIT = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const path_1 = require("path");
|
|
5
|
+
const path_1 = tslib_1.__importStar(require("path"));
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
7
|
const tmp_1 = tslib_1.__importDefault(require("tmp"));
|
|
8
8
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
@@ -39,9 +39,13 @@ class LocalFunctionHost {
|
|
|
39
39
|
await fs_1.promises.writeFile(bundle.bundleFileSourceMapPath, bundle.bundleFileSourceMap);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
async startWatching(bundledCode, tunnelOptions =
|
|
43
|
-
const
|
|
44
|
-
|
|
42
|
+
async startWatching(bundledCode, tunnelOptions = cli_shared_1.defaultNoDebugTunnelOptions) {
|
|
43
|
+
const isNodeJsRuntime = (await this.configFile.runtimeType()) === cli_shared_1.RuntimeType.nodejs;
|
|
44
|
+
let directory = tmp_1.default.dirSync({ prefix: 'tunnel' }).name;
|
|
45
|
+
if (isNodeJsRuntime && tunnelOptions.debug) {
|
|
46
|
+
directory = path_1.default.resolve(cli_shared_1.defaultDebugBundleOutputPath);
|
|
47
|
+
}
|
|
48
|
+
const isSnapshotEnabled = (await this.configFile.snapshotsEnabled()) && !isNodeJsRuntime;
|
|
45
49
|
if (isSnapshotEnabled) {
|
|
46
50
|
this.logger.info('');
|
|
47
51
|
this.logger.info(cli_shared_1.Text.tunnel.preBundleTask(cli_shared_1.Text.tunnel.snapshotting));
|
|
@@ -86,6 +90,7 @@ class LocalFunctionHost {
|
|
|
86
90
|
}
|
|
87
91
|
async initializeSandboxes(srcPath, tunnelOptions) {
|
|
88
92
|
try {
|
|
93
|
+
util_1.SandboxesContainer.stopSandboxes();
|
|
89
94
|
const handlers = await this.configFile.getAppHandlers();
|
|
90
95
|
const sandboxes = {};
|
|
91
96
|
await Promise.all(handlers.map(async ({ module, func }) => {
|
|
@@ -105,14 +110,14 @@ class LocalFunctionHost {
|
|
|
105
110
|
}
|
|
106
111
|
static getDebuggerPort(modName, handler, tunnelOptions) {
|
|
107
112
|
const sandboxName = `${modName}.${handler}`;
|
|
108
|
-
if (!tunnelOptions
|
|
113
|
+
if (!tunnelOptions.debug) {
|
|
109
114
|
return undefined;
|
|
110
115
|
}
|
|
111
116
|
const index = (tunnelOptions.debugFunctionHandlers || []).findIndex((handler) => handler === sandboxName);
|
|
112
117
|
if (index === -1) {
|
|
113
118
|
return undefined;
|
|
114
119
|
}
|
|
115
|
-
return index +
|
|
120
|
+
return index + tunnelOptions.debugStartingPort;
|
|
116
121
|
}
|
|
117
122
|
}
|
|
118
123
|
exports.LocalFunctionHost = LocalFunctionHost;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { BundlerOutput, WatcherMonitor } from '@forge/bundler';
|
|
2
2
|
import { DevelopmentServer, WatchHooks } from '../../servers';
|
|
3
|
+
import { TunnelOptions } from '@forge/cli-shared';
|
|
3
4
|
export declare class MultiCompilerWatcher implements WatcherMonitor {
|
|
4
5
|
private readonly servers;
|
|
5
6
|
constructor(servers: DevelopmentServer[]);
|
|
6
7
|
compileAndWatch({ onChange: { onBuildWillStart, onBuildFinished } }: {
|
|
7
8
|
onChange: WatchHooks;
|
|
8
|
-
}): Promise<BundlerOutput>;
|
|
9
|
+
}, tunnelOptions?: TunnelOptions): Promise<BundlerOutput>;
|
|
9
10
|
stop(): Promise<void>;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=multi-compiler-watcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-compiler-watcher.d.ts","sourceRoot":"","sources":["../../../src/command/interactors/multi-compiler-watcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"multi-compiler-watcher.d.ts","sourceRoot":"","sources":["../../../src/command/interactors/multi-compiler-watcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAA+B,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE/E,qBAAa,oBAAqB,YAAW,cAAc;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,iBAAiB,EAAE;IAE5C,eAAe,CAC1B,EACE,QAAQ,EAAE,EAAE,gBAAgB,EAAE,eAAe,EAAE,EAChD,EAAE;QACD,QAAQ,EAAE,UAAU,CAAC;KACtB,EACD,aAAa,GAAE,aAA2C,GACzD,OAAO,CAAC,aAAa,CAAC;IAmCZ,IAAI;CAGlB"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MultiCompilerWatcher = void 0;
|
|
4
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
4
5
|
class MultiCompilerWatcher {
|
|
5
6
|
constructor(servers) {
|
|
6
7
|
this.servers = servers;
|
|
7
8
|
}
|
|
8
|
-
async compileAndWatch({ onChange: { onBuildWillStart, onBuildFinished } }) {
|
|
9
|
+
async compileAndWatch({ onChange: { onBuildWillStart, onBuildFinished } }, tunnelOptions = cli_shared_1.defaultNoDebugTunnelOptions) {
|
|
9
10
|
const results = await Promise.all(this.servers.map((server) => server.compileAndWatch({
|
|
10
11
|
onBuildWillStart,
|
|
11
12
|
onBuildFinished
|
|
12
|
-
})));
|
|
13
|
+
}, tunnelOptions)));
|
|
13
14
|
const multiResult = {
|
|
14
15
|
output: {}
|
|
15
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tunnel-interactor.d.ts","sourceRoot":"","sources":["../../../src/command/interactors/tunnel-interactor.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,
|
|
1
|
+
{"version":3,"file":"tunnel-interactor.d.ts","sourceRoot":"","sources":["../../../src/command/interactors/tunnel-interactor.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAyC,MAAM,EAAQ,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG5D,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAEpC,mBAAmB,CACxB,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACjC,aAAa,EAAE,cAAc,GAAG,SAAS,GACxC,OAAO,CAAC,IAAI,CAAC;IAqCT,QAAQ,sBACM,iBAAiB,kBACrB,aAAa,KAC3B,QAAQ,cAAc,GAAG,SAAS,CAAC,CAgEpC;CACH"}
|
|
@@ -9,7 +9,7 @@ const multi_compiler_watcher_1 = require("./multi-compiler-watcher");
|
|
|
9
9
|
class TunnelInteractor {
|
|
10
10
|
constructor(logger) {
|
|
11
11
|
this.logger = logger;
|
|
12
|
-
this.watchApp = async (startTunnelResult, tunnelOptions =
|
|
12
|
+
this.watchApp = async (startTunnelResult, tunnelOptions = cli_shared_1.defaultNoDebugTunnelOptions) => {
|
|
13
13
|
const { localPort, inspectorAddress, reloadSandboxes, devServers } = startTunnelResult;
|
|
14
14
|
if (inspectorAddress) {
|
|
15
15
|
this.logger.info(cli_shared_1.Text.tunnel.startedInspector(inspectorAddress));
|
|
@@ -46,7 +46,7 @@ class TunnelInteractor {
|
|
|
46
46
|
onBuildWillStart: onBundlingStart,
|
|
47
47
|
onBuildFinished: onBundlingFinish
|
|
48
48
|
}
|
|
49
|
-
});
|
|
49
|
+
}, tunnelOptions);
|
|
50
50
|
await reloadSandboxes(output, tunnelOptions);
|
|
51
51
|
this.logger.info('');
|
|
52
52
|
this.logger.info(cli_shared_1.Text.tunnel.startedServer(localPort, this.logger.debugEnabled) + '\n');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import express from 'express';
|
|
4
4
|
import * as http from 'http';
|
|
5
5
|
import { URL } from 'url';
|
|
6
|
-
import { ConfigFile, FileSystemReader, Logger } from '@forge/cli-shared';
|
|
6
|
+
import { ConfigFile, FileSystemReader, Logger, TunnelOptions } from '@forge/cli-shared';
|
|
7
7
|
import { ExternalRequestBody } from '@forge/runtime';
|
|
8
8
|
import { Permissions, Remotes } from '@forge/manifest';
|
|
9
9
|
import { BundlerOutput } from '@forge/bundler';
|
|
@@ -14,7 +14,7 @@ export interface WatchHooks<T = any> {
|
|
|
14
14
|
export interface DevelopmentServer {
|
|
15
15
|
start(port?: number, permissions?: Permissions, remotes?: Remotes): Promise<StartDevServerResult>;
|
|
16
16
|
stop(): Promise<void>;
|
|
17
|
-
compileAndWatch(hooks: WatchHooks<BundlerOutput
|
|
17
|
+
compileAndWatch(hooks: WatchHooks<BundlerOutput>, tunnelOptions?: TunnelOptions): Promise<BundlerOutput>;
|
|
18
18
|
}
|
|
19
19
|
export interface StartDevServerResult {
|
|
20
20
|
port: number;
|
|
@@ -38,7 +38,7 @@ export declare class LocalDevelopmentServer implements DevelopmentServer {
|
|
|
38
38
|
constructor(invocationService: InvocationService, logger: Logger, configFile: ConfigFile, fileSystemReader: FileSystemReader);
|
|
39
39
|
start(port?: number, permissions?: Permissions, remotes?: Remotes): Promise<StartDevServerResult>;
|
|
40
40
|
stop(): Promise<void>;
|
|
41
|
-
compileAndWatch({ onBuildWillStart, onBuildFinished }: WatchHooks<BundlerOutput
|
|
41
|
+
compileAndWatch({ onBuildWillStart, onBuildFinished }: WatchHooks<BundlerOutput>, tunnelOptions?: TunnelOptions): Promise<BundlerOutput>;
|
|
42
42
|
getApp(): express.Application;
|
|
43
43
|
handleInvocation: express.Handler;
|
|
44
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/servers/dev-server.ts"],"names":[],"mappings":";;AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG1B,OAAO,
|
|
1
|
+
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/servers/dev-server.ts"],"names":[],"mappings":";;AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG1B,OAAO,EACL,UAAU,EAEV,gBAAgB,EAEhB,MAAM,EAGN,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAe,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EACL,aAAa,EAMd,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,GAAG;IACjC,gBAAgB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,eAAe,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnE;AACD,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE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,EAAE,EAAE,UAAU,CAAC,aAAa,CAAC,EAChE,aAAa,GAAE,aAA2C,GACzD,OAAO,CAAC,aAAa,CAAC;IAsDlB,MAAM,IAAI,OAAO,CAAC,WAAW;IAI7B,gBAAgB,EAAE,OAAO,CAAC,OAAO,CA2CtC;CACH"}
|
|
@@ -6,7 +6,6 @@ const express_1 = tslib_1.__importDefault(require("express"));
|
|
|
6
6
|
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
|
-
const __1 = require("../");
|
|
10
9
|
const util_1 = require("../util");
|
|
11
10
|
const bundler_2 = require("@forge/bundler");
|
|
12
11
|
async function stopServer(server) {
|
|
@@ -76,7 +75,7 @@ class LocalDevelopmentServer {
|
|
|
76
75
|
async stop() {
|
|
77
76
|
await stopServer(this.httpServer);
|
|
78
77
|
}
|
|
79
|
-
async compileAndWatch({ onBuildWillStart, onBuildFinished }) {
|
|
78
|
+
async compileAndWatch({ onBuildWillStart, onBuildFinished }, tunnelOptions = cli_shared_1.defaultNoDebugTunnelOptions) {
|
|
80
79
|
const handlers = await this.configFile.getAppHandlers();
|
|
81
80
|
const entryPoints = (0, bundler_1.getEntryPoints)(handlers);
|
|
82
81
|
if (!entryPoints.length) {
|
|
@@ -87,7 +86,7 @@ class LocalDevelopmentServer {
|
|
|
87
86
|
: bundler_2.getSandboxedRuntimeBuildConfig;
|
|
88
87
|
const config = getConfig(entryPoints, {
|
|
89
88
|
isWatchMode: true,
|
|
90
|
-
isDebugMode:
|
|
89
|
+
isDebugMode: tunnelOptions.debug,
|
|
91
90
|
appDirectory: process.cwd()
|
|
92
91
|
});
|
|
93
92
|
const compiler = (0, bundler_2.getCompiler)(config);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandboxes-container.d.ts","sourceRoot":"","sources":["../../src/util/sandboxes-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,SAAS,CAA+B;IAEhD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA4B;WAErC,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;WAI9B,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"sandboxes-container.d.ts","sourceRoot":"","sources":["../../src/util/sandboxes-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,SAAS,CAA+B;IAEhD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA4B;WAErC,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;WAI9B,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;WAIzD,aAAa;CAK5B"}
|
|
@@ -11,6 +11,11 @@ class SandboxesContainer {
|
|
|
11
11
|
static updateSandboxes(sandboxes) {
|
|
12
12
|
this.instance.sandboxes = sandboxes;
|
|
13
13
|
}
|
|
14
|
+
static stopSandboxes() {
|
|
15
|
+
for (const [_, sandbox] of Object.entries(SandboxesContainer.get())) {
|
|
16
|
+
sandbox.stop();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
14
19
|
}
|
|
15
20
|
exports.SandboxesContainer = SandboxesContainer;
|
|
16
21
|
SandboxesContainer.instance = new SandboxesContainer();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/tunnel",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.1.0-next.0",
|
|
4
4
|
"description": "Tunnel functionality for Forge CLI",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"compile": "tsc -b -v"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@forge/bundler": "4.
|
|
15
|
-
"@forge/cli-shared": "4.0.
|
|
14
|
+
"@forge/bundler": "4.16.0-next.0",
|
|
15
|
+
"@forge/cli-shared": "4.1.0-next.0",
|
|
16
16
|
"@forge/csp": "3.2.1",
|
|
17
|
-
"@forge/runtime": "5.
|
|
17
|
+
"@forge/runtime": "5.8.0-next.0",
|
|
18
18
|
"express": "^4.18.3",
|
|
19
19
|
"express-intercept": "^1.1.0",
|
|
20
20
|
"http-proxy-middleware": "^2.0.6",
|