@jsii/runtime 1.68.0 → 1.69.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsii/runtime",
3
- "version": "1.68.0",
3
+ "version": "1.69.0",
4
4
  "description": "jsii runtime kernel process",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -34,14 +34,14 @@
34
34
  "package": "package-js"
35
35
  },
36
36
  "dependencies": {
37
- "@jsii/kernel": "^1.68.0",
38
- "@jsii/check-node": "1.68.0",
39
- "@jsii/spec": "^1.68.0"
37
+ "@jsii/kernel": "^1.69.0",
38
+ "@jsii/check-node": "1.69.0",
39
+ "@jsii/spec": "^1.69.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@scope/jsii-calc-base": "^1.68.0",
43
- "@scope/jsii-calc-lib": "^1.68.0",
44
- "jsii-build-tools": "^1.68.0",
42
+ "@scope/jsii-calc-base": "^1.69.0",
43
+ "@scope/jsii-calc-lib": "^1.69.0",
44
+ "jsii-build-tools": "^1.69.0",
45
45
  "jsii-calc": "^3.20.120",
46
46
  "source-map-loader": "^4.0.0",
47
47
  "webpack": "^5.74.0",
@@ -7099,14 +7099,12 @@ var __webpack_modules__ = {
7099
7099
  const spec = __webpack_require__(1804);
7100
7100
  const spec_1 = __webpack_require__(1804);
7101
7101
  const cp = __webpack_require__(2081);
7102
- const fs_1 = __webpack_require__(7147);
7103
7102
  const fs = __webpack_require__(9477);
7104
7103
  const module_1 = __webpack_require__(8188);
7105
7104
  const os = __webpack_require__(2037);
7106
7105
  const path = __webpack_require__(4822);
7107
7106
  const api = __webpack_require__(2816);
7108
7107
  const api_1 = __webpack_require__(2816);
7109
- const link_1 = __webpack_require__(8261);
7110
7108
  const objects_1 = __webpack_require__(2309);
7111
7109
  const onExit = __webpack_require__(6703);
7112
7110
  const wire = __webpack_require__(8614);
@@ -7163,19 +7161,13 @@ var __webpack_modules__ = {
7163
7161
  }
7164
7162
  const originalUmask = process.umask(18);
7165
7163
  try {
7166
- const {path: extractedTo, cache} = this._debugTime((() => tar.extract(req.tarball, {
7164
+ const {cache} = this._debugTime((() => tar.extract(req.tarball, packageDir, {
7167
7165
  strict: true,
7168
7166
  strip: 1,
7169
7167
  unlink: true
7170
7168
  }, req.name, req.version)), `tar.extract(${req.tarball}) => ${packageDir}`);
7171
- fs.mkdirSync(path.dirname(packageDir), {
7172
- recursive: true
7173
- });
7174
7169
  if (cache != null) {
7175
7170
  this._debug(`Package cache enabled, extraction resulted in a cache ${cache}`);
7176
- this._debugTime((() => (0, link_1.link)(extractedTo, packageDir)), `link(${extractedTo}, ${packageDir})`);
7177
- } else {
7178
- (0, fs_1.renameSync)(extractedTo, packageDir);
7179
7171
  }
7180
7172
  } finally {
7181
7173
  process.umask(originalUmask);
@@ -8883,36 +8875,44 @@ var __webpack_modules__ = {
8883
8875
  });
8884
8876
  exports.setPackageCacheEnabled = exports.getPackageCacheEnabled = exports.extract = void 0;
8885
8877
  const fs_1 = __webpack_require__(7147);
8886
- const os_1 = __webpack_require__(2037);
8887
- const path_1 = __webpack_require__(4822);
8888
8878
  const tar = __webpack_require__(1189);
8889
8879
  const disk_cache_1 = __webpack_require__(7202);
8880
+ const link_1 = __webpack_require__(8261);
8890
8881
  const default_cache_root_1 = __webpack_require__(1034);
8891
8882
  let packageCacheEnabled = ((_a = process.env.JSII_RUNTIME_PACKAGE_CACHE) === null || _a === void 0 ? void 0 : _a.toLocaleUpperCase()) === "enabled";
8892
- function extract(file, options, ...comments) {
8893
- return (packageCacheEnabled ? extractToCache : extractToTemporary)(file, options, ...comments);
8883
+ function extract(file, outDir, options, ...comments) {
8884
+ (0, fs_1.mkdirSync)(outDir, {
8885
+ recursive: true
8886
+ });
8887
+ try {
8888
+ return (packageCacheEnabled ? extractViaCache : extractToOutDir)(file, outDir, options, ...comments);
8889
+ } catch (err) {
8890
+ (0, fs_1.rmSync)(outDir, {
8891
+ force: true,
8892
+ recursive: true
8893
+ });
8894
+ throw err;
8895
+ }
8894
8896
  }
8895
8897
  exports.extract = extract;
8896
- function extractToCache(file, options = {}, ...comments) {
8898
+ function extractViaCache(file, outDir, options = {}, ...comments) {
8897
8899
  var _a;
8898
8900
  const cacheRoot = (_a = process.env.JSII_RUNTIME_PACKAGE_CACHE_ROOT) !== null && _a !== void 0 ? _a : (0,
8899
8901
  default_cache_root_1.defaultCacheRoot)();
8900
- const cache = disk_cache_1.DiskCache.inDirectory(cacheRoot);
8901
- const entry = cache.entryFor(file, ...comments);
8902
- return entry.lock((lock => {
8902
+ const dirCache = disk_cache_1.DiskCache.inDirectory(cacheRoot);
8903
+ const entry = dirCache.entryFor(file, ...comments);
8904
+ const {path, cache} = entry.lock((lock => {
8903
8905
  let cache = "hit";
8904
8906
  if (!entry.pathExists) {
8905
- const tmpPath = `${entry.path}.tmp`;
8906
- (0, fs_1.mkdirSync)(tmpPath, {
8907
+ (0, fs_1.mkdirSync)(entry.path, {
8907
8908
  recursive: true
8908
8909
  });
8909
8910
  try {
8910
8911
  untarInto({
8911
8912
  ...options,
8912
- cwd: tmpPath,
8913
+ cwd: entry.path,
8913
8914
  file
8914
8915
  });
8915
- (0, fs_1.renameSync)(tmpPath, entry.path);
8916
8916
  } catch (error) {
8917
8917
  (0, fs_1.rmSync)(entry.path, {
8918
8918
  force: true,
@@ -8928,17 +8928,18 @@ var __webpack_modules__ = {
8928
8928
  cache
8929
8929
  };
8930
8930
  }));
8931
+ (0, link_1.link)(path, outDir);
8932
+ return {
8933
+ cache
8934
+ };
8931
8935
  }
8932
- function extractToTemporary(file, options = {}) {
8933
- const path = (0, fs_1.mkdtempSync)((0, path_1.join)((0, os_1.tmpdir)(), "jsii-runtime-untar-"));
8936
+ function extractToOutDir(file, cwd, options = {}) {
8934
8937
  untarInto({
8935
8938
  ...options,
8936
- cwd: path,
8939
+ cwd,
8937
8940
  file
8938
8941
  });
8939
- return {
8940
- path
8941
- };
8942
+ return {};
8942
8943
  }
8943
8944
  function untarInto(options) {
8944
8945
  try {
@@ -16195,7 +16196,7 @@ var __webpack_modules__ = {
16195
16196
  },
16196
16197
  4147: module => {
16197
16198
  "use strict";
16198
- module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.68.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":">= 14.6.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.68.0","@jsii/check-node":"1.68.0","@jsii/spec":"^1.68.0"},"devDependencies":{"@scope/jsii-calc-base":"^1.68.0","@scope/jsii-calc-lib":"^1.68.0","jsii-build-tools":"^1.68.0","jsii-calc":"^3.20.120","source-map-loader":"^4.0.0","webpack":"^5.74.0","webpack-cli":"^4.10.0"}}');
16199
+ module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.69.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":">= 14.6.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.69.0","@jsii/check-node":"1.69.0","@jsii/spec":"^1.69.0"},"devDependencies":{"@scope/jsii-calc-base":"^1.69.0","@scope/jsii-calc-lib":"^1.69.0","jsii-build-tools":"^1.69.0","jsii-calc":"^3.20.120","source-map-loader":"^4.0.0","webpack":"^5.74.0","webpack-cli":"^4.10.0"}}');
16199
16200
  },
16200
16201
  5277: module => {
16201
16202
  "use strict";