@apimatic/cli 1.5.0 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +128 -212
- package/apimatic.schema.json +550 -0
- package/lib/actions/action-result.js +3 -0
- package/lib/actions/action-result.js.map +1 -1
- package/lib/actions/api/transform.js +36 -33
- package/lib/actions/api/transform.js.map +1 -1
- package/lib/actions/api/validate.d.ts +9 -6
- package/lib/actions/api/validate.js +44 -38
- package/lib/actions/api/validate.js.map +1 -1
- package/lib/actions/auth/login.js +7 -4
- package/lib/actions/auth/login.js.map +1 -1
- package/lib/actions/auth/logout.js +2 -1
- package/lib/actions/auth/logout.js.map +1 -1
- package/lib/actions/auth/status.js +5 -3
- package/lib/actions/auth/status.js.map +1 -1
- package/lib/actions/plugin/generate.d.ts +5 -1
- package/lib/actions/plugin/generate.js +83 -56
- package/lib/actions/plugin/generate.js.map +1 -1
- package/lib/actions/plugin/publish.d.ts +2 -1
- package/lib/actions/plugin/publish.js +34 -37
- package/lib/actions/plugin/publish.js.map +1 -1
- package/lib/actions/plugin/record-metadata.d.ts +3 -2
- package/lib/actions/plugin/record-metadata.js +33 -30
- package/lib/actions/plugin/record-metadata.js.map +1 -1
- package/lib/actions/portal/generate.d.ts +8 -6
- package/lib/actions/portal/generate.js +50 -61
- package/lib/actions/portal/generate.js.map +1 -1
- package/lib/actions/portal/prepare-project.d.ts +25 -0
- package/lib/actions/portal/prepare-project.js +68 -0
- package/lib/actions/portal/prepare-project.js.map +1 -0
- package/lib/actions/portal/serve.d.ts +21 -6
- package/lib/actions/portal/serve.js +170 -153
- package/lib/actions/portal/serve.js.map +1 -1
- package/lib/actions/publishing/profile/list.js +4 -2
- package/lib/actions/publishing/profile/list.js.map +1 -1
- package/lib/actions/quickstart.d.ts +23 -5
- package/lib/actions/quickstart.js +222 -21
- package/lib/actions/quickstart.js.map +1 -1
- package/lib/actions/sdk/generate.d.ts +4 -7
- package/lib/actions/sdk/generate.js +53 -93
- package/lib/actions/sdk/generate.js.map +1 -1
- package/lib/actions/sdk/publish/interactive.d.ts +4 -3
- package/lib/actions/sdk/publish/interactive.js +96 -97
- package/lib/actions/sdk/publish/interactive.js.map +1 -1
- package/lib/actions/sdk/publish/non-interactive.d.ts +4 -2
- package/lib/actions/sdk/publish/non-interactive.js +91 -90
- package/lib/actions/sdk/publish/non-interactive.js.map +1 -1
- package/lib/actions/sdk/publish.d.ts +3 -2
- package/lib/actions/sdk/publish.js +55 -53
- package/lib/actions/sdk/publish.js.map +1 -1
- package/lib/actions/sdk/record-published-sdk.d.ts +14 -0
- package/lib/actions/sdk/record-published-sdk.js +57 -0
- package/lib/actions/sdk/record-published-sdk.js.map +1 -0
- package/lib/client-utils/auth-manager.js +1 -1
- package/lib/client-utils/auth-manager.js.map +1 -1
- package/lib/commands/api/transform.d.ts +1 -1
- package/lib/commands/api/transform.js +44 -40
- package/lib/commands/api/transform.js.map +1 -1
- package/lib/commands/api/validate.js +16 -16
- package/lib/commands/api/validate.js.map +1 -1
- package/lib/commands/auth/login.js +14 -15
- package/lib/commands/auth/login.js.map +1 -1
- package/lib/commands/auth/logout.js +5 -6
- package/lib/commands/auth/logout.js.map +1 -1
- package/lib/commands/auth/status.js +4 -5
- package/lib/commands/auth/status.js.map +1 -1
- package/lib/commands/plugin/generate.d.ts +3 -3
- package/lib/commands/plugin/generate.js +20 -20
- package/lib/commands/plugin/generate.js.map +1 -1
- package/lib/commands/plugin/publish.js +18 -18
- package/lib/commands/plugin/publish.js.map +1 -1
- package/lib/commands/portal/generate.d.ts +9 -8
- package/lib/commands/portal/generate.js +36 -27
- package/lib/commands/portal/generate.js.map +1 -1
- package/lib/commands/portal/serve.d.ts +7 -9
- package/lib/commands/portal/serve.js +41 -44
- package/lib/commands/portal/serve.js.map +1 -1
- package/lib/commands/publishing/profile/list.js +8 -12
- package/lib/commands/publishing/profile/list.js.map +1 -1
- package/lib/commands/quickstart.d.ts +5 -5
- package/lib/commands/quickstart.js +18 -24
- package/lib/commands/quickstart.js.map +1 -1
- package/lib/commands/sdk/generate.d.ts +5 -7
- package/lib/commands/sdk/generate.js +58 -70
- package/lib/commands/sdk/generate.js.map +1 -1
- package/lib/commands/sdk/publish.d.ts +6 -7
- package/lib/commands/sdk/publish.js +66 -60
- package/lib/commands/sdk/publish.js.map +1 -1
- package/lib/hooks/node-version.d.ts +3 -0
- package/lib/hooks/node-version.js +12 -0
- package/lib/hooks/node-version.js.map +1 -0
- package/lib/hooks/not-found.js +2 -3
- package/lib/hooks/not-found.js.map +1 -1
- package/lib/hooks/utils.d.ts +4 -2
- package/lib/hooks/utils.js +2 -2
- package/lib/hooks/utils.js.map +1 -1
- package/lib/infrastructure/env-info.d.ts +3 -0
- package/lib/infrastructure/env-info.js +13 -6
- package/lib/infrastructure/env-info.js.map +1 -1
- package/lib/infrastructure/file-service.d.ts +35 -8
- package/lib/infrastructure/file-service.js +149 -53
- package/lib/infrastructure/file-service.js.map +1 -1
- package/lib/infrastructure/file-watch-service.d.ts +40 -0
- package/lib/infrastructure/file-watch-service.js +167 -0
- package/lib/infrastructure/file-watch-service.js.map +1 -0
- package/lib/infrastructure/generation-status-poller.d.ts +8 -7
- package/lib/infrastructure/generation-status-poller.js +20 -12
- package/lib/infrastructure/generation-status-poller.js.map +1 -1
- package/lib/infrastructure/launcher-service.js +6 -6
- package/lib/infrastructure/launcher-service.js.map +1 -1
- package/lib/infrastructure/network-service.d.ts +3 -0
- package/lib/infrastructure/network-service.js +15 -1
- package/lib/infrastructure/network-service.js.map +1 -1
- package/lib/infrastructure/portal-build-service.d.ts +19 -0
- package/lib/infrastructure/portal-build-service.js +58 -0
- package/lib/infrastructure/portal-build-service.js.map +1 -0
- package/lib/infrastructure/portal-dev-server-service.d.ts +29 -0
- package/lib/infrastructure/portal-dev-server-service.js +135 -0
- package/lib/infrastructure/portal-dev-server-service.js.map +1 -0
- package/lib/infrastructure/portal-pages-service.d.ts +17 -0
- package/lib/infrastructure/portal-pages-service.js +103 -0
- package/lib/infrastructure/portal-pages-service.js.map +1 -0
- package/lib/infrastructure/portal-project-service.d.ts +77 -0
- package/lib/infrastructure/portal-project-service.js +309 -0
- package/lib/infrastructure/portal-project-service.js.map +1 -0
- package/lib/infrastructure/service-error.d.ts +1 -0
- package/lib/infrastructure/service-error.js +39 -41
- package/lib/infrastructure/service-error.js.map +1 -1
- package/lib/infrastructure/services/api-client-factory.js +15 -13
- package/lib/infrastructure/services/api-client-factory.js.map +1 -1
- package/lib/infrastructure/services/api-service.d.ts +7 -5
- package/lib/infrastructure/services/api-service.js +28 -20
- package/lib/infrastructure/services/api-service.js.map +1 -1
- package/lib/infrastructure/services/auth-service.js +4 -9
- package/lib/infrastructure/services/auth-service.js.map +1 -1
- package/lib/infrastructure/services/file-download-service.js +3 -3
- package/lib/infrastructure/services/file-download-service.js.map +1 -1
- package/lib/infrastructure/services/plugin-service.d.ts +1 -8
- package/lib/infrastructure/services/plugin-service.js +11 -22
- package/lib/infrastructure/services/plugin-service.js.map +1 -1
- package/lib/infrastructure/services/portal-artifacts-service.d.ts +44 -0
- package/lib/infrastructure/services/portal-artifacts-service.js +268 -0
- package/lib/infrastructure/services/portal-artifacts-service.js.map +1 -0
- package/lib/infrastructure/services/portal-authorization-service.d.ts +22 -0
- package/lib/infrastructure/services/portal-authorization-service.js +23 -0
- package/lib/infrastructure/services/portal-authorization-service.js.map +1 -0
- package/lib/infrastructure/services/publishing-api-service.d.ts +1 -1
- package/lib/infrastructure/services/publishing-api-service.js +11 -15
- package/lib/infrastructure/services/publishing-api-service.js.map +1 -1
- package/lib/infrastructure/services/sdk-generation-service.d.ts +21 -0
- package/lib/infrastructure/services/sdk-generation-service.js +118 -0
- package/lib/infrastructure/services/sdk-generation-service.js.map +1 -0
- package/lib/infrastructure/services/telemetry-service.js +5 -4
- package/lib/infrastructure/services/telemetry-service.js.map +1 -1
- package/lib/infrastructure/services/transformation-service.js +29 -32
- package/lib/infrastructure/services/transformation-service.js.map +1 -1
- package/lib/infrastructure/services/validation-service.d.ts +12 -53
- package/lib/infrastructure/services/validation-service.js +24 -199
- package/lib/infrastructure/services/validation-service.js.map +1 -1
- package/lib/infrastructure/timer-extensions.d.ts +2 -0
- package/lib/infrastructure/timer-extensions.js +10 -0
- package/lib/infrastructure/timer-extensions.js.map +1 -0
- package/lib/infrastructure/tmp-extensions.d.ts +31 -1
- package/lib/infrastructure/tmp-extensions.js +86 -3
- package/lib/infrastructure/tmp-extensions.js.map +1 -1
- package/lib/infrastructure/zip-service.js +2 -2
- package/lib/infrastructure/zip-service.js.map +1 -1
- package/lib/prompts/api/validate.d.ts +6 -7
- package/lib/prompts/api/validate.js +12 -12
- package/lib/prompts/api/validate.js.map +1 -1
- package/lib/prompts/format.d.ts +4 -0
- package/lib/prompts/format.js +5 -0
- package/lib/prompts/format.js.map +1 -1
- package/lib/prompts/plugin/generate.d.ts +17 -12
- package/lib/prompts/plugin/generate.js +94 -44
- package/lib/prompts/plugin/generate.js.map +1 -1
- package/lib/prompts/plugin/publish.d.ts +2 -1
- package/lib/prompts/plugin/publish.js +8 -7
- package/lib/prompts/plugin/publish.js.map +1 -1
- package/lib/prompts/plugin/record-metadata.d.ts +1 -0
- package/lib/prompts/plugin/record-metadata.js +10 -7
- package/lib/prompts/plugin/record-metadata.js.map +1 -1
- package/lib/prompts/portal/artifacts.d.ts +8 -0
- package/lib/prompts/portal/artifacts.js +26 -0
- package/lib/prompts/portal/artifacts.js.map +1 -0
- package/lib/prompts/portal/authorization.d.ts +6 -0
- package/lib/prompts/portal/authorization.js +29 -0
- package/lib/prompts/portal/authorization.js.map +1 -0
- package/lib/prompts/portal/code-samples.d.ts +1 -0
- package/lib/prompts/portal/code-samples.js +9 -0
- package/lib/prompts/portal/code-samples.js.map +1 -0
- package/lib/prompts/portal/generate.d.ts +14 -9
- package/lib/prompts/portal/generate.js +48 -26
- package/lib/prompts/portal/generate.js.map +1 -1
- package/lib/prompts/portal/prepare-project.d.ts +20 -0
- package/lib/prompts/portal/prepare-project.js +36 -0
- package/lib/prompts/portal/prepare-project.js.map +1 -0
- package/lib/prompts/portal/serve.d.ts +32 -12
- package/lib/prompts/portal/serve.js +102 -39
- package/lib/prompts/portal/serve.js.map +1 -1
- package/lib/prompts/portal/source.d.ts +26 -0
- package/lib/prompts/portal/source.js +253 -0
- package/lib/prompts/portal/source.js.map +1 -0
- package/lib/prompts/prompt.d.ts +11 -3
- package/lib/prompts/prompt.js +39 -15
- package/lib/prompts/prompt.js.map +1 -1
- package/lib/prompts/quickstart.d.ts +46 -3
- package/lib/prompts/quickstart.js +199 -12
- package/lib/prompts/quickstart.js.map +1 -1
- package/lib/prompts/sdk/generate.d.ts +15 -13
- package/lib/prompts/sdk/generate.js +29 -32
- package/lib/prompts/sdk/generate.js.map +1 -1
- package/lib/prompts/sdk/publish/interactive.d.ts +10 -6
- package/lib/prompts/sdk/publish/interactive.js +26 -24
- package/lib/prompts/sdk/publish/interactive.js.map +1 -1
- package/lib/prompts/sdk/publish/non-interactive.d.ts +2 -1
- package/lib/prompts/sdk/publish/non-interactive.js +5 -4
- package/lib/prompts/sdk/publish/non-interactive.js.map +1 -1
- package/lib/prompts/sdk/publish.d.ts +3 -3
- package/lib/prompts/sdk/publish.js +13 -17
- package/lib/prompts/sdk/publish.js.map +1 -1
- package/lib/prompts/sdk/record-published-sdk.d.ts +7 -0
- package/lib/prompts/sdk/record-published-sdk.js +26 -0
- package/lib/prompts/sdk/record-published-sdk.js.map +1 -0
- package/lib/types/apimatic-config/document.d.ts +70 -0
- package/lib/types/apimatic-config/document.js +167 -0
- package/lib/types/apimatic-config/document.js.map +1 -0
- package/lib/types/apimatic-config/languages-block.d.ts +39 -0
- package/lib/types/apimatic-config/languages-block.js +58 -0
- package/lib/types/apimatic-config/languages-block.js.map +1 -0
- package/lib/types/apimatic-config-context.d.ts +48 -0
- package/lib/types/apimatic-config-context.js +121 -0
- package/lib/types/apimatic-config-context.js.map +1 -0
- package/lib/types/build/build.d.ts +1 -89
- package/lib/types/build/build.js +6 -161
- package/lib/types/build/build.js.map +1 -1
- package/lib/types/events/domain-event.js +3 -0
- package/lib/types/events/domain-event.js.map +1 -1
- package/lib/types/events/quickstart-completed.js +3 -3
- package/lib/types/events/quickstart-completed.js.map +1 -1
- package/lib/types/events/quickstart-initiated.js +3 -3
- package/lib/types/events/quickstart-initiated.js.map +1 -1
- package/lib/types/events/sdk-publish-validation-failed.js +1 -1
- package/lib/types/events/sdk-publish-validation-failed.js.map +1 -1
- package/lib/types/file/directory.d.ts +4 -9
- package/lib/types/file/directory.js +17 -65
- package/lib/types/file/directory.js.map +1 -1
- package/lib/types/file/directoryPath.d.ts +17 -0
- package/lib/types/file/directoryPath.js +47 -2
- package/lib/types/file/directoryPath.js.map +1 -1
- package/lib/types/file/fileName.d.ts +8 -0
- package/lib/types/file/fileName.js +28 -6
- package/lib/types/file/fileName.js.map +1 -1
- package/lib/types/file/filePath.d.ts +18 -2
- package/lib/types/file/filePath.js +39 -4
- package/lib/types/file/filePath.js.map +1 -1
- package/lib/types/file/resource-input.js +1 -2
- package/lib/types/file/resource-input.js.map +1 -1
- package/lib/types/file/urlPath.js +2 -1
- package/lib/types/file/urlPath.js.map +1 -1
- package/lib/types/flags-provider.js +22 -22
- package/lib/types/flags-provider.js.map +1 -1
- package/lib/types/package-settings-context.js +2 -1
- package/lib/types/package-settings-context.js.map +1 -1
- package/lib/types/plugin/plugin-config.d.ts +10 -50
- package/lib/types/plugin/plugin-config.js +7 -1
- package/lib/types/plugin/plugin-config.js.map +1 -1
- package/lib/types/plugin-config-context.d.ts +30 -37
- package/lib/types/plugin-config-context.js +108 -139
- package/lib/types/plugin-config-context.js.map +1 -1
- package/lib/types/plugin-context.js +3 -2
- package/lib/types/plugin-context.js.map +1 -1
- package/lib/types/portal/code-samples.d.ts +27 -0
- package/lib/types/portal/code-samples.js +67 -0
- package/lib/types/portal/code-samples.js.map +1 -0
- package/lib/types/portal/config/ai-config.d.ts +15 -0
- package/lib/types/portal/config/ai-config.js +26 -0
- package/lib/types/portal/config/ai-config.js.map +1 -0
- package/lib/types/portal/config/brand-config.d.ts +55 -0
- package/lib/types/portal/config/brand-config.js +105 -0
- package/lib/types/portal/config/brand-config.js.map +1 -0
- package/lib/types/portal/config/color.d.ts +19 -0
- package/lib/types/portal/config/color.js +43 -0
- package/lib/types/portal/config/color.js.map +1 -0
- package/lib/types/portal/config/fields.d.ts +23 -0
- package/lib/types/portal/config/fields.js +67 -0
- package/lib/types/portal/config/fields.js.map +1 -0
- package/lib/types/portal/config/link.d.ts +18 -0
- package/lib/types/portal/config/link.js +72 -0
- package/lib/types/portal/config/link.js.map +1 -0
- package/lib/types/portal/config/navigation-config.d.ts +13 -0
- package/lib/types/portal/config/navigation-config.js +30 -0
- package/lib/types/portal/config/navigation-config.js.map +1 -0
- package/lib/types/portal/config/site-config.d.ts +32 -0
- package/lib/types/portal/config/site-config.js +88 -0
- package/lib/types/portal/config/site-config.js.map +1 -0
- package/lib/types/portal/config/static-asset.d.ts +25 -0
- package/lib/types/portal/config/static-asset.js +77 -0
- package/lib/types/portal/config/static-asset.js.map +1 -0
- package/lib/types/portal/content-notices.d.ts +20 -0
- package/lib/types/portal/content-notices.js +2 -0
- package/lib/types/portal/content-notices.js.map +1 -0
- package/lib/types/portal/content-tree.d.ts +103 -0
- package/lib/types/portal/content-tree.js +344 -0
- package/lib/types/portal/content-tree.js.map +1 -0
- package/lib/types/portal/endpoint.d.ts +6 -0
- package/lib/types/portal/endpoint.js +12 -0
- package/lib/types/portal/endpoint.js.map +1 -0
- package/lib/types/portal/generated-pages.d.ts +68 -0
- package/lib/types/portal/generated-pages.js +111 -0
- package/lib/types/portal/generated-pages.js.map +1 -0
- package/lib/types/portal/generation-status.d.ts +31 -0
- package/lib/types/portal/generation-status.js +26 -0
- package/lib/types/portal/generation-status.js.map +1 -0
- package/lib/types/portal/openapi-document.d.ts +48 -0
- package/lib/types/portal/openapi-document.js +138 -0
- package/lib/types/portal/openapi-document.js.map +1 -0
- package/lib/types/portal/page-fragments.d.ts +13 -0
- package/lib/types/portal/page-fragments.js +24 -0
- package/lib/types/portal/page-fragments.js.map +1 -0
- package/lib/types/portal/page-template.d.ts +15 -0
- package/lib/types/portal/page-template.js +64 -0
- package/lib/types/portal/page-template.js.map +1 -0
- package/lib/types/portal/page.d.ts +24 -0
- package/lib/types/portal/page.js +100 -0
- package/lib/types/portal/page.js.map +1 -0
- package/lib/types/portal/portal-artifacts.d.ts +25 -0
- package/lib/types/portal/portal-artifacts.js +30 -0
- package/lib/types/portal/portal-artifacts.js.map +1 -0
- package/lib/types/portal/portal-config.d.ts +69 -0
- package/lib/types/portal/portal-config.js +105 -0
- package/lib/types/portal/portal-config.js.map +1 -0
- package/lib/types/portal/portal-downloads.d.ts +8 -0
- package/lib/types/portal/portal-downloads.js +14 -0
- package/lib/types/portal/portal-downloads.js.map +1 -0
- package/lib/types/portal/portal-languages.d.ts +15 -0
- package/lib/types/portal/portal-languages.js +45 -0
- package/lib/types/portal/portal-languages.js.map +1 -0
- package/lib/types/portal/portal-navigation.d.ts +65 -0
- package/lib/types/portal/portal-navigation.js +217 -0
- package/lib/types/portal/portal-navigation.js.map +1 -0
- package/lib/types/portal/portal-sdk.d.ts +15 -0
- package/lib/types/portal/portal-sdk.js +28 -0
- package/lib/types/portal/portal-sdk.js.map +1 -0
- package/lib/types/portal/portal-source.d.ts +129 -0
- package/lib/types/portal/portal-source.js +2 -0
- package/lib/types/portal/portal-source.js.map +1 -0
- package/lib/types/portal/portal-stylesheet.d.ts +19 -0
- package/lib/types/portal/portal-stylesheet.js +40 -0
- package/lib/types/portal/portal-stylesheet.js.map +1 -0
- package/lib/types/portal/portal-tabs.d.ts +33 -0
- package/lib/types/portal/portal-tabs.js +38 -0
- package/lib/types/portal/portal-tabs.js.map +1 -0
- package/lib/types/portal/preview-config.d.ts +20 -0
- package/lib/types/portal/preview-config.js +32 -0
- package/lib/types/portal/preview-config.js.map +1 -0
- package/lib/types/portal/preview-content.d.ts +18 -0
- package/lib/types/portal/preview-content.js +50 -0
- package/lib/types/portal/preview-content.js.map +1 -0
- package/lib/types/portal/published-package.d.ts +12 -0
- package/lib/types/portal/published-package.js +35 -0
- package/lib/types/portal/published-package.js.map +1 -0
- package/lib/types/portal/unknown-fields.d.ts +5 -0
- package/lib/types/portal/unknown-fields.js +10 -0
- package/lib/types/portal/unknown-fields.js.map +1 -0
- package/lib/types/portal-context.d.ts +38 -6
- package/lib/types/portal-context.js +71 -24
- package/lib/types/portal-context.js.map +1 -1
- package/lib/types/portal-source-context.d.ts +77 -0
- package/lib/types/portal-source-context.js +408 -0
- package/lib/types/portal-source-context.js.map +1 -0
- package/lib/types/project-context.d.ts +49 -0
- package/lib/types/project-context.js +151 -0
- package/lib/types/project-context.js.map +1 -0
- package/lib/types/project-layout.d.ts +9 -0
- package/lib/types/project-layout.js +10 -0
- package/lib/types/project-layout.js.map +1 -0
- package/lib/types/publish/package-settings-configuration.d.ts +2 -0
- package/lib/types/publish/profile-id.js +1 -0
- package/lib/types/publish/profile-id.js.map +1 -1
- package/lib/types/publish/publishing-profile.d.ts +3 -1
- package/lib/types/publish/publishing-profile.js +33 -15
- package/lib/types/publish/publishing-profile.js.map +1 -1
- package/lib/types/publish/publishing-profiles.js +2 -1
- package/lib/types/publish/publishing-profiles.js.map +1 -1
- package/lib/types/publish/version.js +1 -0
- package/lib/types/publish/version.js.map +1 -1
- package/lib/types/resource-context.js +3 -2
- package/lib/types/resource-context.js.map +1 -1
- package/lib/types/sdk/generate.d.ts +22 -16
- package/lib/types/sdk/generate.js +64 -41
- package/lib/types/sdk/generate.js.map +1 -1
- package/lib/types/sdk/stability-choice.d.ts +12 -0
- package/lib/types/sdk/stability-choice.js +24 -0
- package/lib/types/sdk/stability-choice.js.map +1 -0
- package/lib/types/sdk-context.d.ts +4 -5
- package/lib/types/sdk-context.js +10 -18
- package/lib/types/sdk-context.js.map +1 -1
- package/lib/types/spec-context.d.ts +5 -4
- package/lib/types/spec-context.js +9 -8
- package/lib/types/spec-context.js.map +1 -1
- package/lib/types/temp-context.d.ts +1 -1
- package/lib/types/temp-context.js +5 -4
- package/lib/types/temp-context.js.map +1 -1
- package/lib/types/transform-context.d.ts +9 -5
- package/lib/types/transform-context.js +21 -18
- package/lib/types/transform-context.js.map +1 -1
- package/lib/utils/error-utils.d.ts +2 -0
- package/lib/utils/error-utils.js +5 -0
- package/lib/utils/error-utils.js.map +1 -0
- package/lib/utils/json-utils.d.ts +2 -0
- package/lib/utils/json-utils.js +4 -0
- package/lib/utils/json-utils.js.map +1 -0
- package/lib/utils/string-utils.d.ts +8 -1
- package/lib/utils/string-utils.js +13 -26
- package/lib/utils/string-utils.js.map +1 -1
- package/lib/utils/utils.d.ts +1 -3
- package/lib/utils/utils.js +12 -40
- package/lib/utils/utils.js.map +1 -1
- package/oclif.manifest.json +69 -357
- package/package.json +47 -25
- package/portal-pages/context-plugin.mdx +26 -0
- package/portal-pages/sdk.mdx +8 -0
- package/portal-pages/sdks.mdx +11 -0
- package/portal-template/NOTICE +37 -0
- package/portal-template/downloads.ts +41 -0
- package/portal-template/generated-pages-reload.ts +51 -0
- package/portal-template/package.json +11 -0
- package/portal-template/portal-config.ts +32 -0
- package/portal-template/prerender-pages.ts +81 -0
- package/portal-template/spec-reload.ts +26 -0
- package/portal-template/src/components/api-page.tsx +15 -0
- package/portal-template/src/components/code-block.tsx +9 -0
- package/portal-template/src/components/command-block.tsx +50 -0
- package/portal-template/src/components/example-layout.tsx +99 -0
- package/portal-template/src/components/logos.tsx +127 -0
- package/portal-template/src/components/mdx.tsx +28 -0
- package/portal-template/src/components/not-found.tsx +11 -0
- package/portal-template/src/components/plugin-install.tsx +22 -0
- package/portal-template/src/components/plugin-support.tsx +53 -0
- package/portal-template/src/components/sdk-actions.tsx +79 -0
- package/portal-template/src/components/sdk-cards.tsx +100 -0
- package/portal-template/src/components/search.tsx +41 -0
- package/portal-template/src/components/usage-tabs.tsx +92 -0
- package/portal-template/src/lib/code-samples.server.ts +40 -0
- package/portal-template/src/lib/code-samples.ts +43 -0
- package/portal-template/src/lib/code-titles.ts +29 -0
- package/portal-template/src/lib/install-command.ts +13 -0
- package/portal-template/src/lib/json.ts +5 -0
- package/portal-template/src/lib/layout.shared.tsx +41 -0
- package/portal-template/src/lib/layout.tsx +16 -0
- package/portal-template/src/lib/llms.server.ts +54 -0
- package/portal-template/src/lib/media-adapters.ts +34 -0
- package/portal-template/src/lib/navigation.ts +406 -0
- package/portal-template/src/lib/openapi-bundle.server.ts +343 -0
- package/portal-template/src/lib/openapi-filter.ts +191 -0
- package/portal-template/src/lib/openapi-labels.ts +15 -0
- package/portal-template/src/lib/openapi-methods.ts +12 -0
- package/portal-template/src/lib/openapi-section.server.ts +280 -0
- package/portal-template/src/lib/openapi-slim.ts +202 -0
- package/portal-template/src/lib/openapi.server.ts +16 -0
- package/portal-template/src/lib/portal-types.ts +36 -0
- package/portal-template/src/lib/portal.server.ts +13 -0
- package/portal-template/src/lib/portal.ts +11 -0
- package/portal-template/src/lib/rehype-code-titles.ts +53 -0
- package/portal-template/src/lib/request-examples.ts +72 -0
- package/portal-template/src/lib/seo.ts +21 -0
- package/portal-template/src/lib/shared.ts +51 -0
- package/portal-template/src/lib/shiki-bundle.ts +104 -0
- package/portal-template/src/lib/sitemap.server.ts +20 -0
- package/portal-template/src/lib/source.server.ts +27 -0
- package/portal-template/src/lib/source.ts +49 -0
- package/portal-template/src/lib/tabs.ts +37 -0
- package/portal-template/src/router.tsx +12 -0
- package/portal-template/src/routes/$.tsx +194 -0
- package/portal-template/src/routes/__root.tsx +56 -0
- package/portal-template/src/routes/api/search[.]json.ts +9 -0
- package/portal-template/src/routes/llms-full[.]txt.ts +10 -0
- package/portal-template/src/routes/llms[.]txt.ts +10 -0
- package/portal-template/src/routes/robots[.]txt.ts +10 -0
- package/portal-template/src/routes/sitemap[.]xml.ts +10 -0
- package/portal-template/src/routes/spa-shell.tsx +7 -0
- package/portal-template/src/routes/{$}[.]md.ts +21 -0
- package/portal-template/src/styles/app.css +33 -0
- package/portal-template/tsconfig.json +26 -0
- package/portal-template/vite.config.ts +68 -0
- package/lib/actions/plugin/record-sdk.d.ts +0 -14
- package/lib/actions/plugin/record-sdk.js +0 -60
- package/lib/actions/plugin/record-sdk.js.map +0 -1
- package/lib/actions/portal/copilot.d.ts +0 -17
- package/lib/actions/portal/copilot.js +0 -89
- package/lib/actions/portal/copilot.js.map +0 -1
- package/lib/actions/portal/quickstart.d.ts +0 -18
- package/lib/actions/portal/quickstart.js +0 -238
- package/lib/actions/portal/quickstart.js.map +0 -1
- package/lib/actions/portal/recipe/new-recipe.d.ts +0 -15
- package/lib/actions/portal/recipe/new-recipe.js +0 -177
- package/lib/actions/portal/recipe/new-recipe.js.map +0 -1
- package/lib/actions/portal/toc/new-toc.d.ts +0 -21
- package/lib/actions/portal/toc/new-toc.js +0 -95
- package/lib/actions/portal/toc/new-toc.js.map +0 -1
- package/lib/actions/sdk/merge-source-tree.d.ts +0 -12
- package/lib/actions/sdk/merge-source-tree.js +0 -78
- package/lib/actions/sdk/merge-source-tree.js.map +0 -1
- package/lib/actions/sdk/quickstart.d.ts +0 -18
- package/lib/actions/sdk/quickstart.js +0 -188
- package/lib/actions/sdk/quickstart.js.map +0 -1
- package/lib/actions/sdk/save-changes.d.ts +0 -8
- package/lib/actions/sdk/save-changes.js +0 -93
- package/lib/actions/sdk/save-changes.js.map +0 -1
- package/lib/application/portal/recipe/portal-recipe.d.ts +0 -8
- package/lib/application/portal/recipe/portal-recipe.js +0 -33
- package/lib/application/portal/recipe/portal-recipe.js.map +0 -1
- package/lib/application/portal/recipe/recipe-generator.d.ts +0 -21
- package/lib/application/portal/recipe/recipe-generator.js +0 -130
- package/lib/application/portal/recipe/recipe-generator.js.map +0 -1
- package/lib/application/portal/toc/toc-content-parser.d.ts +0 -5
- package/lib/application/portal/toc/toc-content-parser.js +0 -44
- package/lib/application/portal/toc/toc-content-parser.js.map +0 -1
- package/lib/application/portal/toc/toc-structure-generator.d.ts +0 -11
- package/lib/application/portal/toc/toc-structure-generator.js +0 -165
- package/lib/application/portal/toc/toc-structure-generator.js.map +0 -1
- package/lib/commands/portal/copilot.d.ts +0 -13
- package/lib/commands/portal/copilot.js +0 -34
- package/lib/commands/portal/copilot.js.map +0 -1
- package/lib/commands/portal/recipe/new.d.ts +0 -12
- package/lib/commands/portal/recipe/new.js +0 -45
- package/lib/commands/portal/recipe/new.js.map +0 -1
- package/lib/commands/portal/toc/new.d.ts +0 -16
- package/lib/commands/portal/toc/new.js +0 -68
- package/lib/commands/portal/toc/new.js.map +0 -1
- package/lib/commands/sdk/save-changes.d.ts +0 -14
- package/lib/commands/sdk/save-changes.js +0 -51
- package/lib/commands/sdk/save-changes.js.map +0 -1
- package/lib/infrastructure/debounce-service.d.ts +0 -10
- package/lib/infrastructure/debounce-service.js +0 -55
- package/lib/infrastructure/debounce-service.js.map +0 -1
- package/lib/infrastructure/services/portal-service.d.ts +0 -43
- package/lib/infrastructure/services/portal-service.js +0 -337
- package/lib/infrastructure/services/portal-service.js.map +0 -1
- package/lib/prompts/plugin/record-sdk.d.ts +0 -9
- package/lib/prompts/plugin/record-sdk.js +0 -40
- package/lib/prompts/plugin/record-sdk.js.map +0 -1
- package/lib/prompts/portal/copilot.d.ts +0 -18
- package/lib/prompts/portal/copilot.js +0 -82
- package/lib/prompts/portal/copilot.js.map +0 -1
- package/lib/prompts/portal/quickstart.d.ts +0 -42
- package/lib/prompts/portal/quickstart.js +0 -243
- package/lib/prompts/portal/quickstart.js.map +0 -1
- package/lib/prompts/portal/recipe/new-recipe.d.ts +0 -29
- package/lib/prompts/portal/recipe/new-recipe.js +0 -165
- package/lib/prompts/portal/recipe/new-recipe.js.map +0 -1
- package/lib/prompts/portal/toc/new-toc.d.ts +0 -16
- package/lib/prompts/portal/toc/new-toc.js +0 -50
- package/lib/prompts/portal/toc/new-toc.js.map +0 -1
- package/lib/prompts/sdk/merge-source-tree.d.ts +0 -22
- package/lib/prompts/sdk/merge-source-tree.js +0 -90
- package/lib/prompts/sdk/merge-source-tree.js.map +0 -1
- package/lib/prompts/sdk/quickstart.d.ts +0 -38
- package/lib/prompts/sdk/quickstart.js +0 -196
- package/lib/prompts/sdk/quickstart.js.map +0 -1
- package/lib/prompts/sdk/save-changes.d.ts +0 -21
- package/lib/prompts/sdk/save-changes.js +0 -84
- package/lib/prompts/sdk/save-changes.js.map +0 -1
- package/lib/types/build-context.d.ts +0 -26
- package/lib/types/build-context.js +0 -111
- package/lib/types/build-context.js.map +0 -1
- package/lib/types/events/recipe-creation-failed.d.ts +0 -5
- package/lib/types/events/recipe-creation-failed.js +0 -8
- package/lib/types/events/recipe-creation-failed.js.map +0 -1
- package/lib/types/events/sdk-changes-saved.d.ts +0 -8
- package/lib/types/events/sdk-changes-saved.js +0 -11
- package/lib/types/events/sdk-changes-saved.js.map +0 -1
- package/lib/types/events/sdk-changes-tracked.d.ts +0 -8
- package/lib/types/events/sdk-changes-tracked.js +0 -11
- package/lib/types/events/sdk-changes-tracked.js.map +0 -1
- package/lib/types/events/sdk-conflicts-resolved.d.ts +0 -8
- package/lib/types/events/sdk-conflicts-resolved.js +0 -11
- package/lib/types/events/sdk-conflicts-resolved.js.map +0 -1
- package/lib/types/events/toc-creation-failed.d.ts +0 -5
- package/lib/types/events/toc-creation-failed.js +0 -8
- package/lib/types/events/toc-creation-failed.js.map +0 -1
- package/lib/types/merge-source-tree-context.d.ts +0 -28
- package/lib/types/merge-source-tree-context.js +0 -63
- package/lib/types/merge-source-tree-context.js.map +0 -1
- package/lib/types/plugin/language-entry.d.ts +0 -9
- package/lib/types/plugin/language-entry.js +0 -64
- package/lib/types/plugin/language-entry.js.map +0 -1
- package/lib/types/recipe/recipe.d.ts +0 -22
- package/lib/types/recipe/recipe.js +0 -6
- package/lib/types/recipe/recipe.js.map +0 -1
- package/lib/types/recipe-context.d.ts +0 -9
- package/lib/types/recipe-context.js +0 -26
- package/lib/types/recipe-context.js.map +0 -1
- package/lib/types/save-changes-context.d.ts +0 -17
- package/lib/types/save-changes-context.js +0 -42
- package/lib/types/save-changes-context.js.map +0 -1
- package/lib/types/sdl/sdl.d.ts +0 -10
- package/lib/types/sdl/sdl.js +0 -18
- package/lib/types/sdl/sdl.js.map +0 -1
- package/lib/types/toc/toc-components.d.ts +0 -36
- package/lib/types/toc/toc-components.js +0 -94
- package/lib/types/toc/toc-components.js.map +0 -1
- package/lib/types/toc/toc.d.ts +0 -67
- package/lib/types/toc/toc.js +0 -2
- package/lib/types/toc/toc.js.map +0 -1
- package/lib/types/toc-context.d.ts +0 -12
- package/lib/types/toc-context.js +0 -26
- package/lib/types/toc-context.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recipe-generator.js","sourceRoot":"","sources":["../../../../src/application/portal/recipe/recipe-generator.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAGjC,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAI3D,MAAM,OAAO,qBAAqB;IAAlC;QACmB,gBAAW,GAAgB,IAAI,WAAW,EAAE,CAAC;IAmLhE,CAAC;IAjLQ,KAAK,CAAC,YAAY,CACvB,MAA0B,EAC1B,cAAmB,EACnB,WAAqB,EACrB,UAAkB,EAClB,oBAA8B,EAC9B,sBAAgC,EAChC,YAA0B,EAC1B,cAA6B;QAE7B,MAAM,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,sBAAsB,CAAC,CAAC;QAC3F,MAAM,IAAI,CAAC,+BAA+B,CAAC,YAAY,EAAE,UAAU,EAAE,oBAAoB,CAAC,CAAC;QAC3F,MAAM,IAAI,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;Q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IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;aACzE,IAAI,CAAC,EAAE,CAAC,CAAC;IACd,CAAC;CACF"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as path from "path";
|
|
2
|
-
import * as fs from "fs/promises";
|
|
3
|
-
export class TocContentParser {
|
|
4
|
-
async parseContentFolder(contentFolderPath, workingDirectory) {
|
|
5
|
-
const items = await fs.readdir(contentFolderPath);
|
|
6
|
-
const contentItems = [];
|
|
7
|
-
for (const item of items) {
|
|
8
|
-
const itemPath = path.join(contentFolderPath, item);
|
|
9
|
-
const stats = await fs.stat(itemPath);
|
|
10
|
-
if (stats.isDirectory()) {
|
|
11
|
-
const subItems = await this.parseContentFolder(itemPath, workingDirectory);
|
|
12
|
-
if (subItems.length > 0) {
|
|
13
|
-
contentItems.push({
|
|
14
|
-
group: item,
|
|
15
|
-
items: subItems[0].items // Take items from the Custom Content group
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
else if (stats.isFile() && item.endsWith(".md")) {
|
|
20
|
-
const relativePath = path.relative(workingDirectory, itemPath);
|
|
21
|
-
const pageName = path.basename(item, ".md");
|
|
22
|
-
contentItems.push({
|
|
23
|
-
page: pageName,
|
|
24
|
-
file: this.normalizePath(relativePath)
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
// Return empty array if no markdown files were found
|
|
29
|
-
if (contentItems.length === 0) {
|
|
30
|
-
return [];
|
|
31
|
-
}
|
|
32
|
-
// Wrap everything under a "Custom Content" group
|
|
33
|
-
return [
|
|
34
|
-
{
|
|
35
|
-
group: "Custom Content",
|
|
36
|
-
items: contentItems
|
|
37
|
-
}
|
|
38
|
-
];
|
|
39
|
-
}
|
|
40
|
-
normalizePath(path) {
|
|
41
|
-
return path.replace(/\\/g, "/");
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=toc-content-parser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toc-content-parser.js","sourceRoot":"","sources":["../../../../src/application/portal/toc/toc-content-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAGlC,MAAM,OAAO,gBAAgB;IAC3B,KAAK,CAAC,kBAAkB,CAAC,iBAAyB,EAAE,gBAAwB;QAC1E,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QAClD,MAAM,YAAY,GAAiC,EAAE,CAAC;QAEtD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;YACpD,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAEtC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBACxB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;gBAC3E,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACxB,YAAY,CAAC,IAAI,CAAC;wBAChB,KAAK,EAAE,IAAI;wBACX,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,2CAA2C;qBACrE,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;iBAAM,IAAI,KAAK,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBAClD,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;gBAC/D,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAE5C,YAAY,CAAC,IAAI,CAAC;oBAChB,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC;iBACvC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,iDAAiD;QACjD,OAAO;YACL;gBACE,KAAK,EAAE,gBAAgB;gBACvB,KAAK,EAAE,YAAY;aACpB;SACF,CAAC;IACJ,CAAC;IAEO,aAAa,CAAC,IAAY;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;CACF"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Toc, TocGroup } from '../../../types/toc/toc.js';
|
|
2
|
-
import { TocComponents } from '../../../types/toc/toc-components.js';
|
|
3
|
-
export declare class TocStructureGenerator {
|
|
4
|
-
createTocStructure(tocComponents: TocComponents, expandEndpoints: boolean, expandModels: boolean, expandWebhooks: boolean, expandCallbacks: boolean, contentGroups?: TocGroup[]): Toc;
|
|
5
|
-
transformToYaml(toc: Toc): string;
|
|
6
|
-
private getEndpointsSection;
|
|
7
|
-
private getCallbacksSection;
|
|
8
|
-
private getWebhooksSection;
|
|
9
|
-
private getModelsSection;
|
|
10
|
-
private transformKeys;
|
|
11
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { stringify } from 'yaml';
|
|
2
|
-
export class TocStructureGenerator {
|
|
3
|
-
createTocStructure(tocComponents, expandEndpoints, expandModels, expandWebhooks, expandCallbacks, contentGroups = []) {
|
|
4
|
-
const events = [
|
|
5
|
-
...this.getCallbacksSection(tocComponents.callbackGroups, expandCallbacks),
|
|
6
|
-
...this.getWebhooksSection(tocComponents.webhookGroups, expandWebhooks)
|
|
7
|
-
];
|
|
8
|
-
return {
|
|
9
|
-
toc: [
|
|
10
|
-
{
|
|
11
|
-
group: 'Getting Started',
|
|
12
|
-
items: [
|
|
13
|
-
{
|
|
14
|
-
generate: 'How to Get Started',
|
|
15
|
-
from: 'getting-started'
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
...contentGroups,
|
|
20
|
-
this.getEndpointsSection(tocComponents.endpointGroups, expandEndpoints),
|
|
21
|
-
...(events.length > 0
|
|
22
|
-
? [
|
|
23
|
-
{
|
|
24
|
-
group: 'Events',
|
|
25
|
-
items: events
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
: []),
|
|
29
|
-
...this.getModelsSection(tocComponents.models, tocComponents.enums, tocComponents.errors, tocComponents.containerModels, tocComponents.inputModels, expandModels),
|
|
30
|
-
{
|
|
31
|
-
generate: 'SDK Infrastructure',
|
|
32
|
-
from: 'sdk-infra'
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
transformToYaml(toc) {
|
|
38
|
-
const transformedToc = this.transformKeys(toc);
|
|
39
|
-
return stringify(transformedToc, {
|
|
40
|
-
indent: 2,
|
|
41
|
-
nullStr: ''
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
getEndpointsSection(data, expand) {
|
|
45
|
-
if (!expand || data.size === 0) {
|
|
46
|
-
return {
|
|
47
|
-
generate: 'API Endpoints',
|
|
48
|
-
from: 'endpoints'
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
group: 'API Endpoints',
|
|
53
|
-
items: Array.from(data).map(([groupName, pages]) => ({
|
|
54
|
-
group: groupName,
|
|
55
|
-
items: pages
|
|
56
|
-
}))
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
getCallbacksSection(data, expand) {
|
|
60
|
-
if (data.size === 0) {
|
|
61
|
-
return [];
|
|
62
|
-
}
|
|
63
|
-
if (expand === true) {
|
|
64
|
-
if (data.size === 1) {
|
|
65
|
-
return [
|
|
66
|
-
{
|
|
67
|
-
group: Array.from(data.keys())[0],
|
|
68
|
-
items: Array.from(data.values())[0]
|
|
69
|
-
}
|
|
70
|
-
];
|
|
71
|
-
}
|
|
72
|
-
return [
|
|
73
|
-
{
|
|
74
|
-
group: 'Callbacks',
|
|
75
|
-
items: Array.from(data).map(([groupName, eventList]) => ({
|
|
76
|
-
group: groupName,
|
|
77
|
-
items: eventList
|
|
78
|
-
}))
|
|
79
|
-
}
|
|
80
|
-
];
|
|
81
|
-
}
|
|
82
|
-
return [
|
|
83
|
-
{
|
|
84
|
-
generate: 'Callbacks',
|
|
85
|
-
from: 'callbacks'
|
|
86
|
-
}
|
|
87
|
-
];
|
|
88
|
-
}
|
|
89
|
-
getWebhooksSection(data, expand) {
|
|
90
|
-
if (data.size === 0) {
|
|
91
|
-
return [];
|
|
92
|
-
}
|
|
93
|
-
if (expand === true) {
|
|
94
|
-
if (data.size === 1) {
|
|
95
|
-
return [
|
|
96
|
-
{
|
|
97
|
-
group: Array.from(data.keys())[0],
|
|
98
|
-
items: Array.from(data.values())[0]
|
|
99
|
-
}
|
|
100
|
-
];
|
|
101
|
-
}
|
|
102
|
-
return [
|
|
103
|
-
{
|
|
104
|
-
group: 'Webhooks',
|
|
105
|
-
items: Array.from(data).map(([groupName, eventList]) => ({
|
|
106
|
-
group: groupName,
|
|
107
|
-
items: eventList
|
|
108
|
-
}))
|
|
109
|
-
}
|
|
110
|
-
];
|
|
111
|
-
}
|
|
112
|
-
return [
|
|
113
|
-
{
|
|
114
|
-
generate: 'Webhooks',
|
|
115
|
-
from: 'webhooks'
|
|
116
|
-
}
|
|
117
|
-
];
|
|
118
|
-
}
|
|
119
|
-
getModelsSection(modelsData, enumsData, errorsData, containerModelsData, inputModelsData, expand) {
|
|
120
|
-
if (modelsData.length === 0 &&
|
|
121
|
-
enumsData.length === 0 &&
|
|
122
|
-
errorsData.length === 0 &&
|
|
123
|
-
containerModelsData.length === 0 &&
|
|
124
|
-
inputModelsData.length === 0) {
|
|
125
|
-
return [];
|
|
126
|
-
}
|
|
127
|
-
if (!expand) {
|
|
128
|
-
return [
|
|
129
|
-
{
|
|
130
|
-
generate: 'Models',
|
|
131
|
-
from: 'models'
|
|
132
|
-
}
|
|
133
|
-
];
|
|
134
|
-
}
|
|
135
|
-
const subGroups = [
|
|
136
|
-
...(modelsData.length > 0 || inputModelsData.length > 0
|
|
137
|
-
? [{ group: 'Structures', items: [...modelsData, ...inputModelsData] }]
|
|
138
|
-
: []),
|
|
139
|
-
...(enumsData.length > 0 ? [{ group: 'Enumerations', items: enumsData }] : []),
|
|
140
|
-
...(errorsData.length > 0 ? [{ group: 'Exceptions', items: errorsData }] : []),
|
|
141
|
-
...(containerModelsData.length > 0
|
|
142
|
-
? [{ group: 'OneOf/AnyOf Definitions', items: containerModelsData }]
|
|
143
|
-
: [])
|
|
144
|
-
];
|
|
145
|
-
return [
|
|
146
|
-
{
|
|
147
|
-
group: 'Models',
|
|
148
|
-
items: subGroups
|
|
149
|
-
}
|
|
150
|
-
];
|
|
151
|
-
}
|
|
152
|
-
transformKeys(obj) {
|
|
153
|
-
if (Array.isArray(obj)) {
|
|
154
|
-
return obj.map((item) => this.transformKeys(item));
|
|
155
|
-
}
|
|
156
|
-
if (obj !== null && typeof obj === 'object') {
|
|
157
|
-
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [
|
|
158
|
-
key.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(),
|
|
159
|
-
this.transformKeys(value)
|
|
160
|
-
]));
|
|
161
|
-
}
|
|
162
|
-
return obj;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
//# sourceMappingURL=toc-structure-generator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toc-structure-generator.js","sourceRoot":"","sources":["../../../../src/application/portal/toc/toc-structure-generator.ts"],"names":[],"mappings":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AAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC5C,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;gBACxC,GAAG,CAAC,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE;gBACxD,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;aAC1B,CAAC,CACH,CAAC;QACJ,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Command } from "@oclif/core";
|
|
2
|
-
export default class PortalCopilot extends Command {
|
|
3
|
-
static summary: string;
|
|
4
|
-
static description: string;
|
|
5
|
-
static flags: {
|
|
6
|
-
"auth-key": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
-
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
disable: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
-
};
|
|
10
|
-
static cmdTxt: string;
|
|
11
|
-
static examples: string[];
|
|
12
|
-
run(): Promise<void>;
|
|
13
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import { Command, Flags } from "@oclif/core";
|
|
3
|
-
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
4
|
-
import { FlagsProvider } from "../../types/flags-provider.js";
|
|
5
|
-
import { CopilotAction } from "../../actions/portal/copilot.js";
|
|
6
|
-
import { format, intro, outro } from "../../prompts/format.js";
|
|
7
|
-
class PortalCopilot extends Command {
|
|
8
|
-
async run() {
|
|
9
|
-
const { flags: { input, "auth-key": authKey, disable, force } } = await this.parse(_a);
|
|
10
|
-
const commandMetadata = {
|
|
11
|
-
commandName: _a.id,
|
|
12
|
-
shell: this.config.shell
|
|
13
|
-
};
|
|
14
|
-
intro("Configure API Copilot");
|
|
15
|
-
const buildDirectory = DirectoryPath.createInput(input).join("src");
|
|
16
|
-
const copilotConfigAction = new CopilotAction(new DirectoryPath(this.config.configDir), commandMetadata, authKey);
|
|
17
|
-
const result = await copilotConfigAction.execute(buildDirectory, force, !disable);
|
|
18
|
-
outro(result);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
_a = PortalCopilot;
|
|
22
|
-
PortalCopilot.summary = "Configure API Copilot for your API Documentation portal";
|
|
23
|
-
PortalCopilot.description = `Displays available API Copilots associated with your account and allows you to select which one to integrate with your portal. Each APIMatic account includes one Copilot by default. The selected Copilot will be added to your ${format.var("APIMATIC-BUILD.json")} file`;
|
|
24
|
-
PortalCopilot.flags = Object.assign(Object.assign(Object.assign(Object.assign({}, FlagsProvider.input), { disable: Flags.boolean({
|
|
25
|
-
default: false,
|
|
26
|
-
description: "marks the API Copilot as disabled in the configuration"
|
|
27
|
-
}) }), FlagsProvider.force), FlagsProvider.authKey);
|
|
28
|
-
PortalCopilot.cmdTxt = format.cmd("apimatic", "portal", "copilot");
|
|
29
|
-
PortalCopilot.examples = [
|
|
30
|
-
`${_a.cmdTxt} ${format.flag("input", './')}`,
|
|
31
|
-
`${_a.cmdTxt} ${format.flag("input", './')} ${format.flag("disable")}`
|
|
32
|
-
];
|
|
33
|
-
export default PortalCopilot;
|
|
34
|
-
//# sourceMappingURL=copilot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copilot.js","sourceRoot":"","sources":["../../../src/commands/portal/copilot.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;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,EAAE,SAAS,CAAC,AAA9C,CAA+C;AACrD,sBAAQ,GAAG;IAChB,GAAG,EAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE;IAC9C,GAAG,EAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;CACzE,AAHc,CAGb;eApBiB,aAAa"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Command } from "@oclif/core";
|
|
2
|
-
export default class PortalRecipeNew extends Command {
|
|
3
|
-
static summary: string;
|
|
4
|
-
static description: string;
|
|
5
|
-
static flags: {
|
|
6
|
-
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
-
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
-
};
|
|
9
|
-
static readonly cmdTxt: string;
|
|
10
|
-
static readonly examples: string[];
|
|
11
|
-
run(): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import { Command, Flags } from "@oclif/core";
|
|
3
|
-
import { PortalRecipeAction } from "../../../actions/portal/recipe/new-recipe.js";
|
|
4
|
-
import { TelemetryService } from "../../../infrastructure/services/telemetry-service.js";
|
|
5
|
-
import { RecipeCreationFailedEvent } from "../../../types/events/recipe-creation-failed.js";
|
|
6
|
-
import { DirectoryPath } from "../../../types/file/directoryPath.js";
|
|
7
|
-
import { FlagsProvider } from "../../../types/flags-provider.js";
|
|
8
|
-
import { format, intro, outro } from "../../../prompts/format.js";
|
|
9
|
-
class PortalRecipeNew extends Command {
|
|
10
|
-
async run() {
|
|
11
|
-
const { flags: { name, input, force } } = await this.parse(_a);
|
|
12
|
-
const workingDirectory = DirectoryPath.createInput(input);
|
|
13
|
-
const buildDirectory = input ? new DirectoryPath(input, "src") : workingDirectory.join("src");
|
|
14
|
-
const commandMetadata = {
|
|
15
|
-
commandName: _a.id,
|
|
16
|
-
shell: this.config.shell
|
|
17
|
-
};
|
|
18
|
-
intro("New Recipe");
|
|
19
|
-
const action = new PortalRecipeAction(new DirectoryPath(this.config.configDir), commandMetadata);
|
|
20
|
-
const result = await action.execute(buildDirectory, name);
|
|
21
|
-
outro(result);
|
|
22
|
-
await result.mapAll(async () => { }, async () => {
|
|
23
|
-
const telemetryService = new TelemetryService(new DirectoryPath(this.config.configDir));
|
|
24
|
-
await telemetryService.trackEvent(new RecipeCreationFailedEvent("error", _a.id, {
|
|
25
|
-
name,
|
|
26
|
-
input,
|
|
27
|
-
force
|
|
28
|
-
}), commandMetadata.shell);
|
|
29
|
-
}, async () => { });
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
_a = PortalRecipeNew;
|
|
33
|
-
PortalRecipeNew.summary = "Add an API Recipe to your API documentation portal.";
|
|
34
|
-
PortalRecipeNew.description = `This command adds a new API Recipe file to your documentation portal.
|
|
35
|
-
|
|
36
|
-
To learn more about API Recipes, visit:
|
|
37
|
-
${format.link("https://docs.apimatic.io/platform-api/#/http/guides/generating-on-prem-api-portal/api-recipes")}`;
|
|
38
|
-
PortalRecipeNew.flags = Object.assign(Object.assign({ name: Flags.string({ description: "name for the recipe" }) }, FlagsProvider.input), FlagsProvider.force);
|
|
39
|
-
PortalRecipeNew.cmdTxt = format.cmd("apimatic", "portal", "recipe", "new");
|
|
40
|
-
PortalRecipeNew.examples = [
|
|
41
|
-
`${_a.cmdTxt}`,
|
|
42
|
-
`${_a.cmdTxt} ${format.flag("name", '"My API Recipe"')} ${format.flag("input", '"./"')}`
|
|
43
|
-
];
|
|
44
|
-
export default PortalRecipeNew;
|
|
45
|
-
//# sourceMappingURL=new.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new.js","sourceRoot":"","sources":["../../../../src/commands/portal/recipe/new.ts"],"names":[],"mappings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,MAAM,CAAC,MAAM,CACjB,KAAK,IAAI,EAAE,GAAE,CAAC,EACd,KAAK,IAAI,EAAE;YACT,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;YACxF,MAAM,gBAAgB,CAAC,UAAU,CAC/B,IAAI,yBAAyB,CAAC,OAAO,EAAE,EAAe,CAAC,EAAE,EAAE;gBACzD,IAAI;gBACJ,KAAK;gBACL,KAAK;aACN,CAAC,EACF,eAAe,CAAC,KAAK,CACtB,CAAC;QACJ,CAAC,EACD,KAAK,IAAI,EAAE,GAAE,CAAC,CACf,CAAC;IACJ,CAAC;;;AAtDM,uBAAO,GAAG,qDAAqD,AAAxD,CAAyD;AAEhE,2BAAW,GAAG;;;EAGrB,MAAM,CAAC,IAAI,CACX,+FAA+F,CAChG,EAAE,AALiB,CAKhB;AAEK,qBAAK,iCACV,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC,IACvD,aAAa,CAAC,KAAK,GACnB,aAAa,CAAC,KAAK,CAHZ,CAIV;AAEc,sBAAM,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,AAApD,CAAqD;AAC3D,wBAAQ,GAAG;IACzB,GAAG,EAAI,CAAC,MAAM,EAAE;IAChB,GAAG,EAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;CAC3F,AAHuB,CAGtB;eApBiB,eAAe"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
export default class PortalTocNew extends Command {
|
|
3
|
-
static summary: string;
|
|
4
|
-
static description: string;
|
|
5
|
-
static flags: {
|
|
6
|
-
'expand-endpoints': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
-
'expand-models': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
'expand-webhooks': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
-
'expand-callbacks': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
-
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
-
destination: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
-
};
|
|
13
|
-
static cmdTxt: string;
|
|
14
|
-
static examples: string[];
|
|
15
|
-
run(): Promise<void>;
|
|
16
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import { Command, Flags } from '@oclif/core';
|
|
3
|
-
import { PortalNewTocAction } from '../../../actions/portal/toc/new-toc.js';
|
|
4
|
-
import { TelemetryService } from '../../../infrastructure/services/telemetry-service.js';
|
|
5
|
-
import { TocCreationFailedEvent } from '../../../types/events/toc-creation-failed.js';
|
|
6
|
-
import { DirectoryPath } from '../../../types/file/directoryPath.js';
|
|
7
|
-
import { FlagsProvider } from '../../../types/flags-provider.js';
|
|
8
|
-
import { format, intro, outro } from '../../../prompts/format.js';
|
|
9
|
-
class PortalTocNew extends Command {
|
|
10
|
-
async run() {
|
|
11
|
-
const { flags: { input, destination, force, 'expand-endpoints': expandEndpoints, 'expand-models': expandModels, 'expand-webhooks': expandWebhooks, 'expand-callbacks': expandCallbacks } } = await this.parse(_a);
|
|
12
|
-
const workingDirectory = DirectoryPath.createInput(input);
|
|
13
|
-
const buildDirectory = input ? new DirectoryPath(input, 'src') : workingDirectory.join('src');
|
|
14
|
-
const tocDirectory = destination ? new DirectoryPath(destination) : undefined;
|
|
15
|
-
const commandMetadata = {
|
|
16
|
-
commandName: _a.id,
|
|
17
|
-
shell: this.config.shell
|
|
18
|
-
};
|
|
19
|
-
intro('New TOC');
|
|
20
|
-
const action = new PortalNewTocAction(new DirectoryPath(this.config.configDir), commandMetadata);
|
|
21
|
-
const result = await action.execute(buildDirectory, tocDirectory, force, expandEndpoints, expandModels, expandWebhooks, expandCallbacks);
|
|
22
|
-
outro(result);
|
|
23
|
-
await result.mapAll(async () => { }, async () => {
|
|
24
|
-
const telemetryService = new TelemetryService(new DirectoryPath(this.config.configDir));
|
|
25
|
-
await telemetryService.trackEvent(
|
|
26
|
-
// TODO: fix Toc error message
|
|
27
|
-
new TocCreationFailedEvent('error', _a.id, {
|
|
28
|
-
input,
|
|
29
|
-
destination,
|
|
30
|
-
force,
|
|
31
|
-
'expand-endpoints': expandEndpoints,
|
|
32
|
-
'expand-models': expandModels,
|
|
33
|
-
'expand-webhooks': expandWebhooks,
|
|
34
|
-
'expand-callbacks': expandCallbacks
|
|
35
|
-
}), commandMetadata.shell);
|
|
36
|
-
}, async () => { });
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
_a = PortalTocNew;
|
|
40
|
-
PortalTocNew.summary = 'Generate a Table of Contents (TOC) file for your API documentation portal';
|
|
41
|
-
PortalTocNew.description = `This command generates a new Table of Contents (TOC) file used in the
|
|
42
|
-
generation of your API documentation portal.
|
|
43
|
-
|
|
44
|
-
The output is a YAML file with the .yml extension.
|
|
45
|
-
|
|
46
|
-
To learn more about the TOC file and APIMatic build directory structure, visit:
|
|
47
|
-
${format.link('https://docs.apimatic.io/platform-api/#/http/guides/generating-on-prem-api-portal/overview-generating-api-portal')}`;
|
|
48
|
-
PortalTocNew.flags = Object.assign(Object.assign(Object.assign(Object.assign({}, FlagsProvider.destination('src/content', `toc.yml`)), FlagsProvider.input), FlagsProvider.force), { 'expand-endpoints': Flags.boolean({
|
|
49
|
-
default: false,
|
|
50
|
-
description: `include individual entries for each endpoint in the generated ${format.var('toc.yml')}. Requires a valid API specification in the working directory.`
|
|
51
|
-
}), 'expand-models': Flags.boolean({
|
|
52
|
-
default: false,
|
|
53
|
-
description: `include individual entries for each model in the generated ${format.var('toc.yml')}. Requires a valid API specification in the working directory.`
|
|
54
|
-
}), 'expand-webhooks': Flags.boolean({
|
|
55
|
-
default: false,
|
|
56
|
-
description: `include individual entries for each webhook in the generated ${format.var('toc.yml')}. Requires a valid API specification in the working directory.`
|
|
57
|
-
}), 'expand-callbacks': Flags.boolean({
|
|
58
|
-
default: false,
|
|
59
|
-
description: `include individual entries for each callback in the generated ${format.var('toc.yml')}. Requires a valid API specification in the working directory.`
|
|
60
|
-
}) });
|
|
61
|
-
PortalTocNew.cmdTxt = format.cmd('apimatic', 'portal', 'toc', 'new');
|
|
62
|
-
PortalTocNew.examples = [
|
|
63
|
-
`${_a.cmdTxt} ${format.flag('destination', './src/content/')}`,
|
|
64
|
-
`${_a.cmdTxt} ${format.flag('input', './')}`,
|
|
65
|
-
`${_a.cmdTxt} ${format.flag('input', './')} ${format.flag('destination', './src/content/')}`
|
|
66
|
-
];
|
|
67
|
-
export default PortalTocNew;
|
|
68
|
-
//# sourceMappingURL=new.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new.js","sourceRoot":"","sources":["../../../../src/commands/portal/toc/new.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uDAAuD,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAqB,YAAa,SAAQ,OAAO;IAkD/C,KAAK,CAAC,GAAG;QACP,MAAM,EACJ,KAAK,EAAE,EACL,KAAK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U,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC,AAAjD,CAAkD;AACxD,qBAAQ,GAAG;IAChB,GAAG,EAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,gBAAgB,CAAC,EAAE;IAChE,GAAG,EAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE;IAC9C,GAAG,EAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,gBAAgB,CAAC,EAAE;CAC/F,AAJc,CAIb;eAhDiB,YAAY"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Command } from "@oclif/core";
|
|
2
|
-
export default class SaveChanges extends Command {
|
|
3
|
-
static readonly summary = "Save customizations made to an auto-generated SDK";
|
|
4
|
-
static readonly description = "Requires an input directory with API specifications, a path to the updated SDK directory, and the programming language.";
|
|
5
|
-
static readonly cmdTxt: string;
|
|
6
|
-
static flags: {
|
|
7
|
-
language: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
-
sdk: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
-
"api-version": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
static examples: string[];
|
|
12
|
-
run(): Promise<void>;
|
|
13
|
-
private readonly getConfigDir;
|
|
14
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Command, Flags } from "@oclif/core";
|
|
2
|
-
import { format, intro, outro } from "../../prompts/format.js";
|
|
3
|
-
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
4
|
-
import { SaveChangesAction } from "../../actions/sdk/save-changes.js";
|
|
5
|
-
import { Language } from "../../types/sdk/generate.js";
|
|
6
|
-
import { FlagsProvider } from "../../types/flags-provider.js";
|
|
7
|
-
import { TelemetryService } from "../../infrastructure/services/telemetry-service.js";
|
|
8
|
-
import { SdkChangesSavedEvent } from "../../types/events/sdk-changes-saved.js";
|
|
9
|
-
class SaveChanges extends Command {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.getConfigDir = () => {
|
|
13
|
-
return new DirectoryPath(this.config.configDir);
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
async run() {
|
|
17
|
-
const { flags: { sdk, language, input, "api-version": apiVersion } } = await this.parse(SaveChanges);
|
|
18
|
-
const workingDirectory = DirectoryPath.createInput(input);
|
|
19
|
-
const buildDirectory = workingDirectory.join("src");
|
|
20
|
-
const sdkDirectoryInput = sdk ? new DirectoryPath(sdk) : undefined;
|
|
21
|
-
const commandMetadata = {
|
|
22
|
-
commandName: SaveChanges.id,
|
|
23
|
-
shell: this.config.shell
|
|
24
|
-
};
|
|
25
|
-
const telemetryService = new TelemetryService(this.getConfigDir());
|
|
26
|
-
intro("Save Changes");
|
|
27
|
-
const action = new SaveChangesAction();
|
|
28
|
-
const result = await action.execute(workingDirectory, buildDirectory, sdkDirectoryInput, language, apiVersion);
|
|
29
|
-
outro(result);
|
|
30
|
-
await result.mapAll(async () => await telemetryService.trackEvent(new SdkChangesSavedEvent(language), commandMetadata.shell), async () => { }, async () => { });
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
SaveChanges.summary = "Save customizations made to an auto-generated SDK";
|
|
34
|
-
SaveChanges.description = "Requires an input directory with API specifications, a path to the updated SDK directory, and the programming language.";
|
|
35
|
-
SaveChanges.cmdTxt = format.cmd("apimatic", "sdk", "save-changes");
|
|
36
|
-
SaveChanges.flags = Object.assign({ language: Flags.string({
|
|
37
|
-
char: "l",
|
|
38
|
-
required: true,
|
|
39
|
-
description: "Programming language of the SDK",
|
|
40
|
-
options: Object.values(Language).map((p) => p.valueOf())
|
|
41
|
-
}), "sdk": Flags.string({
|
|
42
|
-
description: "[default: ./sdk/<language> | ./sdk/<api-version>/<language>] path to the folder containing the updated SDK."
|
|
43
|
-
}), "api-version": Flags.string({
|
|
44
|
-
description: "Version of the API where changes should be saved (if multiple versions exist)."
|
|
45
|
-
}) }, FlagsProvider.input);
|
|
46
|
-
SaveChanges.examples = [
|
|
47
|
-
`${SaveChanges.cmdTxt} ${format.flag("language", "csharp")}`,
|
|
48
|
-
`${SaveChanges.cmdTxt} ${format.flag("language", "java")} ${format.flag("sdk", "./sdk")}`
|
|
49
|
-
];
|
|
50
|
-
export default SaveChanges;
|
|
51
|
-
//# sourceMappingURL=save-changes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"save-changes.js","sourceRoot":"","sources":["../../../src/commands/sdk/save-changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AAEtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAE/E,MAAqB,WAAY,SAAQ,OAAO;IAAhD;;QA8DmB,iBAAY,GAAG,GAAG,EAAE;YACnC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAClD,CAAC,CAAC;IACJ,CAAC;IApCC,KAAK,CAAC,GAAG;QACP,MAAM,EACJ,KAAK,EAAE,EAAE,GAAG,EA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AAhD,CAAiD;AAEhE,iBAAK,mBACV,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,iCAAiC;QAC9C,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;KACzD,CAAC,EACF,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;QAClB,WAAW,EAAE,6GAA6G;KAC3H,CAAC,EACF,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC;QAC1B,WAAW,EAAE,gFAAgF;KAC9F,CAAC,IACC,aAAa,CAAC,KAAK,CAbZ,CAcV;AAEK,oBAAQ,GAAG;IAChB,GAAG,WAAW,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE;IAC5D,GAAG,WAAW,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE;CAC1F,AAHc,CAGb;eA3BiB,WAAW"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class DebounceService {
|
|
2
|
-
private isProcessing;
|
|
3
|
-
private latestHandler;
|
|
4
|
-
private debounceTimer;
|
|
5
|
-
private readonly debounceMs;
|
|
6
|
-
constructor(debounceMs?: number);
|
|
7
|
-
batchSingleRequest(handler: () => Promise<void>): Promise<void>;
|
|
8
|
-
private scheduleExecution;
|
|
9
|
-
close(): void;
|
|
10
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { clearTimeout, setTimeout } from "timers";
|
|
2
|
-
export class DebounceService {
|
|
3
|
-
constructor(debounceMs = 500) {
|
|
4
|
-
this.isProcessing = false;
|
|
5
|
-
this.latestHandler = null;
|
|
6
|
-
this.debounceTimer = null;
|
|
7
|
-
this.debounceMs = debounceMs;
|
|
8
|
-
}
|
|
9
|
-
async batchSingleRequest(handler) {
|
|
10
|
-
// Always store the latest handler
|
|
11
|
-
this.latestHandler = handler;
|
|
12
|
-
// If already processing, don't start a new timer. Just update the latest handler
|
|
13
|
-
if (this.isProcessing) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
// Clear any existing timer
|
|
17
|
-
if (this.debounceTimer) {
|
|
18
|
-
clearTimeout(this.debounceTimer);
|
|
19
|
-
}
|
|
20
|
-
// Set up debounced execution
|
|
21
|
-
this.scheduleExecution();
|
|
22
|
-
}
|
|
23
|
-
scheduleExecution() {
|
|
24
|
-
this.debounceTimer = setTimeout(async () => {
|
|
25
|
-
if (this.isProcessing) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
this.isProcessing = true;
|
|
29
|
-
this.debounceTimer = null;
|
|
30
|
-
try {
|
|
31
|
-
// Execute the latest handler if it exists
|
|
32
|
-
if (this.latestHandler) {
|
|
33
|
-
const currentHandler = this.latestHandler;
|
|
34
|
-
this.latestHandler = null;
|
|
35
|
-
await currentHandler();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
finally {
|
|
39
|
-
this.isProcessing = false;
|
|
40
|
-
if (this.latestHandler) {
|
|
41
|
-
this.scheduleExecution();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}, this.debounceMs);
|
|
45
|
-
}
|
|
46
|
-
// Method to clear any pending execution.
|
|
47
|
-
close() {
|
|
48
|
-
if (this.debounceTimer) {
|
|
49
|
-
clearTimeout(this.debounceTimer);
|
|
50
|
-
this.debounceTimer = null;
|
|
51
|
-
}
|
|
52
|
-
this.latestHandler = null;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=debounce-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debounce-service.js","sourceRoot":"","sources":["../../src/infr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