@jsii/runtime 1.74.0 → 1.75.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.74.0",
3
+ "version": "1.75.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.74.0",
38
- "@jsii/check-node": "1.74.0",
39
- "@jsii/spec": "^1.74.0"
37
+ "@jsii/kernel": "^1.75.0",
38
+ "@jsii/check-node": "1.75.0",
39
+ "@jsii/spec": "^1.75.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@scope/jsii-calc-base": "^1.74.0",
43
- "@scope/jsii-calc-lib": "^1.74.0",
44
- "jsii-build-tools": "^1.74.0",
42
+ "@scope/jsii-calc-base": "^1.75.0",
43
+ "@scope/jsii-calc-lib": "^1.75.0",
44
+ "jsii-build-tools": "^1.75.0",
45
45
  "jsii-calc": "^3.20.120",
46
46
  "source-map-loader": "^4.0.1",
47
47
  "webpack": "^5.75.0",
@@ -135,10 +135,109 @@ var __webpack_modules__ = {
135
135
  get: assembleStyles
136
136
  });
137
137
  },
138
+ 5934: (module, __unused_webpack_exports, __webpack_require__) => {
139
+ "use strict";
140
+ const os = __webpack_require__(2037);
141
+ const tty = __webpack_require__(6224);
142
+ const hasFlag = __webpack_require__(4288);
143
+ const {env} = process;
144
+ let forceColor;
145
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
146
+ forceColor = 0;
147
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
148
+ forceColor = 1;
149
+ }
150
+ if ("FORCE_COLOR" in env) {
151
+ if (env.FORCE_COLOR === "true") {
152
+ forceColor = 1;
153
+ } else if (env.FORCE_COLOR === "false") {
154
+ forceColor = 0;
155
+ } else {
156
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
157
+ }
158
+ }
159
+ function translateLevel(level) {
160
+ if (level === 0) {
161
+ return false;
162
+ }
163
+ return {
164
+ level,
165
+ hasBasic: true,
166
+ has256: level >= 2,
167
+ has16m: level >= 3
168
+ };
169
+ }
170
+ function supportsColor(haveStream, streamIsTTY) {
171
+ if (forceColor === 0) {
172
+ return 0;
173
+ }
174
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
175
+ return 3;
176
+ }
177
+ if (hasFlag("color=256")) {
178
+ return 2;
179
+ }
180
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
181
+ return 0;
182
+ }
183
+ const min = forceColor || 0;
184
+ if (env.TERM === "dumb") {
185
+ return min;
186
+ }
187
+ if (process.platform === "win32") {
188
+ const osRelease = os.release().split(".");
189
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
190
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
191
+ }
192
+ return 1;
193
+ }
194
+ if ("CI" in env) {
195
+ if ([ "TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE" ].some((sign => sign in env)) || env.CI_NAME === "codeship") {
196
+ return 1;
197
+ }
198
+ return min;
199
+ }
200
+ if ("TEAMCITY_VERSION" in env) {
201
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
202
+ }
203
+ if (env.COLORTERM === "truecolor") {
204
+ return 3;
205
+ }
206
+ if ("TERM_PROGRAM" in env) {
207
+ const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
208
+ switch (env.TERM_PROGRAM) {
209
+ case "iTerm.app":
210
+ return version >= 3 ? 3 : 2;
211
+
212
+ case "Apple_Terminal":
213
+ return 2;
214
+ }
215
+ }
216
+ if (/-256(color)?$/i.test(env.TERM)) {
217
+ return 2;
218
+ }
219
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
220
+ return 1;
221
+ }
222
+ if ("COLORTERM" in env) {
223
+ return 1;
224
+ }
225
+ return min;
226
+ }
227
+ function getSupportLevel(stream) {
228
+ const level = supportsColor(stream, stream && stream.isTTY);
229
+ return translateLevel(level);
230
+ }
231
+ module.exports = {
232
+ supportsColor: getSupportLevel,
233
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
234
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
235
+ };
236
+ },
138
237
  1201: (module, __unused_webpack_exports, __webpack_require__) => {
139
238
  "use strict";
140
239
  const ansiStyles = __webpack_require__(5756);
141
- const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(9797);
240
+ const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(5934);
142
241
  const {stringReplaceAll, stringEncaseCRLFWithFirstIndex} = __webpack_require__(8564);
143
242
  const {isArray} = Array;
144
243
  const levelMapping = [ "ansi", "ansi", "ansi256", "ansi16m" ];
@@ -3217,105 +3316,6 @@ var __webpack_modules__ = {
3217
3316
  };
3218
3317
  module.exports = validRange;
3219
3318
  },
3220
- 9797: (module, __unused_webpack_exports, __webpack_require__) => {
3221
- "use strict";
3222
- const os = __webpack_require__(2037);
3223
- const tty = __webpack_require__(6224);
3224
- const hasFlag = __webpack_require__(4288);
3225
- const {env} = process;
3226
- let forceColor;
3227
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
3228
- forceColor = 0;
3229
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
3230
- forceColor = 1;
3231
- }
3232
- if ("FORCE_COLOR" in env) {
3233
- if (env.FORCE_COLOR === "true") {
3234
- forceColor = 1;
3235
- } else if (env.FORCE_COLOR === "false") {
3236
- forceColor = 0;
3237
- } else {
3238
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
3239
- }
3240
- }
3241
- function translateLevel(level) {
3242
- if (level === 0) {
3243
- return false;
3244
- }
3245
- return {
3246
- level,
3247
- hasBasic: true,
3248
- has256: level >= 2,
3249
- has16m: level >= 3
3250
- };
3251
- }
3252
- function supportsColor(haveStream, streamIsTTY) {
3253
- if (forceColor === 0) {
3254
- return 0;
3255
- }
3256
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
3257
- return 3;
3258
- }
3259
- if (hasFlag("color=256")) {
3260
- return 2;
3261
- }
3262
- if (haveStream && !streamIsTTY && forceColor === undefined) {
3263
- return 0;
3264
- }
3265
- const min = forceColor || 0;
3266
- if (env.TERM === "dumb") {
3267
- return min;
3268
- }
3269
- if (process.platform === "win32") {
3270
- const osRelease = os.release().split(".");
3271
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
3272
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
3273
- }
3274
- return 1;
3275
- }
3276
- if ("CI" in env) {
3277
- if ([ "TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE" ].some((sign => sign in env)) || env.CI_NAME === "codeship") {
3278
- return 1;
3279
- }
3280
- return min;
3281
- }
3282
- if ("TEAMCITY_VERSION" in env) {
3283
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
3284
- }
3285
- if (env.COLORTERM === "truecolor") {
3286
- return 3;
3287
- }
3288
- if ("TERM_PROGRAM" in env) {
3289
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
3290
- switch (env.TERM_PROGRAM) {
3291
- case "iTerm.app":
3292
- return version >= 3 ? 3 : 2;
3293
-
3294
- case "Apple_Terminal":
3295
- return 2;
3296
- }
3297
- }
3298
- if (/-256(color)?$/i.test(env.TERM)) {
3299
- return 2;
3300
- }
3301
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
3302
- return 1;
3303
- }
3304
- if ("COLORTERM" in env) {
3305
- return 1;
3306
- }
3307
- return min;
3308
- }
3309
- function getSupportLevel(stream) {
3310
- const level = supportsColor(stream, stream && stream.isTTY);
3311
- return translateLevel(level);
3312
- }
3313
- module.exports = {
3314
- supportsColor: getSupportLevel,
3315
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
3316
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
3317
- };
3318
- },
3319
3319
  3278: module => {
3320
3320
  "use strict";
3321
3321
  module.exports = function(Yallist) {
@@ -3765,11 +3765,18 @@ var __webpack_modules__ = {
3765
3765
  Object.defineProperty(exports, "__esModule", {
3766
3766
  value: true
3767
3767
  });
3768
- exports.checkNode = void 0;
3768
+ exports.checkNode = exports.NodeRelease = void 0;
3769
3769
  const chalk_1 = __webpack_require__(1201);
3770
3770
  const console_1 = __webpack_require__(6206);
3771
3771
  const process_1 = __webpack_require__(7282);
3772
3772
  const constants_1 = __webpack_require__(6829);
3773
+ var constants_2 = __webpack_require__(6829);
3774
+ Object.defineProperty(exports, "NodeRelease", {
3775
+ enumerable: true,
3776
+ get: function() {
3777
+ return constants_2.NodeRelease;
3778
+ }
3779
+ });
3773
3780
  function checkNode(envPrefix = "JSII") {
3774
3781
  const {nodeRelease, knownBroken} = constants_1.NodeRelease.forThisRuntime();
3775
3782
  const defaultCallToAction = "Should you encounter odd runtime issues, please try using one of the supported release before filing a bug report.";
@@ -5944,6 +5944,7 @@ var __webpack_modules__ = {
5944
5944
  const BUFFERSHIFT = Symbol("bufferShift");
5945
5945
  const OBJECTMODE = Symbol("objectMode");
5946
5946
  const DESTROYED = Symbol("destroyed");
5947
+ const ERROR = Symbol("error");
5947
5948
  const EMITDATA = Symbol("emitData");
5948
5949
  const EMITEND = Symbol("emitEnd");
5949
5950
  const EMITEND2 = Symbol("emitEnd2");
@@ -6215,6 +6216,7 @@ var __webpack_modules__ = {
6215
6216
  return ret;
6216
6217
  } else if (ev === "error") {
6217
6218
  this[EMITTED_ERROR] = data;
6219
+ super.emit(ERROR, data);
6218
6220
  const ret = super.emit("error", data);
6219
6221
  this[MAYBE_EMIT_END]();
6220
6222
  return ret;
@@ -6283,20 +6285,28 @@ var __webpack_modules__ = {
6283
6285
  }));
6284
6286
  }
6285
6287
  [ASYNCITERATOR]() {
6288
+ let stopped = false;
6289
+ const stop = () => {
6290
+ this.pause();
6291
+ stopped = true;
6292
+ return Promise.resolve({
6293
+ done: true
6294
+ });
6295
+ };
6286
6296
  const next = () => {
6297
+ if (stopped) return stop();
6287
6298
  const res = this.read();
6288
6299
  if (res !== null) return Promise.resolve({
6289
6300
  done: false,
6290
6301
  value: res
6291
6302
  });
6292
- if (this[EOF]) return Promise.resolve({
6293
- done: true
6294
- });
6303
+ if (this[EOF]) return stop();
6295
6304
  let resolve = null;
6296
6305
  let reject = null;
6297
6306
  const onerr = er => {
6298
6307
  this.removeListener("data", ondata);
6299
6308
  this.removeListener("end", onend);
6309
+ stop();
6300
6310
  reject(er);
6301
6311
  };
6302
6312
  const ondata = value => {
@@ -6311,6 +6321,7 @@ var __webpack_modules__ = {
6311
6321
  const onend = () => {
6312
6322
  this.removeListener("error", onerr);
6313
6323
  this.removeListener("data", ondata);
6324
+ stop();
6314
6325
  resolve({
6315
6326
  done: true
6316
6327
  });
@@ -6326,20 +6337,41 @@ var __webpack_modules__ = {
6326
6337
  }));
6327
6338
  };
6328
6339
  return {
6329
- next
6340
+ next,
6341
+ throw: stop,
6342
+ return: stop,
6343
+ [ASYNCITERATOR]() {
6344
+ return this;
6345
+ }
6330
6346
  };
6331
6347
  }
6332
6348
  [ITERATOR]() {
6349
+ let stopped = false;
6350
+ const stop = () => {
6351
+ this.pause();
6352
+ this.removeListener(ERROR, stop);
6353
+ this.removeListener("end", stop);
6354
+ stopped = true;
6355
+ return {
6356
+ done: true
6357
+ };
6358
+ };
6333
6359
  const next = () => {
6360
+ if (stopped) return stop();
6334
6361
  const value = this.read();
6335
- const done = value === null;
6336
- return {
6337
- value,
6338
- done
6362
+ return value === null ? stop() : {
6363
+ value
6339
6364
  };
6340
6365
  };
6366
+ this.once("end", stop);
6367
+ this.once(ERROR, stop);
6341
6368
  return {
6342
- next
6369
+ next,
6370
+ throw: stop,
6371
+ return: stop,
6372
+ [ITERATOR]() {
6373
+ return this;
6374
+ }
6343
6375
  };
6344
6376
  }
6345
6377
  destroy(er) {
@@ -17250,7 +17282,7 @@ var __webpack_modules__ = {
17250
17282
  },
17251
17283
  4147: module => {
17252
17284
  "use strict";
17253
- module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.74.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.74.0","@jsii/check-node":"1.74.0","@jsii/spec":"^1.74.0"},"devDependencies":{"@scope/jsii-calc-base":"^1.74.0","@scope/jsii-calc-lib":"^1.74.0","jsii-build-tools":"^1.74.0","jsii-calc":"^3.20.120","source-map-loader":"^4.0.1","webpack":"^5.75.0","webpack-cli":"^5.0.1"}}');
17285
+ module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.75.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.75.0","@jsii/check-node":"1.75.0","@jsii/spec":"^1.75.0"},"devDependencies":{"@scope/jsii-calc-base":"^1.75.0","@scope/jsii-calc-lib":"^1.75.0","jsii-build-tools":"^1.75.0","jsii-calc":"^3.20.120","source-map-loader":"^4.0.1","webpack":"^5.75.0","webpack-cli":"^5.0.1"}}');
17254
17286
  },
17255
17287
  5277: module => {
17256
17288
  "use strict";