@stencil/core 4.18.0 → 4.18.1
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/cli/index.cjs +106 -215
- package/cli/index.js +107 -217
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +1686 -2826
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +117 -227
- package/internal/app-data/index.cjs +1 -0
- package/internal/app-data/index.js +1 -0
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +53 -36
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/shadow-css.js +1 -2
- package/internal/hydrate/index.js +53 -36
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +52 -89
- package/internal/package.json +1 -1
- package/internal/stencil-public-compiler.d.ts +12 -1
- package/internal/stencil-public-runtime.d.ts +1 -0
- package/internal/testing/index.js +52 -35
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +378 -493
- package/mock-doc/index.d.ts +1 -1
- package/mock-doc/index.js +378 -493
- package/mock-doc/package.json +1 -1
- package/package.json +5 -6
- package/screenshot/index.js +43 -85
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +14 -27
- package/sys/node/glob.js +1 -1
- package/sys/node/index.js +42 -42
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +148 -268
- package/testing/jest/jest-27-and-under/jest-facade.d.ts +1 -1
- package/testing/jest/jest-28/jest-facade.d.ts +5 -5
- package/testing/jest/jest-29/jest-facade.d.ts +5 -5
- package/testing/package.json +1 -1
package/testing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Testing v4.18.
|
|
2
|
+
Stencil Testing v4.18.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
@@ -342,7 +342,7 @@ var require_semver = __commonJS({
|
|
|
342
342
|
do {
|
|
343
343
|
const a = this.build[i];
|
|
344
344
|
const b = other.build[i];
|
|
345
|
-
debug("
|
|
345
|
+
debug("build compare", i, a, b);
|
|
346
346
|
if (a === void 0 && b === void 0) {
|
|
347
347
|
return 0;
|
|
348
348
|
} else if (b === void 0) {
|
|
@@ -959,8 +959,7 @@ var require_async = __commonJS({
|
|
|
959
959
|
if (!err2) {
|
|
960
960
|
return cb(null, stat.isFile() || stat.isFIFO());
|
|
961
961
|
}
|
|
962
|
-
if (err2.code === "ENOENT" || err2.code === "ENOTDIR")
|
|
963
|
-
return cb(null, false);
|
|
962
|
+
if (err2.code === "ENOENT" || err2.code === "ENOTDIR") return cb(null, false);
|
|
964
963
|
return cb(err2);
|
|
965
964
|
});
|
|
966
965
|
};
|
|
@@ -969,17 +968,14 @@ var require_async = __commonJS({
|
|
|
969
968
|
if (!err2) {
|
|
970
969
|
return cb(null, stat.isDirectory());
|
|
971
970
|
}
|
|
972
|
-
if (err2.code === "ENOENT" || err2.code === "ENOTDIR")
|
|
973
|
-
return cb(null, false);
|
|
971
|
+
if (err2.code === "ENOENT" || err2.code === "ENOTDIR") return cb(null, false);
|
|
974
972
|
return cb(err2);
|
|
975
973
|
});
|
|
976
974
|
};
|
|
977
975
|
var defaultRealpath = function realpath(x, cb) {
|
|
978
976
|
realpathFS(x, function(realpathErr, realPath) {
|
|
979
|
-
if (realpathErr && realpathErr.code !== "ENOENT")
|
|
980
|
-
|
|
981
|
-
else
|
|
982
|
-
cb(null, realpathErr ? x : realPath);
|
|
977
|
+
if (realpathErr && realpathErr.code !== "ENOENT") cb(realpathErr);
|
|
978
|
+
else cb(null, realpathErr ? x : realPath);
|
|
983
979
|
});
|
|
984
980
|
};
|
|
985
981
|
var maybeRealpath = function maybeRealpath2(realpath, x, opts, cb) {
|
|
@@ -991,8 +987,7 @@ var require_async = __commonJS({
|
|
|
991
987
|
};
|
|
992
988
|
var defaultReadPackage = function defaultReadPackage2(readFile, pkgfile, cb) {
|
|
993
989
|
readFile(pkgfile, function(readFileErr, body) {
|
|
994
|
-
if (readFileErr)
|
|
995
|
-
cb(readFileErr);
|
|
990
|
+
if (readFileErr) cb(readFileErr);
|
|
996
991
|
else {
|
|
997
992
|
try {
|
|
998
993
|
var pkg = JSON.parse(body);
|
|
@@ -1047,66 +1042,56 @@ var require_async = __commonJS({
|
|
|
1047
1042
|
absoluteStart,
|
|
1048
1043
|
opts,
|
|
1049
1044
|
function(err3, realStart) {
|
|
1050
|
-
if (err3)
|
|
1051
|
-
|
|
1052
|
-
else
|
|
1053
|
-
init(realStart);
|
|
1045
|
+
if (err3) cb(err3);
|
|
1046
|
+
else init(realStart);
|
|
1054
1047
|
}
|
|
1055
1048
|
);
|
|
1056
1049
|
var res;
|
|
1057
1050
|
function init(basedir2) {
|
|
1058
1051
|
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
|
|
1059
1052
|
res = path6.resolve(basedir2, x);
|
|
1060
|
-
if (x === "." || x === ".." || x.slice(-1) === "/")
|
|
1061
|
-
res += "/";
|
|
1053
|
+
if (x === "." || x === ".." || x.slice(-1) === "/") res += "/";
|
|
1062
1054
|
if (/\/$/.test(x) && res === basedir2) {
|
|
1063
1055
|
loadAsDirectory(res, opts.package, onfile);
|
|
1064
|
-
} else
|
|
1065
|
-
loadAsFile(res, opts.package, onfile);
|
|
1056
|
+
} else loadAsFile(res, opts.package, onfile);
|
|
1066
1057
|
} else if (includeCoreModules && isCore(x)) {
|
|
1067
1058
|
return cb(null, x);
|
|
1068
|
-
} else
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
}
|
|
1085
|
-
});
|
|
1059
|
+
} else loadNodeModules(x, basedir2, function(err3, n, pkg) {
|
|
1060
|
+
if (err3) cb(err3);
|
|
1061
|
+
else if (n) {
|
|
1062
|
+
return maybeRealpath(realpath, n, opts, function(err4, realN) {
|
|
1063
|
+
if (err4) {
|
|
1064
|
+
cb(err4);
|
|
1065
|
+
} else {
|
|
1066
|
+
cb(null, realN, pkg);
|
|
1067
|
+
}
|
|
1068
|
+
});
|
|
1069
|
+
} else {
|
|
1070
|
+
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
|
1071
|
+
moduleError.code = "MODULE_NOT_FOUND";
|
|
1072
|
+
cb(moduleError);
|
|
1073
|
+
}
|
|
1074
|
+
});
|
|
1086
1075
|
}
|
|
1087
1076
|
function onfile(err3, m, pkg) {
|
|
1088
|
-
if (err3)
|
|
1089
|
-
|
|
1090
|
-
else
|
|
1091
|
-
cb(
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
moduleError.code = "MODULE_NOT_FOUND";
|
|
1107
|
-
cb(moduleError);
|
|
1108
|
-
}
|
|
1109
|
-
});
|
|
1077
|
+
if (err3) cb(err3);
|
|
1078
|
+
else if (m) cb(null, m, pkg);
|
|
1079
|
+
else loadAsDirectory(res, function(err4, d, pkg2) {
|
|
1080
|
+
if (err4) cb(err4);
|
|
1081
|
+
else if (d) {
|
|
1082
|
+
maybeRealpath(realpath, d, opts, function(err5, realD) {
|
|
1083
|
+
if (err5) {
|
|
1084
|
+
cb(err5);
|
|
1085
|
+
} else {
|
|
1086
|
+
cb(null, realD, pkg2);
|
|
1087
|
+
}
|
|
1088
|
+
});
|
|
1089
|
+
} else {
|
|
1090
|
+
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
|
1091
|
+
moduleError.code = "MODULE_NOT_FOUND";
|
|
1092
|
+
cb(moduleError);
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1110
1095
|
}
|
|
1111
1096
|
function loadAsFile(x2, thePackage, callback2) {
|
|
1112
1097
|
var loadAsFilePackage = thePackage;
|
|
@@ -1118,58 +1103,46 @@ var require_async = __commonJS({
|
|
|
1118
1103
|
var exts = [""].concat(extensions);
|
|
1119
1104
|
load(exts, x2, loadAsFilePackage);
|
|
1120
1105
|
function load(exts2, x3, loadPackage) {
|
|
1121
|
-
if (exts2.length === 0)
|
|
1122
|
-
return cb2(null, void 0, loadPackage);
|
|
1106
|
+
if (exts2.length === 0) return cb2(null, void 0, loadPackage);
|
|
1123
1107
|
var file = x3 + exts2[0];
|
|
1124
1108
|
var pkg = loadPackage;
|
|
1125
|
-
if (pkg)
|
|
1126
|
-
|
|
1127
|
-
else
|
|
1128
|
-
loadpkg(path6.dirname(file), onpkg);
|
|
1109
|
+
if (pkg) onpkg(null, pkg);
|
|
1110
|
+
else loadpkg(path6.dirname(file), onpkg);
|
|
1129
1111
|
function onpkg(err3, pkg_, dir) {
|
|
1130
1112
|
pkg = pkg_;
|
|
1131
|
-
if (err3)
|
|
1132
|
-
return cb2(err3);
|
|
1113
|
+
if (err3) return cb2(err3);
|
|
1133
1114
|
if (dir && pkg && opts.pathFilter) {
|
|
1134
1115
|
var rfile = path6.relative(dir, file);
|
|
1135
1116
|
var rel = rfile.slice(0, rfile.length - exts2[0].length);
|
|
1136
1117
|
var r = opts.pathFilter(pkg, x3, rel);
|
|
1137
|
-
if (r)
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
);
|
|
1118
|
+
if (r) return load(
|
|
1119
|
+
[""].concat(extensions.slice()),
|
|
1120
|
+
path6.resolve(dir, r),
|
|
1121
|
+
pkg
|
|
1122
|
+
);
|
|
1143
1123
|
}
|
|
1144
1124
|
isFile(file, onex);
|
|
1145
1125
|
}
|
|
1146
1126
|
function onex(err3, ex) {
|
|
1147
|
-
if (err3)
|
|
1148
|
-
|
|
1149
|
-
if (ex)
|
|
1150
|
-
return cb2(null, file, pkg);
|
|
1127
|
+
if (err3) return cb2(err3);
|
|
1128
|
+
if (ex) return cb2(null, file, pkg);
|
|
1151
1129
|
load(exts2.slice(1), x3, pkg);
|
|
1152
1130
|
}
|
|
1153
1131
|
}
|
|
1154
1132
|
}
|
|
1155
1133
|
function loadpkg(dir, cb2) {
|
|
1156
|
-
if (dir === "" || dir === "/")
|
|
1157
|
-
return cb2(null);
|
|
1134
|
+
if (dir === "" || dir === "/") return cb2(null);
|
|
1158
1135
|
if (process.platform === "win32" && /^\w:[/\\]*$/.test(dir)) {
|
|
1159
1136
|
return cb2(null);
|
|
1160
1137
|
}
|
|
1161
|
-
if (/[/\\]node_modules[/\\]*$/.test(dir))
|
|
1162
|
-
return cb2(null);
|
|
1138
|
+
if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb2(null);
|
|
1163
1139
|
maybeRealpath(realpath, dir, opts, function(unwrapErr2, pkgdir) {
|
|
1164
|
-
if (unwrapErr2)
|
|
1165
|
-
return loadpkg(path6.dirname(dir), cb2);
|
|
1140
|
+
if (unwrapErr2) return loadpkg(path6.dirname(dir), cb2);
|
|
1166
1141
|
var pkgfile = path6.join(pkgdir, "package.json");
|
|
1167
1142
|
isFile(pkgfile, function(err3, ex) {
|
|
1168
|
-
if (!ex)
|
|
1169
|
-
return loadpkg(path6.dirname(dir), cb2);
|
|
1143
|
+
if (!ex) return loadpkg(path6.dirname(dir), cb2);
|
|
1170
1144
|
readPackage(readFile, pkgfile, function(err4, pkgParam) {
|
|
1171
|
-
if (err4)
|
|
1172
|
-
cb2(err4);
|
|
1145
|
+
if (err4) cb2(err4);
|
|
1173
1146
|
var pkg = pkgParam;
|
|
1174
1147
|
if (pkg && opts.packageFilter) {
|
|
1175
1148
|
pkg = opts.packageFilter(pkg, pkgfile);
|
|
@@ -1187,17 +1160,13 @@ var require_async = __commonJS({
|
|
|
1187
1160
|
fpkg = opts.package;
|
|
1188
1161
|
}
|
|
1189
1162
|
maybeRealpath(realpath, x2, opts, function(unwrapErr2, pkgdir) {
|
|
1190
|
-
if (unwrapErr2)
|
|
1191
|
-
return cb2(unwrapErr2);
|
|
1163
|
+
if (unwrapErr2) return cb2(unwrapErr2);
|
|
1192
1164
|
var pkgfile = path6.join(pkgdir, "package.json");
|
|
1193
1165
|
isFile(pkgfile, function(err3, ex) {
|
|
1194
|
-
if (err3)
|
|
1195
|
-
|
|
1196
|
-
if (!ex)
|
|
1197
|
-
return loadAsFile(path6.join(x2, "index"), fpkg, cb2);
|
|
1166
|
+
if (err3) return cb2(err3);
|
|
1167
|
+
if (!ex) return loadAsFile(path6.join(x2, "index"), fpkg, cb2);
|
|
1198
1168
|
readPackage(readFile, pkgfile, function(err4, pkgParam) {
|
|
1199
|
-
if (err4)
|
|
1200
|
-
return cb2(err4);
|
|
1169
|
+
if (err4) return cb2(err4);
|
|
1201
1170
|
var pkg = pkgParam;
|
|
1202
1171
|
if (pkg && opts.packageFilter) {
|
|
1203
1172
|
pkg = opts.packageFilter(pkg, pkgfile);
|
|
@@ -1212,18 +1181,13 @@ var require_async = __commonJS({
|
|
|
1212
1181
|
pkg.main = "index";
|
|
1213
1182
|
}
|
|
1214
1183
|
loadAsFile(path6.resolve(x2, pkg.main), pkg, function(err5, m, pkg2) {
|
|
1215
|
-
if (err5)
|
|
1216
|
-
|
|
1217
|
-
if (
|
|
1218
|
-
return cb2(null, m, pkg2);
|
|
1219
|
-
if (!pkg2)
|
|
1220
|
-
return loadAsFile(path6.join(x2, "index"), pkg2, cb2);
|
|
1184
|
+
if (err5) return cb2(err5);
|
|
1185
|
+
if (m) return cb2(null, m, pkg2);
|
|
1186
|
+
if (!pkg2) return loadAsFile(path6.join(x2, "index"), pkg2, cb2);
|
|
1221
1187
|
var dir = path6.resolve(x2, pkg2.main);
|
|
1222
1188
|
loadAsDirectory(dir, pkg2, function(err6, n, pkg3) {
|
|
1223
|
-
if (err6)
|
|
1224
|
-
|
|
1225
|
-
if (n)
|
|
1226
|
-
return cb2(null, n, pkg3);
|
|
1189
|
+
if (err6) return cb2(err6);
|
|
1190
|
+
if (n) return cb2(null, n, pkg3);
|
|
1227
1191
|
loadAsFile(path6.join(x2, "index"), pkg3, cb2);
|
|
1228
1192
|
});
|
|
1229
1193
|
});
|
|
@@ -1235,29 +1199,22 @@ var require_async = __commonJS({
|
|
|
1235
1199
|
});
|
|
1236
1200
|
}
|
|
1237
1201
|
function processDirs(cb2, dirs) {
|
|
1238
|
-
if (dirs.length === 0)
|
|
1239
|
-
return cb2(null, void 0);
|
|
1202
|
+
if (dirs.length === 0) return cb2(null, void 0);
|
|
1240
1203
|
var dir = dirs[0];
|
|
1241
1204
|
isDirectory(path6.dirname(dir), isdir);
|
|
1242
1205
|
function isdir(err3, isdir2) {
|
|
1243
|
-
if (err3)
|
|
1244
|
-
|
|
1245
|
-
if (!isdir2)
|
|
1246
|
-
return processDirs(cb2, dirs.slice(1));
|
|
1206
|
+
if (err3) return cb2(err3);
|
|
1207
|
+
if (!isdir2) return processDirs(cb2, dirs.slice(1));
|
|
1247
1208
|
loadAsFile(dir, opts.package, onfile2);
|
|
1248
1209
|
}
|
|
1249
1210
|
function onfile2(err3, m, pkg) {
|
|
1250
|
-
if (err3)
|
|
1251
|
-
|
|
1252
|
-
if (m)
|
|
1253
|
-
return cb2(null, m, pkg);
|
|
1211
|
+
if (err3) return cb2(err3);
|
|
1212
|
+
if (m) return cb2(null, m, pkg);
|
|
1254
1213
|
loadAsDirectory(dir, opts.package, ondir);
|
|
1255
1214
|
}
|
|
1256
1215
|
function ondir(err3, n, pkg) {
|
|
1257
|
-
if (err3)
|
|
1258
|
-
|
|
1259
|
-
if (n)
|
|
1260
|
-
return cb2(null, n, pkg);
|
|
1216
|
+
if (err3) return cb2(err3);
|
|
1217
|
+
if (n) return cb2(null, n, pkg);
|
|
1261
1218
|
processDirs(cb2, dirs.slice(1));
|
|
1262
1219
|
}
|
|
1263
1220
|
}
|
|
@@ -1487,8 +1444,7 @@ var require_sync = __commonJS({
|
|
|
1487
1444
|
try {
|
|
1488
1445
|
var stat = fs2.statSync(file, { throwIfNoEntry: false });
|
|
1489
1446
|
} catch (e) {
|
|
1490
|
-
if (e && (e.code === "ENOENT" || e.code === "ENOTDIR"))
|
|
1491
|
-
return false;
|
|
1447
|
+
if (e && (e.code === "ENOENT" || e.code === "ENOTDIR")) return false;
|
|
1492
1448
|
throw e;
|
|
1493
1449
|
}
|
|
1494
1450
|
return !!stat && (stat.isFile() || stat.isFIFO());
|
|
@@ -1497,8 +1453,7 @@ var require_sync = __commonJS({
|
|
|
1497
1453
|
try {
|
|
1498
1454
|
var stat = fs2.statSync(dir, { throwIfNoEntry: false });
|
|
1499
1455
|
} catch (e) {
|
|
1500
|
-
if (e && (e.code === "ENOENT" || e.code === "ENOTDIR"))
|
|
1501
|
-
return false;
|
|
1456
|
+
if (e && (e.code === "ENOENT" || e.code === "ENOTDIR")) return false;
|
|
1502
1457
|
throw e;
|
|
1503
1458
|
}
|
|
1504
1459
|
return !!stat && stat.isDirectory();
|
|
@@ -1556,17 +1511,14 @@ var require_sync = __commonJS({
|
|
|
1556
1511
|
var absoluteStart = maybeRealpathSync(realpathSync, path6.resolve(basedir), opts);
|
|
1557
1512
|
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
|
|
1558
1513
|
var res = path6.resolve(absoluteStart, x);
|
|
1559
|
-
if (x === "." || x === ".." || x.slice(-1) === "/")
|
|
1560
|
-
res += "/";
|
|
1514
|
+
if (x === "." || x === ".." || x.slice(-1) === "/") res += "/";
|
|
1561
1515
|
var m = loadAsFileSync(res) || loadAsDirectorySync(res);
|
|
1562
|
-
if (m)
|
|
1563
|
-
return maybeRealpathSync(realpathSync, m, opts);
|
|
1516
|
+
if (m) return maybeRealpathSync(realpathSync, m, opts);
|
|
1564
1517
|
} else if (includeCoreModules && isCore(x)) {
|
|
1565
1518
|
return x;
|
|
1566
1519
|
} else {
|
|
1567
1520
|
var n = loadNodeModulesSync(x, absoluteStart);
|
|
1568
|
-
if (n)
|
|
1569
|
-
return maybeRealpathSync(realpathSync, n, opts);
|
|
1521
|
+
if (n) return maybeRealpathSync(realpathSync, n, opts);
|
|
1570
1522
|
}
|
|
1571
1523
|
var err2 = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
|
1572
1524
|
err2.code = "MODULE_NOT_FOUND";
|
|
@@ -1591,13 +1543,11 @@ var require_sync = __commonJS({
|
|
|
1591
1543
|
}
|
|
1592
1544
|
}
|
|
1593
1545
|
function loadpkg(dir) {
|
|
1594
|
-
if (dir === "" || dir === "/")
|
|
1595
|
-
return;
|
|
1546
|
+
if (dir === "" || dir === "/") return;
|
|
1596
1547
|
if (process.platform === "win32" && /^\w:[/\\]*$/.test(dir)) {
|
|
1597
1548
|
return;
|
|
1598
1549
|
}
|
|
1599
|
-
if (/[/\\]node_modules[/\\]*$/.test(dir))
|
|
1600
|
-
return;
|
|
1550
|
+
if (/[/\\]node_modules[/\\]*$/.test(dir)) return;
|
|
1601
1551
|
var pkgfile = path6.join(maybeRealpathSync(realpathSync, dir, opts), "package.json");
|
|
1602
1552
|
if (!isFile(pkgfile)) {
|
|
1603
1553
|
return loadpkg(path6.dirname(dir));
|
|
@@ -1637,11 +1587,9 @@ var require_sync = __commonJS({
|
|
|
1637
1587
|
}
|
|
1638
1588
|
try {
|
|
1639
1589
|
var m2 = loadAsFileSync(path6.resolve(x2, pkg.main));
|
|
1640
|
-
if (m2)
|
|
1641
|
-
return m2;
|
|
1590
|
+
if (m2) return m2;
|
|
1642
1591
|
var n2 = loadAsDirectorySync(path6.resolve(x2, pkg.main));
|
|
1643
|
-
if (n2)
|
|
1644
|
-
return n2;
|
|
1592
|
+
if (n2) return n2;
|
|
1645
1593
|
} catch (e) {
|
|
1646
1594
|
}
|
|
1647
1595
|
}
|
|
@@ -1657,11 +1605,9 @@ var require_sync = __commonJS({
|
|
|
1657
1605
|
var dir = dirs[i];
|
|
1658
1606
|
if (isDirectory(path6.dirname(dir))) {
|
|
1659
1607
|
var m2 = loadAsFileSync(dir);
|
|
1660
|
-
if (m2)
|
|
1661
|
-
return m2;
|
|
1608
|
+
if (m2) return m2;
|
|
1662
1609
|
var n2 = loadAsDirectorySync(dir);
|
|
1663
|
-
if (n2)
|
|
1664
|
-
return n2;
|
|
1610
|
+
if (n2) return n2;
|
|
1665
1611
|
}
|
|
1666
1612
|
}
|
|
1667
1613
|
}
|
|
@@ -2063,10 +2009,8 @@ var sortBy = (array, prop) => {
|
|
|
2063
2009
|
return array.slice().sort((a, b) => {
|
|
2064
2010
|
const nameA = prop(a);
|
|
2065
2011
|
const nameB = prop(b);
|
|
2066
|
-
if (nameA < nameB)
|
|
2067
|
-
|
|
2068
|
-
if (nameA > nameB)
|
|
2069
|
-
return 1;
|
|
2012
|
+
if (nameA < nameB) return -1;
|
|
2013
|
+
if (nameA > nameB) return 1;
|
|
2070
2014
|
return 0;
|
|
2071
2015
|
});
|
|
2072
2016
|
};
|
|
@@ -2179,8 +2123,7 @@ var TASK_CANCELED_MSG = `task canceled`;
|
|
|
2179
2123
|
|
|
2180
2124
|
// src/utils/logger/logger-utils.ts
|
|
2181
2125
|
var splitLineBreaks = (sourceText) => {
|
|
2182
|
-
if (typeof sourceText !== "string")
|
|
2183
|
-
return [];
|
|
2126
|
+
if (typeof sourceText !== "string") return [];
|
|
2184
2127
|
sourceText = sourceText.replace(/\\r/g, "\n");
|
|
2185
2128
|
return sourceText.split("\n");
|
|
2186
2129
|
};
|
|
@@ -2216,18 +2159,15 @@ var reducePathComponents = (components) => {
|
|
|
2216
2159
|
const reduced = [components[0]];
|
|
2217
2160
|
for (let i = 1; i < components.length; i++) {
|
|
2218
2161
|
const component = components[i];
|
|
2219
|
-
if (!component)
|
|
2220
|
-
|
|
2221
|
-
if (component === ".")
|
|
2222
|
-
continue;
|
|
2162
|
+
if (!component) continue;
|
|
2163
|
+
if (component === ".") continue;
|
|
2223
2164
|
if (component === "..") {
|
|
2224
2165
|
if (reduced.length > 1) {
|
|
2225
2166
|
if (reduced[reduced.length - 1] !== "..") {
|
|
2226
2167
|
reduced.pop();
|
|
2227
2168
|
continue;
|
|
2228
2169
|
}
|
|
2229
|
-
} else if (reduced[0])
|
|
2230
|
-
continue;
|
|
2170
|
+
} else if (reduced[0]) continue;
|
|
2231
2171
|
}
|
|
2232
2172
|
reduced.push(component);
|
|
2233
2173
|
}
|
|
@@ -2238,23 +2178,18 @@ var getRootLength = (path6) => {
|
|
|
2238
2178
|
return rootLength < 0 ? ~rootLength : rootLength;
|
|
2239
2179
|
};
|
|
2240
2180
|
var getEncodedRootLength = (path6) => {
|
|
2241
|
-
if (!path6)
|
|
2242
|
-
return 0;
|
|
2181
|
+
if (!path6) return 0;
|
|
2243
2182
|
const ch0 = path6.charCodeAt(0);
|
|
2244
2183
|
if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) {
|
|
2245
|
-
if (path6.charCodeAt(1) !== ch0)
|
|
2246
|
-
return 1;
|
|
2184
|
+
if (path6.charCodeAt(1) !== ch0) return 1;
|
|
2247
2185
|
const p1 = path6.indexOf(ch0 === 47 /* slash */ ? "/" : altDirectorySeparator, 2);
|
|
2248
|
-
if (p1 < 0)
|
|
2249
|
-
return path6.length;
|
|
2186
|
+
if (p1 < 0) return path6.length;
|
|
2250
2187
|
return p1 + 1;
|
|
2251
2188
|
}
|
|
2252
2189
|
if (isVolumeCharacter(ch0) && path6.charCodeAt(1) === 58 /* colon */) {
|
|
2253
2190
|
const ch2 = path6.charCodeAt(2);
|
|
2254
|
-
if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */)
|
|
2255
|
-
|
|
2256
|
-
if (path6.length === 2)
|
|
2257
|
-
return 2;
|
|
2191
|
+
if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) return 3;
|
|
2192
|
+
if (path6.length === 2) return 2;
|
|
2258
2193
|
}
|
|
2259
2194
|
const schemeEnd = path6.indexOf(urlSchemeSeparator);
|
|
2260
2195
|
if (schemeEnd !== -1) {
|
|
@@ -2283,12 +2218,10 @@ var getEncodedRootLength = (path6) => {
|
|
|
2283
2218
|
var isVolumeCharacter = (charCode) => charCode >= 97 /* a */ && charCode <= 122 /* z */ || charCode >= 65 /* A */ && charCode <= 90 /* Z */;
|
|
2284
2219
|
var getFileUrlVolumeSeparatorEnd = (url, start2) => {
|
|
2285
2220
|
const ch0 = url.charCodeAt(start2);
|
|
2286
|
-
if (ch0 === 58 /* colon */)
|
|
2287
|
-
return start2 + 1;
|
|
2221
|
+
if (ch0 === 58 /* colon */) return start2 + 1;
|
|
2288
2222
|
if (ch0 === 37 /* percent */ && url.charCodeAt(start2 + 1) === 51 /* _3 */) {
|
|
2289
2223
|
const ch2 = url.charCodeAt(start2 + 2);
|
|
2290
|
-
if (ch2 === 97 /* a */ || ch2 === 65 /* A */)
|
|
2291
|
-
return start2 + 3;
|
|
2224
|
+
if (ch2 === 97 /* a */ || ch2 === 65 /* A */) return start2 + 3;
|
|
2292
2225
|
}
|
|
2293
2226
|
return -1;
|
|
2294
2227
|
};
|
|
@@ -3440,43 +3373,30 @@ function toHaveNthReceivedEventDetail(eventSpy, index, eventDetail) {
|
|
|
3440
3373
|
};
|
|
3441
3374
|
}
|
|
3442
3375
|
var deepEqual = function equal(a, b) {
|
|
3443
|
-
if (a === b)
|
|
3444
|
-
return true;
|
|
3376
|
+
if (a === b) return true;
|
|
3445
3377
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
3446
3378
|
const arrA = Array.isArray(a), arrB = Array.isArray(b);
|
|
3447
3379
|
let i, length, key;
|
|
3448
3380
|
if (arrA && arrB) {
|
|
3449
3381
|
length = a.length;
|
|
3450
|
-
if (length != b.length)
|
|
3451
|
-
|
|
3452
|
-
for (i = length; i-- !== 0; )
|
|
3453
|
-
if (!equal(a[i], b[i]))
|
|
3454
|
-
return false;
|
|
3382
|
+
if (length != b.length) return false;
|
|
3383
|
+
for (i = length; i-- !== 0; ) if (!equal(a[i], b[i])) return false;
|
|
3455
3384
|
return true;
|
|
3456
3385
|
}
|
|
3457
|
-
if (arrA != arrB)
|
|
3458
|
-
return false;
|
|
3386
|
+
if (arrA != arrB) return false;
|
|
3459
3387
|
const dateA = a instanceof Date, dateB = b instanceof Date;
|
|
3460
|
-
if (dateA != dateB)
|
|
3461
|
-
|
|
3462
|
-
if (dateA && dateB)
|
|
3463
|
-
return a.getTime() == b.getTime();
|
|
3388
|
+
if (dateA != dateB) return false;
|
|
3389
|
+
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
3464
3390
|
const regexpA = a instanceof RegExp, regexpB = b instanceof RegExp;
|
|
3465
|
-
if (regexpA != regexpB)
|
|
3466
|
-
|
|
3467
|
-
if (regexpA && regexpB)
|
|
3468
|
-
return a.toString() == b.toString();
|
|
3391
|
+
if (regexpA != regexpB) return false;
|
|
3392
|
+
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
3469
3393
|
const keys = Object.keys(a);
|
|
3470
3394
|
length = keys.length;
|
|
3471
|
-
if (length !== Object.keys(b).length)
|
|
3472
|
-
|
|
3473
|
-
for (i = length; i-- !== 0; )
|
|
3474
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
3475
|
-
return false;
|
|
3395
|
+
if (length !== Object.keys(b).length) return false;
|
|
3396
|
+
for (i = length; i-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
3476
3397
|
for (i = length; i-- !== 0; ) {
|
|
3477
3398
|
key = keys[i];
|
|
3478
|
-
if (!equal(a[key], b[key]))
|
|
3479
|
-
return false;
|
|
3399
|
+
if (!equal(a[key], b[key])) return false;
|
|
3480
3400
|
}
|
|
3481
3401
|
return true;
|
|
3482
3402
|
}
|
|
@@ -4462,43 +4382,30 @@ function toHaveNthReceivedEventDetail2(eventSpy, index, eventDetail) {
|
|
|
4462
4382
|
};
|
|
4463
4383
|
}
|
|
4464
4384
|
var deepEqual2 = function equal2(a, b) {
|
|
4465
|
-
if (a === b)
|
|
4466
|
-
return true;
|
|
4385
|
+
if (a === b) return true;
|
|
4467
4386
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
4468
4387
|
const arrA = Array.isArray(a), arrB = Array.isArray(b);
|
|
4469
4388
|
let i, length, key;
|
|
4470
4389
|
if (arrA && arrB) {
|
|
4471
4390
|
length = a.length;
|
|
4472
|
-
if (length != b.length)
|
|
4473
|
-
|
|
4474
|
-
for (i = length; i-- !== 0; )
|
|
4475
|
-
if (!equal2(a[i], b[i]))
|
|
4476
|
-
return false;
|
|
4391
|
+
if (length != b.length) return false;
|
|
4392
|
+
for (i = length; i-- !== 0; ) if (!equal2(a[i], b[i])) return false;
|
|
4477
4393
|
return true;
|
|
4478
4394
|
}
|
|
4479
|
-
if (arrA != arrB)
|
|
4480
|
-
return false;
|
|
4395
|
+
if (arrA != arrB) return false;
|
|
4481
4396
|
const dateA = a instanceof Date, dateB = b instanceof Date;
|
|
4482
|
-
if (dateA != dateB)
|
|
4483
|
-
|
|
4484
|
-
if (dateA && dateB)
|
|
4485
|
-
return a.getTime() == b.getTime();
|
|
4397
|
+
if (dateA != dateB) return false;
|
|
4398
|
+
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
4486
4399
|
const regexpA = a instanceof RegExp, regexpB = b instanceof RegExp;
|
|
4487
|
-
if (regexpA != regexpB)
|
|
4488
|
-
|
|
4489
|
-
if (regexpA && regexpB)
|
|
4490
|
-
return a.toString() == b.toString();
|
|
4400
|
+
if (regexpA != regexpB) return false;
|
|
4401
|
+
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
4491
4402
|
const keys = Object.keys(a);
|
|
4492
4403
|
length = keys.length;
|
|
4493
|
-
if (length !== Object.keys(b).length)
|
|
4494
|
-
|
|
4495
|
-
for (i = length; i-- !== 0; )
|
|
4496
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
4497
|
-
return false;
|
|
4404
|
+
if (length !== Object.keys(b).length) return false;
|
|
4405
|
+
for (i = length; i-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
4498
4406
|
for (i = length; i-- !== 0; ) {
|
|
4499
4407
|
key = keys[i];
|
|
4500
|
-
if (!equal2(a[key], b[key]))
|
|
4501
|
-
return false;
|
|
4408
|
+
if (!equal2(a[key], b[key])) return false;
|
|
4502
4409
|
}
|
|
4503
4410
|
return true;
|
|
4504
4411
|
}
|
|
@@ -5475,43 +5382,30 @@ function toHaveNthReceivedEventDetail3(eventSpy, index, eventDetail) {
|
|
|
5475
5382
|
};
|
|
5476
5383
|
}
|
|
5477
5384
|
var deepEqual3 = function equal3(a, b) {
|
|
5478
|
-
if (a === b)
|
|
5479
|
-
return true;
|
|
5385
|
+
if (a === b) return true;
|
|
5480
5386
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
5481
5387
|
const arrA = Array.isArray(a), arrB = Array.isArray(b);
|
|
5482
5388
|
let i, length, key;
|
|
5483
5389
|
if (arrA && arrB) {
|
|
5484
5390
|
length = a.length;
|
|
5485
|
-
if (length != b.length)
|
|
5486
|
-
|
|
5487
|
-
for (i = length; i-- !== 0; )
|
|
5488
|
-
if (!equal3(a[i], b[i]))
|
|
5489
|
-
return false;
|
|
5391
|
+
if (length != b.length) return false;
|
|
5392
|
+
for (i = length; i-- !== 0; ) if (!equal3(a[i], b[i])) return false;
|
|
5490
5393
|
return true;
|
|
5491
5394
|
}
|
|
5492
|
-
if (arrA != arrB)
|
|
5493
|
-
return false;
|
|
5395
|
+
if (arrA != arrB) return false;
|
|
5494
5396
|
const dateA = a instanceof Date, dateB = b instanceof Date;
|
|
5495
|
-
if (dateA != dateB)
|
|
5496
|
-
|
|
5497
|
-
if (dateA && dateB)
|
|
5498
|
-
return a.getTime() == b.getTime();
|
|
5397
|
+
if (dateA != dateB) return false;
|
|
5398
|
+
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
5499
5399
|
const regexpA = a instanceof RegExp, regexpB = b instanceof RegExp;
|
|
5500
|
-
if (regexpA != regexpB)
|
|
5501
|
-
|
|
5502
|
-
if (regexpA && regexpB)
|
|
5503
|
-
return a.toString() == b.toString();
|
|
5400
|
+
if (regexpA != regexpB) return false;
|
|
5401
|
+
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
5504
5402
|
const keys = Object.keys(a);
|
|
5505
5403
|
length = keys.length;
|
|
5506
|
-
if (length !== Object.keys(b).length)
|
|
5507
|
-
|
|
5508
|
-
for (i = length; i-- !== 0; )
|
|
5509
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
5510
|
-
return false;
|
|
5404
|
+
if (length !== Object.keys(b).length) return false;
|
|
5405
|
+
for (i = length; i-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
5511
5406
|
for (i = length; i-- !== 0; ) {
|
|
5512
5407
|
key = keys[i];
|
|
5513
|
-
if (!equal3(a[key], b[key]))
|
|
5514
|
-
return false;
|
|
5408
|
+
if (!equal3(a[key], b[key])) return false;
|
|
5515
5409
|
}
|
|
5516
5410
|
return true;
|
|
5517
5411
|
}
|
|
@@ -7604,10 +7498,8 @@ var createInMemoryFs = (sys) => {
|
|
|
7604
7498
|
reducedItems.sort((a, b) => {
|
|
7605
7499
|
const partsA = a.split("/").length;
|
|
7606
7500
|
const partsB = b.split("/").length;
|
|
7607
|
-
if (partsA < partsB)
|
|
7608
|
-
|
|
7609
|
-
if (partsA > partsB)
|
|
7610
|
-
return -1;
|
|
7501
|
+
if (partsA < partsB) return 1;
|
|
7502
|
+
if (partsA > partsB) return -1;
|
|
7611
7503
|
return 0;
|
|
7612
7504
|
});
|
|
7613
7505
|
await Promise.all(reducedItems.map(removeItem));
|
|
@@ -7651,10 +7543,8 @@ var createInMemoryFs = (sys) => {
|
|
|
7651
7543
|
await readDirectory(dirPath, dirPath, opts, collectedPaths);
|
|
7652
7544
|
}
|
|
7653
7545
|
return collectedPaths.sort((a, b) => {
|
|
7654
|
-
if (a.absPath < b.absPath)
|
|
7655
|
-
|
|
7656
|
-
if (a.absPath > b.absPath)
|
|
7657
|
-
return 1;
|
|
7546
|
+
if (a.absPath < b.absPath) return -1;
|
|
7547
|
+
if (a.absPath > b.absPath) return 1;
|
|
7658
7548
|
return 0;
|
|
7659
7549
|
});
|
|
7660
7550
|
};
|
|
@@ -8099,10 +7989,8 @@ var createInMemoryFs = (sys) => {
|
|
|
8099
7989
|
});
|
|
8100
7990
|
outputs.forEach((output) => output.files.sort());
|
|
8101
7991
|
return outputs.sort((a, b) => {
|
|
8102
|
-
if (a.type < b.type)
|
|
8103
|
-
|
|
8104
|
-
if (a.type > b.type)
|
|
8105
|
-
return 1;
|
|
7992
|
+
if (a.type < b.type) return -1;
|
|
7993
|
+
if (a.type > b.type) return 1;
|
|
8106
7994
|
return 0;
|
|
8107
7995
|
});
|
|
8108
7996
|
};
|
|
@@ -8203,27 +8091,19 @@ var getCommitInstructions = (items) => {
|
|
|
8203
8091
|
instructions.dirsToEnsure.sort((a, b) => {
|
|
8204
8092
|
const segmentsA = a.split("/").length;
|
|
8205
8093
|
const segmentsB = b.split("/").length;
|
|
8206
|
-
if (segmentsA < segmentsB)
|
|
8207
|
-
|
|
8208
|
-
if (
|
|
8209
|
-
|
|
8210
|
-
if (a.length < b.length)
|
|
8211
|
-
return -1;
|
|
8212
|
-
if (a.length > b.length)
|
|
8213
|
-
return 1;
|
|
8094
|
+
if (segmentsA < segmentsB) return -1;
|
|
8095
|
+
if (segmentsA > segmentsB) return 1;
|
|
8096
|
+
if (a.length < b.length) return -1;
|
|
8097
|
+
if (a.length > b.length) return 1;
|
|
8214
8098
|
return 0;
|
|
8215
8099
|
});
|
|
8216
8100
|
instructions.dirsToDelete.sort((a, b) => {
|
|
8217
8101
|
const segmentsA = a.split("/").length;
|
|
8218
8102
|
const segmentsB = b.split("/").length;
|
|
8219
|
-
if (segmentsA < segmentsB)
|
|
8220
|
-
|
|
8221
|
-
if (
|
|
8222
|
-
|
|
8223
|
-
if (a.length < b.length)
|
|
8224
|
-
return 1;
|
|
8225
|
-
if (a.length > b.length)
|
|
8226
|
-
return -1;
|
|
8103
|
+
if (segmentsA < segmentsB) return 1;
|
|
8104
|
+
if (segmentsA > segmentsB) return -1;
|
|
8105
|
+
if (a.length < b.length) return 1;
|
|
8106
|
+
if (a.length > b.length) return -1;
|
|
8227
8107
|
return 0;
|
|
8228
8108
|
});
|
|
8229
8109
|
for (const dirToEnsure of instructions.dirsToEnsure) {
|