@redocly/replay 0.27.0-next.9 → 0.28.0-next.0
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-B94RnQsz.js → replay-AiChatProvider-BZUzXfD-.js} +44 -44
- package/dist/{replay-AiChatProvider-P2u2MtTk.js → replay-AiChatProvider-Dllh11wo.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-BtTa9KkQ.js → replay-AiChatSqliteDBStorage-CTVtufnx.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-z_QUPu2M.js → replay-AiChatSqliteDBStorage-JpKE0iGm.js} +1 -1
- package/dist/{replay-AiPanel-BCkDovN_.js → replay-AiPanel-DkR-vZTK.js} +973 -1176
- package/dist/replay-AiPanel-DruBN19L.js +742 -0
- package/dist/replay-FileWatcher-D3W6TGFC.js +1 -0
- package/dist/replay-FileWatcher-v7Qw29PS.js +343 -0
- package/dist/replay-Observable-D6wKbFwB.js +31 -0
- package/dist/replay-Observable-bjJ6wkRB.js +1 -0
- package/dist/replay-SemanticSearchService-CSsOmkV_.js +723 -0
- package/dist/replay-SemanticSearchService-Dfx2W4Za.js +1 -0
- package/dist/{replay-SqliteDBStorage-DMxFWJQ7.js → replay-SqliteDBStorage-BSMAgfUS.js} +1 -1
- package/dist/{replay-SqliteDBStorage-D9b6LAKr.js → replay-SqliteDBStorage-DpAEbsAQ.js} +1 -1
- package/dist/replay-TauriFileSystemAdapter-BLPH1Vx3.js +1 -0
- package/dist/replay-TauriFileSystemAdapter-Ddq9xfo1.js +99 -0
- package/dist/replay-TauriRootStorage-g9zf2-FS.js +605 -0
- package/dist/replay-TauriRootStorage-l_sNXRNW.js +1 -0
- package/dist/{replay-agent-loop-C8ERLqB5.js → replay-agent-loop-ClVUvt0C.js} +11 -11
- package/dist/{replay-agent-loop-C2QNfRSA.js → replay-agent-loop-be2meQsN.js} +1 -1
- package/dist/{replay-ai-chat-mappers-fViZvzIy.js → replay-ai-chat-mappers-CwvRub6i.js} +5 -5
- package/dist/{replay-ai-chat-mappers-BMhtm64Y.js → replay-ai-chat-mappers-JOZvaHV_.js} +1 -1
- package/dist/replay-core-BJmXmoC5.js +1 -0
- package/dist/replay-core-B_hiOZZr.js +10 -0
- package/dist/{replay-create-model-BgR6vFGV.js → replay-create-model-CJ3dsZg8.js} +10 -10
- package/dist/{replay-create-model-BhuazQ2q.js → replay-create-model-rzGPB8KT.js} +579 -578
- package/dist/{replay-db-DAiJFj0l.js → replay-db-CW7044b2.js} +1 -1
- package/dist/{replay-db-DKzJowQC.js → replay-db-zC1KPTH0.js} +1 -1
- package/dist/{replay-external-resolver-UONYkON2.js → replay-external-resolver-BDPRz7Xd.js} +2 -2
- package/dist/{replay-external-resolver-BY6AAeGp.js → replay-external-resolver-Dty0CDYE.js} +1 -1
- package/dist/{replay-index-amF_dPN8.js → replay-index--hMZLQs8.js} +6 -6
- package/dist/replay-index-3lwhSmvi.js +1 -0
- package/dist/{replay-index-BubK_s3I.js → replay-index-5UkXwLrd.js} +18 -18
- package/dist/{replay-index-DWKlhkdU.js → replay-index-9h4E2FR8.js} +1 -1
- package/dist/replay-index-B7GU_aMu.js +25 -0
- package/dist/replay-index-DZN7KzbY.js +1 -0
- package/dist/replay-index-DbWKCsKW.js +6906 -0
- package/dist/{replay-index-DM12kT-D.js → replay-index-DiSy_1OY.js} +1 -1
- package/dist/{replay-index-BowK-_3Z.js → replay-index-F4GEOEUz.js} +26605 -27656
- package/dist/replay-index-Oct6Dygd.js +1 -0
- package/dist/replay-index-jkDlU0Lx.js +32 -0
- package/dist/replay-index-ko78Z8QX.js +1 -0
- package/dist/{replay-lint-a0aMVdOC.js → replay-lint-9YeYgRBU.js} +3 -3
- package/dist/{replay-lint-CAN3a2zf.js → replay-lint-DK6LCpO2.js} +3 -3
- package/dist/{replay-lint-graphql-DnztHI0i.js → replay-lint-graphql-BelJUl9-.js} +1 -1
- package/dist/{replay-lint-graphql-C3aqm51r.js → replay-lint-graphql-Dba0twW-.js} +1 -1
- package/dist/replay-periodic-revalidation-BoyLQHtg.js +1 -0
- package/dist/replay-periodic-revalidation-Dsp-n7ui.js +21 -0
- package/dist/replay-promise-map-limit-DRDkHc-b.js +1 -0
- package/dist/replay-promise-map-limit-Db_42GvV.js +14 -0
- package/dist/replay-resolve-CRBvIGPM.js +47 -0
- package/dist/{replay-resolve-LjvT95Yw.js → replay-resolve-RxCCaHXw.js} +1104 -1094
- package/dist/{replay-respect-run-DLSZ4d4p.js → replay-respect-run-BP5Q5L8N.js} +1 -1
- package/dist/{replay-respect-run-wqqp8WHA.js → replay-respect-run-CRGPD-UQ.js} +3 -3
- package/dist/{replay-tauri-path-Bg-T0cwI.js → replay-tauri-path-BmHpvlYp.js} +2 -2
- package/dist/{replay-tauri-path-DHZlqqfb.js → replay-tauri-path-hGM_JYax.js} +1 -1
- package/dist/{replay-useAiChatQueries-Dy-kPGKF.js → replay-useAiChatQueries-DD84oZan.js} +1078 -1022
- package/dist/replay-useAiChatQueries-KVveua_P.js +215 -0
- package/dist/{replay-validate-key-B2N6AiQk.js → replay-validate-key-PS5qrafQ.js} +1 -1
- package/dist/{replay-validate-key-B7RBY-6z.js → replay-validate-key-xk-9xmJ6.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +9 -0
- package/dist/replay.js +12 -12
- package/package.json +5 -4
- package/dist/replay-AiPanel-COL9ADyD.js +0 -868
- package/dist/replay-index-ClVtMDHn.js +0 -6899
- package/dist/replay-index-F528jCaH.js +0 -1
- package/dist/replay-index-fpeoVNQb.js +0 -1
- package/dist/replay-resolve-BoryNVbu.js +0 -47
- package/dist/replay-useAiChatQueries-DuNxx5rQ.js +0 -215
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("./replay-index-
|
|
1
|
+
"use strict";const r=require("./replay-index-DbWKCsKW.js"),y=4e3;function c(t,e=`
|
|
2
2
|
`){return t.length===0?"":t.filter(Boolean).join(e)}function b(t){return t.map(e=>c([e.description!=null?`Description: ${e.description}`:null,`Status Code: ${e.statusCode}`,e.schemaProperties!=null?`Schema Properties: ${e.schemaProperties}`:null],", ")).join(`
|
|
3
3
|
`)}function g(t){return t.map(e=>c([`Name: ${e.name}`,`In: ${e.in}`,`Required: ${e.required}`,e.description!=null?`Description: ${e.description}`:null,e.example!=null?`Example: ${e.example}`:null,e.pattern!=null?`Pattern: ${e.pattern}`:null,e.type!=null?`Type: ${e.type}`:null],", ")).join(`
|
|
4
4
|
`)}function w(t){const e=[];for(const s of t){const o=[];for(const i of Object.keys(s)){const l=s[i];o.push(`${i}=${l}`)}const n=c(o,"; ");e.push(n)}return c(e)}function S(t){if("key"in t){const s=[`id=${t.id}`,`value=${t.value}`,`active=${t.active}`];return c(s," ")}const e=[`reference=${t.reference}`,`value=${t.value??""}`,`active=${t.active}`];return c(e," ")}function $(t){const e=[],s=[["queryParameters",t.queryParameters],["headers",t.headers],["cookies",t.cookies],["pathParameters",t.pathParameters]];for(const[o,n]of s)if(n?.length){const i=n.map(l=>` ${S(l)}`);e.push(`${o}:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B as h, j as p, S as o } from "./replay-resolve-
|
|
1
|
+
import { aT as n, aU as i, aO as s, _ as c, X as d, Z as l } from "./replay-index-F4GEOEUz.js";
|
|
2
|
+
import { B as h, j as p, S as o } from "./replay-resolve-RxCCaHXw.js";
|
|
3
3
|
class E extends h {
|
|
4
4
|
constructor() {
|
|
5
5
|
super();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-index-DbWKCsKW.js"),n=require("./replay-resolve-CRBvIGPM.js");class c extends n.BaseResolver{constructor(){super()}resolveExternalRef(e,t){return r.isAbsoluteUrl(t)?t:e&&r.isAbsoluteUrl(e)?new URL(t,e).href:e?r.path.resolve(r.path.dirname(e),t):t}async loadExternalRef(e){if(r.isAbsoluteUrl(e)){const{body:t,mimeType:i}=await n.readFileFromUrl(e,{...this.config.http,customFetch:r.fetch});return new n.Source(e,t,i)}else{if(!await r.exists(e))throw new Error(`File not found at ${e}.`);try{throw await r.readDir(e),new Error(`Expected a file but received a folder at ${e}.`)}catch(o){if(o instanceof Error&&o.message.includes("Expected a file but received a folder"))throw o}const i=await r.readTextFile(e);return new n.Source(e,i.replace(/\r\n/g,`
|
|
2
2
|
`))}}}exports.ExternalResolver=c;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i } from "./replay-index-F4GEOEUz.js";
|
|
2
2
|
async function l(t = {}) {
|
|
3
|
-
return typeof t == "object" && Object.freeze(t), await
|
|
3
|
+
return typeof t == "object" && Object.freeze(t), await i("plugin:dialog|open", { options: t });
|
|
4
4
|
}
|
|
5
5
|
async function o(t = {}) {
|
|
6
|
-
return typeof t == "object" && Object.freeze(t), await
|
|
6
|
+
return typeof t == "object" && Object.freeze(t), await i("plugin:dialog|save", { options: t });
|
|
7
7
|
}
|
|
8
8
|
async function g(t, n) {
|
|
9
9
|
const e = typeof n == "string" ? { title: n } : n;
|
|
10
|
-
await
|
|
10
|
+
await i("plugin:dialog|message", {
|
|
11
11
|
message: t.toString(),
|
|
12
12
|
title: e?.title?.toString(),
|
|
13
13
|
kind: e?.kind,
|
|
@@ -16,7 +16,7 @@ async function g(t, n) {
|
|
|
16
16
|
}
|
|
17
17
|
async function r(t, n) {
|
|
18
18
|
const e = typeof n == "string" ? { title: n } : n;
|
|
19
|
-
return await
|
|
19
|
+
return await i("plugin:dialog|ask", {
|
|
20
20
|
message: t.toString(),
|
|
21
21
|
title: e?.title?.toString(),
|
|
22
22
|
kind: e?.kind,
|
|
@@ -26,7 +26,7 @@ async function r(t, n) {
|
|
|
26
26
|
}
|
|
27
27
|
async function c(t, n) {
|
|
28
28
|
const e = typeof n == "string" ? { title: n } : n;
|
|
29
|
-
return await
|
|
29
|
+
return await i("plugin:dialog|confirm", {
|
|
30
30
|
message: t.toString(),
|
|
31
31
|
title: e?.title?.toString(),
|
|
32
32
|
kind: e?.kind,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./replay-core-BJmXmoC5.js");var i;(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"})(i||(i={}));async function u(e,r){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,r),await n.invoke("plugin:event|unlisten",{event:e,eventId:r})}async function _(e,r,l){var t;const a=(t=void 0)!==null&&t!==void 0?t:{kind:"Any"};return n.invoke("plugin:event|listen",{event:e,target:a,handler:n.transformCallback(r)}).then(o=>async()=>u(e,o))}async function D(){return await n.invoke("plugin:deep-link|get_current")}async function s(e){return await _("deep-link://new-url",r=>{e(r.payload)})}exports.getCurrent=D;exports.onOpenUrl=s;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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
|
|
4
|
-
import { B as v, n as
|
|
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-
|
|
1
|
+
import { aR as u, aS as p } from "./replay-index-F4GEOEUz.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-9YeYgRBU.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-9YeYgRBU.js";
|
|
4
|
+
import { B as v, n as M, r as U, m as C } from "./replay-resolve-RxCCaHXw.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-RxCCaHXw.js";
|
|
6
6
|
function ae(e) {
|
|
7
7
|
return (u.extname(e) === ".yaml" || u.extname(e) === ".yml") && !1;
|
|
8
8
|
}
|
|
@@ -292,7 +292,7 @@ async function Q(e) {
|
|
|
292
292
|
problems: [],
|
|
293
293
|
specVersion: "entity",
|
|
294
294
|
visitorsData: {}
|
|
295
|
-
}, { entityTypes: i, discriminatorResolver: y } = B(t, a), c =
|
|
295
|
+
}, { entityTypes: i, discriminatorResolver: y } = B(t, a), c = M(i);
|
|
296
296
|
let m = c.Entity;
|
|
297
297
|
if (Array.isArray(s.parsed))
|
|
298
298
|
m = c.EntityFileArray;
|
|
@@ -332,12 +332,12 @@ async function Q(e) {
|
|
|
332
332
|
visitor: W()
|
|
333
333
|
},
|
|
334
334
|
...f
|
|
335
|
-
], k =
|
|
335
|
+
], k = $(x, c), z = await U({
|
|
336
336
|
rootDocument: s,
|
|
337
337
|
rootType: m,
|
|
338
338
|
externalRefResolver: r
|
|
339
339
|
});
|
|
340
|
-
return
|
|
340
|
+
return L({
|
|
341
341
|
document: s,
|
|
342
342
|
rootType: m,
|
|
343
343
|
normalizedVisitors: k,
|
|
@@ -350,8 +350,8 @@ async function ce(e, s, t) {
|
|
|
350
350
|
throw new Error(`Scorecard level "${s.name}" has no rules defined.`);
|
|
351
351
|
const a = new v(), n = C(JSON.stringify(e, null, 2), "entity"), r = n.parsed[E], o = H(r || "unknown", s.rules), { entityRules: l, apiRules: i } = J(o), y = await Q({
|
|
352
352
|
document: n,
|
|
353
|
-
entitySchema:
|
|
354
|
-
entityDefaultSchema:
|
|
353
|
+
entitySchema: Y,
|
|
354
|
+
entityDefaultSchema: G,
|
|
355
355
|
externalRefResolver: a,
|
|
356
356
|
assertionConfig: l
|
|
357
357
|
});
|
|
@@ -447,13 +447,13 @@ export {
|
|
|
447
447
|
Ve as createConfigTypes,
|
|
448
448
|
B as createEntityTypes,
|
|
449
449
|
j as dequal,
|
|
450
|
-
|
|
450
|
+
$e as detectSpec,
|
|
451
451
|
ae as doesYamlFileExist,
|
|
452
452
|
ds as escapePointerFragment,
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
453
|
+
Le as findConfig,
|
|
454
|
+
Ye as formatProblems,
|
|
455
|
+
Ge as getAstNodeByPointer,
|
|
456
|
+
Me as getCodeframe,
|
|
457
457
|
gs as getDir,
|
|
458
458
|
Ue as getLineColLocation,
|
|
459
459
|
Be as getMajorSpecVersion,
|
|
@@ -485,8 +485,8 @@ export {
|
|
|
485
485
|
ts as logger,
|
|
486
486
|
C as makeDocumentFromString,
|
|
487
487
|
as as mapTypeToComponent,
|
|
488
|
-
|
|
489
|
-
|
|
488
|
+
M as normalizeTypes,
|
|
489
|
+
$ as normalizeVisitors,
|
|
490
490
|
bs as parseYaml,
|
|
491
491
|
re as pause,
|
|
492
492
|
ns as pluralize,
|
|
@@ -499,6 +499,6 @@ export {
|
|
|
499
499
|
Ns as stringifyYaml,
|
|
500
500
|
Ps as unescapePointerFragment,
|
|
501
501
|
ls as validate,
|
|
502
|
-
|
|
502
|
+
L as walkDocument,
|
|
503
503
|
cs as xmlEscape
|
|
504
504
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./replay-index-ClVtMDHn.js"),t=require("./replay-lint-CAN3a2zf.js"),o=require("./replay-resolve-BoryNVbu.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-DbWKCsKW.js"),t=require("./replay-lint-DK6LCpO2.js"),o=require("./replay-resolve-CRBvIGPM.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;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { g as l } from "./replay-SemanticSearchService-CSsOmkV_.js";
|
|
2
|
+
import { S as x, e as y, a as D, b as E } from "./replay-SemanticSearchService-CSsOmkV_.js";
|
|
3
|
+
import { useState as a, useCallback as u } from "react";
|
|
4
|
+
function f() {
|
|
5
|
+
const [c, r] = a(!1), [s, t] = a(null);
|
|
6
|
+
return { search: u(async (n, o = 10) => {
|
|
7
|
+
r(!0), t(null);
|
|
8
|
+
try {
|
|
9
|
+
return await l().search(n, o);
|
|
10
|
+
} catch (e) {
|
|
11
|
+
const i = e instanceof Error ? e : new Error(String(e));
|
|
12
|
+
return t(i), [];
|
|
13
|
+
} finally {
|
|
14
|
+
r(!1);
|
|
15
|
+
}
|
|
16
|
+
}, []), isSearching: c, error: s };
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
x as SemanticSearchService,
|
|
20
|
+
y as extractAllDocuments,
|
|
21
|
+
D as extractApiDocuments,
|
|
22
|
+
E as extractCollectionDocuments,
|
|
23
|
+
l as getSemanticSearchService,
|
|
24
|
+
f as useSemanticSearch
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-DbWKCsKW.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;
|