@apimatic/cli 1.1.0-beta.10 → 1.1.0-beta.13
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 +105 -6
- package/lib/actions/portal/generate.js +7 -1
- package/lib/actions/portal/generate.js.map +1 -1
- package/lib/actions/publishing/profile/list.d.ts +11 -0
- package/lib/actions/publishing/profile/list.js +29 -0
- package/lib/actions/publishing/profile/list.js.map +1 -0
- package/lib/actions/sdk/generate.d.ts +5 -1
- package/lib/actions/sdk/generate.js +55 -40
- package/lib/actions/sdk/generate.js.map +1 -1
- package/lib/actions/sdk/merge-source-tree.d.ts +12 -0
- package/lib/actions/sdk/merge-source-tree.js +78 -0
- package/lib/actions/sdk/merge-source-tree.js.map +1 -0
- package/lib/actions/sdk/publish/interactive.d.ts +13 -0
- package/lib/actions/sdk/publish/interactive.js +105 -0
- package/lib/actions/sdk/publish/interactive.js.map +1 -0
- package/lib/actions/sdk/publish/non-interactive.d.ts +14 -0
- package/lib/actions/sdk/publish/non-interactive.js +101 -0
- package/lib/actions/sdk/publish/non-interactive.js.map +1 -0
- package/lib/actions/sdk/publish.d.ts +18 -0
- package/lib/actions/sdk/publish.js +56 -0
- package/lib/actions/sdk/publish.js.map +1 -0
- package/lib/actions/sdk/quickstart.js +1 -1
- package/lib/actions/sdk/quickstart.js.map +1 -1
- package/lib/actions/sdk/save-changes.d.ts +8 -0
- package/lib/actions/sdk/save-changes.js +93 -0
- package/lib/actions/sdk/save-changes.js.map +1 -0
- package/lib/commands/portal/recipe/new.js +2 -2
- package/lib/commands/portal/recipe/new.js.map +1 -1
- package/lib/commands/portal/toc/new.js +2 -2
- package/lib/commands/portal/toc/new.js.map +1 -1
- package/lib/commands/publishing/profile/list.d.ts +9 -0
- package/lib/commands/publishing/profile/list.js +28 -0
- package/lib/commands/publishing/profile/list.js.map +1 -0
- package/lib/commands/quickstart.js +1 -1
- package/lib/commands/quickstart.js.map +1 -1
- package/lib/commands/sdk/generate.d.ts +4 -2
- package/lib/commands/sdk/generate.js +26 -8
- package/lib/commands/sdk/generate.js.map +1 -1
- package/lib/commands/sdk/publish.d.ts +18 -0
- package/lib/commands/sdk/publish.js +73 -0
- package/lib/commands/sdk/publish.js.map +1 -0
- package/lib/commands/sdk/save-changes.d.ts +14 -0
- package/lib/commands/sdk/save-changes.js +51 -0
- package/lib/commands/sdk/save-changes.js.map +1 -0
- package/lib/hooks/not-found.js +1 -1
- package/lib/hooks/not-found.js.map +1 -1
- package/lib/infrastructure/env-info.d.ts +2 -0
- package/lib/infrastructure/env-info.js +22 -11
- package/lib/infrastructure/env-info.js.map +1 -1
- package/lib/infrastructure/file-service.d.ts +9 -0
- package/lib/infrastructure/file-service.js +94 -5
- package/lib/infrastructure/file-service.js.map +1 -1
- package/lib/infrastructure/git-service.d.ts +14 -0
- package/lib/infrastructure/git-service.js +90 -0
- package/lib/infrastructure/git-service.js.map +1 -0
- package/lib/infrastructure/launcher-service.d.ts +5 -0
- package/lib/infrastructure/launcher-service.js +35 -2
- package/lib/infrastructure/launcher-service.js.map +1 -1
- package/lib/infrastructure/os-extensions.d.ts +2 -0
- package/lib/infrastructure/os-extensions.js +6 -0
- package/lib/infrastructure/os-extensions.js.map +1 -0
- package/lib/infrastructure/service-error.d.ts +14 -2
- package/lib/infrastructure/service-error.js +26 -9
- package/lib/infrastructure/service-error.js.map +1 -1
- package/lib/infrastructure/services/portal-service.d.ts +6 -1
- package/lib/infrastructure/services/portal-service.js +37 -18
- package/lib/infrastructure/services/portal-service.js.map +1 -1
- package/lib/infrastructure/services/publishing-api-service.d.ts +19 -0
- package/lib/infrastructure/services/publishing-api-service.js +111 -0
- package/lib/infrastructure/services/publishing-api-service.js.map +1 -0
- package/lib/infrastructure/zip-service.d.ts +2 -2
- package/lib/infrastructure/zip-service.js +29 -11
- package/lib/infrastructure/zip-service.js.map +1 -1
- package/lib/prompts/format.d.ts +0 -2
- package/lib/prompts/format.js +0 -31
- package/lib/prompts/format.js.map +1 -1
- package/lib/prompts/portal/generate.d.ts +1 -1
- package/lib/prompts/portal/generate.js +9 -3
- package/lib/prompts/portal/generate.js.map +1 -1
- package/lib/prompts/prompt.d.ts +6 -0
- package/lib/prompts/prompt.js +45 -0
- package/lib/prompts/prompt.js.map +1 -1
- package/lib/prompts/publishing/profile/list.d.ts +9 -0
- package/lib/prompts/publishing/profile/list.js +27 -0
- package/lib/prompts/publishing/profile/list.js.map +1 -0
- package/lib/prompts/sdk/generate.d.ts +5 -3
- package/lib/prompts/sdk/generate.js +20 -14
- package/lib/prompts/sdk/generate.js.map +1 -1
- package/lib/prompts/sdk/merge-source-tree.d.ts +22 -0
- package/lib/prompts/sdk/merge-source-tree.js +90 -0
- package/lib/prompts/sdk/merge-source-tree.js.map +1 -0
- package/lib/prompts/sdk/publish/interactive.d.ts +30 -0
- package/lib/prompts/sdk/publish/interactive.js +139 -0
- package/lib/prompts/sdk/publish/interactive.js.map +1 -0
- package/lib/prompts/sdk/publish/non-interactive.d.ts +27 -0
- package/lib/prompts/sdk/publish/non-interactive.js +97 -0
- package/lib/prompts/sdk/publish/non-interactive.js.map +1 -0
- package/lib/prompts/sdk/publish.d.ts +12 -0
- package/lib/prompts/sdk/publish.js +16 -0
- package/lib/prompts/sdk/publish.js.map +1 -0
- package/lib/prompts/sdk/save-changes.d.ts +21 -0
- package/lib/prompts/sdk/save-changes.js +84 -0
- package/lib/prompts/sdk/save-changes.js.map +1 -0
- package/lib/types/build/build.d.ts +2 -0
- package/lib/types/build/build.js.map +1 -1
- package/lib/types/build-context.d.ts +11 -0
- package/lib/types/build-context.js +81 -1
- package/lib/types/build-context.js.map +1 -1
- package/lib/types/events/sdk-changes-saved.d.ts +8 -0
- package/lib/types/events/sdk-changes-saved.js +11 -0
- package/lib/types/events/sdk-changes-saved.js.map +1 -0
- package/lib/types/events/sdk-changes-tracked.d.ts +8 -0
- package/lib/types/events/sdk-changes-tracked.js +11 -0
- package/lib/types/events/sdk-changes-tracked.js.map +1 -0
- package/lib/types/events/sdk-conflicts-resolved.d.ts +8 -0
- package/lib/types/events/sdk-conflicts-resolved.js +11 -0
- package/lib/types/events/sdk-conflicts-resolved.js.map +1 -0
- package/lib/types/events/sdk-publish-validation-failed.d.ts +5 -0
- package/lib/types/events/sdk-publish-validation-failed.js +8 -0
- package/lib/types/events/sdk-publish-validation-failed.js.map +1 -0
- package/lib/types/file/directory.d.ts +10 -1
- package/lib/types/file/directory.js +63 -5
- package/lib/types/file/directory.js.map +1 -1
- package/lib/types/file/directoryPath.js.map +1 -1
- package/lib/types/merge-source-tree-context.d.ts +28 -0
- package/lib/types/merge-source-tree-context.js +63 -0
- package/lib/types/merge-source-tree-context.js.map +1 -0
- package/lib/types/package-settings-context.d.ts +10 -0
- package/lib/types/package-settings-context.js +20 -0
- package/lib/types/package-settings-context.js.map +1 -0
- package/lib/types/publish/package-settings-configuration.d.ts +70 -0
- package/lib/types/publish/package-settings-configuration.js +46 -0
- package/lib/types/publish/package-settings-configuration.js.map +1 -0
- package/lib/types/publish/profile-id.d.ts +10 -0
- package/lib/types/publish/profile-id.js +22 -0
- package/lib/types/publish/profile-id.js.map +1 -0
- package/lib/types/publish/publishing-profile.d.ts +18 -0
- package/lib/types/publish/publishing-profile.js +105 -0
- package/lib/types/publish/publishing-profile.js.map +1 -0
- package/lib/types/publish/publishing-profiles.d.ts +12 -0
- package/lib/types/publish/publishing-profiles.js +36 -0
- package/lib/types/publish/publishing-profiles.js.map +1 -0
- package/lib/types/publish/version.d.ts +7 -0
- package/lib/types/publish/version.js +17 -0
- package/lib/types/publish/version.js.map +1 -0
- package/lib/types/publish-api/publish-log.d.ts +20 -0
- package/lib/types/publish-api/publish-log.js +2 -0
- package/lib/types/publish-api/publish-log.js.map +1 -0
- package/lib/types/publish-api/publishing-info.d.ts +4 -0
- package/lib/types/publish-api/publishing-info.js +2 -0
- package/lib/types/publish-api/publishing-info.js.map +1 -0
- package/lib/types/publish-api/publishing-profile-item.d.ts +183 -0
- package/lib/types/publish-api/publishing-profile-item.js +6 -0
- package/lib/types/publish-api/publishing-profile-item.js.map +1 -0
- package/lib/types/save-changes-context.d.ts +17 -0
- package/lib/types/save-changes-context.js +42 -0
- package/lib/types/save-changes-context.js.map +1 -0
- package/lib/types/sdk-context.d.ts +5 -4
- package/lib/types/sdk-context.js +26 -13
- package/lib/types/sdk-context.js.map +1 -1
- package/lib/types/spec-context.js.map +1 -1
- package/lib/types/temp-context.js.map +1 -1
- package/package.json +18 -9
- package/lib/types/versioned-build-context.d.ts +0 -15
- package/lib/types/versioned-build-context.js +0 -28
- package/lib/types/versioned-build-context.js.map +0 -1
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.1.0-beta.
|
|
4
|
+
"version": "1.1.0-beta.13",
|
|
5
5
|
"author": "APIMatic",
|
|
6
6
|
"bin": {
|
|
7
7
|
"apimatic": "./bin/run.js"
|
|
@@ -47,12 +47,11 @@
|
|
|
47
47
|
"test": "tsx node_modules/mocha/bin/_mocha --forbid-only \"test/**/*.test.ts\" --timeout 99999"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@apimatic/sdk": "
|
|
50
|
+
"@apimatic/sdk": "0.2.0-alpha.8",
|
|
51
51
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
52
52
|
"@oclif/core": "^4.2.8",
|
|
53
53
|
"@oclif/plugin-autocomplete": "^3.2.24",
|
|
54
54
|
"@oclif/plugin-help": "^6.2.26",
|
|
55
|
-
"archiver": "^7.0.1",
|
|
56
55
|
"async-mutex": "^0.5.0",
|
|
57
56
|
"axios": "^1.8.1",
|
|
58
57
|
"chokidar": "^3.6.0",
|
|
@@ -65,6 +64,7 @@
|
|
|
65
64
|
"fs-extra": "^11.3.0",
|
|
66
65
|
"get-port": "^7.1.0",
|
|
67
66
|
"is-in-ci": "^2.0.0",
|
|
67
|
+
"isomorphic-git": "^1.37.2",
|
|
68
68
|
"livereload": "^0.9.3",
|
|
69
69
|
"neverthrow": "^8.2.0",
|
|
70
70
|
"open": "^8.4.0",
|
|
@@ -73,16 +73,16 @@
|
|
|
73
73
|
"tmp-promise": "^3.0.3",
|
|
74
74
|
"tslib": "^2.8.1",
|
|
75
75
|
"uuid": "^11.1.0",
|
|
76
|
-
"yaml": "^2.8.0"
|
|
76
|
+
"yaml": "^2.8.0",
|
|
77
|
+
"yazl": "^3.3.1"
|
|
77
78
|
},
|
|
78
79
|
"devDependencies": {
|
|
79
|
-
"@commitlint/cli": "^
|
|
80
|
+
"@commitlint/cli": "^20.5.0",
|
|
80
81
|
"@commitlint/config-conventional": "^15.0.0",
|
|
81
82
|
"@eslint/js": "^9.34.0",
|
|
82
83
|
"@oclif/test": "^4.1.13",
|
|
83
84
|
"@semantic-release/changelog": "^6.0.3",
|
|
84
85
|
"@semantic-release/git": "^10.0.1",
|
|
85
|
-
"@types/archiver": "^5.3.4",
|
|
86
86
|
"@types/base-64": "^1.0.0",
|
|
87
87
|
"@types/chai": "^4.3.20",
|
|
88
88
|
"@types/connect-livereload": "^0.5.32",
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"@types/sinon": "^17.0.4",
|
|
98
98
|
"@types/treeify": "^1.0.3",
|
|
99
99
|
"@types/unzipper": "^0.10.4",
|
|
100
|
+
"@types/yazl": "^3.3.0",
|
|
100
101
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
101
102
|
"@typescript-eslint/parser": "^8.0.0",
|
|
102
103
|
"chai": "^4.5.0",
|
|
@@ -111,6 +112,7 @@
|
|
|
111
112
|
"nyc": "^17.1.0",
|
|
112
113
|
"oclif": "^4.17.34",
|
|
113
114
|
"rimraf": "^6.0.1",
|
|
115
|
+
"semantic-release": "^23.1.1",
|
|
114
116
|
"sinon": "^21.0.0",
|
|
115
117
|
"ts-node": "^10.9.2",
|
|
116
118
|
"tsx": "^4.20.3",
|
|
@@ -120,7 +122,7 @@
|
|
|
120
122
|
"commands": "./lib/commands",
|
|
121
123
|
"dirname": "apimatic",
|
|
122
124
|
"bin": "apimatic",
|
|
123
|
-
"description": "The official CLI for APIMatic. \nTo get started with APIMatic's CLI using a step by step wizard, run 'apimatic
|
|
125
|
+
"description": "The official CLI for APIMatic. \nTo get started with APIMatic's CLI using a step by step wizard, run 'apimatic quickstart'.",
|
|
124
126
|
"hooks": {
|
|
125
127
|
"command_not_found": "./lib/hooks/not-found"
|
|
126
128
|
},
|
|
@@ -139,7 +141,13 @@
|
|
|
139
141
|
"description": "Generate, download and serve an API Documentation portal for your APIs."
|
|
140
142
|
},
|
|
141
143
|
"sdk": {
|
|
142
|
-
"description": "Generate SDKs for your APIs in multiple languages."
|
|
144
|
+
"description": "Generate and publish SDKs for your APIs in multiple languages."
|
|
145
|
+
},
|
|
146
|
+
"publishing": {
|
|
147
|
+
"description": "Manage SDK publishing configurations."
|
|
148
|
+
},
|
|
149
|
+
"publishing:profile": {
|
|
150
|
+
"description": "Manage publishing profiles."
|
|
143
151
|
},
|
|
144
152
|
"portal:toc": {
|
|
145
153
|
"description": "Generate a Table of Contents (TOC) file for your API documentation portal."
|
|
@@ -153,11 +161,12 @@
|
|
|
153
161
|
"*.{js,ts}": "prettier --write"
|
|
154
162
|
},
|
|
155
163
|
"overrides": {
|
|
164
|
+
"diff": "^8.0.4",
|
|
156
165
|
"inflight": "npm:lru-cache@^7.14.1",
|
|
157
166
|
"lodash.get": "npm:lodash@^4.17.21",
|
|
158
167
|
"@humanwhocodes/config-array": "npm:@eslint/config-array@latest",
|
|
159
168
|
"rimraf": "^6.0.1",
|
|
160
|
-
"glob": "^
|
|
169
|
+
"glob": "^13.0.0",
|
|
161
170
|
"q": "npm:promise@^8.3.0"
|
|
162
171
|
}
|
|
163
172
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DirectoryPath } from "./file/directoryPath.js";
|
|
2
|
-
type VersionedBuildValidateResult = {
|
|
3
|
-
isValid: false;
|
|
4
|
-
} | {
|
|
5
|
-
isValid: true;
|
|
6
|
-
versionsDirectory: DirectoryPath;
|
|
7
|
-
versions: string[];
|
|
8
|
-
};
|
|
9
|
-
export declare class VersionedBuildContext {
|
|
10
|
-
private readonly fileService;
|
|
11
|
-
private readonly buildDirectory;
|
|
12
|
-
constructor(buildDirectory: DirectoryPath);
|
|
13
|
-
validate(): Promise<VersionedBuildValidateResult>;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { FileService } from "../infrastructure/file-service.js";
|
|
2
|
-
import { BuildContext } from "./build-context.js";
|
|
3
|
-
export class VersionedBuildContext {
|
|
4
|
-
constructor(buildDirectory) {
|
|
5
|
-
this.fileService = new FileService();
|
|
6
|
-
this.buildDirectory = buildDirectory;
|
|
7
|
-
}
|
|
8
|
-
async validate() {
|
|
9
|
-
var _a;
|
|
10
|
-
const buildContext = new BuildContext(this.buildDirectory);
|
|
11
|
-
if (!(await buildContext.validate())) {
|
|
12
|
-
return { isValid: false };
|
|
13
|
-
}
|
|
14
|
-
const config = await buildContext.getBuildFileContents();
|
|
15
|
-
if (!("generateVersionedPortal" in config)) {
|
|
16
|
-
return { isValid: false };
|
|
17
|
-
}
|
|
18
|
-
const versionsPath = (_a = config.versionsPath) !== null && _a !== void 0 ? _a : "versioned_docs";
|
|
19
|
-
const versionsDirectory = this.buildDirectory.join(versionsPath);
|
|
20
|
-
if (!(await this.fileService.directoryExists(versionsDirectory))) {
|
|
21
|
-
return { isValid: false };
|
|
22
|
-
}
|
|
23
|
-
const versionsDirs = await this.fileService.getSubDirectoriesPaths(versionsDirectory);
|
|
24
|
-
const versions = versionsDirs.map((dir) => dir.leafName());
|
|
25
|
-
return { isValid: true, versionsDirectory, versions };
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=versioned-build-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version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