@volter/twin-standard 1.0.64 → 1.0.66

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.
@@ -330,14 +330,18 @@ const criteria = [
330
330
  ];
331
331
  // screens/: one file per screen the manifest declares, named by its id
332
332
  if (existsSync(join(src, 'screens'))) {
333
- let ids = new Set();
333
+ let ids;
334
334
  try {
335
335
  const m = (await import(__rewriteRelativeImportExtension(join(src, 'manifest.ts')))).manifest;
336
336
  ids = new Set((m?.screens ?? []).map((x) => x.id));
337
337
  }
338
338
  catch { /* a manifest that does not load fails manifest-data and states-module */ }
339
- // screens/shared.tsx: what two or more of the pack's screens share (its page shell, its skin), itself no screen
340
- outside.push(...filesUnder(join(src, 'screens')).filter((f) => !/^shared\.tsx?$/.test(f) && (!ids.has(f.replace(/\.(ui)?test\.tsx?$/, '').replace(/\.tsx?$/, '')) || f.includes('/'))).map((f) => `src/screens/${f}`));
339
+ // screens/shared.tsx: what two or more of the pack's screens share (its page shell, its skin), itself no screen.
340
+ // Without the manifest's screen ids no screen file can be judged: that is said, never every screen listed outside.
341
+ if (ids === undefined)
342
+ outside.push('(src/screens/ unjudged: manifest.ts does not load)');
343
+ else
344
+ outside.push(...filesUnder(join(src, 'screens')).filter((f) => !/^shared\.tsx?$/.test(f) && (!ids.has(f.replace(/\.(ui)?test\.tsx?$/, '').replace(/\.tsx?$/, '')) || f.includes('/'))).map((f) => `src/screens/${f}`));
341
345
  }
342
346
  const fetchFile = join(src, 'fetch.ts');
343
347
  if (!existsSync(fetchFile))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/twin-standard",
3
- "version": "1.0.64",
3
+ "version": "1.0.66",
4
4
  "description": "The Protocol 3 standard for Volter twin packs: the criteria a pack is graded by, the grader, the gate a pack repository and the twin catalog run on every change and submission, and the spec derivation the grade checks against. Pin a version: every place a pack is judged judges by that standard.",
5
5
  "keywords": [
6
6
  "twin",
@@ -75,7 +75,7 @@
75
75
  "yaml": "2.9.0"
76
76
  },
77
77
  "peerDependencies": {
78
- "@volter/world-core": "3.0.72",
78
+ "@volter/world-core": "3.0.74",
79
79
  "@volter/world-runtime": "*",
80
80
  "playwright": "^1.63.0"
81
81
  },
package/src/protocol-3.ts CHANGED
@@ -297,13 +297,15 @@ const criteria: Criterion[] = [
297
297
  ];
298
298
  // screens/: one file per screen the manifest declares, named by its id
299
299
  if (existsSync(join(src, 'screens'))) {
300
- let ids = new Set<string>();
300
+ let ids: Set<string> | undefined;
301
301
  try {
302
302
  const m = ((await import(join(src, 'manifest.ts'))) as { manifest?: { screens?: Array<{ id: string }> } }).manifest;
303
303
  ids = new Set((m?.screens ?? []).map((x) => x.id));
304
304
  } catch { /* a manifest that does not load fails manifest-data and states-module */ }
305
- // screens/shared.tsx: what two or more of the pack's screens share (its page shell, its skin), itself no screen
306
- outside.push(...filesUnder(join(src, 'screens')).filter((f) => !/^shared\.tsx?$/.test(f) && (!ids.has(f.replace(/\.(ui)?test\.tsx?$/, '').replace(/\.tsx?$/, '')) || f.includes('/'))).map((f) => `src/screens/${f}`));
305
+ // screens/shared.tsx: what two or more of the pack's screens share (its page shell, its skin), itself no screen.
306
+ // Without the manifest's screen ids no screen file can be judged: that is said, never every screen listed outside.
307
+ if (ids === undefined) outside.push('(src/screens/ unjudged: manifest.ts does not load)');
308
+ else outside.push(...filesUnder(join(src, 'screens')).filter((f) => !/^shared\.tsx?$/.test(f) && (!ids!.has(f.replace(/\.(ui)?test\.tsx?$/, '').replace(/\.tsx?$/, '')) || f.includes('/'))).map((f) => `src/screens/${f}`));
307
309
  }
308
310
  const fetchFile = join(src, 'fetch.ts');
309
311
  if (!existsSync(fetchFile)) outside.push('(no src/fetch.ts)');