path-serializer 0.0.1 → 0.0.3
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 +10 -25
- package/dist/cjs/{main.js → main.cjs} +370 -436
- package/dist/esm/{main.mjs → main.js} +381 -448
- package/dist/rsbuild.config.cjs.mjs +333 -0
- package/dist/rsbuild.config.esm.mjs +339 -0
- package/dist/rspack.config.cjs.mjs +420 -0
- package/dist/rspack.config.esm.mjs +422 -0
- package/package.json +32 -28
- /package/dist/cjs/{index.d.ts → index.d.cts} +0 -0
- /package/dist/esm/{index.d.mts → index.d.ts} +0 -0
|
@@ -1,216 +1,6 @@
|
|
|
1
|
-
var __webpack_modules__ = ({
|
|
2
|
-
"./node_modules/.pnpm/upath@2.0.1/node_modules/upath/build/code/upath.js": (function (__unused_webpack_module, exports, __webpack_require__) {
|
|
3
|
-
/**
|
|
4
|
-
* upath http://github.com/anodynos/upath/
|
|
5
|
-
*
|
|
6
|
-
* A proxy to `path`, replacing `\` with `/` for all results (supports UNC paths) & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions.
|
|
7
|
-
* Version 2.0.1 - Compiled on 2020-11-07 16:59:47
|
|
8
|
-
* Repository git://github.com/anodynos/upath
|
|
9
|
-
* Copyright(c) 2020 Angelos Pikoulas <agelos.pikoulas@gmail.com>
|
|
10
|
-
* License MIT
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
// Generated by uRequire v0.7.0-beta.33 target: 'lib' template: 'nodejs'
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var VERSION = '2.0.1'; // injected by urequire-rc-inject-version
|
|
17
|
-
|
|
18
|
-
var extraFn, extraFunctions, isFunction, isString, isValidExt, name, path, propName, propValue, toUnix, upath, slice = [].slice, indexOf = [].indexOf || function (item) {
|
|
19
|
-
for (var i = 0, l = this.length; i < l; i++) {
|
|
20
|
-
if (i in this && this[i] === item)
|
|
21
|
-
return i;
|
|
22
|
-
}
|
|
23
|
-
return -1;
|
|
24
|
-
}, hasProp = {}.hasOwnProperty;
|
|
25
|
-
path = __webpack_require__("path");
|
|
26
|
-
isFunction = function (val) {
|
|
27
|
-
return typeof val === "function";
|
|
28
|
-
};
|
|
29
|
-
isString = function (val) {
|
|
30
|
-
return typeof val === "string" || !!val && typeof val === "object" && Object.prototype.toString.call(val) === "[object String]";
|
|
31
|
-
};
|
|
32
|
-
upath = exports;
|
|
33
|
-
upath.VERSION = typeof VERSION !== "undefined" && VERSION !== null ? VERSION : "NO-VERSION";
|
|
34
|
-
toUnix = function (p) {
|
|
35
|
-
p = p.replace(/\\/g, "/");
|
|
36
|
-
p = p.replace(/(?<!^)\/+/g, "/");
|
|
37
|
-
return p;
|
|
38
|
-
};
|
|
39
|
-
for (propName in path) {
|
|
40
|
-
propValue = path[propName];
|
|
41
|
-
if (isFunction(propValue)) {
|
|
42
|
-
upath[propName] = function (propName) {
|
|
43
|
-
return function () {
|
|
44
|
-
var args, result;
|
|
45
|
-
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
|
46
|
-
args = args.map(function (p) {
|
|
47
|
-
if (isString(p)) {
|
|
48
|
-
return toUnix(p);
|
|
49
|
-
} else {
|
|
50
|
-
return p;
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
result = path[propName].apply(path, args);
|
|
54
|
-
if (isString(result)) {
|
|
55
|
-
return toUnix(result);
|
|
56
|
-
} else {
|
|
57
|
-
return result;
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
}(propName);
|
|
61
|
-
} else {
|
|
62
|
-
upath[propName] = propValue;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
upath.sep = "/";
|
|
66
|
-
extraFunctions = {
|
|
67
|
-
toUnix: toUnix,
|
|
68
|
-
normalizeSafe: function (p) {
|
|
69
|
-
var result;
|
|
70
|
-
p = toUnix(p);
|
|
71
|
-
result = upath.normalize(p);
|
|
72
|
-
if (p.startsWith("./") && !result.startsWith("./") && !result.startsWith("..")) {
|
|
73
|
-
result = "./" + result;
|
|
74
|
-
} else if (p.startsWith("//") && !result.startsWith("//")) {
|
|
75
|
-
if (p.startsWith("//./")) {
|
|
76
|
-
result = "//." + result;
|
|
77
|
-
} else {
|
|
78
|
-
result = "/" + result;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return result;
|
|
82
|
-
},
|
|
83
|
-
normalizeTrim: function (p) {
|
|
84
|
-
p = upath.normalizeSafe(p);
|
|
85
|
-
if (p.endsWith("/")) {
|
|
86
|
-
return p.slice(0, +(p.length - 2) + 1 || 9000000000);
|
|
87
|
-
} else {
|
|
88
|
-
return p;
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
joinSafe: function () {
|
|
92
|
-
var p, p0, result;
|
|
93
|
-
p = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
|
94
|
-
result = upath.join.apply(null, p);
|
|
95
|
-
if (p.length > 0) {
|
|
96
|
-
p0 = toUnix(p[0]);
|
|
97
|
-
if (p0.startsWith("./") && !result.startsWith("./") && !result.startsWith("..")) {
|
|
98
|
-
result = "./" + result;
|
|
99
|
-
} else if (p0.startsWith("//") && !result.startsWith("//")) {
|
|
100
|
-
if (p0.startsWith("//./")) {
|
|
101
|
-
result = "//." + result;
|
|
102
|
-
} else {
|
|
103
|
-
result = "/" + result;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return result;
|
|
108
|
-
},
|
|
109
|
-
addExt: function (file, ext) {
|
|
110
|
-
if (!ext) {
|
|
111
|
-
return file;
|
|
112
|
-
} else {
|
|
113
|
-
if (ext[0] !== ".") {
|
|
114
|
-
ext = "." + ext;
|
|
115
|
-
}
|
|
116
|
-
return file + (file.endsWith(ext) ? "" : ext);
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
trimExt: function (filename, ignoreExts, maxSize) {
|
|
120
|
-
var oldExt;
|
|
121
|
-
if (maxSize == null) {
|
|
122
|
-
maxSize = 7;
|
|
123
|
-
}
|
|
124
|
-
oldExt = upath.extname(filename);
|
|
125
|
-
if (isValidExt(oldExt, ignoreExts, maxSize)) {
|
|
126
|
-
return filename.slice(0, +(filename.length - oldExt.length - 1) + 1 || 9000000000);
|
|
127
|
-
} else {
|
|
128
|
-
return filename;
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
removeExt: function (filename, ext) {
|
|
132
|
-
if (!ext) {
|
|
133
|
-
return filename;
|
|
134
|
-
} else {
|
|
135
|
-
ext = ext[0] === "." ? ext : "." + ext;
|
|
136
|
-
if (upath.extname(filename) === ext) {
|
|
137
|
-
return upath.trimExt(filename, [], ext.length);
|
|
138
|
-
} else {
|
|
139
|
-
return filename;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
changeExt: function (filename, ext, ignoreExts, maxSize) {
|
|
144
|
-
if (maxSize == null) {
|
|
145
|
-
maxSize = 7;
|
|
146
|
-
}
|
|
147
|
-
return upath.trimExt(filename, ignoreExts, maxSize) + (!ext ? "" : ext[0] === "." ? ext : "." + ext);
|
|
148
|
-
},
|
|
149
|
-
defaultExt: function (filename, ext, ignoreExts, maxSize) {
|
|
150
|
-
var oldExt;
|
|
151
|
-
if (maxSize == null) {
|
|
152
|
-
maxSize = 7;
|
|
153
|
-
}
|
|
154
|
-
oldExt = upath.extname(filename);
|
|
155
|
-
if (isValidExt(oldExt, ignoreExts, maxSize)) {
|
|
156
|
-
return filename;
|
|
157
|
-
} else {
|
|
158
|
-
return upath.addExt(filename, ext);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
isValidExt = function (ext, ignoreExts, maxSize) {
|
|
163
|
-
if (ignoreExts == null) {
|
|
164
|
-
ignoreExts = [];
|
|
165
|
-
}
|
|
166
|
-
return ext && ext.length <= maxSize && indexOf.call(ignoreExts.map(function (e) {
|
|
167
|
-
return (e && e[0] !== "." ? "." : "") + e;
|
|
168
|
-
}), ext) < 0;
|
|
169
|
-
};
|
|
170
|
-
for (name in extraFunctions) {
|
|
171
|
-
if (!hasProp.call(extraFunctions, name))
|
|
172
|
-
continue;
|
|
173
|
-
extraFn = extraFunctions[name];
|
|
174
|
-
if (upath[name] !== void 0) {
|
|
175
|
-
throw new Error("path." + name + " already exists.");
|
|
176
|
-
} else {
|
|
177
|
-
upath[name] = extraFn;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
;
|
|
182
|
-
|
|
183
|
-
}),
|
|
184
|
-
"path": (function (module) {
|
|
185
1
|
"use strict";
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}),
|
|
189
|
-
|
|
190
|
-
});
|
|
191
|
-
/************************************************************************/
|
|
192
|
-
// The module cache
|
|
193
|
-
var __webpack_module_cache__ = {};
|
|
194
|
-
|
|
195
|
-
// The require function
|
|
196
|
-
function __webpack_require__(moduleId) {
|
|
197
|
-
|
|
198
|
-
// Check if module is in cache
|
|
199
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
200
|
-
if (cachedModule !== undefined) {
|
|
201
|
-
return cachedModule.exports;
|
|
202
|
-
}
|
|
203
|
-
// Create a new module (and put it into the cache)
|
|
204
|
-
var module = (__webpack_module_cache__[moduleId] = {
|
|
205
|
-
exports: {}
|
|
206
|
-
});
|
|
207
|
-
// Execute the module function
|
|
208
|
-
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
209
|
-
|
|
210
|
-
// Return the exports of the module
|
|
211
|
-
return module.exports;
|
|
212
|
-
|
|
213
|
-
}
|
|
2
|
+
// The require scope
|
|
3
|
+
var __webpack_require__ = {};
|
|
214
4
|
|
|
215
5
|
/************************************************************************/
|
|
216
6
|
// webpack/runtime/compat_get_default_export
|
|
@@ -258,9 +48,6 @@ __webpack_require__.r = function(exports) {
|
|
|
258
48
|
})();
|
|
259
49
|
/************************************************************************/
|
|
260
50
|
var __webpack_exports__ = {};
|
|
261
|
-
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
262
|
-
(() => {
|
|
263
|
-
"use strict";
|
|
264
51
|
// ESM COMPAT FLAG
|
|
265
52
|
__webpack_require__.r(__webpack_exports__);
|
|
266
53
|
|
|
@@ -269,18 +56,123 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
269
56
|
createSnapshotSerializer: () => (/* reexport */ createSnapshotSerializer)
|
|
270
57
|
});
|
|
271
58
|
|
|
272
|
-
;// CONCATENATED MODULE:
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
59
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayReduce.js
|
|
60
|
+
/**
|
|
61
|
+
* A specialized version of `_.reduce` for arrays without support for
|
|
62
|
+
* iteratee shorthands.
|
|
63
|
+
*
|
|
64
|
+
* @private
|
|
65
|
+
* @param {Array} [array] The array to iterate over.
|
|
66
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
67
|
+
* @param {*} [accumulator] The initial value.
|
|
68
|
+
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
69
|
+
* the initial value.
|
|
70
|
+
* @returns {*} Returns the accumulated value.
|
|
71
|
+
*/
|
|
72
|
+
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
73
|
+
var index = -1,
|
|
74
|
+
length = array == null ? 0 : array.length;
|
|
75
|
+
|
|
76
|
+
if (initAccum && length) {
|
|
77
|
+
accumulator = array[++index];
|
|
78
|
+
}
|
|
79
|
+
while (++index < length) {
|
|
80
|
+
accumulator = iteratee(accumulator, array[index], index, array);
|
|
81
|
+
}
|
|
82
|
+
return accumulator;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* harmony default export */ const _arrayReduce = (arrayReduce);
|
|
86
|
+
|
|
87
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyOf.js
|
|
88
|
+
/**
|
|
89
|
+
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
90
|
+
*
|
|
91
|
+
* @private
|
|
92
|
+
* @param {Object} object The object to query.
|
|
93
|
+
* @returns {Function} Returns the new accessor function.
|
|
94
|
+
*/
|
|
95
|
+
function basePropertyOf(object) {
|
|
96
|
+
return function(key) {
|
|
97
|
+
return object == null ? undefined : object[key];
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* harmony default export */ const _basePropertyOf = (basePropertyOf);
|
|
102
|
+
|
|
103
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_deburrLetter.js
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
107
|
+
var deburredLetters = {
|
|
108
|
+
// Latin-1 Supplement block.
|
|
109
|
+
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
110
|
+
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
111
|
+
'\xc7': 'C', '\xe7': 'c',
|
|
112
|
+
'\xd0': 'D', '\xf0': 'd',
|
|
113
|
+
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
114
|
+
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
115
|
+
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
116
|
+
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
117
|
+
'\xd1': 'N', '\xf1': 'n',
|
|
118
|
+
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
119
|
+
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
120
|
+
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
121
|
+
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
122
|
+
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
123
|
+
'\xc6': 'Ae', '\xe6': 'ae',
|
|
124
|
+
'\xde': 'Th', '\xfe': 'th',
|
|
125
|
+
'\xdf': 'ss',
|
|
126
|
+
// Latin Extended-A block.
|
|
127
|
+
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
128
|
+
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
129
|
+
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
130
|
+
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
131
|
+
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
132
|
+
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
133
|
+
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
134
|
+
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
135
|
+
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
136
|
+
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
137
|
+
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
138
|
+
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
139
|
+
'\u0134': 'J', '\u0135': 'j',
|
|
140
|
+
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
141
|
+
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
142
|
+
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
143
|
+
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
144
|
+
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
145
|
+
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
146
|
+
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
147
|
+
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
148
|
+
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
149
|
+
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
150
|
+
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
151
|
+
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
152
|
+
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
153
|
+
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
154
|
+
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
155
|
+
'\u0174': 'W', '\u0175': 'w',
|
|
156
|
+
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
157
|
+
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
158
|
+
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
159
|
+
'\u0132': 'IJ', '\u0133': 'ij',
|
|
160
|
+
'\u0152': 'Oe', '\u0153': 'oe',
|
|
161
|
+
'\u0149': "'n", '\u017f': 's'
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
166
|
+
* letters to basic Latin letters.
|
|
167
|
+
*
|
|
168
|
+
* @private
|
|
169
|
+
* @param {string} letter The matched letter to deburr.
|
|
170
|
+
* @returns {string} Returns the deburred letter.
|
|
171
|
+
*/
|
|
172
|
+
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
173
|
+
|
|
174
|
+
/* harmony default export */ const _deburrLetter = (deburrLetter);
|
|
175
|
+
|
|
284
176
|
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js
|
|
285
177
|
/** Detect free variable `global` from Node.js. */
|
|
286
178
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
@@ -590,187 +482,6 @@ function toString_toString(value) {
|
|
|
590
482
|
|
|
591
483
|
/* harmony default export */ const lodash_es_toString = (toString_toString);
|
|
592
484
|
|
|
593
|
-
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/escapeRegExp.js
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* Used to match `RegExp`
|
|
598
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
599
|
-
*/
|
|
600
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
|
601
|
-
reHasRegExpChar = RegExp(reRegExpChar.source);
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
|
|
605
|
-
* "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
|
|
606
|
-
*
|
|
607
|
-
* @static
|
|
608
|
-
* @memberOf _
|
|
609
|
-
* @since 3.0.0
|
|
610
|
-
* @category String
|
|
611
|
-
* @param {string} [string=''] The string to escape.
|
|
612
|
-
* @returns {string} Returns the escaped string.
|
|
613
|
-
* @example
|
|
614
|
-
*
|
|
615
|
-
* _.escapeRegExp('[lodash](https://lodash.com/)');
|
|
616
|
-
* // => '\[lodash\]\(https://lodash\.com/\)'
|
|
617
|
-
*/
|
|
618
|
-
function escapeRegExp(string) {
|
|
619
|
-
string = lodash_es_toString(string);
|
|
620
|
-
return (string && reHasRegExpChar.test(string))
|
|
621
|
-
? string.replace(reRegExpChar, '\\$&')
|
|
622
|
-
: string;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
/* harmony default export */ const lodash_es_escapeRegExp = (escapeRegExp);
|
|
626
|
-
|
|
627
|
-
;// CONCATENATED MODULE: ./src/utils.ts
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
const isPathString = (test)=>external_node_path_default().posix.basename(test) !== test || external_node_path_default().win32.basename(test) !== test;
|
|
634
|
-
function utils_getRealTemporaryDirectory() {
|
|
635
|
-
let ret = null;
|
|
636
|
-
try {
|
|
637
|
-
ret = external_node_os_default().tmpdir();
|
|
638
|
-
ret = external_node_fs_default().realpathSync(ret);
|
|
639
|
-
} catch {}
|
|
640
|
-
return ret;
|
|
641
|
-
}
|
|
642
|
-
const normalizeToPosixPath = (p)=>upath_default().normalizeSafe(external_node_path_default().normalize(p || '')).replace(/^([a-zA-Z]+):/, (_, m)=>`/${m.toLowerCase()}`);
|
|
643
|
-
/**
|
|
644
|
-
* Compile path string to RegExp.
|
|
645
|
-
* @note Only support posix path.
|
|
646
|
-
*/ function compilePathMatcherRegExp(match) {
|
|
647
|
-
if (typeof match !== 'string') {
|
|
648
|
-
return match;
|
|
649
|
-
}
|
|
650
|
-
const escaped = lodash_es_escapeRegExp(match);
|
|
651
|
-
return new RegExp(`(?<=\\W|^)${escaped}(?=\\W|$)`);
|
|
652
|
-
}
|
|
653
|
-
function splitPathString(str) {
|
|
654
|
-
return str.split(/[\\/]/);
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayReduce.js
|
|
658
|
-
/**
|
|
659
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
660
|
-
* iteratee shorthands.
|
|
661
|
-
*
|
|
662
|
-
* @private
|
|
663
|
-
* @param {Array} [array] The array to iterate over.
|
|
664
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
665
|
-
* @param {*} [accumulator] The initial value.
|
|
666
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
667
|
-
* the initial value.
|
|
668
|
-
* @returns {*} Returns the accumulated value.
|
|
669
|
-
*/
|
|
670
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
671
|
-
var index = -1,
|
|
672
|
-
length = array == null ? 0 : array.length;
|
|
673
|
-
|
|
674
|
-
if (initAccum && length) {
|
|
675
|
-
accumulator = array[++index];
|
|
676
|
-
}
|
|
677
|
-
while (++index < length) {
|
|
678
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
679
|
-
}
|
|
680
|
-
return accumulator;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
/* harmony default export */ const _arrayReduce = (arrayReduce);
|
|
684
|
-
|
|
685
|
-
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyOf.js
|
|
686
|
-
/**
|
|
687
|
-
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
688
|
-
*
|
|
689
|
-
* @private
|
|
690
|
-
* @param {Object} object The object to query.
|
|
691
|
-
* @returns {Function} Returns the new accessor function.
|
|
692
|
-
*/
|
|
693
|
-
function basePropertyOf(object) {
|
|
694
|
-
return function(key) {
|
|
695
|
-
return object == null ? undefined : object[key];
|
|
696
|
-
};
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
/* harmony default export */ const _basePropertyOf = (basePropertyOf);
|
|
700
|
-
|
|
701
|
-
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_deburrLetter.js
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
705
|
-
var deburredLetters = {
|
|
706
|
-
// Latin-1 Supplement block.
|
|
707
|
-
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
708
|
-
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
709
|
-
'\xc7': 'C', '\xe7': 'c',
|
|
710
|
-
'\xd0': 'D', '\xf0': 'd',
|
|
711
|
-
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
712
|
-
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
713
|
-
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
714
|
-
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
715
|
-
'\xd1': 'N', '\xf1': 'n',
|
|
716
|
-
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
717
|
-
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
718
|
-
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
719
|
-
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
720
|
-
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
721
|
-
'\xc6': 'Ae', '\xe6': 'ae',
|
|
722
|
-
'\xde': 'Th', '\xfe': 'th',
|
|
723
|
-
'\xdf': 'ss',
|
|
724
|
-
// Latin Extended-A block.
|
|
725
|
-
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
726
|
-
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
727
|
-
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
728
|
-
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
729
|
-
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
730
|
-
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
731
|
-
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
732
|
-
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
733
|
-
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
734
|
-
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
735
|
-
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
736
|
-
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
737
|
-
'\u0134': 'J', '\u0135': 'j',
|
|
738
|
-
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
739
|
-
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
740
|
-
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
741
|
-
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
742
|
-
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
743
|
-
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
744
|
-
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
745
|
-
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
746
|
-
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
747
|
-
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
748
|
-
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
749
|
-
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
750
|
-
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
751
|
-
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
752
|
-
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
753
|
-
'\u0174': 'W', '\u0175': 'w',
|
|
754
|
-
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
755
|
-
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
756
|
-
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
757
|
-
'\u0132': 'IJ', '\u0133': 'ij',
|
|
758
|
-
'\u0152': 'Oe', '\u0153': 'oe',
|
|
759
|
-
'\u0149': "'n", '\u017f': 's'
|
|
760
|
-
};
|
|
761
|
-
|
|
762
|
-
/**
|
|
763
|
-
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
764
|
-
* letters to basic Latin letters.
|
|
765
|
-
*
|
|
766
|
-
* @private
|
|
767
|
-
* @param {string} letter The matched letter to deburr.
|
|
768
|
-
* @returns {string} Returns the deburred letter.
|
|
769
|
-
*/
|
|
770
|
-
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
771
|
-
|
|
772
|
-
/* harmony default export */ const _deburrLetter = (deburrLetter);
|
|
773
|
-
|
|
774
485
|
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/deburr.js
|
|
775
486
|
|
|
776
487
|
|
|
@@ -1016,8 +727,255 @@ var snakeCase_snakeCase = _createCompounder(function(result, word, index) {
|
|
|
1016
727
|
|
|
1017
728
|
/* harmony default export */ const snakeCase = (snakeCase_snakeCase);
|
|
1018
729
|
|
|
1019
|
-
;// CONCATENATED MODULE:
|
|
730
|
+
;// CONCATENATED MODULE: external "node:fs"
|
|
731
|
+
var external_node_fs_namespaceObject = require("node:fs");
|
|
732
|
+
var external_node_fs_default = /*#__PURE__*/__webpack_require__.n(external_node_fs_namespaceObject);
|
|
733
|
+
;// CONCATENATED MODULE: external "node:os"
|
|
734
|
+
var external_node_os_namespaceObject = require("node:os");
|
|
735
|
+
var external_node_os_default = /*#__PURE__*/__webpack_require__.n(external_node_os_namespaceObject);
|
|
736
|
+
;// CONCATENATED MODULE: external "node:path"
|
|
737
|
+
var external_node_path_namespaceObject = require("node:path");
|
|
738
|
+
var external_node_path_default = /*#__PURE__*/__webpack_require__.n(external_node_path_namespaceObject);
|
|
739
|
+
;// CONCATENATED MODULE: ./node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/escapeRegExp.js
|
|
740
|
+
|
|
1020
741
|
|
|
742
|
+
/**
|
|
743
|
+
* Used to match `RegExp`
|
|
744
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
745
|
+
*/
|
|
746
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
|
747
|
+
reHasRegExpChar = RegExp(reRegExpChar.source);
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
|
|
751
|
+
* "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
|
|
752
|
+
*
|
|
753
|
+
* @static
|
|
754
|
+
* @memberOf _
|
|
755
|
+
* @since 3.0.0
|
|
756
|
+
* @category String
|
|
757
|
+
* @param {string} [string=''] The string to escape.
|
|
758
|
+
* @returns {string} Returns the escaped string.
|
|
759
|
+
* @example
|
|
760
|
+
*
|
|
761
|
+
* _.escapeRegExp('[lodash](https://lodash.com/)');
|
|
762
|
+
* // => '\[lodash\]\(https://lodash\.com/\)'
|
|
763
|
+
*/
|
|
764
|
+
function escapeRegExp(string) {
|
|
765
|
+
string = lodash_es_toString(string);
|
|
766
|
+
return (string && reHasRegExpChar.test(string))
|
|
767
|
+
? string.replace(reRegExpChar, '\\$&')
|
|
768
|
+
: string;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/* harmony default export */ const lodash_es_escapeRegExp = (escapeRegExp);
|
|
772
|
+
|
|
773
|
+
;// CONCATENATED MODULE: ./src/upath.mjs
|
|
774
|
+
// @ts-nocheck
|
|
775
|
+
/**
|
|
776
|
+
* upath http://github.com/anodynos/upath/
|
|
777
|
+
*
|
|
778
|
+
* A proxy to `path`, replacing `\` with `/` for all results (supports UNC paths) & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions.
|
|
779
|
+
* Version 2.0.1 - Compiled on 2020-11-07 16:59:47
|
|
780
|
+
* Repository git://github.com/anodynos/upath
|
|
781
|
+
* Copyright(c) 2020 Angelos Pikoulas <agelos.pikoulas@gmail.com>
|
|
782
|
+
* License MIT
|
|
783
|
+
*/ // Generated by uRequire v0.7.0-beta.33 target: 'lib' template: 'nodejs'
|
|
784
|
+
|
|
785
|
+
const VERSION = '2.0.1';
|
|
786
|
+
// injected by urequire-rc-inject-version
|
|
787
|
+
let extraFn;
|
|
788
|
+
let extraFunctions;
|
|
789
|
+
let isFunction;
|
|
790
|
+
let isString;
|
|
791
|
+
let isValidExt;
|
|
792
|
+
let upath_name;
|
|
793
|
+
let upath_propName;
|
|
794
|
+
let propValue;
|
|
795
|
+
let toUnix;
|
|
796
|
+
let upath;
|
|
797
|
+
const slice = [].slice;
|
|
798
|
+
const indexOf = [].indexOf || function(item) {
|
|
799
|
+
for(let i = 0, l = this.length; i < l; i++){
|
|
800
|
+
if (i in this && this[i] === item) return i;
|
|
801
|
+
}
|
|
802
|
+
return -1;
|
|
803
|
+
};
|
|
804
|
+
const hasProp = {}.hasOwnProperty;
|
|
805
|
+
isFunction = (val)=>typeof val === 'function';
|
|
806
|
+
isString = (val)=>typeof val === 'string' || !!val && typeof val === 'object' && Object.prototype.toString.call(val) === '[object String]';
|
|
807
|
+
upath.VERSION = typeof VERSION !== 'undefined' && VERSION !== null ? VERSION : 'NO-VERSION';
|
|
808
|
+
toUnix = (p)=>{
|
|
809
|
+
p = p.replace(/\\/g, '/');
|
|
810
|
+
p = p.replace(/(?<!^)\/+/g, '/');
|
|
811
|
+
return p;
|
|
812
|
+
};
|
|
813
|
+
for(upath_propName in (external_node_path_default())){
|
|
814
|
+
propValue = (external_node_path_default())[upath_propName];
|
|
815
|
+
if (isFunction(propValue)) {
|
|
816
|
+
upath[upath_propName] = ((propName)=>()=>{
|
|
817
|
+
let args;
|
|
818
|
+
let result;
|
|
819
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
|
820
|
+
args = args.map((p)=>{
|
|
821
|
+
if (isString(p)) {
|
|
822
|
+
return toUnix(p);
|
|
823
|
+
}
|
|
824
|
+
return p;
|
|
825
|
+
});
|
|
826
|
+
result = (external_node_path_default())[propName].apply((external_node_path_default()), args);
|
|
827
|
+
if (isString(result)) {
|
|
828
|
+
return toUnix(result);
|
|
829
|
+
}
|
|
830
|
+
return result;
|
|
831
|
+
})(upath_propName);
|
|
832
|
+
} else {
|
|
833
|
+
upath[upath_propName] = propValue;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
upath.sep = '/';
|
|
837
|
+
extraFunctions = {
|
|
838
|
+
toUnix: toUnix,
|
|
839
|
+
normalizeSafe: (p)=>{
|
|
840
|
+
let result;
|
|
841
|
+
p = toUnix(p);
|
|
842
|
+
result = upath.normalize(p);
|
|
843
|
+
if (p.startsWith('./') && !result.startsWith('./') && !result.startsWith('..')) {
|
|
844
|
+
result = `./${result}`;
|
|
845
|
+
} else if (p.startsWith('//') && !result.startsWith('//')) {
|
|
846
|
+
if (p.startsWith('//./')) {
|
|
847
|
+
result = `//.${result}`;
|
|
848
|
+
} else {
|
|
849
|
+
result = `/${result}`;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
return result;
|
|
853
|
+
},
|
|
854
|
+
normalizeTrim: (p)=>{
|
|
855
|
+
p = upath.normalizeSafe(p);
|
|
856
|
+
if (p.endsWith('/')) {
|
|
857
|
+
return p.slice(0, +(p.length - 2) + 1 || 9000000000);
|
|
858
|
+
}
|
|
859
|
+
return p;
|
|
860
|
+
},
|
|
861
|
+
joinSafe: ()=>{
|
|
862
|
+
let p;
|
|
863
|
+
let p0;
|
|
864
|
+
let result;
|
|
865
|
+
p = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
|
866
|
+
result = upath.join.apply(null, p);
|
|
867
|
+
if (p.length > 0) {
|
|
868
|
+
p0 = toUnix(p[0]);
|
|
869
|
+
if (p0.startsWith('./') && !result.startsWith('./') && !result.startsWith('..')) {
|
|
870
|
+
result = `./${result}`;
|
|
871
|
+
} else if (p0.startsWith('//') && !result.startsWith('//')) {
|
|
872
|
+
if (p0.startsWith('//./')) {
|
|
873
|
+
result = `//.${result}`;
|
|
874
|
+
} else {
|
|
875
|
+
result = `/${result}`;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
return result;
|
|
880
|
+
},
|
|
881
|
+
addExt: (file, ext)=>{
|
|
882
|
+
if (!ext) {
|
|
883
|
+
return file;
|
|
884
|
+
}
|
|
885
|
+
if (ext[0] !== '.') {
|
|
886
|
+
ext = `.${ext}`;
|
|
887
|
+
}
|
|
888
|
+
return file + (file.endsWith(ext) ? '' : ext);
|
|
889
|
+
},
|
|
890
|
+
trimExt: (filename, ignoreExts, maxSize)=>{
|
|
891
|
+
let oldExt;
|
|
892
|
+
if (maxSize == null) {
|
|
893
|
+
maxSize = 7;
|
|
894
|
+
}
|
|
895
|
+
oldExt = upath.extname(filename);
|
|
896
|
+
if (isValidExt(oldExt, ignoreExts, maxSize)) {
|
|
897
|
+
return filename.slice(0, +(filename.length - oldExt.length - 1) + 1 || 9000000000);
|
|
898
|
+
}
|
|
899
|
+
return filename;
|
|
900
|
+
},
|
|
901
|
+
removeExt: (filename, ext)=>{
|
|
902
|
+
if (!ext) {
|
|
903
|
+
return filename;
|
|
904
|
+
}
|
|
905
|
+
ext = ext[0] === '.' ? ext : `.${ext}`;
|
|
906
|
+
if (upath.extname(filename) === ext) {
|
|
907
|
+
return upath.trimExt(filename, [], ext.length);
|
|
908
|
+
}
|
|
909
|
+
return filename;
|
|
910
|
+
},
|
|
911
|
+
changeExt: (filename, ext, ignoreExts, maxSize)=>{
|
|
912
|
+
if (maxSize == null) {
|
|
913
|
+
maxSize = 7;
|
|
914
|
+
}
|
|
915
|
+
return upath.trimExt(filename, ignoreExts, maxSize) + (!ext ? '' : ext[0] === '.' ? ext : `.${ext}`);
|
|
916
|
+
},
|
|
917
|
+
defaultExt: (filename, ext, ignoreExts, maxSize)=>{
|
|
918
|
+
let oldExt;
|
|
919
|
+
if (maxSize == null) {
|
|
920
|
+
maxSize = 7;
|
|
921
|
+
}
|
|
922
|
+
oldExt = upath.extname(filename);
|
|
923
|
+
if (isValidExt(oldExt, ignoreExts, maxSize)) {
|
|
924
|
+
return filename;
|
|
925
|
+
}
|
|
926
|
+
return upath.addExt(filename, ext);
|
|
927
|
+
}
|
|
928
|
+
};
|
|
929
|
+
isValidExt = (ext, ignoreExts, maxSize)=>{
|
|
930
|
+
if (ignoreExts == null) {
|
|
931
|
+
ignoreExts = [];
|
|
932
|
+
}
|
|
933
|
+
return ext && ext.length <= maxSize && indexOf.call(ignoreExts.map((e)=>(e && e[0] !== '.' ? '.' : '') + e), ext) < 0;
|
|
934
|
+
};
|
|
935
|
+
for(upath_name in extraFunctions){
|
|
936
|
+
if (!hasProp.call(extraFunctions, upath_name)) continue;
|
|
937
|
+
extraFn = extraFunctions[upath_name];
|
|
938
|
+
if (upath[upath_name] !== void 0) {
|
|
939
|
+
throw new Error(`path.${upath_name} already exists.`);
|
|
940
|
+
}
|
|
941
|
+
upath[upath_name] = extraFn;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
;// CONCATENATED MODULE: ./src/utils.ts
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
// @ts-ignore
|
|
951
|
+
|
|
952
|
+
const isPathString = (test)=>external_node_path_default().posix.basename(test) !== test || external_node_path_default().win32.basename(test) !== test;
|
|
953
|
+
function getRealTemporaryDirectory() {
|
|
954
|
+
let ret = null;
|
|
955
|
+
try {
|
|
956
|
+
ret = external_node_os_default().tmpdir();
|
|
957
|
+
ret = external_node_fs_default().realpathSync(ret);
|
|
958
|
+
} catch {}
|
|
959
|
+
return ret;
|
|
960
|
+
}
|
|
961
|
+
const normalizeToPosixPath = (p)=>{
|
|
962
|
+
return upath.normalizeSafe(external_node_path_default().normalize(p || '')).replace(/^([a-zA-Z]+):/, (_, m)=>`/${m.toLowerCase()}`);
|
|
963
|
+
};
|
|
964
|
+
/**
|
|
965
|
+
* Compile path string to RegExp.
|
|
966
|
+
* @note Only support posix path.
|
|
967
|
+
*/ function compilePathMatcherRegExp(match) {
|
|
968
|
+
if (typeof match !== 'string') {
|
|
969
|
+
return match;
|
|
970
|
+
}
|
|
971
|
+
const escaped = lodash_es_escapeRegExp(match);
|
|
972
|
+
return new RegExp(`(?<=\\W|^)${escaped}(?=\\W|$)`);
|
|
973
|
+
}
|
|
974
|
+
function splitPathString(str) {
|
|
975
|
+
return str.split(/[\\/]/);
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
;// CONCATENATED MODULE: ./src/applyMatcherReplacement.ts
|
|
1021
979
|
|
|
1022
980
|
|
|
1023
981
|
function applyPathMatcher(matcher, str, options = {}) {
|
|
@@ -1036,40 +994,18 @@ function applyMatcherReplacement(matchers, str, options = {}) {
|
|
|
1036
994
|
return applyPathMatcher(matcher, ret, options);
|
|
1037
995
|
}, str);
|
|
1038
996
|
}
|
|
1039
|
-
const createDefaultPathMatchers = ()=>{
|
|
1040
|
-
const ret = [
|
|
1041
|
-
{
|
|
1042
|
-
match: /(?<=\/)(\.pnpm\/.+?\/node_modules)(?=\/)/,
|
|
1043
|
-
mark: 'pnpmInner'
|
|
1044
|
-
}
|
|
1045
|
-
];
|
|
1046
|
-
const tmpdir = getRealTemporaryDirectory();
|
|
1047
|
-
tmpdir && ret.push({
|
|
1048
|
-
match: tmpdir,
|
|
1049
|
-
mark: 'temp'
|
|
1050
|
-
});
|
|
1051
|
-
ret.push({
|
|
1052
|
-
match: os.tmpdir(),
|
|
1053
|
-
mark: 'temp'
|
|
1054
|
-
});
|
|
1055
|
-
ret.push({
|
|
1056
|
-
match: os.homedir(),
|
|
1057
|
-
mark: 'home'
|
|
1058
|
-
});
|
|
1059
|
-
return ret;
|
|
1060
|
-
};
|
|
1061
997
|
|
|
1062
998
|
;// CONCATENATED MODULE: ./src/createDefaultPathMatchers.ts
|
|
1063
999
|
|
|
1064
1000
|
|
|
1065
|
-
const
|
|
1001
|
+
const createDefaultPathMatchers = ()=>{
|
|
1066
1002
|
const ret = [
|
|
1067
1003
|
{
|
|
1068
1004
|
match: /(?<=\/)(\.pnpm\/.+?\/node_modules)(?=\/)/,
|
|
1069
1005
|
mark: 'pnpmInner'
|
|
1070
1006
|
}
|
|
1071
1007
|
];
|
|
1072
|
-
const tmpdir =
|
|
1008
|
+
const tmpdir = getRealTemporaryDirectory();
|
|
1073
1009
|
tmpdir && ret.push({
|
|
1074
1010
|
match: tmpdir,
|
|
1075
1011
|
mark: 'temp'
|
|
@@ -1101,7 +1037,7 @@ function createSnapshotSerializer(options) {
|
|
|
1101
1037
|
match: workspace
|
|
1102
1038
|
},
|
|
1103
1039
|
...customMatchers,
|
|
1104
|
-
...
|
|
1040
|
+
...createDefaultPathMatchers()
|
|
1105
1041
|
];
|
|
1106
1042
|
for (const matcher of pathMatchers){
|
|
1107
1043
|
if (typeof matcher.match === 'string') {
|
|
@@ -1123,8 +1059,6 @@ function createSnapshotSerializer(options) {
|
|
|
1123
1059
|
;// CONCATENATED MODULE: ./src/index.ts
|
|
1124
1060
|
|
|
1125
1061
|
|
|
1126
|
-
})();
|
|
1127
|
-
|
|
1128
1062
|
var __webpack_export_target__ = exports;
|
|
1129
1063
|
for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
|
|
1130
1064
|
if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', { value: true });
|