@redocly/replay 0.29.0-next.7 → 0.29.0-next.9
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-BDqzEpdu.js} +6 -6
- package/dist/{replay-AiChatProvider-CsMz9Ny8.js → replay-AiChatProvider-DAWT4hAb.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-Ch8nYYAX.js → replay-AiChatSqliteDBStorage-BJ0kltvn.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-2UcwycP7.js → replay-AiChatSqliteDBStorage-Dkz4d7Rx.js} +1 -1
- package/dist/{replay-AiPanel-jeLVfdPf.js → replay-AiPanel-C5wMkLIc.js} +31 -19
- package/dist/{replay-AiPanel-BVP0e_Ra.js → replay-AiPanel-CkVIJhGF.js} +2 -2
- package/dist/{replay-FileWatcher-CCeuRwSI.js → replay-FileWatcher-D3FVyQbX.js} +2 -2
- package/dist/{replay-FileWatcher-ByAuX5yb.js → replay-FileWatcher-DW7u83d1.js} +1 -1
- package/dist/{replay-SemanticSearchService-CWnYSg2x.js → replay-SemanticSearchService-DAt35B37.js} +1 -1
- package/dist/{replay-SemanticSearchService-CqpTIrD8.js → replay-SemanticSearchService-DgroPziI.js} +1 -1
- package/dist/{replay-SqliteDBStorage-8Q5sVT__.js → replay-SqliteDBStorage-BG22uvLP.js} +1 -1
- package/dist/{replay-SqliteDBStorage-DlhoTUy-.js → replay-SqliteDBStorage-CXZGasJG.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-CsxsNEHS.js → replay-TauriFileSystemAdapter-BY888O_1.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-D2TWeqg4.js → replay-TauriFileSystemAdapter-CGGDSxKe.js} +1 -1
- package/dist/{replay-TauriRootStorage-DVr-1sCz.js → replay-TauriRootStorage-CnLeXsev.js} +1 -1
- package/dist/{replay-TauriRootStorage-DU5cTkJu.js → replay-TauriRootStorage-DaKRlo3-.js} +2 -2
- package/dist/{replay-agent-loop-BIWlrZnE.js → replay-agent-loop-CzPV4LI2.js} +3 -3
- package/dist/{replay-agent-loop-BclAkqxN.js → replay-agent-loop-D1h5J-uE.js} +1 -1
- package/dist/{replay-ai-chat-mappers-tMl4GKpA.js → replay-ai-chat-mappers-BlVOCvVt.js} +1 -1
- package/dist/{replay-ai-chat-mappers-IIq8wpuk.js → replay-ai-chat-mappers-DsLIxLaN.js} +1 -1
- package/dist/{replay-create-model-CJJtDY2W.js → replay-create-model-KIUQ2An5.js} +3 -3
- package/dist/{replay-create-model-Dbu-RKR1.js → replay-create-model-_BaJNmZq.js} +3 -3
- package/dist/{replay-db-CiDc3f4H.js → replay-db-CroFZCLK.js} +1 -1
- package/dist/{replay-db-DuJyF4Fr.js → replay-db-DoLsw4tF.js} +1 -1
- package/dist/{replay-external-resolver-CUHRd2KI.js → replay-external-resolver-BwZvmuC9.js} +1 -1
- package/dist/{replay-external-resolver-hjlmO2_f.js → replay-external-resolver-DUzbkx07.js} +2 -2
- package/dist/{replay-index-CI5fXezW.js → replay-index-54ROnLOe.js} +1133 -1133
- package/dist/{replay-index-BiX81nFD.js → replay-index-AuXMzqmR.js} +1 -1
- package/dist/{replay-index-MZZGINEM.js → replay-index-B1cRNYAB.js} +1 -1
- package/dist/replay-index-B8puA2u2.js +1 -0
- package/dist/{replay-index-BvHpl6n6.js → replay-index-BBDKuDcc.js} +1 -1
- package/dist/{replay-index-DV7TIbcG.js → replay-index-BI0q2SFK.js} +1 -1
- package/dist/replay-index-Cj1-cwJH.js +4 -0
- package/dist/{replay-index-BJkWpnD3.js → replay-index-DjHbio61.js} +1 -1
- package/dist/{replay-index-BRps0K8N.js → replay-index-SX6LT-jT.js} +55 -59
- package/dist/{replay-index-jO1drB_G.js → replay-index-VCzOY16S.js} +18955 -19206
- package/dist/{replay-index-PvlFMxhx.js → replay-index-zSldZ9CB.js} +1 -1
- package/dist/{replay-index-twpStg_q.js → replay-index-zmQXrIpO.js} +1 -1
- package/dist/replay-lint-C8g-xqrP.js +130 -0
- package/dist/{replay-lint-DG6Bpj__.js → replay-lint-YAy8-Dtq.js} +11410 -9532
- package/dist/{replay-lint-graphql-DCVDIu3K.js → replay-lint-graphql-Bpd88C9w.js} +2 -2
- package/dist/{replay-lint-graphql-y5Q8AbLi.js → replay-lint-graphql-CZBwQl0k.js} +1 -1
- package/dist/{replay-periodic-revalidation-BwkTngTv.js → replay-periodic-revalidation-BzoE_vj1.js} +1 -1
- package/dist/{replay-periodic-revalidation-8ApdHWIQ.js → replay-periodic-revalidation-CNYI9Ked.js} +1 -1
- package/dist/{replay-resolve-mFgjNvXW.js → replay-resolve-DrE6Bsmy.js} +8 -8
- package/dist/{replay-resolve-DXK9kMSh.js → replay-resolve-jATjJR5l.js} +1 -1
- package/dist/{replay-respect-run-C_EkBybE.js → replay-respect-run-DIYJQvbB.js} +3515 -4982
- package/dist/replay-respect-run-tWrs79VV.js +73 -0
- package/dist/{replay-tauri-path-DQJXzOyo.js → replay-tauri-path-6SQ7odaf.js} +2 -2
- package/dist/{replay-tauri-path-9izlvCOU.js → replay-tauri-path-Duj7dsaA.js} +1 -1
- package/dist/{replay-useAiChatQueries-BIfk0TxI.js → replay-useAiChatQueries-B1XeG3iY.js} +4 -4
- package/dist/{replay-useAiChatQueries-d02SKxxb.js → replay-useAiChatQueries-__VXRF5i.js} +1 -1
- package/dist/{replay-validate-key-BBw0AkiP.js → replay-validate-key-BGMRyGdn.js} +1 -1
- package/dist/{replay-validate-key-DO3mXt_J.js → replay-validate-key-Dl8sa_9N.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +32 -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-SemanticSearchService-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-SemanticSearchService-DAt35B37.js");exports.getSemanticSearchService=e.getSemanticSearchService;
|
|
@@ -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-VCzOY16S.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";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./replay-index-54ROnLOe.js"),s=require("./replay-lint-C8g-xqrP.js"),o=require("./replay-resolve-jATjJR5l.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,x=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>x&&t({message:`Entity 'key' must not exceed ${x} 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 P(e,t){const r=t.split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join("")+e;return Object.values(s.t).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 Y(e){const t={},n={};for(const[r,i]of Object.entries(e))if(_(r,i)){const a=i;A(a)?t[r]=a:n[r]=a}else n[r]=i;return{entityRules:t,apiRules:n}}function $(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 A(e){return Object.values(s.t).some(t=>e.subject.type===t)}function q(e,t,n){const r=P(n.subject.type,e),i=n.where?.map(a=>({...a,subject:{...a.subject,type:P(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}=Y(y),g=await N({document:i,entitySchema:s.xi,entityDefaultSchema:s.Ei,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=$(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 i=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-54ROnLOe.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 n=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./replay-index-54ROnLOe.js");var a;(function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_SUSPENDED="tauri://suspended",e.WINDOW_RESUMED="tauri://resumed",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"})(a||(a={}));async function o(e,r){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,r),await n.invoke("plugin:event|unlisten",{event:e,eventId:r})}async function _(e,r,s){var t;const i=(t=void 0)!==null&&t!==void 0?t:{kind:"Any"};return n.invoke("plugin:event|listen",{event:e,target:i,handler:n.transformCallback$1(r)}).then(u=>async()=>o(e,u))}async function D(){return await n.invoke("plugin:deep-link|get_current")}async function l(e){return await _("deep-link://new-url",r=>{e(r.payload)})}exports.getCurrent=D;exports.onOpenUrl=l;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a6 as
|
|
2
|
-
import { a as I, g as
|
|
3
|
-
import { b as
|
|
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
|
|
1
|
+
import { a6 as T, a7 as f } from "./replay-index-VCzOY16S.js";
|
|
2
|
+
import { a as I, g as x, d as z, t as P, A as L, S as V, N as $, n as U, w as G, x as M, E as Y, c as b, l as D } from "./replay-lint-YAy8-Dtq.js";
|
|
3
|
+
import { b as he, e as ue, f as Ee, h as ve, j as Se, C as Te, k as xe, m as be, o as Oe, p as Re, D as _e, q as Ne, H as Ie, I as Pe, r as De, O as Ce, s as ke, u as je, v as we, y as Fe, z as ze, P as Le, B 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-YAy8-Dtq.js";
|
|
4
|
+
import { i as B, B as E, n as K, a as W, m as C } from "./replay-resolve-DrE6Bsmy.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-DrE6Bsmy.js";
|
|
6
6
|
function oe(e) {
|
|
7
|
-
return (
|
|
7
|
+
return (T.extname(e) === ".yaml" || T.extname(e) === ".yml") && !1;
|
|
8
8
|
}
|
|
9
9
|
function ie(e) {
|
|
10
10
|
return f(e) && !I(e);
|
|
@@ -17,7 +17,7 @@ function ce(e) {
|
|
|
17
17
|
}
|
|
18
18
|
const v = "type", O = ["api-description", "api-operation", "data-schema"];
|
|
19
19
|
function H(e, s) {
|
|
20
|
-
const { ctx: t } =
|
|
20
|
+
const { ctx: t } = x("EntityFileDefault", s), { ctx: a, discriminatorResolver: n } = x("EntityFile", e);
|
|
21
21
|
return {
|
|
22
22
|
entityTypes: {
|
|
23
23
|
...t,
|
|
@@ -46,7 +46,7 @@ function i(e, s) {
|
|
|
46
46
|
const t = s.key.toString(), a = e.counts ??= {};
|
|
47
47
|
a[t] = (a[t] ?? 0) + 1;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function S(e) {
|
|
50
50
|
for (const n of Object.values(e))
|
|
51
51
|
n.items && (n.total = n.items.size);
|
|
52
52
|
const { xExtensions: s } = e, t = s.counts ?? {}, a = Object.keys(t).sort();
|
|
@@ -158,7 +158,7 @@ const pe = (e) => ({
|
|
|
158
158
|
},
|
|
159
159
|
Root: {
|
|
160
160
|
leave() {
|
|
161
|
-
|
|
161
|
+
S(e);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
}), ye = (e) => ({
|
|
@@ -210,7 +210,7 @@ const pe = (e) => ({
|
|
|
210
210
|
},
|
|
211
211
|
Root: {
|
|
212
212
|
leave() {
|
|
213
|
-
|
|
213
|
+
S(e);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
}), fe = (e) => ({
|
|
@@ -264,10 +264,10 @@ const pe = (e) => ({
|
|
|
264
264
|
},
|
|
265
265
|
Root: {
|
|
266
266
|
leave() {
|
|
267
|
-
|
|
267
|
+
S(e);
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
}), J = /^[a-z0-9]+(?:-[a-z0-9]+)*$/,
|
|
270
|
+
}), J = /^[a-z0-9]+(?:-[a-z0-9]+)*$/, R = 2, _ = 150, q = () => ({
|
|
271
271
|
any(e, { report: s, location: t }) {
|
|
272
272
|
if (f(e) && "key" in e) {
|
|
273
273
|
const a = e.key;
|
|
@@ -278,11 +278,11 @@ const pe = (e) => ({
|
|
|
278
278
|
});
|
|
279
279
|
return;
|
|
280
280
|
}
|
|
281
|
-
a.length <
|
|
282
|
-
message: `Entity 'key' must be at least ${
|
|
281
|
+
a.length < R && s({
|
|
282
|
+
message: `Entity 'key' must be at least ${R} characters long.`,
|
|
283
283
|
location: t.child(["key"])
|
|
284
|
-
}), a.length >
|
|
285
|
-
message: `Entity 'key' must not exceed ${
|
|
284
|
+
}), a.length > _ && s({
|
|
285
|
+
message: `Entity 'key' must not exceed ${_} characters.`,
|
|
286
286
|
location: t.child(["key"])
|
|
287
287
|
}), J.test(a) || s({
|
|
288
288
|
message: "Entity `key` must contain only lowercase letters, numbers, and hyphens, and cannot start or end with a hyphen.",
|
|
@@ -308,7 +308,7 @@ function X(e, s) {
|
|
|
308
308
|
t[a] = n;
|
|
309
309
|
return t;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Q(e) {
|
|
312
312
|
const s = {}, t = {};
|
|
313
313
|
for (const [a, n] of Object.entries(e))
|
|
314
314
|
if (k(a, n)) {
|
|
@@ -318,7 +318,7 @@ function Z(e) {
|
|
|
318
318
|
t[a] = n;
|
|
319
319
|
return { entityRules: s, apiRules: t };
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Z(e, s, t) {
|
|
322
322
|
if (!f(t.parsed) || !f(t.parsed.components))
|
|
323
323
|
return null;
|
|
324
324
|
const a = t.parsed.components, n = "schemas" in a ? a.schemas : void 0;
|
|
@@ -365,7 +365,7 @@ async function se(e) {
|
|
|
365
365
|
problems: [],
|
|
366
366
|
specVersion: "entity",
|
|
367
367
|
visitorsData: {}
|
|
368
|
-
}, { entityTypes: o, discriminatorResolver:
|
|
368
|
+
}, { entityTypes: o, discriminatorResolver: m } = H(t, a), p = K(o);
|
|
369
369
|
let y = p.Entity;
|
|
370
370
|
if (Array.isArray(s.parsed))
|
|
371
371
|
y = p.EntityFileArray;
|
|
@@ -374,11 +374,11 @@ async function se(e) {
|
|
|
374
374
|
if (!h)
|
|
375
375
|
y = p.Entity;
|
|
376
376
|
else {
|
|
377
|
-
const u =
|
|
377
|
+
const u = m?.(s.parsed, h);
|
|
378
378
|
u && typeof u == "string" && p[u] && (y = p[u]);
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
const g = L(l),
|
|
381
|
+
const g = L(l), d = Array.isArray(g) ? g.map((h) => ({
|
|
382
382
|
severity: n || "error",
|
|
383
383
|
ruleId: "entity assertions",
|
|
384
384
|
visitor: h
|
|
@@ -404,7 +404,7 @@ async function se(e) {
|
|
|
404
404
|
ruleId: "entity key-valid",
|
|
405
405
|
visitor: q()
|
|
406
406
|
},
|
|
407
|
-
...
|
|
407
|
+
...d
|
|
408
408
|
], w = U(j, p), F = await W({
|
|
409
409
|
rootDocument: s,
|
|
410
410
|
rootType: y,
|
|
@@ -418,10 +418,10 @@ async function se(e) {
|
|
|
418
418
|
ctx: c
|
|
419
419
|
}), c.problems;
|
|
420
420
|
}
|
|
421
|
-
async function
|
|
421
|
+
async function me(e, s, t) {
|
|
422
422
|
if (!s.rules)
|
|
423
423
|
throw new Error(`Scorecard level "${s.name}" has no rules defined.`);
|
|
424
|
-
const a = new E(), n = C(JSON.stringify(e, null, 2), "entity"), r = n.parsed[v], l = X(r || "unknown", s.rules), { entityRules: c, apiRules: o } =
|
|
424
|
+
const a = new E(), n = C(JSON.stringify(e, null, 2), "entity"), r = n.parsed[v], l = X(r || "unknown", s.rules), { entityRules: c, apiRules: o } = Q(l), m = await se({
|
|
425
425
|
document: n,
|
|
426
426
|
entitySchema: M,
|
|
427
427
|
entityDefaultSchema: Y,
|
|
@@ -430,15 +430,15 @@ async function de(e, s, t) {
|
|
|
430
430
|
});
|
|
431
431
|
if (O.includes(e.type)) {
|
|
432
432
|
if (Object.keys(o).length === 0)
|
|
433
|
-
return
|
|
433
|
+
return m;
|
|
434
434
|
if (!t)
|
|
435
435
|
throw new Error(`Document is required for entity type "${e.type}". Provide the source API document to lint API rules.`);
|
|
436
436
|
if (e.type === "data-schema" && e.metadata?.schema) {
|
|
437
|
-
Object.values(o).forEach((
|
|
438
|
-
if (f(
|
|
439
|
-
throw new Error(`API rules for "data-schema" entity must target Schema subject, but found "${
|
|
437
|
+
Object.values(o).forEach((d) => {
|
|
438
|
+
if (f(d) && f(d.subject) && d.subject.type !== "Schema")
|
|
439
|
+
throw new Error(`API rules for "data-schema" entity must target Schema subject, but found "${d.subject.type}".`);
|
|
440
440
|
});
|
|
441
|
-
const y =
|
|
441
|
+
const y = Z(e.title, e.metadata.schema, t);
|
|
442
442
|
if (!y)
|
|
443
443
|
throw new Error(`Schema "${e.title}" not found in the document. Ensure the schema exists in components.schemas.`);
|
|
444
444
|
const g = await te({
|
|
@@ -451,7 +451,7 @@ async function de(e, s, t) {
|
|
|
451
451
|
sourceDocument: t,
|
|
452
452
|
externalRefResolver: a
|
|
453
453
|
});
|
|
454
|
-
return [...
|
|
454
|
+
return [...m, ...g];
|
|
455
455
|
}
|
|
456
456
|
const p = await D({
|
|
457
457
|
document: t,
|
|
@@ -460,15 +460,15 @@ async function de(e, s, t) {
|
|
|
460
460
|
rules: o
|
|
461
461
|
})
|
|
462
462
|
});
|
|
463
|
-
return [...
|
|
463
|
+
return [...m, ...p];
|
|
464
464
|
} else if (!I(o))
|
|
465
465
|
throw new Error(`API rules are not supported for entity type "${e.type}". Only ${O.join(", ")} support API rules.`);
|
|
466
|
-
return
|
|
466
|
+
return m;
|
|
467
467
|
}
|
|
468
468
|
async function te(e) {
|
|
469
|
-
const { schema: s, schemaKey: t, config: a, sourceDocument: n, specType: r, externalRefResolver: l = new E(a.resolve) } = e, c = n.parsed, o = c[r],
|
|
469
|
+
const { schema: s, schemaKey: t, config: a, sourceDocument: n, specType: r, externalRefResolver: l = new E(a.resolve) } = e, c = n.parsed, o = c[r], m = c.info, p = C(JSON.stringify({
|
|
470
470
|
[r]: o,
|
|
471
|
-
info:
|
|
471
|
+
info: m,
|
|
472
472
|
components: {
|
|
473
473
|
schemas: {
|
|
474
474
|
[t]: s
|
|
@@ -479,27 +479,23 @@ async function te(e) {
|
|
|
479
479
|
document: p,
|
|
480
480
|
config: a,
|
|
481
481
|
externalRefResolver: l
|
|
482
|
-
})).filter((g) => g.location.some((
|
|
483
|
-
}
|
|
484
|
-
class me extends Error {
|
|
485
|
-
}
|
|
486
|
-
class ge extends Error {
|
|
482
|
+
})).filter((g) => g.location.some((d) => d.pointer?.includes(`/components/schemas/${t}`)));
|
|
487
483
|
}
|
|
488
484
|
export {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
485
|
+
he as AbortFlowError,
|
|
486
|
+
ue as Arazzo1Types,
|
|
487
|
+
Ee as Arazzo1_1Types,
|
|
488
|
+
ve as AsyncApi2Types,
|
|
493
489
|
Se as AsyncApi3Types,
|
|
494
490
|
E as BaseResolver,
|
|
495
491
|
Te as CONFIG_BUNDLER_VISITOR_ID,
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
492
|
+
xe as CONFIG_FILE_NAME,
|
|
493
|
+
be as Config,
|
|
494
|
+
Oe as ConfigTypes,
|
|
499
495
|
Re as ConfigValidationError,
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
496
|
+
_e as DEFAULT_CONFIG,
|
|
497
|
+
Ne as DEFAULT_PROJECT_PLUGIN_PATHS,
|
|
498
|
+
Ie as HandledError,
|
|
503
499
|
Pe as IGNORE_BANNER,
|
|
504
500
|
De as IGNORE_FILE,
|
|
505
501
|
Ce as Oas2Types,
|
|
@@ -531,14 +527,14 @@ export {
|
|
|
531
527
|
Ke as formatProblems,
|
|
532
528
|
We as getAstNodeByPointer,
|
|
533
529
|
He as getCodeframe,
|
|
534
|
-
|
|
530
|
+
Ss as getDir,
|
|
535
531
|
Je as getLineColLocation,
|
|
536
532
|
qe as getMajorSpecVersion,
|
|
537
533
|
Xe as getPluginCacheVersion,
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
534
|
+
Qe as getTotals,
|
|
535
|
+
Ze as getTypes,
|
|
536
|
+
Ts as isAbsoluteUrl,
|
|
537
|
+
xs as isBrowser,
|
|
542
538
|
I as isEmptyObject,
|
|
543
539
|
bs as isGraphqlRef,
|
|
544
540
|
Os as isMappingRef,
|
|
@@ -547,14 +543,14 @@ export {
|
|
|
547
543
|
f as isPlainObject,
|
|
548
544
|
B as isRef,
|
|
549
545
|
es as isString,
|
|
550
|
-
|
|
551
|
-
|
|
546
|
+
Rs as isSupportedExtension,
|
|
547
|
+
_s as isTruthy,
|
|
552
548
|
ss as keysOf,
|
|
553
549
|
ts as lint,
|
|
554
550
|
ns as lintConfig,
|
|
555
551
|
D as lintDocument,
|
|
556
552
|
se as lintEntityFile,
|
|
557
|
-
|
|
553
|
+
me as lintEntityWithScorecardLevel,
|
|
558
554
|
as as lintFromString,
|
|
559
555
|
te as lintSchema,
|
|
560
556
|
rs as loadConfig,
|
|
@@ -575,7 +571,7 @@ export {
|
|
|
575
571
|
fs as slash,
|
|
576
572
|
Ds as stringifyYaml,
|
|
577
573
|
Cs as unescapePointerFragment,
|
|
578
|
-
|
|
574
|
+
ms as validate,
|
|
579
575
|
G as walkDocument,
|
|
580
|
-
|
|
576
|
+
ds as xmlEscape
|
|
581
577
|
};
|