@codeyam/codeyam-cli 0.1.13 → 0.1.14

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.
Files changed (32) hide show
  1. package/analyzer-template/.build-info.json +6 -6
  2. package/analyzer-template/log.txt +3 -3
  3. package/codeyam-cli/src/commands/editor.js +22 -22
  4. package/codeyam-cli/src/commands/editor.js.map +1 -1
  5. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +101 -0
  6. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -1
  7. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js +58 -4
  8. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js.map +1 -1
  9. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +37 -0
  10. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -1
  11. package/codeyam-cli/src/utils/editorAudit.js +38 -5
  12. package/codeyam-cli/src/utils/editorAudit.js.map +1 -1
  13. package/codeyam-cli/src/utils/editorEntityHelpers.js +18 -3
  14. package/codeyam-cli/src/utils/editorEntityHelpers.js.map +1 -1
  15. package/codeyam-cli/src/utils/editorScenarios.js +6 -1
  16. package/codeyam-cli/src/utils/editorScenarios.js.map +1 -1
  17. package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-DYqG1D_d.js +58 -0
  18. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-DggyRwOr.js +41 -0
  19. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.dev-BOi8kpwd.js → entity._sha.scenarios._scenarioId.dev-D1eikpe1.js} +1 -1
  20. package/codeyam-cli/src/webserver/build/client/assets/{manifest-75b1b319.js → manifest-f4212c17.js} +1 -1
  21. package/codeyam-cli/src/webserver/build/server/assets/{analysisRunner-lv2ooewK.js → analysisRunner-if8kM_1Q.js} +1 -1
  22. package/codeyam-cli/src/webserver/build/server/assets/{index-Im3Smyei.js → index-CHymws6l.js} +1 -1
  23. package/codeyam-cli/src/webserver/build/server/assets/{init-BjuAFKGM.js → init-D3HkMDbI.js} +1 -1
  24. package/codeyam-cli/src/webserver/build/server/assets/server-build-DTCzJQiH.js +551 -0
  25. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  26. package/codeyam-cli/src/webserver/build-info.json +5 -5
  27. package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +1 -1
  28. package/codeyam-cli/templates/nextjs-prisma-supabase/package.json +1 -1
  29. package/package.json +1 -1
  30. package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-CjC3_6JI.js +0 -58
  31. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-DBa7T2FK.js +0 -41
  32. package/codeyam-cli/src/webserver/build/server/assets/server-build-CNjF0B9B.js +0 -551
@@ -1,10 +1,10 @@
1
1
  {
2
- "buildTimestamp": "2026-03-17T22:42:54.370Z",
3
- "buildTime": 1773787374370,
4
- "gitCommit": "6af1ab46096de2c86af4f0947046703a16ac9786",
2
+ "buildTimestamp": "2026-03-18T14:58:22.078Z",
3
+ "buildTime": 1773845902078,
4
+ "gitCommit": "4dda2c78ef15ac678fb9a0e8f4d270c514f30f81",
5
5
  "nodeVersion": "v20.20.1",
6
6
  "contentHash": "b046e014847d5b02d10d6795839ccd0d5117627cbd0be413260824610596a63d",
7
- "buildNumber": 1087,
8
- "semanticVersion": "0.1.1087",
9
- "version": "0.1.1087 (2026-03-17T22:42+b046e01)"
7
+ "buildNumber": 1092,
8
+ "semanticVersion": "0.1.1092",
9
+ "version": "0.1.1092 (2026-03-18T14:58+b046e01)"
10
10
  }
@@ -1,7 +1,7 @@
1
1
 
2
- [3/17/2026, 10:42:54 PM] > codeyam-combo@1.0.0 mergeDependencies
3
- [3/17/2026, 10:42:54 PM] > node ./scripts/mergePackageJsonFiles.cjs
2
+ [3/18/2026, 2:58:21 PM] > codeyam-combo@1.0.0 mergeDependencies
3
+ [3/18/2026, 2:58:21 PM] > node ./scripts/mergePackageJsonFiles.cjs
4
4
 
5
5
 
6
- [3/17/2026, 10:42:54 PM] Merged dependencies into root package.json
6
+ [3/18/2026, 2:58:22 PM] Merged dependencies into root package.json
7
7
 
@@ -1444,8 +1444,6 @@ function printStep12(root, feature) {
1444
1444
  }
1445
1445
  // ─── Step 13: Present ─────────────────────────────────────────────────
1446
1446
  function printStep13(root, feature) {
1447
- const port = getServerPort();
1448
- const { defaultName: dim, names: dimNames } = getProjectDimensions(root);
1449
1447
  const prevState = readState(root);
1450
1448
  const isResuming = prevState?.step === 13;
1451
1449
  const now = new Date().toISOString();
@@ -1464,18 +1462,9 @@ function printStep13(root, feature) {
1464
1462
  console.log('Present the results to the user and get their approval.');
1465
1463
  console.log();
1466
1464
  console.log(chalk.bold('Checklist:'));
1467
- checkbox('Fetch all scenarios: `codeyam editor scenarios`');
1468
- console.log(chalk.dim(' Each scenario has a `changeStatus` field: "new", "edited", "impacted", or null.'));
1469
- checkbox('Pick the best scenario to showcase from this working session:');
1470
- console.log(chalk.dim(' Prefer scenarios with changeStatus "new" or "edited" (directly changed in this session).'));
1471
- console.log(chalk.dim(' For app-level scenarios, prefer those showing the new/changed functionality.'));
1472
- console.log(chalk.dim(' NEVER pick a scenario with changeStatus null — those are unchanged from a previous commit.'));
1473
- checkbox('Switch the preview to that scenario using its `id` and `dimension`:');
1474
- console.log(chalk.dim(` codeyam editor preview '{"scenarioId":"<id>","dimension":"${dim}"}'`));
1475
- console.log(chalk.dim(' Use the dimension that matches the scenario — check its registered dimensions.'));
1476
- printDimensionGuidance(dim, dimNames);
1477
1465
  checkbox(`Show the results panel: \`codeyam editor show-results\``);
1478
1466
  console.log(chalk.dim(' This opens a visual panel below the terminal showing all scenarios with screenshots.'));
1467
+ console.log(chalk.dim(' The preview automatically switches to the first app-level scenario.'));
1479
1468
  console.log(chalk.dim(' The user can click scenarios to switch the live preview.'));
1480
1469
  checkbox('Write a 1-2 sentence summary of what was built');
1481
1470
  checkbox('Report test count and audit status (one line)');
@@ -1705,7 +1694,6 @@ function printMigrateStep4(root) {
1705
1694
  }
1706
1695
  const { pageName, pageIndex, totalPages } = pageInfo;
1707
1696
  writeMigrationStepState(root, 4, pageName, pageIndex, totalPages);
1708
- const { defaultName: dim, names: dimNames } = getProjectDimensions(root);
1709
1697
  console.log();
1710
1698
  console.log(chalk.bold.cyan(`━━━ Migration Step 4: Preview — ${pageName} (${pageIndex + 1}/${totalPages}) ━━━`));
1711
1699
  console.log();
@@ -1715,11 +1703,8 @@ function printMigrateStep4(root) {
1715
1703
  checkbox('Review all scenario screenshots for this page — do they look correct?');
1716
1704
  checkbox('Check for client errors: `codeyam editor client-errors`');
1717
1705
  checkbox('If any issues: fix the scenario data, re-register affected scenarios');
1718
- checkbox('Fetch all scenarios: `codeyam editor scenarios`');
1719
- checkbox('Pick the best scenario to showcase:');
1720
- console.log(chalk.dim(` codeyam editor preview '{"scenarioId":"<id>","dimension":"${dim}"}'`));
1721
- printDimensionGuidance(dim, dimNames);
1722
1706
  checkbox('Show results: `codeyam editor show-results`');
1707
+ console.log(chalk.dim(' The preview automatically switches to the first app-level scenario.'));
1723
1708
  console.log();
1724
1709
  console.log(chalk.dim('The user should now see their existing page with live screenshots in the preview.'));
1725
1710
  migrationStopGate(4, pageName, pageIndex, totalPages);
@@ -1879,18 +1864,14 @@ function printMigrateStep10(root) {
1879
1864
  }
1880
1865
  const { pageName, pageIndex, totalPages } = pageInfo;
1881
1866
  writeMigrationStepState(root, 10, pageName, pageIndex, totalPages);
1882
- const { defaultName: dim, names: dimNames } = getProjectDimensions(root);
1883
1867
  console.log();
1884
1868
  console.log(chalk.bold.cyan(`━━━ Migration Step 10: Present — ${pageName} (${pageIndex + 1}/${totalPages}) ━━━`));
1885
1869
  console.log();
1886
1870
  console.log("Show results and commit this page's migration.");
1887
1871
  console.log();
1888
1872
  console.log(chalk.bold('Checklist:'));
1889
- checkbox('Fetch all scenarios: `codeyam editor scenarios`');
1890
- checkbox('Pick the best scenario to showcase:');
1891
- console.log(chalk.dim(` codeyam editor preview '{"scenarioId":"<id>","dimension":"${dim}"}'`));
1892
- printDimensionGuidance(dim, dimNames);
1893
1873
  checkbox('Show results: `codeyam editor show-results`');
1874
+ console.log(chalk.dim(' The preview automatically switches to the first app-level scenario.'));
1894
1875
  checkbox('Write a 1-2 sentence summary of what was migrated');
1895
1876
  console.log();
1896
1877
  console.log(chalk.bold('Present a selection menu (AskUserQuestion with these EXACT option labels):'));
@@ -2363,6 +2344,8 @@ async function handleAnalyzeImports(options = {}) {
2363
2344
  sha: e.sha,
2364
2345
  name: e.name,
2365
2346
  filePath: e.filePath || '',
2347
+ isDefaultExport: e.metadata?.notExported === false &&
2348
+ e.metadata?.namedExport === false,
2366
2349
  })));
2367
2350
  if (backfillResult.updated > 0 && !options.silent) {
2368
2351
  console.log(chalk.green(`Linked ${backfillResult.updated} scenario(s) to their entities.`));
@@ -2996,6 +2979,8 @@ function printAuditGateFailures(data) {
2996
2979
  issues.push(`${s.functionsMissing} function(s) missing test files`);
2997
2980
  if (s.functionsFailing > 0)
2998
2981
  issues.push(`${s.functionsFailing} function(s) with failing tests`);
2982
+ if (s.functionsRunnerError > 0)
2983
+ issues.push(`${s.functionsRunnerError} function(s) with test runner errors (the runner crashed — not a test failure)`);
2999
2984
  if (s.functionsNameMismatch > 0)
3000
2985
  issues.push(`${s.functionsNameMismatch} function(s) with test name mismatch`);
3001
2986
  if (s.missingFromGlossary > 0)
@@ -3122,6 +3107,14 @@ async function handleAudit() {
3122
3107
  case 'ok':
3123
3108
  detail = chalk.dim(` (${f.testFile})`);
3124
3109
  break;
3110
+ case 'runner_error':
3111
+ detail = chalk.red(` — test runner crashed: ${f.testFile}`);
3112
+ if (f.errorMessage) {
3113
+ detail += `\n ${chalk.red(f.errorMessage)}`;
3114
+ detail += `\n ${chalk.yellow('Note: This is NOT a test failure — the test runner itself could not execute.')}`;
3115
+ detail += `\n ${chalk.yellow('Try running the test manually: npx vitest run ' + f.testFile)}`;
3116
+ }
3117
+ break;
3125
3118
  case 'failing':
3126
3119
  detail = chalk.red(` — tests failing: ${f.testFile}`);
3127
3120
  break;
@@ -3206,6 +3199,9 @@ async function handleAudit() {
3206
3199
  if (summary.functionsFailing > 0) {
3207
3200
  parts.push(`${summary.functionsFailing} function${summary.functionsFailing !== 1 ? 's' : ''} with failing tests`);
3208
3201
  }
3202
+ if (summary.functionsRunnerError > 0) {
3203
+ parts.push(`${summary.functionsRunnerError} function${summary.functionsRunnerError !== 1 ? 's' : ''} with test runner errors (not test failures — see details above)`);
3204
+ }
3209
3205
  if (summary.functionsNameMismatch > 0) {
3210
3206
  parts.push(`${summary.functionsNameMismatch} function${summary.functionsNameMismatch !== 1 ? 's' : ''} with test name mismatch (missing top-level describe)`);
3211
3207
  }
@@ -3352,6 +3348,8 @@ async function handleScenarioCoverage() {
3352
3348
  sha: e.sha,
3353
3349
  name: e.name,
3354
3350
  filePath: e.filePath || '',
3351
+ isDefaultExport: e.metadata?.notExported === false &&
3352
+ e.metadata?.namedExport === false,
3355
3353
  })));
3356
3354
  }
3357
3355
  }
@@ -4408,6 +4406,8 @@ const editorCommand = {
4408
4406
  sha: e.sha,
4409
4407
  name: e.name,
4410
4408
  filePath: e.filePath || '',
4409
+ isDefaultExport: e.metadata?.notExported === false &&
4410
+ e.metadata?.namedExport === false,
4411
4411
  })));
4412
4412
  if (result.updated > 0) {
4413
4413
  console.log(chalk.green(` Linked ${result.updated} scenario(s) to their entities`));