@rstest/core 0.8.2 → 0.8.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/dist/0~130.js +1 -2
- package/dist/0~1472.js +2 -3
- package/dist/0~1981.js +1 -2
- package/dist/0~2173.js +1 -2
- package/dist/0~2255.js +2 -3
- package/dist/0~3062.js +1 -2
- package/dist/0~3346.js +1 -2
- package/dist/0~3919.js +1 -2
- package/dist/0~4403.js +1 -2
- package/dist/0~4809.js +1 -2
- package/dist/0~5835.js +2 -3
- package/dist/0~62.js +1 -2
- package/dist/0~6588.js +5 -5
- package/dist/0~6907.js +1 -2
- package/dist/0~6923.js +2 -3
- package/dist/0~7583.js +3 -4
- package/dist/0~7882.js +7 -8
- package/dist/0~8426.js +1 -2
- package/dist/0~89.js +9 -10
- package/dist/0~9348.js +1 -2
- package/dist/0~9634.js +3 -4
- package/dist/1157.js +4 -97
- package/dist/1294.js +1 -2
- package/dist/1672.js +1 -2
- package/dist/3160.js +112 -9
- package/dist/3216.js +1 -2
- package/dist/4397.js +1 -2
- package/dist/4484.js +1 -2
- package/dist/487.js +3 -4
- package/dist/4881.js +1 -2
- package/dist/4899.js +2 -2
- package/dist/5734.js +1 -2
- package/dist/6151.js +1 -2
- package/dist/6198.js +1 -2
- package/dist/6973.js +2 -3
- package/dist/7011.js +1 -2
- package/dist/721.js +1 -2
- package/dist/9131.js +32 -19
- package/dist/browser-runtime/389.js +1 -0
- package/dist/browser-runtime/389.js.LICENSE.txt +22 -0
- package/dist/browser-runtime/index.d.ts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +1 -2
- package/dist/globalSetupWorker.js +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -2
- package/dist/mockRuntimeCode.js +63 -174
- package/dist/rslib-runtime.js +1 -2
- package/dist/worker.d.ts +1 -1
- package/dist/worker.js +2 -3
- package/package.json +4 -4
- /package/dist/{1157.js.LICENSE.txt → 3160.js.LICENSE.txt} +0 -0
package/dist/0~130.js
CHANGED
package/dist/0~1472.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
3
2
|
import { createRequire } from "./4881.js";
|
|
4
3
|
import { pathToFileURL } from "./6198.js";
|
|
5
4
|
import "./1157.js";
|
|
6
5
|
import { logger as logger_logger, color } from "./3160.js";
|
|
7
6
|
async function loadBrowserModule(options = {}) {
|
|
8
|
-
const coreVersion = "0.8.
|
|
7
|
+
const coreVersion = "0.8.3";
|
|
9
8
|
const { projectRoots = [] } = options;
|
|
10
9
|
let browserModule;
|
|
11
10
|
let browserVersion;
|
package/dist/0~1981.js
CHANGED
package/dist/0~2173.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
3
2
|
import { resolveShardedEntries, getTestEntries } from "./1157.js";
|
|
4
3
|
import { createCoverageProvider } from "./5734.js";
|
|
5
4
|
import { prepareRsbuild, createPool, createRsbuildServer, runGlobalTeardown, runGlobalSetup } from "./0~89.js";
|
package/dist/0~2255.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
3
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
3
|
import "./3160.js";
|
|
5
|
-
const external_node_fs_ = __webpack_require__("fs");
|
|
4
|
+
const external_node_fs_ = __webpack_require__("node:fs");
|
|
6
5
|
const pluginCoverageCore = (coverageOptions)=>({
|
|
7
6
|
name: 'rstest:coverage-core',
|
|
8
7
|
setup: (api)=>{
|
package/dist/0~3062.js
CHANGED
package/dist/0~3346.js
CHANGED
package/dist/0~3919.js
CHANGED
package/dist/0~4403.js
CHANGED
package/dist/0~4809.js
CHANGED
package/dist/0~5835.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
3
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
3
|
import { logger as logger_logger } from "./3160.js";
|
|
5
4
|
import { createRequire as external_node_module_createRequire } from "./4881.js";
|
|
6
5
|
import { pathToFileURL } from "./6198.js";
|
|
7
6
|
import { node_vm, asModule, shouldInterop, interopModule } from "./0~3346.js";
|
|
8
7
|
import { posix } from "./7011.js";
|
|
9
|
-
const external_node_path_ = __webpack_require__("path");
|
|
8
|
+
const external_node_path_ = __webpack_require__("node:path");
|
|
10
9
|
let latestAssetFiles = {};
|
|
11
10
|
const updateLatestAssetFiles = (assetFiles)=>{
|
|
12
11
|
latestAssetFiles = assetFiles;
|
package/dist/0~62.js
CHANGED
package/dist/0~6588.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
3
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
|
-
import { logger as logger_logger,
|
|
3
|
+
import { color, logger as logger_logger, isTTY } from "./3160.js";
|
|
5
4
|
import { runRest } from "./9131.js";
|
|
6
5
|
import "./1157.js";
|
|
7
6
|
const GLOB_REGEX = /[*?{}[\]()!@+|]/;
|
|
@@ -28,13 +27,14 @@ async function createChokidar(pathOrGlobs, root, options) {
|
|
|
28
27
|
}
|
|
29
28
|
return chokidar.watch(Array.from(watchFiles), options);
|
|
30
29
|
}
|
|
31
|
-
const external_node_path_ = __webpack_require__("path");
|
|
30
|
+
const external_node_path_ = __webpack_require__("node:path");
|
|
31
|
+
const picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
32
32
|
let cleaners = [];
|
|
33
33
|
const onBeforeRestart = (cleaner)=>{
|
|
34
34
|
cleaners.push(cleaner);
|
|
35
35
|
};
|
|
36
36
|
const clearConsole = ()=>{
|
|
37
|
-
if (isTTY() && !process.env.DEBUG &&
|
|
37
|
+
if (isTTY() && !process.env.DEBUG && picocolors.isColorSupported) process.stdout.write('\x1B[H\x1B[2J');
|
|
38
38
|
};
|
|
39
39
|
const beforeRestart = async ({ filePath, root, clear = true })=>{
|
|
40
40
|
if (clear) clearConsole();
|
package/dist/0~6907.js
CHANGED
package/dist/0~6923.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
3
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
3
|
import { logger as logger_logger } from "./3160.js";
|
|
5
4
|
import { pathToFileURL } from "./6198.js";
|
|
6
5
|
import { node_vm, interopModule, shouldInterop } from "./0~3346.js";
|
|
7
6
|
import { posix } from "./7011.js";
|
|
8
|
-
const external_node_path_ = __webpack_require__("path");
|
|
7
|
+
const external_node_path_ = __webpack_require__("node:path");
|
|
9
8
|
var loadEsModule_EsmMode = /*#__PURE__*/ function(EsmMode) {
|
|
10
9
|
EsmMode[EsmMode["Unknown"] = 0] = "Unknown";
|
|
11
10
|
EsmMode[EsmMode["Evaluated"] = 1] = "Evaluated";
|
package/dist/0~7583.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/*! For license information please see 0~7583.js.LICENSE.txt */
|
|
2
|
-
import
|
|
3
|
-
/*#__PURE__*/ import.meta.url;
|
|
2
|
+
import "node:module";
|
|
4
3
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
5
4
|
import { lstat, open as promises_open, readdir, realpath as promises_realpath, stat as promises_stat } from "fs/promises";
|
|
6
5
|
import "./3160.js";
|
|
7
6
|
import { readdir as promises_readdir, lstat as promises_lstat, promises_stat as promises_promises_stat, realpath as external_node_fs_promises_realpath } from "./1157.js";
|
|
8
7
|
import { Readable } from "./0~1981.js";
|
|
9
8
|
import { EventEmitter } from "./9131.js";
|
|
10
|
-
const external_node_path_ = __webpack_require__("path");
|
|
9
|
+
const external_node_path_ = __webpack_require__("node:path");
|
|
11
10
|
const EntryTypes = {
|
|
12
11
|
FILE_TYPE: 'files',
|
|
13
12
|
DIR_TYPE: 'directories',
|
|
@@ -221,7 +220,7 @@ function readdirp(root, options = {}) {
|
|
|
221
220
|
options.root = root;
|
|
222
221
|
return new ReaddirpStream(options);
|
|
223
222
|
}
|
|
224
|
-
const external_node_fs_ = __webpack_require__("fs");
|
|
223
|
+
const external_node_fs_ = __webpack_require__("node:fs");
|
|
225
224
|
const external_node_os_ = __webpack_require__("node:os");
|
|
226
225
|
const STR_DATA = 'data';
|
|
227
226
|
const STR_END = 'end';
|
package/dist/0~7882.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
3
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
|
-
import { color } from "./3160.js";
|
|
3
|
+
import { determineAgent, color } from "./3160.js";
|
|
5
4
|
import { detect, resolveCommand } from "./9131.js";
|
|
6
5
|
import { Ie, Me, ye, M, dist_Y, Se, ve, pD, xe } from "./0~9348.js";
|
|
7
|
-
import
|
|
8
|
-
const external_node_fs_ = __webpack_require__("fs");
|
|
9
|
-
const external_node_path_ = __webpack_require__("path");
|
|
6
|
+
import "./1157.js";
|
|
7
|
+
const external_node_fs_ = __webpack_require__("node:fs");
|
|
8
|
+
const external_node_path_ = __webpack_require__("node:path");
|
|
10
9
|
function getUniqueBaseName(dir, baseName, ext) {
|
|
11
10
|
const fullPath = external_node_path_["default"].join(dir, `${baseName}${ext}`);
|
|
12
11
|
if (!external_node_fs_["default"].existsSync(fullPath)) return baseName;
|
|
@@ -373,7 +372,7 @@ async function createInteractive(cwd, projectInfo, isAgent) {
|
|
|
373
372
|
}
|
|
374
373
|
const provider = providerSelection;
|
|
375
374
|
const preview = computeFilePreview(cwd, projectInfo);
|
|
376
|
-
const deps = getDependenciesWithVersions(effectiveFramework, provider, "0.8.
|
|
375
|
+
const deps = getDependenciesWithVersions(effectiveFramework, provider, "0.8.3");
|
|
377
376
|
const depsList = Object.entries(deps).map(([name, version])=>`${name}@${version}`).join(', ');
|
|
378
377
|
const previewLines = [
|
|
379
378
|
`${color.cyan('+')} Create ${preview.configFile}`,
|
|
@@ -451,7 +450,7 @@ async function generateFiles(cwd, projectInfo, provider) {
|
|
|
451
450
|
updatePackageJsonScripts(cwd, {
|
|
452
451
|
'test:browser': 'rstest --config=rstest.browser.config.ts'
|
|
453
452
|
});
|
|
454
|
-
const deps = getDependenciesWithVersions(effectiveFramework, provider, "0.8.
|
|
453
|
+
const deps = getDependenciesWithVersions(effectiveFramework, provider, "0.8.3");
|
|
455
454
|
updatePackageJsonDevDeps(cwd, deps);
|
|
456
455
|
return createdFiles;
|
|
457
456
|
}
|
package/dist/0~8426.js
CHANGED
package/dist/0~89.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
3
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
3
|
import node_events from "node:events";
|
|
5
4
|
import { Tinypool } from "tinypool";
|
|
@@ -182,8 +181,8 @@ const createPool = async ({ context, recommendWorkerCount = 1 / 0 })=>{
|
|
|
182
181
|
],
|
|
183
182
|
env: {
|
|
184
183
|
NODE_ENV: 'test',
|
|
185
|
-
...
|
|
186
|
-
...
|
|
184
|
+
...getForceColorEnv(),
|
|
185
|
+
...process.env
|
|
187
186
|
}
|
|
188
187
|
});
|
|
189
188
|
const rpcMethods = {
|
|
@@ -353,8 +352,8 @@ async function createSetupPool() {
|
|
|
353
352
|
isolateWorkers: false,
|
|
354
353
|
env: {
|
|
355
354
|
NODE_ENV: 'test',
|
|
356
|
-
...
|
|
357
|
-
...
|
|
355
|
+
...getForceColorEnv(),
|
|
356
|
+
...process.env
|
|
358
357
|
}
|
|
359
358
|
};
|
|
360
359
|
const pool = new Tinypool(options);
|
|
@@ -400,7 +399,7 @@ async function runGlobalTeardown() {
|
|
|
400
399
|
process.exitCode = 1;
|
|
401
400
|
}
|
|
402
401
|
}
|
|
403
|
-
const external_node_path_ = __webpack_require__("path");
|
|
402
|
+
const external_node_path_ = __webpack_require__("node:path");
|
|
404
403
|
const RUNTIME_CHUNK_NAME = 'runtime';
|
|
405
404
|
const requireShim = `// Rstest ESM shims
|
|
406
405
|
import __rstest_shim_module__ from 'node:module';
|
|
@@ -680,7 +679,7 @@ const pluginInspect = (options)=>{
|
|
|
680
679
|
}
|
|
681
680
|
} : null;
|
|
682
681
|
};
|
|
683
|
-
const external_node_fs_ = __webpack_require__("fs");
|
|
682
|
+
const external_node_fs_ = __webpack_require__("node:fs");
|
|
684
683
|
const mockRuntime_dirname = external_node_path_["default"].dirname(fileURLToPath(import.meta.url));
|
|
685
684
|
class MockRuntimeRspackPlugin {
|
|
686
685
|
outputModule;
|
|
@@ -701,11 +700,11 @@ class MockRuntimeRspackPlugin {
|
|
|
701
700
|
compiler.hooks.compilation.tap('RstestMockPlugin', (compilation)=>{
|
|
702
701
|
compilation.hooks.runtimeModule.tap('RstestMockChunkLoadingRuntimePlugin', (module)=>{
|
|
703
702
|
if ('require_chunk_loading' === module.name) {
|
|
704
|
-
const finalSource = module.source.source.toString('utf-8').replace('for (var moduleId in moreModules) {', "for (var moduleId in moreModules) {\n if (Object.keys(__webpack_require__.rstest_original_modules).includes(moduleId)) continue;");
|
|
703
|
+
const finalSource = module.source.source.toString('utf-8').replace('for (var moduleId in moreModules) {', "for (var moduleId in moreModules) {\n if (Object.keys(__webpack_require__.rstest_original_modules).includes(moduleId) || Object.keys(__webpack_require__.rstest_original_module_factories).includes(moduleId)) continue;");
|
|
705
704
|
module.source.source = Buffer.from(finalSource);
|
|
706
705
|
}
|
|
707
706
|
if ('module_chunk_loading' === module.name) {
|
|
708
|
-
const finalSource = module.source.source.toString('utf-8').replace('for (moduleId in __webpack_modules__) {', "for (moduleId in __webpack_modules__) {\n if (Object.keys(__webpack_require__.rstest_original_modules).includes(moduleId)) continue;");
|
|
707
|
+
const finalSource = module.source.source.toString('utf-8').replace('for (moduleId in __webpack_modules__) {', "for (moduleId in __webpack_modules__) {\n if (Object.keys(__webpack_require__.rstest_original_modules).includes(moduleId) || Object.keys(__webpack_require__.rstest_original_module_factories).includes(moduleId)) continue;");
|
|
709
708
|
module.source.source = Buffer.from(finalSource);
|
|
710
709
|
}
|
|
711
710
|
if ('define_property_getters' === module.name) {
|
package/dist/0~9348.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
3
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
3
|
import node_readline, { clearLine, createInterface, emitKeypressEvents, moveCursor } from "node:readline";
|
|
5
4
|
import { stdout, node_process, stdin } from "./3160.js";
|
package/dist/0~9634.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
3
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
3
|
import { logger as logger_logger, getTaskNameWithPrefix, color, bgColor } from "./3160.js";
|
|
5
4
|
import { prepareRsbuild, createPool, createRsbuildServer, runGlobalTeardown, runGlobalSetup } from "./0~89.js";
|
|
6
5
|
import { getTestEntries, resolveShardedEntries, prettyTestPath, ROOT_SUITE_NAME } from "./1157.js";
|
|
7
|
-
const external_node_fs_ = __webpack_require__("fs");
|
|
8
|
-
const external_node_path_ = __webpack_require__("path");
|
|
6
|
+
const external_node_fs_ = __webpack_require__("node:fs");
|
|
7
|
+
const external_node_path_ = __webpack_require__("node:path");
|
|
9
8
|
const collectNodeTests = async ({ context, nodeProjects, globTestSourceEntries })=>{
|
|
10
9
|
const { getSetupFiles } = await import("./6973.js").then((mod)=>({
|
|
11
10
|
getSetupFiles: mod.getSetupFiles
|
package/dist/1157.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import 'module';
|
|
3
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
4
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
5
3
|
import promises, { lstat, readdir, realpath, stat as promises_stat } from "node:fs/promises";
|
|
6
4
|
import { fileURLToPath } from "url";
|
|
@@ -1415,97 +1413,6 @@ __webpack_require__.add({
|
|
|
1415
1413
|
};
|
|
1416
1414
|
}
|
|
1417
1415
|
});
|
|
1418
|
-
/*!
|
|
1419
|
-
* Copyright 2017 Vercel, Inc.
|
|
1420
|
-
*
|
|
1421
|
-
* This file is derived from Vercel's detect-agent:
|
|
1422
|
-
* https://github.com/vercel/vercel/tree/main/packages/detect-agent
|
|
1423
|
-
*
|
|
1424
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1425
|
-
* you may not use this file except in compliance with the License.
|
|
1426
|
-
* You may obtain a copy of the License at
|
|
1427
|
-
*
|
|
1428
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1429
|
-
*
|
|
1430
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1431
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1432
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1433
|
-
* See the License for the specific language governing permissions and
|
|
1434
|
-
* limitations under the License.
|
|
1435
|
-
*
|
|
1436
|
-
* Modifications in this derived work:
|
|
1437
|
-
* - Removed async determine logic, kept only env detection.
|
|
1438
|
-
*/ const CURSOR = 'cursor';
|
|
1439
|
-
const CURSOR_CLI = 'cursor-cli';
|
|
1440
|
-
const CLAUDE = 'claude';
|
|
1441
|
-
const REPLIT = 'replit';
|
|
1442
|
-
const GEMINI = 'gemini';
|
|
1443
|
-
const CODEX = 'codex';
|
|
1444
|
-
const AUGMENT_CLI = 'augment-cli';
|
|
1445
|
-
const OPENCODE = 'opencode';
|
|
1446
|
-
function determineAgent() {
|
|
1447
|
-
if (process.env.AI_AGENT) {
|
|
1448
|
-
const name = process.env.AI_AGENT.trim();
|
|
1449
|
-
if (name) return {
|
|
1450
|
-
isAgent: true,
|
|
1451
|
-
agent: {
|
|
1452
|
-
name: name
|
|
1453
|
-
}
|
|
1454
|
-
};
|
|
1455
|
-
}
|
|
1456
|
-
if (process.env.CURSOR_TRACE_ID) return {
|
|
1457
|
-
isAgent: true,
|
|
1458
|
-
agent: {
|
|
1459
|
-
name: CURSOR
|
|
1460
|
-
}
|
|
1461
|
-
};
|
|
1462
|
-
if (process.env.CURSOR_AGENT) return {
|
|
1463
|
-
isAgent: true,
|
|
1464
|
-
agent: {
|
|
1465
|
-
name: CURSOR_CLI
|
|
1466
|
-
}
|
|
1467
|
-
};
|
|
1468
|
-
if (process.env.GEMINI_CLI) return {
|
|
1469
|
-
isAgent: true,
|
|
1470
|
-
agent: {
|
|
1471
|
-
name: GEMINI
|
|
1472
|
-
}
|
|
1473
|
-
};
|
|
1474
|
-
if (process.env.CODEX_SANDBOX) return {
|
|
1475
|
-
isAgent: true,
|
|
1476
|
-
agent: {
|
|
1477
|
-
name: CODEX
|
|
1478
|
-
}
|
|
1479
|
-
};
|
|
1480
|
-
if (process.env.AUGMENT_AGENT) return {
|
|
1481
|
-
isAgent: true,
|
|
1482
|
-
agent: {
|
|
1483
|
-
name: AUGMENT_CLI
|
|
1484
|
-
}
|
|
1485
|
-
};
|
|
1486
|
-
if (process.env.OPENCODE) return {
|
|
1487
|
-
isAgent: true,
|
|
1488
|
-
agent: {
|
|
1489
|
-
name: OPENCODE
|
|
1490
|
-
}
|
|
1491
|
-
};
|
|
1492
|
-
if (process.env.CLAUDECODE || process.env.CLAUDE_CODE) return {
|
|
1493
|
-
isAgent: true,
|
|
1494
|
-
agent: {
|
|
1495
|
-
name: CLAUDE
|
|
1496
|
-
}
|
|
1497
|
-
};
|
|
1498
|
-
if (process.env.REPL_ID) return {
|
|
1499
|
-
isAgent: true,
|
|
1500
|
-
agent: {
|
|
1501
|
-
name: REPLIT
|
|
1502
|
-
}
|
|
1503
|
-
};
|
|
1504
|
-
return {
|
|
1505
|
-
isAgent: false,
|
|
1506
|
-
agent: void 0
|
|
1507
|
-
};
|
|
1508
|
-
}
|
|
1509
1416
|
const DEFAULT_CONFIG_NAME = 'rstest.config';
|
|
1510
1417
|
const ROOT_SUITE_NAME = 'Rstest:_internal_root_suite';
|
|
1511
1418
|
const TEMP_RSTEST_OUTPUT_DIR = 'dist/.rstest-temp';
|
|
@@ -1534,8 +1441,8 @@ const globalApis = [
|
|
|
1534
1441
|
'onTestFailed'
|
|
1535
1442
|
];
|
|
1536
1443
|
const TS_CONFIG_FILE = 'tsconfig.json';
|
|
1537
|
-
const external_node_path_ = __webpack_require__("path");
|
|
1538
|
-
const external_node_fs_ = __webpack_require__("fs");
|
|
1444
|
+
const external_node_path_ = __webpack_require__("node:path");
|
|
1445
|
+
const external_node_fs_ = __webpack_require__("node:fs");
|
|
1539
1446
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
1540
1447
|
function cleanPath(path) {
|
|
1541
1448
|
let normalized = (0, external_node_path_.normalize)(path);
|
|
@@ -2410,4 +2317,4 @@ async function resolveShardedEntries(context) {
|
|
|
2410
2317
|
});
|
|
2411
2318
|
return entriesCache;
|
|
2412
2319
|
}
|
|
2413
|
-
export { DEFAULT_CONFIG_EXTENSIONS, DEFAULT_CONFIG_NAME, ROOT_SUITE_NAME, TEMP_RSTEST_OUTPUT_DIR, TEMP_RSTEST_OUTPUT_DIR_GLOB, TS_CONFIG_FILE,
|
|
2320
|
+
export { DEFAULT_CONFIG_EXTENSIONS, DEFAULT_CONFIG_NAME, ROOT_SUITE_NAME, TEMP_RSTEST_OUTPUT_DIR, TEMP_RSTEST_OUTPUT_DIR_GLOB, TS_CONFIG_FILE, filterProjects, formatTestEntryName, formatTestPath, getTestEntries, glob, globalApis, isDynamicPattern, lstat, prettyTestPath, promises, promises_stat, readdir, realpath, resolveShardedEntries };
|
package/dist/1294.js
CHANGED
package/dist/1672.js
CHANGED
package/dist/3160.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*! For license information please see 3160.js.LICENSE.txt */
|
|
2
|
+
import "node:module";
|
|
3
3
|
import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
|
|
4
4
|
import * as __rspack_external_node_os_74b4b876 from "node:os";
|
|
5
5
|
import * as __rspack_external_node_path_c5b9b54f from "node:path";
|
|
@@ -73,13 +73,13 @@ __webpack_require__.add({
|
|
|
73
73
|
module.exports = createColors();
|
|
74
74
|
module.exports.createColors = createColors;
|
|
75
75
|
},
|
|
76
|
-
fs (module) {
|
|
76
|
+
"node:fs" (module) {
|
|
77
77
|
module.exports = __rspack_external_node_fs_5ea92f0c;
|
|
78
78
|
},
|
|
79
79
|
"node:os" (module) {
|
|
80
80
|
module.exports = __rspack_external_node_os_74b4b876;
|
|
81
81
|
},
|
|
82
|
-
path (module) {
|
|
82
|
+
"node:path" (module) {
|
|
83
83
|
module.exports = __rspack_external_node_path_c5b9b54f;
|
|
84
84
|
},
|
|
85
85
|
"node:tty" (module) {
|
|
@@ -347,6 +347,101 @@ let createLogger = (options = {})=>{
|
|
|
347
347
|
return logger;
|
|
348
348
|
};
|
|
349
349
|
let src_logger = createLogger();
|
|
350
|
+
/*!
|
|
351
|
+
* Copyright 2017 Vercel, Inc.
|
|
352
|
+
*
|
|
353
|
+
* This file is derived from Vercel's detect-agent:
|
|
354
|
+
* https://github.com/vercel/vercel/tree/main/packages/detect-agent
|
|
355
|
+
*
|
|
356
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
357
|
+
* you may not use this file except in compliance with the License.
|
|
358
|
+
* You may obtain a copy of the License at
|
|
359
|
+
*
|
|
360
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
361
|
+
*
|
|
362
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
363
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
364
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
365
|
+
* See the License for the specific language governing permissions and
|
|
366
|
+
* limitations under the License.
|
|
367
|
+
*
|
|
368
|
+
* Modifications in this derived work:
|
|
369
|
+
* - Removed async determine logic, kept only env detection.
|
|
370
|
+
*/ const CURSOR = 'cursor';
|
|
371
|
+
const CURSOR_CLI = 'cursor-cli';
|
|
372
|
+
const CLAUDE = 'claude';
|
|
373
|
+
const REPLIT = 'replit';
|
|
374
|
+
const GEMINI = 'gemini';
|
|
375
|
+
const CODEX = 'codex';
|
|
376
|
+
const AUGMENT_CLI = 'augment-cli';
|
|
377
|
+
const OPENCODE = 'opencode';
|
|
378
|
+
function determineAgent() {
|
|
379
|
+
if ('1' === process.env.RSTEST_NO_AGENT) return {
|
|
380
|
+
isAgent: false,
|
|
381
|
+
agent: void 0
|
|
382
|
+
};
|
|
383
|
+
if (process.env.AI_AGENT) {
|
|
384
|
+
const name = process.env.AI_AGENT.trim();
|
|
385
|
+
if (name) return {
|
|
386
|
+
isAgent: true,
|
|
387
|
+
agent: {
|
|
388
|
+
name: name
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
if (process.env.CURSOR_TRACE_ID) return {
|
|
393
|
+
isAgent: true,
|
|
394
|
+
agent: {
|
|
395
|
+
name: CURSOR
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
if (process.env.CURSOR_AGENT) return {
|
|
399
|
+
isAgent: true,
|
|
400
|
+
agent: {
|
|
401
|
+
name: CURSOR_CLI
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
if (process.env.GEMINI_CLI) return {
|
|
405
|
+
isAgent: true,
|
|
406
|
+
agent: {
|
|
407
|
+
name: GEMINI
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
if (process.env.CODEX_SANDBOX) return {
|
|
411
|
+
isAgent: true,
|
|
412
|
+
agent: {
|
|
413
|
+
name: CODEX
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
if (process.env.AUGMENT_AGENT) return {
|
|
417
|
+
isAgent: true,
|
|
418
|
+
agent: {
|
|
419
|
+
name: AUGMENT_CLI
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
if (process.env.OPENCODE) return {
|
|
423
|
+
isAgent: true,
|
|
424
|
+
agent: {
|
|
425
|
+
name: OPENCODE
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
if (process.env.CLAUDECODE || process.env.CLAUDE_CODE) return {
|
|
429
|
+
isAgent: true,
|
|
430
|
+
agent: {
|
|
431
|
+
name: CLAUDE
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
if (process.env.REPL_ID) return {
|
|
435
|
+
isAgent: true,
|
|
436
|
+
agent: {
|
|
437
|
+
name: REPLIT
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
return {
|
|
441
|
+
isAgent: false,
|
|
442
|
+
agent: void 0
|
|
443
|
+
};
|
|
444
|
+
}
|
|
350
445
|
let _lazyMatch = ()=>{
|
|
351
446
|
var __lib__ = (()=>{
|
|
352
447
|
var m = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r, e)=>{
|
|
@@ -915,12 +1010,20 @@ const isDebug = ()=>{
|
|
|
915
1010
|
'*'
|
|
916
1011
|
].some((key)=>values.includes(key));
|
|
917
1012
|
};
|
|
918
|
-
const ansiEnabled = picocolors.isColorSupported;
|
|
919
1013
|
const getForceColorEnv = ()=>{
|
|
920
|
-
|
|
921
|
-
|
|
1014
|
+
if (void 0 !== process.env.FORCE_COLOR) return {};
|
|
1015
|
+
const noColorEnabled = '1' === process.env.NO_COLOR;
|
|
1016
|
+
const isAgent = determineAgent().isAgent;
|
|
1017
|
+
if (noColorEnabled) return {
|
|
1018
|
+
FORCE_COLOR: '0'
|
|
1019
|
+
};
|
|
1020
|
+
if (isAgent || !picocolors.isColorSupported) return {
|
|
1021
|
+
NO_COLOR: '1',
|
|
1022
|
+
FORCE_COLOR: '0'
|
|
1023
|
+
};
|
|
1024
|
+
return {
|
|
922
1025
|
FORCE_COLOR: '1'
|
|
923
|
-
}
|
|
1026
|
+
};
|
|
924
1027
|
};
|
|
925
1028
|
const color = (0, picocolors.createColors)();
|
|
926
1029
|
if (isDebug()) src_logger.level = 'verbose';
|
|
@@ -948,4 +1051,4 @@ const logger_logger = {
|
|
|
948
1051
|
console.error(message, ...args);
|
|
949
1052
|
}
|
|
950
1053
|
};
|
|
951
|
-
export { ADDITIONAL_NODE_BUILTINS, _path,
|
|
1054
|
+
export { ADDITIONAL_NODE_BUILTINS, _path, basename, bgColor, castArray, clearScreen, color, determineAgent, dirname, formatError, formatRootStr, getAbsolutePath, getForceColorEnv, getTaskNameWithPrefix, isAbsolute, isDebug, isDeno, isObject, isTTY, join, logger_logger as logger, needFlagExperimentalDetectModule, node_process, normalize, parsePosix, prettyTime, relative, resolve, serializableConfig, stdin, stdout, undoSerializableConfig };
|
package/dist/3216.js
CHANGED
package/dist/4397.js
CHANGED
package/dist/4484.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
1
|
+
import "node:module";
|
|
3
2
|
import * as __rspack_external__rsbuild_core_1b356efc from "@rsbuild/core";
|
|
4
3
|
const check = (name)=>{
|
|
5
4
|
if (!globalThis.RSTEST_API?.[name]) throw new Error(`Rstest API '${name}' is not registered yet, please make sure you are running in a rstest environment.`);
|