@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
@@ -10,13 +10,9 @@ import type { SnippetBase, SnippetBaseArgs } from './SnippetBase.js';
10
10
  * Arguments for {@link Lang.toDefinition} — everything the language needs
11
11
  * to wrap a generated `value` in its own `Definition` subclass.
12
12
  *
13
- * `identifier` stays the neutral {@link IdentifierBase}: the engine holds
14
- * identifiers as the base and passes that to the factory (which narrows via
15
- * its own `instanceof` guard). Keeping it neutral is also what lets a typed
16
- * `Lang` (e.g. `KtLang`) satisfy the bare `Lang` constraint — `identifier`
17
- * is a contravariant parameter, so a narrower type here would break the
18
- * subtype relation. The typed identifier surfaces only on `toIdentifier`'s
19
- * RETURN (a covariant position).
13
+ * `identifier` is the neutral {@link IdentifierBase}: the engine holds
14
+ * identifiers as the base and passes that to the factory, which narrows to
15
+ * its own concrete subclass via `instanceof`.
20
16
  */
21
17
  export type LangToDefinitionArgs<V extends GeneratedValue = GeneratedValue> = {
22
18
  context: GenerateContextType;
@@ -40,12 +36,12 @@ export type LangToImportArgs = {
40
36
  * seam. `name` comes from the projection's pure `toIdentifierName`; the
41
37
  * remaining fields come from the context-aware `toIdentifierType`
42
38
  * (spread in). The language builds its concrete `IdentifierBase` subclass
43
- * (`TsIdentifier` / `KtIdentifier`), reading the opaque `kind` into its
44
- * typed `EntityKind` slot.
39
+ * (`TsIdentifier` / `KtIdentifier`), reading the opaque `type` into its
40
+ * typed `EntityType` slot.
45
41
  */
46
42
  export type LangToIdentifierArgs = {
47
43
  name: string;
48
- kind: string;
44
+ type: string;
49
45
  typeName?: string;
50
46
  exported?: boolean;
51
47
  };
@@ -72,7 +68,7 @@ export type LangToIdentifierArgs = {
72
68
  * vocabulary is intra-lang-package (each language's register function
73
69
  * converts its own form), so the neutral interface never names one.
74
70
  */
75
- export type Lang<IdentifierT extends IdentifierBase = IdentifierBase> = {
71
+ export type Lang = {
76
72
  /** Construct the language's file for `path`. */
77
73
  createFile: (args: {
78
74
  path: string;
@@ -84,28 +80,14 @@ export type Lang<IdentifierT extends IdentifierBase = IdentifierBase> = {
84
80
  toImport: (args: LangToImportArgs) => ImportBase;
85
81
  /**
86
82
  * Assemble this language's `IdentifierBase` subclass from name +
87
- * kind/type/exported. `kind` arrives as the opaque-boundary `string` (the
88
- * engine never narrows it); the language reads it into its typed
89
- * `EntityKind` slot. The returned `IdentifierT` is the language's concrete
90
- * subclass — its typed `kind` is the ONLY place `IdentifierT` appears (a
91
- * covariant return position), which is what lets {@link IdentifierType}
92
- * recover the vocabulary to tighten the projection config while a typed
93
- * `Lang` still satisfies the bare `Lang` constraint.
83
+ * type/typeName/exported. `type` arrives as the opaque-boundary `string` — the
84
+ * engine never narrows it; the language reads it into its own typed
85
+ * `EntityType` slot. The engine holds the result as the neutral
86
+ * `IdentifierBase`; the declaration-type vocabulary is a fixed fact of each
87
+ * language package, never modelled or recovered here.
94
88
  */
95
- toIdentifier: (args: LangToIdentifierArgs) => IdentifierT;
89
+ toIdentifier: (args: LangToIdentifierArgs) => IdentifierBase;
96
90
  };
97
- /**
98
- * The language's declaration-kind vocabulary, recovered from the typed
99
- * `kind` on the {@link IdentifierBase} subclass a `Lang` produces.
100
- *
101
- * `KtIdentifier` carries `kind: KtEntityKind`, `TsIdentifier` carries
102
- * `kind: TsEntityKind`, … The neutral `IdentifierBase` has no `kind`, so a
103
- * bare `Lang` falls back to the loose `string` — the opaque-kind boundary
104
- * the engine speaks.
105
- */
106
- export type LangKind<L extends Lang> = ReturnType<L['toIdentifier']> extends {
107
- kind: infer Kind extends string;
108
- } ? Kind : string;
109
91
  /**
110
92
  * The constructor contract a language's snippet base class must satisfy to
111
93
  * be used as the `base` of a projection-base factory
@@ -124,13 +106,11 @@ export type LangKind<L extends Lang> = ReturnType<L['toIdentifier']> extends {
124
106
  * generic over the base's *instance* type cannot type-safely extend it
125
107
  * (TS2415/TS2545 — see the scratch in `notes/lang/14`), and the price would
126
108
  * be that language-specific instance members are type-erased on projection
127
- * classes. Only the STATIC `lang` is parameterized — over the neutral `Lang`
128
- * by default, narrowed to a language's typed `Lang` (e.g. `KtLang`) when a
129
- * veneer threads `L` through. Narrowing a covariant static intersection does
130
- * not reawaken TS2415; the `extends config.base` in the factories stays well
131
- * typed because the instance side is unchanged.
109
+ * classes. The static `lang` is the neutral {@link Lang} — the engine reads
110
+ * it language-blind; each lang package's concrete declaration-type vocabulary
111
+ * is a fixed fact of that package, never recovered through this type.
132
112
  */
133
- export type LangSnippetConstructor<L extends Lang = Lang> = (new (args: SnippetBaseArgs) => SnippetBase) & {
134
- lang: L;
113
+ export type LangSnippetConstructor = (new (args: SnippetBaseArgs) => SnippetBase) & {
114
+ lang: Lang;
135
115
  };
136
116
  //# sourceMappingURL=Lang.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Lang.d.ts","sourceRoot":"","sources":["../../src/dsl/Lang.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEpE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI;IAC5E,OAAO,EAAE,mBAAmB,CAAA;IAC5B,UAAU,EAAE,cAAc,CAAA;IAC1B,KAAK,EAAE,CAAC,CAAA;IACR,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,cAAc,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;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IACnE,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,UAAU,CAAA;IAChD;;;;;;;OAOG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,cAAc,CAAA;CAC7D,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,KACpC,IAAI,EAAE,eAAe,KAClB,WAAW,CAAC,GAAG;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAA"}
@@ -0,0 +1,55 @@
1
+ import { FileBase } from './FileBase.js';
2
+ import type { Stringable } from './Stringable.js';
3
+ /**
4
+ * Constructor arguments for {@link MarkdownFile}.
5
+ */
6
+ type MarkdownFileArgs = {
7
+ /** The file path for the generated Markdown file */
8
+ path: string;
9
+ /** The Markdown content to write to the file */
10
+ content: Stringable;
11
+ };
12
+ /**
13
+ * Represents a Markdown file in the SKMTC DSL system.
14
+ *
15
+ * The Markdown counterpart of {@link import('@/dsl/JsonFile.ts').JsonFile}: a
16
+ * degenerate, non-code file that extends {@link FileBase} directly — it holds
17
+ * no definitions, imports or re-exports, because Markdown has no grammar to
18
+ * coordinate. Its `content` is any {@link Stringable} (a string or a composed
19
+ * snippet tree) and `toString()` renders it verbatim. Written through
20
+ * `GenerateContext.registerMarkdown`.
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * import { MarkdownFile } from '@skmtc/core';
25
+ *
26
+ * const doc = new MarkdownFile({
27
+ * path: '@/docs/GetPet.generated.md',
28
+ * content: '# Get pet'
29
+ * });
30
+ *
31
+ * console.log(doc.toString()); // '# Get pet'
32
+ * ```
33
+ */
34
+ export declare class MarkdownFile extends FileBase {
35
+ /** The file type, always 'markdown' for Markdown files */
36
+ fileType: 'markdown';
37
+ /** The Markdown content to write to the file */
38
+ content: Stringable;
39
+ /**
40
+ * Creates a new MarkdownFile instance.
41
+ *
42
+ * @param args - Markdown file configuration
43
+ * @param args.path - The output path for this Markdown file
44
+ * @param args.content - The Markdown content to write
45
+ */
46
+ constructor({ path, content }: MarkdownFileArgs);
47
+ /**
48
+ * Renders the Markdown content to a string.
49
+ *
50
+ * @returns The Markdown content as a string
51
+ */
52
+ toString(): string;
53
+ }
54
+ export {};
55
+ //# sourceMappingURL=MarkdownFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownFile.d.ts","sourceRoot":"","sources":["../../src/dsl/MarkdownFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;GAEG;AACH,KAAK,gBAAgB,GAAG;IACtB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAA;IACZ,gDAAgD;IAChD,OAAO,EAAE,UAAU,CAAA;CACpB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,YAAa,SAAQ,QAAQ;IACxC,0DAA0D;IAC1D,QAAQ,EAAE,UAAU,CAAa;IAEjC,gDAAgD;IAChD,OAAO,EAAE,UAAU,CAAA;IAEnB;;;;;;OAMG;gBACS,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,gBAAgB;IAK/C;;;;OAIG;IACM,QAAQ,IAAI,MAAM;CAG5B"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MarkdownFile = void 0;
4
+ const FileBase_js_1 = require("./FileBase.js");
5
+ /**
6
+ * Represents a Markdown file in the SKMTC DSL system.
7
+ *
8
+ * The Markdown counterpart of {@link import('@/dsl/JsonFile.ts').JsonFile}: a
9
+ * degenerate, non-code file that extends {@link FileBase} directly — it holds
10
+ * no definitions, imports or re-exports, because Markdown has no grammar to
11
+ * coordinate. Its `content` is any {@link Stringable} (a string or a composed
12
+ * snippet tree) and `toString()` renders it verbatim. Written through
13
+ * `GenerateContext.registerMarkdown`.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * import { MarkdownFile } from '@skmtc/core';
18
+ *
19
+ * const doc = new MarkdownFile({
20
+ * path: '@/docs/GetPet.generated.md',
21
+ * content: '# Get pet'
22
+ * });
23
+ *
24
+ * console.log(doc.toString()); // '# Get pet'
25
+ * ```
26
+ */
27
+ class MarkdownFile extends FileBase_js_1.FileBase {
28
+ /**
29
+ * Creates a new MarkdownFile instance.
30
+ *
31
+ * @param args - Markdown file configuration
32
+ * @param args.path - The output path for this Markdown file
33
+ * @param args.content - The Markdown content to write
34
+ */
35
+ constructor({ path, content }) {
36
+ super({ path });
37
+ /** The file type, always 'markdown' for Markdown files */
38
+ Object.defineProperty(this, "fileType", {
39
+ enumerable: true,
40
+ configurable: true,
41
+ writable: true,
42
+ value: 'markdown'
43
+ });
44
+ /** The Markdown content to write to the file */
45
+ Object.defineProperty(this, "content", {
46
+ enumerable: true,
47
+ configurable: true,
48
+ writable: true,
49
+ value: void 0
50
+ });
51
+ this.content = content;
52
+ }
53
+ /**
54
+ * Renders the Markdown content to a string.
55
+ *
56
+ * @returns The Markdown content as a string
57
+ */
58
+ toString() {
59
+ return this.content.toString();
60
+ }
61
+ }
62
+ exports.MarkdownFile = MarkdownFile;
@@ -16,8 +16,10 @@ type CreateModelArgs<V extends GeneratedValue, EnrichmentType> = {
16
16
  * peer's enrichment for this variant, asserts the variant exists
17
17
  * (or is the default `'main'` which is always permitted), and
18
18
  * threads it into the projection's `ContentSettings`.
19
+ * Optional — omitting it means `'main'`, so variants-unaware
20
+ * callers keep working unchanged.
19
21
  */
20
- variant: string;
22
+ variant?: string;
21
23
  };
22
24
  /**
23
25
  * Driver for the model insertion lifecycle.
@@ -1 +1 @@
1
- {"version":3,"file":"ModelDriver.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,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AO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;gBAEH,EACV,OAAO,EACP,UAAU,EACV,OAAO,EACP,eAAe,EACf,OAAO,EACP,QAAQ,EACR,OAAyB,EAC1B,EAAE,eAAe,CAAC,CAAC,EAAE,cAAc,CAAC;IA0BrC,OAAO,CAAC,KAAK;IAoBb;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,aAAa;IAkCrB,OAAO,CAAC,gBAAgB;CAsBzB"}
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ModelDriver = void 0;
7
- const normalize_js_1 = require("../../deps/jsr.io/@std/path/1.1.4/normalize.js");
7
+ const normalize_js_1 = require("../../deps/jsr.io/@std/path/1.1.6/normalize.js");
8
8
  const GeneratorKeys_js_1 = require("../GeneratorKeys.js");
9
9
  const Variant_js_1 = require("../../types/Variant.js");
10
10
  const get_js_1 = __importDefault(require("lodash-es/get.js"));
@@ -18,7 +18,7 @@ const get_js_1 = __importDefault(require("lodash-es/get.js"));
18
18
  * from the projection's `exportPath`.
19
19
  */
20
20
  class ModelDriver {
21
- constructor({ context, projection, refName, destinationPath, rootRef, noExport, variant }) {
21
+ constructor({ context, projection, refName, destinationPath, rootRef, noExport, variant = Variant_js_1.DEFAULT_VARIANT }) {
22
22
  Object.defineProperty(this, "context", {
23
23
  enumerable: true,
24
24
  configurable: true,
@@ -87,6 +87,7 @@ class ModelDriver {
87
87
  refName,
88
88
  variant
89
89
  });
90
+ assertPeerSupported({ context, projection, refName, variant });
90
91
  this.settings = this.context.toModelContentSettings({ refName, projection, variant });
91
92
  this.definition = this.apply({ destinationPath });
92
93
  this.context.modelDepth[`${projection.id}:${refName}`] = 0;
@@ -197,3 +198,29 @@ const assertPeerVariantExists = ({ context, generatorId, refName, variant }) =>
197
198
  `Available variants: ${available}.`);
198
199
  }
199
200
  };
201
+ /**
202
+ * Guard the peer-capability invariant for model insertions.
203
+ *
204
+ * `insertModel` materialises a peer's Definition regardless of the peer's
205
+ * `skip` / `include` configuration — dependency edges are intentionally
206
+ * filter-blind. Capability is different: a peer's `isSupported` declares
207
+ * which models it can serve *at all*. Handing a peer a model it has declared
208
+ * unsupported would build a broken Definition or crash inside the peer's
209
+ * constructor.
210
+ *
211
+ * The Driver throws here instead. The throw unwinds into `GenerateContext`'s
212
+ * per-item `try/catch`, so the *calling* generator's item is recorded as
213
+ * `error` and the run continues — loud, isolated failure rather than silent
214
+ * broken output.
215
+ *
216
+ * A peer that exposes no static `isSupported` is treated as supporting every
217
+ * model: `toModelProjectionBase` defaults it to `() => true`, and a
218
+ * hand-rolled projection may omit it.
219
+ */
220
+ const assertPeerSupported = ({ context, projection, refName, variant }) => {
221
+ const isSupported = projection.isSupported ?? (() => true);
222
+ if (!isSupported({ refName, context, variant })) {
223
+ throw new Error(`[${projection.id}] Cannot insert '${refName}' — peer generator ` +
224
+ `does not support this model (isSupported returned false).`);
225
+ }
226
+ };
@@ -1,14 +1,30 @@
1
1
  import type { RefName } from '../../types/RefName.js';
2
2
  import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
3
- import type { TransformModelArgs, ToModelPreviewModuleArgs, ToModelMappingArgs, ToModelEnrichmentsArgs } from './types.js';
3
+ import type { TransformModelArgs, ToModelPreviewModuleArgs, ToModelEnrichmentsArgs, IsSupportedModelArgs } from './types.js';
4
+ import type { PreviewModule } from '../../types/Preview.js';
4
5
  import type * as v from 'valibot';
5
- import type { MappingModule, PreviewModule } from '../../types/Preview.js';
6
6
  type ToModelEntryArgs<EnrichmentType = undefined> = {
7
7
  id: string;
8
8
  transform: ({ context, refName, variant }: TransformModelArgs) => void;
9
9
  toEnrichmentSchema: () => v.GenericSchema<EnrichmentType>;
10
+ isSupported?: (args: IsSupportedModelArgs) => boolean;
11
+ /**
12
+ * Optional: whether this generator entry supports variants. Defaults to a
13
+ * function returning `false` when omitted.
14
+ */
15
+ supportsVariant?: () => boolean;
10
16
  toPreviewModule?: ({ context, refName, variant }: ToModelPreviewModuleArgs) => PreviewModule;
11
- toMappingModule?: ({ context, refName, variant }: ToModelMappingArgs) => MappingModule;
17
+ toEnrichmentRequest?: <RequestedEnrichment extends EnrichmentType>(refName: RefName) => EnrichmentRequest<RequestedEnrichment> | undefined;
18
+ toEnrichmentDefaults?: ({ refName, context, variant }: ToModelEnrichmentsArgs) => EnrichmentType | undefined;
19
+ };
20
+ export type ModelEntry<EnrichmentType = undefined> = {
21
+ id: string;
22
+ type: 'model';
23
+ transform: ({ context, refName, variant }: TransformModelArgs) => void;
24
+ isSupported: (args: IsSupportedModelArgs) => boolean;
25
+ supportsVariant: () => boolean;
26
+ toPreviewModule?: ({ context, refName, variant }: ToModelPreviewModuleArgs) => PreviewModule;
27
+ toEnrichmentSchema: () => v.GenericSchema<EnrichmentType>;
12
28
  toEnrichmentRequest?: <RequestedEnrichment extends EnrichmentType>(refName: RefName) => EnrichmentRequest<RequestedEnrichment> | undefined;
13
29
  toEnrichmentDefaults?: ({ refName, context, variant }: ToModelEnrichmentsArgs) => EnrichmentType | undefined;
14
30
  };
@@ -26,8 +42,11 @@ type ToModelEntryArgs<EnrichmentType = undefined> = {
26
42
  * @param args - Configuration for the model entry
27
43
  * @param args.id - Unique identifier for this model entry
28
44
  * @param args.transform - Function to transform schemas into artifacts
45
+ * @param args.isSupported - Optional capability gate; a model whose predicate
46
+ * returns `false` is recorded `notSupported` and its `transform` is skipped.
47
+ * Resolve the schema inside the predicate when needed
48
+ * (`context.resolveSchemaRefOnce(refName, id)`). Defaults to supporting every model.
29
49
  * @param args.toPreviewModule - Optional function to generate preview modules
30
- * @param args.toMappingModule - Optional function to generate mapping modules
31
50
  * @param args.toEnrichmentSchema - Optional function to provide enrichment validation
32
51
  * @param args.toEnrichmentRequest - Optional function to request enrichments
33
52
  * @returns Model entry object for use in the generation pipeline
@@ -67,15 +86,6 @@ type ToModelEntryArgs<EnrichmentType = undefined> = {
67
86
  * });
68
87
  * ```
69
88
  */
70
- export declare const toModelEntry: <EnrichmentType = undefined>({ id, transform, toPreviewModule, toMappingModule, toEnrichmentSchema, toEnrichmentRequest, toEnrichmentDefaults }: ToModelEntryArgs<EnrichmentType>) => {
71
- id: string;
72
- type: "model";
73
- transform: ({ context, refName, variant }: TransformModelArgs) => void;
74
- toPreviewModule?: ({ context, refName, variant }: ToModelPreviewModuleArgs) => PreviewModule;
75
- toMappingModule?: ({ context, refName, variant }: ToModelMappingArgs) => MappingModule;
76
- toEnrichmentSchema: () => v.GenericSchema<EnrichmentType>;
77
- toEnrichmentRequest?: <RequestedEnrichment extends EnrichmentType>(refName: RefName) => EnrichmentRequest<RequestedEnrichment> | undefined;
78
- toEnrichmentDefaults?: ({ refName, context, variant }: ToModelEnrichmentsArgs) => EnrichmentType | undefined;
79
- };
89
+ export declare const toModelEntry: <EnrichmentType = undefined>({ id, transform, isSupported, supportsVariant, toPreviewModule, toEnrichmentSchema, toEnrichmentRequest, toEnrichmentDefaults }: ToModelEntryArgs<EnrichmentType>) => ModelEntry<EnrichmentType>;
80
90
  export {};
81
91
  //# sourceMappingURL=toModelEntry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toModelEntry.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelEntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,KAAK,EACV,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAE1E,KAAK,gBAAgB,CAAC,cAAc,GAAG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
16
  * @param args.id - Unique identifier for this model entry
17
17
  * @param args.transform - Function to transform schemas into artifacts
18
+ * @param args.isSupported - Optional capability gate; a model whose predicate
19
+ * returns `false` is recorded `notSupported` and its `transform` is skipped.
20
+ * Resolve the schema inside the predicate when needed
21
+ * (`context.resolveSchemaRefOnce(refName, id)`). Defaults to supporting every model.
18
22
  * @param args.toPreviewModule - Optional function to generate preview modules
19
- * @param args.toMappingModule - Optional function to generate mapping modules
20
23
  * @param args.toEnrichmentSchema - Optional function to provide enrichment validation
21
24
  * @param args.toEnrichmentRequest - Optional function to request enrichments
22
25
  * @returns Model entry object for use in the generation pipeline
@@ -56,13 +59,14 @@ exports.toModelEntry = void 0;
56
59
  * });
57
60
  * ```
58
61
  */
59
- const toModelEntry = ({ id, transform, toPreviewModule, toMappingModule, toEnrichmentSchema, toEnrichmentRequest, toEnrichmentDefaults }) => {
62
+ const toModelEntry = ({ id, transform, isSupported, supportsVariant, toPreviewModule, toEnrichmentSchema, toEnrichmentRequest, toEnrichmentDefaults }) => {
60
63
  return {
61
64
  id,
62
65
  type: 'model',
63
66
  transform,
67
+ isSupported: isSupported ?? (() => true),
68
+ supportsVariant: supportsVariant ?? (() => false),
64
69
  toPreviewModule,
65
- toMappingModule,
66
70
  toEnrichmentSchema,
67
71
  toEnrichmentRequest,
68
72
  toEnrichmentDefaults
@@ -2,7 +2,7 @@ import type { GenerateContextType } from '../../context/generateTypes.js';
2
2
  import type { InsertModelOptions, InsertNormalizedModelArgs, InsertNormalizedModelReturn } from '../../context/generateTypes.js';
3
3
  import type { RefName } from '../../types/RefName.js';
4
4
  import type { ContentSettings } from '../ContentSettings.js';
5
- import type { Lang, LangSnippetConstructor } from '../Lang.js';
5
+ import type { LangSnippetConstructor } from '../Lang.js';
6
6
  import type { IdentifierType } from '../IdentifierType.js';
7
7
  import type { GeneratedValue } from '../GeneratedValue.js';
8
8
  import type { Inserted } from '../Inserted.js';
@@ -31,24 +31,24 @@ type ToEnrichmentsArgs = {
31
31
  /**
32
32
  * Configuration for {@link toModelProjectionBase}.
33
33
  *
34
- * Generic over the language `L`: a language veneer parameterizes this config
35
- * (`ModelProjectionBaseConfig<E, KtLang>`) so `toIdentifierType`'s return
36
- * tightens to that language's `IdentifierType<L>` — no recast. A bare
37
- * config (`L = Lang`) keeps the loose `kind: string` boundary.
34
+ * Generic over the identifier-type shape `IdType`: a language veneer
35
+ * parameterizes this config with its own `XxIdentifierType`
36
+ * (`ModelProjectionBaseConfig<E, KtIdentifierType>`) so `toIdentifierType`'s
37
+ * return tightens to that language's `type` vocabulary — no recast. The
38
+ * default keeps the loose `type: string` boundary.
38
39
  */
39
- export type ModelProjectionBaseConfig<EnrichmentType = undefined, L extends Lang = Lang> = {
40
+ export type ModelProjectionBaseConfig<EnrichmentType = undefined, IdType extends IdentifierType = IdentifierType> = {
40
41
  id: string;
41
42
  /** Pure: the cache-key name (the cache-check path runs this). */
42
43
  toIdentifierName: (args: ToModelIdentifierNameArgs<EnrichmentType>) => string;
43
44
  /**
44
45
  * Context-aware, overridable: the non-`name` parts of the identifier
45
- * (`kind` / `typeName` / `exported`), derived from the schema. Runs only
46
- * on cache-miss. Returns this language's `IdentifierType<L>` — the `kind`
47
- * is bound to `L`'s `EntityKind` vocabulary (the loose `string` when
48
- * `L = Lang`). The tightening rides the type argument, replacing the old
49
- * veneer recast.
46
+ * (`type` / `typeName` / `exported`), derived from the schema. Runs only
47
+ * on cache-miss. Returns `IdType` — the veneer's `XxIdentifierType`, whose
48
+ * `type` is bound to that language's `EntityType` vocabulary (the loose
49
+ * `string` by default). The tightening rides the type argument.
50
50
  */
51
- toIdentifierType: (refName: RefName, context: GenerateContextType) => IdentifierType<L>;
51
+ toIdentifierType: (refName: RefName, context: GenerateContextType) => IdType;
52
52
  toExportPath: (args: ToModelExportPathArgs<EnrichmentType>) => string;
53
53
  /**
54
54
  * Required composite schema for the `{ subject, generator, stack }`
@@ -66,6 +66,16 @@ export type ModelProjectionBaseConfig<EnrichmentType = undefined, L extends Lang
66
66
  * static returns `undefined`.
67
67
  */
68
68
  toEnrichmentDefaults?: (args: ToEnrichmentsArgs) => EnrichmentType | undefined;
69
+ /**
70
+ * Family-level applicability predicate. Becomes a static `isSupported`
71
+ * on the returned base class so other projections can probe it before
72
+ * `insertModel` (the model counterpart of the operation-reference
73
+ * protocol). When omitted, advertises support for every model.
74
+ */
75
+ isSupported?: (args: {
76
+ refName: RefName;
77
+ context: GenerateContextType;
78
+ }) => boolean;
69
79
  };
70
80
  /**
71
81
  * Build a model projection base class from a per-generator config.
@@ -75,8 +85,8 @@ export type ModelProjectionBaseConfig<EnrichmentType = undefined, L extends Lang
75
85
  * while core stays language-blind (the base arrives as an opaque
76
86
  * constructor; core never names a concrete language class). The class
77
87
  * exposes the generator's `id`, `toIdentifierName`, `toIdentifierType`,
78
- * `toExportPath`, and `toEnrichments` statics, inherits the static `lang`
79
- * from the base, and
88
+ * `toExportPath`, `toEnrichments`, and `isSupported` statics, inherits the
89
+ * static `lang` from the base, and
80
90
  * injects `generatorKey` so subclasses don't have to.
81
91
  *
82
92
  * Defines NO `register` / `registerInto` — register ergonomics are typed by
@@ -86,7 +96,7 @@ export type ModelProjectionBaseConfig<EnrichmentType = undefined, L extends Lang
86
96
  * The projection machinery previously hosted on `ModelProjectionBase` lives
87
97
  * here now, because the base class is no longer statically known.
88
98
  */
89
- export declare const toModelProjectionBase: <EnrichmentType = undefined, L extends Lang = Lang>(base: LangSnippetConstructor<L>, config: ModelProjectionBaseConfig<EnrichmentType, L>) => {
99
+ export declare const toModelProjectionBase: <EnrichmentType = undefined, IdType extends IdentifierType = IdentifierType>(base: LangSnippetConstructor, config: ModelProjectionBaseConfig<EnrichmentType, IdType>) => {
90
100
  new (args: ModelProjectionArgs<EnrichmentType>): {
91
101
  settings: ContentSettings<EnrichmentType>;
92
102
  refName: RefName;
@@ -109,7 +119,7 @@ export declare const toModelProjectionBase: <EnrichmentType = undefined, L exten
109
119
  id: string;
110
120
  type: "model";
111
121
  toIdentifierName: (args: ToModelIdentifierNameArgs<EnrichmentType>) => string;
112
- toIdentifierType: (refName: RefName, context: GenerateContextType) => IdentifierType<L>;
122
+ toIdentifierType: (refName: RefName, context: GenerateContextType) => IdType;
113
123
  toExportPath: (args: ToModelExportPathArgs<EnrichmentType>) => string;
114
124
  toEnrichments: ({ refName, context, variant }: ToEnrichmentsArgs) => EnrichmentType;
115
125
  /**
@@ -118,8 +128,11 @@ export declare const toModelProjectionBase: <EnrichmentType = undefined, L exten
118
128
  * generator declares no `toEnrichmentDefaults` — the common case.
119
129
  */
120
130
  toEnrichmentDefaults: (args: ToEnrichmentsArgs) => EnrichmentType | undefined;
121
- isSupported: () => boolean;
122
- lang: L;
131
+ isSupported: (args: {
132
+ refName: RefName;
133
+ context: GenerateContextType;
134
+ }) => boolean;
135
+ lang: import("../Lang.js").Lang;
123
136
  };
124
137
  export {};
125
138
  //# sourceMappingURL=toModelProjectionBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toModelProjectionBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelProjectionBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAC5B,MAAM,gCAAgC,CAAA;AAEvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAA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C,yBAAyB,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC,YAC3E,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,SAAS,CAAC,GACxD,2BAA2B,CAAC,CAAC,EAAE,MAAM,CAAC;;;;;;;UA7E3B,OAAO;2EA/DgD,MAAM;gCAQjD,OAAO,WAAW,mBAAmB;mEACF,MAAM;oBA2D3C,+BAA+B,iBAAiB,KAAG,cAAc;IAgBzF;;;;OAIG;2BAC4B,MAAM,iBAAiB,KAAG,cAAc,GAAG,SAAS;wBAzDhE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,mBAAmB,CAAA;KAAE,KAAK,OAAO;;CA2HpF,CAAA"}
@@ -50,8 +50,8 @@ const get_js_1 = __importDefault(require("lodash-es/get.js"));
50
50
  * while core stays language-blind (the base arrives as an opaque
51
51
  * constructor; core never names a concrete language class). The class
52
52
  * exposes the generator's `id`, `toIdentifierName`, `toIdentifierType`,
53
- * `toExportPath`, and `toEnrichments` statics, inherits the static `lang`
54
- * from the base, and
53
+ * `toExportPath`, `toEnrichments`, and `isSupported` statics, inherits the
54
+ * static `lang` from the base, and
55
55
  * injects `generatorKey` so subclasses don't have to.
56
56
  *
57
57
  * Defines NO `register` / `registerInto` — register ergonomics are typed by
@@ -179,7 +179,7 @@ const toModelProjectionBase = (base, config) => {
179
179
  enumerable: true,
180
180
  configurable: true,
181
181
  writable: true,
182
- value: () => true
182
+ value: config.isSupported ?? (() => true)
183
183
  }),
184
184
  _a;
185
185
  };
@@ -5,9 +5,6 @@ import type { RefName } from '../../types/RefName.js';
5
5
  import type { IdentifierType } from '../IdentifierType.js';
6
6
  import type { IdentifierBase } from '../IdentifierBase.js';
7
7
  import type { GeneratedValue } from '../GeneratedValue.js';
8
- import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
9
- import type * as v from 'valibot';
10
- import type { MappingModule, PreviewModule } from '../../types/Preview.js';
11
8
  import type { SchemaToValueFn } from '../../types/TypeSystem.js';
12
9
  /**
13
10
  * External constructor signature for a model projection class.
@@ -43,6 +40,20 @@ export type TransformModelArgs = {
43
40
  */
44
41
  variant: string;
45
42
  };
43
+ /**
44
+ * Arguments a model generator's `isSupported` predicate receives at the
45
+ * entry/dispatch boundary. The capability counterpart of
46
+ * {@link TransformModelArgs}: it carries the resolved enrichment umbrella so
47
+ * the predicate can gate on user config, but no schema — the predicate
48
+ * resolves the schema itself (`context.resolveSchemaRefOnce(refName, id)`)
49
+ * when it needs it, mirroring how `transform` works.
50
+ */
51
+ export type IsSupportedModelArgs = {
52
+ context: GenerateContextType;
53
+ refName: RefName;
54
+ /** Model variant being probed (see {@link Variant}) */
55
+ variant: string;
56
+ };
46
57
  export type ToModelPreviewModuleArgs = {
47
58
  context: GenerateContextType;
48
59
  refName: RefName;
@@ -96,13 +107,21 @@ export type ModelProjection<V extends GeneratedValue, EnrichmentType = undefined
96
107
  toIdentifierName: (args: ToModelIdentifierNameArgs<EnrichmentType>) => string;
97
108
  /**
98
109
  * Context-aware, overridable: the non-`name` parts of the identifier
99
- * (`kind` / `typeName` / `exported`), derived from the schema. The engine
110
+ * (`type` / `typeName` / `exported`), derived from the schema. The engine
100
111
  * assembles `lang.toIdentifier({ name: toIdentifierName(args),
101
112
  * ...toIdentifierType(refName, context) })`.
102
113
  */
103
114
  toIdentifierType: (refName: RefName, context: GenerateContextType) => IdentifierType;
104
115
  toExportPath: (args: ToModelExportPathArgs<EnrichmentType>) => string;
105
116
  toEnrichments: ({ refName, context, variant }: ToModelEnrichmentsArgs) => EnrichmentType;
117
+ /**
118
+ * Family-level capability predicate, surfaced as a static by
119
+ * `toModelProjectionBase` (default `() => true`). The Driver probes it on
120
+ * every `insertModel` so a peer is never handed a model it has declared
121
+ * unsupported. Optional: a hand-rolled projection may omit it, in which
122
+ * case it is treated as supporting every model.
123
+ */
124
+ isSupported?: (args: IsSupportedModelArgs) => boolean;
106
125
  schemaToValueFn: SchemaToValueFn;
107
126
  /**
108
127
  * The inline-schema fallback seam used by `insertNormalizedModel` when a
@@ -112,27 +131,4 @@ export type ModelProjection<V extends GeneratedValue, EnrichmentType = undefined
112
131
  */
113
132
  createIdentifier: (name: string) => IdentifierBase;
114
133
  } & Function;
115
- /**
116
- * Pipeline-side configuration for a model projection (built by
117
- * `toModelEntry`). Carries the iteration callback (`transform`) and
118
- * optional preview/mapping/enrichment hooks.
119
- */
120
- export type ModelConfig<EnrichmentType = undefined> = {
121
- id: string;
122
- type: 'model';
123
- transform: ({ context, refName, variant }: TransformModelArgs) => void;
124
- toPreviewModule?: ({ context, refName, variant }: ToModelPreviewModuleArgs) => PreviewModule;
125
- toMappingModule?: ({ context, refName, variant }: ToModelMappingArgs) => MappingModule;
126
- toEnrichmentSchema: () => v.GenericSchema<EnrichmentType>;
127
- toEnrichmentRequest?: <RequestedEnrichment extends EnrichmentType>(refName: RefName) => EnrichmentRequest<RequestedEnrichment> | undefined;
128
- /**
129
- * Optional: compute the DEFAULT enrichment values for a model from its schema
130
- * — the seed the CMS persists and the user then edits. The pipeline
131
- * counterpart of the projection base's static of the same name; a generator
132
- * forwards `MyProjection.toEnrichmentDefaults` here so the seeding pass can
133
- * reach it via the generator-config map. Returns the `{ subject, generator,
134
- * stack }` umbrella, or `undefined` when no defaults are advertised.
135
- */
136
- toEnrichmentDefaults?: ({ refName, context, variant }: ToModelEnrichmentsArgs) => EnrichmentType | undefined;
137
- };
138
134
  //# sourceMappingURL=types.d.ts.map