cabloy 5.1.205 → 5.1.206
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/.cabloy-version +1 -1
- package/CHANGELOG.md +10 -0
- package/package.json +1 -1
- package/scripts/runIsolatedTest.test.ts +21 -0
- package/scripts/runIsolatedTest.ts +14 -6
- package/vona/pnpm-lock.yaml +1 -1
package/.cabloy-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.1.
|
|
1
|
+
5.1.206
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
createTestRunId,
|
|
33
33
|
getUnitTestCommands,
|
|
34
34
|
reserveTestRun,
|
|
35
|
+
resolveCabloyEdition,
|
|
35
36
|
ROOT_DIR,
|
|
36
37
|
runIsolatedProcess,
|
|
37
38
|
runIsolatedTest,
|
|
@@ -79,6 +80,26 @@ test('public test scripts delegate to the isolated runner without recursion', ()
|
|
|
79
80
|
]);
|
|
80
81
|
});
|
|
81
82
|
|
|
83
|
+
test('accepts either Cabloy edition and rejects ambiguous or missing markers', () => {
|
|
84
|
+
const root = mkdtempSync(join(tmpdir(), 'cabloy-run-edition-'));
|
|
85
|
+
const basicMarker = join(root, '__CABLOY_BASIC__');
|
|
86
|
+
const startMarker = join(root, '__CABLOY_START__');
|
|
87
|
+
try {
|
|
88
|
+
assert.throws(() => resolveCabloyEdition(root), /Not a Cabloy project/);
|
|
89
|
+
|
|
90
|
+
writeFileSync(basicMarker, '');
|
|
91
|
+
assert.equal(resolveCabloyEdition(root), 'basic');
|
|
92
|
+
|
|
93
|
+
writeFileSync(startMarker, '');
|
|
94
|
+
assert.throws(() => resolveCabloyEdition(root), /Ambiguous Cabloy edition/);
|
|
95
|
+
|
|
96
|
+
rmSync(basicMarker);
|
|
97
|
+
assert.equal(resolveCabloyEdition(root), 'start');
|
|
98
|
+
} finally {
|
|
99
|
+
rmSync(root, { recursive: true, force: true });
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
82
103
|
test('creates a UTC timestamp and eight random hex digits for one run identity', () => {
|
|
83
104
|
const date = new Date('2026-10-14T01:02:03.456Z');
|
|
84
105
|
assert.match(createTestRunId(date), /^20261014010203-[a-f0-9]{8}$/);
|
|
@@ -313,13 +313,21 @@ export function getUnitTestCommands(args: string[]) {
|
|
|
313
313
|
];
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
export
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
316
|
+
export function resolveCabloyEdition(rootDir = ROOT_DIR): 'basic' | 'start' {
|
|
317
|
+
const hasBasic = existsSync(resolve(rootDir, '__CABLOY_BASIC__'));
|
|
318
|
+
const hasStart = existsSync(resolve(rootDir, '__CABLOY_START__'));
|
|
319
|
+
if (hasBasic === hasStart) {
|
|
320
|
+
throw new Error(
|
|
321
|
+
hasBasic
|
|
322
|
+
? 'Ambiguous Cabloy edition: both __CABLOY_BASIC__ and __CABLOY_START__ markers are present'
|
|
323
|
+
: 'Not a Cabloy project: no __CABLOY_BASIC__ or __CABLOY_START__ marker found',
|
|
324
|
+
);
|
|
322
325
|
}
|
|
326
|
+
return hasBasic ? 'basic' : 'start';
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export async function runIsolatedTest(kind: 'unit' | 'e2e', args: string[]) {
|
|
330
|
+
resolveCabloyEdition();
|
|
323
331
|
if (process.env.E2E_BASE_URL !== undefined) {
|
|
324
332
|
throw new Error(
|
|
325
333
|
'E2E_BASE_URL is unsupported; the E2E runner manages a local test-mode target.',
|
package/vona/pnpm-lock.yaml
CHANGED