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 CHANGED
@@ -1 +1 @@
1
- 5.1.205
1
+ 5.1.206
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.1.206
4
+
5
+ ### Features
6
+
7
+ - Update functionality (details unspecified).
8
+
9
+ ### Improvements
10
+
11
+ - Update the pnpm dependency lockfile.
12
+
3
13
  ## 5.1.205
4
14
 
5
15
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cabloy",
3
- "version": "5.1.205",
3
+ "version": "5.1.206",
4
4
  "gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
5
5
  "description": "A Node.js fullstack framework",
6
6
  "keywords": [
@@ -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 async function runIsolatedTest(kind: 'unit' | 'e2e', args: string[]) {
317
- if (
318
- !existsSync(resolve(ROOT_DIR, '__CABLOY_BASIC__')) ||
319
- existsSync(resolve(ROOT_DIR, '__CABLOY_START__'))
320
- ) {
321
- throw new Error('This isolated test runner requires an unambiguous Cabloy Basic checkout');
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.',
@@ -1652,7 +1652,7 @@ importers:
1652
1652
  specifier: ^5.0.3
1653
1653
  version: link:modules/a-markdown
1654
1654
  vona-module-a-rbac:
1655
- specifier: ^5.0.9
1655
+ specifier: ^5.0.10
1656
1656
  version: link:modules/a-rbac
1657
1657
  vona-module-a-socket:
1658
1658
  specifier: workspace:^