@redocly/replay 0.27.0 → 0.27.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.
Files changed (51) hide show
  1. package/dist/{replay-AiChatProvider-LQhrLIDL.js → replay-AiChatProvider-Cdve_kxz.js} +6 -6
  2. package/dist/{replay-AiChatProvider-Oms5CFgT.js → replay-AiChatProvider-IuOVaWMC.js} +1 -1
  3. package/dist/{replay-AiChatSqliteDBStorage-3-p1mthX.js → replay-AiChatSqliteDBStorage-B3aaY0Uo.js} +1 -1
  4. package/dist/{replay-AiChatSqliteDBStorage-GZibdHOQ.js → replay-AiChatSqliteDBStorage-jEhfZgK3.js} +1 -1
  5. package/dist/{replay-AiPanel-BvwwBTh1.js → replay-AiPanel-0GXuobhF.js} +1 -1
  6. package/dist/{replay-AiPanel-lcDNvgo0.js → replay-AiPanel-BT_RLVeR.js} +4 -4
  7. package/dist/{replay-FileWatcher-DR-wJLe2.js → replay-FileWatcher-CtHVgewC.js} +2 -2
  8. package/dist/{replay-FileWatcher-ClVd_wG0.js → replay-FileWatcher-NkpXJA-C.js} +1 -1
  9. package/dist/{replay-SemanticSearchService-CCqwCRo6.js → replay-SemanticSearchService--QXHzf7_.js} +1 -1
  10. package/dist/{replay-SemanticSearchService-U1eXQGfF.js → replay-SemanticSearchService-DJ_jBUyi.js} +1 -1
  11. package/dist/{replay-SqliteDBStorage-Dn6DoVWW.js → replay-SqliteDBStorage-0JYq0UPY.js} +1 -1
  12. package/dist/{replay-SqliteDBStorage-d_ZK6ScA.js → replay-SqliteDBStorage-ClD7MBeX.js} +1 -1
  13. package/dist/{replay-TauriFileSystemAdapter-CpiUuG3T.js → replay-TauriFileSystemAdapter-BnSXgnQc.js} +1 -1
  14. package/dist/{replay-TauriFileSystemAdapter-dwJ0xBYr.js → replay-TauriFileSystemAdapter-BuHbmM-L.js} +1 -1
  15. package/dist/{replay-TauriRootStorage-DhzbAahU.js → replay-TauriRootStorage-B1vFT2Rg.js} +1 -1
  16. package/dist/{replay-TauriRootStorage-CuVbYMXX.js → replay-TauriRootStorage-D6K0MuWv.js} +2 -2
  17. package/dist/{replay-agent-loop-BLSu4v_O.js → replay-agent-loop-X2MrvEk-.js} +1 -1
  18. package/dist/{replay-agent-loop-DgEHdXUt.js → replay-agent-loop-jUYXZfye.js} +3 -3
  19. package/dist/{replay-ai-chat-mappers-BvfcEubB.js → replay-ai-chat-mappers-B0Ay6VKi.js} +1 -1
  20. package/dist/{replay-ai-chat-mappers-Dy2kJ7ZG.js → replay-ai-chat-mappers-sgE5XiwA.js} +1 -1
  21. package/dist/{replay-create-model-bOIDB-e8.js → replay-create-model-DB6xE5Ap.js} +3 -3
  22. package/dist/{replay-create-model-DNPFcOIp.js → replay-create-model-NrGYVueM.js} +3 -3
  23. package/dist/{replay-db-BQGv3PGw.js → replay-db-BZNR8xEd.js} +1 -1
  24. package/dist/{replay-db-CMXZZs9v.js → replay-db-BiP6dME4.js} +1 -1
  25. package/dist/{replay-external-resolver-mrykFC2h.js → replay-external-resolver-DPAdPRks.js} +2 -2
  26. package/dist/{replay-external-resolver-n5OvQMRF.js → replay-external-resolver-PLyV0HZs.js} +1 -1
  27. package/dist/{replay-index-Bc5RHu5L.js → replay-index-B2RZCGOF.js} +21 -21
  28. package/dist/{replay-index-CepJ5Z0m.js → replay-index-D85qPcEF.js} +11 -11
  29. package/dist/{replay-index-CFLu-XMV.js → replay-index-DDUSidTx.js} +2 -2
  30. package/dist/{replay-index-QXosJxRc.js → replay-index-DKNhWzy4.js} +5 -5
  31. package/dist/{replay-index-CgCGhu4l.js → replay-index-DTD47ryK.js} +1 -1
  32. package/dist/{replay-index-DDjmUXWm.js → replay-index-DmAVD_C4.js} +1 -1
  33. package/dist/{replay-index-CSR_qlua.js → replay-index-HHtp5T42.js} +1 -1
  34. package/dist/{replay-index-CHGVyIdG.js → replay-index-yAV5TCua.js} +1 -1
  35. package/dist/{replay-lint-PWaLESz5.js → replay-lint-Bico-a-1.js} +3 -3
  36. package/dist/{replay-lint-DoHQIATV.js → replay-lint-DyUeemr_.js} +3 -3
  37. package/dist/{replay-lint-graphql-xh8VoAwd.js → replay-lint-graphql-D_p-TkyV.js} +1 -1
  38. package/dist/{replay-lint-graphql-zO8zunug.js → replay-lint-graphql-pt1vf5MX.js} +1 -1
  39. package/dist/{replay-resolve-B0AjmaE9.js → replay-resolve-CQzlNcS2.js} +1 -1
  40. package/dist/{replay-resolve-MVe_8Ube.js → replay-resolve-IKJYgmPW.js} +1 -1
  41. package/dist/{replay-respect-run-X4PSO6Fj.js → replay-respect-run-CtDn7oS8.js} +3 -3
  42. package/dist/{replay-respect-run-BJsR4a4m.js → replay-respect-run-rx_nPWZM.js} +1 -1
  43. package/dist/{replay-tauri-path-CkGiQWsb.js → replay-tauri-path-DrwBKGJP.js} +2 -2
  44. package/dist/{replay-tauri-path-D8FJsoZb.js → replay-tauri-path-iA6pF5e0.js} +1 -1
  45. package/dist/{replay-useAiChatQueries-BXL-_N2Q.js → replay-useAiChatQueries-BIZfilWh.js} +1 -1
  46. package/dist/{replay-useAiChatQueries-D7sHNAfV.js → replay-useAiChatQueries-PECgHJpT.js} +4 -4
  47. package/dist/{replay-validate-key-CmzSfORv.js → replay-validate-key-CTJn216O.js} +1 -1
  48. package/dist/{replay-validate-key-CtZEJRP7.js → replay-validate-key-CvZaTfXj.js} +2 -2
  49. package/dist/replay.cjs +1 -1
  50. package/dist/replay.js +1 -1
  51. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
- import { g as l } from "./replay-SemanticSearchService-U1eXQGfF.js";
2
- import { S as x, e as y, a as D, b as E } from "./replay-SemanticSearchService-U1eXQGfF.js";
1
+ import { g as l } from "./replay-SemanticSearchService-DJ_jBUyi.js";
2
+ import { S as x, e as y, a as D, b as E } from "./replay-SemanticSearchService-DJ_jBUyi.js";
3
3
  import { useState as a, useCallback as u } from "react";
4
4
  function f() {
5
5
  const [c, r] = a(!1), [s, t] = a(null);
@@ -1,8 +1,8 @@
1
- import { aR as u, aS as p } from "./replay-index-Bc5RHu5L.js";
2
- import { i as N, g as T, d as j, t as P, A as F, S as w, N as V, n as $, w as L, C as Y, R as G, c as S, l as D } from "./replay-lint-PWaLESz5.js";
3
- import { a as fe, b as de, e as ge, f as he, h as ve, j as Ee, k as ue, m as Te, o as Se, D as Re, p as be, I as Oe, q as Ie, O as Ne, r as Pe, s as De, u as Ce, v as _e, x as xe, P as ke, y as ze, z as je, B as Fe, E as we, F as Ve, G as $e, H as Le, J as Ye, K as Ge, L as Me, M as Ue, Q as Be, T as Ke, U as We, V as He, W as Je, X as qe, Y as Xe, Z as Ze, _ as Qe, $ as Ae, a0 as es, a1 as ss, a2 as ts, a3 as as, a4 as ns, a5 as rs, a6 as is, a7 as os, Z as ls, a8 as cs } from "./replay-lint-PWaLESz5.js";
4
- import { B as v, n as M, r as U, m as C } from "./replay-resolve-MVe_8Ube.js";
5
- import { R as ps, S as ys, Y as fs, e as ds, g as gs, i as hs, a as vs, b as Es, c as us, d as Ts, f as Ss, h as Rs, p as bs, j as Os, k as Is, s as Ns, u as Ps } from "./replay-resolve-MVe_8Ube.js";
1
+ import { aR as u, aS as p } from "./replay-index-B2RZCGOF.js";
2
+ import { i as N, g as T, d as j, t as P, A as F, S as w, N as V, n as $, w as L, C as Y, R as G, c as S, l as D } from "./replay-lint-Bico-a-1.js";
3
+ import { a as fe, b as de, e as ge, f as he, h as ve, j as Ee, k as ue, m as Te, o as Se, D as Re, p as be, I as Oe, q as Ie, O as Ne, r as Pe, s as De, u as Ce, v as _e, x as xe, P as ke, y as ze, z as je, B as Fe, E as we, F as Ve, G as $e, H as Le, J as Ye, K as Ge, L as Me, M as Ue, Q as Be, T as Ke, U as We, V as He, W as Je, X as qe, Y as Xe, Z as Ze, _ as Qe, $ as Ae, a0 as es, a1 as ss, a2 as ts, a3 as as, a4 as ns, a5 as rs, a6 as is, a7 as os, Z as ls, a8 as cs } from "./replay-lint-Bico-a-1.js";
4
+ import { B as v, n as M, r as U, m as C } from "./replay-resolve-IKJYgmPW.js";
5
+ import { R as ps, S as ys, Y as fs, e as ds, g as gs, i as hs, a as vs, b as Es, c as us, d as Ts, f as Ss, h as Rs, p as bs, j as Os, k as Is, s as Ns, u as Ps } from "./replay-resolve-IKJYgmPW.js";
6
6
  function ae(e) {
7
7
  return (u.extname(e) === ".yaml" || u.extname(e) === ".yml") && !1;
8
8
  }
@@ -1,4 +1,4 @@
1
- import { i } from "./replay-index-Bc5RHu5L.js";
1
+ import { i } from "./replay-index-B2RZCGOF.js";
2
2
  async function l(t = {}) {
3
3
  return typeof t == "object" && Object.freeze(t), await i("plugin:dialog|open", { options: t });
4
4
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-SemanticSearchService-CCqwCRo6.js"),r=require("react");function u(){const[n,c]=r.useState(!1),[s,a]=r.useState(null);return{search:r.useCallback(async(i,S=10)=>{c(!0),a(null);try{return await e.getSemanticSearchService().search(i,S)}catch(t){const o=t instanceof Error?t:new Error(String(t));return a(o),[]}finally{c(!1)}},[]),isSearching:n,error:s}}exports.SemanticSearchService=e.SemanticSearchService;exports.extractAllDocuments=e.extractAllDocuments;exports.extractApiDocuments=e.extractApiDocuments;exports.extractCollectionDocuments=e.extractCollectionDocuments;exports.getSemanticSearchService=e.getSemanticSearchService;exports.useSemanticSearch=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-SemanticSearchService--QXHzf7_.js"),r=require("react");function u(){const[n,c]=r.useState(!1),[s,a]=r.useState(null);return{search:r.useCallback(async(i,S=10)=>{c(!0),a(null);try{return await e.getSemanticSearchService().search(i,S)}catch(t){const o=t instanceof Error?t:new Error(String(t));return a(o),[]}finally{c(!1)}},[]),isSearching:n,error:s}}exports.SemanticSearchService=e.SemanticSearchService;exports.extractAllDocuments=e.extractAllDocuments;exports.extractApiDocuments=e.extractApiDocuments;exports.extractCollectionDocuments=e.extractCollectionDocuments;exports.getSemanticSearchService=e.getSemanticSearchService;exports.useSemanticSearch=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-CepJ5Z0m.js");async function a(t={}){return typeof t=="object"&&Object.freeze(t),await i.invoke("plugin:dialog|open",{options:t})}async function o(t={}){return typeof t=="object"&&Object.freeze(t),await i.invoke("plugin:dialog|save",{options:t})}async function l(t,n){const e=typeof n=="string"?{title:n}:n;await i.invoke("plugin:dialog|message",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()})}async function r(t,n){const e=typeof n=="string"?{title:n}:n;return await i.invoke("plugin:dialog|ask",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()??"Yes",cancelButtonLabel:e?.cancelLabel?.toString()??"No"})}async function c(t,n){const e=typeof n=="string"?{title:n}:n;return await i.invoke("plugin:dialog|confirm",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()??"Ok",cancelButtonLabel:e?.cancelLabel?.toString()??"Cancel"})}exports.ask=r;exports.confirm=c;exports.message=l;exports.open=a;exports.save=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-D85qPcEF.js");async function a(t={}){return typeof t=="object"&&Object.freeze(t),await i.invoke("plugin:dialog|open",{options:t})}async function o(t={}){return typeof t=="object"&&Object.freeze(t),await i.invoke("plugin:dialog|save",{options:t})}async function l(t,n){const e=typeof n=="string"?{title:n}:n;await i.invoke("plugin:dialog|message",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()})}async function r(t,n){const e=typeof n=="string"?{title:n}:n;return await i.invoke("plugin:dialog|ask",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()??"Yes",cancelButtonLabel:e?.cancelLabel?.toString()??"No"})}async function c(t,n){const e=typeof n=="string"?{title:n}:n;return await i.invoke("plugin:dialog|confirm",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()??"Ok",cancelButtonLabel:e?.cancelLabel?.toString()??"Cancel"})}exports.ask=r;exports.confirm=c;exports.message=l;exports.open=a;exports.save=o;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./replay-index-CepJ5Z0m.js"),t=require("./replay-lint-DoHQIATV.js"),o=require("./replay-resolve-B0AjmaE9.js");function F(e){return(c.pathBrowserifyExports.extname(e)===".yaml"||c.pathBrowserifyExports.extname(e)===".yml")&&!1}function j(e){return c.isPlainObject(e)&&!t.isEmptyObject(e)}async function z(e){return new Promise(s=>setTimeout(s,e))}const T="type",v=["api-description","api-operation","data-schema"];function P(e,s){const{ctx:n}=t.getNodeTypesFromJSONSchema("EntityFileDefault",s),{ctx:i,discriminatorResolver:r}=t.getNodeTypesFromJSONSchema("EntityFile",e);return{entityTypes:{...n,...i,EntityFileArray:{properties:{},items:p=>{if(c.isPlainObject(p)){const y=p[T];if(!y)return"Entity";const l=r?.(p,y);if(l&&typeof l=="string")return l}return"Entity"}}},discriminatorResolver:r}}const k=e=>({ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(s){e.refs.items.add(s.$ref)}},Tag:{leave(s){e.tags.items.add(s.name)}},Link:{leave(s){e.links.items.add(s.operationId)}},WebhooksMap:{Operation:{leave(s){if(e.webhooks.total++,s.tags)for(const n of s.tags)e.tags.items.add(n)}}},Paths:{PathItem:{leave(){e.pathItems.total++},Operation:{leave(s){if(e.operations.total++,s.tags)for(const n of s.tags)e.tags.items.add(n)}},Parameter:{leave(s){e.parameters.items.add(s.name)}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){e.parameters.total=e.parameters.items.size,e.refs.total=e.refs.items.size,e.links.total=e.links.items.size,e.tags.total=e.tags.items.size}}}),x=e=>({ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(s){e.refs.items.add(s.$ref)}},Tag:{leave(s){e.tags.items.add(s.name)}},ChannelMap:{Channel:{leave(){e.channels.total++},Operation:{leave(s){if(e.operations.total++,s.tags)for(const n of s.tags)e.tags.items.add(n)}},Parameter:{leave(s){s.name&&e.parameters.items.add(s.name)}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){e.parameters.total=e.parameters.items.size,e.refs.total=e.refs.items.size,e.tags.total=e.tags.items.size}}}),w=e=>({ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(s){e.refs.items.add(s.$ref)}},Tag:{leave(s){e.tags.items.add(s.name)}},NamedChannels:{Channel:{leave(){e.channels.total++},Parameter:{leave(s){s.name&&e.parameters.items.add(s.name)}}}},NamedOperations:{Operation:{leave(s){if(e.operations.total++,s.tags)for(const n of s.tags)e.tags.items.add(n)}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){e.parameters.total=e.parameters.items.size,e.refs.total=e.refs.items.size,e.tags.total=e.tags.items.size}}}),L=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,O=2,S=150,V=()=>({any(e,{report:s,location:n}){if(c.isPlainObject(e)&&"key"in e){const i=e.key;if(typeof i!="string"){s({message:"Entity `key` must be a string.",location:n.child(["key"])});return}i.length<O&&s({message:`Entity 'key' must be at least ${O} characters long.`,location:n.child(["key"])}),i.length>S&&s({message:`Entity 'key' must not exceed ${S} characters.`,location:n.child(["key"])}),L.test(i)||s({message:"Entity `key` must contain only lowercase letters, numbers, and hyphens, and cannot start or end with a hyphen.",location:n.child(["key"])})}}});function b(e,s){const i=s.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")+e;return Object.values(t.t).includes(i)?i:e}function G(e,s){const n={};for(const[i,r]of Object.entries(s))if(R(i,r)){if(r.severity==="off")continue;n[i]={...Y(e,i,r)}}else n[i]=r;return n}function U(e){const s={},n={};for(const[i,r]of Object.entries(e))if(R(i,r)){const a=r;M(a)?s[i]=a:n[i]=a}else n[i]=r;return{entityRules:s,apiRules:n}}function B(e,s,n){if(!c.isPlainObject(n.parsed)||!c.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 p=JSON.parse(s);if(t.dequal(a,p))return a}catch{return null}return null}function R(e,s){return e.startsWith("rule/")&&c.isPlainObject(s)}function M(e){return Object.values(t.t).some(s=>e.subject.type===s)}function Y(e,s,n){const i=b(n.subject.type,e),r=n.where?.map(a=>({...a,subject:{...a.subject,type:b(a.subject.type,e)}}));return{assertionId:s,subject:{...n.subject,type:i},assertions:n.assertions,...r&&{where:r},...n.message&&{message:n.message},...n.severity&&{severity:n.severity}}}async function I(e){const{document:s,entitySchema:n,entityDefaultSchema:i,severity:r,externalRefResolver:a=new o.BaseResolver,assertionConfig:p={}}=e,y={problems:[],specVersion:"entity",visitorsData:{}},{entityTypes:l,discriminatorResolver:d}=P(n,i),m=o.normalizeTypes(l);let f=m.Entity;if(Array.isArray(s.parsed))f=m.EntityFileArray;else if(c.isPlainObject(s.parsed)){const u=s.parsed[T];if(!u)f=m.Entity;else{const E=d?.(s.parsed,u);E&&typeof E=="string"&&m[E]&&(f=m[E])}}const h=t.Assertions(p),g=Array.isArray(h)?h.map(u=>({severity:r||"error",ruleId:"entity assertions",visitor:u})):[{severity:r||"error",ruleId:"entity assertions",visitor:h}],C=[{severity:r||"error",ruleId:"entity struct",visitor:t.Struct()},{severity:r||"error",ruleId:"entity no-unresolved-refs",visitor:t.NoUnresolvedRefs()},{severity:r||"error",ruleId:"entity key-valid",visitor:V()},...g],D=t.normalizeVisitors(C,m),_=await o.resolveDocument({rootDocument:s,rootType:f,externalRefResolver:a});return t.walkDocument({document:s,rootType:f,normalizedVisitors:D,resolvedRefMap:_,ctx:y}),y.problems}async function $(e,s,n){if(!s.rules)throw new Error(`Scorecard level "${s.name}" has no rules defined.`);const i=new o.BaseResolver,r=o.makeDocumentFromString(JSON.stringify(e,null,2),"entity"),a=r.parsed[T],p=G(a||"unknown",s.rules),{entityRules:y,apiRules:l}=U(p),d=await I({document:r,entitySchema:t.Cs,entityDefaultSchema:t.Rs,externalRefResolver:i,assertionConfig:y});if(v.includes(e.type)){if(Object.keys(l).length===0)return d;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(g=>{if(c.isPlainObject(g)&&c.isPlainObject(g.subject)&&g.subject.type!=="Schema")throw new Error(`API rules for "data-schema" entity must target Schema subject, but found "${g.subject.type}".`)});const f=B(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 h=await N({schema:f,schemaKey:e.title,config:await t.createConfig({rules:l}),specType:e.metadata.specType,sourceDocument:n,externalRefResolver:i});return[...d,...h]}const m=await t.lintDocument({document:n,externalRefResolver:i,config:await t.createConfig({rules:l})});return[...d,...m]}else if(!t.isEmptyObject(l))throw new Error(`API rules are not supported for entity type "${e.type}". Only ${v.join(", ")} support API rules.`);return d}async function N(e){const{schema:s,schemaKey:n,config:i,sourceDocument:r,specType:a,externalRefResolver:p=new o.BaseResolver(i.resolve)}=e,y=r.parsed,l=y[a],d=y.info,m=o.makeDocumentFromString(JSON.stringify({[a]:l,info:d,components:{schemas:{[n]:s}}},null,2),r?.source.absoluteRef||`schema:${n}`);return(await t.lintDocument({document:m,config:i,externalRefResolver:p})).filter(h=>h.location.some(g=>g.pointer?.includes(`/components/schemas/${n}`)))}class q extends Error{}exports.isPlainObject=c.isPlainObject;exports.Arazzo1Types=t.Arazzo1Types;exports.Arazzo1_1Types=t.Arazzo1_1Types;exports.AsyncApi2Types=t.AsyncApi2Types;exports.AsyncApi3Types=t.AsyncApi3Types;exports.CONFIG_BUNDLER_VISITOR_ID=t.CONFIG_BUNDLER_VISITOR_ID;exports.CONFIG_FILE_NAME=t.CONFIG_FILE_NAME;exports.Config=t.Config;exports.ConfigTypes=t.ConfigTypes;exports.ConfigValidationError=t.ConfigValidationError;exports.DEFAULT_CONFIG=t.DEFAULT_CONFIG;exports.DEFAULT_PROJECT_PLUGIN_PATHS=t.DEFAULT_PROJECT_PLUGIN_PATHS;exports.IGNORE_BANNER=t.IGNORE_BANNER;exports.IGNORE_FILE=t.IGNORE_FILE;exports.Oas2Types=t.Oas2Types;exports.Oas3Types=t.Oas3Types;exports.Oas3_1Types=t.Oas3_1Types;exports.Oas3_2Types=t.Oas3_2Types;exports.OpenRpcTypes=t.OpenRpcTypes;exports.Overlay1Types=t.Overlay1Types;exports.PLUGINS_COLLECTOR_VISITOR_ID=t.PLUGINS_COLLECTOR_VISITOR_ID;exports.bundle=t.bundle;exports.bundleDocument=t.bundleDocument;exports.bundleFromString=t.bundleFromString;exports.clearPluginsCache=t.clearPluginsCache;exports.createConfig=t.createConfig;exports.createConfigTypes=t.createConfigTypes;exports.dequal=t.dequal;exports.detectSpec=t.detectSpec;exports.findConfig=t.findConfig;exports.formatProblems=t.formatProblems;exports.getAstNodeByPointer=t.getAstNodeByPointer;exports.getCodeframe=t.getCodeframe;exports.getLineColLocation=t.getLineColLocation;exports.getMajorSpecVersion=t.getMajorSpecVersion;exports.getPluginCacheVersion=t.getPluginCacheVersion;exports.getTotals=t.getTotals;exports.getTypes=t.getTypes;exports.isEmptyObject=t.isEmptyObject;exports.isNotEmptyArray=t.isNotEmptyArray;exports.isString=t.isString;exports.keysOf=t.keysOf;exports.lint=t.lint;exports.lintConfig=t.lintConfig;exports.lintDocument=t.lintDocument;exports.lintFromString=t.lintFromString;exports.loadConfig=t.loadConfig;exports.loadIgnoreConfig=t.loadIgnoreConfig;exports.logger=t.logger;exports.mapTypeToComponent=t.mapTypeToComponent;exports.normalizeVisitors=t.normalizeVisitors;exports.pluralize=t.pluralize;exports.regexFromString=t.regexFromString;exports.resolvePlugins=t.resolvePlugins;exports.slash=t.slash;exports.validate=t.lint;exports.walkDocument=t.walkDocument;exports.xmlEscape=t.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.HandledError=q;exports.StatsAsync2=x;exports.StatsAsync3=w;exports.StatsOAS=k;exports.createEntityTypes=P;exports.doesYamlFileExist=F;exports.isNotEmptyObject=j;exports.lintEntityFile=I;exports.lintEntityWithScorecardLevel=$;exports.lintSchema=N;exports.pause=z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./replay-index-D85qPcEF.js"),t=require("./replay-lint-DyUeemr_.js"),o=require("./replay-resolve-CQzlNcS2.js");function F(e){return(c.pathBrowserifyExports.extname(e)===".yaml"||c.pathBrowserifyExports.extname(e)===".yml")&&!1}function j(e){return c.isPlainObject(e)&&!t.isEmptyObject(e)}async function z(e){return new Promise(s=>setTimeout(s,e))}const T="type",v=["api-description","api-operation","data-schema"];function P(e,s){const{ctx:n}=t.getNodeTypesFromJSONSchema("EntityFileDefault",s),{ctx:i,discriminatorResolver:r}=t.getNodeTypesFromJSONSchema("EntityFile",e);return{entityTypes:{...n,...i,EntityFileArray:{properties:{},items:p=>{if(c.isPlainObject(p)){const y=p[T];if(!y)return"Entity";const l=r?.(p,y);if(l&&typeof l=="string")return l}return"Entity"}}},discriminatorResolver:r}}const k=e=>({ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(s){e.refs.items.add(s.$ref)}},Tag:{leave(s){e.tags.items.add(s.name)}},Link:{leave(s){e.links.items.add(s.operationId)}},WebhooksMap:{Operation:{leave(s){if(e.webhooks.total++,s.tags)for(const n of s.tags)e.tags.items.add(n)}}},Paths:{PathItem:{leave(){e.pathItems.total++},Operation:{leave(s){if(e.operations.total++,s.tags)for(const n of s.tags)e.tags.items.add(n)}},Parameter:{leave(s){e.parameters.items.add(s.name)}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){e.parameters.total=e.parameters.items.size,e.refs.total=e.refs.items.size,e.links.total=e.links.items.size,e.tags.total=e.tags.items.size}}}),x=e=>({ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(s){e.refs.items.add(s.$ref)}},Tag:{leave(s){e.tags.items.add(s.name)}},ChannelMap:{Channel:{leave(){e.channels.total++},Operation:{leave(s){if(e.operations.total++,s.tags)for(const n of s.tags)e.tags.items.add(n)}},Parameter:{leave(s){s.name&&e.parameters.items.add(s.name)}}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){e.parameters.total=e.parameters.items.size,e.refs.total=e.refs.items.size,e.tags.total=e.tags.items.size}}}),w=e=>({ExternalDocs:{leave(){e.externalDocs.total++}},ref:{enter(s){e.refs.items.add(s.$ref)}},Tag:{leave(s){e.tags.items.add(s.name)}},NamedChannels:{Channel:{leave(){e.channels.total++},Parameter:{leave(s){s.name&&e.parameters.items.add(s.name)}}}},NamedOperations:{Operation:{leave(s){if(e.operations.total++,s.tags)for(const n of s.tags)e.tags.items.add(n)}}},NamedSchemas:{Schema:{leave(){e.schemas.total++}}},Root:{leave(){e.parameters.total=e.parameters.items.size,e.refs.total=e.refs.items.size,e.tags.total=e.tags.items.size}}}),L=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,O=2,S=150,V=()=>({any(e,{report:s,location:n}){if(c.isPlainObject(e)&&"key"in e){const i=e.key;if(typeof i!="string"){s({message:"Entity `key` must be a string.",location:n.child(["key"])});return}i.length<O&&s({message:`Entity 'key' must be at least ${O} characters long.`,location:n.child(["key"])}),i.length>S&&s({message:`Entity 'key' must not exceed ${S} characters.`,location:n.child(["key"])}),L.test(i)||s({message:"Entity `key` must contain only lowercase letters, numbers, and hyphens, and cannot start or end with a hyphen.",location:n.child(["key"])})}}});function b(e,s){const i=s.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")+e;return Object.values(t.t).includes(i)?i:e}function G(e,s){const n={};for(const[i,r]of Object.entries(s))if(R(i,r)){if(r.severity==="off")continue;n[i]={...Y(e,i,r)}}else n[i]=r;return n}function U(e){const s={},n={};for(const[i,r]of Object.entries(e))if(R(i,r)){const a=r;M(a)?s[i]=a:n[i]=a}else n[i]=r;return{entityRules:s,apiRules:n}}function B(e,s,n){if(!c.isPlainObject(n.parsed)||!c.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 p=JSON.parse(s);if(t.dequal(a,p))return a}catch{return null}return null}function R(e,s){return e.startsWith("rule/")&&c.isPlainObject(s)}function M(e){return Object.values(t.t).some(s=>e.subject.type===s)}function Y(e,s,n){const i=b(n.subject.type,e),r=n.where?.map(a=>({...a,subject:{...a.subject,type:b(a.subject.type,e)}}));return{assertionId:s,subject:{...n.subject,type:i},assertions:n.assertions,...r&&{where:r},...n.message&&{message:n.message},...n.severity&&{severity:n.severity}}}async function I(e){const{document:s,entitySchema:n,entityDefaultSchema:i,severity:r,externalRefResolver:a=new o.BaseResolver,assertionConfig:p={}}=e,y={problems:[],specVersion:"entity",visitorsData:{}},{entityTypes:l,discriminatorResolver:d}=P(n,i),m=o.normalizeTypes(l);let f=m.Entity;if(Array.isArray(s.parsed))f=m.EntityFileArray;else if(c.isPlainObject(s.parsed)){const u=s.parsed[T];if(!u)f=m.Entity;else{const E=d?.(s.parsed,u);E&&typeof E=="string"&&m[E]&&(f=m[E])}}const h=t.Assertions(p),g=Array.isArray(h)?h.map(u=>({severity:r||"error",ruleId:"entity assertions",visitor:u})):[{severity:r||"error",ruleId:"entity assertions",visitor:h}],C=[{severity:r||"error",ruleId:"entity struct",visitor:t.Struct()},{severity:r||"error",ruleId:"entity no-unresolved-refs",visitor:t.NoUnresolvedRefs()},{severity:r||"error",ruleId:"entity key-valid",visitor:V()},...g],D=t.normalizeVisitors(C,m),_=await o.resolveDocument({rootDocument:s,rootType:f,externalRefResolver:a});return t.walkDocument({document:s,rootType:f,normalizedVisitors:D,resolvedRefMap:_,ctx:y}),y.problems}async function $(e,s,n){if(!s.rules)throw new Error(`Scorecard level "${s.name}" has no rules defined.`);const i=new o.BaseResolver,r=o.makeDocumentFromString(JSON.stringify(e,null,2),"entity"),a=r.parsed[T],p=G(a||"unknown",s.rules),{entityRules:y,apiRules:l}=U(p),d=await I({document:r,entitySchema:t.Cs,entityDefaultSchema:t.Rs,externalRefResolver:i,assertionConfig:y});if(v.includes(e.type)){if(Object.keys(l).length===0)return d;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(g=>{if(c.isPlainObject(g)&&c.isPlainObject(g.subject)&&g.subject.type!=="Schema")throw new Error(`API rules for "data-schema" entity must target Schema subject, but found "${g.subject.type}".`)});const f=B(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 h=await N({schema:f,schemaKey:e.title,config:await t.createConfig({rules:l}),specType:e.metadata.specType,sourceDocument:n,externalRefResolver:i});return[...d,...h]}const m=await t.lintDocument({document:n,externalRefResolver:i,config:await t.createConfig({rules:l})});return[...d,...m]}else if(!t.isEmptyObject(l))throw new Error(`API rules are not supported for entity type "${e.type}". Only ${v.join(", ")} support API rules.`);return d}async function N(e){const{schema:s,schemaKey:n,config:i,sourceDocument:r,specType:a,externalRefResolver:p=new o.BaseResolver(i.resolve)}=e,y=r.parsed,l=y[a],d=y.info,m=o.makeDocumentFromString(JSON.stringify({[a]:l,info:d,components:{schemas:{[n]:s}}},null,2),r?.source.absoluteRef||`schema:${n}`);return(await t.lintDocument({document:m,config:i,externalRefResolver:p})).filter(h=>h.location.some(g=>g.pointer?.includes(`/components/schemas/${n}`)))}class q extends Error{}exports.isPlainObject=c.isPlainObject;exports.Arazzo1Types=t.Arazzo1Types;exports.Arazzo1_1Types=t.Arazzo1_1Types;exports.AsyncApi2Types=t.AsyncApi2Types;exports.AsyncApi3Types=t.AsyncApi3Types;exports.CONFIG_BUNDLER_VISITOR_ID=t.CONFIG_BUNDLER_VISITOR_ID;exports.CONFIG_FILE_NAME=t.CONFIG_FILE_NAME;exports.Config=t.Config;exports.ConfigTypes=t.ConfigTypes;exports.ConfigValidationError=t.ConfigValidationError;exports.DEFAULT_CONFIG=t.DEFAULT_CONFIG;exports.DEFAULT_PROJECT_PLUGIN_PATHS=t.DEFAULT_PROJECT_PLUGIN_PATHS;exports.IGNORE_BANNER=t.IGNORE_BANNER;exports.IGNORE_FILE=t.IGNORE_FILE;exports.Oas2Types=t.Oas2Types;exports.Oas3Types=t.Oas3Types;exports.Oas3_1Types=t.Oas3_1Types;exports.Oas3_2Types=t.Oas3_2Types;exports.OpenRpcTypes=t.OpenRpcTypes;exports.Overlay1Types=t.Overlay1Types;exports.PLUGINS_COLLECTOR_VISITOR_ID=t.PLUGINS_COLLECTOR_VISITOR_ID;exports.bundle=t.bundle;exports.bundleDocument=t.bundleDocument;exports.bundleFromString=t.bundleFromString;exports.clearPluginsCache=t.clearPluginsCache;exports.createConfig=t.createConfig;exports.createConfigTypes=t.createConfigTypes;exports.dequal=t.dequal;exports.detectSpec=t.detectSpec;exports.findConfig=t.findConfig;exports.formatProblems=t.formatProblems;exports.getAstNodeByPointer=t.getAstNodeByPointer;exports.getCodeframe=t.getCodeframe;exports.getLineColLocation=t.getLineColLocation;exports.getMajorSpecVersion=t.getMajorSpecVersion;exports.getPluginCacheVersion=t.getPluginCacheVersion;exports.getTotals=t.getTotals;exports.getTypes=t.getTypes;exports.isEmptyObject=t.isEmptyObject;exports.isNotEmptyArray=t.isNotEmptyArray;exports.isString=t.isString;exports.keysOf=t.keysOf;exports.lint=t.lint;exports.lintConfig=t.lintConfig;exports.lintDocument=t.lintDocument;exports.lintFromString=t.lintFromString;exports.loadConfig=t.loadConfig;exports.loadIgnoreConfig=t.loadIgnoreConfig;exports.logger=t.logger;exports.mapTypeToComponent=t.mapTypeToComponent;exports.normalizeVisitors=t.normalizeVisitors;exports.pluralize=t.pluralize;exports.regexFromString=t.regexFromString;exports.resolvePlugins=t.resolvePlugins;exports.slash=t.slash;exports.validate=t.lint;exports.walkDocument=t.walkDocument;exports.xmlEscape=t.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.HandledError=q;exports.StatsAsync2=x;exports.StatsAsync3=w;exports.StatsOAS=k;exports.createEntityTypes=P;exports.doesYamlFileExist=F;exports.isNotEmptyObject=j;exports.lintEntityFile=I;exports.lintEntityWithScorecardLevel=$;exports.lintSchema=N;exports.pause=z;
@@ -1,5 +1,5 @@
1
- import { aS as we, g as qn, bg as xs, aU as Xf, aR as Je, bh as Eg, bi as Os } from "./replay-index-Bc5RHu5L.js";
2
- import { l as $e, o as Ee, c as Tn, i as it, n as Rs, h as Tt, s as $g, d as Fe, p as Tg, q as kc, a as Pt, L as Jr, t as rn, Y as Zf, v as qc, w as Zo, e as Pg, f as Ig, x as ac, y as ia, z as cc, A as xg, C as Og, D as Rg, r as Rr, B as Mr, m as Cc, S as Ag, g as Ng, k as em, E as kg, F as tm, b as qg } from "./replay-resolve-MVe_8Ube.js";
1
+ import { aS as we, g as qn, bg as xs, aU as Xf, aR as Je, bh as Eg, bi as Os } from "./replay-index-B2RZCGOF.js";
2
+ import { l as $e, o as Ee, c as Tn, i as it, n as Rs, h as Tt, s as $g, d as Fe, p as Tg, q as kc, a as Pt, L as Jr, t as rn, Y as Zf, v as qc, w as Zo, e as Pg, f as Ig, x as ac, y as ia, z as cc, A as xg, C as Og, D as Rg, r as Rr, B as Mr, m as Cc, S as Ag, g as Ng, k as em, E as kg, F as tm, b as qg } from "./replay-resolve-IKJYgmPW.js";
3
3
  function lc(e, t) {
4
4
  let r, n;
5
5
  if (e === t)
@@ -33602,7 +33602,7 @@ async function Lq(e) {
33602
33602
  async function _g(e) {
33603
33603
  const { document: t, customTypes: r, externalRefResolver: n, config: i } = e;
33604
33604
  if (qg(t.source.absoluteRef)) {
33605
- const { lintGraphqlDocument: y } = await import("./replay-lint-graphql-xh8VoAwd.js");
33605
+ const { lintGraphqlDocument: y } = await import("./replay-lint-graphql-D_p-TkyV.js");
33606
33606
  return y({ document: t, config: i });
33607
33607
  }
33608
33608
  const o = Bn(t.parsed), s = i.getRulesForSpecVersion(Uh(o)), a = Rs(i.extendTypes(r ?? qs(o), o), i), c = {