@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
1
  /* eslint-disable no-console */
2
- import chalk, { type Chalk } from 'chalk';
2
+ import { Chalk, cyanBright, gray, green, red, white, yellow } from 'chalk';
3
3
  import * as Diff from 'diff';
4
4
  import * as envfile from 'envfile';
5
5
  import * as fs from 'fs';
@@ -7,12 +7,10 @@ import { copyFileSync, existsSync, readFileSync, writeFileSync } from 'fs';
7
7
  import glob from 'glob';
8
8
  import * as path from 'path';
9
9
  import * as readline from 'readline';
10
- import { pathToFileURL } from 'url';
11
- import type { CommandModule } from 'yargs';
12
- import yargs from 'yargs';
13
- import { exitCode, getTimestamp } from '../../common/index.js';
14
- import { BitwardenVault, type Vault } from './bitwarden-vault.js';
15
- const { cyanBright, gray, green, red, white, yellow } = chalk;
10
+ import * as yargs from 'yargs';
11
+ import { CommandModule } from 'yargs';
12
+ import { exitCode, getTimestamp } from '../../common';
13
+ import { BitwardenVault, Vault } from './bitwarden-vault';
16
14
 
17
15
  export interface ApplyTemplatesOptions {
18
16
  only: string;
@@ -531,10 +529,7 @@ function orderByKey<T>(unordered: Record<string, T>): Record<string, T> {
531
529
  }
532
530
 
533
531
  // Dev helper. Script can be run directly with command (without building the lib):
534
- // yarn tsx libs/cli/src/commands/apply-templates/apply-templates.ts apply-templates
535
- const isDirectRun =
536
- process.argv[1] !== undefined &&
537
- import.meta.url === pathToFileURL(process.argv[1]).href;
538
- if (isDirectRun) {
539
- yargs(process.argv.slice(2)).command(applyTemplates).demandCommand().argv;
532
+ // yarn ts-node libs/cli/src/commands/apply-templates/apply-templates.ts apply-templates
533
+ if (require.main === module) {
534
+ yargs.command(applyTemplates).demandCommand().argv;
540
535
  }
@@ -1,7 +1,6 @@
1
1
  /* eslint-disable no-console */
2
- import chalk from 'chalk';
2
+ import { cyanBright, red } from 'chalk';
3
3
  import { execSync } from 'child_process';
4
- const { cyanBright, red } = chalk;
5
4
 
6
5
  /** A single item as returned by `bw list items`. */
7
6
  interface BitwardenItem {
@@ -1 +1 @@
1
- export * from './apply-templates.js';
1
+ export * from './apply-templates';
@@ -1,10 +1,10 @@
1
1
  import { ExitPromptError } from '@inquirer/core';
2
- import type { CommandModule } from 'yargs';
3
- import { createSolution } from './createSolution.js';
4
- import { defaultValues } from './defaultValues.js';
5
- import { logger, setDebug } from './helpers/logger.js';
6
- import type { CliResults } from './helpers/types.js';
7
- import { runQuestionaire } from './runQuestionaire.js';
2
+ import { CommandModule } from 'yargs';
3
+ import { createSolution } from './createSolution';
4
+ import { defaultValues } from './defaultValues';
5
+ import { logger, setDebug } from './helpers/logger';
6
+ import { CliResults } from './helpers/types';
7
+ import { runQuestionaire } from './runQuestionaire';
8
8
 
9
9
  export const createSolutionCommand: CommandModule<unknown, CliResults> = {
10
10
  command: 'create',
@@ -4,9 +4,9 @@ import { createGunzip } from 'node:zlib';
4
4
  import * as path from 'path';
5
5
  import { simpleGit } from 'simple-git';
6
6
  import { extract } from 'tar';
7
- import { getCommitId } from './helpers/git.js';
8
- import * as logger from './helpers/logger.js';
9
- import type { CreateSolutionInput } from './helpers/types.js';
7
+ import { getCommitId } from './helpers/git';
8
+ import * as logger from './helpers/logger';
9
+ import { CreateSolutionInput } from './helpers/types';
10
10
 
11
11
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
12
12
  const getOra = async () => (await import('ora')).default;
@@ -1,4 +1,4 @@
1
- import type { CreateSolutionInput } from './types.js';
1
+ import { CreateSolutionInput } from './types';
2
2
 
3
3
  export const getBranches = async (): Promise<string[]> => {
4
4
  const branches: string[] = [];
@@ -1,9 +1,9 @@
1
1
  import confirm from '@inquirer/confirm';
2
2
  import input from '@inquirer/input';
3
3
  import select from '@inquirer/select';
4
- import { defaultValues } from './defaultValues.js';
5
- import { getBranches } from './helpers/git.js';
6
- import type { CliResults } from './helpers/types.js';
4
+ import { defaultValues } from './defaultValues';
5
+ import { getBranches } from './helpers/git';
6
+ import { CliResults } from './helpers/types';
7
7
 
8
8
  /**
9
9
  * Runs the questionnaire to gather user input for the project creation.
@@ -3,7 +3,7 @@ import findNearestFile from 'find-nearest-file';
3
3
  import * as fs from 'fs';
4
4
  import * as path from 'path';
5
5
  import { promisify } from 'util';
6
- import { exitCode, getCliExtensionFactory } from '../../common/index.js';
6
+ import { exitCode } from '../../common';
7
7
 
8
8
  const execAsync = promisify(exec);
9
9
 
@@ -74,8 +74,8 @@ export const createExtensionConfig = async (): Promise<void> => {
74
74
  installedMosaicLibs.map(async (lib: string) => {
75
75
  //filter libraries, that have cli extension
76
76
  try {
77
- const cliExtension = getCliExtensionFactory(await import(lib));
78
- if (cliExtension) {
77
+ const result = await import(lib);
78
+ if (result.cliExtension) {
79
79
  extensions.push(lib);
80
80
  }
81
81
  } catch (error) {
@@ -1,9 +1,9 @@
1
1
  import * as dotenv from 'dotenv';
2
- import type { CommandModule } from 'yargs';
2
+ import { CommandModule } from 'yargs';
3
3
  import {
4
4
  createExtensionConfig,
5
5
  getExtensionConfigPath,
6
- } from './create-extension-config.js';
6
+ } from './create-extension-config';
7
7
 
8
8
  export const createExtensionConfigCommand: CommandModule<unknown, undefined> = {
9
9
  command: 'create-extension-config',
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  devGenerateUserAccessTokenWithPermissions,
3
3
  getServiceAccountToken,
4
- type TokenResult,
4
+ TokenResult,
5
5
  } from '@axinom/mosaic-id-link-be';
6
6
  import { readFileSync } from 'fs';
7
- import type { GetAccessTokenOptions } from './get-access-token-options.js';
7
+ import { GetAccessTokenOptions } from './get-access-token-options';
8
8
 
9
9
  /**
10
10
  * Returns a development ID JWT token based on passed options.
@@ -1,9 +1,9 @@
1
1
  import { ensureError } from '@axinom/mosaic-service-common';
2
2
  import chalk from 'chalk';
3
- import type { CommandModule } from 'yargs';
4
- import { exitCode } from '../../common/index.js';
5
- import type { GetAccessTokenOptions } from '../../lib/get-access-token-options.js';
6
- import { getDevAccessToken } from '../../lib/get-dev-access-token.js';
3
+ import { CommandModule } from 'yargs';
4
+ import { exitCode } from '../../common';
5
+ import { GetAccessTokenOptions } from './get-access-token-options';
6
+ import { getDevAccessToken } from './get-dev-access-token';
7
7
 
8
8
  export const getAccessToken: CommandModule<unknown, GetAccessTokenOptions> = {
9
9
  command: 'get-access-token',
@@ -6,14 +6,13 @@
6
6
  /* eslint-disable no-console */
7
7
  /* eslint-disable @typescript-eslint/no-explicit-any */
8
8
  import { CriticalityLevel, diff } from '@graphql-inspector/core';
9
- import chalk from 'chalk';
9
+ import { green, red } from 'chalk';
10
10
  import { execSync } from 'child_process';
11
11
  import * as fs from 'fs';
12
12
  import { GraphQLSchema, buildSchema } from 'graphql';
13
13
  import * as path from 'path';
14
- import type { CommandModule } from 'yargs';
15
- import { exitCode } from '../common/index.js';
16
- const { green, red } = chalk;
14
+ import { CommandModule } from 'yargs';
15
+ import { exitCode } from '../common';
17
16
 
18
17
  interface GraphqlDiffOptions {
19
18
  files: (string | number)[];
@@ -70,7 +69,8 @@ async function gqlDiff(
70
69
  branch: string,
71
70
  verbose: boolean,
72
71
  ): Promise<number> {
73
- const relPath = path.relative(process.cwd(), file);
72
+ const root = path.dirname(__dirname);
73
+ const relPath = path.relative(root, file);
74
74
  console.log(`Comparing schema '${relPath}' with branch '${branch}':`);
75
75
 
76
76
  let schema1: GraphQLSchema | undefined = undefined;
@@ -1,7 +1,7 @@
1
- import type { CommandModule } from 'yargs';
2
- import { manifestCommands } from './manifest/manifest-commands.js';
3
- import { piletCommands } from './pilet/pilet-commands.js';
4
- import { serviceCommands } from './service/service-commands.js';
1
+ import { CommandModule } from 'yargs';
2
+ import { manifestCommands } from './manifest/manifest-commands';
3
+ import { piletCommands } from './pilet/pilet-commands';
4
+ import { serviceCommands } from './service/service-commands';
5
5
 
6
6
  export const hosting: CommandModule<unknown, unknown> = {
7
7
  command: 'hosting',
@@ -1,6 +1,6 @@
1
- import type { CommandModule } from 'yargs';
2
- import type { GetUploadManifestOptions } from './upload-manifest-options.js';
3
- import { uploadDeploymentManifest, validateArgs } from './upload-manifest.js';
1
+ import { CommandModule } from 'yargs';
2
+ import { uploadDeploymentManifest, validateArgs } from './upload-manifest';
3
+ import { GetUploadManifestOptions } from './upload-manifest-options';
4
4
 
5
5
  export const manifestCommands: CommandModule<unknown, unknown> = {
6
6
  builder: (yargs) =>
@@ -1,11 +1,11 @@
1
1
  import { getServiceAccountToken } from '@axinom/mosaic-id-link-be';
2
2
  import { isNullOrWhitespace } from '@axinom/mosaic-service-common';
3
- import axios, { AxiosError, type AxiosInstance } from 'axios';
3
+ import axios, { AxiosError, AxiosInstance } from 'axios';
4
4
  import { existsSync, lstatSync, readFileSync } from 'fs';
5
5
  import * as yaml from 'js-yaml';
6
6
  import * as path from 'path';
7
- import { exitCode } from '../../../common/index.js';
8
- import type { GetUploadManifestOptions } from './upload-manifest-options.js';
7
+ import { exitCode } from '../../../common';
8
+ import { GetUploadManifestOptions } from './upload-manifest-options';
9
9
 
10
10
  const getAxiosInstance = (
11
11
  hostingServiceBaseUrl: string,
@@ -1,6 +1,6 @@
1
- import type { CommandModule } from 'yargs';
2
- import type { GetRegisterPiletOptions } from './register-pilet-options.js';
3
- import { registerPilet, validateArgs } from './register-pilet.js';
1
+ import { CommandModule } from 'yargs';
2
+ import { registerPilet, validateArgs } from './register-pilet';
3
+ import { GetRegisterPiletOptions } from './register-pilet-options';
4
4
 
5
5
  export const piletCommands: CommandModule<unknown, unknown> = {
6
6
  builder: (yargs) =>
@@ -1,14 +1,11 @@
1
- import {
2
- type TokenResult,
3
- getServiceAccountToken,
4
- } from '@axinom/mosaic-id-link-be';
1
+ import { TokenResult, getServiceAccountToken } from '@axinom/mosaic-id-link-be';
5
2
  import { isNullOrWhitespace } from '@axinom/mosaic-service-common';
6
3
  import axios, { AxiosError } from 'axios';
7
4
  import FormData from 'form-data';
8
5
  import { createReadStream, existsSync, lstatSync, readdirSync } from 'fs';
9
6
  import * as path from 'path';
10
- import { exitCode } from '../../../common/index.js';
11
- import type { GetRegisterPiletOptions } from './register-pilet-options.js';
7
+ import { exitCode } from '../../../common';
8
+ import { GetRegisterPiletOptions } from './register-pilet-options';
12
9
 
13
10
  export const registerPilet = async (
14
11
  args: Required<GetRegisterPiletOptions>,
@@ -1,8 +1,7 @@
1
- import chalk from 'chalk';
2
- import type { CommandModule } from 'yargs';
3
- import type { GetServiceDeployOptions } from './service-deploy-options.js';
4
- import { deployService, validateDeploymentArgs } from './service-deploy.js';
5
- const { red, yellow } = chalk;
1
+ import { red, yellow } from 'chalk';
2
+ import { CommandModule } from 'yargs';
3
+ import { deployService, validateDeploymentArgs } from './service-deploy';
4
+ import { GetServiceDeployOptions } from './service-deploy-options';
6
5
 
7
6
  export const serviceDeploy: CommandModule<unknown, GetServiceDeployOptions> = {
8
7
  builder: (yargs) => {
@@ -1,12 +1,11 @@
1
1
  import { getServiceAccountToken } from '@axinom/mosaic-id-link-be';
2
2
  import { isNullOrWhitespace } from '@axinom/mosaic-service-common';
3
- import axios, { AxiosError, type AxiosInstance } from 'axios';
4
- import chalk from 'chalk';
3
+ import axios, { AxiosError, AxiosInstance } from 'axios';
4
+ import { green, red, yellow } from 'chalk';
5
5
  import { readFileSync } from 'fs';
6
6
  import * as yaml from 'js-yaml';
7
- import { exitCode } from '../../../../common/index.js';
8
- import type { GetServiceDeployOptions } from './service-deploy-options.js';
9
- const { green, red, yellow } = chalk;
7
+ import { exitCode } from '../../../../common';
8
+ import { GetServiceDeployOptions } from './service-deploy-options';
10
9
 
11
10
  const getAxiosInstance = (
12
11
  hostingServiceBaseUrl: string,
@@ -1,6 +1,6 @@
1
- import type { CommandModule } from 'yargs';
2
- import { serviceDeploy } from './deploy/service-deploy-command.js';
3
- import { serviceUndeploy } from './undeploy/service-undeploy-command.js';
1
+ import { CommandModule } from 'yargs';
2
+ import { serviceDeploy } from './deploy/service-deploy-command';
3
+ import { serviceUndeploy } from './undeploy/service-undeploy-command';
4
4
 
5
5
  export const serviceCommands: CommandModule<unknown, unknown> = {
6
6
  builder: (yargs) =>
@@ -1,11 +1,7 @@
1
- import chalk from 'chalk';
2
- import type { CommandModule } from 'yargs';
3
- import type { GetServiceUndeployOptions } from './service-undeploy-options.js';
4
- import {
5
- undeployService,
6
- validateUndeploymentArgs,
7
- } from './service-undeploy.js';
8
- const { red, yellow } = chalk;
1
+ import { red, yellow } from 'chalk';
2
+ import { CommandModule } from 'yargs';
3
+ import { undeployService, validateUndeploymentArgs } from './service-undeploy';
4
+ import { GetServiceUndeployOptions } from './service-undeploy-options';
9
5
 
10
6
  export const serviceUndeploy: CommandModule<
11
7
  unknown,
@@ -1,10 +1,9 @@
1
1
  import { getServiceAccountToken } from '@axinom/mosaic-id-link-be';
2
2
  import { isNullOrWhitespace } from '@axinom/mosaic-service-common';
3
- import axios, { AxiosError, type AxiosInstance } from 'axios';
4
- import chalk from 'chalk';
5
- import { exitCode } from '../../../../common/index.js';
6
- import type { GetServiceUndeployOptions } from './service-undeploy-options.js';
7
- const { green, red, yellow } = chalk;
3
+ import axios, { AxiosError, AxiosInstance } from 'axios';
4
+ import { green, red, yellow } from 'chalk';
5
+ import { exitCode } from '../../../../common';
6
+ import { GetServiceUndeployOptions } from './service-undeploy-options';
8
7
 
9
8
  const getAxiosInstance = (
10
9
  hostingServiceBaseUrl: string,
@@ -8,23 +8,23 @@ import {
8
8
  typeScriptDefaultPropertyKeyConstraints,
9
9
  TypeScriptGenerator,
10
10
  } from '@asyncapi/modelina';
11
- import _Parser, {
12
- type AsyncAPIDocumentInterface,
11
+ import Parser, {
12
+ AsyncAPIDocumentInterface,
13
13
  fromFile,
14
- type MessageInterface,
14
+ MessageInterface,
15
15
  } from '@asyncapi/parser';
16
- import _endent from 'endent';
16
+ import endent from 'endent';
17
17
  import * as fs from 'fs';
18
18
  import * as path from 'path';
19
- import { exitCode } from '../../common/index.js';
20
- import type { MessageCodegenOptions } from './message-codegen-options.js';
19
+ import { exitCode } from '../../common';
20
+ import { MessageCodegenOptions } from './message-codegen-options';
21
21
  import {
22
22
  ADDITIONAL_PROPERTIES_PRESET,
23
23
  ANY_TO_UNKNOWN_PRESET,
24
- createImportsPreset,
25
24
  EXPORT_TYPES_PRESET,
25
+ IMPORTS_PRESET,
26
26
  NULLABLE_PROPERTY_TO_UNION_PRESET,
27
- } from './presets.js';
27
+ } from './presets';
28
28
  import {
29
29
  createDummyReservedKeywordsChecker,
30
30
  getChannelAction,
@@ -38,19 +38,7 @@ import {
38
38
  getServiceTitle,
39
39
  removeXParserProperties,
40
40
  toPosixPath,
41
- } from './utils.js';
42
- // @asyncapi/parser is a TypeScript-compiled CJS package that emits
43
- // `module.exports = { __esModule: true, default: value }`.
44
- // Node.js native ESM does not honour the __esModule sentinel, so the default
45
- // import receives the whole module.exports wrapper. Pattern 9 in
46
- // ESM_MIGRATION_GUIDE.md. The `?? _Parser` fallback keeps the CJS build safe.
47
- const Parser = ((_Parser as any).default ?? _Parser) as typeof _Parser;
48
- // endent is a TypeScript-compiled CJS package that emits
49
- // `module.exports = { __esModule: true, default: value }`.
50
- // Node.js native ESM does not honour the __esModule sentinel — the default
51
- // import receives the whole module.exports wrapper. Pattern 9 in
52
- // ESM_MIGRATION_GUIDE.md. The `?? _endent` fallback keeps the CJS build safe.
53
- const endent = ((_endent as any).default ?? _endent) as typeof _endent;
41
+ } from './utils';
54
42
 
55
43
  const AX_COMMON_SERVICE_ID = 'ax-common-service';
56
44
 
@@ -70,7 +58,6 @@ export class Codegen {
70
58
  private readonly typesOutputRoot: string;
71
59
  private readonly schemasOutputRoot: string;
72
60
  private readonly messagingSettingsOutputRoot: string;
73
- private readonly importSpecifierExtension: string;
74
61
 
75
62
  constructor(options: MessageCodegenOptions) {
76
63
  this.schemaRoot = path.resolve(options.inputDir);
@@ -87,7 +74,6 @@ export class Codegen {
87
74
  this.typesOutputRoot = path.join(this.outputRoot, 'types');
88
75
  this.schemasOutputRoot = path.join(this.outputRoot, 'schemas');
89
76
  this.messagingSettingsOutputRoot = path.join(this.outputRoot, 'config');
90
- this.importSpecifierExtension = options.importSpecifierExtension ?? '';
91
77
  }
92
78
 
93
79
  public async run(): Promise<void> {
@@ -263,7 +249,7 @@ export class Codegen {
263
249
  ADDITIONAL_PROPERTIES_PRESET,
264
250
  EXPORT_TYPES_PRESET,
265
251
  TS_DESCRIPTION_PRESET,
266
- createImportsPreset(this.importSpecifierExtension),
252
+ IMPORTS_PRESET,
267
253
  ],
268
254
  });
269
255
 
@@ -540,11 +526,7 @@ export class Codegen {
540
526
  serviceId === AX_COMMON_SERVICE_ID,
541
527
  ),
542
528
  );
543
- // MessagingSettings is an interface (implements clause is erased at runtime),
544
- // so it only needs a type import. MultiTenantMessagingSettings is an abstract
545
- // class used in extends, so it requires a value import.
546
- const importKeyword = isMultiTenant ? 'import' : 'import type';
547
- const content = endent`${importKeyword} { ${baseClass} } from '@axinom/mosaic-message-bus-abstractions';
529
+ const content = endent`import { ${baseClass} } from '@axinom/mosaic-message-bus-abstractions';
548
530
 
549
531
  export class ${className} ${action} ${baseClass} {
550
532
  ${properties.join(`\n`)}
@@ -660,26 +642,19 @@ export class Codegen {
660
642
  outPath: string,
661
643
  ): Promise<void> {
662
644
  console.log(`Rolling up TS exports to ${outPath}.`);
663
- const ext = this.importSpecifierExtension;
664
- const allItems: { key: string; isDir: boolean }[] = [
665
- ...files.map((f) => ({ key: path.basename(f, '.ts'), isDir: false })),
666
- ...dirs
667
- .filter((d) => fs.existsSync(d))
668
- .map((d) => ({ key: path.basename(d), isDir: true })),
645
+ const items = [
646
+ ...files.map((f) => path.basename(f, '.ts')),
647
+ ...dirs.filter((d) => fs.existsSync(d)).map((d) => path.basename(d)),
669
648
  ];
670
649
 
671
- if (allItems.length < 1) {
650
+ if (items.length < 1) {
672
651
  return;
673
652
  }
674
653
 
675
- const exports = allItems
676
- .sort((a, b) => (a.key < b.key ? -1 : a.key > b.key ? 1 : 0))
677
- .map(({ key, isDir }) =>
678
- isDir && ext
679
- ? `export * from './${key}/index${ext}';`
680
- : `export * from './${key}${ext}';`,
681
- )
682
- .join('\n');
654
+ const exports = `${items
655
+ .sort()
656
+ .map((p) => `export * from './${p}';`)
657
+ .join('\n')}`;
683
658
  let schemaEnum = '';
684
659
  let typeNamesEnum = '';
685
660
 
@@ -752,7 +727,6 @@ export class Codegen {
752
727
  outPath: string,
753
728
  ): Promise<void> {
754
729
  console.log(`Rolling up Messaging Settings exports to ${outPath}.`);
755
- const ext = this.importSpecifierExtension;
756
730
  const items = [
757
731
  ...files.map((f) => path.basename(f, '.ts')),
758
732
  ...dirs.filter((d) => fs.existsSync(d)).map((d) => path.basename(d)),
@@ -771,22 +745,14 @@ export class Codegen {
771
745
 
772
746
  if (files.length > 0) {
773
747
  const baseNames = files.map((f) => path.basename(f, '.ts')).sort();
774
- const messagingImports = baseNames.map(
775
- (n) => `export * from './${n}${ext}';`,
776
- );
748
+ const messagingImports = baseNames.map((n) => `export * from './${n}';`);
777
749
  contents = endent`
778
750
  ${messagingImports.join('\n')}
779
751
  `;
780
752
  }
781
753
 
782
754
  contents += endent`\n
783
- ${dirExports
784
- .map((d) =>
785
- ext
786
- ? `export * from './${d}/index${ext}';`
787
- : `export * from './${d}';`,
788
- )
789
- .join('\n')}`;
755
+ ${dirExports.map((d) => `export * from './${d}';`).join('\n')}`;
790
756
 
791
757
  await fs.promises.writeFile(outPath, contents);
792
758
  }
@@ -802,7 +768,6 @@ export class Codegen {
802
768
  outPath: string,
803
769
  ): Promise<void> {
804
770
  console.log(`Rolling up JSON exports to ${outPath}.`);
805
- const ext = this.importSpecifierExtension;
806
771
  const items = [
807
772
  ...files.map((f) => path.basename(f, '.json')),
808
773
  ...dirs.filter((d) => fs.existsSync(d)).map((d) => path.basename(d)),
@@ -839,11 +804,7 @@ export class Codegen {
839
804
  }
840
805
 
841
806
  contents += endent`\n
842
- ${dirExports
843
- .map((d) =>
844
- ext ? `export * from './${d}/index${ext}';` : `export * from './${d}';`,
845
- )
846
- .join('\n')}`;
807
+ ${dirExports.map((d) => `export * from './${d}';`).join('\n')}`;
847
808
 
848
809
  await fs.promises.writeFile(outPath, contents);
849
810
  }
@@ -1,7 +1,7 @@
1
- import type { CommandModule } from 'yargs';
2
- import { Codegen } from './codegen.js';
3
- import { lint } from './lint.js';
4
- import type { MessageCodegenOptions } from './message-codegen-options.js';
1
+ import { CommandModule } from 'yargs';
2
+ import { Codegen } from './codegen';
3
+ import { lint } from './lint';
4
+ import { MessageCodegenOptions } from './message-codegen-options';
5
5
 
6
6
  export const msgCodegen: CommandModule<unknown, MessageCodegenOptions> = {
7
7
  command: 'msg-codegen',
@@ -35,13 +35,6 @@ export const msgCodegen: CommandModule<unknown, MessageCodegenOptions> = {
35
35
  alias: 'r',
36
36
  describe: 'Path to a Spectral ruleset file for linting.',
37
37
  type: 'string',
38
- })
39
- .option('importSpecifierExtension', {
40
- alias: 'e',
41
- describe:
42
- 'Extension appended to relative import specifiers in generated barrel files (e.g. ".js" for ESM-compatible output). Default empty string preserves existing CJS behaviour.',
43
- type: 'string',
44
- default: '',
45
38
  }),
46
39
  handler: async (argv) => {
47
40
  if (argv.lint) {
@@ -1,14 +1,11 @@
1
- import spectralCore, { type Ruleset } from '@stoplight/spectral-core';
2
- import spectralParsers from '@stoplight/spectral-parsers';
1
+ import { Document, Ruleset, Spectral } from '@stoplight/spectral-core';
2
+ import * as Parsers from '@stoplight/spectral-parsers';
3
3
  import { bundleAndLoadRuleset } from '@stoplight/spectral-ruleset-bundler/with-loader';
4
- import spectralRuntime from '@stoplight/spectral-runtime';
4
+ import { fetch } from '@stoplight/spectral-runtime';
5
5
  import * as fs from 'fs';
6
- import glob from 'glob';
6
+ import * as glob from 'glob';
7
7
  import * as path from 'path';
8
- import type { MessageCodegenOptions } from './message-codegen-options.js';
9
- const { Document, Spectral } = spectralCore;
10
- const { Json } = spectralParsers;
11
- const { fetch } = spectralRuntime;
8
+ import { MessageCodegenOptions } from './message-codegen-options';
12
9
 
13
10
  export async function lint(options: MessageCodegenOptions): Promise<void> {
14
11
  console.log(`Linting schemas at ${options.inputDir}.`);
@@ -32,7 +29,7 @@ export async function lint(options: MessageCodegenOptions): Promise<void> {
32
29
  // console.log(schema);
33
30
  const document = new Document(
34
31
  fs.readFileSync(schema, 'utf-8'),
35
- Json,
32
+ Parsers.Json,
36
33
  schema,
37
34
  );
38
35
  const results = await spectral.run(document);
@@ -4,5 +4,4 @@ export interface MessageCodegenOptions {
4
4
  outputDir: string;
5
5
  lint: boolean;
6
6
  rulesetPath?: string;
7
- importSpecifierExtension: string;
8
7
  }