socket 0.14.11 → 0.14.13
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/README.md +4 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +617 -430
- package/dist/npm-injection.js +9 -9
- package/dist/path-resolve.d.ts +3 -6
- package/dist/path-resolve.js +119 -70
- package/dist/vendor.js +184 -1368
- package/package.json +48 -27
package/dist/vendor.js
CHANGED
|
@@ -15,12 +15,8 @@ var require$$3 = require('semver');
|
|
|
15
15
|
var require$$2$5 = require('emoji-regex');
|
|
16
16
|
var require$$6 = require('ansi-align');
|
|
17
17
|
var require$$2$7 = require('signal-exit');
|
|
18
|
-
var require$$1$
|
|
19
|
-
var require$$
|
|
20
|
-
var require$$1$1 = require('node:stream');
|
|
21
|
-
var require$$2$8 = require('node:stream/promises');
|
|
22
|
-
var require$$4 = require('fast-glob');
|
|
23
|
-
var require$$2$9 = require('node:buffer');
|
|
18
|
+
var require$$1$1 = require('node:fs/promises');
|
|
19
|
+
var require$$2$8 = require('node:buffer');
|
|
24
20
|
|
|
25
21
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
26
22
|
function getAugmentedNamespace(n) {
|
|
@@ -69,7 +65,7 @@ function _typeof(o) {
|
|
|
69
65
|
Object.defineProperty(interopRequireWildcard, "__esModule", {
|
|
70
66
|
value: true
|
|
71
67
|
});
|
|
72
|
-
interopRequireWildcard.default = _interopRequireWildcard$
|
|
68
|
+
interopRequireWildcard.default = _interopRequireWildcard$1;
|
|
73
69
|
var _typeof2 = _typeof$1;
|
|
74
70
|
function _getRequireWildcardCache(e) {
|
|
75
71
|
if ("function" != typeof WeakMap) return null;
|
|
@@ -79,7 +75,7 @@ function _getRequireWildcardCache(e) {
|
|
|
79
75
|
return e ? t : r;
|
|
80
76
|
})(e);
|
|
81
77
|
}
|
|
82
|
-
function _interopRequireWildcard$
|
|
78
|
+
function _interopRequireWildcard$1(e, r) {
|
|
83
79
|
if (!r && e && e.__esModule) return e;
|
|
84
80
|
if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return {
|
|
85
81
|
"default": e
|
|
@@ -311,12 +307,12 @@ Object.defineProperty(supportsColor$3, "__esModule", {
|
|
|
311
307
|
});
|
|
312
308
|
supportsColor$3.createSupportsColor = createSupportsColor;
|
|
313
309
|
supportsColor$3.default = void 0;
|
|
314
|
-
var _nodeProcess$
|
|
310
|
+
var _nodeProcess$m = require$$0$2;
|
|
315
311
|
var _nodeOs$4 = require$$2$1;
|
|
316
312
|
var _nodeTty = require$$2;
|
|
317
313
|
// From: https://github.com/sindresorhus/has-flag/blob/main/index.js
|
|
318
314
|
/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
|
|
319
|
-
function hasFlag$3(flag, argv = globalThis.Deno ? globalThis.Deno.args : _nodeProcess$
|
|
315
|
+
function hasFlag$3(flag, argv = globalThis.Deno ? globalThis.Deno.args : _nodeProcess$m.argv) {
|
|
320
316
|
const prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
|
|
321
317
|
const position = argv.indexOf(prefix + flag);
|
|
322
318
|
const terminatorPosition = argv.indexOf('--');
|
|
@@ -324,7 +320,7 @@ function hasFlag$3(flag, argv = globalThis.Deno ? globalThis.Deno.args : _nodePr
|
|
|
324
320
|
}
|
|
325
321
|
const {
|
|
326
322
|
env: env$2
|
|
327
|
-
} = _nodeProcess$
|
|
323
|
+
} = _nodeProcess$m;
|
|
328
324
|
let flagForceColor;
|
|
329
325
|
if (hasFlag$3('no-color') || hasFlag$3('no-colors') || hasFlag$3('color=false') || hasFlag$3('color=never')) {
|
|
330
326
|
flagForceColor = 0;
|
|
@@ -386,7 +382,7 @@ function _supportsColor(haveStream, {
|
|
|
386
382
|
if (env$2.TERM === 'dumb') {
|
|
387
383
|
return min;
|
|
388
384
|
}
|
|
389
|
-
if (_nodeProcess$
|
|
385
|
+
if (_nodeProcess$m.platform === 'win32') {
|
|
390
386
|
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
|
391
387
|
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
|
392
388
|
const osRelease = _nodeOs$4.release().split('.');
|
|
@@ -455,13 +451,13 @@ const supportsColor$2 = {
|
|
|
455
451
|
};
|
|
456
452
|
supportsColor$3.default = supportsColor$2;
|
|
457
453
|
|
|
458
|
-
var utilities
|
|
454
|
+
var utilities = {};
|
|
459
455
|
|
|
460
|
-
Object.defineProperty(utilities
|
|
456
|
+
Object.defineProperty(utilities, "__esModule", {
|
|
461
457
|
value: true
|
|
462
458
|
});
|
|
463
|
-
utilities
|
|
464
|
-
utilities
|
|
459
|
+
utilities.stringEncaseCRLFWithFirstIndex = stringEncaseCRLFWithFirstIndex;
|
|
460
|
+
utilities.stringReplaceAll = stringReplaceAll;
|
|
465
461
|
// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
|
|
466
462
|
function stringReplaceAll(string, substring, replacer) {
|
|
467
463
|
let index = string.indexOf(substring);
|
|
@@ -551,7 +547,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
551
547
|
exports.supportsColorStderr = exports.supportsColor = void 0;
|
|
552
548
|
var _ansiStyles = ansiStyles$3;
|
|
553
549
|
var _supportsColor = supportsColor$3;
|
|
554
|
-
var _utilities = utilities
|
|
550
|
+
var _utilities = utilities;
|
|
555
551
|
var _index = ansiStyles$3;
|
|
556
552
|
const {
|
|
557
553
|
stdout: stdoutColor,
|
|
@@ -803,11 +799,11 @@ Object.defineProperty(constants$4, "__esModule", {
|
|
|
803
799
|
value: true
|
|
804
800
|
});
|
|
805
801
|
constants$4.NOOP = constants$4.LIMIT_FILES_DESCRIPTORS = constants$4.IS_USER_ROOT = void 0;
|
|
806
|
-
var _nodeProcess$
|
|
802
|
+
var _nodeProcess$l = require$$0$2;
|
|
807
803
|
/* IMPORT */
|
|
808
804
|
|
|
809
805
|
/* MAIN */
|
|
810
|
-
constants$4.IS_USER_ROOT = _nodeProcess$
|
|
806
|
+
constants$4.IS_USER_ROOT = _nodeProcess$l.getuid ? !_nodeProcess$l.getuid() : false;
|
|
811
807
|
constants$4.LIMIT_FILES_DESCRIPTORS = 10000; //TODO: Fetch the real limit from the filesystem, somehow
|
|
812
808
|
const NOOP$1 = () => undefined;
|
|
813
809
|
/* EXPORT */
|
|
@@ -973,7 +969,7 @@ Object.defineProperty(dist, "__esModule", {
|
|
|
973
969
|
value: true
|
|
974
970
|
});
|
|
975
971
|
dist.default = void 0;
|
|
976
|
-
var _nodeFs$
|
|
972
|
+
var _nodeFs$5 = require$$0$3;
|
|
977
973
|
var _nodeUtil$5 = require$$0$4;
|
|
978
974
|
var _attemptify = attemptify;
|
|
979
975
|
var _constants$7 = constants$4;
|
|
@@ -985,44 +981,44 @@ var _retryify = retryify;
|
|
|
985
981
|
const FS = {
|
|
986
982
|
attempt: {
|
|
987
983
|
/* ASYNC */
|
|
988
|
-
chmod: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
989
|
-
chown: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
990
|
-
close: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
991
|
-
fsync: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
992
|
-
mkdir: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
993
|
-
realpath: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
994
|
-
stat: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
995
|
-
unlink: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
984
|
+
chmod: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.chmod), _handlers.default.onChangeError),
|
|
985
|
+
chown: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.chown), _handlers.default.onChangeError),
|
|
986
|
+
close: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.close), _constants$7.NOOP),
|
|
987
|
+
fsync: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.fsync), _constants$7.NOOP),
|
|
988
|
+
mkdir: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.mkdir), _constants$7.NOOP),
|
|
989
|
+
realpath: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.realpath), _constants$7.NOOP),
|
|
990
|
+
stat: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.stat), _constants$7.NOOP),
|
|
991
|
+
unlink: (0, _attemptify.attemptifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.unlink), _constants$7.NOOP),
|
|
996
992
|
/* SYNC */
|
|
997
|
-
chmodSync: (0, _attemptify.attemptifySync)(_nodeFs$
|
|
998
|
-
chownSync: (0, _attemptify.attemptifySync)(_nodeFs$
|
|
999
|
-
closeSync: (0, _attemptify.attemptifySync)(_nodeFs$
|
|
1000
|
-
existsSync: (0, _attemptify.attemptifySync)(_nodeFs$
|
|
1001
|
-
fsyncSync: (0, _attemptify.attemptifySync)(_nodeFs$
|
|
1002
|
-
mkdirSync: (0, _attemptify.attemptifySync)(_nodeFs$
|
|
1003
|
-
realpathSync: (0, _attemptify.attemptifySync)(_nodeFs$
|
|
1004
|
-
statSync: (0, _attemptify.attemptifySync)(_nodeFs$
|
|
1005
|
-
unlinkSync: (0, _attemptify.attemptifySync)(_nodeFs$
|
|
993
|
+
chmodSync: (0, _attemptify.attemptifySync)(_nodeFs$5.chmodSync, _handlers.default.onChangeError),
|
|
994
|
+
chownSync: (0, _attemptify.attemptifySync)(_nodeFs$5.chownSync, _handlers.default.onChangeError),
|
|
995
|
+
closeSync: (0, _attemptify.attemptifySync)(_nodeFs$5.closeSync, _constants$7.NOOP),
|
|
996
|
+
existsSync: (0, _attemptify.attemptifySync)(_nodeFs$5.existsSync, _constants$7.NOOP),
|
|
997
|
+
fsyncSync: (0, _attemptify.attemptifySync)(_nodeFs$5.fsync, _constants$7.NOOP),
|
|
998
|
+
mkdirSync: (0, _attemptify.attemptifySync)(_nodeFs$5.mkdirSync, _constants$7.NOOP),
|
|
999
|
+
realpathSync: (0, _attemptify.attemptifySync)(_nodeFs$5.realpathSync, _constants$7.NOOP),
|
|
1000
|
+
statSync: (0, _attemptify.attemptifySync)(_nodeFs$5.statSync, _constants$7.NOOP),
|
|
1001
|
+
unlinkSync: (0, _attemptify.attemptifySync)(_nodeFs$5.unlinkSync, _constants$7.NOOP)
|
|
1006
1002
|
},
|
|
1007
1003
|
retry: {
|
|
1008
1004
|
/* ASYNC */
|
|
1009
|
-
close: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
1010
|
-
fsync: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
1011
|
-
open: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
1012
|
-
readFile: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
1013
|
-
rename: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
1014
|
-
stat: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
1015
|
-
write: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
1016
|
-
writeFile: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$
|
|
1005
|
+
close: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.close), _handlers.default.isRetriableError),
|
|
1006
|
+
fsync: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.fsync), _handlers.default.isRetriableError),
|
|
1007
|
+
open: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.open), _handlers.default.isRetriableError),
|
|
1008
|
+
readFile: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.readFile), _handlers.default.isRetriableError),
|
|
1009
|
+
rename: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.rename), _handlers.default.isRetriableError),
|
|
1010
|
+
stat: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.stat), _handlers.default.isRetriableError),
|
|
1011
|
+
write: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.write), _handlers.default.isRetriableError),
|
|
1012
|
+
writeFile: (0, _retryify.retryifyAsync)((0, _nodeUtil$5.promisify)(_nodeFs$5.writeFile), _handlers.default.isRetriableError),
|
|
1017
1013
|
/* SYNC */
|
|
1018
|
-
closeSync: (0, _retryify.retryifySync)(_nodeFs$
|
|
1019
|
-
fsyncSync: (0, _retryify.retryifySync)(_nodeFs$
|
|
1020
|
-
openSync: (0, _retryify.retryifySync)(_nodeFs$
|
|
1021
|
-
readFileSync: (0, _retryify.retryifySync)(_nodeFs$
|
|
1022
|
-
renameSync: (0, _retryify.retryifySync)(_nodeFs$
|
|
1023
|
-
statSync: (0, _retryify.retryifySync)(_nodeFs$
|
|
1024
|
-
writeSync: (0, _retryify.retryifySync)(_nodeFs$
|
|
1025
|
-
writeFileSync: (0, _retryify.retryifySync)(_nodeFs$
|
|
1014
|
+
closeSync: (0, _retryify.retryifySync)(_nodeFs$5.closeSync, _handlers.default.isRetriableError),
|
|
1015
|
+
fsyncSync: (0, _retryify.retryifySync)(_nodeFs$5.fsyncSync, _handlers.default.isRetriableError),
|
|
1016
|
+
openSync: (0, _retryify.retryifySync)(_nodeFs$5.openSync, _handlers.default.isRetriableError),
|
|
1017
|
+
readFileSync: (0, _retryify.retryifySync)(_nodeFs$5.readFileSync, _handlers.default.isRetriableError),
|
|
1018
|
+
renameSync: (0, _retryify.retryifySync)(_nodeFs$5.renameSync, _handlers.default.isRetriableError),
|
|
1019
|
+
statSync: (0, _retryify.retryifySync)(_nodeFs$5.statSync, _handlers.default.isRetriableError),
|
|
1020
|
+
writeSync: (0, _retryify.retryifySync)(_nodeFs$5.writeSync, _handlers.default.isRetriableError),
|
|
1021
|
+
writeFileSync: (0, _retryify.retryifySync)(_nodeFs$5.writeFileSync, _handlers.default.isRetriableError)
|
|
1026
1022
|
}
|
|
1027
1023
|
};
|
|
1028
1024
|
/* EXPORT */
|
|
@@ -1035,7 +1031,7 @@ Object.defineProperty(constants$3, "__esModule", {
|
|
|
1035
1031
|
});
|
|
1036
1032
|
constants$3.NOOP = constants$3.LIMIT_FILES_DESCRIPTORS = constants$3.LIMIT_BASENAME_LENGTH = constants$3.IS_USER_ROOT = constants$3.IS_POSIX = constants$3.DEFAULT_WRITE_OPTIONS = constants$3.DEFAULT_USER_UID = constants$3.DEFAULT_USER_GID = constants$3.DEFAULT_TIMEOUT_SYNC = constants$3.DEFAULT_TIMEOUT_ASYNC = constants$3.DEFAULT_READ_OPTIONS = constants$3.DEFAULT_FOLDER_MODE = constants$3.DEFAULT_FILE_MODE = constants$3.DEFAULT_ENCODING = void 0;
|
|
1037
1033
|
var _nodeOs$3 = require$$2$1;
|
|
1038
|
-
var _nodeProcess$
|
|
1034
|
+
var _nodeProcess$k = require$$0$2;
|
|
1039
1035
|
/* IMPORT */
|
|
1040
1036
|
|
|
1041
1037
|
/* MAIN */
|
|
@@ -1048,8 +1044,8 @@ constants$3.DEFAULT_USER_UID = _nodeOs$3.userInfo().uid;
|
|
|
1048
1044
|
constants$3.DEFAULT_USER_GID = _nodeOs$3.userInfo().gid;
|
|
1049
1045
|
constants$3.DEFAULT_TIMEOUT_ASYNC = 7500;
|
|
1050
1046
|
constants$3.DEFAULT_TIMEOUT_SYNC = 1000;
|
|
1051
|
-
constants$3.IS_POSIX = !!_nodeProcess$
|
|
1052
|
-
constants$3.IS_USER_ROOT = _nodeProcess$
|
|
1047
|
+
constants$3.IS_POSIX = !!_nodeProcess$k.getuid;
|
|
1048
|
+
constants$3.IS_USER_ROOT = _nodeProcess$k.getuid ? !_nodeProcess$k.getuid() : false;
|
|
1053
1049
|
constants$3.LIMIT_BASENAME_LENGTH = 128; //TODO: Fetch the real limit from the filesystem //TODO: Fetch the whole-path length limit too
|
|
1054
1050
|
constants$3.LIMIT_FILES_DESCRIPTORS = 10000; //TODO: Fetch the real limit from the filesystem
|
|
1055
1051
|
const NOOP = () => {};
|
|
@@ -1072,10 +1068,10 @@ const isFunction = value => {
|
|
|
1072
1068
|
return typeof value === 'function';
|
|
1073
1069
|
};
|
|
1074
1070
|
lang.isFunction = isFunction;
|
|
1075
|
-
const isString
|
|
1071
|
+
const isString = value => {
|
|
1076
1072
|
return typeof value === 'string';
|
|
1077
1073
|
};
|
|
1078
|
-
lang.isString = isString
|
|
1074
|
+
lang.isString = isString;
|
|
1079
1075
|
const isUndefined = value => {
|
|
1080
1076
|
return value === undefined;
|
|
1081
1077
|
};
|
|
@@ -1121,7 +1117,7 @@ scheduler.default = Scheduler;
|
|
|
1121
1117
|
|
|
1122
1118
|
var temp = {};
|
|
1123
1119
|
|
|
1124
|
-
var node
|
|
1120
|
+
var node = {};
|
|
1125
1121
|
|
|
1126
1122
|
var interceptor = {};
|
|
1127
1123
|
|
|
@@ -1131,12 +1127,12 @@ Object.defineProperty(constants$2, "__esModule", {
|
|
|
1131
1127
|
value: true
|
|
1132
1128
|
});
|
|
1133
1129
|
constants$2.IS_WINDOWS = constants$2.IS_LINUX = void 0;
|
|
1134
|
-
var _nodeProcess$
|
|
1130
|
+
var _nodeProcess$j = require$$0$2;
|
|
1135
1131
|
/* IMPORT */
|
|
1136
1132
|
|
|
1137
1133
|
/* MAIN */
|
|
1138
|
-
constants$2.IS_LINUX = _nodeProcess$
|
|
1139
|
-
constants$2.IS_WINDOWS = _nodeProcess$
|
|
1134
|
+
constants$2.IS_LINUX = _nodeProcess$j.platform === 'linux';
|
|
1135
|
+
constants$2.IS_WINDOWS = _nodeProcess$j.platform === 'win32';
|
|
1140
1136
|
|
|
1141
1137
|
var signals = {};
|
|
1142
1138
|
|
|
@@ -1163,7 +1159,7 @@ Object.defineProperty(interceptor, "__esModule", {
|
|
|
1163
1159
|
value: true
|
|
1164
1160
|
});
|
|
1165
1161
|
interceptor.default = void 0;
|
|
1166
|
-
var _nodeProcess$
|
|
1162
|
+
var _nodeProcess$i = require$$0$2;
|
|
1167
1163
|
var _constants$5 = constants$2;
|
|
1168
1164
|
var _signals = signals;
|
|
1169
1165
|
/* IMPORT */
|
|
@@ -1185,17 +1181,17 @@ class Interceptor {
|
|
|
1185
1181
|
if (signal) {
|
|
1186
1182
|
if (_constants$5.IS_WINDOWS && signal !== 'SIGINT' && signal !== 'SIGTERM' && signal !== 'SIGKILL') {
|
|
1187
1183
|
// Windows doesn't support POSIX signals, but Node emulates these 3 signals for us
|
|
1188
|
-
_nodeProcess$
|
|
1184
|
+
_nodeProcess$i.kill(_nodeProcess$i.pid, 'SIGTERM');
|
|
1189
1185
|
} else {
|
|
1190
|
-
_nodeProcess$
|
|
1186
|
+
_nodeProcess$i.kill(_nodeProcess$i.pid, signal);
|
|
1191
1187
|
}
|
|
1192
1188
|
}
|
|
1193
1189
|
};
|
|
1194
1190
|
this.hook = () => {
|
|
1195
|
-
_nodeProcess$
|
|
1191
|
+
_nodeProcess$i.once('exit', () => this.exit());
|
|
1196
1192
|
for (const signal of _signals.default) {
|
|
1197
1193
|
try {
|
|
1198
|
-
_nodeProcess$
|
|
1194
|
+
_nodeProcess$i.once(signal, () => this.exit(signal));
|
|
1199
1195
|
} catch {
|
|
1200
1196
|
// Sometimes "process.once" can throw...
|
|
1201
1197
|
}
|
|
@@ -1213,25 +1209,25 @@ class Interceptor {
|
|
|
1213
1209
|
/* EXPORT */
|
|
1214
1210
|
interceptor.default = new Interceptor();
|
|
1215
1211
|
|
|
1216
|
-
Object.defineProperty(node
|
|
1212
|
+
Object.defineProperty(node, "__esModule", {
|
|
1217
1213
|
value: true
|
|
1218
1214
|
});
|
|
1219
|
-
node
|
|
1215
|
+
node.default = void 0;
|
|
1220
1216
|
var _interceptor = interceptor;
|
|
1221
1217
|
/* IMPORT */
|
|
1222
1218
|
|
|
1223
1219
|
/* MAIN */
|
|
1224
1220
|
const whenExit = _interceptor.default.register;
|
|
1225
1221
|
/* EXPORT */
|
|
1226
|
-
node
|
|
1222
|
+
node.default = whenExit;
|
|
1227
1223
|
|
|
1228
1224
|
Object.defineProperty(temp, "__esModule", {
|
|
1229
1225
|
value: true
|
|
1230
1226
|
});
|
|
1231
1227
|
temp.default = void 0;
|
|
1232
|
-
var _nodePath$
|
|
1228
|
+
var _nodePath$8 = require$$1;
|
|
1233
1229
|
var _stubbornFs$1 = dist;
|
|
1234
|
-
var _whenExit = node
|
|
1230
|
+
var _whenExit = node;
|
|
1235
1231
|
var _constants$4 = constants$3;
|
|
1236
1232
|
/* IMPORT */
|
|
1237
1233
|
|
|
@@ -1272,7 +1268,7 @@ const Temp = {
|
|
|
1272
1268
|
}
|
|
1273
1269
|
},
|
|
1274
1270
|
truncate: filePath => {
|
|
1275
|
-
const basename = _nodePath$
|
|
1271
|
+
const basename = _nodePath$8.basename(filePath);
|
|
1276
1272
|
if (basename.length <= _constants$4.LIMIT_BASENAME_LENGTH) return filePath; //FIXME: Rough and quick attempt at detecting ok lengths
|
|
1277
1273
|
const truncable = /^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(basename);
|
|
1278
1274
|
if (!truncable) return filePath; //FIXME: No truncable part detected, can't really do much without also changing the parent path, which is unsafe, hoping for the best here
|
|
@@ -1292,7 +1288,7 @@ dist$1.readFile = readFile;
|
|
|
1292
1288
|
dist$1.readFileSync = readFileSync;
|
|
1293
1289
|
dist$1.writeFile = writeFile;
|
|
1294
1290
|
dist$1.writeFileSync = writeFileSync;
|
|
1295
|
-
var _nodePath$
|
|
1291
|
+
var _nodePath$7 = require$$1;
|
|
1296
1292
|
var _stubbornFs = dist;
|
|
1297
1293
|
var _constants$3 = constants$3;
|
|
1298
1294
|
var _lang = lang;
|
|
@@ -1357,7 +1353,7 @@ async function writeFileAsync(filePath, data, options = _constants$3.DEFAULT_WRI
|
|
|
1357
1353
|
}
|
|
1358
1354
|
}
|
|
1359
1355
|
if (!filePathExists) {
|
|
1360
|
-
const parentPath = _nodePath$
|
|
1356
|
+
const parentPath = _nodePath$7.dirname(filePath);
|
|
1361
1357
|
await _stubbornFs.default.attempt.mkdir(parentPath, {
|
|
1362
1358
|
mode: _constants$3.DEFAULT_FOLDER_MODE,
|
|
1363
1359
|
recursive: true
|
|
@@ -1436,7 +1432,7 @@ function writeFileSync(filePath, data, options = _constants$3.DEFAULT_WRITE_OPTI
|
|
|
1436
1432
|
}
|
|
1437
1433
|
}
|
|
1438
1434
|
if (!filePathExists) {
|
|
1439
|
-
const parentPath = _nodePath$
|
|
1435
|
+
const parentPath = _nodePath$7.dirname(filePath);
|
|
1440
1436
|
_stubbornFs.default.attempt.mkdirSync(parentPath, {
|
|
1441
1437
|
mode: _constants$3.DEFAULT_FOLDER_MODE,
|
|
1442
1438
|
recursive: true
|
|
@@ -1766,16 +1762,16 @@ Object.defineProperty(configstore, "__esModule", {
|
|
|
1766
1762
|
value: true
|
|
1767
1763
|
});
|
|
1768
1764
|
configstore.default = void 0;
|
|
1769
|
-
var _nodePath$
|
|
1765
|
+
var _nodePath$6 = require$$1;
|
|
1770
1766
|
var _nodeOs$2 = require$$2$1;
|
|
1771
1767
|
var _gracefulFs = require$$2$2;
|
|
1772
1768
|
var _xdgBasedir$1 = xdgBasedir;
|
|
1773
1769
|
var _atomically = dist$1;
|
|
1774
1770
|
var _dotProp = dotProp;
|
|
1775
1771
|
function getConfigDirectory(id, globalConfigPath) {
|
|
1776
|
-
const pathPrefix = globalConfigPath ? _nodePath$
|
|
1777
|
-
const configDirectory = _xdgBasedir$1.xdgConfig ?? _gracefulFs.mkdtempSync(_gracefulFs.realpathSync(_nodeOs$2.tmpdir()) + _nodePath$
|
|
1778
|
-
return _nodePath$
|
|
1772
|
+
const pathPrefix = globalConfigPath ? _nodePath$6.join(id, 'config.json') : _nodePath$6.join('configstore', `${id}.json`);
|
|
1773
|
+
const configDirectory = _xdgBasedir$1.xdgConfig ?? _gracefulFs.mkdtempSync(_gracefulFs.realpathSync(_nodeOs$2.tmpdir()) + _nodePath$6.sep);
|
|
1774
|
+
return _nodePath$6.join(configDirectory, pathPrefix);
|
|
1779
1775
|
}
|
|
1780
1776
|
const permissionError = 'You don\'t have access to this file.';
|
|
1781
1777
|
const mkdirOptions = {
|
|
@@ -1820,7 +1816,7 @@ class Configstore {
|
|
|
1820
1816
|
set all(value) {
|
|
1821
1817
|
try {
|
|
1822
1818
|
// Make sure the folder exists as it could have been deleted in the meantime
|
|
1823
|
-
_gracefulFs.mkdirSync(_nodePath$
|
|
1819
|
+
_gracefulFs.mkdirSync(_nodePath$6.dirname(this._path), mkdirOptions);
|
|
1824
1820
|
(0, _atomically.writeFileSync)(this._path, JSON.stringify(value, undefined, '\t'), writeFileOptions);
|
|
1825
1821
|
} catch (error) {
|
|
1826
1822
|
// Improve the message of permission errors
|
|
@@ -2719,14 +2715,14 @@ async function timeout(request, init, abortController, options) {
|
|
|
2719
2715
|
});
|
|
2720
2716
|
}
|
|
2721
2717
|
|
|
2722
|
-
var delay$
|
|
2718
|
+
var delay$1 = {};
|
|
2723
2719
|
|
|
2724
|
-
Object.defineProperty(delay$
|
|
2720
|
+
Object.defineProperty(delay$1, "__esModule", {
|
|
2725
2721
|
value: true
|
|
2726
2722
|
});
|
|
2727
|
-
delay$
|
|
2723
|
+
delay$1.default = delay;
|
|
2728
2724
|
// https://github.com/sindresorhus/delay/tree/ab98ae8dfcb38e1593286c94d934e70d14a4e111
|
|
2729
|
-
async function delay
|
|
2725
|
+
async function delay(ms, {
|
|
2730
2726
|
signal
|
|
2731
2727
|
}) {
|
|
2732
2728
|
return new Promise((resolve, reject) => {
|
|
@@ -2774,7 +2770,7 @@ var _TimeoutError = TimeoutError$1;
|
|
|
2774
2770
|
var _merge = merge;
|
|
2775
2771
|
var _normalize = normalize;
|
|
2776
2772
|
var _timeout = timeout$1;
|
|
2777
|
-
var _delay = delay$
|
|
2773
|
+
var _delay = delay$1;
|
|
2778
2774
|
var _options$1 = options$1;
|
|
2779
2775
|
var _constants = constants;
|
|
2780
2776
|
class Ky {
|
|
@@ -3244,8 +3240,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3244
3240
|
value: true
|
|
3245
3241
|
});
|
|
3246
3242
|
exports.default = void 0;
|
|
3247
|
-
var _default
|
|
3248
|
-
exports.default = _default
|
|
3243
|
+
var _default = () => process.env.npm_config_user_agent?.startsWith("npm");
|
|
3244
|
+
exports.default = _default;
|
|
3249
3245
|
|
|
3250
3246
|
var virtual_purgePolyfills_isNpm = {
|
|
3251
3247
|
__proto__: null
|
|
@@ -3498,60 +3494,60 @@ Object.defineProperty(globalDirectory$1, "__esModule", {
|
|
|
3498
3494
|
value: true
|
|
3499
3495
|
});
|
|
3500
3496
|
globalDirectory$1.default = void 0;
|
|
3501
|
-
var _nodeProcess$
|
|
3502
|
-
var _nodePath$
|
|
3497
|
+
var _nodeProcess$h = require$$0$2;
|
|
3498
|
+
var _nodePath$5 = require$$1;
|
|
3503
3499
|
var _nodeOs$1 = require$$2$1;
|
|
3504
|
-
var _nodeFs$
|
|
3500
|
+
var _nodeFs$4 = require$$0$3;
|
|
3505
3501
|
var _ini = ini;
|
|
3506
|
-
const isWindows = _nodeProcess$
|
|
3502
|
+
const isWindows = _nodeProcess$h.platform === 'win32';
|
|
3507
3503
|
const readRc = filePath => {
|
|
3508
3504
|
try {
|
|
3509
|
-
return _ini.parse(_nodeFs$
|
|
3505
|
+
return _ini.parse(_nodeFs$4.readFileSync(filePath, 'utf8')).prefix;
|
|
3510
3506
|
} catch {}
|
|
3511
3507
|
};
|
|
3512
3508
|
|
|
3513
3509
|
// TODO: Remove the `.reduce` call.
|
|
3514
3510
|
// eslint-disable-next-line unicorn/no-array-reduce
|
|
3515
|
-
const getEnvNpmPrefix = () => Object.keys(_nodeProcess$
|
|
3511
|
+
const getEnvNpmPrefix = () => Object.keys(_nodeProcess$h.env).reduce((prefix, name) => /^npm_config_prefix$/i.test(name) ? _nodeProcess$h.env[name] : prefix, undefined);
|
|
3516
3512
|
const getGlobalNpmrc = () => {
|
|
3517
|
-
if (isWindows && _nodeProcess$
|
|
3513
|
+
if (isWindows && _nodeProcess$h.env.APPDATA) {
|
|
3518
3514
|
// Hardcoded contents of `c:\Program Files\nodejs\node_modules\npm\npmrc`
|
|
3519
|
-
return _nodePath$
|
|
3515
|
+
return _nodePath$5.join(_nodeProcess$h.env.APPDATA, '/npm/etc/npmrc');
|
|
3520
3516
|
}
|
|
3521
3517
|
|
|
3522
3518
|
// Homebrew special case: `$(brew --prefix)/lib/node_modules/npm/npmrc`
|
|
3523
|
-
if (_nodeProcess$
|
|
3524
|
-
const homebrewPrefix = _nodeProcess$
|
|
3525
|
-
return _nodePath$
|
|
3519
|
+
if (_nodeProcess$h.execPath.includes('/Cellar/node')) {
|
|
3520
|
+
const homebrewPrefix = _nodeProcess$h.execPath.slice(0, _nodeProcess$h.execPath.indexOf('/Cellar/node'));
|
|
3521
|
+
return _nodePath$5.join(homebrewPrefix, '/lib/node_modules/npm/npmrc');
|
|
3526
3522
|
}
|
|
3527
|
-
if (_nodeProcess$
|
|
3528
|
-
const installDir = _nodePath$
|
|
3529
|
-
return _nodePath$
|
|
3523
|
+
if (_nodeProcess$h.execPath.endsWith('/bin/node')) {
|
|
3524
|
+
const installDir = _nodePath$5.dirname(_nodePath$5.dirname(_nodeProcess$h.execPath));
|
|
3525
|
+
return _nodePath$5.join(installDir, '/etc/npmrc');
|
|
3530
3526
|
}
|
|
3531
3527
|
};
|
|
3532
3528
|
const getDefaultNpmPrefix = () => {
|
|
3533
3529
|
if (isWindows) {
|
|
3534
3530
|
const {
|
|
3535
3531
|
APPDATA
|
|
3536
|
-
} = _nodeProcess$
|
|
3532
|
+
} = _nodeProcess$h.env;
|
|
3537
3533
|
// `c:\node\node.exe` → `prefix=c:\node\`
|
|
3538
|
-
return APPDATA ? _nodePath$
|
|
3534
|
+
return APPDATA ? _nodePath$5.join(APPDATA, 'npm') : _nodePath$5.dirname(_nodeProcess$h.execPath);
|
|
3539
3535
|
}
|
|
3540
3536
|
|
|
3541
3537
|
// `/usr/local/bin/node` → `prefix=/usr/local`
|
|
3542
|
-
return _nodePath$
|
|
3538
|
+
return _nodePath$5.dirname(_nodePath$5.dirname(_nodeProcess$h.execPath));
|
|
3543
3539
|
};
|
|
3544
3540
|
const getNpmPrefix = () => {
|
|
3545
3541
|
const envPrefix = getEnvNpmPrefix();
|
|
3546
3542
|
if (envPrefix) {
|
|
3547
3543
|
return envPrefix;
|
|
3548
3544
|
}
|
|
3549
|
-
const homePrefix = readRc(_nodePath$
|
|
3545
|
+
const homePrefix = readRc(_nodePath$5.join(_nodeOs$1.homedir(), '.npmrc'));
|
|
3550
3546
|
if (homePrefix) {
|
|
3551
3547
|
return homePrefix;
|
|
3552
3548
|
}
|
|
3553
|
-
if (_nodeProcess$
|
|
3554
|
-
return _nodeProcess$
|
|
3549
|
+
if (_nodeProcess$h.env.PREFIX) {
|
|
3550
|
+
return _nodeProcess$h.env.PREFIX;
|
|
3555
3551
|
}
|
|
3556
3552
|
const globalPrefix = readRc(getGlobalNpmrc());
|
|
3557
3553
|
if (globalPrefix) {
|
|
@@ -3559,30 +3555,30 @@ const getNpmPrefix = () => {
|
|
|
3559
3555
|
}
|
|
3560
3556
|
return getDefaultNpmPrefix();
|
|
3561
3557
|
};
|
|
3562
|
-
const npmPrefix = _nodePath$
|
|
3558
|
+
const npmPrefix = _nodePath$5.resolve(getNpmPrefix());
|
|
3563
3559
|
const getYarnWindowsDirectory = () => {
|
|
3564
|
-
if (isWindows && _nodeProcess$
|
|
3565
|
-
const dir = _nodePath$
|
|
3566
|
-
if (_nodeFs$
|
|
3560
|
+
if (isWindows && _nodeProcess$h.env.LOCALAPPDATA) {
|
|
3561
|
+
const dir = _nodePath$5.join(_nodeProcess$h.env.LOCALAPPDATA, 'Yarn');
|
|
3562
|
+
if (_nodeFs$4.existsSync(dir)) {
|
|
3567
3563
|
return dir;
|
|
3568
3564
|
}
|
|
3569
3565
|
}
|
|
3570
3566
|
return false;
|
|
3571
3567
|
};
|
|
3572
3568
|
const getYarnPrefix = () => {
|
|
3573
|
-
if (_nodeProcess$
|
|
3574
|
-
return _nodeProcess$
|
|
3569
|
+
if (_nodeProcess$h.env.PREFIX) {
|
|
3570
|
+
return _nodeProcess$h.env.PREFIX;
|
|
3575
3571
|
}
|
|
3576
3572
|
const windowsPrefix = getYarnWindowsDirectory();
|
|
3577
3573
|
if (windowsPrefix) {
|
|
3578
3574
|
return windowsPrefix;
|
|
3579
3575
|
}
|
|
3580
|
-
const configPrefix = _nodePath$
|
|
3581
|
-
if (_nodeFs$
|
|
3576
|
+
const configPrefix = _nodePath$5.join(_nodeOs$1.homedir(), '.config/yarn');
|
|
3577
|
+
if (_nodeFs$4.existsSync(configPrefix)) {
|
|
3582
3578
|
return configPrefix;
|
|
3583
3579
|
}
|
|
3584
|
-
const homePrefix = _nodePath$
|
|
3585
|
-
if (_nodeFs$
|
|
3580
|
+
const homePrefix = _nodePath$5.join(_nodeOs$1.homedir(), '.yarn-config');
|
|
3581
|
+
if (_nodeFs$4.existsSync(homePrefix)) {
|
|
3586
3582
|
return homePrefix;
|
|
3587
3583
|
}
|
|
3588
3584
|
|
|
@@ -3592,13 +3588,13 @@ const getYarnPrefix = () => {
|
|
|
3592
3588
|
const globalDirectory = {};
|
|
3593
3589
|
globalDirectory.npm = {};
|
|
3594
3590
|
globalDirectory.npm.prefix = npmPrefix;
|
|
3595
|
-
globalDirectory.npm.packages = _nodePath$
|
|
3596
|
-
globalDirectory.npm.binaries = isWindows ? npmPrefix : _nodePath$
|
|
3597
|
-
const yarnPrefix = _nodePath$
|
|
3591
|
+
globalDirectory.npm.packages = _nodePath$5.join(npmPrefix, isWindows ? 'node_modules' : 'lib/node_modules');
|
|
3592
|
+
globalDirectory.npm.binaries = isWindows ? npmPrefix : _nodePath$5.join(npmPrefix, 'bin');
|
|
3593
|
+
const yarnPrefix = _nodePath$5.resolve(getYarnPrefix());
|
|
3598
3594
|
globalDirectory.yarn = {};
|
|
3599
3595
|
globalDirectory.yarn.prefix = yarnPrefix;
|
|
3600
|
-
globalDirectory.yarn.packages = _nodePath$
|
|
3601
|
-
globalDirectory.yarn.binaries = _nodePath$
|
|
3596
|
+
globalDirectory.yarn.packages = _nodePath$5.join(yarnPrefix, getYarnWindowsDirectory() ? 'Data/global/node_modules' : 'global/node_modules');
|
|
3597
|
+
globalDirectory.yarn.binaries = _nodePath$5.join(globalDirectory.yarn.packages, '.bin');
|
|
3602
3598
|
globalDirectory$1.default = globalDirectory;
|
|
3603
3599
|
|
|
3604
3600
|
var isPathInside$1 = {};
|
|
@@ -3607,25 +3603,25 @@ Object.defineProperty(isPathInside$1, "__esModule", {
|
|
|
3607
3603
|
value: true
|
|
3608
3604
|
});
|
|
3609
3605
|
isPathInside$1.default = isPathInside;
|
|
3610
|
-
var _nodePath$
|
|
3606
|
+
var _nodePath$4 = require$$1;
|
|
3611
3607
|
function isPathInside(childPath, parentPath) {
|
|
3612
|
-
const relation = _nodePath$
|
|
3613
|
-
return Boolean(relation && relation !== '..' && !relation.startsWith(`..${_nodePath$
|
|
3608
|
+
const relation = _nodePath$4.relative(parentPath, childPath);
|
|
3609
|
+
return Boolean(relation && relation !== '..' && !relation.startsWith(`..${_nodePath$4.sep}`) && relation !== _nodePath$4.resolve(childPath));
|
|
3614
3610
|
}
|
|
3615
3611
|
|
|
3616
3612
|
Object.defineProperty(isInstalledGlobally$1, "__esModule", {
|
|
3617
3613
|
value: true
|
|
3618
3614
|
});
|
|
3619
3615
|
isInstalledGlobally$1.default = void 0;
|
|
3620
|
-
var _nodeFs$
|
|
3621
|
-
var _nodePath$
|
|
3616
|
+
var _nodeFs$3 = require$$0$3;
|
|
3617
|
+
var _nodePath$3 = require$$1;
|
|
3622
3618
|
var _nodeUrl$3 = require$$2$4;
|
|
3623
3619
|
var _globalDirectory = globalDirectory$1;
|
|
3624
3620
|
var _isPathInside = isPathInside$1;
|
|
3625
|
-
const _dirname$2 = _nodePath$
|
|
3621
|
+
const _dirname$2 = _nodePath$3.dirname((0, _nodeUrl$3.fileURLToPath)((typeof document === 'undefined' ? require$$2$4.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('vendor.js', document.baseURI).href))));
|
|
3626
3622
|
const isInstalledGlobally = (() => {
|
|
3627
3623
|
try {
|
|
3628
|
-
return (0, _isPathInside.default)(_dirname$2, _globalDirectory.default.yarn.packages) || (0, _isPathInside.default)(_dirname$2, _nodeFs$
|
|
3624
|
+
return (0, _isPathInside.default)(_dirname$2, _globalDirectory.default.yarn.packages) || (0, _isPathInside.default)(_dirname$2, _nodeFs$3.realpathSync(_globalDirectory.default.npm.packages));
|
|
3629
3625
|
} catch {
|
|
3630
3626
|
return false;
|
|
3631
3627
|
}
|
|
@@ -3690,7 +3686,7 @@ function isFullWidth(x) {
|
|
|
3690
3686
|
return x === 0x3000 || x >= 0xFF01 && x <= 0xFF60 || x >= 0xFFE0 && x <= 0xFFE6;
|
|
3691
3687
|
}
|
|
3692
3688
|
function isWide(x) {
|
|
3693
|
-
return x >= 0x1100 && x <= 0x115F || x === 0x231A || x === 0x231B || x === 0x2329 || x === 0x232A || x >= 0x23E9 && x <= 0x23EC || x === 0x23F0 || x === 0x23F3 || x === 0x25FD || x === 0x25FE || x === 0x2614 || x === 0x2615 || x >= 0x2648 && x <= 0x2653 || x === 0x267F || x === 0x2693 || x === 0x26A1 || x === 0x26AA || x === 0x26AB || x === 0x26BD || x === 0x26BE || x === 0x26C4 || x === 0x26C5 || x === 0x26CE || x === 0x26D4 || x === 0x26EA || x === 0x26F2 || x === 0x26F3 || x === 0x26F5 || x === 0x26FA || x === 0x26FD || x === 0x2705 || x === 0x270A || x === 0x270B || x === 0x2728 || x === 0x274C || x === 0x274E || x >= 0x2753 && x <= 0x2755 || x === 0x2757 || x >= 0x2795 && x <= 0x2797 || x === 0x27B0 || x === 0x27BF || x === 0x2B1B || x === 0x2B1C || x === 0x2B50 || x === 0x2B55 || x >= 0x2E80 && x <= 0x2E99 || x >= 0x2E9B && x <= 0x2EF3 || x >= 0x2F00 && x <= 0x2FD5 || x >= 0x2FF0 && x <= 0x2FFF || x >= 0x3001 && x <= 0x303E || x >= 0x3041 && x <= 0x3096 || x >= 0x3099 && x <= 0x30FF || x >= 0x3105 && x <= 0x312F || x >= 0x3131 && x <= 0x318E || x >= 0x3190 && x <=
|
|
3689
|
+
return x >= 0x1100 && x <= 0x115F || x === 0x231A || x === 0x231B || x === 0x2329 || x === 0x232A || x >= 0x23E9 && x <= 0x23EC || x === 0x23F0 || x === 0x23F3 || x === 0x25FD || x === 0x25FE || x === 0x2614 || x === 0x2615 || x >= 0x2630 && x <= 0x2637 || x >= 0x2648 && x <= 0x2653 || x === 0x267F || x >= 0x268A && x <= 0x268F || x === 0x2693 || x === 0x26A1 || x === 0x26AA || x === 0x26AB || x === 0x26BD || x === 0x26BE || x === 0x26C4 || x === 0x26C5 || x === 0x26CE || x === 0x26D4 || x === 0x26EA || x === 0x26F2 || x === 0x26F3 || x === 0x26F5 || x === 0x26FA || x === 0x26FD || x === 0x2705 || x === 0x270A || x === 0x270B || x === 0x2728 || x === 0x274C || x === 0x274E || x >= 0x2753 && x <= 0x2755 || x === 0x2757 || x >= 0x2795 && x <= 0x2797 || x === 0x27B0 || x === 0x27BF || x === 0x2B1B || x === 0x2B1C || x === 0x2B50 || x === 0x2B55 || x >= 0x2E80 && x <= 0x2E99 || x >= 0x2E9B && x <= 0x2EF3 || x >= 0x2F00 && x <= 0x2FD5 || x >= 0x2FF0 && x <= 0x2FFF || x >= 0x3001 && x <= 0x303E || x >= 0x3041 && x <= 0x3096 || x >= 0x3099 && x <= 0x30FF || x >= 0x3105 && x <= 0x312F || x >= 0x3131 && x <= 0x318E || x >= 0x3190 && x <= 0x31E5 || x >= 0x31EF && x <= 0x321E || x >= 0x3220 && x <= 0x3247 || x >= 0x3250 && x <= 0xA48C || x >= 0xA490 && x <= 0xA4C6 || x >= 0xA960 && x <= 0xA97C || x >= 0xAC00 && x <= 0xD7A3 || x >= 0xF900 && x <= 0xFAFF || x >= 0xFE10 && x <= 0xFE19 || x >= 0xFE30 && x <= 0xFE52 || x >= 0xFE54 && x <= 0xFE66 || x >= 0xFE68 && x <= 0xFE6B || x >= 0x16FE0 && x <= 0x16FE4 || x === 0x16FF0 || x === 0x16FF1 || x >= 0x17000 && x <= 0x187F7 || x >= 0x18800 && x <= 0x18CD5 || x >= 0x18CFF && x <= 0x18D08 || x >= 0x1AFF0 && x <= 0x1AFF3 || x >= 0x1AFF5 && x <= 0x1AFFB || x === 0x1AFFD || x === 0x1AFFE || x >= 0x1B000 && x <= 0x1B122 || x === 0x1B132 || x >= 0x1B150 && x <= 0x1B152 || x === 0x1B155 || x >= 0x1B164 && x <= 0x1B167 || x >= 0x1B170 && x <= 0x1B2FB || x >= 0x1D300 && x <= 0x1D356 || x >= 0x1D360 && x <= 0x1D376 || x === 0x1F004 || x === 0x1F0CF || x === 0x1F18E || x >= 0x1F191 && x <= 0x1F19A || x >= 0x1F200 && x <= 0x1F202 || x >= 0x1F210 && x <= 0x1F23B || x >= 0x1F240 && x <= 0x1F248 || x === 0x1F250 || x === 0x1F251 || x >= 0x1F260 && x <= 0x1F265 || x >= 0x1F300 && x <= 0x1F320 || x >= 0x1F32D && x <= 0x1F335 || x >= 0x1F337 && x <= 0x1F37C || x >= 0x1F37E && x <= 0x1F393 || x >= 0x1F3A0 && x <= 0x1F3CA || x >= 0x1F3CF && x <= 0x1F3D3 || x >= 0x1F3E0 && x <= 0x1F3F0 || x === 0x1F3F4 || x >= 0x1F3F8 && x <= 0x1F43E || x === 0x1F440 || x >= 0x1F442 && x <= 0x1F4FC || x >= 0x1F4FF && x <= 0x1F53D || x >= 0x1F54B && x <= 0x1F54E || x >= 0x1F550 && x <= 0x1F567 || x === 0x1F57A || x === 0x1F595 || x === 0x1F596 || x === 0x1F5A4 || x >= 0x1F5FB && x <= 0x1F64F || x >= 0x1F680 && x <= 0x1F6C5 || x === 0x1F6CC || x >= 0x1F6D0 && x <= 0x1F6D2 || x >= 0x1F6D5 && x <= 0x1F6D7 || x >= 0x1F6DC && x <= 0x1F6DF || x === 0x1F6EB || x === 0x1F6EC || x >= 0x1F6F4 && x <= 0x1F6FC || x >= 0x1F7E0 && x <= 0x1F7EB || x === 0x1F7F0 || x >= 0x1F90C && x <= 0x1F93A || x >= 0x1F93C && x <= 0x1F945 || x >= 0x1F947 && x <= 0x1F9FF || x >= 0x1FA70 && x <= 0x1FA7C || x >= 0x1FA80 && x <= 0x1FA89 || x >= 0x1FA8F && x <= 0x1FAC6 || x >= 0x1FACE && x <= 0x1FADC || x >= 0x1FADF && x <= 0x1FAE9 || x >= 0x1FAF0 && x <= 0x1FAF8 || x >= 0x20000 && x <= 0x2FFFD || x >= 0x30000 && x <= 0x3FFFD;
|
|
3694
3690
|
}
|
|
3695
3691
|
function getCategory(x) {
|
|
3696
3692
|
if (isAmbiguous(x)) return 'ambiguous';
|
|
@@ -4403,7 +4399,7 @@ Object.defineProperty(boxen$1, "__esModule", {
|
|
|
4403
4399
|
});
|
|
4404
4400
|
boxen$1._borderStyles = _cliBoxes;
|
|
4405
4401
|
boxen$1.default = boxen;
|
|
4406
|
-
var _nodeProcess$
|
|
4402
|
+
var _nodeProcess$g = require$$0$2;
|
|
4407
4403
|
var _stringWidth$1 = stringWidth$3;
|
|
4408
4404
|
var _chalk$3 = source;
|
|
4409
4405
|
var _widestLine = widestLine$1;
|
|
@@ -4419,7 +4415,7 @@ const terminalColumns = () => {
|
|
|
4419
4415
|
env,
|
|
4420
4416
|
stdout,
|
|
4421
4417
|
stderr
|
|
4422
|
-
} = _nodeProcess$
|
|
4418
|
+
} = _nodeProcess$g;
|
|
4423
4419
|
if (stdout?.columns) {
|
|
4424
4420
|
return stdout.columns;
|
|
4425
4421
|
}
|
|
@@ -4623,8 +4619,8 @@ const boxContent = (content, contentWidth, options) => {
|
|
|
4623
4619
|
};
|
|
4624
4620
|
const sanitizeOptions = options => {
|
|
4625
4621
|
// If fullscreen is enabled, max-out unspecified width/height
|
|
4626
|
-
if (options.fullscreen && _nodeProcess$
|
|
4627
|
-
let newDimensions = [_nodeProcess$
|
|
4622
|
+
if (options.fullscreen && _nodeProcess$g?.stdout) {
|
|
4623
|
+
let newDimensions = [_nodeProcess$g.stdout.columns, _nodeProcess$g.stdout.rows];
|
|
4628
4624
|
if (typeof options.fullscreen === 'function') {
|
|
4629
4625
|
newDimensions = options.fullscreen(...newDimensions);
|
|
4630
4626
|
}
|
|
@@ -4736,8 +4732,8 @@ Object.defineProperty(isInCi$1, "__esModule", {
|
|
|
4736
4732
|
value: true
|
|
4737
4733
|
});
|
|
4738
4734
|
isInCi$1.default = void 0;
|
|
4739
|
-
var _nodeProcess$
|
|
4740
|
-
const isInCi = _nodeProcess$
|
|
4735
|
+
var _nodeProcess$f = require$$0$2;
|
|
4736
|
+
const isInCi = _nodeProcess$f.env.CI !== '0' && _nodeProcess$f.env.CI !== 'false' && ('CI' in _nodeProcess$f.env || 'CONTINUOUS_INTEGRATION' in _nodeProcess$f.env || Object.keys(_nodeProcess$f.env).some(key => key.startsWith('CI_')));
|
|
4741
4737
|
isInCi$1.default = isInCi;
|
|
4742
4738
|
|
|
4743
4739
|
var pupa$1 = {};
|
|
@@ -4830,10 +4826,10 @@ Object.defineProperty(updateNotifier$1, "__esModule", {
|
|
|
4830
4826
|
value: true
|
|
4831
4827
|
});
|
|
4832
4828
|
updateNotifier$1.default = void 0;
|
|
4833
|
-
var _nodeProcess$
|
|
4829
|
+
var _nodeProcess$e = require$$0$2;
|
|
4834
4830
|
var _nodeChild_process$5 = require$$2$6;
|
|
4835
4831
|
var _nodeUrl$2 = require$$2$4;
|
|
4836
|
-
var _nodePath$
|
|
4832
|
+
var _nodePath$2 = require$$1;
|
|
4837
4833
|
var _nodeUtil$4 = require$$0$4;
|
|
4838
4834
|
var _configstore = configstore;
|
|
4839
4835
|
var _chalk$2 = source;
|
|
@@ -4848,7 +4844,7 @@ var _isInCi = isInCi$1;
|
|
|
4848
4844
|
var _pupa = pupa$1;
|
|
4849
4845
|
// Only import what we need for performance
|
|
4850
4846
|
|
|
4851
|
-
const _dirname$1 = _nodePath$
|
|
4847
|
+
const _dirname$1 = _nodePath$2.dirname((0, _nodeUrl$2.fileURLToPath)((typeof document === 'undefined' ? require$$2$4.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('vendor.js', document.baseURI).href))));
|
|
4852
4848
|
const ONE_DAY = 1000 * 60 * 60 * 24;
|
|
4853
4849
|
class UpdateNotifier {
|
|
4854
4850
|
// Public
|
|
@@ -4879,7 +4875,7 @@ class UpdateNotifier {
|
|
|
4879
4875
|
this._packageName = options.pkg.name;
|
|
4880
4876
|
this.#packageVersion = options.pkg.version;
|
|
4881
4877
|
this.#updateCheckInterval = typeof options.updateCheckInterval === 'number' ? options.updateCheckInterval : ONE_DAY;
|
|
4882
|
-
this.#isDisabled = 'NO_UPDATE_NOTIFIER' in _nodeProcess$
|
|
4878
|
+
this.#isDisabled = 'NO_UPDATE_NOTIFIER' in _nodeProcess$e.env || _nodeProcess$e.env.NODE_ENV === 'test' || _nodeProcess$e.argv.includes('--no-update-notifier') || _isInCi.default;
|
|
4883
4879
|
this._shouldNotifyInNpmScript = options.shouldNotifyInNpmScript;
|
|
4884
4880
|
if (!this.#isDisabled) {
|
|
4885
4881
|
try {
|
|
@@ -4892,7 +4888,7 @@ class UpdateNotifier {
|
|
|
4892
4888
|
} catch {
|
|
4893
4889
|
// Expecting error code EACCES or EPERM
|
|
4894
4890
|
const message = _chalk$2.default.yellow((0, _nodeUtil$4.format)(' %s update check failed ', options.pkg.name)) + (0, _nodeUtil$4.format)('\n Try running with %s or get access ', _chalk$2.default.cyan('sudo')) + '\n to the local update config store via \n' + _chalk$2.default.cyan((0, _nodeUtil$4.format)(' sudo chown -R $USER:$(id -gn $USER) %s ', _xdgBasedir.xdgConfig));
|
|
4895
|
-
_nodeProcess$
|
|
4891
|
+
_nodeProcess$e.on('exit', () => {
|
|
4896
4892
|
console.error((0, _boxen.default)(message, {
|
|
4897
4893
|
textAlignment: 'center'
|
|
4898
4894
|
}));
|
|
@@ -4919,7 +4915,7 @@ class UpdateNotifier {
|
|
|
4919
4915
|
}
|
|
4920
4916
|
|
|
4921
4917
|
// Spawn a detached process, passing the options as an environment property
|
|
4922
|
-
(0, _nodeChild_process$5.spawn)(_nodeProcess$
|
|
4918
|
+
(0, _nodeChild_process$5.spawn)(_nodeProcess$e.execPath, [_nodePath$2.join(_dirname$1, 'check.js'), JSON.stringify(this.#options)], {
|
|
4923
4919
|
detached: true,
|
|
4924
4920
|
stdio: 'ignore'
|
|
4925
4921
|
}).unref();
|
|
@@ -4940,7 +4936,7 @@ class UpdateNotifier {
|
|
|
4940
4936
|
}
|
|
4941
4937
|
notify(options) {
|
|
4942
4938
|
const suppressForNpm = !this._shouldNotifyInNpmScript && _isNpm.isNpmOrYarn;
|
|
4943
|
-
if (!_nodeProcess$
|
|
4939
|
+
if (!_nodeProcess$e.stdout.isTTY || suppressForNpm || !this.update || !_gt(this.update.latest, this.update.current)) {
|
|
4944
4940
|
return this;
|
|
4945
4941
|
}
|
|
4946
4942
|
options = {
|
|
@@ -4966,7 +4962,7 @@ class UpdateNotifier {
|
|
|
4966
4962
|
if (options.defer === false) {
|
|
4967
4963
|
console.error(message);
|
|
4968
4964
|
} else {
|
|
4969
|
-
_nodeProcess$
|
|
4965
|
+
_nodeProcess$e.on('exit', () => {
|
|
4970
4966
|
console.error(message);
|
|
4971
4967
|
});
|
|
4972
4968
|
}
|
|
@@ -13064,8 +13060,8 @@ Object.defineProperty(options, "__esModule", {
|
|
|
13064
13060
|
value: true
|
|
13065
13061
|
});
|
|
13066
13062
|
options.buildOptions = void 0;
|
|
13067
|
-
var _nodeProcess$
|
|
13068
|
-
var _nodePath$
|
|
13063
|
+
var _nodeProcess$d = require$$0$2;
|
|
13064
|
+
var _nodePath$1 = require$$1;
|
|
13069
13065
|
var _nodeUrl$1 = require$$2$4;
|
|
13070
13066
|
var _dependencies$2 = dependencies;
|
|
13071
13067
|
var _utils$1 = utils;
|
|
@@ -13124,12 +13120,12 @@ const buildOptions = (helpText, options) => {
|
|
|
13124
13120
|
throw new TypeError('The `importMeta` option is required. Its value must be `import.meta`.');
|
|
13125
13121
|
}
|
|
13126
13122
|
const foundPackage = (0, _dependencies$2.a)({
|
|
13127
|
-
cwd: (0, _nodePath$
|
|
13123
|
+
cwd: (0, _nodePath$1.dirname)((0, _nodeUrl$1.fileURLToPath)(options.importMeta.url)),
|
|
13128
13124
|
normalize: false
|
|
13129
13125
|
});
|
|
13130
13126
|
const parsedOptions = {
|
|
13131
13127
|
pkg: foundPackage ? foundPackage.packageJson : {},
|
|
13132
|
-
argv: _nodeProcess$
|
|
13128
|
+
argv: _nodeProcess$d.argv.slice(2),
|
|
13133
13129
|
flags: {},
|
|
13134
13130
|
inferType: false,
|
|
13135
13131
|
input: 'string',
|
|
@@ -13234,7 +13230,7 @@ Object.defineProperty(validate$1, "__esModule", {
|
|
|
13234
13230
|
value: true
|
|
13235
13231
|
});
|
|
13236
13232
|
validate$1.validate = validate$1.checkUnknownFlags = validate$1.checkMissingRequiredFlags = void 0;
|
|
13237
|
-
var _nodeProcess$
|
|
13233
|
+
var _nodeProcess$c = require$$0$2;
|
|
13238
13234
|
var _utils = utils;
|
|
13239
13235
|
const validateFlags = (flags, options) => {
|
|
13240
13236
|
for (const [flagKey, flagValue] of Object.entries(options.flags)) {
|
|
@@ -13293,7 +13289,7 @@ const checkUnknownFlags = input => {
|
|
|
13293
13289
|
const unknownFlags = input.filter(item => typeof item === 'string' && item.startsWith('-'));
|
|
13294
13290
|
if (unknownFlags.length > 0) {
|
|
13295
13291
|
reportUnknownFlags(unknownFlags);
|
|
13296
|
-
_nodeProcess$
|
|
13292
|
+
_nodeProcess$c.exit(2);
|
|
13297
13293
|
}
|
|
13298
13294
|
};
|
|
13299
13295
|
validate$1.checkUnknownFlags = checkUnknownFlags;
|
|
@@ -13332,7 +13328,7 @@ const checkMissingRequiredFlags = (flags, receivedFlags, input) => {
|
|
|
13332
13328
|
}
|
|
13333
13329
|
if (missingRequiredFlags.length > 0) {
|
|
13334
13330
|
reportMissingRequiredFlags(missingRequiredFlags);
|
|
13335
|
-
_nodeProcess$
|
|
13331
|
+
_nodeProcess$c.exit(2);
|
|
13336
13332
|
}
|
|
13337
13333
|
};
|
|
13338
13334
|
validate$1.checkMissingRequiredFlags = checkMissingRequiredFlags;
|
|
@@ -13341,7 +13337,7 @@ Object.defineProperty(build, "__esModule", {
|
|
|
13341
13337
|
value: true
|
|
13342
13338
|
});
|
|
13343
13339
|
build.default = void 0;
|
|
13344
|
-
var _nodeProcess$
|
|
13340
|
+
var _nodeProcess$b = require$$0$2;
|
|
13345
13341
|
var _dependencies = dependencies;
|
|
13346
13342
|
var _options = options;
|
|
13347
13343
|
var _parser = parser;
|
|
@@ -13372,11 +13368,11 @@ const buildResult = (options, parserOptions) => {
|
|
|
13372
13368
|
help = `${description || ''}${help}\n`;
|
|
13373
13369
|
const showHelp = code => {
|
|
13374
13370
|
console.log(help);
|
|
13375
|
-
_nodeProcess$
|
|
13371
|
+
_nodeProcess$b.exit(typeof code === 'number' ? code : 2);
|
|
13376
13372
|
};
|
|
13377
13373
|
const showVersion = () => {
|
|
13378
13374
|
console.log(typeof options.version === 'string' ? options.version : package_.version);
|
|
13379
|
-
_nodeProcess$
|
|
13375
|
+
_nodeProcess$b.exit(0);
|
|
13380
13376
|
};
|
|
13381
13377
|
if (argv._.length === 0 && options.argv.length === 1) {
|
|
13382
13378
|
if (argv.version === true && options.autoVersion) {
|
|
@@ -13420,7 +13416,7 @@ const meow = (helpText, options = {}) => {
|
|
|
13420
13416
|
const parsedOptions = (0, _options.buildOptions)(helpText, options);
|
|
13421
13417
|
const parserOptions = (0, _parser.buildParserOptions)(parsedOptions);
|
|
13422
13418
|
const result = buildResult(parsedOptions, parserOptions);
|
|
13423
|
-
_nodeProcess$
|
|
13419
|
+
_nodeProcess$b.title = result.pkg.bin ? Object.keys(result.pkg.bin).at(0) : result.pkg.name;
|
|
13424
13420
|
return result;
|
|
13425
13421
|
};
|
|
13426
13422
|
build.default = meow;
|
|
@@ -13548,10 +13544,10 @@ Object.defineProperty(restoreCursor$1, "__esModule", {
|
|
|
13548
13544
|
value: true
|
|
13549
13545
|
});
|
|
13550
13546
|
restoreCursor$1.default = void 0;
|
|
13551
|
-
var _nodeProcess$
|
|
13547
|
+
var _nodeProcess$a = require$$0$2;
|
|
13552
13548
|
var _onetime = onetime$1;
|
|
13553
13549
|
var _signalExit = require$$2$7;
|
|
13554
|
-
const terminal = _nodeProcess$
|
|
13550
|
+
const terminal = _nodeProcess$a.stderr.isTTY ? _nodeProcess$a.stderr : _nodeProcess$a.stdout.isTTY ? _nodeProcess$a.stdout : undefined;
|
|
13555
13551
|
const restoreCursor = terminal ? (0, _onetime.default)(() => {
|
|
13556
13552
|
(0, _signalExit.onExit)(() => {
|
|
13557
13553
|
terminal.write('\u001B[?25h');
|
|
@@ -13565,18 +13561,18 @@ Object.defineProperty(cliCursor$1, "__esModule", {
|
|
|
13565
13561
|
value: true
|
|
13566
13562
|
});
|
|
13567
13563
|
cliCursor$1.default = void 0;
|
|
13568
|
-
var _nodeProcess$
|
|
13564
|
+
var _nodeProcess$9 = require$$0$2;
|
|
13569
13565
|
var _restoreCursor = restoreCursor$1;
|
|
13570
13566
|
let isHidden = false;
|
|
13571
13567
|
const cliCursor = {};
|
|
13572
|
-
cliCursor.show = (writableStream = _nodeProcess$
|
|
13568
|
+
cliCursor.show = (writableStream = _nodeProcess$9.stderr) => {
|
|
13573
13569
|
if (!writableStream.isTTY) {
|
|
13574
13570
|
return;
|
|
13575
13571
|
}
|
|
13576
13572
|
isHidden = false;
|
|
13577
13573
|
writableStream.write('\u001B[?25h');
|
|
13578
13574
|
};
|
|
13579
|
-
cliCursor.hide = (writableStream = _nodeProcess$
|
|
13575
|
+
cliCursor.hide = (writableStream = _nodeProcess$9.stderr) => {
|
|
13580
13576
|
if (!writableStream.isTTY) {
|
|
13581
13577
|
return;
|
|
13582
13578
|
}
|
|
@@ -15325,15 +15321,15 @@ Object.defineProperty(isUnicodeSupported$3, "__esModule", {
|
|
|
15325
15321
|
value: true
|
|
15326
15322
|
});
|
|
15327
15323
|
isUnicodeSupported$3.default = isUnicodeSupported$2;
|
|
15328
|
-
var _nodeProcess$
|
|
15324
|
+
var _nodeProcess$8 = require$$0$2;
|
|
15329
15325
|
function isUnicodeSupported$2() {
|
|
15330
|
-
if (_nodeProcess$
|
|
15331
|
-
return _nodeProcess$
|
|
15326
|
+
if (_nodeProcess$8.platform !== 'win32') {
|
|
15327
|
+
return _nodeProcess$8.env.TERM !== 'linux'; // Linux console (kernel)
|
|
15332
15328
|
}
|
|
15333
|
-
return Boolean(_nodeProcess$
|
|
15334
|
-
|| Boolean(_nodeProcess$
|
|
15335
|
-
|| _nodeProcess$
|
|
15336
|
-
|| _nodeProcess$
|
|
15329
|
+
return Boolean(_nodeProcess$8.env.CI) || Boolean(_nodeProcess$8.env.WT_SESSION) // Windows Terminal
|
|
15330
|
+
|| Boolean(_nodeProcess$8.env.TERMINUS_SUBLIME) // Terminus (<0.2.27)
|
|
15331
|
+
|| _nodeProcess$8.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
|
|
15332
|
+
|| _nodeProcess$8.env.TERM_PROGRAM === 'Terminus-Sublime' || _nodeProcess$8.env.TERM_PROGRAM === 'vscode' || _nodeProcess$8.env.TERM === 'xterm-256color' || _nodeProcess$8.env.TERM === 'alacritty' || _nodeProcess$8.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
|
|
15337
15333
|
}
|
|
15338
15334
|
|
|
15339
15335
|
Object.defineProperty(logSymbols$1, "__esModule", {
|
|
@@ -15490,16 +15486,16 @@ Object.defineProperty(isUnicodeSupported$1, "__esModule", {
|
|
|
15490
15486
|
value: true
|
|
15491
15487
|
});
|
|
15492
15488
|
isUnicodeSupported$1.default = isUnicodeSupported;
|
|
15493
|
-
var _nodeProcess$
|
|
15489
|
+
var _nodeProcess$7 = require$$0$2;
|
|
15494
15490
|
function isUnicodeSupported() {
|
|
15495
15491
|
const {
|
|
15496
15492
|
env
|
|
15497
|
-
} = _nodeProcess$
|
|
15493
|
+
} = _nodeProcess$7;
|
|
15498
15494
|
const {
|
|
15499
15495
|
TERM,
|
|
15500
15496
|
TERM_PROGRAM
|
|
15501
15497
|
} = env;
|
|
15502
|
-
if (_nodeProcess$
|
|
15498
|
+
if (_nodeProcess$7.platform !== 'win32') {
|
|
15503
15499
|
return TERM !== 'linux'; // Linux console (kernel)
|
|
15504
15500
|
}
|
|
15505
15501
|
return Boolean(env.WT_SESSION) // Windows Terminal
|
|
@@ -15514,7 +15510,7 @@ Object.defineProperty(stdinDiscarder$1, "__esModule", {
|
|
|
15514
15510
|
value: true
|
|
15515
15511
|
});
|
|
15516
15512
|
stdinDiscarder$1.default = void 0;
|
|
15517
|
-
var _nodeProcess$
|
|
15513
|
+
var _nodeProcess$6 = require$$0$2;
|
|
15518
15514
|
const ASCII_ETX_CODE = 0x03; // Ctrl+C emits this code
|
|
15519
15515
|
|
|
15520
15516
|
class StdinDiscarder {
|
|
@@ -15536,25 +15532,25 @@ class StdinDiscarder {
|
|
|
15536
15532
|
}
|
|
15537
15533
|
#realStart() {
|
|
15538
15534
|
// No known way to make it work reliably on Windows.
|
|
15539
|
-
if (_nodeProcess$
|
|
15535
|
+
if (_nodeProcess$6.platform === 'win32' || !_nodeProcess$6.stdin.isTTY) {
|
|
15540
15536
|
return;
|
|
15541
15537
|
}
|
|
15542
|
-
_nodeProcess$
|
|
15543
|
-
_nodeProcess$
|
|
15544
|
-
_nodeProcess$
|
|
15538
|
+
_nodeProcess$6.stdin.setRawMode(true);
|
|
15539
|
+
_nodeProcess$6.stdin.on('data', this.#handleInput);
|
|
15540
|
+
_nodeProcess$6.stdin.resume();
|
|
15545
15541
|
}
|
|
15546
15542
|
#realStop() {
|
|
15547
|
-
if (!_nodeProcess$
|
|
15543
|
+
if (!_nodeProcess$6.stdin.isTTY) {
|
|
15548
15544
|
return;
|
|
15549
15545
|
}
|
|
15550
|
-
_nodeProcess$
|
|
15551
|
-
_nodeProcess$
|
|
15552
|
-
_nodeProcess$
|
|
15546
|
+
_nodeProcess$6.stdin.off('data', this.#handleInput);
|
|
15547
|
+
_nodeProcess$6.stdin.pause();
|
|
15548
|
+
_nodeProcess$6.stdin.setRawMode(false);
|
|
15553
15549
|
}
|
|
15554
15550
|
#handleInput(chunk) {
|
|
15555
15551
|
// Allow Ctrl+C to gracefully exit.
|
|
15556
15552
|
if (chunk[0] === ASCII_ETX_CODE) {
|
|
15557
|
-
_nodeProcess$
|
|
15553
|
+
_nodeProcess$6.emit('SIGINT');
|
|
15558
15554
|
}
|
|
15559
15555
|
}
|
|
15560
15556
|
}
|
|
@@ -15567,7 +15563,7 @@ Object.defineProperty(ora$1, "__esModule", {
|
|
|
15567
15563
|
ora$1.default = ora;
|
|
15568
15564
|
ora$1.oraPromise = oraPromise;
|
|
15569
15565
|
ora$1.spinners = cliSpinners;
|
|
15570
|
-
var _nodeProcess$
|
|
15566
|
+
var _nodeProcess$5 = require$$0$2;
|
|
15571
15567
|
var _chalk = source;
|
|
15572
15568
|
var _cliCursor = cliCursor$1;
|
|
15573
15569
|
var _cliSpinners = cliSpinners;
|
|
@@ -15602,7 +15598,7 @@ class Ora {
|
|
|
15602
15598
|
}
|
|
15603
15599
|
this.#options = {
|
|
15604
15600
|
color: 'cyan',
|
|
15605
|
-
stream: _nodeProcess$
|
|
15601
|
+
stream: _nodeProcess$5.stderr,
|
|
15606
15602
|
discardStdin: true,
|
|
15607
15603
|
hideCursor: true,
|
|
15608
15604
|
...options
|
|
@@ -15626,7 +15622,7 @@ class Ora {
|
|
|
15626
15622
|
this.prefixText = this.#options.prefixText;
|
|
15627
15623
|
this.suffixText = this.#options.suffixText;
|
|
15628
15624
|
this.indent = this.#options.indent;
|
|
15629
|
-
if (_nodeProcess$
|
|
15625
|
+
if (_nodeProcess$5.env.NODE_ENV === 'test') {
|
|
15630
15626
|
this._stream = this.#stream;
|
|
15631
15627
|
this._isEnabled = this.#isEnabled;
|
|
15632
15628
|
Object.defineProperty(this, '_linesToClear', {
|
|
@@ -15816,7 +15812,7 @@ class Ora {
|
|
|
15816
15812
|
if (this.#options.hideCursor) {
|
|
15817
15813
|
_cliCursor.default.hide(this.#stream);
|
|
15818
15814
|
}
|
|
15819
|
-
if (this.#options.discardStdin && _nodeProcess$
|
|
15815
|
+
if (this.#options.discardStdin && _nodeProcess$5.stdin.isTTY) {
|
|
15820
15816
|
this.#isDiscardingStdin = true;
|
|
15821
15817
|
_stdinDiscarder.default.start();
|
|
15822
15818
|
}
|
|
@@ -15835,7 +15831,7 @@ class Ora {
|
|
|
15835
15831
|
if (this.#options.hideCursor) {
|
|
15836
15832
|
_cliCursor.default.show(this.#stream);
|
|
15837
15833
|
}
|
|
15838
|
-
if (this.#options.discardStdin && _nodeProcess$
|
|
15834
|
+
if (this.#options.discardStdin && _nodeProcess$5.stdin.isTTY && this.#isDiscardingStdin) {
|
|
15839
15835
|
_stdinDiscarder.default.stop();
|
|
15840
15836
|
this.#isDiscardingStdin = false;
|
|
15841
15837
|
}
|
|
@@ -16244,1185 +16240,6 @@ terminalLink.stderr = (text, url, options = {}) => terminalLink(text, url, {
|
|
|
16244
16240
|
});
|
|
16245
16241
|
terminalLink.stderr.isSupported = _supportsHyperlinks.stderr;
|
|
16246
16242
|
|
|
16247
|
-
var globby = {};
|
|
16248
|
-
|
|
16249
|
-
var mergeStreams$1 = {};
|
|
16250
|
-
|
|
16251
|
-
Object.defineProperty(mergeStreams$1, "__esModule", {
|
|
16252
|
-
value: true
|
|
16253
|
-
});
|
|
16254
|
-
mergeStreams$1.default = mergeStreams;
|
|
16255
|
-
var _nodeEvents = require$$0$6;
|
|
16256
|
-
var _nodeStream = require$$1$1;
|
|
16257
|
-
var _promises$2 = require$$2$8;
|
|
16258
|
-
function mergeStreams(streams) {
|
|
16259
|
-
if (!Array.isArray(streams)) {
|
|
16260
|
-
throw new TypeError(`Expected an array, got \`${typeof streams}\`.`);
|
|
16261
|
-
}
|
|
16262
|
-
for (const stream of streams) {
|
|
16263
|
-
validateStream(stream);
|
|
16264
|
-
}
|
|
16265
|
-
const objectMode = streams.some(({
|
|
16266
|
-
readableObjectMode
|
|
16267
|
-
}) => readableObjectMode);
|
|
16268
|
-
const highWaterMark = getHighWaterMark(streams, objectMode);
|
|
16269
|
-
const passThroughStream = new MergedStream({
|
|
16270
|
-
objectMode,
|
|
16271
|
-
writableHighWaterMark: highWaterMark,
|
|
16272
|
-
readableHighWaterMark: highWaterMark
|
|
16273
|
-
});
|
|
16274
|
-
for (const stream of streams) {
|
|
16275
|
-
passThroughStream.add(stream);
|
|
16276
|
-
}
|
|
16277
|
-
if (streams.length === 0) {
|
|
16278
|
-
endStream(passThroughStream);
|
|
16279
|
-
}
|
|
16280
|
-
return passThroughStream;
|
|
16281
|
-
}
|
|
16282
|
-
const getHighWaterMark = (streams, objectMode) => {
|
|
16283
|
-
if (streams.length === 0) {
|
|
16284
|
-
// @todo Use `node:stream` `getDefaultHighWaterMark(objectMode)` in next major release
|
|
16285
|
-
return 16_384;
|
|
16286
|
-
}
|
|
16287
|
-
const highWaterMarks = streams.filter(({
|
|
16288
|
-
readableObjectMode
|
|
16289
|
-
}) => readableObjectMode === objectMode).map(({
|
|
16290
|
-
readableHighWaterMark
|
|
16291
|
-
}) => readableHighWaterMark);
|
|
16292
|
-
return Math.max(...highWaterMarks);
|
|
16293
|
-
};
|
|
16294
|
-
class MergedStream extends _nodeStream.PassThrough {
|
|
16295
|
-
#streams = new Set([]);
|
|
16296
|
-
#ended = new Set([]);
|
|
16297
|
-
#aborted = new Set([]);
|
|
16298
|
-
#onFinished;
|
|
16299
|
-
add(stream) {
|
|
16300
|
-
validateStream(stream);
|
|
16301
|
-
if (this.#streams.has(stream)) {
|
|
16302
|
-
return;
|
|
16303
|
-
}
|
|
16304
|
-
this.#streams.add(stream);
|
|
16305
|
-
this.#onFinished ??= onMergedStreamFinished(this, this.#streams);
|
|
16306
|
-
endWhenStreamsDone({
|
|
16307
|
-
passThroughStream: this,
|
|
16308
|
-
stream,
|
|
16309
|
-
streams: this.#streams,
|
|
16310
|
-
ended: this.#ended,
|
|
16311
|
-
aborted: this.#aborted,
|
|
16312
|
-
onFinished: this.#onFinished
|
|
16313
|
-
});
|
|
16314
|
-
stream.pipe(this, {
|
|
16315
|
-
end: false
|
|
16316
|
-
});
|
|
16317
|
-
}
|
|
16318
|
-
remove(stream) {
|
|
16319
|
-
validateStream(stream);
|
|
16320
|
-
if (!this.#streams.has(stream)) {
|
|
16321
|
-
return false;
|
|
16322
|
-
}
|
|
16323
|
-
stream.unpipe(this);
|
|
16324
|
-
return true;
|
|
16325
|
-
}
|
|
16326
|
-
}
|
|
16327
|
-
const onMergedStreamFinished = async (passThroughStream, streams) => {
|
|
16328
|
-
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT);
|
|
16329
|
-
const controller = new AbortController();
|
|
16330
|
-
try {
|
|
16331
|
-
await Promise.race([onMergedStreamEnd(passThroughStream, controller), onInputStreamsUnpipe(passThroughStream, streams, controller)]);
|
|
16332
|
-
} finally {
|
|
16333
|
-
controller.abort();
|
|
16334
|
-
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_COUNT);
|
|
16335
|
-
}
|
|
16336
|
-
};
|
|
16337
|
-
const onMergedStreamEnd = async (passThroughStream, {
|
|
16338
|
-
signal
|
|
16339
|
-
}) => {
|
|
16340
|
-
await (0, _promises$2.finished)(passThroughStream, {
|
|
16341
|
-
signal,
|
|
16342
|
-
cleanup: true
|
|
16343
|
-
});
|
|
16344
|
-
};
|
|
16345
|
-
const onInputStreamsUnpipe = async (passThroughStream, streams, {
|
|
16346
|
-
signal
|
|
16347
|
-
}) => {
|
|
16348
|
-
for await (const [unpipedStream] of (0, _nodeEvents.on)(passThroughStream, 'unpipe', {
|
|
16349
|
-
signal
|
|
16350
|
-
})) {
|
|
16351
|
-
if (streams.has(unpipedStream)) {
|
|
16352
|
-
unpipedStream.emit(unpipeEvent);
|
|
16353
|
-
}
|
|
16354
|
-
}
|
|
16355
|
-
};
|
|
16356
|
-
const validateStream = stream => {
|
|
16357
|
-
if (typeof stream?.pipe !== 'function') {
|
|
16358
|
-
throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
16359
|
-
}
|
|
16360
|
-
};
|
|
16361
|
-
const endWhenStreamsDone = async ({
|
|
16362
|
-
passThroughStream,
|
|
16363
|
-
stream,
|
|
16364
|
-
streams,
|
|
16365
|
-
ended,
|
|
16366
|
-
aborted,
|
|
16367
|
-
onFinished
|
|
16368
|
-
}) => {
|
|
16369
|
-
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
16370
|
-
const controller = new AbortController();
|
|
16371
|
-
try {
|
|
16372
|
-
await Promise.race([afterMergedStreamFinished(onFinished, stream), onInputStreamEnd({
|
|
16373
|
-
passThroughStream,
|
|
16374
|
-
stream,
|
|
16375
|
-
streams,
|
|
16376
|
-
ended,
|
|
16377
|
-
aborted,
|
|
16378
|
-
controller
|
|
16379
|
-
}), onInputStreamUnpipe({
|
|
16380
|
-
stream,
|
|
16381
|
-
streams,
|
|
16382
|
-
ended,
|
|
16383
|
-
aborted,
|
|
16384
|
-
controller
|
|
16385
|
-
})]);
|
|
16386
|
-
} finally {
|
|
16387
|
-
controller.abort();
|
|
16388
|
-
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
16389
|
-
}
|
|
16390
|
-
if (streams.size === ended.size + aborted.size) {
|
|
16391
|
-
if (ended.size === 0 && aborted.size > 0) {
|
|
16392
|
-
abortStream(passThroughStream);
|
|
16393
|
-
} else {
|
|
16394
|
-
endStream(passThroughStream);
|
|
16395
|
-
}
|
|
16396
|
-
}
|
|
16397
|
-
};
|
|
16398
|
-
|
|
16399
|
-
// This is the error thrown by `finished()` on `stream.destroy()`
|
|
16400
|
-
const isAbortError = error => error?.code === 'ERR_STREAM_PREMATURE_CLOSE';
|
|
16401
|
-
const afterMergedStreamFinished = async (onFinished, stream) => {
|
|
16402
|
-
try {
|
|
16403
|
-
await onFinished;
|
|
16404
|
-
abortStream(stream);
|
|
16405
|
-
} catch (error) {
|
|
16406
|
-
if (isAbortError(error)) {
|
|
16407
|
-
abortStream(stream);
|
|
16408
|
-
} else {
|
|
16409
|
-
errorStream(stream, error);
|
|
16410
|
-
}
|
|
16411
|
-
}
|
|
16412
|
-
};
|
|
16413
|
-
const onInputStreamEnd = async ({
|
|
16414
|
-
passThroughStream,
|
|
16415
|
-
stream,
|
|
16416
|
-
streams,
|
|
16417
|
-
ended,
|
|
16418
|
-
aborted,
|
|
16419
|
-
controller: {
|
|
16420
|
-
signal
|
|
16421
|
-
}
|
|
16422
|
-
}) => {
|
|
16423
|
-
try {
|
|
16424
|
-
await (0, _promises$2.finished)(stream, {
|
|
16425
|
-
signal,
|
|
16426
|
-
cleanup: true,
|
|
16427
|
-
readable: true,
|
|
16428
|
-
writable: false
|
|
16429
|
-
});
|
|
16430
|
-
if (streams.has(stream)) {
|
|
16431
|
-
ended.add(stream);
|
|
16432
|
-
}
|
|
16433
|
-
} catch (error) {
|
|
16434
|
-
if (signal.aborted || !streams.has(stream)) {
|
|
16435
|
-
return;
|
|
16436
|
-
}
|
|
16437
|
-
if (isAbortError(error)) {
|
|
16438
|
-
aborted.add(stream);
|
|
16439
|
-
} else {
|
|
16440
|
-
errorStream(passThroughStream, error);
|
|
16441
|
-
}
|
|
16442
|
-
}
|
|
16443
|
-
};
|
|
16444
|
-
const onInputStreamUnpipe = async ({
|
|
16445
|
-
stream,
|
|
16446
|
-
streams,
|
|
16447
|
-
ended,
|
|
16448
|
-
aborted,
|
|
16449
|
-
controller: {
|
|
16450
|
-
signal
|
|
16451
|
-
}
|
|
16452
|
-
}) => {
|
|
16453
|
-
await (0, _nodeEvents.once)(stream, unpipeEvent, {
|
|
16454
|
-
signal
|
|
16455
|
-
});
|
|
16456
|
-
streams.delete(stream);
|
|
16457
|
-
ended.delete(stream);
|
|
16458
|
-
aborted.delete(stream);
|
|
16459
|
-
};
|
|
16460
|
-
const unpipeEvent = Symbol('unpipe');
|
|
16461
|
-
const endStream = stream => {
|
|
16462
|
-
if (stream.writable) {
|
|
16463
|
-
stream.end();
|
|
16464
|
-
}
|
|
16465
|
-
};
|
|
16466
|
-
const abortStream = stream => {
|
|
16467
|
-
if (stream.readable || stream.writable) {
|
|
16468
|
-
stream.destroy();
|
|
16469
|
-
}
|
|
16470
|
-
};
|
|
16471
|
-
|
|
16472
|
-
// `stream.destroy(error)` crashes the process with `uncaughtException` if no `error` event listener exists on `stream`.
|
|
16473
|
-
// We take care of error handling on user behalf, so we do not want this to happen.
|
|
16474
|
-
const errorStream = (stream, error) => {
|
|
16475
|
-
if (!stream.destroyed) {
|
|
16476
|
-
stream.once('error', noop);
|
|
16477
|
-
stream.destroy(error);
|
|
16478
|
-
}
|
|
16479
|
-
};
|
|
16480
|
-
const noop = () => {};
|
|
16481
|
-
const updateMaxListeners = (passThroughStream, increment) => {
|
|
16482
|
-
const maxListeners = passThroughStream.getMaxListeners();
|
|
16483
|
-
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) {
|
|
16484
|
-
passThroughStream.setMaxListeners(maxListeners + increment);
|
|
16485
|
-
}
|
|
16486
|
-
};
|
|
16487
|
-
|
|
16488
|
-
// Number of times `passThroughStream.on()` is called regardless of streams:
|
|
16489
|
-
// - once due to `finished(passThroughStream)`
|
|
16490
|
-
// - once due to `on(passThroughStream)`
|
|
16491
|
-
const PASSTHROUGH_LISTENERS_COUNT = 2;
|
|
16492
|
-
|
|
16493
|
-
// Number of times `passThroughStream.on()` is called per stream:
|
|
16494
|
-
// - once due to `stream.pipe(passThroughStream)`
|
|
16495
|
-
const PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
16496
|
-
|
|
16497
|
-
var pathType = {};
|
|
16498
|
-
|
|
16499
|
-
var _interopRequireWildcard$1 = interopRequireWildcard.default;
|
|
16500
|
-
Object.defineProperty(pathType, "__esModule", {
|
|
16501
|
-
value: true
|
|
16502
|
-
});
|
|
16503
|
-
pathType.isSymlinkSync = pathType.isSymlink = pathType.isFileSync = pathType.isFile = pathType.isDirectorySync = pathType.isDirectory = void 0;
|
|
16504
|
-
var _fs = _interopRequireWildcard$1(require$$0$3, true);
|
|
16505
|
-
async function isType(fsStatType, statsMethodName, filePath) {
|
|
16506
|
-
if (typeof filePath !== 'string') {
|
|
16507
|
-
throw new TypeError(`Expected a string, got ${typeof filePath}`);
|
|
16508
|
-
}
|
|
16509
|
-
try {
|
|
16510
|
-
const stats = await _fs.promises[fsStatType](filePath);
|
|
16511
|
-
return stats[statsMethodName]();
|
|
16512
|
-
} catch (error) {
|
|
16513
|
-
if (error.code === 'ENOENT') {
|
|
16514
|
-
return false;
|
|
16515
|
-
}
|
|
16516
|
-
throw error;
|
|
16517
|
-
}
|
|
16518
|
-
}
|
|
16519
|
-
function isTypeSync(fsStatType, statsMethodName, filePath) {
|
|
16520
|
-
if (typeof filePath !== 'string') {
|
|
16521
|
-
throw new TypeError(`Expected a string, got ${typeof filePath}`);
|
|
16522
|
-
}
|
|
16523
|
-
try {
|
|
16524
|
-
return _fs.default[fsStatType](filePath)[statsMethodName]();
|
|
16525
|
-
} catch (error) {
|
|
16526
|
-
if (error.code === 'ENOENT') {
|
|
16527
|
-
return false;
|
|
16528
|
-
}
|
|
16529
|
-
throw error;
|
|
16530
|
-
}
|
|
16531
|
-
}
|
|
16532
|
-
pathType.isFile = isType.bind(null, 'stat', 'isFile');
|
|
16533
|
-
pathType.isDirectory = isType.bind(null, 'stat', 'isDirectory');
|
|
16534
|
-
pathType.isSymlink = isType.bind(null, 'lstat', 'isSymbolicLink');
|
|
16535
|
-
pathType.isFileSync = isTypeSync.bind(null, 'statSync', 'isFile');
|
|
16536
|
-
pathType.isDirectorySync = isTypeSync.bind(null, 'statSync', 'isDirectory');
|
|
16537
|
-
pathType.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink');
|
|
16538
|
-
|
|
16539
|
-
var node = {};
|
|
16540
|
-
|
|
16541
|
-
var _default = {};
|
|
16542
|
-
|
|
16543
|
-
Object.defineProperty(_default, "__esModule", {
|
|
16544
|
-
value: true
|
|
16545
|
-
});
|
|
16546
|
-
_default.delay = delay;
|
|
16547
|
-
async function delay({
|
|
16548
|
-
seconds,
|
|
16549
|
-
milliseconds
|
|
16550
|
-
} = {}) {
|
|
16551
|
-
let duration;
|
|
16552
|
-
if (typeof seconds === 'number') {
|
|
16553
|
-
duration = seconds * 1000;
|
|
16554
|
-
} else if (typeof milliseconds === 'number') {
|
|
16555
|
-
duration = milliseconds;
|
|
16556
|
-
} else {
|
|
16557
|
-
throw new TypeError('Expected an object with either `seconds` or `milliseconds`.');
|
|
16558
|
-
}
|
|
16559
|
-
return new Promise(resolve => {
|
|
16560
|
-
setTimeout(resolve, duration);
|
|
16561
|
-
});
|
|
16562
|
-
}
|
|
16563
|
-
|
|
16564
|
-
(function (exports) {
|
|
16565
|
-
|
|
16566
|
-
Object.defineProperty(exports, "__esModule", {
|
|
16567
|
-
value: true
|
|
16568
|
-
});
|
|
16569
|
-
var _exportNames = {
|
|
16570
|
-
toPath: true
|
|
16571
|
-
};
|
|
16572
|
-
exports.toPath = toPath;
|
|
16573
|
-
var _nodeUrl = require$$2$4;
|
|
16574
|
-
var _default$1 = _default;
|
|
16575
|
-
Object.keys(_default$1).forEach(function (key) {
|
|
16576
|
-
if (key === "default" || key === "__esModule") return;
|
|
16577
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
16578
|
-
if (key in exports && exports[key] === _default$1[key]) return;
|
|
16579
|
-
Object.defineProperty(exports, key, {
|
|
16580
|
-
enumerable: true,
|
|
16581
|
-
get: function () {
|
|
16582
|
-
return _default$1[key];
|
|
16583
|
-
}
|
|
16584
|
-
});
|
|
16585
|
-
});
|
|
16586
|
-
function toPath(urlOrPath) {
|
|
16587
|
-
return urlOrPath instanceof URL ? (0, _nodeUrl.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
16588
|
-
}
|
|
16589
|
-
} (node));
|
|
16590
|
-
|
|
16591
|
-
var ignore$1 = {};
|
|
16592
|
-
|
|
16593
|
-
// A simple implementation of make-array
|
|
16594
|
-
function makeArray(subject) {
|
|
16595
|
-
return Array.isArray(subject) ? subject : [subject];
|
|
16596
|
-
}
|
|
16597
|
-
const EMPTY = '';
|
|
16598
|
-
const SPACE = ' ';
|
|
16599
|
-
const ESCAPE = '\\';
|
|
16600
|
-
const REGEX_TEST_BLANK_LINE = /^\s+$/;
|
|
16601
|
-
const REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
|
|
16602
|
-
const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
|
|
16603
|
-
const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
|
|
16604
|
-
const REGEX_SPLITALL_CRLF = /\r?\n/g;
|
|
16605
|
-
// /foo,
|
|
16606
|
-
// ./foo,
|
|
16607
|
-
// ../foo,
|
|
16608
|
-
// .
|
|
16609
|
-
// ..
|
|
16610
|
-
const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/;
|
|
16611
|
-
const SLASH = '/';
|
|
16612
|
-
|
|
16613
|
-
// Do not use ternary expression here, since "istanbul ignore next" is buggy
|
|
16614
|
-
let TMP_KEY_IGNORE = 'node-ignore';
|
|
16615
|
-
/* istanbul ignore else */
|
|
16616
|
-
if (typeof Symbol !== 'undefined') {
|
|
16617
|
-
TMP_KEY_IGNORE = Symbol.for('node-ignore');
|
|
16618
|
-
}
|
|
16619
|
-
const KEY_IGNORE = TMP_KEY_IGNORE;
|
|
16620
|
-
const define = (object, key, value) => Object.defineProperty(object, key, {
|
|
16621
|
-
value
|
|
16622
|
-
});
|
|
16623
|
-
const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
|
|
16624
|
-
const RETURN_FALSE = () => false;
|
|
16625
|
-
|
|
16626
|
-
// Sanitize the range of a regular expression
|
|
16627
|
-
// The cases are complicated, see test cases for details
|
|
16628
|
-
const sanitizeRange = range => range.replace(REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match
|
|
16629
|
-
// Invalid range (out of order) which is ok for gitignore rules but
|
|
16630
|
-
// fatal for JavaScript regular expression, so eliminate it.
|
|
16631
|
-
: EMPTY);
|
|
16632
|
-
|
|
16633
|
-
// See fixtures #59
|
|
16634
|
-
const cleanRangeBackSlash = slashes => {
|
|
16635
|
-
const {
|
|
16636
|
-
length
|
|
16637
|
-
} = slashes;
|
|
16638
|
-
return slashes.slice(0, length - length % 2);
|
|
16639
|
-
};
|
|
16640
|
-
|
|
16641
|
-
// > If the pattern ends with a slash,
|
|
16642
|
-
// > it is removed for the purpose of the following description,
|
|
16643
|
-
// > but it would only find a match with a directory.
|
|
16644
|
-
// > In other words, foo/ will match a directory foo and paths underneath it,
|
|
16645
|
-
// > but will not match a regular file or a symbolic link foo
|
|
16646
|
-
// > (this is consistent with the way how pathspec works in general in Git).
|
|
16647
|
-
// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'
|
|
16648
|
-
// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call
|
|
16649
|
-
// you could use option `mark: true` with `glob`
|
|
16650
|
-
|
|
16651
|
-
// '`foo/`' should not continue with the '`..`'
|
|
16652
|
-
const REPLACERS = [[
|
|
16653
|
-
// remove BOM
|
|
16654
|
-
// TODO:
|
|
16655
|
-
// Other similar zero-width characters?
|
|
16656
|
-
/^\uFEFF/, () => EMPTY],
|
|
16657
|
-
// > Trailing spaces are ignored unless they are quoted with backslash ("\")
|
|
16658
|
-
[
|
|
16659
|
-
// (a\ ) -> (a )
|
|
16660
|
-
// (a ) -> (a)
|
|
16661
|
-
// (a ) -> (a)
|
|
16662
|
-
// (a \ ) -> (a )
|
|
16663
|
-
/((?:\\\\)*?)(\\?\s+)$/, (_, m1, m2) => m1 + (m2.indexOf('\\') === 0 ? SPACE : EMPTY)],
|
|
16664
|
-
// replace (\ ) with ' '
|
|
16665
|
-
// (\ ) -> ' '
|
|
16666
|
-
// (\\ ) -> '\\ '
|
|
16667
|
-
// (\\\ ) -> '\\ '
|
|
16668
|
-
[/(\\+?)\s/g, (_, m1) => {
|
|
16669
|
-
const {
|
|
16670
|
-
length
|
|
16671
|
-
} = m1;
|
|
16672
|
-
return m1.slice(0, length - length % 2) + SPACE;
|
|
16673
|
-
}],
|
|
16674
|
-
// Escape metacharacters
|
|
16675
|
-
// which is written down by users but means special for regular expressions.
|
|
16676
|
-
|
|
16677
|
-
// > There are 12 characters with special meanings:
|
|
16678
|
-
// > - the backslash \,
|
|
16679
|
-
// > - the caret ^,
|
|
16680
|
-
// > - the dollar sign $,
|
|
16681
|
-
// > - the period or dot .,
|
|
16682
|
-
// > - the vertical bar or pipe symbol |,
|
|
16683
|
-
// > - the question mark ?,
|
|
16684
|
-
// > - the asterisk or star *,
|
|
16685
|
-
// > - the plus sign +,
|
|
16686
|
-
// > - the opening parenthesis (,
|
|
16687
|
-
// > - the closing parenthesis ),
|
|
16688
|
-
// > - and the opening square bracket [,
|
|
16689
|
-
// > - the opening curly brace {,
|
|
16690
|
-
// > These special characters are often called "metacharacters".
|
|
16691
|
-
[/[\\$.|*+(){^]/g, match => `\\${match}`], [
|
|
16692
|
-
// > a question mark (?) matches a single character
|
|
16693
|
-
/(?!\\)\?/g, () => '[^/]'],
|
|
16694
|
-
// leading slash
|
|
16695
|
-
[
|
|
16696
|
-
// > A leading slash matches the beginning of the pathname.
|
|
16697
|
-
// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
|
|
16698
|
-
// A leading slash matches the beginning of the pathname
|
|
16699
|
-
/^\//, () => '^'],
|
|
16700
|
-
// replace special metacharacter slash after the leading slash
|
|
16701
|
-
[/\//g, () => '\\/'], [
|
|
16702
|
-
// > A leading "**" followed by a slash means match in all directories.
|
|
16703
|
-
// > For example, "**/foo" matches file or directory "foo" anywhere,
|
|
16704
|
-
// > the same as pattern "foo".
|
|
16705
|
-
// > "**/foo/bar" matches file or directory "bar" anywhere that is directly
|
|
16706
|
-
// > under directory "foo".
|
|
16707
|
-
// Notice that the '*'s have been replaced as '\\*'
|
|
16708
|
-
/^\^*\\\*\\\*\\\//,
|
|
16709
|
-
// '**/foo' <-> 'foo'
|
|
16710
|
-
() => '^(?:.*\\/)?'],
|
|
16711
|
-
// starting
|
|
16712
|
-
[
|
|
16713
|
-
// there will be no leading '/'
|
|
16714
|
-
// (which has been replaced by section "leading slash")
|
|
16715
|
-
// If starts with '**', adding a '^' to the regular expression also works
|
|
16716
|
-
/^(?=[^^])/, function startingReplacer() {
|
|
16717
|
-
// If has a slash `/` at the beginning or middle
|
|
16718
|
-
return !/\/(?!$)/.test(this)
|
|
16719
|
-
// > Prior to 2.22.1
|
|
16720
|
-
// > If the pattern does not contain a slash /,
|
|
16721
|
-
// > Git treats it as a shell glob pattern
|
|
16722
|
-
// Actually, if there is only a trailing slash,
|
|
16723
|
-
// git also treats it as a shell glob pattern
|
|
16724
|
-
|
|
16725
|
-
// After 2.22.1 (compatible but clearer)
|
|
16726
|
-
// > If there is a separator at the beginning or middle (or both)
|
|
16727
|
-
// > of the pattern, then the pattern is relative to the directory
|
|
16728
|
-
// > level of the particular .gitignore file itself.
|
|
16729
|
-
// > Otherwise the pattern may also match at any level below
|
|
16730
|
-
// > the .gitignore level.
|
|
16731
|
-
? '(?:^|\\/)'
|
|
16732
|
-
|
|
16733
|
-
// > Otherwise, Git treats the pattern as a shell glob suitable for
|
|
16734
|
-
// > consumption by fnmatch(3)
|
|
16735
|
-
: '^';
|
|
16736
|
-
}],
|
|
16737
|
-
// two globstars
|
|
16738
|
-
[
|
|
16739
|
-
// Use lookahead assertions so that we could match more than one `'/**'`
|
|
16740
|
-
/\\\/\\\*\\\*(?=\\\/|$)/g,
|
|
16741
|
-
// Zero, one or several directories
|
|
16742
|
-
// should not use '*', or it will be replaced by the next replacer
|
|
16743
|
-
|
|
16744
|
-
// Check if it is not the last `'/**'`
|
|
16745
|
-
(_, index, str) => index + 6 < str.length
|
|
16746
|
-
|
|
16747
|
-
// case: /**/
|
|
16748
|
-
// > A slash followed by two consecutive asterisks then a slash matches
|
|
16749
|
-
// > zero or more directories.
|
|
16750
|
-
// > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.
|
|
16751
|
-
// '/**/'
|
|
16752
|
-
? '(?:\\/[^\\/]+)*'
|
|
16753
|
-
|
|
16754
|
-
// case: /**
|
|
16755
|
-
// > A trailing `"/**"` matches everything inside.
|
|
16756
|
-
|
|
16757
|
-
// #21: everything inside but it should not include the current folder
|
|
16758
|
-
: '\\/.+'],
|
|
16759
|
-
// normal intermediate wildcards
|
|
16760
|
-
[
|
|
16761
|
-
// Never replace escaped '*'
|
|
16762
|
-
// ignore rule '\*' will match the path '*'
|
|
16763
|
-
|
|
16764
|
-
// 'abc.*/' -> go
|
|
16765
|
-
// 'abc.*' -> skip this rule,
|
|
16766
|
-
// coz trailing single wildcard will be handed by [trailing wildcard]
|
|
16767
|
-
/(^|[^\\]+)(\\\*)+(?=.+)/g,
|
|
16768
|
-
// '*.js' matches '.js'
|
|
16769
|
-
// '*.js' doesn't match 'abc'
|
|
16770
|
-
(_, p1, p2) => {
|
|
16771
|
-
// 1.
|
|
16772
|
-
// > An asterisk "*" matches anything except a slash.
|
|
16773
|
-
// 2.
|
|
16774
|
-
// > Other consecutive asterisks are considered regular asterisks
|
|
16775
|
-
// > and will match according to the previous rules.
|
|
16776
|
-
const unescaped = p2.replace(/\\\*/g, '[^\\/]*');
|
|
16777
|
-
return p1 + unescaped;
|
|
16778
|
-
}], [
|
|
16779
|
-
// unescape, revert step 3 except for back slash
|
|
16780
|
-
// For example, if a user escape a '\\*',
|
|
16781
|
-
// after step 3, the result will be '\\\\\\*'
|
|
16782
|
-
/\\\\\\(?=[$.|*+(){^])/g, () => ESCAPE], [
|
|
16783
|
-
// '\\\\' -> '\\'
|
|
16784
|
-
/\\\\/g, () => ESCAPE], [
|
|
16785
|
-
// > The range notation, e.g. [a-zA-Z],
|
|
16786
|
-
// > can be used to match one of the characters in a range.
|
|
16787
|
-
|
|
16788
|
-
// `\` is escaped by step 3
|
|
16789
|
-
/(\\)?\[([^\]/]*?)(\\*)($|\])/g, (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE
|
|
16790
|
-
// '\\[bar]' -> '\\\\[bar\\]'
|
|
16791
|
-
? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === ']' ? endEscape.length % 2 === 0
|
|
16792
|
-
// A normal case, and it is a range notation
|
|
16793
|
-
// '[bar]'
|
|
16794
|
-
// '[bar\\\\]'
|
|
16795
|
-
? `[${sanitizeRange(range)}${endEscape}]`
|
|
16796
|
-
// Invalid range notaton
|
|
16797
|
-
// '[bar\\]' -> '[bar\\\\]'
|
|
16798
|
-
: '[]' : '[]'],
|
|
16799
|
-
// ending
|
|
16800
|
-
[
|
|
16801
|
-
// 'js' will not match 'js.'
|
|
16802
|
-
// 'ab' will not match 'abc'
|
|
16803
|
-
/(?:[^*])$/,
|
|
16804
|
-
// WTF!
|
|
16805
|
-
// https://git-scm.com/docs/gitignore
|
|
16806
|
-
// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
|
|
16807
|
-
// which re-fixes #24, #38
|
|
16808
|
-
|
|
16809
|
-
// > If there is a separator at the end of the pattern then the pattern
|
|
16810
|
-
// > will only match directories, otherwise the pattern can match both
|
|
16811
|
-
// > files and directories.
|
|
16812
|
-
|
|
16813
|
-
// 'js*' will not match 'a.js'
|
|
16814
|
-
// 'js/' will not match 'a.js'
|
|
16815
|
-
// 'js' will match 'a.js' and 'a.js/'
|
|
16816
|
-
match => /\/$/.test(match)
|
|
16817
|
-
// foo/ will not match 'foo'
|
|
16818
|
-
? `${match}$`
|
|
16819
|
-
// foo matches 'foo' and 'foo/'
|
|
16820
|
-
: `${match}(?=$|\\/$)`],
|
|
16821
|
-
// trailing wildcard
|
|
16822
|
-
[/(\^|\\\/)?\\\*$/, (_, p1) => {
|
|
16823
|
-
const prefix = p1
|
|
16824
|
-
// '\^':
|
|
16825
|
-
// '/*' does not match EMPTY
|
|
16826
|
-
// '/*' does not match everything
|
|
16827
|
-
|
|
16828
|
-
// '\\\/':
|
|
16829
|
-
// 'abc/*' does not match 'abc/'
|
|
16830
|
-
? `${p1}[^/]+`
|
|
16831
|
-
|
|
16832
|
-
// 'a*' matches 'a'
|
|
16833
|
-
// 'a*' matches 'aa'
|
|
16834
|
-
: '[^/]*';
|
|
16835
|
-
return `${prefix}(?=$|\\/$)`;
|
|
16836
|
-
}]];
|
|
16837
|
-
|
|
16838
|
-
// A simple cache, because an ignore rule only has only one certain meaning
|
|
16839
|
-
const regexCache = Object.create(null);
|
|
16840
|
-
|
|
16841
|
-
// @param {pattern}
|
|
16842
|
-
const makeRegex = (pattern, ignoreCase) => {
|
|
16843
|
-
let source = regexCache[pattern];
|
|
16844
|
-
if (!source) {
|
|
16845
|
-
source = REPLACERS.reduce((prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), pattern);
|
|
16846
|
-
regexCache[pattern] = source;
|
|
16847
|
-
}
|
|
16848
|
-
return ignoreCase ? new RegExp(source, 'i') : new RegExp(source);
|
|
16849
|
-
};
|
|
16850
|
-
const isString = subject => typeof subject === 'string';
|
|
16851
|
-
|
|
16852
|
-
// > A blank line matches no files, so it can serve as a separator for readability.
|
|
16853
|
-
const checkPattern = pattern => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)
|
|
16854
|
-
|
|
16855
|
-
// > A line starting with # serves as a comment.
|
|
16856
|
-
&& pattern.indexOf('#') !== 0;
|
|
16857
|
-
const splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF);
|
|
16858
|
-
class IgnoreRule {
|
|
16859
|
-
constructor(origin, pattern, negative, regex) {
|
|
16860
|
-
this.origin = origin;
|
|
16861
|
-
this.pattern = pattern;
|
|
16862
|
-
this.negative = negative;
|
|
16863
|
-
this.regex = regex;
|
|
16864
|
-
}
|
|
16865
|
-
}
|
|
16866
|
-
const createRule = (pattern, ignoreCase) => {
|
|
16867
|
-
const origin = pattern;
|
|
16868
|
-
let negative = false;
|
|
16869
|
-
|
|
16870
|
-
// > An optional prefix "!" which negates the pattern;
|
|
16871
|
-
if (pattern.indexOf('!') === 0) {
|
|
16872
|
-
negative = true;
|
|
16873
|
-
pattern = pattern.substr(1);
|
|
16874
|
-
}
|
|
16875
|
-
pattern = pattern
|
|
16876
|
-
// > Put a backslash ("\") in front of the first "!" for patterns that
|
|
16877
|
-
// > begin with a literal "!", for example, `"\!important!.txt"`.
|
|
16878
|
-
.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')
|
|
16879
|
-
// > Put a backslash ("\") in front of the first hash for patterns that
|
|
16880
|
-
// > begin with a hash.
|
|
16881
|
-
.replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#');
|
|
16882
|
-
const regex = makeRegex(pattern, ignoreCase);
|
|
16883
|
-
return new IgnoreRule(origin, pattern, negative, regex);
|
|
16884
|
-
};
|
|
16885
|
-
const throwError = (message, Ctor) => {
|
|
16886
|
-
throw new Ctor(message);
|
|
16887
|
-
};
|
|
16888
|
-
const checkPath = (path, originalPath, doThrow) => {
|
|
16889
|
-
if (!isString(path)) {
|
|
16890
|
-
return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
|
|
16891
|
-
}
|
|
16892
|
-
|
|
16893
|
-
// We don't know if we should ignore EMPTY, so throw
|
|
16894
|
-
if (!path) {
|
|
16895
|
-
return doThrow(`path must not be empty`, TypeError);
|
|
16896
|
-
}
|
|
16897
|
-
|
|
16898
|
-
// Check if it is a relative path
|
|
16899
|
-
if (checkPath.isNotRelative(path)) {
|
|
16900
|
-
const r = '`path.relative()`d';
|
|
16901
|
-
return doThrow(`path should be a ${r} string, but got "${originalPath}"`, RangeError);
|
|
16902
|
-
}
|
|
16903
|
-
return true;
|
|
16904
|
-
};
|
|
16905
|
-
const isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path);
|
|
16906
|
-
checkPath.isNotRelative = isNotRelative;
|
|
16907
|
-
checkPath.convert = p => p;
|
|
16908
|
-
class Ignore {
|
|
16909
|
-
constructor({
|
|
16910
|
-
ignorecase = true,
|
|
16911
|
-
ignoreCase = ignorecase,
|
|
16912
|
-
allowRelativePaths = false
|
|
16913
|
-
} = {}) {
|
|
16914
|
-
define(this, KEY_IGNORE, true);
|
|
16915
|
-
this._rules = [];
|
|
16916
|
-
this._ignoreCase = ignoreCase;
|
|
16917
|
-
this._allowRelativePaths = allowRelativePaths;
|
|
16918
|
-
this._initCache();
|
|
16919
|
-
}
|
|
16920
|
-
_initCache() {
|
|
16921
|
-
this._ignoreCache = Object.create(null);
|
|
16922
|
-
this._testCache = Object.create(null);
|
|
16923
|
-
}
|
|
16924
|
-
_addPattern(pattern) {
|
|
16925
|
-
// #32
|
|
16926
|
-
if (pattern && pattern[KEY_IGNORE]) {
|
|
16927
|
-
this._rules = this._rules.concat(pattern._rules);
|
|
16928
|
-
this._added = true;
|
|
16929
|
-
return;
|
|
16930
|
-
}
|
|
16931
|
-
if (checkPattern(pattern)) {
|
|
16932
|
-
const rule = createRule(pattern, this._ignoreCase);
|
|
16933
|
-
this._added = true;
|
|
16934
|
-
this._rules.push(rule);
|
|
16935
|
-
}
|
|
16936
|
-
}
|
|
16937
|
-
|
|
16938
|
-
// @param {Array<string> | string | Ignore} pattern
|
|
16939
|
-
add(pattern) {
|
|
16940
|
-
this._added = false;
|
|
16941
|
-
makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._addPattern, this);
|
|
16942
|
-
|
|
16943
|
-
// Some rules have just added to the ignore,
|
|
16944
|
-
// making the behavior changed.
|
|
16945
|
-
if (this._added) {
|
|
16946
|
-
this._initCache();
|
|
16947
|
-
}
|
|
16948
|
-
return this;
|
|
16949
|
-
}
|
|
16950
|
-
|
|
16951
|
-
// legacy
|
|
16952
|
-
addPattern(pattern) {
|
|
16953
|
-
return this.add(pattern);
|
|
16954
|
-
}
|
|
16955
|
-
|
|
16956
|
-
// | ignored : unignored
|
|
16957
|
-
// negative | 0:0 | 0:1 | 1:0 | 1:1
|
|
16958
|
-
// -------- | ------- | ------- | ------- | --------
|
|
16959
|
-
// 0 | TEST | TEST | SKIP | X
|
|
16960
|
-
// 1 | TESTIF | SKIP | TEST | X
|
|
16961
|
-
|
|
16962
|
-
// - SKIP: always skip
|
|
16963
|
-
// - TEST: always test
|
|
16964
|
-
// - TESTIF: only test if checkUnignored
|
|
16965
|
-
// - X: that never happen
|
|
16966
|
-
|
|
16967
|
-
// @param {boolean} whether should check if the path is unignored,
|
|
16968
|
-
// setting `checkUnignored` to `false` could reduce additional
|
|
16969
|
-
// path matching.
|
|
16970
|
-
|
|
16971
|
-
// @returns {TestResult} true if a file is ignored
|
|
16972
|
-
_testOne(path, checkUnignored) {
|
|
16973
|
-
let ignored = false;
|
|
16974
|
-
let unignored = false;
|
|
16975
|
-
this._rules.forEach(rule => {
|
|
16976
|
-
const {
|
|
16977
|
-
negative
|
|
16978
|
-
} = rule;
|
|
16979
|
-
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
16980
|
-
return;
|
|
16981
|
-
}
|
|
16982
|
-
const matched = rule.regex.test(path);
|
|
16983
|
-
if (matched) {
|
|
16984
|
-
ignored = !negative;
|
|
16985
|
-
unignored = negative;
|
|
16986
|
-
}
|
|
16987
|
-
});
|
|
16988
|
-
return {
|
|
16989
|
-
ignored,
|
|
16990
|
-
unignored
|
|
16991
|
-
};
|
|
16992
|
-
}
|
|
16993
|
-
|
|
16994
|
-
// @returns {TestResult}
|
|
16995
|
-
_test(originalPath, cache, checkUnignored, slices) {
|
|
16996
|
-
const path = originalPath
|
|
16997
|
-
// Supports nullable path
|
|
16998
|
-
&& checkPath.convert(originalPath);
|
|
16999
|
-
checkPath(path, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
|
|
17000
|
-
return this._t(path, cache, checkUnignored, slices);
|
|
17001
|
-
}
|
|
17002
|
-
_t(path, cache, checkUnignored, slices) {
|
|
17003
|
-
if (path in cache) {
|
|
17004
|
-
return cache[path];
|
|
17005
|
-
}
|
|
17006
|
-
if (!slices) {
|
|
17007
|
-
// path/to/a.js
|
|
17008
|
-
// ['path', 'to', 'a.js']
|
|
17009
|
-
slices = path.split(SLASH);
|
|
17010
|
-
}
|
|
17011
|
-
slices.pop();
|
|
17012
|
-
|
|
17013
|
-
// If the path has no parent directory, just test it
|
|
17014
|
-
if (!slices.length) {
|
|
17015
|
-
return cache[path] = this._testOne(path, checkUnignored);
|
|
17016
|
-
}
|
|
17017
|
-
const parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices);
|
|
17018
|
-
|
|
17019
|
-
// If the path contains a parent directory, check the parent first
|
|
17020
|
-
return cache[path] = parent.ignored
|
|
17021
|
-
// > It is not possible to re-include a file if a parent directory of
|
|
17022
|
-
// > that file is excluded.
|
|
17023
|
-
? parent : this._testOne(path, checkUnignored);
|
|
17024
|
-
}
|
|
17025
|
-
ignores(path) {
|
|
17026
|
-
return this._test(path, this._ignoreCache, false).ignored;
|
|
17027
|
-
}
|
|
17028
|
-
createFilter() {
|
|
17029
|
-
return path => !this.ignores(path);
|
|
17030
|
-
}
|
|
17031
|
-
filter(paths) {
|
|
17032
|
-
return makeArray(paths).filter(this.createFilter());
|
|
17033
|
-
}
|
|
17034
|
-
|
|
17035
|
-
// @returns {TestResult}
|
|
17036
|
-
test(path) {
|
|
17037
|
-
return this._test(path, this._testCache, true);
|
|
17038
|
-
}
|
|
17039
|
-
}
|
|
17040
|
-
const factory = options => new Ignore(options);
|
|
17041
|
-
const isPathValid = path => checkPath(path && checkPath.convert(path), path, RETURN_FALSE);
|
|
17042
|
-
factory.isPathValid = isPathValid;
|
|
17043
|
-
|
|
17044
|
-
// Fixes typescript
|
|
17045
|
-
factory.default = factory;
|
|
17046
|
-
var ignore = factory;
|
|
17047
|
-
|
|
17048
|
-
// Windows
|
|
17049
|
-
// --------------------------------------------------------------
|
|
17050
|
-
/* istanbul ignore if */
|
|
17051
|
-
if (
|
|
17052
|
-
// Detect `process` so that it can run in browsers.
|
|
17053
|
-
typeof process !== 'undefined' && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === 'win32')) {
|
|
17054
|
-
/* eslint no-control-regex: "off" */
|
|
17055
|
-
const makePosix = str => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, '/');
|
|
17056
|
-
checkPath.convert = makePosix;
|
|
17057
|
-
|
|
17058
|
-
// 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/'
|
|
17059
|
-
// 'd:\\foo'
|
|
17060
|
-
const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
17061
|
-
checkPath.isNotRelative = path => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path);
|
|
17062
|
-
}
|
|
17063
|
-
|
|
17064
|
-
var slash$1 = {};
|
|
17065
|
-
|
|
17066
|
-
Object.defineProperty(slash$1, "__esModule", {
|
|
17067
|
-
value: true
|
|
17068
|
-
});
|
|
17069
|
-
slash$1.default = slash;
|
|
17070
|
-
function slash(path) {
|
|
17071
|
-
const isExtendedLengthPath = path.startsWith('\\\\?\\');
|
|
17072
|
-
if (isExtendedLengthPath) {
|
|
17073
|
-
return path;
|
|
17074
|
-
}
|
|
17075
|
-
return path.replace(/\\/g, '/');
|
|
17076
|
-
}
|
|
17077
|
-
|
|
17078
|
-
var utilities = {};
|
|
17079
|
-
|
|
17080
|
-
Object.defineProperty(utilities, "__esModule", {
|
|
17081
|
-
value: true
|
|
17082
|
-
});
|
|
17083
|
-
utilities.isNegativePattern = void 0;
|
|
17084
|
-
const isNegativePattern = pattern => pattern[0] === '!';
|
|
17085
|
-
utilities.isNegativePattern = isNegativePattern;
|
|
17086
|
-
|
|
17087
|
-
Object.defineProperty(ignore$1, "__esModule", {
|
|
17088
|
-
value: true
|
|
17089
|
-
});
|
|
17090
|
-
ignore$1.isIgnoredByIgnoreFilesSync = ignore$1.isIgnoredByIgnoreFiles = ignore$1.isGitIgnoredSync = ignore$1.isGitIgnored = ignore$1.GITIGNORE_FILES_PATTERN = void 0;
|
|
17091
|
-
var _nodeProcess$5 = require$$0$2;
|
|
17092
|
-
var _nodeFs$3 = require$$0$3;
|
|
17093
|
-
var _promises$1 = require$$1$2;
|
|
17094
|
-
var _nodePath$1 = require$$1;
|
|
17095
|
-
var _fastGlob = require$$4;
|
|
17096
|
-
var _ignore = ignore;
|
|
17097
|
-
var _slash = slash$1;
|
|
17098
|
-
var _unicornMagic = node;
|
|
17099
|
-
var _utilities = utilities;
|
|
17100
|
-
const defaultIgnoredDirectories = ['**/node_modules', '**/flow-typed', '**/coverage', '**/.git'];
|
|
17101
|
-
const ignoreFilesGlobOptions = {
|
|
17102
|
-
absolute: true,
|
|
17103
|
-
dot: true
|
|
17104
|
-
};
|
|
17105
|
-
const GITIGNORE_FILES_PATTERN = ignore$1.GITIGNORE_FILES_PATTERN = '**/.gitignore';
|
|
17106
|
-
const applyBaseToPattern = (pattern, base) => (0, _utilities.isNegativePattern)(pattern) ? '!' + _nodePath$1.posix.join(base, pattern.slice(1)) : _nodePath$1.posix.join(base, pattern);
|
|
17107
|
-
const parseIgnoreFile = (file, cwd) => {
|
|
17108
|
-
const base = (0, _slash.default)(_nodePath$1.relative(cwd, _nodePath$1.dirname(file.filePath)));
|
|
17109
|
-
return file.content.split(/\r?\n/).filter(line => line && !line.startsWith('#')).map(pattern => applyBaseToPattern(pattern, base));
|
|
17110
|
-
};
|
|
17111
|
-
const toRelativePath = (fileOrDirectory, cwd) => {
|
|
17112
|
-
cwd = (0, _slash.default)(cwd);
|
|
17113
|
-
if (_nodePath$1.isAbsolute(fileOrDirectory)) {
|
|
17114
|
-
if ((0, _slash.default)(fileOrDirectory).startsWith(cwd)) {
|
|
17115
|
-
return _nodePath$1.relative(cwd, fileOrDirectory);
|
|
17116
|
-
}
|
|
17117
|
-
throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);
|
|
17118
|
-
}
|
|
17119
|
-
return fileOrDirectory;
|
|
17120
|
-
};
|
|
17121
|
-
const getIsIgnoredPredicate = (files, cwd) => {
|
|
17122
|
-
const patterns = files.flatMap(file => parseIgnoreFile(file, cwd));
|
|
17123
|
-
const ignores = _ignore().add(patterns);
|
|
17124
|
-
return fileOrDirectory => {
|
|
17125
|
-
fileOrDirectory = (0, _unicornMagic.toPath)(fileOrDirectory);
|
|
17126
|
-
fileOrDirectory = toRelativePath(fileOrDirectory, cwd);
|
|
17127
|
-
return fileOrDirectory ? ignores.ignores((0, _slash.default)(fileOrDirectory)) : false;
|
|
17128
|
-
};
|
|
17129
|
-
};
|
|
17130
|
-
const normalizeOptions = (options = {}) => ({
|
|
17131
|
-
cwd: (0, _unicornMagic.toPath)(options.cwd) ?? _nodeProcess$5.cwd(),
|
|
17132
|
-
suppressErrors: Boolean(options.suppressErrors),
|
|
17133
|
-
deep: typeof options.deep === 'number' ? options.deep : Number.POSITIVE_INFINITY,
|
|
17134
|
-
ignore: [...(options.ignore ?? []), ...defaultIgnoredDirectories]
|
|
17135
|
-
});
|
|
17136
|
-
const isIgnoredByIgnoreFiles = async (patterns, options) => {
|
|
17137
|
-
const {
|
|
17138
|
-
cwd,
|
|
17139
|
-
suppressErrors,
|
|
17140
|
-
deep,
|
|
17141
|
-
ignore
|
|
17142
|
-
} = normalizeOptions(options);
|
|
17143
|
-
const paths = await _fastGlob(patterns, {
|
|
17144
|
-
cwd,
|
|
17145
|
-
suppressErrors,
|
|
17146
|
-
deep,
|
|
17147
|
-
ignore,
|
|
17148
|
-
...ignoreFilesGlobOptions
|
|
17149
|
-
});
|
|
17150
|
-
const files = await Promise.all(paths.map(async filePath => ({
|
|
17151
|
-
filePath,
|
|
17152
|
-
content: await _promises$1.readFile(filePath, 'utf8')
|
|
17153
|
-
})));
|
|
17154
|
-
return getIsIgnoredPredicate(files, cwd);
|
|
17155
|
-
};
|
|
17156
|
-
ignore$1.isIgnoredByIgnoreFiles = isIgnoredByIgnoreFiles;
|
|
17157
|
-
const isIgnoredByIgnoreFilesSync = (patterns, options) => {
|
|
17158
|
-
const {
|
|
17159
|
-
cwd,
|
|
17160
|
-
suppressErrors,
|
|
17161
|
-
deep,
|
|
17162
|
-
ignore
|
|
17163
|
-
} = normalizeOptions(options);
|
|
17164
|
-
const paths = _fastGlob.sync(patterns, {
|
|
17165
|
-
cwd,
|
|
17166
|
-
suppressErrors,
|
|
17167
|
-
deep,
|
|
17168
|
-
ignore,
|
|
17169
|
-
...ignoreFilesGlobOptions
|
|
17170
|
-
});
|
|
17171
|
-
const files = paths.map(filePath => ({
|
|
17172
|
-
filePath,
|
|
17173
|
-
content: _nodeFs$3.readFileSync(filePath, 'utf8')
|
|
17174
|
-
}));
|
|
17175
|
-
return getIsIgnoredPredicate(files, cwd);
|
|
17176
|
-
};
|
|
17177
|
-
ignore$1.isIgnoredByIgnoreFilesSync = isIgnoredByIgnoreFilesSync;
|
|
17178
|
-
const isGitIgnored = options => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options);
|
|
17179
|
-
ignore$1.isGitIgnored = isGitIgnored;
|
|
17180
|
-
const isGitIgnoredSync = options => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN, options);
|
|
17181
|
-
ignore$1.isGitIgnoredSync = isGitIgnoredSync;
|
|
17182
|
-
|
|
17183
|
-
(function (exports) {
|
|
17184
|
-
|
|
17185
|
-
Object.defineProperty(exports, "__esModule", {
|
|
17186
|
-
value: true
|
|
17187
|
-
});
|
|
17188
|
-
exports.isDynamicPattern = exports.globbySync = exports.globbyStream = exports.globby = exports.generateGlobTasksSync = exports.generateGlobTasks = exports.convertPathToPattern = void 0;
|
|
17189
|
-
Object.defineProperty(exports, "isGitIgnored", {
|
|
17190
|
-
enumerable: true,
|
|
17191
|
-
get: function () {
|
|
17192
|
-
return _ignore.isGitIgnored;
|
|
17193
|
-
}
|
|
17194
|
-
});
|
|
17195
|
-
Object.defineProperty(exports, "isGitIgnoredSync", {
|
|
17196
|
-
enumerable: true,
|
|
17197
|
-
get: function () {
|
|
17198
|
-
return _ignore.isGitIgnoredSync;
|
|
17199
|
-
}
|
|
17200
|
-
});
|
|
17201
|
-
var _nodeProcess = require$$0$2;
|
|
17202
|
-
var _nodeFs = require$$0$3;
|
|
17203
|
-
var _nodePath = require$$1;
|
|
17204
|
-
var _mergeStreams = mergeStreams$1;
|
|
17205
|
-
var _fastGlob = require$$4;
|
|
17206
|
-
var _pathType = pathType;
|
|
17207
|
-
var _unicornMagic = node;
|
|
17208
|
-
var _ignore = ignore$1;
|
|
17209
|
-
var _utilities = utilities;
|
|
17210
|
-
const assertPatternsInput = patterns => {
|
|
17211
|
-
if (patterns.some(pattern => typeof pattern !== 'string')) {
|
|
17212
|
-
throw new TypeError('Patterns must be a string or an array of strings');
|
|
17213
|
-
}
|
|
17214
|
-
};
|
|
17215
|
-
const normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
17216
|
-
const path = (0, _utilities.isNegativePattern)(filePath) ? filePath.slice(1) : filePath;
|
|
17217
|
-
return _nodePath.isAbsolute(path) ? path : _nodePath.join(cwd, path);
|
|
17218
|
-
};
|
|
17219
|
-
const getDirectoryGlob = ({
|
|
17220
|
-
directoryPath,
|
|
17221
|
-
files,
|
|
17222
|
-
extensions
|
|
17223
|
-
}) => {
|
|
17224
|
-
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]}` : '';
|
|
17225
|
-
return files ? files.map(file => _nodePath.posix.join(directoryPath, `**/${_nodePath.extname(file) ? file : `${file}${extensionGlob}`}`)) : [_nodePath.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ''}`)];
|
|
17226
|
-
};
|
|
17227
|
-
const directoryToGlob = async (directoryPaths, {
|
|
17228
|
-
cwd = _nodeProcess.cwd(),
|
|
17229
|
-
files,
|
|
17230
|
-
extensions
|
|
17231
|
-
} = {}) => {
|
|
17232
|
-
const globs = await Promise.all(directoryPaths.map(async directoryPath => (await (0, _pathType.isDirectory)(normalizePathForDirectoryGlob(directoryPath, cwd))) ? getDirectoryGlob({
|
|
17233
|
-
directoryPath,
|
|
17234
|
-
files,
|
|
17235
|
-
extensions
|
|
17236
|
-
}) : directoryPath));
|
|
17237
|
-
return globs.flat();
|
|
17238
|
-
};
|
|
17239
|
-
const directoryToGlobSync = (directoryPaths, {
|
|
17240
|
-
cwd = _nodeProcess.cwd(),
|
|
17241
|
-
files,
|
|
17242
|
-
extensions
|
|
17243
|
-
} = {}) => directoryPaths.flatMap(directoryPath => (0, _pathType.isDirectorySync)(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({
|
|
17244
|
-
directoryPath,
|
|
17245
|
-
files,
|
|
17246
|
-
extensions
|
|
17247
|
-
}) : directoryPath);
|
|
17248
|
-
const toPatternsArray = patterns => {
|
|
17249
|
-
patterns = [...new Set([patterns].flat())];
|
|
17250
|
-
assertPatternsInput(patterns);
|
|
17251
|
-
return patterns;
|
|
17252
|
-
};
|
|
17253
|
-
const checkCwdOption = cwd => {
|
|
17254
|
-
if (!cwd) {
|
|
17255
|
-
return;
|
|
17256
|
-
}
|
|
17257
|
-
let stat;
|
|
17258
|
-
try {
|
|
17259
|
-
stat = _nodeFs.statSync(cwd);
|
|
17260
|
-
} catch {
|
|
17261
|
-
return;
|
|
17262
|
-
}
|
|
17263
|
-
if (!stat.isDirectory()) {
|
|
17264
|
-
throw new Error('The `cwd` option must be a path to a directory');
|
|
17265
|
-
}
|
|
17266
|
-
};
|
|
17267
|
-
const normalizeOptions = (options = {}) => {
|
|
17268
|
-
options = {
|
|
17269
|
-
...options,
|
|
17270
|
-
ignore: options.ignore ?? [],
|
|
17271
|
-
expandDirectories: options.expandDirectories ?? true,
|
|
17272
|
-
cwd: (0, _unicornMagic.toPath)(options.cwd)
|
|
17273
|
-
};
|
|
17274
|
-
checkCwdOption(options.cwd);
|
|
17275
|
-
return options;
|
|
17276
|
-
};
|
|
17277
|
-
const normalizeArguments = function_ => async (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions(options));
|
|
17278
|
-
const normalizeArgumentsSync = function_ => (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions(options));
|
|
17279
|
-
const getIgnoreFilesPatterns = options => {
|
|
17280
|
-
const {
|
|
17281
|
-
ignoreFiles,
|
|
17282
|
-
gitignore
|
|
17283
|
-
} = options;
|
|
17284
|
-
const patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];
|
|
17285
|
-
if (gitignore) {
|
|
17286
|
-
patterns.push(_ignore.GITIGNORE_FILES_PATTERN);
|
|
17287
|
-
}
|
|
17288
|
-
return patterns;
|
|
17289
|
-
};
|
|
17290
|
-
const getFilter = async options => {
|
|
17291
|
-
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
17292
|
-
return createFilterFunction(ignoreFilesPatterns.length > 0 && (await (0, _ignore.isIgnoredByIgnoreFiles)(ignoreFilesPatterns, options)));
|
|
17293
|
-
};
|
|
17294
|
-
const getFilterSync = options => {
|
|
17295
|
-
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
17296
|
-
return createFilterFunction(ignoreFilesPatterns.length > 0 && (0, _ignore.isIgnoredByIgnoreFilesSync)(ignoreFilesPatterns, options));
|
|
17297
|
-
};
|
|
17298
|
-
const createFilterFunction = isIgnored => {
|
|
17299
|
-
const seen = new Set();
|
|
17300
|
-
return fastGlobResult => {
|
|
17301
|
-
const pathKey = _nodePath.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
17302
|
-
if (seen.has(pathKey) || isIgnored && isIgnored(pathKey)) {
|
|
17303
|
-
return false;
|
|
17304
|
-
}
|
|
17305
|
-
seen.add(pathKey);
|
|
17306
|
-
return true;
|
|
17307
|
-
};
|
|
17308
|
-
};
|
|
17309
|
-
const unionFastGlobResults = (results, filter) => results.flat().filter(fastGlobResult => filter(fastGlobResult));
|
|
17310
|
-
const convertNegativePatterns = (patterns, options) => {
|
|
17311
|
-
const tasks = [];
|
|
17312
|
-
while (patterns.length > 0) {
|
|
17313
|
-
const index = patterns.findIndex(pattern => (0, _utilities.isNegativePattern)(pattern));
|
|
17314
|
-
if (index === -1) {
|
|
17315
|
-
tasks.push({
|
|
17316
|
-
patterns,
|
|
17317
|
-
options
|
|
17318
|
-
});
|
|
17319
|
-
break;
|
|
17320
|
-
}
|
|
17321
|
-
const ignorePattern = patterns[index].slice(1);
|
|
17322
|
-
for (const task of tasks) {
|
|
17323
|
-
task.options.ignore.push(ignorePattern);
|
|
17324
|
-
}
|
|
17325
|
-
if (index !== 0) {
|
|
17326
|
-
tasks.push({
|
|
17327
|
-
patterns: patterns.slice(0, index),
|
|
17328
|
-
options: {
|
|
17329
|
-
...options,
|
|
17330
|
-
ignore: [...options.ignore, ignorePattern]
|
|
17331
|
-
}
|
|
17332
|
-
});
|
|
17333
|
-
}
|
|
17334
|
-
patterns = patterns.slice(index + 1);
|
|
17335
|
-
}
|
|
17336
|
-
return tasks;
|
|
17337
|
-
};
|
|
17338
|
-
const normalizeExpandDirectoriesOption = (options, cwd) => ({
|
|
17339
|
-
...(cwd ? {
|
|
17340
|
-
cwd
|
|
17341
|
-
} : {}),
|
|
17342
|
-
...(Array.isArray(options) ? {
|
|
17343
|
-
files: options
|
|
17344
|
-
} : options)
|
|
17345
|
-
});
|
|
17346
|
-
const generateTasks = async (patterns, options) => {
|
|
17347
|
-
const globTasks = convertNegativePatterns(patterns, options);
|
|
17348
|
-
const {
|
|
17349
|
-
cwd,
|
|
17350
|
-
expandDirectories
|
|
17351
|
-
} = options;
|
|
17352
|
-
if (!expandDirectories) {
|
|
17353
|
-
return globTasks;
|
|
17354
|
-
}
|
|
17355
|
-
const directoryToGlobOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd);
|
|
17356
|
-
return Promise.all(globTasks.map(async task => {
|
|
17357
|
-
let {
|
|
17358
|
-
patterns,
|
|
17359
|
-
options
|
|
17360
|
-
} = task;
|
|
17361
|
-
[patterns, options.ignore] = await Promise.all([directoryToGlob(patterns, directoryToGlobOptions), directoryToGlob(options.ignore, {
|
|
17362
|
-
cwd
|
|
17363
|
-
})]);
|
|
17364
|
-
return {
|
|
17365
|
-
patterns,
|
|
17366
|
-
options
|
|
17367
|
-
};
|
|
17368
|
-
}));
|
|
17369
|
-
};
|
|
17370
|
-
const generateTasksSync = (patterns, options) => {
|
|
17371
|
-
const globTasks = convertNegativePatterns(patterns, options);
|
|
17372
|
-
const {
|
|
17373
|
-
cwd,
|
|
17374
|
-
expandDirectories
|
|
17375
|
-
} = options;
|
|
17376
|
-
if (!expandDirectories) {
|
|
17377
|
-
return globTasks;
|
|
17378
|
-
}
|
|
17379
|
-
const directoryToGlobSyncOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd);
|
|
17380
|
-
return globTasks.map(task => {
|
|
17381
|
-
let {
|
|
17382
|
-
patterns,
|
|
17383
|
-
options
|
|
17384
|
-
} = task;
|
|
17385
|
-
patterns = directoryToGlobSync(patterns, directoryToGlobSyncOptions);
|
|
17386
|
-
options.ignore = directoryToGlobSync(options.ignore, {
|
|
17387
|
-
cwd
|
|
17388
|
-
});
|
|
17389
|
-
return {
|
|
17390
|
-
patterns,
|
|
17391
|
-
options
|
|
17392
|
-
};
|
|
17393
|
-
});
|
|
17394
|
-
};
|
|
17395
|
-
exports.globby = normalizeArguments(async (patterns, options) => {
|
|
17396
|
-
const [tasks, filter] = await Promise.all([generateTasks(patterns, options), getFilter(options)]);
|
|
17397
|
-
const results = await Promise.all(tasks.map(task => _fastGlob(task.patterns, task.options)));
|
|
17398
|
-
return unionFastGlobResults(results, filter);
|
|
17399
|
-
});
|
|
17400
|
-
exports.globbySync = normalizeArgumentsSync((patterns, options) => {
|
|
17401
|
-
const tasks = generateTasksSync(patterns, options);
|
|
17402
|
-
const filter = getFilterSync(options);
|
|
17403
|
-
const results = tasks.map(task => _fastGlob.sync(task.patterns, task.options));
|
|
17404
|
-
return unionFastGlobResults(results, filter);
|
|
17405
|
-
});
|
|
17406
|
-
exports.globbyStream = normalizeArgumentsSync((patterns, options) => {
|
|
17407
|
-
const tasks = generateTasksSync(patterns, options);
|
|
17408
|
-
const filter = getFilterSync(options);
|
|
17409
|
-
const streams = tasks.map(task => _fastGlob.stream(task.patterns, task.options));
|
|
17410
|
-
const stream = (0, _mergeStreams.default)(streams).filter(fastGlobResult => filter(fastGlobResult));
|
|
17411
|
-
|
|
17412
|
-
// TODO: Make it return a web stream at some point.
|
|
17413
|
-
// return Readable.toWeb(stream);
|
|
17414
|
-
|
|
17415
|
-
return stream;
|
|
17416
|
-
});
|
|
17417
|
-
exports.isDynamicPattern = normalizeArgumentsSync((patterns, options) => patterns.some(pattern => _fastGlob.isDynamicPattern(pattern, options)));
|
|
17418
|
-
exports.generateGlobTasks = normalizeArguments(generateTasks);
|
|
17419
|
-
exports.generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
|
|
17420
|
-
const {
|
|
17421
|
-
convertPathToPattern
|
|
17422
|
-
} = _fastGlob;
|
|
17423
|
-
exports.convertPathToPattern = convertPathToPattern;
|
|
17424
|
-
} (globby));
|
|
17425
|
-
|
|
17426
16243
|
var open$1 = {};
|
|
17427
16244
|
|
|
17428
16245
|
var isWsl$1 = {};
|
|
@@ -17731,11 +16548,11 @@ Object.defineProperty(open$1, "__esModule", {
|
|
|
17731
16548
|
});
|
|
17732
16549
|
open$1.openApp = open$1.default = open$1.apps = void 0;
|
|
17733
16550
|
var _nodeProcess = require$$0$2;
|
|
17734
|
-
var _nodeBuffer = require$$2$
|
|
16551
|
+
var _nodeBuffer = require$$2$8;
|
|
17735
16552
|
var _nodePath = require$$1;
|
|
17736
16553
|
var _nodeUrl = require$$2$4;
|
|
17737
16554
|
var _nodeChild_process = require$$2$6;
|
|
17738
|
-
var _promises = _interopRequireWildcard(require$$1$
|
|
16555
|
+
var _promises = _interopRequireWildcard(require$$1$1, true);
|
|
17739
16556
|
var _isWsl = isWsl$1;
|
|
17740
16557
|
var _defineLazyProp = defineLazyProp;
|
|
17741
16558
|
var _defaultBrowser = defaultBrowser$2;
|
|
@@ -18036,7 +16853,6 @@ const apps = open$1.apps = {};
|
|
|
18036
16853
|
open$1.default = open;
|
|
18037
16854
|
|
|
18038
16855
|
exports.build = build;
|
|
18039
|
-
exports.globby = globby;
|
|
18040
16856
|
exports.interopRequireDefault = interopRequireDefault;
|
|
18041
16857
|
exports.interopRequireWildcard = interopRequireWildcard;
|
|
18042
16858
|
exports.isInteractive = isInteractive$1;
|