@rsdoctor/core 2.0.0-rc.2 → 2.0.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/dist/e.js +59 -74
- package/dist/e.js.LICENSE.txt +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +802 -143
- package/dist/r.js +69 -76
- package/package.json +12 -12
package/dist/e.js
CHANGED
|
@@ -13,7 +13,7 @@ import fs from "fs";
|
|
|
13
13
|
let __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
14
14
|
moduleFactories.add({
|
|
15
15
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy-sync.js" (module) {
|
|
16
|
-
let fs = rspackRequire("../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"), path =
|
|
16
|
+
let fs = rspackRequire("../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"), path = __rspack_createRequire_require("path"), mkdirsSync = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js").mkdirsSync, utimesMillisSync = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/utimes.js").utimesMillisSync, stat = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js");
|
|
17
17
|
function getStats(destStat, src, dest, opts) {
|
|
18
18
|
let srcStat = (opts.dereference ? fs.statSync : fs.lstatSync)(src);
|
|
19
19
|
if (srcStat.isDirectory()) {
|
|
@@ -79,7 +79,7 @@ moduleFactories.add({
|
|
|
79
79
|
};
|
|
80
80
|
},
|
|
81
81
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy.js" (module) {
|
|
82
|
-
let fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path =
|
|
82
|
+
let fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path = __rspack_createRequire_require("path"), { mkdirs } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"), { pathExists } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js"), { utimesMillis } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/utimes.js"), stat = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js");
|
|
83
83
|
async function runFilter(src, dest, opts) {
|
|
84
84
|
return !opts.filter || opts.filter(src, dest);
|
|
85
85
|
}
|
|
@@ -148,7 +148,7 @@ moduleFactories.add({
|
|
|
148
148
|
};
|
|
149
149
|
},
|
|
150
150
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/empty/index.js" (module) {
|
|
151
|
-
let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path =
|
|
151
|
+
let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path = __rspack_createRequire_require("path"), mkdir = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"), remove = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/remove/index.js"), emptyDir = u(async function(dir) {
|
|
152
152
|
let items;
|
|
153
153
|
try {
|
|
154
154
|
items = await fs.readdir(dir);
|
|
@@ -176,7 +176,7 @@ moduleFactories.add({
|
|
|
176
176
|
};
|
|
177
177
|
},
|
|
178
178
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/file.js" (module) {
|
|
179
|
-
let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, path =
|
|
179
|
+
let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, path = __rspack_createRequire_require("path"), fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), mkdir = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js");
|
|
180
180
|
module.exports = {
|
|
181
181
|
createFile: u(async function createFile(file) {
|
|
182
182
|
let stats;
|
|
@@ -231,7 +231,7 @@ moduleFactories.add({
|
|
|
231
231
|
};
|
|
232
232
|
},
|
|
233
233
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/link.js" (module) {
|
|
234
|
-
let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, path =
|
|
234
|
+
let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, path = __rspack_createRequire_require("path"), fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), mkdir = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"), { pathExists } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js"), { areIdentical } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js");
|
|
235
235
|
module.exports = {
|
|
236
236
|
createLink: u(async function createLink(srcpath, dstpath) {
|
|
237
237
|
let dstStat, srcStat;
|
|
@@ -264,7 +264,7 @@ moduleFactories.add({
|
|
|
264
264
|
};
|
|
265
265
|
},
|
|
266
266
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-paths.js" (module) {
|
|
267
|
-
let path =
|
|
267
|
+
let path = __rspack_createRequire_require("path"), fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), { pathExists } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js");
|
|
268
268
|
async function symlinkPaths(srcpath, dstpath) {
|
|
269
269
|
if (path.isAbsolute(srcpath)) {
|
|
270
270
|
try {
|
|
@@ -342,7 +342,7 @@ moduleFactories.add({
|
|
|
342
342
|
};
|
|
343
343
|
},
|
|
344
344
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink.js" (module) {
|
|
345
|
-
let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, path =
|
|
345
|
+
let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, path = __rspack_createRequire_require("path"), fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), { mkdirs, mkdirsSync } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"), { symlinkPaths, symlinkPathsSync } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"), { symlinkType, symlinkTypeSync } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-type.js"), { pathExists } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js"), { areIdentical } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js");
|
|
346
346
|
module.exports = {
|
|
347
347
|
createSymlink: u(async function createSymlink(srcpath, dstpath, type) {
|
|
348
348
|
let stats;
|
|
@@ -526,7 +526,7 @@ moduleFactories.add({
|
|
|
526
526
|
}));
|
|
527
527
|
},
|
|
528
528
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/utils.js" (module) {
|
|
529
|
-
let path =
|
|
529
|
+
let path = __rspack_createRequire_require("path");
|
|
530
530
|
module.exports.checkPath = function(pth) {
|
|
531
531
|
if ('win32' === process.platform && /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))) {
|
|
532
532
|
let error = Error(`Path contains invalid characters: ${pth}`);
|
|
@@ -541,7 +541,7 @@ moduleFactories.add({
|
|
|
541
541
|
};
|
|
542
542
|
},
|
|
543
543
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move-sync.js" (module) {
|
|
544
|
-
let fs = rspackRequire("../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"), path =
|
|
544
|
+
let fs = rspackRequire("../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"), path = __rspack_createRequire_require("path"), copySync = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/index.js").copySync, removeSync = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/remove/index.js").removeSync, mkdirpSync = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js").mkdirpSync, stat = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js");
|
|
545
545
|
function rename(src, dest, overwrite) {
|
|
546
546
|
try {
|
|
547
547
|
fs.renameSync(src, dest);
|
|
@@ -567,7 +567,7 @@ moduleFactories.add({
|
|
|
567
567
|
};
|
|
568
568
|
},
|
|
569
569
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move.js" (module) {
|
|
570
|
-
let fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path =
|
|
570
|
+
let fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path = __rspack_createRequire_require("path"), { copy } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/index.js"), { remove } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/remove/index.js"), { mkdirp } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"), { pathExists } = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js"), stat = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js");
|
|
571
571
|
async function doRename(src, dest, overwrite, isChangingCase) {
|
|
572
572
|
if (!isChangingCase) {
|
|
573
573
|
if (overwrite) await remove(dest);
|
|
@@ -595,7 +595,7 @@ moduleFactories.add({
|
|
|
595
595
|
};
|
|
596
596
|
},
|
|
597
597
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/output-file/index.js" (module) {
|
|
598
|
-
let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path =
|
|
598
|
+
let u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise, fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path = __rspack_createRequire_require("path"), mkdir = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"), pathExists = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js").pathExists;
|
|
599
599
|
module.exports = {
|
|
600
600
|
outputFile: u(async function outputFile(file, data, encoding = 'utf-8') {
|
|
601
601
|
let dir = path.dirname(file);
|
|
@@ -634,7 +634,7 @@ moduleFactories.add({
|
|
|
634
634
|
};
|
|
635
635
|
},
|
|
636
636
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js" (module) {
|
|
637
|
-
let fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path =
|
|
637
|
+
let fs = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"), path = __rspack_createRequire_require("path"), u = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js").fromPromise;
|
|
638
638
|
async function checkParentPaths(src, srcStat, dest, funcName) {
|
|
639
639
|
let destStat, srcParent = path.resolve(path.dirname(src)), destParent = path.resolve(path.dirname(dest));
|
|
640
640
|
if (destParent !== srcParent && destParent !== path.parse(destParent).root) {
|
|
@@ -794,7 +794,7 @@ moduleFactories.add({
|
|
|
794
794
|
};
|
|
795
795
|
},
|
|
796
796
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js" (module) {
|
|
797
|
-
var gracefulQueue, previousSymbol, retryTimer, fs =
|
|
797
|
+
var gracefulQueue, previousSymbol, retryTimer, fs = __rspack_createRequire_require("fs"), polyfills = rspackRequire("../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"), legacy = rspackRequire("../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"), clone = rspackRequire("../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"), util = __rspack_createRequire_require("util");
|
|
798
798
|
function publishQueue(context, queue) {
|
|
799
799
|
Object.defineProperty(context, gracefulQueue, {
|
|
800
800
|
get: function() {
|
|
@@ -1037,11 +1037,11 @@ moduleFactories.add({
|
|
|
1037
1037
|
value: fs$closeSync
|
|
1038
1038
|
}), closeSync;
|
|
1039
1039
|
}(fs.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || '') && process.on('exit', function() {
|
|
1040
|
-
debug(fs[gracefulQueue]),
|
|
1040
|
+
debug(fs[gracefulQueue]), __rspack_createRequire_require("assert").equal(fs[gracefulQueue].length, 0);
|
|
1041
1041
|
})), global[gracefulQueue] || publishQueue(global, fs[gracefulQueue]), module.exports = patch(clone(fs)), process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched && (module.exports = patch(fs), fs.__patched = !0);
|
|
1042
1042
|
},
|
|
1043
1043
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js" (module) {
|
|
1044
|
-
var Stream =
|
|
1044
|
+
var Stream = __rspack_createRequire_require("stream").Stream;
|
|
1045
1045
|
module.exports = function(fs) {
|
|
1046
1046
|
return {
|
|
1047
1047
|
ReadStream: function ReadStream(path, options) {
|
|
@@ -1094,7 +1094,7 @@ moduleFactories.add({
|
|
|
1094
1094
|
};
|
|
1095
1095
|
},
|
|
1096
1096
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js" (module) {
|
|
1097
|
-
var constants =
|
|
1097
|
+
var constants = __rspack_createRequire_require("constants"), origCwd = process.cwd, cwd = null, platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
1098
1098
|
process.cwd = function() {
|
|
1099
1099
|
return cwd || (cwd = origCwd.call(process)), cwd;
|
|
1100
1100
|
};
|
|
@@ -1257,7 +1257,7 @@ moduleFactories.add({
|
|
|
1257
1257
|
try {
|
|
1258
1258
|
_fs = rspackRequire("../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js");
|
|
1259
1259
|
} catch (_) {
|
|
1260
|
-
_fs =
|
|
1260
|
+
_fs = __rspack_createRequire_require("fs");
|
|
1261
1261
|
}
|
|
1262
1262
|
let universalify = rspackRequire("../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"), { stringify, stripBom } = rspackRequire("../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js");
|
|
1263
1263
|
async function _readFile(file, options = {}) {
|
|
@@ -1332,24 +1332,6 @@ moduleFactories.add({
|
|
|
1332
1332
|
value: fn.name
|
|
1333
1333
|
});
|
|
1334
1334
|
};
|
|
1335
|
-
},
|
|
1336
|
-
"assert?23ce" (module) {
|
|
1337
|
-
module.exports = __rspack_createRequire_require("assert");
|
|
1338
|
-
},
|
|
1339
|
-
constants (module) {
|
|
1340
|
-
module.exports = __rspack_createRequire_require("constants");
|
|
1341
|
-
},
|
|
1342
|
-
"fs?cdbd" (module) {
|
|
1343
|
-
module.exports = __rspack_createRequire_require("fs");
|
|
1344
|
-
},
|
|
1345
|
-
"path?37f5" (module) {
|
|
1346
|
-
module.exports = __rspack_createRequire_require("path");
|
|
1347
|
-
},
|
|
1348
|
-
"stream?cce9" (module) {
|
|
1349
|
-
module.exports = __rspack_createRequire_require("stream");
|
|
1350
|
-
},
|
|
1351
|
-
util (module) {
|
|
1352
|
-
module.exports = __rspack_createRequire_require("util");
|
|
1353
1335
|
}
|
|
1354
1336
|
});
|
|
1355
1337
|
var options, Types, esm_Types, utils_namespaceObject = {};
|
|
@@ -2006,7 +1988,7 @@ function calculateOptimizedValue(num, e, isDecimal, bits, ceil, autoExponent = !
|
|
|
2006
1988
|
};
|
|
2007
1989
|
}
|
|
2008
1990
|
function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "", localeOptions = {}, separator = "", spacer = " ", symbols = {}, standard = "", output = STRING, fullform = !1, fullforms = [], exponent = -1, roundingMethod = "round", precision = 0 } = {}) {
|
|
2009
|
-
let p, r, symbolTable, numericValue, e = exponent, num, result = [], val = 0, u = "";
|
|
1991
|
+
let p, r, symbolTable, numericValue, valueResult, e = exponent, num, result = [], val = 0, u = "", isBigInt = "bigint" == typeof arg;
|
|
2010
1992
|
if (isNaN(num = Number(arg)) || !isFinite(num)) throw TypeError("Invalid number");
|
|
2011
1993
|
let { isDecimal, ceil, actualStandard } = STANDARD_CONFIGS[standard] ? STANDARD_CONFIGS[standard] : 2 === base ? {
|
|
2012
1994
|
isDecimal: !1,
|
|
@@ -2030,16 +2012,39 @@ function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "",
|
|
|
2030
2012
|
unit: symbol
|
|
2031
2013
|
} : value + spacer + symbol;
|
|
2032
2014
|
}
|
|
2033
|
-
let
|
|
2034
|
-
|
|
2035
|
-
precision:
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2015
|
+
let bigNum = isBigInt ? neg ? -BigInt(arg) : BigInt(arg) : null, precisionAdjusted = precision;
|
|
2016
|
+
if (isBigInt) {
|
|
2017
|
+
let { e: calculatedE, precision: pa } = function(num, e, isDecimal, precision) {
|
|
2018
|
+
if ("string" == typeof e && (e = Number(e)), -1 === e || isNaN(e)) if (e = 0, isDecimal) for(; e < 8 && num >= 10n ** BigInt(3 * (e + 1));)e++;
|
|
2019
|
+
else for(; e < 8 && num >= 1024n ** BigInt(e + 1);)e++;
|
|
2020
|
+
else e = e < 0 ? 0 : Math.floor(e);
|
|
2021
|
+
return e > 8 ? (precision > 0 && (precision += 8 - e), {
|
|
2022
|
+
e: 8,
|
|
2023
|
+
precision
|
|
2024
|
+
}) : {
|
|
2025
|
+
e,
|
|
2026
|
+
precision
|
|
2027
|
+
};
|
|
2028
|
+
}(bigNum, e, isDecimal, precision);
|
|
2029
|
+
e = calculatedE, precisionAdjusted = pa;
|
|
2030
|
+
} else {
|
|
2031
|
+
let { e: calculatedE, precision: pa } = (num1 = num, e1 = e, precision1 = precision, ("string" == typeof e1 && (e1 = Number(e1)), -1 === e1 || isNaN(e1) ? (e1 = isDecimal ? Math.floor(Math.log(num1) / LOG_10_1000) : Math.floor(Math.log(num1) / LOG_2_1024)) < 0 && (e1 = 0) : e1 = e1 < 0 ? 0 : Math.floor(e1), e1 > 8) ? (precision1 > 0 && (precision1 += 8 - e1), {
|
|
2032
|
+
e: 8,
|
|
2033
|
+
precision: precision1
|
|
2034
|
+
}) : {
|
|
2035
|
+
e: e1,
|
|
2036
|
+
precision: precision1
|
|
2037
|
+
});
|
|
2038
|
+
e = calculatedE, precisionAdjusted = pa;
|
|
2039
|
+
}
|
|
2040
|
+
let autoExponent = -1 === exponent || isNaN(exponent);
|
|
2041
|
+
val = (valueResult = isBigInt ? function(num, e, isDecimal, bits, ceil, autoExponent = !0) {
|
|
2042
|
+
let power = isDecimal ? 10n ** BigInt(3 * e) : 1024n ** BigInt(e), SHIFT = 10n ** 16n, result = Number(num * SHIFT / power) / Number(SHIFT);
|
|
2043
|
+
return bits && (result *= 8, autoExponent && result >= ceil && e < 8 && (result /= ceil, e++)), {
|
|
2044
|
+
result,
|
|
2045
|
+
e
|
|
2046
|
+
};
|
|
2047
|
+
}(bigNum, e, isDecimal, bits, ceil, autoExponent) : calculateOptimizedValue(num, e, isDecimal, bits, ceil, autoExponent)).result, e = valueResult.e;
|
|
2043
2048
|
let rounded = (val1 = val, (r = 1 === (p = (e2 = e) > 0 && round > 0 ? Math.pow(10, round) : 1) ? roundingFunc(val1) : roundingFunc(val1 * p) / p) === ceil && e2 < 8 && autoExponent && (r = 1, e2++), {
|
|
2044
2049
|
value: r,
|
|
2045
2050
|
e: e2
|
|
@@ -5845,9 +5850,9 @@ let withKeyword = "with", assertKeyword = "assert", importAttributes = (options
|
|
|
5845
5850
|
this.parseExpression()
|
|
5846
5851
|
]), this._eat(tt.parenR), this.finishNode(node, "ImportExpression");
|
|
5847
5852
|
}
|
|
5848
|
-
parseExport(node,
|
|
5853
|
+
parseExport(node, exports) {
|
|
5849
5854
|
if (this.next(), this.eat(tt.star)) {
|
|
5850
|
-
if (this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (node.exported = this.parseIdent(!0), this.checkExport(
|
|
5855
|
+
if (this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (node.exported = this.parseIdent(!0), this.checkExport(exports, node.exported.name, this.lastTokStart)) : node.exported = null), this.expectContextual("from"), this.type !== tt.string && this.unexpected(), node.source = this.parseExprAtom(), this._matchKeywordToken()) {
|
|
5851
5856
|
let property = this._getProperty();
|
|
5852
5857
|
this.next();
|
|
5853
5858
|
let attributes = this.parseImportAttributes();
|
|
@@ -5856,7 +5861,7 @@ let withKeyword = "with", assertKeyword = "assert", importAttributes = (options
|
|
|
5856
5861
|
return this.semicolon(), this.finishNode(node, "ExportAllDeclaration");
|
|
5857
5862
|
}
|
|
5858
5863
|
if (this.eat(tt._default)) {
|
|
5859
|
-
if (this.checkExport(
|
|
5864
|
+
if (this.checkExport(exports, "default", this.lastTokStart), this.type === tt._function || (isAsync = this.isAsyncFunction())) {
|
|
5860
5865
|
var isAsync, fNode = this.startNode();
|
|
5861
5866
|
this.next(), isAsync && this.next(), node.declaration = this.parseFunction(fNode, 5, !1, isAsync);
|
|
5862
5867
|
} else if (this.type === tt._class) {
|
|
@@ -5865,9 +5870,9 @@ let withKeyword = "with", assertKeyword = "assert", importAttributes = (options
|
|
|
5865
5870
|
} else node.declaration = this.parseMaybeAssign(), this.semicolon();
|
|
5866
5871
|
return this.finishNode(node, "ExportDefaultDeclaration");
|
|
5867
5872
|
}
|
|
5868
|
-
if (this.shouldParseExportStatement()) node.declaration = this.parseStatement(null), "VariableDeclaration" === node.declaration.type ? this.checkVariableExport(
|
|
5873
|
+
if (this.shouldParseExportStatement()) node.declaration = this.parseStatement(null), "VariableDeclaration" === node.declaration.type ? this.checkVariableExport(exports, node.declaration.declarations) : this.checkExport(exports, node.declaration.id.name, node.declaration.id.start), node.specifiers = [], node.source = null;
|
|
5869
5874
|
else {
|
|
5870
|
-
if (node.declaration = null, node.specifiers = this.parseExportSpecifiers(
|
|
5875
|
+
if (node.declaration = null, node.specifiers = this.parseExportSpecifiers(exports), this.eatContextual("from")) {
|
|
5871
5876
|
if (this.type !== tt.string && this.unexpected(), node.source = this.parseExprAtom(), this._matchKeywordToken()) {
|
|
5872
5877
|
let property = this._getProperty();
|
|
5873
5878
|
this.next();
|
|
@@ -6285,24 +6290,14 @@ let acornParserInternal = acorn_Parser.extend(importAttributes), acornParserExpo
|
|
|
6285
6290
|
state.locations = getModulesLocations(args[0]);
|
|
6286
6291
|
return;
|
|
6287
6292
|
}
|
|
6288
|
-
if ('Identifier' === node.callee.type && mayBeAsyncChunkArguments(args) && isModulesList(args[1])) {
|
|
6289
|
-
state.locations = getModulesLocations(args[1]);
|
|
6290
|
-
return;
|
|
6291
|
-
}
|
|
6292
6293
|
if (function(node) {
|
|
6293
|
-
|
|
6294
|
-
|
|
6294
|
+
var node1, args, node2, node3, node4;
|
|
6295
|
+
let { callee, arguments: args1 } = node;
|
|
6296
|
+
return 'MemberExpression' === callee.type && 'push' === callee.property.name && 'AssignmentExpression' === callee.object.type && 1 === args1.length && 'ArrayExpression' === args1[0].type && (args = args1[0].elements).length >= 2 && 'ArrayExpression' === (node2 = args[0]).type && node2.elements.every(isModuleId) && (isModulesHash(node3 = node1 = args1[0].elements[1]) || isModulesArray(node3) || 'CallExpression' === (node4 = node1).type && 'MemberExpression' === node4.callee.type && 'CallExpression' === node4.callee.object.type && 'Identifier' === node4.callee.object.callee.type && 'Array' === node4.callee.object.callee.name && 1 === node4.callee.object.arguments.length && isNumericId(node4.callee.object.arguments[0]) && 'Identifier' === node4.callee.property.type && 'concat' === node4.callee.property.name && 1 === node4.arguments.length && isModulesArray(node4.arguments[0]));
|
|
6295
6297
|
}(node)) {
|
|
6296
6298
|
state.locations = getModulesLocations(args[0].elements[1]);
|
|
6297
6299
|
return;
|
|
6298
6300
|
}
|
|
6299
|
-
if (function(node) {
|
|
6300
|
-
let { callee, type, arguments: args } = node;
|
|
6301
|
-
return 'CallExpression' === type && 'MemberExpression' === callee.type && 2 === args.length && isChunkIds(args[0]) && isModulesList(args[1]);
|
|
6302
|
-
}(node)) {
|
|
6303
|
-
state.locations = getModulesLocations(args[1]);
|
|
6304
|
-
return;
|
|
6305
|
-
}
|
|
6306
6301
|
args.forEach((arg)=>c(arg, state));
|
|
6307
6302
|
}
|
|
6308
6303
|
});
|
|
@@ -6326,10 +6321,6 @@ let acornParserInternal = acorn_Parser.extend(importAttributes), acornParserExpo
|
|
|
6326
6321
|
}(content, walkState.locations)
|
|
6327
6322
|
};
|
|
6328
6323
|
};
|
|
6329
|
-
function isModulesList(node) {
|
|
6330
|
-
var node1, node2;
|
|
6331
|
-
return isModulesHash(node1 = node) || isModulesArray(node1) || 'CallExpression' === (node2 = node).type && 'MemberExpression' === node2.callee.type && 'CallExpression' === node2.callee.object.type && 'Identifier' === node2.callee.object.callee.type && 'Array' === node2.callee.object.callee.name && 1 === node2.callee.object.arguments.length && isNumericId(node2.callee.object.arguments[0]) && 'Identifier' === node2.callee.property.type && 'concat' === node2.callee.property.name && 1 === node2.arguments.length && isModulesArray(node2.arguments[0]);
|
|
6332
|
-
}
|
|
6333
6324
|
function isModulesHash(node) {
|
|
6334
6325
|
return 'ObjectExpression' === node.type && node.properties.map((node)=>node.value).every(isModuleWrapper);
|
|
6335
6326
|
}
|
|
@@ -6345,12 +6336,6 @@ function isModuleId(node) {
|
|
|
6345
6336
|
function isNumericId(node) {
|
|
6346
6337
|
return 'Literal' === node.type && Number.isInteger(node.value) && node.value >= 0;
|
|
6347
6338
|
}
|
|
6348
|
-
function isChunkIds(node) {
|
|
6349
|
-
return 'ArrayExpression' === node.type && node.elements.every(isModuleId);
|
|
6350
|
-
}
|
|
6351
|
-
function mayBeAsyncChunkArguments(args) {
|
|
6352
|
-
return args.length >= 2 && isChunkIds(args[0]);
|
|
6353
|
-
}
|
|
6354
6339
|
function getModulesLocations(node) {
|
|
6355
6340
|
if ('ObjectExpression' === node.type) return node.properties.reduce((result, moduleNode)=>(result[moduleNode.key.name || moduleNode.key.value] = getModuleLocation(moduleNode.value), result), {});
|
|
6356
6341
|
let isOptimizedArray = 'CallExpression' === node.type;
|
package/dist/e.js.LICENSE.txt
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -88,7 +88,7 @@ export declare class LinterRule<Config = DefaultRuleConfig> implements LinterTyp
|
|
|
88
88
|
get title(): string;
|
|
89
89
|
get severity(): LinterType.Severity;
|
|
90
90
|
get config(): Config | undefined;
|
|
91
|
-
get category(): "bundle" | "compile" |
|
|
91
|
+
get category(): "bundle" | "compile" | Rule.RuleMessageCategory;
|
|
92
92
|
setOption(opt: LinterType.RuleConfigItem): void;
|
|
93
93
|
match(level: LinterType.Severity): boolean;
|
|
94
94
|
validate(context: SDK.RuntimeContext): Promise<LinterType.ValidateResult>;
|
|
@@ -273,6 +273,8 @@ export declare class RsdoctorRspackPlugin<Rules extends LinterType.ExtendRuleDat
|
|
|
273
273
|
private getBriefReportFileName;
|
|
274
274
|
private applyChildCompilerSupport;
|
|
275
275
|
private registerChildCompiler;
|
|
276
|
+
private shouldIgnoreChildCompiler;
|
|
277
|
+
private getChildCompilerDisplayName;
|
|
276
278
|
private removeInheritedRsdoctorTaps;
|
|
277
279
|
private childDone;
|
|
278
280
|
private shouldDisposeSDK;
|
|
@@ -372,6 +374,7 @@ declare class RsdoctorServer implements SDK.RsdoctorServerInstance {
|
|
|
372
374
|
private disposed;
|
|
373
375
|
private _router;
|
|
374
376
|
private _innerClientPath;
|
|
377
|
+
private _innerClientOverrides;
|
|
375
378
|
private _printServerUrl;
|
|
376
379
|
private _cors;
|
|
377
380
|
private _socketToken;
|
|
@@ -381,6 +384,8 @@ declare class RsdoctorServer implements SDK.RsdoctorServerInstance {
|
|
|
381
384
|
get origin(): string;
|
|
382
385
|
get socketUrl(): ISocketType;
|
|
383
386
|
get innerClientPath(): string;
|
|
387
|
+
get innerClientOverrides(): SDK.SDKOptionsType['innerClientOverrides'];
|
|
388
|
+
private applyClientOverrides;
|
|
384
389
|
private createInnerServer;
|
|
385
390
|
private resolveCorsOptions;
|
|
386
391
|
bootstrap(): Promise<void>;
|
|
@@ -399,6 +404,7 @@ declare class RsdoctorServer implements SDK.RsdoctorServerInstance {
|
|
|
399
404
|
|
|
400
405
|
declare type RsdoctorServerOptions = {
|
|
401
406
|
innerClientPath?: string;
|
|
407
|
+
innerClientOverrides?: SDK.SDKOptionsType['innerClientOverrides'];
|
|
402
408
|
printServerUrl?: boolean;
|
|
403
409
|
cors?: SDK.RsdoctorServerConfig['cors'];
|
|
404
410
|
};
|