@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.
- package/README.md +3 -9
- package/bin/mosaic.js +3 -0
- package/dist/cli/index.js +54 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/{esm/commands → commands}/apply-templates/apply-templates.d.ts +2 -2
- package/dist/{esm/commands → commands}/apply-templates/apply-templates.js +57 -56
- package/dist/commands/apply-templates/apply-templates.js.map +1 -0
- package/dist/{esm/commands → commands}/apply-templates/bitwarden-vault.js +18 -18
- package/dist/commands/apply-templates/bitwarden-vault.js.map +1 -0
- package/dist/commands/apply-templates/index.d.ts +1 -0
- package/dist/commands/apply-templates/index.js +5 -0
- package/dist/commands/apply-templates/index.js.map +1 -0
- package/dist/commands/create/command.d.ts +3 -0
- package/dist/{esm/commands → commands}/create/command.js +27 -23
- package/dist/commands/create/command.js.map +1 -0
- package/dist/{esm/commands → commands}/create/createSolution.d.ts +1 -1
- package/dist/{esm/commands → commands}/create/createSolution.js +22 -16
- package/dist/commands/create/createSolution.js.map +1 -0
- package/dist/commands/create/defaultValues.js +10 -0
- package/dist/commands/create/defaultValues.js.map +1 -0
- package/dist/{esm/commands → commands}/create/helpers/git.d.ts +1 -1
- package/dist/{esm/commands → commands}/create/helpers/git.js +7 -2
- package/dist/commands/create/helpers/git.js.map +1 -0
- package/dist/commands/create/helpers/logger.js +46 -0
- package/dist/commands/create/helpers/logger.js.map +1 -0
- package/dist/commands/create/helpers/types.js +3 -0
- package/dist/commands/create/helpers/types.js.map +1 -0
- package/dist/{esm/commands → commands}/create/runQuestionaire.d.ts +1 -1
- package/dist/{esm/commands → commands}/create/runQuestionaire.js +20 -15
- package/dist/commands/create/runQuestionaire.js.map +1 -0
- package/dist/{esm/commands → commands}/create-extension-config/create-extension-config.js +22 -15
- package/dist/commands/create-extension-config/create-extension-config.js.map +1 -0
- package/dist/{esm/commands → commands}/create-extension-config/index.d.ts +1 -1
- package/dist/commands/create-extension-config/index.js +22 -0
- package/dist/commands/create-extension-config/index.js.map +1 -0
- package/dist/commands/get-access-token/get-access-token-options.js.map +1 -0
- package/dist/{cjs/lib → commands/get-access-token}/get-dev-access-token.d.ts +2 -2
- package/dist/commands/get-access-token/get-dev-access-token.js.map +1 -0
- package/dist/commands/get-access-token/index.d.ts +3 -0
- package/dist/{esm/commands → commands}/get-access-token/index.js +14 -10
- package/dist/commands/get-access-token/index.js.map +1 -0
- package/dist/{esm/commands → commands}/graphql-diff.d.ts +1 -1
- package/dist/{esm/commands → commands}/graphql-diff.js +25 -21
- package/dist/commands/graphql-diff.js.map +1 -0
- package/dist/{esm/commands → commands}/hosting/index.d.ts +1 -1
- package/dist/commands/hosting/index.js +19 -0
- package/dist/commands/hosting/index.js.map +1 -0
- package/dist/{esm/commands → commands}/hosting/manifest/manifest-commands.d.ts +1 -1
- package/dist/{esm/commands → commands}/hosting/manifest/manifest-commands.js +7 -4
- package/dist/commands/hosting/manifest/manifest-commands.js.map +1 -0
- package/dist/commands/hosting/manifest/upload-manifest-options.js +3 -0
- package/dist/commands/hosting/manifest/upload-manifest-options.js.map +1 -0
- package/dist/{esm/commands → commands}/hosting/manifest/upload-manifest.d.ts +1 -1
- package/dist/{esm/commands → commands}/hosting/manifest/upload-manifest.js +38 -34
- package/dist/commands/hosting/manifest/upload-manifest.js.map +1 -0
- package/dist/{esm/commands → commands}/hosting/pilet/pilet-commands.d.ts +1 -1
- package/dist/{esm/commands → commands}/hosting/pilet/pilet-commands.js +7 -4
- package/dist/commands/hosting/pilet/pilet-commands.js.map +1 -0
- package/dist/commands/hosting/pilet/register-pilet-options.js +3 -0
- package/dist/commands/hosting/pilet/register-pilet-options.js.map +1 -0
- package/dist/{esm/commands → commands}/hosting/pilet/register-pilet.d.ts +1 -1
- package/dist/commands/hosting/pilet/register-pilet.js +131 -0
- package/dist/commands/hosting/pilet/register-pilet.js.map +1 -0
- package/dist/commands/hosting/service/deploy/service-deploy-command.d.ts +3 -0
- package/dist/{esm/commands → commands}/hosting/service/deploy/service-deploy-command.js +10 -8
- package/dist/commands/hosting/service/deploy/service-deploy-command.js.map +1 -0
- package/dist/commands/hosting/service/deploy/service-deploy-options.js +3 -0
- package/dist/commands/hosting/service/deploy/service-deploy-options.js.map +1 -0
- package/dist/{esm/commands → commands}/hosting/service/deploy/service-deploy.d.ts +1 -1
- package/dist/commands/hosting/service/deploy/service-deploy.js +246 -0
- package/dist/commands/hosting/service/deploy/service-deploy.js.map +1 -0
- package/dist/{esm/commands → commands}/hosting/service/service-commands.d.ts +1 -1
- package/dist/commands/hosting/service/service-commands.js +16 -0
- package/dist/commands/hosting/service/service-commands.js.map +1 -0
- package/dist/commands/hosting/service/undeploy/service-undeploy-command.d.ts +3 -0
- package/dist/{esm/commands → commands}/hosting/service/undeploy/service-undeploy-command.js +10 -8
- package/dist/commands/hosting/service/undeploy/service-undeploy-command.js.map +1 -0
- package/dist/commands/hosting/service/undeploy/service-undeploy-options.js +3 -0
- package/dist/commands/hosting/service/undeploy/service-undeploy-options.js.map +1 -0
- package/dist/{esm/commands → commands}/hosting/service/undeploy/service-undeploy.d.ts +1 -1
- package/dist/commands/hosting/service/undeploy/service-undeploy.js +142 -0
- package/dist/commands/hosting/service/undeploy/service-undeploy.js.map +1 -0
- package/dist/{esm/commands → commands}/msg-codegen/codegen.d.ts +2 -3
- package/dist/{esm/commands → commands}/msg-codegen/codegen.js +83 -114
- package/dist/commands/msg-codegen/codegen.js.map +1 -0
- package/dist/commands/msg-codegen/index.d.ts +3 -0
- package/dist/{esm/commands → commands}/msg-codegen/index.js +8 -11
- package/dist/commands/msg-codegen/index.js.map +1 -0
- package/dist/{esm/commands → commands}/msg-codegen/lint.d.ts +1 -1
- package/dist/{esm/commands → commands}/msg-codegen/lint.js +15 -14
- package/dist/commands/msg-codegen/lint.js.map +1 -0
- package/dist/{esm/commands → commands}/msg-codegen/message-codegen-options.d.ts +0 -1
- package/dist/commands/msg-codegen/message-codegen-options.js +3 -0
- package/dist/commands/msg-codegen/message-codegen-options.js.map +1 -0
- package/dist/{esm/commands → commands}/msg-codegen/presets.d.ts +3 -7
- package/dist/{esm/commands → commands}/msg-codegen/presets.js +30 -35
- package/dist/commands/msg-codegen/presets.js.map +1 -0
- package/dist/{esm/commands → commands}/msg-codegen/utils.d.ts +1 -1
- package/dist/{esm/commands → commands}/msg-codegen/utils.js +86 -52
- package/dist/commands/msg-codegen/utils.js.map +1 -0
- package/dist/{esm/commands → commands}/msg-diff/asyncapi-override.d.ts +1 -1
- package/dist/{esm/commands → commands}/msg-diff/asyncapi-override.js +4 -1
- package/dist/commands/msg-diff/asyncapi-override.js.map +1 -0
- package/dist/{esm/commands → commands}/msg-diff/git-checkout-tmp.js +15 -11
- package/dist/commands/msg-diff/git-checkout-tmp.js.map +1 -0
- package/dist/commands/msg-diff/index.d.ts +3 -0
- package/dist/{esm/commands → commands}/msg-diff/index.js +11 -10
- package/dist/commands/msg-diff/index.js.map +1 -0
- package/dist/commands/msg-diff/message-diff-options.js +3 -0
- package/dist/commands/msg-diff/message-diff-options.js.map +1 -0
- package/dist/{esm/commands → commands}/msg-diff/msg-diff.d.ts +2 -2
- package/dist/{esm/commands → commands}/msg-diff/msg-diff.js +35 -42
- package/dist/commands/msg-diff/msg-diff.js.map +1 -0
- package/dist/{esm/commands → commands}/pg-dump/generate.d.ts +1 -1
- package/dist/{esm/commands → commands}/pg-dump/generate.js +39 -34
- package/dist/commands/pg-dump/generate.js.map +1 -0
- package/dist/commands/pg-dump/index.d.ts +3 -0
- package/dist/{esm/commands → commands}/pg-dump/index.js +6 -3
- package/dist/commands/pg-dump/index.js.map +1 -0
- package/dist/commands/pg-dump/pg-dump-options.js +3 -0
- package/dist/commands/pg-dump/pg-dump-options.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/abstractions/base-smart-tags.d.ts +1 -1
- package/dist/commands/publish-schema-to-db/abstractions/base-smart-tags.js +3 -0
- package/dist/commands/publish-schema-to-db/abstractions/base-smart-tags.js.map +1 -0
- package/dist/commands/publish-schema-to-db/abstractions/index.d.ts +5 -0
- package/dist/commands/publish-schema-to-db/abstractions/index.js +9 -0
- package/dist/commands/publish-schema-to-db/abstractions/index.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/abstractions/pg-column.d.ts +3 -3
- package/dist/commands/publish-schema-to-db/abstractions/pg-column.js +3 -0
- package/dist/commands/publish-schema-to-db/abstractions/pg-column.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/abstractions/pg-fk-column.d.ts +1 -1
- package/dist/commands/publish-schema-to-db/abstractions/pg-fk-column.js +3 -0
- package/dist/commands/publish-schema-to-db/abstractions/pg-fk-column.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/abstractions/pg-table.d.ts +4 -4
- package/dist/commands/publish-schema-to-db/abstractions/pg-table.js +3 -0
- package/dist/commands/publish-schema-to-db/abstractions/pg-table.js.map +1 -0
- package/dist/commands/publish-schema-to-db/abstractions/pg-type.js +3 -0
- package/dist/commands/publish-schema-to-db/abstractions/pg-type.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/content-entity-model.d.ts +3 -3
- package/dist/{esm/commands → commands}/publish-schema-to-db/content-entity-model.js +14 -12
- package/dist/commands/publish-schema-to-db/content-entity-model.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/generate.d.ts +1 -1
- package/dist/commands/publish-schema-to-db/generate.js +61 -0
- package/dist/commands/publish-schema-to-db/generate.js.map +1 -0
- package/dist/commands/publish-schema-to-db/index.d.ts +3 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/index.js +6 -3
- package/dist/commands/publish-schema-to-db/index.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/fk-column.d.ts +1 -1
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/fk-column.js +8 -11
- package/dist/commands/publish-schema-to-db/pg-models/columns/fk-column.js.map +1 -0
- package/dist/commands/publish-schema-to-db/pg-models/columns/index.d.ts +4 -0
- package/dist/commands/publish-schema-to-db/pg-models/columns/index.js +8 -0
- package/dist/commands/publish-schema-to-db/pg-models/columns/index.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/pk-column.d.ts +1 -1
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/pk-column.js +5 -4
- package/dist/commands/publish-schema-to-db/pg-models/columns/pk-column.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/primitive-column.d.ts +1 -1
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/primitive-column.js +10 -10
- package/dist/commands/publish-schema-to-db/pg-models/columns/primitive-column.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/virtual-fk-column.d.ts +1 -1
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/columns/virtual-fk-column.js +8 -9
- package/dist/commands/publish-schema-to-db/pg-models/columns/virtual-fk-column.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/json-schema-parse-utils.d.ts +2 -2
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/json-schema-parse-utils.js +29 -17
- package/dist/commands/publish-schema-to-db/pg-models/json-schema-parse-utils.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/pg-sql-gen-utils.d.ts +7 -1
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/pg-sql-gen-utils.js +50 -14
- package/dist/commands/publish-schema-to-db/pg-models/pg-sql-gen-utils.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/pgl-utils.d.ts +2 -2
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/pgl-utils.js +24 -23
- package/dist/commands/publish-schema-to-db/pg-models/pgl-utils.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/tables/content-entity-table.d.ts +3 -3
- package/dist/commands/publish-schema-to-db/pg-models/tables/content-entity-table.js +67 -0
- package/dist/commands/publish-schema-to-db/pg-models/tables/content-entity-table.js.map +1 -0
- package/dist/commands/publish-schema-to-db/pg-models/tables/index.d.ts +3 -0
- package/dist/commands/publish-schema-to-db/pg-models/tables/index.js +7 -0
- package/dist/commands/publish-schema-to-db/pg-models/tables/index.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/tables/object-property-table.d.ts +3 -3
- package/dist/commands/publish-schema-to-db/pg-models/tables/object-property-table.js +73 -0
- package/dist/commands/publish-schema-to-db/pg-models/tables/object-property-table.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/pg-models/tables/relations-table.d.ts +3 -3
- package/dist/commands/publish-schema-to-db/pg-models/tables/relations-table.js +61 -0
- package/dist/commands/publish-schema-to-db/pg-models/tables/relations-table.js.map +1 -0
- package/dist/commands/publish-schema-to-db/postprocessors/collection-postprocessor.d.ts +2 -0
- package/dist/commands/publish-schema-to-db/postprocessors/collection-postprocessor.js +21 -0
- package/dist/commands/publish-schema-to-db/postprocessors/collection-postprocessor.js.map +1 -0
- package/dist/{esm/commands → commands}/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.d.ts +2 -2
- package/dist/commands/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.js +3 -0
- package/dist/commands/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.js.map +1 -0
- package/dist/commands/publish-schema-to-db/postprocessors/episode-postprocessor.d.ts +2 -0
- package/dist/commands/publish-schema-to-db/postprocessors/episode-postprocessor.js +25 -0
- package/dist/commands/publish-schema-to-db/postprocessors/episode-postprocessor.js.map +1 -0
- package/dist/commands/publish-schema-to-db/postprocessors/index.d.ts +6 -0
- package/dist/commands/publish-schema-to-db/postprocessors/index.js +10 -0
- package/dist/commands/publish-schema-to-db/postprocessors/index.js.map +1 -0
- package/dist/commands/publish-schema-to-db/postprocessors/movie-postprocessor.d.ts +2 -0
- package/dist/commands/publish-schema-to-db/postprocessors/movie-postprocessor.js +21 -0
- package/dist/commands/publish-schema-to-db/postprocessors/movie-postprocessor.js.map +1 -0
- package/dist/commands/publish-schema-to-db/postprocessors/postprocessing-utils.d.ts +4 -0
- package/dist/commands/publish-schema-to-db/postprocessors/postprocessing-utils.js +19 -0
- package/dist/commands/publish-schema-to-db/postprocessors/postprocessing-utils.js.map +1 -0
- package/dist/commands/publish-schema-to-db/postprocessors/season-postprocessor.d.ts +2 -0
- package/dist/commands/publish-schema-to-db/postprocessors/season-postprocessor.js +25 -0
- package/dist/commands/publish-schema-to-db/postprocessors/season-postprocessor.js.map +1 -0
- package/dist/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.d.ts +2 -0
- package/dist/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.js +21 -0
- package/dist/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.js.map +1 -0
- package/dist/commands/publish-schema-to-db/publish-schema-to-db-options.js +3 -0
- package/dist/commands/publish-schema-to-db/publish-schema-to-db-options.js.map +1 -0
- package/dist/{esm/commands → commands}/service/index.d.ts +1 -1
- package/dist/commands/service/index.js +17 -0
- package/dist/commands/service/index.js.map +1 -0
- package/dist/commands/service/purge-permissions/purge-permissions-command.d.ts +3 -0
- package/dist/{esm/commands → commands}/service/purge-permissions/purge-permissions-command.js +10 -8
- package/dist/commands/service/purge-permissions/purge-permissions-command.js.map +1 -0
- package/dist/commands/service/purge-permissions/purge-permissions-options.js +3 -0
- package/dist/commands/service/purge-permissions/purge-permissions-options.js.map +1 -0
- package/dist/{esm/commands → commands}/service/purge-permissions/purge-permissions.d.ts +1 -1
- package/dist/commands/service/purge-permissions/purge-permissions.js +54 -0
- package/dist/commands/service/purge-permissions/purge-permissions.js.map +1 -0
- package/dist/commands/service/sync-permissions/sync-permission-command.d.ts +3 -0
- package/dist/{esm/commands → commands}/service/sync-permissions/sync-permission-command.js +10 -8
- package/dist/commands/service/sync-permissions/sync-permission-command.js.map +1 -0
- package/dist/commands/service/sync-permissions/sync-permissions-options.js +3 -0
- package/dist/commands/service/sync-permissions/sync-permissions-options.js.map +1 -0
- package/dist/{esm/commands → commands}/service/sync-permissions/sync-permissions.d.ts +1 -1
- package/dist/commands/service/sync-permissions/sync-permissions.js +67 -0
- package/dist/commands/service/sync-permissions/sync-permissions.js.map +1 -0
- package/dist/commands/unpublish-pilet/index.d.ts +3 -0
- package/dist/{esm/commands → commands}/unpublish-pilet/index.js +15 -11
- package/dist/commands/unpublish-pilet/index.js.map +1 -0
- package/dist/commands/unpublish-pilet/unpublish-pilet-options.js +3 -0
- package/dist/commands/unpublish-pilet/unpublish-pilet-options.js.map +1 -0
- package/dist/{esm/commands → commands}/unpublish-pilet/unpublish-pilet.d.ts +1 -1
- package/dist/commands/unpublish-pilet/unpublish-pilet.js +19 -0
- package/dist/commands/unpublish-pilet/unpublish-pilet.js.map +1 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +5 -0
- package/dist/common/index.js.map +1 -0
- package/dist/{esm/common → common}/utils.js +6 -2
- package/dist/common/utils.js.map +1 -0
- package/dist/exports.d.ts +2 -0
- package/dist/exports.js +6 -0
- package/dist/exports.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/package.json +13 -22
- package/src/cli/index.ts +18 -21
- package/src/commands/apply-templates/apply-templates.spec.ts +2 -2
- package/src/commands/apply-templates/apply-templates.ts +8 -13
- package/src/commands/apply-templates/bitwarden-vault.ts +1 -2
- package/src/commands/apply-templates/index.ts +1 -1
- package/src/commands/create/command.ts +6 -6
- package/src/commands/create/createSolution.ts +3 -3
- package/src/commands/create/helpers/git.ts +1 -1
- package/src/commands/create/runQuestionaire.ts +3 -3
- package/src/commands/create-extension-config/create-extension-config.ts +3 -3
- package/src/commands/create-extension-config/index.ts +2 -2
- package/src/{lib → commands/get-access-token}/get-dev-access-token.ts +2 -2
- package/src/commands/get-access-token/index.ts +4 -4
- package/src/commands/graphql-diff.ts +5 -5
- package/src/commands/hosting/index.ts +4 -4
- package/src/commands/hosting/manifest/manifest-commands.ts +3 -3
- package/src/commands/hosting/manifest/upload-manifest.ts +3 -3
- package/src/commands/hosting/pilet/pilet-commands.ts +3 -3
- package/src/commands/hosting/pilet/register-pilet.ts +3 -6
- package/src/commands/hosting/service/deploy/service-deploy-command.ts +4 -5
- package/src/commands/hosting/service/deploy/service-deploy.ts +4 -5
- package/src/commands/hosting/service/service-commands.ts +3 -3
- package/src/commands/hosting/service/undeploy/service-undeploy-command.ts +4 -8
- package/src/commands/hosting/service/undeploy/service-undeploy.ts +4 -5
- package/src/commands/msg-codegen/codegen.ts +22 -61
- package/src/commands/msg-codegen/index.ts +4 -11
- package/src/commands/msg-codegen/lint.ts +6 -9
- package/src/commands/msg-codegen/message-codegen-options.ts +0 -1
- package/src/commands/msg-codegen/presets.ts +9 -23
- package/src/commands/msg-codegen/utils.ts +4 -4
- package/src/commands/msg-diff/asyncapi-override.ts +1 -1
- package/src/commands/msg-diff/index.ts +7 -11
- package/src/commands/msg-diff/msg-diff.spec.ts +5 -7
- package/src/commands/msg-diff/msg-diff.ts +12 -19
- package/src/commands/msg-diff/test-resources/0/command.json +14 -4
- package/src/commands/msg-diff/test-resources/0/event.json +5 -2
- package/src/commands/msg-diff/test-resources/1/moved-event.json +5 -2
- package/src/commands/pg-dump/generate.ts +3 -3
- package/src/commands/pg-dump/index.ts +3 -3
- package/src/commands/publish-schema-to-db/README.md +6 -7
- package/src/commands/publish-schema-to-db/abstractions/base-smart-tags.ts +1 -1
- package/src/commands/publish-schema-to-db/abstractions/index.ts +5 -5
- package/src/commands/publish-schema-to-db/abstractions/pg-column.ts +3 -3
- package/src/commands/publish-schema-to-db/abstractions/pg-fk-column.ts +1 -1
- package/src/commands/publish-schema-to-db/abstractions/pg-table.ts +4 -4
- package/src/commands/publish-schema-to-db/content-entity-model.ts +6 -9
- package/src/commands/publish-schema-to-db/generate.ts +9 -9
- package/src/commands/publish-schema-to-db/index.ts +3 -3
- package/src/commands/publish-schema-to-db/pg-models/columns/fk-column.spec.ts +2 -2
- package/src/commands/publish-schema-to-db/pg-models/columns/fk-column.ts +7 -7
- package/src/commands/publish-schema-to-db/pg-models/columns/index.ts +4 -4
- package/src/commands/publish-schema-to-db/pg-models/columns/pk-column.spec.ts +2 -2
- package/src/commands/publish-schema-to-db/pg-models/columns/pk-column.ts +1 -6
- package/src/commands/publish-schema-to-db/pg-models/columns/primitive-column.spec.ts +2 -2
- package/src/commands/publish-schema-to-db/pg-models/columns/primitive-column.ts +1 -6
- package/src/commands/publish-schema-to-db/pg-models/columns/virtual-fk-column.spec.ts +2 -2
- package/src/commands/publish-schema-to-db/pg-models/columns/virtual-fk-column.ts +7 -7
- package/src/commands/publish-schema-to-db/pg-models/json-schema-parse-utils.spec.ts +3 -3
- package/src/commands/publish-schema-to-db/pg-models/json-schema-parse-utils.ts +4 -6
- package/src/commands/publish-schema-to-db/pg-models/pg-sql-gen-utils.spec.ts +1 -1
- package/src/commands/publish-schema-to-db/pg-models/pg-sql-gen-utils.ts +37 -1
- package/src/commands/publish-schema-to-db/pg-models/pgl-utils.spec.ts +1 -1
- package/src/commands/publish-schema-to-db/pg-models/pgl-utils.ts +10 -18
- package/src/commands/publish-schema-to-db/pg-models/tables/content-entity-table.ts +11 -11
- package/src/commands/publish-schema-to-db/pg-models/tables/index.ts +3 -3
- package/src/commands/publish-schema-to-db/pg-models/tables/object-property-table.ts +11 -14
- package/src/commands/publish-schema-to-db/pg-models/tables/relations-table.ts +11 -11
- package/src/commands/publish-schema-to-db/postprocessors/collection-postprocessor.ts +3 -3
- package/src/commands/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.ts +2 -2
- package/src/commands/publish-schema-to-db/postprocessors/episode-postprocessor.ts +5 -8
- package/src/commands/publish-schema-to-db/postprocessors/index.ts +6 -6
- package/src/commands/publish-schema-to-db/postprocessors/movie-postprocessor.ts +4 -3
- package/src/commands/publish-schema-to-db/postprocessors/postprocessing-utils.ts +2 -37
- package/src/commands/publish-schema-to-db/postprocessors/season-postprocessor.ts +5 -8
- package/src/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.ts +4 -3
- package/src/commands/service/index.ts +3 -3
- package/src/commands/service/purge-permissions/purge-permissions-command.ts +4 -5
- package/src/commands/service/purge-permissions/purge-permissions.ts +2 -3
- package/src/commands/service/sync-permissions/sync-permission-command.ts +4 -5
- package/src/commands/service/sync-permissions/sync-permissions.ts +4 -5
- package/src/commands/unpublish-pilet/index.ts +4 -4
- package/src/commands/unpublish-pilet/unpublish-pilet.ts +1 -1
- package/src/common/index.ts +1 -2
- package/src/exports.ts +2 -2
- package/src/index.ts +1 -1
- package/bin/mosaic.mjs +0 -5
- package/dist/cjs/exports.d.ts +0 -2
- package/dist/cjs/exports.js +0 -6
- package/dist/cjs/exports.js.map +0 -1
- package/dist/cjs/lib/get-access-token-options.js.map +0 -1
- package/dist/cjs/lib/get-dev-access-token.js.map +0 -1
- package/dist/cjs/package.json +0 -1
- package/dist/esm/cli/index.js +0 -51
- package/dist/esm/cli/index.js.map +0 -1
- package/dist/esm/commands/apply-templates/apply-templates.js.map +0 -1
- package/dist/esm/commands/apply-templates/bitwarden-vault.js.map +0 -1
- package/dist/esm/commands/apply-templates/index.d.ts +0 -1
- package/dist/esm/commands/apply-templates/index.js +0 -2
- package/dist/esm/commands/apply-templates/index.js.map +0 -1
- package/dist/esm/commands/create/command.d.ts +0 -3
- package/dist/esm/commands/create/command.js.map +0 -1
- package/dist/esm/commands/create/createSolution.js.map +0 -1
- package/dist/esm/commands/create/defaultValues.js +0 -7
- package/dist/esm/commands/create/defaultValues.js.map +0 -1
- package/dist/esm/commands/create/helpers/git.js.map +0 -1
- package/dist/esm/commands/create/helpers/logger.js +0 -35
- package/dist/esm/commands/create/helpers/logger.js.map +0 -1
- package/dist/esm/commands/create/helpers/types.js +0 -2
- package/dist/esm/commands/create/helpers/types.js.map +0 -1
- package/dist/esm/commands/create/runQuestionaire.js.map +0 -1
- package/dist/esm/commands/create-extension-config/create-extension-config.js.map +0 -1
- package/dist/esm/commands/create-extension-config/index.js +0 -17
- package/dist/esm/commands/create-extension-config/index.js.map +0 -1
- package/dist/esm/commands/get-access-token/index.d.ts +0 -3
- package/dist/esm/commands/get-access-token/index.js.map +0 -1
- package/dist/esm/commands/graphql-diff.js.map +0 -1
- package/dist/esm/commands/hosting/index.js +0 -16
- package/dist/esm/commands/hosting/index.js.map +0 -1
- package/dist/esm/commands/hosting/manifest/manifest-commands.js.map +0 -1
- package/dist/esm/commands/hosting/manifest/upload-manifest-options.js +0 -2
- package/dist/esm/commands/hosting/manifest/upload-manifest-options.js.map +0 -1
- package/dist/esm/commands/hosting/manifest/upload-manifest.js.map +0 -1
- package/dist/esm/commands/hosting/pilet/pilet-commands.js.map +0 -1
- package/dist/esm/commands/hosting/pilet/register-pilet-options.js +0 -2
- package/dist/esm/commands/hosting/pilet/register-pilet-options.js.map +0 -1
- package/dist/esm/commands/hosting/pilet/register-pilet.js +0 -127
- package/dist/esm/commands/hosting/pilet/register-pilet.js.map +0 -1
- package/dist/esm/commands/hosting/service/deploy/service-deploy-command.d.ts +0 -3
- package/dist/esm/commands/hosting/service/deploy/service-deploy-command.js.map +0 -1
- package/dist/esm/commands/hosting/service/deploy/service-deploy-options.js +0 -2
- package/dist/esm/commands/hosting/service/deploy/service-deploy-options.js.map +0 -1
- package/dist/esm/commands/hosting/service/deploy/service-deploy.js +0 -240
- package/dist/esm/commands/hosting/service/deploy/service-deploy.js.map +0 -1
- package/dist/esm/commands/hosting/service/service-commands.js +0 -13
- package/dist/esm/commands/hosting/service/service-commands.js.map +0 -1
- package/dist/esm/commands/hosting/service/undeploy/service-undeploy-command.d.ts +0 -3
- package/dist/esm/commands/hosting/service/undeploy/service-undeploy-command.js.map +0 -1
- package/dist/esm/commands/hosting/service/undeploy/service-undeploy-options.js +0 -2
- package/dist/esm/commands/hosting/service/undeploy/service-undeploy-options.js.map +0 -1
- package/dist/esm/commands/hosting/service/undeploy/service-undeploy.js +0 -136
- package/dist/esm/commands/hosting/service/undeploy/service-undeploy.js.map +0 -1
- package/dist/esm/commands/msg-codegen/codegen.js.map +0 -1
- package/dist/esm/commands/msg-codegen/index.d.ts +0 -3
- package/dist/esm/commands/msg-codegen/index.js.map +0 -1
- package/dist/esm/commands/msg-codegen/lint.js.map +0 -1
- package/dist/esm/commands/msg-codegen/message-codegen-options.js +0 -2
- package/dist/esm/commands/msg-codegen/message-codegen-options.js.map +0 -1
- package/dist/esm/commands/msg-codegen/presets.js.map +0 -1
- package/dist/esm/commands/msg-codegen/utils.js.map +0 -1
- package/dist/esm/commands/msg-diff/asyncapi-override.js.map +0 -1
- package/dist/esm/commands/msg-diff/git-checkout-tmp.js.map +0 -1
- package/dist/esm/commands/msg-diff/index.d.ts +0 -3
- package/dist/esm/commands/msg-diff/index.js.map +0 -1
- package/dist/esm/commands/msg-diff/message-diff-options.js +0 -2
- package/dist/esm/commands/msg-diff/message-diff-options.js.map +0 -1
- package/dist/esm/commands/msg-diff/msg-diff.js.map +0 -1
- package/dist/esm/commands/pg-dump/generate.js.map +0 -1
- package/dist/esm/commands/pg-dump/index.d.ts +0 -3
- package/dist/esm/commands/pg-dump/index.js.map +0 -1
- package/dist/esm/commands/pg-dump/pg-dump-options.js +0 -2
- package/dist/esm/commands/pg-dump/pg-dump-options.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/abstractions/base-smart-tags.js +0 -2
- package/dist/esm/commands/publish-schema-to-db/abstractions/base-smart-tags.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/abstractions/index.d.ts +0 -5
- package/dist/esm/commands/publish-schema-to-db/abstractions/index.js +0 -6
- package/dist/esm/commands/publish-schema-to-db/abstractions/index.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/abstractions/pg-column.js +0 -2
- package/dist/esm/commands/publish-schema-to-db/abstractions/pg-column.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/abstractions/pg-fk-column.js +0 -2
- package/dist/esm/commands/publish-schema-to-db/abstractions/pg-fk-column.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/abstractions/pg-table.js +0 -2
- package/dist/esm/commands/publish-schema-to-db/abstractions/pg-table.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/abstractions/pg-type.js +0 -2
- package/dist/esm/commands/publish-schema-to-db/abstractions/pg-type.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/content-entity-model.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/generate.js +0 -57
- package/dist/esm/commands/publish-schema-to-db/generate.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/index.d.ts +0 -3
- package/dist/esm/commands/publish-schema-to-db/index.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/columns/fk-column.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/columns/index.d.ts +0 -4
- package/dist/esm/commands/publish-schema-to-db/pg-models/columns/index.js +0 -5
- package/dist/esm/commands/publish-schema-to-db/pg-models/columns/index.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/columns/pk-column.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/columns/primitive-column.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/columns/virtual-fk-column.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/json-schema-parse-utils.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/pg-sql-gen-utils.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/pgl-utils.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/tables/content-entity-table.js +0 -69
- package/dist/esm/commands/publish-schema-to-db/pg-models/tables/content-entity-table.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/tables/index.d.ts +0 -3
- package/dist/esm/commands/publish-schema-to-db/pg-models/tables/index.js +0 -4
- package/dist/esm/commands/publish-schema-to-db/pg-models/tables/index.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/tables/object-property-table.js +0 -75
- package/dist/esm/commands/publish-schema-to-db/pg-models/tables/object-property-table.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/pg-models/tables/relations-table.js +0 -63
- package/dist/esm/commands/publish-schema-to-db/pg-models/tables/relations-table.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/postprocessors/collection-postprocessor.d.ts +0 -2
- package/dist/esm/commands/publish-schema-to-db/postprocessors/collection-postprocessor.js +0 -17
- package/dist/esm/commands/publish-schema-to-db/postprocessors/collection-postprocessor.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.js +0 -2
- package/dist/esm/commands/publish-schema-to-db/postprocessors/content-entity-model-postprocessor.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/postprocessors/episode-postprocessor.d.ts +0 -2
- package/dist/esm/commands/publish-schema-to-db/postprocessors/episode-postprocessor.js +0 -20
- package/dist/esm/commands/publish-schema-to-db/postprocessors/episode-postprocessor.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/postprocessors/index.d.ts +0 -6
- package/dist/esm/commands/publish-schema-to-db/postprocessors/index.js +0 -7
- package/dist/esm/commands/publish-schema-to-db/postprocessors/index.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/postprocessors/movie-postprocessor.d.ts +0 -2
- package/dist/esm/commands/publish-schema-to-db/postprocessors/movie-postprocessor.js +0 -16
- package/dist/esm/commands/publish-schema-to-db/postprocessors/movie-postprocessor.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/postprocessors/postprocessing-utils.d.ts +0 -9
- package/dist/esm/commands/publish-schema-to-db/postprocessors/postprocessing-utils.js +0 -37
- package/dist/esm/commands/publish-schema-to-db/postprocessors/postprocessing-utils.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/postprocessors/season-postprocessor.d.ts +0 -2
- package/dist/esm/commands/publish-schema-to-db/postprocessors/season-postprocessor.js +0 -20
- package/dist/esm/commands/publish-schema-to-db/postprocessors/season-postprocessor.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.d.ts +0 -2
- package/dist/esm/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.js +0 -16
- package/dist/esm/commands/publish-schema-to-db/postprocessors/tvshow-postprocessor.js.map +0 -1
- package/dist/esm/commands/publish-schema-to-db/publish-schema-to-db-options.js +0 -2
- package/dist/esm/commands/publish-schema-to-db/publish-schema-to-db-options.js.map +0 -1
- package/dist/esm/commands/service/index.js +0 -14
- package/dist/esm/commands/service/index.js.map +0 -1
- package/dist/esm/commands/service/purge-permissions/purge-permissions-command.d.ts +0 -3
- package/dist/esm/commands/service/purge-permissions/purge-permissions-command.js.map +0 -1
- package/dist/esm/commands/service/purge-permissions/purge-permissions-options.js +0 -2
- package/dist/esm/commands/service/purge-permissions/purge-permissions-options.js.map +0 -1
- package/dist/esm/commands/service/purge-permissions/purge-permissions.js +0 -49
- package/dist/esm/commands/service/purge-permissions/purge-permissions.js.map +0 -1
- package/dist/esm/commands/service/sync-permissions/sync-permission-command.d.ts +0 -3
- package/dist/esm/commands/service/sync-permissions/sync-permission-command.js.map +0 -1
- package/dist/esm/commands/service/sync-permissions/sync-permissions-options.js +0 -2
- package/dist/esm/commands/service/sync-permissions/sync-permissions-options.js.map +0 -1
- package/dist/esm/commands/service/sync-permissions/sync-permissions.js +0 -62
- package/dist/esm/commands/service/sync-permissions/sync-permissions.js.map +0 -1
- package/dist/esm/commands/unpublish-pilet/index.d.ts +0 -3
- package/dist/esm/commands/unpublish-pilet/index.js.map +0 -1
- package/dist/esm/commands/unpublish-pilet/unpublish-pilet-options.js +0 -2
- package/dist/esm/commands/unpublish-pilet/unpublish-pilet-options.js.map +0 -1
- package/dist/esm/commands/unpublish-pilet/unpublish-pilet.js +0 -14
- package/dist/esm/commands/unpublish-pilet/unpublish-pilet.js.map +0 -1
- package/dist/esm/common/cli-extension.d.ts +0 -10
- package/dist/esm/common/cli-extension.js +0 -7
- package/dist/esm/common/cli-extension.js.map +0 -1
- package/dist/esm/common/index.d.ts +0 -2
- package/dist/esm/common/index.js +0 -3
- package/dist/esm/common/index.js.map +0 -1
- package/dist/esm/common/utils.js.map +0 -1
- package/dist/esm/exports.d.ts +0 -2
- package/dist/esm/exports.js +0 -3
- package/dist/esm/exports.js.map +0 -1
- package/dist/esm/lib/get-access-token-options.d.ts +0 -9
- package/dist/esm/lib/get-access-token-options.js +0 -2
- package/dist/esm/lib/get-access-token-options.js.map +0 -1
- package/dist/esm/lib/get-dev-access-token.d.ts +0 -6
- package/dist/esm/lib/get-dev-access-token.js +0 -11
- package/dist/esm/lib/get-dev-access-token.js.map +0 -1
- package/dist/esm/package.json +0 -1
- package/src/common/cli-extension.ts +0 -21
- /package/dist/{esm/cli → cli}/index.d.ts +0 -0
- /package/dist/{esm/commands → commands}/apply-templates/bitwarden-vault.d.ts +0 -0
- /package/dist/{esm/commands → commands}/create/defaultValues.d.ts +0 -0
- /package/dist/{esm/commands → commands}/create/helpers/logger.d.ts +0 -0
- /package/dist/{esm/commands → commands}/create/helpers/types.d.ts +0 -0
- /package/dist/{esm/commands → commands}/create-extension-config/create-extension-config.d.ts +0 -0
- /package/dist/{cjs/lib → commands/get-access-token}/get-access-token-options.d.ts +0 -0
- /package/dist/{cjs/lib → commands/get-access-token}/get-access-token-options.js +0 -0
- /package/dist/{cjs/lib → commands/get-access-token}/get-dev-access-token.js +0 -0
- /package/dist/{esm/commands → commands}/hosting/manifest/upload-manifest-options.d.ts +0 -0
- /package/dist/{esm/commands → commands}/hosting/pilet/register-pilet-options.d.ts +0 -0
- /package/dist/{esm/commands → commands}/hosting/service/deploy/service-deploy-options.d.ts +0 -0
- /package/dist/{esm/commands → commands}/hosting/service/undeploy/service-undeploy-options.d.ts +0 -0
- /package/dist/{esm/commands → commands}/msg-diff/git-checkout-tmp.d.ts +0 -0
- /package/dist/{esm/commands → commands}/msg-diff/message-diff-options.d.ts +0 -0
- /package/dist/{esm/commands → commands}/pg-dump/pg-dump-options.d.ts +0 -0
- /package/dist/{esm/commands → commands}/publish-schema-to-db/abstractions/pg-type.d.ts +0 -0
- /package/dist/{esm/commands → commands}/publish-schema-to-db/publish-schema-to-db-options.d.ts +0 -0
- /package/dist/{esm/commands → commands}/service/purge-permissions/purge-permissions-options.d.ts +0 -0
- /package/dist/{esm/commands → commands}/service/sync-permissions/sync-permissions-options.d.ts +0 -0
- /package/dist/{esm/commands → commands}/unpublish-pilet/unpublish-pilet-options.d.ts +0 -0
- /package/dist/{esm/common → common}/utils.d.ts +0 -0
- /package/src/{lib → commands/get-access-token}/get-access-token-options.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormatHelpers,
|
|
2
|
-
import
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
-
)}
|
|
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
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
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
|
-
//
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
3
|
-
|
|
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
|
|
12
|
-
import { MessageDiff } from './msg-diff
|
|
9
|
+
import { MessageDiffOptions } from './message-diff-options';
|
|
10
|
+
import { MessageDiff } from './msg-diff';
|
|
13
11
|
|
|
14
|
-
const 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,
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { diff, DiffOutputItem } from '@asyncapi/diff';
|
|
3
|
+
import Parser, {
|
|
4
|
+
AsyncAPIDocumentInterface,
|
|
5
|
+
ChannelInterface,
|
|
6
6
|
fromFile,
|
|
7
|
-
|
|
7
|
+
SchemaInterface,
|
|
8
8
|
} from '@asyncapi/parser';
|
|
9
|
-
import
|
|
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
|
|
15
|
-
import { override } from './asyncapi-override
|
|
16
|
-
import { GitCheckoutTmp } from './git-checkout-tmp
|
|
17
|
-
import
|
|
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:
|
|
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":
|
|
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": [
|
|
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": [
|
|
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": [
|
|
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":
|
|
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": [
|
|
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":
|
|
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": [
|
|
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 {
|
|
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
|
|
13
|
-
import
|
|
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
|
|
2
|
-
import { generate } from './generate
|
|
3
|
-
import
|
|
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
|
-
>
|
|
127
|
-
>
|
|
128
|
-
>
|
|
129
|
-
>
|
|
130
|
-
>
|
|
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,5 +1,5 @@
|
|
|
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
|
+
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
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
|
|
3
|
-
import
|
|
4
|
-
import { separateProperties } from './pg-models/json-schema-parse-utils
|
|
5
|
-
import { isReservedPgWord } from './pg-models/pg-sql-gen-utils
|
|
6
|
-
import {
|
|
7
|
-
|
|
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
|
|
2
|
+
import { JSONPgSmartTags } from 'graphile-utils';
|
|
3
3
|
import * as path from 'path';
|
|
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
|
|
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
|
-
|
|
11
|
+
ContentEntityModelPostprocessor,
|
|
12
12
|
episodePostprocessor,
|
|
13
13
|
moviePostprocessor,
|
|
14
14
|
seasonPostprocessor,
|
|
15
15
|
tvshowPostprocessor,
|
|
16
|
-
} from './postprocessors
|
|
17
|
-
import
|
|
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
|
|
2
|
-
import { generate } from './generate
|
|
3
|
-
import
|
|
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
|
|
3
|
-
import { FkColumn } from './fk-column
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from '../../abstractions
|
|
8
|
-
import { buildName } from '../pg-sql-gen-utils
|
|
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
|
|
2
|
-
export * from './pk-column
|
|
3
|
-
export * from './primitive-column
|
|
4
|
-
export * from './virtual-fk-column
|
|
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
|
|
3
|
-
import { PkColumn } from './pk-column
|
|
2
|
+
import { PgTable, PgType } from '../../abstractions';
|
|
3
|
+
import { PkColumn } from './pk-column';
|
|
4
4
|
|
|
5
5
|
interface PkColumnTestInput {
|
|
6
6
|
type: PgType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from 'vitest';
|
|
2
|
-
import
|
|
3
|
-
import { PrimitiveColumn } from './primitive-column
|
|
2
|
+
import { PgTable } from '../../abstractions';
|
|
3
|
+
import { PrimitiveColumn } from './primitive-column';
|
|
4
4
|
|
|
5
5
|
const dummyTable: PgTable = {
|
|
6
6
|
name: 'some_table',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from 'vitest';
|
|
2
|
-
import
|
|
3
|
-
import { VirtualFkColumn } from './virtual-fk-column
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from '../../abstractions
|
|
8
|
-
import { buildName } from '../pg-sql-gen-utils
|
|
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
|
|
1
|
+
import { JSONSchema4 } from 'json-schema';
|
|
2
2
|
import { describe, expect, test } from 'vitest';
|
|
3
|
-
import
|
|
4
|
-
import { getPropertySchema, mapToPgType } from './json-schema-parse-utils
|
|
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
|
|
3
|
-
import
|
|
4
|
-
import
|
|
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.
|
|
@@ -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
|
|
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
|
}
|