@forge/tunnel 3.3.7-next.1 → 3.4.0-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 +66 -0
- package/out/command/interactors/function-change-watcher.d.ts +1 -1
- package/out/command/interactors/function-change-watcher.js +1 -1
- package/out/services/local-invocation-service.d.ts.map +1 -1
- package/out/services/local-invocation-service.js +4 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# @forge/tunnel
|
|
2
2
|
|
|
3
|
+
## 3.4.0-next.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 96f9f6d8: Handle URL and options passed together to HTTP polyfill
|
|
8
|
+
- Updated dependencies [96f9f6d8]
|
|
9
|
+
- @forge/bundler@4.7.0-next.9
|
|
10
|
+
- @forge/runtime@4.3.4-next.0
|
|
11
|
+
- @forge/cli-shared@3.11.2-next.5
|
|
12
|
+
|
|
13
|
+
## 3.4.0-next.9
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [4aaab2f2]
|
|
18
|
+
- @forge/cli-shared@3.11.2-next.4
|
|
19
|
+
- @forge/bundler@4.7.0-next.8
|
|
20
|
+
|
|
21
|
+
## 3.4.0-next.8
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- @forge/bundler@4.7.0-next.7
|
|
26
|
+
|
|
27
|
+
## 3.4.0-next.7
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [f0888c8]
|
|
32
|
+
- @forge/bundler@4.7.0-next.6
|
|
33
|
+
- @forge/cli-shared@3.11.2-next.3
|
|
34
|
+
|
|
35
|
+
## 3.4.0-next.6
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- @forge/bundler@4.6.8-next.5
|
|
40
|
+
|
|
41
|
+
## 3.4.0-next.5
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies [dc1c587]
|
|
46
|
+
- @forge/bundler@4.6.8-next.4
|
|
47
|
+
|
|
48
|
+
## 3.4.0-next.4
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [490911c]
|
|
53
|
+
- @forge/bundler@4.6.8-next.3
|
|
54
|
+
|
|
55
|
+
## 3.4.0-next.3
|
|
56
|
+
|
|
57
|
+
### Minor Changes
|
|
58
|
+
|
|
59
|
+
- 5298560: Added warning message for functions exceeding invocation timeout limit
|
|
60
|
+
|
|
61
|
+
## 3.3.7-next.2
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- Updated dependencies [79d5311]
|
|
66
|
+
- @forge/bundler@4.6.8-next.2
|
|
67
|
+
- @forge/cli-shared@3.11.2-next.2
|
|
68
|
+
|
|
3
69
|
## 3.3.7-next.1
|
|
4
70
|
|
|
5
71
|
### Patch Changes
|
|
@@ -11,7 +11,7 @@ export interface Bundle {
|
|
|
11
11
|
bundleFileSourceMapPath: string;
|
|
12
12
|
bundleFileSourceMap?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const INVOCATION_TIMEOUT =
|
|
14
|
+
export declare const INVOCATION_TIMEOUT = 25;
|
|
15
15
|
export declare const MEMORY_LIMIT = 256;
|
|
16
16
|
export declare class LocalFunctionHost implements FunctionChangeWatcher {
|
|
17
17
|
private readonly configFile;
|
|
@@ -8,7 +8,7 @@ const tmp_1 = tslib_1.__importDefault(require("tmp"));
|
|
|
8
8
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
9
9
|
const runtime_1 = require("@forge/runtime");
|
|
10
10
|
const util_1 = require("../../util");
|
|
11
|
-
exports.INVOCATION_TIMEOUT =
|
|
11
|
+
exports.INVOCATION_TIMEOUT = 25;
|
|
12
12
|
exports.MEMORY_LIMIT = 256;
|
|
13
13
|
class LocalFunctionHost {
|
|
14
14
|
constructor(configFile, logger, snapshot, createSandbox, featureFlags) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-invocation-service.d.ts","sourceRoot":"","sources":["../../src/services/local-invocation-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACL,mBAAmB,EACnB,SAAS,EAKV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,EAAyB,MAAM,mBAAmB,CAAC;AAG9E,qBAAa,sBAAuB,YAAW,iBAAiB;IAE5D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAFT,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS;IAG1B,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"local-invocation-service.d.ts","sourceRoot":"","sources":["../../src/services/local-invocation-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACL,mBAAmB,EACnB,SAAS,EAKV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,EAAyB,MAAM,mBAAmB,CAAC;AAG9E,qBAAa,sBAAuB,YAAW,iBAAiB;IAE5D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAFT,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS;IAG1B,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC;IA2DhF,MAAM,CAAC,gBAAgB,WAA6D;IAEpF,MAAM,CAAC,YAAY,wBACI,OAAO;;6BAEpB,MAAM,KACb,IAAI,CAUL;CACH"}
|
|
@@ -43,12 +43,16 @@ class LocalInvocationService {
|
|
|
43
43
|
ctx: { requestId, traceId: requestId, timeout: interactors_1.INVOCATION_TIMEOUT }
|
|
44
44
|
});
|
|
45
45
|
const invocationLimits = (0, runtime_1.perInvocationLimitsTrackerFactory)(xenInvocationRequest);
|
|
46
|
+
const timeout = setTimeout(() => {
|
|
47
|
+
this.logger.warn(cli_shared_1.Text.tunnel.invocationTimeout(interactors_1.INVOCATION_TIMEOUT));
|
|
48
|
+
}, interactors_1.INVOCATION_TIMEOUT * 1000);
|
|
46
49
|
const { body, metrics, success, error } = await (0, runtime_1.invoke)({
|
|
47
50
|
sandbox,
|
|
48
51
|
xenInvocationRequest,
|
|
49
52
|
invocationLimits,
|
|
50
53
|
inspector: inspect ? this.inspector : undefined
|
|
51
54
|
});
|
|
55
|
+
clearTimeout(timeout);
|
|
52
56
|
const reportMetrics = xenInvocationRequest.isFeatureFlagEnabled(runtime_1.XEN_RUNTIME_SHOULD_REPORT_METRICS);
|
|
53
57
|
LocalInvocationService.printMetrics(reportMetrics, metrics, this.logger);
|
|
54
58
|
return reportMetrics ? { body, metrics, success, error } : body;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/tunnel",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0-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.
|
|
15
|
-
"@forge/cli-shared": "3.11.2-next.
|
|
14
|
+
"@forge/bundler": "4.7.0-next.9",
|
|
15
|
+
"@forge/cli-shared": "3.11.2-next.5",
|
|
16
16
|
"@forge/csp": "2.1.3",
|
|
17
|
-
"@forge/runtime": "4.3.
|
|
17
|
+
"@forge/runtime": "4.3.4-next.0",
|
|
18
18
|
"express": "^4.17.1",
|
|
19
19
|
"express-intercept": "^0.8.10",
|
|
20
20
|
"http-proxy-middleware": "^1.0.6",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@atlassian/xen-test-util": "^1.1.1",
|
|
30
|
-
"@forge/manifest": "4.12.0-next.
|
|
30
|
+
"@forge/manifest": "4.12.0-next.4",
|
|
31
31
|
"@types/express": "^4.17.2",
|
|
32
32
|
"@types/jest": "^29.1.2",
|
|
33
|
-
"@types/node": "14.18.
|
|
33
|
+
"@types/node": "14.18.44",
|
|
34
34
|
"@types/supertest": "^2.0.12",
|
|
35
35
|
"@types/tmp": "^0.1.0",
|
|
36
36
|
"@types/uuid": "^3.4.10",
|