@forge/tunnel 3.8.0-next.9 → 3.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,260 @@
1
1
  # @forge/tunnel
2
2
 
3
+ ## 3.8.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8330ad7d]
8
+ - @forge/cli-shared@3.19.1-next.0
9
+ - @forge/bundler@4.12.2-next.0
10
+
11
+ ## 3.8.0
12
+
13
+ ### Minor Changes
14
+
15
+ - bd192806: Added ngrok config option to tunnel
16
+
17
+ ### Patch Changes
18
+
19
+ - 3a516891: Allow function timeout to be determined by payload in tunnel
20
+ - efffc256: Bumping dependencies via Renovate:
21
+
22
+ - @types/node
23
+
24
+ - c1c5fb59: Bumping dependencies via Renovate:
25
+
26
+ - @types/node
27
+
28
+ - 6f4e2f01: Bumping dependencies via Renovate:
29
+
30
+ - @types/jest
31
+
32
+ - 3d8ad494: Bumping dependencies via Renovate:
33
+
34
+ - @atlassian/xen-test-util
35
+
36
+ - 2c1ee248: Bumping dependencies via Renovate:
37
+
38
+ - @types/tmp
39
+
40
+ - Updated dependencies [31dc4c57]
41
+ - Updated dependencies [0160dc8c]
42
+ - Updated dependencies [00a6d9d6]
43
+ - Updated dependencies [3a516891]
44
+ - Updated dependencies [f232da40]
45
+ - Updated dependencies [33e05f3f]
46
+ - Updated dependencies [3994557a]
47
+ - Updated dependencies [641b0551]
48
+ - Updated dependencies [4fc8a79b]
49
+ - Updated dependencies [083a487e]
50
+ - Updated dependencies [7aba0598]
51
+ - Updated dependencies [efffc256]
52
+ - Updated dependencies [feb7bf63]
53
+ - Updated dependencies [521fda43]
54
+ - Updated dependencies [5540b552]
55
+ - Updated dependencies [c1c5fb59]
56
+ - Updated dependencies [6f4e2f01]
57
+ - Updated dependencies [764d4c0f]
58
+ - Updated dependencies [6ec038fe]
59
+ - Updated dependencies [4268a819]
60
+ - Updated dependencies [7d3fb7aa]
61
+ - Updated dependencies [3d8ad494]
62
+ - Updated dependencies [cbba9bd4]
63
+ - Updated dependencies [9d9361e8]
64
+ - Updated dependencies [4523b9cc]
65
+ - Updated dependencies [e6d5a27f]
66
+ - Updated dependencies [9e921628]
67
+ - Updated dependencies [fe74dfbd]
68
+ - Updated dependencies [bd192806]
69
+ - Updated dependencies [2c1ee248]
70
+ - @forge/bundler@4.12.1
71
+ - @forge/cli-shared@3.19.0
72
+ - @forge/runtime@5.1.0
73
+ - @forge/csp@2.2.2
74
+
75
+ ## 3.8.0-next.29
76
+
77
+ ### Patch Changes
78
+
79
+ - Updated dependencies [7aba0598]
80
+ - @forge/cli-shared@3.19.0-next.22
81
+ - @forge/bundler@4.12.1-next.28
82
+
83
+ ## 3.8.0-next.28
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies [e6d5a27f]
88
+ - @forge/cli-shared@3.19.0-next.21
89
+ - @forge/bundler@4.12.1-next.27
90
+
91
+ ## 3.8.0-next.27
92
+
93
+ ### Patch Changes
94
+
95
+ - Updated dependencies [0160dc8c]
96
+ - Updated dependencies [083a487e]
97
+ - @forge/cli-shared@3.19.0-next.20
98
+ - @forge/bundler@4.12.1-next.26
99
+
100
+ ## 3.8.0-next.26
101
+
102
+ ### Patch Changes
103
+
104
+ - 3d8ad494: Bumping dependencies via Renovate:
105
+
106
+ - @atlassian/xen-test-util
107
+
108
+ - Updated dependencies [3d8ad494]
109
+ - @forge/bundler@4.12.1-next.25
110
+ - @forge/cli-shared@3.19.0-next.19
111
+
112
+ ## 3.8.0-next.25
113
+
114
+ ### Patch Changes
115
+
116
+ - @forge/cli-shared@3.19.0-next.18
117
+ - @forge/bundler@4.12.1-next.24
118
+
119
+ ## 3.8.0-next.24
120
+
121
+ ### Patch Changes
122
+
123
+ - @forge/cli-shared@3.19.0-next.17
124
+ - @forge/bundler@4.12.1-next.23
125
+
126
+ ## 3.8.0-next.23
127
+
128
+ ### Patch Changes
129
+
130
+ - 2c1ee248: Bumping dependencies via Renovate:
131
+
132
+ - @types/tmp
133
+
134
+ - Updated dependencies [f232da40]
135
+ - Updated dependencies [2c1ee248]
136
+ - @forge/cli-shared@3.19.0-next.16
137
+ - @forge/bundler@4.12.1-next.22
138
+
139
+ ## 3.8.0-next.22
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies [31dc4c57]
144
+ - @forge/bundler@4.12.1-next.21
145
+
146
+ ## 3.8.0-next.21
147
+
148
+ ### Patch Changes
149
+
150
+ - Updated dependencies [764d4c0f]
151
+ - @forge/cli-shared@3.19.0-next.15
152
+ - @forge/bundler@4.12.1-next.20
153
+
154
+ ## 3.8.0-next.20
155
+
156
+ ### Patch Changes
157
+
158
+ - 3a516891: Allow function timeout to be determined by payload in tunnel
159
+ - Updated dependencies [3a516891]
160
+ - @forge/runtime@5.1.0-next.7
161
+ - @forge/bundler@4.12.1-next.19
162
+
163
+ ## 3.8.0-next.19
164
+
165
+ ### Patch Changes
166
+
167
+ - 6f4e2f01: Bumping dependencies via Renovate:
168
+
169
+ - @types/jest
170
+
171
+ - Updated dependencies [6f4e2f01]
172
+ - Updated dependencies [4523b9cc]
173
+ - @forge/bundler@4.12.1-next.18
174
+ - @forge/cli-shared@3.19.0-next.14
175
+ - @forge/csp@2.2.2-next.3
176
+ - @forge/runtime@5.1.0-next.6
177
+
178
+ ## 3.8.0-next.18
179
+
180
+ ### Patch Changes
181
+
182
+ - Updated dependencies [9d9361e8]
183
+ - @forge/cli-shared@3.19.0-next.13
184
+ - @forge/runtime@5.1.0-next.5
185
+ - @forge/bundler@4.12.1-next.17
186
+
187
+ ## 3.8.0-next.17
188
+
189
+ ### Patch Changes
190
+
191
+ - efffc256: Bumping dependencies via Renovate:
192
+
193
+ - @types/node
194
+
195
+ - Updated dependencies [efffc256]
196
+ - @forge/bundler@4.12.1-next.16
197
+ - @forge/cli-shared@3.19.0-next.12
198
+ - @forge/csp@2.2.2-next.2
199
+ - @forge/runtime@5.1.0-next.4
200
+
201
+ ## 3.8.0-next.16
202
+
203
+ ### Patch Changes
204
+
205
+ - Updated dependencies [641b0551]
206
+ - Updated dependencies [9e921628]
207
+ - @forge/cli-shared@3.19.0-next.11
208
+ - @forge/runtime@5.1.0-next.3
209
+ - @forge/bundler@4.12.1-next.15
210
+
211
+ ## 3.8.0-next.15
212
+
213
+ ### Patch Changes
214
+
215
+ - Updated dependencies [33e05f3f]
216
+ - @forge/csp@2.2.2-next.1
217
+
218
+ ## 3.8.0-next.14
219
+
220
+ ### Patch Changes
221
+
222
+ - Updated dependencies [4fc8a79b]
223
+ - Updated dependencies [feb7bf63]
224
+ - @forge/runtime@5.1.0-next.2
225
+ - @forge/cli-shared@3.19.0-next.10
226
+ - @forge/bundler@4.12.1-next.14
227
+
228
+ ## 3.8.0-next.13
229
+
230
+ ### Patch Changes
231
+
232
+ - Updated dependencies [cbba9bd4]
233
+ - @forge/cli-shared@3.19.0-next.9
234
+ - @forge/bundler@4.12.1-next.13
235
+
236
+ ## 3.8.0-next.12
237
+
238
+ ### Patch Changes
239
+
240
+ - @forge/cli-shared@3.19.0-next.8
241
+ - @forge/bundler@4.12.1-next.12
242
+
243
+ ## 3.8.0-next.11
244
+
245
+ ### Patch Changes
246
+
247
+ - @forge/cli-shared@3.19.0-next.7
248
+ - @forge/bundler@4.12.1-next.11
249
+
250
+ ## 3.8.0-next.10
251
+
252
+ ### Patch Changes
253
+
254
+ - Updated dependencies [00a6d9d6]
255
+ - @forge/runtime@5.1.0-next.1
256
+ - @forge/bundler@4.12.1-next.10
257
+
3
258
  ## 3.8.0-next.9
4
259
 
5
260
  ### Patch Changes
@@ -11,7 +11,6 @@ export interface Bundle {
11
11
  bundleFileSourceMapPath: string;
12
12
  bundleFileSourceMap?: string;
13
13
  }
14
- export declare const INVOCATION_TIMEOUT = 25;
15
14
  export declare const MEMORY_LIMIT = 256;
16
15
  export declare class LocalFunctionHost implements FunctionChangeWatcher {
17
16
  private readonly configFile;
@@ -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,MAAM,mBAAmB,CAAC;AACtG,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,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,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,kBAAkB,KAAK,CAAC;AACrC,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,GAAG,OAAO,CAAC,IAAI,CAAC;IA+CxD,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1C,OAAO,CAAC,YAAY,CAElB;YAEY,mBAAmB;CAsBlC"}
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,MAAM,mBAAmB,CAAC;AACtG,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,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,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,GAAG,OAAO,CAAC,IAAI,CAAC;IA+CxD,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1C,OAAO,CAAC,YAAY,CAElB;YAEY,mBAAmB;CAqBlC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LocalFunctionHost = exports.MEMORY_LIMIT = exports.INVOCATION_TIMEOUT = void 0;
3
+ exports.LocalFunctionHost = exports.MEMORY_LIMIT = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const path_1 = require("path");
6
6
  const fs_1 = require("fs");
@@ -8,7 +8,6 @@ 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 = 25;
12
11
  exports.MEMORY_LIMIT = 256;
13
12
  class LocalFunctionHost {
14
13
  constructor(configFile, logger, snapshot, createSandbox) {
@@ -93,7 +92,6 @@ class LocalFunctionHost {
93
92
  modName: module,
94
93
  appPath: srcPath,
95
94
  handler: func,
96
- timeout: exports.INVOCATION_TIMEOUT,
97
95
  isolateMemory: exports.MEMORY_LIMIT
98
96
  });
99
97
  }));
@@ -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;IA2DhF,MAAM,CAAC,gBAAgB,WAA6D;IAEpF,MAAM,CAAC,YAAY,wBACI,OAAO;;6BAEpB,MAAM,KACb,IAAI,CAUL;CACH"}
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;AAI9E,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;IA4DhF,MAAM,CAAC,gBAAgB,WAA6D;IAEpF,MAAM,CAAC,YAAY,wBACI,OAAO;;6BAEpB,MAAM,KACb,IAAI,CAUL;CACH"}
@@ -7,7 +7,7 @@ const index_1 = require("../index");
7
7
  const v4_1 = tslib_1.__importDefault(require("uuid/v4"));
8
8
  const runtime_1 = require("@forge/runtime");
9
9
  const cli_shared_1 = require("@forge/cli-shared");
10
- const interactors_1 = require("../command/interactors");
10
+ const DEFAULT_INVOCATION_TIMEOUT = 25;
11
11
  class LocalInvocationService {
12
12
  constructor(configFile, logger, inspector) {
13
13
  this.configFile = configFile;
@@ -15,6 +15,7 @@ class LocalInvocationService {
15
15
  this.inspector = inspector;
16
16
  }
17
17
  async invoke(handler, request) {
18
+ var _a;
18
19
  this.logger.info('');
19
20
  this.logger.info((0, util_1.formatInvocation)(handler, request));
20
21
  const sandbox = util_1.SandboxesContainer.get()[handler];
@@ -38,21 +39,22 @@ class LocalInvocationService {
38
39
  variables.push({ key: 'FUNCTION_IS_SNAPSHOTTED', value: isSnapshotEnabled.toString(), secure: false });
39
40
  }
40
41
  const requestId = (0, util_1.getRequestId)(request, (0, v4_1.default)());
42
+ const timeout = (_a = request._meta.timeout) !== null && _a !== void 0 ? _a : DEFAULT_INVOCATION_TIMEOUT;
41
43
  const xenInvocationRequest = (0, runtime_1.xenInvocationRequestFactory)({
42
44
  request: Object.assign(Object.assign({}, request), { variables }),
43
- ctx: { requestId, traceId: requestId, timeout: interactors_1.INVOCATION_TIMEOUT }
45
+ ctx: { requestId, traceId: requestId, timeout }
44
46
  });
45
47
  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);
48
+ const tunnelWarningTimeout = setTimeout(() => {
49
+ this.logger.warn(cli_shared_1.Text.tunnel.invocationTimeout(timeout));
50
+ }, timeout * 1000);
49
51
  const { body, metrics, success, error } = await (0, runtime_1.invoke)({
50
52
  sandbox,
51
53
  xenInvocationRequest,
52
54
  invocationLimits,
53
55
  inspector: inspect ? this.inspector : undefined
54
56
  });
55
- clearTimeout(timeout);
57
+ clearTimeout(tunnelWarningTimeout);
56
58
  const reportMetrics = xenInvocationRequest.isFeatureFlagEnabled(runtime_1.XEN_RUNTIME_SHOULD_REPORT_METRICS);
57
59
  LocalInvocationService.printMetrics(reportMetrics, metrics, this.logger);
58
60
  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.8.0-next.9",
3
+ "version": "3.8.1-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.12.1-next.9",
15
- "@forge/cli-shared": "3.19.0-next.6",
16
- "@forge/csp": "2.2.2-next.0",
17
- "@forge/runtime": "5.0.2-next.0",
14
+ "@forge/bundler": "4.12.2-next.0",
15
+ "@forge/cli-shared": "3.19.1-next.0",
16
+ "@forge/csp": "2.2.2",
17
+ "@forge/runtime": "5.1.0",
18
18
  "express": "^4.18.2",
19
19
  "express-intercept": "^1.1.0",
20
20
  "http-proxy-middleware": "^1.3.1",
@@ -26,13 +26,13 @@
26
26
  "webpack-dev-server": "^4.15.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@atlassian/xen-test-util": "^3.0.5",
30
- "@forge/manifest": "4.20.1-next.2",
29
+ "@atlassian/xen-test-util": "^3.1.0",
30
+ "@forge/manifest": "4.20.1",
31
31
  "@types/express": "^4.17.17",
32
- "@types/jest": "^29.5.4",
33
- "@types/node": "14.18.59",
32
+ "@types/jest": "^29.5.5",
33
+ "@types/node": "14.18.61",
34
34
  "@types/supertest": "^2.0.12",
35
- "@types/tmp": "^0.2.3",
35
+ "@types/tmp": "^0.2.4",
36
36
  "@types/uuid": "^3.4.11",
37
37
  "supertest": "^6.3.3"
38
38
  }