@jsii/runtime 1.51.0 → 1.54.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.
@@ -432,14 +432,14 @@ var __webpack_modules__ = {
432
432
  },
433
433
  6430: (module, __unused_webpack_exports, __webpack_require__) => {
434
434
  "use strict";
435
- const u = __webpack_require__(2141).E;
435
+ const u = __webpack_require__(3459).fromCallback;
436
436
  module.exports = {
437
437
  copy: u(__webpack_require__(465))
438
438
  };
439
439
  },
440
440
  801: (module, __unused_webpack_exports, __webpack_require__) => {
441
441
  "use strict";
442
- const u = __webpack_require__(2141).E;
442
+ const u = __webpack_require__(3459).fromCallback;
443
443
  const fs = __webpack_require__(6851);
444
444
  const path = __webpack_require__(4822);
445
445
  const mkdir = __webpack_require__(7311);
@@ -481,7 +481,7 @@ var __webpack_modules__ = {
481
481
  },
482
482
  7392: (module, __unused_webpack_exports, __webpack_require__) => {
483
483
  "use strict";
484
- const u = __webpack_require__(2141).E;
484
+ const u = __webpack_require__(3459).fromCallback;
485
485
  const path = __webpack_require__(4822);
486
486
  const fs = __webpack_require__(6851);
487
487
  const mkdir = __webpack_require__(7311);
@@ -556,7 +556,7 @@ var __webpack_modules__ = {
556
556
  },
557
557
  8261: (module, __unused_webpack_exports, __webpack_require__) => {
558
558
  "use strict";
559
- const u = __webpack_require__(2141).E;
559
+ const u = __webpack_require__(3459).fromCallback;
560
560
  const path = __webpack_require__(4822);
561
561
  const fs = __webpack_require__(6851);
562
562
  const mkdir = __webpack_require__(7311);
@@ -713,7 +713,7 @@ var __webpack_modules__ = {
713
713
  },
714
714
  7618: (module, __unused_webpack_exports, __webpack_require__) => {
715
715
  "use strict";
716
- const u = __webpack_require__(2141).E;
716
+ const u = __webpack_require__(3459).fromCallback;
717
717
  const path = __webpack_require__(4822);
718
718
  const fs = __webpack_require__(6851);
719
719
  const _mkdirs = __webpack_require__(7311);
@@ -769,7 +769,7 @@ var __webpack_modules__ = {
769
769
  },
770
770
  5093: (__unused_webpack_module, exports, __webpack_require__) => {
771
771
  "use strict";
772
- const u = __webpack_require__(2141).E;
772
+ const u = __webpack_require__(3459).fromCallback;
773
773
  const fs = __webpack_require__(6851);
774
774
  const api = [ "access", "appendFile", "chmod", "chown", "close", "copyFile", "fchmod", "fchown", "fdatasync", "fstat", "fsync", "ftruncate", "futimes", "lchmod", "lchown", "link", "lstat", "mkdir", "mkdtemp", "open", "opendir", "readdir", "readFile", "readlink", "realpath", "rename", "rm", "rmdir", "stat", "symlink", "truncate", "unlink", "utimes", "writeFile" ].filter((key => typeof fs[key] === "function"));
775
775
  Object.keys(fs).forEach((key => {
@@ -862,7 +862,7 @@ var __webpack_modules__ = {
862
862
  },
863
863
  3779: (module, __unused_webpack_exports, __webpack_require__) => {
864
864
  "use strict";
865
- const u = __webpack_require__(2141).p;
865
+ const u = __webpack_require__(3459).fromPromise;
866
866
  const jsonFile = __webpack_require__(2002);
867
867
  jsonFile.outputJson = u(__webpack_require__(209));
868
868
  jsonFile.outputJsonSync = __webpack_require__(8757);
@@ -906,7 +906,7 @@ var __webpack_modules__ = {
906
906
  },
907
907
  7311: (module, __unused_webpack_exports, __webpack_require__) => {
908
908
  "use strict";
909
- const u = __webpack_require__(2141).p;
909
+ const u = __webpack_require__(3459).fromPromise;
910
910
  const {makeDir: _makeDir, makeDirSync} = __webpack_require__(3057);
911
911
  const makeDir = u(_makeDir);
912
912
  module.exports = {
@@ -1082,7 +1082,7 @@ var __webpack_modules__ = {
1082
1082
  },
1083
1083
  1034: (module, __unused_webpack_exports, __webpack_require__) => {
1084
1084
  "use strict";
1085
- const u = __webpack_require__(2141).E;
1085
+ const u = __webpack_require__(3459).fromCallback;
1086
1086
  module.exports = {
1087
1087
  move: u(__webpack_require__(2521))
1088
1088
  };
@@ -1148,7 +1148,7 @@ var __webpack_modules__ = {
1148
1148
  },
1149
1149
  836: (module, __unused_webpack_exports, __webpack_require__) => {
1150
1150
  "use strict";
1151
- const u = __webpack_require__(2141).E;
1151
+ const u = __webpack_require__(3459).fromCallback;
1152
1152
  const fs = __webpack_require__(6851);
1153
1153
  const path = __webpack_require__(4822);
1154
1154
  const mkdir = __webpack_require__(7311);
@@ -1183,7 +1183,7 @@ var __webpack_modules__ = {
1183
1183
  },
1184
1184
  2569: (module, __unused_webpack_exports, __webpack_require__) => {
1185
1185
  "use strict";
1186
- const u = __webpack_require__(2141).p;
1186
+ const u = __webpack_require__(3459).fromPromise;
1187
1187
  const fs = __webpack_require__(5093);
1188
1188
  function pathExists(path) {
1189
1189
  return fs.access(path).then((() => true)).catch((() => false));
@@ -1195,7 +1195,7 @@ var __webpack_modules__ = {
1195
1195
  },
1196
1196
  9117: (module, __unused_webpack_exports, __webpack_require__) => {
1197
1197
  "use strict";
1198
- const u = __webpack_require__(2141).E;
1198
+ const u = __webpack_require__(3459).fromCallback;
1199
1199
  const rimraf = __webpack_require__(1683);
1200
1200
  module.exports = {
1201
1201
  remove: u(rimraf),
@@ -1577,28 +1577,6 @@ var __webpack_modules__ = {
1577
1577
  utimesMillisSync
1578
1578
  };
1579
1579
  },
1580
- 2141: (__unused_webpack_module, exports) => {
1581
- "use strict";
1582
- exports.E = function(fn) {
1583
- return Object.defineProperty((function(...args) {
1584
- if (typeof args[args.length - 1] === "function") fn.apply(this, args); else {
1585
- return new Promise(((resolve, reject) => {
1586
- fn.call(this, ...args, ((err, res) => err != null ? reject(err) : resolve(res)));
1587
- }));
1588
- }
1589
- }), "name", {
1590
- value: fn.name
1591
- });
1592
- };
1593
- exports.p = function(fn) {
1594
- return Object.defineProperty((function(...args) {
1595
- const cb = args[args.length - 1];
1596
- if (typeof cb !== "function") return fn.apply(this, args); else fn.apply(this, args.slice(0, -1)).then((r => cb(null, r)), cb);
1597
- }), "name", {
1598
- value: fn.name
1599
- });
1600
- };
1601
- },
1602
1580
  8553: (__unused_webpack_module, exports, __webpack_require__) => {
1603
1581
  "use strict";
1604
1582
  const MiniPass = __webpack_require__(2253);
@@ -2581,8 +2559,10 @@ var __webpack_modules__ = {
2581
2559
  if (!orig) return orig;
2582
2560
  return function(target, options) {
2583
2561
  var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
2584
- if (stats.uid < 0) stats.uid += 4294967296;
2585
- if (stats.gid < 0) stats.gid += 4294967296;
2562
+ if (stats) {
2563
+ if (stats.uid < 0) stats.uid += 4294967296;
2564
+ if (stats.gid < 0) stats.gid += 4294967296;
2565
+ }
2586
2566
  return stats;
2587
2567
  };
2588
2568
  }
@@ -2604,7 +2584,7 @@ var __webpack_modules__ = {
2604
2584
  } catch (_) {
2605
2585
  _fs = __webpack_require__(7147);
2606
2586
  }
2607
- const universalify = __webpack_require__(6267);
2587
+ const universalify = __webpack_require__(3459);
2608
2588
  const {stringify, stripBom} = __webpack_require__(9293);
2609
2589
  async function _readFile(file, options = {}) {
2610
2590
  if (typeof options === "string") {
@@ -2670,28 +2650,6 @@ var __webpack_modules__ = {
2670
2650
  };
2671
2651
  module.exports = jsonfile;
2672
2652
  },
2673
- 6267: (__unused_webpack_module, exports) => {
2674
- "use strict";
2675
- exports.fromCallback = function(fn) {
2676
- return Object.defineProperty((function(...args) {
2677
- if (typeof args[args.length - 1] === "function") fn.apply(this, args); else {
2678
- return new Promise(((resolve, reject) => {
2679
- fn.call(this, ...args, ((err, res) => err != null ? reject(err) : resolve(res)));
2680
- }));
2681
- }
2682
- }), "name", {
2683
- value: fn.name
2684
- });
2685
- };
2686
- exports.fromPromise = function(fn) {
2687
- return Object.defineProperty((function(...args) {
2688
- const cb = args[args.length - 1];
2689
- if (typeof cb !== "function") return fn.apply(this, args); else fn.apply(this, args.slice(0, -1)).then((r => cb(null, r)), cb);
2690
- }), "name", {
2691
- value: fn.name
2692
- });
2693
- };
2694
- },
2695
2653
  9293: module => {
2696
2654
  function stringify(obj, {EOL = "\n", finalEOL = true, replacer = null, spaces} = {}) {
2697
2655
  const EOF = finalEOL ? EOL : "";
@@ -7614,6 +7572,28 @@ var __webpack_modules__ = {
7614
7572
  const getType = stat => stat.isFile() ? "File" : stat.isDirectory() ? "Directory" : stat.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
7615
7573
  module.exports = WriteEntry;
7616
7574
  },
7575
+ 3459: (__unused_webpack_module, exports) => {
7576
+ "use strict";
7577
+ exports.fromCallback = function(fn) {
7578
+ return Object.defineProperty((function(...args) {
7579
+ if (typeof args[args.length - 1] === "function") fn.apply(this, args); else {
7580
+ return new Promise(((resolve, reject) => {
7581
+ fn.call(this, ...args, ((err, res) => err != null ? reject(err) : resolve(res)));
7582
+ }));
7583
+ }
7584
+ }), "name", {
7585
+ value: fn.name
7586
+ });
7587
+ };
7588
+ exports.fromPromise = function(fn) {
7589
+ return Object.defineProperty((function(...args) {
7590
+ const cb = args[args.length - 1];
7591
+ if (typeof cb !== "function") return fn.apply(this, args); else fn.apply(this, args.slice(0, -1)).then((r => cb(null, r)), cb);
7592
+ }), "name", {
7593
+ value: fn.name
7594
+ });
7595
+ };
7596
+ },
7617
7597
  3278: module => {
7618
7598
  "use strict";
7619
7599
  module.exports = function(Yallist) {
@@ -8702,7 +8682,7 @@ var __webpack_modules__ = {
8702
8682
  _tryTypeInfoForMethod(methodName, classFqn, interfaces = []) {
8703
8683
  var _a, _b;
8704
8684
  for (const fqn of [ classFqn, ...interfaces ]) {
8705
- if (fqn === "Object") {
8685
+ if (fqn === wire.EMPTY_OBJECT_FQN) {
8706
8686
  continue;
8707
8687
  }
8708
8688
  const typeinfo = this._typeInfoForFqn(fqn);
@@ -8904,9 +8884,22 @@ var __webpack_modules__ = {
8904
8884
  }
8905
8885
  exports.objectReference = objectReference;
8906
8886
  function tagObject(obj, objid, interfaces) {
8907
- const managed = obj;
8908
- managed[OBJID_SYMBOL] = objid;
8909
- managed[IFACES_SYMBOL] = interfaces;
8887
+ const privateField = {
8888
+ enumerable: false,
8889
+ configurable: true,
8890
+ writable: true
8891
+ };
8892
+ if (Object.prototype.hasOwnProperty.call(obj, OBJID_SYMBOL)) {
8893
+ console.error(`[jsii/kernel] WARNING: object ${JSON.stringify(obj)} was already tagged as ${obj[OBJID_SYMBOL]}!`);
8894
+ }
8895
+ Object.defineProperty(obj, OBJID_SYMBOL, {
8896
+ ...privateField,
8897
+ value: objid
8898
+ });
8899
+ Object.defineProperty(obj, IFACES_SYMBOL, {
8900
+ ...privateField,
8901
+ value: interfaces
8902
+ });
8910
8903
  }
8911
8904
  function tagJsiiConstructor(constructor, fqn) {
8912
8905
  Object.defineProperty(constructor, JSII_SYMBOL, {
@@ -8937,6 +8930,9 @@ var __webpack_modules__ = {
8937
8930
  for (const iface of (_a = existingRef[api.TOKEN_INTERFACES]) !== null && _a !== void 0 ? _a : []) {
8938
8931
  allIfaces.add(iface);
8939
8932
  }
8933
+ if (!Object.prototype.hasOwnProperty.call(obj, IFACES_SYMBOL)) {
8934
+ console.error(`[jsii/kernel] WARNING: referenced object ${existingRef[api.TOKEN_REF]} does not have the ${String(IFACES_SYMBOL)} property!`);
8935
+ }
8940
8936
  this.objects[existingRef[api.TOKEN_REF]].interfaces = obj[IFACES_SYMBOL] = existingRef[api.TOKEN_INTERFACES] = interfaces = this.removeRedundant(Array.from(allIfaces), fqn);
8941
8937
  }
8942
8938
  return existingRef;
@@ -8955,6 +8951,7 @@ var __webpack_modules__ = {
8955
8951
  };
8956
8952
  }
8957
8953
  findObject(objref) {
8954
+ var _a;
8958
8955
  if (typeof objref !== "object" || !(api.TOKEN_REF in objref)) {
8959
8956
  throw new Error(`Malformed object reference: ${JSON.stringify(objref)}`);
8960
8957
  }
@@ -8963,6 +8960,13 @@ var __webpack_modules__ = {
8963
8960
  if (!obj) {
8964
8961
  throw new Error(`Object ${objid} not found`);
8965
8962
  }
8963
+ const additionalInterfaces = objref[api.TOKEN_INTERFACES];
8964
+ if (additionalInterfaces != null && additionalInterfaces.length > 0) {
8965
+ return {
8966
+ ...obj,
8967
+ interfaces: [ ...(_a = obj.interfaces) !== null && _a !== void 0 ? _a : [], ...additionalInterfaces ]
8968
+ };
8969
+ }
8966
8970
  return obj;
8967
8971
  }
8968
8972
  deleteObject(objref) {
@@ -9306,7 +9310,7 @@ var __webpack_modules__ = {
9306
9310
  throw new Error(`Expected object, got ${JSON.stringify(value)}`);
9307
9311
  }
9308
9312
  host.debug("Returning value type by reference");
9309
- return host.objects.registerObject(value, "Object", [ optionalValue.type.fqn ]);
9313
+ return host.objects.registerObject(value, exports.EMPTY_OBJECT_FQN, [ optionalValue.type.fqn ]);
9310
9314
  },
9311
9315
  deserialize(value, optionalValue, host) {
9312
9316
  if (typeof value === "object" && Object.keys(value !== null && value !== void 0 ? value : {}).length === 0) {
@@ -9363,7 +9367,7 @@ var __webpack_modules__ = {
9363
9367
  }
9364
9368
  const expectedType = host.lookupType(optionalValue.type.fqn);
9365
9369
  const interfaces = spec.isInterfaceType(expectedType) ? [ expectedType.fqn ] : undefined;
9366
- const jsiiType = (_a = objects_1.jsiiTypeFqn(value)) !== null && _a !== void 0 ? _a : spec.isClassType(expectedType) ? expectedType.fqn : "Object";
9370
+ const jsiiType = (_a = objects_1.jsiiTypeFqn(value)) !== null && _a !== void 0 ? _a : spec.isClassType(expectedType) ? expectedType.fqn : exports.EMPTY_OBJECT_FQN;
9367
9371
  return host.objects.registerObject(value, jsiiType, interfaces);
9368
9372
  },
9369
9373
  deserialize(value, optionalValue, host) {
@@ -10182,7 +10186,7 @@ var __webpack_modules__ = {
10182
10186
  },
10183
10187
  4147: module => {
10184
10188
  "use strict";
10185
- module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.51.0","description":"jsii runtime kernel process","license":"Apache-2.0","author":{"name":"Amazon Web Services","url":"https://aws.amazon.com"},"homepage":"https://github.com/aws/jsii","bugs":{"url":"https://github.com/aws/jsii/issues"},"repository":{"type":"git","url":"https://github.com/aws/jsii.git","directory":"packages/@jsii/runtime"},"engines":{"node":">= 12.7.0"},"main":"lib/index.js","types":"lib/index.d.ts","bin":{"jsii-runtime":"bin/jsii-runtime"},"scripts":{"build":"tsc --build && chmod +x bin/jsii-runtime && npx webpack-cli && npm run lint","watch":"tsc --build -w","lint":"eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=webpack.config.js","lint:fix":"yarn lint --fix","test":"jest","test:update":"jest -u","package":"package-js"},"dependencies":{"@jsii/kernel":"^1.51.0","@jsii/check-node":"1.51.0","@jsii/spec":"^1.51.0"},"devDependencies":{"@scope/jsii-calc-base":"^1.51.0","@scope/jsii-calc-lib":"^1.51.0","@types/jest":"^27.0.3","@types/node":"^12.20.39","eslint":"^8.5.0","jest":"^27.4.5","jsii-build-tools":"^1.51.0","jsii-calc":"^3.20.120","prettier":"^2.5.1","source-map-loader":"^3.0.0","ts-jest":"^27.1.2","typescript":"~3.9.10","webpack":"^5.65.0","webpack-cli":"^4.9.1"}}');
10189
+ module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.54.0","description":"jsii runtime kernel process","license":"Apache-2.0","author":{"name":"Amazon Web Services","url":"https://aws.amazon.com"},"homepage":"https://github.com/aws/jsii","bugs":{"url":"https://github.com/aws/jsii/issues"},"repository":{"type":"git","url":"https://github.com/aws/jsii.git","directory":"packages/@jsii/runtime"},"engines":{"node":">= 12.7.0"},"main":"lib/index.js","types":"lib/index.d.ts","bin":{"jsii-runtime":"bin/jsii-runtime"},"scripts":{"build":"tsc --build && chmod +x bin/jsii-runtime && npx webpack-cli && npm run lint","watch":"tsc --build -w","lint":"eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=webpack.config.js","lint:fix":"yarn lint --fix","test":"jest","test:update":"jest -u","package":"package-js"},"dependencies":{"@jsii/kernel":"^1.54.0","@jsii/check-node":"1.54.0","@jsii/spec":"^1.54.0"},"devDependencies":{"@scope/jsii-calc-base":"^1.54.0","@scope/jsii-calc-lib":"^1.54.0","@types/jest":"^27.4.0","@types/node":"^12.20.43","eslint":"^8.8.0","jest":"^27.5.1","jsii-build-tools":"^1.54.0","jsii-calc":"^3.20.120","prettier":"^2.5.1","source-map-loader":"^3.0.1","ts-jest":"^27.1.3","typescript":"~3.9.10","webpack":"^5.68.0","webpack-cli":"^4.9.2"}}');
10186
10190
  },
10187
10191
  9402: module => {
10188
10192
  "use strict";