@redocly/asyncapi-docs 1.5.0-next.9 → 1.5.1
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/lib/RedoclyAsyncAPIDocs.d.ts +3 -4
- package/lib/RedoclyAsyncAPIDocs.js +1 -1
- package/lib/components/ApiInfo.js +1 -1
- package/lib/components/AppRouter.d.ts +1 -2
- package/lib/components/AppRouter.js +1 -1
- package/lib/components/AsyncApiDocs.d.ts +1 -1
- package/lib/components/AsyncApiDocs.js +1 -1
- package/lib/components/Breadcrumbs.d.ts +1 -2
- package/lib/components/Breadcrumbs.js +2 -2
- package/lib/components/ChannelBinding.d.ts +1 -1
- package/lib/components/ChannelBinding.js +1 -1
- package/lib/components/ChannelLinkItem.d.ts +1 -1
- package/lib/components/ChannelLinkItem.js +3 -3
- package/lib/components/ChannelParameters.d.ts +1 -1
- package/lib/components/ChannelParameters.js +3 -3
- package/lib/components/ChannelSection.d.ts +2 -3
- package/lib/components/ChannelSection.js +7 -7
- package/lib/components/DownloadSpecification.js +4 -4
- package/lib/components/ItemsNavigation.d.ts +1 -1
- package/lib/components/ItemsNavigation.js +6 -6
- package/lib/components/JsonSchema.js +2 -2
- package/lib/components/MarkdownSection.d.ts +1 -1
- package/lib/components/MarkdownSection.js +2 -2
- package/lib/components/Message.d.ts +1 -1
- package/lib/components/Message.js +4 -4
- package/lib/components/MessageAMQPReferences.d.ts +1 -2
- package/lib/components/MessageAMQPReferences.js +6 -6
- package/lib/components/MessageBinding.d.ts +1 -1
- package/lib/components/MessageBinding.js +1 -1
- package/lib/components/MessageReferences.js +1 -1
- package/lib/components/MessageSection.d.ts +2 -3
- package/lib/components/MessageSection.js +7 -7
- package/lib/components/Operation.d.ts +4 -4
- package/lib/components/Operation.js +12 -12
- package/lib/components/OperationBinding.d.ts +1 -1
- package/lib/components/OperationBinding.js +1 -1
- package/lib/components/OperationSection.d.ts +2 -3
- package/lib/components/OperationSection.js +5 -5
- package/lib/components/RightPanel.d.ts +2 -3
- package/lib/components/RightPanel.js +1 -1
- package/lib/components/SamplesPanel.d.ts +1 -1
- package/lib/components/SamplesPanel.js +5 -5
- package/lib/components/Server.d.ts +1 -1
- package/lib/components/Server.js +7 -7
- package/lib/components/ServerBindingsSection.d.ts +1 -1
- package/lib/components/ServerBindingsSection.js +1 -1
- package/lib/components/ServerModal.d.ts +1 -1
- package/lib/components/ServerModal.js +7 -7
- package/lib/components/ServerOverviewSection.d.ts +1 -1
- package/lib/components/ServerOverviewSection.js +7 -7
- package/lib/components/ServersListPanel.d.ts +2 -3
- package/lib/components/ServersListPanel.js +3 -3
- package/lib/components/TagBlock.d.ts +2 -3
- package/lib/components/TagBlock.js +9 -9
- package/lib/components/common/BindingPanel.d.ts +1 -1
- package/lib/components/common/BindingPanel.js +6 -6
- package/lib/components/common/Information.js +2 -2
- package/lib/components/common/Link.js +9 -9
- package/lib/components/common/ListIcon.d.ts +1 -1
- package/lib/components/common/ListIcon.js +6 -6
- package/lib/components/common/MoreDetailsButton.js +2 -2
- package/lib/components/common/SectionWrapper.js +1 -1
- package/lib/components/common/TagWithIcon.js +6 -6
- package/lib/components/common/index.d.ts +7 -7
- package/lib/components/common/index.js +1 -1
- package/lib/components/common/styles.d.ts +1 -1
- package/lib/components/common/styles.js +18 -18
- package/lib/hooks/index.d.ts +5 -5
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/use-auto-scroll.js +1 -1
- package/lib/hooks/use-performance-metrics.js +1 -1
- package/lib/hooks/use-protocol-labels.js +1 -1
- package/lib/hooks/use-telemetry.d.ts +1 -1
- package/lib/hooks/use-telemetry.js +1 -1
- package/lib/hooks/use-translate.d.ts +1 -1
- package/lib/hooks/use-translate.js +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.js +1 -1
- package/lib/jotai-store/Provider.d.ts +3 -3
- package/lib/jotai-store/Provider.js +1 -1
- package/lib/jotai-store/app.d.ts +3 -3
- package/lib/jotai-store/app.js +1 -1
- package/lib/types/apiItem.js +0 -1
- package/lib/types/async-api.d.ts +1 -1
- package/lib/types/async-api.js +0 -1
- package/lib/types/index.d.ts +3 -3
- package/lib/types/index.js +1 -1
- package/lib/types/protocol.js +1 -1
- package/lib/utils/avro-to-json-schema.js +1 -1
- package/lib/utils/build-menu-items.d.ts +2 -2
- package/lib/utils/build-menu-items.js +1 -1
- package/lib/utils/find-first-binding.d.ts +1 -1
- package/lib/utils/find-first-binding.js +1 -1
- package/lib/utils/generate-ast.js +1 -1
- package/lib/utils/generate-channel-link.d.ts +1 -1
- package/lib/utils/generate-channel-link.js +1 -1
- package/lib/utils/generate-message-references-header.d.ts +1 -1
- package/lib/utils/generate-message-references-header.js +1 -1
- package/lib/utils/get-schema.js +1 -1
- package/lib/utils/index.d.ts +12 -12
- package/lib/utils/index.js +1 -1
- package/lib/utils/is-equal.js +1 -1
- package/lib/utils/map-channel-to-operations.d.ts +1 -1
- package/lib/utils/map-channel-to-operations.js +1 -1
- package/lib/utils/modify-payload.d.ts +1 -1
- package/lib/utils/modify-payload.js +1 -1
- package/lib/utils/nav-to-api-items.d.ts +1 -1
- package/lib/utils/nav-to-api-items.js +1 -1
- package/lib/utils/try-decode-url-component.js +1 -1
- package/package.json +20 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function n(e){const t=[];if(e.exchanges.length>0){const g=`${e.exchanges.length} exchange${e.exchanges.length>1?"s":""}`;t.push(g)}if(e.queues.length>0){const g=`${e.queues.length} queue${e.queues.length>1?"s":""}`;t.push(g)}return t.length===0?"":`Used in ${t.join(" and ")}`}export{n as generateMessageReferencesHeader};
|
package/lib/utils/get-schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{avroToJsonSchema as r}from"./avro-to-json-schema.js";const n=["application/vnd.apache.avro","application/vnd.apache.avro+json","application/vnd.apache.avro+yaml"];function t(o){return o?n.some(a=>o.startsWith(a)):!1}const i=o=>o?.schema?t(o.schemaFormat)?r(o.schema):o.schema:o;export{i as getSchema};
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { avroToJsonSchema } from './avro-to-json-schema';
|
|
2
|
-
export { generateChannelLink } from './generate-channel-link';
|
|
3
|
-
export { generateMessageReferencesHeader } from './generate-message-references-header';
|
|
4
|
-
export { getSchema } from './get-schema';
|
|
5
|
-
export { isEqual } from './is-equal';
|
|
6
|
-
export { tryDecodeURIComponent } from './try-decode-url-component';
|
|
7
|
-
export { modifyPayload } from './modify-payload';
|
|
8
|
-
export { findFirstBinding } from './find-first-binding';
|
|
9
|
-
export { buildMenuItems } from './build-menu-items';
|
|
10
|
-
export { navToApiItems } from './nav-to-api-items';
|
|
11
|
-
export { mapChannelToOperations } from './map-channel-to-operations';
|
|
12
|
-
export { generateAst } from './generate-ast';
|
|
1
|
+
export { avroToJsonSchema } from './avro-to-json-schema.js';
|
|
2
|
+
export { generateChannelLink } from './generate-channel-link.js';
|
|
3
|
+
export { generateMessageReferencesHeader } from './generate-message-references-header.js';
|
|
4
|
+
export { getSchema } from './get-schema.js';
|
|
5
|
+
export { isEqual } from './is-equal.js';
|
|
6
|
+
export { tryDecodeURIComponent } from './try-decode-url-component.js';
|
|
7
|
+
export { modifyPayload } from './modify-payload.js';
|
|
8
|
+
export { findFirstBinding } from './find-first-binding.js';
|
|
9
|
+
export { buildMenuItems } from './build-menu-items.js';
|
|
10
|
+
export { navToApiItems } from './nav-to-api-items.js';
|
|
11
|
+
export { mapChannelToOperations } from './map-channel-to-operations.js';
|
|
12
|
+
export { generateAst } from './generate-ast.js';
|
package/lib/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{avroToJsonSchema as r}from"./avro-to-json-schema.js";import{generateChannelLink as m}from"./generate-channel-link.js";import{generateMessageReferencesHeader as a}from"./generate-message-references-header.js";import{getSchema as f}from"./get-schema.js";import{isEqual as i}from"./is-equal.js";import{tryDecodeURIComponent as d}from"./try-decode-url-component.js";import{modifyPayload as l}from"./modify-payload.js";import{findFirstBinding as h}from"./find-first-binding.js";import{buildMenuItems as y}from"./build-menu-items.js";import{navToApiItems as I}from"./nav-to-api-items.js";import{mapChannelToOperations as v}from"./map-channel-to-operations.js";import{generateAst as M}from"./generate-ast.js";export{r as avroToJsonSchema,y as buildMenuItems,h as findFirstBinding,M as generateAst,m as generateChannelLink,a as generateMessageReferencesHeader,f as getSchema,i as isEqual,v as mapChannelToOperations,l as modifyPayload,I as navToApiItems,d as tryDecodeURIComponent};
|
package/lib/utils/is-equal.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function l(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(!l(e[t],r[t]))return!1;return!0}const n=Object.keys(e),s=Object.keys(r);if(n.length!==s.length)return!1;for(let t=0;t<n.length;t++){const f=n[t];if(!Object.prototype.hasOwnProperty.call(r,f)||!l(e[f],r[f]))return!1}return!0}return e!==e&&r!==r}export{l as isEqual};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AsyncApiDefinition } from '../types';
|
|
1
|
+
import type { AsyncApiDefinition } from '../types/index.js';
|
|
2
2
|
export declare function mapChannelToOperations(rawAsyncApiDoc: AsyncApiDefinition): Record<string, string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function l(t){const d=t.operations||{},c=t.channels||{},a=Object.keys(c),r={},o={};for(const[n,e]of Object.entries(c))e.address&&(r[e.address]=n);for(const[n,{channel:e}]of Object.entries(d)){if(!e?.address)continue;const s=r[e.address];!s||!a.includes(s)||(o[s]||(o[s]=[]),o[s].push(n))}const i=a.filter(n=>!o[n]);for(const n of i)o[n]=[];return o}export{l as mapChannelToOperations};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JSONSchema7 } from 'json-schema';
|
|
2
|
-
import type { MultiFormatSchemaObject } from '../types';
|
|
2
|
+
import type { MultiFormatSchemaObject } from '../types/index.js';
|
|
3
3
|
type SchemaObject = JSONSchema7 | MultiFormatSchemaObject;
|
|
4
4
|
type ChangeRequest = {
|
|
5
5
|
pointer: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const m=(n,t)=>{if(!n||typeof n!="object")return null;try{return u(n,t.pointer,t.index)}catch(r){return console.error("Error modifying payload:",r),n}},u=(n,t,r)=>{var f;const s=t.replace("#/x-root/","").split("/");if(!s||s.length===0)return n;const c=JSON.parse(JSON.stringify(n));let o=c;for(const i of s){if(i in o){o=o[i];continue}const l=["allOf","anyOf","oneOf"];for(const y of l){const p=o[y];if(Array.isArray(p)){for(const e of p)if(e&&typeof e=="object"&&i in e){o=e[i];break}}}}const O=o&&typeof o=="object"&&"oneOf"in o&&Array.isArray(o.oneOf),a=r>=0&&r<(((f=o?.oneOf)===null||f===void 0?void 0:f.length)||0);return O&&a&&(o.oneOf=[o.oneOf[r]]),c};export{m as modifyPayload};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ResolvedAsyncApiNavItem, ApiItemsGroup, ApiItem } from '../types';
|
|
1
|
+
import type { ResolvedAsyncApiNavItem, ApiItemsGroup, ApiItem } from '../types/index.js';
|
|
2
2
|
export type ApiItems = (ApiItemsGroup | ApiItem)[];
|
|
3
3
|
export declare function navToApiItems(navItems: ResolvedAsyncApiNavItem[]): ApiItems;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{normalizePath as p}from"@redocly/openapi-docs/lib/utils/path.js";function n(t){return t.filter(i=>i.type!=="separator").map(i=>{var l,o,a;return i.type==="link"?r(i):{id:((l=i.apiItemData)===null||l===void 0?void 0:l.id)||"",label:i.label,link:i.link,dataSectionId:p(i.link||""),isGroup:!0,type:((o=i.apiItemData)===null||o===void 0?void 0:o.type)||"tag",ast:i.ast,items:((a=i.items)===null||a===void 0?void 0:a.map(d=>r(d)))||[]}})}function r(t){var i;const{id:l,type:o}=t.apiItemData;return{id:l,label:t.label,link:t.link,dataSectionId:p(t.link||""),type:o,action:t.action,items:((i=t.items)===null||i===void 0?void 0:i.map(a=>r(a)))||[],ast:t.ast}}export{n as navToApiItems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function n(e){try{return decodeURIComponent(e)}catch(o){return console.error(`Decoding failed: ${e}`,o),e}}export{n as tryDecodeURIComponent};
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/asyncapi-docs",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Async API docs for Redocly Realm",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "lib/index.js",
|
|
6
7
|
"module": "lib/index.js",
|
|
7
8
|
"types": "lib/index.d.ts",
|
|
@@ -14,23 +15,22 @@
|
|
|
14
15
|
],
|
|
15
16
|
"license": "SEE LICENSE IN LICENSE",
|
|
16
17
|
"devDependencies": {
|
|
17
|
-
"@jest/globals": "29.5.0",
|
|
18
18
|
"@testing-library/jest-dom": "6.6.3",
|
|
19
19
|
"@testing-library/react": "16.3.0",
|
|
20
|
-
"@types/jest": "29.5.11",
|
|
21
20
|
"@types/json-schema": "^7.0.15",
|
|
22
21
|
"@types/node": "22.18.13",
|
|
23
|
-
"@types/react": "^19.
|
|
22
|
+
"@types/react": "^19.2.7",
|
|
24
23
|
"@types/styled-components": "5.1.34",
|
|
24
|
+
"@vitest/coverage-v8": "^4.0.10",
|
|
25
|
+
"@vitest/ui": "3.2.4",
|
|
25
26
|
"esbuild-minify-dir": "^0.0.1",
|
|
26
|
-
"jest": "29.7.0",
|
|
27
27
|
"jest-styled-components": "7.2.0",
|
|
28
28
|
"json-schema": "0.4.0",
|
|
29
|
-
"react": "^19.1
|
|
30
|
-
"ts-jest": "29.1.2",
|
|
31
|
-
"ts-jest-mock-import-meta": "1.1.0",
|
|
29
|
+
"react": "^19.2.1",
|
|
32
30
|
"tsc-alias": "1.8.16",
|
|
33
|
-
"typescript": "5.9.3"
|
|
31
|
+
"typescript": "5.9.3",
|
|
32
|
+
"vitest": "4.0.10",
|
|
33
|
+
"vitest-fetch-mock": "0.4.5"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@markdoc/markdoc": "0.5.2",
|
|
@@ -39,23 +39,23 @@
|
|
|
39
39
|
"react-router-dom": "^6.21.1",
|
|
40
40
|
"styled-components": "5.3.11",
|
|
41
41
|
"web-vitals": "3.3.1",
|
|
42
|
-
"@redocly/
|
|
43
|
-
"@redocly/
|
|
44
|
-
"@redocly/
|
|
42
|
+
"@redocly/openapi-docs": "3.16.1",
|
|
43
|
+
"@redocly/theme": "0.60.1",
|
|
44
|
+
"@redocly/config": "0.41.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"react": "^19.1
|
|
47
|
+
"react": "^19.2.1"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"clean": "rm -rf lib",
|
|
51
|
-
"compile": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json",
|
|
52
|
-
"build:minify": "esbuild-minify-dir lib --
|
|
51
|
+
"compile": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
52
|
+
"build:minify": "esbuild-minify-dir lib --esm",
|
|
53
53
|
"build:without-minify": "npm run clean && npm run compile",
|
|
54
54
|
"build": "npm run clean && npm run compile && npm run build:minify",
|
|
55
|
-
"watch": "tsc -w -p tsconfig.json",
|
|
56
|
-
"test": "
|
|
57
|
-
"test:update": "
|
|
58
|
-
"test:watch": "
|
|
59
|
-
"test:coverage": "
|
|
55
|
+
"watch": "tsc -w -p tsconfig.build.json",
|
|
56
|
+
"test": "vitest run",
|
|
57
|
+
"test:update": "vitest run -u",
|
|
58
|
+
"test:watch": "vitest",
|
|
59
|
+
"test:coverage": "vitest run --coverage"
|
|
60
60
|
}
|
|
61
61
|
}
|