@codeyam/codeyam-cli 0.1.26 → 0.1.27

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 (29) 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/__tests__/editor.statePersistence.test.js +55 -0
  4. package/codeyam-cli/src/commands/__tests__/editor.statePersistence.test.js.map +1 -0
  5. package/codeyam-cli/src/commands/editor.js +30 -0
  6. package/codeyam-cli/src/commands/editor.js.map +1 -1
  7. package/codeyam-cli/src/data/techStacks.js +1 -1
  8. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +120 -0
  9. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -1
  10. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +84 -0
  11. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -1
  12. package/codeyam-cli/src/utils/editorScenarioSwitch.js +27 -12
  13. package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -1
  14. package/codeyam-cli/src/utils/editorSeedAdapter.js +27 -14
  15. package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -1
  16. package/codeyam-cli/src/webserver/build/server/assets/{analysisRunner-B6HnVI5u.js → analysisRunner-OLsM110H.js} +1 -1
  17. package/codeyam-cli/src/webserver/build/server/assets/{index-rV_xLS1u.js → index-WHdB6WTN.js} +1 -1
  18. package/codeyam-cli/src/webserver/build/server/assets/{init-BdWDvetv.js → init-DbSiZoE6.js} +1 -1
  19. package/codeyam-cli/src/webserver/build/server/assets/{server-build-B_jdq5dT.js → server-build-DZbLY6O_.js} +97 -96
  20. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  21. package/codeyam-cli/src/webserver/build-info.json +5 -5
  22. package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +50 -0
  23. package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +4 -2
  24. package/codeyam-cli/templates/expo-react-native/babel.config.js +1 -0
  25. package/codeyam-cli/templates/expo-react-native/gitignore +2 -0
  26. package/codeyam-cli/templates/expo-react-native/package.json +23 -18
  27. package/codeyam-cli/templates/expo-react-native/patches/expo-modules-autolinking+3.0.24.patch +29 -0
  28. package/codeyam-cli/templates/seed-adapters/supabase.ts +91 -8
  29. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  {
2
- "buildTimestamp": "2026-03-27T20:00:52.922Z",
3
- "buildTime": 1774641652922,
4
- "gitCommit": "2a3a412834b1cc8d46883263d3695bd29b8157dc",
2
+ "buildTimestamp": "2026-03-28T18:03:51.730Z",
3
+ "buildTime": 1774721031730,
4
+ "gitCommit": "3d7e1f0d118b714119562b24234d8e7ae6832002",
5
5
  "nodeVersion": "v20.20.1",
6
6
  "contentHash": "c92230c027acb71cab56d2a696876a6a52206bfadd59fbc31a512b00a7ee8826",
7
- "buildNumber": 1262,
8
- "semanticVersion": "0.1.1262",
9
- "version": "0.1.1262 (2026-03-27T20:00+c92230c)"
7
+ "buildNumber": 1271,
8
+ "semanticVersion": "0.1.1271",
9
+ "version": "0.1.1271 (2026-03-28T18:03+c92230c)"
10
10
  }
@@ -1,7 +1,7 @@
1
1
 
2
- [3/27/2026, 8:00:52 PM] > codeyam-combo@1.0.0 mergeDependencies
3
- [3/27/2026, 8:00:52 PM] > node ./scripts/mergePackageJsonFiles.cjs
2
+ [3/28/2026, 6:03:51 PM] > codeyam-combo@1.0.0 mergeDependencies
3
+ [3/28/2026, 6:03:51 PM] > node ./scripts/mergePackageJsonFiles.cjs
4
4
 
5
5
 
6
- [3/27/2026, 8:00:52 PM] Merged dependencies into root package.json
6
+ [3/28/2026, 6:03:51 PM] Merged dependencies into root package.json
7
7
 
@@ -0,0 +1,55 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ /**
4
+ * Structural test: every writeState() call in editor.ts must preserve
5
+ * `techStackId` and `appFormats` from the previous state.
6
+ *
7
+ * Bug: Steps 4-18 dropped techStackId from writeState calls, causing
8
+ * getTechStackContext() to fall back to Next.js defaults. This broke
9
+ * `codeyam editor isolate` for Expo projects — it created Next.js-style
10
+ * subdirectories instead of Expo flat files.
11
+ */
12
+ describe('editor state persistence', () => {
13
+ const editorSource = fs.readFileSync(path.join(__dirname, '..', 'editor.ts'), 'utf8');
14
+ // Find all writeState blocks in the source.
15
+ // Each writeState call spans multiple lines like:
16
+ // writeState(root, {
17
+ // feature,
18
+ // step: N,
19
+ // ...
20
+ // });
21
+ const writeStateBlocks = [];
22
+ const lines = editorSource.split('\n');
23
+ for (let i = 0; i < lines.length; i++) {
24
+ if (lines[i].includes('writeState(root,')) {
25
+ // Collect lines until we find the closing `});`
26
+ let block = '';
27
+ for (let j = i; j < lines.length; j++) {
28
+ block += lines[j] + '\n';
29
+ if (lines[j].match(/^\s*\}\);/))
30
+ break;
31
+ }
32
+ writeStateBlocks.push({ lineNumber: i + 1, block });
33
+ }
34
+ }
35
+ it('should find writeState calls in editor.ts', () => {
36
+ expect(writeStateBlocks.length).toBeGreaterThan(10);
37
+ });
38
+ // Filter to only writeState blocks that set a step number (printStep functions).
39
+ // Exclude the handleTemplate/migration-survey writeState that sets step: 0.
40
+ const stepWriteStates = writeStateBlocks.filter(({ block }) => block.match(/step:\s*\d+/) && !block.match(/step:\s*0/));
41
+ it('should find step writeState calls', () => {
42
+ expect(stepWriteStates.length).toBeGreaterThanOrEqual(18);
43
+ });
44
+ for (const { lineNumber, block } of stepWriteStates) {
45
+ const stepMatch = block.match(/step:\s*(\d+)/);
46
+ const stepNum = stepMatch ? stepMatch[1] : '?';
47
+ it(`step ${stepNum} writeState (line ${lineNumber}) should preserve techStackId`, () => {
48
+ expect(block).toContain('techStackId');
49
+ });
50
+ it(`step ${stepNum} writeState (line ${lineNumber}) should preserve appFormats`, () => {
51
+ expect(block).toContain('appFormats');
52
+ });
53
+ }
54
+ });
55
+ //# sourceMappingURL=editor.statePersistence.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor.statePersistence.test.js","sourceRoot":"","sources":["../../../../../src/commands/__tests__/editor.statePersistence.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;;;;;GAQG;AACH,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,MAAM,YAAY,GAAG,EAAE,CAAC,YAAY,CAClC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,CAAC,EACvC,MAAM,CACP,CAAC;IAEF,4CAA4C;IAC5C,kDAAkD;IAClD,uBAAuB;IACvB,eAAe;IACf,eAAe;IACf,UAAU;IACV,QAAQ;IACR,MAAM,gBAAgB,GAA4C,EAAE,CAAC;IACrE,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAC1C,gDAAgD;YAChD,IAAI,KAAK,GAAG,EAAE,CAAC;YACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACtC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;gBACzB,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC;oBAAE,MAAM;YACzC,CAAC;YACD,gBAAgB,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,iFAAiF;IACjF,4EAA4E;IAC5E,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAC7C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CACvE,CAAC;IAEF,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,KAAK,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,eAAe,EAAE,CAAC;QACpD,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAC/C,MAAM,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAE/C,EAAE,CAAC,QAAQ,OAAO,qBAAqB,UAAU,+BAA+B,EAAE,GAAG,EAAE;YACrF,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,QAAQ,OAAO,qBAAqB,UAAU,8BAA8B,EAAE,GAAG,EAAE;YACpF,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -1259,6 +1259,8 @@ function printStep4(root, feature) {
1259
1259
  label: STEP_LABELS[4],
1260
1260
  startedAt: isResuming ? prevState.startedAt : now,
1261
1261
  featureStartedAt: prevState?.featureStartedAt || now,
1262
+ appFormats: prevState?.appFormats,
1263
+ techStackId: prevState?.techStackId,
1262
1264
  });
1263
1265
  logEvent(root, 'step', { step: 4, label: 'Verify Prototype', feature });
1264
1266
  stepHeader(4, 'Verify Prototype', feature);
@@ -1315,6 +1317,8 @@ function printStep5(root, feature) {
1315
1317
  label: STEP_LABELS[5],
1316
1318
  startedAt: isResuming ? prevState.startedAt : now,
1317
1319
  featureStartedAt: prevState?.featureStartedAt || now,
1320
+ appFormats: prevState?.appFormats,
1321
+ techStackId: prevState?.techStackId,
1318
1322
  });
1319
1323
  logEvent(root, 'step', { step: 5, label: 'Confirm', feature });
1320
1324
  stepHeader(5, 'Confirm', feature);
@@ -1374,6 +1378,8 @@ function printStep6(root, feature) {
1374
1378
  label: STEP_LABELS[6],
1375
1379
  startedAt: isResuming ? prevState.startedAt : now,
1376
1380
  featureStartedAt: prevState?.featureStartedAt || now,
1381
+ appFormats: prevState?.appFormats,
1382
+ techStackId: prevState?.techStackId,
1377
1383
  });
1378
1384
  logEvent(root, 'step', { step: 6, label: 'Deconstruct', feature });
1379
1385
  stepHeader(6, 'Deconstruct', feature);
@@ -1399,6 +1405,8 @@ function printStep7(root, feature) {
1399
1405
  label: STEP_LABELS[7],
1400
1406
  startedAt: isResuming ? prevState.startedAt : now,
1401
1407
  featureStartedAt: prevState?.featureStartedAt || now,
1408
+ appFormats: prevState?.appFormats,
1409
+ techStackId: prevState?.techStackId,
1402
1410
  });
1403
1411
  logEvent(root, 'step', { step: 7, label: 'Extract', feature });
1404
1412
  stepHeader(7, 'Extract', feature);
@@ -1457,6 +1465,8 @@ function printStep8(root, feature) {
1457
1465
  label: STEP_LABELS[8],
1458
1466
  startedAt: isResuming ? prevState.startedAt : now,
1459
1467
  featureStartedAt: prevState?.featureStartedAt || now,
1468
+ appFormats: prevState?.appFormats,
1469
+ techStackId: prevState?.techStackId,
1460
1470
  });
1461
1471
  logEvent(root, 'step', { step: 8, label: 'Glossary', feature });
1462
1472
  stepHeader(8, 'Glossary', feature);
@@ -1483,6 +1493,8 @@ function printStep9(root, feature) {
1483
1493
  label: STEP_LABELS[9],
1484
1494
  startedAt: isResuming ? prevState.startedAt : now,
1485
1495
  featureStartedAt: prevState?.featureStartedAt || now,
1496
+ appFormats: prevState?.appFormats,
1497
+ techStackId: prevState?.techStackId,
1486
1498
  });
1487
1499
  logEvent(root, 'step', { step: 9, label: 'Analyze', feature });
1488
1500
  stepHeader(9, 'Analyze and Verify', feature);
@@ -1533,6 +1545,8 @@ function printStep10(root, feature) {
1533
1545
  label: STEP_LABELS[10],
1534
1546
  startedAt: isResuming ? prevState.startedAt : now,
1535
1547
  featureStartedAt: prevState?.featureStartedAt || now,
1548
+ appFormats: prevState?.appFormats,
1549
+ techStackId: prevState?.techStackId,
1536
1550
  });
1537
1551
  logEvent(root, 'step', { step: 10, label: 'App Scenarios', feature });
1538
1552
  stepHeader(10, 'App Scenarios', feature);
@@ -1597,6 +1611,8 @@ function printStep11(root, feature) {
1597
1611
  label: STEP_LABELS[11],
1598
1612
  startedAt: isResuming ? prevState.startedAt : now,
1599
1613
  featureStartedAt: prevState?.featureStartedAt || now,
1614
+ appFormats: prevState?.appFormats,
1615
+ techStackId: prevState?.techStackId,
1600
1616
  });
1601
1617
  logEvent(root, 'step', { step: 11, label: 'User Scenarios', feature });
1602
1618
  stepHeader(11, 'User Scenarios', feature);
@@ -1643,6 +1659,8 @@ function printStep12(root, feature) {
1643
1659
  label: STEP_LABELS[12],
1644
1660
  startedAt: isResuming ? prevState.startedAt : now,
1645
1661
  featureStartedAt: prevState?.featureStartedAt || now,
1662
+ appFormats: prevState?.appFormats,
1663
+ techStackId: prevState?.techStackId,
1646
1664
  });
1647
1665
  logEvent(root, 'step', { step: 12, label: 'Verify', feature });
1648
1666
  stepHeader(12, 'Verify', feature);
@@ -1689,6 +1707,8 @@ function printStep13(root, feature) {
1689
1707
  label: STEP_LABELS[13],
1690
1708
  startedAt: isResuming ? prevState.startedAt : now,
1691
1709
  featureStartedAt: prevState?.featureStartedAt || now,
1710
+ appFormats: prevState?.appFormats,
1711
+ techStackId: prevState?.techStackId,
1692
1712
  });
1693
1713
  logEvent(root, 'step', { step: 13, label: 'Journal', feature });
1694
1714
  stepHeader(13, 'Journal', feature);
@@ -1722,6 +1742,8 @@ function printStep14(root, feature) {
1722
1742
  label: STEP_LABELS[14],
1723
1743
  startedAt: isResuming ? prevState.startedAt : now,
1724
1744
  featureStartedAt: prevState?.featureStartedAt || now,
1745
+ appFormats: prevState?.appFormats,
1746
+ techStackId: prevState?.techStackId,
1725
1747
  });
1726
1748
  logEvent(root, 'step', { step: 14, label: 'Review', feature });
1727
1749
  stepHeader(14, 'Review', feature);
@@ -1755,6 +1777,8 @@ function printStep15(root, feature) {
1755
1777
  label: STEP_LABELS[15],
1756
1778
  startedAt: isResuming ? prevState.startedAt : now,
1757
1779
  featureStartedAt: prevState?.featureStartedAt || now,
1780
+ appFormats: prevState?.appFormats,
1781
+ techStackId: prevState?.techStackId,
1758
1782
  });
1759
1783
  logEvent(root, 'step', { step: 15, label: 'Present', feature });
1760
1784
  stepHeader(15, 'Present', feature);
@@ -2404,6 +2428,8 @@ function printStep16(root, feature) {
2404
2428
  label: STEP_LABELS[16],
2405
2429
  startedAt: isResuming ? prevState.startedAt : now,
2406
2430
  featureStartedAt: prevState?.featureStartedAt || now,
2431
+ appFormats: prevState?.appFormats,
2432
+ techStackId: prevState?.techStackId,
2407
2433
  });
2408
2434
  logEvent(root, 'step', { step: 16, label: 'Commit', feature });
2409
2435
  stepHeader(16, 'Commit', feature);
@@ -2430,6 +2456,8 @@ function printStep17(root, feature) {
2430
2456
  label: STEP_LABELS[17],
2431
2457
  startedAt: isResuming ? prevState.startedAt : now,
2432
2458
  featureStartedAt: prevState?.featureStartedAt || now,
2459
+ appFormats: prevState?.appFormats,
2460
+ techStackId: prevState?.techStackId,
2433
2461
  });
2434
2462
  logEvent(root, 'step', { step: 17, label: 'Finalize', feature });
2435
2463
  stepHeader(17, 'Finalize', feature);
@@ -2455,6 +2483,8 @@ function printStep18(root, feature) {
2455
2483
  label: STEP_LABELS[18],
2456
2484
  startedAt: isResuming ? prevState.startedAt : now,
2457
2485
  featureStartedAt: prevState?.featureStartedAt || now,
2486
+ appFormats: prevState?.appFormats,
2487
+ techStackId: prevState?.techStackId,
2458
2488
  });
2459
2489
  logEvent(root, 'step', { step: 18, label: 'Push', feature });
2460
2490
  stepHeader(18, 'Push', feature);