@rstest/core 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{72.js → 171.js} +2 -1
- package/dist/{920.js → 33.js} +36 -33
- package/dist/{44.js → 350.js} +6 -5
- package/dist/{813.js → 607.js} +16 -15
- package/dist/{208.js → 655.js} +61 -60
- package/dist/{359.js → 698.js} +74 -66
- package/dist/{355.js → 704.js} +17 -16
- package/dist/{965.js → 711.js} +6 -5
- package/dist/{443.js → 755.js} +2 -1
- package/dist/{723.js → 829.js} +5 -4
- package/dist/{867.js → 85.js} +56 -55
- package/dist/{668.js → 928.js} +3 -2
- package/dist/{25.js → 967.js} +8 -7
- package/dist/{64.js → 969.js} +2 -1
- package/dist/{285.js → 971.js} +12 -11
- package/dist/{854.js → 985.js} +14 -13
- package/dist/index.js +85 -85
- package/dist/worker.js +41 -39
- package/dist-types/index.d.ts +1 -0
- package/dist-types/worker.d.ts +1 -0
- package/package.json +4 -4
- /package/dist/{208.js.LICENSE.txt → 655.js.LICENSE.txt} +0 -0
- /package/dist/{668.js.LICENSE.txt → 928.js.LICENSE.txt} +0 -0
package/dist/{854.js → 985.js}
RENAMED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
+
export const __webpack_id__ = "985";
|
|
3
4
|
export const __webpack_ids__ = [
|
|
4
|
-
"
|
|
5
|
+
"985"
|
|
5
6
|
];
|
|
6
7
|
export const __webpack_modules__ = {
|
|
7
8
|
"./src/core/rsbuild.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8
9
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
|
-
|
|
10
|
+
X: ()=>createRsbuildServer,
|
|
10
11
|
z: ()=>prepareRsbuild
|
|
11
12
|
});
|
|
12
13
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
@@ -36,7 +37,7 @@ export const __webpack_modules__ = {
|
|
|
36
37
|
js: 'source-map'
|
|
37
38
|
},
|
|
38
39
|
distPath: {
|
|
39
|
-
root: utils.
|
|
40
|
+
root: utils.zZ
|
|
40
41
|
}
|
|
41
42
|
},
|
|
42
43
|
tools: {
|
|
@@ -155,9 +156,9 @@ export const __webpack_modules__ = {
|
|
|
155
156
|
};
|
|
156
157
|
};
|
|
157
158
|
config.watchOptions ??= {};
|
|
158
|
-
config.watchOptions.ignored = (0, utils.
|
|
159
|
+
config.watchOptions.ignored = (0, utils.bg)(config.watchOptions.ignored || []);
|
|
159
160
|
if (0 === config.watchOptions.ignored.length) config.watchOptions.ignored.push('**/.git', '**/node_modules');
|
|
160
|
-
config.watchOptions.ignored.push(utils.
|
|
161
|
+
config.watchOptions.ignored.push(utils.EJ, '**/*.snap');
|
|
161
162
|
if (configFilePath) config.watchOptions.ignored.push(configFilePath);
|
|
162
163
|
} else {
|
|
163
164
|
config.watch = false;
|
|
@@ -188,7 +189,7 @@ export const __webpack_modules__ = {
|
|
|
188
189
|
};
|
|
189
190
|
function autoExternalNodeBuiltin({ request, dependencyType }, callback) {
|
|
190
191
|
if (!request) return void callback();
|
|
191
|
-
const isNodeBuiltin = utils.
|
|
192
|
+
const isNodeBuiltin = utils.Kv.some((builtin)=>{
|
|
192
193
|
if ('string' == typeof builtin) return builtin === request;
|
|
193
194
|
return builtin.test(request);
|
|
194
195
|
});
|
|
@@ -206,7 +207,7 @@ export const __webpack_modules__ = {
|
|
|
206
207
|
},
|
|
207
208
|
tools: {
|
|
208
209
|
rspack: (config)=>{
|
|
209
|
-
config.externals = (0, utils.
|
|
210
|
+
config.externals = (0, utils.bg)(config.externals) || [];
|
|
210
211
|
config.externals.unshift({
|
|
211
212
|
'@rstest/core': 'global @rstest/core'
|
|
212
213
|
});
|
|
@@ -444,7 +445,7 @@ global.__rstest_clean_core_cache__ = __rstest_clean_core_cache__;
|
|
|
444
445
|
const isMultiCompiler = (compiler)=>'compilers' in compiler && Array.isArray(compiler.compilers);
|
|
445
446
|
const prepareRsbuild = async (context, globTestSourceEntries, setupFiles)=>{
|
|
446
447
|
const { command, normalizedConfig: { isolate, plugins, resolve, source, output, tools, testEnvironment, performance, dev = {} } } = context;
|
|
447
|
-
const debugMode = (0, utils.
|
|
448
|
+
const debugMode = (0, utils._o)();
|
|
448
449
|
core_.logger.level = debugMode ? 'verbose' : 'error';
|
|
449
450
|
const writeToDisk = dev.writeToDisk || debugMode;
|
|
450
451
|
const rsbuildInstance = await (0, core_.createRsbuild)({
|
|
@@ -503,7 +504,7 @@ global.__rstest_clean_core_cache__ = __rstest_clean_core_cache__;
|
|
|
503
504
|
const devServer = await rsbuildInstance.createDevServer({
|
|
504
505
|
getPortSilently: true
|
|
505
506
|
});
|
|
506
|
-
if ((0, utils.
|
|
507
|
+
if ((0, utils._o)()) await rsbuildInstance.inspectConfig({
|
|
507
508
|
writeToDisk: true,
|
|
508
509
|
extraConfigs: {
|
|
509
510
|
rstest: normalizedConfig
|
|
@@ -609,7 +610,7 @@ global.__rstest_clean_core_cache__ = __rstest_clean_core_cache__;
|
|
|
609
610
|
},
|
|
610
611
|
"./src/pool/index.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
611
612
|
__webpack_require__.d(__webpack_exports__, {
|
|
612
|
-
|
|
613
|
+
b: ()=>createPool
|
|
613
614
|
});
|
|
614
615
|
var external_node_os_ = __webpack_require__("node:os");
|
|
615
616
|
var utils = __webpack_require__("./src/utils/index.ts");
|
|
@@ -748,7 +749,7 @@ global.__rstest_clean_core_cache__ = __rstest_clean_core_cache__;
|
|
|
748
749
|
'--experimental-vm-modules',
|
|
749
750
|
'--experimental-import-meta-resolve',
|
|
750
751
|
'--no-warnings',
|
|
751
|
-
(0, utils.
|
|
752
|
+
(0, utils.C3)() ? '--experimental-detect-module' : void 0
|
|
752
753
|
].filter(Boolean),
|
|
753
754
|
env: {
|
|
754
755
|
NODE_ENV: 'test',
|
|
@@ -783,7 +784,7 @@ global.__rstest_clean_core_cache__ = __rstest_clean_core_cache__;
|
|
|
783
784
|
assetFiles: neededFiles,
|
|
784
785
|
context: {
|
|
785
786
|
rootPath: context.rootPath,
|
|
786
|
-
runtimeConfig: (0, utils.
|
|
787
|
+
runtimeConfig: (0, utils.Ok)(runtimeConfig)
|
|
787
788
|
},
|
|
788
789
|
type: 'run',
|
|
789
790
|
sourceMaps: neededSourceMaps,
|
|
@@ -823,7 +824,7 @@ global.__rstest_clean_core_cache__ = __rstest_clean_core_cache__;
|
|
|
823
824
|
assetFiles: neededFiles,
|
|
824
825
|
context: {
|
|
825
826
|
rootPath: context.rootPath,
|
|
826
|
-
runtimeConfig: (0, utils.
|
|
827
|
+
runtimeConfig: (0, utils.Ok)(runtimeConfig)
|
|
827
828
|
},
|
|
828
829
|
type: 'collect',
|
|
829
830
|
sourceMaps: neededSourceMaps,
|
package/dist/index.js
CHANGED
|
@@ -2181,8 +2181,8 @@ var __webpack_modules__ = {
|
|
|
2181
2181
|
},
|
|
2182
2182
|
"./src/cli/commands.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2183
2183
|
__webpack_require__.d(__webpack_exports__, {
|
|
2184
|
-
|
|
2185
|
-
|
|
2184
|
+
a8: ()=>runRest,
|
|
2185
|
+
QF: ()=>setupCommands
|
|
2186
2186
|
});
|
|
2187
2187
|
var external_events_ = __webpack_require__("events");
|
|
2188
2188
|
function toArr(any) {
|
|
@@ -2682,8 +2682,8 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2682
2682
|
};
|
|
2683
2683
|
async function initCli(options) {
|
|
2684
2684
|
const cwd = process.cwd();
|
|
2685
|
-
const root = options.root ? (0, helper.
|
|
2686
|
-
const { content: config, filePath: configFilePath } = await (0, src_config.
|
|
2685
|
+
const root = options.root ? (0, helper.FI)(cwd, options.root) : cwd;
|
|
2686
|
+
const { content: config, filePath: configFilePath } = await (0, src_config.Z9)({
|
|
2687
2687
|
cwd: root,
|
|
2688
2688
|
path: options.config,
|
|
2689
2689
|
configLoader: options.configLoader
|
|
@@ -2710,9 +2710,9 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2710
2710
|
'testEnvironment'
|
|
2711
2711
|
];
|
|
2712
2712
|
for (const key of keys)if (void 0 !== options[key]) config[key] = options[key];
|
|
2713
|
-
if (options.exclude) config.exclude = (0, helper.
|
|
2714
|
-
if (options.reporter) config.reporters = (0, helper.
|
|
2715
|
-
if (options.include) config.include = (0, helper.
|
|
2713
|
+
if (options.exclude) config.exclude = (0, helper.bg)(options.exclude);
|
|
2714
|
+
if (options.reporter) config.reporters = (0, helper.bg)(options.reporter);
|
|
2715
|
+
if (options.include) config.include = (0, helper.bg)(options.include);
|
|
2716
2716
|
return {
|
|
2717
2717
|
config,
|
|
2718
2718
|
configFilePath: configFilePath ?? void 0
|
|
@@ -2722,13 +2722,13 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2722
2722
|
let rstest;
|
|
2723
2723
|
try {
|
|
2724
2724
|
const { config, configFilePath } = await initCli(options);
|
|
2725
|
-
const { createRstest } = await __webpack_require__.e("
|
|
2725
|
+
const { createRstest } = await __webpack_require__.e("698").then(__webpack_require__.bind(__webpack_require__, "./src/core/index.ts"));
|
|
2726
2726
|
rstest = createRstest({
|
|
2727
2727
|
config,
|
|
2728
2728
|
configFilePath
|
|
2729
2729
|
}, command, filters.map(external_pathe_.normalize));
|
|
2730
2730
|
if ('watch' === command && configFilePath) {
|
|
2731
|
-
const { watchFilesForRestart } = await __webpack_require__.e("
|
|
2731
|
+
const { watchFilesForRestart } = await __webpack_require__.e("967").then(__webpack_require__.bind(__webpack_require__, "./src/core/restart.ts"));
|
|
2732
2732
|
watchFilesForRestart({
|
|
2733
2733
|
rstest,
|
|
2734
2734
|
options,
|
|
@@ -2738,18 +2738,18 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2738
2738
|
await rstest.runTests();
|
|
2739
2739
|
} catch (err) {
|
|
2740
2740
|
for (const reporter of rstest?.context.reporters || [])reporter.onExit?.();
|
|
2741
|
-
logger.
|
|
2742
|
-
logger.
|
|
2741
|
+
logger.v.error('Failed to run Rstest.');
|
|
2742
|
+
logger.v.error((0, helper.Wk)(err));
|
|
2743
2743
|
process.exit(1);
|
|
2744
2744
|
}
|
|
2745
2745
|
};
|
|
2746
2746
|
function setupCommands() {
|
|
2747
2747
|
const cli = dist('rstest');
|
|
2748
2748
|
cli.help();
|
|
2749
|
-
cli.version("0.2.
|
|
2749
|
+
cli.version("0.2.2");
|
|
2750
2750
|
applyCommonOptions(cli);
|
|
2751
|
-
cli.command('[...filters]', 'run tests').option('--watch', 'Run tests in watch mode').action(async (filters, options)=>{
|
|
2752
|
-
(0, prepare.
|
|
2751
|
+
cli.command('[...filters]', 'run tests').option('-w, --watch', 'Run tests in watch mode').action(async (filters, options)=>{
|
|
2752
|
+
(0, prepare.N)();
|
|
2753
2753
|
if (options.watch) await runRest({
|
|
2754
2754
|
options,
|
|
2755
2755
|
filters,
|
|
@@ -2762,7 +2762,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2762
2762
|
});
|
|
2763
2763
|
});
|
|
2764
2764
|
cli.command('run [...filters]', 'run tests without watch mode').action(async (filters, options)=>{
|
|
2765
|
-
(0, prepare.
|
|
2765
|
+
(0, prepare.N)();
|
|
2766
2766
|
await runRest({
|
|
2767
2767
|
options,
|
|
2768
2768
|
filters,
|
|
@@ -2770,7 +2770,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2770
2770
|
});
|
|
2771
2771
|
});
|
|
2772
2772
|
cli.command('watch [...filters]', 'run tests in watch mode').action(async (filters, options)=>{
|
|
2773
|
-
(0, prepare.
|
|
2773
|
+
(0, prepare.N)();
|
|
2774
2774
|
await runRest({
|
|
2775
2775
|
options,
|
|
2776
2776
|
filters,
|
|
@@ -2780,7 +2780,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2780
2780
|
cli.command('list [...filters]', 'lists all test files that Rstest will run').option('--filesOnly', 'only list the test files').option('--json [boolean/path]', 'print tests as JSON or write to a file').action(async (filters, options)=>{
|
|
2781
2781
|
try {
|
|
2782
2782
|
const { config, configFilePath } = await initCli(options);
|
|
2783
|
-
const { createRstest } = await __webpack_require__.e("
|
|
2783
|
+
const { createRstest } = await __webpack_require__.e("698").then(__webpack_require__.bind(__webpack_require__, "./src/core/index.ts"));
|
|
2784
2784
|
const rstest = createRstest({
|
|
2785
2785
|
config,
|
|
2786
2786
|
configFilePath
|
|
@@ -2790,8 +2790,8 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2790
2790
|
json: options.json
|
|
2791
2791
|
});
|
|
2792
2792
|
} catch (err) {
|
|
2793
|
-
logger.
|
|
2794
|
-
logger.
|
|
2793
|
+
logger.v.error('Failed to run Rstest list.');
|
|
2794
|
+
logger.v.error((0, helper.Wk)(err));
|
|
2795
2795
|
process.exit(1);
|
|
2796
2796
|
}
|
|
2797
2797
|
});
|
|
@@ -2800,8 +2800,8 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2800
2800
|
},
|
|
2801
2801
|
"./src/cli/prepare.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2802
2802
|
__webpack_require__.d(__webpack_exports__, {
|
|
2803
|
-
|
|
2804
|
-
|
|
2803
|
+
N: ()=>showRstest,
|
|
2804
|
+
k: ()=>prepareCli
|
|
2805
2805
|
});
|
|
2806
2806
|
var _utils_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/utils/logger.ts");
|
|
2807
2807
|
function initNodeEnv() {
|
|
@@ -2814,35 +2814,35 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2814
2814
|
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) console.log();
|
|
2815
2815
|
}
|
|
2816
2816
|
function showRstest() {
|
|
2817
|
-
_utils_logger__WEBPACK_IMPORTED_MODULE_0__.
|
|
2818
|
-
_utils_logger__WEBPACK_IMPORTED_MODULE_0__.
|
|
2817
|
+
_utils_logger__WEBPACK_IMPORTED_MODULE_0__.v.greet(" Rstest v0.2.2");
|
|
2818
|
+
_utils_logger__WEBPACK_IMPORTED_MODULE_0__.v.log('');
|
|
2819
2819
|
}
|
|
2820
2820
|
},
|
|
2821
2821
|
"./src/config.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2822
2822
|
__webpack_require__.d(__webpack_exports__, {
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2823
|
+
ST: ()=>mergeRstestConfig,
|
|
2824
|
+
Z9: ()=>loadConfig,
|
|
2825
|
+
wX: ()=>withDefaultConfig
|
|
2826
2826
|
});
|
|
2827
2827
|
var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("node:fs");
|
|
2828
2828
|
var _rsbuild_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("@rsbuild/core");
|
|
2829
2829
|
var pathe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("pathe");
|
|
2830
2830
|
var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/index.ts");
|
|
2831
|
-
const findConfig = (basePath)=>_utils__WEBPACK_IMPORTED_MODULE_3__.
|
|
2831
|
+
const findConfig = (basePath)=>_utils__WEBPACK_IMPORTED_MODULE_3__.kv.map((ext)=>basePath + ext).find(node_fs__WEBPACK_IMPORTED_MODULE_0__["default"].existsSync);
|
|
2832
2832
|
const resolveConfigPath = (root, customConfig)=>{
|
|
2833
2833
|
if (customConfig) {
|
|
2834
2834
|
const customConfigPath = (0, pathe__WEBPACK_IMPORTED_MODULE_2__.isAbsolute)(customConfig) ? customConfig : (0, pathe__WEBPACK_IMPORTED_MODULE_2__.join)(root, customConfig);
|
|
2835
2835
|
if (node_fs__WEBPACK_IMPORTED_MODULE_0__["default"].existsSync(customConfigPath)) return customConfigPath;
|
|
2836
|
-
throw `Cannot find config file: ${_utils__WEBPACK_IMPORTED_MODULE_3__
|
|
2836
|
+
throw `Cannot find config file: ${_utils__WEBPACK_IMPORTED_MODULE_3__.yW.dim(customConfigPath)}`;
|
|
2837
2837
|
}
|
|
2838
|
-
const configFilePath = findConfig((0, pathe__WEBPACK_IMPORTED_MODULE_2__.join)(root, _utils__WEBPACK_IMPORTED_MODULE_3__.
|
|
2838
|
+
const configFilePath = findConfig((0, pathe__WEBPACK_IMPORTED_MODULE_2__.join)(root, _utils__WEBPACK_IMPORTED_MODULE_3__.t));
|
|
2839
2839
|
if (configFilePath) return configFilePath;
|
|
2840
2840
|
return null;
|
|
2841
2841
|
};
|
|
2842
2842
|
async function loadConfig({ cwd = process.cwd(), path, envMode, configLoader }) {
|
|
2843
2843
|
const configFilePath = resolveConfigPath(cwd, path);
|
|
2844
2844
|
if (!configFilePath) {
|
|
2845
|
-
_utils__WEBPACK_IMPORTED_MODULE_3__.
|
|
2845
|
+
_utils__WEBPACK_IMPORTED_MODULE_3__.vF.debug('no rstest config file found');
|
|
2846
2846
|
return {
|
|
2847
2847
|
content: {},
|
|
2848
2848
|
filePath: configFilePath
|
|
@@ -2903,7 +2903,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2903
2903
|
const merged = mergeRstestConfig(createDefaultConfig(), config);
|
|
2904
2904
|
merged.include = config.include || merged.include;
|
|
2905
2905
|
merged.exclude = (config.exclude || merged.exclude || []).concat([
|
|
2906
|
-
_utils__WEBPACK_IMPORTED_MODULE_3__.
|
|
2906
|
+
_utils__WEBPACK_IMPORTED_MODULE_3__.EJ
|
|
2907
2907
|
]);
|
|
2908
2908
|
merged.reporters = config.reporters ?? merged.reporters;
|
|
2909
2909
|
merged.pool = 'string' == typeof config.pool ? {
|
|
@@ -2914,11 +2914,11 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2914
2914
|
},
|
|
2915
2915
|
"./src/utils/constants.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2916
2916
|
__webpack_require__.d(__webpack_exports__, {
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2917
|
+
EJ: ()=>TEMP_RSTEST_OUTPUT_DIR_GLOB,
|
|
2918
|
+
kv: ()=>DEFAULT_CONFIG_EXTENSIONS,
|
|
2919
|
+
t: ()=>DEFAULT_CONFIG_NAME,
|
|
2920
|
+
vO: ()=>TEST_DELIMITER,
|
|
2921
|
+
zZ: ()=>TEMP_RSTEST_OUTPUT_DIR
|
|
2922
2922
|
});
|
|
2923
2923
|
const DEFAULT_CONFIG_NAME = 'rstest.config';
|
|
2924
2924
|
const TEST_DELIMITER = '>';
|
|
@@ -2935,17 +2935,17 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2935
2935
|
},
|
|
2936
2936
|
"./src/utils/helper.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2937
2937
|
__webpack_require__.d(__webpack_exports__, {
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2938
|
+
C3: ()=>needFlagExperimentalDetectModule,
|
|
2939
|
+
FI: ()=>getAbsolutePath,
|
|
2940
|
+
Kv: ()=>NODE_BUILTINS,
|
|
2941
|
+
Ok: ()=>serializableConfig,
|
|
2942
|
+
P2: ()=>parsePosix,
|
|
2943
|
+
Un: ()=>isTTY,
|
|
2944
|
+
Wk: ()=>formatError,
|
|
2945
|
+
bg: ()=>castArray,
|
|
2946
|
+
fN: ()=>getTaskNameWithPrefix,
|
|
2947
|
+
kV: ()=>prettyTime,
|
|
2948
|
+
yW: ()=>picocolors__WEBPACK_IMPORTED_MODULE_2___default.a
|
|
2949
2949
|
});
|
|
2950
2950
|
var pathe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pathe");
|
|
2951
2951
|
var picocolors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
@@ -2997,7 +2997,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2997
2997
|
return time;
|
|
2998
2998
|
};
|
|
2999
2999
|
const getTaskNames = (test)=>(test.parentNames || []).concat(test.name).filter(Boolean);
|
|
3000
|
-
const getTaskNameWithPrefix = (test, delimiter = _constants__WEBPACK_IMPORTED_MODULE_1__.
|
|
3000
|
+
const getTaskNameWithPrefix = (test, delimiter = _constants__WEBPACK_IMPORTED_MODULE_1__.vO)=>getTaskNames(test).join(` ${delimiter} `);
|
|
3001
3001
|
const REGEXP_FLAG_PREFIX = 'RSTEST_REGEXP:';
|
|
3002
3002
|
const wrapRegex = (value)=>`${REGEXP_FLAG_PREFIX}${value.toString()}`;
|
|
3003
3003
|
const serializableConfig = (normalizedConfig)=>{
|
|
@@ -3090,25 +3090,25 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3090
3090
|
},
|
|
3091
3091
|
"./src/utils/index.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3092
3092
|
__webpack_require__.d(__webpack_exports__, {
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3093
|
+
C3: ()=>helper.C3,
|
|
3094
|
+
Ok: ()=>helper.Ok,
|
|
3095
|
+
XJ: ()=>formatTestPath,
|
|
3096
|
+
zZ: ()=>constants.zZ,
|
|
3097
|
+
fN: ()=>helper.fN,
|
|
3098
|
+
vF: ()=>logger.v,
|
|
3099
|
+
vO: ()=>constants.vO,
|
|
3100
|
+
tG: ()=>getTestEntries,
|
|
3101
|
+
kv: ()=>constants.kv,
|
|
3102
|
+
yW: ()=>helper.yW,
|
|
3103
|
+
EQ: ()=>prettyTestPath,
|
|
3104
|
+
_o: ()=>logger._,
|
|
3105
|
+
pr: ()=>getSetupFiles,
|
|
3106
|
+
Kv: ()=>helper.Kv,
|
|
3107
|
+
t: ()=>constants.t,
|
|
3108
|
+
kV: ()=>helper.kV,
|
|
3109
|
+
EJ: ()=>constants.EJ,
|
|
3110
|
+
bg: ()=>helper.bg,
|
|
3111
|
+
Un: ()=>helper.Un
|
|
3112
3112
|
});
|
|
3113
3113
|
var constants = __webpack_require__("./src/utils/constants.ts");
|
|
3114
3114
|
var helper = __webpack_require__("./src/utils/helper.ts");
|
|
@@ -3177,12 +3177,12 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3177
3177
|
return;
|
|
3178
3178
|
}
|
|
3179
3179
|
};
|
|
3180
|
-
const getSetupFiles = (setups, rootPath)=>Object.fromEntries((0, helper.
|
|
3181
|
-
const setupFilePath = (0, helper.
|
|
3180
|
+
const getSetupFiles = (setups, rootPath)=>Object.fromEntries((0, helper.bg)(setups).map((setupFile)=>{
|
|
3181
|
+
const setupFilePath = (0, helper.FI)(rootPath, setupFile);
|
|
3182
3182
|
try {
|
|
3183
3183
|
if (!(0, external_node_fs_.existsSync)(setupFilePath)) {
|
|
3184
|
-
let errorMessage = `Setup file ${helper
|
|
3185
|
-
if (setupFilePath !== setupFile) errorMessage += helper
|
|
3184
|
+
let errorMessage = `Setup file ${helper.yW.red(setupFile)} not found`;
|
|
3185
|
+
if (setupFilePath !== setupFile) errorMessage += helper.yW.gray(` (resolved path: ${setupFilePath})`);
|
|
3186
3186
|
throw errorMessage;
|
|
3187
3187
|
}
|
|
3188
3188
|
const relativePath = external_pathe_["default"].relative(rootPath, setupFilePath);
|
|
@@ -3199,8 +3199,8 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3199
3199
|
}
|
|
3200
3200
|
}));
|
|
3201
3201
|
const prettyTestPath = (testPath)=>{
|
|
3202
|
-
const { dir, base } = (0, helper.
|
|
3203
|
-
return `${'.' !== dir ? helper
|
|
3202
|
+
const { dir, base } = (0, helper.P2)(testPath);
|
|
3203
|
+
return `${'.' !== dir ? helper.yW.gray(`${dir}/`) : ''}${helper.yW.cyan(base)}`;
|
|
3204
3204
|
};
|
|
3205
3205
|
const formatTestPath = (root, testFilePath)=>{
|
|
3206
3206
|
let testPath = testFilePath;
|
|
@@ -3210,11 +3210,11 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3210
3210
|
},
|
|
3211
3211
|
"./src/utils/logger.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3212
3212
|
__webpack_require__.d(__webpack_exports__, {
|
|
3213
|
-
|
|
3214
|
-
|
|
3213
|
+
v: ()=>src_logger,
|
|
3214
|
+
_: ()=>isDebug
|
|
3215
3215
|
});
|
|
3216
3216
|
var external_node_os_ = __webpack_require__("node:os");
|
|
3217
|
-
var external_node_tty_ = __webpack_require__("tty");
|
|
3217
|
+
var external_node_tty_ = __webpack_require__("node:tty");
|
|
3218
3218
|
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : node_process.argv) {
|
|
3219
3219
|
const prefix = flag.startsWith('-') ? '' : 1 === flag.length ? '-' : '--';
|
|
3220
3220
|
const position = argv.indexOf(prefix + flag);
|
|
@@ -3482,8 +3482,8 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3482
3482
|
src_logger.override({
|
|
3483
3483
|
debug: (message, ...args)=>{
|
|
3484
3484
|
if ('verbose' !== src_logger.level) return;
|
|
3485
|
-
const time = helper
|
|
3486
|
-
console.log(` ${helper
|
|
3485
|
+
const time = helper.yW.gray(getTime());
|
|
3486
|
+
console.log(` ${helper.yW.magenta('rstest')} ${time} ${message}`, ...args);
|
|
3487
3487
|
}
|
|
3488
3488
|
});
|
|
3489
3489
|
},
|
|
@@ -3523,7 +3523,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3523
3523
|
"node:stream": function(module) {
|
|
3524
3524
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_stream_444d1c2b__;
|
|
3525
3525
|
},
|
|
3526
|
-
tty: function(module) {
|
|
3526
|
+
"node:tty": function(module) {
|
|
3527
3527
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_tty_c64aab7e__;
|
|
3528
3528
|
},
|
|
3529
3529
|
"node:url": function(module) {
|
|
@@ -3825,7 +3825,7 @@ __webpack_require__.m = __webpack_modules__;
|
|
|
3825
3825
|
})();
|
|
3826
3826
|
(()=>{
|
|
3827
3827
|
var installedChunks = {
|
|
3828
|
-
|
|
3828
|
+
410: 0
|
|
3829
3829
|
};
|
|
3830
3830
|
var installChunk = (data)=>{
|
|
3831
3831
|
var __webpack_ids__ = data.__webpack_ids__;
|
|
@@ -3864,17 +3864,17 @@ var logger = __webpack_require__("./src/utils/logger.ts");
|
|
|
3864
3864
|
var commands = __webpack_require__("./src/cli/commands.ts");
|
|
3865
3865
|
var prepare = __webpack_require__("./src/cli/prepare.ts");
|
|
3866
3866
|
async function runCLI() {
|
|
3867
|
-
(0, prepare.
|
|
3867
|
+
(0, prepare.k)();
|
|
3868
3868
|
try {
|
|
3869
|
-
(0, commands.
|
|
3869
|
+
(0, commands.QF)();
|
|
3870
3870
|
} catch (err) {
|
|
3871
|
-
logger.
|
|
3872
|
-
logger.
|
|
3871
|
+
logger.v.error('Failed to start Rstest CLI.');
|
|
3872
|
+
logger.v.error(err);
|
|
3873
3873
|
}
|
|
3874
3874
|
}
|
|
3875
3875
|
var src_config = __webpack_require__("./src/config.ts");
|
|
3876
3876
|
function defineConfig(config) {
|
|
3877
3877
|
return config;
|
|
3878
3878
|
}
|
|
3879
|
-
var __webpack_exports__mergeRstestConfig = src_config.
|
|
3879
|
+
var __webpack_exports__mergeRstestConfig = src_config.ST;
|
|
3880
3880
|
export { defineConfig, runCLI, __webpack_exports__mergeRstestConfig as mergeRstestConfig };
|