Skip to content

Commit ec2a409

Browse files
chore(deps): update dependency @redocly/cli to v2 (#1723)
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [@redocly/cli](https://redirect.github.com/Redocly/redocly-cli) | [`^1.27.1` -> `^2.0.0`](https://renovatebot.com/diffs/npm/@redocly%2fcli/1.34.5/2.5.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@redocly%2fcli/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@redocly%2fcli/1.34.5/2.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Redocly/redocly-cli (@&#8203;redocly/cli)</summary> ### [`v2.5.0`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.5.0) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Minor Changes - Added response size to the `Respect` terminal and JSON file outputs. ##### Patch Changes - Updated [@&#8203;redocly/respect-core](https://redirect.github.com/redocly/respect-core) to v2.5.0. ### [`v2.4.0`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.4.0) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Minor Changes - Added the `no-secrets-masking` option to the respect command, allowing raw (unmasked) output to be generated. ##### Patch Changes - Updated [@&#8203;redocly/respect-core](https://redirect.github.com/redocly/respect-core) to v2.4.0. ### [`v2.3.1`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.3.1) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Fixed an issue where JSONPath-based success criteria did not support property names with hyphens in `Respect`. - Updated [@&#8203;redocly/openapi-core](https://redirect.github.com/redocly/openapi-core) to v2.3.1. ### [`v2.3.0`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.3.0) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Minor Changes - Added basic support for **OpenAPI 3.2** specification. ##### Patch Changes - Updated [@&#8203;redocly/openapi-core](https://redirect.github.com/redocly/openapi-core) to v2.3.0. ### [`v2.2.3`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/openapi-core%402.2.3) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Fixed an issue where the Respect workflow separator did not render correctly in GitHub CI environments. ### [`v2.2.2`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/openapi-core%402.2.2) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Resolved an issue with CLI dependencies to ensure proper package resolution. ### [`v2.2.1`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.2.1) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Fixed an issue where the `remove-unused-components` decorator was not functioning when configured at the API level. - Updated [@&#8203;redocly/openapi-core](https://redirect.github.com/redocly/openapi-core) to v2.2.1. ### [`v2.2.0`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.2.0) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Minor Changes - Adjusted the calculation of Respect's workflow-level `totalTimeMs` to sum the network request times of all steps. ##### Patch Changes - Updated [@&#8203;redocly/respect-core](https://redirect.github.com/redocly/respect-core) to v2.2.0. ### [`v2.1.5`](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ### [`v2.1.4`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.1.4) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Fixed undefined variable used in the `remove-unused-components` decorator, which prevented an invalid reference error from being reported. - Updated [@&#8203;redocly/openapi-core](https://redirect.github.com/redocly/openapi-core) to v2.1.4. ### [`v2.1.3`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.1.3) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Updated authentication logic to get the residency from `scorecard.fromProjectUrl`. - Updated [@&#8203;redocly/openapi-core](https://redirect.github.com/redocly/openapi-core) to v2.1.3. ### [`v2.1.2`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.1.2) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Updated [@&#8203;redocly/openapi-core](https://redirect.github.com/redocly/openapi-core) to v2.1.2. ### [`v2.1.1`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.1.1) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Updated [@&#8203;redocly/openapi-core](https://redirect.github.com/redocly/openapi-core) to v2.1.1. ### [`v2.1.0`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.1.0) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Minor Changes - Updated authentication logic to ensure consistency with the VS Code extension's behavior. ##### Patch Changes - Improved error reporting and handling for Digest authentication failures in Respect. Now users receive clearer feedback when required headers or status codes are missing. - Fixed `push` and `push-status` commands mistakenly requiring the `--max-execution-time` option. - Fixed an issue where wildcard file patterns were not recognized in the Docker image. - Updated [@&#8203;redocly/respect-core](https://redirect.github.com/redocly/respect-core) to v2.1.0. ### [`v2.0.8`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.0.8) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Updated [@&#8203;redocly/openapi-core](https://redirect.github.com/redocly/openapi-core) to v2.0.8. ### [`v2.0.7`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.0.7) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Improved Respect verbose logs to display response headers. - Updated [@&#8203;redocly/respect-core](https://redirect.github.com/redocly/respect-core) to v2.0.7. ### [`v2.0.6`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.0.6) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Fixed an issue where files specified in decorators parameters were not always resolved correctly. The resolution logic now properly locates the specified files relative to the config file for `info-description-override`, `media-type-examples-override`, `operation-description-override`, and `tag-description-override` decorators. - Improved messaging to clarify when API alias configuration is implicitly applied during linting or bundling by filename. - Updated the `retryAfter` property in Respect to use seconds (instead of milliseconds) for consistency with the Arazzo specification. - Updated [@&#8203;redocly/openapi-core](https://redirect.github.com/redocly/openapi-core) to v2.0.6. ### [`v2.0.5`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.0.5) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Fixed an issue where the root config was not properly merged with the `apis` config. - Resolved an issue that caused configuration parsing to fail when the config value was set to `null`. - Improved join command server handling for specifications with differing servers. - Updated [@&#8203;redocly/respect-core](https://redirect.github.com/redocly/respect-core) to v2.0.5. ### [`v2.0.4`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.0.4) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Fixed an issue where the `openapi` config options were ignored when running the `build-docs` command. - Ensure `externalRefResolver` option is correctly passed to nested workflow contexts. - Updated [@&#8203;redocly/respect-core](https://redirect.github.com/redocly/respect-core) to v2.0.4. ### [`v2.0.3`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%402.0.3) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Fixed type definitions for Respect `input` and `server` options to support both string and string\[] values. - Fixed binary response data in `Respect` results by properly encoding it as base64. - Updated [@&#8203;redocly/respect-core](https://redirect.github.com/redocly/respect-core) to v2.0.3. ### [`v2.0.2`](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ### [`v2.0.1`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/openapi-core%402.0.1) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Patch Changes - Fixed an issue where the `no-required-schema-properties-undefined` rule incorrectly resolved nested `$ref`s relative to the file in which they were defined. ### [`v2.0.0`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/openapi-core%402.0.0) [Compare Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/[email protected]...@redocly/[email protected]) ##### Major Changes - Removed backward compatibility for the `spec` rule. Use `struct` instead. - Removed support for the deprecated `apiDefinitions` option in the Redocly config. Use `apis` instead. Removed the `labels` field within the `apis` section, which was associated with the legacy Redocly API Registry product. - Replaced the `SpecVersion`, `SpecMajorVersion`, `OPENAPI3_METHOD`, and `OPENAPI3_COMPONENT` enums with types for improved flexibility and type safety. Removed the unused `OasVersion` enum. - Removed support for default config file names other than `redocly.yaml`. - Removed support for the deprecated `features.openapi` and `features.mockServer` configuration options. Use `openapi` and `mockServer` directly instead. - Removed backward compatibility for the deprecated `lint` and `styleguide` options in the Redocly config. Use `rules`, `decorators` and other related options on the root level instead. - Removed the deprecated `disallowAdditionalProperties` option support in rules. Use `allowAdditionalProperties` instead. - Removed support for the deprecated `theme` property of Redocly config. All the properties of `theme` are now available in the config root. - Removed the deprecated `path-excludes-patterns` and `info-license-url` rules. - Removed the deprecated `undefined` assertion. Use `defined` instead. - Removed support for the legacy Redocly API Registry in favor of the new Reunite platform. Reunite provides improved API management capabilities and better integration with Redocly's tooling ecosystem. Migrated the `login` and `push` commands to work exclusively with Reunite. Removed the `preview-docs` command as part of platform modernization. Use the `preview` command instead. - Removed support for the deprecated `referenceDocs` option, which was related to the legacy Reference docs product. - Added support for `extends` bundling and array-based plugin configuration. Fixed the extends order in the configuration. - Removed support for the deprecated `assert/` prefix in configurable rules. Use `rule/` prefix instead. - Migrated the codebase to ES Modules from CommonJS, bringing improved code organization and better support for modern JavaScript features. Update to Node.js version 20.19.0+, 22.12.0+, or 23+. - Streamlined Redocly configuration interfaces for improved developer experience. Removed `StyleguideConfig` class in favor of the unified `Config` class. Removed `getMergedConfig` function - use `Config.forAlias()` method instead to retrieve API-specific configurations. ##### Minor Changes - Added `x-security` extension for Respect that enables secure handling of authentication in Arazzo workflows. Use this extension to: - Define security schemes at the step level using either predefined schemes or inline definitions - Pass values of secrets (passwords, tokens, API keys) - Support multiple authentication types including API Key (query, header, or cookie), Basic Authentication, Bearer Token, Digest Authentication, OAuth2, and OpenID Connect - Automatically transform security parameters into appropriate HTTP headers or query parameters - Added validation for JSON Schema format. - Extracted `nullable` validation from the `struct` rule into a new `nullable-type-sibling` rule for OpenAPI 3.0. This allows users to disable `nullable` validation separately from other structural checks. - Configured the `spec` ruleset for OpenAPI, AsyncAPI, Arazzo, and Overlay specifications. This ruleset is designed to strictly follow the specifications. - Added the `no-duplicated-tag-names` rule to check for duplications in the `tags` field in API descriptions. - Enabled `no-required-schema-properties-undefined`, `no-schema-type-mismatch`, and `no-enum-type-mismatch` rules for **AsyncAPI** and **Arazzo** specifications. Adjusted the rules' severities in the `recommended` and `minimal` rulesets. Refer to the following table: | Rule \ Ruleset | recommended | minimal | | --------------------------------------- | ----------------- | --------------- | | no-required-schema-properties-undefined | `off` -> `warn` | `off` -> `warn` | | no-enum-type-mismatch | `error` | `warn` | | no-schema-type-mismatch | `warn` -> `error` | `off` -> `warn` | ##### Patch Changes - Improved performance of configuration parsing. - Updated [@&#8203;redocly/config](https://redirect.github.com/redocly/config) to v0.26.4. - Updated [@&#8203;redocly/config](https://redirect.github.com/redocly/config) to v0.24.3. - Fixed an issue where the `ignoreLastPathSegment` option of the `path-segment-plural` rule had no effect if the path contained only one segment, resulting in an error. - Fixed plugins validation in config files referenced in the `extends` section. - Refactored `@redocly/respect-core` to eliminate Node.js-specific dependencies, improving cross-platform compatibility. - Updated [@&#8203;redocly/config](https://redirect.github.com/redocly/config) to v0.24.1. - Fixed an issue where the config resolver grouped assertions instead of returning unchanged rules. - Fixed Redocly CLI to correctly read `residency` from the Redocly configuration file. - Fixed incorrect validation logic for the `constructor` property. </details> --- ### Configuration 📅 **Schedule**: Branch creation - "every weekday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/apify/apify-docs). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS40MC4wIiwidXBkYXRlZEluVmVyIjoiNDEuMTQzLjEiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIiLCJsYWJlbHMiOltdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jindřich Bär <[email protected]>
1 parent fb821d3 commit ec2a409

File tree

8 files changed

+281
-387
lines changed

8 files changed

+281
-387
lines changed

apify-api/plugins/apify.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

apify-api/plugins/apify.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import ClientReferencesLinksDecorator from './decorators/client-references-links-decorator.mjs';
2+
import CodeSamplesDecorator from './decorators/code-samples-decorator.mjs';
3+
import LegacyDocUrlDecorator from './decorators/legacy-doc-url-decorator.mjs';
4+
5+
export default () => ({
6+
id: 'apify',
7+
decorators: {
8+
oas3: {
9+
'legacy-doc-url-decorator': LegacyDocUrlDecorator,
10+
'client-references-links-decorator': ClientReferencesLinksDecorator,
11+
'code-samples-decorator': CodeSamplesDecorator,
12+
},
13+
},
14+
});

apify-api/plugins/decorators/client-references-links-decorator.js renamed to apify-api/plugins/decorators/client-references-links-decorator.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function ClientReferencesLinksDecorator(target) {
6363
target.description = `${prepend}${target.description || ''}`;
6464
}
6565

66-
module.exports = () => ({
66+
export default () => ({
6767
// Redocly is using a visitor pattern. What the following code does is that whenever the traverser leaves a node of
6868
// type Tag or Operation, it executes prependLegacyUrlAnchor on it.
6969
Tag: {

apify-api/plugins/decorators/code-samples-decorator.js renamed to apify-api/plugins/decorators/code-samples-decorator.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const { existsSync } = require('node:fs');
2-
const path = require('node:path');
1+
import { existsSync } from 'node:fs';
2+
import path from 'node:path';
33

44
const X_CODE_SAMPLES_PROPERTY = 'x-codeSamples';
55

@@ -31,7 +31,7 @@ function CodeSamplesDecorator(target) {
3131

3232
for (const { lang, label, langSuffix } of LANGUAGES) {
3333
const codeSamplePath = path.join(
34-
__dirname,
34+
import.meta.dirname,
3535
`../../openapi/code_samples/${lang.toLowerCase()}/${operationId}.${langSuffix}`,
3636
);
3737

@@ -55,7 +55,7 @@ function CodeSamplesDecorator(target) {
5555
}
5656
}
5757

58-
module.exports = () => ({
58+
export default () => ({
5959
// Redocly is using a visitor pattern. What the following code does is that whenever the traverser leaves a node of
6060
// type Tag or Operation, it executes CodeSamplesDecorator on it.
6161
Tag: {

apify-api/plugins/decorators/legacy-doc-url-decorator.js renamed to apify-api/plugins/decorators/legacy-doc-url-decorator.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function prependLegacyUrlAnchor(target) {
3737
}
3838
}
3939

40-
module.exports = () => ({
40+
export default () => ({
4141
// Redocly is using a visitor pattern. What the following code does is that whenever the traverser leaves a node of
4242
// type Tag or Operation, it executes prependLegacyUrlAnchor on it.
4343
Tag: {

package-lock.json

Lines changed: 251 additions & 356 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"@docusaurus/theme-common": "^3.8.1",
7272
"@docusaurus/theme-mermaid": "^3.8.1",
7373
"@giscus/react": "^3.0.0",
74-
"@redocly/cli": "^1.27.1",
74+
"@redocly/cli": "^2.0.0",
7575
"@signalwire/docusaurus-plugin-llms-txt": "^1.2.1",
7676
"clsx": "^2.0.0",
7777
"docusaurus-plugin-image-zoom": "^3.0.1",

.redocly.yaml renamed to redocly.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@ extends:
88

99
rules:
1010
# TODO we have quite a lot of errors in there, once we fix them, this should be flipped to `error` too
11-
spec: warn
11+
struct: warn
1212
no-unused-components: error
13+
nullable-type-sibling: warn
1314

14-
theme:
15+
openapi:
1516
htmlTemplate: openapi/docs/index.html
16-
17-
openapi:
18-
expandDefaultResponse: true
19-
expandDefaultRequest: true
20-
expandResponses: all
21-
schemasExpansionLevel: 2
22-
jsonSamplesExpandLevel: 2
17+
expandDefaultResponse: true
18+
expandDefaultRequest: true
19+
expandResponses: all
20+
schemasExpansionLevel: 2
21+
jsonSamplesExpandLevel: 2
2322

2423
plugins:
25-
- apify-api/plugins/apify.js
24+
- apify-api/plugins/apify.mjs
2625

2726
decorators:
2827
apify/legacy-doc-url-decorator: on

0 commit comments

Comments
 (0)