@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,344 @@
|
|
|
1
|
+
import { getSlugs } from 'fumadocs-core/source/plugins/slugs';
|
|
2
|
+
import { err, ok } from 'neverthrow';
|
|
3
|
+
import { Directory } from '../file/directory.js';
|
|
4
|
+
import { FileName } from '../file/fileName.js';
|
|
5
|
+
import { FilePath } from '../file/filePath.js';
|
|
6
|
+
import { GENERATED_SECTIONS } from './generated-pages.js';
|
|
7
|
+
import { API_REFERENCE_NAME, GROUP_FOLDER, INDEX_NAME, NAVIGATION_FILE_NAME, PortalNavigation } from './portal-navigation.js';
|
|
8
|
+
import { sharedTabNames, untitledTabName } from './portal-tabs.js';
|
|
9
|
+
const NAVIGATION_FILE = new FileName(NAVIGATION_FILE_NAME);
|
|
10
|
+
/** Extensions the docs collection compiles, and so the ones an entry can address. */
|
|
11
|
+
const PAGE_EXTENSIONS = ['.md', '.mdx'];
|
|
12
|
+
/** Passed over by Vite's `import.meta.glob`, which the build reads the content through. */
|
|
13
|
+
export const isSkippedByGlob = (name) => name.startsWith('.') || name === 'node_modules';
|
|
14
|
+
/** Whether the glob passes over `file` below `root`, which it does for a path with any such segment. */
|
|
15
|
+
export const isSkippedWithin = (file, root) => file.relativeTo(root).split('/').some(isSkippedByGlob);
|
|
16
|
+
/**
|
|
17
|
+
* The `content/` directory of a portal source, held to the rules the build reads it by. It reads
|
|
18
|
+
* nothing itself: `pages` and `navigationFiles` name what `check` needs to be handed.
|
|
19
|
+
*/
|
|
20
|
+
export class ContentTree {
|
|
21
|
+
tree;
|
|
22
|
+
sourceDirectory;
|
|
23
|
+
constructor(tree,
|
|
24
|
+
/** What each file is named relative to, in the messages. */
|
|
25
|
+
sourceDirectory) {
|
|
26
|
+
this.tree = tree;
|
|
27
|
+
this.sourceDirectory = sourceDirectory;
|
|
28
|
+
}
|
|
29
|
+
/** The pages the build compiles. */
|
|
30
|
+
pages() {
|
|
31
|
+
return this.contentPages().map(({ file }) => file);
|
|
32
|
+
}
|
|
33
|
+
/** The `nav.json` files the build reads, which its glob matches by code point. */
|
|
34
|
+
navigationFiles() {
|
|
35
|
+
return this.tree
|
|
36
|
+
.getAllFiles()
|
|
37
|
+
.filter((file) => file.name().compare(NAVIGATION_FILE) === 0 && !this.isSkipped(file));
|
|
38
|
+
}
|
|
39
|
+
/** Whether the build would read `file` as part of `content/`: below it, and not passed over. */
|
|
40
|
+
holds(file) {
|
|
41
|
+
return this.tree.directoryPath.contains(file.directory()) && !this.isSkipped(file);
|
|
42
|
+
}
|
|
43
|
+
/** Every problem a build would refuse the tree for, or what it would warn of, from what it is handed. */
|
|
44
|
+
check(read, specs, generatedPages) {
|
|
45
|
+
const pages = this.contentPages();
|
|
46
|
+
const addressProblems = ContentTree.addressProblems(pages);
|
|
47
|
+
// The build fails as a whole over one page whose front matter it refuses, or one image it cannot import.
|
|
48
|
+
const { titled, errors: frontMatterErrors } = this.titledPages(read.pages);
|
|
49
|
+
const problems = [];
|
|
50
|
+
if (frontMatterErrors.length > 0) {
|
|
51
|
+
problems.push({ kind: 'invalidFrontMatter', errors: frontMatterErrors });
|
|
52
|
+
}
|
|
53
|
+
if (read.missingImages.length > 0) {
|
|
54
|
+
problems.push({ kind: 'missingImages', images: read.missingImages });
|
|
55
|
+
}
|
|
56
|
+
// The walk takes each page to be served where it sits, so it would misjudge an entry naming one of these.
|
|
57
|
+
if (addressProblems.length > 0) {
|
|
58
|
+
return err([...addressProblems, ...problems]);
|
|
59
|
+
}
|
|
60
|
+
// Validated here rather than in the template: Fumadocs drops an entry it cannot resolve
|
|
61
|
+
// without a word, so a typo would otherwise reach the user as a quietly wrong sidebar.
|
|
62
|
+
const navigation = this.navigation(read.navigationFiles, specs);
|
|
63
|
+
if (navigation.root.errors.length > 0) {
|
|
64
|
+
problems.push({ kind: 'invalidNavigation', errors: navigation.root.errors });
|
|
65
|
+
}
|
|
66
|
+
if (problems.length > 0) {
|
|
67
|
+
return err(problems);
|
|
68
|
+
}
|
|
69
|
+
const tabs = ContentTree.tabs(navigation.root, titled, generatedPages);
|
|
70
|
+
return ok({
|
|
71
|
+
hiddenPages: ContentTree.hiddenPages(pages, specs),
|
|
72
|
+
ignoredNavigationFiles: navigation.ignoredFiles,
|
|
73
|
+
folderTabs: tabs.flatMap(({ owner }) => (owner.kind === 'folder' ? [owner.directory] : [])),
|
|
74
|
+
sharedTabNames: sharedTabNames(tabs)
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
contentPages() {
|
|
78
|
+
return this.tree
|
|
79
|
+
.getAllFiles()
|
|
80
|
+
.filter((file) => pageName(file.name()) !== undefined && !this.isSkipped(file))
|
|
81
|
+
.map((file) => ({ file, segments: file.relativeTo(this.tree.directoryPath).split('/') }));
|
|
82
|
+
}
|
|
83
|
+
isSkipped(file) {
|
|
84
|
+
return isSkippedWithin(file, this.tree.directoryPath);
|
|
85
|
+
}
|
|
86
|
+
/** Every page the build accepts with its title, and what it would refuse in the front matter of the rest. */
|
|
87
|
+
titledPages(pages) {
|
|
88
|
+
const read = pages.map(({ file, parsed }) => {
|
|
89
|
+
const frontMatter = parsed?.frontMatter ?? err([`${file.relativeTo(this.sourceDirectory)} could not be read.`]);
|
|
90
|
+
return frontMatter.map(({ title }) => ({ file, title }));
|
|
91
|
+
});
|
|
92
|
+
return {
|
|
93
|
+
titled: read.flatMap((page) => (page.isOk() ? [page.value] : [])),
|
|
94
|
+
errors: read.flatMap((page) => (page.isErr() ? page.error : []))
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Every `nav.json` in the tree, validated against the directory it orders, plus any `nav.json`
|
|
99
|
+
* in a case the build does not match. One walk, because both come from the same tree, and a
|
|
100
|
+
* directory has to be seen before its file can be checked against it.
|
|
101
|
+
*/
|
|
102
|
+
navigation(navigationFiles, specs) {
|
|
103
|
+
const walk = new NavigationWalk(navigationFiles, specs, this.sourceDirectory);
|
|
104
|
+
return { root: walk.visit(this.tree, true, false), ignoredFiles: walk.ignoredFiles };
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Every tab, named as the template names it, in the order a report lists them: Home, the
|
|
108
|
+
* folders the root `nav.json` lists, the generated sections, then the API reference.
|
|
109
|
+
*/
|
|
110
|
+
static tabs(root, pages, generatedPages) {
|
|
111
|
+
const named = (owner, scan) => ContentTree.namedTab(owner, scan?.navigation, scan?.indexPage, pages);
|
|
112
|
+
// The home page is the content root's index page, which names no tab.
|
|
113
|
+
const home = ContentTree.namedTab({ kind: 'home' }, root.navigation, undefined, pages);
|
|
114
|
+
const folders = (root.navigation?.settings.pages ?? []).flatMap((entry) => {
|
|
115
|
+
const subfolder = entry === API_REFERENCE_NAME ? undefined : root.subfolders.get(entry);
|
|
116
|
+
return subfolder === undefined ? [] : [named({ kind: 'folder', directory: subfolder.directory }, subfolder.scan)];
|
|
117
|
+
});
|
|
118
|
+
const generated = generatedPages.sections().map((section) => named({ kind: 'generated', section }, undefined));
|
|
119
|
+
const reference = named({ kind: 'apiReference' }, root.subfolders.get(API_REFERENCE_NAME)?.scan);
|
|
120
|
+
return [home, ...folders, ...generated, reference];
|
|
121
|
+
}
|
|
122
|
+
/** A tab by the name the template gives it: its `nav.json` title, else its index page's. */
|
|
123
|
+
static namedTab(owner, navigation, indexPage, pages) {
|
|
124
|
+
if (navigation?.settings.title !== undefined) {
|
|
125
|
+
return { owner, name: navigation.settings.title, namedBy: navigation.file };
|
|
126
|
+
}
|
|
127
|
+
const index = indexPage === undefined ? undefined : pages.find((page) => page.file.isEqual(indexPage));
|
|
128
|
+
if (index !== undefined) {
|
|
129
|
+
return { owner, name: index.title, namedBy: index.file };
|
|
130
|
+
}
|
|
131
|
+
return { owner, name: untitledTabName(owner), namedBy: null };
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Pages the build cannot serve where they are, each refused for one reason: a page with no
|
|
135
|
+
* address is not judged by one, and one at an address kept for the generated pages is not
|
|
136
|
+
* said to share it as well.
|
|
137
|
+
*/
|
|
138
|
+
static addressProblems(pages) {
|
|
139
|
+
const problems = [];
|
|
140
|
+
// Fumadocs throws on one: a `(group)` name is left out of every address, so it has none.
|
|
141
|
+
const groupNamed = pages.filter(({ file }) => GROUP_FOLDER.test(pageName(file.name()) ?? ''));
|
|
142
|
+
if (groupNamed.length > 0) {
|
|
143
|
+
problems.push({ kind: 'groupNamedPages', pages: groupNamed.map(({ file }) => file) });
|
|
144
|
+
}
|
|
145
|
+
const addressed = pages.filter((page) => !groupNamed.includes(page));
|
|
146
|
+
// In the build, the user's page and the generated one would compete for the address.
|
|
147
|
+
const reserved = ContentTree.reservedAddressPages(addressed);
|
|
148
|
+
if (reserved.length > 0) {
|
|
149
|
+
problems.push({ kind: 'reservedAddresses', pages: reserved });
|
|
150
|
+
}
|
|
151
|
+
// The build fails on two pages at one address, or moves an index page to `<folder>/index`.
|
|
152
|
+
const shared = ContentTree.sharedAddresses(addressed.filter(({ file }) => !reserved.some((page) => page.file.isEqual(file))));
|
|
153
|
+
if (shared.length > 0) {
|
|
154
|
+
problems.push({ kind: 'sharedAddresses', addresses: shared });
|
|
155
|
+
}
|
|
156
|
+
return problems;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Pages served at a generated section's address or below it, whether or not `apimatic.json`
|
|
160
|
+
* calls for the section. Judged by the address, as the content source computes it, rather
|
|
161
|
+
* than by the directories as written: a page in a `(group)` folder is served as if the folder
|
|
162
|
+
* were not there, and a folder's index page at the folder's own address.
|
|
163
|
+
*/
|
|
164
|
+
static reservedAddressPages(pages) {
|
|
165
|
+
return pages.flatMap(({ file, segments }) => {
|
|
166
|
+
const slugs = getSlugs(segments.join('/'));
|
|
167
|
+
const section = GENERATED_SECTIONS.find((candidate) => candidate.folder === slugs[0]);
|
|
168
|
+
return section === undefined ? [] : [{ file, address: `/${slugs.join('/')}`, section }];
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/** Addresses more than one page would be served at, each with its pages in the order walked. */
|
|
172
|
+
static sharedAddresses(pages) {
|
|
173
|
+
const byAddress = new Map();
|
|
174
|
+
for (const { file, segments } of pages) {
|
|
175
|
+
const address = `/${getSlugs(segments.join('/')).join('/')}`;
|
|
176
|
+
byAddress.set(address, [...(byAddress.get(address) ?? []), file]);
|
|
177
|
+
}
|
|
178
|
+
return [...byAddress]
|
|
179
|
+
.filter(([, files]) => files.length > 1)
|
|
180
|
+
.map(([address, files]) => ({ address, pages: files }));
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Pages inside a specification's section, below `content/api/<slug>/`. The section and each
|
|
184
|
+
* tag folder come with generated metadata that lists only the reference pages, and metadata
|
|
185
|
+
* hides whatever it does not name, so these pages never reach the sidebar. Reported rather
|
|
186
|
+
* than refused: the build still succeeds, and the fix is to move the page.
|
|
187
|
+
*
|
|
188
|
+
* Judged by the directories as written, not by the address: the page tree is keyed on the
|
|
189
|
+
* path, so `content/API/<slug>/` or a `(group)` folder on the way is a different folder that
|
|
190
|
+
* no metadata hides. An `index` page is a folder's own link rather than one of its pages, so
|
|
191
|
+
* the section's is shown, and so is one in a folder directly below it: that is where the tag
|
|
192
|
+
* folders sit, and the CLI cannot tell a tag folder from one the user made without reading
|
|
193
|
+
* the specification's tags, so it stays quiet rather than warn about a page that is shown.
|
|
194
|
+
*/
|
|
195
|
+
static hiddenPages(pages, specs) {
|
|
196
|
+
const slugs = new Set(specs.map((spec) => spec.slug));
|
|
197
|
+
return pages
|
|
198
|
+
.filter(({ segments }) => {
|
|
199
|
+
const [first, second, ...rest] = segments;
|
|
200
|
+
const last = rest.at(-1);
|
|
201
|
+
if (first !== API_REFERENCE_NAME || !slugs.has(second) || last === undefined) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
const isFolderIndex = rest.length <= 2 && pageName(new FileName(last)) === INDEX_NAME;
|
|
205
|
+
return !isFolderIndex;
|
|
206
|
+
})
|
|
207
|
+
.map(({ file }) => file);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* The name an entry addresses a page by, which is its file's without the extension, or undefined
|
|
212
|
+
* when the file is not a page. By code point, like the docs glob: `Guide.MD` is no page to either.
|
|
213
|
+
*/
|
|
214
|
+
function pageName(fileName) {
|
|
215
|
+
return PAGE_EXTENSIONS.some((extension) => fileName.hasExactExtension(extension))
|
|
216
|
+
? `${fileName.withoutExtension()}`
|
|
217
|
+
: undefined;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* The walk of `ContentTree.navigation`. Children first, because a directory counts as one of its
|
|
221
|
+
* parent's children only when a page sits somewhere beneath it, and each directory's errors go
|
|
222
|
+
* ahead of its children's, so the report still reads top down.
|
|
223
|
+
*/
|
|
224
|
+
class NavigationWalk {
|
|
225
|
+
navigationFiles;
|
|
226
|
+
specs;
|
|
227
|
+
sourceDirectory;
|
|
228
|
+
ignoredFiles = [];
|
|
229
|
+
constructor(navigationFiles, specs, sourceDirectory) {
|
|
230
|
+
this.navigationFiles = navigationFiles;
|
|
231
|
+
this.specs = specs;
|
|
232
|
+
this.sourceDirectory = sourceDirectory;
|
|
233
|
+
}
|
|
234
|
+
visit(directory, isContentRoot, isApiDirectory) {
|
|
235
|
+
const listing = NavigationWalk.listing(directory);
|
|
236
|
+
this.ignoredFiles.push(...listing.ignoredFiles);
|
|
237
|
+
const entries = listing.entries.map((entry) => 'folder' in entry ? this.walk(entry.folder, isContentRoot) : entry);
|
|
238
|
+
const folders = entries.flatMap((entry) => ('scan' in entry ? [entry] : []));
|
|
239
|
+
const pages = entries.flatMap((entry) => ('page' in entry ? [entry] : []));
|
|
240
|
+
const holdsPage = pages.length > 0 || folders.some(({ scan }) => scan.holdsPage);
|
|
241
|
+
const indexPage = pages.find(({ page }) => page === INDEX_NAME)?.file;
|
|
242
|
+
const servingThisAddress = folders
|
|
243
|
+
.filter(({ name, scan }) => scan.servesOwnAddress && GROUP_FOLDER.test(name))
|
|
244
|
+
.map(({ name }) => name);
|
|
245
|
+
// A directory with no page anywhere beneath it becomes no node in the page tree, so naming it
|
|
246
|
+
// would resolve to nothing. Fumadocs would build one for a directory that holds only a
|
|
247
|
+
// `nav.json`, but the template drops it again to keep to this rule.
|
|
248
|
+
const childNames = entries.flatMap((entry) => {
|
|
249
|
+
if ('page' in entry) {
|
|
250
|
+
return [entry.page];
|
|
251
|
+
}
|
|
252
|
+
return entry.scan.holdsPage && !entry.isApiChild ? [entry.name] : [];
|
|
253
|
+
});
|
|
254
|
+
const { errors, navigation } = this.checkedNavigation(listing.navigationFile, {
|
|
255
|
+
isContentRoot,
|
|
256
|
+
isApiDirectory,
|
|
257
|
+
// The reference's own directory is a folder in the sidebar however few pages the user
|
|
258
|
+
// keeps in it, because the specification sections are mounted there.
|
|
259
|
+
becomesFolder: holdsPage || isApiDirectory,
|
|
260
|
+
childNames: this.withMountedChildren(childNames, pages, isContentRoot, isApiDirectory),
|
|
261
|
+
emptyFolders: folders.filter(({ scan, isApiChild }) => !scan.holdsPage && !isApiChild).map(({ name }) => name),
|
|
262
|
+
// At the content root, the address such a folder serves is the home page's.
|
|
263
|
+
homePageFolders: isContentRoot ? servingThisAddress : []
|
|
264
|
+
});
|
|
265
|
+
return {
|
|
266
|
+
holdsPage,
|
|
267
|
+
servesOwnAddress: indexPage !== undefined || servingThisAddress.length > 0,
|
|
268
|
+
navigation,
|
|
269
|
+
indexPage,
|
|
270
|
+
subfolders: new Map(folders
|
|
271
|
+
.filter(({ scan, isApiChild }) => scan.holdsPage || isApiChild)
|
|
272
|
+
.map((folder) => [folder.name, { directory: folder.directory, scan: folder.scan }])),
|
|
273
|
+
errors: [...errors, ...folders.flatMap(({ scan }) => scan.errors)]
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
walk(folder, parentIsContentRoot) {
|
|
277
|
+
const name = folder.directoryPath.leafName();
|
|
278
|
+
const isApiChild = parentIsContentRoot && name === API_REFERENCE_NAME;
|
|
279
|
+
return { name, directory: folder.directoryPath, isApiChild, scan: this.visit(folder, false, isApiChild) };
|
|
280
|
+
}
|
|
281
|
+
/** The children an entry can name that no directory of the user's holds: the reference's. */
|
|
282
|
+
withMountedChildren(childNames, pages, isContentRoot, isApiDirectory) {
|
|
283
|
+
// The reference is mounted at `content/api` whether or not a directory is there to see, so it
|
|
284
|
+
// is a child of the content root in every portal, and one entry gets one answer whatever else
|
|
285
|
+
// shares the directory. A page of that name is a second child, and the clash is what says it
|
|
286
|
+
// can never be positioned.
|
|
287
|
+
if (isContentRoot) {
|
|
288
|
+
return [...childNames, API_REFERENCE_NAME];
|
|
289
|
+
}
|
|
290
|
+
if (!isApiDirectory) {
|
|
291
|
+
return childNames;
|
|
292
|
+
}
|
|
293
|
+
// The reference pages are mounted here, one folder per specification. A directory of the same
|
|
294
|
+
// name is that very folder, so it is not listed twice; a page of the same name is a second
|
|
295
|
+
// child, and listed again so the validator sees the clash.
|
|
296
|
+
const names = [...childNames];
|
|
297
|
+
for (const { slug } of this.specs) {
|
|
298
|
+
if (!names.includes(slug) || pages.some(({ page }) => page === slug)) {
|
|
299
|
+
names.push(slug);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return names;
|
|
303
|
+
}
|
|
304
|
+
checkedNavigation(file, context) {
|
|
305
|
+
if (file === undefined) {
|
|
306
|
+
return { errors: [], navigation: undefined };
|
|
307
|
+
}
|
|
308
|
+
const label = file.relativeTo(this.sourceDirectory);
|
|
309
|
+
// An empty file goes through too: the build parses it as JSON and fails on it.
|
|
310
|
+
const contents = this.navigationFiles.find((read) => read.file.isEqual(file))?.contents;
|
|
311
|
+
if (contents === undefined) {
|
|
312
|
+
return { errors: [`${label} could not be read.`], navigation: undefined };
|
|
313
|
+
}
|
|
314
|
+
const checked = PortalNavigation.validate(contents, { label, ...context });
|
|
315
|
+
return checked.isErr()
|
|
316
|
+
? { errors: checked.error, navigation: undefined }
|
|
317
|
+
: { errors: [], navigation: { file, settings: checked.value } };
|
|
318
|
+
}
|
|
319
|
+
static listing(directory) {
|
|
320
|
+
const listing = { entries: [], navigationFile: undefined, ignoredFiles: [] };
|
|
321
|
+
for (const item of directory.items) {
|
|
322
|
+
if (item instanceof Directory) {
|
|
323
|
+
if (!isSkippedByGlob(item.directoryPath.leafName())) {
|
|
324
|
+
listing.entries.push({ folder: item });
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
else if (!isSkippedByGlob(item.fileName.toString())) {
|
|
328
|
+
const file = new FilePath(directory.directoryPath, item.fileName);
|
|
329
|
+
const page = pageName(item.fileName);
|
|
330
|
+
if (item.fileName.compare(NAVIGATION_FILE) === 0) {
|
|
331
|
+
listing.navigationFile = file;
|
|
332
|
+
}
|
|
333
|
+
else if (item.fileName.is(NAVIGATION_FILE_NAME)) {
|
|
334
|
+
listing.ignoredFiles.push(file);
|
|
335
|
+
}
|
|
336
|
+
else if (page !== undefined) {
|
|
337
|
+
listing.entries.push({ page, file });
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return listing;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=content-tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-tree.js","sourceRoot":"","sources":["../../../src/types/portal/content-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAE,EAAE,EA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,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAClC,CAAC;qBAAM,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;oBAC9B,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;gBACvC,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoint.js","sourceRoot":"","sources":["../../../src/types/portal/endpoint.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAQ;IAGyB,IAAI;IAFhC,MAAM,CAAS;IAE/B,YAAY,MAAc,EAAkB,IAAY;oBAAZ,IAAI;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACrC,CAAC;IAEM,QAAQ;QACb,OAAO,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { FileName } from '../file/fileName.js';
|
|
2
|
+
import { UrlPath } from '../file/urlPath.js';
|
|
3
|
+
import { Language } from '../sdk/generate.js';
|
|
4
|
+
import { PageValues } from './page-template.js';
|
|
5
|
+
import { PortalArtifacts } from './portal-artifacts.js';
|
|
6
|
+
import { PortalLanguages } from './portal-languages.js';
|
|
7
|
+
export declare const GENERATED_DIRECTORY_NAME = "generated";
|
|
8
|
+
/** A set of pages the CLI writes into the portal, which the portal shows as a tab of its own. */
|
|
9
|
+
export interface GeneratedSection {
|
|
10
|
+
/** The folder the pages are written to, and so the address they are served at. */
|
|
11
|
+
folder: string;
|
|
12
|
+
/** The root `nav.json` entry that positions the tab. */
|
|
13
|
+
token: string;
|
|
14
|
+
title: string;
|
|
15
|
+
/** What a message says the address is kept for. */
|
|
16
|
+
description: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const SDK_SECTION: GeneratedSection;
|
|
19
|
+
export declare const PLUGIN_SECTION: GeneratedSection;
|
|
20
|
+
/** Every section, in the order the tabs take when the root `nav.json` names none of them. */
|
|
21
|
+
export declare const GENERATED_SECTIONS: readonly GeneratedSection[];
|
|
22
|
+
/** The templates in the package's `portal-pages/` directory, by the name of their file. */
|
|
23
|
+
export declare const PAGE_TEMPLATES: readonly ['sdks', 'sdk', 'context-plugin'];
|
|
24
|
+
export type PageTemplateName = (typeof PAGE_TEMPLATES)[number];
|
|
25
|
+
/** A page to render from one of the templates and write into a section's folder. */
|
|
26
|
+
export interface GeneratedPage {
|
|
27
|
+
section: GeneratedSection;
|
|
28
|
+
fileName: FileName;
|
|
29
|
+
template: PageTemplateName;
|
|
30
|
+
data: PageValues;
|
|
31
|
+
}
|
|
32
|
+
/** A hosted plugin is installed from `portal.pluginUrl`, and the portal artifacts carry none. */
|
|
33
|
+
export type PluginSource = {
|
|
34
|
+
kind: 'bundled';
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'hosted';
|
|
37
|
+
url: UrlPath;
|
|
38
|
+
};
|
|
39
|
+
/** What the pages link to or include that the portal artifacts did not deliver. */
|
|
40
|
+
export interface MissingArtifacts {
|
|
41
|
+
sdks: Language[];
|
|
42
|
+
sdkDocs: Language[];
|
|
43
|
+
/** Whether the plugin the page installs from the portal is not among them. */
|
|
44
|
+
plugin: boolean;
|
|
45
|
+
}
|
|
46
|
+
/** A section's `nav.json`, which names its tab and orders its pages. */
|
|
47
|
+
export interface GeneratedNavigation {
|
|
48
|
+
section: GeneratedSection;
|
|
49
|
+
contents: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The pages `apimatic.json` calls for: the SDKs page and one page per language, in the order
|
|
53
|
+
* the `languages` block lists them, and the context plugin page when there is a plugin to install.
|
|
54
|
+
*/
|
|
55
|
+
export declare class GeneratedPages {
|
|
56
|
+
private readonly sdks;
|
|
57
|
+
private readonly plugin;
|
|
58
|
+
private constructor();
|
|
59
|
+
static of(languages: PortalLanguages, plugin: PluginSource | null): GeneratedPages;
|
|
60
|
+
sections(): GeneratedSection[];
|
|
61
|
+
/** Whatever pages the tabs hold, which the languages decide. */
|
|
62
|
+
makesSameTabsAs(other: GeneratedPages): boolean;
|
|
63
|
+
pages(): GeneratedPage[];
|
|
64
|
+
navigationFiles(): GeneratedNavigation[];
|
|
65
|
+
/** Null when the artifacts back every page; a page backed by nothing fails the build or links nowhere. */
|
|
66
|
+
missingFrom(artifacts: PortalArtifacts): MissingArtifacts | null;
|
|
67
|
+
private pluginPage;
|
|
68
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { posix } from 'node:path';
|
|
2
|
+
import { FileName } from '../file/fileName.js';
|
|
3
|
+
import { LANGUAGE_NAMES } from '../sdk/generate.js';
|
|
4
|
+
import { sdkDocsPath } from './page-fragments.js';
|
|
5
|
+
import { PLUGIN_DOWNLOAD_ADDRESS, sdkDownloadAddress } from './portal-downloads.js';
|
|
6
|
+
// `src/lib/source.ts` names it as a relative literal, so the browser bundle never carries the project's location.
|
|
7
|
+
export const GENERATED_DIRECTORY_NAME = 'generated';
|
|
8
|
+
export const SDK_SECTION = {
|
|
9
|
+
folder: 'sdks',
|
|
10
|
+
token: 'apimatic:sdks',
|
|
11
|
+
title: 'SDKs',
|
|
12
|
+
description: 'the SDK pages'
|
|
13
|
+
};
|
|
14
|
+
const SDK_PAGES_DIRECTORY = posix.join(GENERATED_DIRECTORY_NAME, SDK_SECTION.folder);
|
|
15
|
+
export const PLUGIN_SECTION = {
|
|
16
|
+
folder: 'context-plugin',
|
|
17
|
+
token: 'apimatic:plugin',
|
|
18
|
+
title: 'Context Plugin',
|
|
19
|
+
description: 'the context plugin page'
|
|
20
|
+
};
|
|
21
|
+
/** Every section, in the order the tabs take when the root `nav.json` names none of them. */
|
|
22
|
+
export const GENERATED_SECTIONS = [SDK_SECTION, PLUGIN_SECTION];
|
|
23
|
+
/** The templates in the package's `portal-pages/` directory, by the name of their file. */
|
|
24
|
+
export const PAGE_TEMPLATES = ['sdks', 'sdk', 'context-plugin'];
|
|
25
|
+
const INDEX_PAGE = new FileName('index.mdx');
|
|
26
|
+
/**
|
|
27
|
+
* The pages `apimatic.json` calls for: the SDKs page and one page per language, in the order
|
|
28
|
+
* the `languages` block lists them, and the context plugin page when there is a plugin to install.
|
|
29
|
+
*/
|
|
30
|
+
export class GeneratedPages {
|
|
31
|
+
sdks;
|
|
32
|
+
plugin;
|
|
33
|
+
constructor(sdks, plugin) {
|
|
34
|
+
this.sdks = sdks;
|
|
35
|
+
this.plugin = plugin;
|
|
36
|
+
}
|
|
37
|
+
static of(languages, plugin) {
|
|
38
|
+
return new GeneratedPages(languages.listed(), plugin);
|
|
39
|
+
}
|
|
40
|
+
sections() {
|
|
41
|
+
return this.plugin === null ? [SDK_SECTION] : [SDK_SECTION, PLUGIN_SECTION];
|
|
42
|
+
}
|
|
43
|
+
/** Whatever pages the tabs hold, which the languages decide. */
|
|
44
|
+
makesSameTabsAs(other) {
|
|
45
|
+
const theirs = other.sections();
|
|
46
|
+
const mine = this.sections();
|
|
47
|
+
return mine.length === theirs.length && mine.every((section, index) => section === theirs[index]);
|
|
48
|
+
}
|
|
49
|
+
pages() {
|
|
50
|
+
const languagePages = this.sdks.map((sdk) => ({
|
|
51
|
+
section: SDK_SECTION,
|
|
52
|
+
fileName: new FileName(`${sdk.language}.mdx`),
|
|
53
|
+
template: 'sdk',
|
|
54
|
+
data: { ...card(sdk), docs: posix.relative(SDK_PAGES_DIRECTORY, sdkDocsPath(sdk.language)) }
|
|
55
|
+
}));
|
|
56
|
+
return [
|
|
57
|
+
{ section: SDK_SECTION, fileName: INDEX_PAGE, template: 'sdks', data: { sdks: this.sdks.map(card) } },
|
|
58
|
+
...languagePages,
|
|
59
|
+
...(this.plugin === null ? [] : [this.pluginPage(this.plugin)])
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
// The index page is the folder's own link rather than one of its pages, so no file names it.
|
|
63
|
+
navigationFiles() {
|
|
64
|
+
return this.sections().map((section) => ({
|
|
65
|
+
section,
|
|
66
|
+
contents: `${JSON.stringify(section === SDK_SECTION
|
|
67
|
+
? { title: section.title, pages: this.sdks.map((sdk) => sdk.language) }
|
|
68
|
+
: { title: section.title }, null, 2)}\n`
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
/** Null when the artifacts back every page; a page backed by nothing fails the build or links nowhere. */
|
|
72
|
+
missingFrom(artifacts) {
|
|
73
|
+
const languages = this.sdks.map((sdk) => sdk.language);
|
|
74
|
+
const sdks = languages.filter((language) => !artifacts.sdks.has(language));
|
|
75
|
+
const sdkDocs = languages.filter((language) => !artifacts.sdkDocs.has(language));
|
|
76
|
+
const plugin = this.plugin?.kind === 'bundled' && artifacts.plugin === undefined;
|
|
77
|
+
return sdks.length > 0 || sdkDocs.length > 0 || plugin ? { sdks, sdkDocs, plugin } : null;
|
|
78
|
+
}
|
|
79
|
+
// Every language the portal supports can be carried by a plugin, so the page lists them all.
|
|
80
|
+
pluginPage(plugin) {
|
|
81
|
+
return {
|
|
82
|
+
section: PLUGIN_SECTION,
|
|
83
|
+
fileName: INDEX_PAGE,
|
|
84
|
+
template: 'context-plugin',
|
|
85
|
+
data: {
|
|
86
|
+
installPath: plugin.kind === 'hosted' ? attribute(plugin.url) : PLUGIN_DOWNLOAD_ADDRESS,
|
|
87
|
+
languages: this.sdks.map((sdk) => ({ language: sdk.language, name: LANGUAGE_NAMES[sdk.language] }))
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/** Every field is present, empty when nothing is recorded, so a template's attribute list is fixed. */
|
|
93
|
+
function card(sdk) {
|
|
94
|
+
const published = sdk.publishedPackage();
|
|
95
|
+
const source = sdk.sourceRepository();
|
|
96
|
+
return {
|
|
97
|
+
language: sdk.language,
|
|
98
|
+
name: LANGUAGE_NAMES[sdk.language],
|
|
99
|
+
page: `/${SDK_SECTION.folder}/${sdk.language}`,
|
|
100
|
+
download: sdkDownloadAddress(sdk.language),
|
|
101
|
+
source: source === null ? '' : attribute(source),
|
|
102
|
+
install: published === null ? '' : attribute(published.install),
|
|
103
|
+
packageUrl: published === null ? '' : attribute(published.url),
|
|
104
|
+
registry: published === null ? '' : published.registry
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
// A double-quoted JSX attribute, whose entities MDX decodes: `&` first, so an `&` in a value survives.
|
|
108
|
+
function attribute(value) {
|
|
109
|
+
return `${value}`.replaceAll('&', '&').replaceAll('"', '"');
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=generated-pages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-pages.js","sourceRoot":"","sources":["../../../src/types/portal/generated-pages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAY,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAIpF,kHAAkH;AAClH,MAAM,CAAC,MAAM,wBAAwB,GAAG,WAAW,CAAC;AAapD,MAAM,CAAC,MAAM,WAAW,GAAqB;IAC3C,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,eAAe;CAC7B,CAAC;AAEF,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,CAAC,wBAAwB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,yBAA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AG,CAAC,gBAAgB,EAAE,CAAC;IACzC,MAAM,MAAM,GAAG,GAAG,CAAC,gBAAgB,EAAE,CAAC;IACtC,OAAO;QACL,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,IAAI,EAAE,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC;QAClC,IAAI,EAAE,IAAI,WAAW,CAAC,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE;QAC9C,QAAQ,EAAE,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC1C,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC;QAChD,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC;QAC/D,UAAU,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC;QAC9D,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ;KACvD,CAAC;AACJ,CAAC;AAED,2GAA2G;AAC3G,SAAS,SAAS,CAAC,KAAuB;IACxC,OAAO,GAAG,KAAK,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The statuses `/portal-artifacts` reports. Modelled in full, for the reason the plugin's own
|
|
3
|
+
* vocabulary is: a status this CLI does not name is indistinguishable from one it does, and the
|
|
4
|
+
* polling loop decides whether to wait, stop or fail on exactly this value.
|
|
5
|
+
*
|
|
6
|
+
* Two differences from `PluginGenerationStatus`, both worth knowing when reading the poll:
|
|
7
|
+
*
|
|
8
|
+
* - `SubscriptionError` is reported here. A run refused for the endpoint itself is a 403 on the
|
|
9
|
+
* initiate call, but a run refused for *what it asked for* — a language or a context plugin the
|
|
10
|
+
* subscription does not carry — is decided inside the orchestrator and comes back as a status.
|
|
11
|
+
* - `Completed` is never sent on the wire. Like the plugin's status endpoint, this one redirects
|
|
12
|
+
* to the download when a run finishes, so the 302 is what the poll reads as success. The value
|
|
13
|
+
* is named here because the poll needs one to report.
|
|
14
|
+
*/
|
|
15
|
+
export declare enum PortalArtifactsGenerationStatus {
|
|
16
|
+
Queued = "Queued",
|
|
17
|
+
ExecutionStarted = "ExecutionStarted",
|
|
18
|
+
GeneratingArtifacts = "GeneratingArtifacts",
|
|
19
|
+
Completed = "Completed",
|
|
20
|
+
Failed = "Failed",
|
|
21
|
+
ValidationError = "ValidationError",
|
|
22
|
+
SubscriptionError = "SubscriptionError",
|
|
23
|
+
Unknown = "Unknown"
|
|
24
|
+
}
|
|
25
|
+
export interface PortalArtifactsStatusResponse {
|
|
26
|
+
status: PortalArtifactsGenerationStatus;
|
|
27
|
+
errors?: Record<string, string[]>;
|
|
28
|
+
}
|
|
29
|
+
export interface PortalArtifactsInitiatedResponse {
|
|
30
|
+
id: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The statuses `/portal-artifacts` reports. Modelled in full, for the reason the plugin's own
|
|
3
|
+
* vocabulary is: a status this CLI does not name is indistinguishable from one it does, and the
|
|
4
|
+
* polling loop decides whether to wait, stop or fail on exactly this value.
|
|
5
|
+
*
|
|
6
|
+
* Two differences from `PluginGenerationStatus`, both worth knowing when reading the poll:
|
|
7
|
+
*
|
|
8
|
+
* - `SubscriptionError` is reported here. A run refused for the endpoint itself is a 403 on the
|
|
9
|
+
* initiate call, but a run refused for *what it asked for* — a language or a context plugin the
|
|
10
|
+
* subscription does not carry — is decided inside the orchestrator and comes back as a status.
|
|
11
|
+
* - `Completed` is never sent on the wire. Like the plugin's status endpoint, this one redirects
|
|
12
|
+
* to the download when a run finishes, so the 302 is what the poll reads as success. The value
|
|
13
|
+
* is named here because the poll needs one to report.
|
|
14
|
+
*/
|
|
15
|
+
export var PortalArtifactsGenerationStatus;
|
|
16
|
+
(function (PortalArtifactsGenerationStatus) {
|
|
17
|
+
PortalArtifactsGenerationStatus["Queued"] = "Queued";
|
|
18
|
+
PortalArtifactsGenerationStatus["ExecutionStarted"] = "ExecutionStarted";
|
|
19
|
+
PortalArtifactsGenerationStatus["GeneratingArtifacts"] = "GeneratingArtifacts";
|
|
20
|
+
PortalArtifactsGenerationStatus["Completed"] = "Completed";
|
|
21
|
+
PortalArtifactsGenerationStatus["Failed"] = "Failed";
|
|
22
|
+
PortalArtifactsGenerationStatus["ValidationError"] = "ValidationError";
|
|
23
|
+
PortalArtifactsGenerationStatus["SubscriptionError"] = "SubscriptionError";
|
|
24
|
+
PortalArtifactsGenerationStatus["Unknown"] = "Unknown";
|
|
25
|
+
})(PortalArtifactsGenerationStatus || (PortalArtifactsGenerationStatus = {}));
|
|
26
|
+
//# sourceMappingURL=generation-status.js.map
|