@forge/tunnel 3.8.10-next.1 → 3.8.10-next.10

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,77 @@
1
1
  # @forge/tunnel
2
2
 
3
+ ## 3.8.10-next.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [ea2f814]
8
+ - Updated dependencies [16a7cf5]
9
+ - @forge/bundler@4.14.4-next.10
10
+ - @forge/cli-shared@3.23.0-next.4
11
+ - @forge/runtime@5.3.0-next.3
12
+
13
+ ## 3.8.10-next.9
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [a0e5f61]
18
+ - @forge/bundler@4.14.4-next.9
19
+
20
+ ## 3.8.10-next.8
21
+
22
+ ### Patch Changes
23
+
24
+ - @forge/bundler@4.14.4-next.8
25
+
26
+ ## 3.8.10-next.7
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [579c6a2]
31
+ - @forge/runtime@5.3.0-next.2
32
+ - @forge/bundler@4.14.4-next.7
33
+
34
+ ## 3.8.10-next.6
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [97257f5]
39
+ - @forge/bundler@4.14.4-next.6
40
+
41
+ ## 3.8.10-next.5
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [680e21f]
46
+ - @forge/cli-shared@3.23.0-next.3
47
+ - @forge/runtime@5.3.0-next.1
48
+ - @forge/bundler@4.14.4-next.5
49
+
50
+ ## 3.8.10-next.4
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies [aca5a8b]
55
+ - @forge/bundler@4.14.4-next.4
56
+
57
+ ## 3.8.10-next.3
58
+
59
+ ### Patch Changes
60
+
61
+ - 35d83ed: Don't crash tunnel if no functions are defined
62
+ - Updated dependencies [0344667]
63
+ - @forge/bundler@4.14.4-next.3
64
+ - @forge/cli-shared@3.23.0-next.2
65
+
66
+ ## 3.8.10-next.2
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies [b3245a7]
71
+ - @forge/cli-shared@3.23.0-next.1
72
+ - @forge/runtime@5.3.0-next.0
73
+ - @forge/bundler@4.14.4-next.2
74
+
3
75
  ## 3.8.10-next.1
4
76
 
5
77
  ### Patch Changes
@@ -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;IAab,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;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"}
@@ -10,7 +10,15 @@ class MultiCompilerWatcher {
10
10
  onBuildWillStart,
11
11
  onBuildFinished
12
12
  })));
13
- return results.reduce((prev, curr) => (Object.assign(Object.assign({}, prev), curr)), {});
13
+ const multiResult = {
14
+ output: {}
15
+ };
16
+ for (const result of results) {
17
+ multiResult.output = Object.assign(Object.assign({}, multiResult.output), result.output);
18
+ multiResult.sourceMap = Object.assign(Object.assign({}, multiResult.sourceMap), result.sourceMap);
19
+ multiResult.metadata = Object.assign(Object.assign({}, multiResult.metadata), result.metadata);
20
+ }
21
+ return multiResult;
14
22
  }
15
23
  async stop() {
16
24
  await Promise.all(this.servers.map((server) => server.stop()));
@@ -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<any>;
17
+ compileAndWatch(hooks: WatchHooks<BundlerOutput>): 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 | undefined>;
41
+ compileAndWatch({ onBuildWillStart, onBuildFinished }: WatchHooks<BundlerOutput>): 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;AAE7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B;IAC7C,OAAO,CAAC,OAAO,CAAsB;gBAGlB,iBAAiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB;IAQxC,KAAK,CAAC,IAAI,SAAI,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAe5F,IAAI;IAIJ,eAAe,CAAC,EAC3B,gBAAgB,EAChB,eAAe,EAChB,EAAE,UAAU,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAsD9C,MAAM,IAAI,OAAO,CAAC,WAAW;IAI7B,gBAAgB,EAAE,OAAO,CAAC,OAAO,CA2CtC;CACH"}
@@ -80,7 +80,7 @@ class LocalDevelopmentServer {
80
80
  const handlers = await this.configFile.getAppHandlers();
81
81
  const entryPoints = (0, bundler_1.getEntryPoints)(handlers);
82
82
  if (!entryPoints.length) {
83
- return;
83
+ return { output: {} };
84
84
  }
85
85
  const getConfig = (await this.configFile.runtimeType()) === cli_shared_1.RuntimeType.nodejs
86
86
  ? (0, bundler_2.getNodeRuntimeBuildConfig)((0, bundler_1.getWrapperProvider)({ fileSystemReader: this.fileSystemReader }))
@@ -1,3 +1,4 @@
1
+ import { BundlerOutput } from '@forge/bundler';
1
2
  import { ResourceTunnelServer, ResourceTunnelServerArgs } from './resource-tunnel-server';
2
3
  import { DevelopmentServer, StartDevServerResult, WatchHooks } from './dev-server';
3
4
  export declare class NativeUITunnelServer extends ResourceTunnelServer implements DevelopmentServer {
@@ -5,7 +6,7 @@ export declare class NativeUITunnelServer extends ResourceTunnelServer implement
5
6
  private readonly server;
6
7
  constructor(tunnelArgs: ResourceTunnelServerArgs);
7
8
  start(): Promise<Required<StartDevServerResult>>;
8
- compileAndWatch({ onBuildWillStart, onBuildFinished }: WatchHooks): Promise<void>;
9
+ compileAndWatch({ onBuildWillStart, onBuildFinished }: WatchHooks): Promise<BundlerOutput>;
9
10
  stop(): Promise<void>;
10
11
  }
11
12
  //# sourceMappingURL=native-ui-tunnel-server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"native-ui-tunnel-server.d.ts","sourceRoot":"","sources":["../../src/servers/native-ui-tunnel-server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAG1F,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEnF,qBAAa,oBAAqB,SAAQ,oBAAqB,YAAW,iBAAiB;IAG7E,OAAO,CAAC,QAAQ,CAAC,UAAU;IAFvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;gBAEb,UAAU,EAAE,wBAAwB;IAoD3D,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IAWzC,eAAe,CAAC,EAAE,gBAAgB,EAAE,eAAe,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAsCxF,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
1
+ {"version":3,"file":"native-ui-tunnel-server.d.ts","sourceRoot":"","sources":["../../src/servers/native-ui-tunnel-server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAuE,MAAM,gBAAgB,CAAC;AACpH,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAG1F,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEnF,qBAAa,oBAAqB,SAAQ,oBAAqB,YAAW,iBAAiB;IAG7E,OAAO,CAAC,QAAQ,CAAC,UAAU;IAFvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;gBAEb,UAAU,EAAE,wBAAwB;IAoD3D,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IAWzC,eAAe,CAAC,EAAE,gBAAgB,EAAE,eAAe,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC;IAwCjG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
@@ -57,24 +57,26 @@ class NativeUITunnelServer extends resource_tunnel_server_1.ResourceTunnelServer
57
57
  await onBuildWillStart();
58
58
  watchRunCallback();
59
59
  });
60
- let isFirtCompilation = true;
60
+ let isFirstCompilation = true;
61
61
  return new Promise((resolve, reject) => {
62
62
  compiler.hooks.done.tapAsync('done', async (stats, doneCallback) => {
63
63
  const maybeError = stats.hasErrors() ? stats.compilation.getErrors()[0] : undefined;
64
64
  try {
65
65
  (0, bundler_1.handleWebpackCompilationResult)(this.logger, maybeError, stats);
66
66
  this.logger.info(cli_shared_1.LogColor.trace(cli_shared_1.Text.tunnel.resourcesBundlingSucceeded));
67
- if (!isFirtCompilation) {
67
+ if (!isFirstCompilation) {
68
68
  await onBuildFinished(null);
69
69
  }
70
70
  else {
71
- isFirtCompilation = false;
71
+ isFirstCompilation = false;
72
72
  }
73
- resolve({});
73
+ resolve({
74
+ output: {}
75
+ });
74
76
  }
75
77
  catch (err) {
76
78
  await onBuildFinished(err);
77
- isFirtCompilation = false;
79
+ isFirstCompilation = false;
78
80
  reject(err);
79
81
  }
80
82
  finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/tunnel",
3
- "version": "3.8.10-next.1",
3
+ "version": "3.8.10-next.10",
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.14.4-next.1",
15
- "@forge/cli-shared": "3.22.2-next.0",
14
+ "@forge/bundler": "4.14.4-next.10",
15
+ "@forge/cli-shared": "3.23.0-next.4",
16
16
  "@forge/csp": "3.1.3",
17
- "@forge/runtime": "5.2.3",
17
+ "@forge/runtime": "5.3.0-next.3",
18
18
  "express": "^4.18.2",
19
19
  "express-intercept": "^1.1.0",
20
20
  "http-proxy-middleware": "^2.0.6",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@atlassian/xen-test-util": "^3.1.3",
30
- "@forge/manifest": "5.4.1-next.0",
30
+ "@forge/manifest": "5.4.1-next.3",
31
31
  "@types/express": "^4.17.21",
32
32
  "@types/jest": "^29.5.11",
33
33
  "@types/node": "14.18.63",