@redocly/cli 0.0.0-snapshot.1740665575 → 0.0.0-snapshot.1741951669
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 +3 -3
- package/lib/__tests__/commands/lint.test.js +1 -1
- package/lib/commands/join.d.ts +1 -1
- package/lib/commands/join.js +2 -1
- package/lib/index.js +1 -0
- package/lib/wrapper.js +3 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -65,8 +65,8 @@ Your API reference docs are in `redoc-static.html` by default.
|
|
|
65
65
|
You can customize this in many ways.
|
|
66
66
|
[Read the main docs](https://redocly.com/docs/cli/commands/build-docs) for more information.
|
|
67
67
|
|
|
68
|
-
> :bulb: Redocly also has [hosted API
|
|
69
|
-
>
|
|
68
|
+
> :bulb: Redocly also has [hosted API management solution](https://redocly.com/reunite/), a (commercial) alternative to Redoc.
|
|
69
|
+
> Redoc, Revel, Reef, and Realm can be worked on locally using the `preview` command.
|
|
70
70
|
|
|
71
71
|
### Bundle multiple OpenAPI documents
|
|
72
72
|
|
|
@@ -95,7 +95,7 @@ Other API Linters use complicated identifiers like JSONPath, but Redocly makes l
|
|
|
95
95
|
You can either use the [built-in rules](https://redocly.com/docs/cli/rules) to mix-and-match your ideal API guidelines, or break out the tools to build your own.
|
|
96
96
|
|
|
97
97
|
**Format the output** in whatever way you need.
|
|
98
|
-
The `stylish` output is as good as it sounds, but if you need JSON
|
|
98
|
+
The `stylish` output is as good as it sounds, but if you need JSON, Markdown, Checkstyle and other outputs to integrate with other tools, the `lint` command can output those too.
|
|
99
99
|
|
|
100
100
|
**Multiple files supported** so you don't need to bundle your API description to lint it; just point Redocly CLI at the "entry point" (e.g.: `openapi.yaml`) and it handles the rest.
|
|
101
101
|
|
|
@@ -36,7 +36,7 @@ describe('handleLint', () => {
|
|
|
36
36
|
afterEach(() => {
|
|
37
37
|
getMergedConfigMock.mockReset();
|
|
38
38
|
});
|
|
39
|
-
describe('loadConfig and
|
|
39
|
+
describe('loadConfig and getEntrypoints stage', () => {
|
|
40
40
|
it('should fail if config file does not exist', async () => {
|
|
41
41
|
await (0, wrapper_1.commandWrapper)(lint_1.handleLint)({ ...argvMock, config: 'config.yaml' });
|
|
42
42
|
expect(miscellaneous_1.exitWithError).toHaveBeenCalledWith('Please provide a valid path to the configuration file.');
|
package/lib/commands/join.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export type JoinOptions = {
|
|
|
8
8
|
'without-x-tag-groups'?: boolean;
|
|
9
9
|
output?: string;
|
|
10
10
|
} & VerifyConfigOptions;
|
|
11
|
-
export declare function handleJoin({ argv, config, version: packageVersion, }: CommandArgs<JoinOptions>): Promise<void>;
|
|
11
|
+
export declare function handleJoin({ argv, config, version: packageVersion, collectSpecData, }: CommandArgs<JoinOptions>): Promise<void>;
|
package/lib/commands/join.js
CHANGED
|
@@ -13,7 +13,7 @@ const split_1 = require("./split");
|
|
|
13
13
|
const Tags = 'tags';
|
|
14
14
|
const xTagGroups = 'x-tagGroups';
|
|
15
15
|
let potentialConflictsTotal = 0;
|
|
16
|
-
async function handleJoin({ argv, config, version: packageVersion, }) {
|
|
16
|
+
async function handleJoin({ argv, config, version: packageVersion, collectSpecData, }) {
|
|
17
17
|
const startedAt = perf_hooks_1.performance.now();
|
|
18
18
|
const { 'prefix-components-with-info-prop': prefixComponentsWithInfoProp, 'prefix-tags-with-filename': prefixTagsWithFilename, 'prefix-tags-with-info-prop': prefixTagsWithInfoProp, 'without-x-tag-groups': withoutXTagGroups, output, } = argv;
|
|
19
19
|
const usedTagsOptions = [
|
|
@@ -65,6 +65,7 @@ async function handleJoin({ argv, config, version: packageVersion, }) {
|
|
|
65
65
|
for (const document of documents) {
|
|
66
66
|
try {
|
|
67
67
|
const version = (0, openapi_core_1.detectSpec)(document.parsed);
|
|
68
|
+
collectSpecData?.(document.parsed);
|
|
68
69
|
if (version !== openapi_core_1.SpecVersion.OAS3_0 && version !== openapi_core_1.SpecVersion.OAS3_1) {
|
|
69
70
|
return (0, miscellaneous_1.exitWithError)(`Only OpenAPI 3.0 and OpenAPI 3.1 are supported: ${(0, colorette_1.blue)(document.source.absoluteRef)}.`);
|
|
70
71
|
}
|
package/lib/index.js
CHANGED
package/lib/wrapper.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/cli",
|
|
3
|
-
"version": "0.0.0-snapshot.
|
|
3
|
+
"version": "0.0.0-snapshot.1741951669",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"Roman Hotsiy <roman@redocly.com> (https://redocly.com/)"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@redocly/config": "^0.
|
|
41
|
-
"@redocly/openapi-core": "0.0.0-snapshot.
|
|
42
|
-
"@redocly/respect-core": "0.0.0-snapshot.
|
|
40
|
+
"@redocly/config": "^0.22.0",
|
|
41
|
+
"@redocly/openapi-core": "0.0.0-snapshot.1741951669",
|
|
42
|
+
"@redocly/respect-core": "0.0.0-snapshot.1741951669",
|
|
43
43
|
"abort-controller": "^3.0.0",
|
|
44
44
|
"chokidar": "^3.5.1",
|
|
45
45
|
"colorette": "^1.2.0",
|