@apimatic/cli 1.1.0-alpha.8 → 1.1.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/README.md +436 -374
- package/bin/run.js +5 -0
- package/lib/actions/action-result.d.ts +13 -0
- package/lib/actions/action-result.js +44 -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 +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 +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 +16 -0
- package/lib/actions/portal/quickstart.js +146 -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 +118 -0
- package/lib/actions/portal/serve.js.map +1 -0
- package/lib/actions/portal/toc/new-toc.d.ts +21 -0
- package/lib/actions/portal/toc/new-toc.js +97 -0
- 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 +47 -0
- package/lib/actions/sdk/generate.js.map +1 -0
- package/lib/actions/sdk/quickstart.d.ts +14 -0
- package/lib/actions/sdk/quickstart.js +149 -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/{new/toc → toc}/toc-content-parser.d.ts +1 -1
- package/lib/application/portal/toc/toc-content-parser.js +44 -0
- package/lib/application/portal/toc/toc-content-parser.js.map +1 -0
- package/lib/application/portal/{new/toc → toc}/toc-structure-generator.d.ts +1 -1
- package/lib/application/portal/toc/toc-structure-generator.js +84 -0
- 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 +14 -0
- package/lib/commands/portal/toc/new.js +60 -0
- 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 +52 -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 +24 -0
- package/lib/infrastructure/file-service.js +120 -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 +12 -0
- package/lib/infrastructure/services/api-service.js +79 -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 +17 -12
- package/lib/infrastructure/services/portal-service.js +134 -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 +17 -0
- package/lib/infrastructure/services/validation-service.js +49 -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 +12 -0
- package/lib/prompts/api/validate.js +40 -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 +28 -29
- package/lib/prompts/portal/quickstart.js +102 -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 +15 -0
- package/lib/prompts/portal/toc/new-toc.js +38 -0
- 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 +11 -0
- package/lib/prompts/sdk/generate.js +37 -0
- package/lib/prompts/sdk/generate.js.map +1 -0
- package/lib/prompts/sdk/quickstart.d.ts +32 -0
- package/lib/prompts/sdk/quickstart.js +140 -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 +10 -0
- package/lib/types/sdl/sdl.js +47 -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.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/utils/string-utils.d.ts +2 -0
- package/lib/utils/string-utils.js +37 -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/actions/portal/new/toc.d.ts +0 -17
- package/lib/actions/portal/new/toc.js +0 -134
- package/lib/application/portal/new/toc/sdl-parser.d.ts +0 -13
- package/lib/application/portal/new/toc/sdl-parser.js +0 -53
- package/lib/application/portal/new/toc/toc-content-parser.js +0 -46
- package/lib/application/portal/new/toc/toc-structure-generator.js +0 -88
- package/lib/client-utils/sdk-client.d.ts +0 -23
- package/lib/client-utils/sdk-client.js +0 -124
- package/lib/commands/portal/new/toc.d.ts +0 -15
- package/lib/commands/portal/new/toc.js +0 -65
- 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/prompts/portal/new/toc.d.ts +0 -10
- package/lib/prompts/portal/new/toc.js +0 -46
- 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,137 +1,53 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var _a;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const serve_2 = require("../../prompts/portal/serve");
|
|
10
|
-
const utils_1 = require("../../utils/utils");
|
|
11
|
-
const serveValidator_1 = require("../../validators/portal/serveValidator");
|
|
12
|
-
class PortalServe extends core_1.Command {
|
|
2
|
+
import { Command, Flags } from "@oclif/core";
|
|
3
|
+
import { PortalServeAction } from "../../actions/portal/serve.js";
|
|
4
|
+
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
5
|
+
import { FlagsProvider } from "../../types/flags-provider.js";
|
|
6
|
+
import { format, intro, outro } from "../../prompts/format.js";
|
|
7
|
+
class PortalServe extends Command {
|
|
13
8
|
async run() {
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
prompts.displayGeneratingPortalMessage();
|
|
28
|
-
await (0, serve_1.generatePortal)(sourceDir, portalDir, this.config.configDir, allIgnoredPaths, overrideAuthKey);
|
|
29
|
-
prompts.displayGeneratedPortalMessage(portalDir);
|
|
30
|
-
await (0, utils_1.cleanUpGeneratedPortalFiles)(sourceDir);
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
prompts.displayGeneratingPortalErrorMessage();
|
|
34
|
-
await (0, utils_1.cleanUpGeneratedPortalFiles)(sourceDir);
|
|
35
|
-
this.handleError(error);
|
|
36
|
-
}
|
|
37
|
-
serverService.setupServer(portalDir);
|
|
38
|
-
serverService.startServer({
|
|
39
|
-
generatedPortalPath: portalDir,
|
|
40
|
-
targetFolder: sourceDir,
|
|
41
|
-
configDir: this.config.configDir,
|
|
42
|
-
authKey: overrideAuthKey,
|
|
43
|
-
ignoredPaths: allIgnoredPaths,
|
|
44
|
-
port,
|
|
45
|
-
openInBrowser: flags.open
|
|
46
|
-
}, flags["no-reload"]);
|
|
47
|
-
prompts.displayOutroMessage(port);
|
|
9
|
+
const { flags: { input, destination, port, open, "no-reload": noReload, "auth-key": authKey } } = await this.parse(_a);
|
|
10
|
+
const workingDirectory = DirectoryPath.createInput(input);
|
|
11
|
+
const buildDirectory = input ? new DirectoryPath(input, "src") : workingDirectory.join("src");
|
|
12
|
+
const portalDirectory = destination ? new DirectoryPath(destination) : workingDirectory.join("portal");
|
|
13
|
+
const commandMetadata = {
|
|
14
|
+
commandName: _a.id,
|
|
15
|
+
shell: this.config.shell
|
|
16
|
+
};
|
|
17
|
+
intro("Portal Serve");
|
|
18
|
+
const portalServeAction = new PortalServeAction(this.getConfigDir(), commandMetadata, authKey);
|
|
19
|
+
const result = await portalServeAction.execute(buildDirectory, portalDirectory, port, open, !noReload);
|
|
20
|
+
outro(result);
|
|
48
21
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const axiosError = error;
|
|
52
|
-
if (axiosError.response) {
|
|
53
|
-
if (axiosError.response.status === 400) {
|
|
54
|
-
this.error((0, utils_1.getMessageInRedColor)(`Failed to generate the portal. Please ensure that the provided build directory follows the correct structure and contains valid API definition and build files.`));
|
|
55
|
-
}
|
|
56
|
-
else if (axiosError.response.status === 401) {
|
|
57
|
-
this.error((0, utils_1.getMessageInRedColor)(`Failed to generate the portal. Please ensure that you are logged in or have provided a valid Auth key.`));
|
|
58
|
-
}
|
|
59
|
-
else if (axiosError.response.status === 403) {
|
|
60
|
-
this.error((0, utils_1.getMessageInRedColor)(`Access denied. It looks like you don’t have access to APIMatic’s Docs as Code offering. Check your subscription details and contact our team at support@apimatic.io if you believe this is a mistake.`));
|
|
61
|
-
}
|
|
62
|
-
else if (axiosError.response.status === 422) {
|
|
63
|
-
this.error((0, utils_1.getMessageInRedColor)(`Failed to generate the portal. Please ensure that the provided build directory follows the correct structure and contains valid API definition and build files.`));
|
|
64
|
-
}
|
|
65
|
-
else if (axiosError.response.status === 500) {
|
|
66
|
-
this.error((0, utils_1.getMessageInRedColor)(`Failed to generate the portal. Please ensure that the provided build directory follows the correct structure and contains valid API definition and build files. If the issue persists, reach out to our team at support@apimatic.io`));
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
this.error((0, utils_1.getMessageInRedColor)(`Failed to generate the portal. Please ensure that the provided build directory follows the correct structure and contains valid API definition and build files. If the issue persists, reach out to our team at support@apimatic.io`));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
else if (axiosError.request) {
|
|
73
|
-
if (axiosError.code === "ECONNABORTED") {
|
|
74
|
-
this.error((0, utils_1.getMessageInRedColor)(`Your request timed out. Please try again or reach out to our team at support@apimatic.io for help if your problem persists.`));
|
|
75
|
-
}
|
|
76
|
-
else if (error.code === "ENOTFOUND" || error.code === "ERR_NETWORK") {
|
|
77
|
-
this.error((0, utils_1.getMessageInRedColor)(`Network error. Please check your internet connection and try again.`));
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
this.error((0, utils_1.getMessageInRedColor)(`No response received from the server. Please try again later.`));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
this.error((0, utils_1.getMessageInRedColor)(`Failed to generate the portal: ${axiosError.message}`));
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
else if (error instanceof Error) {
|
|
88
|
-
this.error((0, utils_1.getMessageInRedColor)(`Failed to generate the portal: ${error.message}`));
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
this.error((0, utils_1.getMessageInRedColor)(`Something went wrong while generating the portal, please try again later. If the issue persists, contact our team at support@apimatic.io`));
|
|
92
|
-
}
|
|
22
|
+
getConfigDir() {
|
|
23
|
+
return new DirectoryPath(this.config.configDir);
|
|
93
24
|
}
|
|
94
25
|
}
|
|
95
26
|
_a = PortalServe;
|
|
96
|
-
PortalServe.
|
|
97
|
-
PortalServe.
|
|
98
|
-
|
|
27
|
+
PortalServe.summary = "Generate and serve an API Documentation Portal with hot reload.";
|
|
28
|
+
PortalServe.description = "Requires an input directory with API specifications, a config file, and optionally markdown guides. Supports disabling hot reload and opening the portal in the default browser.";
|
|
29
|
+
PortalServe.flags = Object.assign(Object.assign(Object.assign(Object.assign({ port: Flags.integer({
|
|
99
30
|
char: "p",
|
|
100
|
-
description: "
|
|
101
|
-
default: 3000
|
|
102
|
-
|
|
103
|
-
destination:
|
|
104
|
-
char: "d",
|
|
105
|
-
description: "Directory to store and serve the generated portal.",
|
|
106
|
-
default: "./generated_portal",
|
|
107
|
-
parse: async (input) => path.resolve(input)
|
|
108
|
-
}),
|
|
109
|
-
source: core_1.Flags.string({
|
|
110
|
-
char: "s",
|
|
111
|
-
description: "Source directory containing specs, content, and build file. By default, the current directory is used.",
|
|
112
|
-
default: "./",
|
|
113
|
-
parse: async (input) => path.resolve(input)
|
|
114
|
-
}),
|
|
115
|
-
open: core_1.Flags.boolean({
|
|
31
|
+
description: "port to serve the portal.",
|
|
32
|
+
default: 3000,
|
|
33
|
+
helpValue: "3000"
|
|
34
|
+
}) }, FlagsProvider.input), FlagsProvider.destination("portal", "portal")), { open: Flags.boolean({
|
|
116
35
|
char: "o",
|
|
117
|
-
description: "
|
|
36
|
+
description: "open the portal in the default browser.",
|
|
118
37
|
default: false
|
|
119
|
-
}),
|
|
120
|
-
|
|
121
|
-
description: "Disable hot reload.",
|
|
38
|
+
}), "no-reload": Flags.boolean({
|
|
39
|
+
description: "disable hot reload.",
|
|
122
40
|
default: false
|
|
123
|
-
}),
|
|
124
|
-
|
|
125
|
-
char: "i",
|
|
126
|
-
description: "Comma-separated list of files/directories to ignore.",
|
|
127
|
-
default: ""
|
|
128
|
-
}),
|
|
129
|
-
"auth-key": core_1.Flags.string({
|
|
130
|
-
description: "Override current authentication state with an authentication key."
|
|
131
|
-
})
|
|
132
|
-
};
|
|
41
|
+
}) }), FlagsProvider.authKey);
|
|
42
|
+
PortalServe.cmdTxt = format.cmd("apimatic", "portal", "serve");
|
|
133
43
|
PortalServe.examples = [
|
|
134
|
-
|
|
44
|
+
_a.cmdTxt,
|
|
45
|
+
`${_a.cmdTxt} ` +
|
|
46
|
+
`${format.flag("input", './')} ` +
|
|
47
|
+
`${format.flag("destination", './portal')} ` +
|
|
48
|
+
`${format.flag("port", "3000")} ` +
|
|
49
|
+
`${format.flag("open")} ` +
|
|
50
|
+
`${format.flag("no-reload")}`
|
|
135
51
|
];
|
|
136
|
-
|
|
137
|
-
//# sourceMappingURL=
|
|
52
|
+
export default PortalServe;
|
|
53
|
+
//# sourceMappingURL=serve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/commands/portal/serve.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,EAAE,MAAM,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,iEAAiE,AAApE,CAAqE;AAE5E,uBAAW,GAChB,kLAAkL,AADlK,CACmK;AAE9K,iBAAK,6DACV,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,2BAA2B;QACxC,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,MAAM;KAClB,CAAC,IACC,aAAa,CAAC,KAAK,GACnB,aAAa,CAAC,WAAW,CAAC,QAAQ,EAAE,QAAQ,CAAC,KAChD,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,KAAK;KACf,CAAC,EACF,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC;QACzB,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE,KAAK;KACf,CAAC,KACC,aAAa,CAAC,OAAO,CAlBd,CAmBV;AAEK,kBAAM,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC,AAA5C,CAA6C;AACnD,oBAAQ,GAAG;IAChB,EAAI,CAAC,MAAM;IACX,GAAG,EAAI,CAAC,MAAM,GAAG;QACf,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG;QAChC,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,GAAG;QAC5C,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG;QACjC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG;QACzB,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;CAChC,AARc,CAQb;eApCiB,WAAW"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
destination: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
static cmdTxt: string;
|
|
12
|
+
static examples: string[];
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 } } = 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);
|
|
22
|
+
outro(result);
|
|
23
|
+
result.mapAll(() => { }, 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
|
+
}), commandMetadata.shell);
|
|
34
|
+
}, () => { });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
_a = PortalTocNew;
|
|
38
|
+
PortalTocNew.summary = "Generate a Table of Contents (TOC) file for your API documentation portal";
|
|
39
|
+
PortalTocNew.description = `This command generates a new Table of Contents (TOC) file used in the
|
|
40
|
+
generation of your API documentation portal.
|
|
41
|
+
|
|
42
|
+
The output is a YAML file with the .yml extension.
|
|
43
|
+
|
|
44
|
+
To learn more about the TOC file and APIMatic build directory structure, visit:
|
|
45
|
+
${format.link("https://docs.apimatic.io/platform-api/#/http/guides/generating-on-prem-api-portal/overview-generating-api-portal")}`;
|
|
46
|
+
PortalTocNew.flags = Object.assign(Object.assign(Object.assign(Object.assign({}, FlagsProvider.destination("src/content", `toc.yml`)), FlagsProvider.input), FlagsProvider.force), { "expand-endpoints": Flags.boolean({
|
|
47
|
+
default: false,
|
|
48
|
+
description: `include individual entries for each endpoint in the generated ${format.var("toc.yml")}. Requires a valid API specification in the working directory.`
|
|
49
|
+
}), "expand-models": Flags.boolean({
|
|
50
|
+
default: false,
|
|
51
|
+
description: `include individual entries for each model in the generated ${format.var("toc.yml")}. Requires a valid API specification in the working directory.`
|
|
52
|
+
}) });
|
|
53
|
+
PortalTocNew.cmdTxt = format.cmd("apimatic", "portal", "toc", "new");
|
|
54
|
+
PortalTocNew.examples = [
|
|
55
|
+
`${_a.cmdTxt} ${format.flag("destination", './src/content/')}`,
|
|
56
|
+
`${_a.cmdTxt} ${format.flag("input", './')}`,
|
|
57
|
+
`${_a.cmdTxt} ${format.flag("input", './')} ${format.flag("destination", './src/content/')}`
|
|
58
|
+
];
|
|
59
|
+
export default PortalTocNew;
|
|
60
|
+
//# sourceMappingURL=new.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;IAsC/C,KAAK,CAAC,GAAG;QACP,MAAM,EACJ,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,EACzG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,EAAY,CAAC,CAAC;QAEnC,MAAM,gBAAgB,GAAG,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1D,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9F,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAE9E,MAAM,eAAe,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E,KAAK;QACd,WAAW,EAAE,iEAAiE,MAAM,CAAC,GAAG,CACtF,SAAS,CACV,gEAAgE;KAClE,CAAC,EACF,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC;QAC7B,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,8DAA8D,MAAM,CAAC,GAAG,CACnF,SAAS,CACV,gEAAgE;KAClE,CAAC,GAfQ,CAgBV;AAEK,mBAAM,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,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;eApCiB,YAAY"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { Command } from "@oclif/core";
|
|
3
|
+
import { format, intro, outro } from "../prompts/format.js";
|
|
4
|
+
import { TelemetryService } from "../infrastructure/services/telemetry-service.js";
|
|
5
|
+
import { DirectoryPath } from "../types/file/directoryPath.js";
|
|
6
|
+
import { QuickstartInitiatedEvent } from "../types/events/quickstart-initiated.js";
|
|
7
|
+
import { QuickstartAction } from "../actions/quickstart.js";
|
|
8
|
+
import { QuickstartCompletedEvent } from "../types/events/quickstart-completed.js";
|
|
9
|
+
class Quickstart extends Command {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.getConfigDir = () => {
|
|
13
|
+
return new DirectoryPath(this.config.configDir);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
async run() {
|
|
17
|
+
const telemetryService = new TelemetryService(this.getConfigDir());
|
|
18
|
+
const commandMetadata = {
|
|
19
|
+
commandName: _a.id,
|
|
20
|
+
shell: this.config.shell
|
|
21
|
+
};
|
|
22
|
+
await telemetryService.trackEvent(new QuickstartInitiatedEvent(), commandMetadata.shell);
|
|
23
|
+
intro("Quickstart");
|
|
24
|
+
const action = new QuickstartAction(this.getConfigDir(), commandMetadata);
|
|
25
|
+
const result = await action.execute();
|
|
26
|
+
outro(result);
|
|
27
|
+
// TODO: Remove this, find a solution for tracking.
|
|
28
|
+
await result.mapAll(async () => await telemetryService.trackEvent(new QuickstartCompletedEvent(), commandMetadata.shell), () => new Promise(() => { }), () => new Promise(() => { }));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
_a = Quickstart;
|
|
32
|
+
Quickstart.description = "Get started with your first SDK or API Portal in four easy steps.";
|
|
33
|
+
Quickstart.summary = "Create your first SDK or API Portal using APIMatic.";
|
|
34
|
+
Quickstart.cmdTxt = format.cmd("apimatic", "quickstart");
|
|
35
|
+
Quickstart.examples = [_a.cmdTxt];
|
|
36
|
+
export default Quickstart;
|
|
37
|
+
//# sourceMappingURL=quickstart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quickstart.js","sourceRoot":"","sources":["../../src/commands/quickstart.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,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UAAU,EAAE,YAAY,CAAC,AAAvC,CAAwC;AAE9C,mBAAQ,GAAG,CAAC,EAAI,CAAC,MAAM,CAAC,AAAhB,CAAiB;eAPb,UAAU"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
2
|
export default class SdkGenerate extends Command {
|
|
3
|
-
static
|
|
3
|
+
static readonly summary = "Generate an SDK for your API";
|
|
4
|
+
static readonly description = "Generate Software Development Kits (SDKs) from API specifications.\nSupports multiple programming languages including Java, C#, Python, JavaScript, and more.";
|
|
5
|
+
static readonly cmdTxt: string;
|
|
4
6
|
static flags: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"auth-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
"auth-key": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
zip: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
language: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
spec: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
destination: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
static examples: string[];
|
|
14
15
|
run(): Promise<void>;
|
|
16
|
+
private readonly getConfigDir;
|
|
15
17
|
}
|
|
@@ -1,138 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { Command, Flags } from "@oclif/core";
|
|
2
|
+
import { DirectoryPath } from "../../types/file/directoryPath.js";
|
|
3
|
+
import { FlagsProvider } from "../../types/flags-provider.js";
|
|
4
|
+
import { GenerateAction } from "../../actions/sdk/generate.js";
|
|
5
|
+
import { Language } from "../../types/sdk/generate.js";
|
|
6
|
+
import { format, intro, outro } from "../../prompts/format.js";
|
|
7
|
+
class SdkGenerate extends Command {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.getConfigDir = () => {
|
|
11
|
+
return new DirectoryPath(this.config.configDir);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
12
14
|
async run() {
|
|
13
|
-
const { flags } = await this.parse(
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
try {
|
|
26
|
-
if (!(await fs.pathExists(path.resolve(flags.destination)))) {
|
|
27
|
-
throw new Error(`Destination path ${flags.destination} does not exist`);
|
|
28
|
-
}
|
|
29
|
-
else if (!(await fs.pathExists(path.resolve(flags.file)))) {
|
|
30
|
-
throw new Error(`Specification file ${flags.file} does not exist`);
|
|
31
|
-
}
|
|
32
|
-
const overrideAuthKey = flags["auth-key"] ? flags["auth-key"] : null;
|
|
33
|
-
const client = await sdk_client_1.SDKClient.getInstance().getClient(overrideAuthKey, this.config.configDir);
|
|
34
|
-
const sdkGenerationController = new sdk_1.CodeGenerationExternalApIsController(client);
|
|
35
|
-
// Get generation id for the specification and platform
|
|
36
|
-
const codeGenId = await (0, generate_1.getSDKGenerationId)(flags, sdkGenerationController);
|
|
37
|
-
// If user wanted to download the SDK as well
|
|
38
|
-
const sdkDownloadParams = {
|
|
39
|
-
codeGenId,
|
|
40
|
-
zippedSDKPath,
|
|
41
|
-
sdkFolderPath,
|
|
42
|
-
zip
|
|
43
|
-
};
|
|
44
|
-
const sdkPath = await (0, generate_1.downloadGeneratedSDK)(sdkDownloadParams, sdkGenerationController);
|
|
45
|
-
this.log(`Success! Your SDK is located at ${sdkPath}`);
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
if (error.result) {
|
|
49
|
-
const apiError = error;
|
|
50
|
-
const result = apiError.result;
|
|
51
|
-
if (apiError.statusCode === 400 && (0, utils_1.isJSONParsable)(result.message)) {
|
|
52
|
-
const errors = JSON.parse(result.message);
|
|
53
|
-
if (Array.isArray(errors.Errors) && apiError.statusCode === 400) {
|
|
54
|
-
this.error((0, utils_1.replaceHTML)(`${JSON.parse(result.message).Errors[0]}`));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
else if (apiError.statusCode === 401 && apiError.body && typeof apiError.body === "string") {
|
|
58
|
-
this.error("You are not authorized to perform this action");
|
|
59
|
-
}
|
|
60
|
-
else if (apiError.statusCode === 500 &&
|
|
61
|
-
apiError.body &&
|
|
62
|
-
typeof apiError.body === "string" &&
|
|
63
|
-
(0, utils_1.isJSONParsable)(apiError.body)) {
|
|
64
|
-
this.error(JSON.parse(apiError.body).message);
|
|
65
|
-
}
|
|
66
|
-
else if (apiError.statusCode === 422 &&
|
|
67
|
-
apiError.body &&
|
|
68
|
-
typeof apiError.body === "string" &&
|
|
69
|
-
(0, utils_1.isJSONParsable)(apiError.body)) {
|
|
70
|
-
this.error(JSON.parse(apiError.body)["dto.Url"][0]);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
this.error((0, utils_1.replaceHTML)(result.message));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
else if (error.statusCode === 401) {
|
|
77
|
-
this.error("You are not authorized to perform this action");
|
|
78
|
-
}
|
|
79
|
-
else if (error.statusCode === 402 &&
|
|
80
|
-
error.body &&
|
|
81
|
-
typeof error.body === "string") {
|
|
82
|
-
this.error((0, utils_1.replaceHTML)(error.body));
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
this.error(`${error.message}`);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
15
|
+
const { flags: { language, spec, destination, force, zip: zipSdk, "auth-key": authKey } } = await this.parse(SdkGenerate);
|
|
16
|
+
const specDirectory = new DirectoryPath(spec);
|
|
17
|
+
const sdkDirectory = destination ? new DirectoryPath(destination) : DirectoryPath.default.join("sdk");
|
|
18
|
+
const commandMetadata = {
|
|
19
|
+
commandName: SdkGenerate.id,
|
|
20
|
+
shell: this.config.shell
|
|
21
|
+
};
|
|
22
|
+
intro("Generate SDK");
|
|
23
|
+
const action = new GenerateAction(this.getConfigDir(), commandMetadata, authKey);
|
|
24
|
+
const result = await action.execute(specDirectory, sdkDirectory, language, force, zipSdk);
|
|
25
|
+
outro(result);
|
|
88
26
|
}
|
|
89
27
|
}
|
|
90
|
-
|
|
91
|
-
SdkGenerate.description =
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
28
|
+
SdkGenerate.summary = "Generate an SDK for your API";
|
|
29
|
+
SdkGenerate.description = `Generate Software Development Kits (SDKs) from API specifications.
|
|
30
|
+
Supports multiple programming languages including Java, C#, Python, JavaScript, and more.`;
|
|
31
|
+
SdkGenerate.cmdTxt = format.cmd("apimatic", "sdk", "generate");
|
|
32
|
+
SdkGenerate.flags = Object.assign(Object.assign(Object.assign({ language: Flags.string({
|
|
33
|
+
char: "l",
|
|
95
34
|
required: true,
|
|
96
|
-
description:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
description: "
|
|
104
|
-
}),
|
|
105
|
-
url: core_1.Flags.string({
|
|
106
|
-
default: "",
|
|
107
|
-
description: "URL to the API specification to generate SDKs for. Can be used in place of the --file option if the API specification is publicly available."
|
|
108
|
-
}),
|
|
109
|
-
destination: core_1.Flags.string({
|
|
110
|
-
parse: async (input) => path.resolve(input),
|
|
111
|
-
default: path.resolve("./"),
|
|
112
|
-
description: "directory to download the generated SDK to"
|
|
113
|
-
}),
|
|
114
|
-
force: core_1.Flags.boolean({
|
|
115
|
-
char: "f",
|
|
35
|
+
description: "Programming language for SDK generation",
|
|
36
|
+
options: Object.values(Language).map((p) => p.valueOf()),
|
|
37
|
+
}), spec: Flags.string({
|
|
38
|
+
description: "Path to the folder containing the API specification file",
|
|
39
|
+
default: "./src/spec"
|
|
40
|
+
}), destination: Flags.string({
|
|
41
|
+
char: "d",
|
|
42
|
+
description: "Directory where the SDK will be generated"
|
|
43
|
+
}) }, FlagsProvider.force), { zip: Flags.boolean({
|
|
116
44
|
default: false,
|
|
117
|
-
description: "
|
|
118
|
-
}),
|
|
119
|
-
zip: core_1.Flags.boolean({ default: false, description: "download the generated SDK as a .zip archive" }),
|
|
120
|
-
"auth-key": core_1.Flags.string({
|
|
121
|
-
default: "",
|
|
122
|
-
description: "override current authentication state with an authentication key"
|
|
123
|
-
})
|
|
124
|
-
};
|
|
45
|
+
description: "Download the generated SDK as a .zip archive"
|
|
46
|
+
}) }), FlagsProvider.authKey);
|
|
125
47
|
SdkGenerate.examples = [
|
|
126
|
-
`$
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
Success! Your SDK is located at swagger_sdk_csharp`,
|
|
130
|
-
`
|
|
131
|
-
$ apimatic sdk:generate --platform="CSHARP" --url=https://petstore.swagger.io/v2/swagger.json
|
|
132
|
-
Generating SDK... done
|
|
133
|
-
Downloading SDK... done
|
|
134
|
-
Success! Your SDK is located at swagger_sdk_csharp
|
|
135
|
-
`
|
|
48
|
+
`${SdkGenerate.cmdTxt} ${format.flag("language", "java")}`,
|
|
49
|
+
`${SdkGenerate.cmdTxt} ${format.flag("language", "csharp")} ${format.flag("spec", "./src/spec")}`,
|
|
50
|
+
`${SdkGenerate.cmdTxt} ${format.flag("language", "python")} ${format.flag("destination", "./sdk")} ${format.flag("zip")}`
|
|
136
51
|
];
|
|
137
|
-
|
|
138
|
-
//# sourceMappingURL=
|
|
52
|
+
export default SdkGenerate;
|
|
53
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -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AC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE;IACjG,GAAG,WAAW,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,IAAI,CAC9G,KAAK,CACN,EAAE;CACJ,AANc,CAMb;eArCiB,WAAW"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const axios_1 = require("axios");
|
|
1
|
+
import axios from "axios";
|
|
4
2
|
const fiftyMBsInBytes = 50 * 1024 * 1024;
|
|
5
3
|
const fiveMinutesInMilliseconds = 5 * 60 * 1000;
|
|
6
|
-
const axiosInstance =
|
|
4
|
+
const axiosInstance = axios.create({
|
|
7
5
|
maxContentLength: fiftyMBsInBytes,
|
|
8
6
|
maxBodyLength: fiftyMBsInBytes,
|
|
9
7
|
timeout: fiveMinutesInMilliseconds
|
|
10
8
|
});
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=
|
|
9
|
+
export default axiosInstance;
|
|
10
|
+
//# sourceMappingURL=axios-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axios-config.js","sourceRoot":"","sources":["../../src/config/axios-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,eAAe,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACzC,MAAM,yBAAyB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAEhD,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC;IACjC,gBAAgB,EAAE,eAAe;IACjC,aAAa,EAAE,eAAe;IAC9B,OAAO,EAAE,yBAAyB;CACnC,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
|