@axinom/mosaic-cli 0.57.0-rc.3 → 0.57.0-rc.4

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 (532) hide show
  1. package/README.md +3 -9
  2. package/bin/mosaic.js +3 -0
  3. package/dist/cli/index.js +54 -0
  4. package/dist/cli/index.js.map +1 -0
  5. package/dist/{esm/commands → commands}/apply-templates/apply-templates.d.ts +2 -2
  6. package/dist/{esm/commands → commands}/apply-templates/apply-templates.js +57 -56
  7. package/dist/commands/apply-templates/apply-templates.js.map +1 -0
  8. package/dist/{esm/commands → commands}/apply-templates/bitwarden-vault.js +18 -18
  9. package/dist/commands/apply-templates/bitwarden-vault.js.map +1 -0
  10. package/dist/commands/apply-templates/index.d.ts +1 -0
  11. package/dist/commands/apply-templates/index.js +5 -0
  12. package/dist/commands/apply-templates/index.js.map +1 -0
  13. package/dist/commands/create/command.d.ts +3 -0
  14. package/dist/{esm/commands → commands}/create/command.js +27 -23
  15. package/dist/commands/create/command.js.map +1 -0
  16. package/dist/{esm/commands → commands}/create/createSolution.d.ts +1 -1
  17. package/dist/{esm/commands → commands}/create/createSolution.js +22 -16
  18. package/dist/commands/create/createSolution.js.map +1 -0
  19. package/dist/commands/create/defaultValues.js +10 -0
  20. package/dist/commands/create/defaultValues.js.map +1 -0
  21. package/dist/{esm/commands → commands}/create/helpers/git.d.ts +1 -1
  22. package/dist/{esm/commands → commands}/create/helpers/git.js +7 -2
  23. package/dist/commands/create/helpers/git.js.map +1 -0
  24. package/dist/commands/create/helpers/logger.js +46 -0
  25. package/dist/commands/create/helpers/logger.js.map +1 -0
  26. package/dist/commands/create/helpers/types.js +3 -0
  27. package/dist/commands/create/helpers/types.js.map +1 -0
  28. package/dist/{esm/commands → commands}/create/runQuestionaire.d.ts +1 -1
  29. package/dist/{esm/commands → commands}/create/runQuestionaire.js +20 -15
  30. package/dist/commands/create/runQuestionaire.js.map +1 -0
  31. package/dist/{esm/commands → commands}/create-extension-config/create-extension-config.js +22 -15
  32. package/dist/commands/create-extension-config/create-extension-config.js.map +1 -0
  33. package/dist/{esm/commands → commands}/create-extension-config/index.d.ts +1 -1
  34. package/dist/commands/create-extension-config/index.js +22 -0
  35. package/dist/commands/create-extension-config/index.js.map +1 -0
  36. package/dist/commands/get-access-token/get-access-token-options.js.map +1 -0
  37. package/dist/{cjs/lib → commands/get-access-token}/get-dev-access-token.d.ts +2 -2
  38. package/dist/commands/get-access-token/get-dev-access-token.js.map +1 -0
  39. package/dist/commands/get-access-token/index.d.ts +3 -0
  40. package/dist/{esm/commands → commands}/get-access-token/index.js +14 -10
  41. package/dist/commands/get-access-token/index.js.map +1 -0
  42. package/dist/{esm/commands → commands}/graphql-diff.d.ts +1 -1
  43. package/dist/{esm/commands → commands}/graphql-diff.js +25 -21
  44. package/dist/commands/graphql-diff.js.map +1 -0
  45. package/dist/{esm/commands → commands}/hosting/index.d.ts +1 -1
  46. package/dist/commands/hosting/index.js +19 -0
  47. package/dist/commands/hosting/index.js.map +1 -0
  48. package/dist/{esm/commands → commands}/hosting/manifest/manifest-commands.d.ts +1 -1
  49. package/dist/{esm/commands → commands}/hosting/manifest/manifest-commands.js +7 -4
  50. package/dist/commands/hosting/manifest/manifest-commands.js.map +1 -0
  51. package/dist/commands/hosting/manifest/upload-manifest-options.js +3 -0
  52. package/dist/commands/hosting/manifest/upload-manifest-options.js.map +1 -0
  53. package/dist/{esm/commands → commands}/hosting/manifest/upload-manifest.d.ts +1 -1
  54. package/dist/{esm/commands → commands}/hosting/manifest/upload-manifest.js +38 -34
  55. package/dist/commands/hosting/manifest/upload-manifest.js.map +1 -0
  56. package/dist/{esm/commands → commands}/hosting/pilet/pilet-commands.d.ts +1 -1
  57. package/dist/{esm/commands → commands}/hosting/pilet/pilet-commands.js +7 -4
  58. package/dist/commands/hosting/pilet/pilet-commands.js.map +1 -0
  59. package/dist/commands/hosting/pilet/register-pilet-options.js +3 -0
  60. package/dist/commands/hosting/pilet/register-pilet-options.js.map +1 -0
  61. package/dist/{esm/commands → commands}/hosting/pilet/register-pilet.d.ts +1 -1
  62. package/dist/commands/hosting/pilet/register-pilet.js +131 -0
  63. package/dist/commands/hosting/pilet/register-pilet.js.map +1 -0
  64. package/dist/commands/hosting/service/deploy/service-deploy-command.d.ts +3 -0
  65. package/dist/{esm/commands → commands}/hosting/service/deploy/service-deploy-command.js +10 -8
  66. package/dist/commands/hosting/service/deploy/service-deploy-command.js.map +1 -0
  67. package/dist/commands/hosting/service/deploy/service-deploy-options.js +3 -0
  68. package/dist/commands/hosting/service/deploy/service-deploy-options.js.map +1 -0
  69. package/dist/{esm/commands → commands}/hosting/service/deploy/service-deploy.d.ts +1 -1
  70. package/dist/commands/hosting/service/deploy/service-deploy.js +246 -0
  71. package/dist/commands/hosting/service/deploy/service-deploy.js.map +1 -0
  72. package/dist/{esm/commands → commands}/hosting/service/service-commands.d.ts +1 -1
  73. package/dist/commands/hosting/service/service-commands.js +16 -0
  74. package/dist/commands/hosting/service/service-commands.js.map +1 -0
  75. package/dist/commands/hosting/service/undeploy/service-undeploy-command.d.ts +3 -0
  76. package/dist/{esm/commands → commands}/hosting/service/undeploy/service-undeploy-command.js +10 -8
  77. package/dist/commands/hosting/service/undeploy/service-undeploy-command.js.map +1 -0
  78. package/dist/commands/hosting/service/undeploy/service-undeploy-options.js +3 -0
  79. package/dist/commands/hosting/service/undeploy/service-undeploy-options.js.map +1 -0
  80. package/dist/{esm/commands → commands}/hosting/service/undeploy/service-undeploy.d.ts +1 -1
  81. package/dist/commands/hosting/service/undeploy/service-undeploy.js +142 -0
  82. package/dist/commands/hosting/service/undeploy/service-undeploy.js.map +1 -0
  83. package/dist/{esm/commands → commands}/msg-codegen/codegen.d.ts +2 -3
  84. package/dist/{esm/commands → commands}/msg-codegen/codegen.js +83 -114
  85. package/dist/commands/msg-codegen/codegen.js.map +1 -0
  86. package/dist/commands/msg-codegen/index.d.ts +3 -0
  87. package/dist/{esm/commands → commands}/msg-codegen/index.js +8 -11
  88. package/dist/commands/msg-codegen/index.js.map +1 -0
  89. package/dist/{esm/commands → commands}/msg-codegen/lint.d.ts +1 -1
  90. package/dist/{esm/commands → commands}/msg-codegen/lint.js +15 -14
  91. package/dist/commands/msg-codegen/lint.js.map +1 -0
  92. package/dist/{esm/commands → commands}/msg-codegen/message-codegen-options.d.ts +0 -1
  93. package/dist/commands/msg-codegen/message-codegen-options.js +3 -0
  94. package/dist/commands/msg-codegen/message-codegen-options.js.map +1 -0
  95. package/dist/{esm/commands → commands}/msg-codegen/presets.d.ts +3 -7
  96. package/dist/{esm/commands → commands}/msg-codegen/presets.js +30 -35
  97. package/dist/commands/msg-codegen/presets.js.map +1 -0
  98. package/dist/{esm/commands → commands}/msg-codegen/utils.d.ts +1 -1
  99. package/dist/{esm/commands → commands}/msg-codegen/utils.js +86 -52
  100. package/dist/commands/msg-codegen/utils.js.map +1 -0
  101. package/dist/{esm/commands → commands}/msg-diff/asyncapi-override.d.ts +1 -1
  102. package/dist/{esm/commands → commands}/msg-diff/asyncapi-override.js +4 -1
  103. package/dist/commands/msg-diff/asyncapi-override.js.map +1 -0
  104. package/dist/{esm/commands → commands}/msg-diff/git-checkout-tmp.js +15 -11
  105. package/dist/commands/msg-diff/git-checkout-tmp.js.map +1 -0
  106. package/dist/commands/msg-diff/index.d.ts +3 -0
  107. package/dist/{esm/commands → commands}/msg-diff/index.js +11 -10
  108. package/dist/commands/msg-diff/index.js.map +1 -0
  109. package/dist/commands/msg-diff/message-diff-options.js +3 -0
  110. package/dist/commands/msg-diff/message-diff-options.js.map +1 -0
  111. package/dist/{esm/commands → commands}/msg-diff/msg-diff.d.ts +2 -2
  112. package/dist/{esm/commands → commands}/msg-diff/msg-diff.js +35 -42
  113. package/dist/commands/msg-diff/msg-diff.js.map +1 -0
  114. package/dist/{esm/commands → commands}/pg-dump/generate.d.ts +1 -1
  115. package/dist/{esm/commands → commands}/pg-dump/generate.js +39 -34
  116. package/dist/commands/pg-dump/generate.js.map +1 -0
  117. package/dist/commands/pg-dump/index.d.ts +3 -0
  118. package/dist/{esm/commands → commands}/pg-dump/index.js +6 -3
  119. package/dist/commands/pg-dump/index.js.map +1 -0
  120. package/dist/commands/pg-dump/pg-dump-options.js +3 -0
  121. package/dist/commands/pg-dump/pg-dump-options.js.map +1 -0
  122. package/dist/{esm/commands → commands}/publish-schema-to-db/abstractions/base-smart-tags.d.ts +1 -1
  123. package/dist/commands/publish-schema-to-db/abstractions/base-smart-tags.js +3 -0
  124. package/dist/commands/publish-schema-to-db/abstractions/base-smart-tags.js.map +1 -0
  125. package/dist/commands/publish-schema-to-db/abstractions/index.d.ts +5 -0
  126. package/dist/commands/publish-schema-to-db/abstractions/index.js +9 -0
  127. package/dist/commands/publish-schema-to-db/abstractions/index.js.map +1 -0
  128. package/dist/{esm/commands → commands}/publish-schema-to-db/abstractions/pg-column.d.ts +3 -3
  129. package/dist/commands/publish-schema-to-db/abstractions/pg-column.js +3 -0
  130. package/dist/commands/publish-schema-to-db/abstractions/pg-column.js.map +1 -0
  131. package/dist/{esm/commands → commands}/publish-schema-to-db/abstractions/pg-fk-column.d.ts +1 -1
  132. package/dist/commands/publish-schema-to-db/abstractions/pg-fk-column.js +3 -0
  133. package/dist/commands/publish-schema-to-db/abstractions/pg-fk-column.js.map +1 -0
  134. package/dist/{esm/commands → commands}/publish-schema-to-db/abstractions/pg-table.d.ts +4 -4
  135. package/dist/commands/publish-schema-to-db/abstractions/pg-table.js +3 -0
  136. package/dist/commands/publish-schema-to-db/abstractions/pg-table.js.map +1 -0
  137. package/dist/commands/publish-schema-to-db/abstractions/pg-type.js +3 -0
  138. package/dist/commands/publish-schema-to-db/abstractions/pg-type.js.map +1 -0
  139. package/dist/{esm/commands → commands}/publish-schema-to-db/content-entity-model.d.ts +3 -3
  140. package/dist/{esm/commands → commands}/publish-schema-to-db/content-entity-model.js +14 -12
  141. package/dist/commands/publish-schema-to-db/content-entity-model.js.map +1 -0
  142. package/dist/{esm/commands → commands}/publish-schema-to-db/generate.d.ts +1 -1
  143. package/dist/commands/publish-schema-to-db/generate.js +61 -0
  144. package/dist/commands/publish-schema-to-db/generate.js.map +1 -0
  145. package/dist/commands/publish-schema-to-db/index.d.ts +3 -0
  146. package/dist/{esm/commands → commands}/publish-schema-to-db/index.js +6 -3
  147. package/dist/commands/publish-schema-to-db/index.js.map +1 -0
  148. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/fk-column.d.ts +1 -1
  149. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/fk-column.js +8 -11
  150. package/dist/commands/publish-schema-to-db/pg-models/columns/fk-column.js.map +1 -0
  151. package/dist/commands/publish-schema-to-db/pg-models/columns/index.d.ts +4 -0
  152. package/dist/commands/publish-schema-to-db/pg-models/columns/index.js +8 -0
  153. package/dist/commands/publish-schema-to-db/pg-models/columns/index.js.map +1 -0
  154. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/pk-column.d.ts +1 -1
  155. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/pk-column.js +5 -4
  156. package/dist/commands/publish-schema-to-db/pg-models/columns/pk-column.js.map +1 -0
  157. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/primitive-column.d.ts +1 -1
  158. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/primitive-column.js +10 -10
  159. package/dist/commands/publish-schema-to-db/pg-models/columns/primitive-column.js.map +1 -0
  160. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/virtual-fk-column.d.ts +1 -1
  161. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/virtual-fk-column.js +8 -9
  162. package/dist/commands/publish-schema-to-db/pg-models/columns/virtual-fk-column.js.map +1 -0
  163. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/json-schema-parse-utils.d.ts +2 -2
  164. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/json-schema-parse-utils.js +29 -17
  165. package/dist/commands/publish-schema-to-db/pg-models/json-schema-parse-utils.js.map +1 -0
  166. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/pg-sql-gen-utils.d.ts +7 -1
  167. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/pg-sql-gen-utils.js +50 -14
  168. package/dist/commands/publish-schema-to-db/pg-models/pg-sql-gen-utils.js.map +1 -0
  169. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/pgl-utils.d.ts +2 -2
  170. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/pgl-utils.js +24 -23
  171. package/dist/commands/publish-schema-to-db/pg-models/pgl-utils.js.map +1 -0
  172. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/tables/content-entity-table.d.ts +3 -3
  173. package/dist/commands/publish-schema-to-db/pg-models/tables/content-entity-table.js +67 -0
  174. package/dist/commands/publish-schema-to-db/pg-models/tables/content-entity-table.js.map +1 -0
  175. package/dist/commands/publish-schema-to-db/pg-models/tables/index.d.ts +3 -0
  176. package/dist/commands/publish-schema-to-db/pg-models/tables/index.js +7 -0
  177. package/dist/commands/publish-schema-to-db/pg-models/tables/index.js.map +1 -0
  178. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/tables/object-property-table.d.ts +3 -3
  179. package/dist/commands/publish-schema-to-db/pg-models/tables/object-property-table.js +73 -0
  180. package/dist/commands/publish-schema-to-db/pg-models/tables/object-property-table.js.map +1 -0
  181. package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/tables/relations-table.d.ts +3 -3
  182. package/dist/commands/publish-schema-to-db/pg-models/tables/relations-table.js +61 -0
  183. package/dist/commands/publish-schema-to-db/pg-models/tables/relations-table.js.map +1 -0
  184. package/dist/commands/publish-schema-to-db/postprocessors/collection-postprocessor.d.ts +2 -0
  185. package/dist/commands/publish-schema-to-db/postprocessors/collection-postprocessor.js +21 -0
  186. package/dist/commands/publish-schema-to-db/postprocessors/collection-postprocessor.js.map +1 -0
  187. package/dist/{esm/commands → commands}/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.d.ts +2 -2
  188. package/dist/commands/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.js +3 -0
  189. package/dist/commands/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.js.map +1 -0
  190. package/dist/commands/publish-schema-to-db/postprocessors/episode-postprocessor.d.ts +2 -0
  191. package/dist/commands/publish-schema-to-db/postprocessors/episode-postprocessor.js +25 -0
  192. package/dist/commands/publish-schema-to-db/postprocessors/episode-postprocessor.js.map +1 -0
  193. package/dist/commands/publish-schema-to-db/postprocessors/index.d.ts +6 -0
  194. package/dist/commands/publish-schema-to-db/postprocessors/index.js +10 -0
  195. package/dist/commands/publish-schema-to-db/postprocessors/index.js.map +1 -0
  196. package/dist/commands/publish-schema-to-db/postprocessors/movie-postprocessor.d.ts +2 -0
  197. package/dist/commands/publish-schema-to-db/postprocessors/movie-postprocessor.js +21 -0
  198. package/dist/commands/publish-schema-to-db/postprocessors/movie-postprocessor.js.map +1 -0
  199. package/dist/commands/publish-schema-to-db/postprocessors/postprocessing-utils.d.ts +4 -0
  200. package/dist/commands/publish-schema-to-db/postprocessors/postprocessing-utils.js +19 -0
  201. package/dist/commands/publish-schema-to-db/postprocessors/postprocessing-utils.js.map +1 -0
  202. package/dist/commands/publish-schema-to-db/postprocessors/season-postprocessor.d.ts +2 -0
  203. package/dist/commands/publish-schema-to-db/postprocessors/season-postprocessor.js +25 -0
  204. package/dist/commands/publish-schema-to-db/postprocessors/season-postprocessor.js.map +1 -0
  205. package/dist/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.d.ts +2 -0
  206. package/dist/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.js +21 -0
  207. package/dist/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.js.map +1 -0
  208. package/dist/commands/publish-schema-to-db/publish-schema-to-db-options.js +3 -0
  209. package/dist/commands/publish-schema-to-db/publish-schema-to-db-options.js.map +1 -0
  210. package/dist/{esm/commands → commands}/service/index.d.ts +1 -1
  211. package/dist/commands/service/index.js +17 -0
  212. package/dist/commands/service/index.js.map +1 -0
  213. package/dist/commands/service/purge-permissions/purge-permissions-command.d.ts +3 -0
  214. package/dist/{esm/commands → commands}/service/purge-permissions/purge-permissions-command.js +10 -8
  215. package/dist/commands/service/purge-permissions/purge-permissions-command.js.map +1 -0
  216. package/dist/commands/service/purge-permissions/purge-permissions-options.js +3 -0
  217. package/dist/commands/service/purge-permissions/purge-permissions-options.js.map +1 -0
  218. package/dist/{esm/commands → commands}/service/purge-permissions/purge-permissions.d.ts +1 -1
  219. package/dist/commands/service/purge-permissions/purge-permissions.js +54 -0
  220. package/dist/commands/service/purge-permissions/purge-permissions.js.map +1 -0
  221. package/dist/commands/service/sync-permissions/sync-permission-command.d.ts +3 -0
  222. package/dist/{esm/commands → commands}/service/sync-permissions/sync-permission-command.js +10 -8
  223. package/dist/commands/service/sync-permissions/sync-permission-command.js.map +1 -0
  224. package/dist/commands/service/sync-permissions/sync-permissions-options.js +3 -0
  225. package/dist/commands/service/sync-permissions/sync-permissions-options.js.map +1 -0
  226. package/dist/{esm/commands → commands}/service/sync-permissions/sync-permissions.d.ts +1 -1
  227. package/dist/commands/service/sync-permissions/sync-permissions.js +67 -0
  228. package/dist/commands/service/sync-permissions/sync-permissions.js.map +1 -0
  229. package/dist/commands/unpublish-pilet/index.d.ts +3 -0
  230. package/dist/{esm/commands → commands}/unpublish-pilet/index.js +15 -11
  231. package/dist/commands/unpublish-pilet/index.js.map +1 -0
  232. package/dist/commands/unpublish-pilet/unpublish-pilet-options.js +3 -0
  233. package/dist/commands/unpublish-pilet/unpublish-pilet-options.js.map +1 -0
  234. package/dist/{esm/commands → commands}/unpublish-pilet/unpublish-pilet.d.ts +1 -1
  235. package/dist/commands/unpublish-pilet/unpublish-pilet.js +19 -0
  236. package/dist/commands/unpublish-pilet/unpublish-pilet.js.map +1 -0
  237. package/dist/common/index.d.ts +1 -0
  238. package/dist/common/index.js +5 -0
  239. package/dist/common/index.js.map +1 -0
  240. package/dist/{esm/common → common}/utils.js +6 -2
  241. package/dist/common/utils.js.map +1 -0
  242. package/dist/exports.d.ts +2 -0
  243. package/dist/exports.js +6 -0
  244. package/dist/exports.js.map +1 -0
  245. package/dist/index.d.ts +1 -0
  246. package/dist/index.js +6 -0
  247. package/dist/index.js.map +1 -0
  248. package/package.json +13 -22
  249. package/src/cli/index.ts +18 -21
  250. package/src/commands/apply-templates/apply-templates.spec.ts +2 -2
  251. package/src/commands/apply-templates/apply-templates.ts +8 -13
  252. package/src/commands/apply-templates/bitwarden-vault.ts +1 -2
  253. package/src/commands/apply-templates/index.ts +1 -1
  254. package/src/commands/create/command.ts +6 -6
  255. package/src/commands/create/createSolution.ts +3 -3
  256. package/src/commands/create/helpers/git.ts +1 -1
  257. package/src/commands/create/runQuestionaire.ts +3 -3
  258. package/src/commands/create-extension-config/create-extension-config.ts +3 -3
  259. package/src/commands/create-extension-config/index.ts +2 -2
  260. package/src/{lib → commands/get-access-token}/get-dev-access-token.ts +2 -2
  261. package/src/commands/get-access-token/index.ts +4 -4
  262. package/src/commands/graphql-diff.ts +5 -5
  263. package/src/commands/hosting/index.ts +4 -4
  264. package/src/commands/hosting/manifest/manifest-commands.ts +3 -3
  265. package/src/commands/hosting/manifest/upload-manifest.ts +3 -3
  266. package/src/commands/hosting/pilet/pilet-commands.ts +3 -3
  267. package/src/commands/hosting/pilet/register-pilet.ts +3 -6
  268. package/src/commands/hosting/service/deploy/service-deploy-command.ts +4 -5
  269. package/src/commands/hosting/service/deploy/service-deploy.ts +4 -5
  270. package/src/commands/hosting/service/service-commands.ts +3 -3
  271. package/src/commands/hosting/service/undeploy/service-undeploy-command.ts +4 -8
  272. package/src/commands/hosting/service/undeploy/service-undeploy.ts +4 -5
  273. package/src/commands/msg-codegen/codegen.ts +22 -61
  274. package/src/commands/msg-codegen/index.ts +4 -11
  275. package/src/commands/msg-codegen/lint.ts +6 -9
  276. package/src/commands/msg-codegen/message-codegen-options.ts +0 -1
  277. package/src/commands/msg-codegen/presets.ts +9 -23
  278. package/src/commands/msg-codegen/utils.ts +4 -4
  279. package/src/commands/msg-diff/asyncapi-override.ts +1 -1
  280. package/src/commands/msg-diff/index.ts +7 -11
  281. package/src/commands/msg-diff/msg-diff.spec.ts +5 -7
  282. package/src/commands/msg-diff/msg-diff.ts +12 -19
  283. package/src/commands/msg-diff/test-resources/0/command.json +14 -4
  284. package/src/commands/msg-diff/test-resources/0/event.json +5 -2
  285. package/src/commands/msg-diff/test-resources/1/moved-event.json +5 -2
  286. package/src/commands/pg-dump/generate.ts +3 -3
  287. package/src/commands/pg-dump/index.ts +3 -3
  288. package/src/commands/publish-schema-to-db/README.md +6 -7
  289. package/src/commands/publish-schema-to-db/abstractions/base-smart-tags.ts +1 -1
  290. package/src/commands/publish-schema-to-db/abstractions/index.ts +5 -5
  291. package/src/commands/publish-schema-to-db/abstractions/pg-column.ts +3 -3
  292. package/src/commands/publish-schema-to-db/abstractions/pg-fk-column.ts +1 -1
  293. package/src/commands/publish-schema-to-db/abstractions/pg-table.ts +4 -4
  294. package/src/commands/publish-schema-to-db/content-entity-model.ts +6 -9
  295. package/src/commands/publish-schema-to-db/generate.ts +9 -9
  296. package/src/commands/publish-schema-to-db/index.ts +3 -3
  297. package/src/commands/publish-schema-to-db/pg-models/columns/fk-column.spec.ts +2 -2
  298. package/src/commands/publish-schema-to-db/pg-models/columns/fk-column.ts +7 -7
  299. package/src/commands/publish-schema-to-db/pg-models/columns/index.ts +4 -4
  300. package/src/commands/publish-schema-to-db/pg-models/columns/pk-column.spec.ts +2 -2
  301. package/src/commands/publish-schema-to-db/pg-models/columns/pk-column.ts +1 -6
  302. package/src/commands/publish-schema-to-db/pg-models/columns/primitive-column.spec.ts +2 -2
  303. package/src/commands/publish-schema-to-db/pg-models/columns/primitive-column.ts +1 -6
  304. package/src/commands/publish-schema-to-db/pg-models/columns/virtual-fk-column.spec.ts +2 -2
  305. package/src/commands/publish-schema-to-db/pg-models/columns/virtual-fk-column.ts +7 -7
  306. package/src/commands/publish-schema-to-db/pg-models/json-schema-parse-utils.spec.ts +3 -3
  307. package/src/commands/publish-schema-to-db/pg-models/json-schema-parse-utils.ts +4 -6
  308. package/src/commands/publish-schema-to-db/pg-models/pg-sql-gen-utils.spec.ts +1 -1
  309. package/src/commands/publish-schema-to-db/pg-models/pg-sql-gen-utils.ts +37 -1
  310. package/src/commands/publish-schema-to-db/pg-models/pgl-utils.spec.ts +1 -1
  311. package/src/commands/publish-schema-to-db/pg-models/pgl-utils.ts +10 -18
  312. package/src/commands/publish-schema-to-db/pg-models/tables/content-entity-table.ts +11 -11
  313. package/src/commands/publish-schema-to-db/pg-models/tables/index.ts +3 -3
  314. package/src/commands/publish-schema-to-db/pg-models/tables/object-property-table.ts +11 -14
  315. package/src/commands/publish-schema-to-db/pg-models/tables/relations-table.ts +11 -11
  316. package/src/commands/publish-schema-to-db/postprocessors/collection-postprocessor.ts +3 -3
  317. package/src/commands/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.ts +2 -2
  318. package/src/commands/publish-schema-to-db/postprocessors/episode-postprocessor.ts +5 -8
  319. package/src/commands/publish-schema-to-db/postprocessors/index.ts +6 -6
  320. package/src/commands/publish-schema-to-db/postprocessors/movie-postprocessor.ts +4 -3
  321. package/src/commands/publish-schema-to-db/postprocessors/postprocessing-utils.ts +2 -37
  322. package/src/commands/publish-schema-to-db/postprocessors/season-postprocessor.ts +5 -8
  323. package/src/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.ts +4 -3
  324. package/src/commands/service/index.ts +3 -3
  325. package/src/commands/service/purge-permissions/purge-permissions-command.ts +4 -5
  326. package/src/commands/service/purge-permissions/purge-permissions.ts +2 -3
  327. package/src/commands/service/sync-permissions/sync-permission-command.ts +4 -5
  328. package/src/commands/service/sync-permissions/sync-permissions.ts +4 -5
  329. package/src/commands/unpublish-pilet/index.ts +4 -4
  330. package/src/commands/unpublish-pilet/unpublish-pilet.ts +1 -1
  331. package/src/common/index.ts +1 -2
  332. package/src/exports.ts +2 -2
  333. package/src/index.ts +1 -1
  334. package/bin/mosaic.mjs +0 -5
  335. package/dist/cjs/exports.d.ts +0 -2
  336. package/dist/cjs/exports.js +0 -6
  337. package/dist/cjs/exports.js.map +0 -1
  338. package/dist/cjs/lib/get-access-token-options.js.map +0 -1
  339. package/dist/cjs/lib/get-dev-access-token.js.map +0 -1
  340. package/dist/cjs/package.json +0 -1
  341. package/dist/esm/cli/index.js +0 -51
  342. package/dist/esm/cli/index.js.map +0 -1
  343. package/dist/esm/commands/apply-templates/apply-templates.js.map +0 -1
  344. package/dist/esm/commands/apply-templates/bitwarden-vault.js.map +0 -1
  345. package/dist/esm/commands/apply-templates/index.d.ts +0 -1
  346. package/dist/esm/commands/apply-templates/index.js +0 -2
  347. package/dist/esm/commands/apply-templates/index.js.map +0 -1
  348. package/dist/esm/commands/create/command.d.ts +0 -3
  349. package/dist/esm/commands/create/command.js.map +0 -1
  350. package/dist/esm/commands/create/createSolution.js.map +0 -1
  351. package/dist/esm/commands/create/defaultValues.js +0 -7
  352. package/dist/esm/commands/create/defaultValues.js.map +0 -1
  353. package/dist/esm/commands/create/helpers/git.js.map +0 -1
  354. package/dist/esm/commands/create/helpers/logger.js +0 -35
  355. package/dist/esm/commands/create/helpers/logger.js.map +0 -1
  356. package/dist/esm/commands/create/helpers/types.js +0 -2
  357. package/dist/esm/commands/create/helpers/types.js.map +0 -1
  358. package/dist/esm/commands/create/runQuestionaire.js.map +0 -1
  359. package/dist/esm/commands/create-extension-config/create-extension-config.js.map +0 -1
  360. package/dist/esm/commands/create-extension-config/index.js +0 -17
  361. package/dist/esm/commands/create-extension-config/index.js.map +0 -1
  362. package/dist/esm/commands/get-access-token/index.d.ts +0 -3
  363. package/dist/esm/commands/get-access-token/index.js.map +0 -1
  364. package/dist/esm/commands/graphql-diff.js.map +0 -1
  365. package/dist/esm/commands/hosting/index.js +0 -16
  366. package/dist/esm/commands/hosting/index.js.map +0 -1
  367. package/dist/esm/commands/hosting/manifest/manifest-commands.js.map +0 -1
  368. package/dist/esm/commands/hosting/manifest/upload-manifest-options.js +0 -2
  369. package/dist/esm/commands/hosting/manifest/upload-manifest-options.js.map +0 -1
  370. package/dist/esm/commands/hosting/manifest/upload-manifest.js.map +0 -1
  371. package/dist/esm/commands/hosting/pilet/pilet-commands.js.map +0 -1
  372. package/dist/esm/commands/hosting/pilet/register-pilet-options.js +0 -2
  373. package/dist/esm/commands/hosting/pilet/register-pilet-options.js.map +0 -1
  374. package/dist/esm/commands/hosting/pilet/register-pilet.js +0 -127
  375. package/dist/esm/commands/hosting/pilet/register-pilet.js.map +0 -1
  376. package/dist/esm/commands/hosting/service/deploy/service-deploy-command.d.ts +0 -3
  377. package/dist/esm/commands/hosting/service/deploy/service-deploy-command.js.map +0 -1
  378. package/dist/esm/commands/hosting/service/deploy/service-deploy-options.js +0 -2
  379. package/dist/esm/commands/hosting/service/deploy/service-deploy-options.js.map +0 -1
  380. package/dist/esm/commands/hosting/service/deploy/service-deploy.js +0 -240
  381. package/dist/esm/commands/hosting/service/deploy/service-deploy.js.map +0 -1
  382. package/dist/esm/commands/hosting/service/service-commands.js +0 -13
  383. package/dist/esm/commands/hosting/service/service-commands.js.map +0 -1
  384. package/dist/esm/commands/hosting/service/undeploy/service-undeploy-command.d.ts +0 -3
  385. package/dist/esm/commands/hosting/service/undeploy/service-undeploy-command.js.map +0 -1
  386. package/dist/esm/commands/hosting/service/undeploy/service-undeploy-options.js +0 -2
  387. package/dist/esm/commands/hosting/service/undeploy/service-undeploy-options.js.map +0 -1
  388. package/dist/esm/commands/hosting/service/undeploy/service-undeploy.js +0 -136
  389. package/dist/esm/commands/hosting/service/undeploy/service-undeploy.js.map +0 -1
  390. package/dist/esm/commands/msg-codegen/codegen.js.map +0 -1
  391. package/dist/esm/commands/msg-codegen/index.d.ts +0 -3
  392. package/dist/esm/commands/msg-codegen/index.js.map +0 -1
  393. package/dist/esm/commands/msg-codegen/lint.js.map +0 -1
  394. package/dist/esm/commands/msg-codegen/message-codegen-options.js +0 -2
  395. package/dist/esm/commands/msg-codegen/message-codegen-options.js.map +0 -1
  396. package/dist/esm/commands/msg-codegen/presets.js.map +0 -1
  397. package/dist/esm/commands/msg-codegen/utils.js.map +0 -1
  398. package/dist/esm/commands/msg-diff/asyncapi-override.js.map +0 -1
  399. package/dist/esm/commands/msg-diff/git-checkout-tmp.js.map +0 -1
  400. package/dist/esm/commands/msg-diff/index.d.ts +0 -3
  401. package/dist/esm/commands/msg-diff/index.js.map +0 -1
  402. package/dist/esm/commands/msg-diff/message-diff-options.js +0 -2
  403. package/dist/esm/commands/msg-diff/message-diff-options.js.map +0 -1
  404. package/dist/esm/commands/msg-diff/msg-diff.js.map +0 -1
  405. package/dist/esm/commands/pg-dump/generate.js.map +0 -1
  406. package/dist/esm/commands/pg-dump/index.d.ts +0 -3
  407. package/dist/esm/commands/pg-dump/index.js.map +0 -1
  408. package/dist/esm/commands/pg-dump/pg-dump-options.js +0 -2
  409. package/dist/esm/commands/pg-dump/pg-dump-options.js.map +0 -1
  410. package/dist/esm/commands/publish-schema-to-db/abstractions/base-smart-tags.js +0 -2
  411. package/dist/esm/commands/publish-schema-to-db/abstractions/base-smart-tags.js.map +0 -1
  412. package/dist/esm/commands/publish-schema-to-db/abstractions/index.d.ts +0 -5
  413. package/dist/esm/commands/publish-schema-to-db/abstractions/index.js +0 -6
  414. package/dist/esm/commands/publish-schema-to-db/abstractions/index.js.map +0 -1
  415. package/dist/esm/commands/publish-schema-to-db/abstractions/pg-column.js +0 -2
  416. package/dist/esm/commands/publish-schema-to-db/abstractions/pg-column.js.map +0 -1
  417. package/dist/esm/commands/publish-schema-to-db/abstractions/pg-fk-column.js +0 -2
  418. package/dist/esm/commands/publish-schema-to-db/abstractions/pg-fk-column.js.map +0 -1
  419. package/dist/esm/commands/publish-schema-to-db/abstractions/pg-table.js +0 -2
  420. package/dist/esm/commands/publish-schema-to-db/abstractions/pg-table.js.map +0 -1
  421. package/dist/esm/commands/publish-schema-to-db/abstractions/pg-type.js +0 -2
  422. package/dist/esm/commands/publish-schema-to-db/abstractions/pg-type.js.map +0 -1
  423. package/dist/esm/commands/publish-schema-to-db/content-entity-model.js.map +0 -1
  424. package/dist/esm/commands/publish-schema-to-db/generate.js +0 -57
  425. package/dist/esm/commands/publish-schema-to-db/generate.js.map +0 -1
  426. package/dist/esm/commands/publish-schema-to-db/index.d.ts +0 -3
  427. package/dist/esm/commands/publish-schema-to-db/index.js.map +0 -1
  428. package/dist/esm/commands/publish-schema-to-db/pg-models/columns/fk-column.js.map +0 -1
  429. package/dist/esm/commands/publish-schema-to-db/pg-models/columns/index.d.ts +0 -4
  430. package/dist/esm/commands/publish-schema-to-db/pg-models/columns/index.js +0 -5
  431. package/dist/esm/commands/publish-schema-to-db/pg-models/columns/index.js.map +0 -1
  432. package/dist/esm/commands/publish-schema-to-db/pg-models/columns/pk-column.js.map +0 -1
  433. package/dist/esm/commands/publish-schema-to-db/pg-models/columns/primitive-column.js.map +0 -1
  434. package/dist/esm/commands/publish-schema-to-db/pg-models/columns/virtual-fk-column.js.map +0 -1
  435. package/dist/esm/commands/publish-schema-to-db/pg-models/json-schema-parse-utils.js.map +0 -1
  436. package/dist/esm/commands/publish-schema-to-db/pg-models/pg-sql-gen-utils.js.map +0 -1
  437. package/dist/esm/commands/publish-schema-to-db/pg-models/pgl-utils.js.map +0 -1
  438. package/dist/esm/commands/publish-schema-to-db/pg-models/tables/content-entity-table.js +0 -69
  439. package/dist/esm/commands/publish-schema-to-db/pg-models/tables/content-entity-table.js.map +0 -1
  440. package/dist/esm/commands/publish-schema-to-db/pg-models/tables/index.d.ts +0 -3
  441. package/dist/esm/commands/publish-schema-to-db/pg-models/tables/index.js +0 -4
  442. package/dist/esm/commands/publish-schema-to-db/pg-models/tables/index.js.map +0 -1
  443. package/dist/esm/commands/publish-schema-to-db/pg-models/tables/object-property-table.js +0 -75
  444. package/dist/esm/commands/publish-schema-to-db/pg-models/tables/object-property-table.js.map +0 -1
  445. package/dist/esm/commands/publish-schema-to-db/pg-models/tables/relations-table.js +0 -63
  446. package/dist/esm/commands/publish-schema-to-db/pg-models/tables/relations-table.js.map +0 -1
  447. package/dist/esm/commands/publish-schema-to-db/postprocessors/collection-postprocessor.d.ts +0 -2
  448. package/dist/esm/commands/publish-schema-to-db/postprocessors/collection-postprocessor.js +0 -17
  449. package/dist/esm/commands/publish-schema-to-db/postprocessors/collection-postprocessor.js.map +0 -1
  450. package/dist/esm/commands/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.js +0 -2
  451. package/dist/esm/commands/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.js.map +0 -1
  452. package/dist/esm/commands/publish-schema-to-db/postprocessors/episode-postprocessor.d.ts +0 -2
  453. package/dist/esm/commands/publish-schema-to-db/postprocessors/episode-postprocessor.js +0 -20
  454. package/dist/esm/commands/publish-schema-to-db/postprocessors/episode-postprocessor.js.map +0 -1
  455. package/dist/esm/commands/publish-schema-to-db/postprocessors/index.d.ts +0 -6
  456. package/dist/esm/commands/publish-schema-to-db/postprocessors/index.js +0 -7
  457. package/dist/esm/commands/publish-schema-to-db/postprocessors/index.js.map +0 -1
  458. package/dist/esm/commands/publish-schema-to-db/postprocessors/movie-postprocessor.d.ts +0 -2
  459. package/dist/esm/commands/publish-schema-to-db/postprocessors/movie-postprocessor.js +0 -16
  460. package/dist/esm/commands/publish-schema-to-db/postprocessors/movie-postprocessor.js.map +0 -1
  461. package/dist/esm/commands/publish-schema-to-db/postprocessors/postprocessing-utils.d.ts +0 -9
  462. package/dist/esm/commands/publish-schema-to-db/postprocessors/postprocessing-utils.js +0 -37
  463. package/dist/esm/commands/publish-schema-to-db/postprocessors/postprocessing-utils.js.map +0 -1
  464. package/dist/esm/commands/publish-schema-to-db/postprocessors/season-postprocessor.d.ts +0 -2
  465. package/dist/esm/commands/publish-schema-to-db/postprocessors/season-postprocessor.js +0 -20
  466. package/dist/esm/commands/publish-schema-to-db/postprocessors/season-postprocessor.js.map +0 -1
  467. package/dist/esm/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.d.ts +0 -2
  468. package/dist/esm/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.js +0 -16
  469. package/dist/esm/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.js.map +0 -1
  470. package/dist/esm/commands/publish-schema-to-db/publish-schema-to-db-options.js +0 -2
  471. package/dist/esm/commands/publish-schema-to-db/publish-schema-to-db-options.js.map +0 -1
  472. package/dist/esm/commands/service/index.js +0 -14
  473. package/dist/esm/commands/service/index.js.map +0 -1
  474. package/dist/esm/commands/service/purge-permissions/purge-permissions-command.d.ts +0 -3
  475. package/dist/esm/commands/service/purge-permissions/purge-permissions-command.js.map +0 -1
  476. package/dist/esm/commands/service/purge-permissions/purge-permissions-options.js +0 -2
  477. package/dist/esm/commands/service/purge-permissions/purge-permissions-options.js.map +0 -1
  478. package/dist/esm/commands/service/purge-permissions/purge-permissions.js +0 -49
  479. package/dist/esm/commands/service/purge-permissions/purge-permissions.js.map +0 -1
  480. package/dist/esm/commands/service/sync-permissions/sync-permission-command.d.ts +0 -3
  481. package/dist/esm/commands/service/sync-permissions/sync-permission-command.js.map +0 -1
  482. package/dist/esm/commands/service/sync-permissions/sync-permissions-options.js +0 -2
  483. package/dist/esm/commands/service/sync-permissions/sync-permissions-options.js.map +0 -1
  484. package/dist/esm/commands/service/sync-permissions/sync-permissions.js +0 -62
  485. package/dist/esm/commands/service/sync-permissions/sync-permissions.js.map +0 -1
  486. package/dist/esm/commands/unpublish-pilet/index.d.ts +0 -3
  487. package/dist/esm/commands/unpublish-pilet/index.js.map +0 -1
  488. package/dist/esm/commands/unpublish-pilet/unpublish-pilet-options.js +0 -2
  489. package/dist/esm/commands/unpublish-pilet/unpublish-pilet-options.js.map +0 -1
  490. package/dist/esm/commands/unpublish-pilet/unpublish-pilet.js +0 -14
  491. package/dist/esm/commands/unpublish-pilet/unpublish-pilet.js.map +0 -1
  492. package/dist/esm/common/cli-extension.d.ts +0 -10
  493. package/dist/esm/common/cli-extension.js +0 -7
  494. package/dist/esm/common/cli-extension.js.map +0 -1
  495. package/dist/esm/common/index.d.ts +0 -2
  496. package/dist/esm/common/index.js +0 -3
  497. package/dist/esm/common/index.js.map +0 -1
  498. package/dist/esm/common/utils.js.map +0 -1
  499. package/dist/esm/exports.d.ts +0 -2
  500. package/dist/esm/exports.js +0 -3
  501. package/dist/esm/exports.js.map +0 -1
  502. package/dist/esm/lib/get-access-token-options.d.ts +0 -9
  503. package/dist/esm/lib/get-access-token-options.js +0 -2
  504. package/dist/esm/lib/get-access-token-options.js.map +0 -1
  505. package/dist/esm/lib/get-dev-access-token.d.ts +0 -6
  506. package/dist/esm/lib/get-dev-access-token.js +0 -11
  507. package/dist/esm/lib/get-dev-access-token.js.map +0 -1
  508. package/dist/esm/package.json +0 -1
  509. package/src/common/cli-extension.ts +0 -21
  510. /package/dist/{esm/cli → cli}/index.d.ts +0 -0
  511. /package/dist/{esm/commands → commands}/apply-templates/bitwarden-vault.d.ts +0 -0
  512. /package/dist/{esm/commands → commands}/create/defaultValues.d.ts +0 -0
  513. /package/dist/{esm/commands → commands}/create/helpers/logger.d.ts +0 -0
  514. /package/dist/{esm/commands → commands}/create/helpers/types.d.ts +0 -0
  515. /package/dist/{esm/commands → commands}/create-extension-config/create-extension-config.d.ts +0 -0
  516. /package/dist/{cjs/lib → commands/get-access-token}/get-access-token-options.d.ts +0 -0
  517. /package/dist/{cjs/lib → commands/get-access-token}/get-access-token-options.js +0 -0
  518. /package/dist/{cjs/lib → commands/get-access-token}/get-dev-access-token.js +0 -0
  519. /package/dist/{esm/commands → commands}/hosting/manifest/upload-manifest-options.d.ts +0 -0
  520. /package/dist/{esm/commands → commands}/hosting/pilet/register-pilet-options.d.ts +0 -0
  521. /package/dist/{esm/commands → commands}/hosting/service/deploy/service-deploy-options.d.ts +0 -0
  522. /package/dist/{esm/commands → commands}/hosting/service/undeploy/service-undeploy-options.d.ts +0 -0
  523. /package/dist/{esm/commands → commands}/msg-diff/git-checkout-tmp.d.ts +0 -0
  524. /package/dist/{esm/commands → commands}/msg-diff/message-diff-options.d.ts +0 -0
  525. /package/dist/{esm/commands → commands}/pg-dump/pg-dump-options.d.ts +0 -0
  526. /package/dist/{esm/commands → commands}/publish-schema-to-db/abstractions/pg-type.d.ts +0 -0
  527. /package/dist/{esm/commands → commands}/publish-schema-to-db/publish-schema-to-db-options.d.ts +0 -0
  528. /package/dist/{esm/commands → commands}/service/purge-permissions/purge-permissions-options.d.ts +0 -0
  529. /package/dist/{esm/commands → commands}/service/sync-permissions/sync-permissions-options.d.ts +0 -0
  530. /package/dist/{esm/commands → commands}/unpublish-pilet/unpublish-pilet-options.d.ts +0 -0
  531. /package/dist/{esm/common → common}/utils.d.ts +0 -0
  532. /package/src/{lib → commands/get-access-token}/get-access-token-options.ts +0 -0
@@ -1,5 +1,5 @@
1
- import { FormatHelpers, type TypeScriptPreset } from '@asyncapi/modelina';
2
- import _endent from 'endent';
1
+ import { FormatHelpers, TypeScriptPreset } from '@asyncapi/modelina';
2
+ import endent from 'endent';
3
3
  import {
4
4
  ensureNullable,
5
5
  getArrayItemNonNullTypes,
@@ -7,13 +7,7 @@ import {
7
7
  indexOfNullArrayProperty,
8
8
  indexOfNullObjectProperty,
9
9
  replaceAnyType,
10
- } from './utils.js';
11
- // endent is a TypeScript-compiled CJS package that emits
12
- // `module.exports = { __esModule: true, default: value }`.
13
- // Node.js native ESM does not honour the __esModule sentinel — the default
14
- // import receives the whole module.exports wrapper. Pattern 9 in
15
- // ESM_MIGRATION_GUIDE.md. The `?? _endent` fallback keeps the CJS build safe.
16
- const endent = ((_endent as any).default ?? _endent) as typeof _endent;
10
+ } from './utils';
17
11
 
18
12
  /**
19
13
  * Exports types.
@@ -54,15 +48,9 @@ export const ADDITIONAL_PROPERTIES_PRESET: TypeScriptPreset = {
54
48
  };
55
49
 
56
50
  /**
57
- * Creates a preset for TypeScriptGenerator that adds imports to resulting models.
58
- * Pass `importSpecifierExtension` (e.g. `".js"`) to emit explicit file extensions
59
- * on relative specifiers, required for ESM-compatible output.
60
- * All cross-model dependencies are TypeScript interfaces, so imports are always
61
- * emitted as `import type` to satisfy `verbatimModuleSyntax`.
51
+ * Preset for TypeScriptGenerator, adds imports to resulting model.
62
52
  */
63
- export const createImportsPreset = (
64
- importSpecifierExtension = '',
65
- ): TypeScriptPreset => ({
53
+ export const IMPORTS_PRESET: TypeScriptPreset = {
66
54
  interface: {
67
55
  self({ content, model }) {
68
56
  const interfacePrefix = getModelPathPrefix(model.name);
@@ -74,15 +62,13 @@ export const createImportsPreset = (
74
62
  interfacePrefix !== getModelPathPrefix(dep.name)
75
63
  ? `../${getModelPathPrefix(dep.name)}/${FormatHelpers.toParamCase(
76
64
  dep.name,
77
- )}${importSpecifierExtension}`
78
- : `./${FormatHelpers.toParamCase(
79
- dep.name,
80
- )}${importSpecifierExtension}`,
65
+ )}`
66
+ : `./${FormatHelpers.toParamCase(dep.name)}`,
81
67
  }));
82
68
  return endent`
83
69
  ${imports
84
70
  .sort((a, b) => a.location.localeCompare(b.location))
85
- .map((i) => `import type { ${i.class} } from '${i.location}';`)
71
+ .map((i) => `import { ${i.class} } from '${i.location}';`)
86
72
  .join('\n')}
87
73
  ${content}`;
88
74
  },
@@ -90,7 +76,7 @@ export const createImportsPreset = (
90
76
  return content;
91
77
  },
92
78
  },
93
- });
79
+ };
94
80
 
95
81
  /**
96
82
  * Preset for TypeScriptGenerator, sets nullable properties as unions in resulted models(compatibility with zapatos generated models).
@@ -6,10 +6,10 @@ import {
6
6
  FormatHelpers,
7
7
  } from '@asyncapi/modelina';
8
8
  import {
9
- type AsyncAPIDocumentInterface,
10
- type ChannelInterface,
11
- type MessageInterface,
12
- type SpecTypesV2,
9
+ AsyncAPIDocumentInterface,
10
+ ChannelInterface,
11
+ MessageInterface,
12
+ SpecTypesV2,
13
13
  } from '@asyncapi/parser';
14
14
  import * as fs from 'fs';
15
15
  import * as path from 'path';
@@ -1,4 +1,4 @@
1
- import type { OverrideObject } from '@asyncapi/diff';
1
+ import { OverrideObject } from '@asyncapi/diff';
2
2
 
3
3
  const unclassified: OverrideObject[string] = {
4
4
  add: 'unclassified',
@@ -1,8 +1,7 @@
1
- import { pathToFileURL } from 'url';
2
- import type { CommandModule } from 'yargs';
3
- import yargs from 'yargs';
4
- import type { MessageDiffOptions } from './message-diff-options.js';
5
- import { MessageDiff } from './msg-diff.js';
1
+ import * as yargs from 'yargs';
2
+ import { CommandModule } from 'yargs';
3
+ import { MessageDiffOptions } from './message-diff-options';
4
+ import { MessageDiff } from './msg-diff';
6
5
 
7
6
  export const msgDiff: CommandModule<unknown, MessageDiffOptions> = {
8
7
  command: 'msg-diff',
@@ -48,10 +47,7 @@ export const msgDiff: CommandModule<unknown, MessageDiffOptions> = {
48
47
  };
49
48
 
50
49
  // Dev helper. Script can be run directly with command:
51
- // yarn tsx libs/cli/src/commands/msg-diff/index.ts msg-diff -i libs/messages/schemas
52
- const isDirectRun =
53
- process.argv[1] !== undefined &&
54
- import.meta.url === pathToFileURL(process.argv[1]).href;
55
- if (isDirectRun) {
56
- yargs(process.argv.slice(2)).command(msgDiff).demandCommand().argv;
50
+ // ts-node libs/cli/src/commands/msg-diff/index.ts msg-diff -i libs/messages/schemas
51
+ if (require.main === module) {
52
+ yargs.command(msgDiff).demandCommand().argv;
57
53
  }
@@ -1,17 +1,15 @@
1
1
  import {
2
- type AsyncAPIDocumentInterface,
3
- type Diagnostic,
2
+ AsyncAPIDocumentInterface,
3
+ Diagnostic,
4
4
  fromFile,
5
5
  Parser,
6
6
  } from '@asyncapi/parser';
7
7
  import * as fs from 'fs';
8
- import { dirname } from 'path';
9
- import { fileURLToPath } from 'url';
10
8
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
11
- import type { MessageDiffOptions } from './message-diff-options.js';
12
- import { MessageDiff } from './msg-diff.js';
9
+ import { MessageDiffOptions } from './message-diff-options';
10
+ import { MessageDiff } from './msg-diff';
13
11
 
14
- const resources = `${dirname(fileURLToPath(import.meta.url))}/test-resources`;
12
+ const resources = `${__dirname}/test-resources`;
15
13
 
16
14
  describe('sanity', () => {
17
15
  const options: MessageDiffOptions = {
@@ -1,27 +1,20 @@
1
1
  /* eslint-disable no-console */
2
- import { diff, type DiffOutputItem } from '@asyncapi/diff';
3
- import _Parser, {
4
- type AsyncAPIDocumentInterface,
5
- type ChannelInterface,
2
+ import { diff, DiffOutputItem } from '@asyncapi/diff';
3
+ import Parser, {
4
+ AsyncAPIDocumentInterface,
5
+ ChannelInterface,
6
6
  fromFile,
7
- type SchemaInterface,
7
+ SchemaInterface,
8
8
  } from '@asyncapi/parser';
9
- import chalk from 'chalk';
9
+ import { green, red, white } from 'chalk';
10
10
  import * as jsonDiff from 'diff';
11
11
  import * as fs from 'fs';
12
- import jsonSchemaDiff from 'json-schema-diff';
12
+ import * as jsonSchemaDiff from 'json-schema-diff';
13
13
  import * as path from 'path';
14
- import { exitCode } from '../../common/index.js';
15
- import { override } from './asyncapi-override.js';
16
- import { GitCheckoutTmp } from './git-checkout-tmp.js';
17
- import type { MessageDiffOptions } from './message-diff-options.js';
18
- // @asyncapi/parser is a TypeScript-compiled CJS package that emits
19
- // `module.exports = { __esModule: true, default: value }`.
20
- // Node.js native ESM does not honour the __esModule sentinel, so the default
21
- // import receives the whole module.exports wrapper. Pattern 9 in
22
- // ESM_MIGRATION_GUIDE.md. The `?? _Parser` fallback keeps the CJS build safe.
23
- const Parser = ((_Parser as any).default ?? _Parser) as typeof _Parser;
24
- const { green, red, white } = chalk;
14
+ import { exitCode } from '../../common';
15
+ import { override } from './asyncapi-override';
16
+ import { GitCheckoutTmp } from './git-checkout-tmp';
17
+ import { MessageDiffOptions } from './message-diff-options';
25
18
 
26
19
  /**
27
20
  * Diff results. Each file (asyncapi document or payload) is classified to one of 'skipped', 'same', 'changed' or 'breaking'.
@@ -340,7 +333,7 @@ export class MessageDiff {
340
333
  throw new Error(`Could not find payload schema`);
341
334
  }
342
335
 
343
- let result: Awaited<ReturnType<typeof jsonSchemaDiff.diffSchemas>>;
336
+ let result: jsonSchemaDiff.DiffResult;
344
337
  try {
345
338
  result = await jsonSchemaDiff.diffSchemas({
346
339
  sourceSchema: schema1.json(),
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
3
+ "type":"object",
4
4
  "title": "synchronize_claim_definitions_start_command",
5
5
  "description": "Synchronize claim definitions start command schema.",
6
6
  "additionalProperties": false,
@@ -21,7 +21,11 @@
21
21
  "type": "object",
22
22
  "title": "claim_definition_group",
23
23
  "additionalProperties": false,
24
- "required": ["title", "selection_mode", "claim_definitions"],
24
+ "required": [
25
+ "title",
26
+ "selection_mode",
27
+ "claim_definitions"
28
+ ],
25
29
  "properties": {
26
30
  "title": {
27
31
  "$ref": "../common.json#/definitions/non_empty_string",
@@ -31,7 +35,10 @@
31
35
  "type": "string",
32
36
  "title": "claim_selection_mode",
33
37
  "description": "Selection options for a claim definition group.",
34
- "enum": ["SINGLE", "MULTIPLE"]
38
+ "enum": [
39
+ "SINGLE",
40
+ "MULTIPLE"
41
+ ]
35
42
  },
36
43
  "claim_definitions": {
37
44
  "type": "array",
@@ -48,7 +55,10 @@
48
55
  "type": "object",
49
56
  "title": "claim_definition",
50
57
  "additionalProperties": false,
51
- "required": ["claim", "title"],
58
+ "required": [
59
+ "claim",
60
+ "title"
61
+ ],
52
62
  "properties": {
53
63
  "claim": {
54
64
  "$ref": "../common.json#/definitions/non_empty_string",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
3
+ "type":"object",
4
4
  "title": "example_post_created_event",
5
5
  "description": "New post created event.",
6
6
  "properties": {
@@ -18,5 +18,8 @@
18
18
  }
19
19
  },
20
20
  "additionalProperties": false,
21
- "required": ["title", "content"]
21
+ "required": [
22
+ "title",
23
+ "content"
24
+ ]
22
25
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
3
+ "type":"object",
4
4
  "title": "example_post_created_event",
5
5
  "description": "New post created event.",
6
6
  "properties": {
@@ -18,5 +18,8 @@
18
18
  }
19
19
  },
20
20
  "additionalProperties": false,
21
- "required": ["title", "content"]
21
+ "required": [
22
+ "title",
23
+ "content"
24
+ ]
22
25
  }
@@ -6,11 +6,11 @@ import {
6
6
  pick,
7
7
  } from '@axinom/mosaic-service-common';
8
8
  import chalk from 'chalk';
9
- import { type ExecException, exec } from 'child_process';
9
+ import { ExecException, exec } from 'child_process';
10
10
  import { existsSync, mkdirSync, statSync } from 'fs';
11
11
  import { basename, dirname, isAbsolute, join, normalize, relative } from 'path';
12
- import { exitCode, getTimestamp } from '../../common/index.js';
13
- import type { PgDumpOptions } from './pg-dump-options.js';
12
+ import { exitCode, getTimestamp } from '../../common';
13
+ import { PgDumpOptions } from './pg-dump-options';
14
14
 
15
15
  /**
16
16
  * Type needed for findCompose functions
@@ -1,6 +1,6 @@
1
- import type { CommandModule } from 'yargs';
2
- import { generate } from './generate.js';
3
- import type { PgDumpOptions } from './pg-dump-options.js';
1
+ import { CommandModule } from 'yargs';
2
+ import { generate } from './generate';
3
+ import { PgDumpOptions } from './pg-dump-options';
4
4
 
5
5
  export const pgDump: CommandModule<unknown, PgDumpOptions> = {
6
6
  command: 'pg-dump',
@@ -122,10 +122,9 @@ Mapping of supported property types to DB constructs:
122
122
  > Checked a bit on the implementation. The "ignored properties" seems to be
123
123
  > just a flat string list. So it is not possible to exclude propertyA from
124
124
  > movie but keep propertyB on TV show - right? In the used env variable I see
125
- > $schema,related_items. The schema part I understand (and I would even
126
- > hard-code that potentially - or even exclude anything starting with $). But
127
- > for "related_items" I am very unsure about. The name can be custom, it can
128
- > change over time etc. I would rather say to hard code the \$ part. And then
129
- > have some callback function that you can implement in code that would get
130
- > the content type (and for objects also that type). And then this could be
131
- > customized to exclude if it is needed.
125
+ > $schema,related_items. The schema part I understand (and I would even hard-code that potentially - or even exclude anything starting with $).
126
+ > But for "related_items" I am very unsure about. The name can be custom, it
127
+ > can change over time etc. I would rather say to hard code the \$ part. And
128
+ > then have some callback function that you can implement in code that would
129
+ > get the content type (and for objects also that type). And then this could
130
+ > be customized to exclude if it is needed.
@@ -1,4 +1,4 @@
1
- import type { PgSmartTagTags } from 'graphile-utils/node8plus/makePgSmartTagsPlugin';
1
+ import { PgSmartTagTags } from 'graphile-utils/node8plus/makePgSmartTagsPlugin';
2
2
 
3
3
  export interface BaseSmartTags {
4
4
  tags?: PgSmartTagTags;
@@ -1,5 +1,5 @@
1
- export * from './base-smart-tags.js';
2
- export * from './pg-column.js';
3
- export * from './pg-fk-column.js';
4
- export * from './pg-table.js';
5
- export * from './pg-type.js';
1
+ export * from './base-smart-tags';
2
+ export * from './pg-column';
3
+ export * from './pg-fk-column';
4
+ export * from './pg-table';
5
+ export * from './pg-type';
@@ -1,6 +1,6 @@
1
- import type { BaseSmartTags } from './base-smart-tags.js';
2
- import type { PgTable } from './pg-table.js';
3
- import type { PgType } from './pg-type.js';
1
+ import { BaseSmartTags } from './base-smart-tags';
2
+ import { PgTable } from './pg-table';
3
+ import { PgType } from './pg-type';
4
4
 
5
5
  /**
6
6
  * Abstraction over a Postgres table column.
@@ -1,4 +1,4 @@
1
- import type { PgColumn } from './pg-column.js';
1
+ import { PgColumn } from './pg-column';
2
2
 
3
3
  export interface PgFkColumn extends PgColumn {
4
4
  readonly targetPk: PgColumn;
@@ -1,7 +1,7 @@
1
- import type { PgSmartTagTags } from 'graphile-utils';
2
- import type { BaseSmartTags } from './base-smart-tags.js';
3
- import type { PgColumn } from './pg-column.js';
4
- import type { PgFkColumn } from './pg-fk-column.js';
1
+ import { PgSmartTagTags } from 'graphile-utils';
2
+ import { BaseSmartTags } from './base-smart-tags';
3
+ import { PgColumn } from './pg-column';
4
+ import { PgFkColumn } from './pg-fk-column';
5
5
 
6
6
  // TODO: Consider adding a separate property for FKs for consistency.
7
7
  /**
@@ -1,13 +1,10 @@
1
1
  /* eslint-disable no-console */
2
- import type { JSONSchema4 } from 'json-schema';
3
- import type { PgTable, TableSmartTags } from './abstractions/index.js';
4
- import { separateProperties } from './pg-models/json-schema-parse-utils.js';
5
- import { isReservedPgWord } from './pg-models/pg-sql-gen-utils.js';
6
- import {
7
- ContentEntityTable,
8
- ObjectPropertyTable,
9
- } from './pg-models/tables/index.js';
10
- import type { PublishSchemaToDbOptions } from './publish-schema-to-db-options.js';
2
+ import { JSONSchema4 } from 'json-schema';
3
+ import { PgTable, TableSmartTags } from './abstractions';
4
+ import { separateProperties } from './pg-models/json-schema-parse-utils';
5
+ import { isReservedPgWord } from './pg-models/pg-sql-gen-utils';
6
+ import { ContentEntityTable, ObjectPropertyTable } from './pg-models/tables';
7
+ import { PublishSchemaToDbOptions } from './publish-schema-to-db-options';
11
8
 
12
9
  export class ContentEntityModel {
13
10
  public name: string;
@@ -1,20 +1,20 @@
1
1
  /* eslint-disable no-console */
2
- import type { JSONPgSmartTags } from 'graphile-utils';
2
+ import { JSONPgSmartTags } from 'graphile-utils';
3
3
  import * as path from 'path';
4
- import { exitCode } from '../../common/index.js';
5
- import { ContentEntityModel } from './content-entity-model.js';
6
- import { getContentMetadataSchemas } from './pg-models/json-schema-parse-utils.js';
7
- import { generateMigration } from './pg-models/pg-sql-gen-utils.js';
8
- import { generateSmartTagsPlugin } from './pg-models/pgl-utils.js';
4
+ import { exitCode } from '../../common';
5
+ import { ContentEntityModel } from './content-entity-model';
6
+ import { getContentMetadataSchemas } from './pg-models/json-schema-parse-utils';
7
+ import { generateMigration } from './pg-models/pg-sql-gen-utils';
8
+ import { generateSmartTagsPlugin } from './pg-models/pgl-utils';
9
9
  import {
10
10
  collectionPostprocessor,
11
- type ContentEntityModelPostprocessor,
11
+ ContentEntityModelPostprocessor,
12
12
  episodePostprocessor,
13
13
  moviePostprocessor,
14
14
  seasonPostprocessor,
15
15
  tvshowPostprocessor,
16
- } from './postprocessors/index.js';
17
- import type { PublishSchemaToDbOptions } from './publish-schema-to-db-options.js';
16
+ } from './postprocessors';
17
+ import { PublishSchemaToDbOptions } from './publish-schema-to-db-options';
18
18
 
19
19
  /**
20
20
  * Generates a database schema from an asset publish format JSON schema.
@@ -1,6 +1,6 @@
1
- import type { CommandModule } from 'yargs';
2
- import { generate } from './generate.js';
3
- import type { PublishSchemaToDbOptions } from './publish-schema-to-db-options.js';
1
+ import { CommandModule } from 'yargs';
2
+ import { generate } from './generate';
3
+ import { PublishSchemaToDbOptions } from './publish-schema-to-db-options';
4
4
 
5
5
  export const publishSchemaToDb: CommandModule<
6
6
  unknown,
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from 'vitest';
2
- import type { PgColumn, PgTable, PgType } from '../../abstractions/index.js';
3
- import { FkColumn } from './fk-column.js';
2
+ import { PgColumn, PgTable, PgType } from '../../abstractions';
3
+ import { FkColumn } from './fk-column';
4
4
 
5
5
  interface FkColumnTestInput {
6
6
  pkType: PgType;
@@ -1,11 +1,11 @@
1
1
  import {
2
- type BaseSmartTags,
3
- type PgColumn,
4
- type PgFkColumn,
5
- type PgTable,
6
- type PgType,
7
- } from '../../abstractions/index.js';
8
- import { buildName } from '../pg-sql-gen-utils.js';
2
+ BaseSmartTags,
3
+ PgColumn,
4
+ PgFkColumn,
5
+ PgTable,
6
+ PgType,
7
+ } from '../../abstractions';
8
+ import { buildName } from '../pg-sql-gen-utils';
9
9
 
10
10
  export class FkColumn implements PgFkColumn {
11
11
  name: string;
@@ -1,4 +1,4 @@
1
- export * from './fk-column.js';
2
- export * from './pk-column.js';
3
- export * from './primitive-column.js';
4
- export * from './virtual-fk-column.js';
1
+ export * from './fk-column';
2
+ export * from './pk-column';
3
+ export * from './primitive-column';
4
+ export * from './virtual-fk-column';
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from 'vitest';
2
- import type { PgTable, PgType } from '../../abstractions/index.js';
3
- import { PkColumn } from './pk-column.js';
2
+ import { PgTable, PgType } from '../../abstractions';
3
+ import { PkColumn } from './pk-column';
4
4
 
5
5
  interface PkColumnTestInput {
6
6
  type: PgType;
@@ -1,9 +1,4 @@
1
- import type {
2
- BaseSmartTags,
3
- PgColumn,
4
- PgTable,
5
- PgType,
6
- } from '../../abstractions/index.js';
1
+ import { BaseSmartTags, PgColumn, PgTable, PgType } from '../../abstractions';
7
2
 
8
3
  export class PkColumn implements PgColumn {
9
4
  name: string;
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from 'vitest';
2
- import type { PgTable } from '../../abstractions/index.js';
3
- import { PrimitiveColumn } from './primitive-column.js';
2
+ import { PgTable } from '../../abstractions';
3
+ import { PrimitiveColumn } from './primitive-column';
4
4
 
5
5
  const dummyTable: PgTable = {
6
6
  name: 'some_table',
@@ -1,9 +1,4 @@
1
- import type {
2
- BaseSmartTags,
3
- PgColumn,
4
- PgTable,
5
- PgType,
6
- } from '../../abstractions/index.js';
1
+ import { BaseSmartTags, PgColumn, PgTable, PgType } from '../../abstractions';
7
2
 
8
3
  export interface PrimitiveColumnOptions {
9
4
  description?: string;
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from 'vitest';
2
- import type { PgColumn, PgTable } from '../../abstractions/index.js';
3
- import { VirtualFkColumn } from './virtual-fk-column.js';
2
+ import { PgColumn, PgTable } from '../../abstractions';
3
+ import { VirtualFkColumn } from './virtual-fk-column';
4
4
 
5
5
  describe('VirtualFkColumn', () => {
6
6
  test('Virtual FK is created with correct references', () => {
@@ -1,11 +1,11 @@
1
1
  import {
2
- type BaseSmartTags,
3
- type PgColumn,
4
- type PgFkColumn,
5
- type PgTable,
6
- type PgType,
7
- } from '../../abstractions/index.js';
8
- import { buildName } from '../pg-sql-gen-utils.js';
2
+ BaseSmartTags,
3
+ PgColumn,
4
+ PgFkColumn,
5
+ PgTable,
6
+ PgType,
7
+ } from '../../abstractions';
8
+ import { buildName } from '../pg-sql-gen-utils';
9
9
 
10
10
  export class VirtualFkColumn implements PgFkColumn {
11
11
  name: string;
@@ -1,7 +1,7 @@
1
- import type { JSONSchema4 } from 'json-schema';
1
+ import { JSONSchema4 } from 'json-schema';
2
2
  import { describe, expect, test } from 'vitest';
3
- import type { PgType } from '../abstractions/index.js';
4
- import { getPropertySchema, mapToPgType } from './json-schema-parse-utils.js';
3
+ import { PgType } from '../abstractions';
4
+ import { getPropertySchema, mapToPgType } from './json-schema-parse-utils';
5
5
 
6
6
  describe('mapToPgType', () => {
7
7
  interface TestInput {
@@ -1,9 +1,7 @@
1
- import glob from 'glob';
2
- import type { JSONSchema4 } from 'json-schema';
3
- import refParser from 'json-schema-ref-parser';
4
- import type { PgType } from '../abstractions/index.js';
5
- const { dereference } =
6
- refParser as unknown as typeof import('json-schema-ref-parser');
1
+ import { glob } from 'glob';
2
+ import { JSONSchema4 } from 'json-schema';
3
+ import { dereference } from 'json-schema-ref-parser';
4
+ import { PgType } from '../abstractions';
7
5
 
8
6
  /**
9
7
  * Returns true if a JSON schema property element is a primitive property.
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, test } from 'vitest';
2
- import { buildName } from './pg-sql-gen-utils.js';
2
+ import { buildName } from './pg-sql-gen-utils';
3
3
 
4
4
  describe('buildName', () => {
5
5
  test('single part', () => {
@@ -2,7 +2,8 @@
2
2
  import * as fs from 'fs';
3
3
  import * as path from 'path';
4
4
  import { format } from 'sql-formatter';
5
- import type { PgTable } from '../abstractions/index.js';
5
+ import { PgColumn, PgTable } from '../abstractions';
6
+ import { ContentEntityModel } from '../content-entity-model';
6
7
 
7
8
  export function buildFullTableName(tableName: string, schema?: string): string {
8
9
  return schema ? `${schema}.${tableName}` : tableName;
@@ -116,6 +117,41 @@ export function buildName(...nameParts: string[]): string {
116
117
  return nameParts.join('_');
117
118
  }
118
119
 
120
+ export function renameDbItem(
121
+ item: PgTable | PgColumn,
122
+ newName: string,
123
+ displayName?: string,
124
+ ): void {
125
+ item.name = newName;
126
+ if (displayName) {
127
+ item.displayName = displayName;
128
+ }
129
+ }
130
+
131
+ export interface NameOverride {
132
+ [name: string]: [string, string?];
133
+ }
134
+
135
+ export function applyNameOverrides(
136
+ model: ContentEntityModel,
137
+ overrides: NameOverride,
138
+ ): void {
139
+ const mainModelTables = [model.contentEntity, ...model.relatedObjects];
140
+
141
+ for (const table of mainModelTables) {
142
+ let rename = overrides[table.name];
143
+ if (rename) {
144
+ renameDbItem(table, ...rename);
145
+ }
146
+ for (const column of table.columns) {
147
+ rename = overrides[column.name];
148
+ if (rename) {
149
+ renameDbItem(column, ...rename);
150
+ }
151
+ }
152
+ }
153
+ }
154
+
119
155
  export function isReservedPgWord(s: string): boolean {
120
156
  return PgReservedWords.includes(s.toUpperCase());
121
157
  }