@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
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Result } from 'neverthrow';
|
|
2
|
+
import { ApimaticConfigContext } from './apimatic-config-context.js';
|
|
3
|
+
import { DirectoryPath } from './file/directoryPath.js';
|
|
4
|
+
import { FilePath } from './file/filePath.js';
|
|
5
|
+
import { PluginConfigContext } from './plugin-config-context.js';
|
|
6
|
+
import { PortalSourceContext } from './portal-source-context.js';
|
|
7
|
+
import { Language } from './sdk/generate.js';
|
|
8
|
+
import { SdkContext } from './sdk-context.js';
|
|
9
|
+
export declare const GITIGNORE = ".gitignore";
|
|
10
|
+
export declare const GENERATED: readonly string[];
|
|
11
|
+
/** Neither stops a portal being built, so the wizard says so and carries on. */
|
|
12
|
+
export type GitignoreFailure = 'unreadable' | 'unwritable';
|
|
13
|
+
export type VersionProblem = 'noVersions' | 'versionNotFound';
|
|
14
|
+
export declare class ProjectContext {
|
|
15
|
+
private readonly projectDirectory;
|
|
16
|
+
private readonly source;
|
|
17
|
+
private readonly version?;
|
|
18
|
+
private readonly fileService;
|
|
19
|
+
private constructor();
|
|
20
|
+
static at(input: string | undefined): ProjectContext;
|
|
21
|
+
static in(projectDirectory: DirectoryPath): ProjectContext;
|
|
22
|
+
private get buildFile();
|
|
23
|
+
private get gitignore();
|
|
24
|
+
sourceDirectory(): DirectoryPath;
|
|
25
|
+
isSourceDirectory(directory: DirectoryPath): boolean;
|
|
26
|
+
isSourceWithin(directory: DirectoryPath): boolean;
|
|
27
|
+
sdkDirectory(destination?: string): DirectoryPath;
|
|
28
|
+
portalDirectory(destination?: string): DirectoryPath;
|
|
29
|
+
pluginDirectory(destination?: string): DirectoryPath;
|
|
30
|
+
sourceExists(): Promise<boolean>;
|
|
31
|
+
/** For a prompt validator, which cannot await. */
|
|
32
|
+
sourceExistsSync(): boolean;
|
|
33
|
+
specsExist(): Promise<boolean>;
|
|
34
|
+
buildZip(tempDirectory: DirectoryPath, packageSettingsDirectory?: DirectoryPath): Promise<FilePath>;
|
|
35
|
+
isVersioned(): Promise<boolean>;
|
|
36
|
+
versionToBuild(apiVersion: string | undefined, ask: (versions: string[]) => Promise<string | undefined>): Promise<Result<ProjectContext, VersionProblem>>;
|
|
37
|
+
sdk(language: Language, sdkDirectory: DirectoryPath): SdkContext;
|
|
38
|
+
portalSource(): PortalSourceContext;
|
|
39
|
+
pluginConfig(): PluginConfigContext;
|
|
40
|
+
config(): ApimaticConfigContext;
|
|
41
|
+
/**
|
|
42
|
+
* Appends what is missing and rewrites nothing. A project may already have a `.gitignore` the
|
|
43
|
+
* user wrote, and a run that adds no entry leaves the file untouched.
|
|
44
|
+
*/
|
|
45
|
+
upsertGitignore(): Promise<Result<void, GitignoreFailure>>;
|
|
46
|
+
private reading;
|
|
47
|
+
private outputDirectory;
|
|
48
|
+
private buildConfig;
|
|
49
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { err, ok } from 'neverthrow';
|
|
2
|
+
import { FileService } from '../infrastructure/file-service.js';
|
|
3
|
+
import { ApimaticConfigContext } from './apimatic-config-context.js';
|
|
4
|
+
import { BuildConfig } from './build/build.js';
|
|
5
|
+
import { DirectoryPath } from './file/directoryPath.js';
|
|
6
|
+
import { FileName } from './file/fileName.js';
|
|
7
|
+
import { FilePath } from './file/filePath.js';
|
|
8
|
+
import { PluginConfigContext } from './plugin-config-context.js';
|
|
9
|
+
import { PortalSourceContext } from './portal-source-context.js';
|
|
10
|
+
import { OUTPUT_DIRECTORY_NAMES, SOURCE_DIRECTORY_NAME, SPEC_DIRECTORY_NAME } from './project-layout.js';
|
|
11
|
+
import { SdkContext } from './sdk-context.js';
|
|
12
|
+
import { SpecContext } from './spec-context.js';
|
|
13
|
+
import { TempContext } from './temp-context.js';
|
|
14
|
+
export const GITIGNORE = '.gitignore';
|
|
15
|
+
// `plugin publish` runs `git init` in /plugin/, so a repository tracking it would nest one inside another.
|
|
16
|
+
export const GENERATED = Object.values(OUTPUT_DIRECTORY_NAMES).map((name) => `/${name}/`);
|
|
17
|
+
export class ProjectContext {
|
|
18
|
+
projectDirectory;
|
|
19
|
+
source;
|
|
20
|
+
version;
|
|
21
|
+
fileService = new FileService();
|
|
22
|
+
constructor(projectDirectory, source, version) {
|
|
23
|
+
this.projectDirectory = projectDirectory;
|
|
24
|
+
this.source = source;
|
|
25
|
+
this.version = version;
|
|
26
|
+
}
|
|
27
|
+
static at(input) {
|
|
28
|
+
return ProjectContext.in(DirectoryPath.createInput(input));
|
|
29
|
+
}
|
|
30
|
+
static in(projectDirectory) {
|
|
31
|
+
return new ProjectContext(projectDirectory, projectDirectory.join(SOURCE_DIRECTORY_NAME));
|
|
32
|
+
}
|
|
33
|
+
get buildFile() {
|
|
34
|
+
return new FilePath(this.source, new FileName('APIMATIC-BUILD.json'));
|
|
35
|
+
}
|
|
36
|
+
get gitignore() {
|
|
37
|
+
return new FilePath(this.projectDirectory, new FileName(GITIGNORE));
|
|
38
|
+
}
|
|
39
|
+
sourceDirectory() {
|
|
40
|
+
return this.source;
|
|
41
|
+
}
|
|
42
|
+
isSourceDirectory(directory) {
|
|
43
|
+
return this.source.isEqual(directory);
|
|
44
|
+
}
|
|
45
|
+
isSourceWithin(directory) {
|
|
46
|
+
return directory.contains(this.source);
|
|
47
|
+
}
|
|
48
|
+
sdkDirectory(destination) {
|
|
49
|
+
return this.outputDirectory(OUTPUT_DIRECTORY_NAMES.sdk, destination);
|
|
50
|
+
}
|
|
51
|
+
portalDirectory(destination) {
|
|
52
|
+
return this.outputDirectory(OUTPUT_DIRECTORY_NAMES.portal, destination);
|
|
53
|
+
}
|
|
54
|
+
pluginDirectory(destination) {
|
|
55
|
+
return this.outputDirectory(OUTPUT_DIRECTORY_NAMES.plugin, destination);
|
|
56
|
+
}
|
|
57
|
+
async sourceExists() {
|
|
58
|
+
return await this.fileService.directoryExists(this.source);
|
|
59
|
+
}
|
|
60
|
+
/** For a prompt validator, which cannot await. */
|
|
61
|
+
sourceExistsSync() {
|
|
62
|
+
return this.fileService.directoryExistsSync(this.source);
|
|
63
|
+
}
|
|
64
|
+
async specsExist() {
|
|
65
|
+
return await new SpecContext(this.source.join(SPEC_DIRECTORY_NAME)).validate();
|
|
66
|
+
}
|
|
67
|
+
async buildZip(tempDirectory, packageSettingsDirectory) {
|
|
68
|
+
const staged = tempDirectory.join('build');
|
|
69
|
+
await this.fileService.copyDirectoryContents(this.source, staged);
|
|
70
|
+
if (packageSettingsDirectory) {
|
|
71
|
+
await this.fileService.copyDirectoryContents(packageSettingsDirectory, staged.join('package-settings'));
|
|
72
|
+
}
|
|
73
|
+
return await new TempContext(tempDirectory).zip(staged);
|
|
74
|
+
}
|
|
75
|
+
async isVersioned() {
|
|
76
|
+
const buildConfig = await this.buildConfig();
|
|
77
|
+
return buildConfig !== undefined && buildConfig.isVersioned();
|
|
78
|
+
}
|
|
79
|
+
async versionToBuild(apiVersion, ask) {
|
|
80
|
+
const buildConfig = await this.buildConfig();
|
|
81
|
+
if (!buildConfig?.isVersioned()) {
|
|
82
|
+
return ok(this);
|
|
83
|
+
}
|
|
84
|
+
const versionsDirectory = this.source.join(buildConfig.versionsPath());
|
|
85
|
+
const versions = (await this.fileService.directoryExists(versionsDirectory))
|
|
86
|
+
? await this.fileService.getSubDirectoriesPaths(versionsDirectory)
|
|
87
|
+
: [];
|
|
88
|
+
if (versions.length === 0) {
|
|
89
|
+
return err('noVersions');
|
|
90
|
+
}
|
|
91
|
+
if (!apiVersion && versions.length === 1) {
|
|
92
|
+
return ok(this.reading(versions[0]));
|
|
93
|
+
}
|
|
94
|
+
const chosen = apiVersion || (await ask(versions.map((version) => version.leafName())));
|
|
95
|
+
const version = versions.find((directory) => directory.leafName() === chosen);
|
|
96
|
+
return version === undefined ? err('versionNotFound') : ok(this.reading(version));
|
|
97
|
+
}
|
|
98
|
+
sdk(language, sdkDirectory) {
|
|
99
|
+
return new SdkContext(language, sdkDirectory, this.version);
|
|
100
|
+
}
|
|
101
|
+
portalSource() {
|
|
102
|
+
return new PortalSourceContext(this.source);
|
|
103
|
+
}
|
|
104
|
+
pluginConfig() {
|
|
105
|
+
return new PluginConfigContext(this.source);
|
|
106
|
+
}
|
|
107
|
+
config() {
|
|
108
|
+
return new ApimaticConfigContext(this.source);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Appends what is missing and rewrites nothing. A project may already have a `.gitignore` the
|
|
112
|
+
* user wrote, and a run that adds no entry leaves the file untouched.
|
|
113
|
+
*/
|
|
114
|
+
async upsertGitignore() {
|
|
115
|
+
let existing;
|
|
116
|
+
try {
|
|
117
|
+
existing = (await this.fileService.fileExists(this.gitignore))
|
|
118
|
+
? await this.fileService.getContents(this.gitignore)
|
|
119
|
+
: '';
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
return err('unreadable');
|
|
123
|
+
}
|
|
124
|
+
const listed = new Set(existing.split(/\r?\n/).map((line) => line.trim()));
|
|
125
|
+
const missing = GENERATED.filter((entry) => !listed.has(entry));
|
|
126
|
+
if (missing.length === 0) {
|
|
127
|
+
return ok(undefined);
|
|
128
|
+
}
|
|
129
|
+
const separator = existing === '' || existing.endsWith('\n') ? '' : '\n';
|
|
130
|
+
try {
|
|
131
|
+
await this.fileService.writeContents(this.gitignore, `${existing}${separator}${missing.join('\n')}\n`);
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
return err('unwritable');
|
|
135
|
+
}
|
|
136
|
+
return ok(undefined);
|
|
137
|
+
}
|
|
138
|
+
reading(versionDirectory) {
|
|
139
|
+
return new ProjectContext(this.projectDirectory, versionDirectory, versionDirectory.leafName());
|
|
140
|
+
}
|
|
141
|
+
outputDirectory(name, destination) {
|
|
142
|
+
return destination ? new DirectoryPath(destination) : this.projectDirectory.join(name);
|
|
143
|
+
}
|
|
144
|
+
async buildConfig() {
|
|
145
|
+
if (!(await this.fileService.fileExists(this.buildFile))) {
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
return BuildConfig.parse(await this.fileService.getContents(this.buildFile));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=project-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-context.js","sourceRoot":"","sources":["../../src/types/project-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAU,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEzG,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,E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AC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/E,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const SOURCE_DIRECTORY_NAME = "src";
|
|
2
|
+
export declare const SPEC_DIRECTORY_NAME = "spec";
|
|
3
|
+
export declare const CONTENT_DIRECTORY_NAME = "content";
|
|
4
|
+
export declare const STATIC_DIRECTORY_NAME = "static";
|
|
5
|
+
export declare const OUTPUT_DIRECTORY_NAMES: {
|
|
6
|
+
readonly sdk: 'sdk';
|
|
7
|
+
readonly portal: 'portal';
|
|
8
|
+
readonly plugin: 'plugin';
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const SOURCE_DIRECTORY_NAME = 'src';
|
|
2
|
+
export const SPEC_DIRECTORY_NAME = 'spec';
|
|
3
|
+
export const CONTENT_DIRECTORY_NAME = 'content';
|
|
4
|
+
export const STATIC_DIRECTORY_NAME = 'static';
|
|
5
|
+
export const OUTPUT_DIRECTORY_NAMES = {
|
|
6
|
+
sdk: 'sdk',
|
|
7
|
+
portal: 'portal',
|
|
8
|
+
plugin: 'plugin'
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=project-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-layout.js","sourceRoot":"","sources":["../../src/types/project-layout.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAE3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAE1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAEhD,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AAE9C,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAC"}
|
|
@@ -82,3 +82,5 @@ export interface PackageConfigurationForLanguage {
|
|
|
82
82
|
[Language.GO]: GoPackageConfiguration;
|
|
83
83
|
}
|
|
84
84
|
export type PackageConfigurationData = PackageConfigurationForLanguage[Language];
|
|
85
|
+
/** A profile that never configured a language is not the same as one that turned it off. */
|
|
86
|
+
export type PackageSettingsState = 'configured' | 'disabled' | 'absent';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-id.js","sourceRoot":"","sources":["../../../src/types/publish/profile-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,EAAE,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAG7C,MAAM,OAAO,SAAS;
|
|
1
|
+
{"version":3,"file":"profile-id.js","sourceRoot":"","sources":["../../../src/types/publish/profile-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,EAAE,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAG7C,MAAM,OAAO,SAAS;IACH,KAAK,CAAS;IAE/B,YAAoB,KAAa;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,+BAA+B,CAAC,OAA8B;QAC1E,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,KAAa;QACnC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAClC,OAAO,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAC5C,CAAC;QACD,OAAO,EAAE,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAClC,CAAC;IAEM,OAAO,CAAC,KAAgB;QAC7B,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;IACpC,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Language } from '../sdk/generate.js';
|
|
2
2
|
import { PublishingProfileItem, PublishingProfileSummaryGroup, PublishingProfileWithLanguagesGroup, PublishType } from '../publish-api/publishing-profile-item.js';
|
|
3
|
-
import { GitConfiguration, PackageConfigurationForLanguage } from './package-settings-configuration.js';
|
|
3
|
+
import { GitConfiguration, PackageConfigurationForLanguage, PackageSettingsState } from './package-settings-configuration.js';
|
|
4
4
|
export declare class PublishingProfile {
|
|
5
5
|
private readonly profile;
|
|
6
6
|
private readonly languageConfigs;
|
|
7
7
|
private readonly gitConfigs;
|
|
8
|
+
private readonly packageSettings;
|
|
8
9
|
private constructor();
|
|
9
10
|
static create(item: PublishingProfileItem): PublishingProfile;
|
|
10
11
|
toString(): string;
|
|
@@ -16,6 +17,7 @@ export declare class PublishingProfile {
|
|
|
16
17
|
toPublishingProfileSummaryGroup(): PublishingProfileSummaryGroup;
|
|
17
18
|
toPublishingProfileWithLanguagesGroup(): PublishingProfileWithLanguagesGroup;
|
|
18
19
|
getPackageConfigurationDataForLanguage<L extends Language>(language: L): PackageConfigurationForLanguage[L] | undefined;
|
|
20
|
+
getPackageSettingsStateForLanguage(language: Language): PackageSettingsState;
|
|
19
21
|
getGitConfigurationForLanguage(language: Language): GitConfiguration | undefined;
|
|
20
22
|
private static createCSharpConfiguration;
|
|
21
23
|
private static createJavaConfiguration;
|
|
@@ -3,27 +3,42 @@ import { PublishType, } from '../publish-api/publishing-profile-item.js';
|
|
|
3
3
|
function enabledOnly(configs) {
|
|
4
4
|
return Object.fromEntries(Object.entries(configs).filter(([, config]) => config !== undefined));
|
|
5
5
|
}
|
|
6
|
+
function settingsState(item) {
|
|
7
|
+
return item ? (item.isEnabled ? 'configured' : 'disabled') : 'absent';
|
|
8
|
+
}
|
|
6
9
|
export class PublishingProfile {
|
|
10
|
+
profile;
|
|
11
|
+
languageConfigs;
|
|
12
|
+
gitConfigs;
|
|
13
|
+
packageSettings;
|
|
7
14
|
constructor(profile) {
|
|
8
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
9
15
|
this.profile = profile;
|
|
10
16
|
this.languageConfigs = enabledOnly({
|
|
11
|
-
[Language.CSHARP]:
|
|
12
|
-
[Language.GO]:
|
|
13
|
-
[Language.JAVA]:
|
|
14
|
-
[Language.PHP]:
|
|
15
|
-
[Language.PYTHON]:
|
|
16
|
-
[Language.RUBY]:
|
|
17
|
-
[Language.TYPESCRIPT]:
|
|
17
|
+
[Language.CSHARP]: profile.cSharpConfiguration?.isEnabled ? PublishingProfile.createCSharpConfiguration(profile.cSharpConfiguration) : undefined,
|
|
18
|
+
[Language.GO]: profile.goConfiguration?.isEnabled ? PublishingProfile.createGoConfiguration(profile.goConfiguration) : undefined,
|
|
19
|
+
[Language.JAVA]: profile.javaConfiguration?.isEnabled ? PublishingProfile.createJavaConfiguration(profile.javaConfiguration) : undefined,
|
|
20
|
+
[Language.PHP]: profile.phpConfiguration?.isEnabled ? PublishingProfile.createPhpConfiguration(profile.phpConfiguration) : undefined,
|
|
21
|
+
[Language.PYTHON]: profile.pythonConfiguration?.isEnabled ? PublishingProfile.createPythonConfiguration(profile.pythonConfiguration) : undefined,
|
|
22
|
+
[Language.RUBY]: profile.rubyConfiguration?.isEnabled ? PublishingProfile.createRubyConfiguration(profile.rubyConfiguration) : undefined,
|
|
23
|
+
[Language.TYPESCRIPT]: profile.typeScriptConfiguration?.isEnabled ? PublishingProfile.createTypeScriptConfiguration(profile.typeScriptConfiguration) : undefined
|
|
18
24
|
});
|
|
25
|
+
this.packageSettings = {
|
|
26
|
+
[Language.CSHARP]: settingsState(profile.cSharpConfiguration),
|
|
27
|
+
[Language.GO]: settingsState(profile.goConfiguration),
|
|
28
|
+
[Language.JAVA]: settingsState(profile.javaConfiguration),
|
|
29
|
+
[Language.PHP]: settingsState(profile.phpConfiguration),
|
|
30
|
+
[Language.PYTHON]: settingsState(profile.pythonConfiguration),
|
|
31
|
+
[Language.RUBY]: settingsState(profile.rubyConfiguration),
|
|
32
|
+
[Language.TYPESCRIPT]: settingsState(profile.typeScriptConfiguration)
|
|
33
|
+
};
|
|
19
34
|
this.gitConfigs = enabledOnly({
|
|
20
|
-
[Language.CSHARP]:
|
|
21
|
-
[Language.GO]:
|
|
22
|
-
[Language.JAVA]:
|
|
23
|
-
[Language.PHP]:
|
|
24
|
-
[Language.PYTHON]:
|
|
25
|
-
[Language.RUBY]:
|
|
26
|
-
[Language.TYPESCRIPT]:
|
|
35
|
+
[Language.CSHARP]: profile.cSharpGitConfiguration?.isEnabled ? profile.cSharpGitConfiguration : undefined,
|
|
36
|
+
[Language.GO]: profile.goGitConfiguration?.isEnabled ? profile.goGitConfiguration : undefined,
|
|
37
|
+
[Language.JAVA]: profile.javaGitConfiguration?.isEnabled ? profile.javaGitConfiguration : undefined,
|
|
38
|
+
[Language.PHP]: profile.phpGitConfiguration?.isEnabled ? profile.phpGitConfiguration : undefined,
|
|
39
|
+
[Language.PYTHON]: profile.pythonGitConfiguration?.isEnabled ? profile.pythonGitConfiguration : undefined,
|
|
40
|
+
[Language.RUBY]: profile.rubyGitConfiguration?.isEnabled ? profile.rubyGitConfiguration : undefined,
|
|
41
|
+
[Language.TYPESCRIPT]: profile.typeScriptGitConfiguration?.isEnabled ? profile.typeScriptGitConfiguration : undefined
|
|
27
42
|
});
|
|
28
43
|
}
|
|
29
44
|
static create(item) {
|
|
@@ -73,6 +88,9 @@ export class PublishingProfile {
|
|
|
73
88
|
getPackageConfigurationDataForLanguage(language) {
|
|
74
89
|
return this.languageConfigs[language];
|
|
75
90
|
}
|
|
91
|
+
getPackageSettingsStateForLanguage(language) {
|
|
92
|
+
return this.packageSettings[language];
|
|
93
|
+
}
|
|
76
94
|
getGitConfigurationForLanguage(language) {
|
|
77
95
|
return this.gitConfigs[language];
|
|
78
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publishing-profile.js","sourceRoot":"","sources":["../../../src/types/publish/publishing-profile.ts"],"names":[],"mappings":"AAAA,OAAO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
|
import { err, ok } from 'neverthrow';
|
|
2
2
|
import { PublishingProfile } from './publishing-profile.js';
|
|
3
3
|
export class PublishingProfiles {
|
|
4
|
+
items;
|
|
4
5
|
constructor(items) {
|
|
5
6
|
this.items = items;
|
|
6
7
|
}
|
|
@@ -27,7 +28,7 @@ export class PublishingProfiles {
|
|
|
27
28
|
existing.profiles.push(...entry.profiles);
|
|
28
29
|
}
|
|
29
30
|
else {
|
|
30
|
-
map.set(entry.apiGroupName,
|
|
31
|
+
map.set(entry.apiGroupName, { ...entry, profiles: [...entry.profiles] });
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
return [...map.values()];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publishing-profiles.js","sourceRoot":"","sources":["../../../src/types/publish/publishing-profiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAU,MAAM,YAAY,CAAC;AAM7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,OAAO,kBAAkB;
|
|
1
|
+
{"version":3,"file":"publishing-profiles.js","sourceRoot":"","sources":["../../../src/types/publish/publishing-profiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAU,MAAM,YAAY,CAAC;AAM7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,OAAO,kBAAkB;IACQ,KAAK;IAA1C,YAAqC,KAA0B;qBAA1B,KAAK;IAAwB,CAAC;IAE5D,MAAM,CAAC,MAAM,CAAC,KAA8B;QACjD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAC9C,CAAC;QAED,OAAO,EAAE,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI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[],"mappings":"AAAA,OAAO,EAAU,EAAE,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAQ7C,MAAM,MAAM,GAAG,OAAO,CAAC;AAEvB,MAAM,OAAO,UAAU;
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/types/publish/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,EAAE,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAQ7C,MAAM,MAAM,GAAG,OAAO,CAAC;AAEvB,MAAM,OAAO,UAAU;IACJ,KAAK,CAAS;IAE/B,YAAoB,KAAa;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,KAAa;QACnC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9D,OAAO,GAAG,CAAC,mEAAmE,CAAC,CAAC;QAClF,CAAC;QACD,OAAO,EAAE,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACnC,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,KAAyB,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -6,10 +6,11 @@ import { FileName } from "./file/fileName.js";
|
|
|
6
6
|
import { FileDownloadService } from "../infrastructure/services/file-download-service.js";
|
|
7
7
|
import { FileService } from "../infrastructure/file-service.js";
|
|
8
8
|
export class ResourceContext {
|
|
9
|
+
tempDirectory;
|
|
10
|
+
fileDownloadService = new FileDownloadService();
|
|
11
|
+
fileService = new FileService();
|
|
9
12
|
constructor(tempDirectory) {
|
|
10
13
|
this.tempDirectory = tempDirectory;
|
|
11
|
-
this.fileDownloadService = new FileDownloadService();
|
|
12
|
-
this.fileService = new FileService();
|
|
13
14
|
}
|
|
14
15
|
async resolveTo(resourcePath) {
|
|
15
16
|
const fileName = new FileName(path.basename(resourcePath.toString()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-context.js","sourceRoot":"","sources":["../../src/types/resource-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,EAAE,EAAU,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAIhE,MAAM,OAAO,eAAe;
|
|
1
|
+
{"version":3,"file":"resource-context.js","sourceRoot":"","sources":["../../src/types/resource-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,EAAE,EAAU,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAIhE,MAAM,OAAO,eAAe;IAIG,aAAa;IAHzB,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC;IAChD,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;IAEjD,YAA6B,aAA4B;6BAA5B,aAAa;IAAkB,CAAC;IAEtD,KAAK,CAAC,SAAS,CAAC,YAA2B;QAChD,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QACtE,MAAM,mBAAmB,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;QAEvE,IAAI,YAAY,YAAY,OAAO,EAAE,CAAC;YACpC,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;YACrF,IAAI,kBAAkB,CAAC,KAAK,EAAE,EAAE,CAAC;gBAC/B,OAAO,GAAG,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;YACvC,CAAC;YACD,MAAM,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACzF,CAAC;QACD,IAAI,YAAY,YAAY,QAAQ,EAAE,CAAC;YACrC,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,EAAE,CAAC,mBAAmB,CAAC,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NonEmptyArray } from
|
|
1
|
+
import { NonEmptyArray } from '../utils.js';
|
|
2
2
|
export declare enum Language {
|
|
3
3
|
CSHARP = "csharp",
|
|
4
4
|
JAVA = "java",
|
|
@@ -8,8 +8,8 @@ export declare enum Language {
|
|
|
8
8
|
TYPESCRIPT = "typescript",
|
|
9
9
|
GO = "go"
|
|
10
10
|
}
|
|
11
|
+
/** An enum, not a constant, so the next generator is a line here and nothing else. */
|
|
11
12
|
export declare enum CodeGenerationVersion {
|
|
12
|
-
V3 = "v3",
|
|
13
13
|
V4 = "v4"
|
|
14
14
|
}
|
|
15
15
|
export declare enum Stability {
|
|
@@ -17,31 +17,37 @@ export declare enum Stability {
|
|
|
17
17
|
BETA = "beta"
|
|
18
18
|
}
|
|
19
19
|
export declare function mapLanguages(languageFlag: number): Language[];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* Shared by the portal (multi-select) and SDK (single-select) flows so both
|
|
23
|
-
* present the same list; the subscription's allowed languages decide which
|
|
24
|
-
* are selectable.
|
|
25
|
-
*/
|
|
20
|
+
export declare const LANGUAGE_NAMES: Readonly<Record<Language, string>>;
|
|
21
|
+
/** In display order, which `UPCOMING_LANGUAGES` inherits. */
|
|
26
22
|
export declare const LANGUAGE_CHOICES: ReadonlyArray<{
|
|
27
23
|
label: string;
|
|
28
24
|
value: Language;
|
|
29
25
|
}>;
|
|
26
|
+
/** What each generator offers for a language. A language absent from it cannot be generated. */
|
|
30
27
|
export declare class CodegenOption {
|
|
31
28
|
private readonly version;
|
|
32
29
|
private readonly stability;
|
|
33
|
-
static readonly v3: CodegenOption;
|
|
34
30
|
private constructor();
|
|
35
31
|
static create(version: CodeGenerationVersion, stability: Stability): CodegenOption;
|
|
36
|
-
isV3(): boolean;
|
|
37
|
-
isV4(): boolean;
|
|
38
|
-
stabilityLevel(): Stability;
|
|
39
32
|
codeGenerationVersion(): CodeGenerationVersion;
|
|
33
|
+
stabilityLevel(): Stability;
|
|
40
34
|
toString(): string;
|
|
41
35
|
}
|
|
36
|
+
/** The generator and level together, because neither is a choice the other can be made without. */
|
|
37
|
+
export declare const CODEGEN_OPTIONS: Readonly<Partial<Record<Language, Readonly<NonEmptyArray<CodegenOption>>>>>;
|
|
38
|
+
/** The keys of the table above: a language is available exactly when something can generate it. */
|
|
39
|
+
export declare const AVAILABLE_LANGUAGES: readonly Language[];
|
|
40
|
+
/** The rest of the enum, so a language cannot be named by both lists or by neither. */
|
|
41
|
+
export declare const UPCOMING_LANGUAGES: readonly Language[];
|
|
42
|
+
/** Takes a string because a config file names its own languages, and may name anything. */
|
|
43
|
+
export declare function isAvailableLanguage(language: string): language is Language;
|
|
44
|
+
export declare const PORTAL_LANGUAGES: readonly Language[];
|
|
45
|
+
export declare function codegenOptionsFor(language: Language): readonly CodegenOption[];
|
|
46
|
+
export declare function stabilityLevelsFor(language: Language): readonly Stability[];
|
|
47
|
+
/** What a flow that never asks sends: the first level a language offers. */
|
|
48
|
+
export declare function defaultStability(language: Language): Stability;
|
|
42
49
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
50
|
+
* The name a language is shown under everywhere, so one reads the same in every message.
|
|
51
|
+
* Takes a string because a config file names its own languages, and may name anything.
|
|
45
52
|
*/
|
|
46
|
-
export declare
|
|
47
|
-
export declare function getCodegenOptions(language: Language): Readonly<NonEmptyArray<CodegenOption>>;
|
|
53
|
+
export declare function languageLabel(language: string): string;
|