@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
1
|
/* eslint-disable no-console */
|
|
2
|
-
import
|
|
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
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
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
|
|
535
|
-
|
|
536
|
-
|
|
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
|
|
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
|
|
1
|
+
export * from './apply-templates';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ExitPromptError } from '@inquirer/core';
|
|
2
|
-
import
|
|
3
|
-
import { createSolution } from './createSolution
|
|
4
|
-
import { defaultValues } from './defaultValues
|
|
5
|
-
import { logger, setDebug } from './helpers/logger
|
|
6
|
-
import
|
|
7
|
-
import { runQuestionaire } from './runQuestionaire
|
|
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
|
|
8
|
-
import * as logger from './helpers/logger
|
|
9
|
-
import
|
|
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,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
|
|
5
|
-
import { getBranches } from './helpers/git
|
|
6
|
-
import
|
|
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
|
|
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
|
|
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
|
|
2
|
+
import { CommandModule } from 'yargs';
|
|
3
3
|
import {
|
|
4
4
|
createExtensionConfig,
|
|
5
5
|
getExtensionConfigPath,
|
|
6
|
-
} from './create-extension-config
|
|
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
|
-
|
|
4
|
+
TokenResult,
|
|
5
5
|
} from '@axinom/mosaic-id-link-be';
|
|
6
6
|
import { readFileSync } from 'fs';
|
|
7
|
-
import
|
|
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
|
|
4
|
-
import { exitCode } from '../../common
|
|
5
|
-
import
|
|
6
|
-
import { getDevAccessToken } from '
|
|
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
|
|
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
|
|
15
|
-
import { exitCode } from '../common
|
|
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
|
|
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
|
|
2
|
-
import { manifestCommands } from './manifest/manifest-commands
|
|
3
|
-
import { piletCommands } from './pilet/pilet-commands
|
|
4
|
-
import { serviceCommands } from './service/service-commands
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
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,
|
|
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
|
|
8
|
-
import
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
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
|
|
11
|
-
import
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
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,
|
|
4
|
-
import
|
|
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
|
|
8
|
-
import
|
|
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
|
|
2
|
-
import { serviceDeploy } from './deploy/service-deploy-command
|
|
3
|
-
import { serviceUndeploy } from './undeploy/service-undeploy-command
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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,
|
|
4
|
-
import
|
|
5
|
-
import { exitCode } from '../../../../common
|
|
6
|
-
import
|
|
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
|
|
12
|
-
|
|
11
|
+
import Parser, {
|
|
12
|
+
AsyncAPIDocumentInterface,
|
|
13
13
|
fromFile,
|
|
14
|
-
|
|
14
|
+
MessageInterface,
|
|
15
15
|
} from '@asyncapi/parser';
|
|
16
|
-
import
|
|
16
|
+
import endent from 'endent';
|
|
17
17
|
import * as fs from 'fs';
|
|
18
18
|
import * as path from 'path';
|
|
19
|
-
import { exitCode } from '../../common
|
|
20
|
-
import
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
664
|
-
|
|
665
|
-
...
|
|
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 (
|
|
650
|
+
if (items.length < 1) {
|
|
672
651
|
return;
|
|
673
652
|
}
|
|
674
653
|
|
|
675
|
-
const exports =
|
|
676
|
-
.sort(
|
|
677
|
-
.map((
|
|
678
|
-
|
|
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
|
|
2
|
-
import { Codegen } from './codegen
|
|
3
|
-
import { lint } from './lint
|
|
4
|
-
import
|
|
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
|
|
2
|
-
import
|
|
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
|
|
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
|
|
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);
|