@redocly/replay 0.30.0-next.1 → 0.30.0-next.2
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-BY1M1rCj.js → replay-AiChatProvider-0MlUvuGe.js} +6 -6
- package/dist/{replay-AiChatProvider-DBLnNCF8.js → replay-AiChatProvider-B2P9I5ug.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-BW2-RW_n.js → replay-AiChatSqliteDBStorage-B6euQ3b3.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-B978zufl.js → replay-AiChatSqliteDBStorage-DN3HPpIj.js} +1 -1
- package/dist/{replay-AiPanel-Cc1hhJJ-.js → replay-AiPanel-B1UfwbH9.js} +4 -4
- package/dist/{replay-AiPanel-8K1Nn8fs.js → replay-AiPanel-DLwB7Rrw.js} +1 -1
- package/dist/{replay-FileWatcher-DpvlfPhp.js → replay-FileWatcher-BezlpQyJ.js} +1 -1
- package/dist/{replay-FileWatcher-mQb0WIRZ.js → replay-FileWatcher-CVKLX2eZ.js} +2 -2
- package/dist/{replay-SemanticSearchService-Q083tFCJ.js → replay-SemanticSearchService-BLyt9-0h.js} +1 -1
- package/dist/{replay-SemanticSearchService-D4-a07SY.js → replay-SemanticSearchService-ZR8AVcxo.js} +1 -1
- package/dist/{replay-SqliteDBStorage-CGB2CnXm.js → replay-SqliteDBStorage-B0H2-Lz2.js} +1 -1
- package/dist/{replay-SqliteDBStorage-BdEDqBaQ.js → replay-SqliteDBStorage-DHHzPb7X.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-BlpeI6I1.js → replay-TauriFileSystemAdapter-COpUfLCW.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-DrnMzlvI.js → replay-TauriFileSystemAdapter-CkaGV5Gd.js} +1 -1
- package/dist/{replay-TauriRootStorage-PRPSPxCM.js → replay-TauriRootStorage-BkeH9lMX.js} +1 -1
- package/dist/{replay-TauriRootStorage-CY9J7SvB.js → replay-TauriRootStorage-CnE5o2PW.js} +2 -2
- package/dist/{replay-agent-loop-DUaYektB.js → replay-agent-loop-D5KhxDSr.js} +3 -3
- package/dist/{replay-agent-loop-DOsYsIM_.js → replay-agent-loop-Z0kCw9Qe.js} +1 -1
- package/dist/{replay-ai-chat-mappers-BS6gpCNe.js → replay-ai-chat-mappers-C0-fByZi.js} +1 -1
- package/dist/{replay-ai-chat-mappers-DawVbG8E.js → replay-ai-chat-mappers-DWTYtRox.js} +1 -1
- package/dist/{replay-create-model-CS4PGJpF.js → replay-create-model-Ct4zmmz0.js} +3 -3
- package/dist/{replay-create-model-D9OW8YQ7.js → replay-create-model-DF1ANReX.js} +3 -3
- package/dist/{replay-db-YMhgrG6n.js → replay-db-DC9n1TUO.js} +1 -1
- package/dist/{replay-db-BPQqGDf6.js → replay-db-z-hahA_U.js} +1 -1
- package/dist/{replay-external-resolver-BuY7tjwA.js → replay-external-resolver-DKDcfTBb.js} +1 -1
- package/dist/{replay-external-resolver-C8RUKQAF.js → replay-external-resolver-zilF6Y7i.js} +2 -2
- package/dist/{replay-index-D01cQRy8.js → replay-index-AdklFuB4.js} +5 -5
- package/dist/{replay-index-j2-k1BLA.js → replay-index-BG6d2dGi.js} +1 -1
- package/dist/{replay-index-BYt60V1u.js → replay-index-Bd9z2h9g.js} +1 -1
- package/dist/{replay-index-DuaHxlY6.js → replay-index-CJwhVhXZ.js} +1 -1
- package/dist/{replay-index-DajpN2Kv.js → replay-index-CbF5pwt2.js} +1 -1
- package/dist/{replay-index-UCGdLDWp.js → replay-index-D4p_CBhN.js} +1 -1
- package/dist/{replay-index-BEVJgOvG.js → replay-index-DHAWtsCb.js} +1 -1
- package/dist/{replay-index-CR-63S4F.js → replay-index-DVkfkNqt.js} +16 -16
- package/dist/{replay-index-B1ISf2Pd.js → replay-index-DXD-sXPY.js} +1 -1
- package/dist/replay-index-Snh4Z-N1.js +4 -0
- package/dist/{replay-index-CUoi3zH7.js → replay-index-hKq2X34E.js} +1 -1
- package/dist/{replay-index-BrETb_LJ.js → replay-index-lU_aszzK.js} +27 -27
- package/dist/{replay-lint-C1ehvXFt.js → replay-lint-BPlv1-Rm.js} +5 -4
- package/dist/{replay-lint-BHA72Tm6.js → replay-lint-BpueGyWj.js} +4 -4
- package/dist/{replay-lint-graphql-Dujr-fEy.js → replay-lint-graphql-C0_JMlpO.js} +1 -1
- package/dist/{replay-lint-graphql-ClVK-Q9m.js → replay-lint-graphql-pK-1R8VS.js} +2 -2
- package/dist/{replay-periodic-revalidation-DWUDnmI5.js → replay-periodic-revalidation-Bu_KusjB.js} +1 -1
- package/dist/{replay-periodic-revalidation-CQucebne.js → replay-periodic-revalidation-DIONsjKq.js} +1 -1
- package/dist/{replay-resolve-DQkGMS79.js → replay-resolve-D5HsOgyB.js} +1 -1
- package/dist/{replay-resolve-lOnMmrS0.js → replay-resolve-DDmWLwbh.js} +1 -1
- package/dist/{replay-respect-run-VZCFofle.js → replay-respect-run-ClSyJINq.js} +1 -1
- package/dist/{replay-respect-run-CFRoqQim.js → replay-respect-run-Dy7mWOei.js} +3 -3
- package/dist/{replay-tauri-path-DYdSowVf.js → replay-tauri-path-Dch_ayrN.js} +1 -1
- package/dist/{replay-tauri-path-DZEIwFxv.js → replay-tauri-path-rJ8_CtSa.js} +2 -2
- package/dist/{replay-useAiChatQueries-C7kgDcqd.js → replay-useAiChatQueries-CCBaQcYH.js} +4 -4
- package/dist/{replay-useAiChatQueries-Ad3LDWfS.js → replay-useAiChatQueries-DMTs6IZT.js} +1 -1
- package/dist/{replay-validate-key-Ck5j2ty0.js → replay-validate-key--x5qy2Rk.js} +2 -2
- package/dist/{replay-validate-key-BewHEjjp.js → replay-validate-key-DbIGv2l3.js} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +1 -1
- package/dist/replay.js +1 -1
- package/package.json +4 -4
- package/dist/replay-index-Dc7Zy4VK.js +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as a, p as i, h as s, e as c, r as d, b as l } from "./replay-index-
|
|
2
|
-
import { B as h, r as p, S as o } from "./replay-resolve-
|
|
1
|
+
import { g as a, p as i, h as s, e as c, r as d, b as l } from "./replay-index-lU_aszzK.js";
|
|
2
|
+
import { B as h, r as p, S as o } from "./replay-resolve-D5HsOgyB.js";
|
|
3
3
|
class E extends h {
|
|
4
4
|
constructor() {
|
|
5
5
|
super();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a6 as T, a7 as f } from "./replay-index-
|
|
2
|
-
import { a as I, g as x, d as z, o as P, A as L, S as V, N as $, n as U, w as G, D as M, b as Y, c as b, l as D } from "./replay-lint-
|
|
3
|
-
import { e as he, f as ue, h as Ee, j as ve, k as Se, C as Te, m as xe, p as be, q as Oe, r as Re, s as _e, t as Ne, H as Ie, I as Pe, u as De, O as Ce, v as ke, x as je, y as we, z as Fe, B as ze, P as Le, E as Ve, F as $e, G as Ue, J as Ge, K as Me, L as Ye, M as Be, Q as Ke, R as We, T as He, U as Je, V as qe, W as Xe, X as Qe, Y as Ze, Z as Ae, _ as es, $ as ss, a0 as ts, a1 as ns, a2 as as, a3 as rs, a4 as os, a5 as is, a6 as ls, a7 as cs, a8 as ps, a9 as ys, aa as fs, a0 as ms, ab as ds } from "./replay-lint-
|
|
4
|
-
import { i as B, B as E, n as K, a as W, m as C } from "./replay-resolve-
|
|
5
|
-
import { R as hs, S as us, Y as Es, e as vs, g as Ss, b as Ts, c as xs, d as bs, f as Os, h as Rs, j as _s, p as Ns, r as Is, k as Ps, s as Ds, u as Cs } from "./replay-resolve-
|
|
1
|
+
import { a6 as T, a7 as f } from "./replay-index-lU_aszzK.js";
|
|
2
|
+
import { a as I, g as x, d as z, o as P, A as L, S as V, N as $, n as U, w as G, D as M, b as Y, c as b, l as D } from "./replay-lint-BPlv1-Rm.js";
|
|
3
|
+
import { e as he, f as ue, h as Ee, j as ve, k as Se, C as Te, m as xe, p as be, q as Oe, r as Re, s as _e, t as Ne, H as Ie, I as Pe, u as De, O as Ce, v as ke, x as je, y as we, z as Fe, B as ze, P as Le, E as Ve, F as $e, G as Ue, J as Ge, K as Me, L as Ye, M as Be, Q as Ke, R as We, T as He, U as Je, V as qe, W as Xe, X as Qe, Y as Ze, Z as Ae, _ as es, $ as ss, a0 as ts, a1 as ns, a2 as as, a3 as rs, a4 as os, a5 as is, a6 as ls, a7 as cs, a8 as ps, a9 as ys, aa as fs, a0 as ms, ab as ds } from "./replay-lint-BPlv1-Rm.js";
|
|
4
|
+
import { i as B, B as E, n as K, a as W, m as C } from "./replay-resolve-D5HsOgyB.js";
|
|
5
|
+
import { R as hs, S as us, Y as Es, e as vs, g as Ss, b as Ts, c as xs, d as bs, f as Os, h as Rs, j as _s, p as Ns, r as Is, k as Ps, s as Ds, u as Cs } from "./replay-resolve-D5HsOgyB.js";
|
|
6
6
|
function oe(e) {
|
|
7
7
|
return (T.extname(e) === ".yaml" || T.extname(e) === ".yml") && !1;
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as t, x as D } from "./replay-index-
|
|
1
|
+
import { i as t, x as D } from "./replay-index-lU_aszzK.js";
|
|
2
2
|
var a;
|
|
3
3
|
(function(r) {
|
|
4
4
|
r.WINDOW_RESIZED = "tauri://resize", r.WINDOW_MOVED = "tauri://move", r.WINDOW_CLOSE_REQUESTED = "tauri://close-requested", r.WINDOW_DESTROYED = "tauri://destroyed", r.WINDOW_FOCUS = "tauri://focus", r.WINDOW_BLUR = "tauri://blur", r.WINDOW_SCALE_FACTOR_CHANGED = "tauri://scale-change", r.WINDOW_THEME_CHANGED = "tauri://theme-changed", r.WINDOW_CREATED = "tauri://window-created", r.WINDOW_SUSPENDED = "tauri://suspended", r.WINDOW_RESUMED = "tauri://resumed", r.WEBVIEW_CREATED = "tauri://webview-created", r.DRAG_ENTER = "tauri://drag-enter", r.DRAG_OVER = "tauri://drag-over", r.DRAG_DROP = "tauri://drag-drop", r.DRAG_LEAVE = "tauri://drag-leave";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-DVkfkNqt.js");async function t(e,n){await i.invoke("plugin:opener|open_url",{url:e,with:n})}async function o(e,n){await i.invoke("plugin:opener|open_path",{path:e,with:n})}async function r(e){const n=typeof e=="string"?[e]:e;return i.invoke("plugin:opener|reveal_item_in_dir",{paths:n})}exports.openPath=o;exports.openUrl=t;exports.revealItemInDir=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./replay-index-CR-63S4F.js"),s=require("./replay-lint-BHA72Tm6.js"),o=require("./replay-resolve-lOnMmrS0.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 R(e,t){const{ctx:n}=s.getNodeTypesFromJSONSchema("EntityFileDefault",t),{ctx:r,discriminatorResolver:i}=s.getNodeTypesFromJSONSchema("EntityFile",e);return{entityTypes:{...n,...r,EntityFileArray:{properties:{},items:y=>{if(p.isPlainObject(y)){const m=y[S];if(!m)return"Entity";const l=i?.(y,m);if(l&&typeof l=="string")return l}return"Entity"}}},discriminatorResolver:i}}function c(e,t){if(o.isRef(t.parent))return;const n=t.key.toString(),r=e.counts??={};r[n]=(r[n]??0)+1}function O(e){for(const i of Object.values(e))i.items&&(i.total=i.items.size);const{xExtensions:t}=e,n=t.counts??{},r=Object.keys(n).sort();t.total=r.length,t.counts=Object.fromEntries(r.map(i=>[i,n[i]]))}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,P=150,B=()=>({any(e,{report:t,location:n}){if(p.isPlainObject(e)&&"key"in e){const r=e.key;if(typeof r!="string"){t({message:"Entity `key` must be a string.",location:n.child(["key"])});return}r.length<b&&t({message:`Entity 'key' must be at least ${b} characters long.`,location:n.child(["key"])}),r.length>P&&t({message:`Entity 'key' must not exceed ${P} characters.`,location:n.child(["key"])}),U.test(r)||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 x(e,t){const r=t.split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join("")+e;return Object.values(s.o).includes(r)?r:e}function M(e,t){const n={};for(const[r,i]of Object.entries(t))if(_(r,i)){if(i.severity==="off")continue;n[r]={...q(e,r,i)}}else n[r]=i;return n}function A(e){const t={},n={};for(const[r,i]of Object.entries(e))if(_(r,i)){const a=i;$(a)?t[r]=a:n[r]=a}else n[r]=i;return{entityRules:t,apiRules:n}}function Y(e,t,n){if(!p.isPlainObject(n.parsed)||!p.isPlainObject(n.parsed.components))return null;const r=n.parsed.components,i="schemas"in r?r.schemas:void 0;if(!i||!(e in i))return null;const a=i[e];try{const y=JSON.parse(t);if(s.dequal(a,y))return a}catch{return null}return null}function _(e,t){return e.startsWith("rule/")&&p.isPlainObject(t)}function $(e){return Object.values(s.o).some(t=>e.subject.type===t)}function q(e,t,n){const r=x(n.subject.type,e),i=n.where?.map(a=>({...a,subject:{...a.subject,type:x(a.subject.type,e)}}));return{assertionId:t,subject:{...n.subject,type:r},assertions:n.assertions,...i&&{where:i},...n.message&&{message:n.message},...n.severity&&{severity:n.severity}}}async function N(e){const{document:t,entitySchema:n,entityDefaultSchema:r,severity:i,externalRefResolver:a=new o.BaseResolver,assertionConfig:y={}}=e,m={problems:[],specVersion:"entity",visitorsData:{}},{entityTypes:l,discriminatorResolver:g}=R(n,r),f=o.normalizeTypes(l);let d=f.Entity;if(Array.isArray(t.parsed))d=f.EntityFileArray;else if(p.isPlainObject(t.parsed)){const h=t.parsed[S];if(!h)d=f.Entity;else{const T=g?.(t.parsed,h);T&&typeof T=="string"&&f[T]&&(d=f[T])}}const E=s.Assertions(y),u=Array.isArray(E)?E.map(h=>({severity:i||"error",ruleId:"entity assertions",visitor:h})):[{severity:i||"error",ruleId:"entity assertions",visitor:E}],C=[{severity:i||"error",ruleId:"entity struct",visitor:s.Struct()},{severity:i||"error",ruleId:"entity no-unresolved-refs",visitor:s.NoUnresolvedRefs()},{severity:i||"error",ruleId:"entity key-valid",visitor:B()},...u],D=s.normalizeVisitors(C,f),F=await o.resolveDocument({rootDocument:t,rootType:d,externalRefResolver:a});return s.walkDocument({document:t,rootType:d,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 r=new o.BaseResolver,i=o.makeDocumentFromString(JSON.stringify(e,null,2),"entity"),a=i.parsed[S],y=M(a||"unknown",t.rules),{entityRules:m,apiRules:l}=A(y),g=await N({document:i,entitySchema:s.Ds,entityDefaultSchema:s.As,externalRefResolver:r,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 d=Y(e.title,e.metadata.schema,n);if(!d)throw new Error(`Schema "${e.title}" not found in the document. Ensure the schema exists in components.schemas.`);const E=await I({schema:d,schemaKey:e.title,config:await s.createConfig({rules:l}),specType:e.metadata.specType,sourceDocument:n,externalRefResolver:r});return[...g,...E]}const f=await s.lintDocument({document:n,externalRefResolver:r,config:await s.createConfig({rules:l})});return[...g,...f]}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:r,sourceDocument:i,specType:a,externalRefResolver:y=new o.BaseResolver(r.resolve)}=e,m=i.parsed,l=m[a],g=m.info,f=o.makeDocumentFromString(JSON.stringify({[a]:l,info:g,components:{schemas:{[n]:t}}},null,2),i?.source.absoluteRef||`schema:${n}`);return(await s.lintDocument({document:f,config:r,externalRefResolver:y})).filter(E=>E.location.some(u=>u.pointer?.includes(`/components/schemas/${n}`)))}exports.isPlainObject=p.isPlainObject;exports.AbortFlowError=s.AbortFlowError;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.HandledError=s.HandledError;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.StatsAsync2=V;exports.StatsAsync3=G;exports.StatsOAS=z;exports.capitalize=L;exports.createEntityTypes=R;exports.doesYamlFileExist=j;exports.isNotEmptyObject=k;exports.lintEntityFile=N;exports.lintEntityWithScorecardLevel=H;exports.lintSchema=I;exports.pause=w;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./replay-index-DVkfkNqt.js"),s=require("./replay-lint-BpueGyWj.js"),o=require("./replay-resolve-DDmWLwbh.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 R(e,t){const{ctx:n}=s.getNodeTypesFromJSONSchema("EntityFileDefault",t),{ctx:r,discriminatorResolver:i}=s.getNodeTypesFromJSONSchema("EntityFile",e);return{entityTypes:{...n,...r,EntityFileArray:{properties:{},items:y=>{if(p.isPlainObject(y)){const m=y[S];if(!m)return"Entity";const l=i?.(y,m);if(l&&typeof l=="string")return l}return"Entity"}}},discriminatorResolver:i}}function c(e,t){if(o.isRef(t.parent))return;const n=t.key.toString(),r=e.counts??={};r[n]=(r[n]??0)+1}function O(e){for(const i of Object.values(e))i.items&&(i.total=i.items.size);const{xExtensions:t}=e,n=t.counts??{},r=Object.keys(n).sort();t.total=r.length,t.counts=Object.fromEntries(r.map(i=>[i,n[i]]))}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,P=150,B=()=>({any(e,{report:t,location:n}){if(p.isPlainObject(e)&&"key"in e){const r=e.key;if(typeof r!="string"){t({message:"Entity `key` must be a string.",location:n.child(["key"])});return}r.length<b&&t({message:`Entity 'key' must be at least ${b} characters long.`,location:n.child(["key"])}),r.length>P&&t({message:`Entity 'key' must not exceed ${P} characters.`,location:n.child(["key"])}),U.test(r)||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 x(e,t){const r=t.split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join("")+e;return Object.values(s.o).includes(r)?r:e}function M(e,t){const n={};for(const[r,i]of Object.entries(t))if(_(r,i)){if(i.severity==="off")continue;n[r]={...q(e,r,i)}}else n[r]=i;return n}function A(e){const t={},n={};for(const[r,i]of Object.entries(e))if(_(r,i)){const a=i;$(a)?t[r]=a:n[r]=a}else n[r]=i;return{entityRules:t,apiRules:n}}function Y(e,t,n){if(!p.isPlainObject(n.parsed)||!p.isPlainObject(n.parsed.components))return null;const r=n.parsed.components,i="schemas"in r?r.schemas:void 0;if(!i||!(e in i))return null;const a=i[e];try{const y=JSON.parse(t);if(s.dequal(a,y))return a}catch{return null}return null}function _(e,t){return e.startsWith("rule/")&&p.isPlainObject(t)}function $(e){return Object.values(s.o).some(t=>e.subject.type===t)}function q(e,t,n){const r=x(n.subject.type,e),i=n.where?.map(a=>({...a,subject:{...a.subject,type:x(a.subject.type,e)}}));return{assertionId:t,subject:{...n.subject,type:r},assertions:n.assertions,...i&&{where:i},...n.message&&{message:n.message},...n.severity&&{severity:n.severity}}}async function N(e){const{document:t,entitySchema:n,entityDefaultSchema:r,severity:i,externalRefResolver:a=new o.BaseResolver,assertionConfig:y={}}=e,m={problems:[],specVersion:"entity",visitorsData:{}},{entityTypes:l,discriminatorResolver:g}=R(n,r),f=o.normalizeTypes(l);let d=f.Entity;if(Array.isArray(t.parsed))d=f.EntityFileArray;else if(p.isPlainObject(t.parsed)){const h=t.parsed[S];if(!h)d=f.Entity;else{const T=g?.(t.parsed,h);T&&typeof T=="string"&&f[T]&&(d=f[T])}}const E=s.Assertions(y),u=Array.isArray(E)?E.map(h=>({severity:i||"error",ruleId:"entity assertions",visitor:h})):[{severity:i||"error",ruleId:"entity assertions",visitor:E}],C=[{severity:i||"error",ruleId:"entity struct",visitor:s.Struct()},{severity:i||"error",ruleId:"entity no-unresolved-refs",visitor:s.NoUnresolvedRefs()},{severity:i||"error",ruleId:"entity key-valid",visitor:B()},...u],D=s.normalizeVisitors(C,f),F=await o.resolveDocument({rootDocument:t,rootType:d,externalRefResolver:a});return s.walkDocument({document:t,rootType:d,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 r=new o.BaseResolver,i=o.makeDocumentFromString(JSON.stringify(e,null,2),"entity"),a=i.parsed[S],y=M(a||"unknown",t.rules),{entityRules:m,apiRules:l}=A(y),g=await N({document:i,entitySchema:s.Ds,entityDefaultSchema:s.As,externalRefResolver:r,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 d=Y(e.title,e.metadata.schema,n);if(!d)throw new Error(`Schema "${e.title}" not found in the document. Ensure the schema exists in components.schemas.`);const E=await I({schema:d,schemaKey:e.title,config:await s.createConfig({rules:l}),specType:e.metadata.specType,sourceDocument:n,externalRefResolver:r});return[...g,...E]}const f=await s.lintDocument({document:n,externalRefResolver:r,config:await s.createConfig({rules:l})});return[...g,...f]}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:r,sourceDocument:i,specType:a,externalRefResolver:y=new o.BaseResolver(r.resolve)}=e,m=i.parsed,l=m[a],g=m.info,f=o.makeDocumentFromString(JSON.stringify({[a]:l,info:g,components:{schemas:{[n]:t}}},null,2),i?.source.absoluteRef||`schema:${n}`);return(await s.lintDocument({document:f,config:r,externalRefResolver:y})).filter(E=>E.location.some(u=>u.pointer?.includes(`/components/schemas/${n}`)))}exports.isPlainObject=p.isPlainObject;exports.AbortFlowError=s.AbortFlowError;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.HandledError=s.HandledError;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.StatsAsync2=V;exports.StatsAsync3=G;exports.StatsOAS=z;exports.capitalize=L;exports.createEntityTypes=R;exports.doesYamlFileExist=j;exports.isNotEmptyObject=k;exports.lintEntityFile=N;exports.lintEntityWithScorecardLevel=H;exports.lintSchema=I;exports.pause=w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-SemanticSearchService-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-SemanticSearchService-ZR8AVcxo.js");exports.getSemanticSearchService=e.getSemanticSearchService;
|