@rstest/core 0.4.1 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +127 -0
- package/dist/0~204.js +83 -0
- package/dist/0~223.js +19 -20
- package/dist/0~33.js +11 -23
- package/dist/0~655.js +3198 -8
- package/dist/0~655.js.LICENSE.txt +264 -0
- package/dist/0~691.js +58 -9
- package/dist/{0~938.js → 0~816.js} +183 -19
- package/dist/0~836.js +1 -1
- package/dist/0~85.js +20 -24
- package/dist/{0~669.js → 0~876.js} +36 -22
- package/dist/{0~120.js → 0~908.js} +333 -5
- package/dist/0~928.js +1 -1
- package/dist/0~969.js +1 -1
- package/dist/0~971.js +2 -2
- package/dist/index.js +594 -120
- package/dist/worker.js +651 -22
- package/dist-types/index.d.ts +250 -20
- package/dist-types/worker.d.ts +230 -18
- package/package.json +7 -5
package/dist/index.js
CHANGED
|
@@ -8,7 +8,6 @@ import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module";
|
|
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE_node_os_74b4b876__ from "node:os";
|
|
9
9
|
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
10
10
|
import * as __WEBPACK_EXTERNAL_MODULE_node_tty_c64aab7e__ from "node:tty";
|
|
11
|
-
import * as __WEBPACK_EXTERNAL_MODULE_pathe__ from "pathe";
|
|
12
11
|
import * as __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__ from "node:process";
|
|
13
12
|
import * as __WEBPACK_EXTERNAL_MODULE_url__ from "url";
|
|
14
13
|
import * as __WEBPACK_EXTERNAL_MODULE_module__ from "module";
|
|
@@ -1976,7 +1975,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
1976
1975
|
}
|
|
1977
1976
|
const cac = (name = "")=>new CAC(name);
|
|
1978
1977
|
const dist = cac;
|
|
1979
|
-
var
|
|
1978
|
+
var pathe_M_eThtNZ = __webpack_require__("../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs");
|
|
1980
1979
|
var helper = __webpack_require__("./src/utils/helper.ts");
|
|
1981
1980
|
var logger = __webpack_require__("./src/utils/logger.ts");
|
|
1982
1981
|
var prepare = __webpack_require__("./src/cli/prepare.ts");
|
|
@@ -1991,14 +1990,14 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
1991
1990
|
const { initCli } = await __webpack_require__.e("223").then(__webpack_require__.bind(__webpack_require__, "./src/cli/init.ts"));
|
|
1992
1991
|
const { config, configFilePath, projects } = await initCli(options);
|
|
1993
1992
|
const { createRstest } = await Promise.all([
|
|
1994
|
-
__webpack_require__.e("
|
|
1995
|
-
__webpack_require__.e("
|
|
1993
|
+
__webpack_require__.e("908"),
|
|
1994
|
+
__webpack_require__.e("876")
|
|
1996
1995
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/core/index.ts"));
|
|
1997
1996
|
rstest = createRstest({
|
|
1998
1997
|
config,
|
|
1999
1998
|
configFilePath,
|
|
2000
1999
|
projects
|
|
2001
|
-
}, command, filters.map(
|
|
2000
|
+
}, command, filters.map(pathe_M_eThtNZ.n));
|
|
2002
2001
|
if ('watch' === command && configFilePath) {
|
|
2003
2002
|
const { watchFilesForRestart } = await __webpack_require__.e("967").then(__webpack_require__.bind(__webpack_require__, "./src/core/restart.ts"));
|
|
2004
2003
|
watchFilesForRestart({
|
|
@@ -2018,7 +2017,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2018
2017
|
function setupCommands() {
|
|
2019
2018
|
const cli = dist('rstest');
|
|
2020
2019
|
cli.help();
|
|
2021
|
-
cli.version("0.
|
|
2020
|
+
cli.version("0.5.1");
|
|
2022
2021
|
applyCommonOptions(cli);
|
|
2023
2022
|
cli.command('[...filters]', 'run tests').option('-w, --watch', 'Run tests in watch mode').action(async (filters, options)=>{
|
|
2024
2023
|
(0, prepare.N)();
|
|
@@ -2054,14 +2053,14 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2054
2053
|
const { initCli } = await __webpack_require__.e("223").then(__webpack_require__.bind(__webpack_require__, "./src/cli/init.ts"));
|
|
2055
2054
|
const { config, configFilePath, projects } = await initCli(options);
|
|
2056
2055
|
const { createRstest } = await Promise.all([
|
|
2057
|
-
__webpack_require__.e("
|
|
2058
|
-
__webpack_require__.e("
|
|
2056
|
+
__webpack_require__.e("908"),
|
|
2057
|
+
__webpack_require__.e("876")
|
|
2059
2058
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/core/index.ts"));
|
|
2060
2059
|
const rstest = createRstest({
|
|
2061
2060
|
config,
|
|
2062
2061
|
configFilePath,
|
|
2063
2062
|
projects
|
|
2064
|
-
}, 'list', filters.map(
|
|
2063
|
+
}, 'list', filters.map(pathe_M_eThtNZ.n));
|
|
2065
2064
|
await rstest.listTests({
|
|
2066
2065
|
filesOnly: options.filesOnly,
|
|
2067
2066
|
json: options.json
|
|
@@ -2091,7 +2090,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2091
2090
|
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) console.log();
|
|
2092
2091
|
}
|
|
2093
2092
|
function showRstest() {
|
|
2094
|
-
_utils_logger__WEBPACK_IMPORTED_MODULE_0__.vF.greet(" Rstest v0.
|
|
2093
|
+
_utils_logger__WEBPACK_IMPORTED_MODULE_0__.vF.greet(" Rstest v0.5.1");
|
|
2095
2094
|
_utils_logger__WEBPACK_IMPORTED_MODULE_0__.vF.log('');
|
|
2096
2095
|
}
|
|
2097
2096
|
},
|
|
@@ -2101,32 +2100,32 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2101
2100
|
Z9: ()=>loadConfig,
|
|
2102
2101
|
wX: ()=>withDefaultConfig
|
|
2103
2102
|
});
|
|
2104
|
-
var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fs");
|
|
2103
|
+
var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("node:fs");
|
|
2105
2104
|
var _rsbuild_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("@rsbuild/core");
|
|
2106
|
-
var
|
|
2107
|
-
var
|
|
2108
|
-
const findConfig = (basePath)=>
|
|
2105
|
+
var pathe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs");
|
|
2106
|
+
var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/utils/index.ts");
|
|
2107
|
+
const findConfig = (basePath)=>_utils__WEBPACK_IMPORTED_MODULE_2__.kv.map((ext)=>basePath + ext).find(node_fs__WEBPACK_IMPORTED_MODULE_0__["default"].existsSync);
|
|
2109
2108
|
const resolveConfigPath = (root, customConfig)=>{
|
|
2110
2109
|
if (customConfig) {
|
|
2111
|
-
const customConfigPath = (0,
|
|
2110
|
+
const customConfigPath = (0, pathe__WEBPACK_IMPORTED_MODULE_3__.i)(customConfig) ? customConfig : (0, pathe__WEBPACK_IMPORTED_MODULE_3__.j)(root, customConfig);
|
|
2112
2111
|
if (node_fs__WEBPACK_IMPORTED_MODULE_0__["default"].existsSync(customConfigPath)) return customConfigPath;
|
|
2113
|
-
throw `Cannot find config file: ${
|
|
2112
|
+
throw `Cannot find config file: ${_utils__WEBPACK_IMPORTED_MODULE_2__.yW.dim(customConfigPath)}`;
|
|
2114
2113
|
}
|
|
2115
|
-
const configFilePath = findConfig((0,
|
|
2114
|
+
const configFilePath = findConfig((0, pathe__WEBPACK_IMPORTED_MODULE_3__.j)(root, _utils__WEBPACK_IMPORTED_MODULE_2__.t));
|
|
2116
2115
|
if (configFilePath) return configFilePath;
|
|
2117
2116
|
return null;
|
|
2118
2117
|
};
|
|
2119
2118
|
async function loadConfig({ cwd = process.cwd(), path, envMode, configLoader }) {
|
|
2120
2119
|
const configFilePath = resolveConfigPath(cwd, path);
|
|
2121
2120
|
if (!configFilePath) {
|
|
2122
|
-
|
|
2121
|
+
_utils__WEBPACK_IMPORTED_MODULE_2__.vF.debug('no rstest config file found');
|
|
2123
2122
|
return {
|
|
2124
2123
|
content: {},
|
|
2125
2124
|
filePath: configFilePath
|
|
2126
2125
|
};
|
|
2127
2126
|
}
|
|
2128
2127
|
const { content } = await (0, _rsbuild_core__WEBPACK_IMPORTED_MODULE_1__.loadConfig)({
|
|
2129
|
-
cwd: (0,
|
|
2128
|
+
cwd: (0, pathe__WEBPACK_IMPORTED_MODULE_3__.d)(configFilePath),
|
|
2130
2129
|
path: configFilePath,
|
|
2131
2130
|
envMode,
|
|
2132
2131
|
loader: configLoader
|
|
@@ -2136,18 +2135,37 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2136
2135
|
filePath: configFilePath
|
|
2137
2136
|
};
|
|
2138
2137
|
}
|
|
2139
|
-
const mergeRstestConfig = (...configs)=>(
|
|
2138
|
+
const mergeRstestConfig = (...configs)=>configs.reduce((result, config)=>{
|
|
2139
|
+
const merged = (0, _rsbuild_core__WEBPACK_IMPORTED_MODULE_1__.mergeRsbuildConfig)(result, {
|
|
2140
|
+
...config,
|
|
2141
|
+
exclude: Array.isArray(config.exclude) ? {
|
|
2142
|
+
patterns: config.exclude,
|
|
2143
|
+
override: false
|
|
2144
|
+
} : config.exclude
|
|
2145
|
+
});
|
|
2146
|
+
if (!Array.isArray(config.exclude) && config.exclude?.override) merged.exclude = {
|
|
2147
|
+
patterns: config.exclude.patterns
|
|
2148
|
+
};
|
|
2149
|
+
merged.include = config.include ?? merged.include;
|
|
2150
|
+
merged.reporters = config.reporters ?? merged.reporters;
|
|
2151
|
+
if (merged.coverage) merged.coverage.reporters = config.coverage?.reporters ?? merged.coverage?.reporters;
|
|
2152
|
+
return merged;
|
|
2153
|
+
}, {});
|
|
2140
2154
|
const createDefaultConfig = ()=>({
|
|
2141
2155
|
root: process.cwd(),
|
|
2142
2156
|
name: 'rstest',
|
|
2143
2157
|
include: [
|
|
2144
2158
|
'**/*.{test,spec}.?(c|m)[jt]s?(x)'
|
|
2145
2159
|
],
|
|
2146
|
-
exclude:
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2160
|
+
exclude: {
|
|
2161
|
+
patterns: [
|
|
2162
|
+
'**/node_modules/**',
|
|
2163
|
+
'**/dist/**',
|
|
2164
|
+
'**/.{idea,git,cache,output,temp}/**'
|
|
2165
|
+
],
|
|
2166
|
+
override: false
|
|
2167
|
+
},
|
|
2168
|
+
setupFiles: [],
|
|
2151
2169
|
includeSource: [],
|
|
2152
2170
|
pool: {
|
|
2153
2171
|
type: 'forks'
|
|
@@ -2175,13 +2193,16 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2175
2193
|
maxConcurrency: 5,
|
|
2176
2194
|
printConsoleTrace: false,
|
|
2177
2195
|
disableConsoleIntercept: false,
|
|
2196
|
+
snapshotFormat: {},
|
|
2178
2197
|
coverage: {
|
|
2179
2198
|
exclude: [
|
|
2180
2199
|
'**/node_modules/**',
|
|
2200
|
+
'**/[.]*',
|
|
2181
2201
|
'**/dist/**',
|
|
2182
2202
|
'**/test/**',
|
|
2183
2203
|
'**/__tests__/**',
|
|
2184
2204
|
'**/__mocks__/**',
|
|
2205
|
+
'**/*.d.ts',
|
|
2185
2206
|
'**/*.{test,spec}.[jt]s',
|
|
2186
2207
|
'**/*.{test,spec}.[c|m][jt]s',
|
|
2187
2208
|
'**/*.{test,spec}.[jt]sx',
|
|
@@ -2196,29 +2217,35 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2196
2217
|
'json'
|
|
2197
2218
|
],
|
|
2198
2219
|
reportsDirectory: './coverage',
|
|
2199
|
-
clean: true
|
|
2220
|
+
clean: true,
|
|
2221
|
+
reportOnFailure: false
|
|
2200
2222
|
}
|
|
2201
2223
|
});
|
|
2202
2224
|
const withDefaultConfig = (config)=>{
|
|
2203
2225
|
const merged = mergeRstestConfig(createDefaultConfig(), config);
|
|
2204
|
-
merged.
|
|
2205
|
-
merged.exclude
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
merged.reporters = config.reporters ?? merged.reporters;
|
|
2209
|
-
merged.coverage ??= {};
|
|
2210
|
-
merged.coverage.reporters = config.coverage?.reporters ?? merged.coverage?.reporters;
|
|
2211
|
-
const reportsDirectory = merged.coverage.reportsDirectory;
|
|
2212
|
-
merged.coverage.reportsDirectory = (0, pathe__WEBPACK_IMPORTED_MODULE_2__.isAbsolute)(reportsDirectory) ? reportsDirectory : (0, pathe__WEBPACK_IMPORTED_MODULE_2__.resolve)(merged.root, reportsDirectory);
|
|
2226
|
+
merged.setupFiles = (0, _utils__WEBPACK_IMPORTED_MODULE_2__.bg)(merged.setupFiles);
|
|
2227
|
+
merged.exclude.patterns.push(_utils__WEBPACK_IMPORTED_MODULE_2__.EJ);
|
|
2228
|
+
const reportsDirectory = (0, _utils__WEBPACK_IMPORTED_MODULE_2__.tS)(merged.coverage.reportsDirectory, merged.root);
|
|
2229
|
+
merged.coverage.reportsDirectory = (0, pathe__WEBPACK_IMPORTED_MODULE_3__.i)(reportsDirectory) ? reportsDirectory : (0, pathe__WEBPACK_IMPORTED_MODULE_3__.r)(merged.root, reportsDirectory);
|
|
2213
2230
|
merged.pool = 'string' == typeof config.pool ? {
|
|
2214
2231
|
type: config.pool
|
|
2215
2232
|
} : merged.pool;
|
|
2216
|
-
return
|
|
2233
|
+
return {
|
|
2234
|
+
...merged,
|
|
2235
|
+
include: merged.include.map((p)=>(0, _utils__WEBPACK_IMPORTED_MODULE_2__.tS)(p, merged.root)),
|
|
2236
|
+
exclude: {
|
|
2237
|
+
...merged.exclude,
|
|
2238
|
+
patterns: merged.exclude.patterns.map((p)=>(0, _utils__WEBPACK_IMPORTED_MODULE_2__.tS)(p, merged.root))
|
|
2239
|
+
},
|
|
2240
|
+
setupFiles: merged.setupFiles.map((p)=>(0, _utils__WEBPACK_IMPORTED_MODULE_2__.tS)(p, merged.root)),
|
|
2241
|
+
includeSource: merged.includeSource.map((p)=>(0, _utils__WEBPACK_IMPORTED_MODULE_2__.tS)(p, merged.root))
|
|
2242
|
+
};
|
|
2217
2243
|
};
|
|
2218
2244
|
},
|
|
2219
2245
|
"./src/utils/constants.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2220
2246
|
__webpack_require__.d(__webpack_exports__, {
|
|
2221
2247
|
EJ: ()=>TEMP_RSTEST_OUTPUT_DIR_GLOB,
|
|
2248
|
+
TE: ()=>globalApis,
|
|
2222
2249
|
WB: ()=>TS_CONFIG_FILE,
|
|
2223
2250
|
kv: ()=>DEFAULT_CONFIG_EXTENSIONS,
|
|
2224
2251
|
t: ()=>DEFAULT_CONFIG_NAME,
|
|
@@ -2235,33 +2262,50 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2235
2262
|
'.cjs',
|
|
2236
2263
|
'.cts'
|
|
2237
2264
|
];
|
|
2265
|
+
const globalApis = [
|
|
2266
|
+
'test',
|
|
2267
|
+
'describe',
|
|
2268
|
+
'it',
|
|
2269
|
+
'expect',
|
|
2270
|
+
'afterAll',
|
|
2271
|
+
'afterEach',
|
|
2272
|
+
'beforeAll',
|
|
2273
|
+
'beforeEach',
|
|
2274
|
+
'rstest',
|
|
2275
|
+
'rs',
|
|
2276
|
+
'assert',
|
|
2277
|
+
'onTestFinished',
|
|
2278
|
+
'onTestFailed'
|
|
2279
|
+
];
|
|
2238
2280
|
const TS_CONFIG_FILE = 'tsconfig.json';
|
|
2239
2281
|
},
|
|
2240
2282
|
"./src/utils/helper.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2241
2283
|
__webpack_require__.d(__webpack_exports__, {
|
|
2242
2284
|
C3: ()=>needFlagExperimentalDetectModule,
|
|
2243
2285
|
FI: ()=>getAbsolutePath,
|
|
2244
|
-
Kv: ()=>NODE_BUILTINS,
|
|
2245
2286
|
Ok: ()=>serializableConfig,
|
|
2246
2287
|
P2: ()=>parsePosix,
|
|
2247
2288
|
Un: ()=>isTTY,
|
|
2289
|
+
Uq: ()=>ADDITIONAL_NODE_BUILTINS,
|
|
2248
2290
|
Wk: ()=>formatError,
|
|
2249
2291
|
bg: ()=>castArray,
|
|
2250
2292
|
fN: ()=>getTaskNameWithPrefix,
|
|
2251
2293
|
kV: ()=>prettyTime,
|
|
2252
|
-
|
|
2294
|
+
tS: ()=>formatRootStr,
|
|
2295
|
+
yW: ()=>picocolors__WEBPACK_IMPORTED_MODULE_1___default.a
|
|
2253
2296
|
});
|
|
2254
|
-
var
|
|
2255
|
-
var
|
|
2256
|
-
var
|
|
2297
|
+
var pathe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs");
|
|
2298
|
+
var picocolors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
2299
|
+
var picocolors__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(picocolors__WEBPACK_IMPORTED_MODULE_1__);
|
|
2257
2300
|
__webpack_require__("./src/utils/constants.ts");
|
|
2301
|
+
const formatRootStr = (rootStr, root)=>rootStr.replace('<rootDir>', root);
|
|
2258
2302
|
function getAbsolutePath(base, filepath) {
|
|
2259
|
-
return (0,
|
|
2303
|
+
return (0, pathe__WEBPACK_IMPORTED_MODULE_2__.i)(filepath) ? filepath : (0, pathe__WEBPACK_IMPORTED_MODULE_2__.j)(base, filepath);
|
|
2260
2304
|
}
|
|
2261
2305
|
const parsePosix = (filePath)=>{
|
|
2262
|
-
const { dir, base } = (0,
|
|
2306
|
+
const { dir, base } = (0, pathe__WEBPACK_IMPORTED_MODULE_2__.p)(filePath);
|
|
2263
2307
|
return {
|
|
2264
|
-
dir: dir.split(
|
|
2308
|
+
dir: dir.split(pathe__WEBPACK_IMPORTED_MODULE_2__.s).join('/'),
|
|
2265
2309
|
base
|
|
2266
2310
|
};
|
|
2267
2311
|
};
|
|
@@ -2332,61 +2376,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2332
2376
|
if (22 === major && minor < 7) return true;
|
|
2333
2377
|
return false;
|
|
2334
2378
|
};
|
|
2335
|
-
const
|
|
2336
|
-
'assert',
|
|
2337
|
-
'assert/strict',
|
|
2338
|
-
'async_hooks',
|
|
2339
|
-
'buffer',
|
|
2340
|
-
'child_process',
|
|
2341
|
-
'cluster',
|
|
2342
|
-
'console',
|
|
2343
|
-
'constants',
|
|
2344
|
-
'crypto',
|
|
2345
|
-
'dgram',
|
|
2346
|
-
'diagnostics_channel',
|
|
2347
|
-
'dns',
|
|
2348
|
-
'dns/promises',
|
|
2349
|
-
'domain',
|
|
2350
|
-
'events',
|
|
2351
|
-
'fs',
|
|
2352
|
-
'fs/promises',
|
|
2353
|
-
'http',
|
|
2354
|
-
'http2',
|
|
2355
|
-
'https',
|
|
2356
|
-
'inspector',
|
|
2357
|
-
'inspector/promises',
|
|
2358
|
-
'module',
|
|
2359
|
-
'net',
|
|
2360
|
-
'os',
|
|
2361
|
-
'path',
|
|
2362
|
-
'path/posix',
|
|
2363
|
-
'path/win32',
|
|
2364
|
-
'perf_hooks',
|
|
2365
|
-
'process',
|
|
2366
|
-
'punycode',
|
|
2367
|
-
'querystring',
|
|
2368
|
-
'readline',
|
|
2369
|
-
'readline/promises',
|
|
2370
|
-
'repl',
|
|
2371
|
-
'stream',
|
|
2372
|
-
'stream/consumers',
|
|
2373
|
-
'stream/promises',
|
|
2374
|
-
'stream/web',
|
|
2375
|
-
'string_decoder',
|
|
2376
|
-
'sys',
|
|
2377
|
-
'timers',
|
|
2378
|
-
'timers/promises',
|
|
2379
|
-
'tls',
|
|
2380
|
-
'trace_events',
|
|
2381
|
-
'tty',
|
|
2382
|
-
'url',
|
|
2383
|
-
'util',
|
|
2384
|
-
'util/types',
|
|
2385
|
-
'v8',
|
|
2386
|
-
'vm',
|
|
2387
|
-
'wasi',
|
|
2388
|
-
'worker_threads',
|
|
2389
|
-
'zlib',
|
|
2379
|
+
const ADDITIONAL_NODE_BUILTINS = [
|
|
2390
2380
|
/^node:/,
|
|
2391
2381
|
'pnpapi'
|
|
2392
2382
|
];
|
|
@@ -2394,26 +2384,28 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2394
2384
|
},
|
|
2395
2385
|
"./src/utils/index.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2396
2386
|
__webpack_require__.d(__webpack_exports__, {
|
|
2387
|
+
TE: ()=>constants.TE,
|
|
2397
2388
|
C3: ()=>helper.C3,
|
|
2398
|
-
Ok: ()=>helper.Ok,
|
|
2399
2389
|
XJ: ()=>formatTestPath,
|
|
2400
2390
|
zZ: ()=>constants.zZ,
|
|
2401
2391
|
fN: ()=>helper.fN,
|
|
2402
2392
|
vF: ()=>logger.vF,
|
|
2393
|
+
Ok: ()=>helper.Ok,
|
|
2403
2394
|
vO: ()=>">",
|
|
2404
2395
|
tG: ()=>getTestEntries,
|
|
2405
2396
|
FI: ()=>helper.FI,
|
|
2406
|
-
|
|
2397
|
+
Uq: ()=>helper.Uq,
|
|
2407
2398
|
yW: ()=>helper.yW,
|
|
2399
|
+
kv: ()=>constants.kv,
|
|
2408
2400
|
WB: ()=>constants.WB,
|
|
2409
|
-
_o: ()=>logger._o,
|
|
2410
2401
|
pr: ()=>getSetupFiles,
|
|
2402
|
+
_o: ()=>logger._o,
|
|
2411
2403
|
EQ: ()=>prettyTestPath,
|
|
2412
|
-
Kv: ()=>helper.Kv,
|
|
2413
2404
|
zz: ()=>filterProjects,
|
|
2414
2405
|
mT: ()=>logger.mT,
|
|
2415
2406
|
t: ()=>constants.t,
|
|
2416
2407
|
kV: ()=>helper.kV,
|
|
2408
|
+
tS: ()=>helper.tS,
|
|
2417
2409
|
EJ: ()=>constants.EJ,
|
|
2418
2410
|
bg: ()=>helper.bg,
|
|
2419
2411
|
Un: ()=>helper.Un
|
|
@@ -2421,19 +2413,19 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2421
2413
|
var constants = __webpack_require__("./src/utils/constants.ts");
|
|
2422
2414
|
var helper = __webpack_require__("./src/utils/helper.ts");
|
|
2423
2415
|
var logger = __webpack_require__("./src/utils/logger.ts");
|
|
2424
|
-
var external_node_fs_ = __webpack_require__("fs");
|
|
2416
|
+
var external_node_fs_ = __webpack_require__("node:fs");
|
|
2425
2417
|
var promises_ = __webpack_require__("node:fs/promises");
|
|
2426
2418
|
var external_node_module_ = __webpack_require__("node:module");
|
|
2427
|
-
var
|
|
2428
|
-
var
|
|
2419
|
+
var dist = __webpack_require__("../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs");
|
|
2420
|
+
var tinyglobby_dist = __webpack_require__("../../node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs");
|
|
2429
2421
|
const filterFiles = (testFiles, filters, dir)=>{
|
|
2430
2422
|
if (!filters.length) return testFiles;
|
|
2431
|
-
const fileFilters = 'win32' === process.platform ? filters.map((f)=>f.split(
|
|
2423
|
+
const fileFilters = 'win32' === process.platform ? filters.map((f)=>f.split(dist.Ay.sep).join('/')) : filters;
|
|
2432
2424
|
return testFiles.filter((t)=>{
|
|
2433
|
-
const testFile =
|
|
2425
|
+
const testFile = dist.Ay.relative(dir, t).toLocaleLowerCase();
|
|
2434
2426
|
return fileFilters.some((f)=>{
|
|
2435
|
-
if (
|
|
2436
|
-
const relativePath = f.endsWith('/') ?
|
|
2427
|
+
if (dist.Ay.isAbsolute(f) && t.startsWith(f)) return true;
|
|
2428
|
+
const relativePath = f.endsWith('/') ? dist.Ay.join(dist.Ay.relative(dir, f), '/') : dist.Ay.relative(dir, f);
|
|
2437
2429
|
return testFile.includes(f.toLocaleLowerCase()) || testFile.includes(relativePath.toLocaleLowerCase());
|
|
2438
2430
|
});
|
|
2439
2431
|
});
|
|
@@ -2452,7 +2444,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2452
2444
|
const hasInSourceTestCode = (code)=>code.includes('import.meta.rstest');
|
|
2453
2445
|
const formatTestEntryName = (name)=>name.replace(/\.*[/\\]/g, '_').replace(/\./g, '~');
|
|
2454
2446
|
const getTestEntries = async ({ include, exclude, rootPath, projectRoot, fileFilters, includeSource })=>{
|
|
2455
|
-
const testFiles = await (0,
|
|
2447
|
+
const testFiles = await (0, tinyglobby_dist.glob)(include, {
|
|
2456
2448
|
cwd: projectRoot,
|
|
2457
2449
|
absolute: true,
|
|
2458
2450
|
ignore: exclude,
|
|
@@ -2460,7 +2452,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2460
2452
|
expandDirectories: false
|
|
2461
2453
|
});
|
|
2462
2454
|
if (includeSource?.length) {
|
|
2463
|
-
const sourceFiles = await (0,
|
|
2455
|
+
const sourceFiles = await (0, tinyglobby_dist.glob)(includeSource, {
|
|
2464
2456
|
cwd: projectRoot,
|
|
2465
2457
|
absolute: true,
|
|
2466
2458
|
ignore: exclude,
|
|
@@ -2477,7 +2469,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2477
2469
|
}));
|
|
2478
2470
|
}
|
|
2479
2471
|
return Object.fromEntries(filterFiles(testFiles, fileFilters, rootPath).map((entry)=>{
|
|
2480
|
-
const relativePath =
|
|
2472
|
+
const relativePath = dist.Ay.relative(rootPath, entry);
|
|
2481
2473
|
return [
|
|
2482
2474
|
formatTestEntryName(relativePath),
|
|
2483
2475
|
entry
|
|
@@ -2496,7 +2488,9 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2496
2488
|
return;
|
|
2497
2489
|
}
|
|
2498
2490
|
};
|
|
2499
|
-
const getSetupFiles = (setups, rootPath)=>
|
|
2491
|
+
const getSetupFiles = (setups, rootPath)=>{
|
|
2492
|
+
if (!setups.length) return {};
|
|
2493
|
+
return Object.fromEntries(setups.map((setupFile)=>{
|
|
2500
2494
|
const setupFilePath = (0, helper.FI)(rootPath, setupFile);
|
|
2501
2495
|
try {
|
|
2502
2496
|
if (!(0, external_node_fs_.existsSync)(setupFilePath)) {
|
|
@@ -2504,7 +2498,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2504
2498
|
if (setupFilePath !== setupFile) errorMessage += helper.yW.gray(` (resolved path: ${setupFilePath})`);
|
|
2505
2499
|
throw errorMessage;
|
|
2506
2500
|
}
|
|
2507
|
-
const relativePath =
|
|
2501
|
+
const relativePath = dist.Ay.relative(rootPath, setupFilePath);
|
|
2508
2502
|
return [
|
|
2509
2503
|
formatTestEntryName(relativePath),
|
|
2510
2504
|
setupFilePath
|
|
@@ -2517,13 +2511,14 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2517
2511
|
throw err;
|
|
2518
2512
|
}
|
|
2519
2513
|
}));
|
|
2514
|
+
};
|
|
2520
2515
|
const prettyTestPath = (testPath)=>{
|
|
2521
2516
|
const { dir, base } = (0, helper.P2)(testPath);
|
|
2522
2517
|
return `${'.' !== dir ? helper.yW.gray(`${dir}/`) : ''}${helper.yW.cyan(base)}`;
|
|
2523
2518
|
};
|
|
2524
2519
|
const formatTestPath = (root, testFilePath)=>{
|
|
2525
2520
|
let testPath = testFilePath;
|
|
2526
|
-
if (
|
|
2521
|
+
if (dist.Ay.isAbsolute(testPath) && testPath.includes(root)) testPath = dist.Ay.relative(root, testPath);
|
|
2527
2522
|
return prettyTestPath(testPath);
|
|
2528
2523
|
};
|
|
2529
2524
|
},
|
|
@@ -2816,7 +2811,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2816
2811
|
events: function(module) {
|
|
2817
2812
|
module.exports = __WEBPACK_EXTERNAL_MODULE_events__;
|
|
2818
2813
|
},
|
|
2819
|
-
fs: function(module) {
|
|
2814
|
+
"node:fs": function(module) {
|
|
2820
2815
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__;
|
|
2821
2816
|
},
|
|
2822
2817
|
"node:fs/promises": function(module) {
|
|
@@ -2834,15 +2829,494 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2834
2829
|
"node:tty": function(module) {
|
|
2835
2830
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_tty_c64aab7e__;
|
|
2836
2831
|
},
|
|
2837
|
-
pathe: function(
|
|
2838
|
-
|
|
2832
|
+
"../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2833
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
2834
|
+
Ay: ()=>posix
|
|
2835
|
+
});
|
|
2836
|
+
var _shared_pathe_M_eThtNZ_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs");
|
|
2837
|
+
const delimiter = /* @__PURE__ */ (()=>globalThis.process?.platform === "win32" ? ";" : ":")();
|
|
2838
|
+
const _platforms = {
|
|
2839
|
+
posix: void 0,
|
|
2840
|
+
win32: void 0
|
|
2841
|
+
};
|
|
2842
|
+
const mix = (del = delimiter)=>new Proxy(_shared_pathe_M_eThtNZ_mjs__WEBPACK_IMPORTED_MODULE_0__._, {
|
|
2843
|
+
get (_, prop) {
|
|
2844
|
+
if ("delimiter" === prop) return del;
|
|
2845
|
+
if ("posix" === prop) return posix;
|
|
2846
|
+
if ("win32" === prop) return win32;
|
|
2847
|
+
return _platforms[prop] || _shared_pathe_M_eThtNZ_mjs__WEBPACK_IMPORTED_MODULE_0__._[prop];
|
|
2848
|
+
}
|
|
2849
|
+
});
|
|
2850
|
+
const posix = /* @__PURE__ */ mix(":");
|
|
2851
|
+
const win32 = /* @__PURE__ */ mix(";");
|
|
2852
|
+
},
|
|
2853
|
+
"../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2854
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
2855
|
+
_: ()=>_path,
|
|
2856
|
+
b: ()=>relative,
|
|
2857
|
+
c: ()=>basename,
|
|
2858
|
+
d: ()=>dirname,
|
|
2859
|
+
i: ()=>isAbsolute,
|
|
2860
|
+
j: ()=>join,
|
|
2861
|
+
n: ()=>normalize,
|
|
2862
|
+
p: ()=>parse,
|
|
2863
|
+
r: ()=>resolve,
|
|
2864
|
+
s: ()=>sep
|
|
2865
|
+
});
|
|
2866
|
+
let _lazyMatch = ()=>{
|
|
2867
|
+
var __lib__ = (()=>{
|
|
2868
|
+
var m = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r, e)=>{
|
|
2869
|
+
for(var n in e)m(r, n, {
|
|
2870
|
+
get: e[n],
|
|
2871
|
+
enumerable: true
|
|
2872
|
+
});
|
|
2873
|
+
}, H = (r, e, n, a)=>{
|
|
2874
|
+
if (e && "object" == typeof e || "function" == typeof e) for (let t of G(e))T.call(r, t) || t === n || m(r, t, {
|
|
2875
|
+
get: ()=>e[t],
|
|
2876
|
+
enumerable: !(a = V(e, t)) || a.enumerable
|
|
2877
|
+
});
|
|
2878
|
+
return r;
|
|
2879
|
+
}, J = (r)=>H(m({}, "__esModule", {
|
|
2880
|
+
value: true
|
|
2881
|
+
}), r), w = {};
|
|
2882
|
+
q(w, {
|
|
2883
|
+
default: ()=>re
|
|
2884
|
+
});
|
|
2885
|
+
var A = (r)=>Array.isArray(r), d = (r)=>"function" == typeof r, Q = (r)=>0 === r.length, W = (r)=>"number" == typeof r, K = (r)=>"object" == typeof r && null !== r, X = (r)=>r instanceof RegExp, b = (r)=>"string" == typeof r, h = (r)=>void 0 === r, Y = (r)=>{
|
|
2886
|
+
const e = new Map;
|
|
2887
|
+
return (n)=>{
|
|
2888
|
+
const a = e.get(n);
|
|
2889
|
+
if (a) return a;
|
|
2890
|
+
const t = r(n);
|
|
2891
|
+
return e.set(n, t), t;
|
|
2892
|
+
};
|
|
2893
|
+
}, rr = (r, e, n = {})=>{
|
|
2894
|
+
const a = {
|
|
2895
|
+
cache: {},
|
|
2896
|
+
input: r,
|
|
2897
|
+
index: 0,
|
|
2898
|
+
indexMax: 0,
|
|
2899
|
+
options: n,
|
|
2900
|
+
output: []
|
|
2901
|
+
};
|
|
2902
|
+
if (v(e)(a) && a.index === r.length) return a.output;
|
|
2903
|
+
throw new Error(`Failed to parse at index ${a.indexMax}`);
|
|
2904
|
+
}, i = (r, e)=>A(r) ? er(r, e) : b(r) ? ar(r, e) : nr(r, e), er = (r, e)=>{
|
|
2905
|
+
const n = {};
|
|
2906
|
+
for (const a of r){
|
|
2907
|
+
if (1 !== a.length) throw new Error(`Invalid character: "${a}"`);
|
|
2908
|
+
const t = a.charCodeAt(0);
|
|
2909
|
+
n[t] = true;
|
|
2910
|
+
}
|
|
2911
|
+
return (a)=>{
|
|
2912
|
+
const t = a.index, o = a.input;
|
|
2913
|
+
for(; a.index < o.length && o.charCodeAt(a.index) in n;)a.index += 1;
|
|
2914
|
+
const u = a.index;
|
|
2915
|
+
if (u > t) {
|
|
2916
|
+
if (!h(e) && !a.options.silent) {
|
|
2917
|
+
const s = a.input.slice(t, u), c = d(e) ? e(s, o, String(t)) : e;
|
|
2918
|
+
h(c) || a.output.push(c);
|
|
2919
|
+
}
|
|
2920
|
+
a.indexMax = Math.max(a.indexMax, a.index);
|
|
2921
|
+
}
|
|
2922
|
+
return true;
|
|
2923
|
+
};
|
|
2924
|
+
}, nr = (r, e)=>{
|
|
2925
|
+
const n = r.source, a = r.flags.replace(/y|$/, "y"), t = new RegExp(n, a);
|
|
2926
|
+
return g((o)=>{
|
|
2927
|
+
t.lastIndex = o.index;
|
|
2928
|
+
const u = t.exec(o.input);
|
|
2929
|
+
if (!u) return false;
|
|
2930
|
+
if (!h(e) && !o.options.silent) {
|
|
2931
|
+
const s = d(e) ? e(...u, o.input, String(o.index)) : e;
|
|
2932
|
+
h(s) || o.output.push(s);
|
|
2933
|
+
}
|
|
2934
|
+
return o.index += u[0].length, o.indexMax = Math.max(o.indexMax, o.index), true;
|
|
2935
|
+
});
|
|
2936
|
+
}, ar = (r, e)=>(n)=>{
|
|
2937
|
+
if (!n.input.startsWith(r, n.index)) return false;
|
|
2938
|
+
if (!h(e) && !n.options.silent) {
|
|
2939
|
+
const t = d(e) ? e(r, n.input, String(n.index)) : e;
|
|
2940
|
+
h(t) || n.output.push(t);
|
|
2941
|
+
}
|
|
2942
|
+
return n.index += r.length, n.indexMax = Math.max(n.indexMax, n.index), true;
|
|
2943
|
+
}, C = (r, e, n, a)=>{
|
|
2944
|
+
const t = v(r);
|
|
2945
|
+
return g(_(M((o)=>{
|
|
2946
|
+
let u = 0;
|
|
2947
|
+
for(; u < n;){
|
|
2948
|
+
const s = o.index;
|
|
2949
|
+
if (!t(o) || (u += 1, o.index === s)) break;
|
|
2950
|
+
}
|
|
2951
|
+
return u >= e;
|
|
2952
|
+
})));
|
|
2953
|
+
}, tr = (r, e)=>C(r, 0, 1), f = (r, e)=>C(r, 0, 1 / 0), x = (r, e)=>{
|
|
2954
|
+
const n = r.map(v);
|
|
2955
|
+
return g(_(M((a)=>{
|
|
2956
|
+
for(let t = 0, o = n.length; t < o; t++)if (!n[t](a)) return false;
|
|
2957
|
+
return true;
|
|
2958
|
+
})));
|
|
2959
|
+
}, l = (r, e)=>{
|
|
2960
|
+
const n = r.map(v);
|
|
2961
|
+
return g(_((a)=>{
|
|
2962
|
+
for(let t = 0, o = n.length; t < o; t++)if (n[t](a)) return true;
|
|
2963
|
+
return false;
|
|
2964
|
+
}));
|
|
2965
|
+
}, M = (r, e = false)=>{
|
|
2966
|
+
const n = v(r);
|
|
2967
|
+
return (a)=>{
|
|
2968
|
+
const t = a.index, o = a.output.length, u = n(a);
|
|
2969
|
+
return (!u || e) && (a.index = t, a.output.length !== o && (a.output.length = o)), u;
|
|
2970
|
+
};
|
|
2971
|
+
}, _ = (r, e)=>{
|
|
2972
|
+
const n = v(r);
|
|
2973
|
+
return n;
|
|
2974
|
+
}, g = (()=>{
|
|
2975
|
+
let r = 0;
|
|
2976
|
+
return (e)=>{
|
|
2977
|
+
const n = v(e), a = r += 1;
|
|
2978
|
+
return (t)=>{
|
|
2979
|
+
var o;
|
|
2980
|
+
if (false === t.options.memoization) return n(t);
|
|
2981
|
+
const u = t.index, s = (o = t.cache)[a] || (o[a] = new Map), c = s.get(u);
|
|
2982
|
+
if (false === c) return false;
|
|
2983
|
+
if (W(c)) return t.index = c, true;
|
|
2984
|
+
if (c) return t.index = c.index, c.output?.length && t.output.push(...c.output), true;
|
|
2985
|
+
{
|
|
2986
|
+
const Z = t.output.length;
|
|
2987
|
+
if (!n(t)) return s.set(u, false), false;
|
|
2988
|
+
{
|
|
2989
|
+
const D = t.index, U = t.output.length;
|
|
2990
|
+
if (U > Z) {
|
|
2991
|
+
const ee = t.output.slice(Z, U);
|
|
2992
|
+
s.set(u, {
|
|
2993
|
+
index: D,
|
|
2994
|
+
output: ee
|
|
2995
|
+
});
|
|
2996
|
+
} else s.set(u, D);
|
|
2997
|
+
return true;
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
};
|
|
3001
|
+
};
|
|
3002
|
+
})(), E = (r)=>{
|
|
3003
|
+
let e;
|
|
3004
|
+
return (n)=>(e || (e = v(r())), e(n));
|
|
3005
|
+
}, v = Y((r)=>{
|
|
3006
|
+
if (d(r)) return Q(r) ? E(r) : r;
|
|
3007
|
+
if (b(r) || X(r)) return i(r);
|
|
3008
|
+
if (A(r)) return x(r);
|
|
3009
|
+
if (K(r)) return l(Object.values(r));
|
|
3010
|
+
throw new Error("Invalid rule");
|
|
3011
|
+
}), P = "abcdefghijklmnopqrstuvwxyz", ir = (r)=>{
|
|
3012
|
+
let e = "";
|
|
3013
|
+
for(; r > 0;){
|
|
3014
|
+
const n = (r - 1) % 26;
|
|
3015
|
+
e = P[n] + e, r = Math.floor((r - 1) / 26);
|
|
3016
|
+
}
|
|
3017
|
+
return e;
|
|
3018
|
+
}, O = (r)=>{
|
|
3019
|
+
let e = 0;
|
|
3020
|
+
for(let n = 0, a = r.length; n < a; n++)e = 26 * e + P.indexOf(r[n]) + 1;
|
|
3021
|
+
return e;
|
|
3022
|
+
}, S = (r, e)=>{
|
|
3023
|
+
if (e < r) return S(e, r);
|
|
3024
|
+
const n = [];
|
|
3025
|
+
for(; r <= e;)n.push(r++);
|
|
3026
|
+
return n;
|
|
3027
|
+
}, or = (r, e, n)=>S(r, e).map((a)=>String(a).padStart(n, "0")), R = (r, e)=>S(O(r), O(e)).map(ir), p = (r)=>r, z = (r)=>ur((e)=>rr(e, r, {
|
|
3028
|
+
memoization: false
|
|
3029
|
+
}).join("")), ur = (r)=>{
|
|
3030
|
+
const e = {};
|
|
3031
|
+
return (n)=>e[n] ?? (e[n] = r(n));
|
|
3032
|
+
}, sr = i(/^\*\*\/\*$/, ".*"), cr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r, e, n)=>`.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}`), lr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r, e, n, a)=>`.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}(?:${a.replaceAll(",", "|").replaceAll(".", "\\.")})`), y = i(/\\./, p), pr = i(/[$.*+?^(){}[\]\|]/, (r)=>`\\${r}`), vr = i(/./, p), hr = i(/^(?:!!)*!(.*)$/, (r, e)=>`(?!^${L(e)}$).*?`), dr = i(/^(!!)+/, ""), fr = l([
|
|
3033
|
+
hr,
|
|
3034
|
+
dr
|
|
3035
|
+
]), xr = i(/\/(\*\*\/)+/, "(?:/.+/|/)"), gr = i(/^(\*\*\/)+/, "(?:^|.*/)"), mr = i(/\/(\*\*)$/, "(?:/.*|$)"), _r = i(/\*\*/, ".*"), j = l([
|
|
3036
|
+
xr,
|
|
3037
|
+
gr,
|
|
3038
|
+
mr,
|
|
3039
|
+
_r
|
|
3040
|
+
]), Sr = i(/\*\/(?!\*\*\/)/, "[^/]*/"), yr = i(/\*/, "[^/]*"), N = l([
|
|
3041
|
+
Sr,
|
|
3042
|
+
yr
|
|
3043
|
+
]), k = i("?", "[^/]"), $r = i("[", p), wr = i("]", p), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p), Cr = i(/[$.*+?^(){}[\|]/, (r)=>`\\${r}`), Mr = i(/[^\]]/, p), Er = l([
|
|
3044
|
+
y,
|
|
3045
|
+
Cr,
|
|
3046
|
+
br,
|
|
3047
|
+
Mr
|
|
3048
|
+
]), B = x([
|
|
3049
|
+
$r,
|
|
3050
|
+
tr(Ar),
|
|
3051
|
+
f(Er),
|
|
3052
|
+
wr
|
|
3053
|
+
]), Pr = i("{", "(?:"), Or = i("}", ")"), Rr = i(/(\d+)\.\.(\d+)/, (r, e, n)=>or(+e, +n, Math.min(e.length, n.length)).join("|")), zr = i(/([a-z]+)\.\.([a-z]+)/, (r, e, n)=>R(e, n).join("|")), jr = i(/([A-Z]+)\.\.([A-Z]+)/, (r, e, n)=>R(e.toLowerCase(), n.toLowerCase()).join("|").toUpperCase()), Nr = l([
|
|
3054
|
+
Rr,
|
|
3055
|
+
zr,
|
|
3056
|
+
jr
|
|
3057
|
+
]), I = x([
|
|
3058
|
+
Pr,
|
|
3059
|
+
Nr,
|
|
3060
|
+
Or
|
|
3061
|
+
]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r)=>`\\${r}`), Lr = i(/[^}]/, p), Zr = E(()=>F), Dr = l([
|
|
3062
|
+
j,
|
|
3063
|
+
N,
|
|
3064
|
+
k,
|
|
3065
|
+
B,
|
|
3066
|
+
I,
|
|
3067
|
+
Zr,
|
|
3068
|
+
y,
|
|
3069
|
+
Fr,
|
|
3070
|
+
Ir,
|
|
3071
|
+
Lr
|
|
3072
|
+
]), F = x([
|
|
3073
|
+
kr,
|
|
3074
|
+
f(Dr),
|
|
3075
|
+
Br
|
|
3076
|
+
]), Ur = f(l([
|
|
3077
|
+
sr,
|
|
3078
|
+
cr,
|
|
3079
|
+
lr,
|
|
3080
|
+
fr,
|
|
3081
|
+
j,
|
|
3082
|
+
N,
|
|
3083
|
+
k,
|
|
3084
|
+
B,
|
|
3085
|
+
I,
|
|
3086
|
+
F,
|
|
3087
|
+
y,
|
|
3088
|
+
pr,
|
|
3089
|
+
vr
|
|
3090
|
+
])), Vr = Ur, Gr = z(Vr), L = Gr, Tr = i(/\\./, p), qr = i(/./, p), Hr = i(/\*\*\*+/, "*"), Jr = i(/([^/{[(!])\*\*/, (r, e)=>`${e}*`), Qr = i(/(^|.)\*\*(?=[^*/)\]}])/, (r, e)=>`${e}*`), Wr = f(l([
|
|
3091
|
+
Tr,
|
|
3092
|
+
Hr,
|
|
3093
|
+
Jr,
|
|
3094
|
+
Qr,
|
|
3095
|
+
qr
|
|
3096
|
+
])), Kr = Wr, Xr = z(Kr), Yr = Xr, $ = (r, e)=>{
|
|
3097
|
+
const n = Array.isArray(r) ? r : [
|
|
3098
|
+
r
|
|
3099
|
+
];
|
|
3100
|
+
if (!n.length) return false;
|
|
3101
|
+
const a = n.map($.compile), t = n.every((s)=>/(\/(?:\*\*)?|\[\/\])$/.test(s)), o = e.replace(/[\\\/]+/g, "/").replace(/\/$/, t ? "/" : "");
|
|
3102
|
+
return a.some((s)=>s.test(o));
|
|
3103
|
+
};
|
|
3104
|
+
$.compile = (r)=>new RegExp(`^${L(Yr(r))}$`, "s");
|
|
3105
|
+
var re = $;
|
|
3106
|
+
return J(w);
|
|
3107
|
+
})();
|
|
3108
|
+
return __lib__.default || __lib__;
|
|
3109
|
+
};
|
|
3110
|
+
let _match;
|
|
3111
|
+
const zeptomatch = (path, pattern)=>{
|
|
3112
|
+
if (!_match) {
|
|
3113
|
+
_match = _lazyMatch();
|
|
3114
|
+
_lazyMatch = null;
|
|
3115
|
+
}
|
|
3116
|
+
return _match(path, pattern);
|
|
3117
|
+
};
|
|
3118
|
+
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
3119
|
+
function normalizeWindowsPath(input = "") {
|
|
3120
|
+
if (!input) return input;
|
|
3121
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r)=>r.toUpperCase());
|
|
3122
|
+
}
|
|
3123
|
+
const _UNC_REGEX = /^[/\\]{2}/;
|
|
3124
|
+
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
3125
|
+
const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
3126
|
+
const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
3127
|
+
const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
|
|
3128
|
+
const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
|
|
3129
|
+
const sep = "/";
|
|
3130
|
+
const normalize = function(path) {
|
|
3131
|
+
if (0 === path.length) return ".";
|
|
3132
|
+
path = normalizeWindowsPath(path);
|
|
3133
|
+
const isUNCPath = path.match(_UNC_REGEX);
|
|
3134
|
+
const isPathAbsolute = isAbsolute(path);
|
|
3135
|
+
const trailingSeparator = "/" === path[path.length - 1];
|
|
3136
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
3137
|
+
if (0 === path.length) {
|
|
3138
|
+
if (isPathAbsolute) return "/";
|
|
3139
|
+
return trailingSeparator ? "./" : ".";
|
|
3140
|
+
}
|
|
3141
|
+
if (trailingSeparator) path += "/";
|
|
3142
|
+
if (_DRIVE_LETTER_RE.test(path)) path += "/";
|
|
3143
|
+
if (isUNCPath) {
|
|
3144
|
+
if (!isPathAbsolute) return `//./${path}`;
|
|
3145
|
+
return `//${path}`;
|
|
3146
|
+
}
|
|
3147
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
3148
|
+
};
|
|
3149
|
+
const join = function(...segments) {
|
|
3150
|
+
let path = "";
|
|
3151
|
+
for (const seg of segments)if (seg) if (path.length > 0) {
|
|
3152
|
+
const pathTrailing = "/" === path[path.length - 1];
|
|
3153
|
+
const segLeading = "/" === seg[0];
|
|
3154
|
+
const both = pathTrailing && segLeading;
|
|
3155
|
+
if (both) path += seg.slice(1);
|
|
3156
|
+
else path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
3157
|
+
} else path += seg;
|
|
3158
|
+
return normalize(path);
|
|
3159
|
+
};
|
|
3160
|
+
function cwd() {
|
|
3161
|
+
if ("undefined" != typeof process && "function" == typeof process.cwd) return process.cwd().replace(/\\/g, "/");
|
|
3162
|
+
return "/";
|
|
3163
|
+
}
|
|
3164
|
+
const resolve = function(...arguments_) {
|
|
3165
|
+
arguments_ = arguments_.map((argument)=>normalizeWindowsPath(argument));
|
|
3166
|
+
let resolvedPath = "";
|
|
3167
|
+
let resolvedAbsolute = false;
|
|
3168
|
+
for(let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--){
|
|
3169
|
+
const path = index >= 0 ? arguments_[index] : cwd();
|
|
3170
|
+
if (path && 0 !== path.length) {
|
|
3171
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
3172
|
+
resolvedAbsolute = isAbsolute(path);
|
|
3173
|
+
}
|
|
3174
|
+
}
|
|
3175
|
+
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
3176
|
+
if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
|
|
3177
|
+
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
3178
|
+
};
|
|
3179
|
+
function normalizeString(path, allowAboveRoot) {
|
|
3180
|
+
let res = "";
|
|
3181
|
+
let lastSegmentLength = 0;
|
|
3182
|
+
let lastSlash = -1;
|
|
3183
|
+
let dots = 0;
|
|
3184
|
+
let char = null;
|
|
3185
|
+
for(let index = 0; index <= path.length; ++index){
|
|
3186
|
+
if (index < path.length) char = path[index];
|
|
3187
|
+
else if ("/" === char) break;
|
|
3188
|
+
else char = "/";
|
|
3189
|
+
if ("/" === char) {
|
|
3190
|
+
if (lastSlash === index - 1 || 1 === dots) ;
|
|
3191
|
+
else if (2 === dots) {
|
|
3192
|
+
if (res.length < 2 || 2 !== lastSegmentLength || "." !== res[res.length - 1] || "." !== res[res.length - 2]) {
|
|
3193
|
+
if (res.length > 2) {
|
|
3194
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
3195
|
+
if (-1 === lastSlashIndex) {
|
|
3196
|
+
res = "";
|
|
3197
|
+
lastSegmentLength = 0;
|
|
3198
|
+
} else {
|
|
3199
|
+
res = res.slice(0, lastSlashIndex);
|
|
3200
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
3201
|
+
}
|
|
3202
|
+
lastSlash = index;
|
|
3203
|
+
dots = 0;
|
|
3204
|
+
continue;
|
|
3205
|
+
} else if (res.length > 0) {
|
|
3206
|
+
res = "";
|
|
3207
|
+
lastSegmentLength = 0;
|
|
3208
|
+
lastSlash = index;
|
|
3209
|
+
dots = 0;
|
|
3210
|
+
continue;
|
|
3211
|
+
}
|
|
3212
|
+
}
|
|
3213
|
+
if (allowAboveRoot) {
|
|
3214
|
+
res += res.length > 0 ? "/.." : "..";
|
|
3215
|
+
lastSegmentLength = 2;
|
|
3216
|
+
}
|
|
3217
|
+
} else {
|
|
3218
|
+
if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
|
|
3219
|
+
else res = path.slice(lastSlash + 1, index);
|
|
3220
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
3221
|
+
}
|
|
3222
|
+
lastSlash = index;
|
|
3223
|
+
dots = 0;
|
|
3224
|
+
} else if ("." === char && -1 !== dots) ++dots;
|
|
3225
|
+
else dots = -1;
|
|
3226
|
+
}
|
|
3227
|
+
return res;
|
|
3228
|
+
}
|
|
3229
|
+
const isAbsolute = function(p) {
|
|
3230
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
3231
|
+
};
|
|
3232
|
+
const toNamespacedPath = function(p) {
|
|
3233
|
+
return normalizeWindowsPath(p);
|
|
3234
|
+
};
|
|
3235
|
+
const extname = function(p) {
|
|
3236
|
+
if (".." === p) return "";
|
|
3237
|
+
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
|
|
3238
|
+
return match && match[1] || "";
|
|
3239
|
+
};
|
|
3240
|
+
const relative = function(from, to) {
|
|
3241
|
+
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
3242
|
+
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
3243
|
+
if (":" === _to[0][1] && ":" === _from[0][1] && _from[0] !== _to[0]) return _to.join("/");
|
|
3244
|
+
const _fromCopy = [
|
|
3245
|
+
..._from
|
|
3246
|
+
];
|
|
3247
|
+
for (const segment of _fromCopy){
|
|
3248
|
+
if (_to[0] !== segment) break;
|
|
3249
|
+
_from.shift();
|
|
3250
|
+
_to.shift();
|
|
3251
|
+
}
|
|
3252
|
+
return [
|
|
3253
|
+
..._from.map(()=>".."),
|
|
3254
|
+
..._to
|
|
3255
|
+
].join("/");
|
|
3256
|
+
};
|
|
3257
|
+
const dirname = function(p) {
|
|
3258
|
+
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
3259
|
+
if (1 === segments.length && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
|
|
3260
|
+
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
3261
|
+
};
|
|
3262
|
+
const format = function(p) {
|
|
3263
|
+
const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
|
|
3264
|
+
const segments = [
|
|
3265
|
+
p.root,
|
|
3266
|
+
p.dir,
|
|
3267
|
+
p.base ?? (p.name ?? "") + ext
|
|
3268
|
+
].filter(Boolean);
|
|
3269
|
+
return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
|
|
3270
|
+
};
|
|
3271
|
+
const basename = function(p, extension) {
|
|
3272
|
+
const segments = normalizeWindowsPath(p).split("/");
|
|
3273
|
+
let lastSegment = "";
|
|
3274
|
+
for(let i = segments.length - 1; i >= 0; i--){
|
|
3275
|
+
const val = segments[i];
|
|
3276
|
+
if (val) {
|
|
3277
|
+
lastSegment = val;
|
|
3278
|
+
break;
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
3282
|
+
};
|
|
3283
|
+
const parse = function(p) {
|
|
3284
|
+
const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
|
|
3285
|
+
const base = basename(p);
|
|
3286
|
+
const extension = extname(base);
|
|
3287
|
+
return {
|
|
3288
|
+
root,
|
|
3289
|
+
dir: dirname(p),
|
|
3290
|
+
base,
|
|
3291
|
+
ext: extension,
|
|
3292
|
+
name: base.slice(0, base.length - extension.length)
|
|
3293
|
+
};
|
|
3294
|
+
};
|
|
3295
|
+
const matchesGlob = (path, pattern)=>zeptomatch(pattern, normalize(path));
|
|
3296
|
+
const _path = {
|
|
3297
|
+
__proto__: null,
|
|
3298
|
+
basename: basename,
|
|
3299
|
+
dirname: dirname,
|
|
3300
|
+
extname: extname,
|
|
3301
|
+
format: format,
|
|
3302
|
+
isAbsolute: isAbsolute,
|
|
3303
|
+
join: join,
|
|
3304
|
+
matchesGlob: matchesGlob,
|
|
3305
|
+
normalize: normalize,
|
|
3306
|
+
normalizeString: normalizeString,
|
|
3307
|
+
parse: parse,
|
|
3308
|
+
relative: relative,
|
|
3309
|
+
resolve: resolve,
|
|
3310
|
+
sep: sep,
|
|
3311
|
+
toNamespacedPath: toNamespacedPath
|
|
3312
|
+
};
|
|
2839
3313
|
},
|
|
2840
3314
|
"../../node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2841
3315
|
__webpack_require__.d(__webpack_exports__, {
|
|
2842
3316
|
ey: ()=>isDynamicPattern,
|
|
2843
3317
|
glob: ()=>glob
|
|
2844
3318
|
});
|
|
2845
|
-
var external_node_fs_ = __webpack_require__("fs");
|
|
3319
|
+
var external_node_fs_ = __webpack_require__("node:fs");
|
|
2846
3320
|
var external_node_path_ = __webpack_require__("node:path");
|
|
2847
3321
|
var __require = /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_module__.createRequire)(import.meta.url);
|
|
2848
3322
|
function cleanPath(path) {
|