@jsii/runtime 1.112.0 → 1.113.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/in-out.d.ts +3 -3
- package/package.json +9 -9
- package/webpack/bin/jsii-runtime.js +139 -83
- package/webpack/lib/program.js +812 -818
package/webpack/lib/program.js
CHANGED
|
@@ -24,7 +24,7 @@ var __webpack_modules__ = {
|
|
|
24
24
|
if (it.opts.unevaluated && allProps.length && it.props !== true) {
|
|
25
25
|
it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);
|
|
26
26
|
}
|
|
27
|
-
const properties = allProps.filter(
|
|
27
|
+
const properties = allProps.filter(p => !(0, util_1.alwaysValidSchema)(it, schema[p]));
|
|
28
28
|
if (properties.length === 0) return;
|
|
29
29
|
const valid = gen.name("valid");
|
|
30
30
|
for (const prop of properties) {
|
|
@@ -70,7 +70,7 @@ var __webpack_modules__ = {
|
|
|
70
70
|
const {gen, schema, data, parentSchema, it} = cxt;
|
|
71
71
|
const {opts} = it;
|
|
72
72
|
const patterns = (0, code_1.allSchemaProperties)(schema);
|
|
73
|
-
const alwaysValidPatterns = patterns.filter(
|
|
73
|
+
const alwaysValidPatterns = patterns.filter(p => (0, util_1.alwaysValidSchema)(it, schema[p]));
|
|
74
74
|
if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) {
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
@@ -101,8 +101,8 @@ var __webpack_modules__ = {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
function validateProperties(pat) {
|
|
104
|
-
gen.forIn("key", data,
|
|
105
|
-
gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, (
|
|
104
|
+
gen.forIn("key", data, key => {
|
|
105
|
+
gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {
|
|
106
106
|
const alwaysValid = alwaysValidPatterns.includes(pat);
|
|
107
107
|
if (!alwaysValid) {
|
|
108
108
|
cxt.subschema({
|
|
@@ -115,10 +115,10 @@ var __webpack_modules__ = {
|
|
|
115
115
|
if (it.opts.unevaluated && props !== true) {
|
|
116
116
|
gen.assign((0, codegen_1._)`${props}[${key}]`, true);
|
|
117
117
|
} else if (!alwaysValid && !it.allErrors) {
|
|
118
|
-
gen.if((0, codegen_1.not)(valid), (
|
|
118
|
+
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
119
119
|
}
|
|
120
|
-
})
|
|
121
|
-
})
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
};
|
|
@@ -171,8 +171,8 @@ var __webpack_modules__ = {
|
|
|
171
171
|
exports.RuntimeError = RuntimeError;
|
|
172
172
|
class Kernel {
|
|
173
173
|
constructor(callbackHandler) {
|
|
174
|
-
this.callbackHandler = callbackHandler;
|
|
175
174
|
_Kernel_instances.add(this);
|
|
175
|
+
this.callbackHandler = callbackHandler;
|
|
176
176
|
this.traceEnabled = false;
|
|
177
177
|
this.debugTimingEnabled = false;
|
|
178
178
|
this.validateAssemblies = false;
|
|
@@ -195,7 +195,7 @@ var __webpack_modules__ = {
|
|
|
195
195
|
}, "f");
|
|
196
196
|
}
|
|
197
197
|
load(req) {
|
|
198
|
-
return __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debugTime).call(this, (
|
|
198
|
+
return __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debugTime).call(this, () => __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_load).call(this, req), `load(${JSON.stringify(req, null, 2)})`);
|
|
199
199
|
}
|
|
200
200
|
getBinScriptCommand(req) {
|
|
201
201
|
return __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_getBinScriptCommand).call(this, req);
|
|
@@ -232,7 +232,7 @@ var __webpack_modules__ = {
|
|
|
232
232
|
throw new JsiiFault(`property ${symbol} is not static`);
|
|
233
233
|
}
|
|
234
234
|
const prototype = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_findSymbol).call(this, fqn);
|
|
235
|
-
const value = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `property ${property}`, (
|
|
235
|
+
const value = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `property ${property}`, () => prototype[property]);
|
|
236
236
|
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debug).call(this, "value:", value);
|
|
237
237
|
const ret = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_fromSandbox).call(this, value, ti, `of static property ${symbol}`);
|
|
238
238
|
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debug).call(this, "ret", ret);
|
|
@@ -252,7 +252,7 @@ var __webpack_modules__ = {
|
|
|
252
252
|
throw new JsiiFault(`static property ${symbol} is readonly`);
|
|
253
253
|
}
|
|
254
254
|
const prototype = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_findSymbol).call(this, fqn);
|
|
255
|
-
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `property ${property}`, (
|
|
255
|
+
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `property ${property}`, () => prototype[property] = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_toSandbox).call(this, value, ti, `assigned to static property ${symbol}`));
|
|
256
256
|
return {};
|
|
257
257
|
}
|
|
258
258
|
get(req) {
|
|
@@ -261,7 +261,7 @@ var __webpack_modules__ = {
|
|
|
261
261
|
const {instance, fqn, interfaces} = __classPrivateFieldGet(this, _Kernel_objects, "f").findObject(objref);
|
|
262
262
|
const ti = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_typeInfoForProperty).call(this, property, fqn, interfaces);
|
|
263
263
|
const propertyToGet = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_findPropertyTarget).call(this, instance, property);
|
|
264
|
-
const value = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `property '${objref[api_1.TOKEN_REF]}.${propertyToGet}'`, (
|
|
264
|
+
const value = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `property '${objref[api_1.TOKEN_REF]}.${propertyToGet}'`, () => instance[propertyToGet]);
|
|
265
265
|
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debug).call(this, "value:", value);
|
|
266
266
|
const ret = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_fromSandbox).call(this, value, ti, `of property ${fqn}.${property}`);
|
|
267
267
|
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debug).call(this, "ret:", ret);
|
|
@@ -278,7 +278,7 @@ var __webpack_modules__ = {
|
|
|
278
278
|
throw new JsiiFault(`Cannot set value of immutable property ${req.property} to ${req.value}`);
|
|
279
279
|
}
|
|
280
280
|
const propertyToSet = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_findPropertyTarget).call(this, instance, property);
|
|
281
|
-
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `property '${objref[api_1.TOKEN_REF]}.${propertyToSet}'`, (
|
|
281
|
+
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `property '${objref[api_1.TOKEN_REF]}.${propertyToSet}'`, () => instance[propertyToSet] = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_toSandbox).call(this, value, propInfo, `assigned to property ${fqn}.${property}`));
|
|
282
282
|
return {};
|
|
283
283
|
}
|
|
284
284
|
invoke(req) {
|
|
@@ -291,7 +291,7 @@ var __webpack_modules__ = {
|
|
|
291
291
|
throw new JsiiFault(`${method} is an async method, use "begin" instead`);
|
|
292
292
|
}
|
|
293
293
|
const fqn = (0, objects_1.jsiiTypeFqn)(obj, __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_isVisibleType).bind(this));
|
|
294
|
-
const ret = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `method '${objref[api_1.TOKEN_REF]}.${method}'`, (
|
|
294
|
+
const ret = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `method '${objref[api_1.TOKEN_REF]}.${method}'`, () => fn.apply(obj, __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_toSandboxValues).call(this, args, `method ${fqn ? `${fqn}#` : ""}${method}`, ti.parameters)));
|
|
295
295
|
const result = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_fromSandbox).call(this, ret, (_b = ti.returns) !== null && _b !== void 0 ? _b : "void", `returned by method ${fqn ? `${fqn}#` : ""}${method}`);
|
|
296
296
|
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debug).call(this, "invoke result", result);
|
|
297
297
|
return {
|
|
@@ -312,7 +312,7 @@ var __webpack_modules__ = {
|
|
|
312
312
|
}
|
|
313
313
|
const prototype = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_findSymbol).call(this, fqn);
|
|
314
314
|
const fn = prototype[method];
|
|
315
|
-
const ret = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `method '${fqn}.${method}'`, (
|
|
315
|
+
const ret = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_ensureSync).call(this, `method '${fqn}.${method}'`, () => fn.apply(prototype, __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_toSandboxValues).call(this, args, `static method ${fqn}.${method}`, ti.parameters)));
|
|
316
316
|
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debug).call(this, "method returned:", ret);
|
|
317
317
|
return {
|
|
318
318
|
result: __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_fromSandbox).call(this, ret, (_b = ti.returns) !== null && _b !== void 0 ? _b : "void", `returned by static method ${fqn}.${method}`)
|
|
@@ -332,7 +332,7 @@ var __webpack_modules__ = {
|
|
|
332
332
|
}
|
|
333
333
|
const fqn = (0, objects_1.jsiiTypeFqn)(obj, __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_isVisibleType).bind(this));
|
|
334
334
|
const promise = fn.apply(obj, __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_toSandboxValues).call(this, args, `async method ${fqn ? `${fqn}#` : ""}${method}`, ti.parameters));
|
|
335
|
-
promise.catch(
|
|
335
|
+
promise.catch(_ => undefined);
|
|
336
336
|
const prid = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_makeprid).call(this);
|
|
337
337
|
__classPrivateFieldGet(this, _Kernel_promises, "f").set(prid, {
|
|
338
338
|
promise,
|
|
@@ -374,7 +374,7 @@ var __webpack_modules__ = {
|
|
|
374
374
|
}
|
|
375
375
|
callbacks(_req) {
|
|
376
376
|
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debug).call(this, "callbacks");
|
|
377
|
-
const ret = Array.from(__classPrivateFieldGet(this, _Kernel_cbs, "f").entries()).map((
|
|
377
|
+
const ret = Array.from(__classPrivateFieldGet(this, _Kernel_cbs, "f").entries()).map(([cbid, cb]) => {
|
|
378
378
|
__classPrivateFieldGet(this, _Kernel_waiting, "f").set(cbid, cb);
|
|
379
379
|
__classPrivateFieldGet(this, _Kernel_cbs, "f").delete(cbid);
|
|
380
380
|
const callback = {
|
|
@@ -387,7 +387,7 @@ var __webpack_modules__ = {
|
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
389
|
return callback;
|
|
390
|
-
})
|
|
390
|
+
});
|
|
391
391
|
return {
|
|
392
392
|
callbacks: ret
|
|
393
393
|
};
|
|
@@ -458,11 +458,11 @@ var __webpack_modules__ = {
|
|
|
458
458
|
}
|
|
459
459
|
const originalUmask = process.umask(18);
|
|
460
460
|
try {
|
|
461
|
-
const {cache} = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debugTime).call(this, (
|
|
461
|
+
const {cache} = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debugTime).call(this, () => tar.extract(req.tarball, packageDir, {
|
|
462
462
|
strict: true,
|
|
463
463
|
strip: 1,
|
|
464
464
|
unlink: true
|
|
465
|
-
}, req.name, req.version)
|
|
465
|
+
}, req.name, req.version), `tar.extract(${req.tarball}) => ${packageDir}`);
|
|
466
466
|
if (cache != null) {
|
|
467
467
|
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debug).call(this, `Package cache enabled, extraction resulted in a cache ${cache}`);
|
|
468
468
|
}
|
|
@@ -471,16 +471,16 @@ var __webpack_modules__ = {
|
|
|
471
471
|
}
|
|
472
472
|
let assmSpec;
|
|
473
473
|
try {
|
|
474
|
-
assmSpec = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debugTime).call(this, (
|
|
474
|
+
assmSpec = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debugTime).call(this, () => spec.loadAssemblyFromPath(packageDir, this.validateAssemblies), `loadAssemblyFromPath(${packageDir})`);
|
|
475
475
|
} catch (e) {
|
|
476
476
|
throw new JsiiFault(`Error for package tarball ${req.tarball}: ${e.message}`);
|
|
477
477
|
}
|
|
478
478
|
const entryPoint = __classPrivateFieldGet(this, _Kernel_require, "f").resolve(assmSpec.name, {
|
|
479
479
|
paths: [ __classPrivateFieldGet(this, _Kernel_installDir, "f") ]
|
|
480
480
|
});
|
|
481
|
-
const closure = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debugTime).call(this, (
|
|
481
|
+
const closure = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debugTime).call(this, () => __classPrivateFieldGet(this, _Kernel_require, "f")(entryPoint), `require(${entryPoint})`);
|
|
482
482
|
const assm = new Assembly(assmSpec, closure);
|
|
483
|
-
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debugTime).call(this, (
|
|
483
|
+
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debugTime).call(this, () => __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_addAssembly).call(this, assm), `registerAssembly({ name: ${assm.metadata.name}, types: ${Object.keys((_b = assm.metadata.types) !== null && _b !== void 0 ? _b : {}).length} })`);
|
|
484
484
|
return {
|
|
485
485
|
assembly: assmSpec.name,
|
|
486
486
|
types: Object.keys((_c = assmSpec.types) !== null && _c !== void 0 ? _c : {}).length
|
|
@@ -489,7 +489,7 @@ var __webpack_modules__ = {
|
|
|
489
489
|
var _a;
|
|
490
490
|
__classPrivateFieldGet(this, _Kernel_assemblies, "f").set(assm.metadata.name, assm);
|
|
491
491
|
const jsiiVersion = assm.metadata.jsiiVersion.split(" ", 1)[0];
|
|
492
|
-
const [jsiiMajor, jsiiMinor, _jsiiPatch, ..._rest] = jsiiVersion.split(".").map(
|
|
492
|
+
const [jsiiMajor, jsiiMinor, _jsiiPatch, ..._rest] = jsiiVersion.split(".").map(str => parseInt(str, 10));
|
|
493
493
|
if (jsiiVersion === "0.0.0" || jsiiMajor > 1 || jsiiMajor === 1 && jsiiMinor >= 19) {
|
|
494
494
|
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debug).call(this, "Using compiler-woven runtime type information!");
|
|
495
495
|
return;
|
|
@@ -684,7 +684,7 @@ var __webpack_modules__ = {
|
|
|
684
684
|
value: (...methodArgs) => {
|
|
685
685
|
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debug).call(this, "invoke async method override", override);
|
|
686
686
|
const args = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_toSandboxValues).call(this, methodArgs, methodContext, methodInfo.parameters);
|
|
687
|
-
return new Promise((
|
|
687
|
+
return new Promise((succeed, fail) => {
|
|
688
688
|
var _a;
|
|
689
689
|
const cbid = __classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_makecbid).call(this);
|
|
690
690
|
__classPrivateFieldGet(this, _Kernel_instances, "m", _Kernel_debug).call(this, "adding callback to queue", cbid);
|
|
@@ -696,7 +696,7 @@ var __webpack_modules__ = {
|
|
|
696
696
|
succeed,
|
|
697
697
|
fail
|
|
698
698
|
});
|
|
699
|
-
})
|
|
699
|
+
});
|
|
700
700
|
}
|
|
701
701
|
});
|
|
702
702
|
} else {
|
|
@@ -893,7 +893,7 @@ var __webpack_modules__ = {
|
|
|
893
893
|
if (xs.length > parametersCopy.length) {
|
|
894
894
|
throw new JsiiFault(`Argument list (${JSON.stringify(xs)}) not same size as expected argument list (length ${parametersCopy.length})`);
|
|
895
895
|
}
|
|
896
|
-
return xs.map((
|
|
896
|
+
return xs.map((x, i) => boxUnbox(x, parametersCopy[i], `passed to parameter ${parametersCopy[i].name} of ${methodContext}`));
|
|
897
897
|
}, _Kernel_debug = function _Kernel_debug(...args) {
|
|
898
898
|
if (this.traceEnabled) {
|
|
899
899
|
console.error("[@jsii/kernel]", ...args);
|
|
@@ -1014,7 +1014,7 @@ var __webpack_modules__ = {
|
|
|
1014
1014
|
} else {
|
|
1015
1015
|
gen.if((0, codegen_1.not)(schValid), validateClause("else"));
|
|
1016
1016
|
}
|
|
1017
|
-
cxt.pass(valid, (
|
|
1017
|
+
cxt.pass(valid, () => cxt.error(true));
|
|
1018
1018
|
function validateIf() {
|
|
1019
1019
|
const schCxt = cxt.subschema({
|
|
1020
1020
|
keyword: "if",
|
|
@@ -1078,35 +1078,35 @@ var __webpack_modules__ = {
|
|
|
1078
1078
|
j
|
|
1079
1079
|
});
|
|
1080
1080
|
gen.assign(valid, true);
|
|
1081
|
-
gen.if((0, codegen_1._)`${i} > 1`, (
|
|
1081
|
+
gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));
|
|
1082
1082
|
}
|
|
1083
1083
|
function canOptimize() {
|
|
1084
|
-
return itemTypes.length > 0 && !itemTypes.some(
|
|
1084
|
+
return itemTypes.length > 0 && !itemTypes.some(t => t === "object" || t === "array");
|
|
1085
1085
|
}
|
|
1086
1086
|
function loopN(i, j) {
|
|
1087
1087
|
const item = gen.name("item");
|
|
1088
1088
|
const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);
|
|
1089
1089
|
const indices = gen.const("indices", (0, codegen_1._)`{}`);
|
|
1090
|
-
gen.for((0, codegen_1._)`;${i}--;`, (
|
|
1090
|
+
gen.for((0, codegen_1._)`;${i}--;`, () => {
|
|
1091
1091
|
gen.let(item, (0, codegen_1._)`${data}[${i}]`);
|
|
1092
1092
|
gen.if(wrongType, (0, codegen_1._)`continue`);
|
|
1093
1093
|
if (itemTypes.length > 1) gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0,
|
|
1094
1094
|
codegen_1._)`${item} += "_"`);
|
|
1095
|
-
gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, (
|
|
1095
|
+
gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => {
|
|
1096
1096
|
gen.assign(j, (0, codegen_1._)`${indices}[${item}]`);
|
|
1097
1097
|
cxt.error();
|
|
1098
1098
|
gen.assign(valid, false).break();
|
|
1099
|
-
})
|
|
1100
|
-
})
|
|
1099
|
+
}).code((0, codegen_1._)`${indices}[${item}] = ${i}`);
|
|
1100
|
+
});
|
|
1101
1101
|
}
|
|
1102
1102
|
function loopN2(i, j) {
|
|
1103
1103
|
const eql = (0, util_1.useFunc)(gen, equal_1.default);
|
|
1104
1104
|
const outer = gen.name("outer");
|
|
1105
|
-
gen.label(outer).for((0, codegen_1._)`;${i}--;`, (
|
|
1106
|
-
codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, (
|
|
1105
|
+
gen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0,
|
|
1106
|
+
codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, () => {
|
|
1107
1107
|
cxt.error();
|
|
1108
1108
|
gen.assign(valid, false).break(outer);
|
|
1109
|
-
})))
|
|
1109
|
+
})));
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
1112
|
};
|
|
@@ -1144,9 +1144,6 @@ var __webpack_modules__ = {
|
|
|
1144
1144
|
});
|
|
1145
1145
|
exports.NameTree = void 0;
|
|
1146
1146
|
class NameTree {
|
|
1147
|
-
constructor() {
|
|
1148
|
-
this._children = {};
|
|
1149
|
-
}
|
|
1150
1147
|
static of(assm) {
|
|
1151
1148
|
const nameTree = new NameTree;
|
|
1152
1149
|
for (const type of Object.values(assm.types ?? {})) {
|
|
@@ -1154,6 +1151,9 @@ var __webpack_modules__ = {
|
|
|
1154
1151
|
}
|
|
1155
1152
|
return nameTree;
|
|
1156
1153
|
}
|
|
1154
|
+
constructor() {
|
|
1155
|
+
this._children = {};
|
|
1156
|
+
}
|
|
1157
1157
|
get children() {
|
|
1158
1158
|
return this._children;
|
|
1159
1159
|
}
|
|
@@ -1410,7 +1410,7 @@ var __webpack_modules__ = {
|
|
|
1410
1410
|
this.nodes = nodes;
|
|
1411
1411
|
}
|
|
1412
1412
|
render(opts) {
|
|
1413
|
-
return this.nodes.reduce((
|
|
1413
|
+
return this.nodes.reduce((code, n) => code + n.render(opts), "");
|
|
1414
1414
|
}
|
|
1415
1415
|
optimizeNodes() {
|
|
1416
1416
|
const {nodes} = this;
|
|
@@ -1433,7 +1433,7 @@ var __webpack_modules__ = {
|
|
|
1433
1433
|
return nodes.length > 0 ? this : undefined;
|
|
1434
1434
|
}
|
|
1435
1435
|
get names() {
|
|
1436
|
-
return this.nodes.reduce((
|
|
1436
|
+
return this.nodes.reduce((names, n) => addNames(names, n.names), {});
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
1439
|
class BlockNode extends ParentNode {
|
|
@@ -1713,25 +1713,25 @@ var __webpack_modules__ = {
|
|
|
1713
1713
|
}
|
|
1714
1714
|
forRange(nameOrPrefix, from, to, forBody, varKind = (this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let)) {
|
|
1715
1715
|
const name = this._scope.toName(nameOrPrefix);
|
|
1716
|
-
return this._for(new ForRange(varKind, name, from, to), (
|
|
1716
|
+
return this._for(new ForRange(varKind, name, from, to), () => forBody(name));
|
|
1717
1717
|
}
|
|
1718
1718
|
forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {
|
|
1719
1719
|
const name = this._scope.toName(nameOrPrefix);
|
|
1720
1720
|
if (this.opts.es5) {
|
|
1721
1721
|
const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable);
|
|
1722
|
-
return this.forRange("_i", 0, (0, code_1._)`${arr}.length`,
|
|
1722
|
+
return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, i => {
|
|
1723
1723
|
this.var(name, (0, code_1._)`${arr}[${i}]`);
|
|
1724
1724
|
forBody(name);
|
|
1725
|
-
})
|
|
1725
|
+
});
|
|
1726
1726
|
}
|
|
1727
|
-
return this._for(new ForIter("of", varKind, name, iterable), (
|
|
1727
|
+
return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name));
|
|
1728
1728
|
}
|
|
1729
1729
|
forIn(nameOrPrefix, obj, forBody, varKind = (this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const)) {
|
|
1730
1730
|
if (this.opts.ownProperties) {
|
|
1731
1731
|
return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);
|
|
1732
1732
|
}
|
|
1733
1733
|
const name = this._scope.toName(nameOrPrefix);
|
|
1734
|
-
return this._for(new ForIter("in", varKind, name, obj), (
|
|
1734
|
+
return this._for(new ForIter("in", varKind, name, obj), () => forBody(name));
|
|
1735
1735
|
}
|
|
1736
1736
|
endFor() {
|
|
1737
1737
|
return this._endBlockNode(For);
|
|
@@ -1844,11 +1844,11 @@ var __webpack_modules__ = {
|
|
|
1844
1844
|
function optimizeExpr(expr, names, constants) {
|
|
1845
1845
|
if (expr instanceof code_1.Name) return replaceName(expr);
|
|
1846
1846
|
if (!canOptimize(expr)) return expr;
|
|
1847
|
-
return new code_1._Code(expr._items.reduce((
|
|
1847
|
+
return new code_1._Code(expr._items.reduce((items, c) => {
|
|
1848
1848
|
if (c instanceof code_1.Name) c = replaceName(c);
|
|
1849
1849
|
if (c instanceof code_1._Code) items.push(...c._items); else items.push(c);
|
|
1850
1850
|
return items;
|
|
1851
|
-
}
|
|
1851
|
+
}, []));
|
|
1852
1852
|
function replaceName(n) {
|
|
1853
1853
|
const c = constants[n.str];
|
|
1854
1854
|
if (c === undefined || names[n.str] !== 1) return n;
|
|
@@ -1856,7 +1856,7 @@ var __webpack_modules__ = {
|
|
|
1856
1856
|
return c;
|
|
1857
1857
|
}
|
|
1858
1858
|
function canOptimize(e) {
|
|
1859
|
-
return e instanceof code_1._Code && e._items.some(
|
|
1859
|
+
return e instanceof code_1._Code && e._items.some(c => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined);
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
1862
|
function subtractNames(names, from) {
|
|
@@ -1890,11 +1890,11 @@ var __webpack_modules__ = {
|
|
|
1890
1890
|
callback = typeof type === "function" ? type : callback;
|
|
1891
1891
|
type = typeof type === "function" ? false : type;
|
|
1892
1892
|
if (type) return callback(null, type);
|
|
1893
|
-
fs.lstat(srcpath, (
|
|
1893
|
+
fs.lstat(srcpath, (err, stats) => {
|
|
1894
1894
|
if (err) return callback(null, "file");
|
|
1895
1895
|
type = stats && stats.isDirectory() ? "dir" : "file";
|
|
1896
1896
|
callback(null, type);
|
|
1897
|
-
})
|
|
1897
|
+
});
|
|
1898
1898
|
}
|
|
1899
1899
|
function symlinkTypeSync(srcpath, type) {
|
|
1900
1900
|
let stats;
|
|
@@ -1935,14 +1935,14 @@ var __webpack_modules__ = {
|
|
|
1935
1935
|
"use strict";
|
|
1936
1936
|
const fs = __webpack_require__(9333);
|
|
1937
1937
|
function utimesMillis(path, atime, mtime, callback) {
|
|
1938
|
-
fs.open(path, "r+", (
|
|
1938
|
+
fs.open(path, "r+", (err, fd) => {
|
|
1939
1939
|
if (err) return callback(err);
|
|
1940
|
-
fs.futimes(fd, atime, mtime,
|
|
1941
|
-
fs.close(fd,
|
|
1940
|
+
fs.futimes(fd, atime, mtime, futimesErr => {
|
|
1941
|
+
fs.close(fd, closeErr => {
|
|
1942
1942
|
if (callback) callback(futimesErr || closeErr);
|
|
1943
|
-
})
|
|
1944
|
-
})
|
|
1945
|
-
})
|
|
1943
|
+
});
|
|
1944
|
+
});
|
|
1945
|
+
});
|
|
1946
1946
|
}
|
|
1947
1947
|
function utimesMillisSync(path, atime, mtime) {
|
|
1948
1948
|
const fd = fs.openSync(path, "r+");
|
|
@@ -1961,7 +1961,7 @@ var __webpack_modules__ = {
|
|
|
1961
1961
|
const pathExists = __webpack_require__(9270).pathExists;
|
|
1962
1962
|
function symlinkPaths(srcpath, dstpath, callback) {
|
|
1963
1963
|
if (path.isAbsolute(srcpath)) {
|
|
1964
|
-
return fs.lstat(srcpath,
|
|
1964
|
+
return fs.lstat(srcpath, err => {
|
|
1965
1965
|
if (err) {
|
|
1966
1966
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
1967
1967
|
return callback(err);
|
|
@@ -1970,11 +1970,11 @@ var __webpack_modules__ = {
|
|
|
1970
1970
|
toCwd: srcpath,
|
|
1971
1971
|
toDst: srcpath
|
|
1972
1972
|
});
|
|
1973
|
-
})
|
|
1973
|
+
});
|
|
1974
1974
|
} else {
|
|
1975
1975
|
const dstdir = path.dirname(dstpath);
|
|
1976
1976
|
const relativeToDst = path.join(dstdir, srcpath);
|
|
1977
|
-
return pathExists(relativeToDst, (
|
|
1977
|
+
return pathExists(relativeToDst, (err, exists) => {
|
|
1978
1978
|
if (err) return callback(err);
|
|
1979
1979
|
if (exists) {
|
|
1980
1980
|
return callback(null, {
|
|
@@ -1982,7 +1982,7 @@ var __webpack_modules__ = {
|
|
|
1982
1982
|
toDst: srcpath
|
|
1983
1983
|
});
|
|
1984
1984
|
} else {
|
|
1985
|
-
return fs.lstat(srcpath,
|
|
1985
|
+
return fs.lstat(srcpath, err => {
|
|
1986
1986
|
if (err) {
|
|
1987
1987
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
1988
1988
|
return callback(err);
|
|
@@ -1991,9 +1991,9 @@ var __webpack_modules__ = {
|
|
|
1991
1991
|
toCwd: srcpath,
|
|
1992
1992
|
toDst: path.relative(dstdir, srcpath)
|
|
1993
1993
|
});
|
|
1994
|
-
})
|
|
1994
|
+
});
|
|
1995
1995
|
}
|
|
1996
|
-
})
|
|
1996
|
+
});
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
1999
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
@@ -2127,7 +2127,7 @@ var __webpack_modules__ = {
|
|
|
2127
2127
|
const missing = gen.let("missing");
|
|
2128
2128
|
if (useLoop || $data) {
|
|
2129
2129
|
const valid = gen.let("valid", true);
|
|
2130
|
-
cxt.block$data(valid, (
|
|
2130
|
+
cxt.block$data(valid, () => loopUntilMissing(missing, valid));
|
|
2131
2131
|
cxt.ok(valid);
|
|
2132
2132
|
} else {
|
|
2133
2133
|
gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));
|
|
@@ -2136,24 +2136,24 @@ var __webpack_modules__ = {
|
|
|
2136
2136
|
}
|
|
2137
2137
|
}
|
|
2138
2138
|
function loopAllRequired() {
|
|
2139
|
-
gen.forOf("prop", schemaCode,
|
|
2139
|
+
gen.forOf("prop", schemaCode, prop => {
|
|
2140
2140
|
cxt.setParams({
|
|
2141
2141
|
missingProperty: prop
|
|
2142
2142
|
});
|
|
2143
|
-
gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), (
|
|
2144
|
-
})
|
|
2143
|
+
gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());
|
|
2144
|
+
});
|
|
2145
2145
|
}
|
|
2146
2146
|
function loopUntilMissing(missing, valid) {
|
|
2147
2147
|
cxt.setParams({
|
|
2148
2148
|
missingProperty: missing
|
|
2149
2149
|
});
|
|
2150
|
-
gen.forOf(missing, schemaCode, (
|
|
2150
|
+
gen.forOf(missing, schemaCode, () => {
|
|
2151
2151
|
gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));
|
|
2152
|
-
gen.if((0, codegen_1.not)(valid), (
|
|
2152
|
+
gen.if((0, codegen_1.not)(valid), () => {
|
|
2153
2153
|
cxt.error();
|
|
2154
2154
|
gen.break();
|
|
2155
|
-
})
|
|
2156
|
-
}
|
|
2155
|
+
});
|
|
2156
|
+
}, codegen_1.nil);
|
|
2157
2157
|
}
|
|
2158
2158
|
}
|
|
2159
2159
|
};
|
|
@@ -2187,9 +2187,9 @@ var __webpack_modules__ = {
|
|
|
2187
2187
|
passing
|
|
2188
2188
|
});
|
|
2189
2189
|
gen.block(validateOneOf);
|
|
2190
|
-
cxt.result(valid, (
|
|
2190
|
+
cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
|
|
2191
2191
|
function validateOneOf() {
|
|
2192
|
-
schArr.forEach((
|
|
2192
|
+
schArr.forEach((sch, i) => {
|
|
2193
2193
|
let schCxt;
|
|
2194
2194
|
if ((0, util_1.alwaysValidSchema)(it, sch)) {
|
|
2195
2195
|
gen.var(schValid, true);
|
|
@@ -2204,12 +2204,12 @@ var __webpack_modules__ = {
|
|
|
2204
2204
|
gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0,
|
|
2205
2205
|
codegen_1._)`[${passing}, ${i}]`).else();
|
|
2206
2206
|
}
|
|
2207
|
-
gen.if(schValid, (
|
|
2207
|
+
gen.if(schValid, () => {
|
|
2208
2208
|
gen.assign(valid, true);
|
|
2209
2209
|
gen.assign(passing, i);
|
|
2210
2210
|
if (schCxt) cxt.mergeEvaluated(schCxt, codegen_1.Name);
|
|
2211
|
-
})
|
|
2212
|
-
})
|
|
2211
|
+
});
|
|
2212
|
+
});
|
|
2213
2213
|
}
|
|
2214
2214
|
}
|
|
2215
2215
|
};
|
|
@@ -2252,22 +2252,22 @@ var __webpack_modules__ = {
|
|
|
2252
2252
|
let readdirSync = (path, options) => fs.readdirSync(path, options);
|
|
2253
2253
|
if (/^v4\./.test(nodeVersion)) readdir = (path, options, cb) => fs.readdir(path, cb);
|
|
2254
2254
|
const chown = (cpath, uid, gid, cb) => {
|
|
2255
|
-
fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid,
|
|
2255
|
+
fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => {
|
|
2256
2256
|
cb(er && er.code !== "ENOENT" ? er : null);
|
|
2257
|
-
}))
|
|
2257
|
+
}));
|
|
2258
2258
|
};
|
|
2259
2259
|
const chownrKid = (p, child, uid, gid, cb) => {
|
|
2260
|
-
if (typeof child === "string") return fs.lstat(path.resolve(p, child), (
|
|
2260
|
+
if (typeof child === "string") return fs.lstat(path.resolve(p, child), (er, stats) => {
|
|
2261
2261
|
if (er) return cb(er.code !== "ENOENT" ? er : null);
|
|
2262
2262
|
stats.name = child;
|
|
2263
2263
|
chownrKid(p, stats, uid, gid, cb);
|
|
2264
|
-
})
|
|
2264
|
+
});
|
|
2265
2265
|
if (child.isDirectory()) {
|
|
2266
|
-
chownr(path.resolve(p, child.name), uid, gid,
|
|
2266
|
+
chownr(path.resolve(p, child.name), uid, gid, er => {
|
|
2267
2267
|
if (er) return cb(er);
|
|
2268
2268
|
const cpath = path.resolve(p, child.name);
|
|
2269
2269
|
chown(cpath, uid, gid, cb);
|
|
2270
|
-
})
|
|
2270
|
+
});
|
|
2271
2271
|
} else {
|
|
2272
2272
|
const cpath = path.resolve(p, child.name);
|
|
2273
2273
|
chown(cpath, uid, gid, cb);
|
|
@@ -2276,7 +2276,7 @@ var __webpack_modules__ = {
|
|
|
2276
2276
|
const chownr = (p, uid, gid, cb) => {
|
|
2277
2277
|
readdir(p, {
|
|
2278
2278
|
withFileTypes: true
|
|
2279
|
-
}, (
|
|
2279
|
+
}, (er, children) => {
|
|
2280
2280
|
if (er) {
|
|
2281
2281
|
if (er.code === "ENOENT") return cb(); else if (er.code !== "ENOTDIR" && er.code !== "ENOTSUP") return cb(er);
|
|
2282
2282
|
}
|
|
@@ -2288,8 +2288,8 @@ var __webpack_modules__ = {
|
|
|
2288
2288
|
if (er) return cb(errState = er);
|
|
2289
2289
|
if (--len === 0) return chown(p, uid, gid, cb);
|
|
2290
2290
|
};
|
|
2291
|
-
children.forEach(
|
|
2292
|
-
})
|
|
2291
|
+
children.forEach(child => chownrKid(p, child, uid, gid, then));
|
|
2292
|
+
});
|
|
2293
2293
|
};
|
|
2294
2294
|
const chownrKidSync = (p, child, uid, gid) => {
|
|
2295
2295
|
if (typeof child === "string") {
|
|
@@ -2313,7 +2313,7 @@ var __webpack_modules__ = {
|
|
|
2313
2313
|
} catch (er) {
|
|
2314
2314
|
if (er.code === "ENOENT") return; else if (er.code === "ENOTDIR" || er.code === "ENOTSUP") return handleEISDirSync(p, uid, gid); else throw er;
|
|
2315
2315
|
}
|
|
2316
|
-
if (children && children.length) children.forEach(
|
|
2316
|
+
if (children && children.length) children.forEach(child => chownrKidSync(p, child, uid, gid));
|
|
2317
2317
|
return handleEISDirSync(p, uid, gid);
|
|
2318
2318
|
};
|
|
2319
2319
|
module.exports = chownr;
|
|
@@ -2348,9 +2348,9 @@ var __webpack_modules__ = {
|
|
|
2348
2348
|
const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`);
|
|
2349
2349
|
const fType = gen.let("fType");
|
|
2350
2350
|
const format = gen.let("format");
|
|
2351
|
-
gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, (
|
|
2352
|
-
codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`)
|
|
2353
|
-
codegen_1._)`"string"`).assign(format, fDef))
|
|
2351
|
+
gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0,
|
|
2352
|
+
codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0,
|
|
2353
|
+
codegen_1._)`"string"`).assign(format, fDef));
|
|
2354
2354
|
cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));
|
|
2355
2355
|
function unknownFmt() {
|
|
2356
2356
|
if (opts.strictSchema === false) return codegen_1.nil;
|
|
@@ -2438,12 +2438,12 @@ var __webpack_modules__ = {
|
|
|
2438
2438
|
const cGet = (cache, key) => cache.get(normPath(key));
|
|
2439
2439
|
const cSet = (cache, key, val) => cache.set(normPath(key), val);
|
|
2440
2440
|
const checkCwd = (dir, cb) => {
|
|
2441
|
-
fs.stat(dir, (
|
|
2441
|
+
fs.stat(dir, (er, st) => {
|
|
2442
2442
|
if (er || !st.isDirectory()) {
|
|
2443
2443
|
er = new CwdError(dir, er && er.code || "ENOTDIR");
|
|
2444
2444
|
}
|
|
2445
2445
|
cb(er);
|
|
2446
|
-
})
|
|
2446
|
+
});
|
|
2447
2447
|
};
|
|
2448
2448
|
module.exports = (dir, opt, cb) => {
|
|
2449
2449
|
dir = normPath(dir);
|
|
@@ -2463,7 +2463,7 @@ var __webpack_modules__ = {
|
|
|
2463
2463
|
} else {
|
|
2464
2464
|
cSet(cache, dir, true);
|
|
2465
2465
|
if (created && doChown) {
|
|
2466
|
-
chownr(created, uid, gid,
|
|
2466
|
+
chownr(created, uid, gid, er => done(er));
|
|
2467
2467
|
} else if (needChmod) {
|
|
2468
2468
|
fs.chmod(dir, mode, cb);
|
|
2469
2469
|
} else {
|
|
@@ -2480,7 +2480,7 @@ var __webpack_modules__ = {
|
|
|
2480
2480
|
if (preserve) {
|
|
2481
2481
|
return mkdirp(dir, {
|
|
2482
2482
|
mode
|
|
2483
|
-
}).then(
|
|
2483
|
+
}).then(made => done(null, made), done);
|
|
2484
2484
|
}
|
|
2485
2485
|
const sub = normPath(path.relative(cwd, dir));
|
|
2486
2486
|
const parts = sub.split("/");
|
|
@@ -2499,25 +2499,25 @@ var __webpack_modules__ = {
|
|
|
2499
2499
|
};
|
|
2500
2500
|
const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => er => {
|
|
2501
2501
|
if (er) {
|
|
2502
|
-
fs.lstat(part, (
|
|
2502
|
+
fs.lstat(part, (statEr, st) => {
|
|
2503
2503
|
if (statEr) {
|
|
2504
2504
|
statEr.path = statEr.path && normPath(statEr.path);
|
|
2505
2505
|
cb(statEr);
|
|
2506
2506
|
} else if (st.isDirectory()) {
|
|
2507
2507
|
mkdir_(part, parts, mode, cache, unlink, cwd, created, cb);
|
|
2508
2508
|
} else if (unlink) {
|
|
2509
|
-
fs.unlink(part,
|
|
2509
|
+
fs.unlink(part, er => {
|
|
2510
2510
|
if (er) {
|
|
2511
2511
|
return cb(er);
|
|
2512
2512
|
}
|
|
2513
2513
|
fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb));
|
|
2514
|
-
})
|
|
2514
|
+
});
|
|
2515
2515
|
} else if (st.isSymbolicLink()) {
|
|
2516
2516
|
return cb(new SymlinkError(part, part + "/" + parts.join("/")));
|
|
2517
2517
|
} else {
|
|
2518
2518
|
cb(er);
|
|
2519
2519
|
}
|
|
2520
|
-
})
|
|
2520
|
+
});
|
|
2521
2521
|
} else {
|
|
2522
2522
|
created = created || part;
|
|
2523
2523
|
mkdir_(part, parts, mode, cache, unlink, cwd, created, cb);
|
|
@@ -2633,7 +2633,7 @@ var __webpack_modules__ = {
|
|
|
2633
2633
|
return opt.file && opt.sync ? extractFileSync(opt) : opt.file ? extractFile(opt, cb) : opt.sync ? extractSync(opt) : extract(opt);
|
|
2634
2634
|
};
|
|
2635
2635
|
const filesFilter = (opt, files) => {
|
|
2636
|
-
const map = new Map(files.map(
|
|
2636
|
+
const map = new Map(files.map(f => [ stripSlash(f), true ]));
|
|
2637
2637
|
const filter = opt.filter;
|
|
2638
2638
|
const mapHas = (file, r) => {
|
|
2639
2639
|
const root = r || path.parse(file).root || ".";
|
|
@@ -2658,10 +2658,10 @@ var __webpack_modules__ = {
|
|
|
2658
2658
|
const u = new Unpack(opt);
|
|
2659
2659
|
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
|
2660
2660
|
const file = opt.file;
|
|
2661
|
-
const p = new Promise((
|
|
2661
|
+
const p = new Promise((resolve, reject) => {
|
|
2662
2662
|
u.on("error", reject);
|
|
2663
2663
|
u.on("close", resolve);
|
|
2664
|
-
fs.stat(file, (
|
|
2664
|
+
fs.stat(file, (er, stat) => {
|
|
2665
2665
|
if (er) {
|
|
2666
2666
|
reject(er);
|
|
2667
2667
|
} else {
|
|
@@ -2672,8 +2672,8 @@ var __webpack_modules__ = {
|
|
|
2672
2672
|
stream.on("error", reject);
|
|
2673
2673
|
stream.pipe(u);
|
|
2674
2674
|
}
|
|
2675
|
-
})
|
|
2676
|
-
})
|
|
2675
|
+
});
|
|
2676
|
+
});
|
|
2677
2677
|
return cb ? p.then(cb, cb) : p;
|
|
2678
2678
|
};
|
|
2679
2679
|
const extractSync = opt => new Unpack.Sync(opt);
|
|
@@ -2802,7 +2802,7 @@ var __webpack_modules__ = {
|
|
|
2802
2802
|
this[SIGNAL] = options && options.signal;
|
|
2803
2803
|
this[ABORTED] = false;
|
|
2804
2804
|
if (this[SIGNAL]) {
|
|
2805
|
-
this[SIGNAL].addEventListener("abort", (
|
|
2805
|
+
this[SIGNAL].addEventListener("abort", () => this[ABORT]());
|
|
2806
2806
|
if (this[SIGNAL].aborted) {
|
|
2807
2807
|
this[ABORT]();
|
|
2808
2808
|
}
|
|
@@ -2819,7 +2819,7 @@ var __webpack_modules__ = {
|
|
|
2819
2819
|
if (this[ENCODING] && enc !== this[ENCODING] && (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) throw new Error("cannot change encoding");
|
|
2820
2820
|
if (this[ENCODING] !== enc) {
|
|
2821
2821
|
this[DECODER] = enc ? new SD(enc) : null;
|
|
2822
|
-
if (this[BUFFER].length) this[BUFFER] = this[BUFFER].map(
|
|
2822
|
+
if (this[BUFFER].length) this[BUFFER] = this[BUFFER].map(chunk => this[DECODER].write(chunk));
|
|
2823
2823
|
}
|
|
2824
2824
|
this[ENCODING] = enc;
|
|
2825
2825
|
}
|
|
@@ -2967,12 +2967,12 @@ var __webpack_modules__ = {
|
|
|
2967
2967
|
if (opts.end) dest.end();
|
|
2968
2968
|
} else {
|
|
2969
2969
|
this[PIPES].push(!opts.proxyErrors ? new Pipe(this, dest, opts) : new PipeProxyErrors(this, dest, opts));
|
|
2970
|
-
if (this[ASYNC]) defer((
|
|
2970
|
+
if (this[ASYNC]) defer(() => this[RESUME]()); else this[RESUME]();
|
|
2971
2971
|
}
|
|
2972
2972
|
return dest;
|
|
2973
2973
|
}
|
|
2974
2974
|
unpipe(dest) {
|
|
2975
|
-
const p = this[PIPES].find(
|
|
2975
|
+
const p = this[PIPES].find(p => p.dest === dest);
|
|
2976
2976
|
if (p) {
|
|
2977
2977
|
this[PIPES].splice(this[PIPES].indexOf(p), 1);
|
|
2978
2978
|
p.unpipe();
|
|
@@ -2987,7 +2987,7 @@ var __webpack_modules__ = {
|
|
|
2987
2987
|
super.emit(ev);
|
|
2988
2988
|
this.removeAllListeners(ev);
|
|
2989
2989
|
} else if (ev === "error" && this[EMITTED_ERROR]) {
|
|
2990
|
-
if (this[ASYNC]) defer((
|
|
2990
|
+
if (this[ASYNC]) defer(() => fn.call(this, this[EMITTED_ERROR])); else fn.call(this, this[EMITTED_ERROR]);
|
|
2991
2991
|
}
|
|
2992
2992
|
return ret;
|
|
2993
2993
|
}
|
|
@@ -3006,7 +3006,7 @@ var __webpack_modules__ = {
|
|
|
3006
3006
|
}
|
|
3007
3007
|
emit(ev, data, ...extra) {
|
|
3008
3008
|
if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) return; else if (ev === "data") {
|
|
3009
|
-
return !this[OBJECTMODE] && !data ? false : this[ASYNC] ? defer((
|
|
3009
|
+
return !this[OBJECTMODE] && !data ? false : this[ASYNC] ? defer(() => this[EMITDATA](data)) : this[EMITDATA](data);
|
|
3010
3010
|
} else if (ev === "end") {
|
|
3011
3011
|
return this[EMITEND]();
|
|
3012
3012
|
} else if (ev === "close") {
|
|
@@ -3046,7 +3046,7 @@ var __webpack_modules__ = {
|
|
|
3046
3046
|
if (this[EMITTED_END]) return;
|
|
3047
3047
|
this[EMITTED_END] = true;
|
|
3048
3048
|
this.readable = false;
|
|
3049
|
-
if (this[ASYNC]) defer((
|
|
3049
|
+
if (this[ASYNC]) defer(() => this[EMITEND2]()); else this[EMITEND2]();
|
|
3050
3050
|
}
|
|
3051
3051
|
[EMITEND2]() {
|
|
3052
3052
|
if (this[DECODER]) {
|
|
@@ -3069,21 +3069,21 @@ var __webpack_modules__ = {
|
|
|
3069
3069
|
const buf = [];
|
|
3070
3070
|
if (!this[OBJECTMODE]) buf.dataLength = 0;
|
|
3071
3071
|
const p = this.promise();
|
|
3072
|
-
this.on("data",
|
|
3072
|
+
this.on("data", c => {
|
|
3073
3073
|
buf.push(c);
|
|
3074
3074
|
if (!this[OBJECTMODE]) buf.dataLength += c.length;
|
|
3075
|
-
})
|
|
3076
|
-
return p.then((
|
|
3075
|
+
});
|
|
3076
|
+
return p.then(() => buf);
|
|
3077
3077
|
}
|
|
3078
3078
|
concat() {
|
|
3079
|
-
return this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this.collect().then(
|
|
3079
|
+
return this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this.collect().then(buf => this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength));
|
|
3080
3080
|
}
|
|
3081
3081
|
promise() {
|
|
3082
|
-
return new Promise((
|
|
3083
|
-
this.on(DESTROYED, (
|
|
3084
|
-
this.on("error",
|
|
3085
|
-
this.on("end", (
|
|
3086
|
-
})
|
|
3082
|
+
return new Promise((resolve, reject) => {
|
|
3083
|
+
this.on(DESTROYED, () => reject(new Error("stream destroyed")));
|
|
3084
|
+
this.on("error", er => reject(er));
|
|
3085
|
+
this.on("end", () => resolve());
|
|
3086
|
+
});
|
|
3087
3087
|
}
|
|
3088
3088
|
[ASYNCITERATOR]() {
|
|
3089
3089
|
let stopped = false;
|
|
@@ -3131,14 +3131,14 @@ var __webpack_modules__ = {
|
|
|
3131
3131
|
});
|
|
3132
3132
|
};
|
|
3133
3133
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
3134
|
-
return new Promise((
|
|
3134
|
+
return new Promise((res, rej) => {
|
|
3135
3135
|
reject = rej;
|
|
3136
3136
|
resolve = res;
|
|
3137
3137
|
this.once(DESTROYED, ondestroy);
|
|
3138
3138
|
this.once("error", onerr);
|
|
3139
3139
|
this.once("end", onend);
|
|
3140
3140
|
this.once("data", ondata);
|
|
3141
|
-
})
|
|
3141
|
+
});
|
|
3142
3142
|
};
|
|
3143
3143
|
return {
|
|
3144
3144
|
next,
|
|
@@ -3316,7 +3316,9 @@ var __webpack_modules__ = {
|
|
|
3316
3316
|
Object.defineProperty(exports, "__esModule", {
|
|
3317
3317
|
value: true
|
|
3318
3318
|
});
|
|
3319
|
-
exports.SerializationError = exports.
|
|
3319
|
+
exports.SerializationError = exports.SERIALIZERS = exports.SYMBOL_WIRE_TYPE = exports.EMPTY_OBJECT_FQN = void 0;
|
|
3320
|
+
exports.serializationType = serializationType;
|
|
3321
|
+
exports.process = process;
|
|
3320
3322
|
const spec = __webpack_require__(9501);
|
|
3321
3323
|
const assert = __webpack_require__(2613);
|
|
3322
3324
|
const util_1 = __webpack_require__(9023);
|
|
@@ -3448,7 +3450,7 @@ var __webpack_modules__ = {
|
|
|
3448
3450
|
host.debug("Serializing enum");
|
|
3449
3451
|
const enumType = optionalValue.type;
|
|
3450
3452
|
const enumMap = host.findSymbol(enumType.fqn);
|
|
3451
|
-
const enumEntry = Object.entries(enumMap).find((
|
|
3453
|
+
const enumEntry = Object.entries(enumMap).find(([, v]) => v === value);
|
|
3452
3454
|
if (!enumEntry) {
|
|
3453
3455
|
throw new SerializationError(`Value is not present in enum ${spec.describeTypeReference(enumType)}`, value, host);
|
|
3454
3456
|
}
|
|
@@ -3476,9 +3478,9 @@ var __webpack_modules__ = {
|
|
|
3476
3478
|
throw new SerializationError(`Value is not an array`, value, host);
|
|
3477
3479
|
}
|
|
3478
3480
|
const arrayType = optionalValue.type;
|
|
3479
|
-
return value.map((
|
|
3481
|
+
return value.map((x, idx) => process(host, "serialize", x, {
|
|
3480
3482
|
type: arrayType.collection.elementtype
|
|
3481
|
-
}, `index ${(0, util_1.inspect)(idx)}`))
|
|
3483
|
+
}, `index ${(0, util_1.inspect)(idx)}`));
|
|
3482
3484
|
},
|
|
3483
3485
|
deserialize(value, optionalValue, host) {
|
|
3484
3486
|
if (nullAndOk(value, optionalValue, host)) {
|
|
@@ -3489,9 +3491,9 @@ var __webpack_modules__ = {
|
|
|
3489
3491
|
throw new SerializationError(`Value is not an array`, value, host);
|
|
3490
3492
|
}
|
|
3491
3493
|
const arrayType = optionalValue.type;
|
|
3492
|
-
return value.map((
|
|
3494
|
+
return value.map((x, idx) => process(host, "deserialize", x, {
|
|
3493
3495
|
type: arrayType.collection.elementtype
|
|
3494
|
-
}, `index ${(0, util_1.inspect)(idx)}`))
|
|
3496
|
+
}, `index ${(0, util_1.inspect)(idx)}`));
|
|
3495
3497
|
}
|
|
3496
3498
|
},
|
|
3497
3499
|
["Map"]: {
|
|
@@ -3502,9 +3504,9 @@ var __webpack_modules__ = {
|
|
|
3502
3504
|
assert(optionalValue !== VOID, "Encountered unexpected void type!");
|
|
3503
3505
|
const mapType = optionalValue.type;
|
|
3504
3506
|
return {
|
|
3505
|
-
[api_1.TOKEN_MAP]: mapValues(value, (
|
|
3507
|
+
[api_1.TOKEN_MAP]: mapValues(value, (v, key) => process(host, "serialize", v, {
|
|
3506
3508
|
type: mapType.collection.elementtype
|
|
3507
|
-
}, `key ${(0, util_1.inspect)(key)}`)
|
|
3509
|
+
}, `key ${(0, util_1.inspect)(key)}`), host)
|
|
3508
3510
|
};
|
|
3509
3511
|
},
|
|
3510
3512
|
deserialize(value, optionalValue, host, {allowNullishMapValue = false} = {}) {
|
|
@@ -3514,15 +3516,15 @@ var __webpack_modules__ = {
|
|
|
3514
3516
|
assert(optionalValue !== VOID, "Encountered unexpected void type!");
|
|
3515
3517
|
const mapType = optionalValue.type;
|
|
3516
3518
|
if (!(0, api_1.isWireMap)(value)) {
|
|
3517
|
-
return mapValues(value, (
|
|
3519
|
+
return mapValues(value, (v, key) => process(host, "deserialize", v, {
|
|
3518
3520
|
optional: allowNullishMapValue,
|
|
3519
3521
|
type: mapType.collection.elementtype
|
|
3520
|
-
}, `key ${(0, util_1.inspect)(key)}`)
|
|
3522
|
+
}, `key ${(0, util_1.inspect)(key)}`), host);
|
|
3521
3523
|
}
|
|
3522
|
-
const result = mapValues(value[api_1.TOKEN_MAP], (
|
|
3524
|
+
const result = mapValues(value[api_1.TOKEN_MAP], (v, key) => process(host, "deserialize", v, {
|
|
3523
3525
|
optional: allowNullishMapValue,
|
|
3524
3526
|
type: mapType.collection.elementtype
|
|
3525
|
-
}, `key ${(0, util_1.inspect)(key)}`)
|
|
3527
|
+
}, `key ${(0, util_1.inspect)(key)}`), host);
|
|
3526
3528
|
Object.defineProperty(result, exports.SYMBOL_WIRE_TYPE, {
|
|
3527
3529
|
configurable: false,
|
|
3528
3530
|
enumerable: false,
|
|
@@ -3578,12 +3580,12 @@ var __webpack_modules__ = {
|
|
|
3578
3580
|
value = value[_1.api.TOKEN_MAP];
|
|
3579
3581
|
}
|
|
3580
3582
|
value = validateRequiredProps(value, namedType.fqn, props, host);
|
|
3581
|
-
return mapValues(value, (
|
|
3583
|
+
return mapValues(value, (v, key) => {
|
|
3582
3584
|
if (!props[key]) {
|
|
3583
3585
|
return undefined;
|
|
3584
3586
|
}
|
|
3585
3587
|
return process(host, "deserialize", v, props[key], `key ${(0, util_1.inspect)(key)}`);
|
|
3586
|
-
}
|
|
3588
|
+
}, host);
|
|
3587
3589
|
}
|
|
3588
3590
|
},
|
|
3589
3591
|
["RefType"]: {
|
|
@@ -3637,9 +3639,9 @@ var __webpack_modules__ = {
|
|
|
3637
3639
|
return value;
|
|
3638
3640
|
}
|
|
3639
3641
|
if (Array.isArray(value)) {
|
|
3640
|
-
return value.map((
|
|
3642
|
+
return value.map((e, idx) => process(host, "serialize", e, {
|
|
3641
3643
|
type: spec.CANONICAL_ANY
|
|
3642
|
-
}, `index ${(0, util_1.inspect)(idx)}`))
|
|
3644
|
+
}, `index ${(0, util_1.inspect)(idx)}`));
|
|
3643
3645
|
}
|
|
3644
3646
|
if (typeof value === "function") {
|
|
3645
3647
|
throw new SerializationError("Functions cannot be passed across language boundaries", value, host);
|
|
@@ -3668,9 +3670,9 @@ var __webpack_modules__ = {
|
|
|
3668
3670
|
if (jsiiType) {
|
|
3669
3671
|
return host.objects.registerObject(value, jsiiType);
|
|
3670
3672
|
}
|
|
3671
|
-
return mapValues(value, (
|
|
3673
|
+
return mapValues(value, (v, key) => process(host, "serialize", v, {
|
|
3672
3674
|
type: spec.CANONICAL_ANY
|
|
3673
|
-
}, `key ${(0, util_1.inspect)(key)}`)
|
|
3675
|
+
}, `key ${(0, util_1.inspect)(key)}`), host);
|
|
3674
3676
|
},
|
|
3675
3677
|
deserialize(value, _type, host) {
|
|
3676
3678
|
if (value == null) {
|
|
@@ -3686,9 +3688,9 @@ var __webpack_modules__ = {
|
|
|
3686
3688
|
}
|
|
3687
3689
|
if (Array.isArray(value)) {
|
|
3688
3690
|
host.debug("ANY is an Array");
|
|
3689
|
-
return value.map((
|
|
3691
|
+
return value.map((e, idx) => process(host, "deserialize", e, {
|
|
3690
3692
|
type: spec.CANONICAL_ANY
|
|
3691
|
-
}, `index ${(0, util_1.inspect)(idx)}`))
|
|
3693
|
+
}, `index ${(0, util_1.inspect)(idx)}`));
|
|
3692
3694
|
}
|
|
3693
3695
|
if ((0, api_1.isWireEnum)(value)) {
|
|
3694
3696
|
host.debug("ANY is an Enum");
|
|
@@ -3720,9 +3722,9 @@ var __webpack_modules__ = {
|
|
|
3720
3722
|
}, host);
|
|
3721
3723
|
}
|
|
3722
3724
|
host.debug("ANY is a Map");
|
|
3723
|
-
return mapValues(value, (
|
|
3725
|
+
return mapValues(value, (v, key) => process(host, "deserialize", v, {
|
|
3724
3726
|
type: spec.CANONICAL_ANY
|
|
3725
|
-
}, `key ${(0, util_1.inspect)(key)}`)
|
|
3727
|
+
}, `key ${(0, util_1.inspect)(key)}`), host);
|
|
3726
3728
|
}
|
|
3727
3729
|
}
|
|
3728
3730
|
};
|
|
@@ -3793,15 +3795,15 @@ var __webpack_modules__ = {
|
|
|
3793
3795
|
} ];
|
|
3794
3796
|
}
|
|
3795
3797
|
if (spec.isUnionTypeReference(typeRef.type)) {
|
|
3796
|
-
const compoundTypes = flatMap(typeRef.type.union.types,
|
|
3798
|
+
const compoundTypes = flatMap(typeRef.type.union.types, t => serializationType({
|
|
3797
3799
|
type: t
|
|
3798
|
-
}, lookup))
|
|
3800
|
+
}, lookup));
|
|
3799
3801
|
for (const t of compoundTypes) {
|
|
3800
3802
|
if (t.typeRef !== "void") {
|
|
3801
3803
|
t.typeRef.optional = typeRef.optional;
|
|
3802
3804
|
}
|
|
3803
3805
|
}
|
|
3804
|
-
return compoundTypes.sort((
|
|
3806
|
+
return compoundTypes.sort((l, r) => compareSerializationClasses(l.serializationClass, r.serializationClass));
|
|
3805
3807
|
}
|
|
3806
3808
|
const type = lookup(typeRef.type.fqn);
|
|
3807
3809
|
if (spec.isEnumType(type)) {
|
|
@@ -3821,7 +3823,6 @@ var __webpack_modules__ = {
|
|
|
3821
3823
|
typeRef
|
|
3822
3824
|
} ];
|
|
3823
3825
|
}
|
|
3824
|
-
exports.serializationType = serializationType;
|
|
3825
3826
|
function nullAndOk(x, type, host) {
|
|
3826
3827
|
if (x != null) {
|
|
3827
3828
|
return false;
|
|
@@ -3900,15 +3901,15 @@ var __webpack_modules__ = {
|
|
|
3900
3901
|
}
|
|
3901
3902
|
}
|
|
3902
3903
|
if (spec.isClassOrInterfaceType(actualType) && actualType.interfaces) {
|
|
3903
|
-
return actualType.interfaces.find(
|
|
3904
|
+
return actualType.interfaces.find(iface => isAssignable(iface, requiredType, lookup)) != null;
|
|
3904
3905
|
}
|
|
3905
3906
|
return false;
|
|
3906
3907
|
}
|
|
3907
3908
|
function validateRequiredProps(actualProps, typeName, specProps, host) {
|
|
3908
|
-
const missingRequiredProps = Object.keys(specProps).filter(
|
|
3909
|
+
const missingRequiredProps = Object.keys(specProps).filter(name => !specProps[name].optional).filter(name => !(name in actualProps));
|
|
3909
3910
|
if (missingRequiredProps.length > 0) {
|
|
3910
|
-
throw new SerializationError(`Missing required properties for ${typeName}: ${missingRequiredProps.map(
|
|
3911
|
-
util_1.inspect)(p))
|
|
3911
|
+
throw new SerializationError(`Missing required properties for ${typeName}: ${missingRequiredProps.map(p => (0,
|
|
3912
|
+
util_1.inspect)(p)).join(", ")}`, actualProps, host);
|
|
3912
3913
|
}
|
|
3913
3914
|
return actualProps;
|
|
3914
3915
|
}
|
|
@@ -3957,15 +3958,14 @@ var __webpack_modules__ = {
|
|
|
3957
3958
|
return [ first.toUpperCase(), ...rest ].join("");
|
|
3958
3959
|
}
|
|
3959
3960
|
}
|
|
3960
|
-
exports.process = process;
|
|
3961
3961
|
class SerializationError extends Error {
|
|
3962
3962
|
constructor(message, value, {isVisibleType}, causes = [], {renderValue = false} = {}) {
|
|
3963
3963
|
super([ message, ...renderValue ? [ `${causes.length > 0 ? "├" : "╰"}── 🛑 Failing value is ${describeTypeOf(value, isVisibleType)}`, ...value == null ? [] : (0,
|
|
3964
|
-
util_1.inspect)(value, false, 0).split("\n").map(
|
|
3964
|
+
util_1.inspect)(value, false, 0).split("\n").map(l => `${causes.length > 0 ? "│" : " "} ${l}`) ] : [], ...causes.length > 0 ? [ "╰── 🔍 Failure reason(s):", ...causes.map((cause, idx) => {
|
|
3965
3965
|
var _a;
|
|
3966
3966
|
return ` ${idx < causes.length - 1 ? "├" : "╰"}─${causes.length > 1 ? ` [${(_a = cause.context) !== null && _a !== void 0 ? _a : (0,
|
|
3967
3967
|
util_1.inspect)(idx)}]` : ""} ${cause.message.split("\n").join("\n ")}`;
|
|
3968
|
-
})
|
|
3968
|
+
}) ] : [] ].join("\n"));
|
|
3969
3969
|
this.value = value;
|
|
3970
3970
|
this.causes = causes;
|
|
3971
3971
|
this.name = "@jsii/kernel.SerializationError";
|
|
@@ -4047,12 +4047,12 @@ var __webpack_modules__ = {
|
|
|
4047
4047
|
this.pos = this.start;
|
|
4048
4048
|
}
|
|
4049
4049
|
if (this.fd !== null) {
|
|
4050
|
-
process.nextTick(
|
|
4050
|
+
process.nextTick(function() {
|
|
4051
4051
|
self._read();
|
|
4052
|
-
})
|
|
4052
|
+
});
|
|
4053
4053
|
return;
|
|
4054
4054
|
}
|
|
4055
|
-
fs.open(this.path, this.flags, this.mode,
|
|
4055
|
+
fs.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
4056
4056
|
if (err) {
|
|
4057
4057
|
self.emit("error", err);
|
|
4058
4058
|
self.readable = false;
|
|
@@ -4061,7 +4061,7 @@ var __webpack_modules__ = {
|
|
|
4061
4061
|
self.fd = fd;
|
|
4062
4062
|
self.emit("open", fd);
|
|
4063
4063
|
self._read();
|
|
4064
|
-
})
|
|
4064
|
+
});
|
|
4065
4065
|
}
|
|
4066
4066
|
function WriteStream(path, options) {
|
|
4067
4067
|
if (!(this instanceof WriteStream)) return new WriteStream(path, options);
|
|
@@ -4221,24 +4221,24 @@ var __webpack_modules__ = {
|
|
|
4221
4221
|
applicability_1.schemaHasRulesForType)(it, types[0]));
|
|
4222
4222
|
if (checkTypes) {
|
|
4223
4223
|
const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);
|
|
4224
|
-
gen.if(wrongType, (
|
|
4224
|
+
gen.if(wrongType, () => {
|
|
4225
4225
|
if (coerceTo.length) coerceData(it, types, coerceTo); else reportTypeError(it);
|
|
4226
|
-
})
|
|
4226
|
+
});
|
|
4227
4227
|
}
|
|
4228
4228
|
return checkTypes;
|
|
4229
4229
|
}
|
|
4230
4230
|
exports.coerceAndCheckDataType = coerceAndCheckDataType;
|
|
4231
4231
|
const COERCIBLE = new Set([ "string", "number", "integer", "boolean", "null" ]);
|
|
4232
4232
|
function coerceToTypes(types, coerceTypes) {
|
|
4233
|
-
return coerceTypes ? types.filter(
|
|
4233
|
+
return coerceTypes ? types.filter(t => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
|
|
4234
4234
|
}
|
|
4235
4235
|
function coerceData(it, types, coerceTo) {
|
|
4236
4236
|
const {gen, data, opts} = it;
|
|
4237
4237
|
const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`);
|
|
4238
4238
|
const coerced = gen.let("coerced", (0, codegen_1._)`undefined`);
|
|
4239
4239
|
if (opts.coerceTypes === "array") {
|
|
4240
|
-
gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, (
|
|
4241
|
-
codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), (
|
|
4240
|
+
gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0,
|
|
4241
|
+
codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));
|
|
4242
4242
|
}
|
|
4243
4243
|
gen.if((0, codegen_1._)`${coerced} !== undefined`);
|
|
4244
4244
|
for (const t of coerceTo) {
|
|
@@ -4249,10 +4249,10 @@ var __webpack_modules__ = {
|
|
|
4249
4249
|
gen.else();
|
|
4250
4250
|
reportTypeError(it);
|
|
4251
4251
|
gen.endIf();
|
|
4252
|
-
gen.if((0, codegen_1._)`${coerced} !== undefined`, (
|
|
4252
|
+
gen.if((0, codegen_1._)`${coerced} !== undefined`, () => {
|
|
4253
4253
|
gen.assign(data, coerced);
|
|
4254
4254
|
assignParentData(it, coerced);
|
|
4255
|
-
})
|
|
4255
|
+
});
|
|
4256
4256
|
function coerceSpecificType(t) {
|
|
4257
4257
|
switch (t) {
|
|
4258
4258
|
case "string":
|
|
@@ -4289,7 +4289,7 @@ var __webpack_modules__ = {
|
|
|
4289
4289
|
}
|
|
4290
4290
|
}
|
|
4291
4291
|
function assignParentData({gen, parentData, parentDataProperty}, expr) {
|
|
4292
|
-
gen.if((0, codegen_1._)`${parentData} !== undefined`, (
|
|
4292
|
+
gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));
|
|
4293
4293
|
}
|
|
4294
4294
|
function checkDataType(dataType, data, strictNums, correct = DataType.Correct) {
|
|
4295
4295
|
const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;
|
|
@@ -4400,12 +4400,12 @@ var __webpack_modules__ = {
|
|
|
4400
4400
|
} else {
|
|
4401
4401
|
if (!Array.isArray(schema)) throw new Error("ajv implementation error");
|
|
4402
4402
|
const vSchema = gen.const("vSchema", schemaCode);
|
|
4403
|
-
valid = (0, codegen_1.or)(...schema.map((
|
|
4403
|
+
valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));
|
|
4404
4404
|
}
|
|
4405
4405
|
cxt.pass(valid);
|
|
4406
4406
|
function loopEnum() {
|
|
4407
4407
|
gen.assign(valid, false);
|
|
4408
|
-
gen.forOf("v", schemaCode,
|
|
4408
|
+
gen.forOf("v", schemaCode, v => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));
|
|
4409
4409
|
}
|
|
4410
4410
|
function equalCode(vSchema, i) {
|
|
4411
4411
|
const sch = schema[i];
|
|
@@ -4562,7 +4562,10 @@ var __webpack_modules__ = {
|
|
|
4562
4562
|
Object.defineProperty(exports, "__esModule", {
|
|
4563
4563
|
value: true
|
|
4564
4564
|
});
|
|
4565
|
-
exports.ObjectTable =
|
|
4565
|
+
exports.ObjectTable = void 0;
|
|
4566
|
+
exports.jsiiTypeFqn = jsiiTypeFqn;
|
|
4567
|
+
exports.objectReference = objectReference;
|
|
4568
|
+
exports.tagJsiiConstructor = tagJsiiConstructor;
|
|
4566
4569
|
const spec = __webpack_require__(9501);
|
|
4567
4570
|
const assert = __webpack_require__(2613);
|
|
4568
4571
|
const api = __webpack_require__(3403);
|
|
@@ -4590,7 +4593,6 @@ var __webpack_modules__ = {
|
|
|
4590
4593
|
}
|
|
4591
4594
|
return undefined;
|
|
4592
4595
|
}
|
|
4593
|
-
exports.jsiiTypeFqn = jsiiTypeFqn;
|
|
4594
4596
|
function objectReference(obj) {
|
|
4595
4597
|
if (obj[OBJID_SYMBOL]) {
|
|
4596
4598
|
return {
|
|
@@ -4600,7 +4602,6 @@ var __webpack_modules__ = {
|
|
|
4600
4602
|
}
|
|
4601
4603
|
return undefined;
|
|
4602
4604
|
}
|
|
4603
|
-
exports.objectReference = objectReference;
|
|
4604
4605
|
function tagObject(obj, objid, interfaces) {
|
|
4605
4606
|
const privateField = {
|
|
4606
4607
|
enumerable: false,
|
|
@@ -4626,7 +4627,6 @@ var __webpack_modules__ = {
|
|
|
4626
4627
|
}
|
|
4627
4628
|
RESOLVED_TYPE_FQN.set(constructor, fqn);
|
|
4628
4629
|
}
|
|
4629
|
-
exports.tagJsiiConstructor = tagJsiiConstructor;
|
|
4630
4630
|
class ObjectTable {
|
|
4631
4631
|
constructor(resolveType) {
|
|
4632
4632
|
_ObjectTable_instances.add(this);
|
|
@@ -4877,11 +4877,11 @@ var __webpack_modules__ = {
|
|
|
4877
4877
|
return;
|
|
4878
4878
|
}
|
|
4879
4879
|
loaded = false;
|
|
4880
|
-
signals.forEach(
|
|
4880
|
+
signals.forEach(function(sig) {
|
|
4881
4881
|
try {
|
|
4882
4882
|
process.removeListener(sig, sigListeners[sig]);
|
|
4883
4883
|
} catch (er) {}
|
|
4884
|
-
})
|
|
4884
|
+
});
|
|
4885
4885
|
process.emit = originalProcessEmit;
|
|
4886
4886
|
process.reallyExit = originalProcessReallyExit;
|
|
4887
4887
|
emitter.count -= 1;
|
|
@@ -4895,7 +4895,7 @@ var __webpack_modules__ = {
|
|
|
4895
4895
|
emitter.emit(event, code, signal);
|
|
4896
4896
|
};
|
|
4897
4897
|
var sigListeners = {};
|
|
4898
|
-
signals.forEach(
|
|
4898
|
+
signals.forEach(function(sig) {
|
|
4899
4899
|
sigListeners[sig] = function listener() {
|
|
4900
4900
|
if (!processOk(global.process)) {
|
|
4901
4901
|
return;
|
|
@@ -4911,7 +4911,7 @@ var __webpack_modules__ = {
|
|
|
4911
4911
|
process.kill(process.pid, sig);
|
|
4912
4912
|
}
|
|
4913
4913
|
};
|
|
4914
|
-
})
|
|
4914
|
+
});
|
|
4915
4915
|
module.exports.signals = function() {
|
|
4916
4916
|
return signals;
|
|
4917
4917
|
};
|
|
@@ -4922,14 +4922,14 @@ var __webpack_modules__ = {
|
|
|
4922
4922
|
}
|
|
4923
4923
|
loaded = true;
|
|
4924
4924
|
emitter.count += 1;
|
|
4925
|
-
signals = signals.filter(
|
|
4925
|
+
signals = signals.filter(function(sig) {
|
|
4926
4926
|
try {
|
|
4927
4927
|
process.on(sig, sigListeners[sig]);
|
|
4928
4928
|
return true;
|
|
4929
4929
|
} catch (er) {
|
|
4930
4930
|
return false;
|
|
4931
4931
|
}
|
|
4932
|
-
})
|
|
4932
|
+
});
|
|
4933
4933
|
process.emit = processEmit;
|
|
4934
4934
|
process.reallyExit = processReallyExit;
|
|
4935
4935
|
};
|
|
@@ -4963,12 +4963,12 @@ var __webpack_modules__ = {
|
|
|
4963
4963
|
2451: module => {
|
|
4964
4964
|
"use strict";
|
|
4965
4965
|
const raw = [ "|", "<", ">", "?", ":" ];
|
|
4966
|
-
const win = raw.map(
|
|
4967
|
-
const toWin = new Map(raw.map((
|
|
4968
|
-
const toRaw = new Map(win.map((
|
|
4966
|
+
const win = raw.map(char => String.fromCharCode(61440 + char.charCodeAt(0)));
|
|
4967
|
+
const toWin = new Map(raw.map((char, i) => [ char, win[i] ]));
|
|
4968
|
+
const toRaw = new Map(win.map((char, i) => [ char, raw[i] ]));
|
|
4969
4969
|
module.exports = {
|
|
4970
|
-
encode: s => raw.reduce((
|
|
4971
|
-
decode: s => win.reduce((
|
|
4970
|
+
encode: s => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s),
|
|
4971
|
+
decode: s => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s)
|
|
4972
4972
|
};
|
|
4973
4973
|
},
|
|
4974
4974
|
2613: module => {
|
|
@@ -4978,8 +4978,8 @@ var __webpack_modules__ = {
|
|
|
4978
4978
|
2635: module => {
|
|
4979
4979
|
"use strict";
|
|
4980
4980
|
const argmap = new Map([ [ "C", "cwd" ], [ "f", "file" ], [ "z", "gzip" ], [ "P", "preservePaths" ], [ "U", "unlink" ], [ "strip-components", "strip" ], [ "stripComponents", "strip" ], [ "keep-newer", "newer" ], [ "keepNewer", "newer" ], [ "keep-newer-files", "newer" ], [ "keepNewerFiles", "newer" ], [ "k", "keep" ], [ "keep-existing", "keep" ], [ "keepExisting", "keep" ], [ "m", "noMtime" ], [ "no-mtime", "noMtime" ], [ "p", "preserveOwner" ], [ "L", "follow" ], [ "h", "follow" ] ]);
|
|
4981
|
-
module.exports = opt => opt ? Object.keys(opt).map(
|
|
4982
|
-
set)
|
|
4981
|
+
module.exports = opt => opt ? Object.keys(opt).map(k => [ argmap.has(k) ? argmap.get(k) : k, opt[k] ]).reduce((set, kv) => (set[kv[0]] = kv[1],
|
|
4982
|
+
set), Object.create(null)) : {};
|
|
4983
4983
|
},
|
|
4984
4984
|
2684: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
4985
4985
|
"use strict";
|
|
@@ -5026,7 +5026,7 @@ var __webpack_modules__ = {
|
|
|
5026
5026
|
} : e => e.resume();
|
|
5027
5027
|
};
|
|
5028
5028
|
const filesFilter = (opt, files) => {
|
|
5029
|
-
const map = new Map(files.map(
|
|
5029
|
+
const map = new Map(files.map(f => [ stripSlash(f), true ]));
|
|
5030
5030
|
const filter = opt.filter;
|
|
5031
5031
|
const mapHas = (file, r) => {
|
|
5032
5032
|
const root = r || path.parse(file).root || ".";
|
|
@@ -5070,10 +5070,10 @@ var __webpack_modules__ = {
|
|
|
5070
5070
|
const parse = new Parser(opt);
|
|
5071
5071
|
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
|
5072
5072
|
const file = opt.file;
|
|
5073
|
-
const p = new Promise((
|
|
5073
|
+
const p = new Promise((resolve, reject) => {
|
|
5074
5074
|
parse.on("error", reject);
|
|
5075
5075
|
parse.on("end", resolve);
|
|
5076
|
-
fs.stat(file, (
|
|
5076
|
+
fs.stat(file, (er, stat) => {
|
|
5077
5077
|
if (er) {
|
|
5078
5078
|
reject(er);
|
|
5079
5079
|
} else {
|
|
@@ -5084,8 +5084,8 @@ var __webpack_modules__ = {
|
|
|
5084
5084
|
stream.on("error", reject);
|
|
5085
5085
|
stream.pipe(parse);
|
|
5086
5086
|
}
|
|
5087
|
-
})
|
|
5088
|
-
})
|
|
5087
|
+
});
|
|
5088
|
+
});
|
|
5089
5089
|
return cb ? p.then(cb, cb) : p;
|
|
5090
5090
|
};
|
|
5091
5091
|
const list = opt => new Parser(opt);
|
|
@@ -5148,7 +5148,7 @@ var __webpack_modules__ = {
|
|
|
5148
5148
|
it.items = true;
|
|
5149
5149
|
const valid = gen.name("valid");
|
|
5150
5150
|
if (max === undefined && min === 1) {
|
|
5151
|
-
validateItems(valid, (
|
|
5151
|
+
validateItems(valid, () => gen.if(valid, () => gen.break()));
|
|
5152
5152
|
} else if (min === 0) {
|
|
5153
5153
|
gen.let(valid, true);
|
|
5154
5154
|
if (max !== undefined) gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount);
|
|
@@ -5156,14 +5156,14 @@ var __webpack_modules__ = {
|
|
|
5156
5156
|
gen.let(valid, false);
|
|
5157
5157
|
validateItemsWithCount();
|
|
5158
5158
|
}
|
|
5159
|
-
cxt.result(valid, (
|
|
5159
|
+
cxt.result(valid, () => cxt.reset());
|
|
5160
5160
|
function validateItemsWithCount() {
|
|
5161
5161
|
const schValid = gen.name("_valid");
|
|
5162
5162
|
const count = gen.let("count", 0);
|
|
5163
|
-
validateItems(schValid, (
|
|
5163
|
+
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
|
|
5164
5164
|
}
|
|
5165
5165
|
function validateItems(_valid, block) {
|
|
5166
|
-
gen.forRange("i", 0, len,
|
|
5166
|
+
gen.forRange("i", 0, len, i => {
|
|
5167
5167
|
cxt.subschema({
|
|
5168
5168
|
keyword: "contains",
|
|
5169
5169
|
dataProp: i,
|
|
@@ -5171,15 +5171,15 @@ var __webpack_modules__ = {
|
|
|
5171
5171
|
compositeRule: true
|
|
5172
5172
|
}, _valid);
|
|
5173
5173
|
block();
|
|
5174
|
-
})
|
|
5174
|
+
});
|
|
5175
5175
|
}
|
|
5176
5176
|
function checkLimits(count) {
|
|
5177
5177
|
gen.code((0, codegen_1._)`${count}++`);
|
|
5178
5178
|
if (max === undefined) {
|
|
5179
|
-
gen.if((0, codegen_1._)`${count} >= ${min}`, (
|
|
5179
|
+
gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());
|
|
5180
5180
|
} else {
|
|
5181
|
-
gen.if((0, codegen_1._)`${count} > ${max}`, (
|
|
5182
|
-
if (min === 1) gen.assign(valid, true); else gen.if((0, codegen_1._)`${count} >= ${min}`, (
|
|
5181
|
+
gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break());
|
|
5182
|
+
if (min === 1) gen.assign(valid, true); else gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));
|
|
5183
5183
|
}
|
|
5184
5184
|
}
|
|
5185
5185
|
}
|
|
@@ -5573,14 +5573,14 @@ var __webpack_modules__ = {
|
|
|
5573
5573
|
}
|
|
5574
5574
|
get str() {
|
|
5575
5575
|
var _a;
|
|
5576
|
-
return (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((
|
|
5576
|
+
return (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
|
|
5577
5577
|
}
|
|
5578
5578
|
get names() {
|
|
5579
5579
|
var _a;
|
|
5580
|
-
return (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((
|
|
5580
|
+
return (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c) => {
|
|
5581
5581
|
if (c instanceof Name) names[c.str] = (names[c.str] || 0) + 1;
|
|
5582
5582
|
return names;
|
|
5583
|
-
}
|
|
5583
|
+
}, {});
|
|
5584
5584
|
}
|
|
5585
5585
|
}
|
|
5586
5586
|
exports._Code = _Code;
|
|
@@ -5690,7 +5690,7 @@ var __webpack_modules__ = {
|
|
|
5690
5690
|
const {gen, schema, it} = cxt;
|
|
5691
5691
|
if (!Array.isArray(schema)) throw new Error("ajv implementation error");
|
|
5692
5692
|
const valid = gen.name("valid");
|
|
5693
|
-
schema.forEach((
|
|
5693
|
+
schema.forEach((sch, i) => {
|
|
5694
5694
|
if ((0, util_1.alwaysValidSchema)(it, sch)) return;
|
|
5695
5695
|
const schCxt = cxt.subschema({
|
|
5696
5696
|
keyword: "allOf",
|
|
@@ -5698,7 +5698,7 @@ var __webpack_modules__ = {
|
|
|
5698
5698
|
}, valid);
|
|
5699
5699
|
cxt.ok(valid);
|
|
5700
5700
|
cxt.mergeEvaluated(schCxt);
|
|
5701
|
-
})
|
|
5701
|
+
});
|
|
5702
5702
|
}
|
|
5703
5703
|
};
|
|
5704
5704
|
exports["default"] = def;
|
|
@@ -5708,7 +5708,14 @@ var __webpack_modules__ = {
|
|
|
5708
5708
|
Object.defineProperty(exports, "__esModule", {
|
|
5709
5709
|
value: true
|
|
5710
5710
|
});
|
|
5711
|
-
exports.
|
|
5711
|
+
exports.TOKEN_STRUCT = exports.TOKEN_MAP = exports.TOKEN_ENUM = exports.TOKEN_DATE = exports.TOKEN_INTERFACES = exports.TOKEN_REF = void 0;
|
|
5712
|
+
exports.isObjRef = isObjRef;
|
|
5713
|
+
exports.isWireDate = isWireDate;
|
|
5714
|
+
exports.isWireEnum = isWireEnum;
|
|
5715
|
+
exports.isWireMap = isWireMap;
|
|
5716
|
+
exports.isWireStruct = isWireStruct;
|
|
5717
|
+
exports.isMethodOverride = isMethodOverride;
|
|
5718
|
+
exports.isPropertyOverride = isPropertyOverride;
|
|
5712
5719
|
exports.TOKEN_REF = "$jsii.byref";
|
|
5713
5720
|
exports.TOKEN_INTERFACES = "$jsii.interfaces";
|
|
5714
5721
|
exports.TOKEN_DATE = "$jsii.date";
|
|
@@ -5718,31 +5725,24 @@ var __webpack_modules__ = {
|
|
|
5718
5725
|
function isObjRef(value) {
|
|
5719
5726
|
return typeof value === "object" && value !== null && exports.TOKEN_REF in value;
|
|
5720
5727
|
}
|
|
5721
|
-
exports.isObjRef = isObjRef;
|
|
5722
5728
|
function isWireDate(value) {
|
|
5723
5729
|
return typeof value === "object" && value !== null && exports.TOKEN_DATE in value;
|
|
5724
5730
|
}
|
|
5725
|
-
exports.isWireDate = isWireDate;
|
|
5726
5731
|
function isWireEnum(value) {
|
|
5727
5732
|
return typeof value === "object" && value !== null && exports.TOKEN_ENUM in value;
|
|
5728
5733
|
}
|
|
5729
|
-
exports.isWireEnum = isWireEnum;
|
|
5730
5734
|
function isWireMap(value) {
|
|
5731
5735
|
return typeof value === "object" && value !== null && exports.TOKEN_MAP in value;
|
|
5732
5736
|
}
|
|
5733
|
-
exports.isWireMap = isWireMap;
|
|
5734
5737
|
function isWireStruct(value) {
|
|
5735
5738
|
return typeof value === "object" && value !== null && exports.TOKEN_STRUCT in value;
|
|
5736
5739
|
}
|
|
5737
|
-
exports.isWireStruct = isWireStruct;
|
|
5738
5740
|
function isMethodOverride(value) {
|
|
5739
5741
|
return value.method != null;
|
|
5740
5742
|
}
|
|
5741
|
-
exports.isMethodOverride = isMethodOverride;
|
|
5742
5743
|
function isPropertyOverride(value) {
|
|
5743
5744
|
return value.property != null;
|
|
5744
5745
|
}
|
|
5745
|
-
exports.isPropertyOverride = isPropertyOverride;
|
|
5746
5746
|
},
|
|
5747
5747
|
3649: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
5748
5748
|
"use strict";
|
|
@@ -5763,32 +5763,32 @@ var __webpack_modules__ = {
|
|
|
5763
5763
|
function createSymlink(srcpath, dstpath, type, callback) {
|
|
5764
5764
|
callback = typeof type === "function" ? type : callback;
|
|
5765
5765
|
type = typeof type === "function" ? false : type;
|
|
5766
|
-
fs.lstat(dstpath, (
|
|
5766
|
+
fs.lstat(dstpath, (err, stats) => {
|
|
5767
5767
|
if (!err && stats.isSymbolicLink()) {
|
|
5768
|
-
Promise.all([ fs.stat(srcpath), fs.stat(dstpath) ]).then((
|
|
5768
|
+
Promise.all([ fs.stat(srcpath), fs.stat(dstpath) ]).then(([srcStat, dstStat]) => {
|
|
5769
5769
|
if (areIdentical(srcStat, dstStat)) return callback(null);
|
|
5770
5770
|
_createSymlink(srcpath, dstpath, type, callback);
|
|
5771
|
-
})
|
|
5771
|
+
});
|
|
5772
5772
|
} else _createSymlink(srcpath, dstpath, type, callback);
|
|
5773
|
-
})
|
|
5773
|
+
});
|
|
5774
5774
|
}
|
|
5775
5775
|
function _createSymlink(srcpath, dstpath, type, callback) {
|
|
5776
|
-
symlinkPaths(srcpath, dstpath, (
|
|
5776
|
+
symlinkPaths(srcpath, dstpath, (err, relative) => {
|
|
5777
5777
|
if (err) return callback(err);
|
|
5778
5778
|
srcpath = relative.toDst;
|
|
5779
|
-
symlinkType(relative.toCwd, type, (
|
|
5779
|
+
symlinkType(relative.toCwd, type, (err, type) => {
|
|
5780
5780
|
if (err) return callback(err);
|
|
5781
5781
|
const dir = path.dirname(dstpath);
|
|
5782
|
-
pathExists(dir, (
|
|
5782
|
+
pathExists(dir, (err, dirExists) => {
|
|
5783
5783
|
if (err) return callback(err);
|
|
5784
5784
|
if (dirExists) return fs.symlink(srcpath, dstpath, type, callback);
|
|
5785
|
-
mkdirs(dir,
|
|
5785
|
+
mkdirs(dir, err => {
|
|
5786
5786
|
if (err) return callback(err);
|
|
5787
5787
|
fs.symlink(srcpath, dstpath, type, callback);
|
|
5788
|
-
})
|
|
5789
|
-
})
|
|
5790
|
-
})
|
|
5791
|
-
})
|
|
5788
|
+
});
|
|
5789
|
+
});
|
|
5790
|
+
});
|
|
5791
|
+
});
|
|
5792
5792
|
}
|
|
5793
5793
|
function createSymlinkSync(srcpath, dstpath, type) {
|
|
5794
5794
|
let stats;
|
|
@@ -5899,19 +5899,19 @@ var __webpack_modules__ = {
|
|
|
5899
5899
|
function callAsyncRef() {
|
|
5900
5900
|
if (!env.$async) throw new Error("async schema referenced by sync schema");
|
|
5901
5901
|
const valid = gen.let("valid");
|
|
5902
|
-
gen.try((
|
|
5902
|
+
gen.try(() => {
|
|
5903
5903
|
gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);
|
|
5904
5904
|
addEvaluatedFrom(v);
|
|
5905
5905
|
if (!allErrors) gen.assign(valid, true);
|
|
5906
|
-
}
|
|
5907
|
-
gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, (
|
|
5906
|
+
}, e => {
|
|
5907
|
+
gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));
|
|
5908
5908
|
addErrorsFrom(e);
|
|
5909
5909
|
if (!allErrors) gen.assign(valid, false);
|
|
5910
|
-
})
|
|
5910
|
+
});
|
|
5911
5911
|
cxt.ok(valid);
|
|
5912
5912
|
}
|
|
5913
5913
|
function callSyncRef() {
|
|
5914
|
-
cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), (
|
|
5914
|
+
cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
|
|
5915
5915
|
}
|
|
5916
5916
|
function addErrorsFrom(source) {
|
|
5917
5917
|
const errs = (0, codegen_1._)`${source}.errors`;
|
|
@@ -6021,7 +6021,7 @@ var __webpack_modules__ = {
|
|
|
6021
6021
|
throw new TypeError("this is a readable stream");
|
|
6022
6022
|
}
|
|
6023
6023
|
[_open]() {
|
|
6024
|
-
fs.open(this[_path], "r", (
|
|
6024
|
+
fs.open(this[_path], "r", (er, fd) => this[_onopen](er, fd));
|
|
6025
6025
|
}
|
|
6026
6026
|
[_onopen](er, fd) {
|
|
6027
6027
|
if (er) this[_onerror](er); else {
|
|
@@ -6037,8 +6037,8 @@ var __webpack_modules__ = {
|
|
|
6037
6037
|
if (!this[_reading]) {
|
|
6038
6038
|
this[_reading] = true;
|
|
6039
6039
|
const buf = this[_makeBuf]();
|
|
6040
|
-
if (buf.length === 0) return process.nextTick((
|
|
6041
|
-
fs.read(this[_fd], buf, 0, buf.length, null, (
|
|
6040
|
+
if (buf.length === 0) return process.nextTick(() => this[_onread](null, 0, buf));
|
|
6041
|
+
fs.read(this[_fd], buf, 0, buf.length, null, (er, br, buf) => this[_onread](er, br, buf));
|
|
6042
6042
|
}
|
|
6043
6043
|
}
|
|
6044
6044
|
[_onread](er, br, buf) {
|
|
@@ -6049,7 +6049,7 @@ var __webpack_modules__ = {
|
|
|
6049
6049
|
if (this[_autoClose] && typeof this[_fd] === "number") {
|
|
6050
6050
|
const fd = this[_fd];
|
|
6051
6051
|
this[_fd] = null;
|
|
6052
|
-
fs.close(fd,
|
|
6052
|
+
fs.close(fd, er => er ? this.emit("error", er) : this.emit("close"));
|
|
6053
6053
|
}
|
|
6054
6054
|
}
|
|
6055
6055
|
[_onerror](er) {
|
|
@@ -6164,7 +6164,7 @@ var __webpack_modules__ = {
|
|
|
6164
6164
|
this.emit("error", er);
|
|
6165
6165
|
}
|
|
6166
6166
|
[_open]() {
|
|
6167
|
-
fs.open(this[_path], this[_flags], this[_mode], (
|
|
6167
|
+
fs.open(this[_path], this[_flags], this[_mode], (er, fd) => this[_onopen](er, fd));
|
|
6168
6168
|
}
|
|
6169
6169
|
[_onopen](er, fd) {
|
|
6170
6170
|
if (this[_defaultFlag] && this[_flags] === "r+" && er && er.code === "ENOENT") {
|
|
@@ -6198,7 +6198,7 @@ var __webpack_modules__ = {
|
|
|
6198
6198
|
return true;
|
|
6199
6199
|
}
|
|
6200
6200
|
[_write](buf) {
|
|
6201
|
-
fs.write(this[_fd], buf, 0, buf.length, this[_pos], (
|
|
6201
|
+
fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => this[_onwrite](er, bw));
|
|
6202
6202
|
}
|
|
6203
6203
|
[_onwrite](er, bw) {
|
|
6204
6204
|
if (er) this[_onerror](er); else {
|
|
@@ -6222,14 +6222,14 @@ var __webpack_modules__ = {
|
|
|
6222
6222
|
} else if (this[_queue].length === 1) this[_write](this[_queue].pop()); else {
|
|
6223
6223
|
const iovec = this[_queue];
|
|
6224
6224
|
this[_queue] = [];
|
|
6225
|
-
writev(this[_fd], iovec, this[_pos], (
|
|
6225
|
+
writev(this[_fd], iovec, this[_pos], (er, bw) => this[_onwrite](er, bw));
|
|
6226
6226
|
}
|
|
6227
6227
|
}
|
|
6228
6228
|
[_close]() {
|
|
6229
6229
|
if (this[_autoClose] && typeof this[_fd] === "number") {
|
|
6230
6230
|
const fd = this[_fd];
|
|
6231
6231
|
this[_fd] = null;
|
|
6232
|
-
fs.close(fd,
|
|
6232
|
+
fs.close(fd, er => er ? this.emit("error", er) : this.emit("close"));
|
|
6233
6233
|
}
|
|
6234
6234
|
}
|
|
6235
6235
|
}
|
|
@@ -6278,25 +6278,36 @@ var __webpack_modules__ = {
|
|
|
6278
6278
|
Object.defineProperty(exports, "__esModule", {
|
|
6279
6279
|
value: true
|
|
6280
6280
|
});
|
|
6281
|
-
exports.
|
|
6281
|
+
exports.TypeKind = exports.CANONICAL_ANY = exports.PrimitiveType = exports.CollectionKind = exports.Stability = exports.SchemaVersion = exports.SPEC_FILE_NAME_COMPRESSED = exports.SPEC_FILE_NAME = void 0;
|
|
6282
|
+
exports.isNamedTypeReference = isNamedTypeReference;
|
|
6283
|
+
exports.isPrimitiveTypeReference = isPrimitiveTypeReference;
|
|
6284
|
+
exports.isCollectionTypeReference = isCollectionTypeReference;
|
|
6285
|
+
exports.isUnionTypeReference = isUnionTypeReference;
|
|
6286
|
+
exports.isMethod = isMethod;
|
|
6287
|
+
exports.isClassType = isClassType;
|
|
6288
|
+
exports.isInterfaceType = isInterfaceType;
|
|
6289
|
+
exports.isEnumType = isEnumType;
|
|
6290
|
+
exports.isClassOrInterfaceType = isClassOrInterfaceType;
|
|
6291
|
+
exports.describeTypeReference = describeTypeReference;
|
|
6292
|
+
exports.isDeprecated = isDeprecated;
|
|
6282
6293
|
exports.SPEC_FILE_NAME = ".jsii";
|
|
6283
6294
|
exports.SPEC_FILE_NAME_COMPRESSED = `${exports.SPEC_FILE_NAME}.gz`;
|
|
6284
6295
|
var SchemaVersion;
|
|
6285
6296
|
(function(SchemaVersion) {
|
|
6286
6297
|
SchemaVersion["LATEST"] = "jsii/0.10.0";
|
|
6287
|
-
})(SchemaVersion
|
|
6298
|
+
})(SchemaVersion || (exports.SchemaVersion = SchemaVersion = {}));
|
|
6288
6299
|
var Stability;
|
|
6289
6300
|
(function(Stability) {
|
|
6290
6301
|
Stability["Deprecated"] = "deprecated";
|
|
6291
6302
|
Stability["Experimental"] = "experimental";
|
|
6292
6303
|
Stability["Stable"] = "stable";
|
|
6293
6304
|
Stability["External"] = "external";
|
|
6294
|
-
})(Stability
|
|
6305
|
+
})(Stability || (exports.Stability = Stability = {}));
|
|
6295
6306
|
var CollectionKind;
|
|
6296
6307
|
(function(CollectionKind) {
|
|
6297
6308
|
CollectionKind["Array"] = "array";
|
|
6298
6309
|
CollectionKind["Map"] = "map";
|
|
6299
|
-
})(CollectionKind
|
|
6310
|
+
})(CollectionKind || (exports.CollectionKind = CollectionKind = {}));
|
|
6300
6311
|
var PrimitiveType;
|
|
6301
6312
|
(function(PrimitiveType) {
|
|
6302
6313
|
PrimitiveType["Date"] = "date";
|
|
@@ -6305,52 +6316,43 @@ var __webpack_modules__ = {
|
|
|
6305
6316
|
PrimitiveType["Boolean"] = "boolean";
|
|
6306
6317
|
PrimitiveType["Json"] = "json";
|
|
6307
6318
|
PrimitiveType["Any"] = "any";
|
|
6308
|
-
})(PrimitiveType
|
|
6319
|
+
})(PrimitiveType || (exports.PrimitiveType = PrimitiveType = {}));
|
|
6309
6320
|
exports.CANONICAL_ANY = {
|
|
6310
6321
|
primitive: PrimitiveType.Any
|
|
6311
6322
|
};
|
|
6312
6323
|
function isNamedTypeReference(ref) {
|
|
6313
6324
|
return !!ref?.fqn;
|
|
6314
6325
|
}
|
|
6315
|
-
exports.isNamedTypeReference = isNamedTypeReference;
|
|
6316
6326
|
function isPrimitiveTypeReference(ref) {
|
|
6317
6327
|
return !!ref?.primitive;
|
|
6318
6328
|
}
|
|
6319
|
-
exports.isPrimitiveTypeReference = isPrimitiveTypeReference;
|
|
6320
6329
|
function isCollectionTypeReference(ref) {
|
|
6321
6330
|
return !!ref?.collection;
|
|
6322
6331
|
}
|
|
6323
|
-
exports.isCollectionTypeReference = isCollectionTypeReference;
|
|
6324
6332
|
function isUnionTypeReference(ref) {
|
|
6325
6333
|
return !!ref?.union;
|
|
6326
6334
|
}
|
|
6327
|
-
exports.isUnionTypeReference = isUnionTypeReference;
|
|
6328
6335
|
function isMethod(callable) {
|
|
6329
6336
|
return !!callable.name;
|
|
6330
6337
|
}
|
|
6331
|
-
exports.isMethod = isMethod;
|
|
6332
6338
|
var TypeKind;
|
|
6333
6339
|
(function(TypeKind) {
|
|
6334
6340
|
TypeKind["Class"] = "class";
|
|
6335
6341
|
TypeKind["Enum"] = "enum";
|
|
6336
6342
|
TypeKind["Interface"] = "interface";
|
|
6337
|
-
})(TypeKind
|
|
6343
|
+
})(TypeKind || (exports.TypeKind = TypeKind = {}));
|
|
6338
6344
|
function isClassType(type) {
|
|
6339
6345
|
return type?.kind === TypeKind.Class;
|
|
6340
6346
|
}
|
|
6341
|
-
exports.isClassType = isClassType;
|
|
6342
6347
|
function isInterfaceType(type) {
|
|
6343
6348
|
return type?.kind === TypeKind.Interface;
|
|
6344
6349
|
}
|
|
6345
|
-
exports.isInterfaceType = isInterfaceType;
|
|
6346
6350
|
function isEnumType(type) {
|
|
6347
6351
|
return type?.kind === TypeKind.Enum;
|
|
6348
6352
|
}
|
|
6349
|
-
exports.isEnumType = isEnumType;
|
|
6350
6353
|
function isClassOrInterfaceType(type) {
|
|
6351
6354
|
return isClassType(type) || isInterfaceType(type);
|
|
6352
6355
|
}
|
|
6353
|
-
exports.isClassOrInterfaceType = isClassOrInterfaceType;
|
|
6354
6356
|
function describeTypeReference(type) {
|
|
6355
6357
|
if (type === undefined) {
|
|
6356
6358
|
return "void";
|
|
@@ -6370,11 +6372,9 @@ var __webpack_modules__ = {
|
|
|
6370
6372
|
}
|
|
6371
6373
|
throw new Error("Unrecognized type reference");
|
|
6372
6374
|
}
|
|
6373
|
-
exports.describeTypeReference = describeTypeReference;
|
|
6374
6375
|
function isDeprecated(entity) {
|
|
6375
6376
|
return entity?.docs?.stability === Stability.Deprecated;
|
|
6376
6377
|
}
|
|
6377
|
-
exports.isDeprecated = isDeprecated;
|
|
6378
6378
|
},
|
|
6379
6379
|
3741: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
6380
6380
|
const fs = __webpack_require__(9896);
|
|
@@ -6455,11 +6455,11 @@ var __webpack_modules__ = {
|
|
|
6455
6455
|
const isWindows = process.platform === "win32";
|
|
6456
6456
|
function defaults(options) {
|
|
6457
6457
|
const methods = [ "unlink", "chmod", "stat", "lstat", "rmdir", "readdir" ];
|
|
6458
|
-
methods.forEach(
|
|
6458
|
+
methods.forEach(m => {
|
|
6459
6459
|
options[m] = options[m] || fs[m];
|
|
6460
6460
|
m = m + "Sync";
|
|
6461
6461
|
options[m] = options[m] || fs[m];
|
|
6462
|
-
})
|
|
6462
|
+
});
|
|
6463
6463
|
options.maxBusyTries = options.maxBusyTries || 3;
|
|
6464
6464
|
}
|
|
6465
6465
|
function rimraf(p, options, cb) {
|
|
@@ -6474,23 +6474,23 @@ var __webpack_modules__ = {
|
|
|
6474
6474
|
assert(options, "rimraf: invalid options argument provided");
|
|
6475
6475
|
assert.strictEqual(typeof options, "object", "rimraf: options should be object");
|
|
6476
6476
|
defaults(options);
|
|
6477
|
-
rimraf_(p, options,
|
|
6477
|
+
rimraf_(p, options, function CB(er) {
|
|
6478
6478
|
if (er) {
|
|
6479
6479
|
if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && busyTries < options.maxBusyTries) {
|
|
6480
6480
|
busyTries++;
|
|
6481
6481
|
const time = busyTries * 100;
|
|
6482
|
-
return setTimeout((
|
|
6482
|
+
return setTimeout(() => rimraf_(p, options, CB), time);
|
|
6483
6483
|
}
|
|
6484
6484
|
if (er.code === "ENOENT") er = null;
|
|
6485
6485
|
}
|
|
6486
6486
|
cb(er);
|
|
6487
|
-
})
|
|
6487
|
+
});
|
|
6488
6488
|
}
|
|
6489
6489
|
function rimraf_(p, options, cb) {
|
|
6490
6490
|
assert(p);
|
|
6491
6491
|
assert(options);
|
|
6492
6492
|
assert(typeof cb === "function");
|
|
6493
|
-
options.lstat(p, (
|
|
6493
|
+
options.lstat(p, (er, st) => {
|
|
6494
6494
|
if (er && er.code === "ENOENT") {
|
|
6495
6495
|
return cb(null);
|
|
6496
6496
|
}
|
|
@@ -6500,7 +6500,7 @@ var __webpack_modules__ = {
|
|
|
6500
6500
|
if (st && st.isDirectory()) {
|
|
6501
6501
|
return rmdir(p, options, er, cb);
|
|
6502
6502
|
}
|
|
6503
|
-
options.unlink(p,
|
|
6503
|
+
options.unlink(p, er => {
|
|
6504
6504
|
if (er) {
|
|
6505
6505
|
if (er.code === "ENOENT") {
|
|
6506
6506
|
return cb(null);
|
|
@@ -6513,18 +6513,18 @@ var __webpack_modules__ = {
|
|
|
6513
6513
|
}
|
|
6514
6514
|
}
|
|
6515
6515
|
return cb(er);
|
|
6516
|
-
})
|
|
6517
|
-
})
|
|
6516
|
+
});
|
|
6517
|
+
});
|
|
6518
6518
|
}
|
|
6519
6519
|
function fixWinEPERM(p, options, er, cb) {
|
|
6520
6520
|
assert(p);
|
|
6521
6521
|
assert(options);
|
|
6522
6522
|
assert(typeof cb === "function");
|
|
6523
|
-
options.chmod(p, 438,
|
|
6523
|
+
options.chmod(p, 438, er2 => {
|
|
6524
6524
|
if (er2) {
|
|
6525
6525
|
cb(er2.code === "ENOENT" ? null : er);
|
|
6526
6526
|
} else {
|
|
6527
|
-
options.stat(p, (
|
|
6527
|
+
options.stat(p, (er3, stats) => {
|
|
6528
6528
|
if (er3) {
|
|
6529
6529
|
cb(er3.code === "ENOENT" ? null : er);
|
|
6530
6530
|
} else if (stats.isDirectory()) {
|
|
@@ -6532,9 +6532,9 @@ var __webpack_modules__ = {
|
|
|
6532
6532
|
} else {
|
|
6533
6533
|
options.unlink(p, cb);
|
|
6534
6534
|
}
|
|
6535
|
-
})
|
|
6535
|
+
});
|
|
6536
6536
|
}
|
|
6537
|
-
})
|
|
6537
|
+
});
|
|
6538
6538
|
}
|
|
6539
6539
|
function fixWinEPERMSync(p, options, er) {
|
|
6540
6540
|
let stats;
|
|
@@ -6568,7 +6568,7 @@ var __webpack_modules__ = {
|
|
|
6568
6568
|
assert(p);
|
|
6569
6569
|
assert(options);
|
|
6570
6570
|
assert(typeof cb === "function");
|
|
6571
|
-
options.rmdir(p,
|
|
6571
|
+
options.rmdir(p, er => {
|
|
6572
6572
|
if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) {
|
|
6573
6573
|
rmkids(p, options, cb);
|
|
6574
6574
|
} else if (er && er.code === "ENOTDIR") {
|
|
@@ -6576,19 +6576,19 @@ var __webpack_modules__ = {
|
|
|
6576
6576
|
} else {
|
|
6577
6577
|
cb(er);
|
|
6578
6578
|
}
|
|
6579
|
-
})
|
|
6579
|
+
});
|
|
6580
6580
|
}
|
|
6581
6581
|
function rmkids(p, options, cb) {
|
|
6582
6582
|
assert(p);
|
|
6583
6583
|
assert(options);
|
|
6584
6584
|
assert(typeof cb === "function");
|
|
6585
|
-
options.readdir(p, (
|
|
6585
|
+
options.readdir(p, (er, files) => {
|
|
6586
6586
|
if (er) return cb(er);
|
|
6587
6587
|
let n = files.length;
|
|
6588
6588
|
let errState;
|
|
6589
6589
|
if (n === 0) return options.rmdir(p, cb);
|
|
6590
|
-
files.forEach(
|
|
6591
|
-
rimraf(path.join(p, f), options,
|
|
6590
|
+
files.forEach(f => {
|
|
6591
|
+
rimraf(path.join(p, f), options, er => {
|
|
6592
6592
|
if (errState) {
|
|
6593
6593
|
return;
|
|
6594
6594
|
}
|
|
@@ -6596,9 +6596,9 @@ var __webpack_modules__ = {
|
|
|
6596
6596
|
if (--n === 0) {
|
|
6597
6597
|
options.rmdir(p, cb);
|
|
6598
6598
|
}
|
|
6599
|
-
})
|
|
6600
|
-
})
|
|
6601
|
-
})
|
|
6599
|
+
});
|
|
6600
|
+
});
|
|
6601
|
+
});
|
|
6602
6602
|
}
|
|
6603
6603
|
function rimrafSync(p, options) {
|
|
6604
6604
|
let st;
|
|
@@ -6653,7 +6653,7 @@ var __webpack_modules__ = {
|
|
|
6653
6653
|
function rmkidsSync(p, options) {
|
|
6654
6654
|
assert(p);
|
|
6655
6655
|
assert(options);
|
|
6656
|
-
options.readdirSync(p).forEach(
|
|
6656
|
+
options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options));
|
|
6657
6657
|
if (isWindows) {
|
|
6658
6658
|
const startTime = Date.now();
|
|
6659
6659
|
do {
|
|
@@ -6700,7 +6700,7 @@ var __webpack_modules__ = {
|
|
|
6700
6700
|
const {dirname} = __webpack_require__(6928);
|
|
6701
6701
|
const findMade = (opts, parent, path = undefined) => {
|
|
6702
6702
|
if (path === parent) return Promise.resolve();
|
|
6703
|
-
return opts.statAsync(parent).then(
|
|
6703
|
+
return opts.statAsync(parent).then(st => st.isDirectory() ? path : undefined, er => er.code === "ENOENT" ? findMade(opts, dirname(parent), parent) : undefined);
|
|
6704
6704
|
};
|
|
6705
6705
|
const findMadeSync = (opts, parent, path = undefined) => {
|
|
6706
6706
|
if (path === parent) return undefined;
|
|
@@ -6815,7 +6815,7 @@ var __webpack_modules__ = {
|
|
|
6815
6815
|
if (this[ENCODING] && enc !== this[ENCODING] && (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) throw new Error("cannot change encoding");
|
|
6816
6816
|
if (this[ENCODING] !== enc) {
|
|
6817
6817
|
this[DECODER] = enc ? new SD(enc) : null;
|
|
6818
|
-
if (this.buffer.length) this.buffer = this.buffer.map(
|
|
6818
|
+
if (this.buffer.length) this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk));
|
|
6819
6819
|
}
|
|
6820
6820
|
this[ENCODING] = enc;
|
|
6821
6821
|
}
|
|
@@ -6954,12 +6954,12 @@ var __webpack_modules__ = {
|
|
|
6954
6954
|
if (opts.end) dest.end();
|
|
6955
6955
|
} else {
|
|
6956
6956
|
this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts) : new PipeProxyErrors(this, dest, opts));
|
|
6957
|
-
if (this[ASYNC]) defer((
|
|
6957
|
+
if (this[ASYNC]) defer(() => this[RESUME]()); else this[RESUME]();
|
|
6958
6958
|
}
|
|
6959
6959
|
return dest;
|
|
6960
6960
|
}
|
|
6961
6961
|
unpipe(dest) {
|
|
6962
|
-
const p = this.pipes.find(
|
|
6962
|
+
const p = this.pipes.find(p => p.dest === dest);
|
|
6963
6963
|
if (p) {
|
|
6964
6964
|
this.pipes.splice(this.pipes.indexOf(p), 1);
|
|
6965
6965
|
p.unpipe();
|
|
@@ -6974,7 +6974,7 @@ var __webpack_modules__ = {
|
|
|
6974
6974
|
super.emit(ev);
|
|
6975
6975
|
this.removeAllListeners(ev);
|
|
6976
6976
|
} else if (ev === "error" && this[EMITTED_ERROR]) {
|
|
6977
|
-
if (this[ASYNC]) defer((
|
|
6977
|
+
if (this[ASYNC]) defer(() => fn.call(this, this[EMITTED_ERROR])); else fn.call(this, this[EMITTED_ERROR]);
|
|
6978
6978
|
}
|
|
6979
6979
|
return ret;
|
|
6980
6980
|
}
|
|
@@ -6993,7 +6993,7 @@ var __webpack_modules__ = {
|
|
|
6993
6993
|
}
|
|
6994
6994
|
emit(ev, data, ...extra) {
|
|
6995
6995
|
if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) return; else if (ev === "data") {
|
|
6996
|
-
return !data ? false : this[ASYNC] ? defer((
|
|
6996
|
+
return !data ? false : this[ASYNC] ? defer(() => this[EMITDATA](data)) : this[EMITDATA](data);
|
|
6997
6997
|
} else if (ev === "end") {
|
|
6998
6998
|
return this[EMITEND]();
|
|
6999
6999
|
} else if (ev === "close") {
|
|
@@ -7032,7 +7032,7 @@ var __webpack_modules__ = {
|
|
|
7032
7032
|
if (this[EMITTED_END]) return;
|
|
7033
7033
|
this[EMITTED_END] = true;
|
|
7034
7034
|
this.readable = false;
|
|
7035
|
-
if (this[ASYNC]) defer((
|
|
7035
|
+
if (this[ASYNC]) defer(() => this[EMITEND2]()); else this[EMITEND2]();
|
|
7036
7036
|
}
|
|
7037
7037
|
[EMITEND2]() {
|
|
7038
7038
|
if (this[DECODER]) {
|
|
@@ -7055,21 +7055,21 @@ var __webpack_modules__ = {
|
|
|
7055
7055
|
const buf = [];
|
|
7056
7056
|
if (!this[OBJECTMODE]) buf.dataLength = 0;
|
|
7057
7057
|
const p = this.promise();
|
|
7058
|
-
this.on("data",
|
|
7058
|
+
this.on("data", c => {
|
|
7059
7059
|
buf.push(c);
|
|
7060
7060
|
if (!this[OBJECTMODE]) buf.dataLength += c.length;
|
|
7061
|
-
})
|
|
7062
|
-
return p.then((
|
|
7061
|
+
});
|
|
7062
|
+
return p.then(() => buf);
|
|
7063
7063
|
}
|
|
7064
7064
|
concat() {
|
|
7065
|
-
return this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this.collect().then(
|
|
7065
|
+
return this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this.collect().then(buf => this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength));
|
|
7066
7066
|
}
|
|
7067
7067
|
promise() {
|
|
7068
|
-
return new Promise((
|
|
7069
|
-
this.on(DESTROYED, (
|
|
7070
|
-
this.on("error",
|
|
7071
|
-
this.on("end", (
|
|
7072
|
-
})
|
|
7068
|
+
return new Promise((resolve, reject) => {
|
|
7069
|
+
this.on(DESTROYED, () => reject(new Error("stream destroyed")));
|
|
7070
|
+
this.on("error", er => reject(er));
|
|
7071
|
+
this.on("end", () => resolve());
|
|
7072
|
+
});
|
|
7073
7073
|
}
|
|
7074
7074
|
[ASYNCITERATOR]() {
|
|
7075
7075
|
const next = () => {
|
|
@@ -7105,14 +7105,14 @@ var __webpack_modules__ = {
|
|
|
7105
7105
|
});
|
|
7106
7106
|
};
|
|
7107
7107
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
7108
|
-
return new Promise((
|
|
7108
|
+
return new Promise((res, rej) => {
|
|
7109
7109
|
reject = rej;
|
|
7110
7110
|
resolve = res;
|
|
7111
7111
|
this.once(DESTROYED, ondestroy);
|
|
7112
7112
|
this.once("error", onerr);
|
|
7113
7113
|
this.once("end", onend);
|
|
7114
7114
|
this.once("data", ondata);
|
|
7115
|
-
})
|
|
7115
|
+
});
|
|
7116
7116
|
};
|
|
7117
7117
|
return {
|
|
7118
7118
|
next
|
|
@@ -7379,18 +7379,18 @@ var __webpack_modules__ = {
|
|
|
7379
7379
|
}
|
|
7380
7380
|
opts = opts || {};
|
|
7381
7381
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
7382
|
-
stat.checkPaths(src, dest, "move", opts, (
|
|
7382
|
+
stat.checkPaths(src, dest, "move", opts, (err, stats) => {
|
|
7383
7383
|
if (err) return cb(err);
|
|
7384
7384
|
const {srcStat, isChangingCase = false} = stats;
|
|
7385
|
-
stat.checkParentPaths(src, srcStat, dest, "move",
|
|
7385
|
+
stat.checkParentPaths(src, srcStat, dest, "move", err => {
|
|
7386
7386
|
if (err) return cb(err);
|
|
7387
7387
|
if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb);
|
|
7388
|
-
mkdirp(path.dirname(dest),
|
|
7388
|
+
mkdirp(path.dirname(dest), err => {
|
|
7389
7389
|
if (err) return cb(err);
|
|
7390
7390
|
return doRename(src, dest, overwrite, isChangingCase, cb);
|
|
7391
|
-
})
|
|
7392
|
-
})
|
|
7393
|
-
})
|
|
7391
|
+
});
|
|
7392
|
+
});
|
|
7393
|
+
});
|
|
7394
7394
|
}
|
|
7395
7395
|
function isParentRoot(dest) {
|
|
7396
7396
|
const parent = path.dirname(dest);
|
|
@@ -7400,33 +7400,33 @@ var __webpack_modules__ = {
|
|
|
7400
7400
|
function doRename(src, dest, overwrite, isChangingCase, cb) {
|
|
7401
7401
|
if (isChangingCase) return rename(src, dest, overwrite, cb);
|
|
7402
7402
|
if (overwrite) {
|
|
7403
|
-
return remove(dest,
|
|
7403
|
+
return remove(dest, err => {
|
|
7404
7404
|
if (err) return cb(err);
|
|
7405
7405
|
return rename(src, dest, overwrite, cb);
|
|
7406
|
-
})
|
|
7406
|
+
});
|
|
7407
7407
|
}
|
|
7408
|
-
pathExists(dest, (
|
|
7408
|
+
pathExists(dest, (err, destExists) => {
|
|
7409
7409
|
if (err) return cb(err);
|
|
7410
7410
|
if (destExists) return cb(new Error("dest already exists."));
|
|
7411
7411
|
return rename(src, dest, overwrite, cb);
|
|
7412
|
-
})
|
|
7412
|
+
});
|
|
7413
7413
|
}
|
|
7414
7414
|
function rename(src, dest, overwrite, cb) {
|
|
7415
|
-
fs.rename(src, dest,
|
|
7415
|
+
fs.rename(src, dest, err => {
|
|
7416
7416
|
if (!err) return cb();
|
|
7417
7417
|
if (err.code !== "EXDEV") return cb(err);
|
|
7418
7418
|
return moveAcrossDevice(src, dest, overwrite, cb);
|
|
7419
|
-
})
|
|
7419
|
+
});
|
|
7420
7420
|
}
|
|
7421
7421
|
function moveAcrossDevice(src, dest, overwrite, cb) {
|
|
7422
7422
|
const opts = {
|
|
7423
7423
|
overwrite,
|
|
7424
7424
|
errorOnExist: true
|
|
7425
7425
|
};
|
|
7426
|
-
copy(src, dest, opts,
|
|
7426
|
+
copy(src, dest, opts, err => {
|
|
7427
7427
|
if (err) return cb(err);
|
|
7428
7428
|
return remove(src, cb);
|
|
7429
|
-
})
|
|
7429
|
+
});
|
|
7430
7430
|
}
|
|
7431
7431
|
module.exports = move;
|
|
7432
7432
|
},
|
|
@@ -7441,9 +7441,9 @@ var __webpack_modules__ = {
|
|
|
7441
7441
|
if (obj instanceof Object) var copy = {
|
|
7442
7442
|
__proto__: getPrototypeOf(obj)
|
|
7443
7443
|
}; else var copy = Object.create(null);
|
|
7444
|
-
Object.getOwnPropertyNames(obj).forEach(
|
|
7444
|
+
Object.getOwnPropertyNames(obj).forEach(function(key) {
|
|
7445
7445
|
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
|
|
7446
|
-
})
|
|
7446
|
+
});
|
|
7447
7447
|
return copy;
|
|
7448
7448
|
}
|
|
7449
7449
|
},
|
|
@@ -7613,7 +7613,7 @@ var __webpack_modules__ = {
|
|
|
7613
7613
|
}
|
|
7614
7614
|
const hexLookUp = Array.from({
|
|
7615
7615
|
length: 127
|
|
7616
|
-
}, (
|
|
7616
|
+
}, (_v, k) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k)));
|
|
7617
7617
|
function nonSimpleDomain(value) {
|
|
7618
7618
|
let code = 0;
|
|
7619
7619
|
for (let i = 0, len = value.length; i < len; ++i) {
|
|
@@ -7757,7 +7757,7 @@ var __webpack_modules__ = {
|
|
|
7757
7757
|
count++;
|
|
7758
7758
|
if (SIMPLE_INLINED.has(key)) continue;
|
|
7759
7759
|
if (typeof schema[key] == "object") {
|
|
7760
|
-
(0, util_1.eachItem)(schema[key],
|
|
7760
|
+
(0, util_1.eachItem)(schema[key], sch => count += countKeys(sch));
|
|
7761
7761
|
}
|
|
7762
7762
|
if (count === Infinity) return Infinity;
|
|
7763
7763
|
}
|
|
@@ -7797,7 +7797,7 @@ var __webpack_modules__ = {
|
|
|
7797
7797
|
const schemaRefs = new Set;
|
|
7798
7798
|
traverse(schema, {
|
|
7799
7799
|
allKeys: true
|
|
7800
|
-
}, (
|
|
7800
|
+
}, (sch, jsonPtr, _, parentJsonPtr) => {
|
|
7801
7801
|
if (parentJsonPtr === undefined) return;
|
|
7802
7802
|
const fullPath = pathPrefix + jsonPtr;
|
|
7803
7803
|
let innerBaseId = baseIds[parentJsonPtr];
|
|
@@ -7830,7 +7830,7 @@ var __webpack_modules__ = {
|
|
|
7830
7830
|
addRef.call(this, `#${anchor}`);
|
|
7831
7831
|
}
|
|
7832
7832
|
}
|
|
7833
|
-
})
|
|
7833
|
+
});
|
|
7834
7834
|
return localRefs;
|
|
7835
7835
|
function checkAmbiguosRef(sch1, sch2, ref) {
|
|
7836
7836
|
if (sch2 !== undefined && !equal(sch1, sch2)) throw ambiguos(ref);
|
|
@@ -7864,17 +7864,17 @@ var __webpack_modules__ = {
|
|
|
7864
7864
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
7865
7865
|
}
|
|
7866
7866
|
var onExit = __webpack_require__(2434);
|
|
7867
|
-
onExit(
|
|
7867
|
+
onExit(function() {
|
|
7868
7868
|
debug("exit listener");
|
|
7869
7869
|
Object.keys(locks).forEach(exports.unlockSync);
|
|
7870
|
-
})
|
|
7870
|
+
});
|
|
7871
7871
|
if (/^v0\.[0-8]\./.test(process.version)) {
|
|
7872
7872
|
debug("uncaughtException, version = %s", process.version);
|
|
7873
|
-
process.on("uncaughtException",
|
|
7873
|
+
process.on("uncaughtException", function H(er) {
|
|
7874
7874
|
debug("uncaughtException");
|
|
7875
|
-
var l = process.listeners("uncaughtException").filter(
|
|
7875
|
+
var l = process.listeners("uncaughtException").filter(function(h) {
|
|
7876
7876
|
return h !== H;
|
|
7877
|
-
})
|
|
7877
|
+
});
|
|
7878
7878
|
if (!l.length) {
|
|
7879
7879
|
try {
|
|
7880
7880
|
Object.keys(locks).forEach(exports.unlockSync);
|
|
@@ -7882,14 +7882,14 @@ var __webpack_modules__ = {
|
|
|
7882
7882
|
process.removeListener("uncaughtException", H);
|
|
7883
7883
|
throw er;
|
|
7884
7884
|
}
|
|
7885
|
-
})
|
|
7885
|
+
});
|
|
7886
7886
|
}
|
|
7887
7887
|
exports.unlock = function(path, cb) {
|
|
7888
7888
|
debug("unlock", path);
|
|
7889
7889
|
delete locks[path];
|
|
7890
|
-
fs.unlink(path,
|
|
7890
|
+
fs.unlink(path, function(unlinkEr) {
|
|
7891
7891
|
cb && cb();
|
|
7892
|
-
})
|
|
7892
|
+
});
|
|
7893
7893
|
};
|
|
7894
7894
|
exports.unlockSync = function(path) {
|
|
7895
7895
|
debug("unlockSync", path);
|
|
@@ -7901,26 +7901,26 @@ var __webpack_modules__ = {
|
|
|
7901
7901
|
exports.check = function(path, opts, cb) {
|
|
7902
7902
|
if (typeof opts === "function") cb = opts, opts = {};
|
|
7903
7903
|
debug("check", path, opts);
|
|
7904
|
-
fs.open(path, "r",
|
|
7904
|
+
fs.open(path, "r", function(er, fd) {
|
|
7905
7905
|
if (er) {
|
|
7906
7906
|
if (er.code !== "ENOENT") return cb(er);
|
|
7907
7907
|
return cb(null, false);
|
|
7908
7908
|
}
|
|
7909
7909
|
if (!opts.stale) {
|
|
7910
|
-
return fs.close(fd,
|
|
7910
|
+
return fs.close(fd, function(er) {
|
|
7911
7911
|
return cb(er, true);
|
|
7912
|
-
})
|
|
7912
|
+
});
|
|
7913
7913
|
}
|
|
7914
|
-
fs.fstat(fd,
|
|
7915
|
-
if (er) return fs.close(fd,
|
|
7914
|
+
fs.fstat(fd, function(er, st) {
|
|
7915
|
+
if (er) return fs.close(fd, function(er2) {
|
|
7916
7916
|
return cb(er);
|
|
7917
|
-
})
|
|
7918
|
-
fs.close(fd,
|
|
7917
|
+
});
|
|
7918
|
+
fs.close(fd, function(er) {
|
|
7919
7919
|
var age = Date.now() - st[exports.filetime].getTime();
|
|
7920
7920
|
return cb(er, age <= opts.stale);
|
|
7921
|
-
})
|
|
7922
|
-
})
|
|
7923
|
-
})
|
|
7921
|
+
});
|
|
7922
|
+
});
|
|
7923
|
+
});
|
|
7924
7924
|
};
|
|
7925
7925
|
exports.checkSync = function(path, opts) {
|
|
7926
7926
|
opts = opts || {};
|
|
@@ -7975,13 +7975,13 @@ var __webpack_modules__ = {
|
|
|
7975
7975
|
};
|
|
7976
7976
|
}(cb);
|
|
7977
7977
|
}
|
|
7978
|
-
fs.open(path, wx,
|
|
7978
|
+
fs.open(path, wx, function(er, fd) {
|
|
7979
7979
|
if (!er) {
|
|
7980
7980
|
debug("locked", path, fd);
|
|
7981
7981
|
locks[path] = fd;
|
|
7982
|
-
return fs.close(fd,
|
|
7982
|
+
return fs.close(fd, function() {
|
|
7983
7983
|
return cb();
|
|
7984
|
-
})
|
|
7984
|
+
});
|
|
7985
7985
|
}
|
|
7986
7986
|
debug("failed to acquire lock", er);
|
|
7987
7987
|
if (er.code !== "EEXIST") {
|
|
@@ -7990,11 +7990,11 @@ var __webpack_modules__ = {
|
|
|
7990
7990
|
}
|
|
7991
7991
|
if (!opts.stale) return notStale(er, path, opts, cb);
|
|
7992
7992
|
return maybeStale(er, path, opts, false, cb);
|
|
7993
|
-
})
|
|
7993
|
+
});
|
|
7994
7994
|
debug("lock return");
|
|
7995
7995
|
};
|
|
7996
7996
|
function maybeStale(originalEr, path, opts, hasStaleLock, cb) {
|
|
7997
|
-
fs.stat(path,
|
|
7997
|
+
fs.stat(path, function(statEr, st) {
|
|
7998
7998
|
if (statEr) {
|
|
7999
7999
|
if (statEr.code === "ENOENT") {
|
|
8000
8000
|
opts.stale = false;
|
|
@@ -8008,23 +8008,23 @@ var __webpack_modules__ = {
|
|
|
8008
8008
|
if (age <= opts.stale) return notStale(originalEr, path, opts, cb);
|
|
8009
8009
|
debug("lock stale", path, opts);
|
|
8010
8010
|
if (hasStaleLock) {
|
|
8011
|
-
exports.unlock(path,
|
|
8011
|
+
exports.unlock(path, function(er) {
|
|
8012
8012
|
if (er) return cb(er);
|
|
8013
8013
|
debug("lock stale retry", path, opts);
|
|
8014
|
-
fs.link(path + ".STALE", path,
|
|
8015
|
-
fs.unlink(path + ".STALE",
|
|
8014
|
+
fs.link(path + ".STALE", path, function(er) {
|
|
8015
|
+
fs.unlink(path + ".STALE", function() {
|
|
8016
8016
|
cb(er);
|
|
8017
|
-
})
|
|
8018
|
-
})
|
|
8019
|
-
})
|
|
8017
|
+
});
|
|
8018
|
+
});
|
|
8019
|
+
});
|
|
8020
8020
|
} else {
|
|
8021
8021
|
debug("acquire .STALE file lock", opts);
|
|
8022
|
-
exports.lock(path + ".STALE", opts,
|
|
8022
|
+
exports.lock(path + ".STALE", opts, function(er) {
|
|
8023
8023
|
if (er) return cb(er);
|
|
8024
8024
|
maybeStale(originalEr, path, opts, true, cb);
|
|
8025
|
-
})
|
|
8025
|
+
});
|
|
8026
8026
|
}
|
|
8027
|
-
})
|
|
8027
|
+
});
|
|
8028
8028
|
}
|
|
8029
8029
|
function notStale(er, path, opts, cb) {
|
|
8030
8030
|
debug("notStale", path, opts);
|
|
@@ -8094,19 +8094,19 @@ var __webpack_modules__ = {
|
|
|
8094
8094
|
opts.recursive = false;
|
|
8095
8095
|
const parent = dirname(path);
|
|
8096
8096
|
if (parent === path) {
|
|
8097
|
-
return opts.mkdirAsync(path, opts).catch(
|
|
8097
|
+
return opts.mkdirAsync(path, opts).catch(er => {
|
|
8098
8098
|
if (er.code !== "EISDIR") throw er;
|
|
8099
|
-
})
|
|
8099
|
+
});
|
|
8100
8100
|
}
|
|
8101
|
-
return opts.mkdirAsync(path, opts).then((
|
|
8102
|
-
if (er.code === "ENOENT") return mkdirpManual(parent, opts).then(
|
|
8101
|
+
return opts.mkdirAsync(path, opts).then(() => made || path, er => {
|
|
8102
|
+
if (er.code === "ENOENT") return mkdirpManual(parent, opts).then(made => mkdirpManual(path, opts, made));
|
|
8103
8103
|
if (er.code !== "EEXIST" && er.code !== "EROFS") throw er;
|
|
8104
|
-
return opts.statAsync(path).then(
|
|
8104
|
+
return opts.statAsync(path).then(st => {
|
|
8105
8105
|
if (st.isDirectory()) return made; else throw er;
|
|
8106
|
-
}
|
|
8106
|
+
}, () => {
|
|
8107
8107
|
throw er;
|
|
8108
|
-
})
|
|
8109
|
-
})
|
|
8108
|
+
});
|
|
8109
|
+
});
|
|
8110
8110
|
};
|
|
8111
8111
|
const mkdirpManualSync = (path, opts, made) => {
|
|
8112
8112
|
const parent = dirname(path);
|
|
@@ -8179,7 +8179,7 @@ var __webpack_modules__ = {
|
|
|
8179
8179
|
class Ajv extends core_1.default {
|
|
8180
8180
|
_addVocabularies() {
|
|
8181
8181
|
super._addVocabularies();
|
|
8182
|
-
draft7_1.default.forEach(
|
|
8182
|
+
draft7_1.default.forEach(v => this.addVocabulary(v));
|
|
8183
8183
|
if (this.opts.discriminator) this.addKeyword(discriminator_1.default);
|
|
8184
8184
|
}
|
|
8185
8185
|
_addDefaultMetaSchema() {
|
|
@@ -8581,14 +8581,14 @@ var __webpack_modules__ = {
|
|
|
8581
8581
|
encoding = "utf8";
|
|
8582
8582
|
}
|
|
8583
8583
|
const dir = path.dirname(file);
|
|
8584
|
-
pathExists(dir, (
|
|
8584
|
+
pathExists(dir, (err, itDoes) => {
|
|
8585
8585
|
if (err) return callback(err);
|
|
8586
8586
|
if (itDoes) return fs.writeFile(file, data, encoding, callback);
|
|
8587
|
-
mkdir.mkdirs(dir,
|
|
8587
|
+
mkdir.mkdirs(dir, err => {
|
|
8588
8588
|
if (err) return callback(err);
|
|
8589
8589
|
fs.writeFile(file, data, encoding, callback);
|
|
8590
|
-
})
|
|
8591
|
-
})
|
|
8590
|
+
});
|
|
8591
|
+
});
|
|
8592
8592
|
}
|
|
8593
8593
|
function outputFileSync(file, ...args) {
|
|
8594
8594
|
const dir = path.dirname(file);
|
|
@@ -8703,7 +8703,7 @@ var __webpack_modules__ = {
|
|
|
8703
8703
|
if (this[ENCODING] && enc !== this[ENCODING] && (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) throw new Error("cannot change encoding");
|
|
8704
8704
|
if (this[ENCODING] !== enc) {
|
|
8705
8705
|
this[DECODER] = enc ? new SD(enc) : null;
|
|
8706
|
-
if (this.buffer.length) this.buffer = this.buffer.map(
|
|
8706
|
+
if (this.buffer.length) this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk));
|
|
8707
8707
|
}
|
|
8708
8708
|
this[ENCODING] = enc;
|
|
8709
8709
|
}
|
|
@@ -8842,12 +8842,12 @@ var __webpack_modules__ = {
|
|
|
8842
8842
|
if (opts.end) dest.end();
|
|
8843
8843
|
} else {
|
|
8844
8844
|
this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts) : new PipeProxyErrors(this, dest, opts));
|
|
8845
|
-
if (this[ASYNC]) defer((
|
|
8845
|
+
if (this[ASYNC]) defer(() => this[RESUME]()); else this[RESUME]();
|
|
8846
8846
|
}
|
|
8847
8847
|
return dest;
|
|
8848
8848
|
}
|
|
8849
8849
|
unpipe(dest) {
|
|
8850
|
-
const p = this.pipes.find(
|
|
8850
|
+
const p = this.pipes.find(p => p.dest === dest);
|
|
8851
8851
|
if (p) {
|
|
8852
8852
|
this.pipes.splice(this.pipes.indexOf(p), 1);
|
|
8853
8853
|
p.unpipe();
|
|
@@ -8862,7 +8862,7 @@ var __webpack_modules__ = {
|
|
|
8862
8862
|
super.emit(ev);
|
|
8863
8863
|
this.removeAllListeners(ev);
|
|
8864
8864
|
} else if (ev === "error" && this[EMITTED_ERROR]) {
|
|
8865
|
-
if (this[ASYNC]) defer((
|
|
8865
|
+
if (this[ASYNC]) defer(() => fn.call(this, this[EMITTED_ERROR])); else fn.call(this, this[EMITTED_ERROR]);
|
|
8866
8866
|
}
|
|
8867
8867
|
return ret;
|
|
8868
8868
|
}
|
|
@@ -8881,7 +8881,7 @@ var __webpack_modules__ = {
|
|
|
8881
8881
|
}
|
|
8882
8882
|
emit(ev, data, ...extra) {
|
|
8883
8883
|
if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) return; else if (ev === "data") {
|
|
8884
|
-
return !data ? false : this[ASYNC] ? defer((
|
|
8884
|
+
return !data ? false : this[ASYNC] ? defer(() => this[EMITDATA](data)) : this[EMITDATA](data);
|
|
8885
8885
|
} else if (ev === "end") {
|
|
8886
8886
|
return this[EMITEND]();
|
|
8887
8887
|
} else if (ev === "close") {
|
|
@@ -8920,7 +8920,7 @@ var __webpack_modules__ = {
|
|
|
8920
8920
|
if (this[EMITTED_END]) return;
|
|
8921
8921
|
this[EMITTED_END] = true;
|
|
8922
8922
|
this.readable = false;
|
|
8923
|
-
if (this[ASYNC]) defer((
|
|
8923
|
+
if (this[ASYNC]) defer(() => this[EMITEND2]()); else this[EMITEND2]();
|
|
8924
8924
|
}
|
|
8925
8925
|
[EMITEND2]() {
|
|
8926
8926
|
if (this[DECODER]) {
|
|
@@ -8943,21 +8943,21 @@ var __webpack_modules__ = {
|
|
|
8943
8943
|
const buf = [];
|
|
8944
8944
|
if (!this[OBJECTMODE]) buf.dataLength = 0;
|
|
8945
8945
|
const p = this.promise();
|
|
8946
|
-
this.on("data",
|
|
8946
|
+
this.on("data", c => {
|
|
8947
8947
|
buf.push(c);
|
|
8948
8948
|
if (!this[OBJECTMODE]) buf.dataLength += c.length;
|
|
8949
|
-
})
|
|
8950
|
-
return p.then((
|
|
8949
|
+
});
|
|
8950
|
+
return p.then(() => buf);
|
|
8951
8951
|
}
|
|
8952
8952
|
concat() {
|
|
8953
|
-
return this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this.collect().then(
|
|
8953
|
+
return this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this.collect().then(buf => this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength));
|
|
8954
8954
|
}
|
|
8955
8955
|
promise() {
|
|
8956
|
-
return new Promise((
|
|
8957
|
-
this.on(DESTROYED, (
|
|
8958
|
-
this.on("error",
|
|
8959
|
-
this.on("end", (
|
|
8960
|
-
})
|
|
8956
|
+
return new Promise((resolve, reject) => {
|
|
8957
|
+
this.on(DESTROYED, () => reject(new Error("stream destroyed")));
|
|
8958
|
+
this.on("error", er => reject(er));
|
|
8959
|
+
this.on("end", () => resolve());
|
|
8960
|
+
});
|
|
8961
8961
|
}
|
|
8962
8962
|
[ASYNCITERATOR]() {
|
|
8963
8963
|
const next = () => {
|
|
@@ -8993,14 +8993,14 @@ var __webpack_modules__ = {
|
|
|
8993
8993
|
});
|
|
8994
8994
|
};
|
|
8995
8995
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
8996
|
-
return new Promise((
|
|
8996
|
+
return new Promise((res, rej) => {
|
|
8997
8997
|
reject = rej;
|
|
8998
8998
|
resolve = res;
|
|
8999
8999
|
this.once(DESTROYED, ondestroy);
|
|
9000
9000
|
this.once("error", onerr);
|
|
9001
9001
|
this.once("end", onend);
|
|
9002
9002
|
this.once("data", ondata);
|
|
9003
|
-
})
|
|
9003
|
+
});
|
|
9004
9004
|
};
|
|
9005
9005
|
return {
|
|
9006
9006
|
next
|
|
@@ -9099,18 +9099,18 @@ var __webpack_modules__ = {
|
|
|
9099
9099
|
function rename(from, to, cb) {
|
|
9100
9100
|
var start = Date.now();
|
|
9101
9101
|
var backoff = 0;
|
|
9102
|
-
fs$rename(from, to,
|
|
9102
|
+
fs$rename(from, to, function CB(er) {
|
|
9103
9103
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
9104
|
-
setTimeout(
|
|
9105
|
-
fs.stat(to,
|
|
9104
|
+
setTimeout(function() {
|
|
9105
|
+
fs.stat(to, function(stater, st) {
|
|
9106
9106
|
if (stater && stater.code === "ENOENT") fs$rename(from, to, CB); else cb(er);
|
|
9107
|
-
})
|
|
9108
|
-
}
|
|
9107
|
+
});
|
|
9108
|
+
}, backoff);
|
|
9109
9109
|
if (backoff < 100) backoff += 10;
|
|
9110
9110
|
return;
|
|
9111
9111
|
}
|
|
9112
9112
|
if (cb) cb(er);
|
|
9113
|
-
})
|
|
9113
|
+
});
|
|
9114
9114
|
}
|
|
9115
9115
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
9116
9116
|
return rename;
|
|
@@ -9152,17 +9152,17 @@ var __webpack_modules__ = {
|
|
|
9152
9152
|
}(fs.readSync);
|
|
9153
9153
|
function patchLchmod(fs) {
|
|
9154
9154
|
fs.lchmod = function(path, mode, callback) {
|
|
9155
|
-
fs.open(path, constants.O_WRONLY | constants.O_SYMLINK, mode,
|
|
9155
|
+
fs.open(path, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) {
|
|
9156
9156
|
if (err) {
|
|
9157
9157
|
if (callback) callback(err);
|
|
9158
9158
|
return;
|
|
9159
9159
|
}
|
|
9160
|
-
fs.fchmod(fd, mode,
|
|
9161
|
-
fs.close(fd,
|
|
9160
|
+
fs.fchmod(fd, mode, function(err) {
|
|
9161
|
+
fs.close(fd, function(err2) {
|
|
9162
9162
|
if (callback) callback(err || err2);
|
|
9163
|
-
})
|
|
9164
|
-
})
|
|
9165
|
-
})
|
|
9163
|
+
});
|
|
9164
|
+
});
|
|
9165
|
+
});
|
|
9166
9166
|
};
|
|
9167
9167
|
fs.lchmodSync = function(path, mode) {
|
|
9168
9168
|
var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
@@ -9186,17 +9186,17 @@ var __webpack_modules__ = {
|
|
|
9186
9186
|
function patchLutimes(fs) {
|
|
9187
9187
|
if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) {
|
|
9188
9188
|
fs.lutimes = function(path, at, mt, cb) {
|
|
9189
|
-
fs.open(path, constants.O_SYMLINK,
|
|
9189
|
+
fs.open(path, constants.O_SYMLINK, function(er, fd) {
|
|
9190
9190
|
if (er) {
|
|
9191
9191
|
if (cb) cb(er);
|
|
9192
9192
|
return;
|
|
9193
9193
|
}
|
|
9194
|
-
fs.futimes(fd, at, mt,
|
|
9195
|
-
fs.close(fd,
|
|
9194
|
+
fs.futimes(fd, at, mt, function(er) {
|
|
9195
|
+
fs.close(fd, function(er2) {
|
|
9196
9196
|
if (cb) cb(er || er2);
|
|
9197
|
-
})
|
|
9198
|
-
})
|
|
9199
|
-
})
|
|
9197
|
+
});
|
|
9198
|
+
});
|
|
9199
|
+
});
|
|
9200
9200
|
};
|
|
9201
9201
|
fs.lutimesSync = function(path, at, mt) {
|
|
9202
9202
|
var fd = fs.openSync(path, constants.O_SYMLINK);
|
|
@@ -9226,10 +9226,10 @@ var __webpack_modules__ = {
|
|
|
9226
9226
|
function chmodFix(orig) {
|
|
9227
9227
|
if (!orig) return orig;
|
|
9228
9228
|
return function(target, mode, cb) {
|
|
9229
|
-
return orig.call(fs, target, mode,
|
|
9229
|
+
return orig.call(fs, target, mode, function(er) {
|
|
9230
9230
|
if (chownErOk(er)) er = null;
|
|
9231
9231
|
if (cb) cb.apply(this, arguments);
|
|
9232
|
-
})
|
|
9232
|
+
});
|
|
9233
9233
|
};
|
|
9234
9234
|
}
|
|
9235
9235
|
function chmodFixSync(orig) {
|
|
@@ -9245,10 +9245,10 @@ var __webpack_modules__ = {
|
|
|
9245
9245
|
function chownFix(orig) {
|
|
9246
9246
|
if (!orig) return orig;
|
|
9247
9247
|
return function(target, uid, gid, cb) {
|
|
9248
|
-
return orig.call(fs, target, uid, gid,
|
|
9248
|
+
return orig.call(fs, target, uid, gid, function(er) {
|
|
9249
9249
|
if (chownErOk(er)) er = null;
|
|
9250
9250
|
if (cb) cb.apply(this, arguments);
|
|
9251
|
-
})
|
|
9251
|
+
});
|
|
9252
9252
|
};
|
|
9253
9253
|
}
|
|
9254
9254
|
function chownFixSync(orig) {
|
|
@@ -9315,7 +9315,7 @@ var __webpack_modules__ = {
|
|
|
9315
9315
|
assignDefault(it, key, properties[key].default);
|
|
9316
9316
|
}
|
|
9317
9317
|
} else if (ty === "array" && Array.isArray(items)) {
|
|
9318
|
-
items.forEach((
|
|
9318
|
+
items.forEach((sch, i) => assignDefault(it, i, sch.default));
|
|
9319
9319
|
}
|
|
9320
9320
|
}
|
|
9321
9321
|
exports.assignDefaults = assignDefaults;
|
|
@@ -9479,7 +9479,8 @@ var __webpack_modules__ = {
|
|
|
9479
9479
|
Object.defineProperty(exports, "__esModule", {
|
|
9480
9480
|
value: true
|
|
9481
9481
|
});
|
|
9482
|
-
exports.
|
|
9482
|
+
exports.schema = void 0;
|
|
9483
|
+
exports.validateAssembly = validateAssembly;
|
|
9483
9484
|
const ajv_1 = __webpack_require__(4588);
|
|
9484
9485
|
exports.schema = __webpack_require__(878);
|
|
9485
9486
|
function validateAssembly(obj) {
|
|
@@ -9500,7 +9501,6 @@ var __webpack_modules__ = {
|
|
|
9500
9501
|
}
|
|
9501
9502
|
return obj;
|
|
9502
9503
|
}
|
|
9503
|
-
exports.validateAssembly = validateAssembly;
|
|
9504
9504
|
},
|
|
9505
9505
|
5513: (__unused_webpack_module, exports, __webpack_require__) => {
|
|
9506
9506
|
"use strict";
|
|
@@ -9534,7 +9534,9 @@ var __webpack_modules__ = {
|
|
|
9534
9534
|
Object.defineProperty(exports, "__esModule", {
|
|
9535
9535
|
value: true
|
|
9536
9536
|
});
|
|
9537
|
-
exports.
|
|
9537
|
+
exports.assemblyRedirectSchema = void 0;
|
|
9538
|
+
exports.isAssemblyRedirect = isAssemblyRedirect;
|
|
9539
|
+
exports.validateAssemblyRedirect = validateAssemblyRedirect;
|
|
9538
9540
|
const ajv_1 = __webpack_require__(4588);
|
|
9539
9541
|
exports.assemblyRedirectSchema = __webpack_require__(3346);
|
|
9540
9542
|
const SCHEMA = "jsii/file-redirect";
|
|
@@ -9544,7 +9546,6 @@ var __webpack_modules__ = {
|
|
|
9544
9546
|
}
|
|
9545
9547
|
return obj.schema === SCHEMA;
|
|
9546
9548
|
}
|
|
9547
|
-
exports.isAssemblyRedirect = isAssemblyRedirect;
|
|
9548
9549
|
function validateAssemblyRedirect(obj) {
|
|
9549
9550
|
const ajv = new ajv_1.default({
|
|
9550
9551
|
allErrors: true
|
|
@@ -9559,7 +9560,6 @@ var __webpack_modules__ = {
|
|
|
9559
9560
|
}
|
|
9560
9561
|
return obj;
|
|
9561
9562
|
}
|
|
9562
|
-
exports.validateAssemblyRedirect = validateAssemblyRedirect;
|
|
9563
9563
|
},
|
|
9564
9564
|
5531: (__unused_webpack_module, exports, __webpack_require__) => {
|
|
9565
9565
|
"use strict";
|
|
@@ -9608,15 +9608,15 @@ var __webpack_modules__ = {
|
|
|
9608
9608
|
}
|
|
9609
9609
|
const valid = gen.name("valid");
|
|
9610
9610
|
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
9611
|
-
schArr.forEach((
|
|
9611
|
+
schArr.forEach((sch, i) => {
|
|
9612
9612
|
if ((0, util_1.alwaysValidSchema)(it, sch)) return;
|
|
9613
|
-
gen.if((0, codegen_1._)`${len} > ${i}`, (
|
|
9613
|
+
gen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({
|
|
9614
9614
|
keyword,
|
|
9615
9615
|
schemaProp: i,
|
|
9616
9616
|
dataProp: i
|
|
9617
|
-
}, valid))
|
|
9617
|
+
}, valid));
|
|
9618
9618
|
cxt.ok(valid);
|
|
9619
|
-
})
|
|
9619
|
+
});
|
|
9620
9620
|
function checkStrictTuple(sch) {
|
|
9621
9621
|
const {opts, errSchemaPath} = it;
|
|
9622
9622
|
const l = schArr.length;
|
|
@@ -9668,7 +9668,13 @@ var __webpack_modules__ = {
|
|
|
9668
9668
|
Object.defineProperty(exports, "__esModule", {
|
|
9669
9669
|
value: true
|
|
9670
9670
|
});
|
|
9671
|
-
exports.
|
|
9671
|
+
exports.compressedAssemblyExists = compressedAssemblyExists;
|
|
9672
|
+
exports.findAssemblyFile = findAssemblyFile;
|
|
9673
|
+
exports.replaceAssembly = replaceAssembly;
|
|
9674
|
+
exports.writeAssembly = writeAssembly;
|
|
9675
|
+
exports.loadAssemblyFromBuffer = loadAssemblyFromBuffer;
|
|
9676
|
+
exports.loadAssemblyFromPath = loadAssemblyFromPath;
|
|
9677
|
+
exports.loadAssemblyFromFile = loadAssemblyFromFile;
|
|
9672
9678
|
const fs = __webpack_require__(9896);
|
|
9673
9679
|
const path = __webpack_require__(6928);
|
|
9674
9680
|
const zlib = __webpack_require__(3106);
|
|
@@ -9678,7 +9684,6 @@ var __webpack_modules__ = {
|
|
|
9678
9684
|
function compressedAssemblyExists(directory) {
|
|
9679
9685
|
return fs.existsSync(path.join(directory, assembly_1.SPEC_FILE_NAME_COMPRESSED));
|
|
9680
9686
|
}
|
|
9681
|
-
exports.compressedAssemblyExists = compressedAssemblyExists;
|
|
9682
9687
|
function findAssemblyFile(directory) {
|
|
9683
9688
|
const dotJsiiFile = path.join(directory, assembly_1.SPEC_FILE_NAME);
|
|
9684
9689
|
if (!fs.existsSync(dotJsiiFile)) {
|
|
@@ -9686,13 +9691,11 @@ var __webpack_modules__ = {
|
|
|
9686
9691
|
}
|
|
9687
9692
|
return dotJsiiFile;
|
|
9688
9693
|
}
|
|
9689
|
-
exports.findAssemblyFile = findAssemblyFile;
|
|
9690
9694
|
function replaceAssembly(assembly, directory) {
|
|
9691
9695
|
writeAssembly(directory, _fingerprint(assembly), {
|
|
9692
9696
|
compress: compressedAssemblyExists(directory)
|
|
9693
9697
|
});
|
|
9694
9698
|
}
|
|
9695
|
-
exports.replaceAssembly = replaceAssembly;
|
|
9696
9699
|
function _fingerprint(assembly) {
|
|
9697
9700
|
assembly.fingerprint = "*".repeat(10);
|
|
9698
9701
|
return assembly;
|
|
@@ -9710,7 +9713,6 @@ var __webpack_modules__ = {
|
|
|
9710
9713
|
}
|
|
9711
9714
|
return compress;
|
|
9712
9715
|
}
|
|
9713
|
-
exports.writeAssembly = writeAssembly;
|
|
9714
9716
|
const failNoReadfileProvided = filename => {
|
|
9715
9717
|
throw new Error(`Unable to load assembly support file ${JSON.stringify(filename)}: no readFile callback provided!`);
|
|
9716
9718
|
};
|
|
@@ -9721,21 +9723,18 @@ var __webpack_modules__ = {
|
|
|
9721
9723
|
}
|
|
9722
9724
|
return validate ? (0, validate_assembly_1.validateAssembly)(contents) : contents;
|
|
9723
9725
|
}
|
|
9724
|
-
exports.loadAssemblyFromBuffer = loadAssemblyFromBuffer;
|
|
9725
9726
|
function loadAssemblyFromPath(directory, validate = true) {
|
|
9726
9727
|
const assemblyFile = findAssemblyFile(directory);
|
|
9727
9728
|
return loadAssemblyFromFile(assemblyFile, validate);
|
|
9728
9729
|
}
|
|
9729
|
-
exports.loadAssemblyFromPath = loadAssemblyFromPath;
|
|
9730
9730
|
function loadAssemblyFromFile(pathToFile, validate = true) {
|
|
9731
9731
|
const data = fs.readFileSync(pathToFile);
|
|
9732
9732
|
try {
|
|
9733
|
-
return loadAssemblyFromBuffer(data,
|
|
9733
|
+
return loadAssemblyFromBuffer(data, filename => fs.readFileSync(path.resolve(pathToFile, "..", filename)), validate);
|
|
9734
9734
|
} catch (e) {
|
|
9735
9735
|
throw new Error(`Error loading assembly from file ${pathToFile}:\n${e}`);
|
|
9736
9736
|
}
|
|
9737
9737
|
}
|
|
9738
|
-
exports.loadAssemblyFromFile = loadAssemblyFromFile;
|
|
9739
9738
|
function followRedirect(assemblyRedirect, readFile) {
|
|
9740
9739
|
(0, redirect_1.validateAssemblyRedirect)(assemblyRedirect);
|
|
9741
9740
|
let data = readFile(assemblyRedirect.filename);
|
|
@@ -9768,9 +9767,9 @@ var __webpack_modules__ = {
|
|
|
9768
9767
|
self.head = null;
|
|
9769
9768
|
self.length = 0;
|
|
9770
9769
|
if (list && typeof list.forEach === "function") {
|
|
9771
|
-
list.forEach(
|
|
9770
|
+
list.forEach(function(item) {
|
|
9772
9771
|
self.push(item);
|
|
9773
|
-
})
|
|
9772
|
+
});
|
|
9774
9773
|
} else if (arguments.length > 0) {
|
|
9775
9774
|
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
9776
9775
|
self.push(arguments[i]);
|
|
@@ -10304,7 +10303,7 @@ var __webpack_modules__ = {
|
|
|
10304
10303
|
const getPos = (fd, size, cb_) => {
|
|
10305
10304
|
const cb = (er, pos) => {
|
|
10306
10305
|
if (er) {
|
|
10307
|
-
fs.close(fd,
|
|
10306
|
+
fs.close(fd, _ => cb_(er));
|
|
10308
10307
|
} else {
|
|
10309
10308
|
cb_(null, pos);
|
|
10310
10309
|
}
|
|
@@ -10349,7 +10348,7 @@ var __webpack_modules__ = {
|
|
|
10349
10348
|
};
|
|
10350
10349
|
fs.read(fd, headBuf, 0, 512, position, onread);
|
|
10351
10350
|
};
|
|
10352
|
-
const promise = new Promise((
|
|
10351
|
+
const promise = new Promise((resolve, reject) => {
|
|
10353
10352
|
p.on("error", reject);
|
|
10354
10353
|
let flag = "r+";
|
|
10355
10354
|
const onopen = (er, fd) => {
|
|
@@ -10360,11 +10359,11 @@ var __webpack_modules__ = {
|
|
|
10360
10359
|
if (er) {
|
|
10361
10360
|
return reject(er);
|
|
10362
10361
|
}
|
|
10363
|
-
fs.fstat(fd, (
|
|
10362
|
+
fs.fstat(fd, (er, st) => {
|
|
10364
10363
|
if (er) {
|
|
10365
|
-
return fs.close(fd, (
|
|
10364
|
+
return fs.close(fd, () => reject(er));
|
|
10366
10365
|
}
|
|
10367
|
-
getPos(fd, st.size, (
|
|
10366
|
+
getPos(fd, st.size, (er, position) => {
|
|
10368
10367
|
if (er) {
|
|
10369
10368
|
return reject(er);
|
|
10370
10369
|
}
|
|
@@ -10376,15 +10375,15 @@ var __webpack_modules__ = {
|
|
|
10376
10375
|
stream.on("error", reject);
|
|
10377
10376
|
stream.on("close", resolve);
|
|
10378
10377
|
addFilesAsync(p, files);
|
|
10379
|
-
})
|
|
10380
|
-
})
|
|
10378
|
+
});
|
|
10379
|
+
});
|
|
10381
10380
|
};
|
|
10382
10381
|
fs.open(opt.file, flag, onopen);
|
|
10383
|
-
})
|
|
10382
|
+
});
|
|
10384
10383
|
return cb ? promise.then(cb, cb) : promise;
|
|
10385
10384
|
};
|
|
10386
10385
|
const addFilesSync = (p, files) => {
|
|
10387
|
-
files.forEach(
|
|
10386
|
+
files.forEach(file => {
|
|
10388
10387
|
if (file.charAt(0) === "@") {
|
|
10389
10388
|
t({
|
|
10390
10389
|
file: path.resolve(p.cwd, file.slice(1)),
|
|
@@ -10395,7 +10394,7 @@ var __webpack_modules__ = {
|
|
|
10395
10394
|
} else {
|
|
10396
10395
|
p.add(file);
|
|
10397
10396
|
}
|
|
10398
|
-
})
|
|
10397
|
+
});
|
|
10399
10398
|
p.end();
|
|
10400
10399
|
};
|
|
10401
10400
|
const addFilesAsync = (p, files) => {
|
|
@@ -10406,7 +10405,7 @@ var __webpack_modules__ = {
|
|
|
10406
10405
|
file: path.resolve(p.cwd, file.slice(1)),
|
|
10407
10406
|
noResume: true,
|
|
10408
10407
|
onentry: entry => p.add(entry)
|
|
10409
|
-
}).then(
|
|
10408
|
+
}).then(_ => addFilesAsync(p, files));
|
|
10410
10409
|
} else {
|
|
10411
10410
|
p.add(file);
|
|
10412
10411
|
}
|
|
@@ -10468,11 +10467,11 @@ var __webpack_modules__ = {
|
|
|
10468
10467
|
deps: deps.join(", ")
|
|
10469
10468
|
});
|
|
10470
10469
|
if (it.allErrors) {
|
|
10471
|
-
gen.if(hasProperty, (
|
|
10470
|
+
gen.if(hasProperty, () => {
|
|
10472
10471
|
for (const depProp of deps) {
|
|
10473
10472
|
(0, code_1.checkReportMissingProp)(cxt, depProp);
|
|
10474
10473
|
}
|
|
10475
|
-
})
|
|
10474
|
+
});
|
|
10476
10475
|
} else {
|
|
10477
10476
|
gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);
|
|
10478
10477
|
(0, code_1.reportMissingProp)(cxt, missing);
|
|
@@ -10486,13 +10485,13 @@ var __webpack_modules__ = {
|
|
|
10486
10485
|
const valid = gen.name("valid");
|
|
10487
10486
|
for (const prop in schemaDeps) {
|
|
10488
10487
|
if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop])) continue;
|
|
10489
|
-
gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), (
|
|
10488
|
+
gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => {
|
|
10490
10489
|
const schCxt = cxt.subschema({
|
|
10491
10490
|
keyword,
|
|
10492
10491
|
schemaProp: prop
|
|
10493
10492
|
}, valid);
|
|
10494
10493
|
cxt.mergeValidEvaluated(schCxt, valid);
|
|
10495
|
-
}
|
|
10494
|
+
}, () => gen.var(valid, true));
|
|
10496
10495
|
cxt.ok(valid);
|
|
10497
10496
|
}
|
|
10498
10497
|
}
|
|
@@ -10645,59 +10644,59 @@ var __webpack_modules__ = {
|
|
|
10645
10644
|
"use strict";
|
|
10646
10645
|
const u = __webpack_require__(9022).fromCallback;
|
|
10647
10646
|
const fs = __webpack_require__(9333);
|
|
10648
|
-
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(
|
|
10647
|
+
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");
|
|
10649
10648
|
Object.assign(exports, fs);
|
|
10650
|
-
api.forEach(
|
|
10649
|
+
api.forEach(method => {
|
|
10651
10650
|
exports[method] = u(fs[method]);
|
|
10652
|
-
})
|
|
10651
|
+
});
|
|
10653
10652
|
exports.exists = function(filename, callback) {
|
|
10654
10653
|
if (typeof callback === "function") {
|
|
10655
10654
|
return fs.exists(filename, callback);
|
|
10656
10655
|
}
|
|
10657
|
-
return new Promise(
|
|
10656
|
+
return new Promise(resolve => fs.exists(filename, resolve));
|
|
10658
10657
|
};
|
|
10659
10658
|
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
10660
10659
|
if (typeof callback === "function") {
|
|
10661
10660
|
return fs.read(fd, buffer, offset, length, position, callback);
|
|
10662
10661
|
}
|
|
10663
|
-
return new Promise((
|
|
10664
|
-
fs.read(fd, buffer, offset, length, position, (
|
|
10662
|
+
return new Promise((resolve, reject) => {
|
|
10663
|
+
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
|
|
10665
10664
|
if (err) return reject(err);
|
|
10666
10665
|
resolve({
|
|
10667
10666
|
bytesRead,
|
|
10668
10667
|
buffer
|
|
10669
10668
|
});
|
|
10670
|
-
})
|
|
10671
|
-
})
|
|
10669
|
+
});
|
|
10670
|
+
});
|
|
10672
10671
|
};
|
|
10673
10672
|
exports.write = function(fd, buffer, ...args) {
|
|
10674
10673
|
if (typeof args[args.length - 1] === "function") {
|
|
10675
10674
|
return fs.write(fd, buffer, ...args);
|
|
10676
10675
|
}
|
|
10677
|
-
return new Promise((
|
|
10678
|
-
fs.write(fd, buffer, ...args, (
|
|
10676
|
+
return new Promise((resolve, reject) => {
|
|
10677
|
+
fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
|
|
10679
10678
|
if (err) return reject(err);
|
|
10680
10679
|
resolve({
|
|
10681
10680
|
bytesWritten,
|
|
10682
10681
|
buffer
|
|
10683
10682
|
});
|
|
10684
|
-
})
|
|
10685
|
-
})
|
|
10683
|
+
});
|
|
10684
|
+
});
|
|
10686
10685
|
};
|
|
10687
10686
|
if (typeof fs.writev === "function") {
|
|
10688
10687
|
exports.writev = function(fd, buffers, ...args) {
|
|
10689
10688
|
if (typeof args[args.length - 1] === "function") {
|
|
10690
10689
|
return fs.writev(fd, buffers, ...args);
|
|
10691
10690
|
}
|
|
10692
|
-
return new Promise((
|
|
10693
|
-
fs.writev(fd, buffers, ...args, (
|
|
10691
|
+
return new Promise((resolve, reject) => {
|
|
10692
|
+
fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
|
|
10694
10693
|
if (err) return reject(err);
|
|
10695
10694
|
resolve({
|
|
10696
10695
|
bytesWritten,
|
|
10697
10696
|
buffers
|
|
10698
10697
|
});
|
|
10699
|
-
})
|
|
10700
|
-
})
|
|
10698
|
+
});
|
|
10699
|
+
});
|
|
10701
10700
|
};
|
|
10702
10701
|
}
|
|
10703
10702
|
if (typeof fs.realpath.native === "function") {
|
|
@@ -10709,10 +10708,15 @@ var __webpack_modules__ = {
|
|
|
10709
10708
|
6307: (__unused_webpack_module, exports) => {
|
|
10710
10709
|
"use strict";
|
|
10711
10710
|
exports.name = new Map([ [ "0", "File" ], [ "", "OldFile" ], [ "1", "Link" ], [ "2", "SymbolicLink" ], [ "3", "CharacterDevice" ], [ "4", "BlockDevice" ], [ "5", "Directory" ], [ "6", "FIFO" ], [ "7", "ContiguousFile" ], [ "g", "GlobalExtendedHeader" ], [ "x", "ExtendedHeader" ], [ "A", "SolarisACL" ], [ "D", "GNUDumpDir" ], [ "I", "Inode" ], [ "K", "NextFileHasLongLinkpath" ], [ "L", "NextFileHasLongPath" ], [ "M", "ContinuationFile" ], [ "N", "OldGnuLongPath" ], [ "S", "SparseFile" ], [ "V", "TapeVolumeHeader" ], [ "X", "OldExtendedHeader" ] ]);
|
|
10712
|
-
exports.code = new Map(Array.from(exports.name).map(
|
|
10711
|
+
exports.code = new Map(Array.from(exports.name).map(kv => [ kv[1], kv[0] ]));
|
|
10713
10712
|
},
|
|
10714
10713
|
6318: function(__unused_webpack_module, exports, __webpack_require__) {
|
|
10715
10714
|
"use strict";
|
|
10715
|
+
var __classPrivateFieldGet = this && this.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
10716
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10717
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10718
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
10719
|
+
};
|
|
10716
10720
|
var __classPrivateFieldSet = this && this.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
10717
10721
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10718
10722
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -10720,11 +10724,6 @@ var __webpack_modules__ = {
|
|
|
10720
10724
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
|
|
10721
10725
|
value;
|
|
10722
10726
|
};
|
|
10723
|
-
var __classPrivateFieldGet = this && this.__classPrivateFieldGet || function(receiver, state, kind, f) {
|
|
10724
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10725
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10726
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
10727
|
-
};
|
|
10728
10727
|
var _DiskCache_instances, _a, _DiskCache_CACHE, _DiskCache_root, _DiskCache_entries, _Entry_instances, _Entry_lockFile_get, _Entry_markerFile_get, _Entry_touchMarkerFile;
|
|
10729
10728
|
Object.defineProperty(exports, "__esModule", {
|
|
10730
10729
|
value: true
|
|
@@ -10738,12 +10737,6 @@ var __webpack_modules__ = {
|
|
|
10738
10737
|
const ONE_DAY_IN_MS = 864e5;
|
|
10739
10738
|
const PRUNE_AFTER_MILLISECONDS = process.env.JSII_RUNTIME_PACKAGE_CACHE_TTL ? parseInt(process.env.JSII_RUNTIME_PACKAGE_CACHE_TTL, 10) * ONE_DAY_IN_MS : 30 * ONE_DAY_IN_MS;
|
|
10740
10739
|
class DiskCache {
|
|
10741
|
-
constructor(root) {
|
|
10742
|
-
_DiskCache_instances.add(this);
|
|
10743
|
-
_DiskCache_root.set(this, void 0);
|
|
10744
|
-
__classPrivateFieldSet(this, _DiskCache_root, root, "f");
|
|
10745
|
-
process.once("beforeExit", (() => this.pruneExpiredEntries()));
|
|
10746
|
-
}
|
|
10747
10740
|
static inDirectory(path) {
|
|
10748
10741
|
const didCreate = (0, fs_1.mkdirSync)(path, {
|
|
10749
10742
|
recursive: true
|
|
@@ -10755,20 +10748,26 @@ var __webpack_modules__ = {
|
|
|
10755
10748
|
}
|
|
10756
10749
|
path = (0, fs_1.realpathSync)(path);
|
|
10757
10750
|
if (!__classPrivateFieldGet(this, _a, "f", _DiskCache_CACHE).has(path)) {
|
|
10758
|
-
__classPrivateFieldGet(this, _a, "f", _DiskCache_CACHE).set(path, new
|
|
10751
|
+
__classPrivateFieldGet(this, _a, "f", _DiskCache_CACHE).set(path, new _a(path));
|
|
10759
10752
|
}
|
|
10760
10753
|
return __classPrivateFieldGet(this, _a, "f", _DiskCache_CACHE).get(path);
|
|
10761
10754
|
}
|
|
10755
|
+
constructor(root) {
|
|
10756
|
+
_DiskCache_instances.add(this);
|
|
10757
|
+
_DiskCache_root.set(this, void 0);
|
|
10758
|
+
__classPrivateFieldSet(this, _DiskCache_root, root, "f");
|
|
10759
|
+
process.once("beforeExit", () => this.pruneExpiredEntries());
|
|
10760
|
+
}
|
|
10762
10761
|
entry(...key) {
|
|
10763
10762
|
if (key.length === 0) {
|
|
10764
10763
|
throw new Error(`Cache entry key must contain at least 1 element!`);
|
|
10765
10764
|
}
|
|
10766
|
-
return new Entry((0, path_1.join)(__classPrivateFieldGet(this, _DiskCache_root, "f"), ...key.flatMap(
|
|
10765
|
+
return new Entry((0, path_1.join)(__classPrivateFieldGet(this, _DiskCache_root, "f"), ...key.flatMap(s => s.replace(/[^@a-z0-9_.\\/-]+/g, "_").split(/[\\/]+/).map(ss => {
|
|
10767
10766
|
if (ss === "..") {
|
|
10768
10767
|
throw new Error(`A cache entry key cannot contain a '..' path segment! (${s})`);
|
|
10769
10768
|
}
|
|
10770
10769
|
return ss;
|
|
10771
|
-
}))))
|
|
10770
|
+
}))));
|
|
10772
10771
|
}
|
|
10773
10772
|
entryFor(path, ...comments) {
|
|
10774
10773
|
const rawDigest = (0, digest_file_1.digestFile)(path, ...comments);
|
|
@@ -10778,12 +10777,12 @@ var __webpack_modules__ = {
|
|
|
10778
10777
|
const cutOff = new Date(Date.now() - PRUNE_AFTER_MILLISECONDS);
|
|
10779
10778
|
for (const entry of __classPrivateFieldGet(this, _DiskCache_instances, "m", _DiskCache_entries).call(this)) {
|
|
10780
10779
|
if (entry.atime < cutOff) {
|
|
10781
|
-
entry.lock(
|
|
10780
|
+
entry.lock(lockedEntry => {
|
|
10782
10781
|
if (entry.atime > cutOff) {
|
|
10783
10782
|
return;
|
|
10784
10783
|
}
|
|
10785
10784
|
lockedEntry.delete();
|
|
10786
|
-
})
|
|
10785
|
+
});
|
|
10787
10786
|
}
|
|
10788
10787
|
}
|
|
10789
10788
|
for (const dir of directoriesUnder(__classPrivateFieldGet(this, _DiskCache_root, "f"), true)) {
|
|
@@ -10820,8 +10819,8 @@ var __webpack_modules__ = {
|
|
|
10820
10819
|
};
|
|
10821
10820
|
class Entry {
|
|
10822
10821
|
constructor(path) {
|
|
10823
|
-
this.path = path;
|
|
10824
10822
|
_Entry_instances.add(this);
|
|
10823
|
+
this.path = path;
|
|
10825
10824
|
}
|
|
10826
10825
|
get atime() {
|
|
10827
10826
|
try {
|
|
@@ -10849,7 +10848,7 @@ var __webpack_modules__ = {
|
|
|
10849
10848
|
};
|
|
10850
10849
|
}
|
|
10851
10850
|
let cache = "miss";
|
|
10852
|
-
this.lock(
|
|
10851
|
+
this.lock(lock => {
|
|
10853
10852
|
if (this.isComplete) {
|
|
10854
10853
|
cache = "hit";
|
|
10855
10854
|
return;
|
|
@@ -10867,7 +10866,7 @@ var __webpack_modules__ = {
|
|
|
10867
10866
|
throw error;
|
|
10868
10867
|
}
|
|
10869
10868
|
lock.markComplete();
|
|
10870
|
-
})
|
|
10869
|
+
});
|
|
10871
10870
|
return {
|
|
10872
10871
|
path: this.path,
|
|
10873
10872
|
cache
|
|
@@ -11015,17 +11014,17 @@ var __webpack_modules__ = {
|
|
|
11015
11014
|
const util_2 = __webpack_require__(8117);
|
|
11016
11015
|
function checkReportMissingProp(cxt, prop) {
|
|
11017
11016
|
const {gen, data, it} = cxt;
|
|
11018
|
-
gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), (
|
|
11017
|
+
gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {
|
|
11019
11018
|
cxt.setParams({
|
|
11020
11019
|
missingProperty: (0, codegen_1._)`${prop}`
|
|
11021
11020
|
}, true);
|
|
11022
11021
|
cxt.error();
|
|
11023
|
-
})
|
|
11022
|
+
});
|
|
11024
11023
|
}
|
|
11025
11024
|
exports.checkReportMissingProp = checkReportMissingProp;
|
|
11026
11025
|
function checkMissingProp({gen, data, it: {opts}}, properties, missing) {
|
|
11027
|
-
return (0, codegen_1.or)(...properties.map(
|
|
11028
|
-
codegen_1._)`${missing} = ${prop}`)))
|
|
11026
|
+
return (0, codegen_1.or)(...properties.map(prop => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0,
|
|
11027
|
+
codegen_1._)`${missing} = ${prop}`)));
|
|
11029
11028
|
}
|
|
11030
11029
|
exports.checkMissingProp = checkMissingProp;
|
|
11031
11030
|
function reportMissingProp(cxt, missing) {
|
|
@@ -11057,11 +11056,11 @@ var __webpack_modules__ = {
|
|
|
11057
11056
|
}
|
|
11058
11057
|
exports.noPropertyInData = noPropertyInData;
|
|
11059
11058
|
function allSchemaProperties(schemaMap) {
|
|
11060
|
-
return schemaMap ? Object.keys(schemaMap).filter(
|
|
11059
|
+
return schemaMap ? Object.keys(schemaMap).filter(p => p !== "__proto__") : [];
|
|
11061
11060
|
}
|
|
11062
11061
|
exports.allSchemaProperties = allSchemaProperties;
|
|
11063
11062
|
function schemaProperties(it, schemaMap) {
|
|
11064
|
-
return allSchemaProperties(schemaMap).filter(
|
|
11063
|
+
return allSchemaProperties(schemaMap).filter(p => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));
|
|
11065
11064
|
}
|
|
11066
11065
|
exports.schemaProperties = schemaProperties;
|
|
11067
11066
|
function callValidateCode({schemaCode, data, it: {gen, topSchemaRef, schemaPath, errorPath}, it}, func, context, passSchema) {
|
|
@@ -11090,33 +11089,33 @@ var __webpack_modules__ = {
|
|
|
11090
11089
|
const valid = gen.name("valid");
|
|
11091
11090
|
if (it.allErrors) {
|
|
11092
11091
|
const validArr = gen.let("valid", true);
|
|
11093
|
-
validateItems((
|
|
11092
|
+
validateItems(() => gen.assign(validArr, false));
|
|
11094
11093
|
return validArr;
|
|
11095
11094
|
}
|
|
11096
11095
|
gen.var(valid, true);
|
|
11097
|
-
validateItems((
|
|
11096
|
+
validateItems(() => gen.break());
|
|
11098
11097
|
return valid;
|
|
11099
11098
|
function validateItems(notValid) {
|
|
11100
11099
|
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
11101
|
-
gen.forRange("i", 0, len,
|
|
11100
|
+
gen.forRange("i", 0, len, i => {
|
|
11102
11101
|
cxt.subschema({
|
|
11103
11102
|
keyword,
|
|
11104
11103
|
dataProp: i,
|
|
11105
11104
|
dataPropType: util_1.Type.Num
|
|
11106
11105
|
}, valid);
|
|
11107
11106
|
gen.if((0, codegen_1.not)(valid), notValid);
|
|
11108
|
-
})
|
|
11107
|
+
});
|
|
11109
11108
|
}
|
|
11110
11109
|
}
|
|
11111
11110
|
exports.validateArray = validateArray;
|
|
11112
11111
|
function validateUnion(cxt) {
|
|
11113
11112
|
const {gen, schema, keyword, it} = cxt;
|
|
11114
11113
|
if (!Array.isArray(schema)) throw new Error("ajv implementation error");
|
|
11115
|
-
const alwaysValid = schema.some(
|
|
11114
|
+
const alwaysValid = schema.some(sch => (0, util_1.alwaysValidSchema)(it, sch));
|
|
11116
11115
|
if (alwaysValid && !it.opts.unevaluated) return;
|
|
11117
11116
|
const valid = gen.let("valid", false);
|
|
11118
11117
|
const schValid = gen.name("_valid");
|
|
11119
|
-
gen.block((
|
|
11118
|
+
gen.block(() => schema.forEach((_sch, i) => {
|
|
11120
11119
|
const schCxt = cxt.subschema({
|
|
11121
11120
|
keyword,
|
|
11122
11121
|
schemaProp: i,
|
|
@@ -11125,8 +11124,8 @@ var __webpack_modules__ = {
|
|
|
11125
11124
|
gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`);
|
|
11126
11125
|
const merged = cxt.mergeValidEvaluated(schCxt, schValid);
|
|
11127
11126
|
if (!merged) gen.if((0, codegen_1.not)(valid));
|
|
11128
|
-
}))
|
|
11129
|
-
cxt.result(valid, (
|
|
11127
|
+
}));
|
|
11128
|
+
cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
|
|
11130
11129
|
}
|
|
11131
11130
|
exports.validateUnion = validateUnion;
|
|
11132
11131
|
},
|
|
@@ -11350,12 +11349,12 @@ var __webpack_modules__ = {
|
|
|
11350
11349
|
}
|
|
11351
11350
|
exports.schemaHasRulesForType = schemaHasRulesForType;
|
|
11352
11351
|
function shouldUseGroup(schema, group) {
|
|
11353
|
-
return group.rules.some(
|
|
11352
|
+
return group.rules.some(rule => shouldUseRule(schema, rule));
|
|
11354
11353
|
}
|
|
11355
11354
|
exports.shouldUseGroup = shouldUseGroup;
|
|
11356
11355
|
function shouldUseRule(schema, rule) {
|
|
11357
11356
|
var _a;
|
|
11358
|
-
return schema[rule.keyword] !== undefined || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some(
|
|
11357
|
+
return schema[rule.keyword] !== undefined || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some(kwd => schema[kwd] !== undefined));
|
|
11359
11358
|
}
|
|
11360
11359
|
exports.shouldUseRule = shouldUseRule;
|
|
11361
11360
|
},
|
|
@@ -11463,10 +11462,10 @@ var __webpack_modules__ = {
|
|
|
11463
11462
|
}
|
|
11464
11463
|
this.zip = new zlib.BrotliCompress(opt.brotli);
|
|
11465
11464
|
}
|
|
11466
|
-
this.zip.on("data",
|
|
11467
|
-
this.zip.on("end",
|
|
11468
|
-
this.zip.on("drain",
|
|
11469
|
-
this.on("resume",
|
|
11465
|
+
this.zip.on("data", chunk => super.write(chunk));
|
|
11466
|
+
this.zip.on("end", _ => super.end());
|
|
11467
|
+
this.zip.on("drain", _ => this[ONDRAIN]());
|
|
11468
|
+
this.on("resume", _ => this.zip.resume());
|
|
11470
11469
|
} else {
|
|
11471
11470
|
this.on("drain", this[ONDRAIN]);
|
|
11472
11471
|
}
|
|
@@ -11514,7 +11513,7 @@ var __webpack_modules__ = {
|
|
|
11514
11513
|
} else {
|
|
11515
11514
|
const job = new PackJob(p.path, absolute, false);
|
|
11516
11515
|
job.entry = new WriteEntryTar(p, this[ENTRYOPT](job));
|
|
11517
|
-
job.entry.on("end",
|
|
11516
|
+
job.entry.on("end", _ => this[JOBDONE](job));
|
|
11518
11517
|
this[JOBS] += 1;
|
|
11519
11518
|
this[QUEUE].push(job);
|
|
11520
11519
|
}
|
|
@@ -11529,7 +11528,7 @@ var __webpack_modules__ = {
|
|
|
11529
11528
|
job.pending = true;
|
|
11530
11529
|
this[JOBS] += 1;
|
|
11531
11530
|
const stat = this.follow ? "stat" : "lstat";
|
|
11532
|
-
fs[stat](job.absolute, (
|
|
11531
|
+
fs[stat](job.absolute, (er, stat) => {
|
|
11533
11532
|
job.pending = false;
|
|
11534
11533
|
this[JOBS] -= 1;
|
|
11535
11534
|
if (er) {
|
|
@@ -11537,7 +11536,7 @@ var __webpack_modules__ = {
|
|
|
11537
11536
|
} else {
|
|
11538
11537
|
this[ONSTAT](job, stat);
|
|
11539
11538
|
}
|
|
11540
|
-
})
|
|
11539
|
+
});
|
|
11541
11540
|
}
|
|
11542
11541
|
[ONSTAT](job, stat) {
|
|
11543
11542
|
this.statCache.set(job.absolute, stat);
|
|
@@ -11550,14 +11549,14 @@ var __webpack_modules__ = {
|
|
|
11550
11549
|
[READDIR](job) {
|
|
11551
11550
|
job.pending = true;
|
|
11552
11551
|
this[JOBS] += 1;
|
|
11553
|
-
fs.readdir(job.absolute, (
|
|
11552
|
+
fs.readdir(job.absolute, (er, entries) => {
|
|
11554
11553
|
job.pending = false;
|
|
11555
11554
|
this[JOBS] -= 1;
|
|
11556
11555
|
if (er) {
|
|
11557
11556
|
return this.emit("error", er);
|
|
11558
11557
|
}
|
|
11559
11558
|
this[ONREADDIR](job, entries);
|
|
11560
|
-
})
|
|
11559
|
+
});
|
|
11561
11560
|
}
|
|
11562
11561
|
[ONREADDIR](job, entries) {
|
|
11563
11562
|
this.readdirCache.set(job.absolute, entries);
|
|
@@ -11657,7 +11656,7 @@ var __webpack_modules__ = {
|
|
|
11657
11656
|
[ENTRY](job) {
|
|
11658
11657
|
this[JOBS] += 1;
|
|
11659
11658
|
try {
|
|
11660
|
-
return new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job)).on("end", (
|
|
11659
|
+
return new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job)).on("end", () => this[JOBDONE](job)).on("error", er => this.emit("error", er));
|
|
11661
11660
|
} catch (er) {
|
|
11662
11661
|
this.emit("error", er);
|
|
11663
11662
|
}
|
|
@@ -11670,26 +11669,26 @@ var __webpack_modules__ = {
|
|
|
11670
11669
|
[PIPE](job) {
|
|
11671
11670
|
job.piped = true;
|
|
11672
11671
|
if (job.readdir) {
|
|
11673
|
-
job.readdir.forEach(
|
|
11672
|
+
job.readdir.forEach(entry => {
|
|
11674
11673
|
const p = job.path;
|
|
11675
11674
|
const base = p === "./" ? "" : p.replace(/\/*$/, "/");
|
|
11676
11675
|
this[ADDFSENTRY](base + entry);
|
|
11677
|
-
})
|
|
11676
|
+
});
|
|
11678
11677
|
}
|
|
11679
11678
|
const source = job.entry;
|
|
11680
11679
|
const zip = this.zip;
|
|
11681
11680
|
if (zip) {
|
|
11682
|
-
source.on("data",
|
|
11681
|
+
source.on("data", chunk => {
|
|
11683
11682
|
if (!zip.write(chunk)) {
|
|
11684
11683
|
source.pause();
|
|
11685
11684
|
}
|
|
11686
|
-
})
|
|
11685
|
+
});
|
|
11687
11686
|
} else {
|
|
11688
|
-
source.on("data",
|
|
11687
|
+
source.on("data", chunk => {
|
|
11689
11688
|
if (!super.write(chunk)) {
|
|
11690
11689
|
source.pause();
|
|
11691
11690
|
}
|
|
11692
|
-
})
|
|
11691
|
+
});
|
|
11693
11692
|
}
|
|
11694
11693
|
}
|
|
11695
11694
|
pause() {
|
|
@@ -11717,20 +11716,20 @@ var __webpack_modules__ = {
|
|
|
11717
11716
|
const source = job.entry;
|
|
11718
11717
|
const zip = this.zip;
|
|
11719
11718
|
if (job.readdir) {
|
|
11720
|
-
job.readdir.forEach(
|
|
11719
|
+
job.readdir.forEach(entry => {
|
|
11721
11720
|
const p = job.path;
|
|
11722
11721
|
const base = p === "./" ? "" : p.replace(/\/*$/, "/");
|
|
11723
11722
|
this[ADDFSENTRY](base + entry);
|
|
11724
|
-
})
|
|
11723
|
+
});
|
|
11725
11724
|
}
|
|
11726
11725
|
if (zip) {
|
|
11727
|
-
source.on("data",
|
|
11726
|
+
source.on("data", chunk => {
|
|
11728
11727
|
zip.write(chunk);
|
|
11729
|
-
})
|
|
11728
|
+
});
|
|
11730
11729
|
} else {
|
|
11731
|
-
source.on("data",
|
|
11730
|
+
source.on("data", chunk => {
|
|
11732
11731
|
super[WRITE](chunk);
|
|
11733
|
-
})
|
|
11732
|
+
});
|
|
11734
11733
|
}
|
|
11735
11734
|
}
|
|
11736
11735
|
}
|
|
@@ -11763,18 +11762,18 @@ var __webpack_modules__ = {
|
|
|
11763
11762
|
return;
|
|
11764
11763
|
}
|
|
11765
11764
|
}
|
|
11766
|
-
validateFunction(it, (
|
|
11765
|
+
validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
|
|
11767
11766
|
}
|
|
11768
11767
|
exports.validateFunctionCode = validateFunctionCode;
|
|
11769
11768
|
function validateFunction({gen, validateName, schema, schemaEnv, opts}, body) {
|
|
11770
11769
|
if (opts.code.es5) {
|
|
11771
|
-
gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, (
|
|
11770
|
+
gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {
|
|
11772
11771
|
gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema, opts)}`);
|
|
11773
11772
|
destructureValCxtES5(gen, opts);
|
|
11774
11773
|
gen.code(body);
|
|
11775
|
-
})
|
|
11774
|
+
});
|
|
11776
11775
|
} else {
|
|
11777
|
-
gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, (
|
|
11776
|
+
gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));
|
|
11778
11777
|
}
|
|
11779
11778
|
}
|
|
11780
11779
|
function destructureValCxt(opts) {
|
|
@@ -11782,23 +11781,23 @@ var __webpack_modules__ = {
|
|
|
11782
11781
|
codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;
|
|
11783
11782
|
}
|
|
11784
11783
|
function destructureValCxtES5(gen, opts) {
|
|
11785
|
-
gen.if(names_1.default.valCxt, (
|
|
11784
|
+
gen.if(names_1.default.valCxt, () => {
|
|
11786
11785
|
gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`);
|
|
11787
11786
|
gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`);
|
|
11788
11787
|
gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);
|
|
11789
11788
|
gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`);
|
|
11790
11789
|
if (opts.dynamicRef) gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);
|
|
11791
|
-
}
|
|
11790
|
+
}, () => {
|
|
11792
11791
|
gen.var(names_1.default.instancePath, (0, codegen_1._)`""`);
|
|
11793
11792
|
gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`);
|
|
11794
11793
|
gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`);
|
|
11795
11794
|
gen.var(names_1.default.rootData, names_1.default.data);
|
|
11796
11795
|
if (opts.dynamicRef) gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`);
|
|
11797
|
-
})
|
|
11796
|
+
});
|
|
11798
11797
|
}
|
|
11799
11798
|
function topSchemaObjCode(it) {
|
|
11800
11799
|
const {schema, opts, gen} = it;
|
|
11801
|
-
validateFunction(it, (
|
|
11800
|
+
validateFunction(it, () => {
|
|
11802
11801
|
if (opts.$comment && schema.$comment) commentKeyword(it);
|
|
11803
11802
|
checkNoDefault(it);
|
|
11804
11803
|
gen.let(names_1.default.vErrors, null);
|
|
@@ -11806,16 +11805,16 @@ var __webpack_modules__ = {
|
|
|
11806
11805
|
if (opts.unevaluated) resetEvaluated(it);
|
|
11807
11806
|
typeAndKeywords(it);
|
|
11808
11807
|
returnResults(it);
|
|
11809
|
-
})
|
|
11808
|
+
});
|
|
11810
11809
|
return;
|
|
11811
11810
|
}
|
|
11812
11811
|
function resetEvaluated(it) {
|
|
11813
11812
|
const {gen, validateName} = it;
|
|
11814
11813
|
it.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`);
|
|
11815
|
-
gen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, (
|
|
11816
|
-
codegen_1._)`undefined`))
|
|
11817
|
-
gen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, (
|
|
11818
|
-
codegen_1._)`undefined`))
|
|
11814
|
+
gen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0,
|
|
11815
|
+
codegen_1._)`undefined`));
|
|
11816
|
+
gen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0,
|
|
11817
|
+
codegen_1._)`undefined`));
|
|
11819
11818
|
}
|
|
11820
11819
|
function funcSourceUrl(schema, opts) {
|
|
11821
11820
|
const schId = typeof schema == "object" && schema[opts.schemaId];
|
|
@@ -11892,8 +11891,8 @@ var __webpack_modules__ = {
|
|
|
11892
11891
|
function returnResults(it) {
|
|
11893
11892
|
const {gen, schemaEnv, validateName, ValidationError, opts} = it;
|
|
11894
11893
|
if (schemaEnv.$async) {
|
|
11895
|
-
gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, (
|
|
11896
|
-
codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`))
|
|
11894
|
+
gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0,
|
|
11895
|
+
codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`));
|
|
11897
11896
|
} else {
|
|
11898
11897
|
gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors);
|
|
11899
11898
|
if (opts.unevaluated) assignEvaluated(it);
|
|
@@ -11908,14 +11907,14 @@ var __webpack_modules__ = {
|
|
|
11908
11907
|
const {gen, schema, data, allErrors, opts, self} = it;
|
|
11909
11908
|
const {RULES} = self;
|
|
11910
11909
|
if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {
|
|
11911
|
-
gen.block((
|
|
11910
|
+
gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition));
|
|
11912
11911
|
return;
|
|
11913
11912
|
}
|
|
11914
11913
|
if (!opts.jtd) checkStrictTypes(it, types);
|
|
11915
|
-
gen.block((
|
|
11914
|
+
gen.block(() => {
|
|
11916
11915
|
for (const group of RULES.rules) groupKeywords(group);
|
|
11917
11916
|
groupKeywords(RULES.post);
|
|
11918
|
-
})
|
|
11917
|
+
});
|
|
11919
11918
|
function groupKeywords(group) {
|
|
11920
11919
|
if (!(0, applicability_1.shouldUseGroup)(schema, group)) return;
|
|
11921
11920
|
if (group.type) {
|
|
@@ -11935,13 +11934,13 @@ var __webpack_modules__ = {
|
|
|
11935
11934
|
function iterateKeywords(it, group) {
|
|
11936
11935
|
const {gen, schema, opts: {useDefaults}} = it;
|
|
11937
11936
|
if (useDefaults) (0, defaults_1.assignDefaults)(it, group.type);
|
|
11938
|
-
gen.block((
|
|
11937
|
+
gen.block(() => {
|
|
11939
11938
|
for (const rule of group.rules) {
|
|
11940
11939
|
if ((0, applicability_1.shouldUseRule)(schema, rule)) {
|
|
11941
11940
|
keywordCode(it, rule.keyword, rule.definition, group.type);
|
|
11942
11941
|
}
|
|
11943
11942
|
}
|
|
11944
|
-
})
|
|
11943
|
+
});
|
|
11945
11944
|
}
|
|
11946
11945
|
function checkStrictTypes(it, types) {
|
|
11947
11946
|
if (it.schemaEnv.meta || !it.opts.strictTypes) return;
|
|
@@ -11955,11 +11954,11 @@ var __webpack_modules__ = {
|
|
|
11955
11954
|
it.dataTypes = types;
|
|
11956
11955
|
return;
|
|
11957
11956
|
}
|
|
11958
|
-
types.forEach(
|
|
11957
|
+
types.forEach(t => {
|
|
11959
11958
|
if (!includesType(it.dataTypes, t)) {
|
|
11960
11959
|
strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
|
|
11961
11960
|
}
|
|
11962
|
-
})
|
|
11961
|
+
});
|
|
11963
11962
|
narrowSchemaTypes(it, types);
|
|
11964
11963
|
}
|
|
11965
11964
|
function checkMultipleTypes(it, ts) {
|
|
@@ -11973,7 +11972,7 @@ var __webpack_modules__ = {
|
|
|
11973
11972
|
const rule = rules[keyword];
|
|
11974
11973
|
if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {
|
|
11975
11974
|
const {type} = rule.definition;
|
|
11976
|
-
if (type.length && !type.some(
|
|
11975
|
+
if (type.length && !type.some(t => hasApplicableType(ts, t))) {
|
|
11977
11976
|
strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`);
|
|
11978
11977
|
}
|
|
11979
11978
|
}
|
|
@@ -12082,10 +12081,10 @@ var __webpack_modules__ = {
|
|
|
12082
12081
|
if (assign) Object.assign(this.params, obj); else this.params = obj;
|
|
12083
12082
|
}
|
|
12084
12083
|
block$data(valid, codeBlock, $dataValid = codegen_1.nil) {
|
|
12085
|
-
this.gen.block((
|
|
12084
|
+
this.gen.block(() => {
|
|
12086
12085
|
this.check$data(valid, $dataValid);
|
|
12087
12086
|
codeBlock();
|
|
12088
|
-
})
|
|
12087
|
+
});
|
|
12089
12088
|
}
|
|
12090
12089
|
check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {
|
|
12091
12090
|
if (!this.$data) return;
|
|
@@ -12146,7 +12145,7 @@ var __webpack_modules__ = {
|
|
|
12146
12145
|
mergeValidEvaluated(schemaCxt, valid) {
|
|
12147
12146
|
const {it, gen} = this;
|
|
12148
12147
|
if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {
|
|
12149
|
-
gen.if(valid, (
|
|
12148
|
+
gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));
|
|
12150
12149
|
return true;
|
|
12151
12150
|
}
|
|
12152
12151
|
}
|
|
@@ -12263,29 +12262,29 @@ var __webpack_modules__ = {
|
|
|
12263
12262
|
exports.reportExtraError = reportExtraError;
|
|
12264
12263
|
function resetErrorsCount(gen, errsCount) {
|
|
12265
12264
|
gen.assign(names_1.default.errors, errsCount);
|
|
12266
|
-
gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, (
|
|
12267
|
-
codegen_1._)`${names_1.default.vErrors}.length`, errsCount)
|
|
12265
|
+
gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0,
|
|
12266
|
+
codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
|
|
12268
12267
|
}
|
|
12269
12268
|
exports.resetErrorsCount = resetErrorsCount;
|
|
12270
12269
|
function extendErrors({gen, keyword, schemaValue, data, errsCount, it}) {
|
|
12271
12270
|
if (errsCount === undefined) throw new Error("ajv implementation error");
|
|
12272
12271
|
const err = gen.name("err");
|
|
12273
|
-
gen.forRange("i", errsCount, names_1.default.errors,
|
|
12272
|
+
gen.forRange("i", errsCount, names_1.default.errors, i => {
|
|
12274
12273
|
gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`);
|
|
12275
|
-
gen.if((0, codegen_1._)`${err}.instancePath === undefined`, (
|
|
12276
|
-
codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)))
|
|
12274
|
+
gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0,
|
|
12275
|
+
codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));
|
|
12277
12276
|
gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword}`);
|
|
12278
12277
|
if (it.opts.verbose) {
|
|
12279
12278
|
gen.assign((0, codegen_1._)`${err}.schema`, schemaValue);
|
|
12280
12279
|
gen.assign((0, codegen_1._)`${err}.data`, data);
|
|
12281
12280
|
}
|
|
12282
|
-
})
|
|
12281
|
+
});
|
|
12283
12282
|
}
|
|
12284
12283
|
exports.extendErrors = extendErrors;
|
|
12285
12284
|
function addError(gen, errObj) {
|
|
12286
12285
|
const err = gen.const("err", errObj);
|
|
12287
|
-
gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, (
|
|
12288
|
-
codegen_1._)`[${err}]`)
|
|
12286
|
+
gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0,
|
|
12287
|
+
codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);
|
|
12289
12288
|
gen.code((0, codegen_1._)`${names_1.default.errors}++`);
|
|
12290
12289
|
}
|
|
12291
12290
|
function returnErrors(it, errs) {
|
|
@@ -12383,16 +12382,16 @@ var __webpack_modules__ = {
|
|
|
12383
12382
|
mode: opt.mode || 438
|
|
12384
12383
|
});
|
|
12385
12384
|
p.pipe(stream);
|
|
12386
|
-
const promise = new Promise((
|
|
12385
|
+
const promise = new Promise((res, rej) => {
|
|
12387
12386
|
stream.on("error", rej);
|
|
12388
12387
|
stream.on("close", res);
|
|
12389
12388
|
p.on("error", rej);
|
|
12390
|
-
})
|
|
12389
|
+
});
|
|
12391
12390
|
addFilesAsync(p, files);
|
|
12392
12391
|
return cb ? promise.then(cb, cb) : promise;
|
|
12393
12392
|
};
|
|
12394
12393
|
const addFilesSync = (p, files) => {
|
|
12395
|
-
files.forEach(
|
|
12394
|
+
files.forEach(file => {
|
|
12396
12395
|
if (file.charAt(0) === "@") {
|
|
12397
12396
|
t({
|
|
12398
12397
|
file: path.resolve(p.cwd, file.slice(1)),
|
|
@@ -12403,7 +12402,7 @@ var __webpack_modules__ = {
|
|
|
12403
12402
|
} else {
|
|
12404
12403
|
p.add(file);
|
|
12405
12404
|
}
|
|
12406
|
-
})
|
|
12405
|
+
});
|
|
12407
12406
|
p.end();
|
|
12408
12407
|
};
|
|
12409
12408
|
const addFilesAsync = (p, files) => {
|
|
@@ -12414,7 +12413,7 @@ var __webpack_modules__ = {
|
|
|
12414
12413
|
file: path.resolve(p.cwd, file.slice(1)),
|
|
12415
12414
|
noResume: true,
|
|
12416
12415
|
onentry: entry => p.add(entry)
|
|
12417
|
-
}).then(
|
|
12416
|
+
}).then(_ => addFilesAsync(p, files));
|
|
12418
12417
|
} else {
|
|
12419
12418
|
p.add(file);
|
|
12420
12419
|
}
|
|
@@ -12438,7 +12437,9 @@ var __webpack_modules__ = {
|
|
|
12438
12437
|
Object.defineProperty(exports, "__esModule", {
|
|
12439
12438
|
value: true
|
|
12440
12439
|
});
|
|
12441
|
-
exports.
|
|
12440
|
+
exports.extract = extract;
|
|
12441
|
+
exports.getPackageCacheEnabled = getPackageCacheEnabled;
|
|
12442
|
+
exports.setPackageCacheEnabled = setPackageCacheEnabled;
|
|
12442
12443
|
const fs_1 = __webpack_require__(9896);
|
|
12443
12444
|
const tar = __webpack_require__(5194);
|
|
12444
12445
|
const disk_cache_1 = __webpack_require__(4018);
|
|
@@ -12456,20 +12457,19 @@ var __webpack_modules__ = {
|
|
|
12456
12457
|
throw err;
|
|
12457
12458
|
}
|
|
12458
12459
|
}
|
|
12459
|
-
exports.extract = extract;
|
|
12460
12460
|
function extractViaCache(file, outDir, options = {}, ...comments) {
|
|
12461
12461
|
var _a;
|
|
12462
12462
|
const cacheRoot = (_a = process.env.JSII_RUNTIME_PACKAGE_CACHE_ROOT) !== null && _a !== void 0 ? _a : (0,
|
|
12463
12463
|
default_cache_root_1.defaultCacheRoot)();
|
|
12464
12464
|
const dirCache = disk_cache_1.DiskCache.inDirectory(cacheRoot);
|
|
12465
12465
|
const entry = dirCache.entryFor(file, ...comments);
|
|
12466
|
-
const {path, cache} = entry.retrieve(
|
|
12466
|
+
const {path, cache} = entry.retrieve(path => {
|
|
12467
12467
|
untarInto({
|
|
12468
12468
|
...options,
|
|
12469
12469
|
cwd: path,
|
|
12470
12470
|
file
|
|
12471
12471
|
});
|
|
12472
|
-
})
|
|
12472
|
+
});
|
|
12473
12473
|
(0, link_1.link)(path, outDir);
|
|
12474
12474
|
return {
|
|
12475
12475
|
cache
|
|
@@ -12503,11 +12503,9 @@ var __webpack_modules__ = {
|
|
|
12503
12503
|
function getPackageCacheEnabled() {
|
|
12504
12504
|
return packageCacheEnabled;
|
|
12505
12505
|
}
|
|
12506
|
-
exports.getPackageCacheEnabled = getPackageCacheEnabled;
|
|
12507
12506
|
function setPackageCacheEnabled(value) {
|
|
12508
12507
|
packageCacheEnabled = value;
|
|
12509
12508
|
}
|
|
12510
|
-
exports.setPackageCacheEnabled = setPackageCacheEnabled;
|
|
12511
12509
|
},
|
|
12512
12510
|
7432: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
12513
12511
|
"use strict";
|
|
@@ -12617,12 +12615,12 @@ var __webpack_modules__ = {
|
|
|
12617
12615
|
return super.emit(ev, ...data);
|
|
12618
12616
|
}
|
|
12619
12617
|
[LSTAT]() {
|
|
12620
|
-
fs.lstat(this.absolute, (
|
|
12618
|
+
fs.lstat(this.absolute, (er, stat) => {
|
|
12621
12619
|
if (er) {
|
|
12622
12620
|
return this.emit("error", er);
|
|
12623
12621
|
}
|
|
12624
12622
|
this[ONLSTAT](stat);
|
|
12625
|
-
})
|
|
12623
|
+
});
|
|
12626
12624
|
}
|
|
12627
12625
|
[ONLSTAT](stat) {
|
|
12628
12626
|
this.statCache.set(this.absolute, stat);
|
|
@@ -12699,12 +12697,12 @@ var __webpack_modules__ = {
|
|
|
12699
12697
|
this.end();
|
|
12700
12698
|
}
|
|
12701
12699
|
[SYMLINK]() {
|
|
12702
|
-
fs.readlink(this.absolute, (
|
|
12700
|
+
fs.readlink(this.absolute, (er, linkpath) => {
|
|
12703
12701
|
if (er) {
|
|
12704
12702
|
return this.emit("error", er);
|
|
12705
12703
|
}
|
|
12706
12704
|
this[ONREADLINK](linkpath);
|
|
12707
|
-
})
|
|
12705
|
+
});
|
|
12708
12706
|
}
|
|
12709
12707
|
[ONREADLINK](linkpath) {
|
|
12710
12708
|
this.linkpath = normPath(linkpath);
|
|
@@ -12736,12 +12734,12 @@ var __webpack_modules__ = {
|
|
|
12736
12734
|
this[OPENFILE]();
|
|
12737
12735
|
}
|
|
12738
12736
|
[OPENFILE]() {
|
|
12739
|
-
fs.open(this.absolute, "r", (
|
|
12737
|
+
fs.open(this.absolute, "r", (er, fd) => {
|
|
12740
12738
|
if (er) {
|
|
12741
12739
|
return this.emit("error", er);
|
|
12742
12740
|
}
|
|
12743
12741
|
this[ONOPENFILE](fd);
|
|
12744
|
-
})
|
|
12742
|
+
});
|
|
12745
12743
|
}
|
|
12746
12744
|
[ONOPENFILE](fd) {
|
|
12747
12745
|
this.fd = fd;
|
|
@@ -12760,12 +12758,12 @@ var __webpack_modules__ = {
|
|
|
12760
12758
|
}
|
|
12761
12759
|
[READ]() {
|
|
12762
12760
|
const {fd, buf, offset, length, pos} = this;
|
|
12763
|
-
fs.read(fd, buf, offset, length, pos, (
|
|
12761
|
+
fs.read(fd, buf, offset, length, pos, (er, bytesRead) => {
|
|
12764
12762
|
if (er) {
|
|
12765
|
-
return this[CLOSE]((
|
|
12763
|
+
return this[CLOSE](() => this.emit("error", er));
|
|
12766
12764
|
}
|
|
12767
12765
|
this[ONREAD](bytesRead);
|
|
12768
|
-
})
|
|
12766
|
+
});
|
|
12769
12767
|
}
|
|
12770
12768
|
[CLOSE](cb) {
|
|
12771
12769
|
fs.close(this.fd, cb);
|
|
@@ -12776,14 +12774,14 @@ var __webpack_modules__ = {
|
|
|
12776
12774
|
er.path = this.absolute;
|
|
12777
12775
|
er.syscall = "read";
|
|
12778
12776
|
er.code = "EOF";
|
|
12779
|
-
return this[CLOSE]((
|
|
12777
|
+
return this[CLOSE](() => this.emit("error", er));
|
|
12780
12778
|
}
|
|
12781
12779
|
if (bytesRead > this.remain) {
|
|
12782
12780
|
const er = new Error("did not encounter expected EOF");
|
|
12783
12781
|
er.path = this.absolute;
|
|
12784
12782
|
er.syscall = "read";
|
|
12785
12783
|
er.code = "EOF";
|
|
12786
|
-
return this[CLOSE]((
|
|
12784
|
+
return this[CLOSE](() => this.emit("error", er));
|
|
12787
12785
|
}
|
|
12788
12786
|
if (bytesRead === this.remain) {
|
|
12789
12787
|
for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) {
|
|
@@ -12795,7 +12793,7 @@ var __webpack_modules__ = {
|
|
|
12795
12793
|
const writeBuf = this.offset === 0 && bytesRead === this.buf.length ? this.buf : this.buf.slice(this.offset, this.offset + bytesRead);
|
|
12796
12794
|
const flushed = this.write(writeBuf);
|
|
12797
12795
|
if (!flushed) {
|
|
12798
|
-
this[AWAITDRAIN]((
|
|
12796
|
+
this[AWAITDRAIN](() => this[ONDRAIN]());
|
|
12799
12797
|
} else {
|
|
12800
12798
|
this[ONDRAIN]();
|
|
12801
12799
|
}
|
|
@@ -12820,7 +12818,7 @@ var __webpack_modules__ = {
|
|
|
12820
12818
|
if (this.blockRemain) {
|
|
12821
12819
|
super.write(Buffer.alloc(this.blockRemain));
|
|
12822
12820
|
}
|
|
12823
|
-
return this[CLOSE](
|
|
12821
|
+
return this[CLOSE](er => er ? this.emit("error", er) : this.end());
|
|
12824
12822
|
}
|
|
12825
12823
|
if (this.offset >= this.length) {
|
|
12826
12824
|
this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length));
|
|
@@ -12850,7 +12848,7 @@ var __webpack_modules__ = {
|
|
|
12850
12848
|
} finally {
|
|
12851
12849
|
if (threw) {
|
|
12852
12850
|
try {
|
|
12853
|
-
this[CLOSE]((
|
|
12851
|
+
this[CLOSE](() => {});
|
|
12854
12852
|
} catch (er) {}
|
|
12855
12853
|
}
|
|
12856
12854
|
}
|
|
@@ -12986,7 +12984,7 @@ var __webpack_modules__ = {
|
|
|
12986
12984
|
const {gen, schema, data, it} = cxt;
|
|
12987
12985
|
if ((0, util_1.alwaysValidSchema)(it, schema)) return;
|
|
12988
12986
|
const valid = gen.name("valid");
|
|
12989
|
-
gen.forIn("key", data,
|
|
12987
|
+
gen.forIn("key", data, key => {
|
|
12990
12988
|
cxt.setParams({
|
|
12991
12989
|
propertyName: key
|
|
12992
12990
|
});
|
|
@@ -12997,11 +12995,11 @@ var __webpack_modules__ = {
|
|
|
12997
12995
|
propertyName: key,
|
|
12998
12996
|
compositeRule: true
|
|
12999
12997
|
}, valid);
|
|
13000
|
-
gen.if((0, codegen_1.not)(valid), (
|
|
12998
|
+
gen.if((0, codegen_1.not)(valid), () => {
|
|
13001
12999
|
cxt.error(true);
|
|
13002
13000
|
if (!it.allErrors) gen.break();
|
|
13003
|
-
})
|
|
13004
|
-
})
|
|
13001
|
+
});
|
|
13002
|
+
});
|
|
13005
13003
|
cxt.ok(valid);
|
|
13006
13004
|
}
|
|
13007
13005
|
};
|
|
@@ -13223,7 +13221,7 @@ var __webpack_modules__ = {
|
|
|
13223
13221
|
}
|
|
13224
13222
|
}
|
|
13225
13223
|
Pax.parse = (string, ex, g) => new Pax(merge(parseKV(string), ex), g);
|
|
13226
|
-
const merge = (a, b) => b ? Object.keys(a).reduce((
|
|
13224
|
+
const merge = (a, b) => b ? Object.keys(a).reduce((s, k) => (s[k] = a[k], s), b) : a;
|
|
13227
13225
|
const parseKV = string => string.replace(/\n$/, "").split("\n").reduce(parseKVLine, Object.create(null));
|
|
13228
13226
|
const parseKVLine = (set, line) => {
|
|
13229
13227
|
const n = parseInt(line, 10);
|
|
@@ -13291,19 +13289,19 @@ var __webpack_modules__ = {
|
|
|
13291
13289
|
super(opt);
|
|
13292
13290
|
this.file = opt.file || "";
|
|
13293
13291
|
this[SAW_VALID_ENTRY] = null;
|
|
13294
|
-
this.on(DONE,
|
|
13292
|
+
this.on(DONE, _ => {
|
|
13295
13293
|
if (this[STATE] === "begin" || this[SAW_VALID_ENTRY] === false) {
|
|
13296
13294
|
this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
13297
13295
|
}
|
|
13298
|
-
})
|
|
13296
|
+
});
|
|
13299
13297
|
if (opt.ondone) {
|
|
13300
13298
|
this.on(DONE, opt.ondone);
|
|
13301
13299
|
} else {
|
|
13302
|
-
this.on(DONE,
|
|
13300
|
+
this.on(DONE, _ => {
|
|
13303
13301
|
this.emit("prefinish");
|
|
13304
13302
|
this.emit("finish");
|
|
13305
13303
|
this.emit("end");
|
|
13306
|
-
})
|
|
13304
|
+
});
|
|
13307
13305
|
}
|
|
13308
13306
|
this.strict = !!opt.strict;
|
|
13309
13307
|
this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize;
|
|
@@ -13325,7 +13323,7 @@ var __webpack_modules__ = {
|
|
|
13325
13323
|
this[ABORTED] = false;
|
|
13326
13324
|
this[SAW_NULL_BLOCK] = false;
|
|
13327
13325
|
this[SAW_EOF] = false;
|
|
13328
|
-
this.on("end", (
|
|
13326
|
+
this.on("end", () => this[CLOSESTREAM]());
|
|
13329
13327
|
if (typeof opt.onwarn === "function") {
|
|
13330
13328
|
this.on("warn", opt.onwarn);
|
|
13331
13329
|
}
|
|
@@ -13396,7 +13394,7 @@ var __webpack_modules__ = {
|
|
|
13396
13394
|
entry.resume();
|
|
13397
13395
|
} else if (entry.size > 0) {
|
|
13398
13396
|
this[META] = "";
|
|
13399
|
-
entry.on("data",
|
|
13397
|
+
entry.on("data", c => this[META] += c);
|
|
13400
13398
|
this[STATE] = "meta";
|
|
13401
13399
|
}
|
|
13402
13400
|
} else {
|
|
@@ -13426,7 +13424,7 @@ var __webpack_modules__ = {
|
|
|
13426
13424
|
}
|
|
13427
13425
|
}
|
|
13428
13426
|
[CLOSESTREAM]() {
|
|
13429
|
-
nextTick((
|
|
13427
|
+
nextTick(() => this.emit("close"));
|
|
13430
13428
|
}
|
|
13431
13429
|
[PROCESSENTRY](entry) {
|
|
13432
13430
|
let go = true;
|
|
@@ -13439,7 +13437,7 @@ var __webpack_modules__ = {
|
|
|
13439
13437
|
this[READENTRY] = entry;
|
|
13440
13438
|
this.emit("entry", entry);
|
|
13441
13439
|
if (!entry.emittedEnd) {
|
|
13442
|
-
entry.on("end",
|
|
13440
|
+
entry.on("end", _ => this[NEXTENTRY]());
|
|
13443
13441
|
go = false;
|
|
13444
13442
|
}
|
|
13445
13443
|
}
|
|
@@ -13455,7 +13453,7 @@ var __webpack_modules__ = {
|
|
|
13455
13453
|
this.emit("drain");
|
|
13456
13454
|
}
|
|
13457
13455
|
} else {
|
|
13458
|
-
re.once("drain",
|
|
13456
|
+
re.once("drain", _ => this.emit("drain"));
|
|
13459
13457
|
}
|
|
13460
13458
|
}
|
|
13461
13459
|
}
|
|
@@ -13561,12 +13559,12 @@ var __webpack_modules__ = {
|
|
|
13561
13559
|
const ended = this[ENDED];
|
|
13562
13560
|
this[ENDED] = false;
|
|
13563
13561
|
this[UNZIP] = this[UNZIP] === null ? new zlib.Unzip : new zlib.BrotliDecompress;
|
|
13564
|
-
this[UNZIP].on("data",
|
|
13565
|
-
this[UNZIP].on("error",
|
|
13566
|
-
this[UNZIP].on("end",
|
|
13562
|
+
this[UNZIP].on("data", chunk => this[CONSUMECHUNK](chunk));
|
|
13563
|
+
this[UNZIP].on("error", er => this.abort(er));
|
|
13564
|
+
this[UNZIP].on("end", _ => {
|
|
13567
13565
|
this[ENDED] = true;
|
|
13568
13566
|
this[CONSUMECHUNK]();
|
|
13569
|
-
})
|
|
13567
|
+
});
|
|
13570
13568
|
this[WRITING] = true;
|
|
13571
13569
|
const ret = this[UNZIP][ended ? "end" : "write"](chunk);
|
|
13572
13570
|
this[WRITING] = false;
|
|
@@ -13582,7 +13580,7 @@ var __webpack_modules__ = {
|
|
|
13582
13580
|
this[WRITING] = false;
|
|
13583
13581
|
const ret = this[QUEUE].length ? false : this[READENTRY] ? this[READENTRY].flowing : true;
|
|
13584
13582
|
if (!ret && !this[QUEUE].length) {
|
|
13585
|
-
this[READENTRY].once("drain",
|
|
13583
|
+
this[READENTRY].once("drain", _ => this.emit("drain"));
|
|
13586
13584
|
}
|
|
13587
13585
|
return ret;
|
|
13588
13586
|
}
|
|
@@ -13743,12 +13741,12 @@ var __webpack_modules__ = {
|
|
|
13743
13741
|
return fs.unlink(path, cb);
|
|
13744
13742
|
}
|
|
13745
13743
|
const name = path + ".DELETE." + crypto.randomBytes(16).toString("hex");
|
|
13746
|
-
fs.rename(path, name,
|
|
13744
|
+
fs.rename(path, name, er => {
|
|
13747
13745
|
if (er) {
|
|
13748
13746
|
return cb(er);
|
|
13749
13747
|
}
|
|
13750
13748
|
fs.unlink(name, cb);
|
|
13751
|
-
})
|
|
13749
|
+
});
|
|
13752
13750
|
};
|
|
13753
13751
|
const unlinkFileSync = path => {
|
|
13754
13752
|
if (!isWindows) {
|
|
@@ -13828,7 +13826,7 @@ var __webpack_modules__ = {
|
|
|
13828
13826
|
this.umask = typeof opt.umask === "number" ? opt.umask : this.processUmask;
|
|
13829
13827
|
this.dmode = opt.dmode || 511 & ~this.umask;
|
|
13830
13828
|
this.fmode = opt.fmode || 438 & ~this.umask;
|
|
13831
|
-
this.on("entry",
|
|
13829
|
+
this.on("entry", entry => this[ONENTRY](entry));
|
|
13832
13830
|
}
|
|
13833
13831
|
warn(code, msg, data = {}) {
|
|
13834
13832
|
if (code === "TAR_BAD_ARCHIVE" || code === "TAR_ABORT") {
|
|
@@ -13980,65 +13978,65 @@ var __webpack_modules__ = {
|
|
|
13980
13978
|
mode,
|
|
13981
13979
|
autoClose: false
|
|
13982
13980
|
});
|
|
13983
|
-
stream.on("error",
|
|
13981
|
+
stream.on("error", er => {
|
|
13984
13982
|
if (stream.fd) {
|
|
13985
|
-
fs.close(stream.fd, (
|
|
13983
|
+
fs.close(stream.fd, () => {});
|
|
13986
13984
|
}
|
|
13987
13985
|
stream.write = () => true;
|
|
13988
13986
|
this[ONERROR](er, entry);
|
|
13989
13987
|
fullyDone();
|
|
13990
|
-
})
|
|
13988
|
+
});
|
|
13991
13989
|
let actions = 1;
|
|
13992
13990
|
const done = er => {
|
|
13993
13991
|
if (er) {
|
|
13994
13992
|
if (stream.fd) {
|
|
13995
|
-
fs.close(stream.fd, (
|
|
13993
|
+
fs.close(stream.fd, () => {});
|
|
13996
13994
|
}
|
|
13997
13995
|
this[ONERROR](er, entry);
|
|
13998
13996
|
fullyDone();
|
|
13999
13997
|
return;
|
|
14000
13998
|
}
|
|
14001
13999
|
if (--actions === 0) {
|
|
14002
|
-
fs.close(stream.fd,
|
|
14000
|
+
fs.close(stream.fd, er => {
|
|
14003
14001
|
if (er) {
|
|
14004
14002
|
this[ONERROR](er, entry);
|
|
14005
14003
|
} else {
|
|
14006
14004
|
this[UNPEND]();
|
|
14007
14005
|
}
|
|
14008
14006
|
fullyDone();
|
|
14009
|
-
})
|
|
14007
|
+
});
|
|
14010
14008
|
}
|
|
14011
14009
|
};
|
|
14012
|
-
stream.on("finish",
|
|
14010
|
+
stream.on("finish", _ => {
|
|
14013
14011
|
const abs = entry.absolute;
|
|
14014
14012
|
const fd = stream.fd;
|
|
14015
14013
|
if (entry.mtime && !this.noMtime) {
|
|
14016
14014
|
actions++;
|
|
14017
14015
|
const atime = entry.atime || new Date;
|
|
14018
14016
|
const mtime = entry.mtime;
|
|
14019
|
-
fs.futimes(fd, atime, mtime,
|
|
14017
|
+
fs.futimes(fd, atime, mtime, er => er ? fs.utimes(abs, atime, mtime, er2 => done(er2 && er)) : done());
|
|
14020
14018
|
}
|
|
14021
14019
|
if (this[DOCHOWN](entry)) {
|
|
14022
14020
|
actions++;
|
|
14023
14021
|
const uid = this[UID](entry);
|
|
14024
14022
|
const gid = this[GID](entry);
|
|
14025
|
-
fs.fchown(fd, uid, gid,
|
|
14023
|
+
fs.fchown(fd, uid, gid, er => er ? fs.chown(abs, uid, gid, er2 => done(er2 && er)) : done());
|
|
14026
14024
|
}
|
|
14027
14025
|
done();
|
|
14028
|
-
})
|
|
14026
|
+
});
|
|
14029
14027
|
const tx = this.transform ? this.transform(entry) || entry : entry;
|
|
14030
14028
|
if (tx !== entry) {
|
|
14031
|
-
tx.on("error",
|
|
14029
|
+
tx.on("error", er => {
|
|
14032
14030
|
this[ONERROR](er, entry);
|
|
14033
14031
|
fullyDone();
|
|
14034
|
-
})
|
|
14032
|
+
});
|
|
14035
14033
|
entry.pipe(tx);
|
|
14036
14034
|
}
|
|
14037
14035
|
tx.pipe(stream);
|
|
14038
14036
|
}
|
|
14039
14037
|
[DIRECTORY](entry, fullyDone) {
|
|
14040
14038
|
const mode = entry.mode & 4095 || this.dmode;
|
|
14041
|
-
this[MKDIR](entry.absolute, mode,
|
|
14039
|
+
this[MKDIR](entry.absolute, mode, er => {
|
|
14042
14040
|
if (er) {
|
|
14043
14041
|
this[ONERROR](er, entry);
|
|
14044
14042
|
fullyDone();
|
|
@@ -14061,7 +14059,7 @@ var __webpack_modules__ = {
|
|
|
14061
14059
|
fs.chown(entry.absolute, this[UID](entry), this[GID](entry), done);
|
|
14062
14060
|
}
|
|
14063
14061
|
done();
|
|
14064
|
-
})
|
|
14062
|
+
});
|
|
14065
14063
|
}
|
|
14066
14064
|
[UNSUPPORTED](entry) {
|
|
14067
14065
|
entry.unsupported = true;
|
|
@@ -14097,7 +14095,7 @@ var __webpack_modules__ = {
|
|
|
14097
14095
|
if (entry.linkpath) {
|
|
14098
14096
|
paths.push(entry.linkpath);
|
|
14099
14097
|
}
|
|
14100
|
-
this.reservations.reserve(paths,
|
|
14098
|
+
this.reservations.reserve(paths, done => this[CHECKFS2](entry, done));
|
|
14101
14099
|
}
|
|
14102
14100
|
[PRUNECACHE](entry) {
|
|
14103
14101
|
if (entry.type === "SymbolicLink") {
|
|
@@ -14113,7 +14111,7 @@ var __webpack_modules__ = {
|
|
|
14113
14111
|
fullyDone(er);
|
|
14114
14112
|
};
|
|
14115
14113
|
const checkCwd = () => {
|
|
14116
|
-
this[MKDIR](this.cwd, this.dmode,
|
|
14114
|
+
this[MKDIR](this.cwd, this.dmode, er => {
|
|
14117
14115
|
if (er) {
|
|
14118
14116
|
this[ONERROR](er, entry);
|
|
14119
14117
|
done();
|
|
@@ -14121,26 +14119,26 @@ var __webpack_modules__ = {
|
|
|
14121
14119
|
}
|
|
14122
14120
|
this[CHECKED_CWD] = true;
|
|
14123
14121
|
start();
|
|
14124
|
-
})
|
|
14122
|
+
});
|
|
14125
14123
|
};
|
|
14126
14124
|
const start = () => {
|
|
14127
14125
|
if (entry.absolute !== this.cwd) {
|
|
14128
14126
|
const parent = normPath(path.dirname(entry.absolute));
|
|
14129
14127
|
if (parent !== this.cwd) {
|
|
14130
|
-
return this[MKDIR](parent, this.dmode,
|
|
14128
|
+
return this[MKDIR](parent, this.dmode, er => {
|
|
14131
14129
|
if (er) {
|
|
14132
14130
|
this[ONERROR](er, entry);
|
|
14133
14131
|
done();
|
|
14134
14132
|
return;
|
|
14135
14133
|
}
|
|
14136
14134
|
afterMakeParent();
|
|
14137
|
-
})
|
|
14135
|
+
});
|
|
14138
14136
|
}
|
|
14139
14137
|
}
|
|
14140
14138
|
afterMakeParent();
|
|
14141
14139
|
};
|
|
14142
14140
|
const afterMakeParent = () => {
|
|
14143
|
-
fs.lstat(entry.absolute, (
|
|
14141
|
+
fs.lstat(entry.absolute, (lstatEr, st) => {
|
|
14144
14142
|
if (st && (this.keep || this.newer && st.mtime > entry.mtime)) {
|
|
14145
14143
|
this[SKIP](entry);
|
|
14146
14144
|
done();
|
|
@@ -14159,14 +14157,14 @@ var __webpack_modules__ = {
|
|
|
14159
14157
|
return fs.chmod(entry.absolute, entry.mode, afterChmod);
|
|
14160
14158
|
}
|
|
14161
14159
|
if (entry.absolute !== this.cwd) {
|
|
14162
|
-
return fs.rmdir(entry.absolute,
|
|
14160
|
+
return fs.rmdir(entry.absolute, er => this[MAKEFS](er, entry, done));
|
|
14163
14161
|
}
|
|
14164
14162
|
}
|
|
14165
14163
|
if (entry.absolute === this.cwd) {
|
|
14166
14164
|
return this[MAKEFS](null, entry, done);
|
|
14167
14165
|
}
|
|
14168
|
-
unlinkFile(entry.absolute,
|
|
14169
|
-
})
|
|
14166
|
+
unlinkFile(entry.absolute, er => this[MAKEFS](er, entry, done));
|
|
14167
|
+
});
|
|
14170
14168
|
};
|
|
14171
14169
|
if (this[CHECKED_CWD]) {
|
|
14172
14170
|
start();
|
|
@@ -14198,7 +14196,7 @@ var __webpack_modules__ = {
|
|
|
14198
14196
|
}
|
|
14199
14197
|
}
|
|
14200
14198
|
[LINK](entry, linkpath, link, done) {
|
|
14201
|
-
fs[link](linkpath, entry.absolute,
|
|
14199
|
+
fs[link](linkpath, entry.absolute, er => {
|
|
14202
14200
|
if (er) {
|
|
14203
14201
|
this[ONERROR](er, entry);
|
|
14204
14202
|
} else {
|
|
@@ -14206,7 +14204,7 @@ var __webpack_modules__ = {
|
|
|
14206
14204
|
entry.resume();
|
|
14207
14205
|
}
|
|
14208
14206
|
done();
|
|
14209
|
-
})
|
|
14207
|
+
});
|
|
14210
14208
|
}
|
|
14211
14209
|
}
|
|
14212
14210
|
const callSync = fn => {
|
|
@@ -14218,7 +14216,7 @@ var __webpack_modules__ = {
|
|
|
14218
14216
|
};
|
|
14219
14217
|
class UnpackSync extends Unpack {
|
|
14220
14218
|
[MAKEFS](er, entry) {
|
|
14221
|
-
return super[MAKEFS](er, entry, (
|
|
14219
|
+
return super[MAKEFS](er, entry, () => {});
|
|
14222
14220
|
}
|
|
14223
14221
|
[CHECKFS](entry) {
|
|
14224
14222
|
this[PRUNECACHE](entry);
|
|
@@ -14238,7 +14236,7 @@ var __webpack_modules__ = {
|
|
|
14238
14236
|
}
|
|
14239
14237
|
}
|
|
14240
14238
|
}
|
|
14241
|
-
const [lstatEr, st] = callSync((
|
|
14239
|
+
const [lstatEr, st] = callSync(() => fs.lstatSync(entry.absolute));
|
|
14242
14240
|
if (st && (this.keep || this.newer && st.mtime > entry.mtime)) {
|
|
14243
14241
|
return this[SKIP](entry);
|
|
14244
14242
|
}
|
|
@@ -14248,15 +14246,15 @@ var __webpack_modules__ = {
|
|
|
14248
14246
|
if (st.isDirectory()) {
|
|
14249
14247
|
if (entry.type === "Directory") {
|
|
14250
14248
|
const needChmod = !this.noChmod && entry.mode && (st.mode & 4095) !== entry.mode;
|
|
14251
|
-
const [er] = needChmod ? callSync((
|
|
14249
|
+
const [er] = needChmod ? callSync(() => {
|
|
14252
14250
|
fs.chmodSync(entry.absolute, entry.mode);
|
|
14253
|
-
})
|
|
14251
|
+
}) : [];
|
|
14254
14252
|
return this[MAKEFS](er, entry);
|
|
14255
14253
|
}
|
|
14256
|
-
const [er] = callSync((
|
|
14254
|
+
const [er] = callSync(() => fs.rmdirSync(entry.absolute));
|
|
14257
14255
|
this[MAKEFS](er, entry);
|
|
14258
14256
|
}
|
|
14259
|
-
const [er] = entry.absolute === this.cwd ? [] : callSync((
|
|
14257
|
+
const [er] = entry.absolute === this.cwd ? [] : callSync(() => unlinkFileSync(entry.absolute));
|
|
14260
14258
|
this[MAKEFS](er, entry);
|
|
14261
14259
|
}
|
|
14262
14260
|
[FILE](entry, done) {
|
|
@@ -14281,17 +14279,17 @@ var __webpack_modules__ = {
|
|
|
14281
14279
|
}
|
|
14282
14280
|
const tx = this.transform ? this.transform(entry) || entry : entry;
|
|
14283
14281
|
if (tx !== entry) {
|
|
14284
|
-
tx.on("error",
|
|
14282
|
+
tx.on("error", er => this[ONERROR](er, entry));
|
|
14285
14283
|
entry.pipe(tx);
|
|
14286
14284
|
}
|
|
14287
|
-
tx.on("data",
|
|
14285
|
+
tx.on("data", chunk => {
|
|
14288
14286
|
try {
|
|
14289
14287
|
fs.writeSync(fd, chunk, 0, chunk.length);
|
|
14290
14288
|
} catch (er) {
|
|
14291
14289
|
oner(er);
|
|
14292
14290
|
}
|
|
14293
|
-
})
|
|
14294
|
-
tx.on("end",
|
|
14291
|
+
});
|
|
14292
|
+
tx.on("end", _ => {
|
|
14295
14293
|
let er = null;
|
|
14296
14294
|
if (entry.mtime && !this.noMtime) {
|
|
14297
14295
|
const atime = entry.atime || new Date;
|
|
@@ -14320,7 +14318,7 @@ var __webpack_modules__ = {
|
|
|
14320
14318
|
}
|
|
14321
14319
|
}
|
|
14322
14320
|
oner(er);
|
|
14323
|
-
})
|
|
14321
|
+
});
|
|
14324
14322
|
}
|
|
14325
14323
|
[DIRECTORY](entry, done) {
|
|
14326
14324
|
const mode = entry.mode & 4095 || this.dmode;
|
|
@@ -14397,7 +14395,7 @@ var __webpack_modules__ = {
|
|
|
14397
14395
|
createErrors: false,
|
|
14398
14396
|
allErrors: false
|
|
14399
14397
|
}, valid);
|
|
14400
|
-
cxt.failResult(valid, (
|
|
14398
|
+
cxt.failResult(valid, () => cxt.reset(), () => cxt.error());
|
|
14401
14399
|
},
|
|
14402
14400
|
error: {
|
|
14403
14401
|
message: "must NOT be valid"
|
|
@@ -14444,18 +14442,18 @@ var __webpack_modules__ = {
|
|
|
14444
14442
|
cxt.pass((0, codegen_1._)`${len} <= ${items.length}`);
|
|
14445
14443
|
} else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
14446
14444
|
const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`);
|
|
14447
|
-
gen.if((0, codegen_1.not)(valid), (
|
|
14445
|
+
gen.if((0, codegen_1.not)(valid), () => validateItems(valid));
|
|
14448
14446
|
cxt.ok(valid);
|
|
14449
14447
|
}
|
|
14450
14448
|
function validateItems(valid) {
|
|
14451
|
-
gen.forRange("i", items.length, len,
|
|
14449
|
+
gen.forRange("i", items.length, len, i => {
|
|
14452
14450
|
cxt.subschema({
|
|
14453
14451
|
keyword,
|
|
14454
14452
|
dataProp: i,
|
|
14455
14453
|
dataPropType: util_1.Type.Num
|
|
14456
14454
|
}, valid);
|
|
14457
|
-
if (!it.allErrors) gen.if((0, codegen_1.not)(valid), (
|
|
14458
|
-
})
|
|
14455
|
+
if (!it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
14456
|
+
});
|
|
14459
14457
|
}
|
|
14460
14458
|
}
|
|
14461
14459
|
exports.validateAdditionalItems = validateAdditionalItems;
|
|
@@ -14672,16 +14670,16 @@ var __webpack_modules__ = {
|
|
|
14672
14670
|
return vs.get(keyOrRef);
|
|
14673
14671
|
}
|
|
14674
14672
|
scopeRefs(scopeName, values = this._values) {
|
|
14675
|
-
return this._reduceValues(values,
|
|
14673
|
+
return this._reduceValues(values, name => {
|
|
14676
14674
|
if (name.scopePath === undefined) throw new Error(`CodeGen: name "${name}" has no value`);
|
|
14677
14675
|
return (0, code_1._)`${scopeName}${name.scopePath}`;
|
|
14678
|
-
})
|
|
14676
|
+
});
|
|
14679
14677
|
}
|
|
14680
14678
|
scopeCode(values = this._values, usedValues, getCode) {
|
|
14681
|
-
return this._reduceValues(values,
|
|
14679
|
+
return this._reduceValues(values, name => {
|
|
14682
14680
|
if (name.value === undefined) throw new Error(`CodeGen: name "${name}" has no value`);
|
|
14683
14681
|
return name.value.code;
|
|
14684
|
-
}
|
|
14682
|
+
}, usedValues, getCode);
|
|
14685
14683
|
}
|
|
14686
14684
|
_reduceValues(values, valueCode, usedValues = {}, getCode) {
|
|
14687
14685
|
let code = code_1.nil;
|
|
@@ -14689,7 +14687,7 @@ var __webpack_modules__ = {
|
|
|
14689
14687
|
const vs = values[prefix];
|
|
14690
14688
|
if (!vs) continue;
|
|
14691
14689
|
const nameSet = usedValues[prefix] = usedValues[prefix] || new Map;
|
|
14692
|
-
vs.forEach(
|
|
14690
|
+
vs.forEach(name => {
|
|
14693
14691
|
if (nameSet.has(name)) return;
|
|
14694
14692
|
nameSet.set(name, UsedValueState.Started);
|
|
14695
14693
|
let c = valueCode(name);
|
|
@@ -14702,7 +14700,7 @@ var __webpack_modules__ = {
|
|
|
14702
14700
|
throw new ValueError(name);
|
|
14703
14701
|
}
|
|
14704
14702
|
nameSet.set(name, UsedValueState.Completed);
|
|
14705
|
-
})
|
|
14703
|
+
});
|
|
14706
14704
|
}
|
|
14707
14705
|
return code;
|
|
14708
14706
|
}
|
|
@@ -14794,18 +14792,18 @@ var __webpack_modules__ = {
|
|
|
14794
14792
|
}
|
|
14795
14793
|
exports.mergeEvaluated = {
|
|
14796
14794
|
props: makeMergeEvaluated({
|
|
14797
|
-
mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, (
|
|
14798
|
-
gen.if((0, codegen_1._)`${from} === true`, (
|
|
14799
|
-
codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`))
|
|
14800
|
-
})
|
|
14801
|
-
mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, (
|
|
14795
|
+
mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => {
|
|
14796
|
+
gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0,
|
|
14797
|
+
codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`));
|
|
14798
|
+
}),
|
|
14799
|
+
mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {
|
|
14802
14800
|
if (from === true) {
|
|
14803
14801
|
gen.assign(to, true);
|
|
14804
14802
|
} else {
|
|
14805
14803
|
gen.assign(to, (0, codegen_1._)`${to} || {}`);
|
|
14806
14804
|
setEvaluated(gen, to, from);
|
|
14807
14805
|
}
|
|
14808
|
-
})
|
|
14806
|
+
}),
|
|
14809
14807
|
mergeValues: (from, to) => from === true ? true : {
|
|
14810
14808
|
...from,
|
|
14811
14809
|
...to
|
|
@@ -14813,10 +14811,10 @@ var __webpack_modules__ = {
|
|
|
14813
14811
|
resultToName: evaluatedPropsToName
|
|
14814
14812
|
}),
|
|
14815
14813
|
items: makeMergeEvaluated({
|
|
14816
|
-
mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, (
|
|
14817
|
-
codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`))
|
|
14818
|
-
mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, (
|
|
14819
|
-
codegen_1._)`${to} > ${from} ? ${to} : ${from}`))
|
|
14814
|
+
mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0,
|
|
14815
|
+
codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),
|
|
14816
|
+
mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0,
|
|
14817
|
+
codegen_1._)`${to} > ${from} ? ${to} : ${from}`)),
|
|
14820
14818
|
mergeValues: (from, to) => from === true ? true : Math.max(from, to),
|
|
14821
14819
|
resultToName: (gen, items) => gen.var("items", items)
|
|
14822
14820
|
})
|
|
@@ -14829,7 +14827,7 @@ var __webpack_modules__ = {
|
|
|
14829
14827
|
}
|
|
14830
14828
|
exports.evaluatedPropsToName = evaluatedPropsToName;
|
|
14831
14829
|
function setEvaluated(gen, props, ps) {
|
|
14832
|
-
Object.keys(ps).forEach(
|
|
14830
|
+
Object.keys(ps).forEach(p => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));
|
|
14833
14831
|
}
|
|
14834
14832
|
exports.setEvaluated = setEvaluated;
|
|
14835
14833
|
const snippets = {};
|
|
@@ -14868,7 +14866,7 @@ var __webpack_modules__ = {
|
|
|
14868
14866
|
Object.defineProperty(exports, "__esModule", {
|
|
14869
14867
|
value: true
|
|
14870
14868
|
});
|
|
14871
|
-
exports.link =
|
|
14869
|
+
exports.link = link;
|
|
14872
14870
|
const fs_1 = __webpack_require__(9896);
|
|
14873
14871
|
const os = __webpack_require__(857);
|
|
14874
14872
|
const path_1 = __webpack_require__(6928);
|
|
@@ -14907,7 +14905,6 @@ var __webpack_modules__ = {
|
|
|
14907
14905
|
}
|
|
14908
14906
|
}
|
|
14909
14907
|
}
|
|
14910
|
-
exports.link = link;
|
|
14911
14908
|
},
|
|
14912
14909
|
8197: (__unused_webpack_module, exports, __webpack_require__) => {
|
|
14913
14910
|
"use strict";
|
|
@@ -14962,8 +14959,8 @@ var __webpack_modules__ = {
|
|
|
14962
14959
|
this.close();
|
|
14963
14960
|
this.emit("error", err);
|
|
14964
14961
|
};
|
|
14965
|
-
this[_handle].on("error",
|
|
14966
|
-
this.once("end", (
|
|
14962
|
+
this[_handle].on("error", er => this[_onError](new ZlibError(er)));
|
|
14963
|
+
this.once("end", () => this.close);
|
|
14967
14964
|
}
|
|
14968
14965
|
close() {
|
|
14969
14966
|
if (this[_handle]) {
|
|
@@ -15021,7 +15018,7 @@ var __webpack_modules__ = {
|
|
|
15021
15018
|
this[_handle].removeAllListeners("error");
|
|
15022
15019
|
}
|
|
15023
15020
|
}
|
|
15024
|
-
if (this[_handle]) this[_handle].on("error",
|
|
15021
|
+
if (this[_handle]) this[_handle].on("error", er => this[_onError](new ZlibError(er)));
|
|
15025
15022
|
let writeReturn;
|
|
15026
15023
|
if (result) {
|
|
15027
15024
|
if (Array.isArray(result) && result.length > 0) {
|
|
@@ -15156,7 +15153,7 @@ var __webpack_modules__ = {
|
|
|
15156
15153
|
},
|
|
15157
15154
|
8330: module => {
|
|
15158
15155
|
"use strict";
|
|
15159
|
-
module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.
|
|
15156
|
+
module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.113.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.17.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 && yarn lint","watch":"tsc --build -w","lint":"ESLINT_USE_FLAT_CONFIG=false 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.113.0","@jsii/check-node":"1.113.0","@jsii/spec":"^1.113.0"},"devDependencies":{"@scope/jsii-calc-base":"^1.113.0","@scope/jsii-calc-lib":"^1.113.0","jsii-build-tools":"^1.113.0","jsii-calc":"^3.20.120","source-map-loader":"^5.0.0","webpack":"^5.100.2","webpack-cli":"^6.0.1"}}');
|
|
15160
15157
|
},
|
|
15161
15158
|
8463: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
15162
15159
|
"use strict";
|
|
@@ -15206,32 +15203,32 @@ var __webpack_modules__ = {
|
|
|
15206
15203
|
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
15207
15204
|
process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n" + "\tsee https://github.com/jprichardson/node-fs-extra/issues/269", "Warning", "fs-extra-WARN0001");
|
|
15208
15205
|
}
|
|
15209
|
-
stat.checkPaths(src, dest, "copy", opts, (
|
|
15206
|
+
stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
|
|
15210
15207
|
if (err) return cb(err);
|
|
15211
15208
|
const {srcStat, destStat} = stats;
|
|
15212
|
-
stat.checkParentPaths(src, srcStat, dest, "copy",
|
|
15209
|
+
stat.checkParentPaths(src, srcStat, dest, "copy", err => {
|
|
15213
15210
|
if (err) return cb(err);
|
|
15214
15211
|
if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb);
|
|
15215
15212
|
return checkParentDir(destStat, src, dest, opts, cb);
|
|
15216
|
-
})
|
|
15217
|
-
})
|
|
15213
|
+
});
|
|
15214
|
+
});
|
|
15218
15215
|
}
|
|
15219
15216
|
function checkParentDir(destStat, src, dest, opts, cb) {
|
|
15220
15217
|
const destParent = path.dirname(dest);
|
|
15221
|
-
pathExists(destParent, (
|
|
15218
|
+
pathExists(destParent, (err, dirExists) => {
|
|
15222
15219
|
if (err) return cb(err);
|
|
15223
15220
|
if (dirExists) return getStats(destStat, src, dest, opts, cb);
|
|
15224
|
-
mkdirs(destParent,
|
|
15221
|
+
mkdirs(destParent, err => {
|
|
15225
15222
|
if (err) return cb(err);
|
|
15226
15223
|
return getStats(destStat, src, dest, opts, cb);
|
|
15227
|
-
})
|
|
15228
|
-
})
|
|
15224
|
+
});
|
|
15225
|
+
});
|
|
15229
15226
|
}
|
|
15230
15227
|
function handleFilter(onInclude, destStat, src, dest, opts, cb) {
|
|
15231
|
-
Promise.resolve(opts.filter(src, dest)).then(
|
|
15228
|
+
Promise.resolve(opts.filter(src, dest)).then(include => {
|
|
15232
15229
|
if (include) return onInclude(destStat, src, dest, opts, cb);
|
|
15233
15230
|
return cb();
|
|
15234
|
-
}
|
|
15231
|
+
}, error => cb(error));
|
|
15235
15232
|
}
|
|
15236
15233
|
function startCopy(destStat, src, dest, opts, cb) {
|
|
15237
15234
|
if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb);
|
|
@@ -15239,11 +15236,11 @@ var __webpack_modules__ = {
|
|
|
15239
15236
|
}
|
|
15240
15237
|
function getStats(destStat, src, dest, opts, cb) {
|
|
15241
15238
|
const stat = opts.dereference ? fs.stat : fs.lstat;
|
|
15242
|
-
stat(src, (
|
|
15239
|
+
stat(src, (err, srcStat) => {
|
|
15243
15240
|
if (err) return cb(err);
|
|
15244
15241
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb); else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb); else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb); else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`)); else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`));
|
|
15245
15242
|
return cb(new Error(`Unknown file: ${src}`));
|
|
15246
|
-
})
|
|
15243
|
+
});
|
|
15247
15244
|
}
|
|
15248
15245
|
function onFile(srcStat, destStat, src, dest, opts, cb) {
|
|
15249
15246
|
if (!destStat) return copyFile(srcStat, src, dest, opts, cb);
|
|
@@ -15251,27 +15248,27 @@ var __webpack_modules__ = {
|
|
|
15251
15248
|
}
|
|
15252
15249
|
function mayCopyFile(srcStat, src, dest, opts, cb) {
|
|
15253
15250
|
if (opts.overwrite) {
|
|
15254
|
-
fs.unlink(dest,
|
|
15251
|
+
fs.unlink(dest, err => {
|
|
15255
15252
|
if (err) return cb(err);
|
|
15256
15253
|
return copyFile(srcStat, src, dest, opts, cb);
|
|
15257
|
-
})
|
|
15254
|
+
});
|
|
15258
15255
|
} else if (opts.errorOnExist) {
|
|
15259
15256
|
return cb(new Error(`'${dest}' already exists`));
|
|
15260
15257
|
} else return cb();
|
|
15261
15258
|
}
|
|
15262
15259
|
function copyFile(srcStat, src, dest, opts, cb) {
|
|
15263
|
-
fs.copyFile(src, dest,
|
|
15260
|
+
fs.copyFile(src, dest, err => {
|
|
15264
15261
|
if (err) return cb(err);
|
|
15265
15262
|
if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
|
|
15266
15263
|
return setDestMode(dest, srcStat.mode, cb);
|
|
15267
|
-
})
|
|
15264
|
+
});
|
|
15268
15265
|
}
|
|
15269
15266
|
function handleTimestampsAndMode(srcMode, src, dest, cb) {
|
|
15270
15267
|
if (fileIsNotWritable(srcMode)) {
|
|
15271
|
-
return makeFileWritable(dest, srcMode,
|
|
15268
|
+
return makeFileWritable(dest, srcMode, err => {
|
|
15272
15269
|
if (err) return cb(err);
|
|
15273
15270
|
return setDestTimestampsAndMode(srcMode, src, dest, cb);
|
|
15274
|
-
})
|
|
15271
|
+
});
|
|
15275
15272
|
}
|
|
15276
15273
|
return setDestTimestampsAndMode(srcMode, src, dest, cb);
|
|
15277
15274
|
}
|
|
@@ -15282,38 +15279,38 @@ var __webpack_modules__ = {
|
|
|
15282
15279
|
return setDestMode(dest, srcMode | 128, cb);
|
|
15283
15280
|
}
|
|
15284
15281
|
function setDestTimestampsAndMode(srcMode, src, dest, cb) {
|
|
15285
|
-
setDestTimestamps(src, dest,
|
|
15282
|
+
setDestTimestamps(src, dest, err => {
|
|
15286
15283
|
if (err) return cb(err);
|
|
15287
15284
|
return setDestMode(dest, srcMode, cb);
|
|
15288
|
-
})
|
|
15285
|
+
});
|
|
15289
15286
|
}
|
|
15290
15287
|
function setDestMode(dest, srcMode, cb) {
|
|
15291
15288
|
return fs.chmod(dest, srcMode, cb);
|
|
15292
15289
|
}
|
|
15293
15290
|
function setDestTimestamps(src, dest, cb) {
|
|
15294
|
-
fs.stat(src, (
|
|
15291
|
+
fs.stat(src, (err, updatedSrcStat) => {
|
|
15295
15292
|
if (err) return cb(err);
|
|
15296
15293
|
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
|
|
15297
|
-
})
|
|
15294
|
+
});
|
|
15298
15295
|
}
|
|
15299
15296
|
function onDir(srcStat, destStat, src, dest, opts, cb) {
|
|
15300
15297
|
if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
|
|
15301
15298
|
return copyDir(src, dest, opts, cb);
|
|
15302
15299
|
}
|
|
15303
15300
|
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
|
15304
|
-
fs.mkdir(dest,
|
|
15301
|
+
fs.mkdir(dest, err => {
|
|
15305
15302
|
if (err) return cb(err);
|
|
15306
|
-
copyDir(src, dest, opts,
|
|
15303
|
+
copyDir(src, dest, opts, err => {
|
|
15307
15304
|
if (err) return cb(err);
|
|
15308
15305
|
return setDestMode(dest, srcMode, cb);
|
|
15309
|
-
})
|
|
15310
|
-
})
|
|
15306
|
+
});
|
|
15307
|
+
});
|
|
15311
15308
|
}
|
|
15312
15309
|
function copyDir(src, dest, opts, cb) {
|
|
15313
|
-
fs.readdir(src, (
|
|
15310
|
+
fs.readdir(src, (err, items) => {
|
|
15314
15311
|
if (err) return cb(err);
|
|
15315
15312
|
return copyDirItems(items, src, dest, opts, cb);
|
|
15316
|
-
})
|
|
15313
|
+
});
|
|
15317
15314
|
}
|
|
15318
15315
|
function copyDirItems(items, src, dest, opts, cb) {
|
|
15319
15316
|
const item = items.pop();
|
|
@@ -15323,17 +15320,17 @@ var __webpack_modules__ = {
|
|
|
15323
15320
|
function copyDirItem(items, item, src, dest, opts, cb) {
|
|
15324
15321
|
const srcItem = path.join(src, item);
|
|
15325
15322
|
const destItem = path.join(dest, item);
|
|
15326
|
-
stat.checkPaths(srcItem, destItem, "copy", opts, (
|
|
15323
|
+
stat.checkPaths(srcItem, destItem, "copy", opts, (err, stats) => {
|
|
15327
15324
|
if (err) return cb(err);
|
|
15328
15325
|
const {destStat} = stats;
|
|
15329
|
-
startCopy(destStat, srcItem, destItem, opts,
|
|
15326
|
+
startCopy(destStat, srcItem, destItem, opts, err => {
|
|
15330
15327
|
if (err) return cb(err);
|
|
15331
15328
|
return copyDirItems(items, src, dest, opts, cb);
|
|
15332
|
-
})
|
|
15333
|
-
})
|
|
15329
|
+
});
|
|
15330
|
+
});
|
|
15334
15331
|
}
|
|
15335
15332
|
function onLink(destStat, src, dest, opts, cb) {
|
|
15336
|
-
fs.readlink(src, (
|
|
15333
|
+
fs.readlink(src, (err, resolvedSrc) => {
|
|
15337
15334
|
if (err) return cb(err);
|
|
15338
15335
|
if (opts.dereference) {
|
|
15339
15336
|
resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
|
|
@@ -15341,7 +15338,7 @@ var __webpack_modules__ = {
|
|
|
15341
15338
|
if (!destStat) {
|
|
15342
15339
|
return fs.symlink(resolvedSrc, dest, cb);
|
|
15343
15340
|
} else {
|
|
15344
|
-
fs.readlink(dest, (
|
|
15341
|
+
fs.readlink(dest, (err, resolvedDest) => {
|
|
15345
15342
|
if (err) {
|
|
15346
15343
|
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlink(resolvedSrc, dest, cb);
|
|
15347
15344
|
return cb(err);
|
|
@@ -15356,15 +15353,15 @@ var __webpack_modules__ = {
|
|
|
15356
15353
|
return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
|
|
15357
15354
|
}
|
|
15358
15355
|
return copyLink(resolvedSrc, dest, cb);
|
|
15359
|
-
})
|
|
15356
|
+
});
|
|
15360
15357
|
}
|
|
15361
|
-
})
|
|
15358
|
+
});
|
|
15362
15359
|
}
|
|
15363
15360
|
function copyLink(resolvedSrc, dest, cb) {
|
|
15364
|
-
fs.unlink(dest,
|
|
15361
|
+
fs.unlink(dest, err => {
|
|
15365
15362
|
if (err) return cb(err);
|
|
15366
15363
|
return fs.symlink(resolvedSrc, dest, cb);
|
|
15367
|
-
})
|
|
15364
|
+
});
|
|
15368
15365
|
}
|
|
15369
15366
|
module.exports = copy;
|
|
15370
15367
|
},
|
|
@@ -15424,9 +15421,9 @@ var __webpack_modules__ = {
|
|
|
15424
15421
|
this.eventEmitter.emit("exit", (_a = req === null || req === void 0 ? void 0 : req.exit) !== null && _a !== void 0 ? _a : 0);
|
|
15425
15422
|
return;
|
|
15426
15423
|
}
|
|
15427
|
-
this.processRequest(req, (
|
|
15428
|
-
setImmediate((
|
|
15429
|
-
})
|
|
15424
|
+
this.processRequest(req, () => {
|
|
15425
|
+
setImmediate(() => this.run());
|
|
15426
|
+
});
|
|
15430
15427
|
}
|
|
15431
15428
|
once(event, listener) {
|
|
15432
15429
|
this.eventEmitter.once(event, listener);
|
|
@@ -15468,25 +15465,25 @@ var __webpack_modules__ = {
|
|
|
15468
15465
|
if (apiReq.api === "begin" || apiReq.api === "complete") {
|
|
15469
15466
|
checkIfAsyncIsAllowed();
|
|
15470
15467
|
this.debug("processing pending promises before responding");
|
|
15471
|
-
setImmediate((
|
|
15468
|
+
setImmediate(() => {
|
|
15472
15469
|
this.writeOkay(ret);
|
|
15473
15470
|
next();
|
|
15474
|
-
})
|
|
15471
|
+
});
|
|
15475
15472
|
return undefined;
|
|
15476
15473
|
}
|
|
15477
15474
|
if (this.isPromise(ret)) {
|
|
15478
15475
|
checkIfAsyncIsAllowed();
|
|
15479
15476
|
this.debug("waiting for promise to be fulfilled");
|
|
15480
15477
|
const promise = ret;
|
|
15481
|
-
promise.then(
|
|
15478
|
+
promise.then(val => {
|
|
15482
15479
|
this.debug("promise succeeded:", val);
|
|
15483
15480
|
this.writeOkay(val);
|
|
15484
15481
|
next();
|
|
15485
|
-
})
|
|
15482
|
+
}).catch(e => {
|
|
15486
15483
|
this.debug("promise failed:", e);
|
|
15487
15484
|
this.writeError(e);
|
|
15488
15485
|
next();
|
|
15489
|
-
})
|
|
15486
|
+
});
|
|
15490
15487
|
return undefined;
|
|
15491
15488
|
}
|
|
15492
15489
|
this.writeOkay(ret);
|
|
@@ -15606,7 +15603,7 @@ var __webpack_modules__ = {
|
|
|
15606
15603
|
topSchemaRef: schemaRef,
|
|
15607
15604
|
compositeRule: true
|
|
15608
15605
|
}, valid);
|
|
15609
|
-
cxt.pass(valid, (
|
|
15606
|
+
cxt.pass(valid, () => cxt.error(true));
|
|
15610
15607
|
}
|
|
15611
15608
|
exports.macroKeywordCode = macroKeywordCode;
|
|
15612
15609
|
function funcKeywordCode(cxt, def) {
|
|
@@ -15622,18 +15619,18 @@ var __webpack_modules__ = {
|
|
|
15622
15619
|
if (def.errors === false) {
|
|
15623
15620
|
assignValid();
|
|
15624
15621
|
if (def.modifying) modifyData(cxt);
|
|
15625
|
-
reportErrs((
|
|
15622
|
+
reportErrs(() => cxt.error());
|
|
15626
15623
|
} else {
|
|
15627
15624
|
const ruleErrs = def.async ? validateAsync() : validateSync();
|
|
15628
15625
|
if (def.modifying) modifyData(cxt);
|
|
15629
|
-
reportErrs((
|
|
15626
|
+
reportErrs(() => addErrs(cxt, ruleErrs));
|
|
15630
15627
|
}
|
|
15631
15628
|
}
|
|
15632
15629
|
function validateAsync() {
|
|
15633
15630
|
const ruleErrs = gen.let("ruleErrs", null);
|
|
15634
|
-
gen.try((
|
|
15635
|
-
codegen_1._)`${e} instanceof ${it.ValidationError}`, (
|
|
15636
|
-
codegen_1._)`${e}.errors`)
|
|
15631
|
+
gen.try(() => assignValid((0, codegen_1._)`await `), e => gen.assign(valid, false).if((0,
|
|
15632
|
+
codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0,
|
|
15633
|
+
codegen_1._)`${e}.errors`), () => gen.throw(e)));
|
|
15637
15634
|
return ruleErrs;
|
|
15638
15635
|
}
|
|
15639
15636
|
function validateSync() {
|
|
@@ -15655,15 +15652,15 @@ var __webpack_modules__ = {
|
|
|
15655
15652
|
exports.funcKeywordCode = funcKeywordCode;
|
|
15656
15653
|
function modifyData(cxt) {
|
|
15657
15654
|
const {gen, data, it} = cxt;
|
|
15658
|
-
gen.if(it.parentData, (
|
|
15655
|
+
gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));
|
|
15659
15656
|
}
|
|
15660
15657
|
function addErrs(cxt, errs) {
|
|
15661
15658
|
const {gen} = cxt;
|
|
15662
|
-
gen.if((0, codegen_1._)`Array.isArray(${errs})`, (
|
|
15659
|
+
gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => {
|
|
15663
15660
|
gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0,
|
|
15664
15661
|
codegen_1._)`${names_1.default.vErrors}.length`);
|
|
15665
15662
|
(0, errors_1.extendErrors)(cxt);
|
|
15666
|
-
}
|
|
15663
|
+
}, () => cxt.error());
|
|
15667
15664
|
}
|
|
15668
15665
|
function checkAsyncKeyword({schemaEnv}, def) {
|
|
15669
15666
|
if (def.async && !schemaEnv.$async) throw new Error("async keyword in sync schema");
|
|
@@ -15678,7 +15675,7 @@ var __webpack_modules__ = {
|
|
|
15678
15675
|
});
|
|
15679
15676
|
}
|
|
15680
15677
|
function validSchemaType(schema, schemaType, allowUndefined = false) {
|
|
15681
|
-
return !schemaType.length || schemaType.some(
|
|
15678
|
+
return !schemaType.length || schemaType.some(st => st === "array" ? Array.isArray(schema) : st === "object" ? schema && typeof schema == "object" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == "undefined");
|
|
15682
15679
|
}
|
|
15683
15680
|
exports.validSchemaType = validSchemaType;
|
|
15684
15681
|
function validateKeywordUsage({schema, opts, self, errSchemaPath}, def, keyword) {
|
|
@@ -15686,7 +15683,7 @@ var __webpack_modules__ = {
|
|
|
15686
15683
|
throw new Error("ajv implementation error");
|
|
15687
15684
|
}
|
|
15688
15685
|
const deps = def.dependencies;
|
|
15689
|
-
if (deps === null || deps === void 0 ? void 0 : deps.some(
|
|
15686
|
+
if (deps === null || deps === void 0 ? void 0 : deps.some(kwd => !Object.prototype.hasOwnProperty.call(schema, kwd))) {
|
|
15690
15687
|
throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`);
|
|
15691
15688
|
}
|
|
15692
15689
|
if (def.validateSchema) {
|
|
@@ -15707,31 +15704,31 @@ var __webpack_modules__ = {
|
|
|
15707
15704
|
const mkdir = __webpack_require__(2924);
|
|
15708
15705
|
function createFile(file, callback) {
|
|
15709
15706
|
function makeFile() {
|
|
15710
|
-
fs.writeFile(file, "",
|
|
15707
|
+
fs.writeFile(file, "", err => {
|
|
15711
15708
|
if (err) return callback(err);
|
|
15712
15709
|
callback();
|
|
15713
|
-
})
|
|
15710
|
+
});
|
|
15714
15711
|
}
|
|
15715
|
-
fs.stat(file, (
|
|
15712
|
+
fs.stat(file, (err, stats) => {
|
|
15716
15713
|
if (!err && stats.isFile()) return callback();
|
|
15717
15714
|
const dir = path.dirname(file);
|
|
15718
|
-
fs.stat(dir, (
|
|
15715
|
+
fs.stat(dir, (err, stats) => {
|
|
15719
15716
|
if (err) {
|
|
15720
15717
|
if (err.code === "ENOENT") {
|
|
15721
|
-
return mkdir.mkdirs(dir,
|
|
15718
|
+
return mkdir.mkdirs(dir, err => {
|
|
15722
15719
|
if (err) return callback(err);
|
|
15723
15720
|
makeFile();
|
|
15724
|
-
})
|
|
15721
|
+
});
|
|
15725
15722
|
}
|
|
15726
15723
|
return callback(err);
|
|
15727
15724
|
}
|
|
15728
15725
|
if (stats.isDirectory()) makeFile(); else {
|
|
15729
|
-
fs.readdir(dir,
|
|
15726
|
+
fs.readdir(dir, err => {
|
|
15730
15727
|
if (err) return callback(err);
|
|
15731
|
-
})
|
|
15728
|
+
});
|
|
15732
15729
|
}
|
|
15733
|
-
})
|
|
15734
|
-
})
|
|
15730
|
+
});
|
|
15731
|
+
});
|
|
15735
15732
|
}
|
|
15736
15733
|
function createFileSync(file) {
|
|
15737
15734
|
let stats;
|
|
@@ -15765,13 +15762,13 @@ var __webpack_modules__ = {
|
|
|
15765
15762
|
const queues = new Map;
|
|
15766
15763
|
const reservations = new Map;
|
|
15767
15764
|
const getDirs = path => {
|
|
15768
|
-
const dirs = path.split("/").slice(0, -1).reduce((
|
|
15765
|
+
const dirs = path.split("/").slice(0, -1).reduce((set, path) => {
|
|
15769
15766
|
if (set.length) {
|
|
15770
15767
|
path = join(set[set.length - 1], path);
|
|
15771
15768
|
}
|
|
15772
15769
|
set.push(path || "/");
|
|
15773
15770
|
return set;
|
|
15774
|
-
}
|
|
15771
|
+
}, []);
|
|
15775
15772
|
return dirs;
|
|
15776
15773
|
};
|
|
15777
15774
|
const running = new Set;
|
|
@@ -15781,20 +15778,20 @@ var __webpack_modules__ = {
|
|
|
15781
15778
|
throw new Error("function does not have any path reservations");
|
|
15782
15779
|
}
|
|
15783
15780
|
return {
|
|
15784
|
-
paths: res.paths.map(
|
|
15785
|
-
dirs: [ ...res.dirs ].map(
|
|
15781
|
+
paths: res.paths.map(path => queues.get(path)),
|
|
15782
|
+
dirs: [ ...res.dirs ].map(path => queues.get(path))
|
|
15786
15783
|
};
|
|
15787
15784
|
};
|
|
15788
15785
|
const check = fn => {
|
|
15789
15786
|
const {paths, dirs} = getQueues(fn);
|
|
15790
|
-
return paths.every(
|
|
15787
|
+
return paths.every(q => q[0] === fn) && dirs.every(q => q[0] instanceof Set && q[0].has(fn));
|
|
15791
15788
|
};
|
|
15792
15789
|
const run = fn => {
|
|
15793
15790
|
if (running.has(fn) || !check(fn)) {
|
|
15794
15791
|
return false;
|
|
15795
15792
|
}
|
|
15796
15793
|
running.add(fn);
|
|
15797
|
-
fn((
|
|
15794
|
+
fn(() => clear(fn));
|
|
15798
15795
|
return true;
|
|
15799
15796
|
};
|
|
15800
15797
|
const clear = fn => {
|
|
@@ -15803,7 +15800,7 @@ var __webpack_modules__ = {
|
|
|
15803
15800
|
}
|
|
15804
15801
|
const {paths, dirs} = reservations.get(fn);
|
|
15805
15802
|
const next = new Set;
|
|
15806
|
-
paths.forEach(
|
|
15803
|
+
paths.forEach(path => {
|
|
15807
15804
|
const q = queues.get(path);
|
|
15808
15805
|
assert.equal(q[0], fn);
|
|
15809
15806
|
if (q.length === 1) {
|
|
@@ -15813,11 +15810,11 @@ var __webpack_modules__ = {
|
|
|
15813
15810
|
if (typeof q[0] === "function") {
|
|
15814
15811
|
next.add(q[0]);
|
|
15815
15812
|
} else {
|
|
15816
|
-
q[0].forEach(
|
|
15813
|
+
q[0].forEach(fn => next.add(fn));
|
|
15817
15814
|
}
|
|
15818
15815
|
}
|
|
15819
|
-
})
|
|
15820
|
-
dirs.forEach(
|
|
15816
|
+
});
|
|
15817
|
+
dirs.forEach(dir => {
|
|
15821
15818
|
const q = queues.get(dir);
|
|
15822
15819
|
assert(q[0] instanceof Set);
|
|
15823
15820
|
if (q[0].size === 1 && q.length === 1) {
|
|
@@ -15828,27 +15825,27 @@ var __webpack_modules__ = {
|
|
|
15828
15825
|
} else {
|
|
15829
15826
|
q[0].delete(fn);
|
|
15830
15827
|
}
|
|
15831
|
-
})
|
|
15828
|
+
});
|
|
15832
15829
|
running.delete(fn);
|
|
15833
|
-
next.forEach(
|
|
15830
|
+
next.forEach(fn => run(fn));
|
|
15834
15831
|
return true;
|
|
15835
15832
|
};
|
|
15836
15833
|
const reserve = (paths, fn) => {
|
|
15837
|
-
paths = isWindows ? [ "win32 parallelization disabled" ] : paths.map(
|
|
15838
|
-
const dirs = new Set(paths.map(
|
|
15834
|
+
paths = isWindows ? [ "win32 parallelization disabled" ] : paths.map(p => stripSlashes(join(normalize(p))).toLowerCase());
|
|
15835
|
+
const dirs = new Set(paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b)));
|
|
15839
15836
|
reservations.set(fn, {
|
|
15840
15837
|
dirs,
|
|
15841
15838
|
paths
|
|
15842
15839
|
});
|
|
15843
|
-
paths.forEach(
|
|
15840
|
+
paths.forEach(path => {
|
|
15844
15841
|
const q = queues.get(path);
|
|
15845
15842
|
if (!q) {
|
|
15846
15843
|
queues.set(path, [ fn ]);
|
|
15847
15844
|
} else {
|
|
15848
15845
|
q.push(fn);
|
|
15849
15846
|
}
|
|
15850
|
-
})
|
|
15851
|
-
dirs.forEach(
|
|
15847
|
+
});
|
|
15848
|
+
dirs.forEach(dir => {
|
|
15852
15849
|
const q = queues.get(dir);
|
|
15853
15850
|
if (!q) {
|
|
15854
15851
|
queues.set(dir, [ new Set([ fn ]) ]);
|
|
@@ -15857,7 +15854,7 @@ var __webpack_modules__ = {
|
|
|
15857
15854
|
} else {
|
|
15858
15855
|
q.push(new Set([ fn ]));
|
|
15859
15856
|
}
|
|
15860
|
-
})
|
|
15857
|
+
});
|
|
15861
15858
|
return run(fn);
|
|
15862
15859
|
};
|
|
15863
15860
|
return {
|
|
@@ -15871,7 +15868,7 @@ var __webpack_modules__ = {
|
|
|
15871
15868
|
Object.defineProperty(exports, "__esModule", {
|
|
15872
15869
|
value: true
|
|
15873
15870
|
});
|
|
15874
|
-
exports.defaultCacheRoot =
|
|
15871
|
+
exports.defaultCacheRoot = defaultCacheRoot;
|
|
15875
15872
|
const os_1 = __webpack_require__(857);
|
|
15876
15873
|
const path_1 = __webpack_require__(6928);
|
|
15877
15874
|
function defaultCacheRoot() {
|
|
@@ -15892,7 +15889,6 @@ var __webpack_modules__ = {
|
|
|
15892
15889
|
}
|
|
15893
15890
|
return (0, path_1.join)((0, os_1.tmpdir)(), "aws-jsii-package-cache");
|
|
15894
15891
|
}
|
|
15895
|
-
exports.defaultCacheRoot = defaultCacheRoot;
|
|
15896
15892
|
},
|
|
15897
15893
|
8895: (__unused_webpack_module, exports, __webpack_require__) => {
|
|
15898
15894
|
"use strict";
|
|
@@ -15925,11 +15921,11 @@ var __webpack_modules__ = {
|
|
|
15925
15921
|
if (!oneOf) throw new Error("discriminator: requires oneOf keyword");
|
|
15926
15922
|
const valid = gen.let("valid", false);
|
|
15927
15923
|
const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`);
|
|
15928
|
-
gen.if((0, codegen_1._)`typeof ${tag} == "string"`, (
|
|
15924
|
+
gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, {
|
|
15929
15925
|
discrError: types_1.DiscrError.Tag,
|
|
15930
15926
|
tag,
|
|
15931
15927
|
tagName
|
|
15932
|
-
}))
|
|
15928
|
+
}));
|
|
15933
15929
|
cxt.ok(valid);
|
|
15934
15930
|
function validateMapping() {
|
|
15935
15931
|
const mapping = getMapping();
|
|
@@ -16005,25 +16001,25 @@ var __webpack_modules__ = {
|
|
|
16005
16001
|
9022: (__unused_webpack_module, exports) => {
|
|
16006
16002
|
"use strict";
|
|
16007
16003
|
exports.fromCallback = function(fn) {
|
|
16008
|
-
return Object.defineProperty(
|
|
16004
|
+
return Object.defineProperty(function(...args) {
|
|
16009
16005
|
if (typeof args[args.length - 1] === "function") fn.apply(this, args); else {
|
|
16010
|
-
return new Promise((
|
|
16011
|
-
args.push((
|
|
16006
|
+
return new Promise((resolve, reject) => {
|
|
16007
|
+
args.push((err, res) => err != null ? reject(err) : resolve(res));
|
|
16012
16008
|
fn.apply(this, args);
|
|
16013
|
-
})
|
|
16009
|
+
});
|
|
16014
16010
|
}
|
|
16015
|
-
}
|
|
16011
|
+
}, "name", {
|
|
16016
16012
|
value: fn.name
|
|
16017
16013
|
});
|
|
16018
16014
|
};
|
|
16019
16015
|
exports.fromPromise = function(fn) {
|
|
16020
|
-
return Object.defineProperty(
|
|
16016
|
+
return Object.defineProperty(function(...args) {
|
|
16021
16017
|
const cb = args[args.length - 1];
|
|
16022
16018
|
if (typeof cb !== "function") return fn.apply(this, args); else {
|
|
16023
16019
|
args.pop();
|
|
16024
|
-
fn.apply(this, args).then(
|
|
16020
|
+
fn.apply(this, args).then(r => cb(null, r), cb);
|
|
16025
16021
|
}
|
|
16026
|
-
}
|
|
16022
|
+
}, "name", {
|
|
16027
16023
|
value: fn.name
|
|
16028
16024
|
});
|
|
16029
16025
|
};
|
|
@@ -16073,7 +16069,7 @@ var __webpack_modules__ = {
|
|
|
16073
16069
|
Object.defineProperty(exports, "__esModule", {
|
|
16074
16070
|
value: true
|
|
16075
16071
|
});
|
|
16076
|
-
exports.digestFile =
|
|
16072
|
+
exports.digestFile = digestFile;
|
|
16077
16073
|
const crypto_1 = __webpack_require__(6982);
|
|
16078
16074
|
const fs_1 = __webpack_require__(9896);
|
|
16079
16075
|
const ALGORITHM = "sha256";
|
|
@@ -16095,7 +16091,6 @@ var __webpack_modules__ = {
|
|
|
16095
16091
|
(0, fs_1.closeSync)(fd);
|
|
16096
16092
|
}
|
|
16097
16093
|
}
|
|
16098
|
-
exports.digestFile = digestFile;
|
|
16099
16094
|
},
|
|
16100
16095
|
9102: (__unused_webpack_module, exports, __webpack_require__) => {
|
|
16101
16096
|
"use strict";
|
|
@@ -16142,9 +16137,9 @@ var __webpack_modules__ = {
|
|
|
16142
16137
|
opts.recursive = true;
|
|
16143
16138
|
const parent = dirname(path);
|
|
16144
16139
|
if (parent === path) return opts.mkdirAsync(path, opts);
|
|
16145
|
-
return findMade(opts, path).then(
|
|
16140
|
+
return findMade(opts, path).then(made => opts.mkdirAsync(path, opts).then(() => made).catch(er => {
|
|
16146
16141
|
if (er.code === "ENOENT") return mkdirpManual(path, opts); else throw er;
|
|
16147
|
-
}))
|
|
16142
|
+
}));
|
|
16148
16143
|
};
|
|
16149
16144
|
const mkdirpNativeSync = (path, opts) => {
|
|
16150
16145
|
opts.recursive = true;
|
|
@@ -16168,7 +16163,7 @@ var __webpack_modules__ = {
|
|
|
16168
16163
|
const u = __webpack_require__(9022).fromPromise;
|
|
16169
16164
|
const fs = __webpack_require__(6203);
|
|
16170
16165
|
function pathExists(path) {
|
|
16171
|
-
return fs.access(path).then((
|
|
16166
|
+
return fs.access(path).then(() => true).catch(() => false);
|
|
16172
16167
|
}
|
|
16173
16168
|
module.exports = {
|
|
16174
16169
|
pathExists: u(pathExists),
|
|
@@ -16185,29 +16180,29 @@ var __webpack_modules__ = {
|
|
|
16185
16180
|
const {areIdentical} = __webpack_require__(9276);
|
|
16186
16181
|
function createLink(srcpath, dstpath, callback) {
|
|
16187
16182
|
function makeLink(srcpath, dstpath) {
|
|
16188
|
-
fs.link(srcpath, dstpath,
|
|
16183
|
+
fs.link(srcpath, dstpath, err => {
|
|
16189
16184
|
if (err) return callback(err);
|
|
16190
16185
|
callback(null);
|
|
16191
|
-
})
|
|
16186
|
+
});
|
|
16192
16187
|
}
|
|
16193
|
-
fs.lstat(dstpath, (
|
|
16194
|
-
fs.lstat(srcpath, (
|
|
16188
|
+
fs.lstat(dstpath, (_, dstStat) => {
|
|
16189
|
+
fs.lstat(srcpath, (err, srcStat) => {
|
|
16195
16190
|
if (err) {
|
|
16196
16191
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
16197
16192
|
return callback(err);
|
|
16198
16193
|
}
|
|
16199
16194
|
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null);
|
|
16200
16195
|
const dir = path.dirname(dstpath);
|
|
16201
|
-
pathExists(dir, (
|
|
16196
|
+
pathExists(dir, (err, dirExists) => {
|
|
16202
16197
|
if (err) return callback(err);
|
|
16203
16198
|
if (dirExists) return makeLink(srcpath, dstpath);
|
|
16204
|
-
mkdir.mkdirs(dir,
|
|
16199
|
+
mkdir.mkdirs(dir, err => {
|
|
16205
16200
|
if (err) return callback(err);
|
|
16206
16201
|
makeLink(srcpath, dstpath);
|
|
16207
|
-
})
|
|
16208
|
-
})
|
|
16209
|
-
})
|
|
16210
|
-
})
|
|
16202
|
+
});
|
|
16203
|
+
});
|
|
16204
|
+
});
|
|
16205
|
+
});
|
|
16211
16206
|
}
|
|
16212
16207
|
function createLinkSync(srcpath, dstpath) {
|
|
16213
16208
|
let dstStat;
|
|
@@ -16243,13 +16238,13 @@ var __webpack_modules__ = {
|
|
|
16243
16238
|
}) : file => fs.lstat(file, {
|
|
16244
16239
|
bigint: true
|
|
16245
16240
|
});
|
|
16246
|
-
return Promise.all([ statFunc(src), statFunc(dest).catch(
|
|
16241
|
+
return Promise.all([ statFunc(src), statFunc(dest).catch(err => {
|
|
16247
16242
|
if (err.code === "ENOENT") return null;
|
|
16248
16243
|
throw err;
|
|
16249
|
-
})
|
|
16244
|
+
}) ]).then(([srcStat, destStat]) => ({
|
|
16250
16245
|
srcStat,
|
|
16251
16246
|
destStat
|
|
16252
|
-
}))
|
|
16247
|
+
}));
|
|
16253
16248
|
}
|
|
16254
16249
|
function getStatsSync(src, dest, opts) {
|
|
16255
16250
|
let destStat;
|
|
@@ -16274,7 +16269,7 @@ var __webpack_modules__ = {
|
|
|
16274
16269
|
};
|
|
16275
16270
|
}
|
|
16276
16271
|
function checkPaths(src, dest, funcName, opts, cb) {
|
|
16277
|
-
util.callbackify(getStats)(src, dest, opts, (
|
|
16272
|
+
util.callbackify(getStats)(src, dest, opts, (err, stats) => {
|
|
16278
16273
|
if (err) return cb(err);
|
|
16279
16274
|
const {srcStat, destStat} = stats;
|
|
16280
16275
|
if (destStat) {
|
|
@@ -16304,7 +16299,7 @@ var __webpack_modules__ = {
|
|
|
16304
16299
|
srcStat,
|
|
16305
16300
|
destStat
|
|
16306
16301
|
});
|
|
16307
|
-
})
|
|
16302
|
+
});
|
|
16308
16303
|
}
|
|
16309
16304
|
function checkPathsSync(src, dest, funcName, opts) {
|
|
16310
16305
|
const {srcStat, destStat} = getStatsSync(src, dest, opts);
|
|
@@ -16342,7 +16337,7 @@ var __webpack_modules__ = {
|
|
|
16342
16337
|
if (destParent === srcParent || destParent === path.parse(destParent).root) return cb();
|
|
16343
16338
|
fs.stat(destParent, {
|
|
16344
16339
|
bigint: true
|
|
16345
|
-
}, (
|
|
16340
|
+
}, (err, destStat) => {
|
|
16346
16341
|
if (err) {
|
|
16347
16342
|
if (err.code === "ENOENT") return cb();
|
|
16348
16343
|
return cb(err);
|
|
@@ -16351,7 +16346,7 @@ var __webpack_modules__ = {
|
|
|
16351
16346
|
return cb(new Error(errMsg(src, dest, funcName)));
|
|
16352
16347
|
}
|
|
16353
16348
|
return checkParentPaths(src, srcStat, destParent, funcName, cb);
|
|
16354
|
-
})
|
|
16349
|
+
});
|
|
16355
16350
|
}
|
|
16356
16351
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
16357
16352
|
const srcParent = path.resolve(path.dirname(src));
|
|
@@ -16375,9 +16370,9 @@ var __webpack_modules__ = {
|
|
|
16375
16370
|
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
16376
16371
|
}
|
|
16377
16372
|
function isSrcSubdir(src, dest) {
|
|
16378
|
-
const srcArr = path.resolve(src).split(path.sep).filter(
|
|
16379
|
-
const destArr = path.resolve(dest).split(path.sep).filter(
|
|
16380
|
-
return srcArr.reduce((
|
|
16373
|
+
const srcArr = path.resolve(src).split(path.sep).filter(i => i);
|
|
16374
|
+
const destArr = path.resolve(dest).split(path.sep).filter(i => i);
|
|
16375
|
+
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
|
|
16381
16376
|
}
|
|
16382
16377
|
function errMsg(src, dest, funcName) {
|
|
16383
16378
|
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
|
|
@@ -16425,12 +16420,12 @@ var __webpack_modules__ = {
|
|
|
16425
16420
|
publishQueue(fs, queue);
|
|
16426
16421
|
fs.close = function(fs$close) {
|
|
16427
16422
|
function close(fd, cb) {
|
|
16428
|
-
return fs$close.call(fs, fd,
|
|
16423
|
+
return fs$close.call(fs, fd, function(err) {
|
|
16429
16424
|
if (!err) {
|
|
16430
16425
|
resetQueue();
|
|
16431
16426
|
}
|
|
16432
16427
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
16433
|
-
})
|
|
16428
|
+
});
|
|
16434
16429
|
}
|
|
16435
16430
|
Object.defineProperty(close, previousSymbol, {
|
|
16436
16431
|
value: fs$close
|
|
@@ -16448,10 +16443,10 @@ var __webpack_modules__ = {
|
|
|
16448
16443
|
return closeSync;
|
|
16449
16444
|
}(fs.closeSync);
|
|
16450
16445
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
16451
|
-
process.on("exit",
|
|
16446
|
+
process.on("exit", function() {
|
|
16452
16447
|
debug(fs[gracefulQueue]);
|
|
16453
16448
|
__webpack_require__(2613).equal(fs[gracefulQueue].length, 0);
|
|
16454
|
-
})
|
|
16449
|
+
});
|
|
16455
16450
|
}
|
|
16456
16451
|
}
|
|
16457
16452
|
if (!global[gracefulQueue]) {
|
|
@@ -16473,11 +16468,11 @@ var __webpack_modules__ = {
|
|
|
16473
16468
|
if (typeof options === "function") cb = options, options = null;
|
|
16474
16469
|
return go$readFile(path, options, cb);
|
|
16475
16470
|
function go$readFile(path, options, cb, startTime) {
|
|
16476
|
-
return fs$readFile(path, options,
|
|
16471
|
+
return fs$readFile(path, options, function(err) {
|
|
16477
16472
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$readFile, [ path, options, cb ], err, startTime || Date.now(), Date.now() ]); else {
|
|
16478
16473
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
16479
16474
|
}
|
|
16480
|
-
})
|
|
16475
|
+
});
|
|
16481
16476
|
}
|
|
16482
16477
|
}
|
|
16483
16478
|
var fs$writeFile = fs.writeFile;
|
|
@@ -16486,11 +16481,11 @@ var __webpack_modules__ = {
|
|
|
16486
16481
|
if (typeof options === "function") cb = options, options = null;
|
|
16487
16482
|
return go$writeFile(path, data, options, cb);
|
|
16488
16483
|
function go$writeFile(path, data, options, cb, startTime) {
|
|
16489
|
-
return fs$writeFile(path, data, options,
|
|
16484
|
+
return fs$writeFile(path, data, options, function(err) {
|
|
16490
16485
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$writeFile, [ path, data, options, cb ], err, startTime || Date.now(), Date.now() ]); else {
|
|
16491
16486
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
16492
16487
|
}
|
|
16493
|
-
})
|
|
16488
|
+
});
|
|
16494
16489
|
}
|
|
16495
16490
|
}
|
|
16496
16491
|
var fs$appendFile = fs.appendFile;
|
|
@@ -16499,11 +16494,11 @@ var __webpack_modules__ = {
|
|
|
16499
16494
|
if (typeof options === "function") cb = options, options = null;
|
|
16500
16495
|
return go$appendFile(path, data, options, cb);
|
|
16501
16496
|
function go$appendFile(path, data, options, cb, startTime) {
|
|
16502
|
-
return fs$appendFile(path, data, options,
|
|
16497
|
+
return fs$appendFile(path, data, options, function(err) {
|
|
16503
16498
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$appendFile, [ path, data, options, cb ], err, startTime || Date.now(), Date.now() ]); else {
|
|
16504
16499
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
16505
16500
|
}
|
|
16506
|
-
})
|
|
16501
|
+
});
|
|
16507
16502
|
}
|
|
16508
16503
|
}
|
|
16509
16504
|
var fs$copyFile = fs.copyFile;
|
|
@@ -16515,11 +16510,11 @@ var __webpack_modules__ = {
|
|
|
16515
16510
|
}
|
|
16516
16511
|
return go$copyFile(src, dest, flags, cb);
|
|
16517
16512
|
function go$copyFile(src, dest, flags, cb, startTime) {
|
|
16518
|
-
return fs$copyFile(src, dest, flags,
|
|
16513
|
+
return fs$copyFile(src, dest, flags, function(err) {
|
|
16519
16514
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$copyFile, [ src, dest, flags, cb ], err, startTime || Date.now(), Date.now() ]); else {
|
|
16520
16515
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
16521
16516
|
}
|
|
16522
|
-
})
|
|
16517
|
+
});
|
|
16523
16518
|
}
|
|
16524
16519
|
}
|
|
16525
16520
|
var fs$readdir = fs.readdir;
|
|
@@ -16604,7 +16599,7 @@ var __webpack_modules__ = {
|
|
|
16604
16599
|
}
|
|
16605
16600
|
function ReadStream$open() {
|
|
16606
16601
|
var that = this;
|
|
16607
|
-
open(that.path, that.flags, that.mode,
|
|
16602
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
|
16608
16603
|
if (err) {
|
|
16609
16604
|
if (that.autoClose) that.destroy();
|
|
16610
16605
|
that.emit("error", err);
|
|
@@ -16613,14 +16608,14 @@ var __webpack_modules__ = {
|
|
|
16613
16608
|
that.emit("open", fd);
|
|
16614
16609
|
that.read();
|
|
16615
16610
|
}
|
|
16616
|
-
})
|
|
16611
|
+
});
|
|
16617
16612
|
}
|
|
16618
16613
|
function WriteStream(path, options) {
|
|
16619
16614
|
if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
|
16620
16615
|
}
|
|
16621
16616
|
function WriteStream$open() {
|
|
16622
16617
|
var that = this;
|
|
16623
|
-
open(that.path, that.flags, that.mode,
|
|
16618
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
|
16624
16619
|
if (err) {
|
|
16625
16620
|
that.destroy();
|
|
16626
16621
|
that.emit("error", err);
|
|
@@ -16628,7 +16623,7 @@ var __webpack_modules__ = {
|
|
|
16628
16623
|
that.fd = fd;
|
|
16629
16624
|
that.emit("open", fd);
|
|
16630
16625
|
}
|
|
16631
|
-
})
|
|
16626
|
+
});
|
|
16632
16627
|
}
|
|
16633
16628
|
function createReadStream(path, options) {
|
|
16634
16629
|
return new fs.ReadStream(path, options);
|
|
@@ -16642,11 +16637,11 @@ var __webpack_modules__ = {
|
|
|
16642
16637
|
if (typeof mode === "function") cb = mode, mode = null;
|
|
16643
16638
|
return go$open(path, flags, mode, cb);
|
|
16644
16639
|
function go$open(path, flags, mode, cb, startTime) {
|
|
16645
|
-
return fs$open(path, flags, mode,
|
|
16640
|
+
return fs$open(path, flags, mode, function(err, fd) {
|
|
16646
16641
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$open, [ path, flags, mode, cb ], err, startTime || Date.now(), Date.now() ]); else {
|
|
16647
16642
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
16648
16643
|
}
|
|
16649
|
-
})
|
|
16644
|
+
});
|
|
16650
16645
|
}
|
|
16651
16646
|
}
|
|
16652
16647
|
return fs;
|
|
@@ -17058,7 +17053,7 @@ var __webpack_modules__ = {
|
|
|
17058
17053
|
}
|
|
17059
17054
|
checkKeyword.call(this, keyword, def);
|
|
17060
17055
|
if (!def) {
|
|
17061
|
-
(0, util_1.eachItem)(keyword,
|
|
17056
|
+
(0, util_1.eachItem)(keyword, kwd => addRule.call(this, kwd));
|
|
17062
17057
|
return this;
|
|
17063
17058
|
}
|
|
17064
17059
|
keywordMetaschema.call(this, def);
|
|
@@ -17067,7 +17062,7 @@ var __webpack_modules__ = {
|
|
|
17067
17062
|
type: (0, dataType_1.getJSONTypes)(def.type),
|
|
17068
17063
|
schemaType: (0, dataType_1.getJSONTypes)(def.schemaType)
|
|
17069
17064
|
};
|
|
17070
|
-
(0, util_1.eachItem)(keyword, definition.type.length === 0 ? k => addRule.call(this, k, definition) : k => definition.type.forEach(
|
|
17065
|
+
(0, util_1.eachItem)(keyword, definition.type.length === 0 ? k => addRule.call(this, k, definition) : k => definition.type.forEach(t => addRule.call(this, k, definition, t)));
|
|
17071
17066
|
return this;
|
|
17072
17067
|
}
|
|
17073
17068
|
getKeyword(keyword) {
|
|
@@ -17079,7 +17074,7 @@ var __webpack_modules__ = {
|
|
|
17079
17074
|
delete RULES.keywords[keyword];
|
|
17080
17075
|
delete RULES.all[keyword];
|
|
17081
17076
|
for (const group of RULES.rules) {
|
|
17082
|
-
const i = group.rules.findIndex(
|
|
17077
|
+
const i = group.rules.findIndex(rule => rule.keyword === keyword);
|
|
17083
17078
|
if (i >= 0) group.rules.splice(i, 1);
|
|
17084
17079
|
}
|
|
17085
17080
|
return this;
|
|
@@ -17091,7 +17086,7 @@ var __webpack_modules__ = {
|
|
|
17091
17086
|
}
|
|
17092
17087
|
errorsText(errors = this.errors, {separator = ", ", dataVar = "data"} = {}) {
|
|
17093
17088
|
if (!errors || errors.length === 0) return "No errors";
|
|
17094
|
-
return errors.map(
|
|
17089
|
+
return errors.map(e => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
|
|
17095
17090
|
}
|
|
17096
17091
|
$dataMetaSchema(metaSchema, keywordsJsonPointers) {
|
|
17097
17092
|
const rules = this.RULES.all;
|
|
@@ -17227,10 +17222,10 @@ var __webpack_modules__ = {
|
|
|
17227
17222
|
const KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
|
|
17228
17223
|
function checkKeyword(keyword, def) {
|
|
17229
17224
|
const {RULES} = this;
|
|
17230
|
-
(0, util_1.eachItem)(keyword,
|
|
17225
|
+
(0, util_1.eachItem)(keyword, kwd => {
|
|
17231
17226
|
if (RULES.keywords[kwd]) throw new Error(`Keyword ${kwd} is already defined`);
|
|
17232
17227
|
if (!KEYWORD_NAME.test(kwd)) throw new Error(`Keyword ${kwd} has invalid name`);
|
|
17233
|
-
})
|
|
17228
|
+
});
|
|
17234
17229
|
if (!def) return;
|
|
17235
17230
|
if (def.$data && !("code" in def || "validate" in def)) {
|
|
17236
17231
|
throw new Error('$data keyword must have "code" or "validate" function');
|
|
@@ -17241,7 +17236,7 @@ var __webpack_modules__ = {
|
|
|
17241
17236
|
const post = definition === null || definition === void 0 ? void 0 : definition.post;
|
|
17242
17237
|
if (dataType && post) throw new Error('keyword with "post" flag cannot have "type"');
|
|
17243
17238
|
const {RULES} = this;
|
|
17244
|
-
let ruleGroup = post ? RULES.post : RULES.rules.find((
|
|
17239
|
+
let ruleGroup = post ? RULES.post : RULES.rules.find(({type: t}) => t === dataType);
|
|
17245
17240
|
if (!ruleGroup) {
|
|
17246
17241
|
ruleGroup = {
|
|
17247
17242
|
type: dataType,
|
|
@@ -17261,10 +17256,10 @@ var __webpack_modules__ = {
|
|
|
17261
17256
|
};
|
|
17262
17257
|
if (definition.before) addBeforeRule.call(this, ruleGroup, rule, definition.before); else ruleGroup.rules.push(rule);
|
|
17263
17258
|
RULES.all[keyword] = rule;
|
|
17264
|
-
(_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach(
|
|
17259
|
+
(_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach(kwd => this.addKeyword(kwd));
|
|
17265
17260
|
}
|
|
17266
17261
|
function addBeforeRule(ruleGroup, rule, before) {
|
|
17267
|
-
const i = ruleGroup.rules.findIndex(
|
|
17262
|
+
const i = ruleGroup.rules.findIndex(_rule => _rule.keyword === before);
|
|
17268
17263
|
if (i >= 0) {
|
|
17269
17264
|
ruleGroup.rules.splice(i, 0, rule);
|
|
17270
17265
|
} else {
|
|
@@ -17422,7 +17417,7 @@ var __webpack_modules__ = {
|
|
|
17422
17417
|
return setDestMode(dest, srcMode);
|
|
17423
17418
|
}
|
|
17424
17419
|
function copyDir(src, dest, opts) {
|
|
17425
|
-
fs.readdirSync(src).forEach(
|
|
17420
|
+
fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts));
|
|
17426
17421
|
}
|
|
17427
17422
|
function copyDirItem(item, src, dest, opts) {
|
|
17428
17423
|
const srcItem = path.join(src, item);
|
|
@@ -17468,7 +17463,7 @@ var __webpack_modules__ = {
|
|
|
17468
17463
|
Object.defineProperty(exports, "__esModule", {
|
|
17469
17464
|
value: true
|
|
17470
17465
|
});
|
|
17471
|
-
exports.removeSync =
|
|
17466
|
+
exports.removeSync = removeSync;
|
|
17472
17467
|
const fs = __webpack_require__(8463);
|
|
17473
17468
|
const process = __webpack_require__(932);
|
|
17474
17469
|
const removeSyncPaths = new Array;
|
|
@@ -17476,7 +17471,6 @@ var __webpack_modules__ = {
|
|
|
17476
17471
|
registerIfNeeded();
|
|
17477
17472
|
removeSyncPaths.push(path);
|
|
17478
17473
|
}
|
|
17479
|
-
exports.removeSync = removeSync;
|
|
17480
17474
|
let registered = false;
|
|
17481
17475
|
function registerIfNeeded() {
|
|
17482
17476
|
if (registered) {
|
|
@@ -17524,9 +17518,9 @@ var __webpack_modules__ = {
|
|
|
17524
17518
|
checkAdditionalProperties();
|
|
17525
17519
|
cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
|
|
17526
17520
|
function checkAdditionalProperties() {
|
|
17527
|
-
gen.forIn("key", data,
|
|
17528
|
-
if (!props.length && !patProps.length) additionalPropertyCode(key); else gen.if(isAdditional(key), (
|
|
17529
|
-
})
|
|
17521
|
+
gen.forIn("key", data, key => {
|
|
17522
|
+
if (!props.length && !patProps.length) additionalPropertyCode(key); else gen.if(isAdditional(key), () => additionalPropertyCode(key));
|
|
17523
|
+
});
|
|
17530
17524
|
}
|
|
17531
17525
|
function isAdditional(key) {
|
|
17532
17526
|
let definedProp;
|
|
@@ -17534,13 +17528,13 @@ var __webpack_modules__ = {
|
|
|
17534
17528
|
const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties");
|
|
17535
17529
|
definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);
|
|
17536
17530
|
} else if (props.length) {
|
|
17537
|
-
definedProp = (0, codegen_1.or)(...props.map(
|
|
17531
|
+
definedProp = (0, codegen_1.or)(...props.map(p => (0, codegen_1._)`${key} === ${p}`));
|
|
17538
17532
|
} else {
|
|
17539
17533
|
definedProp = codegen_1.nil;
|
|
17540
17534
|
}
|
|
17541
17535
|
if (patProps.length) {
|
|
17542
|
-
definedProp = (0, codegen_1.or)(definedProp, ...patProps.map(
|
|
17543
|
-
code_1.usePattern)(cxt, p)}.test(${key})`))
|
|
17536
|
+
definedProp = (0, codegen_1.or)(definedProp, ...patProps.map(p => (0, codegen_1._)`${(0,
|
|
17537
|
+
code_1.usePattern)(cxt, p)}.test(${key})`));
|
|
17544
17538
|
}
|
|
17545
17539
|
return (0, codegen_1.not)(definedProp);
|
|
17546
17540
|
}
|
|
@@ -17564,13 +17558,13 @@ var __webpack_modules__ = {
|
|
|
17564
17558
|
const valid = gen.name("valid");
|
|
17565
17559
|
if (opts.removeAdditional === "failing") {
|
|
17566
17560
|
applyAdditionalSchema(key, valid, false);
|
|
17567
|
-
gen.if((0, codegen_1.not)(valid), (
|
|
17561
|
+
gen.if((0, codegen_1.not)(valid), () => {
|
|
17568
17562
|
cxt.reset();
|
|
17569
17563
|
deleteAdditional(key);
|
|
17570
|
-
})
|
|
17564
|
+
});
|
|
17571
17565
|
} else {
|
|
17572
17566
|
applyAdditionalSchema(key, valid);
|
|
17573
|
-
if (!allErrors) gen.if((0, codegen_1.not)(valid), (
|
|
17567
|
+
if (!allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
17574
17568
|
}
|
|
17575
17569
|
}
|
|
17576
17570
|
}
|
|
@@ -17604,15 +17598,15 @@ var __webpack_modules__ = {
|
|
|
17604
17598
|
const path = __webpack_require__(6928);
|
|
17605
17599
|
const mkdir = __webpack_require__(2924);
|
|
17606
17600
|
const remove = __webpack_require__(7948);
|
|
17607
|
-
const emptyDir = u(
|
|
17601
|
+
const emptyDir = u(async function emptyDir(dir) {
|
|
17608
17602
|
let items;
|
|
17609
17603
|
try {
|
|
17610
17604
|
items = await fs.readdir(dir);
|
|
17611
17605
|
} catch {
|
|
17612
17606
|
return mkdir.mkdirs(dir);
|
|
17613
17607
|
}
|
|
17614
|
-
return Promise.all(items.map(
|
|
17615
|
-
})
|
|
17608
|
+
return Promise.all(items.map(item => remove.remove(path.join(dir, item))));
|
|
17609
|
+
});
|
|
17616
17610
|
function emptyDirSync(dir) {
|
|
17617
17611
|
let items;
|
|
17618
17612
|
try {
|
|
@@ -17620,10 +17614,10 @@ var __webpack_modules__ = {
|
|
|
17620
17614
|
} catch {
|
|
17621
17615
|
return mkdir.mkdirsSync(dir);
|
|
17622
17616
|
}
|
|
17623
|
-
items.forEach(
|
|
17617
|
+
items.forEach(item => {
|
|
17624
17618
|
item = path.join(dir, item);
|
|
17625
17619
|
remove.removeSync(item);
|
|
17626
|
-
})
|
|
17620
|
+
});
|
|
17627
17621
|
}
|
|
17628
17622
|
module.exports = {
|
|
17629
17623
|
emptyDirSync,
|