logicstamp-context 0.7.0 → 0.7.2

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 (102) hide show
  1. package/LLM_CONTEXT.md +1 -1
  2. package/README.md +34 -7
  3. package/dist/cli/commands/compare/cleanup.d.ts +8 -0
  4. package/dist/cli/commands/compare/cleanup.d.ts.map +1 -0
  5. package/dist/cli/commands/compare/cleanup.js +27 -0
  6. package/dist/cli/commands/compare/cleanup.js.map +1 -0
  7. package/dist/cli/commands/compare/core.d.ts +29 -0
  8. package/dist/cli/commands/compare/core.d.ts.map +1 -0
  9. package/dist/cli/commands/compare/core.js +293 -0
  10. package/dist/cli/commands/compare/core.js.map +1 -0
  11. package/dist/cli/commands/compare/display.d.ts +9 -0
  12. package/dist/cli/commands/compare/display.d.ts.map +1 -0
  13. package/dist/cli/commands/compare/display.js +241 -0
  14. package/dist/cli/commands/compare/display.js.map +1 -0
  15. package/dist/cli/commands/compare/index.d.ts +26 -0
  16. package/dist/cli/commands/compare/index.d.ts.map +1 -0
  17. package/dist/cli/commands/compare/index.js +33 -0
  18. package/dist/cli/commands/compare/index.js.map +1 -0
  19. package/dist/cli/commands/compare/multiFile.d.ts +16 -0
  20. package/dist/cli/commands/compare/multiFile.d.ts.map +1 -0
  21. package/dist/cli/commands/compare/multiFile.js +113 -0
  22. package/dist/cli/commands/compare/multiFile.js.map +1 -0
  23. package/dist/cli/commands/compare/singleFile.d.ts +20 -0
  24. package/dist/cli/commands/compare/singleFile.d.ts.map +1 -0
  25. package/dist/cli/commands/compare/singleFile.js +341 -0
  26. package/dist/cli/commands/compare/singleFile.js.map +1 -0
  27. package/dist/cli/commands/{compare.d.ts → compare/types.d.ts} +19 -28
  28. package/dist/cli/commands/compare/types.d.ts.map +1 -0
  29. package/dist/cli/commands/compare/types.js +5 -0
  30. package/dist/cli/commands/compare/types.js.map +1 -0
  31. package/dist/cli/commands/compare/utils.d.ts +20 -0
  32. package/dist/cli/commands/compare/utils.d.ts.map +1 -0
  33. package/dist/cli/commands/compare/utils.js +94 -0
  34. package/dist/cli/commands/compare/utils.js.map +1 -0
  35. package/dist/cli/commands/context/fileWriter.d.ts +11 -0
  36. package/dist/cli/commands/context/fileWriter.d.ts.map +1 -1
  37. package/dist/cli/commands/context/fileWriter.js +52 -4
  38. package/dist/cli/commands/context/fileWriter.js.map +1 -1
  39. package/dist/cli/commands/context/index.d.ts +1 -3
  40. package/dist/cli/commands/context/index.d.ts.map +1 -1
  41. package/dist/cli/commands/context/index.js +1 -3
  42. package/dist/cli/commands/context/index.js.map +1 -1
  43. package/dist/cli/commands/context/{incrementalWatch.d.ts → watchMode/incrementalWatch.d.ts} +4 -4
  44. package/dist/cli/commands/context/watchMode/incrementalWatch.d.ts.map +1 -0
  45. package/dist/cli/commands/context/{incrementalWatch.js → watchMode/incrementalWatch.js} +8 -8
  46. package/dist/cli/commands/context/watchMode/incrementalWatch.js.map +1 -0
  47. package/dist/cli/commands/context/watchMode/index.d.ts +12 -0
  48. package/dist/cli/commands/context/watchMode/index.d.ts.map +1 -0
  49. package/dist/cli/commands/context/watchMode/index.js +12 -0
  50. package/dist/cli/commands/context/watchMode/index.js.map +1 -0
  51. package/dist/cli/commands/context/{watchDiff.d.ts → watchMode/watchDiff.d.ts} +2 -2
  52. package/dist/cli/commands/context/watchMode/watchDiff.d.ts.map +1 -0
  53. package/dist/cli/commands/context/{watchDiff.js → watchMode/watchDiff.js} +1 -1
  54. package/dist/cli/commands/context/watchMode/watchDiff.js.map +1 -0
  55. package/dist/cli/commands/context/{watchMode.d.ts → watchMode/watchMode.d.ts} +1 -1
  56. package/dist/cli/commands/context/watchMode/watchMode.d.ts.map +1 -0
  57. package/dist/cli/commands/context/{watchMode.js → watchMode/watchMode.js} +120 -25
  58. package/dist/cli/commands/context/watchMode/watchMode.js.map +1 -0
  59. package/dist/cli/commands/context.d.ts +2 -0
  60. package/dist/cli/commands/context.d.ts.map +1 -1
  61. package/dist/cli/commands/context.js +9 -6
  62. package/dist/cli/commands/context.js.map +1 -1
  63. package/dist/cli/handlers/compareHandler.d.ts.map +1 -1
  64. package/dist/cli/handlers/compareHandler.js +221 -3
  65. package/dist/cli/handlers/compareHandler.js.map +1 -1
  66. package/dist/cli/index.js +7 -1
  67. package/dist/cli/index.js.map +1 -1
  68. package/dist/cli/parser/argumentParser.d.ts +1 -0
  69. package/dist/cli/parser/argumentParser.d.ts.map +1 -1
  70. package/dist/cli/parser/argumentParser.js +24 -2
  71. package/dist/cli/parser/argumentParser.js.map +1 -1
  72. package/dist/cli/parser/helpText.d.ts.map +1 -1
  73. package/dist/cli/parser/helpText.js +32 -8
  74. package/dist/cli/parser/helpText.js.map +1 -1
  75. package/dist/extractors/shared/propTypeNormalizer.d.ts.map +1 -1
  76. package/dist/extractors/shared/propTypeNormalizer.js +2 -1
  77. package/dist/extractors/shared/propTypeNormalizer.js.map +1 -1
  78. package/dist/index.d.ts +2 -2
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +1 -1
  81. package/dist/index.js.map +1 -1
  82. package/dist/utils/config.d.ts +6 -0
  83. package/dist/utils/config.d.ts.map +1 -1
  84. package/dist/utils/config.js +14 -1
  85. package/dist/utils/config.js.map +1 -1
  86. package/dist/utils/git.d.ts +135 -0
  87. package/dist/utils/git.d.ts.map +1 -0
  88. package/dist/utils/git.js +429 -0
  89. package/dist/utils/git.js.map +1 -0
  90. package/dist/utils/hash.d.ts.map +1 -1
  91. package/dist/utils/hash.js +20 -4
  92. package/dist/utils/hash.js.map +1 -1
  93. package/package.json +1 -1
  94. package/dist/cli/commands/compare.d.ts.map +0 -1
  95. package/dist/cli/commands/compare.js +0 -648
  96. package/dist/cli/commands/compare.js.map +0 -1
  97. package/dist/cli/commands/context/incrementalWatch.d.ts.map +0 -1
  98. package/dist/cli/commands/context/incrementalWatch.js.map +0 -1
  99. package/dist/cli/commands/context/watchDiff.d.ts.map +0 -1
  100. package/dist/cli/commands/context/watchDiff.js.map +0 -1
  101. package/dist/cli/commands/context/watchMode.d.ts.map +0 -1
  102. package/dist/cli/commands/context/watchMode.js.map +0 -1
package/LLM_CONTEXT.md CHANGED
@@ -697,7 +697,7 @@ Strict watch mode (`--strict-watch`) detects breaking changes in real-time:
697
697
  - `contract_removed` - Entire component/module removed
698
698
 
699
699
  **Output files:**
700
- - `.logicstamp/strict_watch_violations.json` - Current violations (deleted when all resolved)
700
+ - `.logicstamp/strict_watch_violations.json` - Current violations (only exists when violations are present; automatically deleted when all resolved)
701
701
 
702
702
  **CI integration:** Exits with code 1 if errors detected during session.
703
703
 
package/README.md CHANGED
@@ -75,7 +75,7 @@ These contracts:
75
75
  - Enable early detection of architectural drift and breaking changes
76
76
 
77
77
  ![LogicStamp MCP Workflow](./assets/logicstamp-workflow.gif)
78
- *Context bundles generated and consumed across MCP-powered AI workflows.*
78
+ *Example workflow: `stamp context --strict-watch` generates context bundles that MCP-powered assistants use to explain component architecture (ThemeContext shown here).*
79
79
 
80
80
  **Same code ⇒ same context output.** Contracts are diffable, so you can detect drift and breaking changes.
81
81
 
@@ -175,13 +175,18 @@ Pre-parsed. Categorized. Stable. The AI reads contracts, not implementations.
175
175
 
176
176
  ## Watch Mode
177
177
 
178
+ <p align="center">
179
+ <img src="./assets/logicstamp-strict-watch.gif" width="820" />
180
+ </p>
181
+
182
+ *Strict watch mode in action: detecting violations and clearing them when resolved.*
183
+
178
184
  For development, run watch mode to keep context fresh as you code:
179
185
 
180
186
  ```bash
181
187
  stamp context --watch # regenerate on changes
182
- stamp context --watch --strict-watch # also detect breaking changes
188
+ stamp context --strict-watch # also detect breaking changes (implies --watch)
183
189
  ```
184
-
185
190
  Strict watch catches breaking changes that affect consumers:
186
191
 
187
192
  | Violation | Example |
@@ -191,9 +196,22 @@ Strict watch catches breaking changes that affect consumers:
191
196
  | `breaking_change_function_removed` | Deleted exported `formatDate()` |
192
197
  | `contract_removed` | Deleted entire component |
193
198
 
194
- ![Strict Watch Mode](./assets/strict_watch_mode.png)
199
+ **Errors vs Warnings:** Violations are classified by severity:
200
+
201
+ **❌ Errors** indicate breaking changes that will affect consumers (removed props, events, functions, or entire contracts).
202
+
203
+ **⚠️ Warnings** indicate less severe changes (type signature changes, removed internal state). Violations are tracked in real-time and automatically cleared when resolved.
204
+
205
+ **Session Status Tracking:** Strict watch mode displays a session status block showing cumulative statistics:
206
+ - **Errors/Warnings detected**: Total violations detected during the session
207
+ - **Resolved**: Number of times all violations were completely resolved
208
+ - **Active**: Current number of active violations
195
209
 
196
- *Strict watch mode detecting a breaking change in real time.*
210
+ The status block only appears when violations change (not on every file change), keeping terminal output clean.
211
+
212
+ ![Strict Watch Mode Terminal Output](./assets/logicstamp-strict-watch-output.png)
213
+
214
+ *Example terminal output showing violations and session status.*
197
215
 
198
216
  > ℹ️ **Note:** Strict Watch currently detects breaking changes at the source. Next step: a symbol-level import/export reverse index to trace which consumer files will break.
199
217
 
@@ -208,7 +226,14 @@ stamp context compare --approve # update (like jest -u)
208
226
 
209
227
  Useful for reviewing changes before committing or validating context is up-to-date.
210
228
 
211
- > ⚠️ **Note:** Context files are gitignored by default. For CI-based drift detection, the `--baseline git:<ref>` option (e.g., `--baseline git:main`) is **not yet implemented**. Until automation is available, use the manual workflow: generate context from current code, checkout baseline branch, generate context from baseline, then compare. See the [roadmap](https://logicstamp.dev/roadmap) for planned automation.
229
+ **Git baseline comparison** *(v0.7.2)*: Compare against any git ref:
230
+ ```bash
231
+ stamp context compare --baseline git:main # Compare against main branch
232
+ stamp context compare --baseline git:HEAD # Compare against HEAD
233
+ stamp context compare --baseline git:v1.0.0 # Compare against a tag
234
+ ```
235
+
236
+ > **ℹ️ Note:** Context files are gitignored by default. Git baseline comparison uses git worktrees to generate context for both the baseline ref and the current working tree, then performs a structural contract comparison. See [docs/cli/compare.md](docs/cli/compare.md) for complete documentation.
212
237
 
213
238
  ## How it Works
214
239
 
@@ -268,6 +293,8 @@ npm install -g logicstamp-mcp
268
293
 
269
294
  Then configure your AI assistant to use the LogicStamp MCP Server.
270
295
 
296
+ 🔗 **See [LogicStamp MCP Server Repository](https://github.com/LogicStamp/logicstamp-mcp)**
297
+
271
298
  📋 **See [MCP Getting Started Guide](https://logicstamp.dev/docs/mcp/getting-started)** for setup instructions.
272
299
 
273
300
  ## Example Output
@@ -341,7 +368,7 @@ stamp context [path] # Generate context bundles
341
368
  stamp context style [path] # Generate with style metadata (lean mode by default)
342
369
  stamp context style --style-mode full # Generate with full style details (verbose)
343
370
  stamp context --watch # Watch mode
344
- stamp context --watch --strict-watch # Watch with breaking change detection
371
+ stamp context --strict-watch # Watch with breaking change detection (--watch optional)
345
372
  stamp context compare # Detect changes vs existing context
346
373
  stamp context validate [file] # Validate context files
347
374
  stamp context clean [path] # Remove generated files
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Cleanup functions for compare command
3
+ */
4
+ /**
5
+ * Clean up orphaned files
6
+ */
7
+ export declare function cleanOrphanedFiles(orphanedFiles: string[], baseDir: string, quiet?: boolean): Promise<number>;
8
+ //# sourceMappingURL=cleanup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cleanup.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/compare/cleanup.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBnH"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Cleanup functions for compare command
3
+ */
4
+ import { unlink } from 'node:fs/promises';
5
+ import { join } from 'node:path';
6
+ /**
7
+ * Clean up orphaned files
8
+ */
9
+ export async function cleanOrphanedFiles(orphanedFiles, baseDir, quiet) {
10
+ let deletedCount = 0;
11
+ for (const file of orphanedFiles) {
12
+ const filePath = join(baseDir, file);
13
+ try {
14
+ await unlink(filePath);
15
+ if (!quiet) {
16
+ console.log(` 🗑️ Deleted: ${file}`);
17
+ }
18
+ deletedCount++;
19
+ }
20
+ catch (error) {
21
+ // Always show errors even in quiet mode
22
+ console.error(` ⚠️ Failed to delete ${file}: ${error.message}`);
23
+ }
24
+ }
25
+ return deletedCount;
26
+ }
27
+ //# sourceMappingURL=cleanup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../../src/cli/commands/compare/cleanup.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,aAAuB,EAAE,OAAe,EAAE,KAAe;IAChG,IAAI,YAAY,GAAG,CAAC,CAAC;IAErB,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;YACvB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;YAC1C,CAAC;YACD,YAAY,EAAE,CAAC;QACjB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,wCAAwC;YACxC,OAAO,CAAC,KAAK,CAAC,2BAA2B,IAAI,KAAM,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QAChF,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Core comparison logic - indexing and diffing bundles
3
+ */
4
+ import type { LogicStampBundle } from '../../../core/pack.js';
5
+ import type { LiteSig, CompareResult } from './types.js';
6
+ /**
7
+ * Normalize a component/hook/function name for comparison
8
+ * Strips relative paths and normalizes casing
9
+ */
10
+ export declare function normalizeName(name: string): string;
11
+ /**
12
+ * Normalize an array of names for comparison
13
+ */
14
+ export declare function normalizeNames(names: string[]): string[];
15
+ /**
16
+ * Index bundles into a map of entryId -> LiteSig
17
+ */
18
+ export declare function index(bundles: LogicStampBundle[], normalize?: boolean): Map<string, LiteSig>;
19
+ /**
20
+ * Compare two arrays with optional normalization
21
+ * Always sorts arrays for order-independence
22
+ */
23
+ export declare function arraysEqual(a: string[], b: string[], normalize?: boolean): boolean;
24
+ /**
25
+ * Diff two indexed bundles with detailed change information
26
+ * @param ignoreHashOnly - If true, ignore hash-only changes (useful for git baseline comparisons where hash may differ due to TypeScript project resolution differences between worktree and working directory contexts)
27
+ */
28
+ export declare function diff(oldIdx: Map<string, LiteSig>, newIdx: Map<string, LiteSig>, normalize?: boolean, ignoreHashOnly?: boolean): CompareResult;
29
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/compare/core.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEzD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAUlD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAExD;AA2CD;;GAEG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,SAAS,UAAQ,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAwD1F;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,UAAQ,GAAG,OAAO,CAUhF;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,UAAQ,EAAE,cAAc,UAAQ,GAAG,aAAa,CA8KzI"}
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Core comparison logic - indexing and diffing bundles
3
+ */
4
+ /**
5
+ * Normalize a component/hook/function name for comparison
6
+ * Strips relative paths and normalizes casing
7
+ */
8
+ export function normalizeName(name) {
9
+ // Strip relative path prefixes (./, ../, ../../, etc.)
10
+ let stripped = name;
11
+ while (stripped.startsWith('./') || stripped.startsWith('../')) {
12
+ stripped = stripped.replace(/^\.\.?\//, '');
13
+ }
14
+ // Extract just the basename (last part after /)
15
+ const basename = stripped.includes('/') ? stripped.split('/').pop() : stripped;
16
+ // Normalize to lowercase for case-insensitive comparison
17
+ return basename.toLowerCase();
18
+ }
19
+ /**
20
+ * Normalize an array of names for comparison
21
+ */
22
+ export function normalizeNames(names) {
23
+ return [...names].map(normalizeName).sort();
24
+ }
25
+ /**
26
+ * Normalize an object by sorting its keys recursively for stable comparison
27
+ * This ensures objects with the same content but different key order compare as equal
28
+ */
29
+ function normalizeObject(obj) {
30
+ if (obj === null || typeof obj !== 'object') {
31
+ return obj;
32
+ }
33
+ if (Array.isArray(obj)) {
34
+ return obj.map(item => normalizeObject(item));
35
+ }
36
+ const sorted = Object.keys(obj)
37
+ .sort()
38
+ .reduce((acc, key) => {
39
+ acc[key] = normalizeObject(obj[key]);
40
+ return acc;
41
+ }, {});
42
+ return sorted;
43
+ }
44
+ /**
45
+ * Compare two values (primitives or objects) for equality with normalized key order
46
+ */
47
+ function valuesEqual(a, b) {
48
+ if (a === b)
49
+ return true;
50
+ if (a === null || b === null)
51
+ return a === b;
52
+ if (typeof a !== typeof b)
53
+ return false;
54
+ if (typeof a !== 'object')
55
+ return a === b;
56
+ return JSON.stringify(normalizeObject(a)) === JSON.stringify(normalizeObject(b));
57
+ }
58
+ /**
59
+ * Compare two objects with normalized key order
60
+ * Ensures objects with same content but different key order compare as equal
61
+ */
62
+ function objectsEqual(a, b) {
63
+ const aNorm = normalizeObject(a);
64
+ const bNorm = normalizeObject(b);
65
+ return JSON.stringify(aNorm) === JSON.stringify(bNorm);
66
+ }
67
+ /**
68
+ * Index bundles into a map of entryId -> LiteSig
69
+ */
70
+ export function index(bundles, normalize = false) {
71
+ const m = new Map();
72
+ for (const b of bundles) {
73
+ for (const n of b.graph.nodes) {
74
+ const c = n.contract;
75
+ // Extract full props/emits objects with types for comparison
76
+ // Filter out any invalid prop/emit names (like stringified objects)
77
+ const rawProps = c.interface?.props ?? {};
78
+ const rawEmits = c.interface?.emits ?? {};
79
+ // Filter and build props object with valid keys only
80
+ const propsObj = {};
81
+ for (const key of Object.keys(rawProps)) {
82
+ if (typeof key === 'string' &&
83
+ key.length > 0 &&
84
+ !key.includes('\n') &&
85
+ !key.includes('\r') &&
86
+ !key.includes('{') &&
87
+ !key.includes('}') &&
88
+ /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key)) {
89
+ propsObj[key] = rawProps[key];
90
+ }
91
+ }
92
+ // Filter and build emits object with valid keys only
93
+ const emitsObj = {};
94
+ for (const key of Object.keys(rawEmits)) {
95
+ if (typeof key === 'string' &&
96
+ key.length > 0 &&
97
+ !key.includes('\n') &&
98
+ !key.includes('\r') &&
99
+ !key.includes('{') &&
100
+ !key.includes('}') &&
101
+ /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key)) {
102
+ emitsObj[key] = rawEmits[key];
103
+ }
104
+ }
105
+ const sig = {
106
+ semanticHash: c.semanticHash,
107
+ imports: normalize ? normalizeNames(c.composition?.imports ?? []) : (c.composition?.imports ?? []),
108
+ hooks: normalize ? normalizeNames(c.composition?.hooks ?? []) : (c.composition?.hooks ?? []),
109
+ functions: normalize ? normalizeNames(c.composition?.functions ?? []) : (c.composition?.functions ?? []),
110
+ components: normalize ? normalizeNames(c.composition?.components ?? []) : (c.composition?.components ?? []),
111
+ props: propsObj,
112
+ emits: emitsObj,
113
+ variables: normalize ? normalizeNames(c.composition?.variables ?? []) : (c.composition?.variables ?? []),
114
+ state: c.interface?.state ?? {},
115
+ exportKind: typeof c.exports === 'string' ? 'default'
116
+ : c.exports?.named?.length ? 'named' : 'none',
117
+ apiSignature: c.interface?.apiSignature,
118
+ };
119
+ m.set(c.entryId.toLowerCase(), sig);
120
+ }
121
+ }
122
+ return m;
123
+ }
124
+ /**
125
+ * Compare two arrays with optional normalization
126
+ * Always sorts arrays for order-independence
127
+ */
128
+ export function arraysEqual(a, b, normalize = false) {
129
+ if (normalize) {
130
+ const aNorm = normalizeNames(a);
131
+ const bNorm = normalizeNames(b);
132
+ return JSON.stringify(aNorm) === JSON.stringify(bNorm);
133
+ }
134
+ // Sort both arrays for order-independence
135
+ const aSorted = [...a].sort();
136
+ const bSorted = [...b].sort();
137
+ return JSON.stringify(aSorted) === JSON.stringify(bSorted);
138
+ }
139
+ /**
140
+ * Diff two indexed bundles with detailed change information
141
+ * @param ignoreHashOnly - If true, ignore hash-only changes (useful for git baseline comparisons where hash may differ due to TypeScript project resolution differences between worktree and working directory contexts)
142
+ */
143
+ export function diff(oldIdx, newIdx, normalize = false, ignoreHashOnly = false) {
144
+ const added = [];
145
+ const removed = [];
146
+ const changed = [];
147
+ // Find added components
148
+ for (const id of newIdx.keys()) {
149
+ if (!oldIdx.has(id)) {
150
+ added.push(id);
151
+ }
152
+ }
153
+ // Find removed components
154
+ for (const id of oldIdx.keys()) {
155
+ if (!newIdx.has(id)) {
156
+ removed.push(id);
157
+ }
158
+ }
159
+ // Find changed components with detailed deltas
160
+ for (const id of newIdx.keys()) {
161
+ if (oldIdx.has(id)) {
162
+ const a = oldIdx.get(id);
163
+ const b = newIdx.get(id);
164
+ const deltas = [];
165
+ // Props and emits are now Record<string, any> objects
166
+ // We need to detect: added keys, removed keys, and changed types
167
+ const oldProps = a.props ?? {};
168
+ const newProps = b.props ?? {};
169
+ const oldEmits = a.emits ?? {};
170
+ const newEmits = b.emits ?? {};
171
+ // Compare props - detect added, removed, and type changes
172
+ // Note: Type changes are only detected when ignoreHashOnly=false (non-git-baseline mode)
173
+ // because prop values can differ between worktree and working tree due to TS resolution differences
174
+ const propsAdded = [];
175
+ const propsRemoved = [];
176
+ const propsChanged = [];
177
+ for (const key of Object.keys(newProps)) {
178
+ if (!(key in oldProps)) {
179
+ propsAdded.push(key);
180
+ }
181
+ else if (!ignoreHashOnly && !valuesEqual(oldProps[key], newProps[key])) {
182
+ // Only detect type changes in non-git-baseline mode
183
+ propsChanged.push({ name: key, old: oldProps[key], new: newProps[key] });
184
+ }
185
+ }
186
+ for (const key of Object.keys(oldProps)) {
187
+ if (!(key in newProps)) {
188
+ propsRemoved.push(key);
189
+ }
190
+ }
191
+ // Compare emits - detect added, removed, and type changes
192
+ const emitsAdded = [];
193
+ const emitsRemoved = [];
194
+ const emitsChanged = [];
195
+ for (const key of Object.keys(newEmits)) {
196
+ if (!(key in oldEmits)) {
197
+ emitsAdded.push(key);
198
+ }
199
+ else if (!ignoreHashOnly && !valuesEqual(oldEmits[key], newEmits[key])) {
200
+ // Only detect type changes in non-git-baseline mode
201
+ emitsChanged.push({ name: key, old: oldEmits[key], new: newEmits[key] });
202
+ }
203
+ }
204
+ for (const key of Object.keys(oldEmits)) {
205
+ if (!(key in newEmits)) {
206
+ emitsRemoved.push(key);
207
+ }
208
+ }
209
+ // Determine if props/emits have any changes
210
+ const propsHaveChanges = propsAdded.length > 0 || propsRemoved.length > 0 || propsChanged.length > 0;
211
+ const emitsHaveChanges = emitsAdded.length > 0 || emitsRemoved.length > 0 || emitsChanged.length > 0;
212
+ const hasNonHashChanges = !arraysEqual(a.imports, b.imports, normalize) ||
213
+ !arraysEqual(a.hooks, b.hooks, normalize) ||
214
+ !arraysEqual(a.functions, b.functions, normalize) ||
215
+ !arraysEqual(a.components, b.components, normalize) ||
216
+ !arraysEqual(a.variables, b.variables, normalize) ||
217
+ propsHaveChanges ||
218
+ emitsHaveChanges ||
219
+ !objectsEqual(a.state, b.state) ||
220
+ a.exportKind !== b.exportKind ||
221
+ !objectsEqual(a.apiSignature ?? {}, b.apiSignature ?? {});
222
+ // Only include hash change if there are other changes, or if ignoreHashOnly is false
223
+ if (a.semanticHash !== b.semanticHash && (!ignoreHashOnly || hasNonHashChanges)) {
224
+ deltas.push({ type: 'hash', old: a.semanticHash, new: b.semanticHash });
225
+ }
226
+ if (!arraysEqual(a.imports, b.imports, normalize)) {
227
+ deltas.push({ type: 'imports', old: a.imports, new: b.imports });
228
+ }
229
+ if (!arraysEqual(a.hooks, b.hooks, normalize)) {
230
+ deltas.push({ type: 'hooks', old: a.hooks, new: b.hooks });
231
+ }
232
+ if (!arraysEqual(a.functions, b.functions, normalize)) {
233
+ deltas.push({ type: 'functions', old: a.functions, new: b.functions });
234
+ }
235
+ if (!arraysEqual(a.components, b.components, normalize)) {
236
+ deltas.push({ type: 'components', old: a.components, new: b.components });
237
+ }
238
+ // Add props deltas for added/removed props
239
+ if (propsAdded.length > 0 || propsRemoved.length > 0) {
240
+ deltas.push({
241
+ type: 'props',
242
+ old: propsRemoved.sort(),
243
+ new: propsAdded.sort()
244
+ });
245
+ }
246
+ // Add propsChanged delta for type changes
247
+ if (propsChanged.length > 0) {
248
+ deltas.push({
249
+ type: 'propsChanged',
250
+ old: null,
251
+ new: propsChanged.sort((x, y) => x.name.localeCompare(y.name))
252
+ });
253
+ }
254
+ // Add emits deltas for added/removed emits
255
+ if (emitsAdded.length > 0 || emitsRemoved.length > 0) {
256
+ deltas.push({
257
+ type: 'emits',
258
+ old: emitsRemoved.sort(),
259
+ new: emitsAdded.sort()
260
+ });
261
+ }
262
+ // Add emitsChanged delta for type changes
263
+ if (emitsChanged.length > 0) {
264
+ deltas.push({
265
+ type: 'emitsChanged',
266
+ old: null,
267
+ new: emitsChanged.sort((x, y) => x.name.localeCompare(y.name))
268
+ });
269
+ }
270
+ if (!arraysEqual(a.variables, b.variables, normalize)) {
271
+ deltas.push({ type: 'variables', old: a.variables, new: b.variables });
272
+ }
273
+ if (!objectsEqual(a.state, b.state)) {
274
+ deltas.push({ type: 'state', old: a.state, new: b.state });
275
+ }
276
+ if (a.exportKind !== b.exportKind) {
277
+ deltas.push({ type: 'exports', old: a.exportKind, new: b.exportKind });
278
+ }
279
+ if (!objectsEqual(a.apiSignature ?? {}, b.apiSignature ?? {})) {
280
+ deltas.push({ type: 'apiSignature', old: a.apiSignature ?? null, new: b.apiSignature ?? null });
281
+ }
282
+ if (deltas.length > 0) {
283
+ changed.push({ id, deltas });
284
+ }
285
+ }
286
+ }
287
+ // Only removals and changes qualify as drift; additions are growth, not drift
288
+ const status = removed.length === 0 && changed.length === 0
289
+ ? 'PASS'
290
+ : 'DRIFT';
291
+ return { status, added, removed, changed };
292
+ }
293
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../../src/cli/commands/compare/core.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,uDAAuD;IACvD,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/D,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC9C,CAAC;IACD,gDAAgD;IAChD,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;IAChF,yDAAyD;IACzD,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,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E,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;YACzE,CAAC;YAED,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,IAAI,EAAE,EAAE,CAAC,CAAC,YAAY,IAAI,EAAE,CAAC,EAAE,CAAC;gBAC9D,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,CAAC,CAAC,YAAY,IAAI,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC;YAClG,CAAC;YAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACtB,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;IACH,CAAC;IAED,8EAA8E;IAC9E,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QACzD,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,OAAO,CAAC;IAEZ,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Display formatting for compare command results
3
+ */
4
+ import type { MultiFileCompareResult } from './types.js';
5
+ /**
6
+ * Format and display multi-file comparison results
7
+ */
8
+ export declare function displayMultiFileCompareResult(result: MultiFileCompareResult, stats: boolean, quiet?: boolean): void;
9
+ //# sourceMappingURL=display.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/compare/display.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAIzD;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,sBAAsB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAwOnH"}