@apimatic/cli 1.0.1-alpha.2 → 1.0.1-alpha.3
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/CHANGELOG.md +7 -0
- package/README.md +12 -12
- package/lib/client-utils/sdk-client.d.ts +1 -1
- package/lib/client-utils/sdk-client.js +3 -3
- package/lib/commands/api/transform.js +2 -2
- package/lib/commands/api/validate.js +2 -2
- package/lib/commands/portal/generate.js +2 -2
- package/lib/commands/sdk/generate.js +2 -2
- package/lib/controllers/api/transform.d.ts +1 -1
- package/lib/controllers/api/transform.js +5 -5
- package/lib/controllers/api/validate.d.ts +1 -1
- package/lib/controllers/sdk/generate.d.ts +1 -1
- package/lib/controllers/sdk/generate.js +3 -3
- package/lib/types/api/transform.d.ts +1 -1
- package/lib/types/portal/generate.d.ts +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.0.1-alpha.3](https://github.com/apimatic/apimatic-cli/compare/v1.0.1-alpha.2...v1.0.1-alpha.3) (2021-12-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **sdk package:** get sdk package from npm ([4c8e178](https://github.com/apimatic/apimatic-cli/commit/4c8e1787eb21f04d81cab95b5a58e3133a61f7af))
|
|
7
|
+
|
|
1
8
|
## [1.0.1-alpha.2](https://github.com/apimatic/apimatic-cli/compare/v1.0.1-alpha.1...v1.0.1-alpha.2) (2021-11-30)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ $ npm install -g @apimatic/cli
|
|
|
19
19
|
$ apimatic COMMAND
|
|
20
20
|
running command...
|
|
21
21
|
$ apimatic (-v|--version|version)
|
|
22
|
-
@apimatic/cli/1.0.1-alpha.
|
|
22
|
+
@apimatic/cli/1.0.1-alpha.3 linux-x64 node-v14.18.1
|
|
23
23
|
$ apimatic --help [COMMAND]
|
|
24
24
|
USAGE
|
|
25
25
|
$ apimatic COMMAND
|
|
@@ -55,7 +55,7 @@ EXAMPLE
|
|
|
55
55
|
$ apimatic api --help
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
_See code: [src/commands/api/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
58
|
+
_See code: [src/commands/api/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.3/src/commands/api/index.ts)_
|
|
59
59
|
|
|
60
60
|
## `apimatic api:transform`
|
|
61
61
|
|
|
@@ -84,7 +84,7 @@ EXAMPLE
|
|
|
84
84
|
Success! Your transformed file is located at D:/Transformed_OpenApi3Json.json
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
_See code: [src/commands/api/transform.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
87
|
+
_See code: [src/commands/api/transform.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.3/src/commands/api/transform.ts)_
|
|
88
88
|
|
|
89
89
|
## `apimatic api:validate`
|
|
90
90
|
|
|
@@ -104,7 +104,7 @@ EXAMPLE
|
|
|
104
104
|
Specification file provided is valid
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
_See code: [src/commands/api/validate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
107
|
+
_See code: [src/commands/api/validate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.3/src/commands/api/validate.ts)_
|
|
108
108
|
|
|
109
109
|
## `apimatic auth`
|
|
110
110
|
|
|
@@ -118,7 +118,7 @@ EXAMPLE
|
|
|
118
118
|
$ apimatic auth --help
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
_See code: [src/commands/auth/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
121
|
+
_See code: [src/commands/auth/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.3/src/commands/auth/index.ts)_
|
|
122
122
|
|
|
123
123
|
## `apimatic auth:login`
|
|
124
124
|
|
|
@@ -139,7 +139,7 @@ EXAMPLE
|
|
|
139
139
|
You have successfully logged into APIMatic
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
_See code: [src/commands/auth/login.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
142
|
+
_See code: [src/commands/auth/login.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.3/src/commands/auth/login.ts)_
|
|
143
143
|
|
|
144
144
|
## `apimatic auth:logout`
|
|
145
145
|
|
|
@@ -154,7 +154,7 @@ EXAMPLE
|
|
|
154
154
|
Logged out
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
_See code: [src/commands/auth/logout.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
157
|
+
_See code: [src/commands/auth/logout.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.3/src/commands/auth/logout.ts)_
|
|
158
158
|
|
|
159
159
|
## `apimatic auth:status`
|
|
160
160
|
|
|
@@ -169,7 +169,7 @@ EXAMPLE
|
|
|
169
169
|
Currently logged in as apimatic-client@gmail.com
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
_See code: [src/commands/auth/status.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
172
|
+
_See code: [src/commands/auth/status.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.3/src/commands/auth/status.ts)_
|
|
173
173
|
|
|
174
174
|
## `apimatic autocomplete [SHELL]`
|
|
175
175
|
|
|
@@ -223,7 +223,7 @@ EXAMPLE
|
|
|
223
223
|
$apimatic portal --help
|
|
224
224
|
```
|
|
225
225
|
|
|
226
|
-
_See code: [src/commands/portal/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
226
|
+
_See code: [src/commands/portal/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.3/src/commands/portal/index.ts)_
|
|
227
227
|
|
|
228
228
|
## `apimatic portal:generate`
|
|
229
229
|
|
|
@@ -244,7 +244,7 @@ EXAMPLE
|
|
|
244
244
|
Your portal has been generated at D:/
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
-
_See code: [src/commands/portal/generate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
247
|
+
_See code: [src/commands/portal/generate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.3/src/commands/portal/generate.ts)_
|
|
248
248
|
|
|
249
249
|
## `apimatic sdk`
|
|
250
250
|
|
|
@@ -258,7 +258,7 @@ EXAMPLE
|
|
|
258
258
|
$apimatic sdk --help
|
|
259
259
|
```
|
|
260
260
|
|
|
261
|
-
_See code: [src/commands/sdk/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
261
|
+
_See code: [src/commands/sdk/index.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.3/src/commands/sdk/index.ts)_
|
|
262
262
|
|
|
263
263
|
## `apimatic sdk:generate`
|
|
264
264
|
|
|
@@ -288,5 +288,5 @@ EXAMPLE
|
|
|
288
288
|
SDK generated successfully
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
_See code: [src/commands/sdk/generate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.
|
|
291
|
+
_See code: [src/commands/sdk/generate.ts](https://github.com/apimatic/apimatic-cli/blob/v1.0.1-alpha.3/src/commands/sdk/generate.ts)_
|
|
292
292
|
<!-- commandsstop -->
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SDKClient = void 0;
|
|
4
4
|
const base64 = require("base-64");
|
|
5
5
|
const axios_1 = require("axios");
|
|
6
|
-
const
|
|
6
|
+
const js_sdk_1 = require("@apimatic/js-sdk");
|
|
7
7
|
const auth_manager_1 = require("./auth-manager");
|
|
8
8
|
const env_1 = require("../config/env");
|
|
9
9
|
class SDKClient {
|
|
@@ -84,7 +84,7 @@ class SDKClient {
|
|
|
84
84
|
}
|
|
85
85
|
async getClient(overrideAuthKey, configDir) {
|
|
86
86
|
if (overrideAuthKey) {
|
|
87
|
-
return new
|
|
87
|
+
return new js_sdk_1.Client({
|
|
88
88
|
timeout: 0,
|
|
89
89
|
authorization: `X-Auth-Key ${overrideAuthKey}`
|
|
90
90
|
});
|
|
@@ -95,7 +95,7 @@ class SDKClient {
|
|
|
95
95
|
storedAuthInfo = { email: "", authKey: "" };
|
|
96
96
|
}
|
|
97
97
|
if (storedAuthInfo.authKey !== "") {
|
|
98
|
-
return new
|
|
98
|
+
return new js_sdk_1.Client({
|
|
99
99
|
timeout: 0,
|
|
100
100
|
authorization: `X-Auth-Key ${storedAuthInfo.authKey}`
|
|
101
101
|
});
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const fs = require("fs-extra");
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const cli_ux_1 = require("cli-ux");
|
|
6
|
-
const
|
|
6
|
+
const js_sdk_1 = require("@apimatic/js-sdk");
|
|
7
7
|
const command_1 = require("@oclif/command");
|
|
8
8
|
const sdk_client_1 = require("../../client-utils/sdk-client");
|
|
9
9
|
const utils_1 = require("../../utils/utils");
|
|
@@ -27,7 +27,7 @@ class Transform extends command_1.Command {
|
|
|
27
27
|
}
|
|
28
28
|
const overrideAuthKey = flags["auth-key"] ? flags["auth-key"] : null;
|
|
29
29
|
const client = await sdk_client_1.SDKClient.getInstance().getClient(overrideAuthKey, this.config.configDir);
|
|
30
|
-
const transformationController = new
|
|
30
|
+
const transformationController = new js_sdk_1.TransformationController(client);
|
|
31
31
|
const { id, apiValidationSummary } = await transform_2.getTransformationId(flags, transformationController);
|
|
32
32
|
transform_2.printValidationMessages(apiValidationSummary, this.warn, this.error);
|
|
33
33
|
const savedTransformationFile = await transform_2.downloadTransformationFile({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const fs = require("fs-extra");
|
|
4
|
-
const
|
|
4
|
+
const js_sdk_1 = require("@apimatic/js-sdk");
|
|
5
5
|
const command_1 = require("@oclif/command");
|
|
6
6
|
const sdk_client_1 = require("../../client-utils/sdk-client");
|
|
7
7
|
const utils_1 = require("../../utils/utils");
|
|
@@ -16,7 +16,7 @@ class Validate extends command_1.Command {
|
|
|
16
16
|
}
|
|
17
17
|
const overrideAuthKey = flags["auth-key"] ? flags["auth-key"] : null;
|
|
18
18
|
const client = await sdk_client_1.SDKClient.getInstance().getClient(overrideAuthKey, this.config.configDir);
|
|
19
|
-
const apiValidationController = new
|
|
19
|
+
const apiValidationController = new js_sdk_1.APIValidationExternalApisController(client);
|
|
20
20
|
const validationSummary = await validate_1.getValidation(flags, apiValidationController);
|
|
21
21
|
transform_1.printValidationMessages(validationSummary, this.warn, this.error);
|
|
22
22
|
validationSummary.success
|
|
@@ -4,7 +4,7 @@ const fs = require("fs-extra");
|
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const cli_ux_1 = require("cli-ux");
|
|
6
6
|
const command_1 = require("@oclif/command");
|
|
7
|
-
const
|
|
7
|
+
const js_sdk_1 = require("@apimatic/js-sdk");
|
|
8
8
|
const sdk_client_1 = require("../../client-utils/sdk-client");
|
|
9
9
|
const generate_1 = require("../../controllers/portal/generate");
|
|
10
10
|
const utils_1 = require("../../utils/utils");
|
|
@@ -23,7 +23,7 @@ class PortalGenerate extends command_1.Command {
|
|
|
23
23
|
throw new Error(`Portal build folder ${flags.folder} does not exist`);
|
|
24
24
|
}
|
|
25
25
|
const client = await sdk_client_1.SDKClient.getInstance().getClient(overrideAuthKey, this.config.configDir);
|
|
26
|
-
const docsPortalController = new
|
|
26
|
+
const docsPortalController = new js_sdk_1.DocsPortalManagementController(client);
|
|
27
27
|
const zippedBuildFilePath = await utils_1.zipDirectory(portalFolderPath, generatedPortalFolderPath);
|
|
28
28
|
const generatePortalParams = {
|
|
29
29
|
zippedBuildFilePath,
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const fs = require("fs-extra");
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const cli_ux_1 = require("cli-ux");
|
|
6
|
-
const
|
|
6
|
+
const js_sdk_1 = require("@apimatic/js-sdk");
|
|
7
7
|
const command_1 = require("@oclif/command");
|
|
8
8
|
const sdk_client_1 = require("../../client-utils/sdk-client");
|
|
9
9
|
const utils_1 = require("../../utils/utils");
|
|
@@ -30,7 +30,7 @@ class SdkGenerate extends command_1.Command {
|
|
|
30
30
|
}
|
|
31
31
|
const overrideAuthKey = flags["auth-key"] ? flags["auth-key"] : null;
|
|
32
32
|
const client = await sdk_client_1.SDKClient.getInstance().getClient(overrideAuthKey, this.config.configDir);
|
|
33
|
-
const sdkGenerationController = new
|
|
33
|
+
const sdkGenerationController = new js_sdk_1.CodeGenerationExternalApisController(client);
|
|
34
34
|
// Get generation id for the specification and platform
|
|
35
35
|
const codeGenId = await generate_1.getSDKGenerationId(flags, sdkGenerationController);
|
|
36
36
|
// If user wanted to download the SDK as well
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Command from "@oclif/command";
|
|
2
|
-
import { ApiValidationSummary, ExportFormats, Transformation, TransformationController } from "@apimatic/
|
|
2
|
+
import { ApiValidationSummary, ExportFormats, Transformation, TransformationController } from "@apimatic/js-sdk";
|
|
3
3
|
import { DownloadTransformationParams, TransformationIdParams } from "../../types/api/transform";
|
|
4
4
|
export declare const getTransformationId: ({ file, url, format }: TransformationIdParams, transformationController: TransformationController) => Promise<Transformation>;
|
|
5
5
|
export declare const downloadTransformationFile: ({ id, destinationFilePath, transformationController }: DownloadTransformationParams) => Promise<string>;
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.printValidationMessages = exports.getValidFormat = exports.downloadTransformationFile = exports.getTransformationId = void 0;
|
|
4
4
|
const cli_ux_1 = require("cli-ux");
|
|
5
5
|
const fs = require("fs-extra");
|
|
6
|
-
const
|
|
6
|
+
const js_sdk_1 = require("@apimatic/js-sdk");
|
|
7
7
|
const utils_1 = require("../../utils/utils");
|
|
8
8
|
exports.getTransformationId = async ({ file, url, format }, transformationController) => {
|
|
9
9
|
cli_ux_1.default.action.start("Transforming API specification");
|
|
10
10
|
let generation;
|
|
11
11
|
if (file) {
|
|
12
|
-
const fileDescriptor = new
|
|
12
|
+
const fileDescriptor = new js_sdk_1.FileWrapper(fs.createReadStream(file));
|
|
13
13
|
generation = await transformationController.transformViaFile(fileDescriptor, format);
|
|
14
14
|
}
|
|
15
15
|
else if (url) {
|
|
@@ -39,11 +39,11 @@ exports.downloadTransformationFile = async ({ id, destinationFilePath, transform
|
|
|
39
39
|
};
|
|
40
40
|
// Get valid platform from user's input, convert simple platform to valid Platforms enum value
|
|
41
41
|
exports.getValidFormat = (format) => {
|
|
42
|
-
if (Object.keys(
|
|
43
|
-
return
|
|
42
|
+
if (Object.keys(js_sdk_1.ExportFormats).find((exportFormat) => exportFormat === format)) {
|
|
43
|
+
return js_sdk_1.ExportFormats[format];
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
|
-
const formats = Object.keys(
|
|
46
|
+
const formats = Object.keys(js_sdk_1.ExportFormats).join("|");
|
|
47
47
|
throw new Error(`Please provide a valid platform i.e. ${formats}`);
|
|
48
48
|
}
|
|
49
49
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Command from "@oclif/command";
|
|
2
|
-
import { APIValidationExternalApisController, ApiValidationSummary } from "@apimatic/
|
|
2
|
+
import { APIValidationExternalApisController, ApiValidationSummary } from "@apimatic/js-sdk";
|
|
3
3
|
import { GetValidationParams } from "../../types/api/validate";
|
|
4
4
|
export declare const getValidation: ({ file, url }: GetValidationParams, apiValidationController: APIValidationExternalApisController) => Promise<ApiValidationSummary>;
|
|
5
5
|
export declare const printValidationMessages: ({ warnings, errors }: ApiValidationSummary, warn: Command["warn"], error: Command["error"]) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodeGenerationExternalApisController } from "@apimatic/
|
|
1
|
+
import { CodeGenerationExternalApisController } from "@apimatic/js-sdk";
|
|
2
2
|
import { GenerationIdParams, DownloadSDKParams } from "../../types/sdk/generate";
|
|
3
3
|
export declare const getSDKGenerationId: ({ file, url, platform }: GenerationIdParams, sdkGenerationController: CodeGenerationExternalApisController) => Promise<string>;
|
|
4
4
|
export declare const downloadGeneratedSDK: ({ codeGenId, zippedSDKPath, sdkFolderPath, zip }: DownloadSDKParams, sdkGenerationController: CodeGenerationExternalApisController) => Promise<string>;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.downloadGeneratedSDK = exports.getSDKGenerationId = void 0;
|
|
4
4
|
const fs = require("fs-extra");
|
|
5
5
|
const cli_ux_1 = require("cli-ux");
|
|
6
|
-
const
|
|
6
|
+
const js_sdk_1 = require("@apimatic/js-sdk");
|
|
7
7
|
const core_1 = require("@apimatic/core");
|
|
8
8
|
const generate_1 = require("../../types/sdk/generate");
|
|
9
9
|
const utils_1 = require("../../utils/utils");
|
|
@@ -34,11 +34,11 @@ const getSDKPlatform = (platform) => {
|
|
|
34
34
|
if (Object.keys(generate_1.SimplePlatforms).includes(platform)) {
|
|
35
35
|
return generate_1.SimplePlatforms[platform];
|
|
36
36
|
}
|
|
37
|
-
else if (Object.values(
|
|
37
|
+
else if (Object.values(js_sdk_1.Platforms).includes(platform)) {
|
|
38
38
|
return platform;
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
|
-
const platforms = Object.keys(generate_1.SimplePlatforms).concat(Object.values(
|
|
41
|
+
const platforms = Object.keys(generate_1.SimplePlatforms).concat(Object.values(js_sdk_1.Platforms)).join("|");
|
|
42
42
|
throw new Error(`Please provide a valid platform i.e. ${platforms}`);
|
|
43
43
|
}
|
|
44
44
|
};
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.1-alpha.
|
|
1
|
+
{"version":"1.0.1-alpha.3","commands":{"api":{"id":"api","description":"lists all commands related to the APIMatic API.","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic api --help"],"flags":{},"args":[]},"api:transform":{"id":"api:transform","description":"Transforms your API specification to any supported format of your choice from amongst[10+ different formats](https://www.apimatic.io/transformer/#supported-formats).","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic api:transform --format=\"OpenApi3Json\" --file=\"./specs/sample.json\" --destination=\"D:/\"\nSuccess! Your transformed file is located at D:/Transformed_OpenApi3Json.json\n"],"flags":{"format":{"name":"format","type":"option","description":"specification format to transform API specification into\n(OpenApi3Json|OpenApi3Yaml|APIMATIC|WADL2009|WADL2006|WSDL|\nSwagger10|Swagger20|SwaggerYaml|RAML|RAML10|Postman10|Postman20)","required":true},"file":{"name":"file","type":"option","description":"path to the API specification file to transform","default":""},"url":{"name":"url","type":"option","description":"URL to the API specification file to transform","default":""},"destination":{"name":"destination","type":"option","description":"path to transformed file","default":"/home/runner/work/apimatic-cli/apimatic-cli/cli/src/commands/api"},"auth-key":{"name":"auth-key","type":"option","description":"override current auth-key"}},"args":[]},"api:validate":{"id":"api:validate","description":"Validates the provided API specification file for any syntactical and semantic errors","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic api:validate --file=\"./specs/sample.json\"\nSpecification file provided is valid\n"],"flags":{"file":{"name":"file","type":"option","description":"path to the API specification file to validate","default":""},"url":{"name":"url","type":"option","description":"URL to the specification file to validate","default":""},"auth-key":{"name":"auth-key","type":"option","description":"override current auth-key"}},"args":[]},"auth":{"id":"auth","description":"invokes subcommands related to authentication.","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic auth --help"],"flags":{},"args":[]},"auth:login":{"id":"auth:login","description":"login to your APIMatic account","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic auth:login\nPlease enter your registered email: apimatic-user@gmail.com\nPlease enter your password: *********\n\nYou have successfully logged into APIMatic\n"],"flags":{"auth-key":{"name":"auth-key","type":"option","description":"Set authentication key for all commands","default":""}},"args":[]},"auth:logout":{"id":"auth:logout","description":"logout of APIMatic","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic auth:logout\nLogged out\n"],"flags":{},"args":[]},"auth:status":{"id":"auth:status","description":"checks current logged-in account","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic auth:status\nCurrently logged in as apimatic-client@gmail.com\n"],"flags":{},"args":[]},"portal:generate":{"id":"portal:generate","description":"Generate static docs portal on premise","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic portal:generate --folder=\"./portal/\" --destination=\"D:/\"\nYour portal has been generated at D:/\n"],"flags":{"folder":{"name":"folder","type":"option","description":"folder to generate the portal with","default":""},"destination":{"name":"destination","type":"option","description":"path to the downloaded portal","default":"./"},"zip":{"name":"zip","type":"boolean","description":"zip the portal","allowNo":false},"auth-key":{"name":"auth-key","type":"option","description":"override current auth-key","default":""}},"args":[]},"portal":{"id":"portal","description":"invokes subcommands related to the API Portal.","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$apimatic portal --help"],"flags":{},"args":[]},"sdk:generate":{"id":"sdk:generate","description":"Generate SDK for your APIs","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$ apimatic sdk:generate --platform=\"CSHARP\" --file=\"./specs/sample.json\"\nSDK generated successfully\n"],"flags":{"platform":{"name":"platform","type":"option","description":"language platform for sdk\nSimple: CSHARP|JAVA|PYTHON|RUBY|PHP|TYPESCRIPT\nLegacy: CS_NET_STANDARD_LIB|CS_PORTABLE_NET_LIB|CS_UNIVERSAL_WINDOWS_PLATFORM_LIB|\n JAVA_ECLIPSE_JRE_LIB|PHP_GENERIC_LIB|PYTHON_GENERIC_LIB|RUBY_GENERIC_LIB|\n TS_GENERIC_LIB","required":true},"file":{"name":"file","type":"option","description":"path to the API specification to generate SDK","default":""},"url":{"name":"url","type":"option","description":"URL to the API specification to generate SDK","default":""},"destination":{"name":"destination","type":"option","description":"path to downloaded SDK (used with download flag)","default":"./"},"zip":{"name":"zip","type":"boolean","description":"zip the SDK (used with download flag)","allowNo":false},"auth-key":{"name":"auth-key","type":"option","description":"override current auth-key","default":""}},"args":[]},"sdk":{"id":"sdk","description":"invokes subcommands related to your SDKs.","pluginName":"@apimatic/cli","pluginType":"core","aliases":[],"examples":["$apimatic sdk --help"],"flags":{},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apimatic/cli",
|
|
3
3
|
"description": "The official CLI for APIMatic.",
|
|
4
|
-
"version": "1.0.1-alpha.
|
|
4
|
+
"version": "1.0.1-alpha.3",
|
|
5
5
|
"author": "APIMatic",
|
|
6
6
|
"bin": {
|
|
7
7
|
"apimatic": "./bin/run"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"lint:fix": "eslint --fix \"src/**/*.{js,ts}\" --quiet"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@apimatic/
|
|
48
|
+
"@apimatic/js-sdk": "^0.0.3-alpha.1",
|
|
49
49
|
"@oclif/command": "^1.8.0",
|
|
50
50
|
"@oclif/config": "^1.17.0",
|
|
51
51
|
"@oclif/plugin-autocomplete": "^0.3.0",
|