@redocly/redoc-reef 0.140.0-next.4 → 0.140.0-next.6
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 +57 -0
- package/dist/cli/generate/get-schema-template.js +1 -1
- package/dist/client/app/hooks/markdown/useMarkdocRenderer.js +1 -1
- package/dist/client/app/hooks/markdown/useMarkdownText.js +1 -1
- package/dist/client/app/markdoc/custom-components/openapi/use-markdown-adapter.d.ts +1 -33
- package/dist/compiled/@redocly/pii/index.js +1 -0
- package/dist/compiled/@redocly/pii/package.json +1 -0
- package/dist/markdoc/attributes/definition-path.d.ts +1 -1
- package/dist/markdoc/attributes/json-example-ref.d.ts +1 -1
- package/dist/markdoc/attributes/json-schema-ref.d.ts +1 -1
- package/dist/markdoc/attributes/parsed-yaml.d.ts +1 -1
- package/dist/markdoc/attributes/raw-content.d.ts +1 -1
- package/dist/markdoc/attributes/sample-from-json-schema.d.ts +1 -1
- package/dist/markdoc/helpers/extract-rbac-from-condition-node.d.ts +1 -1
- package/dist/markdoc/helpers/get-inner-text.d.ts +1 -1
- package/dist/markdoc/helpers/get-node-attribute.d.ts +1 -1
- package/dist/markdoc/helpers/get-variable.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-conditional-node.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-function.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-node.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-prompt-node.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-tag.d.ts +1 -1
- package/dist/markdoc/helpers/guards/is-variable.d.ts +1 -1
- package/dist/markdoc/helpers/parse-partials.d.ts +1 -1
- package/dist/markdoc/helpers/parse-partials.js +1 -1
- package/dist/markdoc/helpers/remove-markdoc-tags.js +1 -1
- package/dist/markdoc/helpers/set-node-attribute-value.d.ts +1 -1
- package/dist/markdoc/nodes/fence/index.d.ts +1 -1
- package/dist/markdoc/nodes/fence/index.js +1 -1
- package/dist/markdoc/nodes/gfm-list-item.d.ts +1 -1
- package/dist/markdoc/nodes/gfm-list-item.js +1 -1
- package/dist/markdoc/nodes/heading.d.ts +1 -1
- package/dist/markdoc/nodes/heading.js +1 -1
- package/dist/markdoc/nodes/index.d.ts +6 -165
- package/dist/markdoc/nodes/index.js +1 -1
- package/dist/markdoc/nodes/table.d.ts +1 -1
- package/dist/markdoc/nodes/table.js +1 -1
- package/dist/markdoc/nodes/text.d.ts +1 -1
- package/dist/markdoc/tags/json-example.js +1 -1
- package/dist/server/esbuild/plugins/dependency-resolver.js +1 -1
- package/dist/server/plugins/api-docs/loader.d.ts +1 -1
- package/dist/server/plugins/config-parser/loaders/utils/read-and-validate-config.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/code-walkthrough/filesets-resolver.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/helpers/load-openapi-bundle.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/index.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-code-snippet-from-file.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-diagram-from-file.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-html-href.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-html-source-attribute.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-gallery.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-src-set.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-src.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-json-example-ref.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-json-schema-ref.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-link.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-native-md-link.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-nav-links.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-open-api-ref.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-openapi-code-samples.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-openapi-response-samples.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-parsed-yaml.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-raw-content.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-relative-or-cdn-icon.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-relative-path.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-sample-from-json-schema.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-svg-content.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-tag-raw-content.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-tag-raw-content.js +2 -2
- package/dist/server/plugins/markdown/attribute-resolvers/utils.d.ts +1 -1
- package/dist/server/plugins/markdown/compiler.d.ts +1 -1
- package/dist/server/plugins/markdown/compiler.js +1 -1
- package/dist/server/plugins/markdown/errors.d.ts +1 -1
- package/dist/server/plugins/markdown/get-server-props.js +1 -1
- package/dist/server/plugins/markdown/html/normalize-html-headings.d.ts +1 -1
- package/dist/server/plugins/markdown/html/normalize-html-headings.js +1 -1
- package/dist/server/plugins/markdown/markdoc/functions/concat.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/markdoc-options.d.ts +5 -165
- package/dist/server/plugins/markdown/markdoc/markdoc-options.js +1 -1
- package/dist/server/plugins/markdown/markdoc/partials.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/plugins/headings.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/plugins/utils.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/reparse-example-fences.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/reparse-example-fences.js +1 -1
- package/dist/server/plugins/markdown/runtime-transform.d.ts +2 -2
- package/dist/server/plugins/markdown/runtime-transform.js +1 -1
- package/dist/server/plugins/markdown/search/get-ai-search-documents.js +1 -1
- package/dist/server/plugins/markdown/search/nodes/section-node.d.ts +1 -1
- package/dist/server/plugins/markdown/search/search-resolver.js +1 -1
- package/dist/server/plugins/markdown/search/to-markdown.d.ts +1 -1
- package/dist/server/plugins/markdown/search/walk-sections.d.ts +1 -1
- package/dist/server/plugins/markdown/search/walk-sections.js +1 -1
- package/dist/server/plugins/markdown/utils/stringify-tag-children-objects.d.ts +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/graphql/get-graphql-type-list.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/graphql/list-graphql-apis.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/graphql/types.d.ts +4 -4
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/list-apis.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/types.d.ts +2 -2
- package/dist/server/store.d.ts +1 -1
- package/dist/server/store.js +1 -1
- package/dist/server/tools/notifiers/formatter.js +3 -3
- package/dist/server/types/plugins/common.d.ts +1 -1
- package/dist/server/utils/codeframes/codeframes.d.ts +1 -1
- package/dist/server/utils/codeframes/yaml-ast.d.ts +1 -1
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/markdoc.d.ts +1 -1
- package/package.json +8 -8
- package/dist/server/plugins/markdown/html/html-jsx-attribute-mapping.d.ts +0 -6
- package/dist/server/plugins/markdown/html/html-jsx-attribute-mapping.js +0 -1
- package/dist/server/plugins/markdown/html/process-html-tokens.d.ts +0 -2
- package/dist/server/plugins/markdown/html/process-html-tokens.js +0 -1
- package/dist/server/plugins/markdown/source.d.ts +0 -4
- package/dist/server/plugins/markdown/source.js +0 -1
- package/dist/server/tools/notifiers/helpers/privacy/mask-email.d.ts +0 -25
- package/dist/server/tools/notifiers/helpers/privacy/mask-email.js +0 -1
- package/dist/server/tools/notifiers/helpers/privacy/mask-subject.d.ts +0 -13
- package/dist/server/tools/notifiers/helpers/privacy/mask-subject.js +0 -1
- package/dist/server/tools/notifiers/helpers/privacy/remove-pii-from-url.d.ts +0 -25
- package/dist/server/tools/notifiers/helpers/privacy/remove-pii-from-url.js +0 -1
- package/dist/server/tools/notifiers/helpers/privacy/remove-pii.d.ts +0 -36
- package/dist/server/tools/notifiers/helpers/privacy/remove-pii.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# @redocly/redoc-reef
|
|
2
2
|
|
|
3
|
+
## 0.140.0-next.6
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5b82f282c92: Deprecated the `mcp.docs` config object and moved its options to `mcp`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- bed4a5f394a: Fixed an issue where C# request samples in OpenAPI docs sent number, boolean, and `null` values from the request body example as strings.
|
|
12
|
+
C# request samples also compile when the example contains strings with quotes, backslashes, or line breaks, or empty, nested, or mixed-type arrays.
|
|
13
|
+
- 4e12a3d89f3: Improved server-side rendering performance for OpenAPI reference pages with heavily reused schemas.
|
|
14
|
+
- 185f2658cab: Fixed an issue in OpenAPI docs where request and response samples were empty when a discriminator option's property referenced part of another schema.
|
|
15
|
+
- b4ba4341a95: Updated `@redocly/openapi-core` to version `2.71.1`.
|
|
16
|
+
- ff91adf1e0d: Fixed security vulnerabilities `GHSA-cg2g-xh64-v4q7`, `GHSA-mrv2-3pqr-j5jr` and `GHSA-c6gr-qvv4-5v3f` by upgrading `dompurify` to version `3.4.17`.
|
|
17
|
+
- 725184fbef9: Fixed an issue where the Docs MCP setup snippets gave every site without `mcp.docs.name` the same server name, which caused a name conflict in the MCP client when users connected more than one site.
|
|
18
|
+
If `mcp.docs.name` is not set, the server name is based on the site's domain.
|
|
19
|
+
- 2f973409954: Fixed the `connect-mcp` tag so it no longer displays a connect button on sites that don't serve an MCP server.
|
|
20
|
+
- 22cd58473a8: Fixed an issue in the **Try it** console where the edited request body was replaced with the documented example when the content type changed.
|
|
21
|
+
For example, when users switched from JSON to XML and back.
|
|
22
|
+
- Updated dependencies [bed4a5f394a]
|
|
23
|
+
- Updated dependencies [4e12a3d89f3]
|
|
24
|
+
- Updated dependencies [185f2658cab]
|
|
25
|
+
- Updated dependencies [b4ba4341a95]
|
|
26
|
+
- Updated dependencies [ff91adf1e0d]
|
|
27
|
+
- Updated dependencies [725184fbef9]
|
|
28
|
+
- Updated dependencies [2f973409954]
|
|
29
|
+
- @redocly/api-docs@0.5.0-next.4
|
|
30
|
+
- @redocly/theme@0.72.0-next.3
|
|
31
|
+
- @redocly/portal-plugin-mock-server@0.25.0-next.1
|
|
32
|
+
|
|
33
|
+
## 0.140.0-next.5
|
|
34
|
+
|
|
35
|
+
### Minor Changes
|
|
36
|
+
|
|
37
|
+
- 1427a7a148b: Added support for GitHub alert syntax in Markdown pages: `> [!NOTE]`, `> [!TIP]`, `> [!IMPORTANT]`, `> [!WARNING]`, and `> [!CAUTION]` render as admonitions.
|
|
38
|
+
- 1427a7a148b: Switched Markdoc to `@redocly/markdoc`, Redocly's fork of Markdoc.
|
|
39
|
+
Custom tags that import from `@markdoc/markdoc` keep working.
|
|
40
|
+
- fe438812a35: Added the `alt` attribute to the `inline-svg` Markdoc tag, which gives the SVG an accessible name for people who use assistive technologies.
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- 193788e3f12: Fixed an issue in API docs where content shifted on load when users opened a direct link to an operation or a tag.
|
|
45
|
+
- 6ede6bd88ca: Fixed an issue where the mock server returned values from earlier requests in later responses.
|
|
46
|
+
- a879730b94d: Fixed an issue where API docs displayed error on pages translated with the browser translation feature.
|
|
47
|
+
- 1427a7a148b: Fixed raw HTML in Markdown pages and API descriptions: boolean attributes such as `<details open>` take effect, and `style` values that contain semicolons, such as data URLs, are kept.
|
|
48
|
+
- b363f7119d0: Fixed an issue in the **Try it** console in OpenAPI docs where the **History** tab listed requests by path instead of operation name.
|
|
49
|
+
- Updated dependencies [193788e3f12]
|
|
50
|
+
- Updated dependencies [1427a7a148b]
|
|
51
|
+
- Updated dependencies [a879730b94d]
|
|
52
|
+
- Updated dependencies [1427a7a148b]
|
|
53
|
+
- Updated dependencies [1427a7a148b]
|
|
54
|
+
- Updated dependencies [abe82fc0fc2]
|
|
55
|
+
- Updated dependencies [fe438812a35]
|
|
56
|
+
- @redocly/api-docs@0.5.0-next.3
|
|
57
|
+
- @redocly/theme@0.72.0-next.2
|
|
58
|
+
- @redocly/portal-plugin-mock-server@0.25.0-next.0
|
|
59
|
+
|
|
3
60
|
## 0.140.0-next.4
|
|
4
61
|
|
|
5
62
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import{useMemo as n}from"react";import m from"@
|
|
1
|
+
import*as t from"react";import{useMemo as n}from"react";import m from"@redocly/markdoc";import{components as s}from"@redocly-markdoc/components";import{components as p}from"@redocly/theme/markdoc/default";import{isTag as c}from"../../../../markdoc/helpers/guards/is-tag";const d=r=>n(()=>{if(!r)return null;let o;if(typeof r=="string")try{o=JSON.parse(r)}catch(e){return console.error("Error parsing AST string:",e),null}else o=r;return c(o)?m.renderers.react(o,t,{components:{...globalThis.__LOADER?.markdocComponents,...p,...s}}):null},[r]);export{d as useMarkdocRenderer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import m,{useMemo as h}from"react";import{parse as p,transform as u,renderers as b,Tag as g,nodes as d}from"@
|
|
1
|
+
import m,{useMemo as h}from"react";import{parse as p,transform as u,renderers as b,Tag as g,nodes as d}from"@redocly/markdoc";import{CodeBlock as k}from"@redocly/theme/components/CodeBlock/CodeBlock";import{tags as C,components as y}from"@redocly/theme/markdoc/default";const N=Object.fromEntries(Object.entries(y).filter(([,t])=>typeof t=="function")),T=t=>/\{%\s*(?:\/?\w+(?:-\w+)*|\/)(?:\s[^%]*)?(?:\/%|%\})/.test(t),w=(t,e)=>{try{const r=u(t,e);return Array.isArray(r)?r:[r]}catch(r){console.error("Error transforming node:",r)}return[]},l=(t,e,r,n)=>new g("CodeBlock",{...t,header:{title:n,controls:{copy:{}}},source:e,lang:r},[]),A=(t,e)=>{const r=t.transformAttributes(e),n=r["data-language"]||"markdoc",c=r["data-title"],o=t.attributes.content||"",a=l(r,o,n,c),s=[];if(!t.children||t.children.length<=1)return{codeNode:a,contentNodes:s};for(const i of t.children){if(!i)continue;const f=w(i,e);s.push(...f)}return{codeNode:a,contentNodes:s}},F=(t,e)=>{const r=t.transformAttributes(e),n=r["data-language"],c=r["data-title"],o=t.attributes.content||"";if(!T(o)||!t.children||t.children.length===0)return l(r,o,n,c);const a=t.children[0];if(!a||a.type!=="tag")return l(r,o,n,c);const{codeNode:s,contentNodes:i}=A(t,e);return new g("Fragment",{},[s,...i])},x=t=>h(()=>{if(!t)return null;const r=p(t),n=u(r,{tags:C,nodes:{document:{...d.document,render:"div"},fence:{...d.fence,attributes:{...d.fence.attributes,label:{type:String,render:"data-label"},title:{type:String,render:"data-title"},highlight:{type:String,render:"data-highlight"}},transform:F}}});return b.react(n,m,{components:{...N,CodeBlock:k,Fragment:m.Fragment}})},[t]);export{T as containsMarkdocTags,x as useMarkdownText};
|
|
@@ -3,39 +3,7 @@ import { MarkdownLink } from '@redocly/theme/markdoc/components/MarkdownLink/Mar
|
|
|
3
3
|
/** Routes description links through portal `Link` (path prefix, locale, etc.). */
|
|
4
4
|
export declare const markdocOptions: {
|
|
5
5
|
nodes: {
|
|
6
|
-
link:
|
|
7
|
-
attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute>;
|
|
8
|
-
slots?: Record<string, import("@markdoc/markdoc").SchemaSlot>;
|
|
9
|
-
selfClosing?: boolean;
|
|
10
|
-
inline?: boolean;
|
|
11
|
-
transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
12
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
13
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
14
|
-
variables: Record<string, any>;
|
|
15
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
16
|
-
partials: Record<string, any>;
|
|
17
|
-
validation?: {
|
|
18
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
19
|
-
validateFunctions?: boolean;
|
|
20
|
-
environment?: string;
|
|
21
|
-
};
|
|
22
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
|
|
23
|
-
validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
24
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
25
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
26
|
-
variables: Record<string, any>;
|
|
27
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
28
|
-
partials: Record<string, any>;
|
|
29
|
-
validation?: {
|
|
30
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
31
|
-
validateFunctions?: boolean;
|
|
32
|
-
environment?: string;
|
|
33
|
-
};
|
|
34
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
|
|
35
|
-
description?: string;
|
|
36
|
-
render: string;
|
|
37
|
-
children: string[];
|
|
38
|
-
};
|
|
6
|
+
link: import("@markdoc/markdoc").Schema;
|
|
39
7
|
};
|
|
40
8
|
components: {
|
|
41
9
|
MarkdownLink: typeof MarkdownLink;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var v=(i,l)=>()=>{try{return l||i((l={exports:{}}).exports,l),l.exports}catch(c){throw l=0,c}},g=v(i=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.maskSubject=i.maskEmail=void 0;var l=t=>{if(!t||typeof t!="string"||!t.includes("@"))return t;let[e="",r]=t.split("@");return`${e.length>2?e.slice(0,2)+"*".repeat(e.length-2):"*".repeat(e.length)}@${r}`};i.maskEmail=l;var c=/[a-zA-Z0-9._%+-]/,b=/^[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/,s=t=>{var e;let r="",a=0,n=0;for(;n<t.length;){let d=t.indexOf("@",n);if(d===-1)break;let o=d;for(;o>a&&c.test(t.charAt(o-1));)o--;let p=o<d?(e=b.exec(t.slice(d+1)))===null||e===void 0?void 0:e[0]:void 0;if(!p){n=d+1;continue}let m=d+1+p.length;r+=t.slice(a,o)+(0,i.maskEmail)(t.slice(o,m)),a=m,n=m}return r+t.slice(a)};i.maskSubject=s}),h=v(i=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.removePii=s,i.removePiiFromUrl=t;var l={email:{pattern:/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,replacement:"[email_removed]"},phone:{pattern:/(?:\+?1[-.\s]?)?\(?([0-9]{3})\)?[-.\s]?([0-9]{3})[-.\s]?([0-9]{4})(?:\s?(?:ext|x|extension)\.?\s?(\d+))?/g,replacement:"[phone_removed]"},ssn:{pattern:/\b(?!000|666|9\d{2})\d{3}-?(?!00)\d{2}-?(?!0000)\d{4}\b/g,replacement:"[SSN_removed]"},creditCard:{pattern:/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}\b/g,replacement:"[credit_card_removed]"},address:{pattern:/\b\d+\s[A-Za-z0-9\s,.-]+(?:Street|St|Avenue|Ave|Road|Rd|Boulevard|Blvd|Lane|Ln|Drive|Dr|Court|Ct|Circle|Cir|Way|Place|Pl|Parkway|Pkwy|Terrace|Ter)\b/gi,replacement:"[address_removed]"},passport:{pattern:/\b[A-Z]{2}[0-9]{7}\b/g,replacement:"[passport_number_removed]"},driversLicense:{pattern:/\b[A-Z]{1,2}[0-9]{6,9}\b/g,replacement:"[driver_license_removed]"},zipCode:{pattern:/(?<!\d-)\b\d{5}(?:-\d{4})?\b(?!-\d)/g,replacement:"[zip_code_removed]"},bankAccount:{pattern:/\b\d{8,17}\b/g,replacement:"[bank_account_removed]"},dateOfBirth:{pattern:/\b(?:0[1-9]|1[0-2])[-/](?:0[1-9]|[12][0-9]|3[01])[-/](?:19|20)\d{2}\b/g,replacement:"[date_removed]"}};function c(e){return typeof e=="string"}function b(e={}){let r={email:{enabled:!0,replacement:"[email_removed]"},phone:{enabled:!0,replacement:"[phone_removed]"},ssn:{enabled:!0,replacement:"[SSN_removed]"},creditCard:{enabled:!0,replacement:"[credit_card_removed]"},address:{enabled:!0,replacement:"[address_removed]"},passport:{enabled:!0,replacement:"[passport_number_removed]"},driversLicense:{enabled:!0,replacement:"[driver_license_removed]"},zipCode:{enabled:!0,replacement:"[zip_code_removed]"},bankAccount:{enabled:!0,replacement:"[bank_account_removed]"},dateOfBirth:{enabled:!0,replacement:"[date_removed]"}};for(let[a,n]of Object.entries(e))r[a]?r[a]=Object.assign(Object.assign({},r[a]),n):r[a]=n;return r}function s(e,r={}){if(!c(e))return e;let a=b(r),n=e;for(let[d,o]of Object.entries(a)){if(!o.enabled)continue;let p=l[d],m=p?.pattern||o.pattern,f=o.replacement||p?.replacement||"[PII removed]";m&&(n=n.replace(m,f))}return n}function t(e){if(!c(e))return e;try{let r=new URL(e,"http://example.com");for(let[a,n]of r.searchParams.entries()){let d=String(s(n));r.searchParams.set(a,d)}return e.startsWith("http://")||e.startsWith("https://")?r.toString():r.pathname+r.search+r.hash}catch{return String(s(e))}}});Object.defineProperty(exports,"__esModule",{value:!0}),exports.removePiiFromUrl=exports.removePii=exports.maskSubject=exports.maskEmail=void 0;var u=g();Object.defineProperty(exports,"maskEmail",{enumerable:!0,get:function(){return u.maskEmail}}),Object.defineProperty(exports,"maskSubject",{enumerable:!0,get:function(){return u.maskSubject}});var _=h();Object.defineProperty(exports,"removePii",{enumerable:!0,get:function(){return _.removePii}}),Object.defineProperty(exports,"removePiiFromUrl",{enumerable:!0,get:function(){return _.removePiiFromUrl}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"@redocly/pii","main":"index.js"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomAttributeTypeInterface, ValidationError } from '@
|
|
1
|
+
import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
|
|
2
2
|
export declare class DefinitionPath implements CustomAttributeTypeInterface {
|
|
3
3
|
validate(_value: string): ValidationError[];
|
|
4
4
|
static resolver: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomAttributeTypeInterface, ValidationError } from '@
|
|
1
|
+
import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
|
|
2
2
|
export declare class JsonExampleRef implements CustomAttributeTypeInterface {
|
|
3
3
|
validate(_value: string): ValidationError[];
|
|
4
4
|
static resolver: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomAttributeTypeInterface, ValidationError } from '@
|
|
1
|
+
import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
|
|
2
2
|
export declare class JsonSchemaRef implements CustomAttributeTypeInterface {
|
|
3
3
|
validate(_value: string): ValidationError[];
|
|
4
4
|
static resolver: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomAttributeTypeInterface, ValidationError } from '@
|
|
1
|
+
import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
|
|
2
2
|
export declare class ParsedYaml implements CustomAttributeTypeInterface {
|
|
3
3
|
validate(_value: string): ValidationError[];
|
|
4
4
|
static resolver: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomAttributeTypeInterface, ValidationError } from '@
|
|
1
|
+
import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
|
|
2
2
|
export declare class RawContent implements CustomAttributeTypeInterface {
|
|
3
3
|
validate(_value: string): ValidationError[];
|
|
4
4
|
static resolver: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomAttributeTypeInterface, ValidationError } from '@
|
|
1
|
+
import type { CustomAttributeTypeInterface, ValidationError } from '@redocly/markdoc';
|
|
2
2
|
export declare class SampleFromJsonSchema implements CustomAttributeTypeInterface {
|
|
3
3
|
validate(_value: string): ValidationError[];
|
|
4
4
|
static resolver: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Function, Node, RenderableTreeNode, Variable } from '@
|
|
1
|
+
import type { Function, Node, RenderableTreeNode, Variable } from '@redocly/markdoc';
|
|
2
2
|
import type { GetInnerContentFnOptions } from '../../types/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Extracts and concatenates the inner text content from a tree of renderable nodes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ast as i}from"@
|
|
1
|
+
import{Ast as i}from"@redocly/markdoc";function o(r){if(r)return Object.entries(r).reduce((e,[t,n])=>(e[t]=i.fromJSON(JSON.stringify(n)),e),{})}export{o as parsePartials};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n from"@
|
|
1
|
+
import n from"@redocly/markdoc";import{skipAgentsOnlyContent as e}from"@redocly/theme/markdoc/tags/visibility";import{getInnerText as t}from"./get-inner-text.js";function a(r){if(!r)return r;const o=n.parse(r);return t([o],{renderTag:e})}export{a as removeMarkdocTags};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import a from"@
|
|
1
|
+
import a from"@redocly/markdoc";import{EXAMPLE_CONTENT_ATTRIBUTE as m}from"@redocly/theme/core/constants";import{isPrimitive as f}from"../../../utils/guards/is-primitive.js";import{isStringNode as o}from"../../helpers/guards/is-string-node.js";import{isTag as u}from"../../helpers/guards/is-tag.js";const g=a.nodes.fence,y={...g,attributes:{...g.attributes,label:{type:String,render:"data-label"},title:{type:String,render:"data-title"},highlight:{type:String,render:"data-highlight"},align:{type:String,matches:["left","center","right"]},width:{type:String},[m]:{type:Object,render:!1}},transform(e,s){const r=e.transformAttributes(s);let t=e.transformChildren(s);const n=r["data-language"],l=r["data-title"];switch(e.attributes.process===!1&&(t=[e.attributes.content]),n){case"mermaid":case"excalidraw":case"plantuml":return o(t[0])?new a.Tag("Diagram",{...r,diagramType:n,diagramSource:t[0]},t):new a.Tag(e.tag,r,t);default:{const c=t.map(i=>f(i)?i.toString():u(i)?i?.attributes?.rawtag:"").join("");return o(t[0])?new a.Tag("CodeBlock",{...r,header:{title:l,controls:{copy:{}}},source:c,lang:n},[]):new a.Tag(e.tag,r,t)}}}};export{y as fence};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@
|
|
1
|
+
import r from"@redocly/markdoc";import{isStringNode as n}from"../helpers/guards/is-string-node.js";const o=r.nodes.item,a=e=>e.match(/^\[[x ]\]/i),c=e=>!e.startsWith("[ ]"),h={...o,transform(e,s){const i=e.transformAttributes(s);let t=e.transformChildren(s);return n(t[0])&&a(t[0])&&(t=[new r.Tag("input",{checked:c(t[0]),type:"checkbox",readOnly:!0},[]),t[0].substring(3),...t.slice(1)]),new r.Tag("li",i,t)}};export{h as item};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import s from"@
|
|
1
|
+
import s from"@redocly/markdoc";import{slugger as l}from"../../utils/slugger.js";import{getInnerText as a}from"../helpers/get-inner-text.js";const d={children:["inline"],attributes:{id:{type:String},level:{type:Number,required:!0,default:1},__idx:{type:Number}},transform(e,r){const t=e.transformAttributes(r),i=e.transformChildren(r),n=typeof t.id=="string"?t.id:l.slug(a(i),{replaceDots:!0,replaceSlashes:!0});return new s.Tag("Heading",{...t,id:n,level:e.attributes.level},i)}};export{d as heading};
|
|
@@ -1,171 +1,12 @@
|
|
|
1
|
+
import type { Schema } from '@redocly/markdoc';
|
|
1
2
|
export * from './gfm-list-item.js';
|
|
2
3
|
export * from './heading.js';
|
|
3
4
|
export * from './fence/index.js';
|
|
4
5
|
export * from './table.js';
|
|
5
6
|
export * from './text.js';
|
|
6
|
-
export declare const strong:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
inline?: boolean;
|
|
12
|
-
transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
13
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
14
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
15
|
-
variables: Record<string, any>;
|
|
16
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
17
|
-
partials: Record<string, any>;
|
|
18
|
-
validation?: {
|
|
19
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
20
|
-
validateFunctions?: boolean;
|
|
21
|
-
environment?: string;
|
|
22
|
-
};
|
|
23
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
|
|
24
|
-
validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
25
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
26
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
27
|
-
variables: Record<string, any>;
|
|
28
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
29
|
-
partials: Record<string, any>;
|
|
30
|
-
validation?: {
|
|
31
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
32
|
-
validateFunctions?: boolean;
|
|
33
|
-
environment?: string;
|
|
34
|
-
};
|
|
35
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
|
|
36
|
-
description?: string;
|
|
37
|
-
children: string[];
|
|
38
|
-
};
|
|
39
|
-
export declare const em: {
|
|
40
|
-
render?: string | undefined;
|
|
41
|
-
attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute>;
|
|
42
|
-
slots?: Record<string, import("@markdoc/markdoc").SchemaSlot>;
|
|
43
|
-
selfClosing?: boolean;
|
|
44
|
-
inline?: boolean;
|
|
45
|
-
transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
46
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
47
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
48
|
-
variables: Record<string, any>;
|
|
49
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
50
|
-
partials: Record<string, any>;
|
|
51
|
-
validation?: {
|
|
52
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
53
|
-
validateFunctions?: boolean;
|
|
54
|
-
environment?: string;
|
|
55
|
-
};
|
|
56
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
|
|
57
|
-
validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
58
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
59
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
60
|
-
variables: Record<string, any>;
|
|
61
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
62
|
-
partials: Record<string, any>;
|
|
63
|
-
validation?: {
|
|
64
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
65
|
-
validateFunctions?: boolean;
|
|
66
|
-
environment?: string;
|
|
67
|
-
};
|
|
68
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
|
|
69
|
-
description?: string;
|
|
70
|
-
children: string[];
|
|
71
|
-
};
|
|
72
|
-
export declare const s: {
|
|
73
|
-
render?: string | undefined;
|
|
74
|
-
attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute>;
|
|
75
|
-
slots?: Record<string, import("@markdoc/markdoc").SchemaSlot>;
|
|
76
|
-
selfClosing?: boolean;
|
|
77
|
-
inline?: boolean;
|
|
78
|
-
transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
79
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
80
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
81
|
-
variables: Record<string, any>;
|
|
82
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
83
|
-
partials: Record<string, any>;
|
|
84
|
-
validation?: {
|
|
85
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
86
|
-
validateFunctions?: boolean;
|
|
87
|
-
environment?: string;
|
|
88
|
-
};
|
|
89
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
|
|
90
|
-
validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
91
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
92
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
93
|
-
variables: Record<string, any>;
|
|
94
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
95
|
-
partials: Record<string, any>;
|
|
96
|
-
validation?: {
|
|
97
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
98
|
-
validateFunctions?: boolean;
|
|
99
|
-
environment?: string;
|
|
100
|
-
};
|
|
101
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
|
|
102
|
-
description?: string;
|
|
103
|
-
children: string[];
|
|
104
|
-
};
|
|
105
|
-
export declare const link: {
|
|
106
|
-
attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute>;
|
|
107
|
-
slots?: Record<string, import("@markdoc/markdoc").SchemaSlot>;
|
|
108
|
-
selfClosing?: boolean;
|
|
109
|
-
inline?: boolean;
|
|
110
|
-
transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
111
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
112
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
113
|
-
variables: Record<string, any>;
|
|
114
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
115
|
-
partials: Record<string, any>;
|
|
116
|
-
validation?: {
|
|
117
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
118
|
-
validateFunctions?: boolean;
|
|
119
|
-
environment?: string;
|
|
120
|
-
};
|
|
121
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
|
|
122
|
-
validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
123
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
124
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
125
|
-
variables: Record<string, any>;
|
|
126
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
127
|
-
partials: Record<string, any>;
|
|
128
|
-
validation?: {
|
|
129
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
130
|
-
validateFunctions?: boolean;
|
|
131
|
-
environment?: string;
|
|
132
|
-
};
|
|
133
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
|
|
134
|
-
description?: string;
|
|
135
|
-
render: string;
|
|
136
|
-
children: string[];
|
|
137
|
-
};
|
|
138
|
-
export declare const document: {
|
|
139
|
-
render?: string | undefined;
|
|
140
|
-
attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute>;
|
|
141
|
-
slots?: Record<string, import("@markdoc/markdoc").SchemaSlot>;
|
|
142
|
-
selfClosing?: boolean;
|
|
143
|
-
inline?: boolean;
|
|
144
|
-
transform?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
145
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
146
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
147
|
-
variables: Record<string, any>;
|
|
148
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
149
|
-
partials: Record<string, any>;
|
|
150
|
-
validation?: {
|
|
151
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
152
|
-
validateFunctions?: boolean;
|
|
153
|
-
environment?: string;
|
|
154
|
-
};
|
|
155
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").RenderableTreeNodes>;
|
|
156
|
-
validate?(node: import("@markdoc/markdoc").Node, config: Readonly<Partial<{
|
|
157
|
-
nodes: Partial<Record<import("@markdoc/markdoc").NodeType, import("@markdoc/markdoc").Schema<Partial</*elided*/ any>, string>>>;
|
|
158
|
-
tags: Record<string, import("@markdoc/markdoc").Schema>;
|
|
159
|
-
variables: Record<string, any>;
|
|
160
|
-
functions: Record<string, import("@markdoc/markdoc").ConfigFunction>;
|
|
161
|
-
partials: Record<string, any>;
|
|
162
|
-
validation?: {
|
|
163
|
-
parents?: import("@markdoc/markdoc").Node[];
|
|
164
|
-
validateFunctions?: boolean;
|
|
165
|
-
environment?: string;
|
|
166
|
-
};
|
|
167
|
-
}>>): import("@markdoc/markdoc").MaybePromise<import("@markdoc/markdoc").ValidationError[]>;
|
|
168
|
-
description?: string;
|
|
169
|
-
children: string[];
|
|
170
|
-
};
|
|
7
|
+
export declare const strong: Schema;
|
|
8
|
+
export declare const em: Schema;
|
|
9
|
+
export declare const s: Schema;
|
|
10
|
+
export declare const link: Schema;
|
|
11
|
+
export declare const document: Schema;
|
|
171
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@
|
|
1
|
+
import e from"@redocly/markdoc";export*from"./gfm-list-item.js";export*from"./heading.js";export*from"./fence/index.js";export*from"./table.js";export*from"./text.js";const r={...e.nodes.strong,children:[...e.nodes.strong.children??[],"softbreak","em","strong"]},n={...e.nodes.em,children:[...e.nodes.em.children??[],"softbreak","em","strong"]},t={...e.nodes.s,children:[...e.nodes.s.children??[],"softbreak"]},s={...e.nodes.link,render:"MarkdownLink",children:[...e.nodes.link.children??[],"softbreak","image"]},d={...e.nodes.document,children:[...e.nodes.document.children??[],"text"]};export{d as document,n as em,s as link,t as s,r as strong};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@
|
|
1
|
+
import t from"@redocly/markdoc";import{MARKDOWN_CLASS_NAME as m}from"@redocly/theme/core/constants";import{isTag as i}from"../helpers/guards/is-tag.js";import{getInnerText as d}from"../helpers/get-inner-text.js";const g={transform(e,r){const s=e.transformAttributes(r),n=e.transformChildren(r);return new t.Tag("div",{className:"md-table-wrapper"},[new t.Tag("table",{...s,className:m},u(n))])}},o={type:String,matches:["top","middle","bottom"],render:"vAlign"},c={...t.nodes.td,attributes:{...t.nodes.td.attributes,valign:o}},T={...t.nodes.th,attributes:{...t.nodes.th.attributes,valign:o}};function u(e){if(!e.length)return e;const[r,...s]=e;return!i(r)||r.name!=="thead"?e:[new t.Tag("thead",r.attributes,r.children.map(n=>!i(n)||n.name!=="tr"?n:new t.Tag("tr",n.attributes,n.children.map(a=>!i(a)||a.name!=="th"?a:new t.Tag("th",{...a.attributes,"data-label":d(a.children)},a.children))))),...s]}export{g as table,c as td,T as th};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import l from"@
|
|
1
|
+
import l from"@redocly/markdoc";import{SampleFromJsonSchema as m,JsonExampleRef as n}from"../attributes/index.js";const v={schema:{attributes:{value:{type:n,required:!1},schema:{type:m,required:!1},mode:{type:String,matches:["read","write"],required:!1},title:{type:String,required:!1},valueResolved:{required:!1},valueResolvedErrors:{type:Array,default:[]},schemaResolved:{required:!1},schemaResolvedErrors:{type:Array,default:[]}},render:"JsonExample",selfClosing:!0,dynamicComponentLib:"openapi",transform:(e,r)=>{const o=e.transformAttributes(r),{valueResolved:a,schemaResolved:u,schemaResolvedErrors:i,valueResolvedErrors:t,title:s}=o;return a||t.length?new l.Tag("JsonExample",{title:s,json:a,errors:t}):new l.Tag("JsonExample",{title:s,json:u,errors:i})},validate(e){const r=[];return e.attributes.schema&&e.attributes.value&&r.push({id:"schema-and-value-attributes-are-mutually-exclusive",level:"error",message:'The "schema" and "value" attributes are mutually exclusive, you can only use one.'}),!e.attributes.schema&&!e.attributes.value&&r.push({id:"schema-or-value-attribute-required",level:"error",message:'This tag requires the "schema" or "value" attribute to render correctly.'}),r}},tagName:"json-example"};export{v as jsonExample};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{generatePortalResolverDir as
|
|
1
|
+
import{generatePortalResolverDir as u}from"./codegen/generate-resolver-dir.js";const l={"@markdoc/markdoc":"@redocly/markdoc"},v=()=>{const t={},a=u(),i=["react","styled-components",...Object.keys(l)];return{name:"dependency-resolver",setup(n){for(const o of i){const p=s(o),m=l[o]??o;n.onResolve({filter:p,namespace:"file"},async e=>{if(e.resolveDir==="")return;if(t[e.path]!==void 0)return t[e.path];const r=m+e.path.slice(o.length),c=!!n.initialOptions.external?.some(d=>s(d).test(r));return c?(t[e.path]=Promise.resolve({path:r,external:c}),t[e.path]):(t[e.path]=n.resolve(r,{kind:e.kind,resolveDir:a}),t[e.path])})}}}};function s(t){return new RegExp(`^${t}(/|$)`)}export{v as DependencyResolver};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ASTNode, type DocumentNode } from 'graphql';
|
|
2
2
|
import type { OpenAPIDefinition, AsyncApiDefinition, ApiSpecType, RawApiDocsOptions } from '@redocly/api-docs';
|
|
3
|
-
import type { Node as MarkdocNode } from '@
|
|
3
|
+
import type { Node as MarkdocNode } from '@redocly/markdoc';
|
|
4
4
|
import type { LifecycleContext } from '../../types';
|
|
5
5
|
import type { RedoclyConfig } from '@redocly/config';
|
|
6
6
|
export type MarkdocChunk = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import w from"path";import{lintConfig as $,loadConfig as
|
|
1
|
+
import w from"path";import{lintConfig as $,loadConfig as E,createConfigTypes as L}from"@redocly/openapi-core";import{rootRedoclyConfigSchema as q}from"@redocly/config";import{deepMerge as x}from"../../../../../utils/object/deep-merge.js";import{isPlainObject as g}from"../../../../../utils/guards/is-plain-object.js";import{logger as d}from"../../../../tools/notifiers/logger.js";import{BRANCH_ENV_PREFIX as j}from"../../../../../constants/common.js";import{sanitizeBranchName as O}from"../../../../utils/envs/sanitize-branch-name.js";import{envConfig as R}from"../../../../config/env-config.js";import{ajv as S,safeParsePartial as B}from"../../safe-parse.js";import{formatConfigProblem as I}from"../../format-error.js";import{ExternalResolver as M}from"../../../../fs/utils/external-ref-resolver.js";import{resolveMutuallyExclusiveProps as N}from"../../resolve-mutual-exclusion.js";function y(e,t,s,r){t in e&&e[t]&&typeof e[t]=="string"&&(/^https?:\/\/.*/.test(e[t])||r(new Error(`Invalid ${s} URL: "${e[t]}". ${s} must start with "http://" or "https://".`)))}function k(e,t){if("access"in e&&e.access&&typeof e.access=="object"){const s=e.access;y(s,"logoutReturnUrl","access.logoutReturnUrl",t),y(s,"residency","access.residency",t);const r=["requiresLogin","logoutReturnUrl","residency","sso","rbac"];for(const n of r)n in s&&s[n]!==void 0&&n in e&&e[n]!==void 0&&t(new Error(`Property '${n}' is defined both at root level and in 'access' object. Please use 'access.${n}' to define this configuration.`))}}function _(e){return S.compile(q.properties.graphql.properties.servers.items.properties.url)(e)}function C(e,t,s){if(g(e)&&Array.isArray(e.servers))for(const r of e.servers){const n=g(r)?r.url:void 0;if(typeof n=="string"&&!_(n)){const c=e.servers.indexOf(r),a=`${t}.servers[${c}].url`;s(new Error(`Invalid ${a}: "${n}". It must be an absolute http:// or https:// URL.`))}}}function D(e,t){if(C(e.graphql,"graphql",t),!!g(e.apis))for(const[s,r]of Object.entries(e.apis))g(r)&&C(r.graphql,`apis.${s}.graphql`,t)}async function ie(e,t,s,r){const c=t.getFileInfo(e)?.realRelativePath||e;async function a(){const p=new M(t),f=w.join(t.cwd,c),l=await E({configPath:f,externalRefResolver:p}),m=await r(l.resolvedConfig);if(m===void 0)return l.resolvedConfig;const h=l.document?.source,P=[...h?await $({config:l,externalConfigTypes:L(m,l)}):[],...h?N(l.resolvedConfig,h):[]];if(P.length>0)for(const U of P)s(new Error(I(U,t.cwd)));return l.resolvedConfig}const i=t.exists(e)?await a():{},T=F(i),b=await r(i);y(i,"residency","Residency",s),y(i,"logoutReturnUrl","Logout return URL",s),k(i,s),D(i,s);let u=b?B(b,i):i;u=z(u);const{env:v}=u;if(v){const p=R.REDOCLY_ENV,f=v[p]||{},l=R.PUBLIC_REDOCLY_BRANCH_NAME||"",m=l?O(l):"",h=m&&v[`${j}${m}`]||{};u=x(u,h,f)}const o=V(u,T);if(o.imports&&o.imports.length>0){d.warn("The 'imports' property is deprecated. Please use 'plugins' property instead.");const p=new Set([...o.plugins||[],...o.imports.map(f=>w.posix.join(f,"plugin.js"))]);o.plugins=Array.from(p),delete o.imports}if(o.catalog&&(d.warn("The 'catalog' property is deprecated. Please use 'catalogClassic' property instead."),o.catalogClassic={...o.catalog},delete o.catalog),o.scorecard&&(d.warn("The 'scorecard' property is deprecated. Please use 'scorecardClassic' property instead."),o.scorecardClassic=o.scorecard,delete o.scorecard),o.search?.ai){d.warn("The 'search.ai' property is deprecated. Please use 'aiAssistant' property instead.");const p={...o.search?.ai,...o.aiAssistant,suggestions:o.aiAssistant?.suggestions?.length?o.aiAssistant.suggestions:o.search?.ai.suggestions||[]};o.aiAssistant=p,delete o.search.ai}return G(o)}function G(e){const t={...e},r={..."access"in e&&e.access&&typeof e.access=="object"?e.access:{}},n=["requiresLogin","logoutReturnUrl","residency","sso","idps","rbac"],c=[];for(const a of n){const i=t[a];i!==void 0&&(c.push(a),a==="requiresLogin"&&r.requiresLogin===void 0&&(r.requiresLogin=i),a==="logoutReturnUrl"&&r.logoutReturnUrl===void 0&&(r.logoutReturnUrl=i),a==="residency"&&r.residency===void 0&&(r.residency=i),a==="sso"&&r.sso===void 0&&(r.sso=i),a==="idps"&&r.idps===void 0&&(r.idps=i),a==="rbac"&&r.rbac===void 0&&(r.rbac=i),delete t[a])}return c.length>0&&d.warn(`The following properties at root level are deprecated: ${c.join(", ")}. Please move them to the 'access' object.`),Object.keys(r).length>0&&(t.access=r),t}function z(e){const t=Object.entries(e.env??{});[e,...t.map(([,n])=>n)].some(n=>n?.mcp?.docs)&&d.warn("The 'mcp.docs' property is deprecated. Please use the 'mcp' properties instead.");const s=e.mcp?{...e,mcp:A(e.mcp)}:e;if(!e.env)return s;const r=t.map(([n,c])=>[n,c?.mcp?{...c,mcp:A(c.mcp)}:c]);return{...s,env:Object.fromEntries(r)}}function A(e){const t=e.docs??{},s={};(e.hide??t.hide)!==void 0&&(s.hide=e.hide===!0||t.hide===!0);const r=e.name??t.name;r!==void 0&&(s.name=r);const n=e.ignore??t.ignore;n!==void 0&&(s.ignore=n);const c=e.publicEndpoint??t.publicEndpoint;return c!==void 0&&(s.publicEndpoint=c),{...e,...s,docs:{...t,...s}}}function F(e){if(!e.theme)return[];d.warn("The 'theme' property in redocly.yaml is deprecated. Please move all of the properties from 'theme' to the root of the config.");const t=[];for(const s of Object.keys(e.theme))e[s]==null?t.push(s):d.warn(`Detected both '${s}' and 'theme.${s}' properties in redocly.yaml. The 'theme.${s}' property will be ignored and needs to be removed or merged into the '${s}'.`);return t}function V(e,t){if(!e.theme||t.length===0)return e;const s={...e};for(const r of t)s[r]=e.theme[r];return delete s.theme,s}export{G as ensureAccessBackwardsCompatibility,ie as readAndValidateConfig};
|