@baseplate-dev/project-builder-lib 0.5.3 → 0.6.1

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 (369) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/dist/definition/index.d.ts +0 -1
  3. package/dist/definition/index.d.ts.map +1 -1
  4. package/dist/definition/index.js +0 -1
  5. package/dist/definition/index.js.map +1 -1
  6. package/dist/definition/model/model-field-utils.js +2 -2
  7. package/dist/definition/model/model-field-utils.js.map +1 -1
  8. package/dist/definition/model/model-utils.d.ts.map +1 -1
  9. package/dist/definition/model/model-utils.js +2 -2
  10. package/dist/definition/model/model-utils.js.map +1 -1
  11. package/dist/definition/project-definition-container.d.ts +21 -12
  12. package/dist/definition/project-definition-container.d.ts.map +1 -1
  13. package/dist/definition/project-definition-container.js +42 -23
  14. package/dist/definition/project-definition-container.js.map +1 -1
  15. package/dist/migrations/index.d.ts.map +1 -1
  16. package/dist/migrations/index.js +6 -0
  17. package/dist/migrations/index.js.map +1 -1
  18. package/dist/migrations/migration-024-graphql-object-type-field-auth.d.ts +30 -0
  19. package/dist/migrations/migration-024-graphql-object-type-field-auth.d.ts.map +1 -0
  20. package/dist/migrations/migration-024-graphql-object-type-field-auth.js +54 -0
  21. package/dist/migrations/migration-024-graphql-object-type-field-auth.js.map +1 -0
  22. package/dist/migrations/migration-025-service-method-auth.d.ts +44 -0
  23. package/dist/migrations/migration-025-service-method-auth.d.ts.map +1 -0
  24. package/dist/migrations/migration-025-service-method-auth.js +62 -0
  25. package/dist/migrations/migration-025-service-method-auth.js.map +1 -0
  26. package/dist/migrations/migration-026-query-shared-roles.d.ts +32 -0
  27. package/dist/migrations/migration-026-query-shared-roles.d.ts.map +1 -0
  28. package/dist/migrations/migration-026-query-shared-roles.js +48 -0
  29. package/dist/migrations/migration-026-query-shared-roles.js.map +1 -0
  30. package/dist/parser/apply-definition-fixes.d.ts +13 -0
  31. package/dist/parser/apply-definition-fixes.d.ts.map +1 -0
  32. package/dist/parser/apply-definition-fixes.js +25 -0
  33. package/dist/parser/apply-definition-fixes.js.map +1 -0
  34. package/dist/parser/clean-default-values.d.ts +14 -0
  35. package/dist/parser/clean-default-values.d.ts.map +1 -0
  36. package/dist/parser/clean-default-values.js +24 -0
  37. package/dist/parser/clean-default-values.js.map +1 -0
  38. package/dist/parser/collect-definition-issues.d.ts +36 -0
  39. package/dist/parser/collect-definition-issues.d.ts.map +1 -0
  40. package/dist/parser/collect-definition-issues.js +94 -0
  41. package/dist/parser/collect-definition-issues.js.map +1 -0
  42. package/dist/parser/collect-expression-issues.d.ts +17 -0
  43. package/dist/parser/collect-expression-issues.d.ts.map +1 -0
  44. package/dist/parser/collect-expression-issues.js +33 -0
  45. package/dist/parser/collect-expression-issues.js.map +1 -0
  46. package/dist/parser/definition-issue-checkers/mutation-roles-checker.d.ts +11 -0
  47. package/dist/parser/definition-issue-checkers/mutation-roles-checker.d.ts.map +1 -0
  48. package/dist/parser/definition-issue-checkers/mutation-roles-checker.js +41 -0
  49. package/dist/parser/definition-issue-checkers/mutation-roles-checker.js.map +1 -0
  50. package/dist/parser/definition-issue-checkers/relation-type-mismatch-checker.d.ts +10 -0
  51. package/dist/parser/definition-issue-checkers/relation-type-mismatch-checker.d.ts.map +1 -0
  52. package/dist/parser/definition-issue-checkers/relation-type-mismatch-checker.js +36 -0
  53. package/dist/parser/definition-issue-checkers/relation-type-mismatch-checker.js.map +1 -0
  54. package/dist/parser/definition-issue-utils.d.ts +23 -0
  55. package/dist/parser/definition-issue-utils.d.ts.map +1 -0
  56. package/dist/parser/definition-issue-utils.js +33 -0
  57. package/dist/parser/definition-issue-utils.js.map +1 -0
  58. package/dist/parser/index.d.ts +9 -0
  59. package/dist/parser/index.d.ts.map +1 -1
  60. package/dist/parser/index.js +8 -0
  61. package/dist/parser/index.js.map +1 -1
  62. package/dist/parser/parser.d.ts.map +1 -1
  63. package/dist/parser/parser.js +7 -2
  64. package/dist/parser/parser.js.map +1 -1
  65. package/dist/parser/schema-structure.d.ts +53 -0
  66. package/dist/parser/schema-structure.d.ts.map +1 -0
  67. package/dist/parser/schema-structure.js +171 -0
  68. package/dist/parser/schema-structure.js.map +1 -0
  69. package/dist/parser/transform-data-with-schema.d.ts +35 -0
  70. package/dist/parser/transform-data-with-schema.d.ts.map +1 -0
  71. package/dist/parser/transform-data-with-schema.js +140 -0
  72. package/dist/parser/transform-data-with-schema.js.map +1 -0
  73. package/dist/parser/types.d.ts +6 -3
  74. package/dist/parser/types.d.ts.map +1 -1
  75. package/dist/parser/walk-data-with-schema.d.ts +46 -0
  76. package/dist/parser/walk-data-with-schema.d.ts.map +1 -0
  77. package/dist/parser/walk-data-with-schema.js +140 -0
  78. package/dist/parser/walk-data-with-schema.js.map +1 -0
  79. package/dist/parser/walk-schema-structure.d.ts +60 -0
  80. package/dist/parser/walk-schema-structure.d.ts.map +1 -0
  81. package/dist/parser/walk-schema-structure.js +163 -0
  82. package/dist/parser/walk-schema-structure.js.map +1 -0
  83. package/dist/plugins/imports/loader.d.ts +1 -1
  84. package/dist/plugins/imports/loader.d.ts.map +1 -1
  85. package/dist/plugins/imports/loader.js +2 -2
  86. package/dist/plugins/imports/loader.js.map +1 -1
  87. package/dist/plugins/imports/types.d.ts +1 -1
  88. package/dist/plugins/imports/types.d.ts.map +1 -1
  89. package/dist/plugins/metadata/types.d.ts +1 -1
  90. package/dist/plugins/metadata/types.js +1 -1
  91. package/dist/plugins/plugins.test-utils.d.ts +15 -0
  92. package/dist/plugins/plugins.test-utils.d.ts.map +1 -1
  93. package/dist/plugins/plugins.test-utils.js +24 -0
  94. package/dist/plugins/plugins.test-utils.js.map +1 -1
  95. package/dist/plugins/spec/config-spec.d.ts +1 -0
  96. package/dist/plugins/spec/config-spec.d.ts.map +1 -1
  97. package/dist/plugins/spec/config-spec.js +1 -0
  98. package/dist/plugins/spec/config-spec.js.map +1 -1
  99. package/dist/plugins/store/store.d.ts +6 -1
  100. package/dist/plugins/store/store.d.ts.map +1 -1
  101. package/dist/plugins/store/store.js +9 -1
  102. package/dist/plugins/store/store.js.map +1 -1
  103. package/dist/references/definition-ref-registry.d.ts +105 -0
  104. package/dist/references/definition-ref-registry.d.ts.map +1 -0
  105. package/dist/references/definition-ref-registry.js +40 -0
  106. package/dist/references/definition-ref-registry.js.map +1 -0
  107. package/dist/references/deserialize-schema.d.ts +4 -6
  108. package/dist/references/deserialize-schema.d.ts.map +1 -1
  109. package/dist/references/deserialize-schema.js +4 -5
  110. package/dist/references/deserialize-schema.js.map +1 -1
  111. package/dist/references/expression-types.d.ts +46 -14
  112. package/dist/references/expression-types.d.ts.map +1 -1
  113. package/dist/references/expression-types.js +17 -0
  114. package/dist/references/expression-types.js.map +1 -1
  115. package/dist/references/extend-parser-context-with-refs.d.ts +32 -2
  116. package/dist/references/extend-parser-context-with-refs.d.ts.map +1 -1
  117. package/dist/references/extend-parser-context-with-refs.js +123 -163
  118. package/dist/references/extend-parser-context-with-refs.js.map +1 -1
  119. package/dist/references/extract-definition-refs.d.ts +9 -8
  120. package/dist/references/extract-definition-refs.d.ts.map +1 -1
  121. package/dist/references/extract-definition-refs.js +110 -26
  122. package/dist/references/extract-definition-refs.js.map +1 -1
  123. package/dist/references/fix-ref-deletions.d.ts +6 -6
  124. package/dist/references/fix-ref-deletions.d.ts.map +1 -1
  125. package/dist/references/fix-ref-deletions.js +2 -2
  126. package/dist/references/fix-ref-deletions.js.map +1 -1
  127. package/dist/references/index.d.ts +3 -0
  128. package/dist/references/index.d.ts.map +1 -1
  129. package/dist/references/index.js +3 -0
  130. package/dist/references/index.js.map +1 -1
  131. package/dist/references/parse-schema-with-references.d.ts +8 -6
  132. package/dist/references/parse-schema-with-references.d.ts.map +1 -1
  133. package/dist/references/parse-schema-with-references.js +10 -12
  134. package/dist/references/parse-schema-with-references.js.map +1 -1
  135. package/dist/references/ref-schema-visitor.d.ts +33 -0
  136. package/dist/references/ref-schema-visitor.d.ts.map +1 -0
  137. package/dist/references/ref-schema-visitor.js +61 -0
  138. package/dist/references/ref-schema-visitor.js.map +1 -0
  139. package/dist/references/resolve-slots.d.ts +1 -1
  140. package/dist/references/resolve-slots.d.ts.map +1 -1
  141. package/dist/references/serialize-schema.d.ts +9 -2
  142. package/dist/references/serialize-schema.d.ts.map +1 -1
  143. package/dist/references/serialize-schema.js +20 -4
  144. package/dist/references/serialize-schema.js.map +1 -1
  145. package/dist/schema/apps/web/admin/admin.d.ts +22 -37
  146. package/dist/schema/apps/web/admin/admin.d.ts.map +1 -1
  147. package/dist/schema/apps/web/admin/sections/crud-actions/admin-crud-action.d.ts +6 -15
  148. package/dist/schema/apps/web/admin/sections/crud-actions/admin-crud-action.d.ts.map +1 -1
  149. package/dist/schema/apps/web/admin/sections/crud-actions/admin-crud-action.js +3 -8
  150. package/dist/schema/apps/web/admin/sections/crud-actions/admin-crud-action.js.map +1 -1
  151. package/dist/schema/apps/web/admin/sections/crud-columns/admin-crud-column.d.ts +6 -15
  152. package/dist/schema/apps/web/admin/sections/crud-columns/admin-crud-column.d.ts.map +1 -1
  153. package/dist/schema/apps/web/admin/sections/crud-columns/admin-crud-column.js +3 -8
  154. package/dist/schema/apps/web/admin/sections/crud-columns/admin-crud-column.js.map +1 -1
  155. package/dist/schema/apps/web/admin/sections/crud-form/admin-crud-input.d.ts +9 -15
  156. package/dist/schema/apps/web/admin/sections/crud-form/admin-crud-input.d.ts.map +1 -1
  157. package/dist/schema/apps/web/admin/sections/crud-form/admin-crud-input.js +3 -8
  158. package/dist/schema/apps/web/admin/sections/crud-form/admin-crud-input.js.map +1 -1
  159. package/dist/schema/apps/web/admin/sections/crud.d.ts +6 -6
  160. package/dist/schema/apps/web/web-app.d.ts +32 -47
  161. package/dist/schema/apps/web/web-app.d.ts.map +1 -1
  162. package/dist/schema/creator/definition-default-registry.d.ts +22 -0
  163. package/dist/schema/creator/definition-default-registry.d.ts.map +1 -0
  164. package/dist/schema/creator/definition-default-registry.js +18 -0
  165. package/dist/schema/creator/definition-default-registry.js.map +1 -0
  166. package/dist/schema/creator/definition-fix-registry.d.ts +45 -0
  167. package/dist/schema/creator/definition-fix-registry.d.ts.map +1 -0
  168. package/dist/schema/creator/definition-fix-registry.js +41 -0
  169. package/dist/schema/creator/definition-fix-registry.js.map +1 -0
  170. package/dist/schema/creator/definition-issue-checker-spec.d.ts +37 -0
  171. package/dist/schema/creator/definition-issue-checker-spec.d.ts.map +1 -0
  172. package/dist/schema/creator/definition-issue-checker-spec.js +28 -0
  173. package/dist/schema/creator/definition-issue-checker-spec.js.map +1 -0
  174. package/dist/schema/creator/definition-issue-checkers.d.ts +16 -0
  175. package/dist/schema/creator/definition-issue-checkers.d.ts.map +1 -0
  176. package/dist/schema/creator/definition-issue-checkers.js +35 -0
  177. package/dist/schema/creator/definition-issue-checkers.js.map +1 -0
  178. package/dist/schema/creator/definition-issue-registry.d.ts +54 -0
  179. package/dist/schema/creator/definition-issue-registry.d.ts.map +1 -0
  180. package/dist/schema/creator/definition-issue-registry.js +47 -0
  181. package/dist/schema/creator/definition-issue-registry.js.map +1 -0
  182. package/dist/schema/creator/definition-issue-types.d.ts +53 -0
  183. package/dist/schema/creator/definition-issue-types.d.ts.map +1 -0
  184. package/dist/schema/creator/definition-issue-types.js +2 -0
  185. package/dist/schema/creator/definition-issue-types.js.map +1 -0
  186. package/dist/schema/creator/extend-parser-context-with-defaults.d.ts +20 -4
  187. package/dist/schema/creator/extend-parser-context-with-defaults.d.ts.map +1 -1
  188. package/dist/schema/creator/extend-parser-context-with-defaults.js +24 -42
  189. package/dist/schema/creator/extend-parser-context-with-defaults.js.map +1 -1
  190. package/dist/schema/creator/index.d.ts +6 -0
  191. package/dist/schema/creator/index.d.ts.map +1 -1
  192. package/dist/schema/creator/index.js +5 -0
  193. package/dist/schema/creator/index.js.map +1 -1
  194. package/dist/schema/creator/schema-creator.d.ts.map +1 -1
  195. package/dist/schema/creator/schema-creator.js +18 -4
  196. package/dist/schema/creator/schema-creator.js.map +1 -1
  197. package/dist/schema/creator/types.d.ts +3 -30
  198. package/dist/schema/creator/types.d.ts.map +1 -1
  199. package/dist/schema/models/authorizer/authorizer-expression-acorn-parser.d.ts.map +1 -1
  200. package/dist/schema/models/authorizer/authorizer-expression-acorn-parser.js +116 -25
  201. package/dist/schema/models/authorizer/authorizer-expression-acorn-parser.js.map +1 -1
  202. package/dist/schema/models/authorizer/authorizer-expression-ast.d.ts +82 -1
  203. package/dist/schema/models/authorizer/authorizer-expression-ast.d.ts.map +1 -1
  204. package/dist/schema/models/authorizer/authorizer-expression-ast.js.map +1 -1
  205. package/dist/schema/models/authorizer/authorizer-expression-parser.d.ts +8 -9
  206. package/dist/schema/models/authorizer/authorizer-expression-parser.d.ts.map +1 -1
  207. package/dist/schema/models/authorizer/authorizer-expression-parser.js +28 -35
  208. package/dist/schema/models/authorizer/authorizer-expression-parser.js.map +1 -1
  209. package/dist/schema/models/authorizer/authorizer-expression-validator.d.ts +42 -4
  210. package/dist/schema/models/authorizer/authorizer-expression-validator.d.ts.map +1 -1
  211. package/dist/schema/models/authorizer/authorizer-expression-validator.js +119 -18
  212. package/dist/schema/models/authorizer/authorizer-expression-validator.js.map +1 -1
  213. package/dist/schema/models/graphql.d.ts +42 -111
  214. package/dist/schema/models/graphql.d.ts.map +1 -1
  215. package/dist/schema/models/graphql.js +59 -19
  216. package/dist/schema/models/graphql.js.map +1 -1
  217. package/dist/schema/models/models.d.ts +1134 -343
  218. package/dist/schema/models/models.d.ts.map +1 -1
  219. package/dist/schema/models/models.js +258 -86
  220. package/dist/schema/models/models.js.map +1 -1
  221. package/dist/schema/plugins/definition.d.ts +2 -30
  222. package/dist/schema/plugins/definition.d.ts.map +1 -1
  223. package/dist/schema/plugins/definition.js +26 -15
  224. package/dist/schema/plugins/definition.js.map +1 -1
  225. package/dist/schema/project-definition.d.ts +532 -186
  226. package/dist/schema/project-definition.d.ts.map +1 -1
  227. package/dist/schema/project-definition.js +15 -3
  228. package/dist/schema/project-definition.js.map +1 -1
  229. package/dist/schema/settings/general.d.ts +1 -1
  230. package/dist/schema/settings/general.d.ts.map +1 -1
  231. package/dist/schema/settings/general.js +4 -1
  232. package/dist/schema/settings/general.js.map +1 -1
  233. package/dist/schema/settings/settings.d.ts +3 -3
  234. package/dist/schema/settings/theme.d.ts +3 -3
  235. package/dist/testing/definition-helpers.test-helper.d.ts +12 -0
  236. package/dist/testing/definition-helpers.test-helper.d.ts.map +1 -0
  237. package/dist/testing/definition-helpers.test-helper.js +77 -0
  238. package/dist/testing/definition-helpers.test-helper.js.map +1 -0
  239. package/dist/testing/expression-stub-parser.test-helper.d.ts +59 -0
  240. package/dist/testing/expression-stub-parser.test-helper.d.ts.map +1 -0
  241. package/dist/testing/expression-stub-parser.test-helper.js +79 -0
  242. package/dist/testing/expression-stub-parser.test-helper.js.map +1 -0
  243. package/dist/testing/expression-warning-parser.test-helper.d.ts +39 -0
  244. package/dist/testing/expression-warning-parser.test-helper.d.ts.map +1 -0
  245. package/dist/testing/expression-warning-parser.test-helper.js +62 -0
  246. package/dist/testing/expression-warning-parser.test-helper.js.map +1 -0
  247. package/dist/testing/index.d.ts +5 -0
  248. package/dist/testing/index.d.ts.map +1 -0
  249. package/dist/testing/index.js +5 -0
  250. package/dist/testing/index.js.map +1 -0
  251. package/dist/testing/parser-context.test-helper.d.ts +8 -0
  252. package/dist/testing/parser-context.test-helper.d.ts.map +1 -0
  253. package/dist/testing/parser-context.test-helper.js +16 -0
  254. package/dist/testing/parser-context.test-helper.js.map +1 -0
  255. package/dist/{definition/project-definition-container.test-utils.d.ts → testing/project-definition-container.test-helper.d.ts} +4 -2
  256. package/dist/testing/project-definition-container.test-helper.d.ts.map +1 -0
  257. package/dist/{definition/project-definition-container.test-utils.js → testing/project-definition-container.test-helper.js} +11 -5
  258. package/dist/testing/project-definition-container.test-helper.js.map +1 -0
  259. package/dist/tools/assign-entity-ids.d.ts +17 -0
  260. package/dist/tools/assign-entity-ids.d.ts.map +1 -0
  261. package/dist/tools/assign-entity-ids.js +34 -0
  262. package/dist/tools/assign-entity-ids.js.map +1 -0
  263. package/dist/tools/entity-service/entity-navigation.d.ts +13 -0
  264. package/dist/tools/entity-service/entity-navigation.d.ts.map +1 -0
  265. package/dist/tools/entity-service/entity-navigation.js +84 -0
  266. package/dist/tools/entity-service/entity-navigation.js.map +1 -0
  267. package/dist/tools/entity-service/entity-read.d.ts +38 -0
  268. package/dist/tools/entity-service/entity-read.d.ts.map +1 -0
  269. package/dist/tools/entity-service/entity-read.js +56 -0
  270. package/dist/tools/entity-service/entity-read.js.map +1 -0
  271. package/dist/tools/entity-service/entity-type-map.d.ts +18 -0
  272. package/dist/tools/entity-service/entity-type-map.d.ts.map +1 -0
  273. package/dist/tools/entity-service/entity-type-map.js +75 -0
  274. package/dist/tools/entity-service/entity-type-map.js.map +1 -0
  275. package/dist/tools/entity-service/entity-write.d.ts +39 -0
  276. package/dist/tools/entity-service/entity-write.d.ts.map +1 -0
  277. package/dist/tools/entity-service/entity-write.js +99 -0
  278. package/dist/tools/entity-service/entity-write.js.map +1 -0
  279. package/dist/tools/entity-service/index.d.ts +5 -0
  280. package/dist/tools/entity-service/index.d.ts.map +1 -0
  281. package/dist/tools/entity-service/index.js +4 -0
  282. package/dist/tools/entity-service/index.js.map +1 -0
  283. package/dist/tools/entity-service/types.d.ts +41 -0
  284. package/dist/tools/entity-service/types.d.ts.map +1 -0
  285. package/dist/tools/entity-service/types.js +2 -0
  286. package/dist/tools/entity-service/types.js.map +1 -0
  287. package/dist/tools/index.d.ts +2 -1
  288. package/dist/tools/index.d.ts.map +1 -1
  289. package/dist/tools/index.js +2 -1
  290. package/dist/tools/index.js.map +1 -1
  291. package/dist/tools/merge-schema/diff-definition.d.ts +74 -0
  292. package/dist/tools/merge-schema/diff-definition.d.ts.map +1 -0
  293. package/dist/tools/merge-schema/diff-definition.js +163 -0
  294. package/dist/tools/merge-schema/diff-definition.js.map +1 -0
  295. package/dist/tools/merge-schema/entity-utils.d.ts +18 -0
  296. package/dist/tools/merge-schema/entity-utils.d.ts.map +1 -0
  297. package/dist/tools/merge-schema/entity-utils.js +42 -0
  298. package/dist/tools/merge-schema/entity-utils.js.map +1 -0
  299. package/dist/tools/merge-schema/index.d.ts +10 -0
  300. package/dist/tools/merge-schema/index.d.ts.map +1 -0
  301. package/dist/tools/merge-schema/index.js +7 -0
  302. package/dist/tools/merge-schema/index.js.map +1 -0
  303. package/dist/tools/merge-schema/merge-data-with-schema.d.ts +21 -0
  304. package/dist/tools/merge-schema/merge-data-with-schema.d.ts.map +1 -0
  305. package/dist/tools/merge-schema/merge-data-with-schema.js +168 -0
  306. package/dist/tools/merge-schema/merge-data-with-schema.js.map +1 -0
  307. package/dist/tools/merge-schema/merge-definition.d.ts +42 -0
  308. package/dist/tools/merge-schema/merge-definition.d.ts.map +1 -0
  309. package/dist/tools/merge-schema/merge-definition.js +53 -0
  310. package/dist/tools/merge-schema/merge-definition.js.map +1 -0
  311. package/dist/tools/merge-schema/merge-rule-registry.d.ts +47 -0
  312. package/dist/tools/merge-schema/merge-rule-registry.d.ts.map +1 -0
  313. package/dist/tools/merge-schema/merge-rule-registry.js +53 -0
  314. package/dist/tools/merge-schema/merge-rule-registry.js.map +1 -0
  315. package/dist/tools/merge-schema/walk-schema.d.ts +26 -0
  316. package/dist/tools/merge-schema/walk-schema.d.ts.map +1 -0
  317. package/dist/tools/merge-schema/walk-schema.js +94 -0
  318. package/dist/tools/merge-schema/walk-schema.js.map +1 -0
  319. package/dist/utils/definition-diff/definition-diff.js.map +1 -1
  320. package/dist/web/components/definition-diff-alert.d.ts +9 -0
  321. package/dist/web/components/definition-diff-alert.d.ts.map +1 -0
  322. package/dist/web/components/definition-diff-alert.js +17 -0
  323. package/dist/web/components/definition-diff-alert.js.map +1 -0
  324. package/dist/web/components/index.d.ts +1 -1
  325. package/dist/web/components/index.d.ts.map +1 -1
  326. package/dist/web/components/index.js +1 -1
  327. package/dist/web/components/index.js.map +1 -1
  328. package/dist/web/hooks/use-project-definition.d.ts +10 -2
  329. package/dist/web/hooks/use-project-definition.d.ts.map +1 -1
  330. package/dist/web/hooks/use-project-definition.js.map +1 -1
  331. package/dist/web/specs/entity-type-url-web-spec.d.ts +68 -0
  332. package/dist/web/specs/entity-type-url-web-spec.d.ts.map +1 -0
  333. package/dist/web/specs/entity-type-url-web-spec.js +27 -0
  334. package/dist/web/specs/entity-type-url-web-spec.js.map +1 -0
  335. package/dist/web/specs/index.d.ts +1 -0
  336. package/dist/web/specs/index.d.ts.map +1 -1
  337. package/dist/web/specs/index.js +1 -0
  338. package/dist/web/specs/index.js.map +1 -1
  339. package/package.json +12 -11
  340. package/dist/definition/project-definition-container.test-utils.d.ts.map +0 -1
  341. package/dist/definition/project-definition-container.test-utils.js.map +0 -1
  342. package/dist/references/collect-refs.d.ts +0 -24
  343. package/dist/references/collect-refs.d.ts.map +0 -1
  344. package/dist/references/collect-refs.js +0 -86
  345. package/dist/references/collect-refs.js.map +0 -1
  346. package/dist/references/markers.d.ts +0 -59
  347. package/dist/references/markers.d.ts.map +0 -1
  348. package/dist/references/markers.js +0 -29
  349. package/dist/references/markers.js.map +0 -1
  350. package/dist/references/strip-ref-markers.d.ts +0 -7
  351. package/dist/references/strip-ref-markers.d.ts.map +0 -1
  352. package/dist/references/strip-ref-markers.js +0 -25
  353. package/dist/references/strip-ref-markers.js.map +0 -1
  354. package/dist/schema/models/mocks.d.ts +0 -6
  355. package/dist/schema/models/mocks.d.ts.map +0 -1
  356. package/dist/schema/models/mocks.js +0 -55
  357. package/dist/schema/models/mocks.js.map +0 -1
  358. package/dist/tools/model-merger/index.d.ts +0 -2
  359. package/dist/tools/model-merger/index.d.ts.map +0 -1
  360. package/dist/tools/model-merger/index.js +0 -2
  361. package/dist/tools/model-merger/index.js.map +0 -1
  362. package/dist/tools/model-merger/model-merger.d.ts +0 -569
  363. package/dist/tools/model-merger/model-merger.d.ts.map +0 -1
  364. package/dist/tools/model-merger/model-merger.js +0 -319
  365. package/dist/tools/model-merger/model-merger.js.map +0 -1
  366. package/dist/web/components/model-merger-result-alert.d.ts +0 -8
  367. package/dist/web/components/model-merger-result-alert.d.ts.map +0 -1
  368. package/dist/web/components/model-merger-result-alert.js +0 -20
  369. package/dist/web/components/model-merger-result-alert.js.map +0 -1
@@ -1,19 +1,13 @@
1
- export declare const createAdminCrudInputSchema: import("../../../../../index.js").DefinitionSchemaCreatorWithSlots<import("zod").ZodPipe<import("zod").ZodObject<{
2
- id: import("zod").ZodDefault<import("zod").ZodString>;
3
- type: import("zod").ZodString;
4
- label: import("zod").ZodString;
5
- }, import("zod/v4/core").$loose>, import("zod").ZodTransform<{
6
- [x: string]: unknown;
7
- id: string;
8
- type: string;
9
- label: string;
10
- }, {
11
- [x: string]: unknown;
12
- id: string;
13
- type: string;
14
- label: string;
15
- }>>, {
1
+ import z from 'zod';
2
+ import type { def } from '#src/schema/creator/index.js';
3
+ export declare const createAdminCrudInputSchema: import("#src/schema/creator/index.js").DefinitionSchemaCreatorWithSlots<z.ZodDiscriminatedUnion<[z.ZodObject<{
4
+ id: z.ZodDefault<z.ZodString>;
5
+ type: z.ZodString;
6
+ label: z.ZodString;
7
+ }, z.z.core.$loose>], "type">, {
16
8
  modelSlot: import("../../../../../../index.js").DefinitionEntityType<false>;
17
9
  adminSectionSlot: import("../../../../../../index.js").DefinitionEntityType<true>;
18
10
  }>;
11
+ export type AdminCrudInputConfig = def.InferOutput<typeof createAdminCrudInputSchema>;
12
+ export type AdminCrudInputConfigInput = def.InferInput<typeof createAdminCrudInputSchema>;
19
13
  //# sourceMappingURL=admin-crud-input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin-crud-input.d.ts","sourceRoot":"","sources":["../../../../../../../src/schema/apps/web/admin/sections/crud-form/admin-crud-input.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;EAWtC,CAAC"}
1
+ {"version":3,"file":"admin-crud-input.d.ts","sourceRoot":"","sources":["../../../../../../../src/schema/apps/web/admin/sections/crud-form/admin-crud-input.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AAUxD,eAAO,MAAM,0BAA0B;;;;;;;EAWtC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC,WAAW,CAChD,OAAO,0BAA0B,CAClC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,UAAU,CACpD,OAAO,0BAA0B,CAClC,CAAC"}
@@ -1,15 +1,10 @@
1
+ import z from 'zod';
1
2
  import { definitionSchemaWithSlots } from '#src/schema/creator/schema-creator.js';
2
3
  import { modelEntityType } from '#src/schema/models/index.js';
3
4
  import { adminSectionEntityType } from '../types.js';
4
5
  import { adminCrudInputSpec } from './admin-input-spec.js';
5
- import { baseAdminCrudInputSchema } from './types.js';
6
6
  export const createAdminCrudInputSchema = definitionSchemaWithSlots({ modelSlot: modelEntityType, adminSectionSlot: adminSectionEntityType }, (ctx, slots) => {
7
- const adminCrudInputs = ctx.plugins.use(adminCrudInputSpec).inputs;
8
- return baseAdminCrudInputSchema.transform((data) => {
9
- const inputDef = adminCrudInputs.get(data.type);
10
- if (!inputDef)
11
- return data;
12
- return inputDef.createSchema(ctx, slots).parse(data);
13
- });
7
+ const { inputs } = ctx.plugins.use(adminCrudInputSpec);
8
+ return z.discriminatedUnion('type', [...inputs.values()].map((input) => input.createSchema(ctx, slots)));
14
9
  });
15
10
  //# sourceMappingURL=admin-crud-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin-crud-input.js","sourceRoot":"","sources":["../../../../../../../src/schema/apps/web/admin/sections/crud-form/admin-crud-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CACjE,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,EACxE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;IACb,MAAM,eAAe,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC;IAEnE,OAAO,wBAAwB,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;QACjD,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC3B,OAAO,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"admin-crud-input.js","sourceRoot":"","sources":["../../../../../../../src/schema/apps/web/admin/sections/crud-form/admin-crud-input.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAI9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CACjE,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,EACxE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;IACb,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IACvD,OAAO,CAAC,CAAC,kBAAkB,CACzB,MAAM,EACN,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAEjE,CACF,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -159,6 +159,7 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
159
159
  type: "crud";
160
160
  modelRef: string;
161
161
  nameFieldRef: string;
162
+ disableCreate: boolean;
162
163
  table: {
163
164
  columns: {
164
165
  [x: string]: unknown;
@@ -166,12 +167,12 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
166
167
  type: string;
167
168
  label: string;
168
169
  }[];
169
- actions?: {
170
+ actions: {
170
171
  [x: string]: unknown;
171
172
  id: string;
172
173
  type: string;
173
174
  position: "inline" | "dropdown";
174
- }[] | undefined;
175
+ }[];
175
176
  };
176
177
  form: {
177
178
  fields: {
@@ -181,7 +182,6 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
181
182
  label: string;
182
183
  }[];
183
184
  };
184
- disableCreate?: boolean | undefined;
185
185
  embeddedForms?: ({
186
186
  id: string;
187
187
  name: string;
@@ -299,6 +299,7 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
299
299
  type: "crud";
300
300
  modelRef: string;
301
301
  nameFieldRef: string;
302
+ disableCreate: boolean;
302
303
  table: {
303
304
  columns: {
304
305
  [x: string]: unknown;
@@ -306,12 +307,12 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
306
307
  type: string;
307
308
  label: string;
308
309
  }[];
309
- actions?: {
310
+ actions: {
310
311
  [x: string]: unknown;
311
312
  id: string;
312
313
  type: string;
313
314
  position: "inline" | "dropdown";
314
- }[] | undefined;
315
+ }[];
315
316
  };
316
317
  form: {
317
318
  fields: {
@@ -321,7 +322,6 @@ export declare const createAdminCrudSectionSchema: import("#src/schema/creator/i
321
322
  label: string;
322
323
  }[];
323
324
  };
324
- disableCreate?: boolean | undefined;
325
325
  embeddedForms?: ({
326
326
  id: string;
327
327
  name: string;
@@ -3,16 +3,16 @@ import type { def } from '#src/schema/creator/index.js';
3
3
  export declare const createWebAppSchema: import("#src/schema/creator/index.js").DefinitionSchemaCreatorWithSlots<z.ZodObject<{
4
4
  devPort: z.ZodNumber;
5
5
  type: z.ZodLiteral<"web">;
6
- includeAuth: z.ZodOptional<z.ZodType<boolean | undefined, boolean | undefined, z.core.$ZodTypeInternals<boolean | undefined, boolean | undefined>>>;
6
+ includeAuth: z.ZodPrefault<z.ZodBoolean>;
7
7
  title: z.ZodDefault<z.ZodString>;
8
8
  description: z.ZodDefault<z.ZodString>;
9
- includeUploadComponents: z.ZodOptional<z.ZodType<boolean | undefined, boolean | undefined, z.core.$ZodTypeInternals<boolean | undefined, boolean | undefined>>>;
10
- enableSubscriptions: z.ZodOptional<z.ZodType<boolean | undefined, boolean | undefined, z.core.$ZodTypeInternals<boolean | undefined, boolean | undefined>>>;
11
- adminApp: z.ZodOptional<z.ZodType<{
12
- enabled: boolean;
13
- pathPrefix: string;
14
- allowedRoles?: string[] | undefined;
15
- sections?: ({
9
+ includeUploadComponents: z.ZodPrefault<z.ZodBoolean>;
10
+ enableSubscriptions: z.ZodPrefault<z.ZodBoolean>;
11
+ adminApp: z.ZodPrefault<z.ZodObject<{
12
+ enabled: z.ZodBoolean;
13
+ pathPrefix: z.ZodDefault<z.ZodString>;
14
+ allowedRoles: z.ZodPrefault<z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
15
+ sections: z.ZodPrefault<z.ZodArray<z.ZodType<{
16
16
  id: string;
17
17
  name: string;
18
18
  featureRef: string;
@@ -22,6 +22,7 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
22
22
  type: "crud";
23
23
  modelRef: string;
24
24
  nameFieldRef: string;
25
+ disableCreate: boolean;
25
26
  table: {
26
27
  columns: {
27
28
  [x: string]: unknown;
@@ -29,12 +30,12 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
29
30
  type: string;
30
31
  label: string;
31
32
  }[];
32
- actions?: {
33
+ actions: {
33
34
  [x: string]: unknown;
34
35
  id: string;
35
36
  type: string;
36
37
  position: "inline" | "dropdown";
37
- }[] | undefined;
38
+ }[];
38
39
  };
39
40
  form: {
40
41
  fields: {
@@ -44,7 +45,6 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
44
45
  label: string;
45
46
  }[];
46
47
  };
47
- disableCreate?: boolean | undefined;
48
48
  embeddedForms?: ({
49
49
  id: string;
50
50
  name: string;
@@ -82,12 +82,7 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
82
82
  };
83
83
  includeIdField?: boolean | undefined;
84
84
  })[] | undefined;
85
- })[] | undefined;
86
- } | undefined, {
87
- enabled: boolean;
88
- pathPrefix?: string | undefined;
89
- allowedRoles?: string[] | undefined;
90
- sections?: ({
85
+ }, {
91
86
  name: string;
92
87
  featureRef: string;
93
88
  type: string;
@@ -157,12 +152,7 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
157
152
  };
158
153
  includeIdField?: boolean | undefined;
159
154
  })[] | undefined;
160
- })[] | undefined;
161
- } | undefined, z.core.$ZodTypeInternals<{
162
- enabled: boolean;
163
- pathPrefix: string;
164
- allowedRoles?: string[] | undefined;
165
- sections?: ({
155
+ }, z.core.$ZodTypeInternals<{
166
156
  id: string;
167
157
  name: string;
168
158
  featureRef: string;
@@ -172,6 +162,7 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
172
162
  type: "crud";
173
163
  modelRef: string;
174
164
  nameFieldRef: string;
165
+ disableCreate: boolean;
175
166
  table: {
176
167
  columns: {
177
168
  [x: string]: unknown;
@@ -179,12 +170,12 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
179
170
  type: string;
180
171
  label: string;
181
172
  }[];
182
- actions?: {
173
+ actions: {
183
174
  [x: string]: unknown;
184
175
  id: string;
185
176
  type: string;
186
177
  position: "inline" | "dropdown";
187
- }[] | undefined;
178
+ }[];
188
179
  };
189
180
  form: {
190
181
  fields: {
@@ -194,7 +185,6 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
194
185
  label: string;
195
186
  }[];
196
187
  };
197
- disableCreate?: boolean | undefined;
198
188
  embeddedForms?: ({
199
189
  id: string;
200
190
  name: string;
@@ -232,12 +222,7 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
232
222
  };
233
223
  includeIdField?: boolean | undefined;
234
224
  })[] | undefined;
235
- })[] | undefined;
236
- } | undefined, {
237
- enabled: boolean;
238
- pathPrefix?: string | undefined;
239
- allowedRoles?: string[] | undefined;
240
- sections?: ({
225
+ }, {
241
226
  name: string;
242
227
  featureRef: string;
243
228
  type: string;
@@ -307,8 +292,8 @@ export declare const createWebAppSchema: import("#src/schema/creator/index.js").
307
292
  };
308
293
  includeIdField?: boolean | undefined;
309
294
  })[] | undefined;
310
- })[] | undefined;
311
- } | undefined>>>;
295
+ }>>>>;
296
+ }, z.core.$strip>>;
312
297
  id: z.ZodDefault<z.ZodString>;
313
298
  name: z.ZodString;
314
299
  }, z.core.$strip>, {
@@ -318,18 +303,16 @@ export type WebAppConfig = def.InferOutput<typeof createWebAppSchema>;
318
303
  export declare const webAppEntryType: import("../types.js").AppEntryType<{
319
304
  devPort: number;
320
305
  type: "web";
306
+ includeAuth: boolean;
321
307
  title: string;
322
308
  description: string;
323
- id: string;
324
- name: string;
325
- includeAuth?: boolean | undefined;
326
- includeUploadComponents?: boolean | undefined;
327
- enableSubscriptions?: boolean | undefined;
328
- adminApp?: {
309
+ includeUploadComponents: boolean;
310
+ enableSubscriptions: boolean;
311
+ adminApp: {
329
312
  enabled: boolean;
330
313
  pathPrefix: string;
331
- allowedRoles?: string[] | undefined;
332
- sections?: ({
314
+ allowedRoles: string[];
315
+ sections: ({
333
316
  id: string;
334
317
  name: string;
335
318
  featureRef: string;
@@ -339,6 +322,7 @@ export declare const webAppEntryType: import("../types.js").AppEntryType<{
339
322
  type: "crud";
340
323
  modelRef: string;
341
324
  nameFieldRef: string;
325
+ disableCreate: boolean;
342
326
  table: {
343
327
  columns: {
344
328
  [x: string]: unknown;
@@ -346,12 +330,12 @@ export declare const webAppEntryType: import("../types.js").AppEntryType<{
346
330
  type: string;
347
331
  label: string;
348
332
  }[];
349
- actions?: {
333
+ actions: {
350
334
  [x: string]: unknown;
351
335
  id: string;
352
336
  type: string;
353
337
  position: "inline" | "dropdown";
354
- }[] | undefined;
338
+ }[];
355
339
  };
356
340
  form: {
357
341
  fields: {
@@ -361,7 +345,6 @@ export declare const webAppEntryType: import("../types.js").AppEntryType<{
361
345
  label: string;
362
346
  }[];
363
347
  };
364
- disableCreate?: boolean | undefined;
365
348
  embeddedForms?: ({
366
349
  id: string;
367
350
  name: string;
@@ -399,7 +382,9 @@ export declare const webAppEntryType: import("../types.js").AppEntryType<{
399
382
  };
400
383
  includeIdField?: boolean | undefined;
401
384
  })[] | undefined;
402
- })[] | undefined;
403
- } | undefined;
385
+ })[];
386
+ };
387
+ id: string;
388
+ name: string;
404
389
  }>;
405
390
  //# sourceMappingURL=web-app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"web-app.d.ts","sourceRoot":"","sources":["../../../../src/schema/apps/web/web-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AAQxD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc9B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,WAAW,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEtE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0C,CAAC"}
1
+ {"version":3,"file":"web-app.d.ts","sourceRoot":"","sources":["../../../../src/schema/apps/web/web-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AAQxD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc9B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,WAAW,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEtE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0C,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { z } from 'zod';
2
+ /**
3
+ * Metadata stored on a schema node annotated by `withDefault`.
4
+ *
5
+ * During serialization, `cleanDefaultValues()` walks the schema and uses this
6
+ * metadata to identify and remove values that match their defaults.
7
+ */
8
+ interface DefaultSchemaMeta {
9
+ readonly defaultValue: unknown;
10
+ }
11
+ /**
12
+ * Registry that stores default-value metadata on Zod schema instances.
13
+ *
14
+ * Uses a WeakMap to avoid interfering with Zod's type system.
15
+ * Annotated by `withDefault()`; read by `cleanDefaultValues()`.
16
+ */
17
+ export declare const definitionDefaultRegistry: {
18
+ set(schema: z.ZodType, meta: DefaultSchemaMeta): void;
19
+ get(schema: z.ZodType): DefaultSchemaMeta | undefined;
20
+ };
21
+ export {};
22
+ //# sourceMappingURL=definition-default-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition-default-registry.d.ts","sourceRoot":"","sources":["../../../src/schema/creator/definition-default-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;GAKG;AACH,UAAU,iBAAiB;IACzB,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAChC;AAED;;;;;GAKG;AAEH,eAAO,MAAM,yBAAyB;gBAGtB,CAAC,CAAC,OAAO,QAAQ,iBAAiB,GAAG,IAAI;gBAGzC,CAAC,CAAC,OAAO,GAAG,iBAAiB,GAAG,SAAS;CAIrD,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Registry that stores default-value metadata on Zod schema instances.
3
+ *
4
+ * Uses a WeakMap to avoid interfering with Zod's type system.
5
+ * Annotated by `withDefault()`; read by `cleanDefaultValues()`.
6
+ */
7
+ export const definitionDefaultRegistry = (() => {
8
+ const map = new WeakMap();
9
+ return {
10
+ set(schema, meta) {
11
+ map.set(schema, meta);
12
+ },
13
+ get(schema) {
14
+ return map.get(schema);
15
+ },
16
+ };
17
+ })();
18
+ //# sourceMappingURL=definition-default-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition-default-registry.js","sourceRoot":"","sources":["../../../src/schema/creator/definition-default-registry.ts"],"names":[],"mappings":"AAYA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,GAAG,EAAE;IAC7C,MAAM,GAAG,GAAG,IAAI,OAAO,EAAgC,CAAC;IACxD,OAAO;QACL,GAAG,CAAC,MAAiB,EAAE,IAAuB;YAC5C,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACxB,CAAC;QACD,GAAG,CAAC,MAAiB;YACnB,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC"}
@@ -0,0 +1,45 @@
1
+ import type { z } from 'zod';
2
+ import type { ReferencePath } from '#src/references/types.js';
3
+ /**
4
+ * Context passed to fix functions during the schema+data walk.
5
+ * Contains only the path — fixes operate on local values without rootData access.
6
+ */
7
+ export interface DefinitionFixContext {
8
+ /** The absolute path to the current node in the data */
9
+ readonly path: ReferencePath;
10
+ }
11
+ /**
12
+ * A fix function that silently transforms a value during the save pipeline.
13
+ * Return the fixed value, or the original value if no fix is needed.
14
+ */
15
+ export type DefinitionFix<T = unknown> = (value: T, ctx: DefinitionFixContext) => T;
16
+ /**
17
+ * Metadata stored on a schema node annotated by `withFix`.
18
+ * Exposed as readonly; the registry manages mutation internally.
19
+ */
20
+ export interface FixSchemaMeta {
21
+ readonly fixes: readonly DefinitionFix[];
22
+ }
23
+ /**
24
+ * Registry that stores fix metadata on Zod schema instances.
25
+ *
26
+ * Uses a WeakMap to avoid interfering with Zod's type system.
27
+ * Annotated by `withFix()`; read by `applyDefinitionFixes()`.
28
+ */
29
+ export declare const definitionFixRegistry: {
30
+ add(schema: z.ZodType, fix: DefinitionFix): void;
31
+ get(schema: z.ZodType): FixSchemaMeta | undefined;
32
+ };
33
+ /**
34
+ * Creates a schema decorator that registers a silent auto-fix.
35
+ *
36
+ * Used with `.apply()`:
37
+ * ```typescript
38
+ * z.object({ ... }).apply(withFix<MyType>((value, ctx) => fixedValue))
39
+ * ```
40
+ *
41
+ * @param fix - The fix function to register
42
+ * @returns A function that decorates a schema with the fix
43
+ */
44
+ export declare function withFix<T extends z.ZodType>(fix: DefinitionFix<z.output<T>>): (schema: T) => T;
45
+ //# sourceMappingURL=definition-fix-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition-fix-registry.d.ts","sourceRoot":"","sources":["../../../src/schema/creator/definition-fix-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI,CACvC,KAAK,EAAE,CAAC,EACR,GAAG,EAAE,oBAAoB,KACtB,CAAC,CAAC;AAEP;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;CAC1C;AAOD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;gBAGlB,CAAC,CAAC,OAAO,OAAO,aAAa,GAAG,IAAI;gBAQpC,CAAC,CAAC,OAAO,GAAG,aAAa,GAAG,SAAS;CAIjD,CAAC;AAEL;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EACzC,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAC9B,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAKlB"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Registry that stores fix metadata on Zod schema instances.
3
+ *
4
+ * Uses a WeakMap to avoid interfering with Zod's type system.
5
+ * Annotated by `withFix()`; read by `applyDefinitionFixes()`.
6
+ */
7
+ export const definitionFixRegistry = (() => {
8
+ const map = new WeakMap();
9
+ return {
10
+ add(schema, fix) {
11
+ const existing = map.get(schema);
12
+ if (existing) {
13
+ existing.fixes.push(fix);
14
+ }
15
+ else {
16
+ map.set(schema, { fixes: [fix] });
17
+ }
18
+ },
19
+ get(schema) {
20
+ return map.get(schema);
21
+ },
22
+ };
23
+ })();
24
+ /**
25
+ * Creates a schema decorator that registers a silent auto-fix.
26
+ *
27
+ * Used with `.apply()`:
28
+ * ```typescript
29
+ * z.object({ ... }).apply(withFix<MyType>((value, ctx) => fixedValue))
30
+ * ```
31
+ *
32
+ * @param fix - The fix function to register
33
+ * @returns A function that decorates a schema with the fix
34
+ */
35
+ export function withFix(fix) {
36
+ return (schema) => {
37
+ definitionFixRegistry.add(schema, fix);
38
+ return schema;
39
+ };
40
+ }
41
+ //# sourceMappingURL=definition-fix-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition-fix-registry.js","sourceRoot":"","sources":["../../../src/schema/creator/definition-fix-registry.ts"],"names":[],"mappings":"AAmCA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE;IACzC,MAAM,GAAG,GAAG,IAAI,OAAO,EAAmC,CAAC;IAC3D,OAAO;QACL,GAAG,CAAC,MAAiB,EAAE,GAAkB;YACvC,MAAM,QAAQ,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACjC,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC3B,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACpC,CAAC;QACH,CAAC;QACD,GAAG,CAAC,MAAiB;YACnB,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC;AAEL;;;;;;;;;;GAUG;AACH,MAAM,UAAU,OAAO,CACrB,GAA+B;IAE/B,OAAO,CAAC,MAAS,EAAK,EAAE;QACtB,qBAAqB,CAAC,GAAG,CAAC,MAAM,EAAE,GAAoB,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { ProjectDefinitionContainer } from '#src/definition/project-definition-container.js';
2
+ import type { DefinitionIssue } from './definition-issue-types.js';
3
+ /**
4
+ * A definition-level issue checker that operates on the full project definition.
5
+ * Can propose definition-wide auto-fixes.
6
+ *
7
+ * Unlike field-level checkers (registered via `withIssueChecker` on schema nodes),
8
+ * definition-level checkers receive the definition container and can perform
9
+ * cross-cutting validations like port conflicts, FK type mismatches, or missing
10
+ * models required by plugins.
11
+ */
12
+ export type DefinitionIssueChecker = (container: ProjectDefinitionContainer) => DefinitionIssue[];
13
+ /**
14
+ * Plugin spec for registering definition-level issue checkers.
15
+ *
16
+ * Built-in checkers (relation type mismatch, mutation roles) are registered
17
+ * by `collectDefinitionIssues` at runtime to avoid circular imports between
18
+ * schema/creator/ and parser/. Plugins can register additional checkers during
19
+ * initialization:
20
+ * ```typescript
21
+ * createPluginModule({
22
+ * dependencies: { issueCheckers: definitionIssueCheckerSpec },
23
+ * initialize: ({ issueCheckers }, { pluginKey }) => {
24
+ * issueCheckers.checkers.set(pluginKey, (container) => {
25
+ * // validate container.definition and return issues
26
+ * return [];
27
+ * });
28
+ * },
29
+ * });
30
+ * ```
31
+ */
32
+ export declare const definitionIssueCheckerSpec: import("../../index.js").PluginSpec<{
33
+ checkers: import("@baseplate-dev/utils").MapContainer<string, DefinitionIssueChecker>;
34
+ }, {
35
+ getAllCheckers: () => Map<string, DefinitionIssueChecker>;
36
+ }>;
37
+ //# sourceMappingURL=definition-issue-checker-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition-issue-checker-spec.d.ts","sourceRoot":"","sources":["../../../src/schema/creator/definition-issue-checker-spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAIlG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEnE;;;;;;;;GAQG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,SAAS,EAAE,0BAA0B,KAClC,eAAe,EAAE,CAAC;AAEvB;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,0BAA0B;;;0BAOb,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC;EAI5D,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { createFieldMapSpec } from '#src/plugins/utils/create-field-map-spec.js';
2
+ /**
3
+ * Plugin spec for registering definition-level issue checkers.
4
+ *
5
+ * Built-in checkers (relation type mismatch, mutation roles) are registered
6
+ * by `collectDefinitionIssues` at runtime to avoid circular imports between
7
+ * schema/creator/ and parser/. Plugins can register additional checkers during
8
+ * initialization:
9
+ * ```typescript
10
+ * createPluginModule({
11
+ * dependencies: { issueCheckers: definitionIssueCheckerSpec },
12
+ * initialize: ({ issueCheckers }, { pluginKey }) => {
13
+ * issueCheckers.checkers.set(pluginKey, (container) => {
14
+ * // validate container.definition and return issues
15
+ * return [];
16
+ * });
17
+ * },
18
+ * });
19
+ * ```
20
+ */
21
+ export const definitionIssueCheckerSpec = createFieldMapSpec('core/definition-issue-checkers', (t) => ({
22
+ checkers: t.map(),
23
+ }), {
24
+ use: (values) => ({
25
+ getAllCheckers: () => values.checkers,
26
+ }),
27
+ });
28
+ //# sourceMappingURL=definition-issue-checker-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition-issue-checker-spec.js","sourceRoot":"","sources":["../../../src/schema/creator/definition-issue-checker-spec.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAiBjF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,kBAAkB,CAC1D,gCAAgC,EAChC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACN,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAkC;CAClD,CAAC,EACF;IACE,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAChB,cAAc,EAAE,GAAwC,EAAE,CACxD,MAAM,CAAC,QAAQ;KAClB,CAAC;CACH,CACF,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { DefinitionFieldIssueChecker } from './definition-issue-registry.js';
2
+ /**
3
+ * Creates an issue checker that detects duplicate values for a given field
4
+ * in an array of objects.
5
+ *
6
+ * Used with `.apply(withIssueChecker(checkUniqueField(...)))` on array schemas.
7
+ *
8
+ * @param field - The field name to check for uniqueness
9
+ * @param options.label - Human-readable label for the field (e.g. "name", "port")
10
+ * @param options.severity - Severity level for duplicate issues (default: 'error')
11
+ */
12
+ export declare function checkUniqueField<K extends string>(field: K, options?: {
13
+ label?: string;
14
+ severity?: 'error' | 'warning';
15
+ }): DefinitionFieldIssueChecker<Record<K, unknown>[]>;
16
+ //# sourceMappingURL=definition-issue-checkers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition-issue-checkers.d.ts","sourceRoot":"","sources":["../../../src/schema/creator/definition-issue-checkers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,2BAA2B,EAE5B,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAC/C,KAAK,EAAE,CAAC,EACR,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC3B,GACL,2BAA2B,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAyBnD"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Creates an issue checker that detects duplicate values for a given field
3
+ * in an array of objects.
4
+ *
5
+ * Used with `.apply(withIssueChecker(checkUniqueField(...)))` on array schemas.
6
+ *
7
+ * @param field - The field name to check for uniqueness
8
+ * @param options.label - Human-readable label for the field (e.g. "name", "port")
9
+ * @param options.severity - Severity level for duplicate issues (default: 'error')
10
+ */
11
+ export function checkUniqueField(field, options = {}) {
12
+ const { label = field, severity = 'error' } = options;
13
+ return (items) => {
14
+ const issues = [];
15
+ const seen = new Map();
16
+ for (const [i, item] of items.entries()) {
17
+ const value = item[field];
18
+ if (value === undefined || value === null || value === '')
19
+ continue;
20
+ const existingPath = seen.get(value);
21
+ if (existingPath) {
22
+ issues.push({
23
+ message: `Duplicate ${label} "${String(value)}"`,
24
+ path: [i, field],
25
+ severity,
26
+ });
27
+ }
28
+ else {
29
+ seen.set(value, [i, field]);
30
+ }
31
+ }
32
+ return issues;
33
+ };
34
+ }
35
+ //# sourceMappingURL=definition-issue-checkers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition-issue-checkers.js","sourceRoot":"","sources":["../../../src/schema/creator/definition-issue-checkers.ts"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAQ,EACR,UAGI,EAAE;IAEN,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,QAAQ,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC;IAEtD,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,MAAM,GAAuB,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,IAAI,GAAG,EAA0B,CAAC;QAE/C,KAAK,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACxC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;YAC1B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;gBAAE,SAAS;YAEpE,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrC,IAAI,YAAY,EAAE,CAAC;gBACjB,MAAM,CAAC,IAAI,CAAC;oBACV,OAAO,EAAE,aAAa,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,GAAG;oBAChD,IAAI,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC;oBAChB,QAAQ;iBACT,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}