@contractspec/module.workspace 1.57.0 → 1.59.0

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 (248) hide show
  1. package/dist/ai/code-generation.d.ts +25 -0
  2. package/dist/ai/code-generation.d.ts.map +1 -0
  3. package/dist/ai/index.d.ts +5 -0
  4. package/dist/ai/index.d.ts.map +1 -0
  5. package/dist/ai/prompts/code-generation.d.ts +5 -8
  6. package/dist/ai/prompts/code-generation.d.ts.map +1 -1
  7. package/dist/ai/prompts/index.d.ts +3 -0
  8. package/dist/ai/prompts/index.d.ts.map +1 -0
  9. package/dist/ai/prompts/spec-creation.d.ts +7 -11
  10. package/dist/ai/prompts/spec-creation.d.ts.map +1 -1
  11. package/dist/ai/spec-creation.d.ts +27 -0
  12. package/dist/ai/spec-creation.d.ts.map +1 -0
  13. package/dist/analysis/deps/graph.d.ts +14 -13
  14. package/dist/analysis/deps/graph.d.ts.map +1 -1
  15. package/dist/analysis/deps/index.d.ts +6 -0
  16. package/dist/analysis/deps/index.d.ts.map +1 -0
  17. package/dist/analysis/deps/parse-imports.d.ts +1 -4
  18. package/dist/analysis/deps/parse-imports.d.ts.map +1 -1
  19. package/dist/analysis/diff/deep-diff.d.ts +17 -15
  20. package/dist/analysis/diff/deep-diff.d.ts.map +1 -1
  21. package/dist/analysis/diff/deep-diff.test.d.ts +5 -0
  22. package/dist/analysis/diff/deep-diff.test.d.ts.map +1 -0
  23. package/dist/analysis/diff/index.d.ts +6 -0
  24. package/dist/analysis/diff/index.d.ts.map +1 -0
  25. package/dist/analysis/diff/semantic.d.ts +6 -6
  26. package/dist/analysis/diff/semantic.d.ts.map +1 -1
  27. package/dist/analysis/example-scan.d.ts +3 -7
  28. package/dist/analysis/example-scan.d.ts.map +1 -1
  29. package/dist/analysis/example-scan.test.d.ts +7 -0
  30. package/dist/analysis/example-scan.test.d.ts.map +1 -0
  31. package/dist/analysis/feature-extractor.d.ts +25 -0
  32. package/dist/analysis/feature-extractor.d.ts.map +1 -0
  33. package/dist/analysis/feature-scan.d.ts +3 -7
  34. package/dist/analysis/feature-scan.d.ts.map +1 -1
  35. package/dist/analysis/feature-scan.test.d.ts +2 -0
  36. package/dist/analysis/feature-scan.test.d.ts.map +1 -0
  37. package/dist/analysis/grouping.d.ts +41 -35
  38. package/dist/analysis/grouping.d.ts.map +1 -1
  39. package/dist/analysis/impact/classifier.d.ts +9 -8
  40. package/dist/analysis/impact/classifier.d.ts.map +1 -1
  41. package/dist/analysis/impact/classifier.test.d.ts +5 -0
  42. package/dist/analysis/impact/classifier.test.d.ts.map +1 -0
  43. package/dist/analysis/impact/index.d.ts +9 -0
  44. package/dist/analysis/impact/index.d.ts.map +1 -0
  45. package/dist/analysis/impact/rules.d.ts +15 -14
  46. package/dist/analysis/impact/rules.d.ts.map +1 -1
  47. package/dist/analysis/impact/types.d.ts +73 -76
  48. package/dist/analysis/impact/types.d.ts.map +1 -1
  49. package/dist/analysis/index.d.ts +14 -0
  50. package/dist/analysis/index.d.ts.map +1 -0
  51. package/dist/analysis/snapshot/index.d.ts +9 -0
  52. package/dist/analysis/snapshot/index.d.ts.map +1 -0
  53. package/dist/analysis/snapshot/normalizer.d.ts +7 -10
  54. package/dist/analysis/snapshot/normalizer.d.ts.map +1 -1
  55. package/dist/analysis/snapshot/snapshot.d.ts +10 -8
  56. package/dist/analysis/snapshot/snapshot.d.ts.map +1 -1
  57. package/dist/analysis/snapshot/snapshot.test.d.ts +5 -0
  58. package/dist/analysis/snapshot/snapshot.test.d.ts.map +1 -0
  59. package/dist/analysis/snapshot/types.d.ts +58 -56
  60. package/dist/analysis/snapshot/types.d.ts.map +1 -1
  61. package/dist/analysis/spec-parser.d.ts +8 -6
  62. package/dist/analysis/spec-parser.d.ts.map +1 -1
  63. package/dist/analysis/spec-parsing-utils.d.ts +20 -10
  64. package/dist/analysis/spec-parsing-utils.d.ts.map +1 -1
  65. package/dist/analysis/spec-scan.d.ts +13 -12
  66. package/dist/analysis/spec-scan.d.ts.map +1 -1
  67. package/dist/analysis/spec-scan.test.d.ts +2 -0
  68. package/dist/analysis/spec-scan.test.d.ts.map +1 -0
  69. package/dist/analysis/utils/matchers.d.ts +39 -0
  70. package/dist/analysis/utils/matchers.d.ts.map +1 -0
  71. package/dist/analysis/utils/variables.d.ts +15 -0
  72. package/dist/analysis/utils/variables.d.ts.map +1 -0
  73. package/dist/analysis/validate/index.d.ts +5 -0
  74. package/dist/analysis/validate/index.d.ts.map +1 -0
  75. package/dist/analysis/validate/spec-structure.d.ts +15 -14
  76. package/dist/analysis/validate/spec-structure.d.ts.map +1 -1
  77. package/dist/analysis/validate/spec-structure.test.d.ts +2 -0
  78. package/dist/analysis/validate/spec-structure.test.d.ts.map +1 -0
  79. package/dist/formatter.d.ts +28 -27
  80. package/dist/formatter.d.ts.map +1 -1
  81. package/dist/formatters/index.d.ts +8 -0
  82. package/dist/formatters/index.d.ts.map +1 -0
  83. package/dist/formatters/spec-markdown.d.ts +13 -11
  84. package/dist/formatters/spec-markdown.d.ts.map +1 -1
  85. package/dist/formatters/spec-markdown.test.d.ts +5 -0
  86. package/dist/formatters/spec-markdown.test.d.ts.map +1 -0
  87. package/dist/formatters/spec-to-docblock.d.ts +4 -8
  88. package/dist/formatters/spec-to-docblock.d.ts.map +1 -1
  89. package/dist/index.d.ts +13 -42
  90. package/dist/index.d.ts.map +1 -0
  91. package/dist/index.js +4302 -38
  92. package/dist/node/index.js +4301 -0
  93. package/dist/templates/app-config.d.ts +2 -6
  94. package/dist/templates/app-config.d.ts.map +1 -1
  95. package/dist/templates/app-config.test.d.ts +2 -0
  96. package/dist/templates/app-config.test.d.ts.map +1 -0
  97. package/dist/templates/data-view.d.ts +2 -6
  98. package/dist/templates/data-view.d.ts.map +1 -1
  99. package/dist/templates/data-view.test.d.ts +2 -0
  100. package/dist/templates/data-view.test.d.ts.map +1 -0
  101. package/dist/templates/event.d.ts +6 -6
  102. package/dist/templates/event.d.ts.map +1 -1
  103. package/dist/templates/event.test.d.ts +2 -0
  104. package/dist/templates/event.test.d.ts.map +1 -0
  105. package/dist/templates/experiment.d.ts +2 -6
  106. package/dist/templates/experiment.d.ts.map +1 -1
  107. package/dist/templates/experiment.test.d.ts +2 -0
  108. package/dist/templates/experiment.test.d.ts.map +1 -0
  109. package/dist/templates/handler.d.ts +3 -6
  110. package/dist/templates/handler.d.ts.map +1 -1
  111. package/dist/templates/handler.test.d.ts +2 -0
  112. package/dist/templates/handler.test.d.ts.map +1 -0
  113. package/dist/templates/index.d.ts +18 -0
  114. package/dist/templates/index.d.ts.map +1 -0
  115. package/dist/templates/integration-utils.d.ts +13 -0
  116. package/dist/templates/integration-utils.d.ts.map +1 -0
  117. package/dist/templates/integration-utils.test.d.ts +2 -0
  118. package/dist/templates/integration-utils.test.d.ts.map +1 -0
  119. package/dist/templates/integration.d.ts +2 -6
  120. package/dist/templates/integration.d.ts.map +1 -1
  121. package/dist/templates/integration.test.d.ts +2 -0
  122. package/dist/templates/integration.test.d.ts.map +1 -0
  123. package/dist/templates/knowledge.d.ts +2 -6
  124. package/dist/templates/knowledge.d.ts.map +1 -1
  125. package/dist/templates/knowledge.test.d.ts +2 -0
  126. package/dist/templates/knowledge.test.d.ts.map +1 -0
  127. package/dist/templates/migration.d.ts +2 -6
  128. package/dist/templates/migration.d.ts.map +1 -1
  129. package/dist/templates/migration.test.d.ts +2 -0
  130. package/dist/templates/migration.test.d.ts.map +1 -0
  131. package/dist/templates/operation.d.ts +6 -6
  132. package/dist/templates/operation.d.ts.map +1 -1
  133. package/dist/templates/operation.test.d.ts +2 -0
  134. package/dist/templates/operation.test.d.ts.map +1 -0
  135. package/dist/templates/presentation.d.ts +6 -6
  136. package/dist/templates/presentation.d.ts.map +1 -1
  137. package/dist/templates/presentation.test.d.ts +2 -0
  138. package/dist/templates/presentation.test.d.ts.map +1 -0
  139. package/dist/templates/telemetry.d.ts +2 -6
  140. package/dist/templates/telemetry.d.ts.map +1 -1
  141. package/dist/templates/telemetry.test.d.ts +2 -0
  142. package/dist/templates/telemetry.test.d.ts.map +1 -0
  143. package/dist/templates/utils.d.ts +5 -8
  144. package/dist/templates/utils.d.ts.map +1 -1
  145. package/dist/templates/utils.test.d.ts +2 -0
  146. package/dist/templates/utils.test.d.ts.map +1 -0
  147. package/dist/templates/workflow-runner.d.ts +6 -13
  148. package/dist/templates/workflow-runner.d.ts.map +1 -1
  149. package/dist/templates/workflow-runner.test.d.ts +2 -0
  150. package/dist/templates/workflow-runner.test.d.ts.map +1 -0
  151. package/dist/templates/workflow.d.ts +6 -6
  152. package/dist/templates/workflow.d.ts.map +1 -1
  153. package/dist/templates/workflow.test.d.ts +2 -0
  154. package/dist/templates/workflow.test.d.ts.map +1 -0
  155. package/dist/types/analysis-types.d.ts +135 -136
  156. package/dist/types/analysis-types.d.ts.map +1 -1
  157. package/dist/types/generation-types.d.ts +36 -37
  158. package/dist/types/generation-types.d.ts.map +1 -1
  159. package/dist/types/index.d.ts +9 -0
  160. package/dist/types/index.d.ts.map +1 -0
  161. package/dist/types/llm-types.d.ts +97 -96
  162. package/dist/types/llm-types.d.ts.map +1 -1
  163. package/dist/types/rulesync-types.d.ts +17 -18
  164. package/dist/types/rulesync-types.d.ts.map +1 -1
  165. package/dist/types/spec-types.d.ts +329 -329
  166. package/dist/types/spec-types.d.ts.map +1 -1
  167. package/package.json +20 -16
  168. package/dist/ai/prompts/code-generation.js +0 -134
  169. package/dist/ai/prompts/code-generation.js.map +0 -1
  170. package/dist/ai/prompts/spec-creation.js +0 -102
  171. package/dist/ai/prompts/spec-creation.js.map +0 -1
  172. package/dist/analysis/deps/graph.js +0 -85
  173. package/dist/analysis/deps/graph.js.map +0 -1
  174. package/dist/analysis/deps/parse-imports.js +0 -31
  175. package/dist/analysis/deps/parse-imports.js.map +0 -1
  176. package/dist/analysis/diff/deep-diff.js +0 -114
  177. package/dist/analysis/diff/deep-diff.js.map +0 -1
  178. package/dist/analysis/diff/semantic.js +0 -97
  179. package/dist/analysis/diff/semantic.js.map +0 -1
  180. package/dist/analysis/example-scan.js +0 -116
  181. package/dist/analysis/example-scan.js.map +0 -1
  182. package/dist/analysis/feature-extractor.js +0 -203
  183. package/dist/analysis/feature-extractor.js.map +0 -1
  184. package/dist/analysis/feature-scan.js +0 -56
  185. package/dist/analysis/feature-scan.js.map +0 -1
  186. package/dist/analysis/grouping.js +0 -115
  187. package/dist/analysis/grouping.js.map +0 -1
  188. package/dist/analysis/impact/classifier.js +0 -135
  189. package/dist/analysis/impact/classifier.js.map +0 -1
  190. package/dist/analysis/impact/index.js +0 -2
  191. package/dist/analysis/impact/rules.js +0 -154
  192. package/dist/analysis/impact/rules.js.map +0 -1
  193. package/dist/analysis/index.js +0 -18
  194. package/dist/analysis/snapshot/index.js +0 -2
  195. package/dist/analysis/snapshot/normalizer.js +0 -67
  196. package/dist/analysis/snapshot/normalizer.js.map +0 -1
  197. package/dist/analysis/snapshot/snapshot.js +0 -163
  198. package/dist/analysis/snapshot/snapshot.js.map +0 -1
  199. package/dist/analysis/spec-parser.js +0 -89
  200. package/dist/analysis/spec-parser.js.map +0 -1
  201. package/dist/analysis/spec-parsing-utils.js +0 -98
  202. package/dist/analysis/spec-parsing-utils.js.map +0 -1
  203. package/dist/analysis/spec-scan.js +0 -157
  204. package/dist/analysis/spec-scan.js.map +0 -1
  205. package/dist/analysis/utils/matchers.js +0 -77
  206. package/dist/analysis/utils/matchers.js.map +0 -1
  207. package/dist/analysis/utils/variables.js +0 -45
  208. package/dist/analysis/utils/variables.js.map +0 -1
  209. package/dist/analysis/validate/index.js +0 -1
  210. package/dist/analysis/validate/spec-structure.js +0 -475
  211. package/dist/analysis/validate/spec-structure.js.map +0 -1
  212. package/dist/formatter.js +0 -163
  213. package/dist/formatter.js.map +0 -1
  214. package/dist/formatters/index.js +0 -2
  215. package/dist/formatters/spec-markdown.js +0 -263
  216. package/dist/formatters/spec-markdown.js.map +0 -1
  217. package/dist/formatters/spec-to-docblock.js +0 -48
  218. package/dist/formatters/spec-to-docblock.js.map +0 -1
  219. package/dist/templates/app-config.js +0 -107
  220. package/dist/templates/app-config.js.map +0 -1
  221. package/dist/templates/data-view.js +0 -69
  222. package/dist/templates/data-view.js.map +0 -1
  223. package/dist/templates/event.js +0 -41
  224. package/dist/templates/event.js.map +0 -1
  225. package/dist/templates/experiment.js +0 -88
  226. package/dist/templates/experiment.js.map +0 -1
  227. package/dist/templates/handler.js +0 -96
  228. package/dist/templates/handler.js.map +0 -1
  229. package/dist/templates/integration-utils.js +0 -102
  230. package/dist/templates/integration-utils.js.map +0 -1
  231. package/dist/templates/integration.js +0 -62
  232. package/dist/templates/integration.js.map +0 -1
  233. package/dist/templates/knowledge.js +0 -68
  234. package/dist/templates/knowledge.js.map +0 -1
  235. package/dist/templates/migration.js +0 -60
  236. package/dist/templates/migration.js.map +0 -1
  237. package/dist/templates/operation.js +0 -101
  238. package/dist/templates/operation.js.map +0 -1
  239. package/dist/templates/presentation.js +0 -79
  240. package/dist/templates/presentation.js.map +0 -1
  241. package/dist/templates/telemetry.js +0 -90
  242. package/dist/templates/telemetry.js.map +0 -1
  243. package/dist/templates/utils.js +0 -39
  244. package/dist/templates/utils.js.map +0 -1
  245. package/dist/templates/workflow-runner.js +0 -49
  246. package/dist/templates/workflow-runner.js.map +0 -1
  247. package/dist/templates/workflow.js +0 -68
  248. package/dist/templates/workflow.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"classifier.d.ts","names":[],"sources":["../../../src/analysis/impact/classifier.ts"],"mappings":";;;;;;;;;;;;;;iBA0BgB,cAAA,CACd,SAAA,EAAW,YAAA,IACX,SAAA,EAAW,YAAA,IACX,KAAA,EAAO,gBAAA,IACP,OAAA,GAAS,eAAA,GACR,YAAA"}
1
+ {"version":3,"file":"classifier.d.ts","sourceRoot":"","sources":["../../../src/analysis/impact/classifier.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EAGb,MAAM,SAAS,CAAC;AAEjB;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,YAAY,EAAE,EACzB,SAAS,EAAE,YAAY,EAAE,EACzB,KAAK,EAAE,gBAAgB,EAAE,EACzB,OAAO,GAAE,eAAoB,GAC5B,YAAY,CAoGd"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Impact classifier tests.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=classifier.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classifier.test.d.ts","sourceRoot":"","sources":["../../../src/analysis/impact/classifier.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Impact analysis module.
3
+ *
4
+ * Provides classification of contract changes as breaking or non-breaking.
5
+ */
6
+ export * from './types';
7
+ export { DEFAULT_RULES, BREAKING_RULES, NON_BREAKING_RULES, INFO_RULES, findMatchingRule, getRulesBySeverity, } from './rules';
8
+ export { classifyImpact } from './classifier';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/analysis/impact/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,SAAS,CAAC;AACxB,OAAO,EACL,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -1,34 +1,35 @@
1
- import { ImpactRule, ImpactSeverity } from "./types.js";
2
-
3
- //#region src/analysis/impact/rules.d.ts
1
+ /**
2
+ * Impact classification rules.
3
+ *
4
+ * Defines rules for classifying changes as breaking or non-breaking.
5
+ */
6
+ import type { ImpactRule, ImpactSeverity } from './types';
4
7
  /**
5
8
  * Default breaking change rules.
6
9
  */
7
- declare const BREAKING_RULES: ImpactRule[];
10
+ export declare const BREAKING_RULES: ImpactRule[];
8
11
  /**
9
12
  * Non-breaking change rules.
10
13
  */
11
- declare const NON_BREAKING_RULES: ImpactRule[];
14
+ export declare const NON_BREAKING_RULES: ImpactRule[];
12
15
  /**
13
16
  * Info-level change rules.
14
17
  */
15
- declare const INFO_RULES: ImpactRule[];
18
+ export declare const INFO_RULES: ImpactRule[];
16
19
  /**
17
20
  * All default rules in priority order (breaking > non_breaking > info).
18
21
  */
19
- declare const DEFAULT_RULES: ImpactRule[];
22
+ export declare const DEFAULT_RULES: ImpactRule[];
20
23
  /**
21
24
  * Get rules by severity.
22
25
  */
23
- declare function getRulesBySeverity(severity: ImpactSeverity): ImpactRule[];
26
+ export declare function getRulesBySeverity(severity: ImpactSeverity): ImpactRule[];
24
27
  /**
25
28
  * Find matching rule for a delta.
26
29
  */
27
- declare function findMatchingRule(delta: {
28
- path: string;
29
- description: string;
30
- type: string;
30
+ export declare function findMatchingRule(delta: {
31
+ path: string;
32
+ description: string;
33
+ type: string;
31
34
  }, rules?: ImpactRule[]): ImpactRule | undefined;
32
- //#endregion
33
- export { BREAKING_RULES, DEFAULT_RULES, INFO_RULES, NON_BREAKING_RULES, findMatchingRule, getRulesBySeverity };
34
35
  //# sourceMappingURL=rules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rules.d.ts","names":[],"sources":["../../../src/analysis/impact/rules.ts"],"mappings":";;;;;AA4FA;cAjFa,cAAA,EAAgB,UAAA;;;;cAiFhB,kBAAA,EAAoB,UAAA;;;;cA2CpB,UAAA,EAAY,UAAA;AA8BzB;;;AAAA,cAAa,aAAA,EAAe,UAAA;;AAS5B;;iBAAgB,kBAAA,CAAmB,QAAA,EAAU,cAAA,GAAiB,UAAA;;;;iBAO9C,gBAAA,CACd,KAAA;EAAS,IAAA;EAAc,WAAA;EAAqB,IAAA;AAAA,GAC5C,KAAA,GAAO,UAAA,KACN,UAAA"}
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../src/analysis/impact/rules.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,UAAU,EA4EtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,UAAU,EAsC1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,UAAU,EAyBlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,UAAU,EAIrC,CAAC;AAEF;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,UAAU,EAAE,CAEzE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAC1D,KAAK,GAAE,UAAU,EAAkB,GAClC,UAAU,GAAG,SAAS,CAExB"}
@@ -1,95 +1,92 @@
1
- //#region src/analysis/impact/types.d.ts
2
1
  /**
3
2
  * Impact classification types.
4
3
  *
5
4
  * Types for classifying contract changes as breaking or non-breaking.
6
5
  */
7
6
  /** Impact severity levels */
8
- type ImpactSeverity = 'breaking' | 'non_breaking' | 'info';
7
+ export type ImpactSeverity = 'breaking' | 'non_breaking' | 'info';
9
8
  /** Status of impact detection */
10
- type ImpactStatus = 'no-impact' | 'non-breaking' | 'breaking';
9
+ export type ImpactStatus = 'no-impact' | 'non-breaking' | 'breaking';
11
10
  /** A single classified change delta */
12
- interface ImpactDelta {
13
- /** Key of the affected spec */
14
- specKey: string;
15
- /** Version of the affected spec */
16
- specVersion: string;
17
- /** Type of the spec (operation, event) */
18
- specType: 'operation' | 'event';
19
- /** Path to the changed element */
20
- path: string;
21
- /** Severity classification */
22
- severity: ImpactSeverity;
23
- /** Rule that triggered this classification */
24
- rule: string;
25
- /** Human-readable description */
26
- description: string;
27
- /** Previous value (if applicable) */
28
- oldValue?: unknown;
29
- /** New value (if applicable) */
30
- newValue?: unknown;
11
+ export interface ImpactDelta {
12
+ /** Key of the affected spec */
13
+ specKey: string;
14
+ /** Version of the affected spec */
15
+ specVersion: string;
16
+ /** Type of the spec (operation, event) */
17
+ specType: 'operation' | 'event';
18
+ /** Path to the changed element */
19
+ path: string;
20
+ /** Severity classification */
21
+ severity: ImpactSeverity;
22
+ /** Rule that triggered this classification */
23
+ rule: string;
24
+ /** Human-readable description */
25
+ description: string;
26
+ /** Previous value (if applicable) */
27
+ oldValue?: unknown;
28
+ /** New value (if applicable) */
29
+ newValue?: unknown;
31
30
  }
32
31
  /** Summary counts for impact result */
33
- interface ImpactSummary {
34
- breaking: number;
35
- nonBreaking: number;
36
- info: number;
37
- added: number;
38
- removed: number;
32
+ export interface ImpactSummary {
33
+ breaking: number;
34
+ nonBreaking: number;
35
+ info: number;
36
+ added: number;
37
+ removed: number;
39
38
  }
40
39
  /** Full impact detection result */
41
- interface ImpactResult {
42
- /** Overall status */
43
- status: ImpactStatus;
44
- /** Whether any breaking changes were detected */
45
- hasBreaking: boolean;
46
- /** Whether any non-breaking changes were detected */
47
- hasNonBreaking: boolean;
48
- /** Summary counts */
49
- summary: ImpactSummary;
50
- /** All classified deltas */
51
- deltas: ImpactDelta[];
52
- /** Specs that were added */
53
- addedSpecs: {
54
- key: string;
55
- version: string;
56
- type: 'operation' | 'event';
57
- }[];
58
- /** Specs that were removed */
59
- removedSpecs: {
60
- key: string;
61
- version: string;
62
- type: 'operation' | 'event';
63
- }[];
64
- /** Base commit/ref */
65
- baseRef?: string;
66
- /** Head commit/ref */
67
- headRef?: string;
68
- /** Detection timestamp */
69
- timestamp: string;
40
+ export interface ImpactResult {
41
+ /** Overall status */
42
+ status: ImpactStatus;
43
+ /** Whether any breaking changes were detected */
44
+ hasBreaking: boolean;
45
+ /** Whether any non-breaking changes were detected */
46
+ hasNonBreaking: boolean;
47
+ /** Summary counts */
48
+ summary: ImpactSummary;
49
+ /** All classified deltas */
50
+ deltas: ImpactDelta[];
51
+ /** Specs that were added */
52
+ addedSpecs: {
53
+ key: string;
54
+ version: string;
55
+ type: 'operation' | 'event';
56
+ }[];
57
+ /** Specs that were removed */
58
+ removedSpecs: {
59
+ key: string;
60
+ version: string;
61
+ type: 'operation' | 'event';
62
+ }[];
63
+ /** Base commit/ref */
64
+ baseRef?: string;
65
+ /** Head commit/ref */
66
+ headRef?: string;
67
+ /** Detection timestamp */
68
+ timestamp: string;
70
69
  }
71
70
  /** Options for impact classification */
72
- interface ClassifyOptions {
73
- /** Custom rules to apply */
74
- customRules?: ImpactRule[];
75
- /** Treat added required fields as info instead of breaking */
76
- lenientAddedRequired?: boolean;
71
+ export interface ClassifyOptions {
72
+ /** Custom rules to apply */
73
+ customRules?: ImpactRule[];
74
+ /** Treat added required fields as info instead of breaking */
75
+ lenientAddedRequired?: boolean;
77
76
  }
78
77
  /** A classification rule */
79
- interface ImpactRule {
80
- /** Unique rule ID */
81
- id: string;
82
- /** Rule description */
83
- description: string;
84
- /** Severity when rule matches */
85
- severity: ImpactSeverity;
86
- /** Matcher function */
87
- matches: (delta: {
88
- path: string;
78
+ export interface ImpactRule {
79
+ /** Unique rule ID */
80
+ id: string;
81
+ /** Rule description */
89
82
  description: string;
90
- type: string;
91
- }) => boolean;
83
+ /** Severity when rule matches */
84
+ severity: ImpactSeverity;
85
+ /** Matcher function */
86
+ matches: (delta: {
87
+ path: string;
88
+ description: string;
89
+ type: string;
90
+ }) => boolean;
92
91
  }
93
- //#endregion
94
- export { ClassifyOptions, ImpactDelta, ImpactResult, ImpactRule, ImpactSeverity, ImpactStatus, ImpactSummary };
95
92
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/analys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,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wCAAwC;AACxC,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,8DAA8D;IAC9D,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,4BAA4B;AAC5B,MAAM,WAAW,UAAU;IACzB,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,QAAQ,EAAE,cAAc,CAAC;IACzB,uBAAuB;IACvB,OAAO,EAAE,CAAC,KAAK,EAAE;QACf,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;KACd,KAAK,OAAO,CAAC;CACf"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Static analysis utilities for ContractSpec.
3
+ */
4
+ export * from './spec-scan';
5
+ export * from './feature-scan';
6
+ export * from './example-scan';
7
+ export * from './grouping';
8
+ export * from './diff/index';
9
+ export * from './deps/index';
10
+ export * from './validate/index';
11
+ export * from './snapshot/index';
12
+ export * from './impact/index';
13
+ export * from './spec-parser';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Contract snapshot module.
3
+ *
4
+ * Provides deterministic snapshot generation for contract comparison.
5
+ */
6
+ export * from './types';
7
+ export { normalizeValue, toCanonicalJson, computeHash, sortSpecs, sortFields, } from './normalizer';
8
+ export { generateSnapshot } from './snapshot';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/analysis/snapshot/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,SAAS,CAAC;AACxB,OAAO,EACL,cAAc,EACd,eAAe,EACf,WAAW,EACX,SAAS,EACT,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
@@ -1,4 +1,3 @@
1
- //#region src/analysis/snapshot/normalizer.d.ts
2
1
  /**
3
2
  * JSON normalization utilities for deterministic snapshots.
4
3
  *
@@ -11,26 +10,24 @@
11
10
  * - Removes undefined values
12
11
  * - Preserves null values
13
12
  */
14
- declare function normalizeValue(value: unknown): unknown;
13
+ export declare function normalizeValue(value: unknown): unknown;
15
14
  /**
16
15
  * Serialize a value to deterministic JSON string.
17
16
  */
18
- declare function toCanonicalJson(value: unknown): string;
17
+ export declare function toCanonicalJson(value: unknown): string;
19
18
  /**
20
19
  * Compute a SHA-256 hash of canonical JSON representation.
21
20
  */
22
- declare function computeHash(value: unknown): string;
21
+ export declare function computeHash(value: unknown): string;
23
22
  /**
24
23
  * Sort specs by key and version for deterministic ordering.
25
24
  */
26
- declare function sortSpecs<T extends {
27
- key: string;
28
- version: string;
25
+ export declare function sortSpecs<T extends {
26
+ key: string;
27
+ version: string;
29
28
  }>(specs: T[]): T[];
30
29
  /**
31
30
  * Sort field snapshots by name for deterministic ordering.
32
31
  */
33
- declare function sortFields(fields: Record<string, unknown>): Record<string, unknown>;
34
- //#endregion
35
- export { computeHash, normalizeValue, sortFields, sortSpecs, toCanonicalJson };
32
+ export declare function sortFields(fields: Record<string, unknown>): Record<string, unknown>;
36
33
  //# sourceMappingURL=normalizer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"normalizer.d.ts","names":[],"sources":["../../../src/analysis/snapshot/normalizer.ts"],"mappings":";;AAgBA;;;;;AA+BA;;;;;AAOA;AAPA,iBA/BgB,cAAA,CAAe,KAAA;;;;iBA+Bf,eAAA,CAAgB,KAAA;;;;iBAOhB,WAAA,CAAY,KAAA;;;;iBAQZ,SAAA;EAAsB,GAAA;EAAa,OAAA;AAAA,EAAA,CACjD,KAAA,EAAO,CAAA,KACN,CAAA;AAWH;;;AAAA,iBAAgB,UAAA,CACd,MAAA,EAAQ,MAAA,oBACP,MAAA"}
1
+ {"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../../src/analysis/snapshot/normalizer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CA0BtD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEtD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGlD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAClE,KAAK,EAAE,CAAC,EAAE,GACT,CAAC,EAAE,CAML;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOzB"}
@@ -1,6 +1,10 @@
1
- import { ContractSnapshot, SnapshotOptions } from "./types.js";
2
-
3
- //#region src/analysis/snapshot/snapshot.d.ts
1
+ /**
2
+ * Contract snapshot generation.
3
+ *
4
+ * Generates canonical, deterministic snapshots from spec source files
5
+ * for comparison and impact detection.
6
+ */
7
+ import type { ContractSnapshot, SnapshotOptions } from './types';
4
8
  /**
5
9
  * Generate a contract snapshot from spec source files.
6
10
  *
@@ -8,10 +12,8 @@ import { ContractSnapshot, SnapshotOptions } from "./types.js";
8
12
  * @param options - Snapshot generation options
9
13
  * @returns Canonical contract snapshot
10
14
  */
11
- declare function generateSnapshot(specs: {
12
- path: string;
13
- content: string;
15
+ export declare function generateSnapshot(specs: {
16
+ path: string;
17
+ content: string;
14
18
  }[], options?: SnapshotOptions): ContractSnapshot;
15
- //#endregion
16
- export { generateSnapshot };
17
19
  //# sourceMappingURL=snapshot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.d.ts","names":[],"sources":["../../../src/analysis/snapshot/snapshot.ts"],"mappings":";;;;;;;;;;iBA2BgB,gBAAA,CACd,KAAA;EAAS,IAAA;EAAc,OAAA;AAAA,KACvB,OAAA,GAAS,eAAA,GACR,gBAAA"}
1
+ {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../src/analysis/snapshot/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EACV,gBAAgB,EAMhB,eAAe,EAEhB,MAAM,SAAS,CAAC;AAEjB;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,EAC1C,OAAO,GAAE,eAAoB,GAC5B,gBAAgB,CA4ClB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Snapshot module tests.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=snapshot.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.test.d.ts","sourceRoot":"","sources":["../../../src/analysis/snapshot/snapshot.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -1,73 +1,75 @@
1
- import { EventRef } from "@contractspec/lib.contracts";
2
-
3
- //#region src/analysis/snapshot/types.d.ts
1
+ /**
2
+ * Canonical contract snapshot types.
3
+ *
4
+ * These types define the normalized, deterministic representation
5
+ * of contracts for comparison and impact detection.
6
+ */
7
+ import type { EventRef } from '@contractspec/lib.contracts';
4
8
  /** Field type in a schema */
5
- type FieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'enum' | 'union' | 'literal' | 'date' | 'unknown';
9
+ export type FieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'enum' | 'union' | 'literal' | 'date' | 'unknown';
6
10
  /** Schema field definition */
7
- interface FieldSnapshot {
8
- name: string;
9
- type: FieldType;
10
- required: boolean;
11
- nullable: boolean;
12
- description?: string;
13
- enumValues?: string[];
14
- literalValue?: unknown;
15
- items?: FieldSnapshot;
16
- properties?: Record<string, FieldSnapshot>;
17
- unionTypes?: FieldSnapshot[];
11
+ export interface FieldSnapshot {
12
+ name: string;
13
+ type: FieldType;
14
+ required: boolean;
15
+ nullable: boolean;
16
+ description?: string;
17
+ enumValues?: string[];
18
+ literalValue?: unknown;
19
+ items?: FieldSnapshot;
20
+ properties?: Record<string, FieldSnapshot>;
21
+ unionTypes?: FieldSnapshot[];
18
22
  }
19
23
  /** IO schema snapshot */
20
- interface IoSnapshot {
21
- input: Record<string, FieldSnapshot>;
22
- output: Record<string, FieldSnapshot>;
24
+ export interface IoSnapshot {
25
+ input: Record<string, FieldSnapshot>;
26
+ output: Record<string, FieldSnapshot>;
23
27
  }
24
28
  /** HTTP binding snapshot */
25
- interface HttpBindingSnapshot {
26
- method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
27
- path: string;
29
+ export interface HttpBindingSnapshot {
30
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
31
+ path: string;
28
32
  }
29
33
  /** Operation snapshot */
30
- interface OperationSnapshot {
31
- type: 'operation';
32
- key: string;
33
- version: string;
34
- kind: 'command' | 'query';
35
- stability: string;
36
- http?: HttpBindingSnapshot;
37
- io: IoSnapshot;
38
- authLevel?: string;
39
- emittedEvents?: EventRef[];
34
+ export interface OperationSnapshot {
35
+ type: 'operation';
36
+ key: string;
37
+ version: string;
38
+ kind: 'command' | 'query';
39
+ stability: string;
40
+ http?: HttpBindingSnapshot;
41
+ io: IoSnapshot;
42
+ authLevel?: string;
43
+ emittedEvents?: EventRef[];
40
44
  }
41
45
  /** Event payload snapshot */
42
- interface EventSnapshot {
43
- type: 'event';
44
- key: string;
45
- version: string;
46
- stability: string;
47
- payload: Record<string, FieldSnapshot>;
46
+ export interface EventSnapshot {
47
+ type: 'event';
48
+ key: string;
49
+ version: string;
50
+ stability: string;
51
+ payload: Record<string, FieldSnapshot>;
48
52
  }
49
53
  /** Spec snapshot union type */
50
- type SpecSnapshot = OperationSnapshot | EventSnapshot;
54
+ export type SpecSnapshot = OperationSnapshot | EventSnapshot;
51
55
  /** Full contract snapshot for a workspace */
52
- interface ContractSnapshot {
53
- /** Schema version for forward compatibility */
54
- version: '1.0.0';
55
- /** Generation timestamp (ISO 8601) */
56
- generatedAt: string;
57
- /** Git commit SHA if available */
58
- commitSha?: string;
59
- /** All specs in the workspace */
60
- specs: SpecSnapshot[];
61
- /** Content hash for quick comparison */
62
- hash: string;
56
+ export interface ContractSnapshot {
57
+ /** Schema version for forward compatibility */
58
+ version: '1.0.0';
59
+ /** Generation timestamp (ISO 8601) */
60
+ generatedAt: string;
61
+ /** Git commit SHA if available */
62
+ commitSha?: string;
63
+ /** All specs in the workspace */
64
+ specs: SpecSnapshot[];
65
+ /** Content hash for quick comparison */
66
+ hash: string;
63
67
  }
64
68
  /** Options for snapshot generation */
65
- interface SnapshotOptions {
66
- /** Glob pattern for spec discovery */
67
- pattern?: string;
68
- /** Include only specific spec types */
69
- types?: ('operation' | 'event')[];
69
+ export interface SnapshotOptions {
70
+ /** Glob pattern for spec discovery */
71
+ pattern?: string;
72
+ /** Include only specific spec types */
73
+ types?: ('operation' | 'event')[];
70
74
  }
71
- //#endregion
72
- export { ContractSnapshot, EventSnapshot, FieldSnapshot, FieldType, HttpBindingSnapshot, IoSnapshot, OperationSnapshot, SnapshotOptions, SpecSnapshot };
73
75
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/analysis/snapshot/types.ts"],"mappings":";;;;KAUY,SAAA;;UAaK,aAAA;EACf,IAAA;EACA,IAAA,EAAM,SAAA;EACN,QAAA;EACA,QAAA;EACA,WAAA;EACA,UAAA;EACA,YAAA;EACA,KAAA,GAAQ,aAAA;EACR,UAAA,GAAa,MAAA,SAAe,aAAA;EAC5B,UAAA,GAAa,aAAA;AAAA;;UAIE,UAAA;EACf,KAAA,EAAO,MAAA,SAAe,aAAA;EACtB,MAAA,EAAQ,MAAA,SAAe,aAAA;AAAA;;UAIR,mBAAA;EACf,MAAA;EACA,IAAA;AAAA;;UAIe,iBAAA;EACf,IAAA;EACA,GAAA;EACA,OAAA;EACA,IAAA;EACA,SAAA;EACA,IAAA,GAAO,mBAAA;EACP,EAAA,EAAI,UAAA;EACJ,SAAA;EACA,aAAA,GAAgB,QAAA;AAAA;;UAID,aAAA;EACf,IAAA;EACA,GAAA;EACA,OAAA;EACA,SAAA;EACA,OAAA,EAAS,MAAA,SAAe,aAAA;AAAA;AAxB1B;AAAA,KA4BY,YAAA,GAAe,iBAAA,GAAoB,aAAA;;UAG9B,gBAAA;EA7BX;EA+BJ,OAAA;EA3BgC;EA6BhC,WAAA;EAvBO;EAyBP,SAAA;EAtBgB;EAwBhB,KAAA,EAAO,YAAA;EAxBiB;EA0BxB,IAAA;AAAA;;UAIe,eAAA;EAlCf;EAoCA,OAAA;EAnCO;EAqCP,KAAA;AAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/analysis/snapshot/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE5D,6BAA6B;AAC7B,MAAM,MAAM,S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AED,6BAA6B;AAC7B,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CACxC;AAED,+BAA+B;AAC/B,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,aAAa,CAAC;AAE7D,6CAA6C;AAC7C,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,sCAAsC;AACtC,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,KAAK,CAAC,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,EAAE,CAAC;CACnC"}
@@ -1,10 +1,12 @@
1
- import { ParsedSpec } from "../types/llm-types.js";
2
-
3
- //#region src/analysis/spec-parser.d.ts
1
+ /**
2
+ * Spec Parser
3
+ *
4
+ * Coordinates scanning of source files and mapping to ParsedSpec format
5
+ * for LLM consumption.
6
+ */
7
+ import type { ParsedSpec } from '../types/llm-types';
4
8
  /**
5
9
  * Load and parse specs from a source file.
6
10
  */
7
- declare function loadSpecFromSource(filePath: string): Promise<ParsedSpec[]>;
8
- //#endregion
9
- export { loadSpecFromSource };
11
+ export declare function loadSpecFromSource(filePath: string): Promise<ParsedSpec[]>;
10
12
  //# sourceMappingURL=spec-parser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec-parser.d.ts","names":[],"sources":["../../src/analysis/spec-parser.ts"],"mappings":";;;;;;iBAoBsB,kBAAA,CACpB,QAAA,WACC,OAAA,CAAQ,UAAA"}
1
+ {"version":3,"file":"spec-parser.d.ts","sourceRoot":"","sources":["../../src/analysis/spec-parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,oBAAoB,CAAC;AAO9E;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,EAAE,CAAC,CAgBvB"}
@@ -1,13 +1,25 @@
1
- //#region src/analysis/spec-parsing-utils.d.ts
1
+ export declare function parsePolicy(code: string): {
2
+ key: string;
3
+ version: string;
4
+ }[];
5
+ export declare function extractRefList(code: string, field: string): {
6
+ key: string;
7
+ version: string;
8
+ }[] | undefined;
9
+ export declare function extractTestRefs(code: string): {
10
+ key: string;
11
+ version: string;
12
+ type: 'success' | 'error';
13
+ }[] | undefined;
2
14
  /**
3
15
  * Extract test target from a TestSpec source.
4
16
  * Parses the `target: { type: 'operation', key, version }` field OR
5
17
  * the nested format `target: { type: 'operation', operation: { key, version } }`.
6
18
  */
7
- declare function extractTestTarget(code: string): {
8
- type: 'operation' | 'workflow';
9
- key: string;
10
- version: string | undefined;
19
+ export declare function extractTestTarget(code: string): {
20
+ type: 'operation' | 'workflow';
21
+ key: string;
22
+ version: string | undefined;
11
23
  } | undefined;
12
24
  /**
13
25
  * Extract test coverage info from a TestSpec source.
@@ -16,10 +28,8 @@ declare function extractTestTarget(code: string): {
16
28
  * - New: `expectOutput: {}` and `expectError: {}`
17
29
  * - Old: `{ type: 'expectOutput', ... }` and `{ type: 'expectError', ... }`
18
30
  */
19
- declare function extractTestCoverage(code: string): {
20
- hasSuccess: boolean;
21
- hasError: boolean;
31
+ export declare function extractTestCoverage(code: string): {
32
+ hasSuccess: boolean;
33
+ hasError: boolean;
22
34
  };
23
- //#endregion
24
- export { extractTestCoverage, extractTestTarget };
25
35
  //# sourceMappingURL=spec-parsing-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec-parsing-utils.d.ts","names":[],"sources":["../../src/analysis/spec-parsing-utils.ts"],"mappings":";;;;;;iBA0EgB,iBAAA,CACd,IAAA;EAEI,IAAA;EAAgC,GAAA;EAAa,OAAA;AAAA;;;;;;;;iBA8DnC,mBAAA,CAAoB,IAAA;EAClC,UAAA;EACA,QAAA;AAAA"}
1
+ {"version":3,"file":"spec-parsing-utils.d.ts","sourceRoot":"","sources":["../../src/analysis/spec-parsing-utils.ts"],"names":[],"mappings":"AAOA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CAK5E;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,SAAS,CAoBhD;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,GACX;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAA;CAAE,EAAE,GAAG,SAAS,CA0B3E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,GAEV;IAAE,IAAI,EAAE,WAAW,GAAG,UAAU,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC5E,SAAS,CAoDZ;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAaA"}