@apimatic/cli 1.5.0 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +128 -212
- package/apimatic.schema.json +550 -0
- package/lib/actions/action-result.js +3 -0
- package/lib/actions/action-result.js.map +1 -1
- package/lib/actions/api/transform.js +36 -33
- package/lib/actions/api/transform.js.map +1 -1
- package/lib/actions/api/validate.d.ts +9 -6
- package/lib/actions/api/validate.js +44 -38
- package/lib/actions/api/validate.js.map +1 -1
- package/lib/actions/auth/login.js +7 -4
- package/lib/actions/auth/login.js.map +1 -1
- package/lib/actions/auth/logout.js +2 -1
- package/lib/actions/auth/logout.js.map +1 -1
- package/lib/actions/auth/status.js +5 -3
- package/lib/actions/auth/status.js.map +1 -1
- package/lib/actions/plugin/generate.d.ts +5 -1
- package/lib/actions/plugin/generate.js +83 -56
- package/lib/actions/plugin/generate.js.map +1 -1
- package/lib/actions/plugin/publish.d.ts +2 -1
- package/lib/actions/plugin/publish.js +34 -37
- package/lib/actions/plugin/publish.js.map +1 -1
- package/lib/actions/plugin/record-metadata.d.ts +3 -2
- package/lib/actions/plugin/record-metadata.js +33 -30
- package/lib/actions/plugin/record-metadata.js.map +1 -1
- package/lib/actions/portal/generate.d.ts +8 -6
- package/lib/actions/portal/generate.js +50 -61
- package/lib/actions/portal/generate.js.map +1 -1
- package/lib/actions/portal/prepare-project.d.ts +25 -0
- package/lib/actions/portal/prepare-project.js +68 -0
- package/lib/actions/portal/prepare-project.js.map +1 -0
- package/lib/actions/portal/serve.d.ts +21 -6
- package/lib/actions/portal/serve.js +170 -153
- package/lib/actions/portal/serve.js.map +1 -1
- package/lib/actions/publishing/profile/list.js +4 -2
- package/lib/actions/publishing/profile/list.js.map +1 -1
- package/lib/actions/quickstart.d.ts +23 -5
- package/lib/actions/quickstart.js +222 -21
- package/lib/actions/quickstart.js.map +1 -1
- package/lib/actions/sdk/generate.d.ts +4 -7
- package/lib/actions/sdk/generate.js +53 -93
- package/lib/actions/sdk/generate.js.map +1 -1
- package/lib/actions/sdk/publish/interactive.d.ts +4 -3
- package/lib/actions/sdk/publish/interactive.js +96 -97
- package/lib/actions/sdk/publish/interactive.js.map +1 -1
- package/lib/actions/sdk/publish/non-interactive.d.ts +4 -2
- package/lib/actions/sdk/publish/non-interactive.js +91 -90
- package/lib/actions/sdk/publish/non-interactive.js.map +1 -1
- package/lib/actions/sdk/publish.d.ts +3 -2
- package/lib/actions/sdk/publish.js +55 -53
- package/lib/actions/sdk/publish.js.map +1 -1
- package/lib/actions/sdk/record-published-sdk.d.ts +14 -0
- package/lib/actions/sdk/record-published-sdk.js +57 -0
- package/lib/actions/sdk/record-published-sdk.js.map +1 -0
- package/lib/client-utils/auth-manager.js +1 -1
- package/lib/client-utils/auth-manager.js.map +1 -1
- package/lib/commands/api/transform.d.ts +1 -1
- package/lib/commands/api/transform.js +44 -40
- package/lib/commands/api/transform.js.map +1 -1
- package/lib/commands/api/validate.js +16 -16
- package/lib/commands/api/validate.js.map +1 -1
- package/lib/commands/auth/login.js +14 -15
- package/lib/commands/auth/login.js.map +1 -1
- package/lib/commands/auth/logout.js +5 -6
- package/lib/commands/auth/logout.js.map +1 -1
- package/lib/commands/auth/status.js +4 -5
- package/lib/commands/auth/status.js.map +1 -1
- package/lib/commands/plugin/generate.d.ts +3 -3
- package/lib/commands/plugin/generate.js +20 -20
- package/lib/commands/plugin/generate.js.map +1 -1
- package/lib/commands/plugin/publish.js +18 -18
- package/lib/commands/plugin/publish.js.map +1 -1
- package/lib/commands/portal/generate.d.ts +9 -8
- package/lib/commands/portal/generate.js +36 -27
- package/lib/commands/portal/generate.js.map +1 -1
- package/lib/commands/portal/serve.d.ts +7 -9
- package/lib/commands/portal/serve.js +41 -44
- package/lib/commands/portal/serve.js.map +1 -1
- package/lib/commands/publishing/profile/list.js +8 -12
- package/lib/commands/publishing/profile/list.js.map +1 -1
- package/lib/commands/quickstart.d.ts +5 -5
- package/lib/commands/quickstart.js +18 -24
- package/lib/commands/quickstart.js.map +1 -1
- package/lib/commands/sdk/generate.d.ts +5 -7
- package/lib/commands/sdk/generate.js +58 -70
- package/lib/commands/sdk/generate.js.map +1 -1
- package/lib/commands/sdk/publish.d.ts +6 -7
- package/lib/commands/sdk/publish.js +66 -60
- package/lib/commands/sdk/publish.js.map +1 -1
- package/lib/hooks/node-version.d.ts +3 -0
- package/lib/hooks/node-version.js +12 -0
- package/lib/hooks/node-version.js.map +1 -0
- package/lib/hooks/not-found.js +2 -3
- package/lib/hooks/not-found.js.map +1 -1
- package/lib/hooks/utils.d.ts +4 -2
- package/lib/hooks/utils.js +2 -2
- package/lib/hooks/utils.js.map +1 -1
- package/lib/infrastructure/env-info.d.ts +3 -0
- package/lib/infrastructure/env-info.js +13 -6
- package/lib/infrastructure/env-info.js.map +1 -1
- package/lib/infrastructure/file-service.d.ts +35 -8
- package/lib/infrastructure/file-service.js +149 -53
- package/lib/infrastructure/file-service.js.map +1 -1
- package/lib/infrastructure/file-watch-service.d.ts +40 -0
- package/lib/infrastructure/file-watch-service.js +167 -0
- package/lib/infrastructure/file-watch-service.js.map +1 -0
- package/lib/infrastructure/generation-status-poller.d.ts +8 -7
- package/lib/infrastructure/generation-status-poller.js +20 -12
- package/lib/infrastructure/generation-status-poller.js.map +1 -1
- package/lib/infrastructure/launcher-service.js +6 -6
- package/lib/infrastructure/launcher-service.js.map +1 -1
- package/lib/infrastructure/network-service.d.ts +3 -0
- package/lib/infrastructure/network-service.js +15 -1
- package/lib/infrastructure/network-service.js.map +1 -1
- package/lib/infrastructure/portal-build-service.d.ts +19 -0
- package/lib/infrastructure/portal-build-service.js +58 -0
- package/lib/infrastructure/portal-build-service.js.map +1 -0
- package/lib/infrastructure/portal-dev-server-service.d.ts +29 -0
- package/lib/infrastructure/portal-dev-server-service.js +135 -0
- package/lib/infrastructure/portal-dev-server-service.js.map +1 -0
- package/lib/infrastructure/portal-pages-service.d.ts +17 -0
- package/lib/infrastructure/portal-pages-service.js +103 -0
- package/lib/infrastructure/portal-pages-service.js.map +1 -0
- package/lib/infrastructure/portal-project-service.d.ts +77 -0
- package/lib/infrastructure/portal-project-service.js +309 -0
- package/lib/infrastructure/portal-project-service.js.map +1 -0
- package/lib/infrastructure/service-error.d.ts +1 -0
- package/lib/infrastructure/service-error.js +39 -41
- package/lib/infrastructure/service-error.js.map +1 -1
- package/lib/infrastructure/services/api-client-factory.js +15 -13
- package/lib/infrastructure/services/api-client-factory.js.map +1 -1
- package/lib/infrastructure/services/api-service.d.ts +7 -5
- package/lib/infrastructure/services/api-service.js +28 -20
- package/lib/infrastructure/services/api-service.js.map +1 -1
- package/lib/infrastructure/services/auth-service.js +4 -9
- package/lib/infrastructure/services/auth-service.js.map +1 -1
- package/lib/infrastructure/services/file-download-service.js +3 -3
- package/lib/infrastructure/services/file-download-service.js.map +1 -1
- package/lib/infrastructure/services/plugin-service.d.ts +1 -8
- package/lib/infrastructure/services/plugin-service.js +11 -22
- package/lib/infrastructure/services/plugin-service.js.map +1 -1
- package/lib/infrastructure/services/portal-artifacts-service.d.ts +44 -0
- package/lib/infrastructure/services/portal-artifacts-service.js +268 -0
- package/lib/infrastructure/services/portal-artifacts-service.js.map +1 -0
- package/lib/infrastructure/services/portal-authorization-service.d.ts +22 -0
- package/lib/infrastructure/services/portal-authorization-service.js +23 -0
- package/lib/infrastructure/services/portal-authorization-service.js.map +1 -0
- package/lib/infrastructure/services/publishing-api-service.d.ts +1 -1
- package/lib/infrastructure/services/publishing-api-service.js +11 -15
- package/lib/infrastructure/services/publishing-api-service.js.map +1 -1
- package/lib/infrastructure/services/sdk-generation-service.d.ts +21 -0
- package/lib/infrastructure/services/sdk-generation-service.js +118 -0
- package/lib/infrastructure/services/sdk-generation-service.js.map +1 -0
- package/lib/infrastructure/services/telemetry-service.js +5 -4
- package/lib/infrastructure/services/telemetry-service.js.map +1 -1
- package/lib/infrastructure/services/transformation-service.js +29 -32
- package/lib/infrastructure/services/transformation-service.js.map +1 -1
- package/lib/infrastructure/services/validation-service.d.ts +12 -53
- package/lib/infrastructure/services/validation-service.js +24 -199
- package/lib/infrastructure/services/validation-service.js.map +1 -1
- package/lib/infrastructure/timer-extensions.d.ts +2 -0
- package/lib/infrastructure/timer-extensions.js +10 -0
- package/lib/infrastructure/timer-extensions.js.map +1 -0
- package/lib/infrastructure/tmp-extensions.d.ts +31 -1
- package/lib/infrastructure/tmp-extensions.js +86 -3
- package/lib/infrastructure/tmp-extensions.js.map +1 -1
- package/lib/infrastructure/zip-service.js +2 -2
- package/lib/infrastructure/zip-service.js.map +1 -1
- package/lib/prompts/api/validate.d.ts +6 -7
- package/lib/prompts/api/validate.js +12 -12
- package/lib/prompts/api/validate.js.map +1 -1
- package/lib/prompts/format.d.ts +4 -0
- package/lib/prompts/format.js +5 -0
- package/lib/prompts/format.js.map +1 -1
- package/lib/prompts/plugin/generate.d.ts +17 -12
- package/lib/prompts/plugin/generate.js +94 -44
- package/lib/prompts/plugin/generate.js.map +1 -1
- package/lib/prompts/plugin/publish.d.ts +2 -1
- package/lib/prompts/plugin/publish.js +8 -7
- package/lib/prompts/plugin/publish.js.map +1 -1
- package/lib/prompts/plugin/record-metadata.d.ts +1 -0
- package/lib/prompts/plugin/record-metadata.js +10 -7
- package/lib/prompts/plugin/record-metadata.js.map +1 -1
- package/lib/prompts/portal/artifacts.d.ts +8 -0
- package/lib/prompts/portal/artifacts.js +26 -0
- package/lib/prompts/portal/artifacts.js.map +1 -0
- package/lib/prompts/portal/authorization.d.ts +6 -0
- package/lib/prompts/portal/authorization.js +29 -0
- package/lib/prompts/portal/authorization.js.map +1 -0
- package/lib/prompts/portal/code-samples.d.ts +1 -0
- package/lib/prompts/portal/code-samples.js +9 -0
- package/lib/prompts/portal/code-samples.js.map +1 -0
- package/lib/prompts/portal/generate.d.ts +14 -9
- package/lib/prompts/portal/generate.js +48 -26
- package/lib/prompts/portal/generate.js.map +1 -1
- package/lib/prompts/portal/prepare-project.d.ts +20 -0
- package/lib/prompts/portal/prepare-project.js +36 -0
- package/lib/prompts/portal/prepare-project.js.map +1 -0
- package/lib/prompts/portal/serve.d.ts +32 -12
- package/lib/prompts/portal/serve.js +102 -39
- package/lib/prompts/portal/serve.js.map +1 -1
- package/lib/prompts/portal/source.d.ts +26 -0
- package/lib/prompts/portal/source.js +253 -0
- package/lib/prompts/portal/source.js.map +1 -0
- package/lib/prompts/prompt.d.ts +11 -3
- package/lib/prompts/prompt.js +39 -15
- package/lib/prompts/prompt.js.map +1 -1
- package/lib/prompts/quickstart.d.ts +46 -3
- package/lib/prompts/quickstart.js +199 -12
- package/lib/prompts/quickstart.js.map +1 -1
- package/lib/prompts/sdk/generate.d.ts +15 -13
- package/lib/prompts/sdk/generate.js +29 -32
- package/lib/prompts/sdk/generate.js.map +1 -1
- package/lib/prompts/sdk/publish/interactive.d.ts +10 -6
- package/lib/prompts/sdk/publish/interactive.js +26 -24
- package/lib/prompts/sdk/publish/interactive.js.map +1 -1
- package/lib/prompts/sdk/publish/non-interactive.d.ts +2 -1
- package/lib/prompts/sdk/publish/non-interactive.js +5 -4
- package/lib/prompts/sdk/publish/non-interactive.js.map +1 -1
- package/lib/prompts/sdk/publish.d.ts +3 -3
- package/lib/prompts/sdk/publish.js +13 -17
- package/lib/prompts/sdk/publish.js.map +1 -1
- package/lib/prompts/sdk/record-published-sdk.d.ts +7 -0
- package/lib/prompts/sdk/record-published-sdk.js +26 -0
- package/lib/prompts/sdk/record-published-sdk.js.map +1 -0
- package/lib/types/apimatic-config/document.d.ts +70 -0
- package/lib/types/apimatic-config/document.js +167 -0
- package/lib/types/apimatic-config/document.js.map +1 -0
- package/lib/types/apimatic-config/languages-block.d.ts +39 -0
- package/lib/types/apimatic-config/languages-block.js +58 -0
- package/lib/types/apimatic-config/languages-block.js.map +1 -0
- package/lib/types/apimatic-config-context.d.ts +48 -0
- package/lib/types/apimatic-config-context.js +121 -0
- package/lib/types/apimatic-config-context.js.map +1 -0
- package/lib/types/build/build.d.ts +1 -89
- package/lib/types/build/build.js +6 -161
- package/lib/types/build/build.js.map +1 -1
- package/lib/types/events/domain-event.js +3 -0
- package/lib/types/events/domain-event.js.map +1 -1
- package/lib/types/events/quickstart-completed.js +3 -3
- package/lib/types/events/quickstart-completed.js.map +1 -1
- package/lib/types/events/quickstart-initiated.js +3 -3
- package/lib/types/events/quickstart-initiated.js.map +1 -1
- package/lib/types/events/sdk-publish-validation-failed.js +1 -1
- package/lib/types/events/sdk-publish-validation-failed.js.map +1 -1
- package/lib/types/file/directory.d.ts +4 -9
- package/lib/types/file/directory.js +17 -65
- package/lib/types/file/directory.js.map +1 -1
- package/lib/types/file/directoryPath.d.ts +17 -0
- package/lib/types/file/directoryPath.js +47 -2
- package/lib/types/file/directoryPath.js.map +1 -1
- package/lib/types/file/fileName.d.ts +8 -0
- package/lib/types/file/fileName.js +28 -6
- package/lib/types/file/fileName.js.map +1 -1
- package/lib/types/file/filePath.d.ts +18 -2
- package/lib/types/file/filePath.js +39 -4
- package/lib/types/file/filePath.js.map +1 -1
- package/lib/types/file/resource-input.js +1 -2
- package/lib/types/file/resource-input.js.map +1 -1
- package/lib/types/file/urlPath.js +2 -1
- package/lib/types/file/urlPath.js.map +1 -1
- package/lib/types/flags-provider.js +22 -22
- package/lib/types/flags-provider.js.map +1 -1
- package/lib/types/package-settings-context.js +2 -1
- package/lib/types/package-settings-context.js.map +1 -1
- package/lib/types/plugin/plugin-config.d.ts +10 -50
- package/lib/types/plugin/plugin-config.js +7 -1
- package/lib/types/plugin/plugin-config.js.map +1 -1
- package/lib/types/plugin-config-context.d.ts +30 -37
- package/lib/types/plugin-config-context.js +108 -139
- package/lib/types/plugin-config-context.js.map +1 -1
- package/lib/types/plugin-context.js +3 -2
- package/lib/types/plugin-context.js.map +1 -1
- package/lib/types/portal/code-samples.d.ts +27 -0
- package/lib/types/portal/code-samples.js +67 -0
- package/lib/types/portal/code-samples.js.map +1 -0
- package/lib/types/portal/config/ai-config.d.ts +15 -0
- package/lib/types/portal/config/ai-config.js +26 -0
- package/lib/types/portal/config/ai-config.js.map +1 -0
- package/lib/types/portal/config/brand-config.d.ts +55 -0
- package/lib/types/portal/config/brand-config.js +105 -0
- package/lib/types/portal/config/brand-config.js.map +1 -0
- package/lib/types/portal/config/color.d.ts +19 -0
- package/lib/types/portal/config/color.js +43 -0
- package/lib/types/portal/config/color.js.map +1 -0
- package/lib/types/portal/config/fields.d.ts +23 -0
- package/lib/types/portal/config/fields.js +67 -0
- package/lib/types/portal/config/fields.js.map +1 -0
- package/lib/types/portal/config/link.d.ts +18 -0
- package/lib/types/portal/config/link.js +72 -0
- package/lib/types/portal/config/link.js.map +1 -0
- package/lib/types/portal/config/navigation-config.d.ts +13 -0
- package/lib/types/portal/config/navigation-config.js +30 -0
- package/lib/types/portal/config/navigation-config.js.map +1 -0
- package/lib/types/portal/config/site-config.d.ts +32 -0
- package/lib/types/portal/config/site-config.js +88 -0
- package/lib/types/portal/config/site-config.js.map +1 -0
- package/lib/types/portal/config/static-asset.d.ts +25 -0
- package/lib/types/portal/config/static-asset.js +77 -0
- package/lib/types/portal/config/static-asset.js.map +1 -0
- package/lib/types/portal/content-notices.d.ts +20 -0
- package/lib/types/portal/content-notices.js +2 -0
- package/lib/types/portal/content-notices.js.map +1 -0
- package/lib/types/portal/content-tree.d.ts +103 -0
- package/lib/types/portal/content-tree.js +344 -0
- package/lib/types/portal/content-tree.js.map +1 -0
- package/lib/types/portal/endpoint.d.ts +6 -0
- package/lib/types/portal/endpoint.js +12 -0
- package/lib/types/portal/endpoint.js.map +1 -0
- package/lib/types/portal/generated-pages.d.ts +68 -0
- package/lib/types/portal/generated-pages.js +111 -0
- package/lib/types/portal/generated-pages.js.map +1 -0
- package/lib/types/portal/generation-status.d.ts +31 -0
- package/lib/types/portal/generation-status.js +26 -0
- package/lib/types/portal/generation-status.js.map +1 -0
- package/lib/types/portal/openapi-document.d.ts +48 -0
- package/lib/types/portal/openapi-document.js +138 -0
- package/lib/types/portal/openapi-document.js.map +1 -0
- package/lib/types/portal/page-fragments.d.ts +13 -0
- package/lib/types/portal/page-fragments.js +24 -0
- package/lib/types/portal/page-fragments.js.map +1 -0
- package/lib/types/portal/page-template.d.ts +15 -0
- package/lib/types/portal/page-template.js +64 -0
- package/lib/types/portal/page-template.js.map +1 -0
- package/lib/types/portal/page.d.ts +24 -0
- package/lib/types/portal/page.js +100 -0
- package/lib/types/portal/page.js.map +1 -0
- package/lib/types/portal/portal-artifacts.d.ts +25 -0
- package/lib/types/portal/portal-artifacts.js +30 -0
- package/lib/types/portal/portal-artifacts.js.map +1 -0
- package/lib/types/portal/portal-config.d.ts +69 -0
- package/lib/types/portal/portal-config.js +105 -0
- package/lib/types/portal/portal-config.js.map +1 -0
- package/lib/types/portal/portal-downloads.d.ts +8 -0
- package/lib/types/portal/portal-downloads.js +14 -0
- package/lib/types/portal/portal-downloads.js.map +1 -0
- package/lib/types/portal/portal-languages.d.ts +15 -0
- package/lib/types/portal/portal-languages.js +45 -0
- package/lib/types/portal/portal-languages.js.map +1 -0
- package/lib/types/portal/portal-navigation.d.ts +65 -0
- package/lib/types/portal/portal-navigation.js +217 -0
- package/lib/types/portal/portal-navigation.js.map +1 -0
- package/lib/types/portal/portal-sdk.d.ts +15 -0
- package/lib/types/portal/portal-sdk.js +28 -0
- package/lib/types/portal/portal-sdk.js.map +1 -0
- package/lib/types/portal/portal-source.d.ts +129 -0
- package/lib/types/portal/portal-source.js +2 -0
- package/lib/types/portal/portal-source.js.map +1 -0
- package/lib/types/portal/portal-stylesheet.d.ts +19 -0
- package/lib/types/portal/portal-stylesheet.js +40 -0
- package/lib/types/portal/portal-stylesheet.js.map +1 -0
- package/lib/types/portal/portal-tabs.d.ts +33 -0
- package/lib/types/portal/portal-tabs.js +38 -0
- package/lib/types/portal/portal-tabs.js.map +1 -0
- package/lib/types/portal/preview-config.d.ts +20 -0
- package/lib/types/portal/preview-config.js +32 -0
- package/lib/types/portal/preview-config.js.map +1 -0
- package/lib/types/portal/preview-content.d.ts +18 -0
- package/lib/types/portal/preview-content.js +50 -0
- package/lib/types/portal/preview-content.js.map +1 -0
- package/lib/types/portal/published-package.d.ts +12 -0
- package/lib/types/portal/published-package.js +35 -0
- package/lib/types/portal/published-package.js.map +1 -0
- package/lib/types/portal/unknown-fields.d.ts +5 -0
- package/lib/types/portal/unknown-fields.js +10 -0
- package/lib/types/portal/unknown-fields.js.map +1 -0
- package/lib/types/portal-context.d.ts +38 -6
- package/lib/types/portal-context.js +71 -24
- package/lib/types/portal-context.js.map +1 -1
- package/lib/types/portal-source-context.d.ts +77 -0
- package/lib/types/portal-source-context.js +408 -0
- package/lib/types/portal-source-context.js.map +1 -0
- package/lib/types/project-context.d.ts +49 -0
- package/lib/types/project-context.js +151 -0
- package/lib/types/project-context.js.map +1 -0
- package/lib/types/project-layout.d.ts +9 -0
- package/lib/types/project-layout.js +10 -0
- package/lib/types/project-layout.js.map +1 -0
- package/lib/types/publish/package-settings-configuration.d.ts +2 -0
- package/lib/types/publish/profile-id.js +1 -0
- package/lib/types/publish/profile-id.js.map +1 -1
- package/lib/types/publish/publishing-profile.d.ts +3 -1
- package/lib/types/publish/publishing-profile.js +33 -15
- package/lib/types/publish/publishing-profile.js.map +1 -1
- package/lib/types/publish/publishing-profiles.js +2 -1
- package/lib/types/publish/publishing-profiles.js.map +1 -1
- package/lib/types/publish/version.js +1 -0
- package/lib/types/publish/version.js.map +1 -1
- package/lib/types/resource-context.js +3 -2
- package/lib/types/resource-context.js.map +1 -1
- package/lib/types/sdk/generate.d.ts +22 -16
- package/lib/types/sdk/generate.js +64 -41
- package/lib/types/sdk/generate.js.map +1 -1
- package/lib/types/sdk/stability-choice.d.ts +12 -0
- package/lib/types/sdk/stability-choice.js +24 -0
- package/lib/types/sdk/stability-choice.js.map +1 -0
- package/lib/types/sdk-context.d.ts +4 -5
- package/lib/types/sdk-context.js +10 -18
- package/lib/types/sdk-context.js.map +1 -1
- package/lib/types/spec-context.d.ts +5 -4
- package/lib/types/spec-context.js +9 -8
- package/lib/types/spec-context.js.map +1 -1
- package/lib/types/temp-context.d.ts +1 -1
- package/lib/types/temp-context.js +5 -4
- package/lib/types/temp-context.js.map +1 -1
- package/lib/types/transform-context.d.ts +9 -5
- package/lib/types/transform-context.js +21 -18
- package/lib/types/transform-context.js.map +1 -1
- package/lib/utils/error-utils.d.ts +2 -0
- package/lib/utils/error-utils.js +5 -0
- package/lib/utils/error-utils.js.map +1 -0
- package/lib/utils/json-utils.d.ts +2 -0
- package/lib/utils/json-utils.js +4 -0
- package/lib/utils/json-utils.js.map +1 -0
- package/lib/utils/string-utils.d.ts +8 -1
- package/lib/utils/string-utils.js +13 -26
- package/lib/utils/string-utils.js.map +1 -1
- package/lib/utils/utils.d.ts +1 -3
- package/lib/utils/utils.js +12 -40
- package/lib/utils/utils.js.map +1 -1
- package/oclif.manifest.json +69 -357
- package/package.json +47 -25
- package/portal-pages/context-plugin.mdx +26 -0
- package/portal-pages/sdk.mdx +8 -0
- package/portal-pages/sdks.mdx +11 -0
- package/portal-template/NOTICE +37 -0
- package/portal-template/downloads.ts +41 -0
- package/portal-template/generated-pages-reload.ts +51 -0
- package/portal-template/package.json +11 -0
- package/portal-template/portal-config.ts +32 -0
- package/portal-template/prerender-pages.ts +81 -0
- package/portal-template/spec-reload.ts +26 -0
- package/portal-template/src/components/api-page.tsx +15 -0
- package/portal-template/src/components/code-block.tsx +9 -0
- package/portal-template/src/components/command-block.tsx +50 -0
- package/portal-template/src/components/example-layout.tsx +99 -0
- package/portal-template/src/components/logos.tsx +127 -0
- package/portal-template/src/components/mdx.tsx +28 -0
- package/portal-template/src/components/not-found.tsx +11 -0
- package/portal-template/src/components/plugin-install.tsx +22 -0
- package/portal-template/src/components/plugin-support.tsx +53 -0
- package/portal-template/src/components/sdk-actions.tsx +79 -0
- package/portal-template/src/components/sdk-cards.tsx +100 -0
- package/portal-template/src/components/search.tsx +41 -0
- package/portal-template/src/components/usage-tabs.tsx +92 -0
- package/portal-template/src/lib/code-samples.server.ts +40 -0
- package/portal-template/src/lib/code-samples.ts +43 -0
- package/portal-template/src/lib/code-titles.ts +29 -0
- package/portal-template/src/lib/install-command.ts +13 -0
- package/portal-template/src/lib/json.ts +5 -0
- package/portal-template/src/lib/layout.shared.tsx +41 -0
- package/portal-template/src/lib/layout.tsx +16 -0
- package/portal-template/src/lib/llms.server.ts +54 -0
- package/portal-template/src/lib/media-adapters.ts +34 -0
- package/portal-template/src/lib/navigation.ts +406 -0
- package/portal-template/src/lib/openapi-bundle.server.ts +343 -0
- package/portal-template/src/lib/openapi-filter.ts +191 -0
- package/portal-template/src/lib/openapi-labels.ts +15 -0
- package/portal-template/src/lib/openapi-methods.ts +12 -0
- package/portal-template/src/lib/openapi-section.server.ts +280 -0
- package/portal-template/src/lib/openapi-slim.ts +202 -0
- package/portal-template/src/lib/openapi.server.ts +16 -0
- package/portal-template/src/lib/portal-types.ts +36 -0
- package/portal-template/src/lib/portal.server.ts +13 -0
- package/portal-template/src/lib/portal.ts +11 -0
- package/portal-template/src/lib/rehype-code-titles.ts +53 -0
- package/portal-template/src/lib/request-examples.ts +72 -0
- package/portal-template/src/lib/seo.ts +21 -0
- package/portal-template/src/lib/shared.ts +51 -0
- package/portal-template/src/lib/shiki-bundle.ts +104 -0
- package/portal-template/src/lib/sitemap.server.ts +20 -0
- package/portal-template/src/lib/source.server.ts +27 -0
- package/portal-template/src/lib/source.ts +49 -0
- package/portal-template/src/lib/tabs.ts +37 -0
- package/portal-template/src/router.tsx +12 -0
- package/portal-template/src/routes/$.tsx +194 -0
- package/portal-template/src/routes/__root.tsx +56 -0
- package/portal-template/src/routes/api/search[.]json.ts +9 -0
- package/portal-template/src/routes/llms-full[.]txt.ts +10 -0
- package/portal-template/src/routes/llms[.]txt.ts +10 -0
- package/portal-template/src/routes/robots[.]txt.ts +10 -0
- package/portal-template/src/routes/sitemap[.]xml.ts +10 -0
- package/portal-template/src/routes/spa-shell.tsx +7 -0
- package/portal-template/src/routes/{$}[.]md.ts +21 -0
- package/portal-template/src/styles/app.css +33 -0
- package/portal-template/tsconfig.json +26 -0
- package/portal-template/vite.config.ts +68 -0
- package/lib/actions/plugin/record-sdk.d.ts +0 -14
- package/lib/actions/plugin/record-sdk.js +0 -60
- package/lib/actions/plugin/record-sdk.js.map +0 -1
- package/lib/actions/portal/copilot.d.ts +0 -17
- package/lib/actions/portal/copilot.js +0 -89
- package/lib/actions/portal/copilot.js.map +0 -1
- package/lib/actions/portal/quickstart.d.ts +0 -18
- package/lib/actions/portal/quickstart.js +0 -238
- package/lib/actions/portal/quickstart.js.map +0 -1
- package/lib/actions/portal/recipe/new-recipe.d.ts +0 -15
- package/lib/actions/portal/recipe/new-recipe.js +0 -177
- package/lib/actions/portal/recipe/new-recipe.js.map +0 -1
- package/lib/actions/portal/toc/new-toc.d.ts +0 -21
- package/lib/actions/portal/toc/new-toc.js +0 -95
- package/lib/actions/portal/toc/new-toc.js.map +0 -1
- package/lib/actions/sdk/merge-source-tree.d.ts +0 -12
- package/lib/actions/sdk/merge-source-tree.js +0 -78
- package/lib/actions/sdk/merge-source-tree.js.map +0 -1
- package/lib/actions/sdk/quickstart.d.ts +0 -18
- package/lib/actions/sdk/quickstart.js +0 -188
- package/lib/actions/sdk/quickstart.js.map +0 -1
- package/lib/actions/sdk/save-changes.d.ts +0 -8
- package/lib/actions/sdk/save-changes.js +0 -93
- package/lib/actions/sdk/save-changes.js.map +0 -1
- package/lib/application/portal/recipe/portal-recipe.d.ts +0 -8
- package/lib/application/portal/recipe/portal-recipe.js +0 -33
- package/lib/application/portal/recipe/portal-recipe.js.map +0 -1
- package/lib/application/portal/recipe/recipe-generator.d.ts +0 -21
- package/lib/application/portal/recipe/recipe-generator.js +0 -130
- package/lib/application/portal/recipe/recipe-generator.js.map +0 -1
- package/lib/application/portal/toc/toc-content-parser.d.ts +0 -5
- package/lib/application/portal/toc/toc-content-parser.js +0 -44
- package/lib/application/portal/toc/toc-content-parser.js.map +0 -1
- package/lib/application/portal/toc/toc-structure-generator.d.ts +0 -11
- package/lib/application/portal/toc/toc-structure-generator.js +0 -165
- package/lib/application/portal/toc/toc-structure-generator.js.map +0 -1
- package/lib/commands/portal/copilot.d.ts +0 -13
- package/lib/commands/portal/copilot.js +0 -34
- package/lib/commands/portal/copilot.js.map +0 -1
- package/lib/commands/portal/recipe/new.d.ts +0 -12
- package/lib/commands/portal/recipe/new.js +0 -45
- package/lib/commands/portal/recipe/new.js.map +0 -1
- package/lib/commands/portal/toc/new.d.ts +0 -16
- package/lib/commands/portal/toc/new.js +0 -68
- package/lib/commands/portal/toc/new.js.map +0 -1
- package/lib/commands/sdk/save-changes.d.ts +0 -14
- package/lib/commands/sdk/save-changes.js +0 -51
- package/lib/commands/sdk/save-changes.js.map +0 -1
- package/lib/infrastructure/debounce-service.d.ts +0 -10
- package/lib/infrastructure/debounce-service.js +0 -55
- package/lib/infrastructure/debounce-service.js.map +0 -1
- package/lib/infrastructure/services/portal-service.d.ts +0 -43
- package/lib/infrastructure/services/portal-service.js +0 -337
- package/lib/infrastructure/services/portal-service.js.map +0 -1
- package/lib/prompts/plugin/record-sdk.d.ts +0 -9
- package/lib/prompts/plugin/record-sdk.js +0 -40
- package/lib/prompts/plugin/record-sdk.js.map +0 -1
- package/lib/prompts/portal/copilot.d.ts +0 -18
- package/lib/prompts/portal/copilot.js +0 -82
- package/lib/prompts/portal/copilot.js.map +0 -1
- package/lib/prompts/portal/quickstart.d.ts +0 -42
- package/lib/prompts/portal/quickstart.js +0 -243
- package/lib/prompts/portal/quickstart.js.map +0 -1
- package/lib/prompts/portal/recipe/new-recipe.d.ts +0 -29
- package/lib/prompts/portal/recipe/new-recipe.js +0 -165
- package/lib/prompts/portal/recipe/new-recipe.js.map +0 -1
- package/lib/prompts/portal/toc/new-toc.d.ts +0 -16
- package/lib/prompts/portal/toc/new-toc.js +0 -50
- package/lib/prompts/portal/toc/new-toc.js.map +0 -1
- package/lib/prompts/sdk/merge-source-tree.d.ts +0 -22
- package/lib/prompts/sdk/merge-source-tree.js +0 -90
- package/lib/prompts/sdk/merge-source-tree.js.map +0 -1
- package/lib/prompts/sdk/quickstart.d.ts +0 -38
- package/lib/prompts/sdk/quickstart.js +0 -196
- package/lib/prompts/sdk/quickstart.js.map +0 -1
- package/lib/prompts/sdk/save-changes.d.ts +0 -21
- package/lib/prompts/sdk/save-changes.js +0 -84
- package/lib/prompts/sdk/save-changes.js.map +0 -1
- package/lib/types/build-context.d.ts +0 -26
- package/lib/types/build-context.js +0 -111
- package/lib/types/build-context.js.map +0 -1
- package/lib/types/events/recipe-creation-failed.d.ts +0 -5
- package/lib/types/events/recipe-creation-failed.js +0 -8
- package/lib/types/events/recipe-creation-failed.js.map +0 -1
- package/lib/types/events/sdk-changes-saved.d.ts +0 -8
- package/lib/types/events/sdk-changes-saved.js +0 -11
- package/lib/types/events/sdk-changes-saved.js.map +0 -1
- package/lib/types/events/sdk-changes-tracked.d.ts +0 -8
- package/lib/types/events/sdk-changes-tracked.js +0 -11
- package/lib/types/events/sdk-changes-tracked.js.map +0 -1
- package/lib/types/events/sdk-conflicts-resolved.d.ts +0 -8
- package/lib/types/events/sdk-conflicts-resolved.js +0 -11
- package/lib/types/events/sdk-conflicts-resolved.js.map +0 -1
- package/lib/types/events/toc-creation-failed.d.ts +0 -5
- package/lib/types/events/toc-creation-failed.js +0 -8
- package/lib/types/events/toc-creation-failed.js.map +0 -1
- package/lib/types/merge-source-tree-context.d.ts +0 -28
- package/lib/types/merge-source-tree-context.js +0 -63
- package/lib/types/merge-source-tree-context.js.map +0 -1
- package/lib/types/plugin/language-entry.d.ts +0 -9
- package/lib/types/plugin/language-entry.js +0 -64
- package/lib/types/plugin/language-entry.js.map +0 -1
- package/lib/types/recipe/recipe.d.ts +0 -22
- package/lib/types/recipe/recipe.js +0 -6
- package/lib/types/recipe/recipe.js.map +0 -1
- package/lib/types/recipe-context.d.ts +0 -9
- package/lib/types/recipe-context.js +0 -26
- package/lib/types/recipe-context.js.map +0 -1
- package/lib/types/save-changes-context.d.ts +0 -17
- package/lib/types/save-changes-context.js +0 -42
- package/lib/types/save-changes-context.js.map +0 -1
- package/lib/types/sdl/sdl.d.ts +0 -10
- package/lib/types/sdl/sdl.js +0 -18
- package/lib/types/sdl/sdl.js.map +0 -1
- package/lib/types/toc/toc-components.d.ts +0 -36
- package/lib/types/toc/toc-components.js +0 -94
- package/lib/types/toc/toc-components.js.map +0 -1
- package/lib/types/toc/toc.d.ts +0 -67
- package/lib/types/toc/toc.js +0 -2
- package/lib/types/toc/toc.js.map +0 -1
- package/lib/types/toc-context.d.ts +0 -12
- package/lib/types/toc-context.js +0 -26
- package/lib/types/toc-context.js.map +0 -1
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Directory } from "./file/directory.js";
|
|
2
|
-
import { DirectoryPath } from "./file/directoryPath.js";
|
|
3
|
-
import { FilePath } from "./file/filePath.js";
|
|
4
|
-
export declare class MergeSourceTreeContext {
|
|
5
|
-
private readonly sdkWithSourceTree;
|
|
6
|
-
private readonly sdkWithoutSourceTree;
|
|
7
|
-
private readonly sourceTreePath;
|
|
8
|
-
private readonly trackChanges;
|
|
9
|
-
private readonly skipChanges;
|
|
10
|
-
private readonly hasSdkSourceTree;
|
|
11
|
-
private readonly fileService;
|
|
12
|
-
private readonly zipService;
|
|
13
|
-
private readonly gitService;
|
|
14
|
-
constructor(sdkWithSourceTree: DirectoryPath, sdkWithoutSourceTree: DirectoryPath, sourceTreePath: FilePath, trackChanges: boolean, skipChanges: boolean, hasSdkSourceTree: boolean);
|
|
15
|
-
saveSkippingChanges(): Promise<{
|
|
16
|
-
hasSkippedChangesEnabled: boolean;
|
|
17
|
-
hasSkippedCustomizations: boolean;
|
|
18
|
-
}>;
|
|
19
|
-
saveWithoutConflicts(): Promise<{
|
|
20
|
-
hasSourceTreeTracked: boolean;
|
|
21
|
-
hasSourceTreeAlreadyTracked: boolean;
|
|
22
|
-
hasAppliedCustomizations: boolean;
|
|
23
|
-
}>;
|
|
24
|
-
saveWithResolvedConflicts(): Promise<void>;
|
|
25
|
-
private saveSourceTree;
|
|
26
|
-
getConflictedFilesDirectory(): Promise<Directory>;
|
|
27
|
-
cleanUp(onCleanUpFailure: () => Promise<void>): Promise<void>;
|
|
28
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { FileService } from "../infrastructure/file-service.js";
|
|
2
|
-
import { GitService } from "../infrastructure/git-service.js";
|
|
3
|
-
import { ZipService } from "../infrastructure/zip-service.js";
|
|
4
|
-
import { FileName } from "./file/fileName.js";
|
|
5
|
-
export class MergeSourceTreeContext {
|
|
6
|
-
constructor(sdkWithSourceTree, sdkWithoutSourceTree, sourceTreePath, trackChanges, skipChanges, hasSdkSourceTree) {
|
|
7
|
-
this.sdkWithSourceTree = sdkWithSourceTree;
|
|
8
|
-
this.sdkWithoutSourceTree = sdkWithoutSourceTree;
|
|
9
|
-
this.sourceTreePath = sourceTreePath;
|
|
10
|
-
this.trackChanges = trackChanges;
|
|
11
|
-
this.skipChanges = skipChanges;
|
|
12
|
-
this.hasSdkSourceTree = hasSdkSourceTree;
|
|
13
|
-
this.fileService = new FileService();
|
|
14
|
-
this.zipService = new ZipService();
|
|
15
|
-
this.gitService = new GitService();
|
|
16
|
-
}
|
|
17
|
-
async saveSkippingChanges() {
|
|
18
|
-
if (!this.skipChanges || !await this.gitService.hasCustomBranch(this.sdkWithSourceTree)) {
|
|
19
|
-
return { hasSkippedChangesEnabled: this.skipChanges, hasSkippedCustomizations: false };
|
|
20
|
-
}
|
|
21
|
-
await Promise.all(this.gitService.getMergeFiles(this.sdkWithSourceTree).map((filePath) => this.fileService.deleteFile(filePath)));
|
|
22
|
-
await this.gitService.forceCheckoutMainBranch(this.sdkWithSourceTree);
|
|
23
|
-
await this.fileService.cleanDirectory(this.sdkWithoutSourceTree);
|
|
24
|
-
await this.fileService.copyDirectoryExcluding(this.sdkWithSourceTree, this.sdkWithoutSourceTree, [new FileName(".git")]);
|
|
25
|
-
return { hasSkippedChangesEnabled: true, hasSkippedCustomizations: true };
|
|
26
|
-
}
|
|
27
|
-
async saveWithoutConflicts() {
|
|
28
|
-
const mergeFiles = this.gitService.getMergeFiles(this.sdkWithSourceTree);
|
|
29
|
-
if (await this.fileService.fileExists(mergeFiles[0])) {
|
|
30
|
-
for (const filePath of mergeFiles) {
|
|
31
|
-
await this.fileService.deleteFile(filePath);
|
|
32
|
-
}
|
|
33
|
-
return { hasSourceTreeTracked: false, hasSourceTreeAlreadyTracked: false, hasAppliedCustomizations: false };
|
|
34
|
-
}
|
|
35
|
-
if (this.trackChanges || this.hasSdkSourceTree) {
|
|
36
|
-
await this.saveSourceTree();
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
hasSourceTreeTracked: this.trackChanges || this.hasSdkSourceTree,
|
|
40
|
-
hasSourceTreeAlreadyTracked: this.trackChanges && this.hasSdkSourceTree,
|
|
41
|
-
hasAppliedCustomizations: await this.gitService.hasCustomBranch(this.sdkWithSourceTree)
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
async saveWithResolvedConflicts() {
|
|
45
|
-
await this.gitService.commitResolvedConflicts(this.sdkWithSourceTree);
|
|
46
|
-
// Re create the sdkWithoutSourceTree using the updated resolved state of the sdkWithSourceTree
|
|
47
|
-
await this.fileService.cleanDirectory(this.sdkWithoutSourceTree);
|
|
48
|
-
await this.fileService.copyDirectoryExcluding(this.sdkWithSourceTree, this.sdkWithoutSourceTree, [new FileName(".git")]);
|
|
49
|
-
await this.saveSourceTree();
|
|
50
|
-
}
|
|
51
|
-
async saveSourceTree() {
|
|
52
|
-
await this.fileService.ensurePathExists(this.sourceTreePath);
|
|
53
|
-
await this.gitService.forceCheckoutMainBranch(this.sdkWithSourceTree);
|
|
54
|
-
await this.zipService.archive(this.sdkWithSourceTree.join(".git"), this.sourceTreePath);
|
|
55
|
-
}
|
|
56
|
-
async getConflictedFilesDirectory() {
|
|
57
|
-
return await this.gitService.getDirectoryWithUnmergedFiles(this.sdkWithSourceTree);
|
|
58
|
-
}
|
|
59
|
-
async cleanUp(onCleanUpFailure) {
|
|
60
|
-
await this.fileService.pollDeleteDirectory(this.sdkWithSourceTree, onCleanUpFailure);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=merge-source-tree-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge-source-tree-context.js","sourceRoot":"","sources":["../../src/types/merge-source-tree-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,MAAM,OAAO,sBAAsB;IAKjC,YACmB,iBAAgC,EAChC,oBAAmC,EACnC,cAAwB,EACxB,YAAqB,EACrB,WAAoB,EACpB,gBAAyB;QALzB,sBAAiB,GAAjB,iBAAiB,CAAe;QAChC,yBAAoB,GAApB,oBAAoB,CAAe;QACnC,mBAAc,GAAd,cAAc,CAAU;QACxB,iBAAY,GAAZ,YAAY,CAAS;QACrB,gBAAW,GAAX,WAAW,CAAS;QACpB,qBAAgB,GAAhB,gBAAgB,CAAS;QAV3B,gBAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAChC,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;QAC9B,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;IAS3C,CAAC;IAEE,KAAK,CAAC,mBAAmB;QAC9B,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACxF,OAAO,EAAE,wBAAwB,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,EAAE,KAAK,EAAE,CAAC;QACzF,CAAC;QACD,MAAM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gB,CAAC,CAAC;IACvF,CAAC;CACF"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GitConfiguration, PackageConfigurationForLanguage } from '../publish/package-settings-configuration.js';
|
|
2
|
-
import { SemVersion } from '../publish/version.js';
|
|
3
|
-
import { CodeGenerationVersion, Language } from '../sdk/generate.js';
|
|
4
|
-
import { PluginLanguageEntry } from './plugin-config.js';
|
|
5
|
-
/**
|
|
6
|
-
* The version rides inside the package block, so a source-only publish records no version at all —
|
|
7
|
-
* there is no package for it to describe.
|
|
8
|
-
*/
|
|
9
|
-
export declare function buildLanguageEntry<L extends Language>(language: L, gitConfiguration: GitConfiguration | undefined, packageConfiguration: PackageConfigurationForLanguage[L] | undefined, packageVersion: SemVersion, codegenVersion: CodeGenerationVersion): PluginLanguageEntry<L>;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Language } from '../sdk/generate.js';
|
|
2
|
-
const GITHUB_BASE_URL = 'https://github.com';
|
|
3
|
-
/**
|
|
4
|
-
* One builder per language, each checked against that language's own profile fields and its own
|
|
5
|
-
* entry shape. A single builder taking every language's configuration at once can only reach those
|
|
6
|
-
* fields through a cast, which is what let a mismatched pair compile.
|
|
7
|
-
*/
|
|
8
|
-
const languageEntryBuilders = {
|
|
9
|
-
[Language.CSHARP]: (source, configuration, version, codegenVersion) => ({
|
|
10
|
-
source,
|
|
11
|
-
package: (configuration === null || configuration === void 0 ? void 0 : configuration.packageId) ? { packageId: configuration.packageId, version } : undefined,
|
|
12
|
-
codegenVersion
|
|
13
|
-
}),
|
|
14
|
-
[Language.JAVA]: (source, configuration, version, codegenVersion) => ({
|
|
15
|
-
source,
|
|
16
|
-
package: (configuration === null || configuration === void 0 ? void 0 : configuration.groupId) && configuration.artifactId
|
|
17
|
-
? { groupId: configuration.groupId, artifactId: configuration.artifactId, version }
|
|
18
|
-
: undefined,
|
|
19
|
-
codegenVersion
|
|
20
|
-
}),
|
|
21
|
-
[Language.PHP]: (source, configuration, version, codegenVersion) => ({
|
|
22
|
-
source,
|
|
23
|
-
package: (configuration === null || configuration === void 0 ? void 0 : configuration.vendorName) && configuration.projectName
|
|
24
|
-
? { vendorName: configuration.vendorName, projectName: configuration.projectName, version }
|
|
25
|
-
: undefined,
|
|
26
|
-
codegenVersion
|
|
27
|
-
}),
|
|
28
|
-
[Language.PYTHON]: (source, configuration, version, codegenVersion) => ({
|
|
29
|
-
source,
|
|
30
|
-
package: (configuration === null || configuration === void 0 ? void 0 : configuration.name) ? { name: configuration.name, version } : undefined,
|
|
31
|
-
codegenVersion
|
|
32
|
-
}),
|
|
33
|
-
[Language.RUBY]: (source, configuration, version, codegenVersion) => ({
|
|
34
|
-
source,
|
|
35
|
-
package: (configuration === null || configuration === void 0 ? void 0 : configuration.name) ? { name: configuration.name, version } : undefined,
|
|
36
|
-
codegenVersion
|
|
37
|
-
}),
|
|
38
|
-
[Language.TYPESCRIPT]: (source, configuration, version, codegenVersion) => ({
|
|
39
|
-
source,
|
|
40
|
-
package: (configuration === null || configuration === void 0 ? void 0 : configuration.name) ? { name: configuration.name, version } : undefined,
|
|
41
|
-
codegenVersion
|
|
42
|
-
}),
|
|
43
|
-
[Language.GO]: (source, configuration, version, codegenVersion) => ({
|
|
44
|
-
source,
|
|
45
|
-
package: (configuration === null || configuration === void 0 ? void 0 : configuration.packageName) ? { packageName: configuration.packageName, version } : undefined,
|
|
46
|
-
codegenVersion
|
|
47
|
-
})
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* The version rides inside the package block, so a source-only publish records no version at all —
|
|
51
|
-
* there is no package for it to describe.
|
|
52
|
-
*/
|
|
53
|
-
export function buildLanguageEntry(language, gitConfiguration, packageConfiguration, packageVersion, codegenVersion) {
|
|
54
|
-
var _a;
|
|
55
|
-
const repositoryName = (_a = gitConfiguration === null || gitConfiguration === void 0 ? void 0 : gitConfiguration.repositoryName) === null || _a === void 0 ? void 0 : _a.trim();
|
|
56
|
-
const source = repositoryName
|
|
57
|
-
? {
|
|
58
|
-
repositoryUrl: `${GITHUB_BASE_URL}/${repositoryName}`,
|
|
59
|
-
branch: (gitConfiguration === null || gitConfiguration === void 0 ? void 0 : gitConfiguration.branch) ? gitConfiguration.branch : undefined
|
|
60
|
-
}
|
|
61
|
-
: undefined;
|
|
62
|
-
return languageEntryBuilders[language](source, packageConfiguration, packageVersion.toString(), codegenVersion);
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=language-entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"language-entry.js","sourceRoot":"","sources":["../../../src/types/plugin/language-entry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGrE,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAS7C;;;;GAIG;AACH,MAAM,qBAAqB,GAAiD;IAC1E,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC;QACtE,MAAM;QACN,OAAO,EAAE,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,SAAS,EAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS;QAC/F,cAAc;KACf,CAAC;IACF,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC;QACpE,MAAM;QACN,OAAO,EACL,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,KAAI,aAAa,CAAC,UAAU;YAChD,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,OAAO,EAAE,UAAU,EAAE,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE;YACnF,CAAC,CAAC,SAAS;QACf,cAAc;KACf,CAAC;IACF,CAAC,QAAQ,CAA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EAAE,CAAC,CAAC,CAAC,SAAS;QAChF,cAAc;KACf,CAAC;IACF,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC;QAClE,MAAM;QACN,OAAO,EAAE,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,WAAW,EAAC,CAAC,CAAC,EAAE,WAAW,EAAE,aAAa,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS;QACrG,cAAc;KACf,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,QAAW,EACX,gBAA8C,EAC9C,oBAAoE,EACpE,cAA0B,EAC1B,cAAqC;;IAErC,MAAM,cAAc,GAAG,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,cAAc,0CAAE,IAAI,EAAE,CAAC;IAChE,MAAM,MAAM,GAAG,cAAc;QAC3B,CAAC,CAAC;YACE,aAAa,EAAE,GAAG,eAAe,IAAI,cAAc,EAAE;YACrD,MAAM,EAAE,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,EAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;SACvE;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO,qBAAqB,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,oBAAoB,EAAE,cAAc,CAAC,QAAQ,EAAE,EAAE,cAAc,CAAC,CAAC;AAClH,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export declare enum StepType {
|
|
2
|
-
Content = "content",
|
|
3
|
-
Endpoint = "endpoint"
|
|
4
|
-
}
|
|
5
|
-
export interface EndpointConfig {
|
|
6
|
-
description: string;
|
|
7
|
-
endpointPermalink: string;
|
|
8
|
-
}
|
|
9
|
-
export interface SerializableRecipe {
|
|
10
|
-
name: string;
|
|
11
|
-
steps: SerializableStep[];
|
|
12
|
-
}
|
|
13
|
-
export interface SerializableStep {
|
|
14
|
-
key: string;
|
|
15
|
-
name: string;
|
|
16
|
-
type: StepType;
|
|
17
|
-
config: ContentStepConfig | EndpointStepConfig;
|
|
18
|
-
}
|
|
19
|
-
export interface ContentStepConfig {
|
|
20
|
-
content: string;
|
|
21
|
-
}
|
|
22
|
-
export type EndpointStepConfig = EndpointConfig;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../../src/types/recipe/recipe.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;AACvB,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FileName } from "./file/fileName.js";
|
|
2
|
-
import { Toc } from "./toc/toc.js";
|
|
3
|
-
export declare class RecipeContext {
|
|
4
|
-
private readonly recipeName;
|
|
5
|
-
constructor(recipeName: string);
|
|
6
|
-
getRecipeScriptFileName(): FileName;
|
|
7
|
-
getRecipeMarkdownFileName(): FileName;
|
|
8
|
-
exists(tocData: Toc, recipeName: string, recipeMarkdownFileName: FileName): boolean;
|
|
9
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { toPascalCase } from "../utils/utils.js";
|
|
2
|
-
import { FileName } from "./file/fileName.js";
|
|
3
|
-
export class RecipeContext {
|
|
4
|
-
constructor(recipeName) {
|
|
5
|
-
this.recipeName = recipeName;
|
|
6
|
-
}
|
|
7
|
-
getRecipeScriptFileName() {
|
|
8
|
-
return new FileName(toPascalCase(this.recipeName.trim()) + `.js`);
|
|
9
|
-
}
|
|
10
|
-
getRecipeMarkdownFileName() {
|
|
11
|
-
return new FileName(toPascalCase(this.recipeName.trim() + `.md`));
|
|
12
|
-
}
|
|
13
|
-
exists(tocData, recipeName, recipeMarkdownFileName) {
|
|
14
|
-
var _a;
|
|
15
|
-
let apiRecipesGroup = (_a = tocData.toc) === null || _a === void 0 ? void 0 : _a.find((item) => "group" in item && item.group === "API Recipes");
|
|
16
|
-
if (!apiRecipesGroup || !("items" in apiRecipesGroup)) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
// Check if the recipe name or file name already exists
|
|
20
|
-
const existingRecipe = apiRecipesGroup.items.find((item) => "page" in item &&
|
|
21
|
-
"file" in item &&
|
|
22
|
-
(item.page === recipeName || item.file === `recipes/${recipeMarkdownFileName}`));
|
|
23
|
-
return !!existingRecipe;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=recipe-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recipe-context.js","sourceRoot":"","sources":["../../src/types/recipe-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,MAAM,OAAO,aAAa;IACxB,YAA6B,UAAkB;QAAlB,eAAU,GAAV,UAAU,CAAQ;IAAG,CAAC;IAE5C,uBAAuB;QAC5B,OAAO,IAAI,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC;IACpE,CAAC;IAEM,yBAAyB;QAC9B,OAAO,IAAI,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;IACpE,CAAC;IAEM,MAAM,CAAC,OAAY,EAAE,UAAkB,EAAE,sBAAgC;;QAC9E,IAAI,eAAe,GAAG,MAAA,OAAO,CAAC,GAAG,0CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,aAAa,CAAC,CAAC;QACnG,IAAI,CAAC,eAAe,IAAI,CAAC,CAAC,OAAO,IAAI,eAAe,CAAC,EAAE,CAAC;YACtD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,uDAAuD;QACvD,MAAM,cAAc,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAC/C,CAAC,IAAI,EAAE,EAAE,CACP,MAAM,IAAI,IAAI;YACd,MAAM,IAAI,IAAI;YACd,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,sBAAsB,EAAE,CAAC,CAClF,CAAC;QACF,OAAO,CAAC,CAAC,cAAc,CAAC;IAC1B,CAAC;CACF"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Directory } from "./file/directory.js";
|
|
2
|
-
import { DirectoryPath } from "./file/directoryPath.js";
|
|
3
|
-
import { FilePath } from "./file/filePath.js";
|
|
4
|
-
import { Language } from "./sdk/generate.js";
|
|
5
|
-
export declare class SaveChangesContext {
|
|
6
|
-
private readonly sourceTreePath;
|
|
7
|
-
private readonly sdkReviewDirectory;
|
|
8
|
-
private readonly fileService;
|
|
9
|
-
private readonly zipService;
|
|
10
|
-
private readonly gitService;
|
|
11
|
-
private readonly sdkInputDirectory;
|
|
12
|
-
constructor(sourceTreePath: FilePath, sdkReviewDirectory: DirectoryPath, sdkInputDirectory: DirectoryPath | undefined, workingDirectory: DirectoryPath, language: Language, version: string | undefined);
|
|
13
|
-
isSdkInputDirectoryMissing(onMissingDirectory: (directory: DirectoryPath) => void): Promise<boolean>;
|
|
14
|
-
getChangesForReviewDirectory(): Promise<Directory>;
|
|
15
|
-
cleanUpSdkReviewDirectory(onCleanUpFailure: () => void): Promise<void>;
|
|
16
|
-
saveSourceTree(): Promise<void>;
|
|
17
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { FileService } from "../infrastructure/file-service.js";
|
|
2
|
-
import { GitService } from "../infrastructure/git-service.js";
|
|
3
|
-
import { ZipService } from "../infrastructure/zip-service.js";
|
|
4
|
-
import { FileName } from "./file/fileName.js";
|
|
5
|
-
export class SaveChangesContext {
|
|
6
|
-
constructor(sourceTreePath, sdkReviewDirectory, sdkInputDirectory, workingDirectory, language, version) {
|
|
7
|
-
this.sourceTreePath = sourceTreePath;
|
|
8
|
-
this.sdkReviewDirectory = sdkReviewDirectory;
|
|
9
|
-
this.fileService = new FileService();
|
|
10
|
-
this.zipService = new ZipService();
|
|
11
|
-
this.gitService = new GitService();
|
|
12
|
-
this.sdkInputDirectory = sdkInputDirectory !== null && sdkInputDirectory !== void 0 ? sdkInputDirectory : (version
|
|
13
|
-
? workingDirectory.join("sdk").join(version).join(language)
|
|
14
|
-
: workingDirectory.join("sdk").join(language));
|
|
15
|
-
}
|
|
16
|
-
async isSdkInputDirectoryMissing(onMissingDirectory) {
|
|
17
|
-
if (await this.fileService.directoryEmpty(this.sdkInputDirectory)) {
|
|
18
|
-
onMissingDirectory(this.sdkInputDirectory);
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
async getChangesForReviewDirectory() {
|
|
24
|
-
const sdkGitDir = this.sdkReviewDirectory.join(".git");
|
|
25
|
-
await this.fileService.createDirectoryIfNotExists(sdkGitDir);
|
|
26
|
-
await this.zipService.unArchive(this.sourceTreePath, sdkGitDir);
|
|
27
|
-
await this.gitService.checkoutCustomBranch(this.sdkReviewDirectory);
|
|
28
|
-
await this.fileService.cleanDirectoryExcluding(this.sdkReviewDirectory, [new FileName(".git")]);
|
|
29
|
-
await this.fileService.copyDirectoryExcluding(this.sdkInputDirectory, this.sdkReviewDirectory, [new FileName(".git")]);
|
|
30
|
-
return this.gitService.getDirectoryWithUpdatedFiles(this.sdkReviewDirectory);
|
|
31
|
-
}
|
|
32
|
-
async cleanUpSdkReviewDirectory(onCleanUpFailure) {
|
|
33
|
-
await this.fileService.pollDeleteDirectory(this.sdkReviewDirectory, onCleanUpFailure);
|
|
34
|
-
}
|
|
35
|
-
async saveSourceTree() {
|
|
36
|
-
const sdkGitDir = this.sdkReviewDirectory.join(".git");
|
|
37
|
-
await this.gitService.commitReviewedChanges(this.sdkReviewDirectory);
|
|
38
|
-
await this.gitService.forceCheckoutMainBranch(this.sdkReviewDirectory);
|
|
39
|
-
await this.zipService.archive(sdkGitDir, this.sourceTreePath);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=save-changes-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"save-changes-context.js","sourceRoot":"","sources":["../../src/types/save-changes-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAI9C,MAAM,OAAO,kBAAkB;IAM7B,YACmB,cAAwB,EACxB,kBAAiC,EAClD,iBAA4C,EAC5C,gBAA+B,EAC/B,QAAkB,EAClB,OAA2B;QALV,mBAAc,GAAd,cAAc,CAAU;QACxB,uBAAkB,GAAlB,kBAAkB,CAAe;QAPnC,gBAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAChC,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;QAC9B,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;QAW7C,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,aAAjB,iBAAiB,cAAjB,iBAAiB,GAAI,CAAC,OAAO;YAClD,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC3D,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,C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GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvD,MAAM,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACrE,MAAM,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACvE,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAChE,CAAC;CACF"}
|
package/lib/types/sdl/sdl.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface Sdl {
|
|
2
|
-
readonly Endpoints: SdlEndpoint[];
|
|
3
|
-
}
|
|
4
|
-
export interface SdlEndpoint {
|
|
5
|
-
readonly Name: string;
|
|
6
|
-
readonly Description: string;
|
|
7
|
-
readonly Group: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function getEndpointDescription(endpointGroups: Map<string, SdlEndpoint[]>, endpointGroupName: string, endpointName: string): string;
|
|
10
|
-
export declare function getEndpointGroupsFromSdl(sdl: Sdl): Map<string, SdlEndpoint[]>;
|
package/lib/types/sdl/sdl.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export function getEndpointDescription(endpointGroups, endpointGroupName, endpointName) {
|
|
2
|
-
return endpointGroups.get(endpointGroupName).find((e) => e.Name === endpointName).Description;
|
|
3
|
-
}
|
|
4
|
-
export function getEndpointGroupsFromSdl(sdl) {
|
|
5
|
-
const endpointGroups = new Map();
|
|
6
|
-
for (const endpoint of sdl.Endpoints) {
|
|
7
|
-
if (!endpointGroups.has(endpoint.Group)) {
|
|
8
|
-
endpointGroups.set(endpoint.Group, []);
|
|
9
|
-
}
|
|
10
|
-
endpointGroups.get(endpoint.Group).push({
|
|
11
|
-
Name: endpoint.Name,
|
|
12
|
-
Description: endpoint.Description,
|
|
13
|
-
Group: endpoint.Group
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return endpointGroups;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=sdl.js.map
|
package/lib/types/sdl/sdl.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdl.js","sourceRoot":"","sources":["../../../src/types/sdl/sdl.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,sBAAsB,CACpC,cAA0C,EAC1C,iBAAyB,EACzB,YAAoB;IAEpB,OAAO,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAE,CAAC,WAAW,CAAC;AAClG,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,GAAQ;IAC/C,MAAM,cAAc,GAAG,IAAI,GAAG,EAAyB,CAAC;IACxD,KAAK,MAAM,QAAQ,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;QACrC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACxC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACzC,CAAC;QAED,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAE,CAAC,IAAI,CAAC;YACvC,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,KAAK,EAAE,QAAQ,CAAC,KAAK;SACtB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { TocEndpointPage, TocModelPage, TocWebhookPage, TocCallbackPage, TocContainerModelPage, TocInputModelPage } from './toc.js';
|
|
2
|
-
export interface InputModel {
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly group: string;
|
|
5
|
-
}
|
|
6
|
-
export interface TocData {
|
|
7
|
-
readonly endpoints: Record<string, string[]>;
|
|
8
|
-
readonly models: string[];
|
|
9
|
-
readonly enums: string[];
|
|
10
|
-
readonly errors: string[];
|
|
11
|
-
readonly webhooks: Record<string, string[]>;
|
|
12
|
-
readonly callbacks: Record<string, string[]>;
|
|
13
|
-
readonly containers: string[];
|
|
14
|
-
readonly inputModels: InputModel[];
|
|
15
|
-
}
|
|
16
|
-
export type EndpointGroups = Map<string, TocEndpointPage[]>;
|
|
17
|
-
export type WebhookGroups = Map<string, TocWebhookPage[]>;
|
|
18
|
-
export type CallbackGroups = Map<string, TocCallbackPage[]>;
|
|
19
|
-
export declare class TocComponents {
|
|
20
|
-
readonly endpointGroups: EndpointGroups;
|
|
21
|
-
readonly models: TocModelPage[];
|
|
22
|
-
readonly enums: TocModelPage[];
|
|
23
|
-
readonly errors: TocModelPage[];
|
|
24
|
-
readonly containerModels: TocContainerModelPage[];
|
|
25
|
-
readonly inputModels: TocInputModelPage[];
|
|
26
|
-
readonly webhookGroups: WebhookGroups;
|
|
27
|
-
readonly callbackGroups: CallbackGroups;
|
|
28
|
-
private constructor();
|
|
29
|
-
static fromTocData(tocData: TocData): TocComponents;
|
|
30
|
-
private static toEndpointGroups;
|
|
31
|
-
private static toTocModelPages;
|
|
32
|
-
private static toTocContainerModelPages;
|
|
33
|
-
private static toTocInputModelPages;
|
|
34
|
-
private static toWebhookGroups;
|
|
35
|
-
private static toCallbackGroups;
|
|
36
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
export class TocComponents {
|
|
2
|
-
constructor(endpointGroups, models, enums, errors, containerModels, inputModels, webhookGroups, callbackGroups) {
|
|
3
|
-
this.endpointGroups = endpointGroups;
|
|
4
|
-
this.models = models;
|
|
5
|
-
this.enums = enums;
|
|
6
|
-
this.errors = errors;
|
|
7
|
-
this.containerModels = containerModels;
|
|
8
|
-
this.inputModels = inputModels;
|
|
9
|
-
this.webhookGroups = webhookGroups;
|
|
10
|
-
this.callbackGroups = callbackGroups;
|
|
11
|
-
}
|
|
12
|
-
static fromTocData(tocData) {
|
|
13
|
-
return new TocComponents(TocComponents.toEndpointGroups(tocData.endpoints), TocComponents.toTocModelPages(tocData.models), TocComponents.toTocModelPages(tocData.enums), TocComponents.toTocModelPages(tocData.errors), TocComponents.toTocContainerModelPages(tocData.containers), TocComponents.toTocInputModelPages(tocData.inputModels), TocComponents.toWebhookGroups(tocData.webhooks), TocComponents.toCallbackGroups(tocData.callbacks));
|
|
14
|
-
}
|
|
15
|
-
static toEndpointGroups(endpoints) {
|
|
16
|
-
return new Map(Object.entries(endpoints).map(([group, names]) => [
|
|
17
|
-
group,
|
|
18
|
-
[
|
|
19
|
-
{
|
|
20
|
-
generate: null,
|
|
21
|
-
from: 'endpoint-group-overview',
|
|
22
|
-
endpointGroup: group
|
|
23
|
-
},
|
|
24
|
-
...names.map((name) => ({
|
|
25
|
-
generate: null,
|
|
26
|
-
from: 'endpoint',
|
|
27
|
-
endpointName: name,
|
|
28
|
-
endpointGroup: group
|
|
29
|
-
}))
|
|
30
|
-
]
|
|
31
|
-
]));
|
|
32
|
-
}
|
|
33
|
-
static toTocModelPages(models) {
|
|
34
|
-
return models.map((name) => ({
|
|
35
|
-
generate: null,
|
|
36
|
-
from: 'model',
|
|
37
|
-
modelName: name
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
static toTocContainerModelPages(containers) {
|
|
41
|
-
return containers.map((name) => ({
|
|
42
|
-
generate: null,
|
|
43
|
-
from: 'container',
|
|
44
|
-
containerName: name
|
|
45
|
-
}));
|
|
46
|
-
}
|
|
47
|
-
static toTocInputModelPages(inputModels) {
|
|
48
|
-
return inputModels.map((m) => ({
|
|
49
|
-
generate: null,
|
|
50
|
-
from: 'input-model',
|
|
51
|
-
endpointName: m.name,
|
|
52
|
-
endpointGroup: m.group
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
|
-
static toWebhookGroups(webhooks) {
|
|
56
|
-
return new Map(Object.entries(webhooks)
|
|
57
|
-
.map(([group, names]) => [
|
|
58
|
-
group,
|
|
59
|
-
[
|
|
60
|
-
{
|
|
61
|
-
generate: null,
|
|
62
|
-
from: 'webhook-group-overview',
|
|
63
|
-
webhookGroup: group
|
|
64
|
-
},
|
|
65
|
-
...names.map((name) => ({
|
|
66
|
-
generate: null,
|
|
67
|
-
from: 'webhook',
|
|
68
|
-
webhookName: name,
|
|
69
|
-
webhookGroup: group
|
|
70
|
-
}))
|
|
71
|
-
]
|
|
72
|
-
]));
|
|
73
|
-
}
|
|
74
|
-
static toCallbackGroups(callbacks) {
|
|
75
|
-
return new Map(Object.entries(callbacks)
|
|
76
|
-
.map(([group, names]) => [
|
|
77
|
-
group,
|
|
78
|
-
[
|
|
79
|
-
{
|
|
80
|
-
generate: null,
|
|
81
|
-
from: 'callback-group-overview',
|
|
82
|
-
callbackGroup: group
|
|
83
|
-
},
|
|
84
|
-
...names.map((name) => ({
|
|
85
|
-
generate: null,
|
|
86
|
-
from: 'callback',
|
|
87
|
-
callbackName: name,
|
|
88
|
-
callbackGroup: group
|
|
89
|
-
}))
|
|
90
|
-
]
|
|
91
|
-
]));
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=toc-components.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toc-components.js","sourceRoot":"","sources":["../../../src/types/toc/toc-components.ts"],"names":[],"mappings":"AAgCA,MAAM,OAAO,aAAa;IAUxB,YACE,cAA8B,EAC9B,MAAsB,EACtB,KAAqB,EACrB,MAAsB,EACtB,eAAwC,EACxC,WAAgC,EAChC,aAA4B,EAC5B,cAA8B;QAE9B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,I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IAAI,GAAG,CACZ,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;aACtB,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAA+B,EAAE,CAAC;YACpD,KAAK;YACL;gBACE;oBACE,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE,yBAAyB;oBAC/B,aAAa,EAAE,KAAK;iBACrB;gBACD,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAe,EAAE,CAAC,CAAC;oBACnC,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE,UAAU;oBAChB,YAAY,EAAE,IAAI;oBAClB,aAAa,EAAE,KAAK;iBACrB,CAAC,CAAC;aACJ;SACF,CAAC,CACL,CAAC;IACJ,CAAC;CACF"}
|
package/lib/types/toc/toc.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export interface Toc {
|
|
2
|
-
toc: Array<TocGroup | TocGenerated>;
|
|
3
|
-
}
|
|
4
|
-
export interface TocGroup {
|
|
5
|
-
readonly group: string;
|
|
6
|
-
readonly items: Array<TocGroup | TocGenerated | TocEndpointPage | TocWebhookPage | TocCallbackPage | TocModelPage | TocCustomPage>;
|
|
7
|
-
}
|
|
8
|
-
export interface TocGenerated {
|
|
9
|
-
readonly generate: string | null;
|
|
10
|
-
readonly from: string;
|
|
11
|
-
}
|
|
12
|
-
export type TocEndpointPage = TocEndpoint | TocEndpointGroupOverview;
|
|
13
|
-
export type TocWebhookPage = TocWebhook | TocWebhookOverview;
|
|
14
|
-
export type TocCallbackPage = TocCallback | TocCallbackOverview;
|
|
15
|
-
export interface TocEndpointGroupOverview {
|
|
16
|
-
readonly generate: null;
|
|
17
|
-
readonly from: 'endpoint-group-overview';
|
|
18
|
-
readonly endpointGroup: string;
|
|
19
|
-
}
|
|
20
|
-
export interface TocEndpoint {
|
|
21
|
-
readonly generate: null;
|
|
22
|
-
readonly from: 'endpoint';
|
|
23
|
-
readonly endpointName: string;
|
|
24
|
-
readonly endpointGroup: string;
|
|
25
|
-
}
|
|
26
|
-
export interface TocModelPage {
|
|
27
|
-
readonly generate: null;
|
|
28
|
-
readonly from: 'model';
|
|
29
|
-
readonly modelName: string;
|
|
30
|
-
}
|
|
31
|
-
export interface TocContainerModelPage {
|
|
32
|
-
readonly generate: null;
|
|
33
|
-
readonly from: 'container';
|
|
34
|
-
readonly containerName: string;
|
|
35
|
-
}
|
|
36
|
-
export interface TocInputModelPage {
|
|
37
|
-
readonly generate: null;
|
|
38
|
-
readonly from: 'input-model';
|
|
39
|
-
readonly endpointName: string;
|
|
40
|
-
readonly endpointGroup: string;
|
|
41
|
-
}
|
|
42
|
-
export interface TocWebhookOverview {
|
|
43
|
-
readonly generate: null;
|
|
44
|
-
readonly from: 'webhook-group-overview';
|
|
45
|
-
readonly webhookGroup: string | null;
|
|
46
|
-
}
|
|
47
|
-
export interface TocWebhook {
|
|
48
|
-
readonly generate: null;
|
|
49
|
-
readonly from: 'webhook';
|
|
50
|
-
readonly webhookName: string;
|
|
51
|
-
readonly webhookGroup: string | null;
|
|
52
|
-
}
|
|
53
|
-
export interface TocCallbackOverview {
|
|
54
|
-
readonly generate: null;
|
|
55
|
-
readonly from: 'callback-group-overview';
|
|
56
|
-
readonly callbackGroup: string | null;
|
|
57
|
-
}
|
|
58
|
-
export interface TocCallback {
|
|
59
|
-
readonly generate: null;
|
|
60
|
-
readonly from: 'callback';
|
|
61
|
-
readonly callbackName: string;
|
|
62
|
-
readonly callbackGroup: string | null;
|
|
63
|
-
}
|
|
64
|
-
export interface TocCustomPage {
|
|
65
|
-
readonly page: string;
|
|
66
|
-
readonly file: string;
|
|
67
|
-
}
|
package/lib/types/toc/toc.js
DELETED
package/lib/types/toc/toc.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toc.js","sourceRoot":"","sources":["../../../src/types/toc/toc.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DirectoryPath } from "./file/directoryPath.js";
|
|
2
|
-
import { FilePath } from "./file/filePath.js";
|
|
3
|
-
import { Toc } from "./toc/toc.js";
|
|
4
|
-
export declare class TocContext {
|
|
5
|
-
private readonly fileService;
|
|
6
|
-
private readonly tocFilePath;
|
|
7
|
-
constructor(tocDirectory: DirectoryPath);
|
|
8
|
-
get tocPath(): FilePath;
|
|
9
|
-
exists(): Promise<boolean>;
|
|
10
|
-
parseTocData(): Promise<Toc>;
|
|
11
|
-
save(contents: string): Promise<FilePath>;
|
|
12
|
-
}
|
package/lib/types/toc-context.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { FileService } from "../infrastructure/file-service.js";
|
|
2
|
-
import { FilePath } from "./file/filePath.js";
|
|
3
|
-
import { FileName } from "./file/fileName.js";
|
|
4
|
-
import { parse } from "yaml";
|
|
5
|
-
export class TocContext {
|
|
6
|
-
constructor(tocDirectory) {
|
|
7
|
-
this.fileService = new FileService();
|
|
8
|
-
this.tocFilePath = new FilePath(tocDirectory, new FileName("toc.yml"));
|
|
9
|
-
}
|
|
10
|
-
get tocPath() {
|
|
11
|
-
return this.tocFilePath;
|
|
12
|
-
}
|
|
13
|
-
async exists() {
|
|
14
|
-
return await this.fileService.fileExists(this.tocFilePath);
|
|
15
|
-
}
|
|
16
|
-
async parseTocData() {
|
|
17
|
-
const tocContent = await this.fileService.getContents(this.tocFilePath);
|
|
18
|
-
return parse(tocContent);
|
|
19
|
-
}
|
|
20
|
-
async save(contents) {
|
|
21
|
-
await this.fileService.ensurePathExists(this.tocFilePath);
|
|
22
|
-
await this.fileService.writeContents(this.tocFilePath, contents);
|
|
23
|
-
return this.tocPath;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=toc-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toc-context.js","sourceRoot":"","sources":["../../src/types/toc-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,MAAM,OAAO,UAAU;IAIrB,YAAY,YAA2B;QAHtB,gBAAW,GAAG,IAAI,WAAW,EAAE,CAAC;QAI/C,IAAI,CAAC,WAAW,GAAG,IAAI,QAAQ,CAAC,YAAY,EAAE,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IACzE,CAAC;IAED,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7D,CAAC;IAEM,KAAK,CAAC,YAAY;QACvB,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACxE,OAAO,KAAK,CAAC,UAAU,CAAQ,CAAC;IAClC,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,QAAgB;QAChC,MAAM,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC1D,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF"}
|