@jsii/kernel 1.69.0 → 1.70.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/lib/api.d.ts +1 -0
- package/lib/kernel.js +10 -3
- package/lib/recording.js +1 -1
- package/package.json +7 -7
package/lib/api.d.ts
CHANGED
package/lib/kernel.js
CHANGED
|
@@ -302,7 +302,12 @@ class Kernel {
|
|
|
302
302
|
}
|
|
303
303
|
catch (e) {
|
|
304
304
|
this._debug('promise error:', e);
|
|
305
|
-
|
|
305
|
+
if (e.name === "@jsii/kernel.Fault" /* JsiiErrorType.JSII_FAULT */) {
|
|
306
|
+
throw new JsiiFault(e.message);
|
|
307
|
+
}
|
|
308
|
+
// default to RuntimeError, since non-kernel errors may not
|
|
309
|
+
// have their `name` field defined
|
|
310
|
+
throw new RuntimeError(e);
|
|
306
311
|
}
|
|
307
312
|
return {
|
|
308
313
|
result: this._fromSandbox(result, (_a = method.returns) !== null && _a !== void 0 ? _a : 'void', `returned by async method ${method.name}`),
|
|
@@ -328,7 +333,7 @@ class Kernel {
|
|
|
328
333
|
}
|
|
329
334
|
complete(req) {
|
|
330
335
|
var _a;
|
|
331
|
-
const { cbid, err, result } = req;
|
|
336
|
+
const { cbid, err, result, name } = req;
|
|
332
337
|
this._debug('complete', cbid, err, result);
|
|
333
338
|
const cb = this.waiting.get(cbid);
|
|
334
339
|
if (!cb) {
|
|
@@ -336,7 +341,9 @@ class Kernel {
|
|
|
336
341
|
}
|
|
337
342
|
if (err) {
|
|
338
343
|
this._debug('completed with error:', err);
|
|
339
|
-
cb.fail(
|
|
344
|
+
cb.fail(name === "@jsii/kernel.Fault" /* JsiiErrorType.JSII_FAULT */
|
|
345
|
+
? new JsiiFault(err)
|
|
346
|
+
: new RuntimeError(err));
|
|
340
347
|
}
|
|
341
348
|
else {
|
|
342
349
|
const sandoxResult = this._toSandbox(result, (_a = cb.expectedReturnType) !== null && _a !== void 0 ? _a : 'void', `returned by callback ${cb.toString()}`);
|
package/lib/recording.js
CHANGED
|
@@ -57,7 +57,7 @@ function recordInteraction(kernel, inputOutputLogPath) {
|
|
|
57
57
|
}
|
|
58
58
|
catch (e) {
|
|
59
59
|
logOutput({ error: e.message, name: e.name });
|
|
60
|
-
if (e.
|
|
60
|
+
if (e.name === "@jsii/kernel.RuntimeError" /* JsiiErrorType.RUNTIME_ERROR */) {
|
|
61
61
|
throw new kernel_1.RuntimeError(e.message);
|
|
62
62
|
}
|
|
63
63
|
throw new kernel_1.JsiiFault(e.message);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsii/kernel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.70.0",
|
|
4
4
|
"description": "kernel for jsii execution environment",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
"package": "package-js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@jsii/spec": "^1.
|
|
34
|
+
"@jsii/spec": "^1.70.0",
|
|
35
35
|
"fs-extra": "^10.1.0",
|
|
36
36
|
"lockfile": "^1.0.4",
|
|
37
37
|
"tar": "^6.1.11"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@scope/jsii-calc-base": "^1.
|
|
41
|
-
"@scope/jsii-calc-lib": "^1.
|
|
40
|
+
"@scope/jsii-calc-base": "^1.70.0",
|
|
41
|
+
"@scope/jsii-calc-lib": "^1.70.0",
|
|
42
42
|
"@types/fs-extra": "^9.0.13",
|
|
43
43
|
"@types/lockfile": "^1.0.2",
|
|
44
|
-
"@types/tar": "^6.1.
|
|
45
|
-
"jest-expect-message": "^1.1.
|
|
46
|
-
"jsii-build-tools": "^1.
|
|
44
|
+
"@types/tar": "^6.1.3",
|
|
45
|
+
"jest-expect-message": "^1.1.3",
|
|
46
|
+
"jsii-build-tools": "^1.70.0",
|
|
47
47
|
"jsii-calc": "^3.20.120"
|
|
48
48
|
}
|
|
49
49
|
}
|