@apimatic/cli 1.1.0-alpha.9 → 1.1.0-beta.10
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/README.md +443 -374
- package/bin/run.js +5 -0
- package/lib/actions/action-result.d.ts +19 -0
- package/lib/actions/action-result.js +70 -0
- package/lib/actions/action-result.js.map +1 -0
- package/lib/actions/api/transform.d.ts +15 -0
- package/lib/actions/api/transform.js +48 -0
- package/lib/actions/api/transform.js.map +1 -0
- package/lib/actions/api/validate.d.ts +14 -0
- package/lib/actions/api/validate.js +52 -0
- package/lib/actions/api/validate.js.map +1 -0
- package/lib/actions/auth/login.d.ts +13 -0
- package/lib/actions/auth/login.js +55 -0
- package/lib/actions/auth/login.js.map +1 -0
- package/lib/actions/auth/logout.d.ts +8 -0
- package/lib/actions/auth/logout.js +15 -0
- package/lib/actions/auth/logout.js.map +1 -0
- package/lib/actions/auth/status.d.ts +11 -0
- package/lib/actions/auth/status.js +26 -0
- package/lib/actions/auth/status.js.map +1 -0
- package/lib/actions/portal/copilot.d.ts +16 -0
- package/lib/actions/portal/copilot.js +89 -0
- package/lib/actions/portal/copilot.js.map +1 -0
- package/lib/actions/portal/generate.d.ts +11 -5
- package/lib/actions/portal/generate.js +60 -55
- package/lib/actions/portal/generate.js.map +1 -0
- package/lib/actions/portal/quickstart.d.ts +17 -0
- package/lib/actions/portal/quickstart.js +169 -0
- package/lib/actions/portal/quickstart.js.map +1 -0
- package/lib/actions/portal/recipe/new-recipe.d.ts +15 -0
- package/lib/actions/portal/recipe/new-recipe.js +177 -0
- package/lib/actions/portal/recipe/new-recipe.js.map +1 -0
- package/lib/actions/portal/serve.d.ts +15 -0
- package/lib/actions/portal/serve.js +104 -0
- package/lib/actions/portal/serve.js.map +1 -0
- package/lib/actions/portal/toc/new-toc.d.ts +17 -13
- package/lib/actions/portal/toc/new-toc.js +85 -123
- package/lib/actions/portal/toc/new-toc.js.map +1 -0
- package/lib/actions/quickstart.d.ts +10 -0
- package/lib/actions/quickstart.js +30 -0
- package/lib/actions/quickstart.js.map +1 -0
- package/lib/actions/sdk/generate.d.ts +13 -0
- package/lib/actions/sdk/generate.js +77 -0
- package/lib/actions/sdk/generate.js.map +1 -0
- package/lib/actions/sdk/quickstart.d.ts +17 -0
- package/lib/actions/sdk/quickstart.js +171 -0
- package/lib/actions/sdk/quickstart.js.map +1 -0
- package/lib/application/portal/recipe/portal-recipe.d.ts +8 -0
- package/lib/application/portal/recipe/portal-recipe.js +33 -0
- package/lib/application/portal/recipe/portal-recipe.js.map +1 -0
- package/lib/application/portal/recipe/recipe-generator.d.ts +21 -0
- package/lib/application/portal/recipe/recipe-generator.js +145 -0
- package/lib/application/portal/recipe/recipe-generator.js.map +1 -0
- package/lib/application/portal/toc/toc-content-parser.d.ts +1 -1
- package/lib/application/portal/toc/toc-content-parser.js +9 -11
- package/lib/application/portal/toc/toc-content-parser.js.map +1 -0
- package/lib/application/portal/toc/toc-structure-generator.d.ts +23 -2
- package/lib/application/portal/toc/toc-structure-generator.js +133 -66
- package/lib/application/portal/toc/toc-structure-generator.js.map +1 -0
- package/lib/client-utils/auth-manager.d.ts +7 -2
- package/lib/client-utils/auth-manager.js +26 -14
- package/lib/client-utils/auth-manager.js.map +1 -0
- package/lib/commands/api/transform.d.ts +10 -7
- package/lib/commands/api/transform.js +51 -111
- package/lib/commands/api/transform.js.map +1 -0
- package/lib/commands/api/validate.d.ts +7 -4
- package/lib/commands/api/validate.js +31 -74
- package/lib/commands/api/validate.js.map +1 -0
- package/lib/commands/auth/login.d.ts +3 -1
- package/lib/commands/auth/login.js +26 -68
- package/lib/commands/auth/login.js.map +1 -0
- package/lib/commands/auth/logout.d.ts +3 -1
- package/lib/commands/auth/logout.js +14 -21
- package/lib/commands/auth/logout.js.map +1 -0
- package/lib/commands/auth/status.d.ts +1 -0
- package/lib/commands/auth/status.js +18 -21
- package/lib/commands/auth/status.js.map +1 -0
- package/lib/commands/portal/copilot.d.ts +13 -0
- package/lib/commands/portal/copilot.js +34 -0
- package/lib/commands/portal/copilot.js.map +1 -0
- package/lib/commands/portal/generate.d.ts +7 -11
- package/lib/commands/portal/generate.js +26 -89
- package/lib/commands/portal/generate.js.map +1 -0
- package/lib/commands/portal/recipe/new.d.ts +12 -0
- package/lib/commands/portal/recipe/new.js +45 -0
- package/lib/commands/portal/recipe/new.js.map +1 -0
- package/lib/commands/portal/serve.d.ts +8 -8
- package/lib/commands/portal/serve.js +41 -125
- package/lib/commands/portal/serve.js.map +1 -0
- package/lib/commands/portal/toc/new.d.ts +8 -7
- package/lib/commands/portal/toc/new.js +52 -49
- package/lib/commands/portal/toc/new.js.map +1 -0
- package/lib/commands/quickstart.d.ts +9 -0
- package/lib/commands/quickstart.js +37 -0
- package/lib/commands/quickstart.js.map +1 -0
- package/lib/commands/sdk/generate.d.ts +10 -8
- package/lib/commands/sdk/generate.js +46 -131
- package/lib/commands/sdk/generate.js.map +1 -0
- package/lib/config/axios-config.js +4 -6
- package/lib/config/axios-config.js.map +1 -0
- package/lib/hooks/not-found.d.ts +3 -0
- package/lib/hooks/not-found.js +52 -0
- package/lib/hooks/not-found.js.map +1 -0
- package/lib/hooks/utils.d.ts +5 -0
- package/lib/hooks/utils.js +51 -0
- package/lib/hooks/utils.js.map +1 -0
- package/lib/index.js +2 -5
- package/lib/index.js.map +1 -0
- package/lib/infrastructure/debounce-service.d.ts +10 -0
- package/lib/infrastructure/debounce-service.js +55 -0
- package/lib/infrastructure/debounce-service.js.map +1 -0
- package/lib/infrastructure/env-info.d.ts +12 -0
- package/lib/infrastructure/env-info.js +58 -0
- package/lib/infrastructure/env-info.js.map +1 -0
- package/lib/infrastructure/file-service.d.ts +25 -0
- package/lib/infrastructure/file-service.js +131 -0
- package/lib/infrastructure/file-service.js.map +1 -0
- package/lib/infrastructure/launcher-service.d.ts +9 -0
- package/lib/infrastructure/launcher-service.js +72 -0
- package/lib/infrastructure/launcher-service.js.map +1 -0
- package/lib/infrastructure/network-service.d.ts +3 -0
- package/lib/infrastructure/network-service.js +7 -0
- package/lib/infrastructure/network-service.js.map +1 -0
- package/lib/infrastructure/service-error.d.ts +16 -0
- package/lib/infrastructure/service-error.js +49 -0
- package/lib/infrastructure/service-error.js.map +1 -0
- package/lib/infrastructure/services/api-client-factory.d.ts +6 -0
- package/lib/infrastructure/services/api-client-factory.js +20 -0
- package/lib/infrastructure/services/api-client-factory.js.map +1 -0
- package/lib/infrastructure/services/api-service.d.ts +13 -0
- package/lib/infrastructure/services/api-service.js +103 -0
- package/lib/infrastructure/services/api-service.js.map +1 -0
- package/lib/infrastructure/services/auth-service.d.ts +11 -0
- package/lib/infrastructure/services/auth-service.js +37 -0
- package/lib/infrastructure/services/auth-service.js.map +1 -0
- package/lib/infrastructure/services/file-download-service.d.ts +15 -0
- package/lib/infrastructure/services/file-download-service.js +104 -0
- package/lib/infrastructure/services/file-download-service.js.map +1 -0
- package/lib/infrastructure/services/portal-service.d.ts +15 -12
- package/lib/infrastructure/services/portal-service.js +152 -99
- package/lib/infrastructure/services/portal-service.js.map +1 -0
- package/lib/infrastructure/services/telemetry-service.d.ts +9 -0
- package/lib/infrastructure/services/telemetry-service.js +38 -0
- package/lib/infrastructure/services/telemetry-service.js.map +1 -0
- package/lib/infrastructure/services/transformation-service.d.ts +23 -0
- package/lib/infrastructure/services/transformation-service.js +56 -0
- package/lib/infrastructure/services/transformation-service.js.map +1 -0
- package/lib/infrastructure/services/validation-service.d.ts +43 -0
- package/lib/infrastructure/services/validation-service.js +142 -0
- package/lib/infrastructure/services/validation-service.js.map +1 -0
- package/lib/infrastructure/tmp-extensions.d.ts +2 -0
- package/lib/infrastructure/tmp-extensions.js +6 -0
- package/lib/infrastructure/tmp-extensions.js.map +1 -0
- package/lib/infrastructure/zip-service.d.ts +6 -0
- package/lib/infrastructure/zip-service.js +39 -0
- package/lib/infrastructure/zip-service.js.map +1 -0
- package/lib/prompts/api/transform.d.ts +11 -0
- package/lib/prompts/api/transform.js +29 -0
- package/lib/prompts/api/transform.js.map +1 -0
- package/lib/prompts/api/validate.d.ts +15 -0
- package/lib/prompts/api/validate.js +76 -0
- package/lib/prompts/api/validate.js.map +1 -0
- package/lib/prompts/auth/login.d.ts +10 -0
- package/lib/prompts/auth/login.js +22 -0
- package/lib/prompts/auth/login.js.map +1 -0
- package/lib/prompts/auth/logout.d.ts +3 -0
- package/lib/prompts/auth/logout.js +7 -0
- package/lib/prompts/auth/logout.js.map +1 -0
- package/lib/prompts/auth/status.d.ts +8 -0
- package/lib/prompts/auth/status.js +22 -0
- package/lib/prompts/auth/status.js.map +1 -0
- package/lib/prompts/format.d.ts +31 -0
- package/lib/prompts/format.js +89 -0
- package/lib/prompts/format.js.map +1 -0
- package/lib/prompts/portal/copilot.d.ts +18 -0
- package/lib/prompts/portal/copilot.js +82 -0
- package/lib/prompts/portal/copilot.js.map +1 -0
- package/lib/prompts/portal/generate.d.ts +13 -8
- package/lib/prompts/portal/generate.js +36 -53
- package/lib/prompts/portal/generate.js.map +1 -0
- package/lib/prompts/portal/quickstart.d.ts +31 -29
- package/lib/prompts/portal/quickstart.js +139 -185
- package/lib/prompts/portal/quickstart.js.map +1 -0
- package/lib/prompts/portal/recipe/new-recipe.d.ts +29 -0
- package/lib/prompts/portal/recipe/new-recipe.js +165 -0
- package/lib/prompts/portal/recipe/new-recipe.js.map +1 -0
- package/lib/prompts/portal/serve.d.ts +9 -5
- package/lib/prompts/portal/serve.js +29 -19
- package/lib/prompts/portal/serve.js.map +1 -0
- package/lib/prompts/portal/toc/new-toc.d.ts +13 -8
- package/lib/prompts/portal/toc/new-toc.js +36 -36
- package/lib/prompts/portal/toc/new-toc.js.map +1 -0
- package/lib/prompts/prompt.d.ts +3 -0
- package/lib/prompts/prompt.js +37 -0
- package/lib/prompts/prompt.js.map +1 -0
- package/lib/prompts/quickstart.d.ts +6 -0
- package/lib/prompts/quickstart.js +25 -0
- package/lib/prompts/quickstart.js.map +1 -0
- package/lib/prompts/sdk/generate.d.ts +16 -0
- package/lib/prompts/sdk/generate.js +57 -0
- package/lib/prompts/sdk/generate.js.map +1 -0
- package/lib/prompts/sdk/quickstart.d.ts +35 -0
- package/lib/prompts/sdk/quickstart.js +177 -0
- package/lib/prompts/sdk/quickstart.js.map +1 -0
- package/lib/types/api/account.d.ts +10 -0
- package/lib/types/api/account.js +2 -0
- package/lib/types/api/account.js.map +1 -0
- package/lib/types/api/transform.d.ts +14 -25
- package/lib/types/api/transform.js +20 -23
- package/lib/types/api/transform.js.map +1 -0
- package/lib/types/build/build.d.ts +22 -0
- package/lib/types/build/build.js +7 -0
- package/lib/types/build/build.js.map +1 -0
- package/lib/types/build-context.d.ts +13 -0
- package/lib/types/build-context.js +33 -0
- package/lib/types/build-context.js.map +1 -0
- package/lib/types/common/command-metadata.d.ts +4 -0
- package/lib/types/common/command-metadata.js +2 -0
- package/lib/types/common/command-metadata.js.map +1 -0
- package/lib/types/events/domain-event.d.ts +8 -0
- package/lib/types/events/domain-event.js +11 -0
- package/lib/types/events/domain-event.js.map +1 -0
- package/lib/types/events/quickstart-completed.d.ts +7 -0
- package/lib/types/events/quickstart-completed.js +10 -0
- package/lib/types/events/quickstart-completed.js.map +1 -0
- package/lib/types/events/quickstart-initiated.d.ts +7 -0
- package/lib/types/events/quickstart-initiated.js +10 -0
- package/lib/types/events/quickstart-initiated.js.map +1 -0
- package/lib/types/events/recipe-creation-failed.d.ts +5 -0
- package/lib/types/events/recipe-creation-failed.js +8 -0
- package/lib/types/events/recipe-creation-failed.js.map +1 -0
- package/lib/types/events/toc-creation-failed.d.ts +5 -0
- package/lib/types/events/toc-creation-failed.js +8 -0
- package/lib/types/events/toc-creation-failed.js.map +1 -0
- package/lib/types/file/directory.d.ts +17 -0
- package/lib/types/file/directory.js +87 -0
- package/lib/types/file/directory.js.map +1 -0
- package/lib/types/file/directoryPath.d.ts +10 -0
- package/lib/types/file/directoryPath.js +26 -0
- package/lib/types/file/directoryPath.js.map +1 -0
- package/lib/types/file/fileName.d.ts +7 -0
- package/lib/types/file/fileName.js +21 -0
- package/lib/types/file/fileName.js.map +1 -0
- package/lib/types/file/filePath.d.ts +10 -0
- package/lib/types/file/filePath.js +32 -0
- package/lib/types/file/filePath.js.map +1 -0
- package/lib/types/file/resource-input.d.ts +5 -0
- package/lib/types/file/resource-input.js +42 -0
- package/lib/types/file/resource-input.js.map +1 -0
- package/lib/types/file/urlPath.d.ts +6 -0
- package/lib/types/file/urlPath.js +22 -0
- package/lib/types/file/urlPath.js.map +1 -0
- package/lib/types/flags-provider.d.ts +15 -0
- package/lib/types/flags-provider.js +34 -0
- package/lib/types/flags-provider.js.map +1 -0
- package/lib/types/portal-context.d.ts +13 -0
- package/lib/types/portal-context.js +38 -0
- package/lib/types/portal-context.js.map +1 -0
- package/lib/types/recipe/recipe.d.ts +22 -0
- package/lib/types/recipe/recipe.js +6 -0
- package/lib/types/recipe/recipe.js.map +1 -0
- package/lib/types/recipe-context.d.ts +9 -0
- package/lib/types/recipe-context.js +26 -0
- package/lib/types/recipe-context.js.map +1 -0
- package/lib/types/resource-context.d.ts +12 -0
- package/lib/types/resource-context.js +30 -0
- package/lib/types/resource-context.js.map +1 -0
- package/lib/types/sdk/generate.d.ts +9 -22
- package/lib/types/sdk/generate.js +25 -14
- package/lib/types/sdk/generate.js.map +1 -0
- package/lib/types/sdk-context.d.ts +14 -0
- package/lib/types/sdk-context.js +32 -0
- package/lib/types/sdk-context.js.map +1 -0
- package/lib/types/sdl/sdl.d.ts +27 -0
- package/lib/types/sdl/sdl.js +145 -3
- package/lib/types/sdl/sdl.js.map +1 -0
- package/lib/types/spec-context.d.ts +12 -0
- package/lib/types/spec-context.js +29 -0
- package/lib/types/spec-context.js.map +1 -0
- package/lib/types/temp-context.d.ts +11 -0
- package/lib/types/temp-context.js +27 -0
- package/lib/types/temp-context.js.map +1 -0
- package/lib/types/toc/toc.d.ts +31 -6
- package/lib/types/toc/toc.js +2 -10
- package/lib/types/toc/toc.js.map +1 -0
- package/lib/types/toc-context.d.ts +12 -0
- package/lib/types/toc-context.js +26 -0
- package/lib/types/toc-context.js.map +1 -0
- package/lib/types/transform-context.d.ts +13 -0
- package/lib/types/transform-context.js +30 -0
- package/lib/types/transform-context.js.map +1 -0
- package/lib/types/utils.d.ts +0 -9
- package/lib/types/utils.js +2 -3
- package/lib/types/utils.js.map +1 -0
- package/lib/types/versioned-build-context.d.ts +15 -0
- package/lib/types/versioned-build-context.js +28 -0
- package/lib/types/versioned-build-context.js.map +1 -0
- package/lib/utils/string-utils.d.ts +3 -0
- package/lib/utils/string-utils.js +79 -0
- package/lib/utils/string-utils.js.map +1 -0
- package/lib/utils/utils.d.ts +2 -44
- package/lib/utils/utils.js +14 -366
- package/lib/utils/utils.js.map +1 -0
- package/package.json +50 -31
- package/bin/run +0 -9
- package/lib/application/portal/toc/sdl-parser.d.ts +0 -13
- package/lib/application/portal/toc/sdl-parser.js +0 -53
- package/lib/client-utils/sdk-client.d.ts +0 -23
- package/lib/client-utils/sdk-client.js +0 -124
- package/lib/commands/portal/quickstart.d.ts +0 -10
- package/lib/commands/portal/quickstart.js +0 -79
- package/lib/config/env.d.ts +0 -27
- package/lib/config/env.js +0 -31
- package/lib/controllers/api/transform.d.ts +0 -5
- package/lib/controllers/api/transform.js +0 -56
- package/lib/controllers/api/validate.d.ts +0 -3
- package/lib/controllers/api/validate.js +0 -33
- package/lib/controllers/portal/generate.d.ts +0 -3
- package/lib/controllers/portal/generate.js +0 -110
- package/lib/controllers/portal/quickstart.d.ts +0 -14
- package/lib/controllers/portal/quickstart.js +0 -258
- package/lib/controllers/portal/serve.d.ts +0 -3
- package/lib/controllers/portal/serve.js +0 -138
- package/lib/controllers/sdk/generate.d.ts +0 -4
- package/lib/controllers/sdk/generate.js +0 -66
- package/lib/services/portal/server.d.ts +0 -14
- package/lib/services/portal/server.js +0 -101
- package/lib/types/api/validate.d.ts +0 -12
- package/lib/types/api/validate.js +0 -3
- package/lib/types/common/result.d.ts +0 -17
- package/lib/types/common/result.js +0 -36
- package/lib/types/portal/generate.d.ts +0 -26
- package/lib/types/portal/generate.js +0 -4
- package/lib/types/portal/quickstart.d.ts +0 -17
- package/lib/types/portal/quickstart.js +0 -3
- package/lib/validators/common/directoryValidator.d.ts +0 -9
- package/lib/validators/common/directoryValidator.js +0 -53
- package/lib/validators/common/portValidator.d.ts +0 -5
- package/lib/validators/common/portValidator.js +0 -20
- package/lib/validators/portal/serveValidator.d.ts +0 -6
- package/lib/validators/portal/serveValidator.js +0 -21
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { log } from "@clack/prompts";
|
|
2
|
+
import { format as f } from "../format.js";
|
|
3
|
+
import { once } from "events";
|
|
4
|
+
import { noteWrapped } from "../prompt.js";
|
|
5
|
+
export class PortalServePrompts {
|
|
6
|
+
usingFallbackPort(currentPort, availablePort) {
|
|
7
|
+
const message = `Port ${f.var(currentPort.toString())} is already in use. Available port ${f.var(availablePort.toString())} will be used.`;
|
|
8
|
+
log.step(message);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
portalServed(urlPath) {
|
|
11
|
+
const message = `The portal is running at ${f.link(urlPath.toString())}`;
|
|
12
|
+
log.message(message);
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
promptForExit() {
|
|
15
|
+
const message = "Press CTRL+C to stop the server.";
|
|
16
|
+
log.message(message);
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
changesDetected() {
|
|
19
|
+
const message = "Changes detected...";
|
|
20
|
+
log.info(message);
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
watcherError() {
|
|
23
|
+
const message = `An unexpected error occurred while watching your build folder for changes. Please try again later. If the issue persists, contact our team at ${f.var("support@apimatic.io")}`;
|
|
24
|
+
log.error(message);
|
|
25
|
+
}
|
|
26
|
+
async blockExecution() {
|
|
27
|
+
await Promise.race([once(process, "SIGINT"), once(process, "SIGTERM")]);
|
|
28
|
+
}
|
|
29
|
+
hotReloadEnabled(srcDirectory) {
|
|
30
|
+
noteWrapped(`Hot reload is enabled.
|
|
31
|
+
|
|
32
|
+
Watching the directory ${f.path(srcDirectory)} for any changes`, `Note`);
|
|
22
33
|
}
|
|
23
34
|
}
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcHJvbXB0cy9wb3J0YWwvc2VydmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNENBQXFEO0FBQ3JELDZDQUF5RDtBQUV6RCxNQUFhLGtCQUFrQjtJQUEvQjtRQUNtQixTQUFJLEdBQUcsSUFBQSxpQkFBTyxHQUFFLENBQUM7SUFrQnBDLENBQUM7SUFoQkMsOEJBQThCO1FBQzVCLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLG1CQUFtQixDQUFDLENBQUM7SUFDdkMsQ0FBQztJQUVELG1DQUFtQztRQUNqQyxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFBLDRCQUFvQixFQUFDLGlEQUFpRCxDQUFDLENBQUMsQ0FBQztJQUMxRixDQUFDO0lBRUQsNkJBQTZCLENBQUMsU0FBaUI7UUFDN0MsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsb0NBQW9DLFNBQVMsRUFBRSxDQUFDLENBQUM7SUFDbEUsQ0FBQztJQUVELG1CQUFtQixDQUFDLElBQVk7UUFDOUIsYUFBRyxDQUFDLE9BQU8sQ0FBQyxzQ0FBc0MsSUFBSSxFQUFFLENBQUMsQ0FBQztRQUMxRCxJQUFBLGVBQUssRUFBQyxrQ0FBa0MsQ0FBQyxDQU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OAAO,CAAC,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC;IAEM,gBAAgB,CAAC,YAA2B;QACjD,WAAW,CACT;;yBAEmB,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,kBAAkB,EACzD,MAAM,CACP,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import { FilePath } from "../../../types/file/filePath.js";
|
|
2
|
+
import { Result } from "neverthrow";
|
|
3
|
+
import { DirectoryPath } from "../../../types/file/directoryPath.js";
|
|
4
|
+
import { ServiceError } from "../../../infrastructure/service-error.js";
|
|
5
|
+
import { Sdl } from "../../../types/sdl/sdl.js";
|
|
1
6
|
export declare class PortalNewTocPrompts {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
overwriteToc(tocPath: FilePath): Promise<boolean>;
|
|
8
|
+
fallingBackToDefault(): void;
|
|
9
|
+
tocFileAlreadyExists(): void;
|
|
10
|
+
logError(message: string): void;
|
|
11
|
+
contentDirectoryNotFound(contentFolderPath: DirectoryPath): void;
|
|
12
|
+
invalidBuildDirectory(directory: DirectoryPath): void;
|
|
13
|
+
extractComponents(fn: Promise<Result<Sdl, ServiceError>>, expandEndpoints: boolean, expandModels: boolean, expandWebhooks: boolean, expandCallbacks: boolean): Promise<Result<Sdl, ServiceError>>;
|
|
14
|
+
tocCreated(tocPath: FilePath): void;
|
|
10
15
|
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
async overwriteExistingTocPrompt() {
|
|
10
|
-
const useExistingFile = await (0, prompts_1.select)({
|
|
11
|
-
message: `A toc file already exists at the specified destination path, do you want to overwrite it?`,
|
|
12
|
-
options: [
|
|
13
|
-
{ value: "yes", label: "Yes" },
|
|
14
|
-
{ value: "no", label: "No" }
|
|
15
|
-
]
|
|
1
|
+
import { confirm, isCancel, log } from "@clack/prompts";
|
|
2
|
+
import { format as f } from "../../format.js";
|
|
3
|
+
import { withSpinner } from "../../prompt.js";
|
|
4
|
+
export class PortalNewTocPrompts {
|
|
5
|
+
async overwriteToc(tocPath) {
|
|
6
|
+
const overwrite = await confirm({
|
|
7
|
+
message: `The destination file ${f.path(tocPath)} already exists, do you want to overwrite it?`,
|
|
8
|
+
initialValue: false
|
|
16
9
|
});
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
return process.exit(1);
|
|
10
|
+
if (isCancel(overwrite)) {
|
|
11
|
+
return false;
|
|
20
12
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
return overwrite;
|
|
14
|
+
}
|
|
15
|
+
fallingBackToDefault() {
|
|
16
|
+
log.warn(`Falling back to the default TOC structure.`);
|
|
25
17
|
}
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
tocFileAlreadyExists() {
|
|
19
|
+
log.error(`Please enter a different destination path or delete the existing toc.yml file and try again.`);
|
|
28
20
|
}
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
logError(message) {
|
|
22
|
+
log.error(message);
|
|
31
23
|
}
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
contentDirectoryNotFound(contentFolderPath) {
|
|
25
|
+
log.error(`Content folder not found at: ${contentFolderPath}`);
|
|
34
26
|
}
|
|
35
|
-
|
|
36
|
-
(
|
|
27
|
+
invalidBuildDirectory(directory) {
|
|
28
|
+
const message = `The ${f.var("src")} directory is either empty or invalid: ${f.path(directory)}`;
|
|
29
|
+
log.error(message);
|
|
37
30
|
}
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
extractComponents(fn, expandEndpoints, expandModels, expandWebhooks, expandCallbacks) {
|
|
32
|
+
const components = [
|
|
33
|
+
expandEndpoints && "Endpoint groups",
|
|
34
|
+
expandModels && "Models",
|
|
35
|
+
expandWebhooks && "Webhooks",
|
|
36
|
+
expandCallbacks && "Callbacks"
|
|
37
|
+
]
|
|
38
|
+
.filter(Boolean)
|
|
39
|
+
.join(" and ");
|
|
40
|
+
return withSpinner(`Extracting ${components}`, `${components} extracted`, `${components} extraction failed`, fn);
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
tocCreated(tocPath) {
|
|
43
|
+
log.info(`The TOC file successfully created at: ${f.path(tocPath)}`);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV3LXRvYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9wcm9tcHRzL3BvcnRhbC90b2MvbmV3LXRvYy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw0Q0FBK0U7QUFFL0UsTUFBYSxtQkFBbUI7SUFBaEM7UUFDbUIsU0FBSSxHQUFHLElBQUEsaUJBQU8sR0FBRSxDQUFDO0lBOENwQyxDQUFDO0lBNUNDLEtBQUssQ0FBQywwQkFBMEI7UUFDOUIsTUFBTSxlQUFlLEdBQUcsTUFBTSxJQUFBLGdCQUFNLEVBQUM7WUFDbkMsT0FBTyxFQUFFLDJGQUEyRjtZQUNwRyxPQUFPLEVBQUU7Z0JBQ1AsRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUU7Z0JBQzlCLEVBQUUsS0FBSyxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFO2FBQzdCO1NBQ0YsQ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B,EACxB,YAAqB,EACrB,cAAuB,EACvB,eAAwB;QAExB,MAAM,UAAU,GAAG;YACjB,eAAe,IAAI,iBAAiB;YACpC,YAAY,IAAI,QAAQ;YACxB,cAAc,IAAI,UAAU;YAC5B,eAAe,IAAI,WAAW;SAC/B;aACE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,OAAO,CAAC,CAAC;QAEjB,OAAO,WAAW,CAAC,cAAc,UAAU,EAAE,EAAE,GAAG,UAAU,YAAY,EAAE,GAAG,UAAU,oBAAoB,EAAE,EAAE,CAAC,CAAC;IACnH,CAAC;IAEM,UAAU,CAAC,OAAiB;QACjC,GAAG,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACvE,CAAC;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import pc from "picocolors";
|
|
2
|
+
import { getColumns } from "@clack/core";
|
|
3
|
+
import { log, note, S_BAR_H, S_CONNECT_LEFT, spinner } from "@clack/prompts";
|
|
4
|
+
import { stripAnsi } from "../utils/string-utils.js";
|
|
5
|
+
export async function withSpinner(intro, success, failure, fn) {
|
|
6
|
+
const s = spinner({
|
|
7
|
+
cancelMessage: "cancelled",
|
|
8
|
+
errorMessage: "failed",
|
|
9
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
|
|
10
|
+
});
|
|
11
|
+
s.start(intro);
|
|
12
|
+
const result = await fn;
|
|
13
|
+
result.match(() => s.stop(success, 0), () => s.stop(failure, 1));
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
16
|
+
export const noteWrapped = (message, title) => {
|
|
17
|
+
const output = process.stdout;
|
|
18
|
+
const columns = getColumns(output) || 80;
|
|
19
|
+
const messages = message.split("\n");
|
|
20
|
+
const messageHasOverFlow = messages.some((msg) => {
|
|
21
|
+
const clean = stripAnsi(msg);
|
|
22
|
+
return clean.length + 6 > columns;
|
|
23
|
+
});
|
|
24
|
+
if (messageHasOverFlow) {
|
|
25
|
+
const startLine = S_BAR_H.repeat(columns - title.length - 4);
|
|
26
|
+
log.step(`${title} ${pc.gray(startLine)}`);
|
|
27
|
+
log.message(message);
|
|
28
|
+
output.write(pc.gray(S_CONNECT_LEFT + S_BAR_H.repeat(columns - 1)) + "\n");
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const opts = {
|
|
32
|
+
format: (line) => line
|
|
33
|
+
};
|
|
34
|
+
note(message, title, opts);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/prompts/prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAe,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE1F,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,CAAC,KAAK,UAAU,WAAW,CAAO,KAAa,EAAE,OAAe,EAAE,OAAe,EAAE,EAAyB;IAChH,MAAM,CAAC,GAAG,OAAO,CAAC;QAChB,aAAa,EAAE,WAAW;QAC1B,YAAY,EAAE,QAAQ;QACtB,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;KAC3D,CAAC,CAAC;IACH,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,KAAK,CACV,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO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CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { isCancel, log, select } from "@clack/prompts";
|
|
2
|
+
export class QuickstartPrompts {
|
|
3
|
+
welcomeMessage() {
|
|
4
|
+
log.info(`Welcome to the APIMatic quickstart wizard.`);
|
|
5
|
+
log.message(`This wizard will guide you through creating your first SDK or API Documentation Portal in just four easy steps.
|
|
6
|
+
Let's get started!`);
|
|
7
|
+
}
|
|
8
|
+
async selectQuickstartFlow() {
|
|
9
|
+
const option = await select({
|
|
10
|
+
message: "What would you like to create?",
|
|
11
|
+
options: [
|
|
12
|
+
{ value: "portal", label: "API Documentation Portal", hint: "Generate API docs + SDKs" },
|
|
13
|
+
{ value: "sdk", label: "SDK" }
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
if (isCancel(option)) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
return option;
|
|
20
|
+
}
|
|
21
|
+
noQuickstartFlowSelected() {
|
|
22
|
+
log.error("No option was selected.");
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=quickstart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quickstart.js","sourceRoot":"","sources":["../../src/prompts/quickstart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAIvD,MAAM,OAAO,iBAAiB;IACrB,cAAc;QACnB,GAAG,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;QACvD,GAAG,CAAC,OAAO,CAAC;mBACG,CAAC,CAAC;IACnB,CAAC;IAEM,KAAK,CAAC,oBAAoB;QAC/B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC;YAC1B,OAAO,EAAE,gCAAgC;YACzC,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,0BAA0B,EAAE,IAAI,EAAE,0BAA0B,EAAE;gBACxF,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;aAC/B;SACF,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACrB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,wBAAwB;QAC7B,GAAG,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
2
|
+
import { Result } from "neverthrow";
|
|
3
|
+
import { ServiceError } from "../../infrastructure/service-error.js";
|
|
4
|
+
export declare class SdkGeneratePrompts {
|
|
5
|
+
overwriteSdk(directory: DirectoryPath): Promise<boolean>;
|
|
6
|
+
sameBuildAndSdkDir(directory: DirectoryPath): void;
|
|
7
|
+
specDirectoryEmpty(directory: DirectoryPath): void;
|
|
8
|
+
destinationDirNotEmpty(): void;
|
|
9
|
+
generateSDK(fn: Promise<Result<NodeJS.ReadableStream, ServiceError>>): Promise<Result<NodeJS.ReadableStream, ServiceError>>;
|
|
10
|
+
logGenerationError(error: string): void;
|
|
11
|
+
sdkGenerationServiceError(serviceError: ServiceError): void;
|
|
12
|
+
versionedBuildEmpty(directory: DirectoryPath): void;
|
|
13
|
+
versionNotFound(): void;
|
|
14
|
+
selectVersion(versions: string[]): Promise<string | undefined>;
|
|
15
|
+
sdkGenerated(sdk: DirectoryPath): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { isCancel, confirm, log, select } from "@clack/prompts";
|
|
2
|
+
import { format as f, } from "../format.js";
|
|
3
|
+
import { withSpinner } from "../prompt.js";
|
|
4
|
+
export class SdkGeneratePrompts {
|
|
5
|
+
async overwriteSdk(directory) {
|
|
6
|
+
const overwrite = await confirm({
|
|
7
|
+
message: `The destination ${f.path(directory)} is not empty, do you want to overwrite?`,
|
|
8
|
+
initialValue: false
|
|
9
|
+
});
|
|
10
|
+
if (isCancel(overwrite)) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
return overwrite;
|
|
14
|
+
}
|
|
15
|
+
sameBuildAndSdkDir(directory) {
|
|
16
|
+
const message = `The ${f.var("src")} and ${f.var("sdk")} directories must be different. Current value: ${f.path(directory)}`;
|
|
17
|
+
this.logGenerationError(message);
|
|
18
|
+
}
|
|
19
|
+
specDirectoryEmpty(directory) {
|
|
20
|
+
const message = `The ${f.var("spec")} directory is either empty or invalid: ${f.path(directory)}`;
|
|
21
|
+
this.logGenerationError(message);
|
|
22
|
+
}
|
|
23
|
+
destinationDirNotEmpty() {
|
|
24
|
+
const message = `Please enter a different destination folder or remove the existing files and try again.`;
|
|
25
|
+
this.logGenerationError(message);
|
|
26
|
+
}
|
|
27
|
+
generateSDK(fn) {
|
|
28
|
+
return withSpinner("Generating SDK", "SDK generated successfully.", "SDK Generation failed.", fn);
|
|
29
|
+
}
|
|
30
|
+
logGenerationError(error) {
|
|
31
|
+
log.error(error);
|
|
32
|
+
}
|
|
33
|
+
sdkGenerationServiceError(serviceError) {
|
|
34
|
+
log.error(serviceError.errorMessage);
|
|
35
|
+
}
|
|
36
|
+
versionedBuildEmpty(directory) {
|
|
37
|
+
const message = `The ${f.var(directory.leafName())} directory is either empty or invalid: ${f.path(directory)}`;
|
|
38
|
+
this.logGenerationError(message);
|
|
39
|
+
}
|
|
40
|
+
versionNotFound() {
|
|
41
|
+
this.logGenerationError(`The API version is invalid.`);
|
|
42
|
+
}
|
|
43
|
+
async selectVersion(versions) {
|
|
44
|
+
const version = await select({
|
|
45
|
+
message: "Select an API version for SDK generation:",
|
|
46
|
+
options: versions.map((v) => ({ label: v, value: v }))
|
|
47
|
+
});
|
|
48
|
+
if (isCancel(version)) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
return version;
|
|
52
|
+
}
|
|
53
|
+
sdkGenerated(sdk) {
|
|
54
|
+
log.info(`Generated SDK can be found at ${f.path(sdk)}.`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/prompts/sdk/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,MAAM,IAAI,CAAC,GAAG,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,MAAM,OAAO,kBAAkB;IACtB,KAAK,CAAC,YAAY,CAAC,SAAwB;QAChD,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC;YAC9B,OAAO,EAAE,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,0CAA0C;YACvF,YAAY,EAAE,KAAK;SACpB,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YACxB,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEM,kBAAkB,CAAC,SAAwB;QACjD,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC,IAAI,CAC5G,SAAS,CACV,EAAE,CAAC;QAAI,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IAEM,kBAAkB,CAAC,SAAwB;QAChD,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,0CAA0C,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAClG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAEM,sB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CAAC;IAC5D,CAAC;CACF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Result } from "neverthrow";
|
|
2
|
+
import { UrlPath } from "../../types/file/urlPath.js";
|
|
3
|
+
import { ResourceInput } from "../../types/file/resource-input.js";
|
|
4
|
+
import { FileDownloadResponse } from "../../infrastructure/services/file-download-service.js";
|
|
5
|
+
import { ServiceError } from "../../infrastructure/service-error.js";
|
|
6
|
+
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
7
|
+
import { Directory } from "../../types/file/directory.js";
|
|
8
|
+
import { Language } from "../../types/sdk/generate.js";
|
|
9
|
+
import { UnallowedFeaturesResponse } from "../../infrastructure/services/validation-service.js";
|
|
10
|
+
export declare class SdkQuickstartPrompts {
|
|
11
|
+
importSpecStep(): void;
|
|
12
|
+
specPathPrompt(defaultSpecUrl: UrlPath): Promise<ResourceInput | undefined>;
|
|
13
|
+
splitSpecDetected(unallowed: UnallowedFeaturesResponse): void;
|
|
14
|
+
stripUnallowedFeaturesStep(unallowed: UnallowedFeaturesResponse): void;
|
|
15
|
+
specFileDoesNotExist(): void;
|
|
16
|
+
noSpecSpecified(): void;
|
|
17
|
+
downloadSpecFile(fn: Promise<Result<FileDownloadResponse, ServiceError>>): Promise<Result<FileDownloadResponse, ServiceError>>;
|
|
18
|
+
serviceError(serviceError: ServiceError): void;
|
|
19
|
+
validateSpecStep(): void;
|
|
20
|
+
specValidationFailed(): void;
|
|
21
|
+
useDefaultSpecPrompt(): Promise<boolean>;
|
|
22
|
+
fixYourSpec(): void;
|
|
23
|
+
selectLanguageStep(): void;
|
|
24
|
+
selectLanguagePrompt(): Promise<Language | undefined>;
|
|
25
|
+
noLanguageSelected(): void;
|
|
26
|
+
selectInputDirectoryStep(): void;
|
|
27
|
+
inputDirectoryPathPrompt(): Promise<DirectoryPath | undefined>;
|
|
28
|
+
noInputDirectoryProvided(): void;
|
|
29
|
+
inputDirectoryPathDoesNotExist(inputDirectory: DirectoryPath): void;
|
|
30
|
+
inputDirectoryNotEmpty(inputDirectory: DirectoryPath): void;
|
|
31
|
+
downloadMetadataFile(fn: Promise<Result<FileDownloadResponse, ServiceError>>): Promise<Result<FileDownloadResponse, ServiceError>>;
|
|
32
|
+
printDirectoryStructure(inputDirectory: DirectoryPath, directory: Directory): void;
|
|
33
|
+
sdkOpenedInEditor(): void;
|
|
34
|
+
nextSteps(language: Language, inputDirectory: DirectoryPath): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { isCancel, log, select, text } from "@clack/prompts";
|
|
2
|
+
import { format as f, getTree } from "../format.js";
|
|
3
|
+
import { noteWrapped, withSpinner } from "../prompt.js";
|
|
4
|
+
import { createResourceInputFromInput } from "../../types/file/resource-input.js";
|
|
5
|
+
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
6
|
+
import { removeQuotes } from "../../utils/string-utils.js";
|
|
7
|
+
import { Language } from "../../types/sdk/generate.js";
|
|
8
|
+
const vscodeExtensionUrl = "https://marketplace.visualstudio.com/items?itemName=apimatic-developers.apimatic-for-vscode";
|
|
9
|
+
const sdkCustomizationUrl = "https://docs.apimatic.io/generate-sdks/codegen-settings/codegen-settings-overview/";
|
|
10
|
+
export class SdkQuickstartPrompts {
|
|
11
|
+
importSpecStep() {
|
|
12
|
+
log.info(`Step 1 of 4: Import your OpenAPI Definition`);
|
|
13
|
+
}
|
|
14
|
+
async specPathPrompt(defaultSpecUrl) {
|
|
15
|
+
const spec = await text({
|
|
16
|
+
message: `Provide a local path or a public URL for your OpenAPI Definition file:`,
|
|
17
|
+
placeholder: "Provide absolute URL/local path or press Enter to use a sample OpenAPI Definition file from APIMatic.",
|
|
18
|
+
defaultValue: defaultSpecUrl.toString(),
|
|
19
|
+
validate: (value) => {
|
|
20
|
+
if (value && !createResourceInputFromInput(value)) {
|
|
21
|
+
return "Please enter a valid file path or URL.";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
if (isCancel(spec)) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
return createResourceInputFromInput(spec);
|
|
29
|
+
}
|
|
30
|
+
splitSpecDetected(unallowed) {
|
|
31
|
+
const featuresList = unallowed.Features.map((f) => ` • ${f}`).join("\n");
|
|
32
|
+
let endpointMessage = "";
|
|
33
|
+
if (unallowed.EndpointLimit < unallowed.EndpointCount) {
|
|
34
|
+
endpointMessage = `\nEndpoint limit exceeded: ${unallowed.EndpointCount} endpoints found, but your plan allows ${unallowed.EndpointLimit}\n`;
|
|
35
|
+
}
|
|
36
|
+
const message = [
|
|
37
|
+
"Your API Specification includes components not available on your current subscription plan:",
|
|
38
|
+
"",
|
|
39
|
+
featuresList,
|
|
40
|
+
endpointMessage,
|
|
41
|
+
"To continue:",
|
|
42
|
+
"- Remove these components from your API Specification and re-run this command.",
|
|
43
|
+
"- Combine your split API Specification files into a single file. We can automatically remove unsupported components from single-file specs.",
|
|
44
|
+
"- Upgrade your subscription to unlock additional features: https://www.apimatic.io/pricing"
|
|
45
|
+
].join("\n");
|
|
46
|
+
log.info(message);
|
|
47
|
+
}
|
|
48
|
+
stripUnallowedFeaturesStep(unallowed) {
|
|
49
|
+
const featuresList = unallowed.Features.map((f) => ` • ${f}`).join("\n");
|
|
50
|
+
let endpointMessage = "";
|
|
51
|
+
if (unallowed.EndpointLimit < unallowed.EndpointCount) {
|
|
52
|
+
const endpointsToRemove = unallowed.EndpointCount - unallowed.EndpointLimit;
|
|
53
|
+
endpointMessage = `\n${endpointsToRemove} endpoint(s) will be removed from your spec\n`;
|
|
54
|
+
}
|
|
55
|
+
const message = [
|
|
56
|
+
"Your API Specification includes components not available on your current subscription plan.",
|
|
57
|
+
"We'll automatically remove these components before proceeding:",
|
|
58
|
+
featuresList,
|
|
59
|
+
endpointMessage,
|
|
60
|
+
"",
|
|
61
|
+
"You won't see these components in the generated SDKs or documentation.",
|
|
62
|
+
"Want to keep them? Upgrade your subscription to unlock additional features: https://www.apimatic.io/pricing"
|
|
63
|
+
].join("\n");
|
|
64
|
+
log.info(message);
|
|
65
|
+
}
|
|
66
|
+
specFileDoesNotExist() {
|
|
67
|
+
log.error("The specified file does not exist or is not a valid file. Please enter a valid file path.");
|
|
68
|
+
}
|
|
69
|
+
noSpecSpecified() {
|
|
70
|
+
log.error("No API Definition was provided.");
|
|
71
|
+
}
|
|
72
|
+
downloadSpecFile(fn) {
|
|
73
|
+
return withSpinner("Downloading API Definition", `API Definition downloaded`, "Unable to download API Definition", fn);
|
|
74
|
+
}
|
|
75
|
+
serviceError(serviceError) {
|
|
76
|
+
log.error(serviceError.errorMessage);
|
|
77
|
+
}
|
|
78
|
+
validateSpecStep() {
|
|
79
|
+
log.info(`Step 2 of 4: Validate and Lint your OpenAPI Definition`);
|
|
80
|
+
}
|
|
81
|
+
specValidationFailed() {
|
|
82
|
+
log.error(`Oops, it looks like there are some errors in your API Definition`);
|
|
83
|
+
}
|
|
84
|
+
async useDefaultSpecPrompt() {
|
|
85
|
+
const useDefaultSpec = await select({
|
|
86
|
+
message: `How would you like to proceed?`,
|
|
87
|
+
options: [
|
|
88
|
+
{
|
|
89
|
+
value: "no",
|
|
90
|
+
label: `1. Fix the issues using APIMatic's interactive VS Code Extension: ${vscodeExtensionUrl}`
|
|
91
|
+
},
|
|
92
|
+
{ value: "yes", label: `2. Use an example API Definition instead (recommended)` }
|
|
93
|
+
]
|
|
94
|
+
});
|
|
95
|
+
if (isCancel(useDefaultSpec)) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
return useDefaultSpec === "yes";
|
|
99
|
+
}
|
|
100
|
+
fixYourSpec() {
|
|
101
|
+
const message = `Good luck fixing your API Definition! Feel free to run this command again once you're done.`;
|
|
102
|
+
log.info(message);
|
|
103
|
+
}
|
|
104
|
+
selectLanguageStep() {
|
|
105
|
+
log.info(`Step 3 of 4: Select programming language`);
|
|
106
|
+
}
|
|
107
|
+
async selectLanguagePrompt() {
|
|
108
|
+
const language = await select({
|
|
109
|
+
message: "Choose the programming language for your SDK:",
|
|
110
|
+
options: [
|
|
111
|
+
{ label: "Typescript", value: Language.TYPESCRIPT },
|
|
112
|
+
{ label: "Ruby", value: Language.RUBY },
|
|
113
|
+
{ label: "Python", value: Language.PYTHON },
|
|
114
|
+
{ label: "Java", value: Language.JAVA },
|
|
115
|
+
{ label: "C#", value: Language.CSHARP },
|
|
116
|
+
{ label: "PHP", value: Language.PHP },
|
|
117
|
+
{ label: "Go", value: Language.GO }
|
|
118
|
+
]
|
|
119
|
+
});
|
|
120
|
+
if (isCancel(language)) {
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
123
|
+
return language;
|
|
124
|
+
}
|
|
125
|
+
noLanguageSelected() {
|
|
126
|
+
log.error("No programming language was selected.");
|
|
127
|
+
}
|
|
128
|
+
selectInputDirectoryStep() {
|
|
129
|
+
log.info(`Step 4 of 4: Setup directory for SDK Generation`);
|
|
130
|
+
}
|
|
131
|
+
async inputDirectoryPathPrompt() {
|
|
132
|
+
var _a;
|
|
133
|
+
const inputDirectory = await text({
|
|
134
|
+
message: "Enter the directory path where you would like to setup the SDK (Requires an empty directory):",
|
|
135
|
+
placeholder: "Provide absolute path to the directory or press Enter to use the current directory.",
|
|
136
|
+
defaultValue: "./"
|
|
137
|
+
});
|
|
138
|
+
if (isCancel(inputDirectory)) {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
const cleanedPath = removeQuotes((_a = inputDirectory === null || inputDirectory === void 0 ? void 0 : inputDirectory.trim()) !== null && _a !== void 0 ? _a : "");
|
|
142
|
+
return new DirectoryPath(cleanedPath);
|
|
143
|
+
}
|
|
144
|
+
noInputDirectoryProvided() {
|
|
145
|
+
log.error("No directory was specified.");
|
|
146
|
+
}
|
|
147
|
+
inputDirectoryPathDoesNotExist(inputDirectory) {
|
|
148
|
+
log.error(`The specified directory path ${f.path(inputDirectory)} does not exist.`);
|
|
149
|
+
}
|
|
150
|
+
inputDirectoryNotEmpty(inputDirectory) {
|
|
151
|
+
log.error(`The target directory ${f.path(inputDirectory)} is not empty. Please provide a path to an empty directory or clear its contents.`);
|
|
152
|
+
}
|
|
153
|
+
downloadMetadataFile(fn) {
|
|
154
|
+
return withSpinner("Setting up source directory", `Source directory set up successfully`, "Unable to set up source directory", fn);
|
|
155
|
+
}
|
|
156
|
+
printDirectoryStructure(inputDirectory, directory) {
|
|
157
|
+
const heading = `${f.var("src")} directory containing source files created at ${f.path(inputDirectory)}\n`;
|
|
158
|
+
const message = getTree(directory.toTreeNode());
|
|
159
|
+
log.info(heading + message);
|
|
160
|
+
}
|
|
161
|
+
sdkOpenedInEditor() {
|
|
162
|
+
log.info("Opened the SDK directory in VS Code. To get started with your SDK, review the README file.");
|
|
163
|
+
}
|
|
164
|
+
nextSteps(language, inputDirectory) {
|
|
165
|
+
const inputDirectoryFlag = !inputDirectory.isEqual(DirectoryPath.default)
|
|
166
|
+
? `${f.flag("input", inputDirectory.toString())} `
|
|
167
|
+
: "";
|
|
168
|
+
const message = `Run the command
|
|
169
|
+
'${f.cmdAlt("apimatic", "sdk", "generate")} ${inputDirectoryFlag}${f.flag("language", language)}'
|
|
170
|
+
to regenerate your SDK.
|
|
171
|
+
|
|
172
|
+
To learn more about customizing your SDK, visit:
|
|
173
|
+
${f.link(sdkCustomizationUrl)}`;
|
|
174
|
+
noteWrapped(message, "Next Steps");
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=quickstart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quickstart.js","sourceRoot":"","sources":["../../../src/prompts/sdk/quickstart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CA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