@redocly/replay 0.19.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{replay-index-BtkyH7jG.js → replay-index-BbgwrfFn.js} +6 -6
- package/dist/{replay-index-XdVm__ud.js → replay-index-C-PVPdpg.js} +1 -1
- package/dist/{replay-index-1nyo3GKQ.js → replay-index-CKPz9pdF.js} +1 -1
- package/dist/{replay-index-CRSoWmsU.js → replay-index-DwyYdeS0.js} +1 -1
- package/dist/{replay-index-ByJ9CDjb.js → replay-index-NZomfg-i.js} +1 -1
- package/dist/{replay-index-gs4LE2ro.js → replay-index-WwrC-6Gc.js} +7 -7
- package/dist/{replay-index-D9J5Pr1K.js → replay-index-gY1ffML-.js} +1 -1
- package/dist/{replay-index-B-2BPGqI.js → replay-index-yk0sTuq_.js} +1 -1
- package/dist/{replay-tauri-path-BP6Hv-Lq.js → replay-tauri-path-4JNGWY8h.js} +2 -2
- package/dist/{replay-tauri-path-Bfy56bHq.js → replay-tauri-path-9tVAG1LA.js} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/package.json +2 -2
|
@@ -42429,7 +42429,7 @@ async function BZ(u, e) {
|
|
|
42429
42429
|
class Da {
|
|
42430
42430
|
static utils = null;
|
|
42431
42431
|
static async getUtils() {
|
|
42432
|
-
return Da.utils || (Da.utils = s1() ? await import("./replay-tauri-path-
|
|
42432
|
+
return Da.utils || (Da.utils = s1() ? await import("./replay-tauri-path-4JNGWY8h.js") : await Promise.resolve().then(() => kse)), Da.utils;
|
|
42433
42433
|
}
|
|
42434
42434
|
static async dirname(e) {
|
|
42435
42435
|
return (await Da.getUtils()).dirname(e);
|
|
@@ -71984,7 +71984,7 @@ const F6 = Ya({});
|
|
|
71984
71984
|
function m1() {
|
|
71985
71985
|
return la(F6) || {};
|
|
71986
71986
|
}
|
|
71987
|
-
const Kyu = "0.
|
|
71987
|
+
const Kyu = "0.0.0-20251222115527", Vyu = {
|
|
71988
71988
|
version: Kyu
|
|
71989
71989
|
};
|
|
71990
71990
|
class Gyu {
|
|
@@ -99572,7 +99572,7 @@ function EIu({
|
|
|
99572
99572
|
}, r = async () => {
|
|
99573
99573
|
if (s1())
|
|
99574
99574
|
try {
|
|
99575
|
-
const { open: o } = await import("./replay-index-
|
|
99575
|
+
const { open: o } = await import("./replay-index-DwyYdeS0.js"), s = await o({
|
|
99576
99576
|
multiple: !0
|
|
99577
99577
|
});
|
|
99578
99578
|
if (!s)
|
|
@@ -99908,7 +99908,7 @@ const jIu = ({ data: u }) => {
|
|
|
99908
99908
|
}, i = async (l) => {
|
|
99909
99909
|
if (l?.preventDefault(), s1())
|
|
99910
99910
|
try {
|
|
99911
|
-
const { open: c } = await import("./replay-index-
|
|
99911
|
+
const { open: c } = await import("./replay-index-DwyYdeS0.js"), d = await c();
|
|
99912
99912
|
if (!d)
|
|
99913
99913
|
return;
|
|
99914
99914
|
const E = await pp(d);
|
|
@@ -100438,7 +100438,7 @@ function DKu(u) {
|
|
|
100438
100438
|
async function oK(u, e, a) {
|
|
100439
100439
|
const t = typeof u == "string" ? u : u.toString();
|
|
100440
100440
|
if (s1()) {
|
|
100441
|
-
const { openUrl: r } = await import("./replay-index-
|
|
100441
|
+
const { openUrl: r } = await import("./replay-index-CKPz9pdF.js");
|
|
100442
100442
|
await r(t);
|
|
100443
100443
|
return;
|
|
100444
100444
|
}
|
|
@@ -104155,7 +104155,7 @@ function vHu({
|
|
|
104155
104155
|
project: { userFilesDir: a }
|
|
104156
104156
|
} = Ou(), { certificates: t } = hi(), r = ca(), { getCollection: n } = vp(), i = n(u), o = a.get(), { inputs: s, servers: l } = r.get(), c = i?.sourceDescriptions.get() ?? [];
|
|
104157
104157
|
return { execute: async (E) => {
|
|
104158
|
-
const p = `${o}/${u}`, h = new rue(), x = s.map((g) => JSON.stringify({ [g.name]: g.value })), f = kHu(l, c), { run: D } = await import("./replay-index-
|
|
104158
|
+
const p = `${o}/${u}`, h = new rue(), x = s.map((g) => JSON.stringify({ [g.name]: g.value })), f = kHu(l, c), { run: D } = await import("./replay-index-gY1ffML-.js");
|
|
104159
104159
|
return await D({
|
|
104160
104160
|
files: [p],
|
|
104161
104161
|
workflow: e ? [e] : [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./replay-index-WwrC-6Gc.js");async function n(e={}){return typeof e=="object"&&Object.freeze(e),await t.invoke("plugin:dialog|open",{options:e})}exports.open=n;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./replay-index-WwrC-6Gc.js");async function ho(r){const{descriptionPath:t,externalRefResolver:e,base:n}=r,a=await d.bundle({base:n,ref:t,config:r.config,dereference:!0,externalRefResolver:e});if(!a)throw new Error(`Could not find source description file '${t}'.`);return a.bundle.parsed}function Nt(r){if(typeof r!="object")return;const t=Object.keys(r)[0];return t?r[t]?.value:void 0}const go=r=>/\{.*?\}/.test(r);function oe({value:r,ctx:t,logger:e}){if(!r)return r;if(typeof r=="object"){for(const n in r)r[n]=oe({value:r[n],ctx:t,logger:e});return r}return typeof r=="number"||typeof r=="boolean"?r:r.toString().startsWith("$faker.")?De({pointer:r.slice(1),ctx:t,logger:e}):go(r)?$o(r,t,e):vo(r,t,e)}function mo(r,t,e){const n=r.indexOf("{");if(n!==-1){const c=r.substring(n+1).slice(0,-1),f=De({pointer:c.slice(1),ctx:t,logger:e});return f&&r.replace(/{(.*)}/,f)}else return r}function yo(r,t){const e=Object.keys(t),n=Object.values(t);return new Function(...e,`return ${r}`)(...n)}function $o(r,t,e){const n=/\{\$(\{[^{}]*\}|[^{}])*\}/g;let a=r;return a=a.replace(n,(c,f)=>wo(c,t,e)),a}function wo(r,t,e){if(!r.includes("$"))return r;if(r.includes("$faker."))return mo(r,t,e);const n=Fe(t)(Eo(r));return n!==void 0?n:""}const vo=(r,t,e)=>{if(!r)return r;const n=r.toString();if(!n.includes("$"))return r;if(n.startsWith("$file(")&&n.endsWith(")"))return n.slice(7,-2);if(n.startsWith("$sourceDescriptions.")&&n.includes(".workflows.")){const a=n.split("."),c=a[1],f=a[3];if(!c||!f)return;const l=Fe(t)("$sourceDescriptions");return l[c]?l[c].workflows.find(g=>g.workflowId===f):void 0}return n&&n.trim().startsWith("faker.")?De({pointer:n,ctx:t,logger:e}):n?Fe(t)(kt(n)):n.replace(/\$\{([^}]+)}/g,(a,c)=>Fe(t)(kt(c)))};function Eo(r){return r.replace(/\{(.*)\}/,"$1")}function kt(r){return r.replace(/\['(.*?)'\]/g,".$1")}const Fe=(r,t="")=>e=>{if(t||(t=e),!e)return r;const[n,...a]=e.split(".");if(!r)throw Error(`Cannot get ${d.red(n)} from ${d.red(t)}`);if(r?.[n]===void 0){const c=` Undefined ${d.red(n)} at ${d.red(t)}.`,f=Object.keys(r).length?`Did you mean to use another key? Available keys:
|
|
2
2
|
${Object.keys(r).join(", ")}.
|
|
3
3
|
`:"",l=`${c} ${f}`;throw Error(l)}return Fe(r[n],t)(a.join("."))};function De({pointer:r,ctx:t,logger:e}){const n=r.split("."),a={ctx:{faker:t.$faker}};try{const c=n.map(f=>f.trim()).map((f,l)=>f.endsWith(")")?`${l==0?"":"."}${f}`:`["${f}"]`).join("");return yo(`ctx${c}`,a)}catch(c){e.error(d.red(c.toString()));return}}function jt(r,t,e){if(typeof r=="string"&&r)return oe({value:r,ctx:t,logger:e});if(!(typeof r=="string"||typeof r=="number"||typeof r=="boolean"||typeof r>"u"||r instanceof Blob||r===null))for(const n in r)typeof r[n]=="string"?r[n]&&(r[n]=oe({value:r[n],ctx:t,logger:e})):jt(r[n],t,e)}function St(r,t,e){return jt(r,t,e)||r}function Ct(r,t){if(!r)return;const e={};for(const n in t)e[`{${n}}`]=String(t[n]);return r.split(/(\{[a-zA-Z0-9_.-]+\}+)/g).map(n=>e[n]?e[n]:n).join("")}function ko(r){return typeof r=="object"&&r!==null&&"name"in r&&"value"in r&&!("in"in r)}function Ir(r){return typeof r=="object"&&r!==null&&"in"in r&&["header","query","path","cookie"].includes(r.in)}const So=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function Wt(r){return r.startsWith("$file(")&&r.endsWith(")")?r.substring(7,r.length-2):r}const bt=async(r,t,e,n,a)=>{const c=d.pathBrowserifyExports.dirname(n),f=d.pathBrowserifyExports.resolve(c,Wt(e));r.append(t,await a.options.requestFileLoader.getFileBody(f))},qt=(r,t,e,n,a,c)=>{Object.entries(e).forEach(([f,l])=>{const g=c?`${c}[${f}]`:f;typeof l=="string"&&l.startsWith("$file(")&&l.endsWith(")")?r.push(bt(t,g,l,n,a)):Array.isArray(l)?l.forEach(h=>{typeof h=="string"&&h.startsWith("$file(")&&h.endsWith(")")?r.push(bt(t,g,h,n,a)):t.append(g,h.toString())}):typeof l=="object"&&l!==null?qt(r,t,l,n,a,g):(typeof l=="string"||typeof l=="number"||typeof l=="boolean")&&t.append(g,l.toString())})},Co=async(r,t,e,n)=>{if(r&&typeof r=="object"&&!Array.isArray(r)){const a=[];qt(a,t,r,e,n),await Promise.all(a)}},bo=async(r,t)=>{if(typeof r=="string"&&r.startsWith("$file(")&&r.endsWith(")")){const e=d.pathBrowserifyExports.resolve(d.pathBrowserifyExports.dirname(t.options.filePath),Wt(r));return t.options.requestFileLoader.getFileBody(e)}else return r};async function Ao(r,t){if(!r)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:e,contentType:n}=r;if(n==="multipart/form-data"){const a=new FormData,c=d.pathBrowserifyExports.resolve(t.options.filePath);return await Co(e,a,c,t),{...r,payload:a}}else{if(n==="application/octet-stream"||typeof n=="string"&&So.test(n))return{...r,payload:await bo(e,t),contentType:"application/octet-stream"};if(n==="application/x-www-form-urlencoded"&&typeof e=="string")return{...r,payload:Object.fromEntries(new URLSearchParams(e).entries()),contentType:"application/x-www-form-urlencoded"}}return r}function Ro(r){try{return d.parseRuntimeExpression(r)}catch{throw new Error(`Runtime expression is not valid: ${r}`)}}function Oo(r,t){const e=[{pattern:/\$response\.body#\/([\w/]+)/g,ctxFunction:(a,c)=>Te(t.$response?.body,c,a)},{pattern:/\$request\.body#\/([\w/]+)/g,ctxFunction:(a,c)=>Te(t.$request?.body,c,a)},{pattern:/\$outputs\.([\w-]+)#\/([\w/]+)/g,ctxFunction:(a,c,f)=>Te(t.$outputs?.[c],f,a)},{pattern:/\$workflows\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/]+)/g,ctxFunction:(a,c,f,l)=>Te(t.$workflows?.[c]?.outputs?.[f],l,a)},{pattern:/\$steps\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/]+)/g,ctxFunction:(a,c,f,l)=>Te(t.$steps?.[c]?.outputs?.[f],l,a)}];let n=r;for(const{pattern:a,ctxFunction:c}of e)n=n.replaceAll(a,c);return n}function Te(r,t,e){if(r)try{const n=d.pointer.get(r,`/${t}`);return typeof n=="string"||Array.isArray(n)||typeof n=="object"?JSON.stringify(n):n!==void 0?n:e}catch{return e}return e}function re({payload:r,context:t,contentType:e,logger:n}){if(e?.includes("application/octet-stream"))return St(r,t,n);if(e?.includes("multipart/form-data")){if(r instanceof FormData){const a=new FormData;for(const[c,f]of r.entries())if(f instanceof File)a.append(c,f);else{const l=re({payload:f,context:t,logger:n});a.append(c,l)}return a}return St(r,t,n)}return typeof r=="string"?No(r)?ye(r,t,n):Lo(r,t,n):d.isPlainObject(r)?Object.entries(r).reduce((a,[c,f])=>(a[c]=re({payload:f,context:t,logger:n}),a),{}):Array.isArray(r)?r.map(a=>re({payload:a,context:t,logger:n})):r}function ye(r,t,e){return typeof r=="string"?To(r,t,e):d.isPlainObject(r)?Object.entries(r).reduce((n,[a,c])=>(n[a]=c&&ye(c,t,e),n),{}):Array.isArray(r)?r.map(n=>ye(n,t,e)):r}function To(r,t,e){if(/^\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?$/.test(r))return De({pointer:r.slice(1),ctx:t,logger:e});if(r.includes("$faker.")){const c=/\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?/g;r=r.replace(c,f=>De({pointer:f.slice(1),ctx:t,logger:e})).replace(/{(.*?)}/g,"$1")}if(!r.includes("$")&&!/[=<>]/.test(r))return r;Ro(r);const n=_o(r,t),a=Fo(t);try{return new Function(...Object.keys(a),`return ${n};`)(...Object.values(a))}catch{throw new Error(`Error in resolving runtime expression '${r}'.
|
|
4
4
|
This could be because the expression references a value from a previous failed step, or is trying to reference a variable that hasn't been set.`)}}function Po(r){return r.replace(/\$([a-zA-Z0-9._-]+)/g,(t,e)=>`$${e.replace(/-/g,"_")}`)}function _o(r,t){const e=Oo(r,t),a=Po(e).replace(/{(.*?)}/g,"$1"),c=Do(a),f=/\.header\.([a-zA-Z0-9._-]+)/g;return c.replace(f,(g,h)=>`.header.${h.toLowerCase()}`)}function Fo(r){const t={};for(const[e,n]of Object.entries(r)){const a=e.replace(/-/g,"_");t[a]=Ut(n)}return t}function Ut(r){return Array.isArray(r)?r:typeof r=="object"&&r!==null?Io(r):r}function Io(r){return Object.keys(r).reduce((t,e)=>{const n=e.replace(/-/g,"_");return t[n]=Ut(r[e]),t},{})}function Do(r){return r.replace(/\.(\d+)/g,(t,e,n,a)=>{const c=a[n-1];return/\d/.test(c)?t:`[${e}]`})}function Lo(r,t,e){const n=/\{(?:[^{}]|\{[^{}]*\})*\}|\$[^\s{}]+(?:\([^()]*\))*/g;return r.replace(n,a=>{const c=a.trim(),f=ye(c,t,e);return f!==void 0?f:a})}function No(r){return/^\$[^\s{}]+(\([^)]*\))?$|^\{[^{}]*\}$/.test(r.trim())}function jo({payload:r,replacements:t,expressionContext:e,logger:n}){for(const a of t){const{target:c,value:f}=a;if(typeof c!="string")throw new Error(`Invalid JSON Pointer: ${c}`);try{const l=d.pointer.get(r,c),g=re({payload:f,context:e,logger:n});l!==void 0&&d.pointer.set(r,c,g)}catch{throw new Error(`Invalid JSON Pointer: ${c}`)}}}const Wo=["parameters","failureActions","successActions"];function qo(r,t){const{reference:e,value:n}=r;if(!Wo.some(c=>e.includes(`$components.${c}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const a=oe({value:e,ctx:t,logger:t.options.logger});return"value"in a&&n?{...a,value:n}:a}function _e(r,t){return"reference"in r?qo(r,t):r}function Uo(r,t){const e=r?.requestBody?.content||{},[n,a]=Object.entries(e)[0]||[],c=a?.example||Nt(a?.examples)||zt(a?.schema,t),f=zo(r);return{parameters:Bo([...At(r.pathParameters,t),...At(r.parameters,t)]).filter(({value:g})=>g),contentTypeParameters:[...n?[{name:"content-type",in:"header",value:n}]:[],...f?[{name:"accept",in:"header",value:f}]:[]],requestBody:c,contentType:n}}function zo(r){return r?.responses?Array.from(new Set(Object.values(r.responses).flatMap(t=>d.isPlainObject(t)&&"content"in t?Object.keys(t.content||{}):[]))).join(", "):void 0}function At(r,t){return(r||[]).filter(e=>e?.required===!0).map(e=>{if(Ir(e))return{name:e.name,in:e.in,value:Xo(e,t)}}).filter(e=>e!==void 0)}function Bo(r){const t={};for(const e of r)Ir(e)&&(t[(e.name+":"+e.in).toLowerCase()]=e);return Object.values(t)}function xo(r,t){let e,n;if(r.includes("$sourceDescriptions.")){const[,g,h]=r.split(".");e=g,n=h}else r.includes(".")?[e,n]=r.split("."):(n=r,e=Object.keys(t)[0]);const a=Object.keys(t);if(!t[e])throw new Error(`Unknown description name ${d.red(e)} at ${d.red(r)}. Available descriptions: ${a.join(", ")}.`);const c=t[e],f=c?.components?.securitySchemes,l=c.servers;for(const[g,h]of Object.entries(t[e].paths)){if(!h)return;for(const[y,w]of Object.entries(h))if(w.operationId===n)return{servers:h.servers||l,...w,pathParameters:w.parameters||[],path:g,method:y,descriptionName:e,securitySchemes:f}}throw new Error(`Unknown operationId ${d.red(n)} at ${d.red(r)}.`)}function Mo(r,t){const{$sourceDescriptions:e,sourceDescriptions:n}=t,[a,c]=r.split("#");if(!n)throw new Error("Missing described sourceDescriptions");const f=n.find(P=>{if(["openapi","arazzo"].includes(P.type)){if(a.includes("$sourceDescriptions.")){const[,N]=a.split(".");return P.name===N}return"url"in P&&P.url===a}return!1})?.name;if(!f)throw new Error(`Unknown operationPath ${d.red(r)}. API description ${d.red(a)} is not listed in 'sourceDescriptions' workflow section.`);const l=e[f]||{},g=l?.components?.securitySchemes,[h,y,w]=d.pointer.parse(c);if(h!=="paths")throw new Error(`Invalid fragment identifier: ${c} at operationPath ${d.red(r)}.`);const{servers:k}=l,C=d.pointer.get(l,c)||{},j=d.pointer.get(l,d.pointer.compile(["paths",y]))||{};return{servers:j.servers||k,...C,pathParameters:j.parameters||[],path:y,method:w,descriptionName:f,securitySchemes:g}}function Vo(r,t){if(!r.operationId&&!r.operationPath)return;const{$sourceDescriptions:e,sourceDescriptions:n}=t,{operationId:a,operationPath:c}=r;return a?xo(a,e):c?Mo(c,{$sourceDescriptions:e,sourceDescriptions:n}):void 0}function Ko({statusCode:r,contentType:t,descriptionResponses:e}){return e?(e[r]||e.default)?.content?.[t]?.schema:void 0}function Ho(r,t){if(!t)return;const n=t.requestBody?.content;return n&&n[r]?.schema||void 0}const Jo={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"};function zt(r,t){if(r)try{return d.sample(r,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(e){t.error(d.bgRed(" Error while generating test data from JSON Schema ")+`
|