@apimatic/cli 1.1.0-alpha.21 → 1.1.0-alpha.22
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 +112 -90
- package/lib/actions/action-result.d.ts +8 -3
- package/lib/actions/action-result.js +34 -15
- package/lib/actions/action-result.js.map +1 -1
- 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 +12 -0
- package/lib/actions/api/validate.js +41 -0
- package/lib/actions/api/validate.js.map +1 -0
- package/lib/actions/auth/login.d.ts +6 -5
- package/lib/actions/auth/login.js +25 -33
- package/lib/actions/auth/login.js.map +1 -1
- 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 +5 -3
- package/lib/actions/portal/copilot.js +47 -37
- package/lib/actions/portal/copilot.js.map +1 -1
- package/lib/actions/portal/generate.d.ts +4 -5
- package/lib/actions/portal/generate.js +30 -37
- package/lib/actions/portal/generate.js.map +1 -1
- package/lib/actions/portal/quickstart.d.ts +16 -0
- package/lib/actions/portal/quickstart.js +145 -0
- package/lib/actions/portal/quickstart.js.map +1 -0
- package/lib/actions/portal/recipe/new-recipe.d.ts +11 -20
- package/lib/actions/portal/recipe/new-recipe.js +147 -221
- package/lib/actions/portal/recipe/new-recipe.js.map +1 -1
- package/lib/actions/portal/serve.d.ts +12 -10
- package/lib/actions/portal/serve.js +112 -17
- package/lib/actions/portal/serve.js.map +1 -1
- package/lib/actions/portal/toc/new-toc.d.ts +16 -15
- package/lib/actions/portal/toc/new-toc.js +80 -116
- package/lib/actions/portal/toc/new-toc.js.map +1 -1
- package/lib/actions/sdk/generate.d.ts +5 -6
- package/lib/actions/sdk/generate.js +22 -47
- package/lib/actions/sdk/generate.js.map +1 -1
- package/lib/application/portal/recipe/portal-recipe.d.ts +2 -2
- package/lib/application/portal/recipe/portal-recipe.js +9 -9
- package/lib/application/portal/recipe/portal-recipe.js.map +1 -1
- package/lib/application/portal/recipe/recipe-generator.d.ts +7 -2
- package/lib/application/portal/recipe/recipe-generator.js +21 -22
- package/lib/application/portal/recipe/recipe-generator.js.map +1 -1
- package/lib/client-utils/auth-manager.d.ts +1 -1
- package/lib/client-utils/auth-manager.js +3 -4
- package/lib/client-utils/auth-manager.js.map +1 -1
- package/lib/commands/api/transform.d.ts +6 -3
- package/lib/commands/api/transform.js +43 -94
- package/lib/commands/api/transform.js.map +1 -1
- package/lib/commands/api/validate.d.ts +6 -3
- package/lib/commands/api/validate.js +27 -66
- package/lib/commands/api/validate.js.map +1 -1
- package/lib/commands/auth/login.d.ts +2 -1
- package/lib/commands/auth/login.js +15 -9
- package/lib/commands/auth/login.js.map +1 -1
- package/lib/commands/auth/logout.d.ts +3 -1
- package/lib/commands/auth/logout.js +12 -13
- package/lib/commands/auth/logout.js.map +1 -1
- package/lib/commands/auth/status.d.ts +1 -0
- package/lib/commands/auth/status.js +13 -11
- package/lib/commands/auth/status.js.map +1 -1
- package/lib/commands/portal/copilot.d.ts +2 -2
- package/lib/commands/portal/copilot.js +22 -20
- package/lib/commands/portal/copilot.js.map +1 -1
- package/lib/commands/portal/generate.d.ts +3 -4
- package/lib/commands/portal/generate.js +19 -14
- package/lib/commands/portal/generate.js.map +1 -1
- package/lib/commands/portal/quickstart.d.ts +3 -4
- package/lib/commands/portal/quickstart.js +24 -101
- package/lib/commands/portal/quickstart.js.map +1 -1
- package/lib/commands/portal/recipe/new.d.ts +3 -1
- package/lib/commands/portal/recipe/new.js +31 -23
- package/lib/commands/portal/recipe/new.js.map +1 -1
- package/lib/commands/portal/serve.d.ts +5 -5
- package/lib/commands/portal/serve.js +31 -57
- package/lib/commands/portal/serve.js.map +1 -1
- package/lib/commands/portal/toc/new.d.ts +2 -2
- package/lib/commands/portal/toc/new.js +35 -26
- package/lib/commands/portal/toc/new.js.map +1 -1
- package/lib/commands/sdk/generate.d.ts +5 -4
- package/lib/commands/sdk/generate.js +26 -17
- package/lib/commands/sdk/generate.js.map +1 -1
- package/lib/hooks/not-found.js +1 -1
- package/lib/hooks/not-found.js.map +1 -1
- package/lib/infrastructure/api-utils.js +3 -2
- package/lib/infrastructure/api-utils.js.map +1 -1
- package/lib/{application/portal/serve/watcher-handler.d.ts → infrastructure/debounce-service.d.ts} +3 -3
- package/lib/{application/portal/serve/watcher-handler.js → infrastructure/debounce-service.js} +5 -4
- package/lib/infrastructure/debounce-service.js.map +1 -0
- package/lib/infrastructure/env-info.d.ts +1 -1
- package/lib/infrastructure/env-info.js +2 -2
- package/lib/infrastructure/env-info.js.map +1 -1
- package/lib/infrastructure/file-service.d.ts +7 -2
- package/lib/infrastructure/file-service.js +46 -5
- package/lib/infrastructure/file-service.js.map +1 -1
- package/lib/infrastructure/launcher-service.d.ts +2 -0
- package/lib/infrastructure/launcher-service.js +4 -0
- package/lib/infrastructure/launcher-service.js.map +1 -1
- 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/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 +2 -2
- package/lib/infrastructure/services/api-service.js +6 -6
- package/lib/infrastructure/services/api-service.js.map +1 -1
- package/lib/infrastructure/services/auth-service.d.ts +1 -1
- package/lib/infrastructure/services/auth-service.js +7 -5
- package/lib/infrastructure/services/auth-service.js.map +1 -1
- 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 +11 -13
- package/lib/infrastructure/services/portal-service.js +73 -102
- package/lib/infrastructure/services/portal-service.js.map +1 -1
- package/lib/infrastructure/services/telemetry-service.d.ts +3 -2
- package/lib/infrastructure/services/telemetry-service.js +4 -6
- package/lib/infrastructure/services/telemetry-service.js.map +1 -1
- 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 +17 -0
- package/lib/infrastructure/services/validation-service.js +49 -0
- package/lib/infrastructure/services/validation-service.js.map +1 -0
- package/lib/prompts/api/transform.d.ts +11 -0
- package/lib/prompts/api/transform.js +30 -0
- package/lib/prompts/api/transform.js.map +1 -0
- package/lib/prompts/api/validate.d.ts +12 -0
- package/lib/prompts/api/validate.js +41 -0
- package/lib/prompts/api/validate.js.map +1 -0
- package/lib/prompts/auth/login.d.ts +6 -1
- package/lib/prompts/auth/login.js +12 -3
- package/lib/prompts/auth/login.js.map +1 -1
- 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 +21 -0
- package/lib/prompts/auth/status.js.map +1 -0
- package/lib/prompts/format.d.ts +33 -0
- package/lib/prompts/format.js +99 -0
- package/lib/prompts/format.js.map +1 -0
- package/lib/prompts/portal/copilot.d.ts +8 -4
- package/lib/prompts/portal/copilot.js +35 -24
- package/lib/prompts/portal/copilot.js.map +1 -1
- package/lib/prompts/portal/generate.d.ts +9 -7
- package/lib/prompts/portal/generate.js +22 -23
- package/lib/prompts/portal/generate.js.map +1 -1
- package/lib/prompts/portal/quickstart.d.ts +30 -29
- package/lib/prompts/portal/quickstart.js +99 -193
- package/lib/prompts/portal/quickstart.js.map +1 -1
- package/lib/prompts/portal/recipe/new-recipe.d.ts +23 -18
- package/lib/prompts/portal/recipe/new-recipe.js +70 -108
- package/lib/prompts/portal/recipe/new-recipe.js.map +1 -1
- package/lib/prompts/portal/serve.d.ts +10 -3
- package/lib/prompts/portal/serve.js +30 -11
- package/lib/prompts/portal/serve.js.map +1 -1
- package/lib/prompts/portal/toc/new-toc.d.ts +12 -8
- package/lib/prompts/portal/toc/new-toc.js +20 -22
- package/lib/prompts/portal/toc/new-toc.js.map +1 -1
- package/lib/prompts/sdk/generate.d.ts +7 -7
- package/lib/prompts/sdk/generate.js +17 -23
- package/lib/prompts/sdk/generate.js.map +1 -1
- package/lib/types/api/account.d.ts +1 -1
- package/lib/types/api/transform.d.ts +14 -25
- package/lib/types/api/transform.js +16 -16
- package/lib/types/api/transform.js.map +1 -1
- package/lib/types/build/build.d.ts +9 -1
- package/lib/types/build/build.js +5 -2
- package/lib/types/build/build.js.map +1 -1
- package/lib/types/build-context.d.ts +5 -1
- package/lib/types/build-context.js +21 -4
- package/lib/types/build-context.js.map +1 -1
- 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 +1 -1
- package/lib/types/events/domain-event.js.map +1 -1
- package/lib/types/events/quickstart-completed.js +1 -1
- package/lib/types/events/quickstart-initiated.js +1 -1
- package/lib/types/events/recipe-creation-failed.d.ts +1 -1
- package/lib/types/events/recipe-creation-failed.js +1 -1
- package/lib/types/events/recipe-creation-failed.js.map +1 -1
- package/lib/types/events/toc-creation-failed.d.ts +1 -1
- package/lib/types/events/toc-creation-failed.js +1 -1
- package/lib/types/events/toc-creation-failed.js.map +1 -1
- package/lib/types/file/directory.d.ts +17 -0
- package/lib/types/file/directory.js +86 -0
- package/lib/types/file/directory.js.map +1 -0
- package/lib/types/file/directoryPath.d.ts +3 -1
- package/lib/types/file/directoryPath.js +8 -2
- package/lib/types/file/directoryPath.js.map +1 -1
- package/lib/types/file/fileName.d.ts +2 -0
- package/lib/types/file/fileName.js +12 -0
- package/lib/types/file/fileName.js.map +1 -1
- package/lib/types/file/filePath.d.ts +2 -0
- package/lib/types/file/filePath.js +21 -0
- package/lib/types/file/filePath.js.map +1 -1
- 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/portal-context.d.ts +3 -1
- package/lib/types/portal-context.js +10 -0
- package/lib/types/portal-context.js.map +1 -1
- package/lib/types/recipe/recipe.d.ts +2 -17
- package/lib/types/recipe-context.d.ts +8 -0
- package/lib/types/recipe-context.js +21 -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 +2 -15
- package/lib/types/sdk/generate.js +24 -10
- package/lib/types/sdk/generate.js.map +1 -1
- package/lib/types/sdk-context.d.ts +6 -5
- package/lib/types/sdk-context.js +12 -8
- package/lib/types/sdk-context.js.map +1 -1
- package/lib/types/sdl/sdl.d.ts +9 -0
- package/lib/types/sdl/sdl.js +46 -1
- package/lib/types/sdl/sdl.js.map +1 -1
- package/lib/types/spec-context.d.ts +3 -0
- package/lib/types/spec-context.js +7 -2
- package/lib/types/spec-context.js.map +1 -1
- 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-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/utils/string-utils.d.ts +1 -0
- package/lib/utils/string-utils.js +10 -0
- package/lib/utils/string-utils.js.map +1 -0
- package/lib/utils/utils.d.ts +2 -27
- package/lib/utils/utils.js +6 -145
- package/lib/utils/utils.js.map +1 -1
- package/package.json +4 -4
- package/lib/application/portal/serve/portal-watcher.d.ts +0 -11
- package/lib/application/portal/serve/portal-watcher.js +0 -64
- package/lib/application/portal/serve/portal-watcher.js.map +0 -1
- package/lib/application/portal/serve/serve-handler.d.ts +0 -16
- package/lib/application/portal/serve/serve-handler.js +0 -91
- package/lib/application/portal/serve/serve-handler.js.map +0 -1
- package/lib/application/portal/serve/watcher-handler.js.map +0 -1
- package/lib/application/portal/toc/sdl-parser.d.ts +0 -19
- package/lib/application/portal/toc/sdl-parser.js +0 -90
- package/lib/application/portal/toc/sdl-parser.js.map +0 -1
- package/lib/client-utils/sdk-client.d.ts +0 -18
- package/lib/client-utils/sdk-client.js +0 -41
- package/lib/client-utils/sdk-client.js.map +0 -1
- package/lib/config/env.d.ts +0 -26
- package/lib/config/env.js +0 -27
- package/lib/config/env.js.map +0 -1
- package/lib/controllers/api/transform.d.ts +0 -5
- package/lib/controllers/api/transform.js +0 -50
- package/lib/controllers/api/transform.js.map +0 -1
- package/lib/controllers/api/validate.d.ts +0 -3
- package/lib/controllers/api/validate.js +0 -29
- package/lib/controllers/api/validate.js.map +0 -1
- package/lib/controllers/portal/quickstart.d.ts +0 -13
- package/lib/controllers/portal/quickstart.js +0 -214
- package/lib/controllers/portal/quickstart.js.map +0 -1
- package/lib/infrastructure/api-client-utils.d.ts +0 -6
- package/lib/infrastructure/api-client-utils.js +0 -34
- package/lib/infrastructure/api-client-utils.js.map +0 -1
- package/lib/prompts/portal/common/base-prompts.d.ts +0 -7
- package/lib/prompts/portal/common/base-prompts.js +0 -19
- package/lib/prompts/portal/common/base-prompts.js.map +0 -1
- package/lib/types/api/validate.d.ts +0 -12
- package/lib/types/api/validate.js +0 -2
- package/lib/types/api/validate.js.map +0 -1
- package/lib/types/common/result.d.ts +0 -17
- package/lib/types/common/result.js +0 -32
- package/lib/types/common/result.js.map +0 -1
- package/lib/types/portal/generate.d.ts +0 -13
- package/lib/types/portal/generate.js +0 -3
- package/lib/types/portal/generate.js.map +0 -1
- package/lib/types/portal/quickstart.d.ts +0 -17
- package/lib/types/portal/quickstart.js +0 -2
- package/lib/types/portal/quickstart.js.map +0 -1
- package/lib/types/portal/serve.d.ts +0 -12
- package/lib/types/portal/serve.js +0 -2
- package/lib/types/portal/serve.js.map +0 -1
- package/lib/validators/common/directoryValidator.d.ts +0 -5
- package/lib/validators/common/directoryValidator.js +0 -22
- package/lib/validators/common/directoryValidator.js.map +0 -1
- package/lib/validators/portal/serve-validator.d.ts +0 -6
- package/lib/validators/portal/serve-validator.js +0 -15
- package/lib/validators/portal/serve-validator.js.map +0 -1
|
@@ -1,151 +1,75 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
log.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
validate: (
|
|
27
|
-
if (!
|
|
28
|
-
return
|
|
29
|
-
}
|
|
30
|
-
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
31
|
-
if (!emailRegex.test(input)) {
|
|
32
|
-
return getMessageInRedColor("Please enter a valid email address.");
|
|
1
|
+
import { isCancel, log, multiselect, note, select, text } from "@clack/prompts";
|
|
2
|
+
import { format as f, getTree, withSpinner } from "../format.js";
|
|
3
|
+
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
4
|
+
import { removeQuotes } from "../../utils/string-utils.js";
|
|
5
|
+
import { getErrorMessage } from "../../infrastructure/api-utils.js";
|
|
6
|
+
import { createResourceInputFromInput } from "../../types/file/resource-input.js";
|
|
7
|
+
const vscodeExtensionUrl = "https://marketplace.visualstudio.com/items?itemName=apimatic-developers.apimatic-for-vscode";
|
|
8
|
+
const referenceDocumentationUrl = "https://docs.apimatic.io/cli-getting-started/advanced-portal-setup";
|
|
9
|
+
const defaultPortalDirectoryPath = process.cwd();
|
|
10
|
+
export class PortalQuickstartPrompts {
|
|
11
|
+
welcomeMessage() {
|
|
12
|
+
log.info(`Welcome to the Portal Quickstart Wizard.`);
|
|
13
|
+
const message = `This wizard will help you set up an API Portal via APIMatic's Docs as Code workflow in 4 simple steps.
|
|
14
|
+
|
|
15
|
+
Let's get started!`;
|
|
16
|
+
log.message(message);
|
|
17
|
+
}
|
|
18
|
+
importSpecStep() {
|
|
19
|
+
log.info(`Step 1 of 4: Import your OpenAPI Definition`);
|
|
20
|
+
}
|
|
21
|
+
async specPathPrompt(defaultSpecUrl) {
|
|
22
|
+
const spec = await text({
|
|
23
|
+
message: `Provide a local path or a public URL for your OpenAPI definition file:`,
|
|
24
|
+
placeholder: "Provide absolute URL/local path or press Enter to use a sample OpenAPI file from APIMatic.",
|
|
25
|
+
defaultValue: defaultSpecUrl.toString(),
|
|
26
|
+
validate: (value) => {
|
|
27
|
+
if (value && !createResourceInputFromInput(value)) {
|
|
28
|
+
return "Please enter a valid file path or URL.";
|
|
33
29
|
}
|
|
34
30
|
}
|
|
35
31
|
});
|
|
36
|
-
if (isCancel(
|
|
37
|
-
|
|
38
|
-
return process.exit(0);
|
|
39
|
-
}
|
|
40
|
-
const pass = await password({
|
|
41
|
-
message: "Enter your password:",
|
|
42
|
-
validate: (input) => {
|
|
43
|
-
if (!input) {
|
|
44
|
-
return getMessageInRedColor("Password is required.");
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
if (isCancel(pass)) {
|
|
49
|
-
cancel("Operation cancelled.");
|
|
50
|
-
return process.exit(0);
|
|
51
|
-
}
|
|
52
|
-
return { email: String(email).trim(), password: String(pass).trim() };
|
|
53
|
-
}
|
|
54
|
-
removeQuotes(str) {
|
|
55
|
-
const quotes = ['"', "'"];
|
|
56
|
-
for (const quote of quotes) {
|
|
57
|
-
if (str.startsWith(quote) && str.endsWith(quote) && str.length > 1) {
|
|
58
|
-
return this.removeQuotes(str.slice(1, -1)); // Recursive call
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return str;
|
|
62
|
-
}
|
|
63
|
-
async specPrompt() {
|
|
64
|
-
log.step(getMessageInOrangeColor(`Step 1 of 4: Import your OpenAPI Definition`));
|
|
65
|
-
while (true) {
|
|
66
|
-
const spec = await text({
|
|
67
|
-
message: `Provide a local path or a public URL for your OpenAPI definition file:`,
|
|
68
|
-
placeholder: "Provide absolute URL/local path or press Enter to use a sample OpenAPI file from APIMatic.",
|
|
69
|
-
defaultValue: "https://raw.githubusercontent.com/apimatic/static-portal-workflow/refs/heads/master/spec/openapi.json",
|
|
70
|
-
validate: (input) => {
|
|
71
|
-
var _a;
|
|
72
|
-
if (!input)
|
|
73
|
-
return;
|
|
74
|
-
const cleanedPath = this.removeQuotes((_a = input.trim()) !== null && _a !== void 0 ? _a : "");
|
|
75
|
-
if (!isValidUrl(cleanedPath)) {
|
|
76
|
-
const dirPath = path.resolve(cleanedPath);
|
|
77
|
-
if (!fs.existsSync(dirPath)) {
|
|
78
|
-
return getMessageInRedColor("Error: The specified file does not exist. Please enter a valid file path.");
|
|
79
|
-
}
|
|
80
|
-
if (!fs.statSync(dirPath).isFile()) {
|
|
81
|
-
return getMessageInRedColor("Error: The specified path does not point to a valid API Definition file or a zip archive containing API definition files. Please try again.");
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return; // pass sync validation
|
|
85
|
-
},
|
|
86
|
-
});
|
|
87
|
-
if (isCancel(spec)) {
|
|
88
|
-
cancel("Operation cancelled.");
|
|
89
|
-
process.exit(0);
|
|
90
|
-
}
|
|
91
|
-
const cleanedPath = this.removeQuotes(String(spec).trim());
|
|
92
|
-
// Async validation for URLs
|
|
93
|
-
if (isValidUrl(cleanedPath)) {
|
|
94
|
-
try {
|
|
95
|
-
const response = await axios.head(cleanedPath);
|
|
96
|
-
const contentType = response.headers["content-type"];
|
|
97
|
-
if (contentType === null || contentType === void 0 ? void 0 : contentType.includes("text/html")) {
|
|
98
|
-
log.error(getMessageInRedColor(`Invalid URL. Please check the URL and ensure it points to a valid OpenAPI definition.`));
|
|
99
|
-
continue; // re-prompt
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
catch (err) {
|
|
103
|
-
log.error(getMessageInRedColor(`Failed to reach the URL. Please check your internet connection or the URL.`));
|
|
104
|
-
continue; // re-prompt
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return cleanedPath; // valid local file or valid URL
|
|
32
|
+
if (isCancel(spec)) {
|
|
33
|
+
return undefined;
|
|
108
34
|
}
|
|
35
|
+
return createResourceInputFromInput(spec);
|
|
109
36
|
}
|
|
110
|
-
|
|
111
|
-
log.
|
|
112
|
-
this.spin.start(getMessageInMagentaColor(`Running your API Definition through APIMatic's 1200+ CodeGen Specific validation and linting rules 🔍 `));
|
|
37
|
+
specFileDoesNotExist() {
|
|
38
|
+
log.error("The specified file does not exist or is not a valid file. Please enter a valid file path.");
|
|
113
39
|
}
|
|
114
|
-
|
|
115
|
-
|
|
40
|
+
noSpecSpecified() {
|
|
41
|
+
log.error("No API definition was provided.");
|
|
116
42
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
displaySpecValidationFailureMessage() {
|
|
121
|
-
this.spin.stop(getMessageInRedColor(`❗ Oops, it looks like there are some errors in your API Definition.`), 1);
|
|
122
|
-
}
|
|
123
|
-
async specValidationFailurePrompt() {
|
|
124
|
-
const useSampleSpec = await select({
|
|
43
|
+
async useDefaultSpecPrompt() {
|
|
44
|
+
const useDefaultSpec = await select({
|
|
125
45
|
message: `How would you like to proceed?`,
|
|
126
46
|
options: [
|
|
127
47
|
{
|
|
128
|
-
value: "
|
|
129
|
-
label: `1. Fix the issues using APIMatic's interactive VS Code Extension: ${
|
|
48
|
+
value: "no",
|
|
49
|
+
label: `1. Fix the issues using APIMatic's interactive VS Code Extension: ${vscodeExtensionUrl}`
|
|
130
50
|
},
|
|
131
|
-
{ value: "
|
|
51
|
+
{ value: "yes", label: `2. Use an example API spec instead (recommended)` }
|
|
132
52
|
]
|
|
133
53
|
});
|
|
134
|
-
if (isCancel(
|
|
135
|
-
|
|
136
|
-
return process.exit(0);
|
|
137
|
-
}
|
|
138
|
-
if (useSampleSpec === "exit") {
|
|
139
|
-
outro(getMessageInCyanColor("Good luck fixing your API definition! 🛠️ Feel free to run this command again once you're done."));
|
|
140
|
-
return process.exit(0);
|
|
54
|
+
if (isCancel(useDefaultSpec)) {
|
|
55
|
+
return false;
|
|
141
56
|
}
|
|
57
|
+
return useDefaultSpec === "yes";
|
|
58
|
+
}
|
|
59
|
+
fixYourSpec() {
|
|
60
|
+
const message = `Good luck fixing your API definition! Feel free to run this command again once you're done.`;
|
|
61
|
+
log.info(message);
|
|
142
62
|
}
|
|
143
|
-
|
|
144
|
-
log.
|
|
63
|
+
validateSpecStep() {
|
|
64
|
+
log.info(`Step 2 of 4: Validate and Lint your OpenAPI file`);
|
|
65
|
+
}
|
|
66
|
+
selectLanguagesStep() {
|
|
67
|
+
log.info(`Step 3 of 4: Select programming languages`);
|
|
68
|
+
}
|
|
69
|
+
async selectLanguagesPrompt() {
|
|
145
70
|
const languages = (await multiselect({
|
|
146
|
-
message: "
|
|
71
|
+
message: "Your API Portal will contain SDKs and SDK Documentation in the following Languages. Press enter to continue with all languages, or use the arrow keys and space to customize your selection:",
|
|
147
72
|
options: [
|
|
148
|
-
{ label: "HTTP", value: "http" },
|
|
149
73
|
{ label: "Typescript", value: "typescript" },
|
|
150
74
|
{ label: "Ruby", value: "ruby" },
|
|
151
75
|
{ label: "Python", value: "python" },
|
|
@@ -154,87 +78,69 @@ export class PortalQuickstartPrompts extends BasePrompts {
|
|
|
154
78
|
{ label: "PHP", value: "php" },
|
|
155
79
|
{ label: "Go", value: "go" }
|
|
156
80
|
],
|
|
157
|
-
initialValues: ["
|
|
81
|
+
initialValues: ["typescript", "ruby", "python", "java", "csharp", "php", "go"]
|
|
158
82
|
}));
|
|
159
83
|
if (isCancel(languages)) {
|
|
160
|
-
|
|
161
|
-
return process.exit(0);
|
|
84
|
+
return undefined;
|
|
162
85
|
}
|
|
163
|
-
return languages;
|
|
86
|
+
return ["http", ...languages];
|
|
87
|
+
}
|
|
88
|
+
noLanguagesSelected() {
|
|
89
|
+
log.error("No programming languages were selected.");
|
|
164
90
|
}
|
|
165
|
-
|
|
166
|
-
log.
|
|
167
|
-
|
|
91
|
+
selectInputDirectoryStep() {
|
|
92
|
+
log.info(`Step 4 of 4: Generate source files for Docs as Code`);
|
|
93
|
+
}
|
|
94
|
+
async inputDirectoryPathPrompt() {
|
|
95
|
+
var _a;
|
|
96
|
+
const inputDirectory = await text({
|
|
168
97
|
message: "Enter the directory path where you would like to setup the API Portal (Requires an empty directory):",
|
|
169
98
|
placeholder: "Provide absolute path to the directory or press Enter to use the current directory.",
|
|
170
|
-
defaultValue: "./"
|
|
171
|
-
validate: (input) => {
|
|
172
|
-
var _a;
|
|
173
|
-
const cleanedPath = this.removeQuotes((_a = input === null || input === void 0 ? void 0 : input.trim()) !== null && _a !== void 0 ? _a : "");
|
|
174
|
-
const dirPath = path.resolve(cleanedPath);
|
|
175
|
-
if (!fs.existsSync(dirPath) && dirPath != this.defaultPortalDirectoryPath) {
|
|
176
|
-
return getMessageInRedColor("Error: The specified directory path does not exist. Please try again.");
|
|
177
|
-
}
|
|
178
|
-
if (dirPath !== this.defaultPortalDirectoryPath) {
|
|
179
|
-
const files = fs.readdirSync(dirPath).filter((item) => !item.startsWith("."));
|
|
180
|
-
if (files.length > 0) {
|
|
181
|
-
return getMessageInRedColor("Error: The target directory is not empty. Please provide a path to an empty directory or clear its contents.");
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
else if (fs.existsSync(dirPath)) {
|
|
185
|
-
// For ignoring hidden files and folders in the current directory in MacOS.
|
|
186
|
-
const files = fs.readdirSync(dirPath).filter((item) => !item.startsWith("."));
|
|
187
|
-
if (files.length > 0) {
|
|
188
|
-
return getMessageInRedColor("Error: The target directory is not empty. Please provide a path to an empty directory or clear its contents.");
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
99
|
+
defaultValue: "./"
|
|
192
100
|
});
|
|
193
|
-
if (isCancel(
|
|
194
|
-
|
|
195
|
-
return process.exit(0);
|
|
101
|
+
if (isCancel(inputDirectory)) {
|
|
102
|
+
return undefined;
|
|
196
103
|
}
|
|
197
|
-
|
|
198
|
-
|
|
104
|
+
const cleanedPath = removeQuotes((_a = inputDirectory === null || inputDirectory === void 0 ? void 0 : inputDirectory.trim()) !== null && _a !== void 0 ? _a : "");
|
|
105
|
+
const directoryPath = new DirectoryPath(cleanedPath);
|
|
106
|
+
if (inputDirectory === "./") {
|
|
107
|
+
return new DirectoryPath(defaultPortalDirectoryPath);
|
|
199
108
|
}
|
|
200
109
|
else {
|
|
201
|
-
return
|
|
110
|
+
return directoryPath;
|
|
202
111
|
}
|
|
203
112
|
}
|
|
204
|
-
|
|
205
|
-
|
|
113
|
+
inputDirectoryPathDoesNotExist(inputDirectory) {
|
|
114
|
+
log.error(`The specified directory path ${f.path(inputDirectory)} does not exist.`);
|
|
115
|
+
}
|
|
116
|
+
inputDirectoryNotEmpty(inputDirectory) {
|
|
117
|
+
log.error(`The target directory ${f.path(inputDirectory)} is not empty. Please provide a path to an empty directory or clear its contents.`);
|
|
206
118
|
}
|
|
207
|
-
|
|
208
|
-
|
|
119
|
+
noInputDirectoryProvided() {
|
|
120
|
+
log.error("No source directory was provided.");
|
|
209
121
|
}
|
|
210
|
-
|
|
211
|
-
|
|
122
|
+
downloadBuildDirectory(fn) {
|
|
123
|
+
return withSpinner("Setting up source directory", `Source directory set up successfully`, "Unable to set up source directory", fn);
|
|
212
124
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
const tree = treeify.asTree(buildDirectory, true, true);
|
|
216
|
-
const coloredLogString = tree
|
|
217
|
-
.split("\n")
|
|
218
|
-
.map((line) => line.replace(/#.*/, (match) => getMessageInGreenColor(match)))
|
|
219
|
-
.join("\n");
|
|
220
|
-
log.step(coloredLogString);
|
|
125
|
+
downloadSpecFile(fn) {
|
|
126
|
+
return withSpinner("Downloading Spec file", `Spec file downloaded`, "Unable to download spec file", fn);
|
|
221
127
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
getMessageInCyanColor(`- Use the API Playground or an SDK to call your API.\n`) +
|
|
228
|
-
getMessageInCyanColor(`- Customize the Portal theme, add API recipes and enable AI features: ${this.referenceDocumentationUrl}`));
|
|
128
|
+
nextSteps() {
|
|
129
|
+
const message = `- Use the API Playground or an SDK to call your API.
|
|
130
|
+
- Customize the Portal theme, add API recipes and enable AI features
|
|
131
|
+
${f.link(referenceDocumentationUrl)}`;
|
|
132
|
+
note(message, "Next steps");
|
|
229
133
|
}
|
|
230
|
-
|
|
231
|
-
log.
|
|
134
|
+
serviceError(error) {
|
|
135
|
+
log.error(getErrorMessage(error));
|
|
232
136
|
}
|
|
233
|
-
|
|
234
|
-
|
|
137
|
+
printDirectoryStructure(inputDirectory, directory) {
|
|
138
|
+
const heading = `${f.var('src')} directory containing source files created at ${f.path(inputDirectory)}\n`;
|
|
139
|
+
const message = getTree(directory.toTreeNode());
|
|
140
|
+
log.info(heading + message);
|
|
235
141
|
}
|
|
236
|
-
|
|
237
|
-
log.error(
|
|
142
|
+
specValidationFailed() {
|
|
143
|
+
log.error(`Oops, it looks like there are some errors in your API Definition`);
|
|
238
144
|
}
|
|
239
145
|
}
|
|
240
146
|
//# sourceMappingURL=quickstart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quickstart.js","sourceRoot":"","sources":["../../../src/prompts/portal/quickstart.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"quickstart.js","sourceRoot":"","sources":["../../../src/prompts/portal/quickstart.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEhF,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAgB,MAAM,mCAAmC,CAAC;AAElF,OAAO,EAAE,4BAA4B,EAAiB,MAAM,oCAAoC,CAAC;AAGjG,MAAM,kBAAkB,GACtB,6FAA6F,CAAC;AAChG,MAAM,yBAAyB,GAAG,oEAAoE,CAAC;AACvG,MAAM,0BAA0B,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAEjD,MAAM,OAAO,uBAAuB;IAC3B,cAAc;QACnB,GAAG,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;QACrD,MAAM,OAAO,GAAG;;mBAED,CAAC;QAChB,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IACM,cAAc;QACnB,GAAG,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;IAC1D,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,cAAuB;QACjD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;YACtB,OAAO,EAAE,wEAAwE;YACjF,WAAW,EAAE,4FAA4F;YACzG,YAAY,EAAE,cAAc,CAAC,QAAQ,EAAE;YAEvC,QAAQ,EAAE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iDAAiD,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;QAC3G,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC;QAChD,GAAG,CAAC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC;IAC9B,CAAC;IAEM,oBAAoB;QACzB,GAAG,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;IAChF,CAAC;CACF"}
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { Sdl, SdlEndpoint } from "../../../types/sdl/sdl.js";
|
|
2
|
+
import { DirectoryPath } from "../../../types/file/directoryPath.js";
|
|
3
|
+
import { TreeNode } from "../../format.js";
|
|
4
|
+
import { StepType } from "../../../types/recipe/recipe.js";
|
|
5
|
+
import { ServiceError } from "../../../infrastructure/api-utils.js";
|
|
6
|
+
import { Result } from "neverthrow";
|
|
3
7
|
export declare class PortalRecipePrompts {
|
|
4
|
-
private readonly spin;
|
|
5
8
|
displayWelcomeMessage(): void;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
recipeNameEmpty(): void;
|
|
10
|
+
contentFolderNotFound(): void;
|
|
11
|
+
specFileEmptyInvalid(): void;
|
|
12
|
+
recipeNamePrompt(): Promise<string | undefined>;
|
|
13
|
+
stepNamePrompt(defaultStepName: string): Promise<string | undefined>;
|
|
10
14
|
displayStepsInformation(): void;
|
|
11
|
-
stepTypeSelectionPrompt(): Promise<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
endpointDescriptionPrompt(endpointGroups: Map<string, SdlEndpoint[]>, endpointGroupName: string, endpointName: string): Promise<string>;
|
|
15
|
+
stepTypeSelectionPrompt(): Promise<StepType | undefined>;
|
|
16
|
+
endpointGroupNamePrompt(endpointGroups: Map<string, SdlEndpoint[]>): Promise<string | undefined>;
|
|
17
|
+
endpointNamePrompt(endpointGroups: Map<string, SdlEndpoint[]>, endpointGroupName: string): Promise<string | undefined>;
|
|
18
|
+
endpointDescriptionPrompt(defaultDescription: string): Promise<string | undefined>;
|
|
16
19
|
addAnotherStepSelectionPrompt(): Promise<boolean>;
|
|
17
|
-
overwriteApiRecipeInTocPrompt(): Promise<boolean>;
|
|
20
|
+
overwriteApiRecipeInTocPrompt(name: string): Promise<boolean>;
|
|
18
21
|
displayStepAddedSuccessfullyMessage(): void;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
invalidBuildDirectory(directory: DirectoryPath): void;
|
|
23
|
+
serviceError(serviceError: ServiceError): void;
|
|
24
|
+
openRecipeMarkdownEditor(): void;
|
|
25
|
+
displayRecipeStructure(tocStructure: TreeNode): void;
|
|
26
|
+
nextSteps(): void;
|
|
27
|
+
generateSdl(fn: Promise<Result<Sdl, ServiceError>>): Promise<Result<Sdl, ServiceError>>;
|
|
28
|
+
recipeCreated(): void;
|
|
24
29
|
}
|