@redocly/replay 0.29.0-next.7 → 0.29.0-next.8
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/dist/{replay-AiChatProvider-PrZdp8BS.js → replay-AiChatProvider-BhqlFxe5.js} +6 -6
- package/dist/{replay-AiChatProvider-CsMz9Ny8.js → replay-AiChatProvider-CQlLeJa7.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-2UcwycP7.js → replay-AiChatSqliteDBStorage-DJ1YGOqe.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-Ch8nYYAX.js → replay-AiChatSqliteDBStorage-DvYzbacG.js} +1 -1
- package/dist/{replay-AiPanel-jeLVfdPf.js → replay-AiPanel-D5TWvjvl.js} +31 -19
- package/dist/{replay-AiPanel-BVP0e_Ra.js → replay-AiPanel-Dbl9bdI0.js} +2 -2
- package/dist/{replay-FileWatcher-ByAuX5yb.js → replay-FileWatcher-Ccyd4Ygp.js} +1 -1
- package/dist/{replay-FileWatcher-CCeuRwSI.js → replay-FileWatcher-DcTmOxd5.js} +2 -2
- package/dist/{replay-SemanticSearchService-CqpTIrD8.js → replay-SemanticSearchService-BYH-9ApH.js} +1 -1
- package/dist/{replay-SemanticSearchService-CWnYSg2x.js → replay-SemanticSearchService-D0FEW-qe.js} +1 -1
- package/dist/{replay-SqliteDBStorage-8Q5sVT__.js → replay-SqliteDBStorage-dlLOcTaa.js} +1 -1
- package/dist/{replay-SqliteDBStorage-DlhoTUy-.js → replay-SqliteDBStorage-ngC3Fd6F.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-D2TWeqg4.js → replay-TauriFileSystemAdapter-CLyMABdw.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-CsxsNEHS.js → replay-TauriFileSystemAdapter-CfhZ_lu4.js} +1 -1
- package/dist/{replay-TauriRootStorage-DU5cTkJu.js → replay-TauriRootStorage-Dw4S06W3.js} +2 -2
- package/dist/{replay-TauriRootStorage-DVr-1sCz.js → replay-TauriRootStorage-qalQq2sK.js} +1 -1
- package/dist/{replay-agent-loop-BIWlrZnE.js → replay-agent-loop-Ch4vi4iC.js} +3 -3
- package/dist/{replay-agent-loop-BclAkqxN.js → replay-agent-loop-lW8cGWFV.js} +1 -1
- package/dist/{replay-ai-chat-mappers-IIq8wpuk.js → replay-ai-chat-mappers-CZyQUUm-.js} +1 -1
- package/dist/{replay-ai-chat-mappers-tMl4GKpA.js → replay-ai-chat-mappers-cLpAMe9s.js} +1 -1
- package/dist/{replay-create-model-Dbu-RKR1.js → replay-create-model-BcIMRKgW.js} +3 -3
- package/dist/{replay-create-model-CJJtDY2W.js → replay-create-model-GgeDi15a.js} +3 -3
- package/dist/{replay-db-DuJyF4Fr.js → replay-db-CEOHtKri.js} +1 -1
- package/dist/{replay-db-CiDc3f4H.js → replay-db-CbL8F9Gj.js} +1 -1
- package/dist/{replay-external-resolver-hjlmO2_f.js → replay-external-resolver-DPE-eBdK.js} +2 -2
- package/dist/{replay-external-resolver-CUHRd2KI.js → replay-external-resolver-DWPR21TU.js} +1 -1
- package/dist/{replay-index-MZZGINEM.js → replay-index-BIFx3qe_.js} +1 -1
- package/dist/{replay-index-BiX81nFD.js → replay-index-BIJDsghu.js} +1 -1
- package/dist/{replay-index-BJkWpnD3.js → replay-index-BafdpO9k.js} +1 -1
- package/dist/{replay-index-DV7TIbcG.js → replay-index-CEb-1y0c.js} +1 -1
- package/dist/{replay-index-BvHpl6n6.js → replay-index-CMbUakrA.js} +1 -1
- package/dist/{replay-index-CI5fXezW.js → replay-index-Cbk31wfc.js} +1135 -1135
- package/dist/replay-index-CcYwwH13.js +4 -0
- package/dist/{replay-index-PvlFMxhx.js → replay-index-CgZg_izl.js} +1 -1
- package/dist/{replay-index-BRps0K8N.js → replay-index-CwCo614T.js} +55 -59
- package/dist/{replay-index-twpStg_q.js → replay-index-DXFEOfL5.js} +1 -1
- package/dist/replay-index-ROQcRTTa.js +1 -0
- package/dist/{replay-index-jO1drB_G.js → replay-index-xbsaDUTP.js} +18951 -19257
- package/dist/{replay-lint-DG6Bpj__.js → replay-lint-BfdbISqI.js} +11410 -9532
- package/dist/replay-lint-CdPOA4Pr.js +130 -0
- package/dist/{replay-lint-graphql-DCVDIu3K.js → replay-lint-graphql-CIQ7_fq0.js} +2 -2
- package/dist/{replay-lint-graphql-y5Q8AbLi.js → replay-lint-graphql-S4qk69dl.js} +1 -1
- package/dist/{replay-periodic-revalidation-BwkTngTv.js → replay-periodic-revalidation-B4K7kXe9.js} +1 -1
- package/dist/{replay-periodic-revalidation-8ApdHWIQ.js → replay-periodic-revalidation-DrYYgXSd.js} +1 -1
- package/dist/{replay-resolve-DXK9kMSh.js → replay-resolve-C6cu60fT.js} +1 -1
- package/dist/{replay-resolve-mFgjNvXW.js → replay-resolve-Cab_bwUa.js} +8 -8
- package/dist/replay-respect-run-DNdF5qAL.js +73 -0
- package/dist/{replay-respect-run-C_EkBybE.js → replay-respect-run-cnFxzDd7.js} +3515 -4982
- package/dist/{replay-tauri-path-9izlvCOU.js → replay-tauri-path-B0C8nL7l.js} +1 -1
- package/dist/{replay-tauri-path-DQJXzOyo.js → replay-tauri-path-CHACA8CH.js} +2 -2
- package/dist/{replay-useAiChatQueries-d02SKxxb.js → replay-useAiChatQueries-C4mH2gFV.js} +1 -1
- package/dist/{replay-useAiChatQueries-BIfk0TxI.js → replay-useAiChatQueries-CEUh6Nj5.js} +4 -4
- package/dist/{replay-validate-key-DO3mXt_J.js → replay-validate-key-CDGgJHUA.js} +2 -2
- package/dist/{replay-validate-key-BBw0AkiP.js → replay-validate-key-DCXaLvJK.js} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +24 -1
- package/dist/replay.js +1 -1
- package/package.json +4 -4
- package/dist/replay-index-BKy0VJhC.js +0 -1
- package/dist/replay-index-DUwBFEXC.js +0 -4
- package/dist/replay-lint-DviuCvyd.js +0 -121
- package/dist/replay-respect-run-Xc6vPsJi.js +0 -82
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-Cbk31wfc.js");async function u(r,n){const t=e.sep(),l=await e.resolve(r),c=await e.resolve(n),a=l.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),i=c.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),m=Math.min(a.length,i.length);let s=0;for(let o=0;o<m&&a[o]===i[o];o++)s++;const p=a.slice(s).map(()=>".."),f=i.slice(s);return[...p,...f].join(t)}async function g(r){const n=await e.extname(r);return n?`.${n}`:""}exports.dirname=e.dirname;exports.isAbsolute=e.isAbsolute;exports.join=e.join;exports.resolve=e.resolve;exports.extname=g;exports.relative=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as h, s as x, l as i } from "./replay-index-
|
|
2
|
-
import { n as j, o as b, j as k } from "./replay-index-
|
|
1
|
+
import { k as h, s as x, l as i } from "./replay-index-xbsaDUTP.js";
|
|
2
|
+
import { n as j, o as b, j as k } from "./replay-index-xbsaDUTP.js";
|
|
3
3
|
async function u(a, e) {
|
|
4
4
|
const t = x(), l = await i(a), c = await i(e), o = l.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), s = c.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), m = Math.min(o.length, s.length);
|
|
5
5
|
let r = 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const Ce=require("react"),a=require("./replay-index-
|
|
1
|
+
"use strict";const Ce=require("react"),a=require("./replay-index-Cbk31wfc.js"),m=require("./replay-db-CEOHtKri.js"),r=require("./replay-create-model-BcIMRKgW.js"),C=require("./replay-SemanticSearchService-D0FEW-qe.js"),Oe=require("@tanstack/react-query"),j={path:"pathParameters",query:"queryParameters",header:"headers",cookie:"cookies"},ft={run_request:{approveLabel:"Run",denyLabel:"Skip"},update_step:{approveLabel:"Apply",denyLabel:"Dismiss"},update_security:{approveLabel:"Apply",denyLabel:"Dismiss"}},mt={set_active_environment:{approveLabel:"Switch",denyLabel:"Cancel"},add_environment:{approveLabel:"Add",denyLabel:"Cancel"},upsert_input:{approveLabel:"Set",denyLabel:"Cancel"},upsert_server:{approveLabel:"Set",denyLabel:"Cancel"},remove_input:{approveLabel:"Remove",denyLabel:"Cancel"},remove_server:{approveLabel:"Remove",denyLabel:"Cancel"},create_collection:{approveLabel:"Create",denyLabel:"Cancel"},create_workflow:{approveLabel:"Create",denyLabel:"Cancel"},create_step:{approveLabel:"Create",denyLabel:"Cancel"},move_step:{approveLabel:"Move",denyLabel:"Cancel"},delete_collection:{approveLabel:"Delete",denyLabel:"Cancel"},delete_workflow:{approveLabel:"Delete",denyLabel:"Cancel"},delete_step:{approveLabel:"Delete",denyLabel:"Cancel"},save_tab_to_collection:{approveLabel:"Save",denyLabel:"Cancel"}},ht={CHAT:"chat",HISTORY:"history"},yt="report_status",It="run_workflow",W={WEB_SEARCH:"web_search"};function wt(e){switch(e.provider){case a.AI_PROVIDERS.GEMINI:return{[W.WEB_SEARCH]:r.google.tools.googleSearch({})};case a.AI_PROVIDERS.OPENAI:return{[W.WEB_SEARCH]:r.openai.tools.webSearch({})};case a.AI_PROVIDERS.ANTHROPIC:return{[W.WEB_SEARCH]:r.anthropic.tools.webFetch_20250910()};case a.REUNITE_AI_PROVIDER:return{[W.WEB_SEARCH]:{type:"provider",id:"reunite.web_search",name:"web_search",args:{}}};default:return{}}}const gt=["info","workflows","sourceDescriptions"];function bt(e){const t=[];return e.collectionId&&t.push(`Collection ID: ${e.collectionId}`),e.collection?.info?.title&&t.push(`Title: ${e.collection.info.title}`),e.collection?.info?.summary&&t.push(`Summary: ${e.collection.info.summary}`),e.collection?.info?.description&&t.push(`Description: ${e.collection.info.description}`),m.buildMessageFromArray(t,`
|
|
2
2
|
`)}function vt(e){const t=[];if(e.collection?.workflows?.length){t.push("Workflows:");for(const o of e.collection.workflows)t.push(` workflowId=${o.workflowId} ${o.summary??""}`)}return m.buildMessageFromArray(t,`
|
|
3
3
|
`)}function Tt(e){const t=[];if(e.collection?.sourceDescriptions?.length){t.push("Source descriptions:");for(const o of e.collection.sourceDescriptions)t.push(` name=${o.name} url=${o.url}`)}return m.buildMessageFromArray(t,`
|
|
4
4
|
`)}function St(e,t){const o=["Current tab (collection)"];for(const n of t)switch(n){case"info":o.push(bt(e));break;case"workflows":o.push(vt(e));break;case"sourceDescriptions":o.push(Tt(e));break}return m.buildMessageFromArray(o,`
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useContext as zt, createContext as Ht } from "react";
|
|
2
|
-
import { R as Gt, A as be, aR as se, aS as Vt, aT as Kt, aU as Jt, ac as x, a as ue, aH as Y, aV as pt, aW as Oe, aG as Ae, aX as ft, aY as pe, aZ as ee, c as b, a_ as Qt, an as G, al as V, a$ as mt, b0 as fe, am as Ee, b1 as Xt, b2 as Zt, b3 as eo, b4 as to, b5 as oo, b6 as no, b7 as ro, af as K, b8 as so, ag as te, aa as ao, b9 as io, ba as co, bb as ht, bc as It, bd as lo, be as wt, bf as yt, bg as uo, ai as J, bh as po, ab as vt, bi as $e, aB as gt, bj as fo, bk as mo, bl as Me, F as k, bm as Fe, bn as ho, bo as Be, bp as Io, bq as wo, br as yo, a9 as bt, a8 as kt } from "./replay-index-
|
|
3
|
-
import { b as C, f as St, a as Tt, c as Ct, d as me, e as Ot, i as je, h as xe, R as z, j as vo, k as go, p as bo, s as Ye, l as ko } from "./replay-db-
|
|
4
|
-
import { b as So, o as To, d as Co, e as p, u as he, f as i, h as R, j as E, n as A, k as j, m as I, q as T, r as _e, t as oe, v as Ie, Z as H, w as Oo, x as ze, c as Ao, s as Eo, y as $o } from "./replay-create-model-
|
|
5
|
-
import { g as xo, e as He, a as _o, b as Ro, c as Ge, d as Po, f as qo } from "./replay-SemanticSearchService-
|
|
2
|
+
import { R as Gt, A as be, aR as se, aS as Vt, aT as Kt, aU as Jt, ac as x, a as ue, aH as Y, aV as pt, aW as Oe, aG as Ae, aX as ft, aY as pe, aZ as ee, c as b, a_ as Qt, an as G, al as V, a$ as mt, b0 as fe, am as Ee, b1 as Xt, b2 as Zt, b3 as eo, b4 as to, b5 as oo, b6 as no, b7 as ro, af as K, b8 as so, ag as te, aa as ao, b9 as io, ba as co, bb as ht, bc as It, bd as lo, be as wt, bf as yt, bg as uo, ai as J, bh as po, ab as vt, bi as $e, aB as gt, bj as fo, bk as mo, bl as Me, F as k, bm as Fe, bn as ho, bo as Be, bp as Io, bq as wo, br as yo, a9 as bt, a8 as kt } from "./replay-index-xbsaDUTP.js";
|
|
3
|
+
import { b as C, f as St, a as Tt, c as Ct, d as me, e as Ot, i as je, h as xe, R as z, j as vo, k as go, p as bo, s as Ye, l as ko } from "./replay-db-CbL8F9Gj.js";
|
|
4
|
+
import { b as So, o as To, d as Co, e as p, u as he, f as i, h as R, j as E, n as A, k as j, m as I, q as T, r as _e, t as oe, v as Ie, Z as H, w as Oo, x as ze, c as Ao, s as Eo, y as $o } from "./replay-create-model-GgeDi15a.js";
|
|
5
|
+
import { g as xo, e as He, a as _o, b as Ro, c as Ge, d as Po, f as qo } from "./replay-SemanticSearchService-BYH-9ApH.js";
|
|
6
6
|
import { useInfiniteQuery as No, useQuery as Uo } from "@tanstack/react-query";
|
|
7
7
|
const ae = {
|
|
8
8
|
path: "pathParameters",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as i, g as n } from "./replay-create-model-
|
|
2
|
-
import { M as s } from "./replay-index-
|
|
1
|
+
import { c as i, g as n } from "./replay-create-model-GgeDi15a.js";
|
|
2
|
+
import { M as s } from "./replay-index-xbsaDUTP.js";
|
|
3
3
|
import { V as l } from "./replay-defaults-CzR6jw9a.js";
|
|
4
4
|
async function g(a, e, t, o) {
|
|
5
5
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-create-model-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-create-model-BcIMRKgW.js"),n=require("./replay-index-Cbk31wfc.js"),l=require("./replay-defaults-DVvOnvnR.js");async function s(t,a,o,i){try{const e=r.createModel({provider:t,modelId:o,apiKey:a});return await r.generateText({model:e,prompt:l.VALIDATION_PROMPT,maxOutputTokens:n.MAX_OUTPUT_TOKENS_FOR_VALIDATION,abortSignal:i?.abortSignal}),{valid:!0}}catch(e){if(e instanceof Error&&e.name==="AbortError")throw e;return{valid:!1,error:e instanceof Error&&e.message.length>0?e.message:"Validation failed. Please try again."}}}exports.validateApiKey=s;
|
package/dist/replay.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-Cbk31wfc.js"),t=require("./replay-oauth2-redirect-handler-BfZRvm6l.js");exports.AI_PROVIDERS=e.AI_PROVIDERS;exports.AiPanelContext=e.AiPanelContext;exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.REUNITE_AI_PROVIDER=e.REUNITE_AI_PROVIDER;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;Object.defineProperty(exports,"SpanStatusCode",{enumerable:!0,get:()=>e.SpanStatusCode});exports.TelemetryClient=e.TelemetryClient;exports.applyThemeToDOM=e.applyThemeToDOM;exports.createResource=e.createResource;exports.getCurrentTheme=e.getCurrentTheme;exports.loadAgentLoop=e.loadAgentLoop;exports.makeProviderRecord=e.makeProviderRecord;exports.resolveTheme=e.resolveTheme;exports.useAiPanel=e.useAiPanel;exports.useTelemetry=e.useTelemetry;exports.useTelemetryClient=e.useTelemetryClient;exports.validateApiKey=e.validateApiKey;exports.OAuth2Error=t.OAuth2Error;exports.handleOAuth2Redirect=t.handleOAuth2Redirect;
|
package/dist/replay.d.ts
CHANGED
|
@@ -79,6 +79,14 @@ export declare type AiProviderConfig = {
|
|
|
79
79
|
|
|
80
80
|
export declare type AiProviderName = (typeof AI_PROVIDERS)[keyof typeof AI_PROVIDERS];
|
|
81
81
|
|
|
82
|
+
export declare type ApiEntry = {
|
|
83
|
+
kind: 'openapi';
|
|
84
|
+
definition: {
|
|
85
|
+
document: OpenAPIDefinition;
|
|
86
|
+
};
|
|
87
|
+
operation?: OperationEntry;
|
|
88
|
+
};
|
|
89
|
+
|
|
82
90
|
declare type ApiPath = {
|
|
83
91
|
path: string;
|
|
84
92
|
method: string;
|
|
@@ -689,6 +697,14 @@ declare interface OpenAPIXBadges {
|
|
|
689
697
|
position?: 'before' | 'after';
|
|
690
698
|
}
|
|
691
699
|
|
|
700
|
+
declare type OperationEntry = {
|
|
701
|
+
operationId: string;
|
|
702
|
+
pointer?: string;
|
|
703
|
+
} | {
|
|
704
|
+
operationId?: string;
|
|
705
|
+
pointer: string;
|
|
706
|
+
};
|
|
707
|
+
|
|
692
708
|
export declare type OperationIn = 'query' | 'header' | 'path' | 'cookie';
|
|
693
709
|
|
|
694
710
|
declare type OperationParameter = {
|
|
@@ -771,9 +787,12 @@ declare type Referenced<T> = T | OpenAPIRef;
|
|
|
771
787
|
export declare function Replay(props: ReplayAppProps): JSX.Element;
|
|
772
788
|
|
|
773
789
|
declare type ReplayAppProps = {
|
|
790
|
+
/** @deprecated Use `api` with an `ApiEntry`. Replay ignores it when `api` is an `ApiEntry`. */
|
|
774
791
|
activeOperationId?: string;
|
|
792
|
+
/** @deprecated Use `api` with an `ApiEntry`. Replay ignores it when `api` is an `ApiEntry`. */
|
|
775
793
|
activeOperationPointer?: string;
|
|
776
|
-
|
|
794
|
+
/** Passing an OpenAPI document is deprecated. Pass an `ApiEntry`. */
|
|
795
|
+
api?: OpenAPIDefinition | ApiEntry;
|
|
777
796
|
settings: InputSettings;
|
|
778
797
|
getReuniteAuth?: ReuniteAuthGetter;
|
|
779
798
|
onLoad?: () => void;
|
|
@@ -894,6 +913,7 @@ export { SpanStatusCode }
|
|
|
894
913
|
|
|
895
914
|
export declare class TelemetryClient {
|
|
896
915
|
private _client;
|
|
916
|
+
private _scopedClients;
|
|
897
917
|
private _isInitialized;
|
|
898
918
|
private _initResolve;
|
|
899
919
|
private _initPromise;
|
|
@@ -908,8 +928,11 @@ export declare class TelemetryClient {
|
|
|
908
928
|
getGlobalAttributes(): Readonly<TelemetryGlobalAttributes>;
|
|
909
929
|
clearGlobalAttributes(): void;
|
|
910
930
|
init(config?: TelemetryConfig): void;
|
|
931
|
+
getScopedClient(config?: TelemetryConfig): TelemetryMethods;
|
|
911
932
|
sendEvent<T extends AsyncApiReplay.EventType>(event: T, data: AsyncApiReplay.GetEventData<T>): void;
|
|
912
933
|
startSpan<T extends AsyncApiReplay.EventType>(event: T, data?: AsyncApiReplay.EventPayload<T>, parentCtx?: TelemetryContext): AsyncApiReplay.OtelClientSpan<T> | undefined;
|
|
934
|
+
private emitEvent;
|
|
935
|
+
private emitSpan;
|
|
913
936
|
}
|
|
914
937
|
|
|
915
938
|
export declare type TelemetryConfig = {
|
package/dist/replay.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, ax as r, bQ as t, bR as l, R as o, bS as b, bT as R, N as d, bU as m, bV as p, O as n, bW as y, bX as A, bY as T, bZ as i, aw as u, av as O, b_ as h, b$ as E } from "./replay-index-
|
|
1
|
+
import { A as s, ax as r, bQ as t, bR as l, R as o, bS as b, bT as R, N as d, bU as m, bV as p, O as n, bW as y, bX as A, bY as T, bZ as i, aw as u, av as O, b_ as h, b$ as E } from "./replay-index-xbsaDUTP.js";
|
|
2
2
|
import { O as C, h as I } from "./replay-oauth2-redirect-handler-Bq6bpZMm.js";
|
|
3
3
|
export {
|
|
4
4
|
s as AI_PROVIDERS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/replay",
|
|
3
|
-
"version": "0.29.0-next.
|
|
3
|
+
"version": "0.29.0-next.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/replay.cjs",
|
|
6
6
|
"module": "./dist/replay.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@redocly/theme": "0.70.0-next.
|
|
19
|
+
"@redocly/theme": "0.70.0-next.8",
|
|
20
20
|
"@tanstack/react-query": "5.62.3",
|
|
21
21
|
"react": "^19.2.7",
|
|
22
22
|
"react-dom": "^19.2.7",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"@lezer/highlight": "^1.1.6",
|
|
52
52
|
"@noble/hashes": "^1.8.0",
|
|
53
53
|
"@opentelemetry/api": "1.9.1",
|
|
54
|
-
"@redocly/openapi-core": "2.
|
|
54
|
+
"@redocly/openapi-core": "2.58.1",
|
|
55
55
|
"@redocly/replay-asyncapi-sdk": "0.0.1",
|
|
56
|
-
"@redocly/respect-core": "2.
|
|
56
|
+
"@redocly/respect-core": "2.58.1",
|
|
57
57
|
"@redocly/vscode-json-languageservice": "^3.4.9",
|
|
58
58
|
"@redocly/tooling-test-utils": "0.0.0",
|
|
59
59
|
"@tauri-apps/api": "2.4.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./replay-index-CI5fXezW.js"),s=require("./replay-lint-DviuCvyd.js"),o=require("./replay-resolve-DXK9kMSh.js");function j(e){return(p.pathBrowserifyExports.extname(e)===".yaml"||p.pathBrowserifyExports.extname(e)===".yml")&&!1}function k(e){return p.isPlainObject(e)&&!s.isEmptyObject(e)}async function w(e){return new Promise(t=>setTimeout(t,e))}function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}const S="type",v=["api-description","api-operation","data-schema"];function _(e,t){const{ctx:n}=s.getNodeTypesFromJSONSchema("EntityFileDefault",t),{ctx:i,discriminatorResolver:r}=s.getNodeTypesFromJSONSchema("EntityFile",e);return{entityTypes:{...n,...i,EntityFileArray:{properties:{},items:y=>{if(p.isPlainObject(y)){const m=y[S];if(!m)return"Entity";const l=r?.(y,m);if(l&&typeof l=="string")return l}return"Entity"}}},discriminatorResolver:r}}function c(e,t){if(o.isRef(t.parent))return;const n=t.key.toString(),i=e.counts??={};i[n]=(i[n]??0)+1}function O(e){for(const r of Object.values(e))r.items&&(r.total=r.items.size);const{xExtensions:t}=e,n=t.counts??{},i=Object.keys(n).sort();t.total=i.length,t.counts=Object.fromEntries(i.map(r=>[r,n[r]]))}const z=e=>({SpecExtension:{enter(t,n){c(e.xExtensions,n)}},XCodeSampleList:{enter(t,n){c(e.xExtensions,n)}},ExamplesMap:{enter(t,n){n.key.toString()==="x-examples"&&c(e.xExtensions,n)}},EnumDescriptions:{enter(t,n){c(e.xExtensions,n)}},TagGroups:{enter(t,n){c(e.xExtensions,n)}},Logo:{enter(t,n){c(e.xExtensions,n)}},XServerList:{enter(t,n){c(e.xExtensions,n)}},XUsePkce:{enter(t,n){c(e.xExtensions,n)}},Operation:{enter(t,n){n.key.toString()==="x-query"&&c(e.xExtensions,n)}},ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(t){e.refs.items.add(t.$ref)}},Tag:{leave(t){e.tags.items.add(t.name)}},Link:{leave(t){e.links.items.add(t.operationId)}},WebhooksMap:{enter(t,n){n.key.toString()==="x-webhooks"&&c(e.xExtensions,n)},Operation:{leave(t){if(e.webhooks.total++,t.tags)for(const n of t.tags)e.tags.items.add(n)}}},Paths:{PathItem:{leave(){e.pathItems.total++},Operation:{leave(t){if(e.operations.total++,t.tags)for(const n of t.tags)e.tags.items.add(n)}},Parameter:{leave(t){e.parameters.items.add(t.name)}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){O(e)}}}),V=e=>({SpecExtension:{enter(t,n){c(e.xExtensions,n)}},ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(t){e.refs.items.add(t.$ref)}},Tag:{leave(t){e.tags.items.add(t.name)}},ChannelMap:{Channel:{leave(){e.channels.total++},Operation:{leave(t){if(e.operations.total++,t.tags)for(const n of t.tags)e.tags.items.add(n)}},Parameter:{leave(t,{key:n}){e.parameters.items.add(n.toString())}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){O(e)}}}),G=e=>({SpecExtension:{enter(t,n){c(e.xExtensions,n)}},ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(t){e.refs.items.add(t.$ref)}},Tag:{leave(t){e.tags.items.add(t.name)}},NamedChannels:{Channel:{leave(){e.channels.total++},Parameter:{leave(t,{key:n}){e.parameters.items.add(n.toString())}}}},NamedOperations:{Operation:{leave(t){if(e.operations.total++,t.tags)for(const n of t.tags)e.tags.items.add(n)}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){O(e)}}}),U=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,b=2,x=150,B=()=>({any(e,{report:t,location:n}){if(p.isPlainObject(e)&&"key"in e){const i=e.key;if(typeof i!="string"){t({message:"Entity `key` must be a string.",location:n.child(["key"])});return}i.length<b&&t({message:`Entity 'key' must be at least ${b} characters long.`,location:n.child(["key"])}),i.length>x&&t({message:`Entity 'key' must not exceed ${x} characters.`,location:n.child(["key"])}),U.test(i)||t({message:"Entity `key` must contain only lowercase letters, numbers, and hyphens, and cannot start or end with a hyphen.",location:n.child(["key"])})}}});function P(e,t){const i=t.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")+e;return Object.values(s.t).includes(i)?i:e}function M(e,t){const n={};for(const[i,r]of Object.entries(t))if(R(i,r)){if(r.severity==="off")continue;n[i]={...q(e,i,r)}}else n[i]=r;return n}function Y(e){const t={},n={};for(const[i,r]of Object.entries(e))if(R(i,r)){const a=r;A(a)?t[i]=a:n[i]=a}else n[i]=r;return{entityRules:t,apiRules:n}}function $(e,t,n){if(!p.isPlainObject(n.parsed)||!p.isPlainObject(n.parsed.components))return null;const i=n.parsed.components,r="schemas"in i?i.schemas:void 0;if(!r||!(e in r))return null;const a=r[e];try{const y=JSON.parse(t);if(s.dequal(a,y))return a}catch{return null}return null}function R(e,t){return e.startsWith("rule/")&&p.isPlainObject(t)}function A(e){return Object.values(s.t).some(t=>e.subject.type===t)}function q(e,t,n){const i=P(n.subject.type,e),r=n.where?.map(a=>({...a,subject:{...a.subject,type:P(a.subject.type,e)}}));return{assertionId:t,subject:{...n.subject,type:i},assertions:n.assertions,...r&&{where:r},...n.message&&{message:n.message},...n.severity&&{severity:n.severity}}}async function N(e){const{document:t,entitySchema:n,entityDefaultSchema:i,severity:r,externalRefResolver:a=new o.BaseResolver,assertionConfig:y={}}=e,m={problems:[],specVersion:"entity",visitorsData:{}},{entityTypes:l,discriminatorResolver:g}=_(n,i),d=o.normalizeTypes(l);let f=d.Entity;if(Array.isArray(t.parsed))f=d.EntityFileArray;else if(p.isPlainObject(t.parsed)){const h=t.parsed[S];if(!h)f=d.Entity;else{const T=g?.(t.parsed,h);T&&typeof T=="string"&&d[T]&&(f=d[T])}}const E=s.Assertions(y),u=Array.isArray(E)?E.map(h=>({severity:r||"error",ruleId:"entity assertions",visitor:h})):[{severity:r||"error",ruleId:"entity assertions",visitor:E}],C=[{severity:r||"error",ruleId:"entity struct",visitor:s.Struct()},{severity:r||"error",ruleId:"entity no-unresolved-refs",visitor:s.NoUnresolvedRefs()},{severity:r||"error",ruleId:"entity key-valid",visitor:B()},...u],D=s.normalizeVisitors(C,d),F=await o.resolveDocument({rootDocument:t,rootType:f,externalRefResolver:a});return s.walkDocument({document:t,rootType:f,normalizedVisitors:D,resolvedRefMap:F,ctx:m}),m.problems}async function H(e,t,n){if(!t.rules)throw new Error(`Scorecard level "${t.name}" has no rules defined.`);const i=new o.BaseResolver,r=o.makeDocumentFromString(JSON.stringify(e,null,2),"entity"),a=r.parsed[S],y=M(a||"unknown",t.rules),{entityRules:m,apiRules:l}=Y(y),g=await N({document:r,entitySchema:s.Ds,entityDefaultSchema:s._s,externalRefResolver:i,assertionConfig:m});if(v.includes(e.type)){if(Object.keys(l).length===0)return g;if(!n)throw new Error(`Document is required for entity type "${e.type}". Provide the source API document to lint API rules.`);if(e.type==="data-schema"&&e.metadata?.schema){Object.values(l).forEach(u=>{if(p.isPlainObject(u)&&p.isPlainObject(u.subject)&&u.subject.type!=="Schema")throw new Error(`API rules for "data-schema" entity must target Schema subject, but found "${u.subject.type}".`)});const f=$(e.title,e.metadata.schema,n);if(!f)throw new Error(`Schema "${e.title}" not found in the document. Ensure the schema exists in components.schemas.`);const E=await I({schema:f,schemaKey:e.title,config:await s.createConfig({rules:l}),specType:e.metadata.specType,sourceDocument:n,externalRefResolver:i});return[...g,...E]}const d=await s.lintDocument({document:n,externalRefResolver:i,config:await s.createConfig({rules:l})});return[...g,...d]}else if(!s.isEmptyObject(l))throw new Error(`API rules are not supported for entity type "${e.type}". Only ${v.join(", ")} support API rules.`);return g}async function I(e){const{schema:t,schemaKey:n,config:i,sourceDocument:r,specType:a,externalRefResolver:y=new o.BaseResolver(i.resolve)}=e,m=r.parsed,l=m[a],g=m.info,d=o.makeDocumentFromString(JSON.stringify({[a]:l,info:g,components:{schemas:{[n]:t}}},null,2),r?.source.absoluteRef||`schema:${n}`);return(await s.lintDocument({document:d,config:i,externalRefResolver:y})).filter(E=>E.location.some(u=>u.pointer?.includes(`/components/schemas/${n}`)))}class J extends Error{}class K extends Error{}exports.isPlainObject=p.isPlainObject;exports.Arazzo1Types=s.Arazzo1Types;exports.Arazzo1_1Types=s.Arazzo1_1Types;exports.AsyncApi2Types=s.AsyncApi2Types;exports.AsyncApi3Types=s.AsyncApi3Types;exports.CONFIG_BUNDLER_VISITOR_ID=s.CONFIG_BUNDLER_VISITOR_ID;exports.CONFIG_FILE_NAME=s.CONFIG_FILE_NAME;exports.Config=s.Config;exports.ConfigTypes=s.ConfigTypes;exports.ConfigValidationError=s.ConfigValidationError;exports.DEFAULT_CONFIG=s.DEFAULT_CONFIG;exports.DEFAULT_PROJECT_PLUGIN_PATHS=s.DEFAULT_PROJECT_PLUGIN_PATHS;exports.IGNORE_BANNER=s.IGNORE_BANNER;exports.IGNORE_FILE=s.IGNORE_FILE;exports.Oas2Types=s.Oas2Types;exports.Oas3Types=s.Oas3Types;exports.Oas3_1Types=s.Oas3_1Types;exports.Oas3_2Types=s.Oas3_2Types;exports.OpenRpcTypes=s.OpenRpcTypes;exports.Overlay1Types=s.Overlay1Types;exports.PLUGINS_COLLECTOR_VISITOR_ID=s.PLUGINS_COLLECTOR_VISITOR_ID;exports.bundle=s.bundle;exports.bundleDocument=s.bundleDocument;exports.bundleFromString=s.bundleFromString;exports.clearPluginsCache=s.clearPluginsCache;exports.createConfig=s.createConfig;exports.createConfigTypes=s.createConfigTypes;exports.dequal=s.dequal;exports.detectSpec=s.detectSpec;exports.findConfig=s.findConfig;exports.formatProblems=s.formatProblems;exports.getAstNodeByPointer=s.getAstNodeByPointer;exports.getCodeframe=s.getCodeframe;exports.getLineColLocation=s.getLineColLocation;exports.getMajorSpecVersion=s.getMajorSpecVersion;exports.getPluginCacheVersion=s.getPluginCacheVersion;exports.getTotals=s.getTotals;exports.getTypes=s.getTypes;exports.isEmptyObject=s.isEmptyObject;exports.isNotEmptyArray=s.isNotEmptyArray;exports.isString=s.isString;exports.keysOf=s.keysOf;exports.lint=s.lint;exports.lintConfig=s.lintConfig;exports.lintDocument=s.lintDocument;exports.lintFromString=s.lintFromString;exports.loadConfig=s.loadConfig;exports.loadIgnoreConfig=s.loadIgnoreConfig;exports.logger=s.logger;exports.mapTypeToComponent=s.mapTypeToComponent;exports.normalizeVisitors=s.normalizeVisitors;exports.pluralize=s.pluralize;exports.regexFromString=s.regexFromString;exports.resolvePlugins=s.resolvePlugins;exports.slash=s.slash;exports.validate=s.lint;exports.walkDocument=s.walkDocument;exports.xmlEscape=s.xmlEscape;exports.BaseResolver=o.BaseResolver;exports.ResolveError=o.ResolveError;exports.Source=o.Source;exports.YamlParseError=o.YamlParseError;exports.escapePointerFragment=o.escapePointerFragment;exports.getDir=o.getDir;exports.isAbsoluteUrl=o.isAbsoluteUrl;exports.isBrowser=o.isBrowser;exports.isGraphqlRef=o.isGraphqlRef;exports.isMappingRef=o.isMappingRef;exports.isRef=o.isRef;exports.isSupportedExtension=o.isSupportedExtension;exports.isTruthy=o.isTruthy;exports.makeDocumentFromString=o.makeDocumentFromString;exports.normalizeTypes=o.normalizeTypes;exports.parseYaml=o.parseYaml;exports.readFileFromUrl=o.readFileFromUrl;exports.resolveDocument=o.resolveDocument;exports.resolvePath=o.resolvePath;exports.stringifyYaml=o.stringifyYaml;exports.unescapePointerFragment=o.unescapePointerFragment;exports.AbortFlowError=K;exports.HandledError=J;exports.StatsAsync2=V;exports.StatsAsync3=G;exports.StatsOAS=z;exports.capitalize=L;exports.createEntityTypes=_;exports.doesYamlFileExist=j;exports.isNotEmptyObject=k;exports.lintEntityFile=N;exports.lintEntityWithScorecardLevel=H;exports.lintSchema=I;exports.pause=w;
|