@redocly/replay 0.19.0-next.0 → 0.19.0-next.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-Cje6j59C.js → replay-index-3iic9TPy.js} +12 -14
- package/dist/{replay-index-cTMKyPIi.js → replay-index-B7D2AWYn.js} +1 -1
- package/dist/{replay-index-Bh96AjPW.js → replay-index-B8c5mEG6.js} +7 -7
- package/dist/{replay-index-B7NtQtLM.js → replay-index-C7yMXvda.js} +1 -1
- package/dist/{replay-index-BZ4uo8YE.js → replay-index-DsZNn0BG.js} +1 -1
- package/dist/{replay-index-Ct56bhOi.js → replay-index-H7ATB3kz.js} +1 -1
- package/dist/{replay-tauri-path-B-qO7pnf.js → replay-tauri-path-BSH3mlBY.js} +1 -1
- package/dist/{replay-tauri-path-O3q8hYTs.js → replay-tauri-path-D_pwInSJ.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/package.json +1 -1
|
@@ -46007,7 +46007,7 @@ function u4() {
|
|
|
46007
46007
|
class fa {
|
|
46008
46008
|
static utils = null;
|
|
46009
46009
|
static async getUtils() {
|
|
46010
|
-
return fa.utils || (fa.utils = u4() ? await import("./replay-tauri-path-
|
|
46010
|
+
return fa.utils || (fa.utils = u4() ? await import("./replay-tauri-path-D_pwInSJ.js") : await Promise.resolve().then(() => aoe)), fa.utils;
|
|
46011
46011
|
}
|
|
46012
46012
|
static async dirname(e) {
|
|
46013
46013
|
return (await fa.getUtils()).dirname(e);
|
|
@@ -74655,7 +74655,7 @@ const l6 = l0({});
|
|
|
74655
74655
|
function F3() {
|
|
74656
74656
|
return Ha(l6) || {};
|
|
74657
74657
|
}
|
|
74658
|
-
const SCu = "0.19.0-next.
|
|
74658
|
+
const SCu = "0.19.0-next.1", zCu = {
|
|
74659
74659
|
version: SCu
|
|
74660
74660
|
};
|
|
74661
74661
|
class wCu {
|
|
@@ -96439,7 +96439,7 @@ function gRu({
|
|
|
96439
96439
|
}, r = async () => {
|
|
96440
96440
|
if (u4())
|
|
96441
96441
|
try {
|
|
96442
|
-
const { open: o } = await import("./replay-index-
|
|
96442
|
+
const { open: o } = await import("./replay-index-DsZNn0BG.js"), s = await o({
|
|
96443
96443
|
multiple: !0
|
|
96444
96444
|
});
|
|
96445
96445
|
if (!s)
|
|
@@ -96775,7 +96775,7 @@ const LRu = ({ data: u }) => {
|
|
|
96775
96775
|
}, i = async (l) => {
|
|
96776
96776
|
if (l?.preventDefault(), u4())
|
|
96777
96777
|
try {
|
|
96778
|
-
const { open: c } = await import("./replay-index-
|
|
96778
|
+
const { open: c } = await import("./replay-index-DsZNn0BG.js"), d = await c();
|
|
96779
96779
|
if (!d)
|
|
96780
96780
|
return;
|
|
96781
96781
|
const E = await C3(d);
|
|
@@ -101236,7 +101236,7 @@ async function mIu({
|
|
|
101236
101236
|
sourceDescriptions: n,
|
|
101237
101237
|
severitySettings: i
|
|
101238
101238
|
}) {
|
|
101239
|
-
const o = `${a}/${u}`, s = new sZ(), l = t.map((E) => JSON.stringify({ [E.name]: E.value })), c = hIu(r, n), { run: d } = await import("./replay-index-
|
|
101239
|
+
const o = `${a}/${u}`, s = new sZ(), l = t.map((E) => JSON.stringify({ [E.name]: E.value })), c = hIu(r, n), { run: d } = await import("./replay-index-C7yMXvda.js");
|
|
101240
101240
|
return await d({
|
|
101241
101241
|
files: [o],
|
|
101242
101242
|
workflow: e ? [e] : [],
|
|
@@ -105418,16 +105418,14 @@ function dHu(u, e, a, t, r) {
|
|
|
105418
105418
|
};
|
|
105419
105419
|
}
|
|
105420
105420
|
function EHu(u) {
|
|
105421
|
-
const e = []
|
|
105422
|
-
return
|
|
105423
|
-
const
|
|
105424
|
-
|
|
105425
|
-
|
|
105426
|
-
|
|
105427
|
-
e.push(zr(i + mu.ClientId)), [be.Implicit, be.ClientCredentialsWithJwtAssertion].includes(s) || e.push(zr(i + mu.ClientSecret)), s === be.ClientCredentialsWithJwtAssertion && e.push(
|
|
105428
|
-
zr(i + mu.ClientAssertion)
|
|
105421
|
+
const e = [];
|
|
105422
|
+
return (u.security?.flat() || []).forEach((t) => {
|
|
105423
|
+
const r = s6(t), n = t.id;
|
|
105424
|
+
(r === ve.BasicAuth || r === ve.DigestAuth) && (e.push(zr(n + mu.Username, !1)), e.push(zr(n + mu.Password))), r === ve.JWT && e.push(zr(n + mu.JWTToken)), r === ve.APIKey && e.push(zr(n + mu.APIKey)), r === ve.OAuth2 && (e.push(zr(n + mu.Token)), pB(t).forEach((o) => {
|
|
105425
|
+
e.push(zr(n + mu.ClientId)), [be.Implicit, be.ClientCredentialsWithJwtAssertion].includes(o) || e.push(zr(n + mu.ClientSecret)), o === be.ClientCredentialsWithJwtAssertion && e.push(
|
|
105426
|
+
zr(n + mu.ClientAssertion)
|
|
105429
105427
|
);
|
|
105430
|
-
})),
|
|
105428
|
+
})), r === ve.OpenIDConnect && (e.push(zr(n + mu.Token)), e.push(zr(n + mu.ClientId)), e.push(zr(n + mu.ClientSecret)));
|
|
105431
105429
|
}), e;
|
|
105432
105430
|
}
|
|
105433
105431
|
function zr(u, e = !0) {
|
|
@@ -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-B8c5mEG6.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 ")+`
|