@forge/tunnel 0.0.0-experimental-64caa5a → 0.0.0-experimental-490cfcf
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 +476 -12
- package/out/tunnelling/command/interactors/function-change-watcher.js +1 -1
- package/out/tunnelling/command/start-tunnel-command.d.ts.map +1 -1
- package/out/tunnelling/command/start-tunnel-command.js +3 -2
- package/out/tunnelling/servers/dev-server.js +2 -2
- package/out/tunnelling/servers/resource-tunnel-server.d.ts +20 -2
- package/out/tunnelling/servers/resource-tunnel-server.d.ts.map +1 -1
- package/out/tunnelling/servers/resource-tunnel-server.js +14 -4
- package/out/tunnelling/services/local-invocation-service.d.ts +4 -0
- package/out/tunnelling/services/local-invocation-service.d.ts.map +1 -1
- package/out/tunnelling/services/local-invocation-service.js +11 -2
- package/out/tunnelling/util/invocation-utils.d.ts +6 -0
- package/out/tunnelling/util/invocation-utils.d.ts.map +1 -1
- package/out/tunnelling/util/invocation-utils.js +2 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,486 @@
|
|
|
1
1
|
# @forge/tunnel
|
|
2
2
|
|
|
3
|
-
## 0.0.0-experimental-
|
|
3
|
+
## 0.0.0-experimental-490cfcf
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- Updated dependencies [
|
|
8
|
-
- Updated dependencies [
|
|
7
|
+
- Updated dependencies [04cddca]
|
|
8
|
+
- Updated dependencies [b820659]
|
|
9
|
+
- @forge/bundler@0.0.0-experimental-490cfcf
|
|
10
|
+
- @forge/runtime@0.0.0-experimental-490cfcf
|
|
11
|
+
- @forge/cli-shared@0.0.0-experimental-490cfcf
|
|
12
|
+
|
|
13
|
+
## 1.6.1-next.3
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- @forge/cli-shared@2.3.1-next.1
|
|
18
|
+
- @forge/bundler@3.0.2-next.2
|
|
19
|
+
|
|
20
|
+
## 1.6.1-next.2
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [b820659]
|
|
25
|
+
- @forge/runtime@1.16.0-next.0
|
|
26
|
+
|
|
27
|
+
## 1.6.1-next.1
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [04cddcaa]
|
|
32
|
+
- @forge/bundler@3.0.2-next.1
|
|
33
|
+
|
|
34
|
+
## 1.6.1-next.0
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- @forge/cli-shared@2.3.1-next.0
|
|
39
|
+
- @forge/bundler@3.0.2-next.0
|
|
40
|
+
|
|
41
|
+
## 1.6.0
|
|
42
|
+
|
|
43
|
+
### Minor Changes
|
|
44
|
+
|
|
45
|
+
- cee5eea1: Observability improvements
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- 68c1a7f: Fix for observability
|
|
50
|
+
- ca79652: Improve observability
|
|
51
|
+
- Updated dependencies [b673009]
|
|
52
|
+
- Updated dependencies [cee5eea1]
|
|
53
|
+
- Updated dependencies [47a71a6]
|
|
54
|
+
- Updated dependencies [e95919f]
|
|
55
|
+
- Updated dependencies [56164fe]
|
|
56
|
+
- Updated dependencies [949bd40]
|
|
57
|
+
- Updated dependencies [cf2420d]
|
|
58
|
+
- Updated dependencies [ca79652]
|
|
59
|
+
- @forge/runtime@1.15.0
|
|
60
|
+
- @forge/cli-shared@2.3.0
|
|
61
|
+
- @forge/csp@1.10.0
|
|
62
|
+
- @forge/bundler@3.0.1
|
|
63
|
+
|
|
64
|
+
## 1.6.0-next.14
|
|
65
|
+
|
|
66
|
+
### Patch Changes
|
|
67
|
+
|
|
68
|
+
- @forge/cli-shared@2.3.0-next.11
|
|
69
|
+
- @forge/bundler@3.0.1-next.12
|
|
70
|
+
|
|
71
|
+
## 1.6.0-next.13
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- 68c1a7f3: Fix for observability
|
|
76
|
+
|
|
77
|
+
## 1.6.0-next.12
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- Updated dependencies [47a71a62]
|
|
82
|
+
- @forge/cli-shared@2.3.0-next.10
|
|
83
|
+
- @forge/runtime@1.15.0-next.4
|
|
84
|
+
- @forge/bundler@3.0.1-next.11
|
|
85
|
+
|
|
86
|
+
## 1.6.0-next.11
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- Updated dependencies [cf2420d2]
|
|
91
|
+
- @forge/cli-shared@2.3.0-next.9
|
|
92
|
+
- @forge/bundler@3.0.1-next.10
|
|
93
|
+
|
|
94
|
+
## 1.6.0-next.10
|
|
95
|
+
|
|
96
|
+
### Patch Changes
|
|
97
|
+
|
|
98
|
+
- Updated dependencies [b6730093]
|
|
99
|
+
- @forge/runtime@1.15.0-next.3
|
|
100
|
+
|
|
101
|
+
## 1.6.0-next.9
|
|
102
|
+
|
|
103
|
+
### Patch Changes
|
|
104
|
+
|
|
105
|
+
- @forge/cli-shared@2.3.0-next.8
|
|
106
|
+
- @forge/bundler@3.0.1-next.9
|
|
107
|
+
|
|
108
|
+
## 1.6.0-next.8
|
|
109
|
+
|
|
110
|
+
### Patch Changes
|
|
111
|
+
|
|
112
|
+
- ca79652: Improve observability
|
|
113
|
+
- Updated dependencies [ca79652]
|
|
114
|
+
- @forge/runtime@1.15.0-next.2
|
|
115
|
+
- @forge/cli-shared@2.3.0-next.7
|
|
116
|
+
- @forge/bundler@3.0.1-next.8
|
|
117
|
+
|
|
118
|
+
## 1.6.0-next.7
|
|
119
|
+
|
|
120
|
+
### Patch Changes
|
|
121
|
+
|
|
122
|
+
- Updated dependencies [e95919f]
|
|
123
|
+
- @forge/csp@1.10.0-next.1
|
|
124
|
+
- @forge/cli-shared@2.3.0-next.6
|
|
125
|
+
- @forge/bundler@3.0.1-next.7
|
|
126
|
+
|
|
127
|
+
## 1.6.0-next.6
|
|
128
|
+
|
|
129
|
+
### Patch Changes
|
|
130
|
+
|
|
131
|
+
- @forge/cli-shared@2.3.0-next.5
|
|
132
|
+
- @forge/bundler@3.0.1-next.6
|
|
133
|
+
|
|
134
|
+
## 1.6.0-next.5
|
|
135
|
+
|
|
136
|
+
### Patch Changes
|
|
137
|
+
|
|
138
|
+
- @forge/cli-shared@2.3.0-next.4
|
|
139
|
+
- @forge/bundler@3.0.1-next.5
|
|
140
|
+
|
|
141
|
+
## 1.6.0-next.4
|
|
142
|
+
|
|
143
|
+
### Minor Changes
|
|
144
|
+
|
|
145
|
+
- cee5eea: Observability improvements
|
|
146
|
+
|
|
147
|
+
### Patch Changes
|
|
148
|
+
|
|
149
|
+
- Updated dependencies [cee5eea]
|
|
150
|
+
- @forge/runtime@1.15.0-next.1
|
|
151
|
+
- @forge/cli-shared@2.3.0-next.3
|
|
152
|
+
- @forge/bundler@3.0.1-next.4
|
|
153
|
+
|
|
154
|
+
## 1.5.3-next.3
|
|
155
|
+
|
|
156
|
+
### Patch Changes
|
|
157
|
+
|
|
158
|
+
- @forge/cli-shared@2.3.0-next.2
|
|
159
|
+
- @forge/bundler@3.0.1-next.3
|
|
160
|
+
|
|
161
|
+
## 1.5.3-next.2
|
|
162
|
+
|
|
163
|
+
### Patch Changes
|
|
164
|
+
|
|
165
|
+
- Updated dependencies [56164fe]
|
|
166
|
+
- @forge/csp@1.10.0-next.0
|
|
167
|
+
- @forge/runtime@1.14.1-next.0
|
|
168
|
+
- @forge/bundler@3.0.1-next.2
|
|
169
|
+
|
|
170
|
+
## 1.5.3-next.1
|
|
171
|
+
|
|
172
|
+
### Patch Changes
|
|
173
|
+
|
|
174
|
+
- @forge/cli-shared@2.3.0-next.1
|
|
175
|
+
- @forge/bundler@3.0.1-next.1
|
|
176
|
+
|
|
177
|
+
## 1.5.3-next.0
|
|
178
|
+
|
|
179
|
+
### Patch Changes
|
|
180
|
+
|
|
181
|
+
- Updated dependencies [949bd40]
|
|
182
|
+
- @forge/cli-shared@2.3.0-next.0
|
|
183
|
+
- @forge/bundler@3.0.1-next.0
|
|
184
|
+
|
|
185
|
+
## 1.5.2
|
|
186
|
+
|
|
187
|
+
### Patch Changes
|
|
188
|
+
|
|
189
|
+
- Updated dependencies [1f6cf08]
|
|
190
|
+
- Updated dependencies [f27cbfc]
|
|
191
|
+
- Updated dependencies [04fcd8c]
|
|
192
|
+
- Updated dependencies [3103a29]
|
|
193
|
+
- Updated dependencies [60fcb01]
|
|
194
|
+
- Updated dependencies [66f17fe]
|
|
195
|
+
- Updated dependencies [25bcf54]
|
|
196
|
+
- Updated dependencies [057cdfc]
|
|
197
|
+
- @forge/bundler@3.0.0
|
|
198
|
+
- @forge/runtime@1.14.0
|
|
199
|
+
- @forge/cli-shared@2.2.2
|
|
200
|
+
|
|
201
|
+
## 1.5.2-next.11
|
|
202
|
+
|
|
203
|
+
### Patch Changes
|
|
204
|
+
|
|
205
|
+
- Updated dependencies [04fcd8c7]
|
|
206
|
+
- @forge/bundler@3.0.0-next.10
|
|
207
|
+
|
|
208
|
+
## 1.5.2-next.10
|
|
209
|
+
|
|
210
|
+
### Patch Changes
|
|
211
|
+
|
|
212
|
+
- Updated dependencies [057cdfcc]
|
|
213
|
+
- @forge/bundler@3.0.0-next.9
|
|
214
|
+
- @forge/cli-shared@2.2.2-next.6
|
|
215
|
+
|
|
216
|
+
## 1.5.2-next.9
|
|
217
|
+
|
|
218
|
+
### Patch Changes
|
|
219
|
+
|
|
220
|
+
- @forge/cli-shared@2.2.2-next.5
|
|
221
|
+
- @forge/bundler@3.0.0-next.8
|
|
222
|
+
|
|
223
|
+
## 1.5.2-next.8
|
|
224
|
+
|
|
225
|
+
### Patch Changes
|
|
226
|
+
|
|
227
|
+
- Updated dependencies [3103a290]
|
|
228
|
+
- @forge/bundler@3.0.0-next.7
|
|
229
|
+
- @forge/cli-shared@2.2.2-next.4
|
|
230
|
+
|
|
231
|
+
## 1.5.2-next.7
|
|
232
|
+
|
|
233
|
+
### Patch Changes
|
|
234
|
+
|
|
235
|
+
- Updated dependencies [66f17fe]
|
|
236
|
+
- @forge/runtime@1.14.0-next.1
|
|
237
|
+
|
|
238
|
+
## 1.5.2-next.6
|
|
239
|
+
|
|
240
|
+
### Patch Changes
|
|
241
|
+
|
|
242
|
+
- Updated dependencies [60fcb01]
|
|
243
|
+
- @forge/bundler@3.0.0-next.6
|
|
244
|
+
|
|
245
|
+
## 1.5.2-next.5
|
|
246
|
+
|
|
247
|
+
### Patch Changes
|
|
248
|
+
|
|
249
|
+
- Updated dependencies [1f6cf083]
|
|
250
|
+
- @forge/bundler@2.1.0-next.5
|
|
251
|
+
|
|
252
|
+
## 1.5.2-next.4
|
|
253
|
+
|
|
254
|
+
### Patch Changes
|
|
255
|
+
|
|
256
|
+
- Updated dependencies [25bcf54e]
|
|
257
|
+
- @forge/runtime@1.14.0-next.0
|
|
258
|
+
- @forge/cli-shared@2.2.2-next.3
|
|
259
|
+
- @forge/bundler@2.0.1-next.4
|
|
260
|
+
|
|
261
|
+
## 1.5.2-next.3
|
|
262
|
+
|
|
263
|
+
### Patch Changes
|
|
264
|
+
|
|
265
|
+
- @forge/cli-shared@2.2.2-next.2
|
|
266
|
+
- @forge/bundler@2.0.1-next.3
|
|
267
|
+
|
|
268
|
+
## 1.5.2-next.2
|
|
269
|
+
|
|
270
|
+
### Patch Changes
|
|
271
|
+
|
|
272
|
+
- @forge/cli-shared@2.2.2-next.1
|
|
273
|
+
- @forge/bundler@2.0.1-next.2
|
|
274
|
+
|
|
275
|
+
## 1.5.2-next.1
|
|
276
|
+
|
|
277
|
+
### Patch Changes
|
|
278
|
+
|
|
279
|
+
- Updated dependencies [f27cbfc]
|
|
280
|
+
- @forge/bundler@2.0.1-next.1
|
|
281
|
+
|
|
282
|
+
## 1.5.2-next.0
|
|
283
|
+
|
|
284
|
+
### Patch Changes
|
|
285
|
+
|
|
286
|
+
- @forge/cli-shared@2.2.2-next.0
|
|
287
|
+
- @forge/bundler@2.0.1-next.0
|
|
288
|
+
|
|
289
|
+
## 1.5.1
|
|
290
|
+
|
|
291
|
+
### Patch Changes
|
|
292
|
+
|
|
293
|
+
- Updated dependencies [37f9898]
|
|
294
|
+
- Updated dependencies [037c31a5]
|
|
295
|
+
- Updated dependencies [7d0ef8b]
|
|
296
|
+
- @forge/bundler@2.0.0
|
|
297
|
+
- @forge/runtime@1.13.0
|
|
298
|
+
- @forge/cli-shared@2.2.1
|
|
299
|
+
|
|
300
|
+
## 1.5.1-next.13
|
|
301
|
+
|
|
302
|
+
### Patch Changes
|
|
303
|
+
|
|
304
|
+
- Updated dependencies [7d0ef8b]
|
|
305
|
+
- @forge/bundler@2.0.0-next.13
|
|
306
|
+
|
|
307
|
+
## 1.5.1-next.12
|
|
308
|
+
|
|
309
|
+
### Patch Changes
|
|
310
|
+
|
|
311
|
+
- @forge/cli-shared@2.2.1-next.9
|
|
312
|
+
- @forge/bundler@2.0.0-next.12
|
|
313
|
+
|
|
314
|
+
## 1.5.1-next.11
|
|
315
|
+
|
|
316
|
+
### Patch Changes
|
|
317
|
+
|
|
318
|
+
- Updated dependencies [37f9898]
|
|
319
|
+
- @forge/bundler@2.0.0-next.11
|
|
320
|
+
|
|
321
|
+
## 1.5.1-next.10
|
|
322
|
+
|
|
323
|
+
### Patch Changes
|
|
324
|
+
|
|
325
|
+
- @forge/bundler@2.0.0-next.10
|
|
326
|
+
- @forge/cli-shared@2.2.1-next.8
|
|
327
|
+
|
|
328
|
+
## 1.5.1-next.9
|
|
329
|
+
|
|
330
|
+
### Patch Changes
|
|
331
|
+
|
|
332
|
+
- Updated dependencies [037c31a]
|
|
333
|
+
- @forge/bundler@2.0.0-next.9
|
|
334
|
+
- @forge/runtime@1.13.0-next.1
|
|
335
|
+
- @forge/cli-shared@2.2.1-next.7
|
|
336
|
+
|
|
337
|
+
## 1.5.1-next.8
|
|
338
|
+
|
|
339
|
+
### Patch Changes
|
|
340
|
+
|
|
341
|
+
- @forge/bundler@1.1.1-next.8
|
|
342
|
+
|
|
343
|
+
## 1.5.1-next.7
|
|
344
|
+
|
|
345
|
+
### Patch Changes
|
|
346
|
+
|
|
347
|
+
- @forge/cli-shared@2.2.1-next.6
|
|
348
|
+
- @forge/bundler@1.1.1-next.7
|
|
349
|
+
|
|
350
|
+
## 1.5.1-next.6
|
|
351
|
+
|
|
352
|
+
### Patch Changes
|
|
353
|
+
|
|
354
|
+
- @forge/bundler@1.1.1-next.6
|
|
355
|
+
|
|
356
|
+
## 1.5.1-next.5
|
|
357
|
+
|
|
358
|
+
### Patch Changes
|
|
359
|
+
|
|
360
|
+
- @forge/cli-shared@2.2.1-next.5
|
|
361
|
+
- @forge/bundler@1.1.1-next.5
|
|
362
|
+
|
|
363
|
+
## 1.5.1-next.4
|
|
364
|
+
|
|
365
|
+
### Patch Changes
|
|
366
|
+
|
|
367
|
+
- @forge/bundler@1.1.1-next.4
|
|
368
|
+
- @forge/cli-shared@2.2.1-next.4
|
|
369
|
+
|
|
370
|
+
## 1.5.1-next.3
|
|
371
|
+
|
|
372
|
+
### Patch Changes
|
|
373
|
+
|
|
374
|
+
- @forge/cli-shared@2.2.1-next.3
|
|
375
|
+
- @forge/bundler@1.1.1-next.3
|
|
376
|
+
|
|
377
|
+
## 1.5.1-next.2
|
|
378
|
+
|
|
379
|
+
### Patch Changes
|
|
380
|
+
|
|
381
|
+
- @forge/bundler@1.1.1-next.2
|
|
382
|
+
- @forge/cli-shared@2.2.1-next.2
|
|
383
|
+
|
|
384
|
+
## 1.5.1-next.1
|
|
385
|
+
|
|
386
|
+
### Patch Changes
|
|
387
|
+
|
|
388
|
+
- @forge/runtime@1.12.1-next.0
|
|
389
|
+
- @forge/cli-shared@2.2.1-next.1
|
|
390
|
+
- @forge/bundler@1.1.1-next.1
|
|
391
|
+
|
|
392
|
+
## 1.5.1-next.0
|
|
393
|
+
|
|
394
|
+
### Patch Changes
|
|
395
|
+
|
|
396
|
+
- @forge/cli-shared@2.2.1-next.0
|
|
397
|
+
- @forge/bundler@1.1.1-next.0
|
|
398
|
+
|
|
399
|
+
## 1.5.0
|
|
400
|
+
|
|
401
|
+
### Minor Changes
|
|
402
|
+
|
|
403
|
+
- 1c196ff: Add support for external fetch client to reference remote
|
|
404
|
+
- 6abbbd0: Upgrade forge runtime to use node 14
|
|
405
|
+
|
|
406
|
+
### Patch Changes
|
|
407
|
+
|
|
408
|
+
- Updated dependencies [1dba082]
|
|
409
|
+
- Updated dependencies [1c196ff]
|
|
410
|
+
- Updated dependencies [1dba082]
|
|
9
411
|
- Updated dependencies [8571c05]
|
|
10
|
-
- Updated dependencies [
|
|
11
|
-
- Updated dependencies [
|
|
12
|
-
- Updated dependencies [
|
|
13
|
-
- Updated dependencies [
|
|
14
|
-
- Updated dependencies [
|
|
412
|
+
- Updated dependencies [8c1de69]
|
|
413
|
+
- Updated dependencies [1dba082]
|
|
414
|
+
- Updated dependencies [1dba082]
|
|
415
|
+
- Updated dependencies [6abbbd0]
|
|
416
|
+
- Updated dependencies [1dba082]
|
|
15
417
|
- Updated dependencies [b63af27]
|
|
16
|
-
- @forge/bundler@
|
|
17
|
-
- @forge/runtime@
|
|
18
|
-
- @forge/
|
|
19
|
-
- @forge/
|
|
418
|
+
- @forge/bundler@1.1.0
|
|
419
|
+
- @forge/runtime@1.12.0
|
|
420
|
+
- @forge/csp@1.9.0
|
|
421
|
+
- @forge/cli-shared@2.2.0
|
|
422
|
+
|
|
423
|
+
## 1.5.0-next.27
|
|
424
|
+
|
|
425
|
+
### Patch Changes
|
|
426
|
+
|
|
427
|
+
- @forge/cli-shared@2.2.0-next.22
|
|
428
|
+
- @forge/bundler@1.1.0-next.25
|
|
429
|
+
|
|
430
|
+
## 1.5.0-next.26
|
|
431
|
+
|
|
432
|
+
### Patch Changes
|
|
433
|
+
|
|
434
|
+
- @forge/cli-shared@2.2.0-next.21
|
|
435
|
+
- @forge/bundler@1.1.0-next.24
|
|
436
|
+
|
|
437
|
+
## 1.5.0-next.25
|
|
438
|
+
|
|
439
|
+
### Patch Changes
|
|
440
|
+
|
|
441
|
+
- @forge/cli-shared@2.2.0-next.20
|
|
442
|
+
- @forge/bundler@1.1.0-next.23
|
|
443
|
+
|
|
444
|
+
## 1.5.0-next.24
|
|
445
|
+
|
|
446
|
+
### Minor Changes
|
|
447
|
+
|
|
448
|
+
- 1c196ff: Add support for external fetch client to reference remote
|
|
449
|
+
|
|
450
|
+
### Patch Changes
|
|
451
|
+
|
|
452
|
+
- Updated dependencies [1c196ff]
|
|
453
|
+
- @forge/csp@1.9.0-next.1
|
|
454
|
+
- @forge/runtime@1.12.0-next.7
|
|
455
|
+
- @forge/cli-shared@2.2.0-next.19
|
|
456
|
+
- @forge/bundler@1.1.0-next.22
|
|
457
|
+
|
|
458
|
+
## 1.5.0-next.23
|
|
459
|
+
|
|
460
|
+
### Patch Changes
|
|
461
|
+
|
|
462
|
+
- Updated dependencies [8c1de69]
|
|
463
|
+
- @forge/runtime@1.12.0-next.6
|
|
464
|
+
|
|
465
|
+
## 1.5.0-next.22
|
|
466
|
+
|
|
467
|
+
### Minor Changes
|
|
468
|
+
|
|
469
|
+
- 6abbbd0: Upgrade forge runtime to use node 14
|
|
470
|
+
|
|
471
|
+
### Patch Changes
|
|
472
|
+
|
|
473
|
+
- Updated dependencies [6abbbd0]
|
|
474
|
+
- @forge/runtime@1.12.0-next.5
|
|
475
|
+
- @forge/cli-shared@2.2.0-next.18
|
|
476
|
+
- @forge/bundler@1.1.0-next.21
|
|
477
|
+
|
|
478
|
+
## 1.4.9-next.21
|
|
479
|
+
|
|
480
|
+
### Patch Changes
|
|
481
|
+
|
|
482
|
+
- @forge/cli-shared@2.2.0-next.17
|
|
483
|
+
- @forge/bundler@1.1.0-next.20
|
|
20
484
|
|
|
21
485
|
## 1.4.9-next.20
|
|
22
486
|
|
|
@@ -49,7 +49,7 @@ class LocalFunctionHost {
|
|
|
49
49
|
bundleFileSourceMapPath: path_1.resolve(directory, `${bundleName}.js.map`),
|
|
50
50
|
bundleFileSourceMap: bundledCode.sourceMap ? bundledCode.sourceMap[bundleName] : undefined
|
|
51
51
|
}));
|
|
52
|
-
const manifestFilePath = path_1.resolve(directory, cli_shared_1.
|
|
52
|
+
const manifestFilePath = path_1.resolve(directory, cli_shared_1.manifestFileName);
|
|
53
53
|
const manifestContents = JSON.stringify(await this.configFile.readConfig());
|
|
54
54
|
const allPromises = [];
|
|
55
55
|
bundles.forEach((bundle) => allPromises.push(this.generateBundleFiles(bundle, isSnapshotEnabled)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-tunnel-command.d.ts","sourceRoot":"","sources":["../../../src/tunnelling/command/start-tunnel-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAqB,MAAM,gBAAgB,CAAC;AAI9D,OAAO,EAAE,iBAAiB,EAA2C,MAAM,YAAY,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAsC,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,eAAe,CAAC,WAAW,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAED,qBAAa,kBAAkB;IAK3B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAX7B,OAAO,CAAC,aAAa,CAA4C;IACjE,OAAO,CAAC,iBAAiB,CAAgC;gBAGtC,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,iBAAiB,EAC5B,aAAa,EAAE,mBAAmB,EAClC,YAAY,EAAE,qBAAqB,EACnC,YAAY,EAAE,qBAAqB,EACnC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU;IAGzC,OAAO,CAAC,YAAY,CAUlB;IAEF,OAAO,CAAC,qBAAqB,CAS3B;IAEF,OAAO,CAAC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"start-tunnel-command.d.ts","sourceRoot":"","sources":["../../../src/tunnelling/command/start-tunnel-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAqB,MAAM,gBAAgB,CAAC;AAI9D,OAAO,EAAE,iBAAiB,EAA2C,MAAM,YAAY,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAsC,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,eAAe,CAAC,WAAW,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAED,qBAAa,kBAAkB;IAK3B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAX7B,OAAO,CAAC,aAAa,CAA4C;IACjE,OAAO,CAAC,iBAAiB,CAAgC;gBAGtC,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,iBAAiB,EAC5B,aAAa,EAAE,mBAAmB,EAClC,YAAY,EAAE,qBAAqB,EACnC,YAAY,EAAE,qBAAqB,EACnC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU;IAGzC,OAAO,CAAC,YAAY,CAUlB;IAEF,OAAO,CAAC,qBAAqB,CAS3B;IAEF,OAAO,CAAC,0BAA0B,CAiChC;IAEW,OAAO,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAwC9E"}
|
|
@@ -44,7 +44,7 @@ class StartTunnelCommand {
|
|
|
44
44
|
var _a, _b;
|
|
45
45
|
const resourcePortMap = JSON.parse((_a = process.env.RESOURCE_PORT_MAP) !== null && _a !== void 0 ? _a : '{}');
|
|
46
46
|
const resourceDetails = await this.configFile.getResources();
|
|
47
|
-
const { permissions = {} } = await this.configFile.readConfig();
|
|
47
|
+
const { permissions = {}, remotes = [] } = await this.configFile.readConfig();
|
|
48
48
|
const cspReporterPort = parseInt((_b = process.env.CSP_REPORTER_PORT) !== null && _b !== void 0 ? _b : '4000', 10);
|
|
49
49
|
if (resourceDetails.length === 0)
|
|
50
50
|
return [];
|
|
@@ -53,7 +53,8 @@ class StartTunnelCommand {
|
|
|
53
53
|
return await Promise.all(resourceDetails.map(async (rd) => {
|
|
54
54
|
const { key } = rd;
|
|
55
55
|
const port = resourcePortMap[key];
|
|
56
|
-
this.tunnelServers[key] = new servers_1.ResourceTunnelServer(Object.assign(Object.assign({}, rd), { port, logger: this.logger, cspReporterServerPort: cspReporterPort, permissions
|
|
56
|
+
this.tunnelServers[key] = new servers_1.ResourceTunnelServer(Object.assign(Object.assign({}, rd), { port, logger: this.logger, cspReporterServerPort: cspReporterPort, permissions,
|
|
57
|
+
remotes }));
|
|
57
58
|
await this.tunnelServers[key].start();
|
|
58
59
|
return {
|
|
59
60
|
resourceKey: key,
|
|
@@ -27,8 +27,8 @@ class LocalDevelopmentServer {
|
|
|
27
27
|
}).filter((item) => typeof item === 'string')) !== null && _f !== void 0 ? _f : undefined;
|
|
28
28
|
request._meta = Object.assign(Object.assign({}, request._meta), { fetchAllowList: allowList });
|
|
29
29
|
try {
|
|
30
|
-
const
|
|
31
|
-
res.json(
|
|
30
|
+
const invokeResults = await this.invocationService.invoke(request.handler, request);
|
|
31
|
+
res.json(invokeResults);
|
|
32
32
|
}
|
|
33
33
|
catch (error) {
|
|
34
34
|
try {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Resource, Logger } from '@forge/cli-shared';
|
|
2
2
|
import { Express } from 'express';
|
|
3
|
-
import type { Permissions } from '@forge/manifest';
|
|
3
|
+
import type { Permissions, Remotes } from '@forge/manifest';
|
|
4
4
|
export interface ResourceTunnelServerArgs extends Resource {
|
|
5
5
|
port: number;
|
|
6
6
|
logger: Logger;
|
|
7
7
|
permissions: Permissions;
|
|
8
8
|
cspReporterServerPort: number;
|
|
9
|
+
remotes: Remotes;
|
|
9
10
|
}
|
|
10
11
|
export declare class ResourceTunnelServer {
|
|
11
12
|
private readonly port;
|
|
@@ -17,8 +18,25 @@ export declare class ResourceTunnelServer {
|
|
|
17
18
|
private readonly proxy;
|
|
18
19
|
private socket;
|
|
19
20
|
private cspReporterServerPort;
|
|
20
|
-
constructor({ port, key, path, tunnel, permissions, logger, cspReporterServerPort }: ResourceTunnelServerArgs);
|
|
21
|
+
constructor({ port, key, path, tunnel, permissions, remotes, logger, cspReporterServerPort }: ResourceTunnelServerArgs);
|
|
21
22
|
getApp(): Express;
|
|
23
|
+
static transformPermissionsWithRemotes(permissions: Permissions, remotes: Remotes): {
|
|
24
|
+
external: {
|
|
25
|
+
fetch: {
|
|
26
|
+
client: string[] | undefined;
|
|
27
|
+
backend?: import("@forge/manifest/out/schema/manifest").Backend | undefined;
|
|
28
|
+
};
|
|
29
|
+
fonts?: import("@forge/manifest/out/schema/manifest").Fonts | undefined;
|
|
30
|
+
frames?: import("@forge/manifest/out/schema/manifest").Frames | undefined;
|
|
31
|
+
navigation?: import("@forge/manifest/out/schema/manifest").Navigation | undefined;
|
|
32
|
+
images?: import("@forge/manifest/out/schema/manifest").Images | undefined;
|
|
33
|
+
media?: import("@forge/manifest/out/schema/manifest").Media | undefined;
|
|
34
|
+
scripts?: import("@forge/manifest/out/schema/manifest").Scripts1 | undefined;
|
|
35
|
+
styles?: import("@forge/manifest/out/schema/manifest").Styles1 | undefined;
|
|
36
|
+
};
|
|
37
|
+
scopes?: import("@forge/manifest/out/schema/manifest").Scopes | undefined;
|
|
38
|
+
content?: import("@forge/manifest/out/schema/manifest").Content1 | undefined;
|
|
39
|
+
};
|
|
22
40
|
start(): Promise<void>;
|
|
23
41
|
stop(): Promise<void>;
|
|
24
42
|
private logFileServed;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-tunnel-server.d.ts","sourceRoot":"","sources":["../../../src/tunnelling/servers/resource-tunnel-server.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAMR,MAAM,EAGP,MAAM,mBAAmB,CAAC;AAC3B,OAAgB,EAAE,OAAO,EAAqB,MAAM,SAAS,CAAC;AAM9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"resource-tunnel-server.d.ts","sourceRoot":"","sources":["../../../src/tunnelling/servers/resource-tunnel-server.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAMR,MAAM,EAGP,MAAM,mBAAmB,CAAC;AAC3B,OAAgB,EAAE,OAAO,EAAqB,MAAM,SAAS,CAAC;AAM9D,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,wBAAyB,SAAQ,QAAQ;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;IACzB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;CAClB;AAYD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,SAAgB,GAAG,EAAE,MAAM,CAAC;IAC5B,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAU;IAC9B,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA6B;IACnD,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,qBAAqB,CAAS;gBAE1B,EACV,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,MAAM,EACN,WAAW,EACX,OAAO,EACP,MAAM,EACN,qBAAqB,EACtB,EAAE,wBAAwB;IA0C3B,MAAM,IAAI,OAAO;IAIjB,MAAM,CAAC,+BAA+B,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;;;IAa3E,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAStB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAc3B,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,gCAAgC;IAoBxC,OAAO,CAAC,sBAAsB;IAQ9B,OAAO,CAAC,YAAY,CAOJ;IAEhB,OAAO,CAAC,wBAAwB,CAG3B;IAEL,OAAO,CAAC,yBAAyB,CAG5B;IAEL,OAAO,CAAC,6BAA6B,CAwBhC;CACN"}
|
|
@@ -13,7 +13,7 @@ var ConnectionErrorCode;
|
|
|
13
13
|
})(ConnectionErrorCode || (ConnectionErrorCode = {}));
|
|
14
14
|
const HOST = process.env.FORGE_DEV_TUNNEL ? 'localhost' : 'host.docker.internal';
|
|
15
15
|
class ResourceTunnelServer {
|
|
16
|
-
constructor({ port, key, path, tunnel, permissions, logger, cspReporterServerPort }) {
|
|
16
|
+
constructor({ port, key, path, tunnel, permissions, remotes, logger, cspReporterServerPort }) {
|
|
17
17
|
this.getCspHeader = (existingCsp) => new csp_1.CSPInjectionService()
|
|
18
18
|
.getInjectableCSP(existingCsp, cli_shared_1.getEnvironment(cli_shared_1.CDNEnvironments), `http://localhost:${this.cspReporterServerPort}`)
|
|
19
19
|
.join('; ');
|
|
@@ -23,14 +23,14 @@ class ResourceTunnelServer {
|
|
|
23
23
|
this.injectIframeResizerScript = (htmlContent) => new cli_shared_1.IframeResizerScriptService().injectIframeResizer(htmlContent, () => {
|
|
24
24
|
throw new Error('Malformed HTML document');
|
|
25
25
|
});
|
|
26
|
-
this.getCustomUIResourceMiddleware = (permissions) => express_mung_1.write((body, _, __, res) => {
|
|
26
|
+
this.getCustomUIResourceMiddleware = (permissions, remotes) => express_mung_1.write((body, _, __, res) => {
|
|
27
27
|
const contentType = res.getHeaders()['content-type'];
|
|
28
28
|
if (!contentType.startsWith('text/html'))
|
|
29
29
|
return body;
|
|
30
30
|
res.removeHeader('content-length');
|
|
31
31
|
const htmlContentWithIframeResizerScript = this.injectIframeResizerScript(body);
|
|
32
32
|
const htmlContentWithBridgeScript = this.injectGlobalBridgeScript(htmlContentWithIframeResizerScript);
|
|
33
|
-
const cspDetails = new csp_1.CSPProcessingService({ info: () => { } }).getCspDetails(htmlContentWithBridgeScript, permissions);
|
|
33
|
+
const cspDetails = new csp_1.CSPProcessingService({ info: () => { } }).getCspDetails(htmlContentWithBridgeScript, ResourceTunnelServer.transformPermissionsWithRemotes(permissions, remotes));
|
|
34
34
|
res.setHeader('Content-Security-Policy', this.getCspHeader(cspDetails));
|
|
35
35
|
return htmlContentWithBridgeScript;
|
|
36
36
|
});
|
|
@@ -40,7 +40,7 @@ class ResourceTunnelServer {
|
|
|
40
40
|
this.logger = logger;
|
|
41
41
|
this.cspReporterServerPort = cspReporterServerPort;
|
|
42
42
|
this.app = express_1.default();
|
|
43
|
-
this.app.use(this.getCustomUIResourceMiddleware(permissions));
|
|
43
|
+
this.app.use(this.getCustomUIResourceMiddleware(permissions, remotes));
|
|
44
44
|
if (tunnel) {
|
|
45
45
|
const { port: tunnelPort } = tunnel;
|
|
46
46
|
this.proxy = http_proxy_middleware_1.createProxyMiddleware({
|
|
@@ -76,6 +76,16 @@ class ResourceTunnelServer {
|
|
|
76
76
|
getApp() {
|
|
77
77
|
return this.app;
|
|
78
78
|
}
|
|
79
|
+
static transformPermissionsWithRemotes(permissions, remotes) {
|
|
80
|
+
var _a, _b, _c, _d, _e;
|
|
81
|
+
const client = (_d = (_c = (_b = (_a = permissions.external) === null || _a === void 0 ? void 0 : _a.fetch) === null || _b === void 0 ? void 0 : _b.client) === null || _c === void 0 ? void 0 : _c.map((item) => {
|
|
82
|
+
var _a;
|
|
83
|
+
if (typeof item === 'string')
|
|
84
|
+
return item;
|
|
85
|
+
return (_a = remotes === null || remotes === void 0 ? void 0 : remotes.find((remote) => remote.key === item.remote)) === null || _a === void 0 ? void 0 : _a.baseUrl;
|
|
86
|
+
}).filter((item) => typeof item === 'string')) !== null && _d !== void 0 ? _d : undefined;
|
|
87
|
+
return Object.assign(Object.assign({}, permissions), { external: Object.assign(Object.assign({}, permissions.external), { fetch: Object.assign(Object.assign({}, (_e = permissions.external) === null || _e === void 0 ? void 0 : _e.fetch), { client }) }) });
|
|
88
|
+
}
|
|
79
89
|
async start() {
|
|
80
90
|
return new Promise((resolve) => {
|
|
81
91
|
this.server = this.app.listen(this.port, resolve);
|
|
@@ -7,5 +7,9 @@ export declare class LocalInvocationService implements InvocationService {
|
|
|
7
7
|
private readonly inspector;
|
|
8
8
|
constructor(configFile: ConfigFile, logger: Logger, inspector: Inspector);
|
|
9
9
|
invoke(handler: string, request: ExternalRequestBody): Promise<any>;
|
|
10
|
+
static INTERNAL_METRICS: string[];
|
|
11
|
+
static printMetrics: (shouldReportMetrics: boolean, metrics: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}[] | undefined, logger: Logger) => void;
|
|
10
14
|
}
|
|
11
15
|
//# sourceMappingURL=local-invocation-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-invocation-service.d.ts","sourceRoot":"","sources":["../../../src/tunnelling/services/local-invocation-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACL,mBAAmB,EACnB,SAAS,EAIV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,EAAyB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"local-invocation-service.d.ts","sourceRoot":"","sources":["../../../src/tunnelling/services/local-invocation-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACL,mBAAmB,EACnB,SAAS,EAIV,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;IAqDhF,MAAM,CAAC,gBAAgB,WAA6D;IAEpF,MAAM,CAAC,YAAY,wBACI,OAAO;;6BAEpB,MAAM,KACb,IAAI,CAUL;CACH"}
|
|
@@ -8,6 +8,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
10
|
const interactors_1 = require("../command/interactors");
|
|
11
|
+
const feature_flag_1 = require("@forge/runtime/out/feature-flag");
|
|
11
12
|
class LocalInvocationService {
|
|
12
13
|
constructor(configFile, logger, inspector) {
|
|
13
14
|
this.configFile = configFile;
|
|
@@ -43,13 +44,21 @@ class LocalInvocationService {
|
|
|
43
44
|
ctx: { requestId, traceId: requestId, timeout: interactors_1.INVOCATION_TIMEOUT }
|
|
44
45
|
});
|
|
45
46
|
const invocationLimits = runtime_1.perInvocationLimitsTrackerFactory(xenInvocationRequest);
|
|
46
|
-
const { body } = await runtime_1.invoke({
|
|
47
|
+
const { body, metrics } = await runtime_1.invoke({
|
|
47
48
|
sandbox,
|
|
48
49
|
xenInvocationRequest,
|
|
49
50
|
invocationLimits,
|
|
50
51
|
inspector: inspect ? this.inspector : undefined
|
|
51
52
|
});
|
|
52
|
-
|
|
53
|
+
const reportMetrics = xenInvocationRequest.isFeatureFlagEnabled(feature_flag_1.XEN_RUNTIME_SHOULD_REPORT_METRICS);
|
|
54
|
+
LocalInvocationService.printMetrics(reportMetrics, metrics, this.logger);
|
|
55
|
+
return reportMetrics ? { body, metrics } : body;
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
exports.LocalInvocationService = LocalInvocationService;
|
|
59
|
+
LocalInvocationService.INTERNAL_METRICS = ['execute.setup-request-context', 'invoke.setup-isolate'];
|
|
60
|
+
LocalInvocationService.printMetrics = (shouldReportMetrics, metrics, logger) => {
|
|
61
|
+
if (shouldReportMetrics && (metrics === null || metrics === void 0 ? void 0 : metrics.length)) {
|
|
62
|
+
logger.debug(`Metrics: ${JSON.stringify(metrics.filter((m) => !LocalInvocationService.INTERNAL_METRICS.includes(m.name)), null, 2)}`);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
@@ -5,9 +5,15 @@ interface LambdaError {
|
|
|
5
5
|
errorMessage: string;
|
|
6
6
|
stack: string[];
|
|
7
7
|
serviceKey?: string;
|
|
8
|
+
metrics?: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}[];
|
|
8
11
|
}
|
|
9
12
|
interface InvokeFunctionErrors extends Error {
|
|
10
13
|
serviceKey?: string;
|
|
14
|
+
metrics?: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}[];
|
|
11
17
|
}
|
|
12
18
|
export declare const toLambdaError: (error: InvokeFunctionErrors) => LambdaError;
|
|
13
19
|
export declare const getRequestId: (request: any, value?: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocation-utils.d.ts","sourceRoot":"","sources":["../../../src/tunnelling/util/invocation-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAK3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,UAAU,WAAW;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"invocation-utils.d.ts","sourceRoot":"","sources":["../../../src/tunnelling/util/invocation-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAK3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,UAAU,WAAW;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,EAAE,CAAC;CACpC;AAED,UAAU,oBAAqB,SAAQ,KAAK;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,EAAE,CAAC;CACpC;AAED,eAAO,MAAM,aAAa,UAAW,oBAAoB,KAAG,WAQ3D,CAAC;AAEF,eAAO,MAAM,YAAY,YAAa,GAAG,qBAAsB,MAU9D,CAAC;AAEF,eAAO,MAAM,gBAAgB,YAAa,MAAM,WAAW,GAAG,KAAG,MAGhE,CAAC;AAMF,eAAO,MAAM,eAAe,QAAO,MAOlC,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,UAAU,KAAG,MAUpD,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,MAAM,KAAG,0BAY3C,CAAC"}
|
|
@@ -7,7 +7,8 @@ exports.toLambdaError = (error) => {
|
|
|
7
7
|
errorMessage: error.message,
|
|
8
8
|
errorType: error.name,
|
|
9
9
|
stack: (error.stack || '').split('\n'),
|
|
10
|
-
serviceKey: error.serviceKey
|
|
10
|
+
serviceKey: error.serviceKey,
|
|
11
|
+
metrics: error.metrics
|
|
11
12
|
};
|
|
12
13
|
};
|
|
13
14
|
exports.getRequestId = (request, value = 'unknown') => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/tunnel",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-490cfcf",
|
|
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": "0.0.0-experimental-
|
|
20
|
-
"@forge/cli-shared": "0.0.0-experimental-
|
|
21
|
-
"@forge/csp": "^
|
|
19
|
+
"@forge/bundler": "0.0.0-experimental-490cfcf",
|
|
20
|
+
"@forge/cli-shared": "0.0.0-experimental-490cfcf",
|
|
21
|
+
"@forge/csp": "^1.10.0",
|
|
22
22
|
"@forge/isolated-vm": "3.3.10",
|
|
23
|
-
"@forge/runtime": "0.0.0-experimental-
|
|
23
|
+
"@forge/runtime": "0.0.0-experimental-490cfcf",
|
|
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": "^0.0.0-experimental-
|
|
34
|
+
"@forge/manifest": "^0.0.0-experimental-490cfcf",
|
|
35
35
|
"@types/express": "^4.17.2",
|
|
36
36
|
"@types/express-mung": "^0.5.2",
|
|
37
37
|
"@types/jest": "^26.0.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@types/supertest": "^2.0.10",
|
|
41
41
|
"@types/tmp": "^0.1.0",
|
|
42
42
|
"@types/uuid": "^3.4.7",
|
|
43
|
-
"node-fetch": "
|
|
43
|
+
"node-fetch": "2.6.1",
|
|
44
44
|
"supertest": "^6.1.3"
|
|
45
45
|
},
|
|
46
46
|
"optionalDependencies": {
|