@redocly/replay 0.18.0-next.7 → 0.18.0-next.8
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-D5scpb0R.js → replay-index-B74AHsKR.js} +1 -1
- package/dist/{replay-index-Ch5Pzvjz.js → replay-index-CGFC2Q_n.js} +1 -1
- package/dist/{replay-index-DzJpa9d7.js → replay-index-DO5G0ziP.js} +5 -5
- package/dist/{replay-index-D3DKLTVH.js → replay-index-DrHSnGwf.js} +1 -1
- package/dist/{replay-index-CtxXXez8.js → replay-index-jgejN8vg.js} +1 -1
- package/dist/{replay-index-CDP0PkWJ.js → replay-index-x3eoUDpi.js} +6 -6
- package/dist/{replay-tauri-path-DBCtBa4y.js → replay-tauri-path-BZZUBEqn.js} +1 -1
- package/dist/{replay-tauri-path-DyyzfaQ-.js → replay-tauri-path-DDN8E2bb.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/package.json +2 -2
|
@@ -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-x3eoUDpi.js");async function n(e={}){return typeof e=="object"&&Object.freeze(e),await t.invoke("plugin:dialog|open",{options:e})}exports.open=n;
|
|
@@ -45456,7 +45456,7 @@ async function QU(u, e) {
|
|
|
45456
45456
|
class Ta {
|
|
45457
45457
|
static utils = null;
|
|
45458
45458
|
static async getUtils() {
|
|
45459
|
-
return Ta.utils || (Ta.utils = Uc() ? await import("./replay-tauri-path-
|
|
45459
|
+
return Ta.utils || (Ta.utils = Uc() ? await import("./replay-tauri-path-DDN8E2bb.js") : await Promise.resolve().then(() => Vie)), Ta.utils;
|
|
45460
45460
|
}
|
|
45461
45461
|
static async join(...e) {
|
|
45462
45462
|
return (await Ta.getUtils()).join(...e);
|
|
@@ -73843,7 +73843,7 @@ const u6 = lt({});
|
|
|
73843
73843
|
function g3() {
|
|
73844
73844
|
return Ga(u6) || {};
|
|
73845
73845
|
}
|
|
73846
|
-
const Hyu = "0.18.0-next.
|
|
73846
|
+
const Hyu = "0.18.0-next.8", qyu = {
|
|
73847
73847
|
version: Hyu
|
|
73848
73848
|
};
|
|
73849
73849
|
class Wyu {
|
|
@@ -95613,7 +95613,7 @@ function M$u({
|
|
|
95613
95613
|
}, r = async () => {
|
|
95614
95614
|
if (Uc())
|
|
95615
95615
|
try {
|
|
95616
|
-
const { open: o } = await import("./replay-index-
|
|
95616
|
+
const { open: o } = await import("./replay-index-B74AHsKR.js"), s = await o({
|
|
95617
95617
|
multiple: !0
|
|
95618
95618
|
});
|
|
95619
95619
|
if (!s)
|
|
@@ -95949,7 +95949,7 @@ const uRu = ({ data: u }) => {
|
|
|
95949
95949
|
}, i = async (l) => {
|
|
95950
95950
|
if (l?.preventDefault(), Uc())
|
|
95951
95951
|
try {
|
|
95952
|
-
const { open: c } = await import("./replay-index-
|
|
95952
|
+
const { open: c } = await import("./replay-index-B74AHsKR.js"), d = await c();
|
|
95953
95953
|
if (!d)
|
|
95954
95954
|
return;
|
|
95955
95955
|
const E = await f3(d);
|
|
@@ -100439,7 +100439,7 @@ async function wLu({
|
|
|
100439
100439
|
sourceDescriptions: n,
|
|
100440
100440
|
severitySettings: i
|
|
100441
100441
|
}) {
|
|
100442
|
-
const o = `${a}/${u}`, s = new zLu(), l = t.map((E) => JSON.stringify({ [E.name]: E.value })), c = OLu(r, n), { run: d } = await import("./replay-index-
|
|
100442
|
+
const o = `${a}/${u}`, s = new zLu(), l = t.map((E) => JSON.stringify({ [E.name]: E.value })), c = OLu(r, n), { run: d } = await import("./replay-index-DrHSnGwf.js");
|
|
100443
100443
|
return await d({
|
|
100444
100444
|
files: [o],
|
|
100445
100445
|
workflow: e ? [e] : [],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as Gt, a as U, p as Y, c as _o, d as Ee, f as cr, g as Io, h as rr, k as Do, y as fr, l as X, m as Re, n as Zt, o as No, q as ur, t as Yt, u as we, R as Ze, v as Lo, w as jo, C as V, x as Dt, z as Wo, A as qo, S as es, U as rs, B as J, D as Uo, E as zo, F as Bo, G as xo, H as Mo, I as Vo, J as Ko, K as Ho, L as Jo, M as Nt, N as Xo, O as Lt, P as Qo, Q as Go } from "./replay-index-
|
|
1
|
+
import { b as Gt, a as U, p as Y, c as _o, d as Ee, f as cr, g as Io, h as rr, k as Do, y as fr, l as X, m as Re, n as Zt, o as No, q as ur, t as Yt, u as we, R as Ze, v as Lo, w as jo, C as V, x as Dt, z as Wo, A as qo, S as es, U as rs, B as J, D as Uo, E as zo, F as Bo, G as xo, H as Mo, I as Vo, J as Ko, K as Ho, L as Jo, M as Nt, N as Xo, O as Lt, P as Qo, Q as Go } from "./replay-index-DO5G0ziP.js";
|
|
2
2
|
async function Zo(r) {
|
|
3
3
|
const { descriptionPath: t, externalRefResolver: e, base: n } = r, a = await Gt({
|
|
4
4
|
base: 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-x3eoUDpi.js");async function po(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 Lt(r){if(typeof r!="object")return;const t=Object.keys(r)[0];return t?r[t]?.value:void 0}const ho=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}):ho(r)?yo(r,t,e):wo(r,t,e)}function go(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 mo(r,t){const e=Object.keys(t),n=Object.values(t);return new Function(...e,`return ${r}`)(...n)}function yo(r,t,e){const n=/\{\$(\{[^{}]*\}|[^{}])*\}/g;let a=r;return a=a.replace(n,(c,f)=>$o(c,t,e)),a}function $o(r,t,e){if(!r.includes("$"))return r;if(r.includes("$faker."))return go(r,t,e);const n=Fe(t)(vo(r));return n!==void 0?n:""}const wo=(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 vo(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 mo(`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 Eo(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 ko=/^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())})},So=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)}},Co=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 bo(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 So(e,a,c,t),{...r,payload:a}}else{if(n==="application/octet-stream"||typeof n=="string"&&ko.test(n))return{...r,payload:await Co(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 Ao(r){try{return d.parseRuntimeExpression(r)}catch{throw new Error(`Runtime expression is not valid: ${r}`)}}function Ro(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):Do(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"?Oo(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 Oo(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;Ao(r);const n=Po(r,t),a=_o(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 To(r){return r.replace(/\$([a-zA-Z0-9._-]+)/g,(t,e)=>`$${e.replace(/-/g,"_")}`)}function Po(r,t){const e=Ro(r,t),a=To(e).replace(/{(.*?)}/g,"$1"),c=Io(a),f=/\.header\.([a-zA-Z0-9._-]+)/g;return c.replace(f,(g,h)=>`.header.${h.toLowerCase()}`)}function _o(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?Fo(r):r}function Fo(r){return Object.keys(r).reduce((t,e)=>{const n=e.replace(/-/g,"_");return t[n]=Ut(r[e]),t},{})}function Io(r){return r.replace(/\.(\d+)/g,(t,e,n,a)=>{const c=a[n-1];return/\d/.test(c)?t:`[${e}]`})}function Do(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 Lo({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 jo=["parameters","failureActions","successActions"];function Wo(r,t){const{reference:e,value:n}=r;if(!jo.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?Wo(r,t):r}function qo(r,t){const e=r?.requestBody?.content||{},[n,a]=Object.entries(e)[0]||[],c=a?.example||Lt(a?.examples)||zt(a?.schema,t),f=Uo(r);return{parameters:zo([...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 Uo(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:Jo(e,t)}}).filter(e=>e!==void 0)}function zo(r){const t={};for(const e of r)Ir(e)&&(t[(e.name+":"+e.in).toLowerCase()]=e);return Object.values(t)}function Bo(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[m,k]of Object.entries(h))if(k.operationId===n)return{servers:h.servers||l,...k,pathParameters:k.parameters||[],path:g,method:m,descriptionName:e,securitySchemes:f}}throw new Error(`Unknown operationId ${d.red(n)} at ${d.red(r)}.`)}function xo(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[,L]=a.split(".");return P.name===L}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,m,k]=d.pointer.parse(c);if(h!=="paths")throw new Error(`Invalid fragment identifier: ${c} at operationPath ${d.red(r)}.`);const{servers:w}=l,b=d.pointer.get(l,c)||{},W=d.pointer.get(l,d.pointer.compile(["paths",m]))||{};return{servers:W.servers||w,...b,pathParameters:W.parameters||[],path:m,method:k,descriptionName:f,securitySchemes:g}}function Mo(r,t){if(!r.operationId&&!r.operationPath)return;const{$sourceDescriptions:e,sourceDescriptions:n}=t,{operationId:a,operationPath:c}=r;return a?Bo(a,e):c?xo(c,{$sourceDescriptions:e,sourceDescriptions:n}):void 0}function Vo({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 Ko={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 ")+`
|