@forge/tunnel 5.0.1-next.0 → 5.0.1-next.0-experimental-1c920ad

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,19 @@
1
1
  # @forge/tunnel
2
2
 
3
+ ## 5.0.1-next.0-experimental-1c920ad
4
+
5
+ ### Minor Changes
6
+
7
+ - fa433bf: allow app developer choose location to save the bundled app code
8
+
9
+ ### Patch Changes
10
+
11
+ - 314d732: Added analytics handling for known user errors
12
+ - Updated dependencies [fa433bf]
13
+ - @forge/cli-shared@3.26.0-experimental-1c920ad
14
+ - @forge/bundler@4.15.9-experimental-1c920ad
15
+ - @forge/csp@3.2.1-experimental-1c920ad
16
+
3
17
  ## 5.0.1-next.0
4
18
 
5
19
  ### 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,EAAE,UAAU,EAA8B,MAAM,EAAqB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACrH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAIL,OAAO,EACP,aAAa,EACb,eAAe,EAChB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvF,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,MAAM;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uBAAuB,EAAE,MAAM,CAAC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,qBAAa,iBAAkB,YAAW,qBAAqB;IAI3D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,aAAa;IANhC,OAAO,CAAC,YAAY,CAA8C;gBAG/C,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,eAAe,GAAG,IAAI,EAChC,aAAa,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC;YAG5D,mBAAmB;IA2BpB,aAAa,CAAC,WAAW,EAAE,aAAa,EAAE,aAAa,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAkD3F,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1C,OAAO,CAAC,YAAY,CAElB;YAEY,mBAAmB;WAuBnB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa;CAY7F"}
1
+ {"version":3,"file":"function-change-watcher.d.ts","sourceRoot":"","sources":["../../../src/command/interactors/function-change-watcher.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EAGV,MAAM,EAGN,aAAa,EAGd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAIL,OAAO,EACP,aAAa,EACb,eAAe,EAChB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvF,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,MAAM;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uBAAuB,EAAE,MAAM,CAAC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,qBAAa,iBAAkB,YAAW,qBAAqB;IAI3D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,aAAa;IANhC,OAAO,CAAC,YAAY,CAA8C;gBAG/C,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,eAAe,GAAG,IAAI,EAChC,aAAa,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC;YAG5D,mBAAmB;IA2BpB,aAAa,CACxB,WAAW,EAAE,aAAa,EAC1B,aAAa,GAAE,aAA2C,GACzD,OAAO,CAAC,IAAI,CAAC;IAsDH,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1C,OAAO,CAAC,YAAY,CAElB;YAEY,mBAAmB;WAuBnB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,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 directory = tmp_1.default.dirSync({ prefix: 'tunnel' }).name;
44
- const isSnapshotEnabled = (await this.configFile.snapshotsEnabled()) && !((await this.configFile.runtimeType()) === cli_shared_1.RuntimeType.nodejs);
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));
@@ -105,14 +109,14 @@ class LocalFunctionHost {
105
109
  }
106
110
  static getDebuggerPort(modName, handler, tunnelOptions) {
107
111
  const sandboxName = `${modName}.${handler}`;
108
- if (!tunnelOptions || !tunnelOptions.debug) {
112
+ if (!tunnelOptions.debug) {
109
113
  return undefined;
110
114
  }
111
115
  const index = (tunnelOptions.debugFunctionHandlers || []).findIndex((handler) => handler === sandboxName);
112
116
  if (index === -1) {
113
117
  return undefined;
114
118
  }
115
- return index + (tunnelOptions.debugStartingPort || 9229);
119
+ return index + tunnelOptions.debugStartingPort;
116
120
  }
117
121
  }
118
122
  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;AAE9D,qBAAa,oBAAqB,YAAW,cAAc;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,iBAAiB,EAAE;IAE5C,eAAe,CAAC,EAC3B,QAAQ,EAAE,EAAE,gBAAgB,EAAE,eAAe,EAAE,EAChD,EAAE;QACD,QAAQ,EAAE,UAAU,CAAC;KACtB,GAAG,OAAO,CAAC,aAAa,CAAC;IAgCb,IAAI;CAGlB"}
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,EAAY,MAAM,EAAQ,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC1E,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,CA6DpC;CACH"}
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>): Promise<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>): Promise<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,EAAE,UAAU,EAAE,gBAAgB,EAAY,MAAM,EAAqB,MAAM,mBAAmB,CAAC;AACtG,OAAO,EAAE,mBAAmB,EAAe,MAAM,gBAAgB,CAAC;AAGlE,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,CA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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: (0, __1.isInspectorEnabled)(),
89
+ isDebugMode: tunnelOptions.debug,
91
90
  appDirectory: process.cwd()
92
91
  });
93
92
  const compiler = (0, bundler_2.getCompiler)(config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/tunnel",
3
- "version": "5.0.1-next.0",
3
+ "version": "5.0.1-next.0-experimental-1c920ad",
4
4
  "description": "Tunnel functionality for Forge CLI",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
@@ -11,9 +11,9 @@
11
11
  "compile": "tsc -b -v"
12
12
  },
13
13
  "dependencies": {
14
- "@forge/bundler": "4.15.9",
15
- "@forge/cli-shared": "3.26.0",
16
- "@forge/csp": "3.2.1",
14
+ "@forge/bundler": "4.15.9-experimental-1c920ad",
15
+ "@forge/cli-shared": "3.26.0-experimental-1c920ad",
16
+ "@forge/csp": "3.2.1-experimental-1c920ad",
17
17
  "@forge/runtime": "5.6.0",
18
18
  "express": "^4.18.3",
19
19
  "express-intercept": "^1.1.0",