@apimatic/cli 1.5.0 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +128 -212
- package/apimatic.schema.json +550 -0
- package/lib/actions/action-result.js +3 -0
- package/lib/actions/action-result.js.map +1 -1
- package/lib/actions/api/transform.js +36 -33
- package/lib/actions/api/transform.js.map +1 -1
- package/lib/actions/api/validate.d.ts +9 -6
- package/lib/actions/api/validate.js +44 -38
- package/lib/actions/api/validate.js.map +1 -1
- package/lib/actions/auth/login.js +7 -4
- package/lib/actions/auth/login.js.map +1 -1
- package/lib/actions/auth/logout.js +2 -1
- package/lib/actions/auth/logout.js.map +1 -1
- package/lib/actions/auth/status.js +5 -3
- package/lib/actions/auth/status.js.map +1 -1
- package/lib/actions/plugin/generate.d.ts +5 -1
- package/lib/actions/plugin/generate.js +83 -56
- package/lib/actions/plugin/generate.js.map +1 -1
- package/lib/actions/plugin/publish.d.ts +2 -1
- package/lib/actions/plugin/publish.js +34 -37
- package/lib/actions/plugin/publish.js.map +1 -1
- package/lib/actions/plugin/record-metadata.d.ts +3 -2
- package/lib/actions/plugin/record-metadata.js +33 -30
- package/lib/actions/plugin/record-metadata.js.map +1 -1
- package/lib/actions/portal/generate.d.ts +8 -6
- package/lib/actions/portal/generate.js +50 -61
- package/lib/actions/portal/generate.js.map +1 -1
- package/lib/actions/portal/prepare-project.d.ts +25 -0
- package/lib/actions/portal/prepare-project.js +68 -0
- package/lib/actions/portal/prepare-project.js.map +1 -0
- package/lib/actions/portal/serve.d.ts +21 -6
- package/lib/actions/portal/serve.js +170 -153
- package/lib/actions/portal/serve.js.map +1 -1
- package/lib/actions/publishing/profile/list.js +4 -2
- package/lib/actions/publishing/profile/list.js.map +1 -1
- package/lib/actions/quickstart.d.ts +23 -5
- package/lib/actions/quickstart.js +222 -21
- package/lib/actions/quickstart.js.map +1 -1
- package/lib/actions/sdk/generate.d.ts +4 -7
- package/lib/actions/sdk/generate.js +53 -93
- package/lib/actions/sdk/generate.js.map +1 -1
- package/lib/actions/sdk/publish/interactive.d.ts +4 -3
- package/lib/actions/sdk/publish/interactive.js +96 -97
- package/lib/actions/sdk/publish/interactive.js.map +1 -1
- package/lib/actions/sdk/publish/non-interactive.d.ts +4 -2
- package/lib/actions/sdk/publish/non-interactive.js +91 -90
- package/lib/actions/sdk/publish/non-interactive.js.map +1 -1
- package/lib/actions/sdk/publish.d.ts +3 -2
- package/lib/actions/sdk/publish.js +55 -53
- package/lib/actions/sdk/publish.js.map +1 -1
- package/lib/actions/sdk/record-published-sdk.d.ts +14 -0
- package/lib/actions/sdk/record-published-sdk.js +57 -0
- package/lib/actions/sdk/record-published-sdk.js.map +1 -0
- package/lib/client-utils/auth-manager.js +1 -1
- package/lib/client-utils/auth-manager.js.map +1 -1
- package/lib/commands/api/transform.d.ts +1 -1
- package/lib/commands/api/transform.js +44 -40
- package/lib/commands/api/transform.js.map +1 -1
- package/lib/commands/api/validate.js +16 -16
- package/lib/commands/api/validate.js.map +1 -1
- package/lib/commands/auth/login.js +14 -15
- package/lib/commands/auth/login.js.map +1 -1
- package/lib/commands/auth/logout.js +5 -6
- package/lib/commands/auth/logout.js.map +1 -1
- package/lib/commands/auth/status.js +4 -5
- package/lib/commands/auth/status.js.map +1 -1
- package/lib/commands/plugin/generate.d.ts +3 -3
- package/lib/commands/plugin/generate.js +20 -20
- package/lib/commands/plugin/generate.js.map +1 -1
- package/lib/commands/plugin/publish.js +18 -18
- package/lib/commands/plugin/publish.js.map +1 -1
- package/lib/commands/portal/generate.d.ts +9 -8
- package/lib/commands/portal/generate.js +36 -27
- package/lib/commands/portal/generate.js.map +1 -1
- package/lib/commands/portal/serve.d.ts +7 -9
- package/lib/commands/portal/serve.js +41 -44
- package/lib/commands/portal/serve.js.map +1 -1
- package/lib/commands/publishing/profile/list.js +8 -12
- package/lib/commands/publishing/profile/list.js.map +1 -1
- package/lib/commands/quickstart.d.ts +5 -5
- package/lib/commands/quickstart.js +18 -24
- package/lib/commands/quickstart.js.map +1 -1
- package/lib/commands/sdk/generate.d.ts +5 -7
- package/lib/commands/sdk/generate.js +58 -70
- package/lib/commands/sdk/generate.js.map +1 -1
- package/lib/commands/sdk/publish.d.ts +6 -7
- package/lib/commands/sdk/publish.js +66 -60
- package/lib/commands/sdk/publish.js.map +1 -1
- package/lib/hooks/node-version.d.ts +3 -0
- package/lib/hooks/node-version.js +12 -0
- package/lib/hooks/node-version.js.map +1 -0
- package/lib/hooks/not-found.js +2 -3
- package/lib/hooks/not-found.js.map +1 -1
- package/lib/hooks/utils.d.ts +4 -2
- package/lib/hooks/utils.js +2 -2
- package/lib/hooks/utils.js.map +1 -1
- package/lib/infrastructure/env-info.d.ts +3 -0
- package/lib/infrastructure/env-info.js +13 -6
- package/lib/infrastructure/env-info.js.map +1 -1
- package/lib/infrastructure/file-service.d.ts +35 -8
- package/lib/infrastructure/file-service.js +149 -53
- package/lib/infrastructure/file-service.js.map +1 -1
- package/lib/infrastructure/file-watch-service.d.ts +40 -0
- package/lib/infrastructure/file-watch-service.js +167 -0
- package/lib/infrastructure/file-watch-service.js.map +1 -0
- package/lib/infrastructure/generation-status-poller.d.ts +8 -7
- package/lib/infrastructure/generation-status-poller.js +20 -12
- package/lib/infrastructure/generation-status-poller.js.map +1 -1
- package/lib/infrastructure/launcher-service.js +6 -6
- package/lib/infrastructure/launcher-service.js.map +1 -1
- package/lib/infrastructure/network-service.d.ts +3 -0
- package/lib/infrastructure/network-service.js +15 -1
- package/lib/infrastructure/network-service.js.map +1 -1
- package/lib/infrastructure/portal-build-service.d.ts +19 -0
- package/lib/infrastructure/portal-build-service.js +58 -0
- package/lib/infrastructure/portal-build-service.js.map +1 -0
- package/lib/infrastructure/portal-dev-server-service.d.ts +29 -0
- package/lib/infrastructure/portal-dev-server-service.js +135 -0
- package/lib/infrastructure/portal-dev-server-service.js.map +1 -0
- package/lib/infrastructure/portal-pages-service.d.ts +17 -0
- package/lib/infrastructure/portal-pages-service.js +103 -0
- package/lib/infrastructure/portal-pages-service.js.map +1 -0
- package/lib/infrastructure/portal-project-service.d.ts +77 -0
- package/lib/infrastructure/portal-project-service.js +309 -0
- package/lib/infrastructure/portal-project-service.js.map +1 -0
- package/lib/infrastructure/service-error.d.ts +1 -0
- package/lib/infrastructure/service-error.js +39 -41
- package/lib/infrastructure/service-error.js.map +1 -1
- package/lib/infrastructure/services/api-client-factory.js +15 -13
- package/lib/infrastructure/services/api-client-factory.js.map +1 -1
- package/lib/infrastructure/services/api-service.d.ts +7 -5
- package/lib/infrastructure/services/api-service.js +28 -20
- package/lib/infrastructure/services/api-service.js.map +1 -1
- package/lib/infrastructure/services/auth-service.js +4 -9
- package/lib/infrastructure/services/auth-service.js.map +1 -1
- package/lib/infrastructure/services/file-download-service.js +3 -3
- package/lib/infrastructure/services/file-download-service.js.map +1 -1
- package/lib/infrastructure/services/plugin-service.d.ts +1 -8
- package/lib/infrastructure/services/plugin-service.js +11 -22
- package/lib/infrastructure/services/plugin-service.js.map +1 -1
- package/lib/infrastructure/services/portal-artifacts-service.d.ts +44 -0
- package/lib/infrastructure/services/portal-artifacts-service.js +268 -0
- package/lib/infrastructure/services/portal-artifacts-service.js.map +1 -0
- package/lib/infrastructure/services/portal-authorization-service.d.ts +22 -0
- package/lib/infrastructure/services/portal-authorization-service.js +23 -0
- package/lib/infrastructure/services/portal-authorization-service.js.map +1 -0
- package/lib/infrastructure/services/publishing-api-service.d.ts +1 -1
- package/lib/infrastructure/services/publishing-api-service.js +11 -15
- package/lib/infrastructure/services/publishing-api-service.js.map +1 -1
- package/lib/infrastructure/services/sdk-generation-service.d.ts +21 -0
- package/lib/infrastructure/services/sdk-generation-service.js +118 -0
- package/lib/infrastructure/services/sdk-generation-service.js.map +1 -0
- package/lib/infrastructure/services/telemetry-service.js +5 -4
- package/lib/infrastructure/services/telemetry-service.js.map +1 -1
- package/lib/infrastructure/services/transformation-service.js +29 -32
- package/lib/infrastructure/services/transformation-service.js.map +1 -1
- package/lib/infrastructure/services/validation-service.d.ts +12 -53
- package/lib/infrastructure/services/validation-service.js +24 -199
- package/lib/infrastructure/services/validation-service.js.map +1 -1
- package/lib/infrastructure/timer-extensions.d.ts +2 -0
- package/lib/infrastructure/timer-extensions.js +10 -0
- package/lib/infrastructure/timer-extensions.js.map +1 -0
- package/lib/infrastructure/tmp-extensions.d.ts +31 -1
- package/lib/infrastructure/tmp-extensions.js +86 -3
- package/lib/infrastructure/tmp-extensions.js.map +1 -1
- package/lib/infrastructure/zip-service.js +2 -2
- package/lib/infrastructure/zip-service.js.map +1 -1
- package/lib/prompts/api/validate.d.ts +6 -7
- package/lib/prompts/api/validate.js +12 -12
- package/lib/prompts/api/validate.js.map +1 -1
- package/lib/prompts/format.d.ts +4 -0
- package/lib/prompts/format.js +5 -0
- package/lib/prompts/format.js.map +1 -1
- package/lib/prompts/plugin/generate.d.ts +17 -12
- package/lib/prompts/plugin/generate.js +94 -44
- package/lib/prompts/plugin/generate.js.map +1 -1
- package/lib/prompts/plugin/publish.d.ts +2 -1
- package/lib/prompts/plugin/publish.js +8 -7
- package/lib/prompts/plugin/publish.js.map +1 -1
- package/lib/prompts/plugin/record-metadata.d.ts +1 -0
- package/lib/prompts/plugin/record-metadata.js +10 -7
- package/lib/prompts/plugin/record-metadata.js.map +1 -1
- package/lib/prompts/portal/artifacts.d.ts +8 -0
- package/lib/prompts/portal/artifacts.js +26 -0
- package/lib/prompts/portal/artifacts.js.map +1 -0
- package/lib/prompts/portal/authorization.d.ts +6 -0
- package/lib/prompts/portal/authorization.js +29 -0
- package/lib/prompts/portal/authorization.js.map +1 -0
- package/lib/prompts/portal/code-samples.d.ts +1 -0
- package/lib/prompts/portal/code-samples.js +9 -0
- package/lib/prompts/portal/code-samples.js.map +1 -0
- package/lib/prompts/portal/generate.d.ts +14 -9
- package/lib/prompts/portal/generate.js +48 -26
- package/lib/prompts/portal/generate.js.map +1 -1
- package/lib/prompts/portal/prepare-project.d.ts +20 -0
- package/lib/prompts/portal/prepare-project.js +36 -0
- package/lib/prompts/portal/prepare-project.js.map +1 -0
- package/lib/prompts/portal/serve.d.ts +32 -12
- package/lib/prompts/portal/serve.js +102 -39
- package/lib/prompts/portal/serve.js.map +1 -1
- package/lib/prompts/portal/source.d.ts +26 -0
- package/lib/prompts/portal/source.js +253 -0
- package/lib/prompts/portal/source.js.map +1 -0
- package/lib/prompts/prompt.d.ts +11 -3
- package/lib/prompts/prompt.js +39 -15
- package/lib/prompts/prompt.js.map +1 -1
- package/lib/prompts/quickstart.d.ts +46 -3
- package/lib/prompts/quickstart.js +199 -12
- package/lib/prompts/quickstart.js.map +1 -1
- package/lib/prompts/sdk/generate.d.ts +15 -13
- package/lib/prompts/sdk/generate.js +29 -32
- package/lib/prompts/sdk/generate.js.map +1 -1
- package/lib/prompts/sdk/publish/interactive.d.ts +10 -6
- package/lib/prompts/sdk/publish/interactive.js +26 -24
- package/lib/prompts/sdk/publish/interactive.js.map +1 -1
- package/lib/prompts/sdk/publish/non-interactive.d.ts +2 -1
- package/lib/prompts/sdk/publish/non-interactive.js +5 -4
- package/lib/prompts/sdk/publish/non-interactive.js.map +1 -1
- package/lib/prompts/sdk/publish.d.ts +3 -3
- package/lib/prompts/sdk/publish.js +13 -17
- package/lib/prompts/sdk/publish.js.map +1 -1
- package/lib/prompts/sdk/record-published-sdk.d.ts +7 -0
- package/lib/prompts/sdk/record-published-sdk.js +26 -0
- package/lib/prompts/sdk/record-published-sdk.js.map +1 -0
- package/lib/types/apimatic-config/document.d.ts +70 -0
- package/lib/types/apimatic-config/document.js +167 -0
- package/lib/types/apimatic-config/document.js.map +1 -0
- package/lib/types/apimatic-config/languages-block.d.ts +39 -0
- package/lib/types/apimatic-config/languages-block.js +58 -0
- package/lib/types/apimatic-config/languages-block.js.map +1 -0
- package/lib/types/apimatic-config-context.d.ts +48 -0
- package/lib/types/apimatic-config-context.js +121 -0
- package/lib/types/apimatic-config-context.js.map +1 -0
- package/lib/types/build/build.d.ts +1 -89
- package/lib/types/build/build.js +6 -161
- package/lib/types/build/build.js.map +1 -1
- package/lib/types/events/domain-event.js +3 -0
- package/lib/types/events/domain-event.js.map +1 -1
- package/lib/types/events/quickstart-completed.js +3 -3
- package/lib/types/events/quickstart-completed.js.map +1 -1
- package/lib/types/events/quickstart-initiated.js +3 -3
- package/lib/types/events/quickstart-initiated.js.map +1 -1
- package/lib/types/events/sdk-publish-validation-failed.js +1 -1
- package/lib/types/events/sdk-publish-validation-failed.js.map +1 -1
- package/lib/types/file/directory.d.ts +4 -9
- package/lib/types/file/directory.js +17 -65
- package/lib/types/file/directory.js.map +1 -1
- package/lib/types/file/directoryPath.d.ts +17 -0
- package/lib/types/file/directoryPath.js +47 -2
- package/lib/types/file/directoryPath.js.map +1 -1
- package/lib/types/file/fileName.d.ts +8 -0
- package/lib/types/file/fileName.js +28 -6
- package/lib/types/file/fileName.js.map +1 -1
- package/lib/types/file/filePath.d.ts +18 -2
- package/lib/types/file/filePath.js +39 -4
- package/lib/types/file/filePath.js.map +1 -1
- package/lib/types/file/resource-input.js +1 -2
- package/lib/types/file/resource-input.js.map +1 -1
- package/lib/types/file/urlPath.js +2 -1
- package/lib/types/file/urlPath.js.map +1 -1
- package/lib/types/flags-provider.js +22 -22
- package/lib/types/flags-provider.js.map +1 -1
- package/lib/types/package-settings-context.js +2 -1
- package/lib/types/package-settings-context.js.map +1 -1
- package/lib/types/plugin/plugin-config.d.ts +10 -50
- package/lib/types/plugin/plugin-config.js +7 -1
- package/lib/types/plugin/plugin-config.js.map +1 -1
- package/lib/types/plugin-config-context.d.ts +30 -37
- package/lib/types/plugin-config-context.js +108 -139
- package/lib/types/plugin-config-context.js.map +1 -1
- package/lib/types/plugin-context.js +3 -2
- package/lib/types/plugin-context.js.map +1 -1
- package/lib/types/portal/code-samples.d.ts +27 -0
- package/lib/types/portal/code-samples.js +67 -0
- package/lib/types/portal/code-samples.js.map +1 -0
- package/lib/types/portal/config/ai-config.d.ts +15 -0
- package/lib/types/portal/config/ai-config.js +26 -0
- package/lib/types/portal/config/ai-config.js.map +1 -0
- package/lib/types/portal/config/brand-config.d.ts +55 -0
- package/lib/types/portal/config/brand-config.js +105 -0
- package/lib/types/portal/config/brand-config.js.map +1 -0
- package/lib/types/portal/config/color.d.ts +19 -0
- package/lib/types/portal/config/color.js +43 -0
- package/lib/types/portal/config/color.js.map +1 -0
- package/lib/types/portal/config/fields.d.ts +23 -0
- package/lib/types/portal/config/fields.js +67 -0
- package/lib/types/portal/config/fields.js.map +1 -0
- package/lib/types/portal/config/link.d.ts +18 -0
- package/lib/types/portal/config/link.js +72 -0
- package/lib/types/portal/config/link.js.map +1 -0
- package/lib/types/portal/config/navigation-config.d.ts +13 -0
- package/lib/types/portal/config/navigation-config.js +30 -0
- package/lib/types/portal/config/navigation-config.js.map +1 -0
- package/lib/types/portal/config/site-config.d.ts +32 -0
- package/lib/types/portal/config/site-config.js +88 -0
- package/lib/types/portal/config/site-config.js.map +1 -0
- package/lib/types/portal/config/static-asset.d.ts +25 -0
- package/lib/types/portal/config/static-asset.js +77 -0
- package/lib/types/portal/config/static-asset.js.map +1 -0
- package/lib/types/portal/content-notices.d.ts +20 -0
- package/lib/types/portal/content-notices.js +2 -0
- package/lib/types/portal/content-notices.js.map +1 -0
- package/lib/types/portal/content-tree.d.ts +103 -0
- package/lib/types/portal/content-tree.js +344 -0
- package/lib/types/portal/content-tree.js.map +1 -0
- package/lib/types/portal/endpoint.d.ts +6 -0
- package/lib/types/portal/endpoint.js +12 -0
- package/lib/types/portal/endpoint.js.map +1 -0
- package/lib/types/portal/generated-pages.d.ts +68 -0
- package/lib/types/portal/generated-pages.js +111 -0
- package/lib/types/portal/generated-pages.js.map +1 -0
- package/lib/types/portal/generation-status.d.ts +31 -0
- package/lib/types/portal/generation-status.js +26 -0
- package/lib/types/portal/generation-status.js.map +1 -0
- package/lib/types/portal/openapi-document.d.ts +48 -0
- package/lib/types/portal/openapi-document.js +138 -0
- package/lib/types/portal/openapi-document.js.map +1 -0
- package/lib/types/portal/page-fragments.d.ts +13 -0
- package/lib/types/portal/page-fragments.js +24 -0
- package/lib/types/portal/page-fragments.js.map +1 -0
- package/lib/types/portal/page-template.d.ts +15 -0
- package/lib/types/portal/page-template.js +64 -0
- package/lib/types/portal/page-template.js.map +1 -0
- package/lib/types/portal/page.d.ts +24 -0
- package/lib/types/portal/page.js +100 -0
- package/lib/types/portal/page.js.map +1 -0
- package/lib/types/portal/portal-artifacts.d.ts +25 -0
- package/lib/types/portal/portal-artifacts.js +30 -0
- package/lib/types/portal/portal-artifacts.js.map +1 -0
- package/lib/types/portal/portal-config.d.ts +69 -0
- package/lib/types/portal/portal-config.js +105 -0
- package/lib/types/portal/portal-config.js.map +1 -0
- package/lib/types/portal/portal-downloads.d.ts +8 -0
- package/lib/types/portal/portal-downloads.js +14 -0
- package/lib/types/portal/portal-downloads.js.map +1 -0
- package/lib/types/portal/portal-languages.d.ts +15 -0
- package/lib/types/portal/portal-languages.js +45 -0
- package/lib/types/portal/portal-languages.js.map +1 -0
- package/lib/types/portal/portal-navigation.d.ts +65 -0
- package/lib/types/portal/portal-navigation.js +217 -0
- package/lib/types/portal/portal-navigation.js.map +1 -0
- package/lib/types/portal/portal-sdk.d.ts +15 -0
- package/lib/types/portal/portal-sdk.js +28 -0
- package/lib/types/portal/portal-sdk.js.map +1 -0
- package/lib/types/portal/portal-source.d.ts +129 -0
- package/lib/types/portal/portal-source.js +2 -0
- package/lib/types/portal/portal-source.js.map +1 -0
- package/lib/types/portal/portal-stylesheet.d.ts +19 -0
- package/lib/types/portal/portal-stylesheet.js +40 -0
- package/lib/types/portal/portal-stylesheet.js.map +1 -0
- package/lib/types/portal/portal-tabs.d.ts +33 -0
- package/lib/types/portal/portal-tabs.js +38 -0
- package/lib/types/portal/portal-tabs.js.map +1 -0
- package/lib/types/portal/preview-config.d.ts +20 -0
- package/lib/types/portal/preview-config.js +32 -0
- package/lib/types/portal/preview-config.js.map +1 -0
- package/lib/types/portal/preview-content.d.ts +18 -0
- package/lib/types/portal/preview-content.js +50 -0
- package/lib/types/portal/preview-content.js.map +1 -0
- package/lib/types/portal/published-package.d.ts +12 -0
- package/lib/types/portal/published-package.js +35 -0
- package/lib/types/portal/published-package.js.map +1 -0
- package/lib/types/portal/unknown-fields.d.ts +5 -0
- package/lib/types/portal/unknown-fields.js +10 -0
- package/lib/types/portal/unknown-fields.js.map +1 -0
- package/lib/types/portal-context.d.ts +38 -6
- package/lib/types/portal-context.js +71 -24
- package/lib/types/portal-context.js.map +1 -1
- package/lib/types/portal-source-context.d.ts +77 -0
- package/lib/types/portal-source-context.js +408 -0
- package/lib/types/portal-source-context.js.map +1 -0
- package/lib/types/project-context.d.ts +49 -0
- package/lib/types/project-context.js +151 -0
- package/lib/types/project-context.js.map +1 -0
- package/lib/types/project-layout.d.ts +9 -0
- package/lib/types/project-layout.js +10 -0
- package/lib/types/project-layout.js.map +1 -0
- package/lib/types/publish/package-settings-configuration.d.ts +2 -0
- package/lib/types/publish/profile-id.js +1 -0
- package/lib/types/publish/profile-id.js.map +1 -1
- package/lib/types/publish/publishing-profile.d.ts +3 -1
- package/lib/types/publish/publishing-profile.js +33 -15
- package/lib/types/publish/publishing-profile.js.map +1 -1
- package/lib/types/publish/publishing-profiles.js +2 -1
- package/lib/types/publish/publishing-profiles.js.map +1 -1
- package/lib/types/publish/version.js +1 -0
- package/lib/types/publish/version.js.map +1 -1
- package/lib/types/resource-context.js +3 -2
- package/lib/types/resource-context.js.map +1 -1
- package/lib/types/sdk/generate.d.ts +22 -16
- package/lib/types/sdk/generate.js +64 -41
- package/lib/types/sdk/generate.js.map +1 -1
- package/lib/types/sdk/stability-choice.d.ts +12 -0
- package/lib/types/sdk/stability-choice.js +24 -0
- package/lib/types/sdk/stability-choice.js.map +1 -0
- package/lib/types/sdk-context.d.ts +4 -5
- package/lib/types/sdk-context.js +10 -18
- package/lib/types/sdk-context.js.map +1 -1
- package/lib/types/spec-context.d.ts +5 -4
- package/lib/types/spec-context.js +9 -8
- package/lib/types/spec-context.js.map +1 -1
- package/lib/types/temp-context.d.ts +1 -1
- package/lib/types/temp-context.js +5 -4
- package/lib/types/temp-context.js.map +1 -1
- package/lib/types/transform-context.d.ts +9 -5
- package/lib/types/transform-context.js +21 -18
- package/lib/types/transform-context.js.map +1 -1
- package/lib/utils/error-utils.d.ts +2 -0
- package/lib/utils/error-utils.js +5 -0
- package/lib/utils/error-utils.js.map +1 -0
- package/lib/utils/json-utils.d.ts +2 -0
- package/lib/utils/json-utils.js +4 -0
- package/lib/utils/json-utils.js.map +1 -0
- package/lib/utils/string-utils.d.ts +8 -1
- package/lib/utils/string-utils.js +13 -26
- package/lib/utils/string-utils.js.map +1 -1
- package/lib/utils/utils.d.ts +1 -3
- package/lib/utils/utils.js +12 -40
- package/lib/utils/utils.js.map +1 -1
- package/oclif.manifest.json +69 -357
- package/package.json +47 -25
- package/portal-pages/context-plugin.mdx +26 -0
- package/portal-pages/sdk.mdx +8 -0
- package/portal-pages/sdks.mdx +11 -0
- package/portal-template/NOTICE +37 -0
- package/portal-template/downloads.ts +41 -0
- package/portal-template/generated-pages-reload.ts +51 -0
- package/portal-template/package.json +11 -0
- package/portal-template/portal-config.ts +32 -0
- package/portal-template/prerender-pages.ts +81 -0
- package/portal-template/spec-reload.ts +26 -0
- package/portal-template/src/components/api-page.tsx +15 -0
- package/portal-template/src/components/code-block.tsx +9 -0
- package/portal-template/src/components/command-block.tsx +50 -0
- package/portal-template/src/components/example-layout.tsx +99 -0
- package/portal-template/src/components/logos.tsx +127 -0
- package/portal-template/src/components/mdx.tsx +28 -0
- package/portal-template/src/components/not-found.tsx +11 -0
- package/portal-template/src/components/plugin-install.tsx +22 -0
- package/portal-template/src/components/plugin-support.tsx +53 -0
- package/portal-template/src/components/sdk-actions.tsx +79 -0
- package/portal-template/src/components/sdk-cards.tsx +100 -0
- package/portal-template/src/components/search.tsx +41 -0
- package/portal-template/src/components/usage-tabs.tsx +92 -0
- package/portal-template/src/lib/code-samples.server.ts +40 -0
- package/portal-template/src/lib/code-samples.ts +43 -0
- package/portal-template/src/lib/code-titles.ts +29 -0
- package/portal-template/src/lib/install-command.ts +13 -0
- package/portal-template/src/lib/json.ts +5 -0
- package/portal-template/src/lib/layout.shared.tsx +41 -0
- package/portal-template/src/lib/layout.tsx +16 -0
- package/portal-template/src/lib/llms.server.ts +54 -0
- package/portal-template/src/lib/media-adapters.ts +34 -0
- package/portal-template/src/lib/navigation.ts +406 -0
- package/portal-template/src/lib/openapi-bundle.server.ts +343 -0
- package/portal-template/src/lib/openapi-filter.ts +191 -0
- package/portal-template/src/lib/openapi-labels.ts +15 -0
- package/portal-template/src/lib/openapi-methods.ts +12 -0
- package/portal-template/src/lib/openapi-section.server.ts +280 -0
- package/portal-template/src/lib/openapi-slim.ts +202 -0
- package/portal-template/src/lib/openapi.server.ts +16 -0
- package/portal-template/src/lib/portal-types.ts +36 -0
- package/portal-template/src/lib/portal.server.ts +13 -0
- package/portal-template/src/lib/portal.ts +11 -0
- package/portal-template/src/lib/rehype-code-titles.ts +53 -0
- package/portal-template/src/lib/request-examples.ts +72 -0
- package/portal-template/src/lib/seo.ts +21 -0
- package/portal-template/src/lib/shared.ts +51 -0
- package/portal-template/src/lib/shiki-bundle.ts +104 -0
- package/portal-template/src/lib/sitemap.server.ts +20 -0
- package/portal-template/src/lib/source.server.ts +27 -0
- package/portal-template/src/lib/source.ts +49 -0
- package/portal-template/src/lib/tabs.ts +37 -0
- package/portal-template/src/router.tsx +12 -0
- package/portal-template/src/routes/$.tsx +194 -0
- package/portal-template/src/routes/__root.tsx +56 -0
- package/portal-template/src/routes/api/search[.]json.ts +9 -0
- package/portal-template/src/routes/llms-full[.]txt.ts +10 -0
- package/portal-template/src/routes/llms[.]txt.ts +10 -0
- package/portal-template/src/routes/robots[.]txt.ts +10 -0
- package/portal-template/src/routes/sitemap[.]xml.ts +10 -0
- package/portal-template/src/routes/spa-shell.tsx +7 -0
- package/portal-template/src/routes/{$}[.]md.ts +21 -0
- package/portal-template/src/styles/app.css +33 -0
- package/portal-template/tsconfig.json +26 -0
- package/portal-template/vite.config.ts +68 -0
- package/lib/actions/plugin/record-sdk.d.ts +0 -14
- package/lib/actions/plugin/record-sdk.js +0 -60
- package/lib/actions/plugin/record-sdk.js.map +0 -1
- package/lib/actions/portal/copilot.d.ts +0 -17
- package/lib/actions/portal/copilot.js +0 -89
- package/lib/actions/portal/copilot.js.map +0 -1
- package/lib/actions/portal/quickstart.d.ts +0 -18
- package/lib/actions/portal/quickstart.js +0 -238
- package/lib/actions/portal/quickstart.js.map +0 -1
- package/lib/actions/portal/recipe/new-recipe.d.ts +0 -15
- package/lib/actions/portal/recipe/new-recipe.js +0 -177
- package/lib/actions/portal/recipe/new-recipe.js.map +0 -1
- package/lib/actions/portal/toc/new-toc.d.ts +0 -21
- package/lib/actions/portal/toc/new-toc.js +0 -95
- package/lib/actions/portal/toc/new-toc.js.map +0 -1
- package/lib/actions/sdk/merge-source-tree.d.ts +0 -12
- package/lib/actions/sdk/merge-source-tree.js +0 -78
- package/lib/actions/sdk/merge-source-tree.js.map +0 -1
- package/lib/actions/sdk/quickstart.d.ts +0 -18
- package/lib/actions/sdk/quickstart.js +0 -188
- package/lib/actions/sdk/quickstart.js.map +0 -1
- package/lib/actions/sdk/save-changes.d.ts +0 -8
- package/lib/actions/sdk/save-changes.js +0 -93
- package/lib/actions/sdk/save-changes.js.map +0 -1
- package/lib/application/portal/recipe/portal-recipe.d.ts +0 -8
- package/lib/application/portal/recipe/portal-recipe.js +0 -33
- package/lib/application/portal/recipe/portal-recipe.js.map +0 -1
- package/lib/application/portal/recipe/recipe-generator.d.ts +0 -21
- package/lib/application/portal/recipe/recipe-generator.js +0 -130
- package/lib/application/portal/recipe/recipe-generator.js.map +0 -1
- package/lib/application/portal/toc/toc-content-parser.d.ts +0 -5
- package/lib/application/portal/toc/toc-content-parser.js +0 -44
- package/lib/application/portal/toc/toc-content-parser.js.map +0 -1
- package/lib/application/portal/toc/toc-structure-generator.d.ts +0 -11
- package/lib/application/portal/toc/toc-structure-generator.js +0 -165
- package/lib/application/portal/toc/toc-structure-generator.js.map +0 -1
- package/lib/commands/portal/copilot.d.ts +0 -13
- package/lib/commands/portal/copilot.js +0 -34
- package/lib/commands/portal/copilot.js.map +0 -1
- package/lib/commands/portal/recipe/new.d.ts +0 -12
- package/lib/commands/portal/recipe/new.js +0 -45
- package/lib/commands/portal/recipe/new.js.map +0 -1
- package/lib/commands/portal/toc/new.d.ts +0 -16
- package/lib/commands/portal/toc/new.js +0 -68
- package/lib/commands/portal/toc/new.js.map +0 -1
- package/lib/commands/sdk/save-changes.d.ts +0 -14
- package/lib/commands/sdk/save-changes.js +0 -51
- package/lib/commands/sdk/save-changes.js.map +0 -1
- package/lib/infrastructure/debounce-service.d.ts +0 -10
- package/lib/infrastructure/debounce-service.js +0 -55
- package/lib/infrastructure/debounce-service.js.map +0 -1
- package/lib/infrastructure/services/portal-service.d.ts +0 -43
- package/lib/infrastructure/services/portal-service.js +0 -337
- package/lib/infrastructure/services/portal-service.js.map +0 -1
- package/lib/prompts/plugin/record-sdk.d.ts +0 -9
- package/lib/prompts/plugin/record-sdk.js +0 -40
- package/lib/prompts/plugin/record-sdk.js.map +0 -1
- package/lib/prompts/portal/copilot.d.ts +0 -18
- package/lib/prompts/portal/copilot.js +0 -82
- package/lib/prompts/portal/copilot.js.map +0 -1
- package/lib/prompts/portal/quickstart.d.ts +0 -42
- package/lib/prompts/portal/quickstart.js +0 -243
- package/lib/prompts/portal/quickstart.js.map +0 -1
- package/lib/prompts/portal/recipe/new-recipe.d.ts +0 -29
- package/lib/prompts/portal/recipe/new-recipe.js +0 -165
- package/lib/prompts/portal/recipe/new-recipe.js.map +0 -1
- package/lib/prompts/portal/toc/new-toc.d.ts +0 -16
- package/lib/prompts/portal/toc/new-toc.js +0 -50
- package/lib/prompts/portal/toc/new-toc.js.map +0 -1
- package/lib/prompts/sdk/merge-source-tree.d.ts +0 -22
- package/lib/prompts/sdk/merge-source-tree.js +0 -90
- package/lib/prompts/sdk/merge-source-tree.js.map +0 -1
- package/lib/prompts/sdk/quickstart.d.ts +0 -38
- package/lib/prompts/sdk/quickstart.js +0 -196
- package/lib/prompts/sdk/quickstart.js.map +0 -1
- package/lib/prompts/sdk/save-changes.d.ts +0 -21
- package/lib/prompts/sdk/save-changes.js +0 -84
- package/lib/prompts/sdk/save-changes.js.map +0 -1
- package/lib/types/build-context.d.ts +0 -26
- package/lib/types/build-context.js +0 -111
- package/lib/types/build-context.js.map +0 -1
- package/lib/types/events/recipe-creation-failed.d.ts +0 -5
- package/lib/types/events/recipe-creation-failed.js +0 -8
- package/lib/types/events/recipe-creation-failed.js.map +0 -1
- package/lib/types/events/sdk-changes-saved.d.ts +0 -8
- package/lib/types/events/sdk-changes-saved.js +0 -11
- package/lib/types/events/sdk-changes-saved.js.map +0 -1
- package/lib/types/events/sdk-changes-tracked.d.ts +0 -8
- package/lib/types/events/sdk-changes-tracked.js +0 -11
- package/lib/types/events/sdk-changes-tracked.js.map +0 -1
- package/lib/types/events/sdk-conflicts-resolved.d.ts +0 -8
- package/lib/types/events/sdk-conflicts-resolved.js +0 -11
- package/lib/types/events/sdk-conflicts-resolved.js.map +0 -1
- package/lib/types/events/toc-creation-failed.d.ts +0 -5
- package/lib/types/events/toc-creation-failed.js +0 -8
- package/lib/types/events/toc-creation-failed.js.map +0 -1
- package/lib/types/merge-source-tree-context.d.ts +0 -28
- package/lib/types/merge-source-tree-context.js +0 -63
- package/lib/types/merge-source-tree-context.js.map +0 -1
- package/lib/types/plugin/language-entry.d.ts +0 -9
- package/lib/types/plugin/language-entry.js +0 -64
- package/lib/types/plugin/language-entry.js.map +0 -1
- package/lib/types/recipe/recipe.d.ts +0 -22
- package/lib/types/recipe/recipe.js +0 -6
- package/lib/types/recipe/recipe.js.map +0 -1
- package/lib/types/recipe-context.d.ts +0 -9
- package/lib/types/recipe-context.js +0 -26
- package/lib/types/recipe-context.js.map +0 -1
- package/lib/types/save-changes-context.d.ts +0 -17
- package/lib/types/save-changes-context.js +0 -42
- package/lib/types/save-changes-context.js.map +0 -1
- package/lib/types/sdl/sdl.d.ts +0 -10
- package/lib/types/sdl/sdl.js +0 -18
- package/lib/types/sdl/sdl.js.map +0 -1
- package/lib/types/toc/toc-components.d.ts +0 -36
- package/lib/types/toc/toc-components.js +0 -94
- package/lib/types/toc/toc-components.js.map +0 -1
- package/lib/types/toc/toc.d.ts +0 -67
- package/lib/types/toc/toc.js +0 -2
- package/lib/types/toc/toc.js.map +0 -1
- package/lib/types/toc-context.d.ts +0 -12
- package/lib/types/toc-context.js +0 -26
- package/lib/types/toc-context.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge-source-tree.js","sourceRoot":"","sources":["../../../src/prompts/sdk/merge-source-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIpD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,MAAM,OAAO,sBAAsB;IAC1B,0BAA0B,CAAC,QAAkB;QAClD,GAAG,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;IAEM,0BAA0B,CAAC,QAAkB;QAClD,GAAG,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC7E,CAAC;IAEM,qBAAqB,CAAC,QAAkB,EAAE,yBAAmC;QAClF,GAAG,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,6CAA6C,CAAC,CAAC,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;QAE7I,MAAM,OAAO,GAAG;G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AAC;GACb,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC;mDACvB,EAAE,YAAY,CAAC,CAAC;IACjE,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,SAAwB;QACtD,GAAG,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,uCAAuC,CAAC,CAAC;IAC1H,CAAC;CAEF"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Result } from "neverthrow";
|
|
2
|
-
import { UrlPath } from "../../types/file/urlPath.js";
|
|
3
|
-
import { ResourceInput } from "../../types/file/resource-input.js";
|
|
4
|
-
import { FileDownloadResponse } from "../../infrastructure/services/file-download-service.js";
|
|
5
|
-
import { ServiceError } from "../../infrastructure/service-error.js";
|
|
6
|
-
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
7
|
-
import { Directory } from "../../types/file/directory.js";
|
|
8
|
-
import { Language } from "../../types/sdk/generate.js";
|
|
9
|
-
import { UnallowedFeaturesResponse } from "../../infrastructure/services/validation-service.js";
|
|
10
|
-
export declare class SdkQuickstartPrompts {
|
|
11
|
-
importSpecStep(): void;
|
|
12
|
-
specPathPrompt(defaultSpecUrl: UrlPath): Promise<ResourceInput | undefined>;
|
|
13
|
-
splitSpecDetected(unallowed: UnallowedFeaturesResponse): void;
|
|
14
|
-
stripUnallowedFeaturesStep(unallowed: UnallowedFeaturesResponse): void;
|
|
15
|
-
specFileDoesNotExist(): void;
|
|
16
|
-
noSpecSpecified(): void;
|
|
17
|
-
downloadSpecFile(fn: Promise<Result<FileDownloadResponse, ServiceError>>): Promise<Result<FileDownloadResponse, ServiceError>>;
|
|
18
|
-
serviceError(serviceError: ServiceError): void;
|
|
19
|
-
validateSpecStep(): void;
|
|
20
|
-
specValidationFailed(): void;
|
|
21
|
-
useDefaultSpecPrompt(): Promise<boolean>;
|
|
22
|
-
fixYourSpec(): void;
|
|
23
|
-
selectLanguageStep(): void;
|
|
24
|
-
selectLanguagePrompt(allowedLanguages: Language[]): Promise<Language | undefined>;
|
|
25
|
-
noLanguagesAvailableOnPlan(): void;
|
|
26
|
-
private languagesNotOnPlanNote;
|
|
27
|
-
noLanguageSelected(): void;
|
|
28
|
-
accountInfoFetchFailed(serviceError: ServiceError): void;
|
|
29
|
-
selectInputDirectoryStep(): void;
|
|
30
|
-
inputDirectoryPathPrompt(): Promise<DirectoryPath | undefined>;
|
|
31
|
-
noInputDirectoryProvided(): void;
|
|
32
|
-
inputDirectoryPathDoesNotExist(inputDirectory: DirectoryPath): void;
|
|
33
|
-
inputDirectoryNotEmpty(inputDirectory: DirectoryPath): void;
|
|
34
|
-
downloadMetadataFile(fn: Promise<Result<FileDownloadResponse, ServiceError>>): Promise<Result<FileDownloadResponse, ServiceError>>;
|
|
35
|
-
printDirectoryStructure(inputDirectory: DirectoryPath, directory: Directory): void;
|
|
36
|
-
sdkOpenedInEditor(): void;
|
|
37
|
-
nextSteps(language: Language, inputDirectory: DirectoryPath): void;
|
|
38
|
-
}
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { isCancel, log, select, text } from "@clack/prompts";
|
|
2
|
-
import { format as f, getTree } from "../format.js";
|
|
3
|
-
import { noteWrapped, withSpinner } from "../prompt.js";
|
|
4
|
-
import { createResourceInputFromInput } from "../../types/file/resource-input.js";
|
|
5
|
-
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
6
|
-
import { removeQuotes } from "../../utils/string-utils.js";
|
|
7
|
-
import { LANGUAGE_CHOICES } from "../../types/sdk/generate.js";
|
|
8
|
-
const vscodeExtensionUrl = "https://marketplace.visualstudio.com/items?itemName=apimatic-developers.apimatic-for-vscode";
|
|
9
|
-
const sdkCustomizationUrl = "https://docs.apimatic.io/generate-sdks/codegen-settings/codegen-settings-overview/";
|
|
10
|
-
const pricingUrl = "https://www.apimatic.io/pricing";
|
|
11
|
-
export class SdkQuickstartPrompts {
|
|
12
|
-
importSpecStep() {
|
|
13
|
-
log.info(`Step 1 of 4: Import your OpenAPI Definition`);
|
|
14
|
-
}
|
|
15
|
-
async specPathPrompt(defaultSpecUrl) {
|
|
16
|
-
const spec = await text({
|
|
17
|
-
message: `Provide a local path or a public URL for your OpenAPI Definition file:`,
|
|
18
|
-
placeholder: "Provide absolute URL/local path or press Enter to use a sample OpenAPI Definition file from APIMatic.",
|
|
19
|
-
defaultValue: defaultSpecUrl.toString(),
|
|
20
|
-
validate: (value) => {
|
|
21
|
-
if (value && !createResourceInputFromInput(value)) {
|
|
22
|
-
return "Please enter a valid file path or URL.";
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
if (isCancel(spec)) {
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
return createResourceInputFromInput(spec);
|
|
30
|
-
}
|
|
31
|
-
splitSpecDetected(unallowed) {
|
|
32
|
-
const featuresList = unallowed.Features.map((f) => ` • ${f}`).join("\n");
|
|
33
|
-
let endpointMessage = "";
|
|
34
|
-
if (unallowed.EndpointLimit < unallowed.EndpointCount) {
|
|
35
|
-
endpointMessage = `\nEndpoint limit exceeded: ${unallowed.EndpointCount} endpoints found, but your plan allows ${unallowed.EndpointLimit}\n`;
|
|
36
|
-
}
|
|
37
|
-
const message = [
|
|
38
|
-
"Your API Specification includes components not available on your current subscription plan:",
|
|
39
|
-
"",
|
|
40
|
-
featuresList,
|
|
41
|
-
endpointMessage,
|
|
42
|
-
"To continue:",
|
|
43
|
-
"- Remove these components from your API Specification and re-run this command.",
|
|
44
|
-
"- Combine your split API Specification files into a single file. We can automatically remove unsupported components from single-file specs.",
|
|
45
|
-
`- Upgrade your subscription to unlock additional features: ${f.link(pricingUrl)}`
|
|
46
|
-
].join("\n");
|
|
47
|
-
log.info(message);
|
|
48
|
-
}
|
|
49
|
-
stripUnallowedFeaturesStep(unallowed) {
|
|
50
|
-
const featuresList = unallowed.Features.map((f) => ` • ${f}`).join("\n");
|
|
51
|
-
let endpointMessage = "";
|
|
52
|
-
if (unallowed.EndpointLimit < unallowed.EndpointCount) {
|
|
53
|
-
const endpointsToRemove = unallowed.EndpointCount - unallowed.EndpointLimit;
|
|
54
|
-
endpointMessage = `\n${endpointsToRemove} endpoint(s) will be removed from your spec\n`;
|
|
55
|
-
}
|
|
56
|
-
const message = [
|
|
57
|
-
"Your API Specification includes components not available on your current subscription plan.",
|
|
58
|
-
"We'll automatically remove these components before proceeding:",
|
|
59
|
-
featuresList,
|
|
60
|
-
endpointMessage,
|
|
61
|
-
"",
|
|
62
|
-
"You won't see these components in the generated SDKs or documentation.",
|
|
63
|
-
`Want to keep them? Upgrade your subscription to unlock additional features: ${f.link(pricingUrl)}`
|
|
64
|
-
].join("\n");
|
|
65
|
-
log.info(message);
|
|
66
|
-
}
|
|
67
|
-
specFileDoesNotExist() {
|
|
68
|
-
log.error("The specified file does not exist or is not a valid file. Please enter a valid file path.");
|
|
69
|
-
}
|
|
70
|
-
noSpecSpecified() {
|
|
71
|
-
log.error("No API Definition was provided.");
|
|
72
|
-
}
|
|
73
|
-
downloadSpecFile(fn) {
|
|
74
|
-
return withSpinner("Downloading API Definition", `API Definition downloaded`, "Unable to download API Definition", fn);
|
|
75
|
-
}
|
|
76
|
-
serviceError(serviceError) {
|
|
77
|
-
log.error(serviceError.errorMessage);
|
|
78
|
-
}
|
|
79
|
-
validateSpecStep() {
|
|
80
|
-
log.info(`Step 2 of 4: Validate and Lint your OpenAPI Definition`);
|
|
81
|
-
}
|
|
82
|
-
specValidationFailed() {
|
|
83
|
-
log.error(`Oops, it looks like there are some errors in your API Definition`);
|
|
84
|
-
}
|
|
85
|
-
async useDefaultSpecPrompt() {
|
|
86
|
-
const useDefaultSpec = await select({
|
|
87
|
-
message: `How would you like to proceed?`,
|
|
88
|
-
options: [
|
|
89
|
-
{
|
|
90
|
-
value: "no",
|
|
91
|
-
label: `1. Fix the issues using APIMatic's interactive VS Code Extension: ${vscodeExtensionUrl}`
|
|
92
|
-
},
|
|
93
|
-
{ value: "yes", label: `2. Use an example API Definition instead (recommended)` }
|
|
94
|
-
]
|
|
95
|
-
});
|
|
96
|
-
if (isCancel(useDefaultSpec)) {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
return useDefaultSpec === "yes";
|
|
100
|
-
}
|
|
101
|
-
fixYourSpec() {
|
|
102
|
-
const message = `Good luck fixing your API Definition! Feel free to run this command again once you're done.`;
|
|
103
|
-
log.info(message);
|
|
104
|
-
}
|
|
105
|
-
selectLanguageStep() {
|
|
106
|
-
log.info(`Step 3 of 4: Select programming language`);
|
|
107
|
-
}
|
|
108
|
-
async selectLanguagePrompt(allowedLanguages) {
|
|
109
|
-
const allowed = new Set(allowedLanguages);
|
|
110
|
-
const available = LANGUAGE_CHOICES.filter(({ value }) => allowed.has(value));
|
|
111
|
-
const excluded = LANGUAGE_CHOICES.filter(({ value }) => !allowed.has(value));
|
|
112
|
-
if (excluded.length > 0) {
|
|
113
|
-
log.info(this.languagesNotOnPlanNote(excluded.map(({ label }) => label)));
|
|
114
|
-
}
|
|
115
|
-
const language = await select({
|
|
116
|
-
message: "Choose the programming language for your SDK:",
|
|
117
|
-
options: available.map(({ label, value }) => ({ label, value }))
|
|
118
|
-
});
|
|
119
|
-
if (isCancel(language)) {
|
|
120
|
-
return undefined;
|
|
121
|
-
}
|
|
122
|
-
return language;
|
|
123
|
-
}
|
|
124
|
-
noLanguagesAvailableOnPlan() {
|
|
125
|
-
const message = [
|
|
126
|
-
"You're on the Free plan.",
|
|
127
|
-
`Upgrade your subscription to get started: ${f.link(pricingUrl)}`
|
|
128
|
-
].join("\n");
|
|
129
|
-
log.warn(message);
|
|
130
|
-
}
|
|
131
|
-
languagesNotOnPlanNote(languages) {
|
|
132
|
-
return [
|
|
133
|
-
`The following languages aren't included in your current subscription plan:`,
|
|
134
|
-
...languages.map((language) => ` • ${language}`),
|
|
135
|
-
"",
|
|
136
|
-
`Upgrade your subscription to unlock them: ${f.link(pricingUrl)}`
|
|
137
|
-
].join("\n");
|
|
138
|
-
}
|
|
139
|
-
noLanguageSelected() {
|
|
140
|
-
log.error("No programming language was selected.");
|
|
141
|
-
}
|
|
142
|
-
accountInfoFetchFailed(serviceError) {
|
|
143
|
-
log.error(`Failed to fetch your account information. ${serviceError.errorMessage}`);
|
|
144
|
-
}
|
|
145
|
-
selectInputDirectoryStep() {
|
|
146
|
-
log.info(`Step 4 of 4: Setup directory for SDK Generation`);
|
|
147
|
-
}
|
|
148
|
-
async inputDirectoryPathPrompt() {
|
|
149
|
-
var _a;
|
|
150
|
-
const inputDirectory = await text({
|
|
151
|
-
message: "Enter the directory path where you would like to setup the SDK (Requires an empty directory):",
|
|
152
|
-
placeholder: "Provide absolute path to the directory or press Enter to use the current directory.",
|
|
153
|
-
defaultValue: "./"
|
|
154
|
-
});
|
|
155
|
-
if (isCancel(inputDirectory)) {
|
|
156
|
-
return undefined;
|
|
157
|
-
}
|
|
158
|
-
const cleanedPath = removeQuotes((_a = inputDirectory === null || inputDirectory === void 0 ? void 0 : inputDirectory.trim()) !== null && _a !== void 0 ? _a : "");
|
|
159
|
-
return new DirectoryPath(cleanedPath);
|
|
160
|
-
}
|
|
161
|
-
noInputDirectoryProvided() {
|
|
162
|
-
log.error("No directory was specified.");
|
|
163
|
-
}
|
|
164
|
-
inputDirectoryPathDoesNotExist(inputDirectory) {
|
|
165
|
-
log.error(`The specified directory path ${f.path(inputDirectory)} does not exist.`);
|
|
166
|
-
}
|
|
167
|
-
inputDirectoryNotEmpty(inputDirectory) {
|
|
168
|
-
log.error(`The target directory ${f.path(inputDirectory)} is not empty. Please provide a path to an empty directory or clear its contents.`);
|
|
169
|
-
}
|
|
170
|
-
downloadMetadataFile(fn) {
|
|
171
|
-
return withSpinner("Setting up source directory", `Source directory set up successfully`, "Unable to set up source directory", fn);
|
|
172
|
-
}
|
|
173
|
-
printDirectoryStructure(inputDirectory, directory) {
|
|
174
|
-
const heading = `${f.var("src")} directory containing source files created at ${f.path(inputDirectory)}\n`;
|
|
175
|
-
const message = getTree(directory.toTreeNode());
|
|
176
|
-
log.info(heading + message);
|
|
177
|
-
}
|
|
178
|
-
sdkOpenedInEditor() {
|
|
179
|
-
log.info("Opened the SDK directory in VS Code. To get started with your SDK, review the README file.");
|
|
180
|
-
}
|
|
181
|
-
nextSteps(language, inputDirectory) {
|
|
182
|
-
const inputDirectoryFlag = !inputDirectory.isEqual(DirectoryPath.default)
|
|
183
|
-
? `${f.flag("input", inputDirectory.toString())} `
|
|
184
|
-
: "";
|
|
185
|
-
const message = `Run the command
|
|
186
|
-
'${f.cmdAlt("apimatic", "sdk", "generate")} ${inputDirectoryFlag}${f.flag("language", language)}'
|
|
187
|
-
to regenerate your SDK.
|
|
188
|
-
|
|
189
|
-
Explore API Portals and Context Plugins next to enhance your API experience.
|
|
190
|
-
|
|
191
|
-
To learn more about customizing your SDK, visit:
|
|
192
|
-
${f.link(sdkCustomizationUrl)}`;
|
|
193
|
-
noteWrapped(message, "Next Steps");
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
//# sourceMappingURL=quickstart.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quickstart.js","sourceRoot":"","sources":["../../../src/prompts/sdk/quickstart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAiB,MAAM,oCAAoC,CAAC;AAGjG,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAY,gBAAgB,EA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QACtB,GAAG,CAAC,IAAI,CAAC,4FAA4F,CAAC,CAAC;IACzG,CAAC;IAEM,SAAS,CAAC,QAAkB,EAAE,cAA6B;QAChE,MAAM,kBAAkB,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC;YACvE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,GAAG;YAClD,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,OAAO,GAAG;GACjB,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC;;;;;;EAM7F,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC5B,WAAW,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
2
|
-
import { FilePath } from "../../types/file/filePath.js";
|
|
3
|
-
import { Directory } from "../../types/file/directory.js";
|
|
4
|
-
export declare class SaveChangesPrompts {
|
|
5
|
-
srcDirectoryEmpty(directory: DirectoryPath): void;
|
|
6
|
-
invalidSdkDirectory(directory: DirectoryPath): void;
|
|
7
|
-
invalidVersionedDocsDirectory(directory: DirectoryPath): void;
|
|
8
|
-
apiVersionOnlyApplicableWithVersionedBuild(): void;
|
|
9
|
-
versionNotFound(): void;
|
|
10
|
-
selectVersion(versions: string[]): Promise<string | undefined>;
|
|
11
|
-
sdkSourceTreeNotFound(language: string): void;
|
|
12
|
-
operationCancelled(): void;
|
|
13
|
-
directoryStillOpen(directory: DirectoryPath): Promise<void>;
|
|
14
|
-
modifiedFilesDetected(directory: Directory): void;
|
|
15
|
-
confirmReviewChanges(): Promise<boolean>;
|
|
16
|
-
noChangesDetected(): void;
|
|
17
|
-
openingDirectoryToReviewChanges(): void;
|
|
18
|
-
reviewChangesManually(tempDirectory: DirectoryPath): Promise<void>;
|
|
19
|
-
confirmSaveChanges(): Promise<boolean>;
|
|
20
|
-
changesSaved(sourceTreePath: FilePath): void;
|
|
21
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { log, isCancel, select, confirm } from "@clack/prompts";
|
|
2
|
-
import { format as f, getTree } from "../format.js";
|
|
3
|
-
import { noteWrapped } from "../prompt.js";
|
|
4
|
-
export class SaveChangesPrompts {
|
|
5
|
-
srcDirectoryEmpty(directory) {
|
|
6
|
-
const message = `The ${f.var("src")} directory is either empty or invalid: ${f.path(directory)}`;
|
|
7
|
-
log.error(message);
|
|
8
|
-
}
|
|
9
|
-
invalidSdkDirectory(directory) {
|
|
10
|
-
const message = `SDK directory does not exist: ${f.path(directory)}`;
|
|
11
|
-
log.error(message);
|
|
12
|
-
}
|
|
13
|
-
invalidVersionedDocsDirectory(directory) {
|
|
14
|
-
const message = `The ${f.var("versioned_docs")} directory is either empty or invalid: ${f.path(directory)}`;
|
|
15
|
-
log.error(message);
|
|
16
|
-
}
|
|
17
|
-
apiVersionOnlyApplicableWithVersionedBuild() {
|
|
18
|
-
log.warn(`The ${f.flag("api-version")} is only applicable with a versioned build.`);
|
|
19
|
-
}
|
|
20
|
-
versionNotFound() {
|
|
21
|
-
log.error(`The selected API version is invalid.`);
|
|
22
|
-
}
|
|
23
|
-
async selectVersion(versions) {
|
|
24
|
-
const version = await select({
|
|
25
|
-
message: "Select an API version to save SDK changes into:",
|
|
26
|
-
options: versions.map((v) => ({ label: v, value: v }))
|
|
27
|
-
});
|
|
28
|
-
if (isCancel(version)) {
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
return version;
|
|
32
|
-
}
|
|
33
|
-
sdkSourceTreeNotFound(language) {
|
|
34
|
-
log.error(`No 'sdk-source-tree' found for ${f.var(language)}. You need to generate the SDK with change tracking enabled before you can save changes.`);
|
|
35
|
-
const message = `Generate the SDK with change tracking by running:
|
|
36
|
-
'${f.cmdAlt("apimatic", "sdk", "generate")} ${f.flag("language", language)} ${f.flag("track-changes")}'
|
|
37
|
-
Then customize your SDK and run ${f.cmdAlt("apimatic", "sdk", "save-changes")} again.`;
|
|
38
|
-
noteWrapped(message, "Next Steps");
|
|
39
|
-
}
|
|
40
|
-
operationCancelled() {
|
|
41
|
-
log.warn("Exiting without saving any changes.");
|
|
42
|
-
}
|
|
43
|
-
async directoryStillOpen(directory) {
|
|
44
|
-
log.info(`Please close all applications using the directory ${f.path(directory)} to allow cleanup of temporary files.`);
|
|
45
|
-
}
|
|
46
|
-
modifiedFilesDetected(directory) {
|
|
47
|
-
log.info(`Detected changes in the following file(s):
|
|
48
|
-
${getTree(directory.toTreeNode())}`);
|
|
49
|
-
}
|
|
50
|
-
async confirmReviewChanges() {
|
|
51
|
-
const confirmed = await confirm({
|
|
52
|
-
message: `Do you want to review these changes?`,
|
|
53
|
-
initialValue: false
|
|
54
|
-
});
|
|
55
|
-
if (isCancel(confirmed)) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
return confirmed;
|
|
59
|
-
}
|
|
60
|
-
noChangesDetected() {
|
|
61
|
-
log.info("No changes detected in the SDK.");
|
|
62
|
-
}
|
|
63
|
-
openingDirectoryToReviewChanges() {
|
|
64
|
-
log.info(`Opening the changed files in VS Code for review. Close the editor to proceed.`);
|
|
65
|
-
}
|
|
66
|
-
async reviewChangesManually(tempDirectory) {
|
|
67
|
-
log.info(`Review the changes at ${f.path(tempDirectory)} to proceed.`);
|
|
68
|
-
}
|
|
69
|
-
async confirmSaveChanges() {
|
|
70
|
-
const confirmed = await confirm({
|
|
71
|
-
message: `Do you want to save these changes?`,
|
|
72
|
-
initialValue: true
|
|
73
|
-
});
|
|
74
|
-
if (isCancel(confirmed)) {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
return confirmed;
|
|
78
|
-
}
|
|
79
|
-
changesSaved(sourceTreePath) {
|
|
80
|
-
log.success(`Changes saved successfully at ${f.path(sourceTreePath)}.`);
|
|
81
|
-
log.info(`Your saved changes will reapply automatically the next time you generate this SDK.`);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=save-changes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"save-changes.js","sourceRoot":"","sources":["../../../src/prompts/sdk/save-changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,MAAM,OAAO,kBAAkB;IAEtB,iBAAiB,CAAC,SAAwB;QAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACjG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrB,CAAC;IAEM,mBAAmB,CAAC,SAAwB;QACjD,MAAM,OAAO,GAAG,iCAAiC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACrE,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrB,CAAC;IAEM,6BAA6B,CAAC,SAAwB;QAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,0CAA0C,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5G,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrB,CAAC;IAEM,0CAA0C;QAC/C,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,6CAA6C,CAAC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AO,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,oBAAoB;QAC/B,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC;YAC9B,OAAO,EAAE,sCAAsC;YAC/C,YAAY,EAAE,KAAK;SACpB,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YACxB,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEM,iBAAiB;QACtB,GAAG,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;IAC9C,CAAC;IAEM,+BAA+B;QACpC,GAAG,CAAC,IAAI,CAAC,+EAA+E,CAAC,CAAC;IAC5F,CAAC;IAEM,KAAK,CAAC,qBAAqB,CAAC,aAA4B;QAC7D,GAAG,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IACzE,CAAC;IAEM,KAAK,CAAC,kBAAkB;QAC7B,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC;YAC9B,OAAO,EAAE,oCAAoC;YAC7C,YAAY,EAAE,IAAI;SACnB,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YACxB,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEM,YAAY,CAAC,cAAwB;QAC1C,GAAG,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QACxE,GAAG,CAAC,IAAI,CAAC,oFAAoF,CAAC,CAAC;IACjG,CAAC;CACF"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { DirectoryPath } from "./file/directoryPath.js";
|
|
2
|
-
import { FilePath } from "./file/filePath.js";
|
|
3
|
-
import { BuildConfig } from "./build/build.js";
|
|
4
|
-
import { SpecContext } from "./spec-context.js";
|
|
5
|
-
export declare class BuildContext {
|
|
6
|
-
private readonly fileService;
|
|
7
|
-
private readonly buildDirectory;
|
|
8
|
-
constructor(buildDirectory: DirectoryPath);
|
|
9
|
-
private get buildFile();
|
|
10
|
-
/** The APIMATIC-BUILD.json path within this build directory, for callers that hand it to a service. */
|
|
11
|
-
buildConfigFilePath(): FilePath;
|
|
12
|
-
validate(): Promise<boolean>;
|
|
13
|
-
exists(): Promise<boolean>;
|
|
14
|
-
existsSync(): boolean;
|
|
15
|
-
getBuildFileContents(): Promise<BuildConfig>;
|
|
16
|
-
updateBuildFileContents(buildConfig: BuildConfig): Promise<void>;
|
|
17
|
-
deleteWorkflowDir(): Promise<void>;
|
|
18
|
-
getBuildZipPath(tempDir: DirectoryPath, packageSettingsDirectory?: DirectoryPath): Promise<FilePath>;
|
|
19
|
-
getSpecContext(): SpecContext;
|
|
20
|
-
hasSdkSourceTree(language: string): Promise<boolean>;
|
|
21
|
-
getSdkSourceTree(language: string): FilePath;
|
|
22
|
-
isVersionedBuild(): Promise<boolean>;
|
|
23
|
-
getVersionedBuildDirectory(): Promise<DirectoryPath | undefined>;
|
|
24
|
-
getSingleVersionedBuildDirectory(): Promise<DirectoryPath | undefined>;
|
|
25
|
-
getSelectedVersionedBuildDirectory(versionSelector: (versions: string[]) => Promise<string | undefined>): Promise<DirectoryPath | undefined>;
|
|
26
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { FileService } from "../infrastructure/file-service.js";
|
|
2
|
-
import { FilePath } from "./file/filePath.js";
|
|
3
|
-
import { FileName } from "./file/fileName.js";
|
|
4
|
-
import { BuildConfig } from "./build/build.js";
|
|
5
|
-
import { SpecContext } from "./spec-context.js";
|
|
6
|
-
import { TempContext } from "./temp-context.js";
|
|
7
|
-
export class BuildContext {
|
|
8
|
-
constructor(buildDirectory) {
|
|
9
|
-
this.fileService = new FileService();
|
|
10
|
-
this.buildDirectory = buildDirectory;
|
|
11
|
-
}
|
|
12
|
-
get buildFile() {
|
|
13
|
-
// TODO: add checks for build file path
|
|
14
|
-
return new FilePath(this.buildDirectory, new FileName("APIMATIC-BUILD.json"));
|
|
15
|
-
}
|
|
16
|
-
/** The APIMATIC-BUILD.json path within this build directory, for callers that hand it to a service. */
|
|
17
|
-
buildConfigFilePath() {
|
|
18
|
-
return this.buildFile;
|
|
19
|
-
}
|
|
20
|
-
async validate() {
|
|
21
|
-
// TODO: add more checks here
|
|
22
|
-
if (!(await this.fileService.directoryExists(this.buildDirectory)))
|
|
23
|
-
return false;
|
|
24
|
-
return await this.fileService.fileExists(this.buildFile);
|
|
25
|
-
}
|
|
26
|
-
async exists() {
|
|
27
|
-
return await this.fileService.directoryExists(this.buildDirectory);
|
|
28
|
-
}
|
|
29
|
-
existsSync() {
|
|
30
|
-
return this.fileService.directoryExistsSync(this.buildDirectory);
|
|
31
|
-
}
|
|
32
|
-
async getBuildFileContents() {
|
|
33
|
-
const buildFileContent = await this.fileService.getContents(this.buildFile);
|
|
34
|
-
return BuildConfig.parse(buildFileContent);
|
|
35
|
-
}
|
|
36
|
-
async updateBuildFileContents(buildConfig) {
|
|
37
|
-
await this.fileService.writeContents(this.buildFile, JSON.stringify(buildConfig, null, 2));
|
|
38
|
-
}
|
|
39
|
-
async deleteWorkflowDir() {
|
|
40
|
-
await this.fileService.deleteDirectory(this.buildDirectory.join(".github"));
|
|
41
|
-
}
|
|
42
|
-
async getBuildZipPath(tempDir, packageSettingsDirectory) {
|
|
43
|
-
const tempContext = new TempContext(tempDir);
|
|
44
|
-
const tempBuildDir = tempDir.join("build");
|
|
45
|
-
await this.fileService.copyDirectoryContents(this.buildDirectory, tempBuildDir);
|
|
46
|
-
if (packageSettingsDirectory) {
|
|
47
|
-
await this.fileService.copyDirectoryContents(packageSettingsDirectory, tempBuildDir.join('package-settings'));
|
|
48
|
-
}
|
|
49
|
-
return await tempContext.zip(tempBuildDir);
|
|
50
|
-
}
|
|
51
|
-
getSpecContext() {
|
|
52
|
-
return new SpecContext(this.buildDirectory.join("spec"));
|
|
53
|
-
}
|
|
54
|
-
async hasSdkSourceTree(language) {
|
|
55
|
-
const sourceTreePath = FilePath.create(this.buildDirectory.join("sdk-source-tree").join(`.${language}`).toString());
|
|
56
|
-
if (!sourceTreePath) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
return await this.fileService.fileExists(sourceTreePath);
|
|
60
|
-
}
|
|
61
|
-
getSdkSourceTree(language) {
|
|
62
|
-
return FilePath.create(this.buildDirectory.join("sdk-source-tree").join(`.${language}`).toString());
|
|
63
|
-
}
|
|
64
|
-
async isVersionedBuild() {
|
|
65
|
-
if (!await this.validate()) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
return (await this.getBuildFileContents()).isVersioned();
|
|
69
|
-
}
|
|
70
|
-
async getVersionedBuildDirectory() {
|
|
71
|
-
const buildConfig = await this.getBuildFileContents();
|
|
72
|
-
if (!buildConfig.isVersioned()) {
|
|
73
|
-
return undefined;
|
|
74
|
-
}
|
|
75
|
-
const versionsDirectory = this.buildDirectory.join(buildConfig.versionsPath());
|
|
76
|
-
if (!await this.fileService.directoryExists(versionsDirectory)) {
|
|
77
|
-
return undefined;
|
|
78
|
-
}
|
|
79
|
-
const versionsDirs = await this.fileService.getSubDirectoriesPaths(versionsDirectory);
|
|
80
|
-
return versionsDirs.length > 0 ? versionsDirectory : undefined;
|
|
81
|
-
}
|
|
82
|
-
async getSingleVersionedBuildDirectory() {
|
|
83
|
-
const buildConfig = await this.getBuildFileContents();
|
|
84
|
-
if (!buildConfig.isVersioned()) {
|
|
85
|
-
return undefined;
|
|
86
|
-
}
|
|
87
|
-
const versionsDirectory = this.buildDirectory.join(buildConfig.versionsPath());
|
|
88
|
-
if (!await this.fileService.directoryExists(versionsDirectory)) {
|
|
89
|
-
return undefined;
|
|
90
|
-
}
|
|
91
|
-
const versionsDirs = await this.fileService.getSubDirectoriesPaths(versionsDirectory);
|
|
92
|
-
return versionsDirs.length === 1 ? versionsDirs[0] : undefined;
|
|
93
|
-
}
|
|
94
|
-
async getSelectedVersionedBuildDirectory(versionSelector) {
|
|
95
|
-
const buildConfig = await this.getBuildFileContents();
|
|
96
|
-
if (!buildConfig.isVersioned()) {
|
|
97
|
-
return undefined;
|
|
98
|
-
}
|
|
99
|
-
const versionsDirectory = this.buildDirectory.join(buildConfig.versionsPath());
|
|
100
|
-
if (!await this.fileService.directoryExists(versionsDirectory)) {
|
|
101
|
-
return undefined;
|
|
102
|
-
}
|
|
103
|
-
const versionsDirs = await this.fileService.getSubDirectoriesPaths(versionsDirectory);
|
|
104
|
-
const selectedVersion = await versionSelector(versionsDirs.map(dir => dir.leafName()));
|
|
105
|
-
if (!selectedVersion) {
|
|
106
|
-
return undefined;
|
|
107
|
-
}
|
|
108
|
-
return versionsDirs.find(dir => dir.leafName() === selectedVersion);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
//# sourceMappingURL=build-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-context.js","sourceRoot":"","sources":["../../src/types/build-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,OAAO,YAAY;IAIvB,YAAY,cAA6B;QAHxB,gBAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAI/C,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAED,IAAY,SAAS;QACnB,uCAAuC;QACvC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC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AAY,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjE,CAAC;IAEM,KAAK,CAAC,kCAAkC,CAAC,eAAoE;QAClH,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACtD,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,EAAE,CAAC;YAC/B,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC;QAC/E,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,iBAAiB,CAAC,EAAE,CAAC;YAC/D,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;QACtF,MAAM,eAAe,GAAG,MAAM,eAAe,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QACvF,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,eAAe,CAAC,CAAC;IAEtE,CAAC;CACF"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DomainEvent } from "./domain-event.js";
|
|
2
|
-
export class RecipeCreationFailedEvent extends DomainEvent {
|
|
3
|
-
constructor(message, commandName, flags) {
|
|
4
|
-
super(message, commandName, flags);
|
|
5
|
-
this.eventName = RecipeCreationFailedEvent.name;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=recipe-creation-failed.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recipe-creation-failed.js","sourceRoot":"","sources":["../../../src/types/events/recipe-creation-failed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,OAAO,yBAA0B,SAAQ,WAAW;IAGxD,YAAY,OAAe,EAAE,WAAmB,EAAE,KAA8B;QAC9E,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QAHlB,cAAS,GAAG,yBAAyB,CAAC,IAAI,CAAC;IAI9D,CAAC;CACF"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DomainEvent } from "./domain-event.js";
|
|
2
|
-
export declare class SdkChangesSavedEvent extends DomainEvent {
|
|
3
|
-
protected readonly eventName: string;
|
|
4
|
-
private static readonly message;
|
|
5
|
-
private static readonly commandName;
|
|
6
|
-
private readonly language;
|
|
7
|
-
constructor(language: string);
|
|
8
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DomainEvent } from "./domain-event.js";
|
|
2
|
-
export class SdkChangesSavedEvent extends DomainEvent {
|
|
3
|
-
constructor(language) {
|
|
4
|
-
super(SdkChangesSavedEvent.message, SdkChangesSavedEvent.commandName, {});
|
|
5
|
-
this.eventName = SdkChangesSavedEvent.name;
|
|
6
|
-
this.language = language;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
SdkChangesSavedEvent.message = "Save changes completed.";
|
|
10
|
-
SdkChangesSavedEvent.commandName = "sdk:save-changes";
|
|
11
|
-
//# sourceMappingURL=sdk-changes-saved.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-changes-saved.js","sourceRoot":"","sources":["../../../src/types/events/sdk-changes-saved.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,OAAO,oBAAqB,SAAQ,WAAW;IAMnD,YAAY,QAAgB;QAC1B,KAAK,CAAC,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QANzD,cAAS,GAAG,oBAAoB,CAAC,IAAI,CAAC;QAOvD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;;AAPuB,4BAAO,GAAG,yBAAkC,AAArC,CAAsC;AAC7C,gCAAW,GAAG,kBAA2B,AAA9B,CAA+B"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DomainEvent } from "./domain-event.js";
|
|
2
|
-
export declare class SdkChangesTrackedEvent extends DomainEvent {
|
|
3
|
-
protected readonly eventName: string;
|
|
4
|
-
private static readonly message;
|
|
5
|
-
private static readonly commandName;
|
|
6
|
-
private readonly language;
|
|
7
|
-
constructor(language: string);
|
|
8
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DomainEvent } from "./domain-event.js";
|
|
2
|
-
export class SdkChangesTrackedEvent extends DomainEvent {
|
|
3
|
-
constructor(language) {
|
|
4
|
-
super(SdkChangesTrackedEvent.message, SdkChangesTrackedEvent.commandName, {});
|
|
5
|
-
this.eventName = SdkChangesTrackedEvent.name;
|
|
6
|
-
this.language = language;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
SdkChangesTrackedEvent.message = "SDK generated with track changes enabled.";
|
|
10
|
-
SdkChangesTrackedEvent.commandName = "sdk:generate";
|
|
11
|
-
//# sourceMappingURL=sdk-changes-tracked.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-changes-tracked.js","sourceRoot":"","sources":["../../../src/types/events/sdk-changes-tracked.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IAMrD,YAAY,QAAgB;QAC1B,KAAK,CAAC,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAN7D,cAAS,GAAG,sBAAsB,CAAC,IAAI,CAAC;QAOzD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;;AAPuB,8BAAO,GAAG,2CAAoD,AAAvD,CAAwD;AAC/D,kCAAW,GAAG,cAAuB,AAA1B,CAA2B"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DomainEvent } from "./domain-event.js";
|
|
2
|
-
export declare class SdkConflictsResolvedEvent extends DomainEvent {
|
|
3
|
-
protected readonly eventName: string;
|
|
4
|
-
private static readonly message;
|
|
5
|
-
private static readonly commandName;
|
|
6
|
-
private readonly language;
|
|
7
|
-
constructor(language: string);
|
|
8
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DomainEvent } from "./domain-event.js";
|
|
2
|
-
export class SdkConflictsResolvedEvent extends DomainEvent {
|
|
3
|
-
constructor(language) {
|
|
4
|
-
super(SdkConflictsResolvedEvent.message, SdkConflictsResolvedEvent.commandName, {});
|
|
5
|
-
this.eventName = SdkConflictsResolvedEvent.name;
|
|
6
|
-
this.language = language;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
SdkConflictsResolvedEvent.message = "SDK merge conflicts resolved.";
|
|
10
|
-
SdkConflictsResolvedEvent.commandName = "sdk:generate";
|
|
11
|
-
//# sourceMappingURL=sdk-conflicts-resolved.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-conflicts-resolved.js","sourceRoot":"","sources":["../../../src/types/events/sdk-conflicts-resolved.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,OAAO,yBAA0B,SAAQ,WAAW;IAMxD,YAAY,QAAgB;QAC1B,KAAK,CAAC,yBAAyB,CAAC,OAAO,EAAE,yBAAyB,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QANnE,cAAS,GAAG,yBAAyB,CAAC,IAAI,CAAC;QAO5D,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;;AAPuB,iCAAO,GAAG,+BAAwC,AAA3C,CAA4C;AACnD,qCAAW,GAAG,cAAuB,AAA1B,CAA2B"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DomainEvent } from "./domain-event.js";
|
|
2
|
-
export class TocCreationFailedEvent extends DomainEvent {
|
|
3
|
-
constructor(message, commandName, flags) {
|
|
4
|
-
super(message, commandName, flags);
|
|
5
|
-
this.eventName = TocCreationFailedEvent.name;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=toc-creation-failed.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toc-creation-failed.js","sourceRoot":"","sources":["../../../src/types/events/toc-creation-failed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IAGrD,YAAY,OAAe,EAAE,WAAmB,EAAE,KAA8B;QAC9E,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QAHlB,cAAS,GAAG,sBAAsB,CAAC,IAAI,CAAC;IAI3D,CAAC;CACF"}
|