sxy-test-runner 2.4.9 → 2.4.12
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/AGENTS.md +6 -0
- package/dist/checkMeta.js.map +1 -1
- package/dist/cli/cliTypes.d.ts +12 -0
- package/dist/cli/cliTypes.js +3 -0
- package/dist/cli/cliTypes.js.map +1 -0
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/init.js +32 -9
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/lib/addBasePath.js.map +1 -1
- package/dist/cli/lib/addExports.js +6 -1
- package/dist/cli/lib/addExports.js.map +1 -1
- package/dist/cli/lib/agentReport.d.ts +2 -1
- package/dist/cli/lib/agentReport.js.map +1 -1
- package/dist/cli/lib/alwaysCacheBust.d.ts +2 -0
- package/dist/cli/lib/alwaysCacheBust.js +3 -0
- package/dist/cli/lib/alwaysCacheBust.js.map +1 -0
- package/dist/cli/lib/applyConfigDefaults.js.map +1 -1
- package/dist/cli/lib/buildDependencyTree.js.map +1 -1
- package/dist/cli/lib/buildDependencyTrees.js.map +1 -1
- package/dist/cli/lib/consoleCapture.js.map +1 -1
- package/dist/cli/lib/defaultConfig.js.map +1 -1
- package/dist/cli/lib/doUserSetup.js +1 -1
- package/dist/cli/lib/doUserSetup.js.map +1 -1
- package/dist/cli/lib/doUserTeardown.js +1 -1
- package/dist/cli/lib/doUserTeardown.js.map +1 -1
- package/dist/cli/lib/exitCodes.js.map +1 -1
- package/dist/cli/lib/failureEntries.d.ts +2 -1
- package/dist/cli/lib/failureEntries.js +2 -0
- package/dist/cli/lib/failureEntries.js.map +1 -1
- package/dist/cli/lib/failureLines.d.ts +2 -1
- package/dist/cli/lib/failureLines.js.map +1 -1
- package/dist/cli/lib/filter.js.map +1 -1
- package/dist/cli/lib/findTestFiles.js.map +1 -1
- package/dist/cli/lib/findingTestsMessage.d.ts +1 -1
- package/dist/cli/lib/findingTestsMessage.js.map +1 -1
- package/dist/cli/lib/getAllowedFlags.d.ts +1 -1
- package/dist/cli/lib/getAllowedFlags.js.map +1 -1
- package/dist/cli/lib/globArgCombine.js.map +1 -1
- package/dist/cli/lib/handleUserInput.d.ts +2 -2
- package/dist/cli/lib/handleUserInput.js +1 -1
- package/dist/cli/lib/handleUserInput.js.map +1 -1
- package/dist/cli/lib/injectProperties.js.map +1 -1
- package/dist/cli/lib/isTest.d.ts +1 -1
- package/dist/cli/lib/isTest.js +2 -1
- package/dist/cli/lib/isTest.js.map +1 -1
- package/dist/cli/lib/listenToUser.d.ts +3 -3
- package/dist/cli/lib/listenToUser.js +33 -8
- package/dist/cli/lib/listenToUser.js.map +1 -1
- package/dist/cli/lib/loadConfig.js.map +1 -1
- package/dist/cli/lib/loadTestFile.d.ts +9 -1
- package/dist/cli/lib/loadTestFile.js +0 -1
- package/dist/cli/lib/loadTestFile.js.map +1 -1
- package/dist/cli/lib/makeWatchRunState.js.map +1 -1
- package/dist/cli/lib/parseCommandLineArguments.d.ts +1 -1
- package/dist/cli/lib/parseCommandLineArguments.js.map +1 -1
- package/dist/cli/lib/parseDescribe.js +29 -9
- package/dist/cli/lib/parseDescribe.js.map +1 -1
- package/dist/cli/lib/reRunManager.d.ts +2 -2
- package/dist/cli/lib/reRunManager.js +2 -1
- package/dist/cli/lib/reRunManager.js.map +1 -1
- package/dist/cli/lib/reservedExportKeys.js.map +1 -1
- package/dist/cli/lib/resolveCommand.js.map +1 -1
- package/dist/cli/lib/runDescribe.d.ts +16 -1
- package/dist/cli/lib/runDescribe.js.map +1 -1
- package/dist/cli/lib/runDescribeRun.d.ts +2 -1
- package/dist/cli/lib/runDescribeRun.js +1 -1
- package/dist/cli/lib/runDescribeRun.js.map +1 -1
- package/dist/cli/lib/runIt.d.ts +9 -1
- package/dist/cli/lib/runIt.js +11 -7
- package/dist/cli/lib/runIt.js.map +1 -1
- package/dist/cli/lib/runTasks.d.ts +1 -1
- package/dist/cli/lib/runTasks.js +6 -4
- package/dist/cli/lib/runTasks.js.map +1 -1
- package/dist/cli/lib/runTest.d.ts +18 -1
- package/dist/cli/lib/runTest.js +3 -3
- package/dist/cli/lib/runTest.js.map +1 -1
- package/dist/cli/lib/runTests.d.ts +18 -3
- package/dist/cli/lib/runTests.js +25 -8
- package/dist/cli/lib/runTests.js.map +1 -1
- package/dist/cli/lib/showTestLoadingError.d.ts +2 -1
- package/dist/cli/lib/showTestLoadingError.js.map +1 -1
- package/dist/cli/lib/showTestResult.d.ts +2 -1
- package/dist/cli/lib/showTestResult.js +47 -44
- package/dist/cli/lib/showTestResult.js.map +1 -1
- package/dist/cli/lib/showTtyHelp.js.map +1 -1
- package/dist/cli/lib/shutdown.d.ts +1 -1
- package/dist/cli/lib/shutdown.js +11 -3
- package/dist/cli/lib/shutdown.js.map +1 -1
- package/dist/cli/lib/statusFile.js.map +1 -1
- package/dist/cli/lib/stopSignal.js.map +1 -1
- package/dist/cli/lib/timeProfier.js.map +1 -1
- package/dist/cli/lib/validateConfig.js.map +1 -1
- package/dist/cli/lib/watchFilesAndRunTests.js.map +1 -1
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.js +3 -3
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.js.map +1 -1
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.d.ts +5 -3
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js +19 -12
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js.map +1 -1
- package/dist/cli/lib/watchFilesChokidar.d.ts +1 -3
- package/dist/cli/lib/watchFilesChokidar.js +52 -43
- package/dist/cli/lib/watchFilesChokidar.js.map +1 -1
- package/dist/cli/lib/watchFilesNodeWatch.d.ts +2 -3
- package/dist/cli/lib/watchFilesNodeWatch.js +3 -3
- package/dist/cli/lib/watchFilesNodeWatch.js.map +1 -1
- package/dist/cli/once.js +5 -2
- package/dist/cli/once.js.map +1 -1
- package/dist/cli/version.js.map +1 -1
- package/dist/cli/watch.d.ts +2 -0
- package/dist/cli/watch.js +48 -20
- package/dist/cli/watch.js.map +1 -1
- package/dist/config.js +2 -9
- package/dist/config.js.map +1 -1
- package/dist/describe.js +1 -1
- package/dist/describe.js.map +1 -1
- package/dist/envFlag.d.ts +2 -0
- package/dist/envFlag.js +14 -0
- package/dist/envFlag.js.map +1 -0
- package/dist/indexNumberToLetters.js.map +1 -1
- package/dist/meta.js.map +1 -1
- package/dist/output.js +2 -0
- package/dist/output.js.map +1 -1
- package/dist/packages/chalk.js.map +1 -1
- package/dist/packages/esmReload.js.map +1 -1
- package/dist/packages/figures.js.map +1 -1
- package/dist/packages/loadConfig.js.map +1 -1
- package/dist/packages/mergeStructuredConfig.js.map +1 -1
- package/dist/packages/slash.js.map +1 -1
- package/dist/packages/timeProfiler.js.map +1 -1
- package/dist/types.d.ts +13 -81
- package/dist/types.js.map +1 -1
- package/package.json +5 -4
package/dist/config.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
+
import { envFlag } from './envFlag.js';
|
|
1
2
|
export const packageName = 'sxy-test-runner';
|
|
2
3
|
export const cliName = 'sxyt';
|
|
3
4
|
export const configFileNames = ['sxyt.config', 'sxy-test-runner.config'];
|
|
4
5
|
export const configLocations = ['', 'config']; // locations where the configs may be placed in proj folder
|
|
6
|
+
// used in output.ts
|
|
5
7
|
export const debugging = false;
|
|
6
|
-
// Parse a boolean-ish env var. Accepts true/false and 1/0, case-insensitive,
|
|
7
|
-
// tolerant of surrounding quotes and whitespace (e.g. TIME_PROFILING="true").
|
|
8
|
-
// Anything unrecognised (or unset) is treated as false.
|
|
9
|
-
function envFlag(value) {
|
|
10
|
-
if (value === undefined)
|
|
11
|
-
return false;
|
|
12
|
-
const normalized = value.trim().replace(/^["']|["']$/g, '').toLowerCase();
|
|
13
|
-
return normalized === 'true' || normalized === '1';
|
|
14
|
-
}
|
|
15
8
|
// Toggle per-phase timing output with the SXYT_TIME_PROFILING env var
|
|
16
9
|
// (SXYT_TIME_PROFILING=true | 1). Defaults to off so normal runs stay clean.
|
|
17
10
|
export const showTimeProfiling = envFlag(process.env.SXYT_TIME_PROFILING);
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAA;AAE5C,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAA;AAE7B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAA;AACxE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA,CAAC,2DAA2D;AAEzG,oBAAoB;AACpB,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAA;AAE9B,sEAAsE;AACtE,6EAA6E;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA","sourcesContent":["\nimport { envFlag } from './envFlag.js'\n\n\nexport const packageName = 'sxy-test-runner'\n\nexport const cliName = 'sxyt'\n\nexport const configFileNames = ['sxyt.config', 'sxy-test-runner.config']\nexport const configLocations = ['', 'config'] // locations where the configs may be placed in proj folder\n\n// used in output.ts\nexport const debugging = false\n\n// Toggle per-phase timing output with the SXYT_TIME_PROFILING env var\n// (SXYT_TIME_PROFILING=true | 1). Defaults to off so normal runs stay clean.\nexport const showTimeProfiling = envFlag(process.env.SXYT_TIME_PROFILING)\n"]}
|
package/dist/describe.js
CHANGED
|
@@ -18,7 +18,7 @@ export function describe(theThing, testsOrMeta, possiblyTests) {
|
|
|
18
18
|
else {
|
|
19
19
|
checkMeta(`describe('${theThing}')`, testsOrMeta, ['parallelTests', 'sequentialTests']);
|
|
20
20
|
meta = testsOrMeta;
|
|
21
|
-
tests = possiblyTests; // eslint-disable-line
|
|
21
|
+
tests = possiblyTests; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
22
22
|
}
|
|
23
23
|
global.__sxy_test_runner__.describes.push({
|
|
24
24
|
counter: thisDescribeCounter,
|
package/dist/describe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../src/describe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../src/describe.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,qBAAqB,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAOnC,MAAM,UAAU,QAAQ,CACpB,QAAgB,EAAE,WAA4C,EAAE,aAAgC;IAEhG,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CACX,oFAAoF;cAClF,0DAA0D;cAC1D,+CAA+C,CACpD,CAAA;QACD,gFAAgF;IACpF,CAAC;IAED,MAAM,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAA;IACtE,MAAM,CAAC,mBAAmB,CAAC,eAAe,EAAE,CAAA;IAE5C,IAAI,IAAI,GAAG,SAAS,CAAA;IACpB,IAAI,KAAK,CAAA;IACT,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE,CAAC;QACpC,KAAK,GAAG,WAAW,CAAA;IACvB,CAAC;SAAM,CAAC;QACJ,SAAS,CAAC,aAAa,QAAQ,IAAI,EAAE,WAAW,EAAE,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC,CAAA;QACvF,IAAI,GAAG,WAAW,CAAA;QAClB,KAAK,GAAG,aAAiC,CAAA,CAAC,kEAAkE;IAChH,CAAC;IACD,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,IAAI,CAAC;QACtC,OAAO,EAAE,mBAAmB;QAC5B,KAAK,EAAE,QAAQ;QACf,IAAI;QACJ,KAAK;KACR,CAAC,CAAA;IAEF,KAAK,CACD,KAAK,CAAC,SAAS,CAAA,GAAG,mBAAmB,GAAG;UAClC,KAAK,CAAC,SAAS,CAAA,aAAa,GAAG,KAAK,CAAC,UAAU,CAAA,GAAG,QAAQ,IAAI,CACvE,CAAA;AACL,CAAC","sourcesContent":["\nimport type { DescribeCallback } from './types.js'\nimport chalk from './packages/chalk.js'\nimport { checkMeta } from './checkMeta.js'\nimport { debug } from './output.js'\n\n\nexport type DescribeMeta = { parallelTests: boolean } | { sequentialTests: boolean }\n\nexport function describe(theThing: string, tests: DescribeCallback): void\nexport function describe(theThing: string, meta: DescribeMeta, tests: DescribeCallback): void\nexport function describe(\n theThing: string, testsOrMeta: DescribeCallback | DescribeMeta, possiblyTests?: DescribeCallback\n): void {\n if (!global.__sxy_test_runner__) {\n throw new Error(\n 'sxy-test-runner describe() was called, but the test framework has not initialized.'\n + ' This might be because you have run a test file directly'\n + ', instead of running \\'pnpm sxy-test-runner\\''\n )\n // todo - maybe we can initialise the framework and just run only this test file\n }\n\n const thisDescribeCounter = global.__sxy_test_runner__.describeCounter\n global.__sxy_test_runner__.describeCounter++\n\n let meta = undefined\n let tests\n if (typeof testsOrMeta === 'function') {\n tests = testsOrMeta\n } else {\n checkMeta(`describe('${theThing}')`, testsOrMeta, ['parallelTests', 'sequentialTests'])\n meta = testsOrMeta\n tests = possiblyTests as DescribeCallback // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion\n }\n global.__sxy_test_runner__.describes.push({\n counter: thisDescribeCounter,\n thing: theThing,\n meta,\n tests\n })\n\n debug(\n chalk.lightgrey`${thisDescribeCounter})`\n + chalk.lightgrey` Done with ` + chalk.brightblue`${theThing}\\n`\n )\n}\n"]}
|
package/dist/envFlag.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Parse a boolean-ish env var. Accepts true/false and 1/0, case-insensitive,
|
|
2
|
+
// tolerant of surrounding quotes and whitespace (e.g. TIME_PROFILING="true").
|
|
3
|
+
// Anything unrecognised (or unset) is treated as false.
|
|
4
|
+
export function envFlag(value) {
|
|
5
|
+
if (value === undefined || value === '')
|
|
6
|
+
return false;
|
|
7
|
+
const normalized = value.trim().replace(/^["']|["']$/g, '').toLowerCase();
|
|
8
|
+
if (normalized === 'true' || normalized === 'on' || normalized === '1')
|
|
9
|
+
return true;
|
|
10
|
+
if (normalized === 'false' || normalized === 'off' || normalized === '0')
|
|
11
|
+
return false;
|
|
12
|
+
throw new Error(`Expected env flag value '${value}'`);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=envFlag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envFlag.js","sourceRoot":"","sources":["../src/envFlag.ts"],"names":[],"mappings":"AACA,6EAA6E;AAC7E,8EAA8E;AAC9E,wDAAwD;AACxD,MAAM,UAAU,OAAO,CAAC,KAAyB;IAC7C,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,KAAK,CAAA;IACrD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAA;IACzE,IAAI,UAAU,KAAK,MAAM,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,GAAG;QAAE,OAAO,IAAI,CAAA;IACnF,IAAI,UAAU,KAAK,OAAO,IAAI,UAAU,KAAK,KAAK,IAAI,UAAU,KAAK,GAAG;QAAE,OAAO,KAAK,CAAA;IACtF,MAAM,IAAI,KAAK,CAAC,4BAA4B,KAAK,GAAG,CAAC,CAAA;AACzD,CAAC","sourcesContent":["\r\n// Parse a boolean-ish env var. Accepts true/false and 1/0, case-insensitive,\r\n// tolerant of surrounding quotes and whitespace (e.g. TIME_PROFILING=\"true\").\r\n// Anything unrecognised (or unset) is treated as false.\r\nexport function envFlag(value: string | undefined): boolean {\r\n if (value === undefined || value === '') return false\r\n const normalized = value.trim().replace(/^[\"']|[\"']$/g, '').toLowerCase()\r\n if (normalized === 'true' || normalized === 'on' || normalized === '1') return true\r\n if (normalized === 'false' || normalized === 'off' || normalized === '0') return false\r\n throw new Error(`Expected env flag value '${value}'`)\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexNumberToLetters.js","sourceRoot":"","sources":["../src/indexNumberToLetters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"indexNumberToLetters.js","sourceRoot":"","sources":["../src/indexNumberToLetters.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,oBAAoB,CAAC,MAAc,EAAE,SAAS,GAAG,KAAK;IAClE,MAAM,aAAa,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IACzC,IAAI,IAAI,GAAG,EAAE,CAAA;IACb,IAAI,WAAmB,CAAA;IAEvB,OAAO,MAAM,GAAG,CAAC,EAAE,CAAC;QAChB,WAAW,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,CAAA;QAC/B,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,aAAa,GAAG,WAAW,CAAC,GAAG,IAAI,CAAA;QAC9D,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;IAC9C,CAAC;IACD,OAAO,IAAI,IAAI,SAAS,CAAA;AAC5B,CAAC","sourcesContent":["\nexport function indexNumberToLetters(number: number, uppercase = false): string | undefined {\n const charCodeStart = uppercase ? 65 : 97\n let text = ''\n let letterIndex: number\n\n while (number > 0) {\n letterIndex = (number - 1) % 26\n text = String.fromCharCode(charCodeStart + letterIndex) + text\n number = ((number - letterIndex) / 26) | 0\n }\n return text || undefined\n}\n"]}
|
package/dist/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../src/meta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../src/meta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAO1C,MAAM,UAAU,IAAI,CAAC,OAAiB;IAClC,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CACX,gFAAgF;cAC9E,0DAA0D;cAC1D,+CAA+C,CACpD,CAAA;IACL,CAAC;IAED,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,mBAAmB,EAAE,qBAAqB,CAAC,CAAC,CAAA;IAE1E,MAAM,CAAC,mBAAmB,CAAC,QAAQ,GAAG,OAAO,CAAA;AACjD,CAAC","sourcesContent":["\nimport { checkMeta } from './checkMeta.js'\n\n\nexport type FileMeta\n = { parallelDescribes: boolean }\n | { sequentialDescribes: boolean }\n\nexport function meta(theMeta: FileMeta): void {\n if (!global.__sxy_test_runner__) {\n throw new Error(\n 'sxy-test-runner meta() was called, but the test framework has not initialized.'\n + ' This might be because you have run a test file directly'\n + ', instead of running \\'pnpm sxy-test-runner\\''\n )\n }\n\n checkMeta('meta()', theMeta, ['parallelDescribes', 'sequentialDescribes'])\n\n global.__sxy_test_runner__.fileMeta = theMeta\n}\n"]}
|
package/dist/output.js
CHANGED
|
@@ -5,9 +5,11 @@ export function out(...texts) {
|
|
|
5
5
|
}
|
|
6
6
|
export function warn(...texts) {
|
|
7
7
|
console.log(...texts);
|
|
8
|
+
//console.error(...texts)
|
|
8
9
|
}
|
|
9
10
|
export function error(...texts) {
|
|
10
11
|
console.log(...texts);
|
|
12
|
+
//console.error(...texts)
|
|
11
13
|
}
|
|
12
14
|
export function log(...texts) {
|
|
13
15
|
console.log(...texts);
|
package/dist/output.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AACA,+BAA+B;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,MAAM,UAAU,GAAG,CAAC,GAAG,KAAgB;IACnC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA;AACzB,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,GAAG,KAAgB;IACpC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA;IACrB,yBAAyB;AAC7B,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,GAAG,KAAgB;IACrC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA;IACrB,yBAAyB;AAC7B,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,GAAG,KAAgB;IACnC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA;AACzB,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAkC,CAAC,SAAS,CAAC;IAC3D,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,KAAgB;QAChC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA;IACzB,CAAC;IACD,CAAC,CAAC,SAAS,KAAK;QACZ,mCAAmC;IACvC,CAAC,CAAA","sourcesContent":["\n/* eslint-disable no-console */\n\nimport { debugging } from './config.js'\n\n\nexport function out(...texts: unknown[]): void {\n console.log(...texts)\n}\n\nexport function warn(...texts: unknown[]): void {\n console.log(...texts)\n //console.error(...texts)\n}\n\nexport function error(...texts: unknown[]): void {\n console.log(...texts)\n //console.error(...texts)\n}\n\nexport function log(...texts: unknown[]): void {\n console.log(...texts)\n}\n\nexport const debug: (...texts: unknown[]) => void = (debugging)\n ? function debug(...texts: unknown[]) {\n console.log(...texts)\n }\n : function debug() {\n // no-op when debugging is disabled\n }\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chalk.js","sourceRoot":"","sources":["../../src/packages/chalk.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chalk.js","sourceRoot":"","sources":["../../src/packages/chalk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,gFAAgF;AAChF,gFAAgF;AAChF,iFAAiF;AACjF,iFAAiF;AACjF,mCAAmC;AACnC,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,6DAA6D;AAC7D,eAAe;IACX,GAAG,EAAE,KAAK,CAAC,GAAG;IACd,IAAI,EAAE,KAAK,CAAC,IAAI;IAChB,MAAM,EAAE,KAAK,CAAC,MAAM;IACpB,IAAI,EAAE,KAAK,CAAC,IAAI;IAChB,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAO,0CAA0C;IAC7E,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAG,0CAA0C;IAC7E,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAI,sCAAsC;IACzE,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,mCAAmC;IACtE,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAI,mCAAmC;CACzE,CAAA","sourcesContent":["\nimport chalk from 'chalk'\n\n\n// Local replacement for `chalk-extensions`. That package monkey-patches chalk's\n// shared singleton with dozens of named colours; we only use a handful, so this\n// is a small facade that delegates to chalk and adds just those. Each entry is a\n// chalk instance, so both call form (`chalk.orange(x)`) and tagged-template form\n// (`chalk.mediumgreen\\`…\\``) work.\n//\n// The custom colours reproduce chalk-extensions' exact definitions. It defined\n// several via chalk's CSS-keyword helper; the equivalent hex is inlined here so\n// output is identical without loading chalk's keyword table.\nexport default {\n red: chalk.red,\n grey: chalk.grey,\n yellow: chalk.yellow,\n blue: chalk.blue,\n orange: chalk.hex('#FF8C00'), // chalk-extensions: keyword('darkorange')\n brightblue: chalk.hex('#1E90FF'), // chalk-extensions: keyword('dodgerblue')\n lightgrey: chalk.hex('#C0C0C0'), // chalk-extensions: keyword('silver')\n mediumgreen: chalk.hex('#20d970'), // chalk-extensions: hex('#20d970')\n mediumred: chalk.hex('#e0444c') // chalk-extensions: hex('#e0444c')\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esmReload.js","sourceRoot":"","sources":["../../src/packages/esmReload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"esmReload.js","sourceRoot":"","sources":["../../src/packages/esmReload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAqCjD,MAAM,mBAAmB,GAAG,2CAA2C,CAAA;AAEvE,IAAI,QAAQ,GAAG,CAAC,CAAA;AAEhB,SAAS,gBAAgB;IACrB,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AAC9D,CAAC;AAED,SAAS,YAAY,CAAC,GAAW;IAC7B,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;IAC9B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACxC,SAAS,CAAC,MAAM,GAAG,EAAE,CAAA;IACrB,OAAO,CAAC,MAAM,GAAG,EAAE,CAAA;IACnB,OAAO,SAAS,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAA;AAC1C,CAAC;AAED,SAAS,cAAc,CAAC,GAAQ;IAC5B,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AACjD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CACzB,SAAiB,EACjB,OAAuB,EACvB,WAAwB;IAExB,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAEpD,IAAI,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACvF,OAAO,MAAM,CAAA;IACjB,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAE/B,yEAAyE;IACzE,0EAA0E;IAC1E,IAAI,cAAc,CAAC,GAAG,CAAC;QAAE,OAAO,MAAM,CAAA;IAEtC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAC5C,MAAM,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE;QAClD,CAAC,CAAC,0BAA0B,QAAQ,EAAE,EAAE;QACxC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;IAEjD,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,MAAM,CAAA;IAEpC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IACjC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAA;IAE/C,OAAO;QACH,GAAG,MAAM;QACT,GAAG,EAAE,GAAG,CAAC,IAAI;KAChB,CAAA;AACL,CAAC;AAED,IAAI,CAAC,gBAAgB,EAAE,EAAE,CAAC;IACtB,QAAQ,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAA;AACzC,CAAC","sourcesContent":["\nimport { isBuiltin, register } from 'node:module'\n\n\n/*\n * Based on esm-reload by Marcel Laverdet and Pierre-Yves Gérardy.\n *\n * ISC License\n *\n * Copyright 2024 Marcel Laverdet & Pierre-Yves Gérardy\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\ninterface ResolveContext {\n parentURL?: string\n}\n\ninterface ResolveResult {\n url: string\n [key: string]: unknown\n}\n\ntype NextResolve = (\n specifier: string,\n context: ResolveContext\n) => ResolveResult | Promise<ResolveResult>\n\nconst cachedModulePattern = /\\._cached_\\.(?:[cm]?js|[cm]?ts|jsx|tsx)$/i\n\nlet reloadId = 0\n\nfunction isLoaderInstance(): boolean {\n return new URL(import.meta.url).searchParams.has('loader')\n}\n\nfunction isThisModule(url: string): boolean {\n const candidate = new URL(url)\n const current = new URL(import.meta.url)\n candidate.search = ''\n current.search = ''\n return candidate.href === current.href\n}\n\nfunction isCachedModule(url: URL): boolean {\n return cachedModulePattern.test(url.pathname)\n}\n\nexport async function resolve(\n specifier: string,\n context: ResolveContext,\n nextResolve: NextResolve\n): Promise<ResolveResult> {\n const result = await nextResolve(specifier, context)\n\n if (isThisModule(result.url) || isBuiltin(result.url) || context.parentURL === undefined) {\n return result\n }\n\n const url = new URL(result.url)\n\n // A *._cached_.js/ts module and its dependency graph use Node's ordinary\n // process-wide module cache instead of inheriting the test file instance.\n if (isCachedModule(url)) return result\n\n const parentUrl = new URL(context.parentURL)\n const instance = url.searchParams.get('reload') === ''\n ? `sxy-test-runner-reload-${reloadId++}`\n : parentUrl.searchParams.get('sxyt-instance')\n\n if (instance === null) return result\n\n url.searchParams.delete('reload')\n url.searchParams.set('sxyt-instance', instance)\n\n return {\n ...result,\n url: url.href\n }\n}\n\nif (!isLoaderInstance()) {\n register(`${import.meta.url}?loader`)\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"figures.js","sourceRoot":"","sources":["../../src/packages/figures.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"figures.js","sourceRoot":"","sources":["../../src/packages/figures.ts"],"names":[],"mappings":"AACA,sEAAsE;AACtE,4EAA4E;AAC5E,kFAAkF;AAClF,SAAS,kBAAkB;IACvB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QAC/B,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,CAAA,CAAC,yBAAyB;IACjE,CAAC;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;WACvB,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,mBAAmB;WACnD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,qBAAqB;WAC3D,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,cAAc,CAAC,mBAAmB;WAC7D,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,kBAAkB;WAC/C,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,QAAQ;WACrC,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,gBAAgB;WACrC,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,WAAW;WAChC,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,oBAAoB,CAAA;AACjE,CAAC;AAED,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAA;AAEpC,MAAM,OAAO,GAAG;IACZ,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;IACzB,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;CAC7B,CAAA;AAED,eAAe,OAAO,CAAA","sourcesContent":["\n// Local replacement for the `figures` package (sindresorhus/figures).\n// The runner uses only `tick` and `cross`; we reproduce the main glyphs and\n// their Windows-console ASCII fallbacks, gated by the same unicode-support check.\nfunction isUnicodeSupported(): boolean {\n if (process.platform !== 'win32') {\n return process.env.TERM !== 'linux' // Linux console (kernel)\n }\n\n return Boolean(process.env.CI)\n || Boolean(process.env.WT_SESSION) // Windows Terminal\n || Boolean(process.env.TERMINUS_SUBLIME) // Terminus (<0.2.27)\n || process.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder\n || process.env.TERM_PROGRAM === 'Terminus-Sublime'\n || process.env.TERM_PROGRAM === 'vscode'\n || process.env.TERM === 'xterm-256color'\n || process.env.TERM === 'alacritty'\n || process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm'\n}\n\nconst useMain = isUnicodeSupported()\n\nconst figures = {\n tick: useMain ? '✔' : '√',\n cross: useMain ? '✖' : '×'\n}\n\nexport default figures\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadConfig.js","sourceRoot":"","sources":["../../src/packages/loadConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loadConfig.js","sourceRoot":"","sources":["../../src/packages/loadConfig.ts"],"names":[],"mappings":"AACA,qEAAqE;AACrE,yFAAyF;AACzF,uFAAuF;AACvF,yFAAyF;AACzF,oBAAoB;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;AAE7C,MAAM,CAAC,KAAK,UAAU,UAAU,CAC5B,WAAqB,EACrB,YAAsB,CAAC,EAAE,EAAE,QAAQ,CAAC;IAEpC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;IAEhC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QAC/B,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACnC,KAAK,MAAM,GAAG,IAAI,gBAAgB,EAAE,CAAC;gBACjC,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,GAAG,UAAU,IAAI,GAAG,EAAE,CAAC,CAAA;gBACvE,IAAI,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;oBAC3B,OAAO,CAAC,MAAM,MAAM,CAAC,SAAS,GAAG,YAAY,CAAC,CAAC,CAAC,OAAY,CAAA;gBAChE,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAA;AACf,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAc,cAAsB;IACrE,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAA;IACxD,IAAI,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAC3B,OAAO,CAAC,MAAM,MAAM,CAAC,SAAS,GAAG,YAAY,CAAC,CAAC,CAAC,OAAY,CAAA;IAChE,CAAC;IACD,OAAO,IAAI,CAAA;AACf,CAAC","sourcesContent":["\n// Local replacement for sxy-dev-tools' loadConfig / loadConfigExact.\n// Searches the given locations for `<configName>.{js,cjs,mjs}` (js first, per location),\n// dynamically imports the first match and returns its default export, or null if none.\n// The upstream `types` / mergeConfig path was dead here (the runner never passes types),\n// so it is omitted.\n\nimport { existsSync } from 'fs'\nimport { join } from 'path'\n\n\nconst configExtensions = ['js', 'cjs', 'mjs']\n\nexport async function loadConfig<T = unknown>(\n configNames: string[],\n locations: string[] = ['', 'config']\n): Promise<T | null> {\n const projectDir = process.cwd()\n\n for (const location of locations) {\n for (const configName of configNames) {\n for (const ext of configExtensions) {\n const fullLocation = join(projectDir, location, `${configName}.${ext}`)\n if (existsSync(fullLocation)) {\n return (await import('file://' + fullLocation)).default as T\n }\n }\n }\n }\n\n return null\n}\n\nexport async function loadConfigExact<T = unknown>(configLocation: string): Promise<T | null> {\n const fullLocation = join(process.cwd(), configLocation)\n if (existsSync(fullLocation)) {\n return (await import('file://' + fullLocation)).default as T\n }\n return null\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeStructuredConfig.js","sourceRoot":"","sources":["../../src/packages/mergeStructuredConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mergeStructuredConfig.js","sourceRoot":"","sources":["../../src/packages/mergeStructuredConfig.ts"],"names":[],"mappings":"AACA,8DAA8D;AAC9D,2FAA2F;AAC3F,oFAAoF;AACpF,4FAA4F;AAC5F,uFAAuF;AACvF,2FAA2F;AAC3F,0FAA0F;AAE1F,MAAM,UAAU,qBAAqB,CACjC,SAAiB,EACjB,UAAa,EACb,GAAG,YAAiB;IAEpB,MAAM,WAAW,GAAG,eAAe,CAAC,UAAU,CAA4B,CAAA;IAC1E,MAAM,MAAM,GAAG,SAAoC,CAAA;IAEnD,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACrC,IAAI,WAAW,KAAK,SAAS,IAAI,WAAW,KAAK,IAAI;YAAE,SAAQ;QAC/D,KAAK,MAAM,GAAG,IAAI,WAAsC,EAAE,CAAC;YACvD,MAAM,UAAU,GAAI,WAAuC,CAAC,GAAG,CAAC,CAAA;YAChE,IAAI,GAAG,IAAI,MAAM,EAAE,CAAC;gBAChB,WAAW,CAAC,GAAG,CAAC,GAAG,qBAAqB,CACnC,MAAM,CAAC,GAAG,CAAwB,IAAI,EAAE,EACzC,WAAW,CAAC,GAAG,CAAC,EAChB,UAAU,CACb,CAAA;YACL,CAAC;iBAAM,CAAC;gBACJ,WAAW,CAAC,GAAG,CAAC,GAAG,UAAU,CAAA;YACjC,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,WAAgB,CAAA;AAC3B,CAAC","sourcesContent":["\n// Local replacement for sxy-dev-tools' mergeStructuredConfig.\n// `structure` marks which keys are nested config branches (terminated by an empty object);\n// those are merged recursively, everything else is overwritten by the later config.\n// The upstream used a global `Object.copy` (from sxy-standard-object-copy) to deep-copy the\n// base; the built-in `structuredClone` does the same. Only the base config (pure data:\n// defaultConfig and its execution/watch branches) is ever cloned - user-supplied functions\n// (setup/teardown) sit on non-structure keys and are assigned by reference, never cloned.\n\nexport function mergeStructuredConfig<T, E = unknown>(\n structure: object,\n baseConfig: T,\n ...extraConfigs: E[]\n): T {\n const finalConfig = structuredClone(baseConfig) as Record<string, unknown>\n const struct = structure as Record<string, unknown>\n\n for (const extraConfig of extraConfigs) {\n if (extraConfig === undefined || extraConfig === null) continue\n for (const key in extraConfig as Record<string, unknown>) {\n const extraValue = (extraConfig as Record<string, unknown>)[key]\n if (key in struct) {\n finalConfig[key] = mergeStructuredConfig(\n (struct[key] as object | undefined) ?? {},\n finalConfig[key],\n extraValue\n )\n } else {\n finalConfig[key] = extraValue\n }\n }\n }\n\n return finalConfig as T\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash.js","sourceRoot":"","sources":["../../src/packages/slash.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slash.js","sourceRoot":"","sources":["../../src/packages/slash.ts"],"names":[],"mappings":"AACA,kEAAkE;AAClE,yEAAyE;AACzE,+EAA+E;AAC/E,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAY;IACtC,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAA;IAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AACnC,CAAC","sourcesContent":["\n// Local replacement for the `slash` package (sindresorhus/slash).\n// Converts Windows backslash path separators to forward slashes, leaving\n// extended-length paths (\\\\?\\...) untouched — matching the upstream behaviour.\nexport default function slash(path: string): string {\n if (path.startsWith('\\\\\\\\?\\\\')) return path\n return path.replace(/\\\\/g, '/')\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeProfiler.js","sourceRoot":"","sources":["../../src/packages/timeProfiler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timeProfiler.js","sourceRoot":"","sources":["../../src/packages/timeProfiler.ts"],"names":[],"mappings":"AACA,2DAA2D;AAC3D,uFAAuF;AACvF,sFAAsF;AACtF,kDAAkD;AAElD,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAQlC,MAAM,UAAU,kBAAkB,CAAC,SAAS,GAAG,IAAI;IAC/C,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO;YACH,WAAW,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE;YACpC,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE;SAClD,CAAA;IACL,CAAC;IAED,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,EAAU,EAAQ,EAAE;QAC9C,GAAG,CAAC,KAAK,CAAC,MAAM,CAAA,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,KAAK,CAAC,MAAM,CAAA,GAAG,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;IAC/E,CAAC,CAAA;IAED,OAAO;QACH,WAAW,CAAC,IAAI,EAAE,IAAI;YAClB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;YACxB,MAAM,MAAM,GAAG,IAAI,EAAE,CAAA;YACrB,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAA;YAChC,OAAO,MAAM,CAAA;QACjB,CAAC;QACD,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI;YAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;YACxB,MAAM,MAAM,GAAG,MAAM,IAAI,EAAE,CAAA;YAC3B,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAA;YAChC,OAAO,MAAM,CAAA;QACjB,CAAC;KACJ,CAAA;AACL,CAAC","sourcesContent":["\n// Local replacement for sxy-dev-tools' createTimeProfiler.\n// The upstream package's index eagerly imports sxy-standard + sxy-standard-object-copy\n// (global-patching side effects, ~108ms to load); this trivial reimplementation drops\n// that cost and the external dependency entirely.\n\nimport chalk from './chalk.js'\nimport { out } from '../output.js'\n\n\nexport interface TimeProfiler {\n timeProfile: <T>(name: string, task: () => T) => T\n timeProfileAsync: <T>(name: string, task: () => T | Promise<T>) => Promise<T>\n}\n\nexport function createTimeProfiler(profiling = true): TimeProfiler {\n if (!profiling) {\n return {\n timeProfile: (_name, task) => task(),\n timeProfileAsync: async (_name, task) => task()\n }\n }\n\n const report = (name: string, ms: number): void => {\n out(chalk.yellow`${name}` + ' - ' + chalk.orange`${ms.toLocaleString()}ms`)\n }\n\n return {\n timeProfile(name, task) {\n const start = Date.now()\n const result = task()\n report(name, Date.now() - start)\n return result\n },\n async timeProfileAsync(name, task) {\n const start = Date.now()\n const result = await task()\n report(name, Date.now() - start)\n return result\n }\n }\n}\n"]}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { FileMeta } from './meta.js';
|
|
2
|
+
import type { DescribeMeta } from './describe.js';
|
|
3
3
|
export type ExecutionMode = 'parallel' | 'sequential';
|
|
4
4
|
export type GlobPattern = string | string[];
|
|
5
5
|
export interface ExecutionConfig {
|
|
@@ -56,17 +56,6 @@ export interface DescribeParcel extends TaskExports {
|
|
|
56
56
|
afterEachTest: (func: () => void | Promise<void>) => void;
|
|
57
57
|
}
|
|
58
58
|
export type DescribeCallback = (parcel: DescribeParcel) => void | Promise<void>;
|
|
59
|
-
export interface Describe {
|
|
60
|
-
counter: number;
|
|
61
|
-
thing: string;
|
|
62
|
-
meta?: DescribeMeta;
|
|
63
|
-
tests: DescribeCallback;
|
|
64
|
-
}
|
|
65
|
-
export interface It {
|
|
66
|
-
counter: number;
|
|
67
|
-
should: string;
|
|
68
|
-
test: (parcel: TestParcel) => void | Promise<void>;
|
|
69
|
-
}
|
|
70
59
|
export interface ParsedDescribe {
|
|
71
60
|
its: It[];
|
|
72
61
|
beforeDescribeExports: TaskExports;
|
|
@@ -75,76 +64,19 @@ export interface ParsedDescribe {
|
|
|
75
64
|
afterEachTestFunc?: () => void | Promise<void>;
|
|
76
65
|
error?: unknown;
|
|
77
66
|
}
|
|
78
|
-
export interface TestError extends Error {
|
|
79
|
-
actual?: unknown;
|
|
80
|
-
expected?: unknown;
|
|
81
|
-
}
|
|
82
|
-
export interface ItResult {
|
|
83
|
-
counter: number;
|
|
84
|
-
should: string;
|
|
85
|
-
success: boolean | null;
|
|
86
|
-
time: number;
|
|
87
|
-
error?: TestError;
|
|
88
|
-
logs: unknown[][];
|
|
89
|
-
}
|
|
90
|
-
export interface ItResultsSummary {
|
|
91
|
-
total: number;
|
|
92
|
-
passes: number;
|
|
93
|
-
}
|
|
94
|
-
export interface DescribeResult {
|
|
95
|
-
counter: number;
|
|
96
|
-
thing: string;
|
|
97
|
-
success: boolean | null;
|
|
98
|
-
time: number;
|
|
99
|
-
itResults: ItResult[];
|
|
100
|
-
itResultsSummary: ItResultsSummary;
|
|
101
|
-
logs?: unknown[][];
|
|
102
|
-
error?: unknown;
|
|
103
|
-
}
|
|
104
|
-
export interface DescribeResultsSummary {
|
|
105
|
-
total: number;
|
|
106
|
-
passes: number;
|
|
107
|
-
invalid: number;
|
|
108
|
-
itsTotal: number;
|
|
109
|
-
itsPasses: number;
|
|
110
|
-
}
|
|
111
|
-
export interface TestFile {
|
|
112
|
-
file: string;
|
|
113
|
-
describes?: Describe[];
|
|
114
|
-
meta?: FileMeta;
|
|
115
|
-
error?: string | false;
|
|
116
|
-
logs?: unknown[][];
|
|
117
|
-
}
|
|
118
|
-
export interface TestResult {
|
|
119
|
-
file: string;
|
|
120
|
-
success: boolean | null;
|
|
121
|
-
describeResults: DescribeResult[];
|
|
122
|
-
describeResultsSummary: DescribeResultsSummary;
|
|
123
|
-
logs: unknown[][];
|
|
124
|
-
}
|
|
125
|
-
export interface TestsResultsSummary {
|
|
126
|
-
total: number;
|
|
127
|
-
passes: number;
|
|
128
|
-
invalid: number;
|
|
129
|
-
describesTotal: number;
|
|
130
|
-
describesPasses: number;
|
|
131
|
-
describesInvalid: number;
|
|
132
|
-
itsTotal: number;
|
|
133
|
-
itsPasses: number;
|
|
134
|
-
}
|
|
135
67
|
export type DependencyTrees = Record<string, string[]>;
|
|
136
68
|
export type OutFn = (...texts: unknown[]) => void;
|
|
137
|
-
export
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
export type
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
69
|
+
export type Describe = {
|
|
70
|
+
counter: number;
|
|
71
|
+
thing: string;
|
|
72
|
+
meta?: DescribeMeta;
|
|
73
|
+
tests: DescribeCallback;
|
|
74
|
+
};
|
|
75
|
+
export type It = {
|
|
76
|
+
counter: number;
|
|
77
|
+
should: string;
|
|
78
|
+
test: (parcel: TestParcel) => void | Promise<void>;
|
|
79
|
+
};
|
|
148
80
|
export interface SxyTestRunnerGlobal {
|
|
149
81
|
describes: Describe[];
|
|
150
82
|
describeCounter: number;
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,2EAA2E;AAC3E,2EAA2E;AAC3E,2EAA2E;AAC3E,+EAA+E","sourcesContent":["\n// Shared types for the test-run data model, user config, and CLI plumbing.\n// The config/result shapes are inferred from usage across the old awaitful\n// source (defaultConfig.js, validateConfig.js, init.js's template, and the\n// run*/parseDescribe/showTestResult modules) - there was no prior type source.\n\nimport type { FileMeta } from './meta.js'\nimport type { DescribeMeta } from './describe.js'\n\n\nexport type ExecutionMode = 'parallel' | 'sequential'\nexport type GlobPattern = string | string[]\n\nexport interface ExecutionConfig {\n files: ExecutionMode\n describes: ExecutionMode\n tests: ExecutionMode\n}\n\n// path to write the latest watch run status to, or false to write none\nexport type StatusFileConfig = string | false\n\nexport interface WatchConfig {\n watchFilesBase: string\n watchFiles: GlobPattern\n watchFilesIgnore: GlobPattern\n runAllOnStartup: boolean\n reRunFailingTests: boolean\n // map a changed file to the tests that import it. Off, any watched change runs everything\n dependencyEvaluation: boolean\n ttyActionsOnKeypress: boolean\n statusFile: StatusFileConfig\n // report the session as single agent readable lines instead of the usual output\n agent: boolean\n}\n\nexport type TaskExports = Record<string, unknown>\nexport type ConfigTaskFn = (parcel?: TaskExports) => TaskExports | void | Promise<TaskExports | void>\n// a task may also be a file path (relative to the project root) to dynamically import\nexport type ConfigTask = ConfigTaskFn | string\nexport type ConfigTasks = ConfigTask | ConfigTask[]\n\nexport interface FinalConfig {\n testsBase: string\n tests: GlobPattern\n testsFilter?: string\n testsIgnore: GlobPattern\n setup?: ConfigTasks\n beforeEachFile?: ConfigTasks\n afterEachFile?: ConfigTasks\n beforeEachDescribe?: ConfigTasks\n afterEachDescribe?: ConfigTasks\n beforeEachTest?: ConfigTasks\n afterEachTest?: ConfigTasks\n teardown?: ConfigTasks\n showErrorTrace: boolean\n compact: boolean\n // stop the run at the first failing test, erroring describe or unloadable test file.\n // Set by `once --fail-fast` only: it describes one invocation, not a project, and in\n // watch mode it would silently truncate runs that report themselves as covering\n // everything\n failFast: boolean\n execution: ExecutionConfig\n watch: WatchConfig\n}\n\nexport type UserConfig = Partial<\n Omit<FinalConfig, 'testsFilter' | 'failFast' | 'execution' | 'watch'>\n> & {\n execution?: Partial<ExecutionConfig>\n watch?: Partial<WatchConfig>\n}\n\nexport type UserConfigInternal = UserConfig\n & Partial<Pick<FinalConfig, 'testsFilter' | 'failFast'>>\n\n\n// -- test-run data model --------------------------------------------------\n\nexport type TestParcel = TaskExports\n\nexport interface DescribeParcel extends TaskExports {\n it: (should: string, test: (parcel: TestParcel) => void | Promise<void>) => void\n test: (should: string, test: (parcel: TestParcel) => void | Promise<void>) => void\n afterDescribe: (func: () => void | Promise<void>) => void\n beforeEachTest: (func: () => TaskExports | void | Promise<TaskExports | void>) => void\n afterEachTest: (func: () => void | Promise<void>) => void\n}\n\nexport type DescribeCallback = (parcel: DescribeParcel) => void | Promise<void>\n\n\n\nexport interface ParsedDescribe {\n its: It[]\n beforeDescribeExports: TaskExports\n afterDescribeFunc?: () => void | Promise<void>\n beforeEachTestFunc?: () => TaskExports | void | Promise<TaskExports | void>\n afterEachTestFunc?: () => void | Promise<void>\n error?: unknown\n}\n\n// export interface TestError extends Error {\n// actual?: unknown\n// expected?: unknown\n// }\n\n\n\n\n\n\n\n\n\n\nexport type DependencyTrees = Record<string, string[]>\n\nexport type OutFn = (...texts: unknown[]) => void\n\n\n\n// -- globals ----------------------------------------------------------------\n\nexport type Describe = {\n counter: number\n thing: string\n meta?: DescribeMeta\n tests: DescribeCallback\n}\n\nexport type It = {\n counter: number\n should: string\n test: (parcel: TestParcel) => void | Promise<void>\n}\n\nexport interface SxyTestRunnerGlobal {\n describes: Describe[]\n describeCounter: number\n fileMeta?: FileMeta\n}\ndeclare global {\n var __sxy_test_runner__: SxyTestRunnerGlobal | undefined\n var __sxyt_commandLineArguments: string[]\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sxy-test-runner",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/RobertSandiford/sxy-test-runner",
|
|
6
6
|
"repository": {
|
|
@@ -40,14 +40,13 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"chalk": "^4.1.2",
|
|
43
|
-
"chokidar": "^3.6.0",
|
|
44
43
|
"cross-env": "^7.0.3",
|
|
45
44
|
"dependency-tree": "^12.0.1",
|
|
46
45
|
"esm-reload": "^1.0.1",
|
|
47
46
|
"minimatch": "^5.1.9",
|
|
48
47
|
"node-watch": "^0.7.4",
|
|
49
48
|
"rimraf": "^6.1.3",
|
|
50
|
-
"sxy-lib": "^3.0.
|
|
49
|
+
"sxy-lib": "^3.0.7"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
52
|
"@types/chai": "^5.2.3",
|
|
@@ -63,7 +62,9 @@
|
|
|
63
62
|
"chai-as-promised": "^7.1.2",
|
|
64
63
|
"chai-string": "^1.6.0",
|
|
65
64
|
"eslint": "^9.39.5",
|
|
66
|
-
"eslint-config-tungsten-flat": "^0.
|
|
65
|
+
"eslint-config-tungsten-flat": "^0.3.4",
|
|
66
|
+
"eslint-plugin-imports-regulation": "0.2.4",
|
|
67
|
+
"eslint-plugin-start-end-lines": "^0.1.0",
|
|
67
68
|
"mocha": "^9.2.2",
|
|
68
69
|
"mocha-steps": "^1.3.0",
|
|
69
70
|
"nodemon": "^2.0.22",
|