@skmtc/core 0.16.3 → 0.26.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 (516) hide show
  1. package/README.md +0 -1
  2. package/esm/anchors/buildSidecar.js +1 -1
  3. package/esm/anchors/postPass.d.ts +1 -1
  4. package/esm/anchors/postPass.js +1 -1
  5. package/esm/anchors/sidecar.d.ts +2 -2
  6. package/esm/anchors/sidecar.js +1 -1
  7. package/esm/context/CoreContext.d.ts +7 -1
  8. package/esm/context/CoreContext.d.ts.map +1 -1
  9. package/esm/context/CoreContext.js +17 -11
  10. package/esm/context/GenerateContext.d.ts +28 -7
  11. package/esm/context/GenerateContext.d.ts.map +1 -1
  12. package/esm/context/GenerateContext.js +164 -86
  13. package/esm/context/ParseContext.d.ts +16 -0
  14. package/esm/context/ParseContext.d.ts.map +1 -1
  15. package/esm/context/ParseContext.js +16 -0
  16. package/esm/context/ParseIssue.d.ts +1 -1
  17. package/esm/context/RenderContext.d.ts +2 -6
  18. package/esm/context/RenderContext.d.ts.map +1 -1
  19. package/esm/context/RenderContext.js +4 -14
  20. package/esm/context/generateTypes.d.ts +35 -8
  21. package/esm/context/generateTypes.d.ts.map +1 -1
  22. package/{script/deps/jsr.io/@std/fs/1.0.23 → esm/deps/jsr.io/@std/fs/1.0.24}/exists.d.ts.map +1 -1
  23. package/esm/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
  24. package/esm/deps/jsr.io/@std/internal/1.0.14/_os.js +14 -0
  25. package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
  26. package/esm/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
  27. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts.map +1 -1
  28. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.js +1 -1
  29. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts.map +1 -1
  30. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.js +1 -1
  31. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts.map +1 -1
  32. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.js +1 -1
  33. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts.map +1 -1
  34. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.js +1 -1
  35. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts.map +1 -1
  36. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.js +1 -1
  37. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts.map +1 -1
  38. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.js +2 -2
  39. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts.map +1 -1
  40. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.js +2 -2
  41. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts.map +1 -1
  42. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.js +1 -1
  43. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts.map +1 -1
  44. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.js +1 -1
  45. package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/posix/join.d.ts.map +1 -1
  46. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.js +1 -1
  47. package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/posix/normalize.d.ts.map +1 -1
  48. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.js +1 -1
  49. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts.map +1 -1
  50. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.js +1 -1
  51. package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/from_file_url.d.ts.map +1 -1
  52. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.js +1 -1
  53. package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/join.d.ts.map +1 -1
  54. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.js +1 -1
  55. package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/normalize.d.ts.map +1 -1
  56. package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.js +1 -1
  57. package/esm/dsl/CodeFileBase.d.ts +57 -24
  58. package/esm/dsl/CodeFileBase.d.ts.map +1 -1
  59. package/esm/dsl/CodeFileBase.js +35 -53
  60. package/esm/dsl/FileBase.d.ts +21 -25
  61. package/esm/dsl/FileBase.d.ts.map +1 -1
  62. package/esm/dsl/FileBase.js +20 -29
  63. package/esm/dsl/GeneratorKeys.d.ts +19 -19
  64. package/esm/dsl/GeneratorKeys.d.ts.map +1 -1
  65. package/esm/dsl/GeneratorKeys.js +6 -5
  66. package/esm/dsl/IdentifierBase.d.ts +19 -5
  67. package/esm/dsl/IdentifierBase.d.ts.map +1 -1
  68. package/esm/dsl/IdentifierBase.js +21 -5
  69. package/esm/dsl/IdentifierType.d.ts +8 -14
  70. package/esm/dsl/IdentifierType.d.ts.map +1 -1
  71. package/esm/dsl/Lang.d.ts +18 -38
  72. package/esm/dsl/Lang.d.ts.map +1 -1
  73. package/esm/dsl/MarkdownFile.d.ts +55 -0
  74. package/esm/dsl/MarkdownFile.d.ts.map +1 -0
  75. package/esm/dsl/MarkdownFile.js +58 -0
  76. package/esm/dsl/model/ModelDriver.d.ts +3 -1
  77. package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
  78. package/esm/dsl/model/ModelDriver.js +29 -2
  79. package/esm/dsl/model/toModelEntry.d.ts +24 -14
  80. package/esm/dsl/model/toModelEntry.d.ts.map +1 -1
  81. package/esm/dsl/model/toModelEntry.js +7 -3
  82. package/esm/dsl/model/toModelProjectionBase.d.ts +31 -18
  83. package/esm/dsl/model/toModelProjectionBase.d.ts.map +1 -1
  84. package/esm/dsl/model/toModelProjectionBase.js +3 -3
  85. package/esm/dsl/model/types.d.ts +23 -27
  86. package/esm/dsl/model/types.d.ts.map +1 -1
  87. package/esm/dsl/operation/gql/GqlOperationDriver.d.ts +3 -1
  88. package/esm/dsl/operation/gql/GqlOperationDriver.d.ts.map +1 -1
  89. package/esm/dsl/operation/gql/GqlOperationDriver.js +12 -9
  90. package/esm/dsl/operation/gql/toGqlOperationEntry.d.ts +20 -15
  91. package/esm/dsl/operation/gql/toGqlOperationEntry.d.ts.map +1 -1
  92. package/esm/dsl/operation/gql/toGqlOperationEntry.js +3 -25
  93. package/esm/dsl/operation/gql/toGqlOperationProjectionBase.d.ts +11 -10
  94. package/esm/dsl/operation/gql/toGqlOperationProjectionBase.d.ts.map +1 -1
  95. package/esm/dsl/operation/gql/types.d.ts +1 -28
  96. package/esm/dsl/operation/gql/types.d.ts.map +1 -1
  97. package/esm/dsl/operation/oas/OasOperationDriver.d.ts +3 -1
  98. package/esm/dsl/operation/oas/OasOperationDriver.d.ts.map +1 -1
  99. package/esm/dsl/operation/oas/OasOperationDriver.js +12 -9
  100. package/esm/dsl/operation/oas/toOasOperationEntry.d.ts +21 -17
  101. package/esm/dsl/operation/oas/toOasOperationEntry.d.ts.map +1 -1
  102. package/esm/dsl/operation/oas/toOasOperationEntry.js +3 -32
  103. package/esm/dsl/operation/oas/toOasOperationProjectionBase.d.ts +11 -10
  104. package/esm/dsl/operation/oas/toOasOperationProjectionBase.d.ts.map +1 -1
  105. package/esm/dsl/operation/oas/types.d.ts +1 -38
  106. package/esm/dsl/operation/oas/types.d.ts.map +1 -1
  107. package/esm/dsl/webhook/WebhookDriver.d.ts +3 -1
  108. package/esm/dsl/webhook/WebhookDriver.d.ts.map +1 -1
  109. package/esm/dsl/webhook/WebhookDriver.js +12 -9
  110. package/esm/dsl/webhook/toWebhookEntry.d.ts +21 -16
  111. package/esm/dsl/webhook/toWebhookEntry.d.ts.map +1 -1
  112. package/esm/dsl/webhook/toWebhookEntry.js +3 -32
  113. package/esm/dsl/webhook/toWebhookProjectionBase.d.ts +11 -10
  114. package/esm/dsl/webhook/toWebhookProjectionBase.d.ts.map +1 -1
  115. package/esm/dsl/webhook/types.d.ts +1 -36
  116. package/esm/dsl/webhook/types.d.ts.map +1 -1
  117. package/esm/enrichments/toEnrichmentDescriptor.d.ts +72 -27
  118. package/esm/enrichments/toEnrichmentDescriptor.d.ts.map +1 -1
  119. package/esm/enrichments/toEnrichmentDescriptor.js +57 -31
  120. package/esm/enrichments/validateConfig.d.ts +60 -0
  121. package/esm/enrichments/validateConfig.d.ts.map +1 -0
  122. package/esm/enrichments/validateConfig.js +176 -0
  123. package/esm/helpers/isImported.js +1 -1
  124. package/esm/helpers/toResolvedArtifactPath.js +1 -1
  125. package/esm/mod.d.ts +8 -1
  126. package/esm/mod.d.ts.map +1 -1
  127. package/esm/mod.js +8 -1
  128. package/esm/oas/array/Array.d.ts +2 -0
  129. package/esm/oas/array/Array.d.ts.map +1 -1
  130. package/esm/oas/array/Array.js +4 -0
  131. package/esm/oas/boolean/Boolean.d.ts +3 -1
  132. package/esm/oas/boolean/Boolean.d.ts.map +1 -1
  133. package/esm/oas/boolean/Boolean.js +4 -0
  134. package/esm/oas/components/Components.d.ts +5 -0
  135. package/esm/oas/components/Components.d.ts.map +1 -1
  136. package/esm/oas/components/Components.js +6 -1
  137. package/esm/oas/integer/Integer.d.ts +3 -1
  138. package/esm/oas/integer/Integer.d.ts.map +1 -1
  139. package/esm/oas/integer/Integer.js +4 -0
  140. package/esm/oas/link/Link.d.ts +68 -0
  141. package/esm/oas/link/Link.d.ts.map +1 -0
  142. package/esm/oas/link/Link.js +107 -0
  143. package/esm/oas/number/Number.d.ts +3 -1
  144. package/esm/oas/number/Number.d.ts.map +1 -1
  145. package/esm/oas/number/Number.js +4 -0
  146. package/esm/oas/object/Object.d.ts +9 -0
  147. package/esm/oas/object/Object.d.ts.map +1 -1
  148. package/esm/oas/object/Object.js +14 -0
  149. package/esm/oas/operation/Operation.d.ts +15 -0
  150. package/esm/oas/operation/Operation.d.ts.map +1 -1
  151. package/esm/oas/operation/Operation.js +33 -0
  152. package/esm/oas/ref/Ref.d.ts +23 -1
  153. package/esm/oas/ref/Ref.d.ts.map +1 -1
  154. package/esm/oas/ref/Ref.js +32 -0
  155. package/esm/oas/ref/ref-types.d.ts +18 -1
  156. package/esm/oas/ref/ref-types.d.ts.map +1 -1
  157. package/esm/oas/ref/ref-types.js +12 -1
  158. package/esm/oas/response/Response.d.ts +4 -0
  159. package/esm/oas/response/Response.d.ts.map +1 -1
  160. package/esm/oas/response/Response.js +7 -0
  161. package/esm/oas/schemaPath/traverseSchema.d.ts +31 -0
  162. package/esm/oas/schemaPath/traverseSchema.d.ts.map +1 -0
  163. package/esm/oas/schemaPath/traverseSchema.js +113 -0
  164. package/esm/oas/string/String.d.ts +3 -1
  165. package/esm/oas/string/String.d.ts.map +1 -1
  166. package/esm/oas/string/String.js +4 -0
  167. package/esm/oas/union/Union.d.ts +9 -0
  168. package/esm/oas/union/Union.d.ts.map +1 -1
  169. package/esm/oas/union/Union.js +14 -0
  170. package/esm/oas/unknown/Unknown.d.ts +3 -1
  171. package/esm/oas/unknown/Unknown.d.ts.map +1 -1
  172. package/esm/oas/unknown/Unknown.js +4 -0
  173. package/esm/parse/v3-0/_merge-all-of/decompose-union.d.ts.map +1 -1
  174. package/esm/parse/v3-0/_merge-all-of/decompose-union.js +8 -12
  175. package/esm/parse/v3-0/_merge-all-of/merge-union.d.ts.map +1 -1
  176. package/esm/parse/v3-0/_merge-all-of/merge-union.js +0 -8
  177. package/esm/parse/v3-0/components/toComponentsV3.d.ts.map +1 -1
  178. package/esm/parse/v3-0/components/toComponentsV3.js +3 -1
  179. package/esm/parse/v3-0/link/toLinksV3.d.ts +17 -0
  180. package/esm/parse/v3-0/link/toLinksV3.d.ts.map +1 -0
  181. package/esm/parse/v3-0/link/toLinksV3.js +40 -0
  182. package/esm/parse/v3-0/object/toObject.d.ts.map +1 -1
  183. package/esm/parse/v3-0/object/toObject.js +3 -1
  184. package/esm/parse/v3-0/response/toResponseV3.d.ts.map +1 -1
  185. package/esm/parse/v3-0/response/toResponseV3.js +4 -1
  186. package/esm/parse/v3-0/schema/toSchemasV3.d.ts.map +1 -1
  187. package/esm/parse/v3-0/schema/toSchemasV3.js +8 -0
  188. package/esm/parse/v3-0/union/toUnion.d.ts.map +1 -1
  189. package/esm/parse/v3-0/union/toUnion.js +3 -1
  190. package/esm/parse/v3-1/_merge-all-of/decompose-union.d.ts.map +1 -1
  191. package/esm/parse/v3-1/_merge-all-of/decompose-union.js +8 -12
  192. package/esm/parse/v3-1/_merge-all-of/merge-union.d.ts.map +1 -1
  193. package/esm/parse/v3-1/_merge-all-of/merge-union.js +0 -8
  194. package/esm/parse/v3-1/components/toComponentsV3.d.ts.map +1 -1
  195. package/esm/parse/v3-1/components/toComponentsV3.js +3 -1
  196. package/esm/parse/v3-1/link/toLinksV3.d.ts +17 -0
  197. package/esm/parse/v3-1/link/toLinksV3.d.ts.map +1 -0
  198. package/esm/parse/v3-1/link/toLinksV3.js +40 -0
  199. package/esm/parse/v3-1/object/toObject.d.ts.map +1 -1
  200. package/esm/parse/v3-1/object/toObject.js +3 -1
  201. package/esm/parse/v3-1/response/toResponseV3.d.ts.map +1 -1
  202. package/esm/parse/v3-1/response/toResponseV3.js +4 -1
  203. package/esm/parse/v3-1/schema/toSchemasV3.d.ts.map +1 -1
  204. package/esm/parse/v3-1/schema/toSchemasV3.js +8 -0
  205. package/esm/parse/v3-1/union/toUnion.d.ts.map +1 -1
  206. package/esm/parse/v3-1/union/toUnion.js +3 -1
  207. package/esm/run/toArtifacts.d.ts +8 -1
  208. package/esm/run/toArtifacts.d.ts.map +1 -1
  209. package/esm/run/toArtifacts.js +5 -5
  210. package/esm/run/toInspection.d.ts +8 -0
  211. package/esm/run/toInspection.d.ts.map +1 -0
  212. package/esm/run/toInspection.js +78 -0
  213. package/esm/types/Enrichments.d.ts +19 -8
  214. package/esm/types/Enrichments.d.ts.map +1 -1
  215. package/esm/types/Enrichments.js +4 -3
  216. package/esm/types/GeneratorType.d.ts +5 -5
  217. package/esm/types/GeneratorType.d.ts.map +1 -1
  218. package/esm/types/Manifest.d.ts +1 -2
  219. package/esm/types/Manifest.d.ts.map +1 -1
  220. package/esm/types/Manifest.js +1 -2
  221. package/esm/types/ModuleSelect.d.ts +81 -0
  222. package/esm/types/ModuleSelect.d.ts.map +1 -0
  223. package/esm/types/ModuleSelect.js +63 -0
  224. package/esm/types/Preview.d.ts +4 -27
  225. package/esm/types/Preview.d.ts.map +1 -1
  226. package/esm/types/Preview.js +4 -25
  227. package/esm/types/SchemaPath.d.ts +17 -0
  228. package/esm/types/SchemaPath.d.ts.map +1 -0
  229. package/esm/types/SchemaPath.js +9 -0
  230. package/esm/types/Settings.d.ts +24 -3
  231. package/esm/types/Settings.d.ts.map +1 -1
  232. package/esm/types/Settings.js +20 -13
  233. package/esm/types/SkmtcDocument.d.ts +1 -1
  234. package/esm/types/SupportedSubjects.d.ts +1 -1
  235. package/package.json +1 -1
  236. package/script/anchors/buildSidecar.js +1 -1
  237. package/script/anchors/postPass.d.ts +1 -1
  238. package/script/anchors/postPass.js +1 -1
  239. package/script/anchors/sidecar.d.ts +2 -2
  240. package/script/anchors/sidecar.js +1 -1
  241. package/script/context/CoreContext.d.ts +7 -1
  242. package/script/context/CoreContext.d.ts.map +1 -1
  243. package/script/context/CoreContext.js +17 -11
  244. package/script/context/GenerateContext.d.ts +28 -7
  245. package/script/context/GenerateContext.d.ts.map +1 -1
  246. package/script/context/GenerateContext.js +164 -86
  247. package/script/context/ParseContext.d.ts +16 -0
  248. package/script/context/ParseContext.d.ts.map +1 -1
  249. package/script/context/ParseContext.js +16 -0
  250. package/script/context/ParseIssue.d.ts +1 -1
  251. package/script/context/RenderContext.d.ts +2 -6
  252. package/script/context/RenderContext.d.ts.map +1 -1
  253. package/script/context/RenderContext.js +4 -14
  254. package/script/context/generateTypes.d.ts +35 -8
  255. package/script/context/generateTypes.d.ts.map +1 -1
  256. package/{esm/deps/jsr.io/@std/fs/1.0.23 → script/deps/jsr.io/@std/fs/1.0.24}/exists.d.ts.map +1 -1
  257. package/script/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
  258. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.js +7 -5
  259. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
  260. package/script/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
  261. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts.map +1 -1
  262. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.js +1 -1
  263. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts.map +1 -1
  264. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.js +1 -1
  265. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts.map +1 -1
  266. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.js +1 -1
  267. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts.map +1 -1
  268. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.js +1 -1
  269. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts.map +1 -1
  270. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.js +1 -1
  271. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts.map +1 -1
  272. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.js +2 -2
  273. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts.map +1 -1
  274. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.js +2 -2
  275. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts.map +1 -1
  276. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.js +1 -1
  277. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts.map +1 -1
  278. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.js +1 -1
  279. package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/posix/join.d.ts.map +1 -1
  280. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.js +1 -1
  281. package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/posix/normalize.d.ts.map +1 -1
  282. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.js +1 -1
  283. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts.map +1 -1
  284. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.js +1 -1
  285. package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/from_file_url.d.ts.map +1 -1
  286. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.js +1 -1
  287. package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/join.d.ts.map +1 -1
  288. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.js +1 -1
  289. package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/normalize.d.ts.map +1 -1
  290. package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.js +1 -1
  291. package/script/dsl/CodeFileBase.d.ts +57 -24
  292. package/script/dsl/CodeFileBase.d.ts.map +1 -1
  293. package/script/dsl/CodeFileBase.js +37 -54
  294. package/script/dsl/FileBase.d.ts +21 -25
  295. package/script/dsl/FileBase.d.ts.map +1 -1
  296. package/script/dsl/FileBase.js +20 -29
  297. package/script/dsl/GeneratorKeys.d.ts +19 -19
  298. package/script/dsl/GeneratorKeys.d.ts.map +1 -1
  299. package/script/dsl/GeneratorKeys.js +6 -5
  300. package/script/dsl/IdentifierBase.d.ts +19 -5
  301. package/script/dsl/IdentifierBase.d.ts.map +1 -1
  302. package/script/dsl/IdentifierBase.js +21 -5
  303. package/script/dsl/IdentifierType.d.ts +8 -14
  304. package/script/dsl/IdentifierType.d.ts.map +1 -1
  305. package/script/dsl/Lang.d.ts +18 -38
  306. package/script/dsl/Lang.d.ts.map +1 -1
  307. package/script/dsl/MarkdownFile.d.ts +55 -0
  308. package/script/dsl/MarkdownFile.d.ts.map +1 -0
  309. package/script/dsl/MarkdownFile.js +62 -0
  310. package/script/dsl/model/ModelDriver.d.ts +3 -1
  311. package/script/dsl/model/ModelDriver.d.ts.map +1 -1
  312. package/script/dsl/model/ModelDriver.js +29 -2
  313. package/script/dsl/model/toModelEntry.d.ts +24 -14
  314. package/script/dsl/model/toModelEntry.d.ts.map +1 -1
  315. package/script/dsl/model/toModelEntry.js +7 -3
  316. package/script/dsl/model/toModelProjectionBase.d.ts +31 -18
  317. package/script/dsl/model/toModelProjectionBase.d.ts.map +1 -1
  318. package/script/dsl/model/toModelProjectionBase.js +3 -3
  319. package/script/dsl/model/types.d.ts +23 -27
  320. package/script/dsl/model/types.d.ts.map +1 -1
  321. package/script/dsl/operation/gql/GqlOperationDriver.d.ts +3 -1
  322. package/script/dsl/operation/gql/GqlOperationDriver.d.ts.map +1 -1
  323. package/script/dsl/operation/gql/GqlOperationDriver.js +12 -9
  324. package/script/dsl/operation/gql/toGqlOperationEntry.d.ts +20 -15
  325. package/script/dsl/operation/gql/toGqlOperationEntry.d.ts.map +1 -1
  326. package/script/dsl/operation/gql/toGqlOperationEntry.js +3 -61
  327. package/script/dsl/operation/gql/toGqlOperationProjectionBase.d.ts +11 -10
  328. package/script/dsl/operation/gql/toGqlOperationProjectionBase.d.ts.map +1 -1
  329. package/script/dsl/operation/gql/types.d.ts +1 -28
  330. package/script/dsl/operation/gql/types.d.ts.map +1 -1
  331. package/script/dsl/operation/oas/OasOperationDriver.d.ts +3 -1
  332. package/script/dsl/operation/oas/OasOperationDriver.d.ts.map +1 -1
  333. package/script/dsl/operation/oas/OasOperationDriver.js +12 -9
  334. package/script/dsl/operation/oas/toOasOperationEntry.d.ts +21 -17
  335. package/script/dsl/operation/oas/toOasOperationEntry.d.ts.map +1 -1
  336. package/script/dsl/operation/oas/toOasOperationEntry.js +3 -68
  337. package/script/dsl/operation/oas/toOasOperationProjectionBase.d.ts +11 -10
  338. package/script/dsl/operation/oas/toOasOperationProjectionBase.d.ts.map +1 -1
  339. package/script/dsl/operation/oas/types.d.ts +1 -38
  340. package/script/dsl/operation/oas/types.d.ts.map +1 -1
  341. package/script/dsl/webhook/WebhookDriver.d.ts +3 -1
  342. package/script/dsl/webhook/WebhookDriver.d.ts.map +1 -1
  343. package/script/dsl/webhook/WebhookDriver.js +12 -9
  344. package/script/dsl/webhook/toWebhookEntry.d.ts +21 -16
  345. package/script/dsl/webhook/toWebhookEntry.d.ts.map +1 -1
  346. package/script/dsl/webhook/toWebhookEntry.js +3 -68
  347. package/script/dsl/webhook/toWebhookProjectionBase.d.ts +11 -10
  348. package/script/dsl/webhook/toWebhookProjectionBase.d.ts.map +1 -1
  349. package/script/dsl/webhook/types.d.ts +1 -36
  350. package/script/dsl/webhook/types.d.ts.map +1 -1
  351. package/script/enrichments/toEnrichmentDescriptor.d.ts +72 -27
  352. package/script/enrichments/toEnrichmentDescriptor.d.ts.map +1 -1
  353. package/script/enrichments/toEnrichmentDescriptor.js +57 -31
  354. package/script/enrichments/validateConfig.d.ts +60 -0
  355. package/script/enrichments/validateConfig.d.ts.map +1 -0
  356. package/script/enrichments/validateConfig.js +213 -0
  357. package/script/helpers/isImported.js +1 -1
  358. package/script/helpers/toResolvedArtifactPath.js +1 -1
  359. package/script/mod.d.ts +8 -1
  360. package/script/mod.d.ts.map +1 -1
  361. package/script/mod.js +8 -1
  362. package/script/oas/array/Array.d.ts +2 -0
  363. package/script/oas/array/Array.d.ts.map +1 -1
  364. package/script/oas/array/Array.js +4 -0
  365. package/script/oas/boolean/Boolean.d.ts +3 -1
  366. package/script/oas/boolean/Boolean.d.ts.map +1 -1
  367. package/script/oas/boolean/Boolean.js +4 -0
  368. package/script/oas/components/Components.d.ts +5 -0
  369. package/script/oas/components/Components.d.ts.map +1 -1
  370. package/script/oas/components/Components.js +6 -1
  371. package/script/oas/integer/Integer.d.ts +3 -1
  372. package/script/oas/integer/Integer.d.ts.map +1 -1
  373. package/script/oas/integer/Integer.js +4 -0
  374. package/script/oas/link/Link.d.ts +68 -0
  375. package/script/oas/link/Link.d.ts.map +1 -0
  376. package/script/oas/link/Link.js +111 -0
  377. package/script/oas/number/Number.d.ts +3 -1
  378. package/script/oas/number/Number.d.ts.map +1 -1
  379. package/script/oas/number/Number.js +4 -0
  380. package/script/oas/object/Object.d.ts +9 -0
  381. package/script/oas/object/Object.d.ts.map +1 -1
  382. package/script/oas/object/Object.js +14 -0
  383. package/script/oas/operation/Operation.d.ts +15 -0
  384. package/script/oas/operation/Operation.d.ts.map +1 -1
  385. package/script/oas/operation/Operation.js +33 -0
  386. package/script/oas/ref/Ref.d.ts +23 -1
  387. package/script/oas/ref/Ref.d.ts.map +1 -1
  388. package/script/oas/ref/Ref.js +32 -0
  389. package/script/oas/ref/ref-types.d.ts +18 -1
  390. package/script/oas/ref/ref-types.d.ts.map +1 -1
  391. package/script/oas/ref/ref-types.js +13 -2
  392. package/script/oas/response/Response.d.ts +4 -0
  393. package/script/oas/response/Response.d.ts.map +1 -1
  394. package/script/oas/response/Response.js +7 -0
  395. package/script/oas/schemaPath/traverseSchema.d.ts +31 -0
  396. package/script/oas/schemaPath/traverseSchema.d.ts.map +1 -0
  397. package/script/oas/schemaPath/traverseSchema.js +117 -0
  398. package/script/oas/string/String.d.ts +3 -1
  399. package/script/oas/string/String.d.ts.map +1 -1
  400. package/script/oas/string/String.js +4 -0
  401. package/script/oas/union/Union.d.ts +9 -0
  402. package/script/oas/union/Union.d.ts.map +1 -1
  403. package/script/oas/union/Union.js +14 -0
  404. package/script/oas/unknown/Unknown.d.ts +3 -1
  405. package/script/oas/unknown/Unknown.d.ts.map +1 -1
  406. package/script/oas/unknown/Unknown.js +4 -0
  407. package/script/parse/v3-0/_merge-all-of/decompose-union.d.ts.map +1 -1
  408. package/script/parse/v3-0/_merge-all-of/decompose-union.js +8 -12
  409. package/script/parse/v3-0/_merge-all-of/merge-union.d.ts.map +1 -1
  410. package/script/parse/v3-0/_merge-all-of/merge-union.js +0 -8
  411. package/script/parse/v3-0/components/toComponentsV3.d.ts.map +1 -1
  412. package/script/parse/v3-0/components/toComponentsV3.js +3 -1
  413. package/script/parse/v3-0/link/toLinksV3.d.ts +17 -0
  414. package/script/parse/v3-0/link/toLinksV3.d.ts.map +1 -0
  415. package/script/parse/v3-0/link/toLinksV3.js +44 -0
  416. package/script/parse/v3-0/object/toObject.d.ts.map +1 -1
  417. package/script/parse/v3-0/object/toObject.js +3 -1
  418. package/script/parse/v3-0/response/toResponseV3.d.ts.map +1 -1
  419. package/script/parse/v3-0/response/toResponseV3.js +4 -1
  420. package/script/parse/v3-0/schema/toSchemasV3.d.ts.map +1 -1
  421. package/script/parse/v3-0/schema/toSchemasV3.js +8 -0
  422. package/script/parse/v3-0/union/toUnion.d.ts.map +1 -1
  423. package/script/parse/v3-0/union/toUnion.js +3 -1
  424. package/script/parse/v3-1/_merge-all-of/decompose-union.d.ts.map +1 -1
  425. package/script/parse/v3-1/_merge-all-of/decompose-union.js +8 -12
  426. package/script/parse/v3-1/_merge-all-of/merge-union.d.ts.map +1 -1
  427. package/script/parse/v3-1/_merge-all-of/merge-union.js +0 -8
  428. package/script/parse/v3-1/components/toComponentsV3.d.ts.map +1 -1
  429. package/script/parse/v3-1/components/toComponentsV3.js +3 -1
  430. package/script/parse/v3-1/link/toLinksV3.d.ts +17 -0
  431. package/script/parse/v3-1/link/toLinksV3.d.ts.map +1 -0
  432. package/script/parse/v3-1/link/toLinksV3.js +44 -0
  433. package/script/parse/v3-1/object/toObject.d.ts.map +1 -1
  434. package/script/parse/v3-1/object/toObject.js +3 -1
  435. package/script/parse/v3-1/response/toResponseV3.d.ts.map +1 -1
  436. package/script/parse/v3-1/response/toResponseV3.js +4 -1
  437. package/script/parse/v3-1/schema/toSchemasV3.d.ts.map +1 -1
  438. package/script/parse/v3-1/schema/toSchemasV3.js +8 -0
  439. package/script/parse/v3-1/union/toUnion.d.ts.map +1 -1
  440. package/script/parse/v3-1/union/toUnion.js +3 -1
  441. package/script/run/toArtifacts.d.ts +8 -1
  442. package/script/run/toArtifacts.d.ts.map +1 -1
  443. package/script/run/toArtifacts.js +5 -5
  444. package/script/run/toInspection.d.ts +8 -0
  445. package/script/run/toInspection.d.ts.map +1 -0
  446. package/script/run/toInspection.js +82 -0
  447. package/script/types/Enrichments.d.ts +19 -8
  448. package/script/types/Enrichments.d.ts.map +1 -1
  449. package/script/types/Enrichments.js +5 -4
  450. package/script/types/GeneratorType.d.ts +5 -5
  451. package/script/types/GeneratorType.d.ts.map +1 -1
  452. package/script/types/Manifest.d.ts +1 -2
  453. package/script/types/Manifest.d.ts.map +1 -1
  454. package/script/types/Manifest.js +0 -1
  455. package/script/types/ModuleSelect.d.ts +81 -0
  456. package/script/types/ModuleSelect.d.ts.map +1 -0
  457. package/script/types/ModuleSelect.js +101 -0
  458. package/script/types/Preview.d.ts +4 -27
  459. package/script/types/Preview.d.ts.map +1 -1
  460. package/script/types/Preview.js +5 -26
  461. package/script/types/SchemaPath.d.ts +17 -0
  462. package/script/types/SchemaPath.d.ts.map +1 -0
  463. package/script/types/{AccessorPath.js → SchemaPath.js} +7 -7
  464. package/script/types/Settings.d.ts +24 -3
  465. package/script/types/Settings.d.ts.map +1 -1
  466. package/script/types/Settings.js +17 -10
  467. package/script/types/SkmtcDocument.d.ts +1 -1
  468. package/script/types/SupportedSubjects.d.ts +1 -1
  469. package/esm/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
  470. package/esm/deps/jsr.io/@std/internal/1.0.13/_os.js +0 -12
  471. package/esm/types/AccessorPath.d.ts +0 -17
  472. package/esm/types/AccessorPath.d.ts.map +0 -1
  473. package/esm/types/AccessorPath.js +0 -9
  474. package/script/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
  475. package/script/types/AccessorPath.d.ts +0 -17
  476. package/script/types/AccessorPath.d.ts.map +0 -1
  477. /package/esm/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.d.ts +0 -0
  478. /package/esm/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.js +0 -0
  479. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
  480. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
  481. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
  482. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts +0 -0
  483. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts +0 -0
  484. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts +0 -0
  485. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts +0 -0
  486. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts +0 -0
  487. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts +0 -0
  488. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts +0 -0
  489. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts +0 -0
  490. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts +0 -0
  491. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.d.ts +0 -0
  492. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.d.ts +0 -0
  493. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts +0 -0
  494. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.d.ts +0 -0
  495. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.d.ts +0 -0
  496. /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.d.ts +0 -0
  497. /package/script/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.d.ts +0 -0
  498. /package/script/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.js +0 -0
  499. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
  500. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
  501. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
  502. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts +0 -0
  503. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts +0 -0
  504. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts +0 -0
  505. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts +0 -0
  506. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts +0 -0
  507. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts +0 -0
  508. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts +0 -0
  509. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts +0 -0
  510. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts +0 -0
  511. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.d.ts +0 -0
  512. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.d.ts +0 -0
  513. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts +0 -0
  514. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.d.ts +0 -0
  515. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.d.ts +0 -0
  516. /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CodeFileBase.d.ts","sourceRoot":"","sources":["../../src/dsl/CodeFileBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD;;;;;;;;;;;;;GAaG;AACH,8BAAsB,YAAa,SAAQ,QAAQ;IACjD,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Q,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,EAAE,GAAG,IAAI;IAEtD;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,oBAAoB,GAAG,cAAc,EAAE,GAAG,SAAS;CACrF"}
@@ -1,64 +1,47 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CodeFileBase = void 0;
3
+ exports.CodeFileBase = exports.matchDefinitions = void 0;
4
4
  const FileBase_js_1 = require("./FileBase.js");
5
+ /**
6
+ * The neutral name/type filter every language's `findDefinitions` shares. The
7
+ * language passes its definition list and a `typeOf` extractor — the one
8
+ * lang-specific bit, which narrows to the language's Identifier subclass to
9
+ * read the typed `type` (returned here as the opaque `string`).
10
+ *
11
+ * - no `name` and no `type` → returns `all` (the whole list; the former
12
+ * `listDefinitions`).
13
+ * - otherwise → the matching subset, or `undefined` when nothing matches.
14
+ */
15
+ const matchDefinitions = (all, query, typeOf) => {
16
+ const name = query?.name;
17
+ const type = query?.type;
18
+ if (name === undefined && type === undefined) {
19
+ return all;
20
+ }
21
+ const matches = all.filter(definition => {
22
+ const nameMatches = name === undefined || definition.identifier.name === name;
23
+ const typeMatches = type === undefined || typeOf(definition.identifier) === type;
24
+ return nameMatches && typeMatches;
25
+ });
26
+ return matches.length > 0 ? matches : undefined;
27
+ };
28
+ exports.matchDefinitions = matchDefinitions;
5
29
  /**
6
30
  * The base every language's *code* file extends — a {@link FileBase} that
7
- * also carries imports. (`JsonFile`, which has no imports, extends
8
- * {@link FileBase} directly.)
31
+ * coordinates definitions, imports, and re-exports. (`JsonFile`, with none of
32
+ * these, extends {@link FileBase} directly.)
9
33
  *
10
- * The import collection and its merge are **language-neutral**: imports are
11
- * held keyed by {@link ImportBase.mergeKey} and collapsed via
12
- * {@link ImportBase.merge}, with no language-specific logic. The spike
13
- * proved this same `Map` + merge serves TypeScript (per-module grouping,
14
- * type-tags) and Go (whole-package imports, discarded symbol lists)
15
- * identically — only the *arrangement* of the rendered import section
16
- * differs, which is why `toString()` stays abstract and lives on the
17
- * language subclass (`TsFile`, `GoFile`).
34
+ * Language-blind: the declaration type {@link findDefinitions} filters on is
35
+ * the opaque-boundary `string` here; a lang's concrete file narrows its own
36
+ * `findDefinitions` override to its `XxEntityType`.
37
+ *
38
+ * Pure contract — no fields, no merge logic. Storage AND the duplication/merge
39
+ * policy are language-specific and live in the concrete lang subclass; the
40
+ * engine speaks only these four neutral operations — three writers driven by
41
+ * `register`, plus {@link findDefinitions}, the read seam the cross-generator
42
+ * cache and file inspection use. The cache resolves a single primary by name
43
+ * via `findDefinitions({ name })?.[0]`.
18
44
  */
19
45
  class CodeFileBase extends FileBase_js_1.FileBase {
20
- constructor() {
21
- super(...arguments);
22
- /** Registered imports, keyed by {@link ImportBase.mergeKey}. */
23
- Object.defineProperty(this, "imports", {
24
- enumerable: true,
25
- configurable: true,
26
- writable: true,
27
- value: new Map()
28
- });
29
- /** Registered re-exports, keyed by {@link ReExportBase.mergeKey}. */
30
- Object.defineProperty(this, "reExports", {
31
- enumerable: true,
32
- configurable: true,
33
- writable: true,
34
- value: new Map()
35
- });
36
- }
37
- /**
38
- * Merge imports in, collapsing any that share a `mergeKey()` with an
39
- * existing entry via {@link ImportBase.merge}. Neutral — the engine's
40
- * `register` calls this on the abstract base for every language's file.
41
- */
42
- addImports(incoming) {
43
- for (const importEntry of incoming) {
44
- const key = importEntry.mergeKey();
45
- const existing = this.imports.get(key);
46
- this.imports.set(key, existing ? existing.merge(importEntry) : importEntry);
47
- }
48
- }
49
- /**
50
- * Merge re-exports in, collapsing any that share a `mergeKey()` with an
51
- * existing entry via {@link ReExportBase.merge}. Neutral — the engine's
52
- * `register` calls this on the abstract base; a language without
53
- * re-exports never receives any (its concise register vocabulary has no
54
- * `reExports` field).
55
- */
56
- addReExports(incoming) {
57
- for (const reExportEntry of incoming) {
58
- const key = reExportEntry.mergeKey();
59
- const existing = this.reExports.get(key);
60
- this.reExports.set(key, existing ? existing.merge(reExportEntry) : reExportEntry);
61
- }
62
- }
63
46
  }
64
47
  exports.CodeFileBase = CodeFileBase;
@@ -1,41 +1,37 @@
1
- import type { DefinitionBase } from './Definition.js';
1
+ import type { Stringable } from './Stringable.js';
2
2
  /**
3
3
  * The language-neutral coordination surface shared by the engine and
4
4
  * every `@skmtc/lang-*` package's concrete file subclass.
5
5
  *
6
- * The engine (`GenerateContext` and the cross-generator cache) only ever
7
- * reads this surface — the file's `path` and its `definitions` map. It
8
- * never reads a file's language-specific output state (imports,
9
- * re-exports) or its rendered string, which is what keeps the engine
10
- * language-blind. A language package subclasses `FileBase`, adds its own
11
- * output state, and implements `toString()` to render itself.
6
+ * `FileBase` carries only what is common to *every* file — code or not:
7
+ * its `path`, an optional free-form `custom` content slot, and the
8
+ * `toString()` contract. It holds NO definitions, imports, or dedup
9
+ * policy — those are code-file concerns that live on {@link CodeFileBase}
10
+ * and the language subclass, which is what keeps the engine
11
+ * language-blind.
12
12
  *
13
- * `JsonFile` extends this too — a JSON file is a `FileBase` whose
14
- * `definitions` map stays empty and whose `toString()` serialises its
15
- * content. (See notes/lang: "JSON is a degenerate language".)
13
+ * `JsonFile` extends this directly — a JSON file has a `path`, serialises
14
+ * its content in `toString()`, and never touches definitions. (See
15
+ * notes/lang: "JSON is a degenerate language".)
16
16
  *
17
- * Lives in its own leaf module (only a type-only `DefinitionBase` import)
18
- * so that `File` and `JsonFile` — which both `extends FileBase` — can
19
- * import it without forming a value-level import cycle through `File.ts`.
17
+ * Lives in its own leaf module (only a type-only `Stringable` import) so
18
+ * that the file subclasses can import it without forming a value-level
19
+ * import cycle.
20
20
  */
21
21
  export declare abstract class FileBase {
22
22
  /** The file path for this generated file */
23
23
  path: string;
24
- /** Map of definition names to their Definition objects */
25
- definitions: Map<string, DefinitionBase>;
24
+ /**
25
+ * Optional free-form content. On a code file this is the leading banner
26
+ * (e.g. a codegen header); on an ad-hoc non-code file (Markdown, plain
27
+ * text) it can carry the body. Inert until a concrete subclass renders
28
+ * it in `toString()`. Set through the neutral `register` vocabulary's
29
+ * `custom` field (last write wins).
30
+ */
31
+ custom: Stringable | undefined;
26
32
  constructor({ path }: {
27
33
  path: string;
28
34
  });
29
- /**
30
- * Add a definition, deduplicating by identifier name (first write wins).
31
- *
32
- * Neutral: the engine's `register` calls this on the abstract base, so it
33
- * works for every language's file. Per-language duplication rules (e.g.
34
- * TypeScript declaration merging — a class and its `declare namespace`
35
- * sharing a name) belong in the language's file subclass, which overrides
36
- * this method.
37
- */
38
- addDefinition(definition: DefinitionBase): void;
39
35
  /** Renders the file's complete contents. Implemented by the subclass. */
40
36
  abstract toString(): string;
41
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FileBase.d.ts","sourceRoot":"","sources":["../../src/dsl/FileBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAAsB,QAAQ;IAC5B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAA;IAEZ,0DAA0D;IAC1D,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;gBAE5B,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;IAKtC;;;;;;;;OAQG;IACH,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI;IAM/C,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,IAAI,MAAM;CAC5B"}
1
+ {"version":3,"file":"FileBase.d.ts","sourceRoot":"","sources":["../../src/dsl/FileBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAAsB,QAAQ;IAC5B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAA;IAEZ;;;;;;OAMG;IACH,MAAM,EAAE,UAAU,GAAG,SAAS,CAAA;gBAElB,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;IAItC,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,IAAI,MAAM;CAC5B"}
@@ -5,20 +5,20 @@ exports.FileBase = void 0;
5
5
  * The language-neutral coordination surface shared by the engine and
6
6
  * every `@skmtc/lang-*` package's concrete file subclass.
7
7
  *
8
- * The engine (`GenerateContext` and the cross-generator cache) only ever
9
- * reads this surface — the file's `path` and its `definitions` map. It
10
- * never reads a file's language-specific output state (imports,
11
- * re-exports) or its rendered string, which is what keeps the engine
12
- * language-blind. A language package subclasses `FileBase`, adds its own
13
- * output state, and implements `toString()` to render itself.
8
+ * `FileBase` carries only what is common to *every* file — code or not:
9
+ * its `path`, an optional free-form `custom` content slot, and the
10
+ * `toString()` contract. It holds NO definitions, imports, or dedup
11
+ * policy — those are code-file concerns that live on {@link CodeFileBase}
12
+ * and the language subclass, which is what keeps the engine
13
+ * language-blind.
14
14
  *
15
- * `JsonFile` extends this too — a JSON file is a `FileBase` whose
16
- * `definitions` map stays empty and whose `toString()` serialises its
17
- * content. (See notes/lang: "JSON is a degenerate language".)
15
+ * `JsonFile` extends this directly — a JSON file has a `path`, serialises
16
+ * its content in `toString()`, and never touches definitions. (See
17
+ * notes/lang: "JSON is a degenerate language".)
18
18
  *
19
- * Lives in its own leaf module (only a type-only `DefinitionBase` import)
20
- * so that `File` and `JsonFile` — which both `extends FileBase` — can
21
- * import it without forming a value-level import cycle through `File.ts`.
19
+ * Lives in its own leaf module (only a type-only `Stringable` import) so
20
+ * that the file subclasses can import it without forming a value-level
21
+ * import cycle.
22
22
  */
23
23
  class FileBase {
24
24
  constructor({ path }) {
@@ -29,29 +29,20 @@ class FileBase {
29
29
  writable: true,
30
30
  value: void 0
31
31
  });
32
- /** Map of definition names to their Definition objects */
33
- Object.defineProperty(this, "definitions", {
32
+ /**
33
+ * Optional free-form content. On a code file this is the leading banner
34
+ * (e.g. a codegen header); on an ad-hoc non-code file (Markdown, plain
35
+ * text) it can carry the body. Inert until a concrete subclass renders
36
+ * it in `toString()`. Set through the neutral `register` vocabulary's
37
+ * `custom` field (last write wins).
38
+ */
39
+ Object.defineProperty(this, "custom", {
34
40
  enumerable: true,
35
41
  configurable: true,
36
42
  writable: true,
37
43
  value: void 0
38
44
  });
39
45
  this.path = path;
40
- this.definitions = new Map();
41
- }
42
- /**
43
- * Add a definition, deduplicating by identifier name (first write wins).
44
- *
45
- * Neutral: the engine's `register` calls this on the abstract base, so it
46
- * works for every language's file. Per-language duplication rules (e.g.
47
- * TypeScript declaration merging — a class and its `declare namespace`
48
- * sharing a name) belong in the language's file subclass, which overrides
49
- * this method.
50
- */
51
- addDefinition(definition) {
52
- if (!this.definitions.has(definition.identifier.name)) {
53
- this.definitions.set(definition.identifier.name, definition);
54
- }
55
46
  }
56
47
  }
57
48
  exports.FileBase = FileBase;
@@ -129,7 +129,7 @@ export type OasOperationGeneratorKey = Brand<NakedOasOperationGeneratorKey, 'Oas
129
129
  * Branded type for GraphQL operation generator keys.
130
130
  *
131
131
  * Sibling to {@link OasOperationGeneratorKey} for the GraphQL protocol. The key
132
- * encodes the generator ID, the root kind (`query` / `mutation` /
132
+ * encodes the generator ID, the root type (`query` / `mutation` /
133
133
  * `subscription`), and the root field name.
134
134
  */
135
135
  export type GqlOperationGeneratorKey = Brand<NakedGqlOperationGeneratorKey, 'GqlOperationGeneratorKey'>;
@@ -210,15 +210,15 @@ type ToOasOperationGeneratorKeyArgs = {
210
210
  path: string;
211
211
  /** HTTP method */
212
212
  method: Method;
213
- /** Operation variant name (use `'main'` for variants-unaware generators) */
214
- variant: string;
213
+ /** Operation variant name — omitted means `'main'` */
214
+ variant?: string;
215
215
  } | {
216
216
  /** Unique identifier for the generator */
217
217
  generatorId: string;
218
218
  /** OpenAPI operation object containing path and method */
219
219
  operation: OasOperation;
220
- /** Operation variant name (use `'main'` for variants-unaware generators) */
221
- variant: string;
220
+ /** Operation variant name — omitted means `'main'` */
221
+ variant?: string;
222
222
  };
223
223
  /**
224
224
  * Creates an OAS operation generator key from generator ID and operation details.
@@ -271,15 +271,15 @@ type ToWebhookGeneratorKeyArgs = {
271
271
  name: string;
272
272
  /** HTTP method */
273
273
  method: Method;
274
- /** Webhook variant name (use `'main'` for variants-unaware generators) */
275
- variant: string;
274
+ /** Webhook variant name — omitted means `'main'` */
275
+ variant?: string;
276
276
  } | {
277
277
  /** Unique identifier for the generator */
278
278
  generatorId: string;
279
279
  /** OpenAPI webhook object containing name and method */
280
280
  webhook: OasWebhook;
281
- /** Webhook variant name (use `'main'` for variants-unaware generators) */
282
- variant: string;
281
+ /** Webhook variant name — omitted means `'main'` */
282
+ variant?: string;
283
283
  };
284
284
  /**
285
285
  * Creates a webhook generator key from generator ID and webhook details.
@@ -293,25 +293,25 @@ export declare const toWebhookGeneratorKey: ({ generatorId, variant, ...rest }:
293
293
  * Arguments for {@link toGqlOperationGeneratorKey}.
294
294
  *
295
295
  * Can specify operation details directly or provide a {@link GqlOperation}
296
- * object from which the root kind and field name will be extracted. The
296
+ * object from which the root type and field name will be extracted. The
297
297
  * `variant` segment is always required (see {@link Variant}).
298
298
  */
299
299
  type ToGqlOperationGeneratorKeyArgs = {
300
300
  /** Unique identifier for the generator */
301
301
  generatorId: string;
302
- /** GraphQL root kind */
302
+ /** GraphQL root type */
303
303
  rootKind: GqlRootKind;
304
304
  /** Root field name */
305
305
  fieldName: string;
306
- /** Operation variant name (use `'main'` for variants-unaware generators) */
307
- variant: string;
306
+ /** Operation variant name — omitted means `'main'` */
307
+ variant?: string;
308
308
  } | {
309
309
  /** Unique identifier for the generator */
310
310
  generatorId: string;
311
311
  /** GraphQL operation object */
312
312
  operation: GqlOperation;
313
- /** Operation variant name (use `'main'` for variants-unaware generators) */
314
- variant: string;
313
+ /** Operation variant name — omitted means `'main'` */
314
+ variant?: string;
315
315
  };
316
316
  /**
317
317
  * Creates a GraphQL operation generator key.
@@ -331,8 +331,8 @@ type ToModelGeneratorKeyArgs = {
331
331
  generatorId: string;
332
332
  /** Reference name of the schema model */
333
333
  refName: RefName;
334
- /** Model variant name (use `'main'` for variants-unaware generators) */
335
- variant: string;
334
+ /** Model variant name — omitted means `'main'` */
335
+ variant?: string;
336
336
  };
337
337
  /**
338
338
  * Creates a model generator key from generator ID, schema reference name,
@@ -455,7 +455,7 @@ export declare const isWebhookGeneratorKey: (arg: unknown) => arg is WebhookGene
455
455
  *
456
456
  * Validates that the argument is a string with the format
457
457
  * `generatorId|rootKind|fieldName`, with `rootKind` constrained to a
458
- * GraphQL root operation kind (`query` / `mutation` / `subscription`).
458
+ * GraphQL root operation type (`query` / `mutation` / `subscription`).
459
459
  */
460
460
  export declare const isGqlOperationGeneratorKey: (arg: unknown) => arg is GqlOperationGeneratorKey;
461
461
  /**
@@ -572,7 +572,7 @@ export type GeneratorKeyObject = {
572
572
  type: 'gqlOperation';
573
573
  /** Generator identifier */
574
574
  generatorId: string;
575
- /** GraphQL root kind */
575
+ /** GraphQL root type */
576
576
  rootKind: GqlRootKind;
577
577
  /** Root field name */
578
578
  fieldName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"GeneratorKeys.d.ts","sourceRoot":"","sources":["../../src/dsl/GeneratorKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,OAAO,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,KAAK,MAAM,EAAY,MAAM,oBAA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ACzD,IAAI,EAAE,cAAc,CAAA;IACpB,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,wBAAwB;IACxB,QAAQ,EAAE,WAAW,CAAA;IACrB,sBAAsB;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAA;CAChB,GACD;IACE,6CAA6C;IAC7C,IAAI,EAAE,OAAO,CAAA;IACb,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAA;CAChB,GACD;IACE,4CAA4C;IAC5C,IAAI,EAAE,gBAAgB,CAAA;IACtB,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,YAAY,KAAG,kBA4B7D,CAAA"}
@@ -68,6 +68,7 @@ exports.fromGeneratorKey = exports.toGeneratorId = exports.isGeneratorOnlyKey =
68
68
  */
69
69
  require("../_dnt.polyfills.js");
70
70
  const Method_js_1 = require("../types/Method.js");
71
+ const Variant_js_1 = require("../types/Variant.js");
71
72
  const GQL_ROOT_KINDS = ['query', 'mutation', 'subscription'];
72
73
  const isGqlRootKind = (value) => GQL_ROOT_KINDS.includes(value);
73
74
  /**
@@ -105,7 +106,7 @@ const isGqlRootKind = (value) => GQL_ROOT_KINDS.includes(value);
105
106
  * // Result: 'rest-client|/posts|post' (branded)
106
107
  * ```
107
108
  */
108
- const toOasOperationGeneratorKey = ({ generatorId, variant, ...rest }) => {
109
+ const toOasOperationGeneratorKey = ({ generatorId, variant = Variant_js_1.DEFAULT_VARIANT, ...rest }) => {
109
110
  const { path, method } = 'operation' in rest ? rest.operation : rest;
110
111
  const nakedKey = `${generatorId}|${path}|${method}|${variant}`;
111
112
  return nakedKey;
@@ -118,7 +119,7 @@ exports.toOasOperationGeneratorKey = toOasOperationGeneratorKey;
118
119
  * Format: `generatorId|webhook|name|method|variant`. The literal `webhook`
119
120
  * segment keeps webhook keys from colliding with operation keys.
120
121
  */
121
- const toWebhookGeneratorKey = ({ generatorId, variant, ...rest }) => {
122
+ const toWebhookGeneratorKey = ({ generatorId, variant = Variant_js_1.DEFAULT_VARIANT, ...rest }) => {
122
123
  const { name, method } = 'webhook' in rest ? rest.webhook : rest;
123
124
  const nakedKey = `${generatorId}|webhook|${name}|${method}|${variant}`;
124
125
  return nakedKey;
@@ -130,7 +131,7 @@ exports.toWebhookGeneratorKey = toWebhookGeneratorKey;
130
131
  * Sibling to {@link toOasOperationGeneratorKey} for the GraphQL protocol. Format:
131
132
  * `generatorId|rootKind|fieldName|variant`.
132
133
  */
133
- const toGqlOperationGeneratorKey = ({ generatorId, variant, ...rest }) => {
134
+ const toGqlOperationGeneratorKey = ({ generatorId, variant = Variant_js_1.DEFAULT_VARIANT, ...rest }) => {
134
135
  const { rootKind, fieldName } = 'operation' in rest
135
136
  ? { rootKind: rest.operation.rootKind, fieldName: rest.operation.fieldName }
136
137
  : rest;
@@ -166,7 +167,7 @@ exports.toGqlOperationGeneratorKey = toGqlOperationGeneratorKey;
166
167
  * // Result: 'zod-schemas|CreateUserRequest|coercive' (branded)
167
168
  * ```
168
169
  */
169
- const toModelGeneratorKey = ({ generatorId, refName, variant }) => {
170
+ const toModelGeneratorKey = ({ generatorId, refName, variant = Variant_js_1.DEFAULT_VARIANT }) => {
170
171
  const nakedKey = `${generatorId}|${refName}|${variant}`;
171
172
  return nakedKey;
172
173
  };
@@ -316,7 +317,7 @@ exports.isWebhookGeneratorKey = isWebhookGeneratorKey;
316
317
  *
317
318
  * Validates that the argument is a string with the format
318
319
  * `generatorId|rootKind|fieldName`, with `rootKind` constrained to a
319
- * GraphQL root operation kind (`query` / `mutation` / `subscription`).
320
+ * GraphQL root operation type (`query` / `mutation` / `subscription`).
320
321
  */
321
322
  const isGqlOperationGeneratorKey = (arg) => {
322
323
  if (typeof arg !== 'string') {
@@ -17,19 +17,19 @@ export type IdentifierBaseArgs = {
17
17
  * `(name, exportPath)` cross-generator cache key, and `DefinitionBase`. The
18
18
  * engine reads ONLY `.name` (the cache-key source); `typeName` and
19
19
  * `exported` are language-neutral facts it threads but never interprets.
20
- * Crucially it carries NO `kind` — the per-language declaration vocabulary
20
+ * Crucially it carries NO `type` — the per-language declaration vocabulary
21
21
  * lives, typed, on the language subclasses.
22
22
  *
23
23
  * It completes the neutral `*Base` family
24
24
  * (`CodeFileBase` / `DefinitionBase` / `ImportBase`): the concrete,
25
- * kind-carrying subclasses (`TsIdentifier`, `KtIdentifier`) live in the
25
+ * type-carrying subclasses (`TsIdentifier`, `KtIdentifier`) live in the
26
26
  * `@skmtc/lang-*` packages and **extend** this base. Construction goes
27
27
  * through a language package's factories (`createVariable` / `createType`
28
28
  * for TypeScript; `createDataClass` / `createEnumClass` / … for Kotlin) or
29
29
  * the engine's assembly seam `lang.toIdentifier({ name, ...identifierType })`.
30
- * The engine holds the result as `IdentifierBase`; the language's `kind` is
31
- * read only by the language renderers, which narrow via an `instanceof`
32
- * guard (`isTsIdentifier` / `isKtIdentifier`).
30
+ * The engine holds the result as `IdentifierBase`; the language's `type` is
31
+ * read only by the language renderers, which narrow back to the concrete
32
+ * subclass via `instanceof` (e.g. `value instanceof TsIdentifier`).
33
33
  */
34
34
  export declare class IdentifierBase {
35
35
  /** The identifier name — the only field the engine reads. */
@@ -51,5 +51,19 @@ export declare class IdentifierBase {
51
51
  * identifier is interpolated into generated code.
52
52
  */
53
53
  toString(): string;
54
+ /**
55
+ * The key under which a file stores and dedups this identifier's
56
+ * definition: two definitions whose identifiers share a `declarationKey`
57
+ * occupy the same declaration slot, so the later one collapses into the
58
+ * first (the cross-generator cache then resolves a name to its
59
+ * first-registered definition).
60
+ *
61
+ * The neutral default is the bare {@link name} — one definition per name,
62
+ * which is what most languages want. A language whose declaration space is
63
+ * richer overrides this: TypeScript folds in the declaration `type` so a
64
+ * `class Foo` and a `declare namespace Foo` — distinct declarations the
65
+ * compiler legitimately merges — get distinct keys instead of colliding.
66
+ */
67
+ declarationKey(): string;
54
68
  }
55
69
  //# sourceMappingURL=IdentifierBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IdentifierBase.d.ts","sourceRoot":"","sources":["../../src/dsl/IdentifierBase.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,cAAc;IACzB,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAA;IAEZ,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;;;;;OAOG;IACH,QAAQ,EAAE,OAAO,CAAA;gBAEL,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,kBAAkB;IAM5D;;;OAGG;IACH,QAAQ,IAAI,MAAM;CAGnB"}
1
+ {"version":3,"file":"IdentifierBase.d.ts","sourceRoot":"","sources":["../../src/dsl/IdentifierBase.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,cAAc;IACzB,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAA;IAEZ,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;;;;;OAOG;IACH,QAAQ,EAAE,OAAO,CAAA;gBAEL,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,kBAAkB;IAM5D;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;;;;;;;;;;OAYG;IACH,cAAc,IAAI,MAAM;CAGzB"}
@@ -9,19 +9,19 @@ exports.IdentifierBase = void 0;
9
9
  * `(name, exportPath)` cross-generator cache key, and `DefinitionBase`. The
10
10
  * engine reads ONLY `.name` (the cache-key source); `typeName` and
11
11
  * `exported` are language-neutral facts it threads but never interprets.
12
- * Crucially it carries NO `kind` — the per-language declaration vocabulary
12
+ * Crucially it carries NO `type` — the per-language declaration vocabulary
13
13
  * lives, typed, on the language subclasses.
14
14
  *
15
15
  * It completes the neutral `*Base` family
16
16
  * (`CodeFileBase` / `DefinitionBase` / `ImportBase`): the concrete,
17
- * kind-carrying subclasses (`TsIdentifier`, `KtIdentifier`) live in the
17
+ * type-carrying subclasses (`TsIdentifier`, `KtIdentifier`) live in the
18
18
  * `@skmtc/lang-*` packages and **extend** this base. Construction goes
19
19
  * through a language package's factories (`createVariable` / `createType`
20
20
  * for TypeScript; `createDataClass` / `createEnumClass` / … for Kotlin) or
21
21
  * the engine's assembly seam `lang.toIdentifier({ name, ...identifierType })`.
22
- * The engine holds the result as `IdentifierBase`; the language's `kind` is
23
- * read only by the language renderers, which narrow via an `instanceof`
24
- * guard (`isTsIdentifier` / `isKtIdentifier`).
22
+ * The engine holds the result as `IdentifierBase`; the language's `type` is
23
+ * read only by the language renderers, which narrow back to the concrete
24
+ * subclass via `instanceof` (e.g. `value instanceof TsIdentifier`).
25
25
  */
26
26
  class IdentifierBase {
27
27
  constructor({ name, typeName, exported }) {
@@ -64,5 +64,21 @@ class IdentifierBase {
64
64
  toString() {
65
65
  return this.name;
66
66
  }
67
+ /**
68
+ * The key under which a file stores and dedups this identifier's
69
+ * definition: two definitions whose identifiers share a `declarationKey`
70
+ * occupy the same declaration slot, so the later one collapses into the
71
+ * first (the cross-generator cache then resolves a name to its
72
+ * first-registered definition).
73
+ *
74
+ * The neutral default is the bare {@link name} — one definition per name,
75
+ * which is what most languages want. A language whose declaration space is
76
+ * richer overrides this: TypeScript folds in the declaration `type` so a
77
+ * `class Foo` and a `declare namespace Foo` — distinct declarations the
78
+ * compiler legitimately merges — get distinct keys instead of colliding.
79
+ */
80
+ declarationKey() {
81
+ return this.name;
82
+ }
67
83
  }
68
84
  exports.IdentifierBase = IdentifierBase;
@@ -1,28 +1,22 @@
1
- import type { Lang, LangKind } from './Lang.js';
2
1
  /**
3
2
  * The non-`name` parts of an identifier — everything a projection's
4
3
  * `toIdentifierType` derives from the schema (context-aware), bundled so
5
4
  * the engine can assemble the full identifier with
6
5
  * `lang.toIdentifier({ name, ...identifierType })`.
7
6
  *
8
- * Generic over the projection's {@link Lang}: the `kind` is drawn from that
9
- * language's declaration vocabulary, recovered via {@link LangKind} from the
10
- * typed `kind` on the {@link import('@/dsl/IdentifierBase.ts').IdentifierBase}
11
- * subclass the lang produces (`KtEntityKind` for `KtLang`, `TsEntityKind` for
12
- * the TypeScript `Lang`, …). A bare `Lang` falls back to the loose
13
- * `kind: string` — the opaque-kind boundary the engine never interprets.
14
- *
15
- * This is what lets a language's projection-base veneer parameterize core's
16
- * config (`ModelProjectionBaseConfig<E, KtLang>`) instead of recasting
17
- * `toIdentifierType`'s return: the tightening rides the `L` type argument.
7
+ * The `type` is the opaque-boundary `string` — the engine never interprets
8
+ * it. Each language's declaration-type vocabulary is a fixed fact of its lang
9
+ * package; a lang veneer tightens `toIdentifierType`'s return to its own
10
+ * `XxIdentifierType` (`type` narrowed to `XxEntityType`), which is assignable
11
+ * back to this shape. Core never models or recovers that vocabulary.
18
12
  *
19
13
  * Pairs with `toIdentifierName(args) -> string` (the pure, cache-key
20
14
  * source): the engine assembles
21
15
  * `lang.toIdentifier({ name: P.toIdentifierName(args), ...P.toIdentifierType(coordinate, context) })`.
22
16
  */
23
- export type IdentifierType<L extends Lang = Lang> = {
24
- /** Per-language declaration kind — `LangKind<L>`, opaque to the engine. */
25
- kind: LangKind<L>;
17
+ export type IdentifierType = {
18
+ /** Per-language declaration type — the opaque-boundary `string`. */
19
+ type: string;
26
20
  /** Optional type annotation, opaque to the engine (lang-interpreted). */
27
21
  typeName?: string;
28
22
  /** Whether the identifier is exported. Defaults to `true`. */
@@ -1 +1 @@
1
- {"version":3,"file":"IdentifierType.d.ts","sourceRoot":"","sources":["../../src/dsl/IdentifierType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI;IAClD,2EAA2E;IAC3E,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;IACjB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA"}
1
+ {"version":3,"file":"IdentifierType.d.ts","sourceRoot":"","sources":["../../src/dsl/IdentifierType.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAA;IACZ,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA"}