vitepress 0.22.0 → 0.22.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/dist/client/app/router.js +13 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/theme-default/components/LastUpdated.vue +6 -4
- package/dist/client/theme-default/components/PageFooter.vue +4 -1
- package/dist/node/cli.js +2 -1
- package/dist/node/index.d.ts +2 -1
- package/dist/node/index.js +2 -1
- package/dist/node/{serve-9874c5ac.js → serve-c594fc71.js} +1031 -400
- package/package.json +6 -3
- package/types/shared.d.ts +1 -1
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var vite = require('vite');
|
|
4
|
-
var require$$0$
|
|
4
|
+
var require$$0$f = require('readline');
|
|
5
5
|
var require$$5 = require('assert');
|
|
6
|
-
var require$$0$
|
|
6
|
+
var require$$0$c = require('events');
|
|
7
7
|
var require$$0$7 = require('stream');
|
|
8
|
-
var require$$0$
|
|
9
|
-
var require$$0$
|
|
10
|
-
var path$
|
|
11
|
-
var
|
|
8
|
+
var require$$0$9 = require('util');
|
|
9
|
+
var require$$0$e = require('buffer');
|
|
10
|
+
var path$s = require('path');
|
|
11
|
+
var require$$0$8 = require('fs');
|
|
12
12
|
var require$$8 = require('punycode');
|
|
13
13
|
var prism = require('prismjs');
|
|
14
14
|
var url$1 = require('url');
|
|
15
|
+
var require$$0$d = require('child_process');
|
|
15
16
|
var qs = require('querystring');
|
|
16
|
-
var require$$0$
|
|
17
|
+
var require$$0$a = require('tty');
|
|
17
18
|
var require$$4 = require('net');
|
|
18
19
|
var require$$7 = require('zlib');
|
|
19
20
|
var require$$0$6 = require('constants');
|
|
20
|
-
var require$$0$
|
|
21
|
-
var require$$0$
|
|
21
|
+
var require$$0$b = require('os');
|
|
22
|
+
var require$$0$g = require('http');
|
|
22
23
|
|
|
23
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
25
|
|
|
@@ -40,25 +41,26 @@ function _interopNamespace(e) {
|
|
|
40
41
|
return Object.freeze(n);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
var require$$0__default$
|
|
44
|
+
var require$$0__default$9 = /*#__PURE__*/_interopDefaultLegacy(require$$0$f);
|
|
44
45
|
var require$$5__default = /*#__PURE__*/_interopDefaultLegacy(require$$5);
|
|
45
|
-
var require$$0__default$
|
|
46
|
+
var require$$0__default$6 = /*#__PURE__*/_interopDefaultLegacy(require$$0$c);
|
|
46
47
|
var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$7);
|
|
48
|
+
var require$$0__default$3 = /*#__PURE__*/_interopDefaultLegacy(require$$0$9);
|
|
49
|
+
var require$$0__default$8 = /*#__PURE__*/_interopDefaultLegacy(require$$0$e);
|
|
50
|
+
var path__default = /*#__PURE__*/_interopDefaultLegacy(path$s);
|
|
47
51
|
var require$$0__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$0$8);
|
|
48
|
-
var require$$
|
|
49
|
-
var path__default = /*#__PURE__*/_interopDefaultLegacy(path$p);
|
|
50
|
-
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs$v);
|
|
51
|
-
var fs__namespace = /*#__PURE__*/_interopNamespace(fs$v);
|
|
52
|
+
var require$$0__namespace = /*#__PURE__*/_interopNamespace(require$$0$8);
|
|
52
53
|
var require$$8__default = /*#__PURE__*/_interopDefaultLegacy(require$$8);
|
|
53
54
|
var prism__default = /*#__PURE__*/_interopDefaultLegacy(prism);
|
|
55
|
+
var require$$0__default$7 = /*#__PURE__*/_interopDefaultLegacy(require$$0$d);
|
|
54
56
|
var qs__namespace = /*#__PURE__*/_interopNamespace(qs);
|
|
55
57
|
var qs__default = /*#__PURE__*/_interopDefaultLegacy(qs);
|
|
56
|
-
var require$$0__default$
|
|
58
|
+
var require$$0__default$4 = /*#__PURE__*/_interopDefaultLegacy(require$$0$a);
|
|
57
59
|
var require$$4__default = /*#__PURE__*/_interopDefaultLegacy(require$$4);
|
|
58
60
|
var require$$7__default = /*#__PURE__*/_interopDefaultLegacy(require$$7);
|
|
59
61
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0$6);
|
|
60
|
-
var require$$0__default$
|
|
61
|
-
var require$$0__default$
|
|
62
|
+
var require$$0__default$5 = /*#__PURE__*/_interopDefaultLegacy(require$$0$b);
|
|
63
|
+
var require$$0__default$a = /*#__PURE__*/_interopDefaultLegacy(require$$0$g);
|
|
62
64
|
|
|
63
65
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
64
66
|
|
|
@@ -81,7 +83,7 @@ function commonjsRequire (path) {
|
|
|
81
83
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
var fs$
|
|
86
|
+
var fs$x = {};
|
|
85
87
|
|
|
86
88
|
var universalify$1 = {};
|
|
87
89
|
|
|
@@ -596,12 +598,12 @@ function clone$3 (obj) {
|
|
|
596
598
|
return copy
|
|
597
599
|
}
|
|
598
600
|
|
|
599
|
-
var fs$
|
|
601
|
+
var fs$w = require$$0__default$2["default"];
|
|
600
602
|
var polyfills = polyfills$1;
|
|
601
603
|
var legacy = legacyStreams;
|
|
602
604
|
var clone$2 = clone_1;
|
|
603
605
|
|
|
604
|
-
var util$5 = require$$0__default$
|
|
606
|
+
var util$5 = require$$0__default$3["default"];
|
|
605
607
|
|
|
606
608
|
/* istanbul ignore next - node 0.x polyfill */
|
|
607
609
|
var gracefulQueue;
|
|
@@ -638,18 +640,18 @@ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
|
|
|
638
640
|
};
|
|
639
641
|
|
|
640
642
|
// Once time initialization
|
|
641
|
-
if (!fs$
|
|
643
|
+
if (!fs$w[gracefulQueue]) {
|
|
642
644
|
// This queue can be shared by multiple loaded instances
|
|
643
645
|
var queue$1 = commonjsGlobal[gracefulQueue] || [];
|
|
644
|
-
publishQueue(fs$
|
|
646
|
+
publishQueue(fs$w, queue$1);
|
|
645
647
|
|
|
646
648
|
// Patch fs.close/closeSync to shared queue version, because we need
|
|
647
649
|
// to retry() whenever a close happens *anywhere* in the program.
|
|
648
650
|
// This is essential when multiple graceful-fs instances are
|
|
649
651
|
// in play at the same time.
|
|
650
|
-
fs$
|
|
652
|
+
fs$w.close = (function (fs$close) {
|
|
651
653
|
function close (fd, cb) {
|
|
652
|
-
return fs$close.call(fs$
|
|
654
|
+
return fs$close.call(fs$w, fd, function (err) {
|
|
653
655
|
// This function uses the graceful-fs shared queue
|
|
654
656
|
if (!err) {
|
|
655
657
|
resetQueue();
|
|
@@ -664,12 +666,12 @@ if (!fs$t[gracefulQueue]) {
|
|
|
664
666
|
value: fs$close
|
|
665
667
|
});
|
|
666
668
|
return close
|
|
667
|
-
})(fs$
|
|
669
|
+
})(fs$w.close);
|
|
668
670
|
|
|
669
|
-
fs$
|
|
671
|
+
fs$w.closeSync = (function (fs$closeSync) {
|
|
670
672
|
function closeSync (fd) {
|
|
671
673
|
// This function uses the graceful-fs shared queue
|
|
672
|
-
fs$closeSync.apply(fs$
|
|
674
|
+
fs$closeSync.apply(fs$w, arguments);
|
|
673
675
|
resetQueue();
|
|
674
676
|
}
|
|
675
677
|
|
|
@@ -677,24 +679,24 @@ if (!fs$t[gracefulQueue]) {
|
|
|
677
679
|
value: fs$closeSync
|
|
678
680
|
});
|
|
679
681
|
return closeSync
|
|
680
|
-
})(fs$
|
|
682
|
+
})(fs$w.closeSync);
|
|
681
683
|
|
|
682
684
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
|
|
683
685
|
process.on('exit', function() {
|
|
684
|
-
debug$4(fs$
|
|
685
|
-
require$$5__default["default"].equal(fs$
|
|
686
|
+
debug$4(fs$w[gracefulQueue]);
|
|
687
|
+
require$$5__default["default"].equal(fs$w[gracefulQueue].length, 0);
|
|
686
688
|
});
|
|
687
689
|
}
|
|
688
690
|
}
|
|
689
691
|
|
|
690
692
|
if (!commonjsGlobal[gracefulQueue]) {
|
|
691
|
-
publishQueue(commonjsGlobal, fs$
|
|
693
|
+
publishQueue(commonjsGlobal, fs$w[gracefulQueue]);
|
|
692
694
|
}
|
|
693
695
|
|
|
694
|
-
var gracefulFs = patch(clone$2(fs$
|
|
695
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$
|
|
696
|
-
gracefulFs = patch(fs$
|
|
697
|
-
fs$
|
|
696
|
+
var gracefulFs = patch(clone$2(fs$w));
|
|
697
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$w.__patched) {
|
|
698
|
+
gracefulFs = patch(fs$w);
|
|
699
|
+
fs$w.__patched = true;
|
|
698
700
|
}
|
|
699
701
|
|
|
700
702
|
function patch (fs) {
|
|
@@ -949,7 +951,7 @@ function patch (fs) {
|
|
|
949
951
|
|
|
950
952
|
function enqueue (elem) {
|
|
951
953
|
debug$4('ENQUEUE', elem[0].name, elem[1]);
|
|
952
|
-
fs$
|
|
954
|
+
fs$w[gracefulQueue].push(elem);
|
|
953
955
|
retry();
|
|
954
956
|
}
|
|
955
957
|
|
|
@@ -961,12 +963,12 @@ var retryTimer;
|
|
|
961
963
|
// delay between attempts so that we'll retry these jobs sooner
|
|
962
964
|
function resetQueue () {
|
|
963
965
|
var now = Date.now();
|
|
964
|
-
for (var i = 0; i < fs$
|
|
966
|
+
for (var i = 0; i < fs$w[gracefulQueue].length; ++i) {
|
|
965
967
|
// entries that are only a length of 2 are from an older version, don't
|
|
966
968
|
// bother modifying those since they'll be retried anyway.
|
|
967
|
-
if (fs$
|
|
968
|
-
fs$
|
|
969
|
-
fs$
|
|
969
|
+
if (fs$w[gracefulQueue][i].length > 2) {
|
|
970
|
+
fs$w[gracefulQueue][i][3] = now; // startTime
|
|
971
|
+
fs$w[gracefulQueue][i][4] = now; // lastTime
|
|
970
972
|
}
|
|
971
973
|
}
|
|
972
974
|
// call retry to make sure we're actively processing the queue
|
|
@@ -978,10 +980,10 @@ function retry () {
|
|
|
978
980
|
clearTimeout(retryTimer);
|
|
979
981
|
retryTimer = undefined;
|
|
980
982
|
|
|
981
|
-
if (fs$
|
|
983
|
+
if (fs$w[gracefulQueue].length === 0)
|
|
982
984
|
return
|
|
983
985
|
|
|
984
|
-
var elem = fs$
|
|
986
|
+
var elem = fs$w[gracefulQueue].shift();
|
|
985
987
|
var fn = elem[0];
|
|
986
988
|
var args = elem[1];
|
|
987
989
|
// these items may be unset if they were added by an older graceful-fs
|
|
@@ -1016,7 +1018,7 @@ function retry () {
|
|
|
1016
1018
|
} else {
|
|
1017
1019
|
// if we can't do this job yet, push it to the end of the queue
|
|
1018
1020
|
// and let the next iteration check again
|
|
1019
|
-
fs$
|
|
1021
|
+
fs$w[gracefulQueue].push(elem);
|
|
1020
1022
|
}
|
|
1021
1023
|
}
|
|
1022
1024
|
|
|
@@ -1145,19 +1147,19 @@ if (typeof fs.writev === 'function') {
|
|
|
1145
1147
|
})
|
|
1146
1148
|
};
|
|
1147
1149
|
}
|
|
1148
|
-
}(fs$
|
|
1150
|
+
}(fs$x));
|
|
1149
1151
|
|
|
1150
1152
|
var makeDir$1 = {};
|
|
1151
1153
|
|
|
1152
1154
|
var utils$u = {};
|
|
1153
1155
|
|
|
1154
|
-
const path$
|
|
1156
|
+
const path$r = path__default["default"];
|
|
1155
1157
|
|
|
1156
1158
|
// https://github.com/nodejs/node/issues/8987
|
|
1157
1159
|
// https://github.com/libuv/libuv/pull/1088
|
|
1158
1160
|
utils$u.checkPath = function checkPath (pth) {
|
|
1159
1161
|
if (process.platform === 'win32') {
|
|
1160
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path$
|
|
1162
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path$r.parse(pth).root, ''));
|
|
1161
1163
|
|
|
1162
1164
|
if (pathHasInvalidWinCharacters) {
|
|
1163
1165
|
const error = new Error(`Path contains invalid characters: ${pth}`);
|
|
@@ -1167,7 +1169,7 @@ utils$u.checkPath = function checkPath (pth) {
|
|
|
1167
1169
|
}
|
|
1168
1170
|
};
|
|
1169
1171
|
|
|
1170
|
-
const fs$
|
|
1172
|
+
const fs$v = fs$x;
|
|
1171
1173
|
const { checkPath: checkPath$1 } = utils$u;
|
|
1172
1174
|
|
|
1173
1175
|
const getMode = options => {
|
|
@@ -1179,7 +1181,7 @@ const getMode = options => {
|
|
|
1179
1181
|
makeDir$1.makeDir = async (dir, options) => {
|
|
1180
1182
|
checkPath$1(dir);
|
|
1181
1183
|
|
|
1182
|
-
return fs$
|
|
1184
|
+
return fs$v.mkdir(dir, {
|
|
1183
1185
|
mode: getMode(options),
|
|
1184
1186
|
recursive: true
|
|
1185
1187
|
})
|
|
@@ -1188,7 +1190,7 @@ makeDir$1.makeDir = async (dir, options) => {
|
|
|
1188
1190
|
makeDir$1.makeDirSync = (dir, options) => {
|
|
1189
1191
|
checkPath$1(dir);
|
|
1190
1192
|
|
|
1191
|
-
return fs$
|
|
1193
|
+
return fs$v.mkdirSync(dir, {
|
|
1192
1194
|
mode: getMode(options),
|
|
1193
1195
|
recursive: true
|
|
1194
1196
|
})
|
|
@@ -1208,14 +1210,14 @@ var mkdirs$2 = {
|
|
|
1208
1210
|
ensureDirSync: makeDirSync
|
|
1209
1211
|
};
|
|
1210
1212
|
|
|
1211
|
-
const fs$
|
|
1213
|
+
const fs$u = gracefulFs;
|
|
1212
1214
|
|
|
1213
1215
|
function utimesMillis$1 (path, atime, mtime, callback) {
|
|
1214
1216
|
// if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
|
|
1215
|
-
fs$
|
|
1217
|
+
fs$u.open(path, 'r+', (err, fd) => {
|
|
1216
1218
|
if (err) return callback(err)
|
|
1217
|
-
fs$
|
|
1218
|
-
fs$
|
|
1219
|
+
fs$u.futimes(fd, atime, mtime, futimesErr => {
|
|
1220
|
+
fs$u.close(fd, closeErr => {
|
|
1219
1221
|
if (callback) callback(futimesErr || closeErr);
|
|
1220
1222
|
});
|
|
1221
1223
|
});
|
|
@@ -1223,9 +1225,9 @@ function utimesMillis$1 (path, atime, mtime, callback) {
|
|
|
1223
1225
|
}
|
|
1224
1226
|
|
|
1225
1227
|
function utimesMillisSync$1 (path, atime, mtime) {
|
|
1226
|
-
const fd = fs$
|
|
1227
|
-
fs$
|
|
1228
|
-
return fs$
|
|
1228
|
+
const fd = fs$u.openSync(path, 'r+');
|
|
1229
|
+
fs$u.futimesSync(fd, atime, mtime);
|
|
1230
|
+
return fs$u.closeSync(fd)
|
|
1229
1231
|
}
|
|
1230
1232
|
|
|
1231
1233
|
var utimes = {
|
|
@@ -1233,14 +1235,14 @@ var utimes = {
|
|
|
1233
1235
|
utimesMillisSync: utimesMillisSync$1
|
|
1234
1236
|
};
|
|
1235
1237
|
|
|
1236
|
-
const fs$
|
|
1237
|
-
const path$
|
|
1238
|
-
const util$4 = require$$0__default$
|
|
1238
|
+
const fs$t = fs$x;
|
|
1239
|
+
const path$q = path__default["default"];
|
|
1240
|
+
const util$4 = require$$0__default$3["default"];
|
|
1239
1241
|
|
|
1240
1242
|
function getStats$2 (src, dest, opts) {
|
|
1241
1243
|
const statFunc = opts.dereference
|
|
1242
|
-
? (file) => fs$
|
|
1243
|
-
: (file) => fs$
|
|
1244
|
+
? (file) => fs$t.stat(file, { bigint: true })
|
|
1245
|
+
: (file) => fs$t.lstat(file, { bigint: true });
|
|
1244
1246
|
return Promise.all([
|
|
1245
1247
|
statFunc(src),
|
|
1246
1248
|
statFunc(dest).catch(err => {
|
|
@@ -1253,8 +1255,8 @@ function getStats$2 (src, dest, opts) {
|
|
|
1253
1255
|
function getStatsSync (src, dest, opts) {
|
|
1254
1256
|
let destStat;
|
|
1255
1257
|
const statFunc = opts.dereference
|
|
1256
|
-
? (file) => fs$
|
|
1257
|
-
: (file) => fs$
|
|
1258
|
+
? (file) => fs$t.statSync(file, { bigint: true })
|
|
1259
|
+
: (file) => fs$t.lstatSync(file, { bigint: true });
|
|
1258
1260
|
const srcStat = statFunc(src);
|
|
1259
1261
|
try {
|
|
1260
1262
|
destStat = statFunc(dest);
|
|
@@ -1272,8 +1274,8 @@ function checkPaths (src, dest, funcName, opts, cb) {
|
|
|
1272
1274
|
|
|
1273
1275
|
if (destStat) {
|
|
1274
1276
|
if (areIdentical$2(srcStat, destStat)) {
|
|
1275
|
-
const srcBaseName = path$
|
|
1276
|
-
const destBaseName = path$
|
|
1277
|
+
const srcBaseName = path$q.basename(src);
|
|
1278
|
+
const destBaseName = path$q.basename(dest);
|
|
1277
1279
|
if (funcName === 'move' &&
|
|
1278
1280
|
srcBaseName !== destBaseName &&
|
|
1279
1281
|
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
@@ -1301,8 +1303,8 @@ function checkPathsSync (src, dest, funcName, opts) {
|
|
|
1301
1303
|
|
|
1302
1304
|
if (destStat) {
|
|
1303
1305
|
if (areIdentical$2(srcStat, destStat)) {
|
|
1304
|
-
const srcBaseName = path$
|
|
1305
|
-
const destBaseName = path$
|
|
1306
|
+
const srcBaseName = path$q.basename(src);
|
|
1307
|
+
const destBaseName = path$q.basename(dest);
|
|
1306
1308
|
if (funcName === 'move' &&
|
|
1307
1309
|
srcBaseName !== destBaseName &&
|
|
1308
1310
|
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
@@ -1329,10 +1331,10 @@ function checkPathsSync (src, dest, funcName, opts) {
|
|
|
1329
1331
|
// checks the src and dest inodes. It starts from the deepest
|
|
1330
1332
|
// parent and stops once it reaches the src parent or the root path.
|
|
1331
1333
|
function checkParentPaths (src, srcStat, dest, funcName, cb) {
|
|
1332
|
-
const srcParent = path$
|
|
1333
|
-
const destParent = path$
|
|
1334
|
-
if (destParent === srcParent || destParent === path$
|
|
1335
|
-
fs$
|
|
1334
|
+
const srcParent = path$q.resolve(path$q.dirname(src));
|
|
1335
|
+
const destParent = path$q.resolve(path$q.dirname(dest));
|
|
1336
|
+
if (destParent === srcParent || destParent === path$q.parse(destParent).root) return cb()
|
|
1337
|
+
fs$t.stat(destParent, { bigint: true }, (err, destStat) => {
|
|
1336
1338
|
if (err) {
|
|
1337
1339
|
if (err.code === 'ENOENT') return cb()
|
|
1338
1340
|
return cb(err)
|
|
@@ -1345,12 +1347,12 @@ function checkParentPaths (src, srcStat, dest, funcName, cb) {
|
|
|
1345
1347
|
}
|
|
1346
1348
|
|
|
1347
1349
|
function checkParentPathsSync (src, srcStat, dest, funcName) {
|
|
1348
|
-
const srcParent = path$
|
|
1349
|
-
const destParent = path$
|
|
1350
|
-
if (destParent === srcParent || destParent === path$
|
|
1350
|
+
const srcParent = path$q.resolve(path$q.dirname(src));
|
|
1351
|
+
const destParent = path$q.resolve(path$q.dirname(dest));
|
|
1352
|
+
if (destParent === srcParent || destParent === path$q.parse(destParent).root) return
|
|
1351
1353
|
let destStat;
|
|
1352
1354
|
try {
|
|
1353
|
-
destStat = fs$
|
|
1355
|
+
destStat = fs$t.statSync(destParent, { bigint: true });
|
|
1354
1356
|
} catch (err) {
|
|
1355
1357
|
if (err.code === 'ENOENT') return
|
|
1356
1358
|
throw err
|
|
@@ -1368,8 +1370,8 @@ function areIdentical$2 (srcStat, destStat) {
|
|
|
1368
1370
|
// return true if dest is a subdir of src, otherwise false.
|
|
1369
1371
|
// It only checks the path strings.
|
|
1370
1372
|
function isSrcSubdir (src, dest) {
|
|
1371
|
-
const srcArr = path$
|
|
1372
|
-
const destArr = path$
|
|
1373
|
+
const srcArr = path$q.resolve(src).split(path$q.sep).filter(i => i);
|
|
1374
|
+
const destArr = path$q.resolve(dest).split(path$q.sep).filter(i => i);
|
|
1373
1375
|
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
|
|
1374
1376
|
}
|
|
1375
1377
|
|
|
@@ -1386,8 +1388,8 @@ var stat$5 = {
|
|
|
1386
1388
|
areIdentical: areIdentical$2
|
|
1387
1389
|
};
|
|
1388
1390
|
|
|
1389
|
-
const fs$
|
|
1390
|
-
const path$
|
|
1391
|
+
const fs$s = gracefulFs;
|
|
1392
|
+
const path$p = path__default["default"];
|
|
1391
1393
|
const mkdirsSync$1 = mkdirs$2.mkdirsSync;
|
|
1392
1394
|
const utimesMillisSync = utimes.utimesMillisSync;
|
|
1393
1395
|
const stat$4 = stat$5;
|
|
@@ -1414,8 +1416,8 @@ function copySync$2 (src, dest, opts) {
|
|
|
1414
1416
|
|
|
1415
1417
|
function handleFilterAndCopy (destStat, src, dest, opts) {
|
|
1416
1418
|
if (opts.filter && !opts.filter(src, dest)) return
|
|
1417
|
-
const destParent = path$
|
|
1418
|
-
if (!fs$
|
|
1419
|
+
const destParent = path$p.dirname(dest);
|
|
1420
|
+
if (!fs$s.existsSync(destParent)) mkdirsSync$1(destParent);
|
|
1419
1421
|
return getStats$1(destStat, src, dest, opts)
|
|
1420
1422
|
}
|
|
1421
1423
|
|
|
@@ -1425,7 +1427,7 @@ function startCopy$1 (destStat, src, dest, opts) {
|
|
|
1425
1427
|
}
|
|
1426
1428
|
|
|
1427
1429
|
function getStats$1 (destStat, src, dest, opts) {
|
|
1428
|
-
const statSync = opts.dereference ? fs$
|
|
1430
|
+
const statSync = opts.dereference ? fs$s.statSync : fs$s.lstatSync;
|
|
1429
1431
|
const srcStat = statSync(src);
|
|
1430
1432
|
|
|
1431
1433
|
if (srcStat.isDirectory()) return onDir$1(srcStat, destStat, src, dest, opts)
|
|
@@ -1445,7 +1447,7 @@ function onFile$1 (srcStat, destStat, src, dest, opts) {
|
|
|
1445
1447
|
|
|
1446
1448
|
function mayCopyFile$1 (srcStat, src, dest, opts) {
|
|
1447
1449
|
if (opts.overwrite) {
|
|
1448
|
-
fs$
|
|
1450
|
+
fs$s.unlinkSync(dest);
|
|
1449
1451
|
return copyFile$1(srcStat, src, dest, opts)
|
|
1450
1452
|
} else if (opts.errorOnExist) {
|
|
1451
1453
|
throw new Error(`'${dest}' already exists`)
|
|
@@ -1453,7 +1455,7 @@ function mayCopyFile$1 (srcStat, src, dest, opts) {
|
|
|
1453
1455
|
}
|
|
1454
1456
|
|
|
1455
1457
|
function copyFile$1 (srcStat, src, dest, opts) {
|
|
1456
|
-
fs$
|
|
1458
|
+
fs$s.copyFileSync(src, dest);
|
|
1457
1459
|
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
|
|
1458
1460
|
return setDestMode$1(dest, srcStat.mode)
|
|
1459
1461
|
}
|
|
@@ -1475,14 +1477,14 @@ function makeFileWritable$1 (dest, srcMode) {
|
|
|
1475
1477
|
}
|
|
1476
1478
|
|
|
1477
1479
|
function setDestMode$1 (dest, srcMode) {
|
|
1478
|
-
return fs$
|
|
1480
|
+
return fs$s.chmodSync(dest, srcMode)
|
|
1479
1481
|
}
|
|
1480
1482
|
|
|
1481
1483
|
function setDestTimestamps$1 (src, dest) {
|
|
1482
1484
|
// The initial srcStat.atime cannot be trusted
|
|
1483
1485
|
// because it is modified by the read(2) system call
|
|
1484
1486
|
// (See https://nodejs.org/api/fs.html#fs_stat_time_values)
|
|
1485
|
-
const updatedSrcStat = fs$
|
|
1487
|
+
const updatedSrcStat = fs$s.statSync(src);
|
|
1486
1488
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
|
|
1487
1489
|
}
|
|
1488
1490
|
|
|
@@ -1492,43 +1494,43 @@ function onDir$1 (srcStat, destStat, src, dest, opts) {
|
|
|
1492
1494
|
}
|
|
1493
1495
|
|
|
1494
1496
|
function mkDirAndCopy$1 (srcMode, src, dest, opts) {
|
|
1495
|
-
fs$
|
|
1497
|
+
fs$s.mkdirSync(dest);
|
|
1496
1498
|
copyDir$1(src, dest, opts);
|
|
1497
1499
|
return setDestMode$1(dest, srcMode)
|
|
1498
1500
|
}
|
|
1499
1501
|
|
|
1500
1502
|
function copyDir$1 (src, dest, opts) {
|
|
1501
|
-
fs$
|
|
1503
|
+
fs$s.readdirSync(src).forEach(item => copyDirItem$1(item, src, dest, opts));
|
|
1502
1504
|
}
|
|
1503
1505
|
|
|
1504
1506
|
function copyDirItem$1 (item, src, dest, opts) {
|
|
1505
|
-
const srcItem = path$
|
|
1506
|
-
const destItem = path$
|
|
1507
|
+
const srcItem = path$p.join(src, item);
|
|
1508
|
+
const destItem = path$p.join(dest, item);
|
|
1507
1509
|
const { destStat } = stat$4.checkPathsSync(srcItem, destItem, 'copy', opts);
|
|
1508
1510
|
return startCopy$1(destStat, srcItem, destItem, opts)
|
|
1509
1511
|
}
|
|
1510
1512
|
|
|
1511
1513
|
function onLink$1 (destStat, src, dest, opts) {
|
|
1512
|
-
let resolvedSrc = fs$
|
|
1514
|
+
let resolvedSrc = fs$s.readlinkSync(src);
|
|
1513
1515
|
if (opts.dereference) {
|
|
1514
|
-
resolvedSrc = path$
|
|
1516
|
+
resolvedSrc = path$p.resolve(process.cwd(), resolvedSrc);
|
|
1515
1517
|
}
|
|
1516
1518
|
|
|
1517
1519
|
if (!destStat) {
|
|
1518
|
-
return fs$
|
|
1520
|
+
return fs$s.symlinkSync(resolvedSrc, dest)
|
|
1519
1521
|
} else {
|
|
1520
1522
|
let resolvedDest;
|
|
1521
1523
|
try {
|
|
1522
|
-
resolvedDest = fs$
|
|
1524
|
+
resolvedDest = fs$s.readlinkSync(dest);
|
|
1523
1525
|
} catch (err) {
|
|
1524
1526
|
// dest exists and is a regular file or directory,
|
|
1525
1527
|
// Windows may throw UNKNOWN error. If dest already exists,
|
|
1526
1528
|
// fs throws error anyway, so no need to guard against it here.
|
|
1527
|
-
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs$
|
|
1529
|
+
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs$s.symlinkSync(resolvedSrc, dest)
|
|
1528
1530
|
throw err
|
|
1529
1531
|
}
|
|
1530
1532
|
if (opts.dereference) {
|
|
1531
|
-
resolvedDest = path$
|
|
1533
|
+
resolvedDest = path$p.resolve(process.cwd(), resolvedDest);
|
|
1532
1534
|
}
|
|
1533
1535
|
if (stat$4.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
1534
1536
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
|
|
@@ -1537,7 +1539,7 @@ function onLink$1 (destStat, src, dest, opts) {
|
|
|
1537
1539
|
// prevent copy if src is a subdir of dest since unlinking
|
|
1538
1540
|
// dest in this case would result in removing src contents
|
|
1539
1541
|
// and therefore a broken symlink would be created.
|
|
1540
|
-
if (fs$
|
|
1542
|
+
if (fs$s.statSync(dest).isDirectory() && stat$4.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
1541
1543
|
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
|
|
1542
1544
|
}
|
|
1543
1545
|
return copyLink$1(resolvedSrc, dest)
|
|
@@ -1545,8 +1547,8 @@ function onLink$1 (destStat, src, dest, opts) {
|
|
|
1545
1547
|
}
|
|
1546
1548
|
|
|
1547
1549
|
function copyLink$1 (resolvedSrc, dest) {
|
|
1548
|
-
fs$
|
|
1549
|
-
return fs$
|
|
1550
|
+
fs$s.unlinkSync(dest);
|
|
1551
|
+
return fs$s.symlinkSync(resolvedSrc, dest)
|
|
1550
1552
|
}
|
|
1551
1553
|
|
|
1552
1554
|
var copySync_1 = copySync$2;
|
|
@@ -1556,19 +1558,19 @@ var copySync$1 = {
|
|
|
1556
1558
|
};
|
|
1557
1559
|
|
|
1558
1560
|
const u$a = universalify$1.fromPromise;
|
|
1559
|
-
const fs$
|
|
1561
|
+
const fs$r = fs$x;
|
|
1560
1562
|
|
|
1561
1563
|
function pathExists$6 (path) {
|
|
1562
|
-
return fs$
|
|
1564
|
+
return fs$r.access(path).then(() => true).catch(() => false)
|
|
1563
1565
|
}
|
|
1564
1566
|
|
|
1565
1567
|
var pathExists_1 = {
|
|
1566
1568
|
pathExists: u$a(pathExists$6),
|
|
1567
|
-
pathExistsSync: fs$
|
|
1569
|
+
pathExistsSync: fs$r.existsSync
|
|
1568
1570
|
};
|
|
1569
1571
|
|
|
1570
|
-
const fs$
|
|
1571
|
-
const path$
|
|
1572
|
+
const fs$q = gracefulFs;
|
|
1573
|
+
const path$o = path__default["default"];
|
|
1572
1574
|
const mkdirs$1 = mkdirs$2.mkdirs;
|
|
1573
1575
|
const pathExists$5 = pathExists_1.pathExists;
|
|
1574
1576
|
const utimesMillis = utimes.utimesMillis;
|
|
@@ -1606,7 +1608,7 @@ function copy$3 (src, dest, opts, cb) {
|
|
|
1606
1608
|
}
|
|
1607
1609
|
|
|
1608
1610
|
function checkParentDir (destStat, src, dest, opts, cb) {
|
|
1609
|
-
const destParent = path$
|
|
1611
|
+
const destParent = path$o.dirname(dest);
|
|
1610
1612
|
pathExists$5(destParent, (err, dirExists) => {
|
|
1611
1613
|
if (err) return cb(err)
|
|
1612
1614
|
if (dirExists) return getStats(destStat, src, dest, opts, cb)
|
|
@@ -1630,7 +1632,7 @@ function startCopy (destStat, src, dest, opts, cb) {
|
|
|
1630
1632
|
}
|
|
1631
1633
|
|
|
1632
1634
|
function getStats (destStat, src, dest, opts, cb) {
|
|
1633
|
-
const stat = opts.dereference ? fs$
|
|
1635
|
+
const stat = opts.dereference ? fs$q.stat : fs$q.lstat;
|
|
1634
1636
|
stat(src, (err, srcStat) => {
|
|
1635
1637
|
if (err) return cb(err)
|
|
1636
1638
|
|
|
@@ -1652,7 +1654,7 @@ function onFile (srcStat, destStat, src, dest, opts, cb) {
|
|
|
1652
1654
|
|
|
1653
1655
|
function mayCopyFile (srcStat, src, dest, opts, cb) {
|
|
1654
1656
|
if (opts.overwrite) {
|
|
1655
|
-
fs$
|
|
1657
|
+
fs$q.unlink(dest, err => {
|
|
1656
1658
|
if (err) return cb(err)
|
|
1657
1659
|
return copyFile(srcStat, src, dest, opts, cb)
|
|
1658
1660
|
});
|
|
@@ -1662,7 +1664,7 @@ function mayCopyFile (srcStat, src, dest, opts, cb) {
|
|
|
1662
1664
|
}
|
|
1663
1665
|
|
|
1664
1666
|
function copyFile (srcStat, src, dest, opts, cb) {
|
|
1665
|
-
fs$
|
|
1667
|
+
fs$q.copyFile(src, dest, err => {
|
|
1666
1668
|
if (err) return cb(err)
|
|
1667
1669
|
if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
|
|
1668
1670
|
return setDestMode(dest, srcStat.mode, cb)
|
|
@@ -1698,14 +1700,14 @@ function setDestTimestampsAndMode (srcMode, src, dest, cb) {
|
|
|
1698
1700
|
}
|
|
1699
1701
|
|
|
1700
1702
|
function setDestMode (dest, srcMode, cb) {
|
|
1701
|
-
return fs$
|
|
1703
|
+
return fs$q.chmod(dest, srcMode, cb)
|
|
1702
1704
|
}
|
|
1703
1705
|
|
|
1704
1706
|
function setDestTimestamps (src, dest, cb) {
|
|
1705
1707
|
// The initial srcStat.atime cannot be trusted
|
|
1706
1708
|
// because it is modified by the read(2) system call
|
|
1707
1709
|
// (See https://nodejs.org/api/fs.html#fs_stat_time_values)
|
|
1708
|
-
fs$
|
|
1710
|
+
fs$q.stat(src, (err, updatedSrcStat) => {
|
|
1709
1711
|
if (err) return cb(err)
|
|
1710
1712
|
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb)
|
|
1711
1713
|
});
|
|
@@ -1717,7 +1719,7 @@ function onDir (srcStat, destStat, src, dest, opts, cb) {
|
|
|
1717
1719
|
}
|
|
1718
1720
|
|
|
1719
1721
|
function mkDirAndCopy (srcMode, src, dest, opts, cb) {
|
|
1720
|
-
fs$
|
|
1722
|
+
fs$q.mkdir(dest, err => {
|
|
1721
1723
|
if (err) return cb(err)
|
|
1722
1724
|
copyDir(src, dest, opts, err => {
|
|
1723
1725
|
if (err) return cb(err)
|
|
@@ -1727,7 +1729,7 @@ function mkDirAndCopy (srcMode, src, dest, opts, cb) {
|
|
|
1727
1729
|
}
|
|
1728
1730
|
|
|
1729
1731
|
function copyDir (src, dest, opts, cb) {
|
|
1730
|
-
fs$
|
|
1732
|
+
fs$q.readdir(src, (err, items) => {
|
|
1731
1733
|
if (err) return cb(err)
|
|
1732
1734
|
return copyDirItems(items, src, dest, opts, cb)
|
|
1733
1735
|
});
|
|
@@ -1740,8 +1742,8 @@ function copyDirItems (items, src, dest, opts, cb) {
|
|
|
1740
1742
|
}
|
|
1741
1743
|
|
|
1742
1744
|
function copyDirItem (items, item, src, dest, opts, cb) {
|
|
1743
|
-
const srcItem = path$
|
|
1744
|
-
const destItem = path$
|
|
1745
|
+
const srcItem = path$o.join(src, item);
|
|
1746
|
+
const destItem = path$o.join(dest, item);
|
|
1745
1747
|
stat$3.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => {
|
|
1746
1748
|
if (err) return cb(err)
|
|
1747
1749
|
const { destStat } = stats;
|
|
@@ -1753,25 +1755,25 @@ function copyDirItem (items, item, src, dest, opts, cb) {
|
|
|
1753
1755
|
}
|
|
1754
1756
|
|
|
1755
1757
|
function onLink (destStat, src, dest, opts, cb) {
|
|
1756
|
-
fs$
|
|
1758
|
+
fs$q.readlink(src, (err, resolvedSrc) => {
|
|
1757
1759
|
if (err) return cb(err)
|
|
1758
1760
|
if (opts.dereference) {
|
|
1759
|
-
resolvedSrc = path$
|
|
1761
|
+
resolvedSrc = path$o.resolve(process.cwd(), resolvedSrc);
|
|
1760
1762
|
}
|
|
1761
1763
|
|
|
1762
1764
|
if (!destStat) {
|
|
1763
|
-
return fs$
|
|
1765
|
+
return fs$q.symlink(resolvedSrc, dest, cb)
|
|
1764
1766
|
} else {
|
|
1765
|
-
fs$
|
|
1767
|
+
fs$q.readlink(dest, (err, resolvedDest) => {
|
|
1766
1768
|
if (err) {
|
|
1767
1769
|
// dest exists and is a regular file or directory,
|
|
1768
1770
|
// Windows may throw UNKNOWN error. If dest already exists,
|
|
1769
1771
|
// fs throws error anyway, so no need to guard against it here.
|
|
1770
|
-
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs$
|
|
1772
|
+
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs$q.symlink(resolvedSrc, dest, cb)
|
|
1771
1773
|
return cb(err)
|
|
1772
1774
|
}
|
|
1773
1775
|
if (opts.dereference) {
|
|
1774
|
-
resolvedDest = path$
|
|
1776
|
+
resolvedDest = path$o.resolve(process.cwd(), resolvedDest);
|
|
1775
1777
|
}
|
|
1776
1778
|
if (stat$3.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
1777
1779
|
return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
|
|
@@ -1790,9 +1792,9 @@ function onLink (destStat, src, dest, opts, cb) {
|
|
|
1790
1792
|
}
|
|
1791
1793
|
|
|
1792
1794
|
function copyLink (resolvedSrc, dest, cb) {
|
|
1793
|
-
fs$
|
|
1795
|
+
fs$q.unlink(dest, err => {
|
|
1794
1796
|
if (err) return cb(err)
|
|
1795
|
-
return fs$
|
|
1797
|
+
return fs$q.symlink(resolvedSrc, dest, cb)
|
|
1796
1798
|
});
|
|
1797
1799
|
}
|
|
1798
1800
|
|
|
@@ -1803,11 +1805,11 @@ var copy$2 = {
|
|
|
1803
1805
|
copy: u$9(copy_1)
|
|
1804
1806
|
};
|
|
1805
1807
|
|
|
1806
|
-
const fs$
|
|
1807
|
-
const path$
|
|
1808
|
+
const fs$p = gracefulFs;
|
|
1809
|
+
const path$n = path__default["default"];
|
|
1808
1810
|
const assert$1 = require$$5__default["default"];
|
|
1809
1811
|
|
|
1810
|
-
const isWindows = (process.platform === 'win32');
|
|
1812
|
+
const isWindows$1 = (process.platform === 'win32');
|
|
1811
1813
|
|
|
1812
1814
|
function defaults$8 (options) {
|
|
1813
1815
|
const methods = [
|
|
@@ -1819,9 +1821,9 @@ function defaults$8 (options) {
|
|
|
1819
1821
|
'readdir'
|
|
1820
1822
|
];
|
|
1821
1823
|
methods.forEach(m => {
|
|
1822
|
-
options[m] = options[m] || fs$
|
|
1824
|
+
options[m] = options[m] || fs$p[m];
|
|
1823
1825
|
m = m + 'Sync';
|
|
1824
|
-
options[m] = options[m] || fs$
|
|
1826
|
+
options[m] = options[m] || fs$p[m];
|
|
1825
1827
|
});
|
|
1826
1828
|
|
|
1827
1829
|
options.maxBusyTries = options.maxBusyTries || 3;
|
|
@@ -1885,7 +1887,7 @@ function rimraf_ (p, options, cb) {
|
|
|
1885
1887
|
}
|
|
1886
1888
|
|
|
1887
1889
|
// Windows can EPERM on stat. Life is suffering.
|
|
1888
|
-
if (er && er.code === 'EPERM' && isWindows) {
|
|
1890
|
+
if (er && er.code === 'EPERM' && isWindows$1) {
|
|
1889
1891
|
return fixWinEPERM(p, options, er, cb)
|
|
1890
1892
|
}
|
|
1891
1893
|
|
|
@@ -1899,7 +1901,7 @@ function rimraf_ (p, options, cb) {
|
|
|
1899
1901
|
return cb(null)
|
|
1900
1902
|
}
|
|
1901
1903
|
if (er.code === 'EPERM') {
|
|
1902
|
-
return (isWindows)
|
|
1904
|
+
return (isWindows$1)
|
|
1903
1905
|
? fixWinEPERM(p, options, er, cb)
|
|
1904
1906
|
: rmdir(p, options, er, cb)
|
|
1905
1907
|
}
|
|
@@ -2000,7 +2002,7 @@ function rmkids (p, options, cb) {
|
|
|
2000
2002
|
if (n === 0) return options.rmdir(p, cb)
|
|
2001
2003
|
|
|
2002
2004
|
files.forEach(f => {
|
|
2003
|
-
rimraf$1(path$
|
|
2005
|
+
rimraf$1(path$n.join(p, f), options, er => {
|
|
2004
2006
|
if (errState) {
|
|
2005
2007
|
return
|
|
2006
2008
|
}
|
|
@@ -2035,7 +2037,7 @@ function rimrafSync (p, options) {
|
|
|
2035
2037
|
}
|
|
2036
2038
|
|
|
2037
2039
|
// Windows can EPERM on stat. Life is suffering.
|
|
2038
|
-
if (er.code === 'EPERM' && isWindows) {
|
|
2040
|
+
if (er.code === 'EPERM' && isWindows$1) {
|
|
2039
2041
|
fixWinEPERMSync(p, options, er);
|
|
2040
2042
|
}
|
|
2041
2043
|
}
|
|
@@ -2051,7 +2053,7 @@ function rimrafSync (p, options) {
|
|
|
2051
2053
|
if (er.code === 'ENOENT') {
|
|
2052
2054
|
return
|
|
2053
2055
|
} else if (er.code === 'EPERM') {
|
|
2054
|
-
return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
|
|
2056
|
+
return isWindows$1 ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
|
|
2055
2057
|
} else if (er.code !== 'EISDIR') {
|
|
2056
2058
|
throw er
|
|
2057
2059
|
}
|
|
@@ -2079,9 +2081,9 @@ function rmdirSync (p, options, originalEr) {
|
|
|
2079
2081
|
function rmkidsSync (p, options) {
|
|
2080
2082
|
assert$1(p);
|
|
2081
2083
|
assert$1(options);
|
|
2082
|
-
options.readdirSync(p).forEach(f => rimrafSync(path$
|
|
2084
|
+
options.readdirSync(p).forEach(f => rimrafSync(path$n.join(p, f), options));
|
|
2083
2085
|
|
|
2084
|
-
if (isWindows) {
|
|
2086
|
+
if (isWindows$1) {
|
|
2085
2087
|
// We only end up here once we got ENOTEMPTY at least once, and
|
|
2086
2088
|
// at this point, we are guaranteed to have removed all the kids.
|
|
2087
2089
|
// So, we know that it won't be ENOENT or ENOTDIR or anything else.
|
|
@@ -2104,19 +2106,19 @@ function rmkidsSync (p, options) {
|
|
|
2104
2106
|
var rimraf_1 = rimraf$1;
|
|
2105
2107
|
rimraf$1.sync = rimrafSync;
|
|
2106
2108
|
|
|
2107
|
-
const fs$
|
|
2109
|
+
const fs$o = gracefulFs;
|
|
2108
2110
|
const u$8 = universalify$1.fromCallback;
|
|
2109
2111
|
const rimraf = rimraf_1;
|
|
2110
2112
|
|
|
2111
2113
|
function remove$3 (path, callback) {
|
|
2112
2114
|
// Node 14.14.0+
|
|
2113
|
-
if (fs$
|
|
2115
|
+
if (fs$o.rm) return fs$o.rm(path, { recursive: true, force: true }, callback)
|
|
2114
2116
|
rimraf(path, callback);
|
|
2115
2117
|
}
|
|
2116
2118
|
|
|
2117
2119
|
function removeSync$1 (path) {
|
|
2118
2120
|
// Node 14.14.0+
|
|
2119
|
-
if (fs$
|
|
2121
|
+
if (fs$o.rmSync) return fs$o.rmSync(path, { recursive: true, force: true })
|
|
2120
2122
|
rimraf.sync(path);
|
|
2121
2123
|
}
|
|
2122
2124
|
|
|
@@ -2126,32 +2128,32 @@ var remove_1 = {
|
|
|
2126
2128
|
};
|
|
2127
2129
|
|
|
2128
2130
|
const u$7 = universalify$1.fromPromise;
|
|
2129
|
-
const fs$
|
|
2130
|
-
const path$
|
|
2131
|
+
const fs$n = fs$x;
|
|
2132
|
+
const path$m = path__default["default"];
|
|
2131
2133
|
const mkdir$3 = mkdirs$2;
|
|
2132
2134
|
const remove$2 = remove_1;
|
|
2133
2135
|
|
|
2134
2136
|
const emptyDir = u$7(async function emptyDir (dir) {
|
|
2135
2137
|
let items;
|
|
2136
2138
|
try {
|
|
2137
|
-
items = await fs$
|
|
2139
|
+
items = await fs$n.readdir(dir);
|
|
2138
2140
|
} catch {
|
|
2139
2141
|
return mkdir$3.mkdirs(dir)
|
|
2140
2142
|
}
|
|
2141
2143
|
|
|
2142
|
-
return Promise.all(items.map(item => remove$2.remove(path$
|
|
2144
|
+
return Promise.all(items.map(item => remove$2.remove(path$m.join(dir, item))))
|
|
2143
2145
|
});
|
|
2144
2146
|
|
|
2145
2147
|
function emptyDirSync (dir) {
|
|
2146
2148
|
let items;
|
|
2147
2149
|
try {
|
|
2148
|
-
items = fs$
|
|
2150
|
+
items = fs$n.readdirSync(dir);
|
|
2149
2151
|
} catch {
|
|
2150
2152
|
return mkdir$3.mkdirsSync(dir)
|
|
2151
2153
|
}
|
|
2152
2154
|
|
|
2153
2155
|
items.forEach(item => {
|
|
2154
|
-
item = path$
|
|
2156
|
+
item = path$m.join(dir, item);
|
|
2155
2157
|
remove$2.removeSync(item);
|
|
2156
2158
|
});
|
|
2157
2159
|
}
|
|
@@ -2164,22 +2166,22 @@ var empty$1 = {
|
|
|
2164
2166
|
};
|
|
2165
2167
|
|
|
2166
2168
|
const u$6 = universalify$1.fromCallback;
|
|
2167
|
-
const path$
|
|
2168
|
-
const fs$
|
|
2169
|
+
const path$l = path__default["default"];
|
|
2170
|
+
const fs$m = gracefulFs;
|
|
2169
2171
|
const mkdir$2 = mkdirs$2;
|
|
2170
2172
|
|
|
2171
2173
|
function createFile (file, callback) {
|
|
2172
2174
|
function makeFile () {
|
|
2173
|
-
fs$
|
|
2175
|
+
fs$m.writeFile(file, '', err => {
|
|
2174
2176
|
if (err) return callback(err)
|
|
2175
2177
|
callback();
|
|
2176
2178
|
});
|
|
2177
2179
|
}
|
|
2178
2180
|
|
|
2179
|
-
fs$
|
|
2181
|
+
fs$m.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
|
|
2180
2182
|
if (!err && stats.isFile()) return callback()
|
|
2181
|
-
const dir = path$
|
|
2182
|
-
fs$
|
|
2183
|
+
const dir = path$l.dirname(file);
|
|
2184
|
+
fs$m.stat(dir, (err, stats) => {
|
|
2183
2185
|
if (err) {
|
|
2184
2186
|
// if the directory doesn't exist, make it
|
|
2185
2187
|
if (err.code === 'ENOENT') {
|
|
@@ -2195,7 +2197,7 @@ function createFile (file, callback) {
|
|
|
2195
2197
|
else {
|
|
2196
2198
|
// parent is not a directory
|
|
2197
2199
|
// This is just to cause an internal ENOTDIR error to be thrown
|
|
2198
|
-
fs$
|
|
2200
|
+
fs$m.readdir(dir, err => {
|
|
2199
2201
|
if (err) return callback(err)
|
|
2200
2202
|
});
|
|
2201
2203
|
}
|
|
@@ -2206,16 +2208,16 @@ function createFile (file, callback) {
|
|
|
2206
2208
|
function createFileSync (file) {
|
|
2207
2209
|
let stats;
|
|
2208
2210
|
try {
|
|
2209
|
-
stats = fs$
|
|
2211
|
+
stats = fs$m.statSync(file);
|
|
2210
2212
|
} catch {}
|
|
2211
2213
|
if (stats && stats.isFile()) return
|
|
2212
2214
|
|
|
2213
|
-
const dir = path$
|
|
2215
|
+
const dir = path$l.dirname(file);
|
|
2214
2216
|
try {
|
|
2215
|
-
if (!fs$
|
|
2217
|
+
if (!fs$m.statSync(dir).isDirectory()) {
|
|
2216
2218
|
// parent is not a directory
|
|
2217
2219
|
// This is just to cause an internal ENOTDIR error to be thrown
|
|
2218
|
-
fs$
|
|
2220
|
+
fs$m.readdirSync(dir);
|
|
2219
2221
|
}
|
|
2220
2222
|
} catch (err) {
|
|
2221
2223
|
// If the stat call above failed because the directory doesn't exist, create it
|
|
@@ -2223,7 +2225,7 @@ function createFileSync (file) {
|
|
|
2223
2225
|
else throw err
|
|
2224
2226
|
}
|
|
2225
2227
|
|
|
2226
|
-
fs$
|
|
2228
|
+
fs$m.writeFileSync(file, '');
|
|
2227
2229
|
}
|
|
2228
2230
|
|
|
2229
2231
|
var file$1 = {
|
|
@@ -2232,29 +2234,29 @@ var file$1 = {
|
|
|
2232
2234
|
};
|
|
2233
2235
|
|
|
2234
2236
|
const u$5 = universalify$1.fromCallback;
|
|
2235
|
-
const path$
|
|
2236
|
-
const fs$
|
|
2237
|
+
const path$k = path__default["default"];
|
|
2238
|
+
const fs$l = gracefulFs;
|
|
2237
2239
|
const mkdir$1 = mkdirs$2;
|
|
2238
2240
|
const pathExists$4 = pathExists_1.pathExists;
|
|
2239
2241
|
const { areIdentical: areIdentical$1 } = stat$5;
|
|
2240
2242
|
|
|
2241
2243
|
function createLink (srcpath, dstpath, callback) {
|
|
2242
2244
|
function makeLink (srcpath, dstpath) {
|
|
2243
|
-
fs$
|
|
2245
|
+
fs$l.link(srcpath, dstpath, err => {
|
|
2244
2246
|
if (err) return callback(err)
|
|
2245
2247
|
callback(null);
|
|
2246
2248
|
});
|
|
2247
2249
|
}
|
|
2248
2250
|
|
|
2249
|
-
fs$
|
|
2250
|
-
fs$
|
|
2251
|
+
fs$l.lstat(dstpath, (_, dstStat) => {
|
|
2252
|
+
fs$l.lstat(srcpath, (err, srcStat) => {
|
|
2251
2253
|
if (err) {
|
|
2252
2254
|
err.message = err.message.replace('lstat', 'ensureLink');
|
|
2253
2255
|
return callback(err)
|
|
2254
2256
|
}
|
|
2255
2257
|
if (dstStat && areIdentical$1(srcStat, dstStat)) return callback(null)
|
|
2256
2258
|
|
|
2257
|
-
const dir = path$
|
|
2259
|
+
const dir = path$k.dirname(dstpath);
|
|
2258
2260
|
pathExists$4(dir, (err, dirExists) => {
|
|
2259
2261
|
if (err) return callback(err)
|
|
2260
2262
|
if (dirExists) return makeLink(srcpath, dstpath)
|
|
@@ -2270,23 +2272,23 @@ function createLink (srcpath, dstpath, callback) {
|
|
|
2270
2272
|
function createLinkSync (srcpath, dstpath) {
|
|
2271
2273
|
let dstStat;
|
|
2272
2274
|
try {
|
|
2273
|
-
dstStat = fs$
|
|
2275
|
+
dstStat = fs$l.lstatSync(dstpath);
|
|
2274
2276
|
} catch {}
|
|
2275
2277
|
|
|
2276
2278
|
try {
|
|
2277
|
-
const srcStat = fs$
|
|
2279
|
+
const srcStat = fs$l.lstatSync(srcpath);
|
|
2278
2280
|
if (dstStat && areIdentical$1(srcStat, dstStat)) return
|
|
2279
2281
|
} catch (err) {
|
|
2280
2282
|
err.message = err.message.replace('lstat', 'ensureLink');
|
|
2281
2283
|
throw err
|
|
2282
2284
|
}
|
|
2283
2285
|
|
|
2284
|
-
const dir = path$
|
|
2285
|
-
const dirExists = fs$
|
|
2286
|
-
if (dirExists) return fs$
|
|
2286
|
+
const dir = path$k.dirname(dstpath);
|
|
2287
|
+
const dirExists = fs$l.existsSync(dir);
|
|
2288
|
+
if (dirExists) return fs$l.linkSync(srcpath, dstpath)
|
|
2287
2289
|
mkdir$1.mkdirsSync(dir);
|
|
2288
2290
|
|
|
2289
|
-
return fs$
|
|
2291
|
+
return fs$l.linkSync(srcpath, dstpath)
|
|
2290
2292
|
}
|
|
2291
2293
|
|
|
2292
2294
|
var link$4 = {
|
|
@@ -2294,8 +2296,8 @@ var link$4 = {
|
|
|
2294
2296
|
createLinkSync
|
|
2295
2297
|
};
|
|
2296
2298
|
|
|
2297
|
-
const path$
|
|
2298
|
-
const fs$
|
|
2299
|
+
const path$j = path__default["default"];
|
|
2300
|
+
const fs$k = gracefulFs;
|
|
2299
2301
|
const pathExists$3 = pathExists_1.pathExists;
|
|
2300
2302
|
|
|
2301
2303
|
/**
|
|
@@ -2321,8 +2323,8 @@ const pathExists$3 = pathExists_1.pathExists;
|
|
|
2321
2323
|
*/
|
|
2322
2324
|
|
|
2323
2325
|
function symlinkPaths$1 (srcpath, dstpath, callback) {
|
|
2324
|
-
if (path$
|
|
2325
|
-
return fs$
|
|
2326
|
+
if (path$j.isAbsolute(srcpath)) {
|
|
2327
|
+
return fs$k.lstat(srcpath, (err) => {
|
|
2326
2328
|
if (err) {
|
|
2327
2329
|
err.message = err.message.replace('lstat', 'ensureSymlink');
|
|
2328
2330
|
return callback(err)
|
|
@@ -2333,8 +2335,8 @@ function symlinkPaths$1 (srcpath, dstpath, callback) {
|
|
|
2333
2335
|
})
|
|
2334
2336
|
})
|
|
2335
2337
|
} else {
|
|
2336
|
-
const dstdir = path$
|
|
2337
|
-
const relativeToDst = path$
|
|
2338
|
+
const dstdir = path$j.dirname(dstpath);
|
|
2339
|
+
const relativeToDst = path$j.join(dstdir, srcpath);
|
|
2338
2340
|
return pathExists$3(relativeToDst, (err, exists) => {
|
|
2339
2341
|
if (err) return callback(err)
|
|
2340
2342
|
if (exists) {
|
|
@@ -2343,14 +2345,14 @@ function symlinkPaths$1 (srcpath, dstpath, callback) {
|
|
|
2343
2345
|
toDst: srcpath
|
|
2344
2346
|
})
|
|
2345
2347
|
} else {
|
|
2346
|
-
return fs$
|
|
2348
|
+
return fs$k.lstat(srcpath, (err) => {
|
|
2347
2349
|
if (err) {
|
|
2348
2350
|
err.message = err.message.replace('lstat', 'ensureSymlink');
|
|
2349
2351
|
return callback(err)
|
|
2350
2352
|
}
|
|
2351
2353
|
return callback(null, {
|
|
2352
2354
|
toCwd: srcpath,
|
|
2353
|
-
toDst: path$
|
|
2355
|
+
toDst: path$j.relative(dstdir, srcpath)
|
|
2354
2356
|
})
|
|
2355
2357
|
})
|
|
2356
2358
|
}
|
|
@@ -2360,28 +2362,28 @@ function symlinkPaths$1 (srcpath, dstpath, callback) {
|
|
|
2360
2362
|
|
|
2361
2363
|
function symlinkPathsSync$1 (srcpath, dstpath) {
|
|
2362
2364
|
let exists;
|
|
2363
|
-
if (path$
|
|
2364
|
-
exists = fs$
|
|
2365
|
+
if (path$j.isAbsolute(srcpath)) {
|
|
2366
|
+
exists = fs$k.existsSync(srcpath);
|
|
2365
2367
|
if (!exists) throw new Error('absolute srcpath does not exist')
|
|
2366
2368
|
return {
|
|
2367
2369
|
toCwd: srcpath,
|
|
2368
2370
|
toDst: srcpath
|
|
2369
2371
|
}
|
|
2370
2372
|
} else {
|
|
2371
|
-
const dstdir = path$
|
|
2372
|
-
const relativeToDst = path$
|
|
2373
|
-
exists = fs$
|
|
2373
|
+
const dstdir = path$j.dirname(dstpath);
|
|
2374
|
+
const relativeToDst = path$j.join(dstdir, srcpath);
|
|
2375
|
+
exists = fs$k.existsSync(relativeToDst);
|
|
2374
2376
|
if (exists) {
|
|
2375
2377
|
return {
|
|
2376
2378
|
toCwd: relativeToDst,
|
|
2377
2379
|
toDst: srcpath
|
|
2378
2380
|
}
|
|
2379
2381
|
} else {
|
|
2380
|
-
exists = fs$
|
|
2382
|
+
exists = fs$k.existsSync(srcpath);
|
|
2381
2383
|
if (!exists) throw new Error('relative srcpath does not exist')
|
|
2382
2384
|
return {
|
|
2383
2385
|
toCwd: srcpath,
|
|
2384
|
-
toDst: path$
|
|
2386
|
+
toDst: path$j.relative(dstdir, srcpath)
|
|
2385
2387
|
}
|
|
2386
2388
|
}
|
|
2387
2389
|
}
|
|
@@ -2392,13 +2394,13 @@ var symlinkPaths_1 = {
|
|
|
2392
2394
|
symlinkPathsSync: symlinkPathsSync$1
|
|
2393
2395
|
};
|
|
2394
2396
|
|
|
2395
|
-
const fs$
|
|
2397
|
+
const fs$j = gracefulFs;
|
|
2396
2398
|
|
|
2397
2399
|
function symlinkType$1 (srcpath, type, callback) {
|
|
2398
2400
|
callback = (typeof type === 'function') ? type : callback;
|
|
2399
2401
|
type = (typeof type === 'function') ? false : type;
|
|
2400
2402
|
if (type) return callback(null, type)
|
|
2401
|
-
fs$
|
|
2403
|
+
fs$j.lstat(srcpath, (err, stats) => {
|
|
2402
2404
|
if (err) return callback(null, 'file')
|
|
2403
2405
|
type = (stats && stats.isDirectory()) ? 'dir' : 'file';
|
|
2404
2406
|
callback(null, type);
|
|
@@ -2410,7 +2412,7 @@ function symlinkTypeSync$1 (srcpath, type) {
|
|
|
2410
2412
|
|
|
2411
2413
|
if (type) return type
|
|
2412
2414
|
try {
|
|
2413
|
-
stats = fs$
|
|
2415
|
+
stats = fs$j.lstatSync(srcpath);
|
|
2414
2416
|
} catch {
|
|
2415
2417
|
return 'file'
|
|
2416
2418
|
}
|
|
@@ -2423,8 +2425,8 @@ var symlinkType_1 = {
|
|
|
2423
2425
|
};
|
|
2424
2426
|
|
|
2425
2427
|
const u$4 = universalify$1.fromCallback;
|
|
2426
|
-
const path$
|
|
2427
|
-
const fs$
|
|
2428
|
+
const path$i = path__default["default"];
|
|
2429
|
+
const fs$i = fs$x;
|
|
2428
2430
|
const _mkdirs = mkdirs$2;
|
|
2429
2431
|
const mkdirs = _mkdirs.mkdirs;
|
|
2430
2432
|
const mkdirsSync = _mkdirs.mkdirsSync;
|
|
@@ -2445,11 +2447,11 @@ function createSymlink (srcpath, dstpath, type, callback) {
|
|
|
2445
2447
|
callback = (typeof type === 'function') ? type : callback;
|
|
2446
2448
|
type = (typeof type === 'function') ? false : type;
|
|
2447
2449
|
|
|
2448
|
-
fs$
|
|
2450
|
+
fs$i.lstat(dstpath, (err, stats) => {
|
|
2449
2451
|
if (!err && stats.isSymbolicLink()) {
|
|
2450
2452
|
Promise.all([
|
|
2451
|
-
fs$
|
|
2452
|
-
fs$
|
|
2453
|
+
fs$i.stat(srcpath),
|
|
2454
|
+
fs$i.stat(dstpath)
|
|
2453
2455
|
]).then(([srcStat, dstStat]) => {
|
|
2454
2456
|
if (areIdentical(srcStat, dstStat)) return callback(null)
|
|
2455
2457
|
_createSymlink(srcpath, dstpath, type, callback);
|
|
@@ -2464,13 +2466,13 @@ function _createSymlink (srcpath, dstpath, type, callback) {
|
|
|
2464
2466
|
srcpath = relative.toDst;
|
|
2465
2467
|
symlinkType(relative.toCwd, type, (err, type) => {
|
|
2466
2468
|
if (err) return callback(err)
|
|
2467
|
-
const dir = path$
|
|
2469
|
+
const dir = path$i.dirname(dstpath);
|
|
2468
2470
|
pathExists$2(dir, (err, dirExists) => {
|
|
2469
2471
|
if (err) return callback(err)
|
|
2470
|
-
if (dirExists) return fs$
|
|
2472
|
+
if (dirExists) return fs$i.symlink(srcpath, dstpath, type, callback)
|
|
2471
2473
|
mkdirs(dir, err => {
|
|
2472
2474
|
if (err) return callback(err)
|
|
2473
|
-
fs$
|
|
2475
|
+
fs$i.symlink(srcpath, dstpath, type, callback);
|
|
2474
2476
|
});
|
|
2475
2477
|
});
|
|
2476
2478
|
});
|
|
@@ -2480,22 +2482,22 @@ function _createSymlink (srcpath, dstpath, type, callback) {
|
|
|
2480
2482
|
function createSymlinkSync (srcpath, dstpath, type) {
|
|
2481
2483
|
let stats;
|
|
2482
2484
|
try {
|
|
2483
|
-
stats = fs$
|
|
2485
|
+
stats = fs$i.lstatSync(dstpath);
|
|
2484
2486
|
} catch {}
|
|
2485
2487
|
if (stats && stats.isSymbolicLink()) {
|
|
2486
|
-
const srcStat = fs$
|
|
2487
|
-
const dstStat = fs$
|
|
2488
|
+
const srcStat = fs$i.statSync(srcpath);
|
|
2489
|
+
const dstStat = fs$i.statSync(dstpath);
|
|
2488
2490
|
if (areIdentical(srcStat, dstStat)) return
|
|
2489
2491
|
}
|
|
2490
2492
|
|
|
2491
2493
|
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
2492
2494
|
srcpath = relative.toDst;
|
|
2493
2495
|
type = symlinkTypeSync(relative.toCwd, type);
|
|
2494
|
-
const dir = path$
|
|
2495
|
-
const exists = fs$
|
|
2496
|
-
if (exists) return fs$
|
|
2496
|
+
const dir = path$i.dirname(dstpath);
|
|
2497
|
+
const exists = fs$i.existsSync(dir);
|
|
2498
|
+
if (exists) return fs$i.symlinkSync(srcpath, dstpath, type)
|
|
2497
2499
|
mkdirsSync(dir);
|
|
2498
|
-
return fs$
|
|
2500
|
+
return fs$i.symlinkSync(srcpath, dstpath, type)
|
|
2499
2501
|
}
|
|
2500
2502
|
|
|
2501
2503
|
var symlink$1 = {
|
|
@@ -2544,7 +2546,7 @@ let _fs;
|
|
|
2544
2546
|
try {
|
|
2545
2547
|
_fs = gracefulFs;
|
|
2546
2548
|
} catch (_) {
|
|
2547
|
-
_fs =
|
|
2549
|
+
_fs = require$$0__default$2["default"];
|
|
2548
2550
|
}
|
|
2549
2551
|
const universalify = universalify$1;
|
|
2550
2552
|
const { stringify: stringify$a, stripBom } = utils$t;
|
|
@@ -2640,8 +2642,8 @@ var jsonfile = {
|
|
|
2640
2642
|
};
|
|
2641
2643
|
|
|
2642
2644
|
const u$3 = universalify$1.fromCallback;
|
|
2643
|
-
const fs$
|
|
2644
|
-
const path$
|
|
2645
|
+
const fs$h = gracefulFs;
|
|
2646
|
+
const path$h = path__default["default"];
|
|
2645
2647
|
const mkdir = mkdirs$2;
|
|
2646
2648
|
const pathExists$1 = pathExists_1.pathExists;
|
|
2647
2649
|
|
|
@@ -2651,26 +2653,26 @@ function outputFile$1 (file, data, encoding, callback) {
|
|
|
2651
2653
|
encoding = 'utf8';
|
|
2652
2654
|
}
|
|
2653
2655
|
|
|
2654
|
-
const dir = path$
|
|
2656
|
+
const dir = path$h.dirname(file);
|
|
2655
2657
|
pathExists$1(dir, (err, itDoes) => {
|
|
2656
2658
|
if (err) return callback(err)
|
|
2657
|
-
if (itDoes) return fs$
|
|
2659
|
+
if (itDoes) return fs$h.writeFile(file, data, encoding, callback)
|
|
2658
2660
|
|
|
2659
2661
|
mkdir.mkdirs(dir, err => {
|
|
2660
2662
|
if (err) return callback(err)
|
|
2661
2663
|
|
|
2662
|
-
fs$
|
|
2664
|
+
fs$h.writeFile(file, data, encoding, callback);
|
|
2663
2665
|
});
|
|
2664
2666
|
});
|
|
2665
2667
|
}
|
|
2666
2668
|
|
|
2667
2669
|
function outputFileSync$1 (file, ...args) {
|
|
2668
|
-
const dir = path$
|
|
2669
|
-
if (fs$
|
|
2670
|
-
return fs$
|
|
2670
|
+
const dir = path$h.dirname(file);
|
|
2671
|
+
if (fs$h.existsSync(dir)) {
|
|
2672
|
+
return fs$h.writeFileSync(file, ...args)
|
|
2671
2673
|
}
|
|
2672
2674
|
mkdir.mkdirsSync(dir);
|
|
2673
|
-
fs$
|
|
2675
|
+
fs$h.writeFileSync(file, ...args);
|
|
2674
2676
|
}
|
|
2675
2677
|
|
|
2676
2678
|
var output = {
|
|
@@ -2715,8 +2717,8 @@ jsonFile.readJSONSync = jsonFile.readJsonSync;
|
|
|
2715
2717
|
|
|
2716
2718
|
var json$1 = jsonFile;
|
|
2717
2719
|
|
|
2718
|
-
const fs$
|
|
2719
|
-
const path$
|
|
2720
|
+
const fs$g = gracefulFs;
|
|
2721
|
+
const path$g = path__default["default"];
|
|
2720
2722
|
const copySync = copySync$1.copySync;
|
|
2721
2723
|
const removeSync = remove_1.removeSync;
|
|
2722
2724
|
const mkdirpSync = mkdirs$2.mkdirpSync;
|
|
@@ -2728,13 +2730,13 @@ function moveSync$1 (src, dest, opts) {
|
|
|
2728
2730
|
|
|
2729
2731
|
const { srcStat, isChangingCase = false } = stat$2.checkPathsSync(src, dest, 'move', opts);
|
|
2730
2732
|
stat$2.checkParentPathsSync(src, srcStat, dest, 'move');
|
|
2731
|
-
if (!isParentRoot$1(dest)) mkdirpSync(path$
|
|
2733
|
+
if (!isParentRoot$1(dest)) mkdirpSync(path$g.dirname(dest));
|
|
2732
2734
|
return doRename$1(src, dest, overwrite, isChangingCase)
|
|
2733
2735
|
}
|
|
2734
2736
|
|
|
2735
2737
|
function isParentRoot$1 (dest) {
|
|
2736
|
-
const parent = path$
|
|
2737
|
-
const parsedPath = path$
|
|
2738
|
+
const parent = path$g.dirname(dest);
|
|
2739
|
+
const parsedPath = path$g.parse(parent);
|
|
2738
2740
|
return parsedPath.root === parent
|
|
2739
2741
|
}
|
|
2740
2742
|
|
|
@@ -2744,13 +2746,13 @@ function doRename$1 (src, dest, overwrite, isChangingCase) {
|
|
|
2744
2746
|
removeSync(dest);
|
|
2745
2747
|
return rename$1(src, dest, overwrite)
|
|
2746
2748
|
}
|
|
2747
|
-
if (fs$
|
|
2749
|
+
if (fs$g.existsSync(dest)) throw new Error('dest already exists.')
|
|
2748
2750
|
return rename$1(src, dest, overwrite)
|
|
2749
2751
|
}
|
|
2750
2752
|
|
|
2751
2753
|
function rename$1 (src, dest, overwrite) {
|
|
2752
2754
|
try {
|
|
2753
|
-
fs$
|
|
2755
|
+
fs$g.renameSync(src, dest);
|
|
2754
2756
|
} catch (err) {
|
|
2755
2757
|
if (err.code !== 'EXDEV') throw err
|
|
2756
2758
|
return moveAcrossDevice$1(src, dest, overwrite)
|
|
@@ -2772,8 +2774,8 @@ var moveSync = {
|
|
|
2772
2774
|
moveSync: moveSync_1
|
|
2773
2775
|
};
|
|
2774
2776
|
|
|
2775
|
-
const fs$
|
|
2776
|
-
const path$
|
|
2777
|
+
const fs$f = gracefulFs;
|
|
2778
|
+
const path$f = path__default["default"];
|
|
2777
2779
|
const copy$1 = copy$2.copy;
|
|
2778
2780
|
const remove$1 = remove_1.remove;
|
|
2779
2781
|
const mkdirp = mkdirs$2.mkdirp;
|
|
@@ -2794,7 +2796,7 @@ function move$1 (src, dest, opts, cb) {
|
|
|
2794
2796
|
stat$1.checkParentPaths(src, srcStat, dest, 'move', err => {
|
|
2795
2797
|
if (err) return cb(err)
|
|
2796
2798
|
if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb)
|
|
2797
|
-
mkdirp(path$
|
|
2799
|
+
mkdirp(path$f.dirname(dest), err => {
|
|
2798
2800
|
if (err) return cb(err)
|
|
2799
2801
|
return doRename(src, dest, overwrite, isChangingCase, cb)
|
|
2800
2802
|
});
|
|
@@ -2803,8 +2805,8 @@ function move$1 (src, dest, opts, cb) {
|
|
|
2803
2805
|
}
|
|
2804
2806
|
|
|
2805
2807
|
function isParentRoot (dest) {
|
|
2806
|
-
const parent = path$
|
|
2807
|
-
const parsedPath = path$
|
|
2808
|
+
const parent = path$f.dirname(dest);
|
|
2809
|
+
const parsedPath = path$f.parse(parent);
|
|
2808
2810
|
return parsedPath.root === parent
|
|
2809
2811
|
}
|
|
2810
2812
|
|
|
@@ -2824,7 +2826,7 @@ function doRename (src, dest, overwrite, isChangingCase, cb) {
|
|
|
2824
2826
|
}
|
|
2825
2827
|
|
|
2826
2828
|
function rename (src, dest, overwrite, cb) {
|
|
2827
|
-
fs$
|
|
2829
|
+
fs$f.rename(src, dest, err => {
|
|
2828
2830
|
if (!err) return cb()
|
|
2829
2831
|
if (err.code !== 'EXDEV') return cb(err)
|
|
2830
2832
|
return moveAcrossDevice(src, dest, overwrite, cb)
|
|
@@ -2851,7 +2853,7 @@ var move = {
|
|
|
2851
2853
|
|
|
2852
2854
|
var lib$1 = {
|
|
2853
2855
|
// Export promiseified graceful-fs:
|
|
2854
|
-
...fs$
|
|
2856
|
+
...fs$x,
|
|
2855
2857
|
// Export extra methods:
|
|
2856
2858
|
...copySync$1,
|
|
2857
2859
|
...copy$2,
|
|
@@ -4211,8 +4213,8 @@ var hasFlag$1 = (flag, argv = process.argv) => {
|
|
|
4211
4213
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
4212
4214
|
};
|
|
4213
4215
|
|
|
4214
|
-
const os = require$$0__default$
|
|
4215
|
-
const tty = require$$0__default$
|
|
4216
|
+
const os = require$$0__default$5["default"];
|
|
4217
|
+
const tty = require$$0__default$4["default"];
|
|
4216
4218
|
const hasFlag = hasFlag$1;
|
|
4217
4219
|
|
|
4218
4220
|
const {env} = process;
|
|
@@ -4934,10 +4936,10 @@ function isEnoentCodeError(error) {
|
|
|
4934
4936
|
}
|
|
4935
4937
|
errno$1.isEnoentCodeError = isEnoentCodeError;
|
|
4936
4938
|
|
|
4937
|
-
var fs$
|
|
4939
|
+
var fs$e = {};
|
|
4938
4940
|
|
|
4939
|
-
Object.defineProperty(fs$
|
|
4940
|
-
fs$
|
|
4941
|
+
Object.defineProperty(fs$e, "__esModule", { value: true });
|
|
4942
|
+
fs$e.createDirentFromStats = void 0;
|
|
4941
4943
|
class DirentFromStats$1 {
|
|
4942
4944
|
constructor(name, stats) {
|
|
4943
4945
|
this.name = name;
|
|
@@ -4953,13 +4955,13 @@ class DirentFromStats$1 {
|
|
|
4953
4955
|
function createDirentFromStats$1(name, stats) {
|
|
4954
4956
|
return new DirentFromStats$1(name, stats);
|
|
4955
4957
|
}
|
|
4956
|
-
fs$
|
|
4958
|
+
fs$e.createDirentFromStats = createDirentFromStats$1;
|
|
4957
4959
|
|
|
4958
|
-
var path$
|
|
4960
|
+
var path$e = {};
|
|
4959
4961
|
|
|
4960
|
-
Object.defineProperty(path$
|
|
4961
|
-
path$
|
|
4962
|
-
const path$
|
|
4962
|
+
Object.defineProperty(path$e, "__esModule", { value: true });
|
|
4963
|
+
path$e.removeLeadingDotSegment = path$e.escape = path$e.makeAbsolute = path$e.unixify = void 0;
|
|
4964
|
+
const path$d = path__default["default"];
|
|
4963
4965
|
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
|
|
4964
4966
|
const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
|
|
4965
4967
|
/**
|
|
@@ -4968,15 +4970,15 @@ const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
|
|
|
4968
4970
|
function unixify(filepath) {
|
|
4969
4971
|
return filepath.replace(/\\/g, '/');
|
|
4970
4972
|
}
|
|
4971
|
-
path$
|
|
4973
|
+
path$e.unixify = unixify;
|
|
4972
4974
|
function makeAbsolute(cwd, filepath) {
|
|
4973
|
-
return path$
|
|
4975
|
+
return path$d.resolve(cwd, filepath);
|
|
4974
4976
|
}
|
|
4975
|
-
path$
|
|
4976
|
-
function escape(pattern) {
|
|
4977
|
+
path$e.makeAbsolute = makeAbsolute;
|
|
4978
|
+
function escape$1(pattern) {
|
|
4977
4979
|
return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
|
|
4978
4980
|
}
|
|
4979
|
-
path$
|
|
4981
|
+
path$e.escape = escape$1;
|
|
4980
4982
|
function removeLeadingDotSegment(entry) {
|
|
4981
4983
|
// We do not use `startsWith` because this is 10x slower than current implementation for some cases.
|
|
4982
4984
|
// eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
|
|
@@ -4988,7 +4990,7 @@ function removeLeadingDotSegment(entry) {
|
|
|
4988
4990
|
}
|
|
4989
4991
|
return entry;
|
|
4990
4992
|
}
|
|
4991
|
-
path$
|
|
4993
|
+
path$e.removeLeadingDotSegment = removeLeadingDotSegment;
|
|
4992
4994
|
|
|
4993
4995
|
var pattern$1 = {};
|
|
4994
4996
|
|
|
@@ -5064,7 +5066,7 @@ var isGlob$1 = function isGlob(str, options) {
|
|
|
5064
5066
|
|
|
5065
5067
|
var isGlob = isGlob$1;
|
|
5066
5068
|
var pathPosixDirname = path__default["default"].posix.dirname;
|
|
5067
|
-
var isWin32 = require$$0__default$
|
|
5069
|
+
var isWin32 = require$$0__default$5["default"].platform() === 'win32';
|
|
5068
5070
|
|
|
5069
5071
|
var slash$3 = '/';
|
|
5070
5072
|
var backslash = /\\/g;
|
|
@@ -5560,7 +5562,7 @@ var toRegexRange_1 = toRegexRange$1;
|
|
|
5560
5562
|
* Licensed under the MIT License.
|
|
5561
5563
|
*/
|
|
5562
5564
|
|
|
5563
|
-
const util$2 = require$$0__default$
|
|
5565
|
+
const util$2 = require$$0__default$3["default"];
|
|
5564
5566
|
const toRegexRange = toRegexRange_1;
|
|
5565
5567
|
|
|
5566
5568
|
const isObject$5 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
@@ -6053,7 +6055,7 @@ const {
|
|
|
6053
6055
|
* parse
|
|
6054
6056
|
*/
|
|
6055
6057
|
|
|
6056
|
-
const parse$
|
|
6058
|
+
const parse$g = (input, options = {}) => {
|
|
6057
6059
|
if (typeof input !== 'string') {
|
|
6058
6060
|
throw new TypeError('Expected a string');
|
|
6059
6061
|
}
|
|
@@ -6352,12 +6354,12 @@ const parse$e = (input, options = {}) => {
|
|
|
6352
6354
|
return ast;
|
|
6353
6355
|
};
|
|
6354
6356
|
|
|
6355
|
-
var parse_1$
|
|
6357
|
+
var parse_1$2 = parse$g;
|
|
6356
6358
|
|
|
6357
6359
|
const stringify$3 = stringify$7;
|
|
6358
6360
|
const compile$1 = compile_1;
|
|
6359
6361
|
const expand = expand_1;
|
|
6360
|
-
const parse$
|
|
6362
|
+
const parse$f = parse_1$2;
|
|
6361
6363
|
|
|
6362
6364
|
/**
|
|
6363
6365
|
* Expand the given pattern or create a regex-compatible string.
|
|
@@ -6409,7 +6411,7 @@ const braces$1 = (input, options = {}) => {
|
|
|
6409
6411
|
* @api public
|
|
6410
6412
|
*/
|
|
6411
6413
|
|
|
6412
|
-
braces$1.parse = (input, options = {}) => parse$
|
|
6414
|
+
braces$1.parse = (input, options = {}) => parse$f(input, options);
|
|
6413
6415
|
|
|
6414
6416
|
/**
|
|
6415
6417
|
* Creates a braces string from an AST, or an AST node.
|
|
@@ -6525,7 +6527,7 @@ var braces_1 = braces$1;
|
|
|
6525
6527
|
|
|
6526
6528
|
var utils$n = {};
|
|
6527
6529
|
|
|
6528
|
-
const path$
|
|
6530
|
+
const path$c = path__default["default"];
|
|
6529
6531
|
const WIN_SLASH = '\\\\/';
|
|
6530
6532
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
6531
6533
|
|
|
@@ -6678,7 +6680,7 @@ var constants$3 = {
|
|
|
6678
6680
|
CHAR_VERTICAL_LINE: 124, /* | */
|
|
6679
6681
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
|
|
6680
6682
|
|
|
6681
|
-
SEP: path$
|
|
6683
|
+
SEP: path$c.sep,
|
|
6682
6684
|
|
|
6683
6685
|
/**
|
|
6684
6686
|
* Create EXTGLOB_CHARS
|
|
@@ -7211,7 +7213,7 @@ const syntaxError = (type, char) => {
|
|
|
7211
7213
|
* @return {Object}
|
|
7212
7214
|
*/
|
|
7213
7215
|
|
|
7214
|
-
const parse$
|
|
7216
|
+
const parse$e = (input, options) => {
|
|
7215
7217
|
if (typeof input !== 'string') {
|
|
7216
7218
|
throw new TypeError('Expected a string');
|
|
7217
7219
|
}
|
|
@@ -8153,7 +8155,7 @@ const parse$c = (input, options) => {
|
|
|
8153
8155
|
* impact when none of the fast paths match.
|
|
8154
8156
|
*/
|
|
8155
8157
|
|
|
8156
|
-
parse$
|
|
8158
|
+
parse$e.fastpaths = (input, options) => {
|
|
8157
8159
|
const opts = { ...options };
|
|
8158
8160
|
const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
8159
8161
|
const len = input.length;
|
|
@@ -8240,11 +8242,11 @@ parse$c.fastpaths = (input, options) => {
|
|
|
8240
8242
|
return source;
|
|
8241
8243
|
};
|
|
8242
8244
|
|
|
8243
|
-
var parse_1 = parse$
|
|
8245
|
+
var parse_1$1 = parse$e;
|
|
8244
8246
|
|
|
8245
|
-
const path$
|
|
8247
|
+
const path$b = path__default["default"];
|
|
8246
8248
|
const scan = scan_1;
|
|
8247
|
-
const parse$
|
|
8249
|
+
const parse$d = parse_1$1;
|
|
8248
8250
|
const utils$k = utils$n;
|
|
8249
8251
|
const constants$1 = constants$3;
|
|
8250
8252
|
const isObject$4 = val => val && typeof val === 'object' && !Array.isArray(val);
|
|
@@ -8402,7 +8404,7 @@ picomatch$2.test = (input, regex, options, { glob, posix } = {}) => {
|
|
|
8402
8404
|
|
|
8403
8405
|
picomatch$2.matchBase = (input, glob, options, posix = utils$k.isWindows(options)) => {
|
|
8404
8406
|
const regex = glob instanceof RegExp ? glob : picomatch$2.makeRe(glob, options);
|
|
8405
|
-
return regex.test(path$
|
|
8407
|
+
return regex.test(path$b.basename(input));
|
|
8406
8408
|
};
|
|
8407
8409
|
|
|
8408
8410
|
/**
|
|
@@ -8440,7 +8442,7 @@ picomatch$2.isMatch = (str, patterns, options) => picomatch$2(patterns, options)
|
|
|
8440
8442
|
|
|
8441
8443
|
picomatch$2.parse = (pattern, options) => {
|
|
8442
8444
|
if (Array.isArray(pattern)) return pattern.map(p => picomatch$2.parse(p, options));
|
|
8443
|
-
return parse$
|
|
8445
|
+
return parse$d(pattern, { ...options, fastpaths: false });
|
|
8444
8446
|
};
|
|
8445
8447
|
|
|
8446
8448
|
/**
|
|
@@ -8533,11 +8535,11 @@ picomatch$2.makeRe = (input, options = {}, returnOutput = false, returnState = f
|
|
|
8533
8535
|
let parsed = { negated: false, fastpaths: true };
|
|
8534
8536
|
|
|
8535
8537
|
if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
|
|
8536
|
-
parsed.output = parse$
|
|
8538
|
+
parsed.output = parse$d.fastpaths(input, options);
|
|
8537
8539
|
}
|
|
8538
8540
|
|
|
8539
8541
|
if (!parsed.output) {
|
|
8540
|
-
parsed = parse$
|
|
8542
|
+
parsed = parse$d(input, options);
|
|
8541
8543
|
}
|
|
8542
8544
|
|
|
8543
8545
|
return picomatch$2.compileRe(parsed, options, returnOutput, returnState);
|
|
@@ -8585,7 +8587,7 @@ var picomatch_1 = picomatch$2;
|
|
|
8585
8587
|
|
|
8586
8588
|
var picomatch$1 = picomatch_1;
|
|
8587
8589
|
|
|
8588
|
-
const util$1 = require$$0__default$
|
|
8590
|
+
const util$1 = require$$0__default$3["default"];
|
|
8589
8591
|
const braces = braces_1;
|
|
8590
8592
|
const picomatch = picomatch$1;
|
|
8591
8593
|
const utils$j = utils$n;
|
|
@@ -9053,7 +9055,7 @@ var micromatch_1 = micromatch$1;
|
|
|
9053
9055
|
|
|
9054
9056
|
Object.defineProperty(pattern$1, "__esModule", { value: true });
|
|
9055
9057
|
pattern$1.matchAny = pattern$1.convertPatternsToRe = pattern$1.makeRe = pattern$1.getPatternParts = pattern$1.expandBraceExpansion = pattern$1.expandPatternsWithBraceExpansion = pattern$1.isAffectDepthOfReadingPattern = pattern$1.endsWithSlashGlobStar = pattern$1.hasGlobStar = pattern$1.getBaseDirectory = pattern$1.isPatternRelatedToParentDirectory = pattern$1.getPatternsOutsideCurrentDirectory = pattern$1.getPatternsInsideCurrentDirectory = pattern$1.getPositivePatterns = pattern$1.getNegativePatterns = pattern$1.isPositivePattern = pattern$1.isNegativePattern = pattern$1.convertToNegativePattern = pattern$1.convertToPositivePattern = pattern$1.isDynamicPattern = pattern$1.isStaticPattern = void 0;
|
|
9056
|
-
const path$
|
|
9058
|
+
const path$a = path__default["default"];
|
|
9057
9059
|
const globParent = globParent$1;
|
|
9058
9060
|
const micromatch = micromatch_1;
|
|
9059
9061
|
const GLOBSTAR = '**';
|
|
@@ -9158,7 +9160,7 @@ function endsWithSlashGlobStar(pattern) {
|
|
|
9158
9160
|
}
|
|
9159
9161
|
pattern$1.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
9160
9162
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
9161
|
-
const basename = path$
|
|
9163
|
+
const basename = path$a.basename(pattern);
|
|
9162
9164
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
9163
9165
|
}
|
|
9164
9166
|
pattern$1.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
@@ -9246,10 +9248,10 @@ const array = array$1;
|
|
|
9246
9248
|
utils$s.array = array;
|
|
9247
9249
|
const errno = errno$1;
|
|
9248
9250
|
utils$s.errno = errno;
|
|
9249
|
-
const fs$
|
|
9250
|
-
utils$s.fs = fs$
|
|
9251
|
-
const path$
|
|
9252
|
-
utils$s.path = path$
|
|
9251
|
+
const fs$d = fs$e;
|
|
9252
|
+
utils$s.fs = fs$d;
|
|
9253
|
+
const path$9 = path$e;
|
|
9254
|
+
utils$s.path = path$9;
|
|
9253
9255
|
const pattern = pattern$1;
|
|
9254
9256
|
utils$s.pattern = pattern;
|
|
9255
9257
|
const stream$3 = stream$4;
|
|
@@ -9381,10 +9383,10 @@ function callSuccessCallback$2(callback, result) {
|
|
|
9381
9383
|
callback(null, result);
|
|
9382
9384
|
}
|
|
9383
9385
|
|
|
9384
|
-
var sync$
|
|
9386
|
+
var sync$a = {};
|
|
9385
9387
|
|
|
9386
|
-
Object.defineProperty(sync$
|
|
9387
|
-
sync$
|
|
9388
|
+
Object.defineProperty(sync$a, "__esModule", { value: true });
|
|
9389
|
+
sync$a.read = void 0;
|
|
9388
9390
|
function read$2(path, settings) {
|
|
9389
9391
|
const lstat = settings.fs.lstatSync(path);
|
|
9390
9392
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
@@ -9404,16 +9406,16 @@ function read$2(path, settings) {
|
|
|
9404
9406
|
throw error;
|
|
9405
9407
|
}
|
|
9406
9408
|
}
|
|
9407
|
-
sync$
|
|
9409
|
+
sync$a.read = read$2;
|
|
9408
9410
|
|
|
9409
9411
|
var settings$3 = {};
|
|
9410
9412
|
|
|
9411
|
-
var fs$
|
|
9413
|
+
var fs$c = {};
|
|
9412
9414
|
|
|
9413
9415
|
(function (exports) {
|
|
9414
9416
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9415
9417
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
9416
|
-
const fs =
|
|
9418
|
+
const fs = require$$0__default$2["default"];
|
|
9417
9419
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
9418
9420
|
lstat: fs.lstat,
|
|
9419
9421
|
stat: fs.stat,
|
|
@@ -9427,15 +9429,15 @@ function createFileSystemAdapter(fsMethods) {
|
|
|
9427
9429
|
return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
9428
9430
|
}
|
|
9429
9431
|
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
9430
|
-
}(fs$
|
|
9432
|
+
}(fs$c));
|
|
9431
9433
|
|
|
9432
9434
|
Object.defineProperty(settings$3, "__esModule", { value: true });
|
|
9433
|
-
const fs$
|
|
9435
|
+
const fs$b = fs$c;
|
|
9434
9436
|
class Settings$2 {
|
|
9435
9437
|
constructor(_options = {}) {
|
|
9436
9438
|
this._options = _options;
|
|
9437
9439
|
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
|
|
9438
|
-
this.fs = fs$
|
|
9440
|
+
this.fs = fs$b.createFileSystemAdapter(this._options.fs);
|
|
9439
9441
|
this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
|
|
9440
9442
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
9441
9443
|
}
|
|
@@ -9448,7 +9450,7 @@ settings$3.default = Settings$2;
|
|
|
9448
9450
|
Object.defineProperty(out$3, "__esModule", { value: true });
|
|
9449
9451
|
out$3.statSync = out$3.stat = out$3.Settings = void 0;
|
|
9450
9452
|
const async$4 = async$5;
|
|
9451
|
-
const sync$
|
|
9453
|
+
const sync$9 = sync$a;
|
|
9452
9454
|
const settings_1$3 = settings$3;
|
|
9453
9455
|
out$3.Settings = settings_1$3.default;
|
|
9454
9456
|
function stat(path, optionsOrSettingsOrCallback, callback) {
|
|
@@ -9461,7 +9463,7 @@ function stat(path, optionsOrSettingsOrCallback, callback) {
|
|
|
9461
9463
|
out$3.stat = stat;
|
|
9462
9464
|
function statSync(path, optionsOrSettings) {
|
|
9463
9465
|
const settings = getSettings$2(optionsOrSettings);
|
|
9464
|
-
return sync$
|
|
9466
|
+
return sync$9.read(path, settings);
|
|
9465
9467
|
}
|
|
9466
9468
|
out$3.statSync = statSync;
|
|
9467
9469
|
function getSettings$2(settingsOrOptions = {}) {
|
|
@@ -9566,10 +9568,10 @@ constants.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED
|
|
|
9566
9568
|
|
|
9567
9569
|
var utils$h = {};
|
|
9568
9570
|
|
|
9569
|
-
var fs$
|
|
9571
|
+
var fs$a = {};
|
|
9570
9572
|
|
|
9571
|
-
Object.defineProperty(fs$
|
|
9572
|
-
fs$
|
|
9573
|
+
Object.defineProperty(fs$a, "__esModule", { value: true });
|
|
9574
|
+
fs$a.createDirentFromStats = void 0;
|
|
9573
9575
|
class DirentFromStats {
|
|
9574
9576
|
constructor(name, stats) {
|
|
9575
9577
|
this.name = name;
|
|
@@ -9585,12 +9587,12 @@ class DirentFromStats {
|
|
|
9585
9587
|
function createDirentFromStats(name, stats) {
|
|
9586
9588
|
return new DirentFromStats(name, stats);
|
|
9587
9589
|
}
|
|
9588
|
-
fs$
|
|
9590
|
+
fs$a.createDirentFromStats = createDirentFromStats;
|
|
9589
9591
|
|
|
9590
9592
|
Object.defineProperty(utils$h, "__esModule", { value: true });
|
|
9591
9593
|
utils$h.fs = void 0;
|
|
9592
|
-
const fs$
|
|
9593
|
-
utils$h.fs = fs$
|
|
9594
|
+
const fs$9 = fs$a;
|
|
9595
|
+
utils$h.fs = fs$9;
|
|
9594
9596
|
|
|
9595
9597
|
var common$e = {};
|
|
9596
9598
|
|
|
@@ -9711,10 +9713,10 @@ function callSuccessCallback$1(callback, result) {
|
|
|
9711
9713
|
callback(null, result);
|
|
9712
9714
|
}
|
|
9713
9715
|
|
|
9714
|
-
var sync$
|
|
9716
|
+
var sync$8 = {};
|
|
9715
9717
|
|
|
9716
|
-
Object.defineProperty(sync$
|
|
9717
|
-
sync$
|
|
9718
|
+
Object.defineProperty(sync$8, "__esModule", { value: true });
|
|
9719
|
+
sync$8.readdir = sync$8.readdirWithFileTypes = sync$8.read = void 0;
|
|
9718
9720
|
const fsStat$4 = out$3;
|
|
9719
9721
|
const constants_1 = constants;
|
|
9720
9722
|
const utils$f = utils$h;
|
|
@@ -9725,7 +9727,7 @@ function read(directory, settings) {
|
|
|
9725
9727
|
}
|
|
9726
9728
|
return readdir(directory, settings);
|
|
9727
9729
|
}
|
|
9728
|
-
sync$
|
|
9730
|
+
sync$8.read = read;
|
|
9729
9731
|
function readdirWithFileTypes(directory, settings) {
|
|
9730
9732
|
const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
|
|
9731
9733
|
return dirents.map((dirent) => {
|
|
@@ -9748,7 +9750,7 @@ function readdirWithFileTypes(directory, settings) {
|
|
|
9748
9750
|
return entry;
|
|
9749
9751
|
});
|
|
9750
9752
|
}
|
|
9751
|
-
sync$
|
|
9753
|
+
sync$8.readdirWithFileTypes = readdirWithFileTypes;
|
|
9752
9754
|
function readdir(directory, settings) {
|
|
9753
9755
|
const names = settings.fs.readdirSync(directory);
|
|
9754
9756
|
return names.map((name) => {
|
|
@@ -9765,16 +9767,16 @@ function readdir(directory, settings) {
|
|
|
9765
9767
|
return entry;
|
|
9766
9768
|
});
|
|
9767
9769
|
}
|
|
9768
|
-
sync$
|
|
9770
|
+
sync$8.readdir = readdir;
|
|
9769
9771
|
|
|
9770
9772
|
var settings$2 = {};
|
|
9771
9773
|
|
|
9772
|
-
var fs$
|
|
9774
|
+
var fs$8 = {};
|
|
9773
9775
|
|
|
9774
9776
|
(function (exports) {
|
|
9775
9777
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9776
9778
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
9777
|
-
const fs =
|
|
9779
|
+
const fs = require$$0__default$2["default"];
|
|
9778
9780
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
9779
9781
|
lstat: fs.lstat,
|
|
9780
9782
|
stat: fs.stat,
|
|
@@ -9790,18 +9792,18 @@ function createFileSystemAdapter(fsMethods) {
|
|
|
9790
9792
|
return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
9791
9793
|
}
|
|
9792
9794
|
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
9793
|
-
}(fs$
|
|
9795
|
+
}(fs$8));
|
|
9794
9796
|
|
|
9795
9797
|
Object.defineProperty(settings$2, "__esModule", { value: true });
|
|
9796
|
-
const path$
|
|
9798
|
+
const path$8 = path__default["default"];
|
|
9797
9799
|
const fsStat$3 = out$3;
|
|
9798
|
-
const fs$
|
|
9800
|
+
const fs$7 = fs$8;
|
|
9799
9801
|
class Settings$1 {
|
|
9800
9802
|
constructor(_options = {}) {
|
|
9801
9803
|
this._options = _options;
|
|
9802
9804
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
9803
|
-
this.fs = fs$
|
|
9804
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
9805
|
+
this.fs = fs$7.createFileSystemAdapter(this._options.fs);
|
|
9806
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$8.sep);
|
|
9805
9807
|
this.stats = this._getValue(this._options.stats, false);
|
|
9806
9808
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
9807
9809
|
this.fsStatSettings = new fsStat$3.Settings({
|
|
@@ -9819,7 +9821,7 @@ settings$2.default = Settings$1;
|
|
|
9819
9821
|
Object.defineProperty(out$1, "__esModule", { value: true });
|
|
9820
9822
|
out$1.Settings = out$1.scandirSync = out$1.scandir = void 0;
|
|
9821
9823
|
const async = async$1;
|
|
9822
|
-
const sync$
|
|
9824
|
+
const sync$7 = sync$8;
|
|
9823
9825
|
const settings_1$2 = settings$2;
|
|
9824
9826
|
out$1.Settings = settings_1$2.default;
|
|
9825
9827
|
function scandir(path, optionsOrSettingsOrCallback, callback) {
|
|
@@ -9832,7 +9834,7 @@ function scandir(path, optionsOrSettingsOrCallback, callback) {
|
|
|
9832
9834
|
out$1.scandir = scandir;
|
|
9833
9835
|
function scandirSync(path, optionsOrSettings) {
|
|
9834
9836
|
const settings = getSettings$1(optionsOrSettings);
|
|
9835
|
-
return sync$
|
|
9837
|
+
return sync$7.read(path, settings);
|
|
9836
9838
|
}
|
|
9837
9839
|
out$1.scandirSync = scandirSync;
|
|
9838
9840
|
function getSettings$1(settingsOrOptions = {}) {
|
|
@@ -10205,7 +10207,7 @@ class Reader$1 {
|
|
|
10205
10207
|
reader$1.default = Reader$1;
|
|
10206
10208
|
|
|
10207
10209
|
Object.defineProperty(async$2, "__esModule", { value: true });
|
|
10208
|
-
const events_1 = require$$0__default$
|
|
10210
|
+
const events_1 = require$$0__default$6["default"];
|
|
10209
10211
|
const fsScandir$2 = out$1;
|
|
10210
10212
|
const fastq = queue.exports;
|
|
10211
10213
|
const common$9 = common$b;
|
|
@@ -10367,11 +10369,11 @@ class StreamProvider {
|
|
|
10367
10369
|
}
|
|
10368
10370
|
stream$1.default = StreamProvider;
|
|
10369
10371
|
|
|
10370
|
-
var sync$
|
|
10372
|
+
var sync$6 = {};
|
|
10371
10373
|
|
|
10372
|
-
var sync$
|
|
10374
|
+
var sync$5 = {};
|
|
10373
10375
|
|
|
10374
|
-
Object.defineProperty(sync$
|
|
10376
|
+
Object.defineProperty(sync$5, "__esModule", { value: true });
|
|
10375
10377
|
const fsScandir$1 = out$1;
|
|
10376
10378
|
const common$8 = common$b;
|
|
10377
10379
|
const reader_1$2 = reader$1;
|
|
@@ -10428,10 +10430,10 @@ class SyncReader extends reader_1$2.default {
|
|
|
10428
10430
|
this._storage.push(entry);
|
|
10429
10431
|
}
|
|
10430
10432
|
}
|
|
10431
|
-
sync$
|
|
10433
|
+
sync$5.default = SyncReader;
|
|
10432
10434
|
|
|
10433
|
-
Object.defineProperty(sync$
|
|
10434
|
-
const sync_1$3 = sync$
|
|
10435
|
+
Object.defineProperty(sync$6, "__esModule", { value: true });
|
|
10436
|
+
const sync_1$3 = sync$5;
|
|
10435
10437
|
class SyncProvider {
|
|
10436
10438
|
constructor(_root, _settings) {
|
|
10437
10439
|
this._root = _root;
|
|
@@ -10442,12 +10444,12 @@ class SyncProvider {
|
|
|
10442
10444
|
return this._reader.read();
|
|
10443
10445
|
}
|
|
10444
10446
|
}
|
|
10445
|
-
sync$
|
|
10447
|
+
sync$6.default = SyncProvider;
|
|
10446
10448
|
|
|
10447
10449
|
var settings$1 = {};
|
|
10448
10450
|
|
|
10449
10451
|
Object.defineProperty(settings$1, "__esModule", { value: true });
|
|
10450
|
-
const path$
|
|
10452
|
+
const path$7 = path__default["default"];
|
|
10451
10453
|
const fsScandir = out$1;
|
|
10452
10454
|
class Settings {
|
|
10453
10455
|
constructor(_options = {}) {
|
|
@@ -10457,7 +10459,7 @@ class Settings {
|
|
|
10457
10459
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
10458
10460
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
10459
10461
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
10460
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
10462
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$7.sep);
|
|
10461
10463
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
10462
10464
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
10463
10465
|
fs: this._options.fs,
|
|
@@ -10476,7 +10478,7 @@ Object.defineProperty(out$2, "__esModule", { value: true });
|
|
|
10476
10478
|
out$2.Settings = out$2.walkStream = out$2.walkSync = out$2.walk = void 0;
|
|
10477
10479
|
const async_1$1 = async$3;
|
|
10478
10480
|
const stream_1$4 = stream$1;
|
|
10479
|
-
const sync_1$2 = sync$
|
|
10481
|
+
const sync_1$2 = sync$6;
|
|
10480
10482
|
const settings_1$1 = settings$1;
|
|
10481
10483
|
out$2.Settings = settings_1$1.default;
|
|
10482
10484
|
function walk(directory, optionsOrSettingsOrCallback, callback) {
|
|
@@ -10509,7 +10511,7 @@ function getSettings(settingsOrOptions = {}) {
|
|
|
10509
10511
|
var reader = {};
|
|
10510
10512
|
|
|
10511
10513
|
Object.defineProperty(reader, "__esModule", { value: true });
|
|
10512
|
-
const path$
|
|
10514
|
+
const path$6 = path__default["default"];
|
|
10513
10515
|
const fsStat$2 = out$3;
|
|
10514
10516
|
const utils$e = utils$s;
|
|
10515
10517
|
class Reader {
|
|
@@ -10522,7 +10524,7 @@ class Reader {
|
|
|
10522
10524
|
});
|
|
10523
10525
|
}
|
|
10524
10526
|
_getFullEntryPath(filepath) {
|
|
10525
|
-
return path$
|
|
10527
|
+
return path$6.resolve(this._settings.cwd, filepath);
|
|
10526
10528
|
}
|
|
10527
10529
|
_makeEntry(stats, pattern) {
|
|
10528
10530
|
const entry = {
|
|
@@ -10858,7 +10860,7 @@ class EntryTransformer {
|
|
|
10858
10860
|
entry.default = EntryTransformer;
|
|
10859
10861
|
|
|
10860
10862
|
Object.defineProperty(provider, "__esModule", { value: true });
|
|
10861
|
-
const path$
|
|
10863
|
+
const path$5 = path__default["default"];
|
|
10862
10864
|
const deep_1 = deep;
|
|
10863
10865
|
const entry_1 = entry$1;
|
|
10864
10866
|
const error_1 = error;
|
|
@@ -10872,7 +10874,7 @@ class Provider {
|
|
|
10872
10874
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
10873
10875
|
}
|
|
10874
10876
|
_getRootDirectory(task) {
|
|
10875
|
-
return path$
|
|
10877
|
+
return path$5.resolve(this._settings.cwd, task.base);
|
|
10876
10878
|
}
|
|
10877
10879
|
_getReaderOptions(task) {
|
|
10878
10880
|
const basePath = task.base === '.' ? '' : task.base;
|
|
@@ -10966,11 +10968,11 @@ class ProviderStream extends provider_1$1.default {
|
|
|
10966
10968
|
}
|
|
10967
10969
|
stream.default = ProviderStream;
|
|
10968
10970
|
|
|
10969
|
-
var sync$
|
|
10971
|
+
var sync$4 = {};
|
|
10970
10972
|
|
|
10971
|
-
var sync = {};
|
|
10973
|
+
var sync$3 = {};
|
|
10972
10974
|
|
|
10973
|
-
Object.defineProperty(sync, "__esModule", { value: true });
|
|
10975
|
+
Object.defineProperty(sync$3, "__esModule", { value: true });
|
|
10974
10976
|
const fsStat = out$3;
|
|
10975
10977
|
const fsWalk = out$2;
|
|
10976
10978
|
const reader_1 = reader;
|
|
@@ -11011,10 +11013,10 @@ class ReaderSync extends reader_1.default {
|
|
|
11011
11013
|
return this._statSync(filepath, this._fsStatSettings);
|
|
11012
11014
|
}
|
|
11013
11015
|
}
|
|
11014
|
-
sync.default = ReaderSync;
|
|
11016
|
+
sync$3.default = ReaderSync;
|
|
11015
11017
|
|
|
11016
|
-
Object.defineProperty(sync$
|
|
11017
|
-
const sync_1$1 = sync;
|
|
11018
|
+
Object.defineProperty(sync$4, "__esModule", { value: true });
|
|
11019
|
+
const sync_1$1 = sync$3;
|
|
11018
11020
|
const provider_1 = provider;
|
|
11019
11021
|
class ProviderSync extends provider_1.default {
|
|
11020
11022
|
constructor() {
|
|
@@ -11034,15 +11036,15 @@ class ProviderSync extends provider_1.default {
|
|
|
11034
11036
|
return this._reader.static(task.patterns, options);
|
|
11035
11037
|
}
|
|
11036
11038
|
}
|
|
11037
|
-
sync$
|
|
11039
|
+
sync$4.default = ProviderSync;
|
|
11038
11040
|
|
|
11039
11041
|
var settings = {};
|
|
11040
11042
|
|
|
11041
11043
|
(function (exports) {
|
|
11042
11044
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11043
11045
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
11044
|
-
const fs =
|
|
11045
|
-
const os = require$$0__default$
|
|
11046
|
+
const fs = require$$0__default$2["default"];
|
|
11047
|
+
const os = require$$0__default$5["default"];
|
|
11046
11048
|
/**
|
|
11047
11049
|
* The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
|
|
11048
11050
|
* https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
|
|
@@ -11100,7 +11102,7 @@ exports.default = Settings;
|
|
|
11100
11102
|
const taskManager = tasks;
|
|
11101
11103
|
const async_1 = async$6;
|
|
11102
11104
|
const stream_1 = stream;
|
|
11103
|
-
const sync_1 = sync$
|
|
11105
|
+
const sync_1 = sync$4;
|
|
11104
11106
|
const settings_1 = settings;
|
|
11105
11107
|
const utils$8 = utils$s;
|
|
11106
11108
|
async function FastGlob(source, options) {
|
|
@@ -11168,8 +11170,8 @@ var dirGlob$1 = {exports: {}};
|
|
|
11168
11170
|
|
|
11169
11171
|
var pathType$1 = {};
|
|
11170
11172
|
|
|
11171
|
-
const {promisify: promisify$1} = require$$0__default$
|
|
11172
|
-
const fs$
|
|
11173
|
+
const {promisify: promisify$1} = require$$0__default$3["default"];
|
|
11174
|
+
const fs$6 = require$$0__default$2["default"];
|
|
11173
11175
|
|
|
11174
11176
|
async function isType(fsStatType, statsMethodName, filePath) {
|
|
11175
11177
|
if (typeof filePath !== 'string') {
|
|
@@ -11177,7 +11179,7 @@ async function isType(fsStatType, statsMethodName, filePath) {
|
|
|
11177
11179
|
}
|
|
11178
11180
|
|
|
11179
11181
|
try {
|
|
11180
|
-
const stats = await promisify$1(fs$
|
|
11182
|
+
const stats = await promisify$1(fs$6[fsStatType])(filePath);
|
|
11181
11183
|
return stats[statsMethodName]();
|
|
11182
11184
|
} catch (error) {
|
|
11183
11185
|
if (error.code === 'ENOENT') {
|
|
@@ -11194,7 +11196,7 @@ function isTypeSync(fsStatType, statsMethodName, filePath) {
|
|
|
11194
11196
|
}
|
|
11195
11197
|
|
|
11196
11198
|
try {
|
|
11197
|
-
return fs$
|
|
11199
|
+
return fs$6[fsStatType](filePath)[statsMethodName]();
|
|
11198
11200
|
} catch (error) {
|
|
11199
11201
|
if (error.code === 'ENOENT') {
|
|
11200
11202
|
return false;
|
|
@@ -11211,18 +11213,18 @@ pathType$1.isFileSync = isTypeSync.bind(null, 'statSync', 'isFile');
|
|
|
11211
11213
|
pathType$1.isDirectorySync = isTypeSync.bind(null, 'statSync', 'isDirectory');
|
|
11212
11214
|
pathType$1.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink');
|
|
11213
11215
|
|
|
11214
|
-
const path$
|
|
11216
|
+
const path$4 = path__default["default"];
|
|
11215
11217
|
const pathType = pathType$1;
|
|
11216
11218
|
|
|
11217
11219
|
const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0];
|
|
11218
11220
|
|
|
11219
11221
|
const getPath = (filepath, cwd) => {
|
|
11220
11222
|
const pth = filepath[0] === '!' ? filepath.slice(1) : filepath;
|
|
11221
|
-
return path$
|
|
11223
|
+
return path$4.isAbsolute(pth) ? pth : path$4.join(cwd, pth);
|
|
11222
11224
|
};
|
|
11223
11225
|
|
|
11224
11226
|
const addExtensions = (file, extensions) => {
|
|
11225
|
-
if (path$
|
|
11227
|
+
if (path$4.extname(file)) {
|
|
11226
11228
|
return `**/${file}`;
|
|
11227
11229
|
}
|
|
11228
11230
|
|
|
@@ -11239,18 +11241,18 @@ const getGlob = (directory, options) => {
|
|
|
11239
11241
|
}
|
|
11240
11242
|
|
|
11241
11243
|
if (options.files && options.extensions) {
|
|
11242
|
-
return options.files.map(x => path$
|
|
11244
|
+
return options.files.map(x => path$4.posix.join(directory, addExtensions(x, options.extensions)));
|
|
11243
11245
|
}
|
|
11244
11246
|
|
|
11245
11247
|
if (options.files) {
|
|
11246
|
-
return options.files.map(x => path$
|
|
11248
|
+
return options.files.map(x => path$4.posix.join(directory, `**/${x}`));
|
|
11247
11249
|
}
|
|
11248
11250
|
|
|
11249
11251
|
if (options.extensions) {
|
|
11250
|
-
return [path$
|
|
11252
|
+
return [path$4.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];
|
|
11251
11253
|
}
|
|
11252
11254
|
|
|
11253
|
-
return [path$
|
|
11255
|
+
return [path$4.posix.join(directory, '**')];
|
|
11254
11256
|
};
|
|
11255
11257
|
|
|
11256
11258
|
dirGlob$1.exports = async (input, options) => {
|
|
@@ -11897,9 +11899,9 @@ var slash$2 = path => {
|
|
|
11897
11899
|
return path.replace(/\\/g, '/');
|
|
11898
11900
|
};
|
|
11899
11901
|
|
|
11900
|
-
const {promisify} = require$$0__default$
|
|
11901
|
-
const fs$
|
|
11902
|
-
const path = path__default["default"];
|
|
11902
|
+
const {promisify} = require$$0__default$3["default"];
|
|
11903
|
+
const fs$5 = require$$0__default$2["default"];
|
|
11904
|
+
const path$3 = path__default["default"];
|
|
11903
11905
|
const fastGlob$1 = out;
|
|
11904
11906
|
const gitIgnore = ignore;
|
|
11905
11907
|
const slash$1 = slash$2;
|
|
@@ -11911,18 +11913,18 @@ const DEFAULT_IGNORE = [
|
|
|
11911
11913
|
'**/.git'
|
|
11912
11914
|
];
|
|
11913
11915
|
|
|
11914
|
-
const readFileP = promisify(fs$
|
|
11916
|
+
const readFileP = promisify(fs$5.readFile);
|
|
11915
11917
|
|
|
11916
11918
|
const mapGitIgnorePatternTo = base => ignore => {
|
|
11917
11919
|
if (ignore.startsWith('!')) {
|
|
11918
|
-
return '!' + path.posix.join(base, ignore.slice(1));
|
|
11920
|
+
return '!' + path$3.posix.join(base, ignore.slice(1));
|
|
11919
11921
|
}
|
|
11920
11922
|
|
|
11921
|
-
return path.posix.join(base, ignore);
|
|
11923
|
+
return path$3.posix.join(base, ignore);
|
|
11922
11924
|
};
|
|
11923
11925
|
|
|
11924
11926
|
const parseGitIgnore = (content, options) => {
|
|
11925
|
-
const base = slash$1(path.relative(options.cwd, path.dirname(options.fileName)));
|
|
11927
|
+
const base = slash$1(path$3.relative(options.cwd, path$3.dirname(options.fileName)));
|
|
11926
11928
|
|
|
11927
11929
|
return content
|
|
11928
11930
|
.split(/\r?\n/)
|
|
@@ -11945,7 +11947,7 @@ const reduceIgnore = files => {
|
|
|
11945
11947
|
|
|
11946
11948
|
const ensureAbsolutePathForCwd = (cwd, p) => {
|
|
11947
11949
|
cwd = slash$1(cwd);
|
|
11948
|
-
if (path.isAbsolute(p)) {
|
|
11950
|
+
if (path$3.isAbsolute(p)) {
|
|
11949
11951
|
if (slash$1(p).startsWith(cwd)) {
|
|
11950
11952
|
return p;
|
|
11951
11953
|
}
|
|
@@ -11953,15 +11955,15 @@ const ensureAbsolutePathForCwd = (cwd, p) => {
|
|
|
11953
11955
|
throw new Error(`Path ${p} is not in cwd ${cwd}`);
|
|
11954
11956
|
}
|
|
11955
11957
|
|
|
11956
|
-
return path.join(cwd, p);
|
|
11958
|
+
return path$3.join(cwd, p);
|
|
11957
11959
|
};
|
|
11958
11960
|
|
|
11959
11961
|
const getIsIgnoredPredecate = (ignores, cwd) => {
|
|
11960
|
-
return p => ignores.ignores(slash$1(path.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p))));
|
|
11962
|
+
return p => ignores.ignores(slash$1(path$3.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p))));
|
|
11961
11963
|
};
|
|
11962
11964
|
|
|
11963
11965
|
const getFile = async (file, cwd) => {
|
|
11964
|
-
const filePath = path.join(cwd, file);
|
|
11966
|
+
const filePath = path$3.join(cwd, file);
|
|
11965
11967
|
const content = await readFileP(filePath, 'utf8');
|
|
11966
11968
|
|
|
11967
11969
|
return {
|
|
@@ -11972,8 +11974,8 @@ const getFile = async (file, cwd) => {
|
|
|
11972
11974
|
};
|
|
11973
11975
|
|
|
11974
11976
|
const getFileSync = (file, cwd) => {
|
|
11975
|
-
const filePath = path.join(cwd, file);
|
|
11976
|
-
const content = fs$
|
|
11977
|
+
const filePath = path$3.join(cwd, file);
|
|
11978
|
+
const content = fs$5.readFileSync(filePath, 'utf8');
|
|
11977
11979
|
|
|
11978
11980
|
return {
|
|
11979
11981
|
cwd,
|
|
@@ -12063,7 +12065,7 @@ var streamUtils = {
|
|
|
12063
12065
|
UniqueStream: UniqueStream$1
|
|
12064
12066
|
};
|
|
12065
12067
|
|
|
12066
|
-
const fs$
|
|
12068
|
+
const fs$4 = require$$0__default$2["default"];
|
|
12067
12069
|
const arrayUnion = arrayUnion$1;
|
|
12068
12070
|
const merge2 = merge2_1;
|
|
12069
12071
|
const fastGlob = out;
|
|
@@ -12088,7 +12090,7 @@ const checkCwdOption = (options = {}) => {
|
|
|
12088
12090
|
|
|
12089
12091
|
let stat;
|
|
12090
12092
|
try {
|
|
12091
|
-
stat = fs$
|
|
12093
|
+
stat = fs$4.statSync(options.cwd);
|
|
12092
12094
|
} catch {
|
|
12093
12095
|
return;
|
|
12094
12096
|
}
|
|
@@ -12098,7 +12100,7 @@ const checkCwdOption = (options = {}) => {
|
|
|
12098
12100
|
}
|
|
12099
12101
|
};
|
|
12100
12102
|
|
|
12101
|
-
const getPathString = p => p.stats instanceof fs$
|
|
12103
|
+
const getPathString = p => p.stats instanceof fs$4.Stats ? p.path : p;
|
|
12102
12104
|
|
|
12103
12105
|
const generateGlobTasks = (patterns, taskOptions) => {
|
|
12104
12106
|
patterns = arrayUnion([].concat(patterns));
|
|
@@ -12374,7 +12376,7 @@ var ms$1 = function(val, options) {
|
|
|
12374
12376
|
options = options || {};
|
|
12375
12377
|
var type = typeof val;
|
|
12376
12378
|
if (type === 'string' && val.length > 0) {
|
|
12377
|
-
return parse$
|
|
12379
|
+
return parse$c(val);
|
|
12378
12380
|
} else if (type === 'number' && isFinite(val)) {
|
|
12379
12381
|
return options.long ? fmtLong$1(val) : fmtShort$1(val);
|
|
12380
12382
|
}
|
|
@@ -12392,7 +12394,7 @@ var ms$1 = function(val, options) {
|
|
|
12392
12394
|
* @api private
|
|
12393
12395
|
*/
|
|
12394
12396
|
|
|
12395
|
-
function parse$
|
|
12397
|
+
function parse$c(str) {
|
|
12396
12398
|
str = String(str);
|
|
12397
12399
|
if (str.length > 100) {
|
|
12398
12400
|
return;
|
|
@@ -13061,8 +13063,8 @@ var node$1 = {exports: {}};
|
|
|
13061
13063
|
*/
|
|
13062
13064
|
|
|
13063
13065
|
(function (module, exports) {
|
|
13064
|
-
const tty = require$$0__default$
|
|
13065
|
-
const util = require$$0__default$
|
|
13066
|
+
const tty = require$$0__default$4["default"];
|
|
13067
|
+
const util = require$$0__default$3["default"];
|
|
13066
13068
|
|
|
13067
13069
|
/**
|
|
13068
13070
|
* This is the Node.js implementation of `debug()`.
|
|
@@ -13380,6 +13382,7 @@ async function resolveConfig(root = process.cwd(), command = "serve", mode = "de
|
|
|
13380
13382
|
outDir,
|
|
13381
13383
|
tempDir: resolve(root, ".temp"),
|
|
13382
13384
|
markdown: userConfig.markdown,
|
|
13385
|
+
lastUpdated: userConfig.lastUpdated,
|
|
13383
13386
|
alias: resolveAliases(root, themeDir),
|
|
13384
13387
|
vue: userConfig.vue,
|
|
13385
13388
|
vite: userConfig.vite,
|
|
@@ -14519,7 +14522,7 @@ var json = new Schema$3({
|
|
|
14519
14522
|
var Schema$2 = schema;
|
|
14520
14523
|
|
|
14521
14524
|
|
|
14522
|
-
var core = new Schema$2({
|
|
14525
|
+
var core$1 = new Schema$2({
|
|
14523
14526
|
include: [
|
|
14524
14527
|
json
|
|
14525
14528
|
]
|
|
@@ -14888,7 +14891,7 @@ var Schema$1 = schema;
|
|
|
14888
14891
|
|
|
14889
14892
|
var default_safe = new Schema$1({
|
|
14890
14893
|
include: [
|
|
14891
|
-
core
|
|
14894
|
+
core$1
|
|
14892
14895
|
],
|
|
14893
14896
|
implicit: [
|
|
14894
14897
|
timestamp,
|
|
@@ -17603,7 +17606,7 @@ jsYaml$1.Type = type;
|
|
|
17603
17606
|
jsYaml$1.Schema = schema;
|
|
17604
17607
|
jsYaml$1.FAILSAFE_SCHEMA = failsafe;
|
|
17605
17608
|
jsYaml$1.JSON_SCHEMA = json;
|
|
17606
|
-
jsYaml$1.CORE_SCHEMA = core;
|
|
17609
|
+
jsYaml$1.CORE_SCHEMA = core$1;
|
|
17607
17610
|
jsYaml$1.DEFAULT_SAFE_SCHEMA = default_safe;
|
|
17608
17611
|
jsYaml$1.DEFAULT_FULL_SCHEMA = default_full;
|
|
17609
17612
|
jsYaml$1.load = loader.load;
|
|
@@ -17947,7 +17950,7 @@ var toFile$1 = function(file) {
|
|
|
17947
17950
|
const getEngine = engine;
|
|
17948
17951
|
const defaults$4 = defaults$7;
|
|
17949
17952
|
|
|
17950
|
-
var parse$
|
|
17953
|
+
var parse$b = function(language, str, options) {
|
|
17951
17954
|
const opts = defaults$4(options);
|
|
17952
17955
|
const engine = getEngine(language, opts);
|
|
17953
17956
|
if (typeof engine.parse !== 'function') {
|
|
@@ -17956,14 +17959,14 @@ var parse$9 = function(language, str, options) {
|
|
|
17956
17959
|
return engine.parse(str, opts);
|
|
17957
17960
|
};
|
|
17958
17961
|
|
|
17959
|
-
const fs =
|
|
17962
|
+
const fs$3 = require$$0__default$2["default"];
|
|
17960
17963
|
const sections = sectionMatter;
|
|
17961
17964
|
const defaults$3 = defaults$7;
|
|
17962
17965
|
const stringify = stringify$2;
|
|
17963
17966
|
const excerpt = excerpt$1;
|
|
17964
17967
|
const engines = engines$2.exports;
|
|
17965
17968
|
const toFile = toFile$1;
|
|
17966
|
-
const parse$
|
|
17969
|
+
const parse$a = parse$b;
|
|
17967
17970
|
const utils$4 = utils$7;
|
|
17968
17971
|
|
|
17969
17972
|
/**
|
|
@@ -18062,7 +18065,7 @@ function parseMatter(file, options) {
|
|
|
18062
18065
|
} else {
|
|
18063
18066
|
|
|
18064
18067
|
// create file.data by parsing the raw file.matter block
|
|
18065
|
-
file.data = parse$
|
|
18068
|
+
file.data = parse$a(file.language, file.matter, opts);
|
|
18066
18069
|
}
|
|
18067
18070
|
|
|
18068
18071
|
// update file.content
|
|
@@ -18132,7 +18135,7 @@ matter.stringify = function(file, data, options) {
|
|
|
18132
18135
|
*/
|
|
18133
18136
|
|
|
18134
18137
|
matter.read = function(filepath, options) {
|
|
18135
|
-
const str = fs.readFileSync(filepath, 'utf8');
|
|
18138
|
+
const str = fs$3.readFileSync(filepath, 'utf8');
|
|
18136
18139
|
const file = matter(str, options);
|
|
18137
18140
|
file.path = filepath;
|
|
18138
18141
|
return file;
|
|
@@ -23734,12 +23737,12 @@ Url.prototype.parseHost = function(host) {
|
|
|
23734
23737
|
if (host) { this.hostname = host; }
|
|
23735
23738
|
};
|
|
23736
23739
|
|
|
23737
|
-
var parse$
|
|
23740
|
+
var parse$9 = urlParse;
|
|
23738
23741
|
|
|
23739
23742
|
mdurl$1.encode = encode_1;
|
|
23740
23743
|
mdurl$1.decode = decode_1;
|
|
23741
23744
|
mdurl$1.format = format$1;
|
|
23742
|
-
mdurl$1.parse = parse$
|
|
23745
|
+
mdurl$1.parse = parse$9;
|
|
23743
23746
|
|
|
23744
23747
|
var uc_micro = {};
|
|
23745
23748
|
|
|
@@ -27694,7 +27697,7 @@ for (var i$2 = 0; i$2 < 256; i$2++) { ESCAPED.push(0); }
|
|
|
27694
27697
|
.split('').forEach(function (ch) { ESCAPED[ch.charCodeAt(0)] = 1; });
|
|
27695
27698
|
|
|
27696
27699
|
|
|
27697
|
-
var _escape = function escape(state, silent) {
|
|
27700
|
+
var _escape$1 = function escape(state, silent) {
|
|
27698
27701
|
var ch, pos = state.pos, max = state.posMax;
|
|
27699
27702
|
|
|
27700
27703
|
if (state.src.charCodeAt(pos) !== 0x5C/* \ */) { return false; }
|
|
@@ -28825,7 +28828,7 @@ var Ruler = ruler;
|
|
|
28825
28828
|
var _rules = [
|
|
28826
28829
|
[ 'text', text ],
|
|
28827
28830
|
[ 'newline', newline ],
|
|
28828
|
-
[ 'escape', _escape ],
|
|
28831
|
+
[ 'escape', _escape$1 ],
|
|
28829
28832
|
[ 'backticks', backticks ],
|
|
28830
28833
|
[ 'strikethrough', strikethrough.tokenize ],
|
|
28831
28834
|
[ 'emphasis', emphasis.tokenize ],
|
|
@@ -35050,9 +35053,9 @@ const snippetPlugin = (md, srcDir) => {
|
|
|
35050
35053
|
if (loader) {
|
|
35051
35054
|
loader.addDependency(src);
|
|
35052
35055
|
}
|
|
35053
|
-
const isAFile =
|
|
35054
|
-
if (
|
|
35055
|
-
let content =
|
|
35056
|
+
const isAFile = require$$0__default$2["default"].lstatSync(src).isFile();
|
|
35057
|
+
if (require$$0__default$2["default"].existsSync(src) && isAFile) {
|
|
35058
|
+
let content = require$$0__default$2["default"].readFileSync(src, "utf8");
|
|
35056
35059
|
if (regionName) {
|
|
35057
35060
|
const lines = content.split(/\r?\n/);
|
|
35058
35061
|
const region = findRegion(lines, regionName);
|
|
@@ -36478,14 +36481,639 @@ function slash(p) {
|
|
|
36478
36481
|
return p.replace(/\\/g, "/");
|
|
36479
36482
|
}
|
|
36480
36483
|
|
|
36484
|
+
var crossSpawn = {exports: {}};
|
|
36485
|
+
|
|
36486
|
+
var windows = isexe$3;
|
|
36487
|
+
isexe$3.sync = sync$2;
|
|
36488
|
+
|
|
36489
|
+
var fs$2 = require$$0__default$2["default"];
|
|
36490
|
+
|
|
36491
|
+
function checkPathExt (path, options) {
|
|
36492
|
+
var pathext = options.pathExt !== undefined ?
|
|
36493
|
+
options.pathExt : process.env.PATHEXT;
|
|
36494
|
+
|
|
36495
|
+
if (!pathext) {
|
|
36496
|
+
return true
|
|
36497
|
+
}
|
|
36498
|
+
|
|
36499
|
+
pathext = pathext.split(';');
|
|
36500
|
+
if (pathext.indexOf('') !== -1) {
|
|
36501
|
+
return true
|
|
36502
|
+
}
|
|
36503
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
36504
|
+
var p = pathext[i].toLowerCase();
|
|
36505
|
+
if (p && path.substr(-p.length).toLowerCase() === p) {
|
|
36506
|
+
return true
|
|
36507
|
+
}
|
|
36508
|
+
}
|
|
36509
|
+
return false
|
|
36510
|
+
}
|
|
36511
|
+
|
|
36512
|
+
function checkStat$1 (stat, path, options) {
|
|
36513
|
+
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
36514
|
+
return false
|
|
36515
|
+
}
|
|
36516
|
+
return checkPathExt(path, options)
|
|
36517
|
+
}
|
|
36518
|
+
|
|
36519
|
+
function isexe$3 (path, options, cb) {
|
|
36520
|
+
fs$2.stat(path, function (er, stat) {
|
|
36521
|
+
cb(er, er ? false : checkStat$1(stat, path, options));
|
|
36522
|
+
});
|
|
36523
|
+
}
|
|
36524
|
+
|
|
36525
|
+
function sync$2 (path, options) {
|
|
36526
|
+
return checkStat$1(fs$2.statSync(path), path, options)
|
|
36527
|
+
}
|
|
36528
|
+
|
|
36529
|
+
var mode = isexe$2;
|
|
36530
|
+
isexe$2.sync = sync$1;
|
|
36531
|
+
|
|
36532
|
+
var fs$1 = require$$0__default$2["default"];
|
|
36533
|
+
|
|
36534
|
+
function isexe$2 (path, options, cb) {
|
|
36535
|
+
fs$1.stat(path, function (er, stat) {
|
|
36536
|
+
cb(er, er ? false : checkStat(stat, options));
|
|
36537
|
+
});
|
|
36538
|
+
}
|
|
36539
|
+
|
|
36540
|
+
function sync$1 (path, options) {
|
|
36541
|
+
return checkStat(fs$1.statSync(path), options)
|
|
36542
|
+
}
|
|
36543
|
+
|
|
36544
|
+
function checkStat (stat, options) {
|
|
36545
|
+
return stat.isFile() && checkMode(stat, options)
|
|
36546
|
+
}
|
|
36547
|
+
|
|
36548
|
+
function checkMode (stat, options) {
|
|
36549
|
+
var mod = stat.mode;
|
|
36550
|
+
var uid = stat.uid;
|
|
36551
|
+
var gid = stat.gid;
|
|
36552
|
+
|
|
36553
|
+
var myUid = options.uid !== undefined ?
|
|
36554
|
+
options.uid : process.getuid && process.getuid();
|
|
36555
|
+
var myGid = options.gid !== undefined ?
|
|
36556
|
+
options.gid : process.getgid && process.getgid();
|
|
36557
|
+
|
|
36558
|
+
var u = parseInt('100', 8);
|
|
36559
|
+
var g = parseInt('010', 8);
|
|
36560
|
+
var o = parseInt('001', 8);
|
|
36561
|
+
var ug = u | g;
|
|
36562
|
+
|
|
36563
|
+
var ret = (mod & o) ||
|
|
36564
|
+
(mod & g) && gid === myGid ||
|
|
36565
|
+
(mod & u) && uid === myUid ||
|
|
36566
|
+
(mod & ug) && myUid === 0;
|
|
36567
|
+
|
|
36568
|
+
return ret
|
|
36569
|
+
}
|
|
36570
|
+
|
|
36571
|
+
var core;
|
|
36572
|
+
if (process.platform === 'win32' || commonjsGlobal.TESTING_WINDOWS) {
|
|
36573
|
+
core = windows;
|
|
36574
|
+
} else {
|
|
36575
|
+
core = mode;
|
|
36576
|
+
}
|
|
36577
|
+
|
|
36578
|
+
var isexe_1 = isexe$1;
|
|
36579
|
+
isexe$1.sync = sync;
|
|
36580
|
+
|
|
36581
|
+
function isexe$1 (path, options, cb) {
|
|
36582
|
+
if (typeof options === 'function') {
|
|
36583
|
+
cb = options;
|
|
36584
|
+
options = {};
|
|
36585
|
+
}
|
|
36586
|
+
|
|
36587
|
+
if (!cb) {
|
|
36588
|
+
if (typeof Promise !== 'function') {
|
|
36589
|
+
throw new TypeError('callback not provided')
|
|
36590
|
+
}
|
|
36591
|
+
|
|
36592
|
+
return new Promise(function (resolve, reject) {
|
|
36593
|
+
isexe$1(path, options || {}, function (er, is) {
|
|
36594
|
+
if (er) {
|
|
36595
|
+
reject(er);
|
|
36596
|
+
} else {
|
|
36597
|
+
resolve(is);
|
|
36598
|
+
}
|
|
36599
|
+
});
|
|
36600
|
+
})
|
|
36601
|
+
}
|
|
36602
|
+
|
|
36603
|
+
core(path, options || {}, function (er, is) {
|
|
36604
|
+
// ignore EACCES because that just means we aren't allowed to run it
|
|
36605
|
+
if (er) {
|
|
36606
|
+
if (er.code === 'EACCES' || options && options.ignoreErrors) {
|
|
36607
|
+
er = null;
|
|
36608
|
+
is = false;
|
|
36609
|
+
}
|
|
36610
|
+
}
|
|
36611
|
+
cb(er, is);
|
|
36612
|
+
});
|
|
36613
|
+
}
|
|
36614
|
+
|
|
36615
|
+
function sync (path, options) {
|
|
36616
|
+
// my kingdom for a filtered catch
|
|
36617
|
+
try {
|
|
36618
|
+
return core.sync(path, options || {})
|
|
36619
|
+
} catch (er) {
|
|
36620
|
+
if (options && options.ignoreErrors || er.code === 'EACCES') {
|
|
36621
|
+
return false
|
|
36622
|
+
} else {
|
|
36623
|
+
throw er
|
|
36624
|
+
}
|
|
36625
|
+
}
|
|
36626
|
+
}
|
|
36627
|
+
|
|
36628
|
+
const isWindows = process.platform === 'win32' ||
|
|
36629
|
+
process.env.OSTYPE === 'cygwin' ||
|
|
36630
|
+
process.env.OSTYPE === 'msys';
|
|
36631
|
+
|
|
36632
|
+
const path$2 = path__default["default"];
|
|
36633
|
+
const COLON$1 = isWindows ? ';' : ':';
|
|
36634
|
+
const isexe = isexe_1;
|
|
36635
|
+
|
|
36636
|
+
const getNotFoundError = (cmd) =>
|
|
36637
|
+
Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' });
|
|
36638
|
+
|
|
36639
|
+
const getPathInfo = (cmd, opt) => {
|
|
36640
|
+
const colon = opt.colon || COLON$1;
|
|
36641
|
+
|
|
36642
|
+
// If it has a slash, then we don't bother searching the pathenv.
|
|
36643
|
+
// just check the file itself, and that's it.
|
|
36644
|
+
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? ['']
|
|
36645
|
+
: (
|
|
36646
|
+
[
|
|
36647
|
+
// windows always checks the cwd first
|
|
36648
|
+
...(isWindows ? [process.cwd()] : []),
|
|
36649
|
+
...(opt.path || process.env.PATH ||
|
|
36650
|
+
/* istanbul ignore next: very unusual */ '').split(colon),
|
|
36651
|
+
]
|
|
36652
|
+
);
|
|
36653
|
+
const pathExtExe = isWindows
|
|
36654
|
+
? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'
|
|
36655
|
+
: '';
|
|
36656
|
+
const pathExt = isWindows ? pathExtExe.split(colon) : [''];
|
|
36657
|
+
|
|
36658
|
+
if (isWindows) {
|
|
36659
|
+
if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
|
|
36660
|
+
pathExt.unshift('');
|
|
36661
|
+
}
|
|
36662
|
+
|
|
36663
|
+
return {
|
|
36664
|
+
pathEnv,
|
|
36665
|
+
pathExt,
|
|
36666
|
+
pathExtExe,
|
|
36667
|
+
}
|
|
36668
|
+
};
|
|
36669
|
+
|
|
36670
|
+
const which$1 = (cmd, opt, cb) => {
|
|
36671
|
+
if (typeof opt === 'function') {
|
|
36672
|
+
cb = opt;
|
|
36673
|
+
opt = {};
|
|
36674
|
+
}
|
|
36675
|
+
if (!opt)
|
|
36676
|
+
opt = {};
|
|
36677
|
+
|
|
36678
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
36679
|
+
const found = [];
|
|
36680
|
+
|
|
36681
|
+
const step = i => new Promise((resolve, reject) => {
|
|
36682
|
+
if (i === pathEnv.length)
|
|
36683
|
+
return opt.all && found.length ? resolve(found)
|
|
36684
|
+
: reject(getNotFoundError(cmd))
|
|
36685
|
+
|
|
36686
|
+
const ppRaw = pathEnv[i];
|
|
36687
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
36688
|
+
|
|
36689
|
+
const pCmd = path$2.join(pathPart, cmd);
|
|
36690
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
|
|
36691
|
+
: pCmd;
|
|
36692
|
+
|
|
36693
|
+
resolve(subStep(p, i, 0));
|
|
36694
|
+
});
|
|
36695
|
+
|
|
36696
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
36697
|
+
if (ii === pathExt.length)
|
|
36698
|
+
return resolve(step(i + 1))
|
|
36699
|
+
const ext = pathExt[ii];
|
|
36700
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
36701
|
+
if (!er && is) {
|
|
36702
|
+
if (opt.all)
|
|
36703
|
+
found.push(p + ext);
|
|
36704
|
+
else
|
|
36705
|
+
return resolve(p + ext)
|
|
36706
|
+
}
|
|
36707
|
+
return resolve(subStep(p, i, ii + 1))
|
|
36708
|
+
});
|
|
36709
|
+
});
|
|
36710
|
+
|
|
36711
|
+
return cb ? step(0).then(res => cb(null, res), cb) : step(0)
|
|
36712
|
+
};
|
|
36713
|
+
|
|
36714
|
+
const whichSync = (cmd, opt) => {
|
|
36715
|
+
opt = opt || {};
|
|
36716
|
+
|
|
36717
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
36718
|
+
const found = [];
|
|
36719
|
+
|
|
36720
|
+
for (let i = 0; i < pathEnv.length; i ++) {
|
|
36721
|
+
const ppRaw = pathEnv[i];
|
|
36722
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
36723
|
+
|
|
36724
|
+
const pCmd = path$2.join(pathPart, cmd);
|
|
36725
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
|
|
36726
|
+
: pCmd;
|
|
36727
|
+
|
|
36728
|
+
for (let j = 0; j < pathExt.length; j ++) {
|
|
36729
|
+
const cur = p + pathExt[j];
|
|
36730
|
+
try {
|
|
36731
|
+
const is = isexe.sync(cur, { pathExt: pathExtExe });
|
|
36732
|
+
if (is) {
|
|
36733
|
+
if (opt.all)
|
|
36734
|
+
found.push(cur);
|
|
36735
|
+
else
|
|
36736
|
+
return cur
|
|
36737
|
+
}
|
|
36738
|
+
} catch (ex) {}
|
|
36739
|
+
}
|
|
36740
|
+
}
|
|
36741
|
+
|
|
36742
|
+
if (opt.all && found.length)
|
|
36743
|
+
return found
|
|
36744
|
+
|
|
36745
|
+
if (opt.nothrow)
|
|
36746
|
+
return null
|
|
36747
|
+
|
|
36748
|
+
throw getNotFoundError(cmd)
|
|
36749
|
+
};
|
|
36750
|
+
|
|
36751
|
+
var which_1 = which$1;
|
|
36752
|
+
which$1.sync = whichSync;
|
|
36753
|
+
|
|
36754
|
+
var pathKey$1 = {exports: {}};
|
|
36755
|
+
|
|
36756
|
+
const pathKey = (options = {}) => {
|
|
36757
|
+
const environment = options.env || process.env;
|
|
36758
|
+
const platform = options.platform || process.platform;
|
|
36759
|
+
|
|
36760
|
+
if (platform !== 'win32') {
|
|
36761
|
+
return 'PATH';
|
|
36762
|
+
}
|
|
36763
|
+
|
|
36764
|
+
return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';
|
|
36765
|
+
};
|
|
36766
|
+
|
|
36767
|
+
pathKey$1.exports = pathKey;
|
|
36768
|
+
// TODO: Remove this for the next major release
|
|
36769
|
+
pathKey$1.exports.default = pathKey;
|
|
36770
|
+
|
|
36771
|
+
const path$1 = path__default["default"];
|
|
36772
|
+
const which = which_1;
|
|
36773
|
+
const getPathKey = pathKey$1.exports;
|
|
36774
|
+
|
|
36775
|
+
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
36776
|
+
const env = parsed.options.env || process.env;
|
|
36777
|
+
const cwd = process.cwd();
|
|
36778
|
+
const hasCustomCwd = parsed.options.cwd != null;
|
|
36779
|
+
// Worker threads do not have process.chdir()
|
|
36780
|
+
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;
|
|
36781
|
+
|
|
36782
|
+
// If a custom `cwd` was specified, we need to change the process cwd
|
|
36783
|
+
// because `which` will do stat calls but does not support a custom cwd
|
|
36784
|
+
if (shouldSwitchCwd) {
|
|
36785
|
+
try {
|
|
36786
|
+
process.chdir(parsed.options.cwd);
|
|
36787
|
+
} catch (err) {
|
|
36788
|
+
/* Empty */
|
|
36789
|
+
}
|
|
36790
|
+
}
|
|
36791
|
+
|
|
36792
|
+
let resolved;
|
|
36793
|
+
|
|
36794
|
+
try {
|
|
36795
|
+
resolved = which.sync(parsed.command, {
|
|
36796
|
+
path: env[getPathKey({ env })],
|
|
36797
|
+
pathExt: withoutPathExt ? path$1.delimiter : undefined,
|
|
36798
|
+
});
|
|
36799
|
+
} catch (e) {
|
|
36800
|
+
/* Empty */
|
|
36801
|
+
} finally {
|
|
36802
|
+
if (shouldSwitchCwd) {
|
|
36803
|
+
process.chdir(cwd);
|
|
36804
|
+
}
|
|
36805
|
+
}
|
|
36806
|
+
|
|
36807
|
+
// If we successfully resolved, ensure that an absolute path is returned
|
|
36808
|
+
// Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it
|
|
36809
|
+
if (resolved) {
|
|
36810
|
+
resolved = path$1.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
|
|
36811
|
+
}
|
|
36812
|
+
|
|
36813
|
+
return resolved;
|
|
36814
|
+
}
|
|
36815
|
+
|
|
36816
|
+
function resolveCommand$1(parsed) {
|
|
36817
|
+
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
36818
|
+
}
|
|
36819
|
+
|
|
36820
|
+
var resolveCommand_1 = resolveCommand$1;
|
|
36821
|
+
|
|
36822
|
+
var _escape = {};
|
|
36823
|
+
|
|
36824
|
+
// See http://www.robvanderwoude.com/escapechars.php
|
|
36825
|
+
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
36826
|
+
|
|
36827
|
+
function escapeCommand(arg) {
|
|
36828
|
+
// Escape meta chars
|
|
36829
|
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
|
36830
|
+
|
|
36831
|
+
return arg;
|
|
36832
|
+
}
|
|
36833
|
+
|
|
36834
|
+
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
36835
|
+
// Convert to string
|
|
36836
|
+
arg = `${arg}`;
|
|
36837
|
+
|
|
36838
|
+
// Algorithm below is based on https://qntm.org/cmd
|
|
36839
|
+
|
|
36840
|
+
// Sequence of backslashes followed by a double quote:
|
|
36841
|
+
// double up all the backslashes and escape the double quote
|
|
36842
|
+
arg = arg.replace(/(\\*)"/g, '$1$1\\"');
|
|
36843
|
+
|
|
36844
|
+
// Sequence of backslashes followed by the end of the string
|
|
36845
|
+
// (which will become a double quote later):
|
|
36846
|
+
// double up all the backslashes
|
|
36847
|
+
arg = arg.replace(/(\\*)$/, '$1$1');
|
|
36848
|
+
|
|
36849
|
+
// All other backslashes occur literally
|
|
36850
|
+
|
|
36851
|
+
// Quote the whole thing:
|
|
36852
|
+
arg = `"${arg}"`;
|
|
36853
|
+
|
|
36854
|
+
// Escape meta chars
|
|
36855
|
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
|
36856
|
+
|
|
36857
|
+
// Double escape meta chars if necessary
|
|
36858
|
+
if (doubleEscapeMetaChars) {
|
|
36859
|
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
|
36860
|
+
}
|
|
36861
|
+
|
|
36862
|
+
return arg;
|
|
36863
|
+
}
|
|
36864
|
+
|
|
36865
|
+
_escape.command = escapeCommand;
|
|
36866
|
+
_escape.argument = escapeArgument;
|
|
36867
|
+
|
|
36868
|
+
var shebangRegex$1 = /^#!(.*)/;
|
|
36869
|
+
|
|
36870
|
+
const shebangRegex = shebangRegex$1;
|
|
36871
|
+
|
|
36872
|
+
var shebangCommand$1 = (string = '') => {
|
|
36873
|
+
const match = string.match(shebangRegex);
|
|
36874
|
+
|
|
36875
|
+
if (!match) {
|
|
36876
|
+
return null;
|
|
36877
|
+
}
|
|
36878
|
+
|
|
36879
|
+
const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
|
|
36880
|
+
const binary = path.split('/').pop();
|
|
36881
|
+
|
|
36882
|
+
if (binary === 'env') {
|
|
36883
|
+
return argument;
|
|
36884
|
+
}
|
|
36885
|
+
|
|
36886
|
+
return argument ? `${binary} ${argument}` : binary;
|
|
36887
|
+
};
|
|
36888
|
+
|
|
36889
|
+
const fs = require$$0__default$2["default"];
|
|
36890
|
+
const shebangCommand = shebangCommand$1;
|
|
36891
|
+
|
|
36892
|
+
function readShebang$1(command) {
|
|
36893
|
+
// Read the first 150 bytes from the file
|
|
36894
|
+
const size = 150;
|
|
36895
|
+
const buffer = Buffer.alloc(size);
|
|
36896
|
+
|
|
36897
|
+
let fd;
|
|
36898
|
+
|
|
36899
|
+
try {
|
|
36900
|
+
fd = fs.openSync(command, 'r');
|
|
36901
|
+
fs.readSync(fd, buffer, 0, size, 0);
|
|
36902
|
+
fs.closeSync(fd);
|
|
36903
|
+
} catch (e) { /* Empty */ }
|
|
36904
|
+
|
|
36905
|
+
// Attempt to extract shebang (null is returned if not a shebang)
|
|
36906
|
+
return shebangCommand(buffer.toString());
|
|
36907
|
+
}
|
|
36908
|
+
|
|
36909
|
+
var readShebang_1 = readShebang$1;
|
|
36910
|
+
|
|
36911
|
+
const path = path__default["default"];
|
|
36912
|
+
const resolveCommand = resolveCommand_1;
|
|
36913
|
+
const escape = _escape;
|
|
36914
|
+
const readShebang = readShebang_1;
|
|
36915
|
+
|
|
36916
|
+
const isWin$2 = process.platform === 'win32';
|
|
36917
|
+
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
36918
|
+
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
36919
|
+
|
|
36920
|
+
function detectShebang(parsed) {
|
|
36921
|
+
parsed.file = resolveCommand(parsed);
|
|
36922
|
+
|
|
36923
|
+
const shebang = parsed.file && readShebang(parsed.file);
|
|
36924
|
+
|
|
36925
|
+
if (shebang) {
|
|
36926
|
+
parsed.args.unshift(parsed.file);
|
|
36927
|
+
parsed.command = shebang;
|
|
36928
|
+
|
|
36929
|
+
return resolveCommand(parsed);
|
|
36930
|
+
}
|
|
36931
|
+
|
|
36932
|
+
return parsed.file;
|
|
36933
|
+
}
|
|
36934
|
+
|
|
36935
|
+
function parseNonShell(parsed) {
|
|
36936
|
+
if (!isWin$2) {
|
|
36937
|
+
return parsed;
|
|
36938
|
+
}
|
|
36939
|
+
|
|
36940
|
+
// Detect & add support for shebangs
|
|
36941
|
+
const commandFile = detectShebang(parsed);
|
|
36942
|
+
|
|
36943
|
+
// We don't need a shell if the command filename is an executable
|
|
36944
|
+
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
36945
|
+
|
|
36946
|
+
// If a shell is required, use cmd.exe and take care of escaping everything correctly
|
|
36947
|
+
// Note that `forceShell` is an hidden option used only in tests
|
|
36948
|
+
if (parsed.options.forceShell || needsShell) {
|
|
36949
|
+
// Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
|
|
36950
|
+
// The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
|
|
36951
|
+
// Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
|
|
36952
|
+
// we need to double escape them
|
|
36953
|
+
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
36954
|
+
|
|
36955
|
+
// Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
|
|
36956
|
+
// This is necessary otherwise it will always fail with ENOENT in those cases
|
|
36957
|
+
parsed.command = path.normalize(parsed.command);
|
|
36958
|
+
|
|
36959
|
+
// Escape command & arguments
|
|
36960
|
+
parsed.command = escape.command(parsed.command);
|
|
36961
|
+
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
36962
|
+
|
|
36963
|
+
const shellCommand = [parsed.command].concat(parsed.args).join(' ');
|
|
36964
|
+
|
|
36965
|
+
parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
|
|
36966
|
+
parsed.command = process.env.comspec || 'cmd.exe';
|
|
36967
|
+
parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
|
|
36968
|
+
}
|
|
36969
|
+
|
|
36970
|
+
return parsed;
|
|
36971
|
+
}
|
|
36972
|
+
|
|
36973
|
+
function parse$8(command, args, options) {
|
|
36974
|
+
// Normalize arguments, similar to nodejs
|
|
36975
|
+
if (args && !Array.isArray(args)) {
|
|
36976
|
+
options = args;
|
|
36977
|
+
args = null;
|
|
36978
|
+
}
|
|
36979
|
+
|
|
36980
|
+
args = args ? args.slice(0) : []; // Clone array to avoid changing the original
|
|
36981
|
+
options = Object.assign({}, options); // Clone object to avoid changing the original
|
|
36982
|
+
|
|
36983
|
+
// Build our parsed object
|
|
36984
|
+
const parsed = {
|
|
36985
|
+
command,
|
|
36986
|
+
args,
|
|
36987
|
+
options,
|
|
36988
|
+
file: undefined,
|
|
36989
|
+
original: {
|
|
36990
|
+
command,
|
|
36991
|
+
args,
|
|
36992
|
+
},
|
|
36993
|
+
};
|
|
36994
|
+
|
|
36995
|
+
// Delegate further parsing to shell or non-shell
|
|
36996
|
+
return options.shell ? parsed : parseNonShell(parsed);
|
|
36997
|
+
}
|
|
36998
|
+
|
|
36999
|
+
var parse_1 = parse$8;
|
|
37000
|
+
|
|
37001
|
+
const isWin$1 = process.platform === 'win32';
|
|
37002
|
+
|
|
37003
|
+
function notFoundError(original, syscall) {
|
|
37004
|
+
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
37005
|
+
code: 'ENOENT',
|
|
37006
|
+
errno: 'ENOENT',
|
|
37007
|
+
syscall: `${syscall} ${original.command}`,
|
|
37008
|
+
path: original.command,
|
|
37009
|
+
spawnargs: original.args,
|
|
37010
|
+
});
|
|
37011
|
+
}
|
|
37012
|
+
|
|
37013
|
+
function hookChildProcess(cp, parsed) {
|
|
37014
|
+
if (!isWin$1) {
|
|
37015
|
+
return;
|
|
37016
|
+
}
|
|
37017
|
+
|
|
37018
|
+
const originalEmit = cp.emit;
|
|
37019
|
+
|
|
37020
|
+
cp.emit = function (name, arg1) {
|
|
37021
|
+
// If emitting "exit" event and exit code is 1, we need to check if
|
|
37022
|
+
// the command exists and emit an "error" instead
|
|
37023
|
+
// See https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
|
37024
|
+
if (name === 'exit') {
|
|
37025
|
+
const err = verifyENOENT(arg1, parsed);
|
|
37026
|
+
|
|
37027
|
+
if (err) {
|
|
37028
|
+
return originalEmit.call(cp, 'error', err);
|
|
37029
|
+
}
|
|
37030
|
+
}
|
|
37031
|
+
|
|
37032
|
+
return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
|
|
37033
|
+
};
|
|
37034
|
+
}
|
|
37035
|
+
|
|
37036
|
+
function verifyENOENT(status, parsed) {
|
|
37037
|
+
if (isWin$1 && status === 1 && !parsed.file) {
|
|
37038
|
+
return notFoundError(parsed.original, 'spawn');
|
|
37039
|
+
}
|
|
37040
|
+
|
|
37041
|
+
return null;
|
|
37042
|
+
}
|
|
37043
|
+
|
|
37044
|
+
function verifyENOENTSync(status, parsed) {
|
|
37045
|
+
if (isWin$1 && status === 1 && !parsed.file) {
|
|
37046
|
+
return notFoundError(parsed.original, 'spawnSync');
|
|
37047
|
+
}
|
|
37048
|
+
|
|
37049
|
+
return null;
|
|
37050
|
+
}
|
|
37051
|
+
|
|
37052
|
+
var enoent$1 = {
|
|
37053
|
+
hookChildProcess,
|
|
37054
|
+
verifyENOENT,
|
|
37055
|
+
verifyENOENTSync,
|
|
37056
|
+
notFoundError,
|
|
37057
|
+
};
|
|
37058
|
+
|
|
37059
|
+
const cp = require$$0__default$7["default"];
|
|
37060
|
+
const parse$7 = parse_1;
|
|
37061
|
+
const enoent = enoent$1;
|
|
37062
|
+
|
|
37063
|
+
function spawn(command, args, options) {
|
|
37064
|
+
// Parse the arguments
|
|
37065
|
+
const parsed = parse$7(command, args, options);
|
|
37066
|
+
|
|
37067
|
+
// Spawn the child process
|
|
37068
|
+
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
37069
|
+
|
|
37070
|
+
// Hook into child process "exit" event to emit an error if the command
|
|
37071
|
+
// does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
|
37072
|
+
enoent.hookChildProcess(spawned, parsed);
|
|
37073
|
+
|
|
37074
|
+
return spawned;
|
|
37075
|
+
}
|
|
37076
|
+
|
|
37077
|
+
function spawnSync(command, args, options) {
|
|
37078
|
+
// Parse the arguments
|
|
37079
|
+
const parsed = parse$7(command, args, options);
|
|
37080
|
+
|
|
37081
|
+
// Spawn the child process
|
|
37082
|
+
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
37083
|
+
|
|
37084
|
+
// Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
|
37085
|
+
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
37086
|
+
|
|
37087
|
+
return result;
|
|
37088
|
+
}
|
|
37089
|
+
|
|
37090
|
+
crossSpawn.exports = spawn;
|
|
37091
|
+
var spawn_1 = crossSpawn.exports.spawn = spawn;
|
|
37092
|
+
crossSpawn.exports.sync = spawnSync;
|
|
37093
|
+
|
|
37094
|
+
crossSpawn.exports._parse = parse$7;
|
|
37095
|
+
crossSpawn.exports._enoent = enoent;
|
|
37096
|
+
|
|
37097
|
+
function getGitTimestamp(file) {
|
|
37098
|
+
return new Promise((resolve, reject) => {
|
|
37099
|
+
const child = spawn_1("git", ["log", "-1", '--pretty="%ci"', file]);
|
|
37100
|
+
let output = "";
|
|
37101
|
+
child.stdout.on("data", (d) => output += String(d));
|
|
37102
|
+
child.on("close", () => {
|
|
37103
|
+
resolve(+new Date(output));
|
|
37104
|
+
});
|
|
37105
|
+
child.on("error", reject);
|
|
37106
|
+
});
|
|
37107
|
+
}
|
|
37108
|
+
|
|
36481
37109
|
const debug$2 = _debug("vitepress:md");
|
|
36482
37110
|
const cache = new lruCache({ max: 1024 });
|
|
36483
37111
|
const includesRE = /<!--\s*@include:\s*(.*?)\s*-->/g;
|
|
36484
|
-
function createMarkdownToVueRenderFn(srcDir, options = {}, pages, userDefines, isBuild = false) {
|
|
37112
|
+
function createMarkdownToVueRenderFn(srcDir, options = {}, pages, userDefines, isBuild = false, includeLastUpdatedData = false) {
|
|
36485
37113
|
const md = createMarkdownRenderer(srcDir, options);
|
|
36486
37114
|
pages = pages.map((p) => slash(p.replace(/\.md$/, "")));
|
|
36487
37115
|
const userDefineRegex = userDefines ? new RegExp(`\\b(${Object.keys(userDefines).map((key) => key.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&")).join("|")})`, "g") : null;
|
|
36488
|
-
return (src, file, publicDir) => {
|
|
37116
|
+
return async (src, file, publicDir) => {
|
|
36489
37117
|
const relativePath = slash(path__default["default"].relative(srcDir, file));
|
|
36490
37118
|
const dir = path__default["default"].dirname(file);
|
|
36491
37119
|
const cached = cache.get(src);
|
|
@@ -36497,7 +37125,7 @@ function createMarkdownToVueRenderFn(srcDir, options = {}, pages, userDefines, i
|
|
|
36497
37125
|
let includes = [];
|
|
36498
37126
|
src = src.replace(includesRE, (_, m1) => {
|
|
36499
37127
|
const includePath = path__default["default"].join(dir, m1);
|
|
36500
|
-
const content2 =
|
|
37128
|
+
const content2 = require$$0__default$2["default"].readFileSync(includePath, "utf-8");
|
|
36501
37129
|
includes.push(slash(includePath));
|
|
36502
37130
|
return content2;
|
|
36503
37131
|
});
|
|
@@ -36529,7 +37157,7 @@ function createMarkdownToVueRenderFn(srcDir, options = {}, pages, userDefines, i
|
|
|
36529
37157
|
if (url.endsWith("/"))
|
|
36530
37158
|
url += `index`;
|
|
36531
37159
|
const resolved = decodeURIComponent(slash(url.startsWith("/") ? url.slice(1) : path__default["default"].relative(srcDir, path__default["default"].resolve(dir2, url))));
|
|
36532
|
-
if (!pages.includes(resolved) && !
|
|
37160
|
+
if (!pages.includes(resolved) && !require$$0__default$2["default"].existsSync(path__default["default"].resolve(dir2, publicDir, `${resolved}.html`))) {
|
|
36533
37161
|
recordDeadLink(url);
|
|
36534
37162
|
}
|
|
36535
37163
|
}
|
|
@@ -36539,9 +37167,11 @@ function createMarkdownToVueRenderFn(srcDir, options = {}, pages, userDefines, i
|
|
|
36539
37167
|
description: inferDescription(frontmatter),
|
|
36540
37168
|
frontmatter,
|
|
36541
37169
|
headers: data.headers || [],
|
|
36542
|
-
relativePath
|
|
36543
|
-
lastUpdated: Math.round(fs__default["default"].statSync(file).mtimeMs)
|
|
37170
|
+
relativePath
|
|
36544
37171
|
};
|
|
37172
|
+
if (includeLastUpdatedData) {
|
|
37173
|
+
pageData.lastUpdated = await getGitTimestamp(file);
|
|
37174
|
+
}
|
|
36545
37175
|
const vueSrc = genPageDataCode(data.hoistedTags || [], pageData).join("\n") + `
|
|
36546
37176
|
<template><div>${html}</div></template>`;
|
|
36547
37177
|
debug$2(`[render] ${file} in ${Date.now() - start}ms.`);
|
|
@@ -36633,7 +37263,7 @@ const staticDataPlugin = {
|
|
|
36633
37263
|
_resolve = r;
|
|
36634
37264
|
});
|
|
36635
37265
|
}
|
|
36636
|
-
const base = path$
|
|
37266
|
+
const base = path$s.dirname(id);
|
|
36637
37267
|
let pattern;
|
|
36638
37268
|
let loader;
|
|
36639
37269
|
const existing = idToLoaderModulesMap[id];
|
|
@@ -36676,7 +37306,7 @@ const staticDataPlugin = {
|
|
|
36676
37306
|
if (isLoaderFile) {
|
|
36677
37307
|
delete idToLoaderModulesMap[id];
|
|
36678
37308
|
}
|
|
36679
|
-
if (isLoaderFile || pattern && micromatch_1.isMatch(path$
|
|
37309
|
+
if (isLoaderFile || pattern && micromatch_1.isMatch(path$s.relative(base, ctx.file), pattern)) {
|
|
36680
37310
|
ctx.modules.push(server.moduleGraph.getModuleById(id));
|
|
36681
37311
|
}
|
|
36682
37312
|
}
|
|
@@ -36738,7 +37368,7 @@ function createVitePressPlugin(root, siteConfig, ssr = false, pageToHashMap, cli
|
|
|
36738
37368
|
name: "vitepress",
|
|
36739
37369
|
configResolved(resolvedConfig) {
|
|
36740
37370
|
config = resolvedConfig;
|
|
36741
|
-
markdownToVue = createMarkdownToVueRenderFn(srcDir, markdown, pages, config.define, config.command === "build");
|
|
37371
|
+
markdownToVue = createMarkdownToVueRenderFn(srcDir, markdown, pages, config.define, config.command === "build", siteConfig.lastUpdated);
|
|
36742
37372
|
},
|
|
36743
37373
|
config() {
|
|
36744
37374
|
var _a, _b;
|
|
@@ -36777,11 +37407,11 @@ function createVitePressPlugin(root, siteConfig, ssr = false, pageToHashMap, cli
|
|
|
36777
37407
|
return `export default ${JSON.stringify(JSON.stringify(data))}`;
|
|
36778
37408
|
}
|
|
36779
37409
|
},
|
|
36780
|
-
transform(code, id) {
|
|
37410
|
+
async transform(code, id) {
|
|
36781
37411
|
if (id.endsWith(".vue")) {
|
|
36782
37412
|
return processClientJS(code, id);
|
|
36783
37413
|
} else if (id.endsWith(".md")) {
|
|
36784
|
-
const { vueSrc, deadLinks, includes } = markdownToVue(code, id, config.publicDir);
|
|
37414
|
+
const { vueSrc, deadLinks, includes } = await markdownToVue(code, id, config.publicDir);
|
|
36785
37415
|
if (deadLinks.length) {
|
|
36786
37416
|
hasDeadLinks = true;
|
|
36787
37417
|
}
|
|
@@ -36867,7 +37497,7 @@ function createVitePressPlugin(root, siteConfig, ssr = false, pageToHashMap, cli
|
|
|
36867
37497
|
}
|
|
36868
37498
|
if (file.endsWith(".md")) {
|
|
36869
37499
|
const content = await read();
|
|
36870
|
-
const { pageData, vueSrc } = markdownToVue(content, file, config.publicDir);
|
|
37500
|
+
const { pageData, vueSrc } = await markdownToVue(content, file, config.publicDir);
|
|
36871
37501
|
server.ws.send({
|
|
36872
37502
|
type: "custom",
|
|
36873
37503
|
event: "vitepress:pageData",
|
|
@@ -37035,7 +37665,7 @@ if (typeof process$1 !== 'object' || !process$1) {
|
|
|
37035
37665
|
var signals = signals$1.exports;
|
|
37036
37666
|
var isWin = /^win/i.test(process$1.platform);
|
|
37037
37667
|
|
|
37038
|
-
var EE = require$$0__default$
|
|
37668
|
+
var EE = require$$0__default$6["default"];
|
|
37039
37669
|
/* istanbul ignore if */
|
|
37040
37670
|
if (typeof EE !== 'function') {
|
|
37041
37671
|
EE = EE.EventEmitter;
|
|
@@ -39178,7 +39808,7 @@ if (typeof Object.create === 'function') {
|
|
|
39178
39808
|
}
|
|
39179
39809
|
|
|
39180
39810
|
try {
|
|
39181
|
-
var util = require$$0__default$
|
|
39811
|
+
var util = require$$0__default$3["default"];
|
|
39182
39812
|
/* istanbul ignore next */
|
|
39183
39813
|
if (typeof util.inherits !== 'function') throw '';
|
|
39184
39814
|
inherits$1.exports = util.inherits;
|
|
@@ -39187,7 +39817,7 @@ try {
|
|
|
39187
39817
|
inherits$1.exports = inherits_browser.exports;
|
|
39188
39818
|
}
|
|
39189
39819
|
|
|
39190
|
-
const { Buffer: Buffer$2 } = require$$0__default$
|
|
39820
|
+
const { Buffer: Buffer$2 } = require$$0__default$8["default"];
|
|
39191
39821
|
const symbol = Symbol.for('BufferList');
|
|
39192
39822
|
|
|
39193
39823
|
function BufferList$1 (buf) {
|
|
@@ -39665,7 +40295,7 @@ bl.exports = BufferListStream$1;
|
|
|
39665
40295
|
bl.exports.BufferListStream = BufferListStream$1;
|
|
39666
40296
|
bl.exports.BufferList = BufferList;
|
|
39667
40297
|
|
|
39668
|
-
const readline = require$$0__default$
|
|
40298
|
+
const readline = require$$0__default$9["default"];
|
|
39669
40299
|
const chalk = source;
|
|
39670
40300
|
const cliCursor = cliCursor$1;
|
|
39671
40301
|
const cliSpinners = cliSpinners$1.exports;
|
|
@@ -40370,6 +41000,7 @@ async function build(root, buildOptions = {}) {
|
|
|
40370
41000
|
spinner.stopAndPersist({
|
|
40371
41001
|
symbol: okMark
|
|
40372
41002
|
});
|
|
41003
|
+
lib$1.writeJSONSync(path__default["default"].join(siteConfig.outDir, "hashmap.json"), pageToHashMap);
|
|
40373
41004
|
} finally {
|
|
40374
41005
|
await lib$1.remove(siteConfig.tempDir);
|
|
40375
41006
|
}
|
|
@@ -40416,15 +41047,15 @@ function parse$6(req) {
|
|
|
40416
41047
|
}
|
|
40417
41048
|
|
|
40418
41049
|
function list(dir, callback, pre='') {
|
|
40419
|
-
dir = path$
|
|
40420
|
-
let arr =
|
|
41050
|
+
dir = path$s.resolve('.', dir);
|
|
41051
|
+
let arr = require$$0$8.readdirSync(dir);
|
|
40421
41052
|
let i=0, abs, stats;
|
|
40422
41053
|
for (; i < arr.length; i++) {
|
|
40423
|
-
abs = path$
|
|
40424
|
-
stats =
|
|
41054
|
+
abs = path$s.join(dir, arr[i]);
|
|
41055
|
+
stats = require$$0$8.statSync(abs);
|
|
40425
41056
|
stats.isDirectory()
|
|
40426
|
-
? list(abs, callback, path$
|
|
40427
|
-
: callback(path$
|
|
41057
|
+
? list(abs, callback, path$s.join(pre, arr[i]))
|
|
41058
|
+
: callback(path$s.join(pre, arr[i]), abs, stats);
|
|
40428
41059
|
}
|
|
40429
41060
|
}
|
|
40430
41061
|
|
|
@@ -40564,9 +41195,9 @@ function viaLocal(dir, isEtag, uri, extns) {
|
|
|
40564
41195
|
let i=0, arr=toAssume(uri, extns);
|
|
40565
41196
|
let abs, stats, name, headers;
|
|
40566
41197
|
for (; i < arr.length; i++) {
|
|
40567
|
-
abs = path$
|
|
40568
|
-
if (abs.startsWith(dir) &&
|
|
40569
|
-
stats =
|
|
41198
|
+
abs = path$s.normalize(path$s.join(dir, name=arr[i]));
|
|
41199
|
+
if (abs.startsWith(dir) && require$$0__namespace.existsSync(abs)) {
|
|
41200
|
+
stats = require$$0__namespace.statSync(abs);
|
|
40570
41201
|
if (stats.isDirectory()) continue;
|
|
40571
41202
|
headers = toHeaders(name, stats, isEtag);
|
|
40572
41203
|
headers['Cache-Control'] = isEtag ? 'no-cache' : 'no-store';
|
|
@@ -40610,7 +41241,7 @@ function send(req, res, file, stats, headers) {
|
|
|
40610
41241
|
}
|
|
40611
41242
|
|
|
40612
41243
|
res.writeHead(code, headers);
|
|
40613
|
-
|
|
41244
|
+
require$$0__namespace.createReadStream(file, opts).pipe(res);
|
|
40614
41245
|
}
|
|
40615
41246
|
|
|
40616
41247
|
function isEncoding(name, type, headers) {
|
|
@@ -40631,7 +41262,7 @@ function toHeaders(name, stats, isEtag) {
|
|
|
40631
41262
|
}
|
|
40632
41263
|
|
|
40633
41264
|
function sirv (dir, opts={}) {
|
|
40634
|
-
dir = path$
|
|
41265
|
+
dir = path$s.resolve(dir || '.');
|
|
40635
41266
|
|
|
40636
41267
|
let isNotFound = opts.onNoMatch || is404;
|
|
40637
41268
|
let setHeaders = opts.setHeaders || noop;
|
|
@@ -52682,7 +53313,7 @@ var safeBuffer = {exports: {}};
|
|
|
52682
53313
|
/* eslint-disable node/no-deprecated-api */
|
|
52683
53314
|
|
|
52684
53315
|
(function (module, exports) {
|
|
52685
|
-
var buffer = require$$0__default$
|
|
53316
|
+
var buffer = require$$0__default$8["default"];
|
|
52686
53317
|
var Buffer = buffer.Buffer;
|
|
52687
53318
|
|
|
52688
53319
|
// alternative to using Object.keys for old browsers
|
|
@@ -64151,8 +64782,8 @@ var node = {exports: {}};
|
|
|
64151
64782
|
*/
|
|
64152
64783
|
|
|
64153
64784
|
(function (module, exports) {
|
|
64154
|
-
var tty = require$$0__default$
|
|
64155
|
-
var util = require$$0__default$
|
|
64785
|
+
var tty = require$$0__default$4["default"];
|
|
64786
|
+
var util = require$$0__default$3["default"];
|
|
64156
64787
|
|
|
64157
64788
|
/**
|
|
64158
64789
|
* This is the Node.js implementation of `debug()`.
|
|
@@ -64332,7 +64963,7 @@ function createWritableStdioStream (fd) {
|
|
|
64332
64963
|
break;
|
|
64333
64964
|
|
|
64334
64965
|
case 'FILE':
|
|
64335
|
-
var fs =
|
|
64966
|
+
var fs = require$$0__default$2["default"];
|
|
64336
64967
|
stream = new fs.SyncWriteStream(fd, { autoClose: false });
|
|
64337
64968
|
stream._type = 'fs';
|
|
64338
64969
|
break;
|
|
@@ -65180,7 +65811,7 @@ var url = function (req) {
|
|
|
65180
65811
|
return (req._parsedUrl = obj);
|
|
65181
65812
|
};
|
|
65182
65813
|
|
|
65183
|
-
const http = require$$0__default$
|
|
65814
|
+
const http = require$$0__default$a["default"];
|
|
65184
65815
|
const Router = trouter;
|
|
65185
65816
|
const { parse } = qs__default["default"];
|
|
65186
65817
|
const parser = url;
|