@aws-cdk/integ-runner 2.202.2 → 2.203.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/THIRD_PARTY_LICENSES +26 -0
- package/lib/cli.d.ts.map +1 -1
- package/lib/cli.js +3 -2
- package/lib/engines/toolkit-lib.d.ts +1 -1
- package/lib/engines/toolkit-lib.d.ts.map +1 -1
- package/lib/engines/toolkit-lib.js +11 -11
- package/lib/files.d.ts +9 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +51 -0
- package/lib/index.js +218 -182
- package/lib/runner/{cdk-integ-helper.d.ts → cdk-test-app.d.ts} +90 -114
- package/lib/runner/cdk-test-app.d.ts.map +1 -0
- package/lib/runner/cdk-test-app.js +584 -0
- package/lib/runner/engine.d.ts +2 -2
- package/lib/runner/engine.d.ts.map +1 -1
- package/lib/runner/engine.js +2 -2
- package/lib/runner/index.d.ts +1 -1
- package/lib/runner/index.d.ts.map +1 -1
- package/lib/runner/index.js +2 -2
- package/lib/runner/integ-test-runner.d.ts +36 -36
- package/lib/runner/integ-test-runner.d.ts.map +1 -1
- package/lib/runner/integ-test-runner.js +172 -235
- package/lib/runner/integ-test-suite.d.ts +6 -11
- package/lib/runner/integ-test-suite.d.ts.map +1 -1
- package/lib/runner/integ-test-suite.js +14 -20
- package/lib/runner/integration-tests.d.ts +12 -3
- package/lib/runner/integration-tests.d.ts.map +1 -1
- package/lib/runner/integration-tests.js +32 -8
- package/lib/runner/snapshot-test-runner.d.ts +19 -22
- package/lib/runner/snapshot-test-runner.d.ts.map +1 -1
- package/lib/runner/snapshot-test-runner.js +47 -75
- package/lib/workers/extract/extract_worker.d.ts.map +1 -1
- package/lib/workers/extract/extract_worker.js +65 -78
- package/lib/workers/extract/index.js +228344 -227587
- package/lib/workers/integ-test-worker.d.ts.map +1 -1
- package/lib/workers/integ-test-worker.js +3 -2
- package/package.json +5 -5
- package/lib/runner/cdk-integ-helper.d.ts.map +0 -1
- package/lib/runner/cdk-integ-helper.js +0 -525
package/lib/index.js
CHANGED
|
@@ -917,15 +917,15 @@ var require_route = __commonJS({
|
|
|
917
917
|
}
|
|
918
918
|
__name(link, "link");
|
|
919
919
|
function wrapConversion(toModel, graph) {
|
|
920
|
-
const
|
|
920
|
+
const path5 = [graph[toModel].parent, toModel];
|
|
921
921
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
922
922
|
let cur = graph[toModel].parent;
|
|
923
923
|
while (graph[cur].parent) {
|
|
924
|
-
|
|
924
|
+
path5.unshift(graph[cur].parent);
|
|
925
925
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
926
926
|
cur = graph[cur].parent;
|
|
927
927
|
}
|
|
928
|
-
fn.conversion =
|
|
928
|
+
fn.conversion = path5;
|
|
929
929
|
return fn;
|
|
930
930
|
}
|
|
931
931
|
__name(wrapConversion, "wrapConversion");
|
|
@@ -2784,14 +2784,14 @@ var require_polyfills = __commonJS({
|
|
|
2784
2784
|
fs4.fstatSync = statFixSync(fs4.fstatSync);
|
|
2785
2785
|
fs4.lstatSync = statFixSync(fs4.lstatSync);
|
|
2786
2786
|
if (fs4.chmod && !fs4.lchmod) {
|
|
2787
|
-
fs4.lchmod = function(
|
|
2787
|
+
fs4.lchmod = function(path5, mode, cb) {
|
|
2788
2788
|
if (cb) process.nextTick(cb);
|
|
2789
2789
|
};
|
|
2790
2790
|
fs4.lchmodSync = function() {
|
|
2791
2791
|
};
|
|
2792
2792
|
}
|
|
2793
2793
|
if (fs4.chown && !fs4.lchown) {
|
|
2794
|
-
fs4.lchown = function(
|
|
2794
|
+
fs4.lchown = function(path5, uid, gid, cb) {
|
|
2795
2795
|
if (cb) process.nextTick(cb);
|
|
2796
2796
|
};
|
|
2797
2797
|
fs4.lchownSync = function() {
|
|
@@ -2860,9 +2860,9 @@ var require_polyfills = __commonJS({
|
|
|
2860
2860
|
};
|
|
2861
2861
|
})(fs4.readSync);
|
|
2862
2862
|
function patchLchmod(fs5) {
|
|
2863
|
-
fs5.lchmod = function(
|
|
2863
|
+
fs5.lchmod = function(path5, mode, callback) {
|
|
2864
2864
|
fs5.open(
|
|
2865
|
-
|
|
2865
|
+
path5,
|
|
2866
2866
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
2867
2867
|
mode,
|
|
2868
2868
|
function(err, fd) {
|
|
@@ -2878,8 +2878,8 @@ var require_polyfills = __commonJS({
|
|
|
2878
2878
|
}
|
|
2879
2879
|
);
|
|
2880
2880
|
};
|
|
2881
|
-
fs5.lchmodSync = function(
|
|
2882
|
-
var fd = fs5.openSync(
|
|
2881
|
+
fs5.lchmodSync = function(path5, mode) {
|
|
2882
|
+
var fd = fs5.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
2883
2883
|
var threw = true;
|
|
2884
2884
|
var ret;
|
|
2885
2885
|
try {
|
|
@@ -2901,8 +2901,8 @@ var require_polyfills = __commonJS({
|
|
|
2901
2901
|
__name(patchLchmod, "patchLchmod");
|
|
2902
2902
|
function patchLutimes(fs5) {
|
|
2903
2903
|
if (constants.hasOwnProperty("O_SYMLINK") && fs5.futimes) {
|
|
2904
|
-
fs5.lutimes = function(
|
|
2905
|
-
fs5.open(
|
|
2904
|
+
fs5.lutimes = function(path5, at, mt, cb) {
|
|
2905
|
+
fs5.open(path5, constants.O_SYMLINK, function(er, fd) {
|
|
2906
2906
|
if (er) {
|
|
2907
2907
|
if (cb) cb(er);
|
|
2908
2908
|
return;
|
|
@@ -2914,8 +2914,8 @@ var require_polyfills = __commonJS({
|
|
|
2914
2914
|
});
|
|
2915
2915
|
});
|
|
2916
2916
|
};
|
|
2917
|
-
fs5.lutimesSync = function(
|
|
2918
|
-
var fd = fs5.openSync(
|
|
2917
|
+
fs5.lutimesSync = function(path5, at, mt) {
|
|
2918
|
+
var fd = fs5.openSync(path5, constants.O_SYMLINK);
|
|
2919
2919
|
var ret;
|
|
2920
2920
|
var threw = true;
|
|
2921
2921
|
try {
|
|
@@ -3043,11 +3043,11 @@ var require_legacy_streams = __commonJS({
|
|
|
3043
3043
|
ReadStream,
|
|
3044
3044
|
WriteStream
|
|
3045
3045
|
};
|
|
3046
|
-
function ReadStream(
|
|
3047
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
3046
|
+
function ReadStream(path5, options) {
|
|
3047
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path5, options);
|
|
3048
3048
|
Stream.call(this);
|
|
3049
3049
|
var self2 = this;
|
|
3050
|
-
this.path =
|
|
3050
|
+
this.path = path5;
|
|
3051
3051
|
this.fd = null;
|
|
3052
3052
|
this.readable = true;
|
|
3053
3053
|
this.paused = false;
|
|
@@ -3093,10 +3093,10 @@ var require_legacy_streams = __commonJS({
|
|
|
3093
3093
|
});
|
|
3094
3094
|
}
|
|
3095
3095
|
__name(ReadStream, "ReadStream");
|
|
3096
|
-
function WriteStream(
|
|
3097
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
3096
|
+
function WriteStream(path5, options) {
|
|
3097
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path5, options);
|
|
3098
3098
|
Stream.call(this);
|
|
3099
|
-
this.path =
|
|
3099
|
+
this.path = path5;
|
|
3100
3100
|
this.fd = null;
|
|
3101
3101
|
this.writable = true;
|
|
3102
3102
|
this.flags = "w";
|
|
@@ -3246,14 +3246,14 @@ var require_graceful_fs = __commonJS({
|
|
|
3246
3246
|
fs5.createWriteStream = createWriteStream;
|
|
3247
3247
|
var fs$readFile = fs5.readFile;
|
|
3248
3248
|
fs5.readFile = readFile2;
|
|
3249
|
-
function readFile2(
|
|
3249
|
+
function readFile2(path5, options, cb) {
|
|
3250
3250
|
if (typeof options === "function")
|
|
3251
3251
|
cb = options, options = null;
|
|
3252
|
-
return go$readFile(
|
|
3253
|
-
function go$readFile(
|
|
3254
|
-
return fs$readFile(
|
|
3252
|
+
return go$readFile(path5, options, cb);
|
|
3253
|
+
function go$readFile(path6, options2, cb2, startTime) {
|
|
3254
|
+
return fs$readFile(path6, options2, function(err) {
|
|
3255
3255
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3256
|
-
enqueue([go$readFile, [
|
|
3256
|
+
enqueue([go$readFile, [path6, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3257
3257
|
else {
|
|
3258
3258
|
if (typeof cb2 === "function")
|
|
3259
3259
|
cb2.apply(this, arguments);
|
|
@@ -3265,14 +3265,14 @@ var require_graceful_fs = __commonJS({
|
|
|
3265
3265
|
__name(readFile2, "readFile");
|
|
3266
3266
|
var fs$writeFile = fs5.writeFile;
|
|
3267
3267
|
fs5.writeFile = writeFile;
|
|
3268
|
-
function writeFile(
|
|
3268
|
+
function writeFile(path5, data, options, cb) {
|
|
3269
3269
|
if (typeof options === "function")
|
|
3270
3270
|
cb = options, options = null;
|
|
3271
|
-
return go$writeFile(
|
|
3272
|
-
function go$writeFile(
|
|
3273
|
-
return fs$writeFile(
|
|
3271
|
+
return go$writeFile(path5, data, options, cb);
|
|
3272
|
+
function go$writeFile(path6, data2, options2, cb2, startTime) {
|
|
3273
|
+
return fs$writeFile(path6, data2, options2, function(err) {
|
|
3274
3274
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3275
|
-
enqueue([go$writeFile, [
|
|
3275
|
+
enqueue([go$writeFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3276
3276
|
else {
|
|
3277
3277
|
if (typeof cb2 === "function")
|
|
3278
3278
|
cb2.apply(this, arguments);
|
|
@@ -3285,14 +3285,14 @@ var require_graceful_fs = __commonJS({
|
|
|
3285
3285
|
var fs$appendFile = fs5.appendFile;
|
|
3286
3286
|
if (fs$appendFile)
|
|
3287
3287
|
fs5.appendFile = appendFile;
|
|
3288
|
-
function appendFile(
|
|
3288
|
+
function appendFile(path5, data, options, cb) {
|
|
3289
3289
|
if (typeof options === "function")
|
|
3290
3290
|
cb = options, options = null;
|
|
3291
|
-
return go$appendFile(
|
|
3292
|
-
function go$appendFile(
|
|
3293
|
-
return fs$appendFile(
|
|
3291
|
+
return go$appendFile(path5, data, options, cb);
|
|
3292
|
+
function go$appendFile(path6, data2, options2, cb2, startTime) {
|
|
3293
|
+
return fs$appendFile(path6, data2, options2, function(err) {
|
|
3294
3294
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3295
|
-
enqueue([go$appendFile, [
|
|
3295
|
+
enqueue([go$appendFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3296
3296
|
else {
|
|
3297
3297
|
if (typeof cb2 === "function")
|
|
3298
3298
|
cb2.apply(this, arguments);
|
|
@@ -3327,31 +3327,31 @@ var require_graceful_fs = __commonJS({
|
|
|
3327
3327
|
var fs$readdir = fs5.readdir;
|
|
3328
3328
|
fs5.readdir = readdir2;
|
|
3329
3329
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
3330
|
-
function readdir2(
|
|
3330
|
+
function readdir2(path5, options, cb) {
|
|
3331
3331
|
if (typeof options === "function")
|
|
3332
3332
|
cb = options, options = null;
|
|
3333
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? /* @__PURE__ */ __name(function go$readdir2(
|
|
3334
|
-
return fs$readdir(
|
|
3335
|
-
|
|
3333
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? /* @__PURE__ */ __name(function go$readdir2(path6, options2, cb2, startTime) {
|
|
3334
|
+
return fs$readdir(path6, fs$readdirCallback(
|
|
3335
|
+
path6,
|
|
3336
3336
|
options2,
|
|
3337
3337
|
cb2,
|
|
3338
3338
|
startTime
|
|
3339
3339
|
));
|
|
3340
|
-
}, "go$readdir") : /* @__PURE__ */ __name(function go$readdir2(
|
|
3341
|
-
return fs$readdir(
|
|
3342
|
-
|
|
3340
|
+
}, "go$readdir") : /* @__PURE__ */ __name(function go$readdir2(path6, options2, cb2, startTime) {
|
|
3341
|
+
return fs$readdir(path6, options2, fs$readdirCallback(
|
|
3342
|
+
path6,
|
|
3343
3343
|
options2,
|
|
3344
3344
|
cb2,
|
|
3345
3345
|
startTime
|
|
3346
3346
|
));
|
|
3347
3347
|
}, "go$readdir");
|
|
3348
|
-
return go$readdir(
|
|
3349
|
-
function fs$readdirCallback(
|
|
3348
|
+
return go$readdir(path5, options, cb);
|
|
3349
|
+
function fs$readdirCallback(path6, options2, cb2, startTime) {
|
|
3350
3350
|
return function(err, files) {
|
|
3351
3351
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3352
3352
|
enqueue([
|
|
3353
3353
|
go$readdir,
|
|
3354
|
-
[
|
|
3354
|
+
[path6, options2, cb2],
|
|
3355
3355
|
err,
|
|
3356
3356
|
startTime || Date.now(),
|
|
3357
3357
|
Date.now()
|
|
@@ -3424,7 +3424,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3424
3424
|
enumerable: true,
|
|
3425
3425
|
configurable: true
|
|
3426
3426
|
});
|
|
3427
|
-
function ReadStream(
|
|
3427
|
+
function ReadStream(path5, options) {
|
|
3428
3428
|
if (this instanceof ReadStream)
|
|
3429
3429
|
return fs$ReadStream.apply(this, arguments), this;
|
|
3430
3430
|
else
|
|
@@ -3446,7 +3446,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3446
3446
|
});
|
|
3447
3447
|
}
|
|
3448
3448
|
__name(ReadStream$open, "ReadStream$open");
|
|
3449
|
-
function WriteStream(
|
|
3449
|
+
function WriteStream(path5, options) {
|
|
3450
3450
|
if (this instanceof WriteStream)
|
|
3451
3451
|
return fs$WriteStream.apply(this, arguments), this;
|
|
3452
3452
|
else
|
|
@@ -3466,24 +3466,24 @@ var require_graceful_fs = __commonJS({
|
|
|
3466
3466
|
});
|
|
3467
3467
|
}
|
|
3468
3468
|
__name(WriteStream$open, "WriteStream$open");
|
|
3469
|
-
function createReadStream(
|
|
3470
|
-
return new fs5.ReadStream(
|
|
3469
|
+
function createReadStream(path5, options) {
|
|
3470
|
+
return new fs5.ReadStream(path5, options);
|
|
3471
3471
|
}
|
|
3472
3472
|
__name(createReadStream, "createReadStream");
|
|
3473
|
-
function createWriteStream(
|
|
3474
|
-
return new fs5.WriteStream(
|
|
3473
|
+
function createWriteStream(path5, options) {
|
|
3474
|
+
return new fs5.WriteStream(path5, options);
|
|
3475
3475
|
}
|
|
3476
3476
|
__name(createWriteStream, "createWriteStream");
|
|
3477
3477
|
var fs$open = fs5.open;
|
|
3478
3478
|
fs5.open = open;
|
|
3479
|
-
function open(
|
|
3479
|
+
function open(path5, flags, mode, cb) {
|
|
3480
3480
|
if (typeof mode === "function")
|
|
3481
3481
|
cb = mode, mode = null;
|
|
3482
|
-
return go$open(
|
|
3483
|
-
function go$open(
|
|
3484
|
-
return fs$open(
|
|
3482
|
+
return go$open(path5, flags, mode, cb);
|
|
3483
|
+
function go$open(path6, flags2, mode2, cb2, startTime) {
|
|
3484
|
+
return fs$open(path6, flags2, mode2, function(err, fd) {
|
|
3485
3485
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3486
|
-
enqueue([go$open, [
|
|
3486
|
+
enqueue([go$open, [path6, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3487
3487
|
else {
|
|
3488
3488
|
if (typeof cb2 === "function")
|
|
3489
3489
|
cb2.apply(this, arguments);
|
|
@@ -3672,10 +3672,10 @@ var require_fs = __commonJS({
|
|
|
3672
3672
|
var require_utils = __commonJS({
|
|
3673
3673
|
"../../../node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
|
|
3674
3674
|
"use strict";
|
|
3675
|
-
var
|
|
3675
|
+
var path5 = require("path");
|
|
3676
3676
|
module2.exports.checkPath = /* @__PURE__ */ __name(function checkPath(pth) {
|
|
3677
3677
|
if (process.platform === "win32") {
|
|
3678
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(
|
|
3678
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path5.parse(pth).root, ""));
|
|
3679
3679
|
if (pathHasInvalidWinCharacters) {
|
|
3680
3680
|
const error2 = new Error(`Path contains invalid characters: ${pth}`);
|
|
3681
3681
|
error2.code = "EINVAL";
|
|
@@ -3739,8 +3739,8 @@ var require_path_exists = __commonJS({
|
|
|
3739
3739
|
"use strict";
|
|
3740
3740
|
var u = require_universalify().fromPromise;
|
|
3741
3741
|
var fs4 = require_fs();
|
|
3742
|
-
function pathExists(
|
|
3743
|
-
return fs4.access(
|
|
3742
|
+
function pathExists(path5) {
|
|
3743
|
+
return fs4.access(path5).then(() => true).catch(() => false);
|
|
3744
3744
|
}
|
|
3745
3745
|
__name(pathExists, "pathExists");
|
|
3746
3746
|
module2.exports = {
|
|
@@ -3756,8 +3756,8 @@ var require_utimes = __commonJS({
|
|
|
3756
3756
|
"use strict";
|
|
3757
3757
|
var fs4 = require_fs();
|
|
3758
3758
|
var u = require_universalify().fromPromise;
|
|
3759
|
-
async function utimesMillis(
|
|
3760
|
-
const fd = await fs4.open(
|
|
3759
|
+
async function utimesMillis(path5, atime, mtime) {
|
|
3760
|
+
const fd = await fs4.open(path5, "r+");
|
|
3761
3761
|
let error2 = null;
|
|
3762
3762
|
try {
|
|
3763
3763
|
await fs4.futimes(fd, atime, mtime);
|
|
@@ -3775,8 +3775,8 @@ var require_utimes = __commonJS({
|
|
|
3775
3775
|
}
|
|
3776
3776
|
}
|
|
3777
3777
|
__name(utimesMillis, "utimesMillis");
|
|
3778
|
-
function utimesMillisSync(
|
|
3779
|
-
const fd = fs4.openSync(
|
|
3778
|
+
function utimesMillisSync(path5, atime, mtime) {
|
|
3779
|
+
const fd = fs4.openSync(path5, "r+");
|
|
3780
3780
|
let error2 = null;
|
|
3781
3781
|
try {
|
|
3782
3782
|
fs4.futimesSync(fd, atime, mtime);
|
|
@@ -3806,7 +3806,7 @@ var require_stat = __commonJS({
|
|
|
3806
3806
|
"../../../node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
|
|
3807
3807
|
"use strict";
|
|
3808
3808
|
var fs4 = require_fs();
|
|
3809
|
-
var
|
|
3809
|
+
var path5 = require("path");
|
|
3810
3810
|
var u = require_universalify().fromPromise;
|
|
3811
3811
|
function getStats(src, dest, opts) {
|
|
3812
3812
|
const statFunc = opts.dereference ? (file) => fs4.stat(file, { bigint: true }) : (file) => fs4.lstat(file, { bigint: true });
|
|
@@ -3836,8 +3836,8 @@ var require_stat = __commonJS({
|
|
|
3836
3836
|
const { srcStat, destStat } = await getStats(src, dest, opts);
|
|
3837
3837
|
if (destStat) {
|
|
3838
3838
|
if (areIdentical(srcStat, destStat)) {
|
|
3839
|
-
const srcBaseName =
|
|
3840
|
-
const destBaseName =
|
|
3839
|
+
const srcBaseName = path5.basename(src);
|
|
3840
|
+
const destBaseName = path5.basename(dest);
|
|
3841
3841
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
3842
3842
|
return { srcStat, destStat, isChangingCase: true };
|
|
3843
3843
|
}
|
|
@@ -3860,8 +3860,8 @@ var require_stat = __commonJS({
|
|
|
3860
3860
|
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
3861
3861
|
if (destStat) {
|
|
3862
3862
|
if (areIdentical(srcStat, destStat)) {
|
|
3863
|
-
const srcBaseName =
|
|
3864
|
-
const destBaseName =
|
|
3863
|
+
const srcBaseName = path5.basename(src);
|
|
3864
|
+
const destBaseName = path5.basename(dest);
|
|
3865
3865
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
3866
3866
|
return { srcStat, destStat, isChangingCase: true };
|
|
3867
3867
|
}
|
|
@@ -3881,9 +3881,9 @@ var require_stat = __commonJS({
|
|
|
3881
3881
|
}
|
|
3882
3882
|
__name(checkPathsSync, "checkPathsSync");
|
|
3883
3883
|
async function checkParentPaths(src, srcStat, dest, funcName) {
|
|
3884
|
-
const srcParent =
|
|
3885
|
-
const destParent =
|
|
3886
|
-
if (destParent === srcParent || destParent ===
|
|
3884
|
+
const srcParent = path5.resolve(path5.dirname(src));
|
|
3885
|
+
const destParent = path5.resolve(path5.dirname(dest));
|
|
3886
|
+
if (destParent === srcParent || destParent === path5.parse(destParent).root) return;
|
|
3887
3887
|
let destStat;
|
|
3888
3888
|
try {
|
|
3889
3889
|
destStat = await fs4.stat(destParent, { bigint: true });
|
|
@@ -3898,9 +3898,9 @@ var require_stat = __commonJS({
|
|
|
3898
3898
|
}
|
|
3899
3899
|
__name(checkParentPaths, "checkParentPaths");
|
|
3900
3900
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
3901
|
-
const srcParent =
|
|
3902
|
-
const destParent =
|
|
3903
|
-
if (destParent === srcParent || destParent ===
|
|
3901
|
+
const srcParent = path5.resolve(path5.dirname(src));
|
|
3902
|
+
const destParent = path5.resolve(path5.dirname(dest));
|
|
3903
|
+
if (destParent === srcParent || destParent === path5.parse(destParent).root) return;
|
|
3904
3904
|
let destStat;
|
|
3905
3905
|
try {
|
|
3906
3906
|
destStat = fs4.statSync(destParent, { bigint: true });
|
|
@@ -3919,8 +3919,8 @@ var require_stat = __commonJS({
|
|
|
3919
3919
|
}
|
|
3920
3920
|
__name(areIdentical, "areIdentical");
|
|
3921
3921
|
function isSrcSubdir(src, dest) {
|
|
3922
|
-
const srcArr =
|
|
3923
|
-
const destArr =
|
|
3922
|
+
const srcArr = path5.resolve(src).split(path5.sep).filter((i) => i);
|
|
3923
|
+
const destArr = path5.resolve(dest).split(path5.sep).filter((i) => i);
|
|
3924
3924
|
return srcArr.every((cur, i) => destArr[i] === cur);
|
|
3925
3925
|
}
|
|
3926
3926
|
__name(isSrcSubdir, "isSrcSubdir");
|
|
@@ -3976,7 +3976,7 @@ var require_copy = __commonJS({
|
|
|
3976
3976
|
"../../../node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
|
|
3977
3977
|
"use strict";
|
|
3978
3978
|
var fs4 = require_fs();
|
|
3979
|
-
var
|
|
3979
|
+
var path5 = require("path");
|
|
3980
3980
|
var { mkdirs } = require_mkdirs();
|
|
3981
3981
|
var { pathExists } = require_path_exists();
|
|
3982
3982
|
var { utimesMillis } = require_utimes();
|
|
@@ -3999,7 +3999,7 @@ var require_copy = __commonJS({
|
|
|
3999
3999
|
await stat2.checkParentPaths(src, srcStat, dest, "copy");
|
|
4000
4000
|
const include = await runFilter(src, dest, opts);
|
|
4001
4001
|
if (!include) return;
|
|
4002
|
-
const destParent =
|
|
4002
|
+
const destParent = path5.dirname(dest);
|
|
4003
4003
|
const dirExists = await pathExists(destParent);
|
|
4004
4004
|
if (!dirExists) {
|
|
4005
4005
|
await mkdirs(destParent);
|
|
@@ -4059,8 +4059,8 @@ var require_copy = __commonJS({
|
|
|
4059
4059
|
await fs4.mkdir(dest);
|
|
4060
4060
|
}
|
|
4061
4061
|
await asyncIteratorConcurrentProcess(await fs4.opendir(src), async (item) => {
|
|
4062
|
-
const srcItem =
|
|
4063
|
-
const destItem =
|
|
4062
|
+
const srcItem = path5.join(src, item.name);
|
|
4063
|
+
const destItem = path5.join(dest, item.name);
|
|
4064
4064
|
const include = await runFilter(srcItem, destItem, opts);
|
|
4065
4065
|
if (include) {
|
|
4066
4066
|
const { destStat: destStat2 } = await stat2.checkPaths(srcItem, destItem, "copy", opts);
|
|
@@ -4075,7 +4075,7 @@ var require_copy = __commonJS({
|
|
|
4075
4075
|
async function onLink(destStat, src, dest, opts) {
|
|
4076
4076
|
let resolvedSrc = await fs4.readlink(src);
|
|
4077
4077
|
if (opts.dereference) {
|
|
4078
|
-
resolvedSrc =
|
|
4078
|
+
resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
|
|
4079
4079
|
}
|
|
4080
4080
|
if (!destStat) {
|
|
4081
4081
|
return fs4.symlink(resolvedSrc, dest);
|
|
@@ -4088,7 +4088,7 @@ var require_copy = __commonJS({
|
|
|
4088
4088
|
throw e;
|
|
4089
4089
|
}
|
|
4090
4090
|
if (opts.dereference) {
|
|
4091
|
-
resolvedDest =
|
|
4091
|
+
resolvedDest = path5.resolve(process.cwd(), resolvedDest);
|
|
4092
4092
|
}
|
|
4093
4093
|
if (resolvedSrc !== resolvedDest) {
|
|
4094
4094
|
if (stat2.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
@@ -4111,7 +4111,7 @@ var require_copy_sync = __commonJS({
|
|
|
4111
4111
|
"../../../node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
|
|
4112
4112
|
"use strict";
|
|
4113
4113
|
var fs4 = require_graceful_fs();
|
|
4114
|
-
var
|
|
4114
|
+
var path5 = require("path");
|
|
4115
4115
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
4116
4116
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
4117
4117
|
var stat2 = require_stat();
|
|
@@ -4132,7 +4132,7 @@ var require_copy_sync = __commonJS({
|
|
|
4132
4132
|
const { srcStat, destStat } = stat2.checkPathsSync(src, dest, "copy", opts);
|
|
4133
4133
|
stat2.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
4134
4134
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
4135
|
-
const destParent =
|
|
4135
|
+
const destParent = path5.dirname(dest);
|
|
4136
4136
|
if (!fs4.existsSync(destParent)) mkdirsSync(destParent);
|
|
4137
4137
|
return getStats(destStat, src, dest, opts);
|
|
4138
4138
|
}
|
|
@@ -4214,8 +4214,8 @@ var require_copy_sync = __commonJS({
|
|
|
4214
4214
|
}
|
|
4215
4215
|
__name(copyDir, "copyDir");
|
|
4216
4216
|
function copyDirItem(item, src, dest, opts) {
|
|
4217
|
-
const srcItem =
|
|
4218
|
-
const destItem =
|
|
4217
|
+
const srcItem = path5.join(src, item);
|
|
4218
|
+
const destItem = path5.join(dest, item);
|
|
4219
4219
|
if (opts.filter && !opts.filter(srcItem, destItem)) return;
|
|
4220
4220
|
const { destStat } = stat2.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
4221
4221
|
return getStats(destStat, srcItem, destItem, opts);
|
|
@@ -4224,7 +4224,7 @@ var require_copy_sync = __commonJS({
|
|
|
4224
4224
|
function onLink(destStat, src, dest, opts) {
|
|
4225
4225
|
let resolvedSrc = fs4.readlinkSync(src);
|
|
4226
4226
|
if (opts.dereference) {
|
|
4227
|
-
resolvedSrc =
|
|
4227
|
+
resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
|
|
4228
4228
|
}
|
|
4229
4229
|
if (!destStat) {
|
|
4230
4230
|
return fs4.symlinkSync(resolvedSrc, dest);
|
|
@@ -4237,7 +4237,7 @@ var require_copy_sync = __commonJS({
|
|
|
4237
4237
|
throw err;
|
|
4238
4238
|
}
|
|
4239
4239
|
if (opts.dereference) {
|
|
4240
|
-
resolvedDest =
|
|
4240
|
+
resolvedDest = path5.resolve(process.cwd(), resolvedDest);
|
|
4241
4241
|
}
|
|
4242
4242
|
if (resolvedSrc !== resolvedDest) {
|
|
4243
4243
|
if (stat2.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
@@ -4278,12 +4278,12 @@ var require_remove = __commonJS({
|
|
|
4278
4278
|
"use strict";
|
|
4279
4279
|
var fs4 = require_graceful_fs();
|
|
4280
4280
|
var u = require_universalify().fromCallback;
|
|
4281
|
-
function remove(
|
|
4282
|
-
fs4.rm(
|
|
4281
|
+
function remove(path5, callback) {
|
|
4282
|
+
fs4.rm(path5, { recursive: true, force: true }, callback);
|
|
4283
4283
|
}
|
|
4284
4284
|
__name(remove, "remove");
|
|
4285
|
-
function removeSync(
|
|
4286
|
-
fs4.rmSync(
|
|
4285
|
+
function removeSync(path5) {
|
|
4286
|
+
fs4.rmSync(path5, { recursive: true, force: true });
|
|
4287
4287
|
}
|
|
4288
4288
|
__name(removeSync, "removeSync");
|
|
4289
4289
|
module2.exports = {
|
|
@@ -4299,7 +4299,7 @@ var require_empty = __commonJS({
|
|
|
4299
4299
|
"use strict";
|
|
4300
4300
|
var u = require_universalify().fromPromise;
|
|
4301
4301
|
var fs4 = require_fs();
|
|
4302
|
-
var
|
|
4302
|
+
var path5 = require("path");
|
|
4303
4303
|
var mkdir = require_mkdirs();
|
|
4304
4304
|
var remove = require_remove();
|
|
4305
4305
|
var emptyDir = u(/* @__PURE__ */ __name(async function emptyDir2(dir) {
|
|
@@ -4309,7 +4309,7 @@ var require_empty = __commonJS({
|
|
|
4309
4309
|
} catch {
|
|
4310
4310
|
return mkdir.mkdirs(dir);
|
|
4311
4311
|
}
|
|
4312
|
-
return Promise.all(items.map((item) => remove.remove(
|
|
4312
|
+
return Promise.all(items.map((item) => remove.remove(path5.join(dir, item))));
|
|
4313
4313
|
}, "emptyDir"));
|
|
4314
4314
|
function emptyDirSync(dir) {
|
|
4315
4315
|
let items;
|
|
@@ -4319,7 +4319,7 @@ var require_empty = __commonJS({
|
|
|
4319
4319
|
return mkdir.mkdirsSync(dir);
|
|
4320
4320
|
}
|
|
4321
4321
|
items.forEach((item) => {
|
|
4322
|
-
item =
|
|
4322
|
+
item = path5.join(dir, item);
|
|
4323
4323
|
remove.removeSync(item);
|
|
4324
4324
|
});
|
|
4325
4325
|
}
|
|
@@ -4338,7 +4338,7 @@ var require_file = __commonJS({
|
|
|
4338
4338
|
"../../../node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
|
|
4339
4339
|
"use strict";
|
|
4340
4340
|
var u = require_universalify().fromPromise;
|
|
4341
|
-
var
|
|
4341
|
+
var path5 = require("path");
|
|
4342
4342
|
var fs4 = require_fs();
|
|
4343
4343
|
var mkdir = require_mkdirs();
|
|
4344
4344
|
async function createFile(file) {
|
|
@@ -4348,7 +4348,7 @@ var require_file = __commonJS({
|
|
|
4348
4348
|
} catch {
|
|
4349
4349
|
}
|
|
4350
4350
|
if (stats && stats.isFile()) return;
|
|
4351
|
-
const dir =
|
|
4351
|
+
const dir = path5.dirname(file);
|
|
4352
4352
|
let dirStats = null;
|
|
4353
4353
|
try {
|
|
4354
4354
|
dirStats = await fs4.stat(dir);
|
|
@@ -4375,7 +4375,7 @@ var require_file = __commonJS({
|
|
|
4375
4375
|
} catch {
|
|
4376
4376
|
}
|
|
4377
4377
|
if (stats && stats.isFile()) return;
|
|
4378
|
-
const dir =
|
|
4378
|
+
const dir = path5.dirname(file);
|
|
4379
4379
|
try {
|
|
4380
4380
|
if (!fs4.statSync(dir).isDirectory()) {
|
|
4381
4381
|
fs4.readdirSync(dir);
|
|
@@ -4399,7 +4399,7 @@ var require_link = __commonJS({
|
|
|
4399
4399
|
"../../../node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
|
|
4400
4400
|
"use strict";
|
|
4401
4401
|
var u = require_universalify().fromPromise;
|
|
4402
|
-
var
|
|
4402
|
+
var path5 = require("path");
|
|
4403
4403
|
var fs4 = require_fs();
|
|
4404
4404
|
var mkdir = require_mkdirs();
|
|
4405
4405
|
var { pathExists } = require_path_exists();
|
|
@@ -4418,7 +4418,7 @@ var require_link = __commonJS({
|
|
|
4418
4418
|
throw err;
|
|
4419
4419
|
}
|
|
4420
4420
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
4421
|
-
const dir =
|
|
4421
|
+
const dir = path5.dirname(dstpath);
|
|
4422
4422
|
const dirExists = await pathExists(dir);
|
|
4423
4423
|
if (!dirExists) {
|
|
4424
4424
|
await mkdir.mkdirs(dir);
|
|
@@ -4439,7 +4439,7 @@ var require_link = __commonJS({
|
|
|
4439
4439
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
4440
4440
|
throw err;
|
|
4441
4441
|
}
|
|
4442
|
-
const dir =
|
|
4442
|
+
const dir = path5.dirname(dstpath);
|
|
4443
4443
|
const dirExists = fs4.existsSync(dir);
|
|
4444
4444
|
if (dirExists) return fs4.linkSync(srcpath, dstpath);
|
|
4445
4445
|
mkdir.mkdirsSync(dir);
|
|
@@ -4457,12 +4457,12 @@ var require_link = __commonJS({
|
|
|
4457
4457
|
var require_symlink_paths = __commonJS({
|
|
4458
4458
|
"../../../node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
|
|
4459
4459
|
"use strict";
|
|
4460
|
-
var
|
|
4460
|
+
var path5 = require("path");
|
|
4461
4461
|
var fs4 = require_fs();
|
|
4462
4462
|
var { pathExists } = require_path_exists();
|
|
4463
4463
|
var u = require_universalify().fromPromise;
|
|
4464
4464
|
async function symlinkPaths(srcpath, dstpath) {
|
|
4465
|
-
if (
|
|
4465
|
+
if (path5.isAbsolute(srcpath)) {
|
|
4466
4466
|
try {
|
|
4467
4467
|
await fs4.lstat(srcpath);
|
|
4468
4468
|
} catch (err) {
|
|
@@ -4474,8 +4474,8 @@ var require_symlink_paths = __commonJS({
|
|
|
4474
4474
|
toDst: srcpath
|
|
4475
4475
|
};
|
|
4476
4476
|
}
|
|
4477
|
-
const dstdir =
|
|
4478
|
-
const relativeToDst =
|
|
4477
|
+
const dstdir = path5.dirname(dstpath);
|
|
4478
|
+
const relativeToDst = path5.join(dstdir, srcpath);
|
|
4479
4479
|
const exists = await pathExists(relativeToDst);
|
|
4480
4480
|
if (exists) {
|
|
4481
4481
|
return {
|
|
@@ -4491,12 +4491,12 @@ var require_symlink_paths = __commonJS({
|
|
|
4491
4491
|
}
|
|
4492
4492
|
return {
|
|
4493
4493
|
toCwd: srcpath,
|
|
4494
|
-
toDst:
|
|
4494
|
+
toDst: path5.relative(dstdir, srcpath)
|
|
4495
4495
|
};
|
|
4496
4496
|
}
|
|
4497
4497
|
__name(symlinkPaths, "symlinkPaths");
|
|
4498
4498
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
4499
|
-
if (
|
|
4499
|
+
if (path5.isAbsolute(srcpath)) {
|
|
4500
4500
|
const exists2 = fs4.existsSync(srcpath);
|
|
4501
4501
|
if (!exists2) throw new Error("absolute srcpath does not exist");
|
|
4502
4502
|
return {
|
|
@@ -4504,8 +4504,8 @@ var require_symlink_paths = __commonJS({
|
|
|
4504
4504
|
toDst: srcpath
|
|
4505
4505
|
};
|
|
4506
4506
|
}
|
|
4507
|
-
const dstdir =
|
|
4508
|
-
const relativeToDst =
|
|
4507
|
+
const dstdir = path5.dirname(dstpath);
|
|
4508
|
+
const relativeToDst = path5.join(dstdir, srcpath);
|
|
4509
4509
|
const exists = fs4.existsSync(relativeToDst);
|
|
4510
4510
|
if (exists) {
|
|
4511
4511
|
return {
|
|
@@ -4517,7 +4517,7 @@ var require_symlink_paths = __commonJS({
|
|
|
4517
4517
|
if (!srcExists) throw new Error("relative srcpath does not exist");
|
|
4518
4518
|
return {
|
|
4519
4519
|
toCwd: srcpath,
|
|
4520
|
-
toDst:
|
|
4520
|
+
toDst: path5.relative(dstdir, srcpath)
|
|
4521
4521
|
};
|
|
4522
4522
|
}
|
|
4523
4523
|
__name(symlinkPathsSync, "symlinkPathsSync");
|
|
@@ -4568,7 +4568,7 @@ var require_symlink = __commonJS({
|
|
|
4568
4568
|
"../../../node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
|
|
4569
4569
|
"use strict";
|
|
4570
4570
|
var u = require_universalify().fromPromise;
|
|
4571
|
-
var
|
|
4571
|
+
var path5 = require("path");
|
|
4572
4572
|
var fs4 = require_fs();
|
|
4573
4573
|
var { mkdirs, mkdirsSync } = require_mkdirs();
|
|
4574
4574
|
var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
|
|
@@ -4583,11 +4583,11 @@ var require_symlink = __commonJS({
|
|
|
4583
4583
|
}
|
|
4584
4584
|
if (stats && stats.isSymbolicLink()) {
|
|
4585
4585
|
let srcStat;
|
|
4586
|
-
if (
|
|
4586
|
+
if (path5.isAbsolute(srcpath)) {
|
|
4587
4587
|
srcStat = await fs4.stat(srcpath, { bigint: true });
|
|
4588
4588
|
} else {
|
|
4589
|
-
const dstdir =
|
|
4590
|
-
const relativeToDst =
|
|
4589
|
+
const dstdir = path5.dirname(dstpath);
|
|
4590
|
+
const relativeToDst = path5.join(dstdir, srcpath);
|
|
4591
4591
|
try {
|
|
4592
4592
|
srcStat = await fs4.stat(relativeToDst, { bigint: true });
|
|
4593
4593
|
} catch {
|
|
@@ -4600,7 +4600,7 @@ var require_symlink = __commonJS({
|
|
|
4600
4600
|
const relative2 = await symlinkPaths(srcpath, dstpath);
|
|
4601
4601
|
srcpath = relative2.toDst;
|
|
4602
4602
|
const toType = await symlinkType(relative2.toCwd, type);
|
|
4603
|
-
const dir =
|
|
4603
|
+
const dir = path5.dirname(dstpath);
|
|
4604
4604
|
if (!await pathExists(dir)) {
|
|
4605
4605
|
await mkdirs(dir);
|
|
4606
4606
|
}
|
|
@@ -4615,11 +4615,11 @@ var require_symlink = __commonJS({
|
|
|
4615
4615
|
}
|
|
4616
4616
|
if (stats && stats.isSymbolicLink()) {
|
|
4617
4617
|
let srcStat;
|
|
4618
|
-
if (
|
|
4618
|
+
if (path5.isAbsolute(srcpath)) {
|
|
4619
4619
|
srcStat = fs4.statSync(srcpath, { bigint: true });
|
|
4620
4620
|
} else {
|
|
4621
|
-
const dstdir =
|
|
4622
|
-
const relativeToDst =
|
|
4621
|
+
const dstdir = path5.dirname(dstpath);
|
|
4622
|
+
const relativeToDst = path5.join(dstdir, srcpath);
|
|
4623
4623
|
try {
|
|
4624
4624
|
srcStat = fs4.statSync(relativeToDst, { bigint: true });
|
|
4625
4625
|
} catch {
|
|
@@ -4632,7 +4632,7 @@ var require_symlink = __commonJS({
|
|
|
4632
4632
|
const relative2 = symlinkPathsSync(srcpath, dstpath);
|
|
4633
4633
|
srcpath = relative2.toDst;
|
|
4634
4634
|
type = symlinkTypeSync(relative2.toCwd, type);
|
|
4635
|
-
const dir =
|
|
4635
|
+
const dir = path5.dirname(dstpath);
|
|
4636
4636
|
const exists = fs4.existsSync(dir);
|
|
4637
4637
|
if (exists) return fs4.symlinkSync(srcpath, dstpath, type);
|
|
4638
4638
|
mkdirsSync(dir);
|
|
@@ -4788,11 +4788,11 @@ var require_output_file = __commonJS({
|
|
|
4788
4788
|
"use strict";
|
|
4789
4789
|
var u = require_universalify().fromPromise;
|
|
4790
4790
|
var fs4 = require_fs();
|
|
4791
|
-
var
|
|
4791
|
+
var path5 = require("path");
|
|
4792
4792
|
var mkdir = require_mkdirs();
|
|
4793
4793
|
var pathExists = require_path_exists().pathExists;
|
|
4794
4794
|
async function outputFile(file, data, encoding = "utf-8") {
|
|
4795
|
-
const dir =
|
|
4795
|
+
const dir = path5.dirname(file);
|
|
4796
4796
|
if (!await pathExists(dir)) {
|
|
4797
4797
|
await mkdir.mkdirs(dir);
|
|
4798
4798
|
}
|
|
@@ -4800,7 +4800,7 @@ var require_output_file = __commonJS({
|
|
|
4800
4800
|
}
|
|
4801
4801
|
__name(outputFile, "outputFile");
|
|
4802
4802
|
function outputFileSync(file, ...args) {
|
|
4803
|
-
const dir =
|
|
4803
|
+
const dir = path5.dirname(file);
|
|
4804
4804
|
if (!fs4.existsSync(dir)) {
|
|
4805
4805
|
mkdir.mkdirsSync(dir);
|
|
4806
4806
|
}
|
|
@@ -4867,7 +4867,7 @@ var require_move = __commonJS({
|
|
|
4867
4867
|
"../../../node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
|
|
4868
4868
|
"use strict";
|
|
4869
4869
|
var fs4 = require_fs();
|
|
4870
|
-
var
|
|
4870
|
+
var path5 = require("path");
|
|
4871
4871
|
var { copy } = require_copy2();
|
|
4872
4872
|
var { remove } = require_remove();
|
|
4873
4873
|
var { mkdirp } = require_mkdirs();
|
|
@@ -4877,8 +4877,8 @@ var require_move = __commonJS({
|
|
|
4877
4877
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
4878
4878
|
const { srcStat, isChangingCase = false } = await stat2.checkPaths(src, dest, "move", opts);
|
|
4879
4879
|
await stat2.checkParentPaths(src, srcStat, dest, "move");
|
|
4880
|
-
const destParent =
|
|
4881
|
-
const parsedParentPath =
|
|
4880
|
+
const destParent = path5.dirname(dest);
|
|
4881
|
+
const parsedParentPath = path5.parse(destParent);
|
|
4882
4882
|
if (parsedParentPath.root !== destParent) {
|
|
4883
4883
|
await mkdirp(destParent);
|
|
4884
4884
|
}
|
|
@@ -4922,7 +4922,7 @@ var require_move_sync = __commonJS({
|
|
|
4922
4922
|
"../../../node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
|
|
4923
4923
|
"use strict";
|
|
4924
4924
|
var fs4 = require_graceful_fs();
|
|
4925
|
-
var
|
|
4925
|
+
var path5 = require("path");
|
|
4926
4926
|
var copySync = require_copy2().copySync;
|
|
4927
4927
|
var removeSync = require_remove().removeSync;
|
|
4928
4928
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -4932,13 +4932,13 @@ var require_move_sync = __commonJS({
|
|
|
4932
4932
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
4933
4933
|
const { srcStat, isChangingCase = false } = stat2.checkPathsSync(src, dest, "move", opts);
|
|
4934
4934
|
stat2.checkParentPathsSync(src, srcStat, dest, "move");
|
|
4935
|
-
if (!isParentRoot(dest)) mkdirpSync(
|
|
4935
|
+
if (!isParentRoot(dest)) mkdirpSync(path5.dirname(dest));
|
|
4936
4936
|
return doRename(src, dest, overwrite, isChangingCase);
|
|
4937
4937
|
}
|
|
4938
4938
|
__name(moveSync, "moveSync");
|
|
4939
4939
|
function isParentRoot(dest) {
|
|
4940
|
-
const parent =
|
|
4941
|
-
const parsedPath =
|
|
4940
|
+
const parent = path5.dirname(dest);
|
|
4941
|
+
const parsedPath = path5.parse(parent);
|
|
4942
4942
|
return parsedPath.root === parent;
|
|
4943
4943
|
}
|
|
4944
4944
|
__name(isParentRoot, "isParentRoot");
|
|
@@ -5008,10 +5008,26 @@ var require_lib = __commonJS({
|
|
|
5008
5008
|
}
|
|
5009
5009
|
});
|
|
5010
5010
|
|
|
5011
|
+
// lib/files.ts
|
|
5012
|
+
function absAwareJoin(one, two) {
|
|
5013
|
+
if (path.isAbsolute(two)) {
|
|
5014
|
+
return two;
|
|
5015
|
+
}
|
|
5016
|
+
return path.join(one, two);
|
|
5017
|
+
}
|
|
5018
|
+
var path;
|
|
5019
|
+
var init_files = __esm({
|
|
5020
|
+
"lib/files.ts"() {
|
|
5021
|
+
"use strict";
|
|
5022
|
+
path = __toESM(require("path"));
|
|
5023
|
+
__name(absAwareJoin, "absAwareJoin");
|
|
5024
|
+
}
|
|
5025
|
+
});
|
|
5026
|
+
|
|
5011
5027
|
// lib/runner/private/test-specific-context.ts
|
|
5012
5028
|
async function findTestSpecificContext(directory) {
|
|
5013
|
-
if (!
|
|
5014
|
-
directory =
|
|
5029
|
+
if (!path2.isAbsolute(directory)) {
|
|
5030
|
+
directory = path2.resolve(directory);
|
|
5015
5031
|
}
|
|
5016
5032
|
const existing = CONTEXT_CACHE.get(directory);
|
|
5017
5033
|
if (existing) {
|
|
@@ -5019,16 +5035,16 @@ async function findTestSpecificContext(directory) {
|
|
|
5019
5035
|
}
|
|
5020
5036
|
let maybeContext;
|
|
5021
5037
|
if (maybeContext === void 0) {
|
|
5022
|
-
const contextFile =
|
|
5038
|
+
const contextFile = path2.join(directory, INTEG_CONTEXT_JSON_FILE);
|
|
5023
5039
|
maybeContext = await tryReadJsonFile(contextFile);
|
|
5024
5040
|
}
|
|
5025
5041
|
if (maybeContext === void 0) {
|
|
5026
|
-
const cdkJsonFile =
|
|
5042
|
+
const cdkJsonFile = path2.join(directory, CDK_JSON_FILE);
|
|
5027
5043
|
let maybeCdkJson = await tryReadJsonFile(cdkJsonFile);
|
|
5028
5044
|
maybeContext = maybeCdkJson?.context;
|
|
5029
5045
|
}
|
|
5030
5046
|
if (maybeContext === void 0) {
|
|
5031
|
-
const parentDir =
|
|
5047
|
+
const parentDir = path2.dirname(directory);
|
|
5032
5048
|
if (parentDir !== directory) {
|
|
5033
5049
|
maybeContext = await findTestSpecificContext(parentDir);
|
|
5034
5050
|
}
|
|
@@ -5047,12 +5063,12 @@ async function tryReadJsonFile(filePath) {
|
|
|
5047
5063
|
throw e;
|
|
5048
5064
|
}
|
|
5049
5065
|
}
|
|
5050
|
-
var fs,
|
|
5066
|
+
var fs, path2, INTEG_CONTEXT_JSON_FILE, CDK_JSON_FILE, CONTEXT_CACHE;
|
|
5051
5067
|
var init_test_specific_context = __esm({
|
|
5052
5068
|
"lib/runner/private/test-specific-context.ts"() {
|
|
5053
5069
|
"use strict";
|
|
5054
5070
|
fs = __toESM(require("fs/promises"));
|
|
5055
|
-
|
|
5071
|
+
path2 = __toESM(require("path"));
|
|
5056
5072
|
INTEG_CONTEXT_JSON_FILE = "integ.context.json";
|
|
5057
5073
|
CDK_JSON_FILE = "cdk.json";
|
|
5058
5074
|
CONTEXT_CACHE = /* @__PURE__ */ new Map();
|
|
@@ -5062,6 +5078,10 @@ var init_test_specific_context = __esm({
|
|
|
5062
5078
|
});
|
|
5063
5079
|
|
|
5064
5080
|
// lib/runner/integration-tests.ts
|
|
5081
|
+
function testNameFromInfo(test) {
|
|
5082
|
+
const absPath = absAwareJoin(test.discoveryRoot, test.fileName);
|
|
5083
|
+
return path3.relative(test.discoveryRoot, absPath);
|
|
5084
|
+
}
|
|
5065
5085
|
function pythonExecutable() {
|
|
5066
5086
|
let python = "python3";
|
|
5067
5087
|
if (process.platform === "win32") {
|
|
@@ -5069,32 +5089,39 @@ function pythonExecutable() {
|
|
|
5069
5089
|
}
|
|
5070
5090
|
return python;
|
|
5071
5091
|
}
|
|
5072
|
-
var
|
|
5092
|
+
var path3, fs2, CDK_OUTDIR_PREFIX, IntegTest, IntegrationTests;
|
|
5073
5093
|
var init_integration_tests = __esm({
|
|
5074
5094
|
"lib/runner/integration-tests.ts"() {
|
|
5075
5095
|
"use strict";
|
|
5076
|
-
|
|
5096
|
+
path3 = __toESM(require("path"));
|
|
5077
5097
|
fs2 = __toESM(require_lib());
|
|
5098
|
+
init_files();
|
|
5078
5099
|
init_test_specific_context();
|
|
5079
5100
|
CDK_OUTDIR_PREFIX = "cdk-integ.out";
|
|
5080
|
-
|
|
5101
|
+
__name(testNameFromInfo, "testNameFromInfo");
|
|
5102
|
+
IntegTest = class _IntegTest {
|
|
5081
5103
|
constructor(info) {
|
|
5082
5104
|
this.info = info;
|
|
5083
|
-
this.
|
|
5084
|
-
this.
|
|
5085
|
-
this.absoluteFileName =
|
|
5086
|
-
this.fileName =
|
|
5087
|
-
this.
|
|
5088
|
-
|
|
5089
|
-
this.
|
|
5105
|
+
this.appCommandTemplate = info.appCommandTemplate ?? "node {filePath}";
|
|
5106
|
+
this.workingDirectory = process.cwd();
|
|
5107
|
+
this.absoluteFileName = path3.resolve(info.fileName);
|
|
5108
|
+
this.fileName = path3.relative(this.workingDirectory, info.fileName);
|
|
5109
|
+
this.testDirectory = path3.dirname(this.fileName);
|
|
5110
|
+
this.testBaseName = path3.basename(this.fileName);
|
|
5111
|
+
this.discoveryRelativeFileName = path3.relative(info.discoveryRoot, info.fileName);
|
|
5112
|
+
const parsed = path3.parse(this.fileName);
|
|
5090
5113
|
this.normalizedTestName = parsed.name;
|
|
5091
|
-
this.snapshotDir =
|
|
5092
|
-
this.temporaryOutputDir =
|
|
5114
|
+
this.snapshotDir = path3.join(parsed.dir, `${parsed.base}.snapshot`);
|
|
5115
|
+
this.temporaryOutputDir = path3.join(parsed.dir, `${CDK_OUTDIR_PREFIX}.${parsed.base}.snapshot`);
|
|
5116
|
+
this.testName = this.normalizedTestName;
|
|
5093
5117
|
}
|
|
5094
5118
|
info;
|
|
5095
5119
|
static {
|
|
5096
5120
|
__name(this, "IntegTest");
|
|
5097
5121
|
}
|
|
5122
|
+
static hydrate(info) {
|
|
5123
|
+
return new _IntegTest(info);
|
|
5124
|
+
}
|
|
5098
5125
|
/**
|
|
5099
5126
|
* The name of the file to run
|
|
5100
5127
|
*
|
|
@@ -5120,7 +5147,7 @@ var init_integration_tests = __esm({
|
|
|
5120
5147
|
/**
|
|
5121
5148
|
* Directory the test is in
|
|
5122
5149
|
*/
|
|
5123
|
-
|
|
5150
|
+
workingDirectory;
|
|
5124
5151
|
/**
|
|
5125
5152
|
* Display name for the test
|
|
5126
5153
|
*
|
|
@@ -5143,7 +5170,15 @@ var init_integration_tests = __esm({
|
|
|
5143
5170
|
*
|
|
5144
5171
|
* @default - test run command will be `node {filePath}`
|
|
5145
5172
|
*/
|
|
5146
|
-
|
|
5173
|
+
appCommandTemplate;
|
|
5174
|
+
testDirectory;
|
|
5175
|
+
testBaseName;
|
|
5176
|
+
specializeTemplate(template) {
|
|
5177
|
+
return template.replaceAll("{filePath}", this.fileName).replaceAll("{testBaseName}", this.testBaseName);
|
|
5178
|
+
}
|
|
5179
|
+
dehydrate() {
|
|
5180
|
+
return this.info;
|
|
5181
|
+
}
|
|
5147
5182
|
/**
|
|
5148
5183
|
* Whether this test matches the user-given name
|
|
5149
5184
|
*
|
|
@@ -5170,7 +5205,7 @@ var init_integration_tests = __esm({
|
|
|
5170
5205
|
* `cdk.json#context` if not found, upstream from the test.
|
|
5171
5206
|
*/
|
|
5172
5207
|
async testSpecificContext() {
|
|
5173
|
-
return findTestSpecificContext(
|
|
5208
|
+
return findTestSpecificContext(path3.dirname(this.fileName));
|
|
5174
5209
|
}
|
|
5175
5210
|
};
|
|
5176
5211
|
__name(pythonExecutable, "pythonExecutable");
|
|
@@ -5282,11 +5317,11 @@ var init_integration_tests = __esm({
|
|
|
5282
5317
|
const testCases = Object.entries(options.testCases).flatMap(
|
|
5283
5318
|
([appCommand, patterns]) => files.filter((fileName) => patterns.some((pattern) => {
|
|
5284
5319
|
const regex = new RegExp(pattern);
|
|
5285
|
-
return regex.test(fileName) || regex.test(
|
|
5320
|
+
return regex.test(fileName) || regex.test(path3.basename(fileName));
|
|
5286
5321
|
})).map((fileName) => new IntegTest({
|
|
5287
5322
|
discoveryRoot: this.directory,
|
|
5288
5323
|
fileName,
|
|
5289
|
-
appCommand
|
|
5324
|
+
appCommandTemplate: appCommand
|
|
5290
5325
|
}))
|
|
5291
5326
|
);
|
|
5292
5327
|
const discoveredTests = ignoreUncompiledTypeScript ? this.filterUncompiledTypeScript(testCases) : testCases;
|
|
@@ -5306,7 +5341,7 @@ var init_integration_tests = __esm({
|
|
|
5306
5341
|
async function recurse(dir) {
|
|
5307
5342
|
const files = await fs2.readdir(dir);
|
|
5308
5343
|
for (const file of files) {
|
|
5309
|
-
const fullPath =
|
|
5344
|
+
const fullPath = path3.join(dir, file);
|
|
5310
5345
|
const statf = await fs2.stat(fullPath);
|
|
5311
5346
|
if (statf.isFile()) {
|
|
5312
5347
|
ret.push(fullPath);
|
|
@@ -5547,7 +5582,7 @@ async function runIntegrationTestsInParallel(options) {
|
|
|
5547
5582
|
const test = queue.pop();
|
|
5548
5583
|
if (!test) break;
|
|
5549
5584
|
const testStart = Date.now();
|
|
5550
|
-
highlight(`Running test ${test
|
|
5585
|
+
highlight(`Running test ${testNameFromInfo(test)} in ${worker2.profile ? worker2.profile + "/" : ""}${worker2.region}`);
|
|
5551
5586
|
const response = await options.pool.exec("integTestWorker", [{
|
|
5552
5587
|
watch: options.watch,
|
|
5553
5588
|
region: worker2.region,
|
|
@@ -5588,6 +5623,7 @@ var init_integ_test_worker = __esm({
|
|
|
5588
5623
|
"use strict";
|
|
5589
5624
|
init_common();
|
|
5590
5625
|
init_logger();
|
|
5626
|
+
init_integration_tests();
|
|
5591
5627
|
init_utils();
|
|
5592
5628
|
__name(runIntegrationTests, "runIntegrationTests");
|
|
5593
5629
|
__name(getAccountWorkers, "getAccountWorkers");
|
|
@@ -5655,7 +5691,7 @@ var require_build = __commonJS({
|
|
|
5655
5691
|
"use strict";
|
|
5656
5692
|
var fs4 = require("fs");
|
|
5657
5693
|
var util2 = require("util");
|
|
5658
|
-
var
|
|
5694
|
+
var path5 = require("path");
|
|
5659
5695
|
var shim;
|
|
5660
5696
|
var Y18N = class {
|
|
5661
5697
|
static {
|
|
@@ -5825,7 +5861,7 @@ var require_build = __commonJS({
|
|
|
5825
5861
|
writeFile: fs4.writeFile
|
|
5826
5862
|
},
|
|
5827
5863
|
format: util2.format,
|
|
5828
|
-
resolve:
|
|
5864
|
+
resolve: path5.resolve,
|
|
5829
5865
|
exists: /* @__PURE__ */ __name((file) => {
|
|
5830
5866
|
try {
|
|
5831
5867
|
return fs4.statSync(file).isFile();
|
|
@@ -5847,7 +5883,7 @@ var require_build2 = __commonJS({
|
|
|
5847
5883
|
"use strict";
|
|
5848
5884
|
var util2 = require("util");
|
|
5849
5885
|
var fs4 = require("fs");
|
|
5850
|
-
var
|
|
5886
|
+
var path5 = require("path");
|
|
5851
5887
|
function camelCase(str) {
|
|
5852
5888
|
const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
|
|
5853
5889
|
if (!isCamelCase) {
|
|
@@ -6820,13 +6856,13 @@ var require_build2 = __commonJS({
|
|
|
6820
6856
|
return env;
|
|
6821
6857
|
}, "env"),
|
|
6822
6858
|
format: util2.format,
|
|
6823
|
-
normalize:
|
|
6824
|
-
resolve:
|
|
6825
|
-
require: /* @__PURE__ */ __name((
|
|
6859
|
+
normalize: path5.normalize,
|
|
6860
|
+
resolve: path5.resolve,
|
|
6861
|
+
require: /* @__PURE__ */ __name((path6) => {
|
|
6826
6862
|
if (typeof require !== "undefined") {
|
|
6827
|
-
return require(
|
|
6828
|
-
} else if (
|
|
6829
|
-
return fs4.readFileSync(
|
|
6863
|
+
return require(path6);
|
|
6864
|
+
} else if (path6.match(/\.json$/)) {
|
|
6865
|
+
return fs4.readFileSync(path6, "utf8");
|
|
6830
6866
|
} else {
|
|
6831
6867
|
throw Error("only .json config files are supported in ESM");
|
|
6832
6868
|
}
|
|
@@ -7440,7 +7476,7 @@ var require_require_directory = __commonJS({
|
|
|
7440
7476
|
"../../../node_modules/require-directory/index.js"(exports2, module2) {
|
|
7441
7477
|
"use strict";
|
|
7442
7478
|
var fs4 = require("fs");
|
|
7443
|
-
var
|
|
7479
|
+
var join5 = require("path").join;
|
|
7444
7480
|
var resolve4 = require("path").resolve;
|
|
7445
7481
|
var dirname3 = require("path").dirname;
|
|
7446
7482
|
var defaultOptions = {
|
|
@@ -7453,22 +7489,22 @@ var require_require_directory = __commonJS({
|
|
|
7453
7489
|
return obj;
|
|
7454
7490
|
}, "visit")
|
|
7455
7491
|
};
|
|
7456
|
-
function checkFileInclusion(
|
|
7492
|
+
function checkFileInclusion(path5, filename, options) {
|
|
7457
7493
|
return (
|
|
7458
7494
|
// verify file has valid extension
|
|
7459
7495
|
new RegExp("\\.(" + options.extensions.join("|") + ")$", "i").test(filename) && // if options.include is a RegExp, evaluate it and make sure the path passes
|
|
7460
|
-
!(options.include && options.include instanceof RegExp && !options.include.test(
|
|
7461
|
-
!(options.include && typeof options.include === "function" && !options.include(
|
|
7462
|
-
!(options.exclude && options.exclude instanceof RegExp && options.exclude.test(
|
|
7463
|
-
!(options.exclude && typeof options.exclude === "function" && options.exclude(
|
|
7496
|
+
!(options.include && options.include instanceof RegExp && !options.include.test(path5)) && // if options.include is a function, evaluate it and make sure the path passes
|
|
7497
|
+
!(options.include && typeof options.include === "function" && !options.include(path5, filename)) && // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass
|
|
7498
|
+
!(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path5)) && // if options.exclude is a function, evaluate it and make sure the path doesn't pass
|
|
7499
|
+
!(options.exclude && typeof options.exclude === "function" && options.exclude(path5, filename))
|
|
7464
7500
|
);
|
|
7465
7501
|
}
|
|
7466
7502
|
__name(checkFileInclusion, "checkFileInclusion");
|
|
7467
|
-
function requireDirectory(m,
|
|
7503
|
+
function requireDirectory(m, path5, options) {
|
|
7468
7504
|
var retval = {};
|
|
7469
|
-
if (
|
|
7470
|
-
options =
|
|
7471
|
-
|
|
7505
|
+
if (path5 && !options && typeof path5 !== "string") {
|
|
7506
|
+
options = path5;
|
|
7507
|
+
path5 = null;
|
|
7472
7508
|
}
|
|
7473
7509
|
options = options || {};
|
|
7474
7510
|
for (var prop in defaultOptions) {
|
|
@@ -7476,9 +7512,9 @@ var require_require_directory = __commonJS({
|
|
|
7476
7512
|
options[prop] = defaultOptions[prop];
|
|
7477
7513
|
}
|
|
7478
7514
|
}
|
|
7479
|
-
|
|
7480
|
-
fs4.readdirSync(
|
|
7481
|
-
var joined =
|
|
7515
|
+
path5 = !path5 ? dirname3(m.filename) : resolve4(dirname3(m.filename), path5);
|
|
7516
|
+
fs4.readdirSync(path5).forEach(function(filename) {
|
|
7517
|
+
var joined = join5(path5, filename), files, key, obj;
|
|
7482
7518
|
if (fs4.statSync(joined).isDirectory() && options.recurse) {
|
|
7483
7519
|
files = requireDirectory(m, joined, options);
|
|
7484
7520
|
if (Object.keys(files).length) {
|
|
@@ -10363,7 +10399,7 @@ function parseCliArgs(args = []) {
|
|
|
10363
10399
|
if (argv["disable-update-workflow"] !== void 0 && argv["update-workflow"] !== void 0) {
|
|
10364
10400
|
throw new Error("--disable-update-workflow and --[no-]update-workflow cannot be used together");
|
|
10365
10401
|
}
|
|
10366
|
-
let updateWorkflow = argv["update-workflow"] !== void 0 ? !!argv["update-workflow"] :
|
|
10402
|
+
let updateWorkflow = argv["update-workflow"] !== void 0 ? !!argv["update-workflow"] : false;
|
|
10367
10403
|
const updateFromTags = argv["update-from-tags"] ? argv["update-from-tags"].split(",").map((t) => t.trim()) : void 0;
|
|
10368
10404
|
if (updateFromTags && argv["update-workflow"] === false) {
|
|
10369
10405
|
throw new Error("--update-from-tags and --no-update-workflow cannot be used together");
|
|
@@ -10413,12 +10449,12 @@ async function run(options) {
|
|
|
10413
10449
|
if (options.updateFromTags) {
|
|
10414
10450
|
options.force = true;
|
|
10415
10451
|
}
|
|
10416
|
-
const testsFromArgs = await new IntegrationTests(
|
|
10452
|
+
const testsFromArgs = await new IntegrationTests(path4.resolve(options.directory)).fromCliOptions(options);
|
|
10417
10453
|
if (options.list) {
|
|
10418
10454
|
process.stdout.write(testsFromArgs.map((t) => t.discoveryRelativeFileName).join("\n") + "\n");
|
|
10419
10455
|
return;
|
|
10420
10456
|
}
|
|
10421
|
-
const pool2 = workerpool.pool(
|
|
10457
|
+
const pool2 = workerpool.pool(path4.join(__dirname, "..", "lib", "workers", "extract", "index.js"), {
|
|
10422
10458
|
maxWorkers: options.watch ? 1 : options.maxWorkers
|
|
10423
10459
|
});
|
|
10424
10460
|
const testsToRun = [];
|
|
@@ -10565,12 +10601,12 @@ function configFromFile(fileName) {
|
|
|
10565
10601
|
function splitByComma(xs) {
|
|
10566
10602
|
return xs.flatMap((x) => x.split(",")).map((x) => x.trim());
|
|
10567
10603
|
}
|
|
10568
|
-
var fs3,
|
|
10604
|
+
var fs3, path4, import_chalk3, workerpool, yargs;
|
|
10569
10605
|
var init_cli = __esm({
|
|
10570
10606
|
"lib/cli.ts"() {
|
|
10571
10607
|
"use strict";
|
|
10572
10608
|
fs3 = __toESM(require("fs"));
|
|
10573
|
-
|
|
10609
|
+
path4 = __toESM(require("path"));
|
|
10574
10610
|
import_chalk3 = __toESM(require_source());
|
|
10575
10611
|
workerpool = __toESM(require_src());
|
|
10576
10612
|
init_logger();
|