@redocly/replay 0.23.0-next.6 → 0.23.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-NgMwbW8j.js → replay-index-B7QTBZJU.js} +1 -1
- package/dist/{replay-index-CfiaojXa.js → replay-index-Cx-xE3jB.js} +1 -1
- package/dist/{replay-index-BZBeKUWt.js → replay-index-KTef2eyo.js} +24366 -23965
- package/dist/{replay-index-B7KkD2tM.js → replay-index-uWRGuIZL.js} +1153 -1152
- package/dist/{replay-respect-run-Beu1K9zx.js → replay-respect-run-DxYKtGZT.js} +1 -1
- package/dist/{replay-respect-run-D1tRK9C2.js → replay-respect-run-SRQ8fnI1.js} +1 -1
- package/dist/{replay-tauri-path-YOWKKWD9.js → replay-tauri-path-BgSZCmKa.js} +2 -2
- package/dist/{replay-tauri-path-CYLf4_Ap.js → replay-tauri-path-nWMwz33E.js} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Ro, b as ou, p as ju, J as Uu, c as Ho, f as Ii, B as Go, g as j0, h as Na, k as Ra, m as Vo, l as _o, n as Jo, o as $o, q as Io, u as Oo, A as Oi, v as $e } from "./replay-index-
|
|
1
|
+
import { t as Ro, b as ou, p as ju, J as Uu, c as Ho, f as Ii, B as Go, g as j0, h as Na, k as Ra, m as Vo, l as _o, n as Jo, o as $o, q as Io, u as Oo, A as Oi, v as $e } from "./replay-index-KTef2eyo.js";
|
|
2
2
|
const {
|
|
3
3
|
env: D0 = {},
|
|
4
4
|
argv: Wi = [],
|
|
@@ -1,4 +1,4 @@
|
|
|
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-uWRGuIZL.js"),{env:l0={},argv:Hi=[],platform:Mo=""}=typeof process>"u"?{}:process,jo="NO_COLOR"in l0||Hi.includes("--no-color"),Po="FORCE_COLOR"in l0||Hi.includes("--color"),wo=Mo==="win32",Ko=l0.TERM==="dumb",To=T.tty&&void 0,Lo="CI"in l0&&("GITHUB_ACTIONS"in l0||"GITLAB_CI"in l0||"CIRCLECI"in l0),No=!jo&&(Po||wo&&!Ko||To||Lo),Gi=(u,a,e,i,r=a.substring(0,u)+i,o=a.substring(u+e.length),n=o.indexOf(e))=>r+(n<0?o:Gi(n,o,e,i)),Ro=(u,a,e,i,r)=>u<0?e+a+i:e+Gi(u,a,i,r)+i,Ho=(u,a,e=u,i=u.length+1)=>r=>r||!(r===""||r===void 0)?Ro((""+r).indexOf(a,i),r,u,a,e):"",I=(u,a,e)=>Ho(`\x1B[${u}m`,`\x1B[${a}m`,e),wa={reset:I(0,0),bold:I(1,22,"\x1B[22m\x1B[1m"),dim:I(2,22,"\x1B[22m\x1B[2m"),italic:I(3,23),underline:I(4,24),inverse:I(7,27),hidden:I(8,28),strikethrough:I(9,29),black:I(30,39),red:I(31,39),green:I(32,39),yellow:I(33,39),blue:I(34,39),magenta:I(35,39),cyan:I(36,39),white:I(37,39),gray:I(90,39),bgBlack:I(40,49),bgRed:I(41,49),bgGreen:I(42,49),bgYellow:I(43,49),bgBlue:I(44,49),bgMagenta:I(45,49),bgCyan:I(46,49),bgWhite:I(47,49),blackBright:I(90,39),redBright:I(91,39),greenBright:I(92,39),yellowBright:I(93,39),blueBright:I(94,39),magentaBright:I(95,39),cyanBright:I(96,39),whiteBright:I(97,39),bgBlackBright:I(100,49),bgRedBright:I(101,49),bgGreenBright:I(102,49),bgYellowBright:I(103,49),bgBlueBright:I(104,49),bgMagentaBright:I(105,49),bgCyanBright:I(106,49),bgWhiteBright:I(107,49)},Go=({useColor:u=No}={})=>u?wa:Object.keys(wa).reduce((a,e)=>({...a,[e]:String}),{}),{reset:HU,bold:Zu,dim:Vo,italic:GU,underline:_o,inverse:Vi,hidden:VU,strikethrough:_U,black:JU,red:iu,green:m0,yellow:Uu,blue:Du,magenta:$U,cyan:IU,white:Ka,gray:du,bgBlack:OU,bgRed:q0,bgGreen:WU,bgYellow:qU,bgBlue:ZU,bgMagenta:UU,bgCyan:YU,bgWhite:QU,blackBright:XU,redBright:uY,greenBright:eY,yellowBright:aY,blueBright:iY,magentaBright:rY,cyanBright:nY,whiteBright:oY,bgBlackBright:tY,bgRedBright:sY,bgGreenBright:lY,bgYellowBright:EY,bgBlueBright:DY,bgMagentaBright:xY,bgCyanBright:cY,bgWhiteBright:dY}=Go(),Jo=u=>/\{.*?\}/.test(u);function Hu({value:u,ctx:a,logger:e}){if(!u)return u;if(T.isPlainObject(u)){const i={};for(const r in u)i[r]=Hu({value:u[r],ctx:a,logger:e});return i}else if(Array.isArray(u))return u.map(i=>Hu({value:i,ctx:a,logger:e}));return typeof u!="string"?u:u.startsWith("$faker.")?P0({pointer:u.slice(1),ctx:a,logger:e}):Jo(u)?Oo(u,a,e):qo(u,a,e)}function $o(u,a,e){const i=u.indexOf("{");if(i!==-1){const o=u.substring(i+1).slice(0,-1),n=P0({pointer:o.slice(1),ctx:a,logger:e});return n&&u.replace(/{(.*)}/,n)}else return u}function Io(u,a){const e=Object.keys(a),i=Object.values(a);return new Function(...e,`return ${u}`)(...i)}function Oo(u,a,e){const i=/\{\$(\{[^{}]*\}|[^{}])*\}/g;let r=u;return r=r.replace(i,(o,n)=>Wo(o,a,e)),r}function Wo(u,a,e){if(!u.includes("$"))return u;if(u.includes("$faker."))return $o(u,a,e);const i=S0(a)(Zo(u));return i!==void 0?i:""}const qo=(u,a,e)=>{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 s=S0(a)("$sourceDescriptions");return s[o]?s[o].workflows.find(l=>l.workflowId===n):void 0}return i&&i.trim().startsWith("faker.")?P0({pointer:i,ctx:a,logger:e}):i?S0(a)(Ta(i)):i.replace(/\$\{([^}]+)}/g,(r,o)=>S0(a)(Ta(o)))};function Zo(u){return u.replace(/\{(.*)\}/,"$1")}function Ta(u){return u.replace(/\['(.*?)'\]/g,".$1")}const S0=(u,a="")=>e=>{if(a||(a=e),!e)return u;const[i,...r]=e.split(".");if(!u)throw Error(`Cannot get ${iu(i)} from ${iu(a)}`);if(u?.[i]===void 0){const o=` Undefined ${iu(i)} at ${iu(a)}.`,n=Object.keys(u).length?`Did you mean to use another key? Available keys:
|
|
2
2
|
${Object.keys(u).join(", ")}.
|
|
3
3
|
`:"",s=`${o} ${n}`;throw Error(s)}return S0(u[i],a)(r.join("."))};function P0({pointer:u,ctx:a,logger:e}){const i=u.split("."),r={ctx:{faker:a.$faker}};try{const o=i.map(n=>n.trim()).map((n,s)=>n.endsWith(")")?`${s==0?"":"."}${n}`:`["${n}"]`).join("");return Io(`ctx${o}`,r)}catch(o){e.error(iu(o.toString()));return}}function _i(u,a,e){if(typeof u=="string"&&u)return Hu({value:u,ctx:a,logger:e});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]=Hu({value:u[i],ctx:a,logger:e})):_i(u[i],a,e)}function La(u,a,e){return _i(u,a,e)||u}function Na(u,a){if(!u)return;const e={};for(const i in a)e[`{${i}}`]=String(a[i]);return u.split(/(\{[a-zA-Z0-9_.-]+\}+)/g).map(i=>e[i]?e[i]:i).join("")}function Uo(u){return T.isPlainObject(u)&&"name"in u&&"value"in u&&!("in"in u)}function Ve(u){return T.isPlainObject(u)&&"in"in u&&typeof u.in=="string"&&["header","query","path","cookie"].includes(u.in)}const Yo=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function Ji(u){return u.startsWith("$file(")&&u.endsWith(")")?u.substring(7,u.length-2):u}const Ra=async(u,a,e,i,r)=>{const o=T.pathBrowserifyExports.dirname(i),n=T.pathBrowserifyExports.resolve(o,Ji(e));u.append(a,await r.options.requestFileLoader.getFileBody(n))},$i=(u,a,e,i,r,o)=>{Object.entries(e).forEach(([n,s])=>{const l=o?`${o}[${n}]`:n;typeof s=="string"&&s.startsWith("$file(")&&s.endsWith(")")?u.push(Ra(a,l,s,i,r)):Array.isArray(s)?s.forEach(E=>{typeof E=="string"&&E.startsWith("$file(")&&E.endsWith(")")?u.push(Ra(a,l,E,i,r)):a.append(l,E.toString())}):T.isPlainObject(s)?$i(u,a,s,i,r,l):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&a.append(l,s.toString())})},Qo=async(u,a,e,i)=>{if(T.isPlainObject(u)){const r=[];$i(r,a,u,e,i),await Promise.all(r)}},Xo=async(u,a)=>{if(typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")){const e=T.pathBrowserifyExports.resolve(T.pathBrowserifyExports.dirname(a.options.filePath),Ji(u));return a.options.requestFileLoader.getFileBody(e)}else return u};async function u4(u,a){if(!u)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:e,contentType:i}=u;if(i==="multipart/form-data"){const r=new FormData,o=T.pathBrowserifyExports.resolve(a.options.filePath);return await Qo(e,r,o,a),{...u,payload:r}}else{if(i==="application/octet-stream"||typeof i=="string"&&Yo.test(i))return{...u,payload:await Xo(e,a),contentType:"application/octet-stream"};if(i==="application/x-www-form-urlencoded"&&typeof e=="string")return{...u,payload:Object.fromEntries(new URLSearchParams(e).entries()),contentType:"application/x-www-form-urlencoded"}}return u}function e4({payload:u,replacements:a,expressionContext:e,logger:i}){for(const r of a){const{target:o,value:n}=r;if(typeof o!="string")throw new Error(`Invalid JSON Pointer: ${o}`);try{const s=T.JsonPointerLib.get(u,o),l=Ku({payload:n,context:e,logger:i});s!==void 0&&T.JsonPointerLib.set(u,o,l)}catch{throw new Error(`Invalid JSON Pointer: ${o}`)}}}const a4=["parameters","failureActions","successActions"];function i4(u,a){const{reference:e,value:i}=u;if(!a4.some(o=>e.includes(`$components.${o}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const r=Hu({value:e,ctx:a,logger:a.options.logger});return T.isPlainObject(r)&&"value"in r&&i?{...r,value:i}:r}function f0(u,a){return"reference"in u?i4(u,a):u}function r4(u){try{return T.parseRuntimeExpression(u)}catch{throw new Error(`Runtime expression is not valid: ${u}`)}}function n4(u,a){const e=[{pattern:/\$response\.body#\/([\w/-]+)/g,ctxFunction:(r,o)=>v0(a.$response?.body,o,r)},{pattern:/\$request\.body#\/([\w/-]+)/g,ctxFunction:(r,o)=>v0(a.$request?.body,o,r)},{pattern:/\$outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,o,n)=>v0(a.$outputs?.[o],n,r)},{pattern:/\$workflows\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,o,n,s)=>v0(a.$workflows?.[o]?.outputs?.[n],s,r)},{pattern:/\$steps\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,o,n,s)=>v0(a.$steps?.[o]?.outputs?.[n],s,r)}];let i=u;for(const{pattern:r,ctxFunction:o}of e)i=i.replaceAll(r,o);return i}function v0(u,a,e){if(u)try{const i=T.JsonPointerLib.get(u,`/${a}`);return typeof i=="string"||Array.isArray(i)||T.isPlainObject(i)?JSON.stringify(i):i!==void 0?i:e}catch{return e}return e}function Ku({payload:u,context:a,contentType:e,logger:i}){if(e?.includes("application/octet-stream"))return La(u,a,i);if(e?.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 s=Ku({payload:n,context:a,logger:i});r.append(o,s)}return r}return La(u,a,i)}return typeof u=="string"?c4(u)?E0(u,a,i):x4(u,a,i):T.isPlainObject(u)?Object.entries(u).reduce((r,[o,n])=>(r[o]=Ku({payload:n,context:a,logger:i}),r),{}):Array.isArray(u)?u.map(r=>Ku({payload:r,context:a,logger:i})):u}function E0(u,a,e){return typeof u=="string"?o4(u,a,e):T.isPlainObject(u)?Object.entries(u).reduce((i,[r,o])=>(i[r]=o&&E0(o,a,e),i),{}):Array.isArray(u)?u.map(i=>E0(i,a,e)):u}function o4(u,a,e){if(/^\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?$/.test(u))return P0({pointer:u.slice(1),ctx:a,logger:e});if(u.includes("$faker.")){const o=/\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?/g;u=u.replace(o,n=>P0({pointer:n.slice(1),ctx:a,logger:e})).replace(/{(.*?)}/g,"$1")}if(!u.includes("$")&&!/[=<>]/.test(u))return u;r4(u);const i=s4(u,a),r=l4(a);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 t4(u){return u.replace(/\$([a-zA-Z0-9._-]+)/g,(a,e)=>`$${e.replace(/-/g,"_")}`)}function s4(u,a){const e=n4(u,a);let r=t4(e);if(r.startsWith("{")&&r.endsWith("}")){const l=r.slice(1,-1);!l.trim().startsWith("{")&&!l.trim().startsWith("[")&&(r=l)}const o=D4(r),n=/\.header\.([a-zA-Z0-9._-]+)/g;return o.replace(n,(l,E)=>`.header.${E.toLowerCase()}`)}function l4(u){const a={};for(const[e,i]of Object.entries(u)){const r=e.replace(/-/g,"_");a[r]=Ii(i)}return a}function Ii(u){return Array.isArray(u)?u:T.isPlainObject(u)?E4(u):u}function E4(u){return Object.keys(u).reduce((a,e)=>{const i=e.replace(/-/g,"_");return a[i]=Ii(u[e]),a},{})}function D4(u){return u.replace(/\.(\d+)/g,(a,e,i,r)=>{const o=r[i-1];return/\d/.test(o)?a:`[${e}]`})}function x4(u,a,e){const i=/\{(?:[^{}]|\{[^{}]*\})*\}|\$[^\s{}]+(?:\([^()]*\))*/g;return u.replace(i,r=>{const o=r.trim(),n=E0(o,a,e);return n!==void 0?n:r})}function c4(u){return/^\$[^\s{}]+(\([^)]*\))?$|^\{[^{}]*\}$/.test(u.trim())}const su={SUCCESS_CRITERIA_CHECK:"success criteria check",STATUS_CODE_CHECK:"status code check",SCHEMA_CHECK:"schema check",CONTENT_TYPE_CHECK:"content-type check",GLOBAL_TIMEOUT_ERROR:"global timeout error",MAX_STEPS_REACHED_ERROR:"maximum steps reached",NETWORK_ERROR:"failed network request",UNEXPECTED_ERROR:"unexpected error"};class Oi extends Error{}class Wi extends Oi{}class qi extends Oi{}async function d4(u){const{descriptionPath:a,externalRefResolver:e,base:i}=u,r=await T.bundle({base:i,ref:a,config:u.config,dereference:!0,externalRefResolver:e});if(!r)throw new Error(`Could not find source description file '${a}'.`);return r.bundle.parsed}const m4={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},we=Symbol("skip");function b0(u){return u<10?"0"+u:u}function F4(u,a,e,i){var r=e?"":u.getUTCFullYear()+"-"+b0(u.getUTCMonth()+1)+"-"+b0(u.getUTCDate());return a||(r+="T"+b0(u.getUTCHours())+":"+b0(u.getUTCMinutes())+":"+b0(u.getUTCSeconds())+"Z"),r}function Zi(u,a){return a>u.length?u.repeat(Math.trunc(a/u.length)+1).substring(0,a):u}function X0(...u){const a=e=>e&&typeof e=="object";return u.reduce((e,i)=>(Object.keys(i||{}).forEach(r=>{const o=e[r],n=i[r];a(o)&&a(n)?e[r]=X0(o,n):e[r]=n}),e),Array.isArray(u[u.length-1])?[]:{})}function k4(u){var a=g4(u),e=p4(a,a,a,a),i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{var o=e()*16%16|0;return(r=="x"?o:o&3|8).toString(16)});return i}function Ce(u){return{value:u==="object"?{}:u==="array"?[]:void 0}}function Ou(u,a){a&&u.pop()}function C4(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 h4(u){const a=u?.xml;return a?.nodeType?a.nodeType:a?.attribute===!0?"attribute":a?.wrapped===!0&&u?.type==="array"?"element":u?.$ref||u?.$dynamicRef||u?.type==="array"||u?.oneOf||u?.anyOf||u?.allOf?"none":"element"}function ue(u,a={},e={}){const{value:i}=u,{propertyName:r}=e,{name:o,prefix:n,namespace:s}=C4(a),l=h4(a);let E=o||r?`${n?n+":":""}${o||r}`:null,D=typeof i=="object"?Array.isArray(i)?[...i]:{...i}:i;switch(l){case"attribute":E&&(E=`$${E}`);break;case"text":E="#text";break;case"cdata":E="#cdata";break;case"none":a.type==="array"?(E=null,a.example!==void 0&&(E=a.items?.xml?.name||E)):E=null;break;default:a.type==="array"&&Array.isArray(D)&&(D={[E]:[...D]});break}return s&&l!=="text"&&l!=="cdata"&&l!=="none"&&(typeof D=="object"?D[`$xmlns${n?":"+n:""}`]=s:D={[`$xmlns${n?":"+n:""}`]:s,"#text":D}),{propertyName:E,value:D}}function g4(u){var a=0;if(u.length==0)return a;for(var e=0;e<u.length;e++){var i=u.charCodeAt(e);a=(a<<5)-a+i,a=a&a}return a}function p4(u,a,e,i){return function(){u|=0,a|=0,e|=0,i|=0;var r=u-(a<<27|a>>>5)|0;return u=a^(e<<17|e>>>15),a=e+i|0,e=i+r|0,i=u+r|0,(i>>>0)/4294967296}}function v4(u,a,e,i,r){let o=wu(u,e,i);const n=[];for(let s of a){const{type:l,readOnly:E,writeOnly:D,value:d}=wu({type:o.type,...s},e,i,{...r,isAllOfChild:!0});o.type&&l&&l!==o.type&&(console.warn("allOf: schemas with different types can't be merged"),o.type=l),o.type=o.type||l,o.readOnly=o.readOnly||E,o.writeOnly=o.writeOnly||D,d!=null&&n.push(d)}if(o.type==="object"){o.value=X0(o.value||{},...n.filter(s=>typeof s=="object"));for(const s in o.value)o.value[s]===we&&delete o.value[s];return o}else{o.type==="array"&&(e.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const s=n[n.length-1];return o.value=s??o.value,o}}const Ha={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 H0(u){if(u.type!==void 0)return Array.isArray(u.type)?u.type.length===0?null:u.type[0]:u.type;const a=Object.keys(Ha);for(var e=0;e<a.length;e++){let i=a[e],r=Ha[i];if(u[i]!==void 0)return r}return null}let Z0={},Pu=[];function b4(){Z0={},Pu=[]}function Ui(u){let a;return u.const!==void 0?a=u.const:u.examples!==void 0&&u.examples.length?a=u.examples[0]:u.enum!==void 0&&u.enum.length?a=u.enum[0]:u.default!==void 0&&(a=u.default),a}function Ga(u){const a=Ui(u);if(a!==void 0)return{value:a,readOnly:u.readOnly,writeOnly:u.writeOnly,type:null}}function wu(u,a,e,i){if(i){if(Pu.includes(u))return Ce(H0(u));Pu.push(u)}if(i&&i.depth>a.maxSampleDepth)return Ou(Pu,i),Ce(H0(u));if(u.$ref){if(!e)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let s=decodeURIComponent(u.$ref);s.startsWith("#")&&(s=s.substring(1));const l=T.JsonPointerLib.get(e,s);let E;if(Z0[s]!==!0){Z0[s]=!0;const D=wu(l,a,e,i);if(a.format==="xml"){const d=s.split("/").pop(),F={...i,propertyName:i?.propertyName||d},{propertyName:k,value:b}=ue(D,l,F);E={...D,value:{[k||"root"]:b}}}else E=D;Z0[s]=!1}else{const D=H0(l);E=Ce(D)}return Ou(Pu,i),E}if(u.example!==void 0)return Ou(Pu,i),{value:u.example,readOnly:u.readOnly,writeOnly:u.writeOnly,type:u.type};if(u.allOf!==void 0)return Ou(Pu,i),Ga(u)||v4({...u,allOf:void 0},u.allOf,a,e,i);if(u.oneOf&&u.oneOf.length){u.anyOf&&(a.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),Ou(Pu,i);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.oneOf[0]);return n(u,s)}if(u.anyOf&&u.anyOf.length){Ou(Pu,i);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.anyOf[0]);return n(u,s)}if(u.if&&u.then){Ou(Pu,i);const{if:s,then:l,...E}=u;return wu(X0(E,s,l),a,e,i)}let r=Ui(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=H0(u));let s=Xi[o];s&&(r=s(u,a,e,i))}return Ou(Pu,i),{value:r,readOnly:u.readOnly,writeOnly:u.writeOnly,type:o};function n(s,l){const E=Ga(s);if(E!==void 0)return E;const D=wu({...s,oneOf:void 0,anyOf:void 0},a,e,i),d=wu(l,a,e,i);if(typeof D.value=="object"&&typeof d.value=="object"){const F=X0(D.value,d.value);return{...d,value:F}}return d}}function B4(u,a={},e,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 s=E=>Array.isArray(n)?n[E]||{}:n||{},l=[];if(!n)return l;for(let E=0;E<o;E++){let D=s(E),{value:d}=wu(D,a,e,{depth:r+1});if(a?.format==="xml"){const{value:F,propertyName:k}=ue({value:d},D,i);k?(l?.[k]||(l={...l,[k]:[]}),l[k].push(F)):l={...l,...F}}else l.push(d)}if(a?.format==="xml"&&r===1){const{value:E,propertyName:D}=ue({value:null},u,i);D&&(E?l=Array.isArray(l)?{[D]:{...E,...l.map(d=>({"#text":{...d}}))}}:{[D]:{...l,...E}}:l={[D]:l})}return l}function A4(u){return!0}function Yi(u){let a=0;if(u.type==="number"&&(u.format==="float"||u.format==="double")&&(a=.1),typeof u.exclusiveMinimum=="boolean"||typeof u.exclusiveMaximum=="boolean"){if(u.maximum&&u.minimum)return a=u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum,(u.exclusiveMaximum&&a>=u.maximum||!u.exclusiveMaximum&&a>u.maximum)&&(a=(u.maximum+u.minimum)/2),a;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?(a=Math.floor(u.exclusiveMinimum)+1,a===u.exclusiveMaximum&&(a=(a+Math.floor(u.exclusiveMaximum)-1)/2)):u.exclusiveMaximum?a=Math.floor(u.exclusiveMaximum)-1:u.maximum&&(a=u.maximum)}return a}function y4(u,a={},e,i){let r={};const o=i&&i.depth||1;if(u&&typeof u.properties=="object"){const n=Array.isArray(u.required)?u.required:[],s={};for(const l of n)s[l]=!0;Object.keys(u.properties).forEach(l=>{if(a.skipNonRequired&&!s.hasOwnProperty(l))return;const E=wu(u.properties[l],a,e,{propertyName:l,depth:o+1});if(a.skipReadOnly&&E.readOnly){i?.isAllOfChild&&(r[l]=we);return}if(a.skipWriteOnly&&E.writeOnly){i?.isAllOfChild&&(r[l]=we);return}if(a?.format==="xml"){const{propertyName:D,value:d}=ue(E,u.properties[l],{propertyName:l});D?r[D]=d:d!==null&&typeof d=="object"&&(r={...r,...d})}else r[l]=E.value})}if(u&&typeof u.additionalProperties=="object"){const n=u.additionalProperties["x-additionalPropertiesName"]||"property";r[`${String(n)}1`]=wu(u.additionalProperties,a,e,{depth:o+1}).value,r[`${String(n)}2`]=wu(u.additionalProperties,a,e,{depth:o+1}).value}if(u&&typeof u.properties=="object"&&u.maxProperties!==void 0&&Object.keys(r).length>u.maxProperties){const n={};let s=0;(Array.isArray(u.required)?u.required:[]).forEach(E=>{r[E]!==void 0&&(n[E]=r[E],s++)}),Object.keys(r).forEach(E=>{s<u.maxProperties&&!n.hasOwnProperty(E)&&(n[E]=r[E],s++)}),r=n}return r}function M0(u,a){return u}function Va(u,a,e){let i=1;if(u)switch(u){case"?":{i=0;break}case"*":{i=M0(0);break}case"+":{i=M0(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else a!=null&&e!=null?i=M0(parseInt(a)):a!=null&&e==null&&(i=parseInt(a));return i}function f4(u){let a=!1;u instanceof RegExp&&(a=u.flags.includes("i"),u=u.toString(),u=u.match(/\/(.+?)\//)?.[1]??""),u=u.replace(/^(\^)?(.*?)(\$)?$/,"$2");let e,i,r;const o=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let n=u.match(o);for(;n!=null;){const d=n[2],F=n[3],k=n[4];r=Va(k,d,F),u=u.slice(0,n.index)+n[1].repeat(r)+u.slice(n.index+n[0].length),n=u.match(o)}const s=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,l=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(n=u.match(l);n!=null;){const d=n[1]==="^",F=n[2]==="-",k=n[4],b=n[5],y=n[6],M=[];let J=n[3],N=J.match(s);for(F&&M.push(45);N!=null;){if(N[0].indexOf("-")===-1)a&&isNaN(Number(N[0]))?(M.push(N[0].toUpperCase().charCodeAt(0)),M.push(N[0].toLowerCase().charCodeAt(0))):M.push(N[0].charCodeAt(0));else{const p=N[0].split("-").map(h=>h.charCodeAt(0));if(e=p[0],i=p[1],e>i)throw new Error("Character range provided is out of order.");for(let h=e;h<=i;h++)if(a&&isNaN(Number(String.fromCharCode(h)))){const B=String.fromCharCode(h);M.push(B.toUpperCase().charCodeAt(0)),M.push(B.toLowerCase().charCodeAt(0))}else M.push(h)}J=J.substring(N[0].length),N=J.match(s)}if(r=Va(y,k,b),d){let p=-1;for(let h=48;h<=57;h++){if(p=M.indexOf(h),p>-1){M.splice(p,1);continue}M.push(h)}for(let h=65;h<=90;h++){if(p=M.indexOf(h),p>-1){M.splice(p,1);continue}M.push(h)}for(let h=97;h<=122;h++){if(p=M.indexOf(h),p>-1){M.splice(p,1);continue}M.push(h)}}const $=Array.from({length:r},()=>String.fromCharCode(M[M0(0)])).join("");u=u.slice(0,n.index)+$+u.slice(n.index+n[0].length),n=u.match(l)}const E=/(.)\{(\d+)\,(\d+)\}/;for(n=u.match(E);n!=null;){if(e=parseInt(n[2]),i=parseInt(n[3]),e>i)throw new Error("Numbers out of order in {} quantifier.");r=M0(e),u=u.slice(0,n.index)+n[1].repeat(r)+u.slice(n.index+n[0].length),n=u.match(E)}const D=/(.)\{(\d+)\}/;for(n=u.match(D);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(D);return u}const z4="qwerty!@#$%^123456";function S4(){return"user@example.com"}function M4(){return"пошта@укр.нет"}function j4(u,a){let e="pa$$word";return u>e.length&&(e+="_",e+=Zi(z4,u-e.length).substring(0,u-e.length)),e}function _e({min:u,max:a,omitTime:e,omitDate:i}){let r=F4(new Date("2019-08-24T14:15:22.123Z"),e,i);return r.length<u&&console.warn(`Using minLength = ${u} is incorrect with format "date-time"`),a&&r.length>a&&console.warn(`Using maxLength = ${a} is incorrect with format "date-time"`),r}function P4(u,a){return _e({min:u,max:a,omitTime:!1,omitDate:!1})}function w4(u,a){return _e({min:u,max:a,omitTime:!0,omitDate:!1})}function K4(u,a){return _e({min:u,max:a,omitTime:!1,omitDate:!0}).slice(1)}function Qi(u,a,e,i,r=!1){if(i&&r)return f4(i);let o=Zi("string",u);return a&&o.length>a&&(o=o.substring(0,a)),o}function T4(){return"192.168.0.1"}function L4(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function N4(){return"example.com"}function R4(){return"приклад.укр"}function H4(){return"http://example.com"}function G4(){return"../dictionary"}function V4(){return"http://example.com/{endpoint}"}function _4(){return"http://example.com/entity/1"}function J4(){return"/entity/1"}function $4(u,a,e){return k4(e||"id")}function I4(){return"/json/pointer"}function O4(){return"1/relative/json/pointer"}function W4(){return"/regex/"}const q4={email:S4,"idn-email":M4,password:j4,"date-time":P4,date:w4,time:K4,ipv4:T4,ipv6:L4,hostname:N4,"idn-hostname":R4,iri:_4,"iri-reference":J4,uri:H4,"uri-reference":G4,"uri-template":V4,uuid:$4,default:Qi,"json-pointer":I4,"relative-json-pointer":O4,regex:W4};function Z4(u,a,e,i){let r=u.format||"default",o=q4[r]||Qi,n=i&&i.propertyName;return o(u.minLength||0,u.maxLength,n,u.pattern,a?.enablePatterns)}var Xi={};const U4={skipReadOnly:!1,maxSampleDepth:15};function Y4(u,a){if(!u)throw new Error("Unknown format output for building XML.");return(Array.isArray(u)||Object.keys(u).length>1)&&(u={[a?.xml?.name||"root"]:u}),new T.Builder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(u)}function Q4(u,a,e){let i=Object.assign({},U4,a);b4();let r=wu(u,i,e).value;return i?.format==="xml"?Y4(r,u):r}function C0(u,a){Xi[u]=a}C0("array",B4);C0("boolean",A4);C0("integer",Yi);C0("number",Yi);C0("object",y4);C0("string",Z4);function ur(u,a){if(u)try{return Q4(u,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(e){a.error(q0(" Error while generating test data from JSON Schema ")+`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as h, s as x, r as i } from "./replay-index-
|
|
2
|
-
import { d as j, a as b, j as d } from "./replay-index-
|
|
1
|
+
import { e as h, s as x, r as i } from "./replay-index-KTef2eyo.js";
|
|
2
|
+
import { d as j, a as b, j as d } from "./replay-index-KTef2eyo.js";
|
|
3
3
|
async function u(n, e) {
|
|
4
4
|
const t = x(), l = await i(n), c = await i(e), o = l.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), r = c.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), m = Math.min(o.length, r.length);
|
|
5
5
|
let s = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-uWRGuIZL.js");async function u(r,n){const t=e.sep(),l=await e.resolve(r),c=await e.resolve(n),a=l.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),i=c.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),m=Math.min(a.length,i.length);let s=0;for(let o=0;o<m&&a[o]===i[o];o++)s++;const p=a.slice(s).map(()=>".."),f=i.slice(s);return[...p,...f].join(t)}async function g(r){const n=await e.extname(r);return n?`.${n}`:""}exports.dirname=e.dirname;exports.isAbsolute=e.isAbsolute;exports.join=e.join;exports.resolve=e.resolve;exports.extname=g;exports.relative=u;
|
package/dist/replay.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-uWRGuIZL.js"),t=require("./replay-oauth2-redirect-handler-Bqw5UUvl.js");exports.AgentLoop=e.AgentLoop;exports.AiPanelContext=e.AiPanelContext;exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;Object.defineProperty(exports,"SpanStatusCode",{enumerable:!0,get:()=>e.SpanStatusCode});exports.TelemetryClient=e.TelemetryClient;exports.applyThemeToDOM=e.applyThemeToDOM;exports.getCurrentTheme=e.getCurrentTheme;exports.resolveTheme=e.resolveTheme;exports.useAiPanel=e.useAiPanel;exports.useTelemetry=e.useTelemetry;exports.useTelemetryClient=e.useTelemetryClient;exports.validateApiKey=e.validateApiKey;exports.OAuth2Error=t.OAuth2Error;exports.handleOAuth2Redirect=t.handleOAuth2Redirect;
|
package/dist/replay.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as s, x as t, E as l, M as r, R as o, y as p, S as y, T as m, z as n, C as d, D as T, F as h, G as i, H as u, I as A } from "./replay-index-
|
|
1
|
+
import { w as s, x as t, E as l, M as r, R as o, y as p, S as y, T as m, z as n, C as d, D as T, F as h, G as i, H as u, I as A } from "./replay-index-KTef2eyo.js";
|
|
2
2
|
import { O, h as R } from "./replay-oauth2-redirect-handler-CqKZB3aV.js";
|
|
3
3
|
export {
|
|
4
4
|
s as AgentLoop,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/replay",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/replay.cjs",
|
|
6
6
|
"module": "./dist/replay.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"react-dom": "^19.2.4",
|
|
21
21
|
"react-router-dom": "^6.30.3",
|
|
22
22
|
"styled-components": "^5.3.11",
|
|
23
|
-
"@redocly/theme": "0.64.0
|
|
23
|
+
"@redocly/theme": "0.64.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@ai-sdk/anthropic": "3.0.1",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@uiw/react-codemirror": "^4.21.20",
|
|
62
62
|
"ai": "6.0.111",
|
|
63
63
|
"dayjs": "^1.11.7",
|
|
64
|
-
"drizzle-orm": "^0.
|
|
65
|
-
"fast-xml-parser": "5.
|
|
64
|
+
"drizzle-orm": "^0.45.0",
|
|
65
|
+
"fast-xml-parser": "5.7.1",
|
|
66
66
|
"idb": "^8.0.2",
|
|
67
67
|
"js-yaml": "4.1.1",
|
|
68
68
|
"json-pointer": "^0.6.2",
|