@forge/tunnel 1.7.4-next.4 → 1.8.1-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 CHANGED
@@ -1,5 +1,40 @@
1
1
  # @forge/tunnel
2
2
 
3
+ ## 1.8.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [671a6a6]
8
+ - @forge/csp@1.11.0-next.0
9
+ - @forge/runtime@2.1.1-next.0
10
+ - @forge/bundler@3.0.8-next.0
11
+
12
+ ## 1.8.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 44def0a: Derive the memory limit of the Isolate based on the Lambda memory available
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [44def0a]
21
+ - Updated dependencies [4f86661]
22
+ - Updated dependencies [6d7a574e]
23
+ - @forge/runtime@2.1.0
24
+ - @forge/cli-shared@2.5.0
25
+ - @forge/bundler@3.0.7
26
+
27
+ ## 1.8.0-next.5
28
+
29
+ ### Minor Changes
30
+
31
+ - 44def0a: Derive the memory limit of the Isolate based on the Lambda memory available
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies [44def0a]
36
+ - @forge/runtime@2.1.0-next.0
37
+
3
38
  ## 1.7.4-next.4
4
39
 
5
40
  ### Patch Changes
@@ -12,6 +12,7 @@ export interface FsInteractor {
12
12
  mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<void>;
13
13
  }
14
14
  export declare const INVOCATION_TIMEOUT = 10;
15
+ export declare const MEMORY_LIMIT = 256;
15
16
  export declare class LocalFunctionHost implements FunctionChangeWatcher {
16
17
  private readonly configFile;
17
18
  private readonly logger;
@@ -1 +1 @@
1
- {"version":3,"file":"function-change-watcher.d.ts","sourceRoot":"","sources":["../../../../src/tunnelling/command/interactors/function-change-watcher.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAG1C,OAAO,EAAE,UAAU,EAA8B,MAAM,EAAyB,MAAM,mBAAmB,CAAC;AAC1G,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAML,eAAe,EAChB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,WAAW,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACxE;AASD,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,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,YAAY;IAN/B,OAAO,CAAC,YAAY,CAA8C;gBAG/C,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,eAAe,EACzB,YAAY,EAAE,YAAY;YAG/B,mBAAmB;IAsBpB,aAAa,CAAC,WAAW,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IA8CxD,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1C,OAAO,CAAC,YAAY,CAElB;YAEY,8BAA8B;YAe9B,mBAAmB;CAqBlC"}
1
+ {"version":3,"file":"function-change-watcher.d.ts","sourceRoot":"","sources":["../../../../src/tunnelling/command/interactors/function-change-watcher.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,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: true });
3
- exports.LocalFunctionHost = exports.INVOCATION_TIMEOUT = void 0;
3
+ exports.LocalFunctionHost = exports.MEMORY_LIMIT = exports.INVOCATION_TIMEOUT = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const path_1 = require("path");
6
6
  const tmp_1 = tslib_1.__importDefault(require("tmp"));
@@ -8,6 +8,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
10
  exports.INVOCATION_TIMEOUT = 10;
11
+ exports.MEMORY_LIMIT = 256;
11
12
  class LocalFunctionHost {
12
13
  constructor(configFile, logger, snapshot, fsInteractor) {
13
14
  this.configFile = configFile;
@@ -22,7 +23,7 @@ class LocalFunctionHost {
22
23
  async generateBundleFiles(bundle, withSnapshot) {
23
24
  await this.fsInteractor.mkdir(path_1.dirname(bundle.bundleFilePath), { recursive: true });
24
25
  if (withSnapshot) {
25
- const snapshotOutput = await this.snapshot(Buffer.from(bundle.bundleFileContent), bundle.bundleFilePath, bundle.bundleFileSourceMap ? Buffer.from(bundle.bundleFileSourceMap) : undefined);
26
+ const snapshotOutput = await this.snapshot({ isolateMemory: exports.MEMORY_LIMIT }, Buffer.from(bundle.bundleFileContent), bundle.bundleFilePath, bundle.bundleFileSourceMap ? Buffer.from(bundle.bundleFileSourceMap) : undefined);
26
27
  await this.fsInteractor.writeFile(bundle.bundleFilePath + '.snapshot', Buffer.from(snapshotOutput.buffer));
27
28
  if (snapshotOutput.logs.length > 0) {
28
29
  this.snapshotLogs.push(snapshotOutput.logs);
@@ -86,7 +87,8 @@ class LocalFunctionHost {
86
87
  appPath: srcPath,
87
88
  modName: mod,
88
89
  handler: func,
89
- timeout: exports.INVOCATION_TIMEOUT
90
+ timeout: exports.INVOCATION_TIMEOUT,
91
+ isolateMemory: exports.MEMORY_LIMIT
90
92
  });
91
93
  }
92
94
  async initializeSandboxes(srcPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/tunnel",
3
- "version": "1.7.4-next.4",
3
+ "version": "1.8.1-next.0",
4
4
  "description": "Tunnel functionality for Forge CLI",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
@@ -16,11 +16,11 @@
16
16
  "postbuild": "chmod +x out/*.js"
17
17
  },
18
18
  "dependencies": {
19
- "@forge/bundler": "3.0.7-next.4",
20
- "@forge/cli-shared": "2.5.0-next.3",
21
- "@forge/csp": "^1.10.0",
19
+ "@forge/bundler": "3.0.8-next.0",
20
+ "@forge/cli-shared": "2.5.0",
21
+ "@forge/csp": "^1.11.0-next.0",
22
22
  "@forge/isolated-vm": "3.3.10",
23
- "@forge/runtime": "2.0.2",
23
+ "@forge/runtime": "2.1.1-next.0",
24
24
  "express": "^4.17.1",
25
25
  "express-mung": "^0.5.1",
26
26
  "http-proxy-middleware": "^1.0.6",
@@ -31,7 +31,7 @@
31
31
  "uuid": "^3.4.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@forge/manifest": "^3.8.0-next.1",
34
+ "@forge/manifest": "^3.8.0",
35
35
  "@types/express": "^4.17.2",
36
36
  "@types/express-mung": "^0.5.2",
37
37
  "@types/jest": "^26.0.0",