@apimatic/cli 1.5.0 → 2.0.0-beta.2
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 +221 -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 +100 -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 +193 -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 +68 -0
- package/lib/types/apimatic-config/document.js +161 -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 +154 -442
- 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,10 @@
|
|
|
1
|
+
import { createFileRoute } from '@tanstack/react-router';
|
|
2
|
+
import { renderRobots } from '@/lib/seo';
|
|
3
|
+
|
|
4
|
+
export const Route = createFileRoute('/robots.txt')({
|
|
5
|
+
server: {
|
|
6
|
+
handlers: {
|
|
7
|
+
GET: () => new Response(renderRobots(), { headers: { 'Content-Type': 'text/plain' } })
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createFileRoute } from '@tanstack/react-router';
|
|
2
|
+
import { renderSitemap } from '@/lib/sitemap.server';
|
|
3
|
+
|
|
4
|
+
export const Route = createFileRoute('/sitemap.xml')({
|
|
5
|
+
server: {
|
|
6
|
+
handlers: {
|
|
7
|
+
GET: () => new Response(renderSitemap(), { headers: { 'Content-Type': 'application/xml' } })
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createFileRoute } from '@tanstack/react-router';
|
|
2
|
+
|
|
3
|
+
// Mask path for the SPA shell (see vite.config.ts). Rendering nothing keeps "/" free
|
|
4
|
+
// to be prerendered as the real index.html.
|
|
5
|
+
export const Route = createFileRoute('/spa-shell')({
|
|
6
|
+
component: () => null
|
|
7
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createFileRoute, notFound } from '@tanstack/react-router';
|
|
2
|
+
import { source } from '@/lib/source.server';
|
|
3
|
+
import { renderHome, renderPage } from '@/lib/llms.server';
|
|
4
|
+
import { decodeMarkdownUrl, slugsFromSplat } from '@/lib/shared';
|
|
5
|
+
|
|
6
|
+
const headers = { 'Content-Type': 'text/markdown' };
|
|
7
|
+
|
|
8
|
+
export const Route = createFileRoute('/{$}.md')({
|
|
9
|
+
server: {
|
|
10
|
+
handlers: {
|
|
11
|
+
GET: async ({ params }) => {
|
|
12
|
+
const slugs = decodeMarkdownUrl(slugsFromSplat(params._splat));
|
|
13
|
+
const page = source.getPage(slugs);
|
|
14
|
+
if (page) return new Response(await renderPage(page), { headers });
|
|
15
|
+
// Mirrors the generated landing page served at "/" when there is no index page.
|
|
16
|
+
if (slugs.length === 0) return new Response(renderHome(), { headers });
|
|
17
|
+
throw notFound();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
@import 'fumadocs-ui/css/neutral.css';
|
|
3
|
+
@import 'fumadocs-ui/css/preset.css';
|
|
4
|
+
@import 'fumadocs-openapi/css/preset.css';
|
|
5
|
+
/* Served with the site: a cross-origin font stylesheet would hold up first paint and hydration. */
|
|
6
|
+
@import '@fontsource-variable/geist';
|
|
7
|
+
@import '@fontsource-variable/geist-mono';
|
|
8
|
+
/* Written by the CLI from the 'portal' block of apimatic.json: the colour overrides. Imported
|
|
9
|
+
last, so what it sets outranks the theme and presets above. */
|
|
10
|
+
@import './theme.css';
|
|
11
|
+
|
|
12
|
+
/* The `font-sans` and `font-mono` classes read these, and the page defaults derive from them. */
|
|
13
|
+
@theme {
|
|
14
|
+
--font-sans: 'Geist Variable', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
|
15
|
+
'Segoe UI Symbol', 'Noto Color Emoji';
|
|
16
|
+
--font-mono: 'Geist Mono Variable', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
|
|
17
|
+
'Courier New', monospace;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@source not '../../dist';
|
|
21
|
+
|
|
22
|
+
/* Named, not detected: the project can sit in a git-ignored folder beside the source, which
|
|
23
|
+
Tailwind's detection skips, and a utility class in a page would produce no CSS. */
|
|
24
|
+
@source '../../content';
|
|
25
|
+
|
|
26
|
+
html {
|
|
27
|
+
scrollbar-gutter: stable;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
html > body[data-scroll-locked] {
|
|
31
|
+
margin-right: 0px !important;
|
|
32
|
+
--removed-body-scroll-bar-size: 0px !important;
|
|
33
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"include": ["**/*.ts", "**/*.tsx"],
|
|
3
|
+
"exclude": ["dist", "node_modules"],
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"strict": true,
|
|
6
|
+
// Vite compiles the project; tsc only ever checks it, which is what lets the config
|
|
7
|
+
// modules import each other by their `.ts` names.
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"jsx": "react-jsx",
|
|
12
|
+
"module": "ESNext",
|
|
13
|
+
"moduleResolution": "Bundler",
|
|
14
|
+
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
|
15
|
+
"types": ["vite/client"],
|
|
16
|
+
"isolatedModules": true,
|
|
17
|
+
"resolveJsonModule": true,
|
|
18
|
+
"skipLibCheck": true,
|
|
19
|
+
"target": "ES2022",
|
|
20
|
+
"allowJs": true,
|
|
21
|
+
"forceConsistentCasingInFileNames": true,
|
|
22
|
+
"paths": {
|
|
23
|
+
"@/*": ["./src/*"]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
|
|
4
|
+
import { defineConfig } from 'vite';
|
|
5
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
6
|
+
import { fumadocsMdx } from 'fumadocs-mdx/vite';
|
|
7
|
+
import { downloads } from './downloads.ts';
|
|
8
|
+
import { generatedPagesReload } from './generated-pages-reload.ts';
|
|
9
|
+
import { readBuildPaths, readPortalIdentity } from './portal-config.ts';
|
|
10
|
+
import { prerenderPages } from './prerender-pages.ts';
|
|
11
|
+
import { specReload } from './spec-reload.ts';
|
|
12
|
+
|
|
13
|
+
export default defineConfig(async () => {
|
|
14
|
+
const [paths, identity] = await Promise.all([readBuildPaths(), readPortalIdentity()]);
|
|
15
|
+
const pages = await prerenderPages(paths, identity.siteUrl);
|
|
16
|
+
const publicDir: string | false = paths.staticDir ?? false;
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
publicDir,
|
|
20
|
+
plugins: [
|
|
21
|
+
generatedPagesReload(),
|
|
22
|
+
downloads(paths.downloadsDir),
|
|
23
|
+
// `/images/logo.png` is read from the static directory, and a remote image is never fetched for its size.
|
|
24
|
+
fumadocsMdx({
|
|
25
|
+
globalOptions: {
|
|
26
|
+
mdxOptions: { remarkImageOptions: { publicDir: publicDir || undefined, external: false } }
|
|
27
|
+
}
|
|
28
|
+
}),
|
|
29
|
+
specReload(paths.specs),
|
|
30
|
+
tailwindcss(),
|
|
31
|
+
tanstackStart({
|
|
32
|
+
// Without a mask path the shell is rendered at "/" and no index.html is written;
|
|
33
|
+
// without an explicit page list only the shell is prerendered.
|
|
34
|
+
spa: { enabled: true, maskPath: '/spa-shell', prerender: { enabled: true } },
|
|
35
|
+
pages,
|
|
36
|
+
// The page list above is complete, and crawling would also follow root-relative links
|
|
37
|
+
// in the rendered pages -- a description linking to "/docs/connect" on the author's
|
|
38
|
+
// own site would fail the whole build with a 404.
|
|
39
|
+
prerender: { crawlLinks: false },
|
|
40
|
+
// Modules named *.server.* read the specification off disk; a client import ships
|
|
41
|
+
// that code to the browser, where it throws before React can hydrate and leaves every
|
|
42
|
+
// page inert. Fail the build rather than mocking the import.
|
|
43
|
+
importProtection: {
|
|
44
|
+
behavior: 'error',
|
|
45
|
+
// Added to the plugin's own rule for *.server.* files, so the library entry points
|
|
46
|
+
// that read files are refused by name wherever they are imported from.
|
|
47
|
+
client: { specifiers: ['fumadocs-openapi/server', 'fumadocs-core/search/server'] }
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
react()
|
|
51
|
+
],
|
|
52
|
+
// Only the fumadocs-mdx macro's output imports it, so Vite would find it on the first visit and reload the page.
|
|
53
|
+
optimizeDeps: { include: ['fumadocs-mdx/runtime/macro'] },
|
|
54
|
+
// The prerender pass fetches every page from a preview server on `localhost`. Where that
|
|
55
|
+
// listens on `::1` alone, a connect that stalls under load falls back to 127.0.0.1 and is
|
|
56
|
+
// refused, failing the build; binding IPv4 leaves the fetch a single address to reach.
|
|
57
|
+
preview: { host: '127.0.0.1' },
|
|
58
|
+
resolve: {
|
|
59
|
+
tsconfigPaths: true,
|
|
60
|
+
alias: [
|
|
61
|
+
{ find: 'tslib', replacement: 'tslib/tslib.es6.js' },
|
|
62
|
+
// Anchored, so `shiki/core` and the per-language modules the replacement itself
|
|
63
|
+
// imports still resolve to the real package. See `src/lib/shiki-bundle.ts`.
|
|
64
|
+
{ find: /^shiki$/, replacement: fileURLToPath(new URL('./src/lib/shiki-bundle.ts', import.meta.url)) }
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DirectoryPath } from '../../types/file/directoryPath.js';
|
|
2
|
-
import { PublishType } from '../../types/publish-api/publishing-profile-item.js';
|
|
3
|
-
import { PublishingProfile } from '../../types/publish/publishing-profile.js';
|
|
4
|
-
import { SemVersion } from '../../types/publish/version.js';
|
|
5
|
-
import { CodeGenerationVersion, Language } from '../../types/sdk/generate.js';
|
|
6
|
-
import { ActionResult } from '../action-result.js';
|
|
7
|
-
/**
|
|
8
|
-
* Callers discard the result: this runs after a publish that already succeeded, and no outcome here
|
|
9
|
-
* may change that.
|
|
10
|
-
*/
|
|
11
|
-
export declare class PluginRecordSdkAction {
|
|
12
|
-
private readonly prompts;
|
|
13
|
-
readonly execute: (buildDirectory: DirectoryPath, language: Language, publishingProfile: PublishingProfile, publishTypes: PublishType[], packageVersion: SemVersion, codegenVersion: CodeGenerationVersion, isInteractive: boolean) => Promise<ActionResult>;
|
|
14
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { PluginRecordSdkPrompts } from '../../prompts/plugin/record-sdk.js';
|
|
2
|
-
import { buildLanguageEntry } from '../../types/plugin/language-entry.js';
|
|
3
|
-
import { PluginConfigContext } from '../../types/plugin-config-context.js';
|
|
4
|
-
import { PublishType } from '../../types/publish-api/publishing-profile-item.js';
|
|
5
|
-
import { ActionResult } from '../action-result.js';
|
|
6
|
-
/**
|
|
7
|
-
* Callers discard the result: this runs after a publish that already succeeded, and no outcome here
|
|
8
|
-
* may change that.
|
|
9
|
-
*/
|
|
10
|
-
export class PluginRecordSdkAction {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.prompts = new PluginRecordSdkPrompts();
|
|
13
|
-
this.execute = async (buildDirectory, language, publishingProfile, publishTypes, packageVersion, codegenVersion, isInteractive) => {
|
|
14
|
-
// The entry has to describe what this run published, not what the profile happens to enable.
|
|
15
|
-
// A package-only run must not claim a repository it never pushed to, nor a source-only run a
|
|
16
|
-
// package that was never released.
|
|
17
|
-
const entry = buildLanguageEntry(language, publishTypes.includes(PublishType.SourceCodePublishing)
|
|
18
|
-
? publishingProfile.getGitConfigurationForLanguage(language)
|
|
19
|
-
: undefined, publishTypes.includes(PublishType.PackagePublishing)
|
|
20
|
-
? publishingProfile.getPackageConfigurationDataForLanguage(language)
|
|
21
|
-
: undefined, packageVersion, codegenVersion);
|
|
22
|
-
const pluginConfigContext = new PluginConfigContext(buildDirectory);
|
|
23
|
-
const configState = await pluginConfigContext.getPluginConfigState();
|
|
24
|
-
if (configState.state === 'unreadable') {
|
|
25
|
-
this.prompts.pluginConfigUnreadable(configState.reason);
|
|
26
|
-
return ActionResult.failed();
|
|
27
|
-
}
|
|
28
|
-
const configExisted = configState.state === 'present';
|
|
29
|
-
if (configExisted) {
|
|
30
|
-
const result = configState.assertNoCodegenVersionMismatch(codegenVersion, language, entry);
|
|
31
|
-
if (result.isErr()) {
|
|
32
|
-
this.prompts.codegenVersionMismatch(language, result.error.actual, result.error.expected);
|
|
33
|
-
if (isInteractive && !(await this.prompts.confirmCodegenVersionOverwrite())) {
|
|
34
|
-
return ActionResult.cancelled();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
if (!entry.source && (!configExisted || configState.hasNoSourceRepository(language))) {
|
|
39
|
-
this.prompts.noSourceRepository(language);
|
|
40
|
-
}
|
|
41
|
-
const writeResult = await pluginConfigContext.upsertLanguage(language, entry);
|
|
42
|
-
if (writeResult.isErr()) {
|
|
43
|
-
switch (writeResult.error) {
|
|
44
|
-
// Readable a moment ago, so this only happens if the file changed underneath us.
|
|
45
|
-
case 'unreadable':
|
|
46
|
-
this.prompts.pluginConfigUnreadable();
|
|
47
|
-
return ActionResult.failed();
|
|
48
|
-
case 'unwritable':
|
|
49
|
-
this.prompts.pluginConfigNotWritten();
|
|
50
|
-
return ActionResult.failed();
|
|
51
|
-
default:
|
|
52
|
-
throw writeResult.error;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
this.prompts.sdkRecorded(language, configExisted);
|
|
56
|
-
return ActionResult.success();
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=record-sdk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":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EAAE,CAAC;oBAC/B;wBACE,MAAM,WAAW,CAAC,KAAqB,CAAC;gBAC5C,CAAC;YACH,CAAC;YAED,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;YAClD,OAAO,YAAY,CAAC,OAAO,EAAE,CAAC;QAChC,CAAC,CAAC;IACJ,CAAC;CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
2
|
-
import { ActionResult } from "../action-result.js";
|
|
3
|
-
import { CommandMetadata } from "../../types/common/command-metadata.js";
|
|
4
|
-
export declare const DEFAULT_COPILOT_WELCOME_MESSAGE: string;
|
|
5
|
-
export declare class CopilotAction {
|
|
6
|
-
private readonly apiService;
|
|
7
|
-
private readonly fileService;
|
|
8
|
-
private readonly launcherService;
|
|
9
|
-
private readonly prompts;
|
|
10
|
-
private readonly configDir;
|
|
11
|
-
private readonly commandMetadata;
|
|
12
|
-
private readonly authKey;
|
|
13
|
-
constructor(configDir: DirectoryPath, commandMetadata: CommandMetadata, authKey?: string | null);
|
|
14
|
-
readonly execute: (buildDirectory: DirectoryPath, force: boolean, enable: boolean) => Promise<ActionResult>;
|
|
15
|
-
private selectCopilotKey;
|
|
16
|
-
private prepareWelcomeMessage;
|
|
17
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { ApiService } from "../../infrastructure/services/api-service.js";
|
|
2
|
-
import { PortalCopilotPrompts } from "../../prompts/portal/copilot.js";
|
|
3
|
-
import { ActionResult } from "../action-result.js";
|
|
4
|
-
import { BuildContext } from "../../types/build-context.js";
|
|
5
|
-
import { withDirPath } from "../../infrastructure/tmp-extensions.js";
|
|
6
|
-
import { FilePath } from "../../types/file/filePath.js";
|
|
7
|
-
import { FileName } from "../../types/file/fileName.js";
|
|
8
|
-
import { FileService } from "../../infrastructure/file-service.js";
|
|
9
|
-
import { LauncherService } from "../../infrastructure/launcher-service.js";
|
|
10
|
-
import { err, ok } from "neverthrow";
|
|
11
|
-
export const DEFAULT_COPILOT_WELCOME_MESSAGE = "Hi there! I'm your API Integration Assistant, here to help you learn and integrate with this API.\n" +
|
|
12
|
-
"\n" +
|
|
13
|
-
"Ask me anything about this API or try one of these example prompts:\n" +
|
|
14
|
-
"\n" +
|
|
15
|
-
"- `What authentication methods does this API support?`\n" +
|
|
16
|
-
"- `What is this API about?`\n";
|
|
17
|
-
export class CopilotAction {
|
|
18
|
-
constructor(configDir, commandMetadata, authKey = null) {
|
|
19
|
-
this.apiService = new ApiService();
|
|
20
|
-
this.fileService = new FileService();
|
|
21
|
-
this.launcherService = new LauncherService();
|
|
22
|
-
this.prompts = new PortalCopilotPrompts();
|
|
23
|
-
this.execute = async (buildDirectory, force, enable) => {
|
|
24
|
-
const buildContext = new BuildContext(buildDirectory);
|
|
25
|
-
if (!(await buildContext.validate())) {
|
|
26
|
-
this.prompts.srcDirectoryEmpty(buildDirectory);
|
|
27
|
-
return ActionResult.failed();
|
|
28
|
-
}
|
|
29
|
-
const buildConfig = await buildContext.getBuildFileContents();
|
|
30
|
-
if (!force && buildConfig.hasApiCopilot() && !(await this.prompts.confirmOverwrite())) {
|
|
31
|
-
this.prompts.cancelled();
|
|
32
|
-
return ActionResult.cancelled();
|
|
33
|
-
}
|
|
34
|
-
const response = await this.prompts.spinnerAccountInfo(this.apiService.getAccountInfo(this.configDir, this.commandMetadata.shell, this.authKey));
|
|
35
|
-
if (response.isErr()) {
|
|
36
|
-
this.prompts.serviceError(response.error);
|
|
37
|
-
return ActionResult.failed();
|
|
38
|
-
}
|
|
39
|
-
const apiCopilotKeyResult = await this.selectCopilotKey(response.value, force);
|
|
40
|
-
if (apiCopilotKeyResult.isErr()) {
|
|
41
|
-
if (apiCopilotKeyResult.error === "cancelled")
|
|
42
|
-
return ActionResult.cancelled();
|
|
43
|
-
return ActionResult.failed();
|
|
44
|
-
}
|
|
45
|
-
const welcomeMessage = await this.prepareWelcomeMessage();
|
|
46
|
-
const updatedBuildConfig = buildConfig.withApiCopilotConfig({
|
|
47
|
-
isEnabled: enable,
|
|
48
|
-
key: apiCopilotKeyResult.value,
|
|
49
|
-
welcomeMessage: welcomeMessage
|
|
50
|
-
});
|
|
51
|
-
await buildContext.updateBuildFileContents(updatedBuildConfig);
|
|
52
|
-
this.prompts.copilotConfigured(enable, apiCopilotKeyResult.value);
|
|
53
|
-
return ActionResult.success();
|
|
54
|
-
};
|
|
55
|
-
this.configDir = configDir;
|
|
56
|
-
this.commandMetadata = commandMetadata;
|
|
57
|
-
this.authKey = authKey;
|
|
58
|
-
}
|
|
59
|
-
async selectCopilotKey(subscription, force) {
|
|
60
|
-
if (subscription.ApiCopilotKeys === undefined || subscription.ApiCopilotKeys.length === 0) {
|
|
61
|
-
this.prompts.noCopilotKeyFound();
|
|
62
|
-
return err("failed");
|
|
63
|
-
}
|
|
64
|
-
if (subscription.ApiCopilotKeys.length === 1) {
|
|
65
|
-
if (force || (await this.prompts.confirmSingleKeyUsage(subscription.ApiCopilotKeys[0])))
|
|
66
|
-
return ok(subscription.ApiCopilotKeys[0]);
|
|
67
|
-
this.prompts.noCopilotKeySelected();
|
|
68
|
-
return err("cancelled");
|
|
69
|
-
}
|
|
70
|
-
const key = await this.prompts.selectCopilotKey(subscription.ApiCopilotKeys);
|
|
71
|
-
if (key === null) {
|
|
72
|
-
this.prompts.noCopilotKeySelected();
|
|
73
|
-
return err("cancelled");
|
|
74
|
-
}
|
|
75
|
-
await this.prompts.displayApiCopilotKeyUsageWarning();
|
|
76
|
-
return ok(key);
|
|
77
|
-
}
|
|
78
|
-
async prepareWelcomeMessage() {
|
|
79
|
-
return await withDirPath(async (tempDir) => {
|
|
80
|
-
const tempFile = new FilePath(tempDir, new FileName("welcome-message.md"));
|
|
81
|
-
await this.fileService.writeContents(tempFile, DEFAULT_COPILOT_WELCOME_MESSAGE);
|
|
82
|
-
this.prompts.openWelcomeMessageEditor();
|
|
83
|
-
await this.launcherService.openInEditor(tempFile);
|
|
84
|
-
const welcomeMessage = await this.fileService.getContents(tempFile);
|
|
85
|
-
return welcomeMessage.replace(/\r\n|\r/g, "\n");
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=copilot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copilot.js","sourceRoot":"","sources":["../../../src/actions/portal/copilot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,EAAE,GAAG,EAAE,EAAE,EAAU,MAAM,YAAY,CAAC;AAK7C,MAAM,CAAC,MAAM,+BAA+B,GAC1C,qGAAqG;IACrG,IAAI;IACJ,uEAAuE;IACvE,IAAI;IACJ,0DAA0D;IAC1D,+BAA+B,CAAE;AAEnC,MAAM,OAAO,aAAa;IASxB,YAAY,SAAwB,EAAE,eAAgC,EAAE,UAAyB,IAAI;QARpF,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;QAC9B,gBAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAChC,oBAAe,GAAG,IAAI,eAAe,EAAE,CAAC;QACxC,YAAO,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAWtC,YAAO,GAAG,KAAK,EAC7B,cAA6B,EAC7B,KAAc,EACd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AAC;QAED,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;QAC7E,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YACjB,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;YACpC,OAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QAC1B,CAAC;QACD,MAAM,IAAI,CAAC,OAAO,CAAC,gCAAgC,EAAE,CAAC;QACtD,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;IAEO,KAAK,CAAC,qBAAqB;QACjC,OAAO,MAAM,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YACzC,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,EAAE,IAAI,QAAQ,CAAC,oBAAoB,CAAC,CAAC,CAAC;YAC3E,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,EAAE,+BAA+B,CAAC,CAAC;YAChF,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,CAAC;YACxC,MAAM,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;YAClD,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YACpE,OAAO,cAAc,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DirectoryPath } from '../../types/file/directoryPath.js';
|
|
2
|
-
import { ActionResult } from '../action-result.js';
|
|
3
|
-
import { CommandMetadata } from '../../types/common/command-metadata.js';
|
|
4
|
-
export declare class PortalQuickstartAction {
|
|
5
|
-
private readonly prompts;
|
|
6
|
-
private readonly zipService;
|
|
7
|
-
private readonly fileService;
|
|
8
|
-
private readonly configDir;
|
|
9
|
-
private readonly commandMetadata;
|
|
10
|
-
private readonly fileDownloadService;
|
|
11
|
-
private readonly apiService;
|
|
12
|
-
private readonly buildFileUrl;
|
|
13
|
-
private readonly defaultSpecUrl;
|
|
14
|
-
private readonly repositoryFolderName;
|
|
15
|
-
private readonly validationService;
|
|
16
|
-
constructor(configDir: DirectoryPath, commandMetadata: CommandMetadata);
|
|
17
|
-
readonly execute: () => Promise<ActionResult>;
|
|
18
|
-
}
|