@redocly/replay 0.22.0-next.0 → 0.22.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-B4gk7FRm.js +21 -0
- package/dist/{replay-index-BUBW9LMb.js → replay-index-BZl4LCFm.js} +20934 -20906
- package/dist/{replay-index-CArP7R8K.js → replay-index-BjbBvDo0.js} +1 -1
- package/dist/{replay-index-BlUkoubf.js → replay-index-CMtHreL2.js} +1 -1
- package/dist/{replay-index-CI3uoe88.js → replay-index-CQWHuBHp.js} +982 -995
- package/dist/{replay-index-C1nn1nqS.js → replay-index-CSXwwqG_.js} +1 -1
- package/dist/{replay-index-N0bz99BZ.js → replay-index-CilMcpyo.js} +1 -1
- package/dist/replay-index-DvYjOSKe.js +1 -0
- package/dist/{replay-tauri-path-DJb2eBSW.js → replay-tauri-path-BwK0JDNc.js} +1 -1
- package/dist/{replay-tauri-path-XFqDTfoO.js → replay-tauri-path-DDFiP_z1.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/package.json +4 -4
- package/dist/replay-index-C6SJPGDO.js +0 -23
- package/dist/replay-index-CUs62_1f.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const au=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const au=require("./replay-index-CQWHuBHp.js");async function Fl(u){const{descriptionPath:e,externalRefResolver:a,base:i}=u,r=await au.bundle({base:i,ref:e,config:u.config,dereference:!0,externalRefResolver:a});if(!r)throw new Error(`Could not find source description file '${e}'.`);return r.bundle.parsed}function k1(u){if(typeof u!="object")return;const e=Object.keys(u)[0];return e?u[e]?.value:void 0}const{env:y0={},argv:h1=[],platform:kl=""}=typeof process>"u"?{}:process,hl="NO_COLOR"in y0||h1.includes("--no-color"),pl="FORCE_COLOR"in y0||h1.includes("--color"),gl=kl==="win32",Cl=y0.TERM==="dumb",vl=au.tty&&void 0,bl="CI"in y0&&("GITHUB_ACTIONS"in y0||"GITLAB_CI"in y0||"CIRCLECI"in y0),Bl=!hl&&(pl||gl&&!Cl||vl||bl),p1=(u,e,a,i,r=e.substring(0,u)+i,o=e.substring(u+a.length),n=o.indexOf(a))=>r+(n<0?o:p1(n,o,a,i)),Al=(u,e,a,i,r)=>u<0?a+e+i:a+p1(u,e,i,r)+i,fl=(u,e,a=u,i=u.length+1)=>r=>r||!(r===""||r===void 0)?Al((""+r).indexOf(e,i),r,u,e,a):"",cu=(u,e,a)=>fl(`\x1B[${u}m`,`\x1B[${e}m`,a),Sr={reset:cu(0,0),bold:cu(1,22,"\x1B[22m\x1B[1m"),dim:cu(2,22,"\x1B[22m\x1B[2m"),italic:cu(3,23),underline:cu(4,24),inverse:cu(7,27),hidden:cu(8,28),strikethrough:cu(9,29),black:cu(30,39),red:cu(31,39),green:cu(32,39),yellow:cu(33,39),blue:cu(34,39),magenta:cu(35,39),cyan:cu(36,39),white:cu(37,39),gray:cu(90,39),bgBlack:cu(40,49),bgRed:cu(41,49),bgGreen:cu(42,49),bgYellow:cu(43,49),bgBlue:cu(44,49),bgMagenta:cu(45,49),bgCyan:cu(46,49),bgWhite:cu(47,49),blackBright:cu(90,39),redBright:cu(91,39),greenBright:cu(92,39),yellowBright:cu(93,39),blueBright:cu(94,39),magentaBright:cu(95,39),cyanBright:cu(96,39),whiteBright:cu(97,39),bgBlackBright:cu(100,49),bgRedBright:cu(101,49),bgGreenBright:cu(102,49),bgYellowBright:cu(103,49),bgBlueBright:cu(104,49),bgMagentaBright:cu(105,49),bgCyanBright:cu(106,49),bgWhiteBright:cu(107,49)},yl=({useColor:u=Bl}={})=>u?Sr:Object.keys(Sr).reduce((e,a)=>({...e,[a]:String}),{}),{reset:Zeu,bold:d0,dim:zl,italic:Ueu,underline:Sl,inverse:g1,hidden:Yeu,strikethrough:Qeu,black:Xeu,red:Au,green:N0,yellow:m0,blue:Mu,magenta:uau,cyan:eau,white:jr,gray:Pu,bgBlack:aau,bgRed:ha,bgGreen:iau,bgYellow:rau,bgBlue:nau,bgMagenta:oau,bgCyan:tau,bgWhite:sau,blackBright:lau,redBright:Eau,greenBright:Dau,yellowBright:xau,blueBright:cau,magentaBright:dau,cyanBright:mau,whiteBright:Fau,bgBlackBright:kau,bgRedBright:hau,bgGreenBright:pau,bgYellowBright:gau,bgBlueBright:Cau,bgMagentaBright:vau,bgCyanBright:bau,bgWhiteBright:Bau}=yl(),jl=u=>/\{.*?\}/.test(u);function u0({value:u,ctx:e,logger:a}){if(!u)return u;if(au.isPlainObject(u)){const i={};for(const r in u)i[r]=u0({value:u[r],ctx:e,logger:a});return i}else if(Array.isArray(u))return u.map(i=>u0({value:i,ctx:e,logger:a}));return typeof u!="string"?u:u.startsWith("$faker.")?ne({pointer:u.slice(1),ctx:e,logger:a}):jl(u)?wl(u,e,a):Tl(u,e,a)}function Ml(u,e,a){const i=u.indexOf("{");if(i!==-1){const o=u.substring(i+1).slice(0,-1),n=ne({pointer:o.slice(1),ctx:e,logger:a});return n&&u.replace(/{(.*)}/,n)}else return u}function Pl(u,e){const a=Object.keys(e),i=Object.values(e);return new Function(...a,`return ${u}`)(...i)}function wl(u,e,a){const i=/\{\$(\{[^{}]*\}|[^{}])*\}/g;let r=u;return r=r.replace(i,(o,n)=>Kl(o,e,a)),r}function Kl(u,e,a){if(!u.includes("$"))return u;if(u.includes("$faker."))return Ml(u,e,a);const i=ae(e)(Ll(u));return i!==void 0?i:""}const Tl=(u,e,a)=>{if(!u)return u;const i=u.toString();if(!i.includes("$"))return u;if(i.startsWith("$file(")&&i.endsWith(")"))return i.slice(7,-2);if(i.startsWith("$sourceDescriptions.")&&i.includes(".workflows.")){const r=i.split("."),o=r[1],n=r[3];if(!o||!n)return;const t=ae(e)("$sourceDescriptions");return t[o]?t[o].workflows.find(s=>s.workflowId===n):void 0}return i&&i.trim().startsWith("faker.")?ne({pointer:i,ctx:e,logger:a}):i?ae(e)(Mr(i)):i.replace(/\$\{([^}]+)}/g,(r,o)=>ae(e)(Mr(o)))};function Ll(u){return u.replace(/\{(.*)\}/,"$1")}function Mr(u){return u.replace(/\['(.*?)'\]/g,".$1")}const ae=(u,e="")=>a=>{if(e||(e=a),!a)return u;const[i,...r]=a.split(".");if(!u)throw Error(`Cannot get ${Au(i)} from ${Au(e)}`);if(u?.[i]===void 0){const o=` Undefined ${Au(i)} at ${Au(e)}.`,n=Object.keys(u).length?`Did you mean to use another key? Available keys:
|
|
2
2
|
${Object.keys(u).join(", ")}.
|
|
3
3
|
`:"",t=`${o} ${n}`;throw Error(t)}return ae(u[i],e)(r.join("."))};function ne({pointer:u,ctx:e,logger:a}){const i=u.split("."),r={ctx:{faker:e.$faker}};try{const o=i.map(n=>n.trim()).map((n,t)=>n.endsWith(")")?`${t==0?"":"."}${n}`:`["${n}"]`).join("");return Pl(`ctx${o}`,r)}catch(o){a.error(Au(o.toString()));return}}function C1(u,e,a){if(typeof u=="string"&&u)return u0({value:u,ctx:e,logger:a});if(!(typeof u=="string"||typeof u=="number"||typeof u=="boolean"||typeof u>"u"||u instanceof Blob||u===null))for(const i in u)typeof u[i]=="string"?u[i]&&(u[i]=u0({value:u[i],ctx:e,logger:a})):C1(u[i],e,a)}function Pr(u,e,a){return C1(u,e,a)||u}function wr(u,e){if(!u)return;const a={};for(const i in e)a[`{${i}}`]=String(e[i]);return u.split(/(\{[a-zA-Z0-9_.-]+\}+)/g).map(i=>a[i]?a[i]:i).join("")}function Nl(u){return au.isPlainObject(u)&&"name"in u&&"value"in u&&!("in"in u)}function Li(u){return au.isPlainObject(u)&&"in"in u&&typeof u.in=="string"&&["header","query","path","cookie"].includes(u.in)}const Rl=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function v1(u){return u.startsWith("$file(")&&u.endsWith(")")?u.substring(7,u.length-2):u}const Kr=async(u,e,a,i,r)=>{const o=au.pathBrowserifyExports.dirname(i),n=au.pathBrowserifyExports.resolve(o,v1(a));u.append(e,await r.options.requestFileLoader.getFileBody(n))},b1=(u,e,a,i,r,o)=>{Object.entries(a).forEach(([n,t])=>{const s=o?`${o}[${n}]`:n;typeof t=="string"&&t.startsWith("$file(")&&t.endsWith(")")?u.push(Kr(e,s,t,i,r)):Array.isArray(t)?t.forEach(l=>{typeof l=="string"&&l.startsWith("$file(")&&l.endsWith(")")?u.push(Kr(e,s,l,i,r)):e.append(s,l.toString())}):au.isPlainObject(t)?b1(u,e,t,i,r,s):(typeof t=="string"||typeof t=="number"||typeof t=="boolean")&&e.append(s,t.toString())})},Hl=async(u,e,a,i)=>{if(au.isPlainObject(u)){const r=[];b1(r,e,u,a,i),await Promise.all(r)}},Gl=async(u,e)=>{if(typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")){const a=au.pathBrowserifyExports.resolve(au.pathBrowserifyExports.dirname(e.options.filePath),v1(u));return e.options.requestFileLoader.getFileBody(a)}else return u};async function _l(u,e){if(!u)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:a,contentType:i}=u;if(i==="multipart/form-data"){const r=new FormData,o=au.pathBrowserifyExports.resolve(e.options.filePath);return await Hl(a,r,o,e),{...u,payload:r}}else{if(i==="application/octet-stream"||typeof i=="string"&&Rl.test(i))return{...u,payload:await Gl(a,e),contentType:"application/octet-stream"};if(i==="application/x-www-form-urlencoded"&&typeof a=="string")return{...u,payload:Object.fromEntries(new URLSearchParams(a).entries()),contentType:"application/x-www-form-urlencoded"}}return u}function Vl(u){try{return au.parseRuntimeExpression(u)}catch{throw new Error(`Runtime expression is not valid: ${u}`)}}function $l(u,e){const a=[{pattern:/\$response\.body#\/([\w/-]+)/g,ctxFunction:(r,o)=>q0(e.$response?.body,o,r)},{pattern:/\$request\.body#\/([\w/-]+)/g,ctxFunction:(r,o)=>q0(e.$request?.body,o,r)},{pattern:/\$outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,o,n)=>q0(e.$outputs?.[o],n,r)},{pattern:/\$workflows\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,o,n,t)=>q0(e.$workflows?.[o]?.outputs?.[n],t,r)},{pattern:/\$steps\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,o,n,t)=>q0(e.$steps?.[o]?.outputs?.[n],t,r)}];let i=u;for(const{pattern:r,ctxFunction:o}of a)i=i.replaceAll(r,o);return i}function q0(u,e,a){if(u)try{const i=au.pointer.get(u,`/${e}`);return typeof i=="string"||Array.isArray(i)||au.isPlainObject(i)?JSON.stringify(i):i!==void 0?i:a}catch{return a}return a}function qu({payload:u,context:e,contentType:a,logger:i}){if(a?.includes("application/octet-stream"))return Pr(u,e,i);if(a?.includes("multipart/form-data")){if(u instanceof FormData){const r=new FormData;for(const[o,n]of u.entries())if(n instanceof File)r.append(o,n);else{const t=qu({payload:n,context:e,logger:i});r.append(o,t)}return r}return Pr(u,e,i)}return typeof u=="string"?Yl(u)?z0(u,e,i):Ul(u,e,i):au.isPlainObject(u)?Object.entries(u).reduce((r,[o,n])=>(r[o]=qu({payload:n,context:e,logger:i}),r),{}):Array.isArray(u)?u.map(r=>qu({payload:r,context:e,logger:i})):u}function z0(u,e,a){return typeof u=="string"?Jl(u,e,a):au.isPlainObject(u)?Object.entries(u).reduce((i,[r,o])=>(i[r]=o&&z0(o,e,a),i),{}):Array.isArray(u)?u.map(i=>z0(i,e,a)):u}function Jl(u,e,a){if(/^\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?$/.test(u))return ne({pointer:u.slice(1),ctx:e,logger:a});if(u.includes("$faker.")){const o=/\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?/g;u=u.replace(o,n=>ne({pointer:n.slice(1),ctx:e,logger:a})).replace(/{(.*?)}/g,"$1")}if(!u.includes("$")&&!/[=<>]/.test(u))return u;Vl(u);const i=Ol(u,e),r=ql(e);try{return new Function(...Object.keys(r),`return ${i};`)(...Object.values(r))}catch{throw new Error(`Error in resolving runtime expression '${u}'.
|
|
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 Il(u){return u.replace(/\$([a-zA-Z0-9._-]+)/g,(e,a)=>`$${a.replace(/-/g,"_")}`)}function Ol(u,e){const a=$l(u,e),r=Il(a).replace(/{(.*?)}/g,"$1"),o=Zl(r),n=/\.header\.([a-zA-Z0-9._-]+)/g;return o.replace(n,(s,l)=>`.header.${l.toLowerCase()}`)}function ql(u){const e={};for(const[a,i]of Object.entries(u)){const r=a.replace(/-/g,"_");e[r]=B1(i)}return e}function B1(u){return Array.isArray(u)?u:au.isPlainObject(u)?Wl(u):u}function Wl(u){return Object.keys(u).reduce((e,a)=>{const i=a.replace(/-/g,"_");return e[i]=B1(u[a]),e},{})}function Zl(u){return u.replace(/\.(\d+)/g,(e,a,i,r)=>{const o=r[i-1];return/\d/.test(o)?e:`[${a}]`})}function Ul(u,e,a){const i=/\{(?:[^{}]|\{[^{}]*\})*\}|\$[^\s{}]+(?:\([^()]*\))*/g;return u.replace(i,r=>{const o=r.trim(),n=z0(o,e,a);return n!==void 0?n:r})}function Yl(u){return/^\$[^\s{}]+(\([^)]*\))?$|^\{[^{}]*\}$/.test(u.trim())}function Ql({payload:u,replacements:e,expressionContext:a,logger:i}){for(const r of e){const{target:o,value:n}=r;if(typeof o!="string")throw new Error(`Invalid JSON Pointer: ${o}`);try{const t=au.pointer.get(u,o),s=qu({payload:n,context:a,logger:i});t!==void 0&&au.pointer.set(u,o,s)}catch{throw new Error(`Invalid JSON Pointer: ${o}`)}}}const Xl=["parameters","failureActions","successActions"];function u3(u,e){const{reference:a,value:i}=u;if(!Xl.some(o=>a.includes(`$components.${o}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const r=u0({value:a,ctx:e,logger:e.options.logger});return au.isPlainObject(r)&&"value"in r&&i?{...r,value:i}:r}function ue(u,e){return"reference"in u?u3(u,e):u}function e3(u,e){const a=u?.requestBody?.content||{},[i,r]=Object.entries(a)[0]||[],o=r?.example||k1(r?.examples)||P1(r?.schema,e),n=a3(u);return{parameters:i3([...Tr(u.pathParameters,e),...Tr(u.parameters,e)]).filter(({value:s})=>s),contentTypeParameters:[...i?[{name:"content-type",in:"header",value:i}]:[],...n?[{name:"accept",in:"header",value:n}]:[]],requestBody:o,contentType:i}}function a3(u){return u?.responses?Array.from(new Set(Object.values(u.responses).flatMap(e=>au.isPlainObject(e)&&"content"in e?Object.keys(e.content||{}):[]))).join(", "):void 0}function Tr(u,e){return(u||[]).filter(a=>a?.required===!0).map(a=>{if(Li(a))return{name:a.name,in:a.in,value:iE(a,e)}}).filter(a=>a!==void 0)}function i3(u){const e={};for(const a of u)Li(a)&&(e[(a.name+":"+a.in).toLowerCase()]=a);return Object.values(e)}function r3(u,e){let a,i;if(u.includes("$sourceDescriptions.")){const[,s,l]=u.split(".");a=s,i=l}else u.includes(".")?[a,i]=u.split("."):(i=u,a=Object.keys(e)[0]);const r=Object.keys(e);if(!e[a])throw new Error(`Unknown description name ${Au(a)} at ${Au(u)}. Available descriptions: ${r.join(", ")}.`);const o=e[a],n=o?.components?.securitySchemes,t=o.servers;for(const[s,l]of Object.entries(e[a].paths)){if(!l)return;for(const[E,D]of Object.entries(l))if(D.operationId===i)return{servers:l.servers||t,...D,pathParameters:D.parameters||[],path:s,method:E,descriptionName:a,securitySchemes:n}}throw new Error(`Unknown operationId ${Au(i)} at ${Au(u)}.`)}function n3(u,e){const{$sourceDescriptions:a,sourceDescriptions:i}=e,[r,o]=u.split("#");if(!i)throw new Error("Missing described sourceDescriptions");const n=i.find(f=>{if(["openapi","arazzo"].includes(f.type)){if(r.includes("$sourceDescriptions.")){const[,A]=r.split(".");return f.name===A}return"url"in f&&f.url===r}return!1})?.name;if(!n)throw new Error(`Unknown operationPath ${Au(u)}. API description ${Au(r)} is not listed in 'sourceDescriptions' workflow section.`);const t=a[n]||{},s=t?.components?.securitySchemes,[l,E,D]=au.pointer.parse(o);if(l!=="paths")throw new Error(`Invalid fragment identifier: ${o} at operationPath ${Au(u)}.`);const{servers:c}=t,F=au.pointer.get(t,o)||{},y=au.pointer.get(t,au.pointer.compile(["paths",E]))||{};return{servers:y.servers||c,...F,pathParameters:y.parameters||[],path:E,method:D,descriptionName:n,securitySchemes:s}}function o3(u,e){if(!u.operationId&&!u.operationPath)return;const{$sourceDescriptions:a,sourceDescriptions:i}=e,{operationId:r,operationPath:o}=u;return r?r3(r,a):o?n3(o,{$sourceDescriptions:a,sourceDescriptions:i}):void 0}function Lr(u){const e=JSON.parse(JSON.stringify(u));function a(i){if(i.type==="object"){if(i.properties)for(const r in i.properties)i.properties[r].writeOnly?(delete i.properties[r],i.required&&(i.required=i.required.filter(o=>o!==r))):a(i.properties[r]);au.isPlainObject(i.additionalProperties)&&a(i.additionalProperties)}else i.type==="array"&&i.items&&a(i.items);return i.oneOf&&(i.oneOf=i.oneOf.map(r=>a(r))),i.allOf&&(i.allOf=i.allOf.map(r=>a(r))),i.anyOf&&(i.anyOf=i.anyOf.map(r=>a(r))),i}return a(e)}function t3({statusCode:u,contentType:e,descriptionResponses:a}){return a?(a[u]||a.default)?.content?.[e]?.schema:void 0}function s3(u,e){if(!e)return;const i=e.requestBody?.content;return i&&i[u]?.schema||void 0}const l3={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},zi=Symbol("skip");function W0(u){return u<10?"0"+u:u}function E3(u,e,a,i){var r=a?"":u.getUTCFullYear()+"-"+W0(u.getUTCMonth()+1)+"-"+W0(u.getUTCDate());return e||(r+="T"+W0(u.getUTCHours())+":"+W0(u.getUTCMinutes())+":"+W0(u.getUTCSeconds())+"Z"),r}function A1(u,e){return e>u.length?u.repeat(Math.trunc(e/u.length)+1).substring(0,e):u}function ba(...u){const e=a=>a&&typeof a=="object";return u.reduce((a,i)=>(Object.keys(i||{}).forEach(r=>{const o=a[r],n=i[r];e(o)&&e(n)?a[r]=ba(o,n):a[r]=n}),a),Array.isArray(u[u.length-1])?[]:{})}function D3(u){var e=c3(u),a=d3(e,e,e,e),i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{var o=a()*16%16|0;return(r=="x"?o:o&3|8).toString(16)});return i}function Za(u){return{value:u==="object"?{}:u==="array"?[]:void 0}}function l0(u,e){e&&u.pop()}function x3(u){return{name:u?.xml?.name||"",prefix:u?.xml?.prefix||"",namespace:u?.xml?.namespace||null,attribute:u?.xml?.attribute??!1,wrapped:u?.xml?.wrapped??!1}}function Ba(u,e={},a={}){const{value:i}=u,{propertyName:r}=a,{name:o,prefix:n,namespace:t,attribute:s,wrapped:l}=x3(e);let E=o||r?`${n?n+":":""}${o||r}`:null,D=typeof i=="object"?Array.isArray(i)?[...i]:{...i}:i;return s&&E&&(E=`$${E}`),t&&(typeof D=="object"?D[`$xmlns${n?":"+n:""}`]=t:D={[`$xmlns${n?":"+n:""}`]:t,"#text":D}),e.type==="array"&&(l&&Array.isArray(D)&&(D={[E]:[...D]}),l||(E=null),e.example!==void 0&&!l&&(E=e.items?.xml?.name||E)),(e.oneOf||e.anyOf||e.allOf||e.$ref)&&(E=null),{propertyName:E,value:D}}function c3(u){var e=0;if(u.length==0)return e;for(var a=0;a<u.length;a++){var i=u.charCodeAt(a);e=(e<<5)-e+i,e=e&e}return e}function d3(u,e,a,i){return function(){u|=0,e|=0,a|=0,i|=0;var r=u-(e<<27|e>>>5)|0;return u=e^(a<<17|a>>>15),e=a+i|0,a=i+r|0,i=u+r|0,(i>>>0)/4294967296}}function m3(u,e,a,i,r){let o=Ou(u,a,i);const n=[];for(let t of e){const{type:s,readOnly:l,writeOnly:E,value:D}=Ou({type:o.type,...t},a,i,{...r,isAllOfChild:!0});o.type&&s&&s!==o.type&&(console.warn("allOf: schemas with different types can't be merged"),o.type=s),o.type=o.type||s,o.readOnly=o.readOnly||l,o.writeOnly=o.writeOnly||E,D!=null&&n.push(D)}if(o.type==="object"){o.value=ba(o.value||{},...n.filter(t=>typeof t=="object"));for(const t in o.value)o.value[t]===zi&&delete o.value[t];return o}else{o.type==="array"&&(a.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const t=n[n.length-1];return o.value=t??o.value,o}}const Nr={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"};function ce(u){if(u.type!==void 0)return Array.isArray(u.type)?u.type.length===0?null:u.type[0]:u.type;const e=Object.keys(Nr);for(var a=0;a<e.length;a++){let i=e[a],r=Nr[i];if(u[i]!==void 0)return r}return null}let pa={},Iu=[];function F3(){pa={},Iu=[]}function f1(u){let e;return u.const!==void 0?e=u.const:u.examples!==void 0&&u.examples.length?e=u.examples[0]:u.enum!==void 0&&u.enum.length?e=u.enum[0]:u.default!==void 0&&(e=u.default),e}function Rr(u){const e=f1(u);if(e!==void 0)return{value:e,readOnly:u.readOnly,writeOnly:u.writeOnly,type:null}}function Ou(u,e,a,i){if(i){if(Iu.includes(u))return Za(ce(u));Iu.push(u)}if(i&&i.depth>e.maxSampleDepth)return l0(Iu,i),Za(ce(u));if(u.$ref){if(!a)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let t=decodeURIComponent(u.$ref);t.startsWith("#")&&(t=t.substring(1));const s=au.pointer.get(a,t);let l;if(pa[t]!==!0){pa[t]=!0;const E=Ou(s,e,a,i);if(e.format==="xml"){const{propertyName:D,value:c}=Ba(E,s,i);l={...E,value:{[D||"root"]:c}}}else l=E;pa[t]=!1}else{const E=ce(s);l=Za(E)}return l0(Iu,i),l}if(u.example!==void 0)return l0(Iu,i),{value:u.example,readOnly:u.readOnly,writeOnly:u.writeOnly,type:u.type};if(u.allOf!==void 0)return l0(Iu,i),Rr(u)||m3({...u,allOf:void 0},u.allOf,e,a,i);if(u.oneOf&&u.oneOf.length){u.anyOf&&(e.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),l0(Iu,i);const t=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.oneOf[0]);return n(u,t)}if(u.anyOf&&u.anyOf.length){l0(Iu,i);const t=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.anyOf[0]);return n(u,t)}if(u.if&&u.then){l0(Iu,i);const{if:t,then:s,...l}=u;return Ou(ba(l,t,s),e,a,i)}let r=f1(u),o=null;if(r===void 0){r=null,o=u.type,Array.isArray(o)&&u.type.length>0&&(o=u.type[0]),o||(o=ce(u));let t=M1[o];t&&(r=t(u,e,a,i))}return l0(Iu,i),{value:r,readOnly:u.readOnly,writeOnly:u.writeOnly,type:o};function n(t,s){const l=Rr(t);if(l!==void 0)return l;const E=Ou({...t,oneOf:void 0,anyOf:void 0},e,a,i),D=Ou(s,e,a,i);if(typeof E.value=="object"&&typeof D.value=="object"){const c=ba(E.value,D.value);return{...D,value:c}}return D}}function k3(u,e={},a,i){const r=i&&i.depth||1;let o=Math.min(u.maxItems!=null?u.maxItems:1/0,u.minItems||1);const n=u.prefixItems||u.items||u.contains;Array.isArray(n)&&(o=Math.max(o,n.length));let t=l=>Array.isArray(n)?n[l]||{}:n||{},s=[];if(!n)return s;for(let l=0;l<o;l++){let E=t(l),{value:D}=Ou(E,e,a,{depth:r+1});if(e?.format==="xml"){const{value:c,propertyName:F}=Ba({value:D},E,i);F?(s?.[F]||(s={...s,[F]:[]}),s[F].push(c)):s={...s,...c}}else s.push(D)}if(e?.format==="xml"&&r===1){const{value:l,propertyName:E}=Ba({value:null},u,i);E&&(l?s=Array.isArray(s)?{[E]:{...l,...s.map(D=>({"#text":{...D}}))}}:{[E]:{...s,...l}}:s={[E]:s})}return s}function h3(u){return!0}function y1(u){let e=0;if(u.type==="number"&&(u.format==="float"||u.format==="double")&&(e=.1),typeof u.exclusiveMinimum=="boolean"||typeof u.exclusiveMaximum=="boolean"){if(u.maximum&&u.minimum)return e=u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum,(u.exclusiveMaximum&&e>=u.maximum||!u.exclusiveMaximum&&e>u.maximum)&&(e=(u.maximum+u.minimum)/2),e;if(u.minimum)return u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum;if(u.maximum)return u.exclusiveMaximum?u.maximum>0?0:Math.floor(u.maximum)-1:u.maximum>0?0:u.maximum}else{if(u.minimum)return u.minimum;u.exclusiveMinimum?(e=Math.floor(u.exclusiveMinimum)+1,e===u.exclusiveMaximum&&(e=(e+Math.floor(u.exclusiveMaximum)-1)/2)):u.exclusiveMaximum?e=Math.floor(u.exclusiveMaximum)-1:u.maximum&&(e=u.maximum)}return e}function p3(u,e={},a,i){let r={};const o=i&&i.depth||1;if(u&&typeof u.properties=="object"){const n=Array.isArray(u.required)?u.required:[],t={};for(const s of n)t[s]=!0;Object.keys(u.properties).forEach(s=>{if(e.skipNonRequired&&!t.hasOwnProperty(s))return;const l=Ou(u.properties[s],e,a,{propertyName:s,depth:o+1});if(e.skipReadOnly&&l.readOnly){i?.isAllOfChild&&(r[s]=zi);return}if(e.skipWriteOnly&&l.writeOnly){i?.isAllOfChild&&(r[s]=zi);return}if(e?.format==="xml"){const{propertyName:E,value:D}=Ba(l,u.properties[s],{propertyName:s});E?r[E]=D:r={...r,...D}}else r[s]=l.value})}if(u&&typeof u.additionalProperties=="object"){const n=u.additionalProperties["x-additionalPropertiesName"]||"property";r[`${String(n)}1`]=Ou(u.additionalProperties,e,a,{depth:o+1}).value,r[`${String(n)}2`]=Ou(u.additionalProperties,e,a,{depth:o+1}).value}if(u&&typeof u.properties=="object"&&u.maxProperties!==void 0&&Object.keys(r).length>u.maxProperties){const n={};let t=0;(Array.isArray(u.required)?u.required:[]).forEach(l=>{r[l]!==void 0&&(n[l]=r[l],t++)}),Object.keys(r).forEach(l=>{t<u.maxProperties&&!n.hasOwnProperty(l)&&(n[l]=r[l],t++)}),r=n}return r}function ie(u,e){return u}function Hr(u,e,a){let i=1;if(u)switch(u){case"?":{i=0;break}case"*":{i=ie(0);break}case"+":{i=ie(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else e!=null&&a!=null?i=ie(parseInt(e)):e!=null&&a==null&&(i=parseInt(e));return i}function g3(u){let e=!1;u instanceof RegExp&&(e=u.flags.includes("i"),u=u.toString(),u=u.match(/\/(.+?)\//)?.[1]??""),u=u.replace(/^(\^)?(.*?)(\$)?$/,"$2");let a,i,r;const o=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let n=u.match(o);for(;n!=null;){const D=n[2],c=n[3],F=n[4];r=Hr(F,D,c),u=u.slice(0,n.index)+n[1].repeat(r)+u.slice(n.index+n[0].length),n=u.match(o)}const t=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,s=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(n=u.match(s);n!=null;){const D=n[1]==="^",c=n[2]==="-",F=n[4],y=n[5],f=n[6],A=[];let h=n[3],m=h.match(t);for(c&&A.push(45);m!=null;){if(m[0].indexOf("-")===-1)e&&isNaN(Number(m[0]))?(A.push(m[0].toUpperCase().charCodeAt(0)),A.push(m[0].toLowerCase().charCodeAt(0))):A.push(m[0].charCodeAt(0));else{const B=m[0].split("-").map(d=>d.charCodeAt(0));if(a=B[0],i=B[1],a>i)throw new Error("Character range provided is out of order.");for(let d=a;d<=i;d++)if(e&&isNaN(Number(String.fromCharCode(d)))){const k=String.fromCharCode(d);A.push(k.toUpperCase().charCodeAt(0)),A.push(k.toLowerCase().charCodeAt(0))}else A.push(d)}h=h.substring(m[0].length),m=h.match(t)}if(r=Hr(f,F,y),D){let B=-1;for(let d=48;d<=57;d++){if(B=A.indexOf(d),B>-1){A.splice(B,1);continue}A.push(d)}for(let d=65;d<=90;d++){if(B=A.indexOf(d),B>-1){A.splice(B,1);continue}A.push(d)}for(let d=97;d<=122;d++){if(B=A.indexOf(d),B>-1){A.splice(B,1);continue}A.push(d)}}const g=Array.from({length:r},()=>String.fromCharCode(A[ie(0)])).join("");u=u.slice(0,n.index)+g+u.slice(n.index+n[0].length),n=u.match(s)}const l=/(.)\{(\d+)\,(\d+)\}/;for(n=u.match(l);n!=null;){if(a=parseInt(n[2]),i=parseInt(n[3]),a>i)throw new Error("Numbers out of order in {} quantifier.");r=ie(a),u=u.slice(0,n.index)+n[1].repeat(r)+u.slice(n.index+n[0].length),n=u.match(l)}const E=/(.)\{(\d+)\}/;for(n=u.match(E);n!=null;)r=parseInt(n[2]),u=u.slice(0,n.index)+n[1].repeat(r)+u.slice(n.index+n[0].length),n=u.match(E);return u}const C3="qwerty!@#$%^123456";function v3(){return"user@example.com"}function b3(){return"пошта@укр.нет"}function B3(u,e){let a="pa$$word";return u>a.length&&(a+="_",a+=A1(C3,u-a.length).substring(0,u-a.length)),a}function Ni({min:u,max:e,omitTime:a,omitDate:i}){let r=E3(new Date("2019-08-24T14:15:22.123Z"),a,i);return r.length<u&&console.warn(`Using minLength = ${u} is incorrect with format "date-time"`),e&&r.length>e&&console.warn(`Using maxLength = ${e} is incorrect with format "date-time"`),r}function A3(u,e){return Ni({min:u,max:e,omitTime:!1,omitDate:!1})}function f3(u,e){return Ni({min:u,max:e,omitTime:!0,omitDate:!1})}function y3(u,e){return Ni({min:u,max:e,omitTime:!1,omitDate:!0}).slice(1)}function z1(u,e,a,i,r=!1){if(i&&r)return g3(i);let o=A1("string",u);return e&&o.length>e&&(o=o.substring(0,e)),o}function z3(){return"192.168.0.1"}function S3(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function j3(){return"example.com"}function M3(){return"приклад.укр"}function P3(){return"http://example.com"}function w3(){return"../dictionary"}function K3(){return"http://example.com/{endpoint}"}function T3(){return"http://example.com/entity/1"}function L3(){return"/entity/1"}function N3(u,e,a){return D3(a||"id")}function R3(){return"/json/pointer"}function H3(){return"1/relative/json/pointer"}function G3(){return"/regex/"}const _3={email:v3,"idn-email":b3,password:B3,"date-time":A3,date:f3,time:y3,ipv4:z3,ipv6:S3,hostname:j3,"idn-hostname":M3,iri:T3,"iri-reference":L3,uri:P3,"uri-reference":w3,"uri-template":K3,uuid:N3,default:z1,"json-pointer":R3,"relative-json-pointer":H3,regex:G3};function V3(u,e,a,i){let r=u.format||"default",o=_3[r]||z1,n=i&&i.propertyName;return o(u.minLength||0,u.maxLength,n,u.pattern,e?.enablePatterns)}var Ua={},Ya={},Gr;function Ri(){return Gr||(Gr=1,(function(u){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",a=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",i="["+e+"]["+a+"]*",r=new RegExp("^"+i+"$"),o=function(t,s){const l=[];let E=s.exec(t);for(;E;){const D=[];D.startIndex=s.lastIndex-E[0].length;const c=E.length;for(let F=0;F<c;F++)D.push(E[F]);l.push(D),E=s.exec(t)}return l},n=function(t){const s=r.exec(t);return!(s===null||typeof s>"u")};u.isExist=function(t){return typeof t<"u"},u.isEmptyObject=function(t){return Object.keys(t).length===0},u.merge=function(t,s,l){if(s){const E=Object.keys(s),D=E.length;for(let c=0;c<D;c++)l==="strict"?t[E[c]]=[s[E[c]]]:t[E[c]]=s[E[c]]}},u.getValue=function(t){return u.isExist(t)?t:""},u.isName=n,u.getAllMatches=o,u.nameRegexp=i})(Ya)),Ya}var _r;function S1(){if(_r)return Ua;_r=1;const u=Ri(),e={allowBooleanAttributes:!1,unpairedTags:[]};Ua.validate=function(h,m){m=Object.assign({},e,m);const g=[];let B=!1,d=!1;h[0]==="\uFEFF"&&(h=h.substr(1));for(let k=0;k<h.length;k++)if(h[k]==="<"&&h[k+1]==="?"){if(k+=2,k=i(h,k),k.err)return k}else if(h[k]==="<"){let v=k;if(k++,h[k]==="!"){k=r(h,k);continue}else{let j=!1;h[k]==="/"&&(j=!0,k++);let M="";for(;k<h.length&&h[k]!==">"&&h[k]!==" "&&h[k]!==" "&&h[k]!==`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as b1, t as bl, c as zu, p as $u, f as Bl, g as d0, h as re, k as wr, l as Kr, m as Al, n as fl, o as B1, q as yl, u as zl, v as Ka, w as Sl, x as jl, y as Ml, z as Pl } from "./replay-index-
|
|
1
|
+
import { b as b1, t as bl, c as zu, p as $u, f as Bl, g as d0, h as re, k as wr, l as Kr, m as Al, n as fl, o as B1, q as yl, u as zl, v as Ka, w as Sl, x as jl, y as Ml, z as Pl } from "./replay-index-BZl4LCFm.js";
|
|
2
2
|
async function wl(u) {
|
|
3
3
|
const { descriptionPath: e, externalRefResolver: a, base: i } = u, r = await b1({
|
|
4
4
|
base: i,
|