@redocly/replay 0.22.0 → 0.23.0-next.0
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-Dpg9SsyD.js → replay-index-BMx8-y24.js} +1 -1
- package/dist/{replay-index-GMR-4pxg.js → replay-index-C609Ibh9.js} +21288 -20513
- package/dist/{replay-index-DBu78VZA.js → replay-index-Dg03U1So.js} +1006 -1004
- package/dist/{replay-index-BoEkHIm-.js → replay-index-Djsd1bqH.js} +1 -1
- package/dist/{replay-respect-run-Bw2hqa4a.js → replay-respect-run-CANP9lZE.js} +1 -1
- package/dist/{replay-respect-run-CWl0J5uZ.js → replay-respect-run-zCovAtY8.js} +1 -1
- package/dist/{replay-tauri-path-BSv_KJxs.js → replay-tauri-path-B-Mo7Dxn.js} +2 -2
- package/dist/{replay-tauri-path-CaUuUwbr.js → replay-tauri-path-B1vx4kU5.js} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/package.json +2 -2
|
@@ -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-Dg03U1So.js"),{env:E0={},argv:Ji=[],platform:Ro=""}=typeof process>"u"?{}:process,Ho="NO_COLOR"in E0||Ji.includes("--no-color"),Go="FORCE_COLOR"in E0||Ji.includes("--color"),Vo=Ro==="win32",_o=E0.TERM==="dumb",Jo=T.tty&&void 0,$o="CI"in E0&&("GITHUB_ACTIONS"in E0||"GITLAB_CI"in E0||"CIRCLECI"in E0),Io=!Ho&&(Go||Vo&&!_o||Jo||$o),$i=(u,e,a,i,r=e.substring(0,u)+i,n=e.substring(u+a.length),o=n.indexOf(a))=>r+(o<0?n:$i(o,n,a,i)),Oo=(u,e,a,i,r)=>u<0?a+e+i:a+$i(u,e,i,r)+i,Wo=(u,e,a=u,i=u.length+1)=>r=>r||!(r===""||r===void 0)?Oo((""+r).indexOf(e,i),r,u,e,a):"",O=(u,e,a)=>Wo(`\x1B[${u}m`,`\x1B[${e}m`,a),La={reset:O(0,0),bold:O(1,22,"\x1B[22m\x1B[1m"),dim:O(2,22,"\x1B[22m\x1B[2m"),italic:O(3,23),underline:O(4,24),inverse:O(7,27),hidden:O(8,28),strikethrough:O(9,29),black:O(30,39),red:O(31,39),green:O(32,39),yellow:O(33,39),blue:O(34,39),magenta:O(35,39),cyan:O(36,39),white:O(37,39),gray:O(90,39),bgBlack:O(40,49),bgRed:O(41,49),bgGreen:O(42,49),bgYellow:O(43,49),bgBlue:O(44,49),bgMagenta:O(45,49),bgCyan:O(46,49),bgWhite:O(47,49),blackBright:O(90,39),redBright:O(91,39),greenBright:O(92,39),yellowBright:O(93,39),blueBright:O(94,39),magentaBright:O(95,39),cyanBright:O(96,39),whiteBright:O(97,39),bgBlackBright:O(100,49),bgRedBright:O(101,49),bgGreenBright:O(102,49),bgYellowBright:O(103,49),bgBlueBright:O(104,49),bgMagentaBright:O(105,49),bgCyanBright:O(106,49),bgWhiteBright:O(107,49)},qo=({useColor:u=Io}={})=>u?La:Object.keys(La).reduce((e,a)=>({...e,[a]:String}),{}),{reset:QU,bold:Uu,dim:Zo,italic:XU,underline:Uo,inverse:Ii,hidden:uY,strikethrough:eY,black:aY,red:au,green:F0,yellow:Yu,blue:xu,magenta:iY,cyan:rY,white:Na,gray:cu,bgBlack:nY,bgRed:Z0,bgGreen:oY,bgYellow:tY,bgBlue:sY,bgMagenta:lY,bgCyan:EY,bgWhite:DY,blackBright:xY,redBright:cY,greenBright:dY,yellowBright:mY,blueBright:FY,magentaBright:kY,cyanBright:hY,whiteBright:CY,bgBlackBright:gY,bgRedBright:pY,bgGreenBright:vY,bgYellowBright:bY,bgBlueBright:BY,bgMagentaBright:AY,bgCyanBright:yY,bgWhiteBright:fY}=qo(),Yo=u=>/\{.*?\}/.test(u);function Gu({value:u,ctx:e,logger:a}){if(!u)return u;if(T.isPlainObject(u)){const i={};for(const r in u)i[r]=Gu({value:u[r],ctx:e,logger:a});return i}else if(Array.isArray(u))return u.map(i=>Gu({value:i,ctx:e,logger:a}));return typeof u!="string"?u:u.startsWith("$faker.")?w0({pointer:u.slice(1),ctx:e,logger:a}):Yo(u)?u4(u,e,a):a4(u,e,a)}function Qo(u,e,a){const i=u.indexOf("{");if(i!==-1){const n=u.substring(i+1).slice(0,-1),o=w0({pointer:n.slice(1),ctx:e,logger:a});return o&&u.replace(/{(.*)}/,o)}else return u}function Xo(u,e){const a=Object.keys(e),i=Object.values(e);return new Function(...a,`return ${u}`)(...i)}function u4(u,e,a){const i=/\{\$(\{[^{}]*\}|[^{}])*\}/g;let r=u;return r=r.replace(i,(n,o)=>e4(n,e,a)),r}function e4(u,e,a){if(!u.includes("$"))return u;if(u.includes("$faker."))return Qo(u,e,a);const i=M0(e)(i4(u));return i!==void 0?i:""}const a4=(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("."),n=r[1],o=r[3];if(!n||!o)return;const s=M0(e)("$sourceDescriptions");return s[n]?s[n].workflows.find(l=>l.workflowId===o):void 0}return i&&i.trim().startsWith("faker.")?w0({pointer:i,ctx:e,logger:a}):i?M0(e)(Ra(i)):i.replace(/\$\{([^}]+)}/g,(r,n)=>M0(e)(Ra(n)))};function i4(u){return u.replace(/\{(.*)\}/,"$1")}function Ra(u){return u.replace(/\['(.*?)'\]/g,".$1")}const M0=(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 n=` Undefined ${au(i)} at ${au(e)}.`,o=Object.keys(u).length?`Did you mean to use another key? Available keys:
|
|
2
2
|
${Object.keys(u).join(", ")}.
|
|
3
3
|
`:"",s=`${n} ${o}`;throw Error(s)}return M0(u[i],e)(r.join("."))};function w0({pointer:u,ctx:e,logger:a}){const i=u.split("."),r={ctx:{faker:e.$faker}};try{const n=i.map(o=>o.trim()).map((o,s)=>o.endsWith(")")?`${s==0?"":"."}${o}`:`["${o}"]`).join("");return Xo(`ctx${n}`,r)}catch(n){a.error(au(n.toString()));return}}function Oi(u,e,a){if(typeof u=="string"&&u)return Gu({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]=Gu({value:u[i],ctx:e,logger:a})):Oi(u[i],e,a)}function Ha(u,e,a){return Oi(u,e,a)||u}function Ga(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 r4(u){return T.isPlainObject(u)&&"name"in u&&"value"in u&&!("in"in u)}function $e(u){return T.isPlainObject(u)&&"in"in u&&typeof u.in=="string"&&["header","query","path","cookie"].includes(u.in)}const n4=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function Wi(u){return u.startsWith("$file(")&&u.endsWith(")")?u.substring(7,u.length-2):u}const Va=async(u,e,a,i,r)=>{const n=T.pathBrowserifyExports.dirname(i),o=T.pathBrowserifyExports.resolve(n,Wi(a));u.append(e,await r.options.requestFileLoader.getFileBody(o))},qi=(u,e,a,i,r,n)=>{Object.entries(a).forEach(([o,s])=>{const l=n?`${n}[${o}]`:o;typeof s=="string"&&s.startsWith("$file(")&&s.endsWith(")")?u.push(Va(e,l,s,i,r)):Array.isArray(s)?s.forEach(E=>{typeof E=="string"&&E.startsWith("$file(")&&E.endsWith(")")?u.push(Va(e,l,E,i,r)):e.append(l,E.toString())}):T.isPlainObject(s)?qi(u,e,s,i,r,l):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.append(l,s.toString())})},o4=async(u,e,a,i)=>{if(T.isPlainObject(u)){const r=[];qi(r,e,u,a,i),await Promise.all(r)}},t4=async(u,e)=>{if(typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")){const a=T.pathBrowserifyExports.resolve(T.pathBrowserifyExports.dirname(e.options.filePath),Wi(u));return e.options.requestFileLoader.getFileBody(a)}else return u};async function s4(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,n=T.pathBrowserifyExports.resolve(e.options.filePath);return await o4(a,r,n,e),{...u,payload:r}}else{if(i==="application/octet-stream"||typeof i=="string"&&n4.test(i))return{...u,payload:await t4(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 l4({payload:u,replacements:e,expressionContext:a,logger:i}){for(const r of e){const{target:n,value:o}=r;if(typeof n!="string")throw new Error(`Invalid JSON Pointer: ${n}`);try{const s=T.JsonPointerLib.get(u,n),l=Ku({payload:o,context:a,logger:i});s!==void 0&&T.JsonPointerLib.set(u,n,l)}catch{throw new Error(`Invalid JSON Pointer: ${n}`)}}}const E4=["parameters","failureActions","successActions"];function D4(u,e){const{reference:a,value:i}=u;if(!E4.some(n=>a.includes(`$components.${n}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const r=Gu({value:a,ctx:e,logger:e.options.logger});return T.isPlainObject(r)&&"value"in r&&i?{...r,value:i}:r}function z0(u,e){return"reference"in u?D4(u,e):u}function x4(u){try{return T.parseRuntimeExpression(u)}catch{throw new Error(`Runtime expression is not valid: ${u}`)}}function c4(u,e){const a=[{pattern:/\$response\.body#\/([\w/-]+)/g,ctxFunction:(r,n)=>b0(e.$response?.body,n,r)},{pattern:/\$request\.body#\/([\w/-]+)/g,ctxFunction:(r,n)=>b0(e.$request?.body,n,r)},{pattern:/\$outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,n,o)=>b0(e.$outputs?.[n],o,r)},{pattern:/\$workflows\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,n,o,s)=>b0(e.$workflows?.[n]?.outputs?.[o],s,r)},{pattern:/\$steps\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,n,o,s)=>b0(e.$steps?.[n]?.outputs?.[o],s,r)}];let i=u;for(const{pattern:r,ctxFunction:n}of a)i=i.replaceAll(r,n);return i}function b0(u,e,a){if(u)try{const i=T.JsonPointerLib.get(u,`/${e}`);return typeof i=="string"||Array.isArray(i)||T.isPlainObject(i)?JSON.stringify(i):i!==void 0?i:a}catch{return a}return a}function Ku({payload:u,context:e,contentType:a,logger:i}){if(a?.includes("application/octet-stream"))return Ha(u,e,i);if(a?.includes("multipart/form-data")){if(u instanceof FormData){const r=new FormData;for(const[n,o]of u.entries())if(o instanceof File)r.append(n,o);else{const s=Ku({payload:o,context:e,logger:i});r.append(n,s)}return r}return Ha(u,e,i)}return typeof u=="string"?p4(u)?D0(u,e,i):g4(u,e,i):T.isPlainObject(u)?Object.entries(u).reduce((r,[n,o])=>(r[n]=Ku({payload:o,context:e,logger:i}),r),{}):Array.isArray(u)?u.map(r=>Ku({payload:r,context:e,logger:i})):u}function D0(u,e,a){return typeof u=="string"?d4(u,e,a):T.isPlainObject(u)?Object.entries(u).reduce((i,[r,n])=>(i[r]=n&&D0(n,e,a),i),{}):Array.isArray(u)?u.map(i=>D0(i,e,a)):u}function d4(u,e,a){if(/^\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?$/.test(u))return w0({pointer:u.slice(1),ctx:e,logger:a});if(u.includes("$faker.")){const n=/\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?/g;u=u.replace(n,o=>w0({pointer:o.slice(1),ctx:e,logger:a})).replace(/{(.*?)}/g,"$1")}if(!u.includes("$")&&!/[=<>]/.test(u))return u;x4(u);const i=F4(u,e),r=k4(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 m4(u){return u.replace(/\$([a-zA-Z0-9._-]+)/g,(e,a)=>`$${a.replace(/-/g,"_")}`)}function F4(u,e){const a=c4(u,e);let r=m4(a);if(r.startsWith("{")&&r.endsWith("}")){const l=r.slice(1,-1);!l.trim().startsWith("{")&&!l.trim().startsWith("[")&&(r=l)}const n=C4(r),o=/\.header\.([a-zA-Z0-9._-]+)/g;return n.replace(o,(l,E)=>`.header.${E.toLowerCase()}`)}function k4(u){const e={};for(const[a,i]of Object.entries(u)){const r=a.replace(/-/g,"_");e[r]=Zi(i)}return e}function Zi(u){return Array.isArray(u)?u:T.isPlainObject(u)?h4(u):u}function h4(u){return Object.keys(u).reduce((e,a)=>{const i=a.replace(/-/g,"_");return e[i]=Zi(u[a]),e},{})}function C4(u){return u.replace(/\.(\d+)/g,(e,a,i,r)=>{const n=r[i-1];return/\d/.test(n)?e:`[${a}]`})}function g4(u,e,a){const i=/\{(?:[^{}]|\{[^{}]*\})*\}|\$[^\s{}]+(?:\([^()]*\))*/g;return u.replace(i,r=>{const n=r.trim(),o=D0(n,e,a);return o!==void 0?o:r})}function p4(u){return/^\$[^\s{}]+(\([^)]*\))?$|^\{[^{}]*\}$/.test(u.trim())}const tu={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 Ui extends Error{}class Yi extends Ui{}class Qi extends Ui{}async function v4(u){const{descriptionPath:e,externalRefResolver:a,base:i}=u,r=await T.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}const b4={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},Te=Symbol("skip");function B0(u){return u<10?"0"+u:u}function B4(u,e,a,i){var r=a?"":u.getUTCFullYear()+"-"+B0(u.getUTCMonth()+1)+"-"+B0(u.getUTCDate());return e||(r+="T"+B0(u.getUTCHours())+":"+B0(u.getUTCMinutes())+":"+B0(u.getUTCSeconds())+"Z"),r}function Xi(u,e){return e>u.length?u.repeat(Math.trunc(e/u.length)+1).substring(0,e):u}function ue(...u){const e=a=>a&&typeof a=="object";return u.reduce((a,i)=>(Object.keys(i||{}).forEach(r=>{const n=a[r],o=i[r];e(n)&&e(o)?a[r]=ue(n,o):a[r]=o}),a),Array.isArray(u[u.length-1])?[]:{})}function A4(u){var e=z4(u),a=S4(e,e,e,e),i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{var n=a()*16%16|0;return(r=="x"?n:n&3|8).toString(16)});return i}function ge(u){return{value:u==="object"?{}:u==="array"?[]:void 0}}function Wu(u,e){e&&u.pop()}function y4(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 f4(u){const e=u?.xml;return e?.nodeType?e.nodeType:e?.attribute===!0?"attribute":e?.wrapped===!0&&u?.type==="array"?"element":u?.$ref||u?.$dynamicRef||u?.type==="array"||u?.oneOf||u?.anyOf||u?.allOf?"none":"element"}function ee(u,e={},a={}){const{value:i}=u,{propertyName:r}=a,{name:n,prefix:o,namespace:s}=y4(e),l=f4(e);let E=n||r?`${o?o+":":""}${n||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":e.type==="array"?(E=null,e.example!==void 0&&(E=e.items?.xml?.name||E)):E=null;break;default:e.type==="array"&&Array.isArray(D)&&(D={[E]:[...D]});break}return s&&l!=="text"&&l!=="cdata"&&l!=="none"&&(typeof D=="object"?D[`$xmlns${o?":"+o:""}`]=s:D={[`$xmlns${o?":"+o:""}`]:s,"#text":D}),{propertyName:E,value:D}}function z4(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 S4(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 M4(u,e,a,i,r){let n=wu(u,a,i);const o=[];for(let s of e){const{type:l,readOnly:E,writeOnly:D,value:d}=wu({type:n.type,...s},a,i,{...r,isAllOfChild:!0});n.type&&l&&l!==n.type&&(console.warn("allOf: schemas with different types can't be merged"),n.type=l),n.type=n.type||l,n.readOnly=n.readOnly||E,n.writeOnly=n.writeOnly||D,d!=null&&o.push(d)}if(n.type==="object"){n.value=ue(n.value||{},...o.filter(s=>typeof s=="object"));for(const s in n.value)n.value[s]===Te&&delete n.value[s];return n}else{n.type==="array"&&(a.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const s=o[o.length-1];return n.value=s??n.value,n}}const _a={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 G0(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(_a);for(var a=0;a<e.length;a++){let i=e[a],r=_a[i];if(u[i]!==void 0)return r}return null}let U0={},Pu=[];function j4(){U0={},Pu=[]}function ur(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 Ja(u){const e=ur(u);if(e!==void 0)return{value:e,readOnly:u.readOnly,writeOnly:u.writeOnly,type:null}}function wu(u,e,a,i){if(i){if(Pu.includes(u))return ge(G0(u));Pu.push(u)}if(i&&i.depth>e.maxSampleDepth)return Wu(Pu,i),ge(G0(u));if(u.$ref){if(!a)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(a,s);let E;if(U0[s]!==!0){U0[s]=!0;const D=wu(l,e,a,i);if(e.format==="xml"){const d=s.split("/").pop(),m={...i,propertyName:i?.propertyName||d},{propertyName:k,value:v}=ee(D,l,m);E={...D,value:{[k||"root"]:v}}}else E=D;U0[s]=!1}else{const D=G0(l);E=ge(D)}return Wu(Pu,i),E}if(u.example!==void 0)return Wu(Pu,i),{value:u.example,readOnly:u.readOnly,writeOnly:u.writeOnly,type:u.type};if(u.allOf!==void 0)return Wu(Pu,i),Ja(u)||M4({...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")),Wu(Pu,i);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.oneOf[0]);return o(u,s)}if(u.anyOf&&u.anyOf.length){Wu(Pu,i);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.anyOf[0]);return o(u,s)}if(u.if&&u.then){Wu(Pu,i);const{if:s,then:l,...E}=u;return wu(ue(E,s,l),e,a,i)}let r=ur(u),n=null;if(r===void 0){r=null,n=u.type,Array.isArray(n)&&u.type.length>0&&(n=u.type[0]),n||(n=G0(u));let s=tr[n];s&&(r=s(u,e,a,i))}return Wu(Pu,i),{value:r,readOnly:u.readOnly,writeOnly:u.writeOnly,type:n};function o(s,l){const E=Ja(s);if(E!==void 0)return E;const D=wu({...s,oneOf:void 0,anyOf:void 0},e,a,i),d=wu(l,e,a,i);if(typeof D.value=="object"&&typeof d.value=="object"){const m=ue(D.value,d.value);return{...d,value:m}}return d}}function P4(u,e={},a,i){const r=i&&i.depth||1;let n=Math.min(u.maxItems!=null?u.maxItems:1/0,u.minItems||1);const o=u.prefixItems||u.items||u.contains;Array.isArray(o)&&(n=Math.max(n,o.length));let s=E=>Array.isArray(o)?o[E]||{}:o||{},l=[];if(!o)return l;for(let E=0;E<n;E++){let D=s(E),{value:d}=wu(D,e,a,{depth:r+1});if(e?.format==="xml"){const{value:m,propertyName:k}=ee({value:d},D,i);k?(l?.[k]||(l={...l,[k]:[]}),l[k].push(m)):l={...l,...m}}else l.push(d)}if(e?.format==="xml"&&r===1){const{value:E,propertyName:D}=ee({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 w4(u){return!0}function er(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 K4(u,e={},a,i){let r={};const n=i&&i.depth||1;if(u&&typeof u.properties=="object"){const o=Array.isArray(u.required)?u.required:[],s={};for(const l of o)s[l]=!0;Object.keys(u.properties).forEach(l=>{if(e.skipNonRequired&&!s.hasOwnProperty(l))return;const E=wu(u.properties[l],e,a,{propertyName:l,depth:n+1});if(e.skipReadOnly&&E.readOnly){i?.isAllOfChild&&(r[l]=Te);return}if(e.skipWriteOnly&&E.writeOnly){i?.isAllOfChild&&(r[l]=Te);return}if(e?.format==="xml"){const{propertyName:D,value:d}=ee(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 o=u.additionalProperties["x-additionalPropertiesName"]||"property";r[`${String(o)}1`]=wu(u.additionalProperties,e,a,{depth:n+1}).value,r[`${String(o)}2`]=wu(u.additionalProperties,e,a,{depth:n+1}).value}if(u&&typeof u.properties=="object"&&u.maxProperties!==void 0&&Object.keys(r).length>u.maxProperties){const o={};let s=0;(Array.isArray(u.required)?u.required:[]).forEach(E=>{r[E]!==void 0&&(o[E]=r[E],s++)}),Object.keys(r).forEach(E=>{s<u.maxProperties&&!o.hasOwnProperty(E)&&(o[E]=r[E],s++)}),r=o}return r}function j0(u,e){return u}function $a(u,e,a){let i=1;if(u)switch(u){case"?":{i=0;break}case"*":{i=j0(0);break}case"+":{i=j0(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else e!=null&&a!=null?i=j0(parseInt(e)):e!=null&&a==null&&(i=parseInt(e));return i}function T4(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 n=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let o=u.match(n);for(;o!=null;){const d=o[2],m=o[3],k=o[4];r=$a(k,d,m),u=u.slice(0,o.index)+o[1].repeat(r)+u.slice(o.index+o[0].length),o=u.match(n)}const s=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,l=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(o=u.match(l);o!=null;){const d=o[1]==="^",m=o[2]==="-",k=o[4],v=o[5],b=o[6],M=[];let G=o[3],N=G.match(s);for(m&&M.push(45);N!=null;){if(N[0].indexOf("-")===-1)e&&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 g=N[0].split("-").map(C=>C.charCodeAt(0));if(a=g[0],i=g[1],a>i)throw new Error("Character range provided is out of order.");for(let C=a;C<=i;C++)if(e&&isNaN(Number(String.fromCharCode(C)))){const f=String.fromCharCode(C);M.push(f.toUpperCase().charCodeAt(0)),M.push(f.toLowerCase().charCodeAt(0))}else M.push(C)}G=G.substring(N[0].length),N=G.match(s)}if(r=$a(b,k,v),d){let g=-1;for(let C=48;C<=57;C++){if(g=M.indexOf(C),g>-1){M.splice(g,1);continue}M.push(C)}for(let C=65;C<=90;C++){if(g=M.indexOf(C),g>-1){M.splice(g,1);continue}M.push(C)}for(let C=97;C<=122;C++){if(g=M.indexOf(C),g>-1){M.splice(g,1);continue}M.push(C)}}const S=Array.from({length:r},()=>String.fromCharCode(M[j0(0)])).join("");u=u.slice(0,o.index)+S+u.slice(o.index+o[0].length),o=u.match(l)}const E=/(.)\{(\d+)\,(\d+)\}/;for(o=u.match(E);o!=null;){if(a=parseInt(o[2]),i=parseInt(o[3]),a>i)throw new Error("Numbers out of order in {} quantifier.");r=j0(a),u=u.slice(0,o.index)+o[1].repeat(r)+u.slice(o.index+o[0].length),o=u.match(E)}const D=/(.)\{(\d+)\}/;for(o=u.match(D);o!=null;)r=parseInt(o[2]),u=u.slice(0,o.index)+o[1].repeat(r)+u.slice(o.index+o[0].length),o=u.match(D);return u}const L4="qwerty!@#$%^123456";function N4(){return"user@example.com"}function R4(){return"пошта@укр.нет"}function H4(u,e){let a="pa$$word";return u>a.length&&(a+="_",a+=Xi(L4,u-a.length).substring(0,u-a.length)),a}function Ie({min:u,max:e,omitTime:a,omitDate:i}){let r=B4(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 G4(u,e){return Ie({min:u,max:e,omitTime:!1,omitDate:!1})}function V4(u,e){return Ie({min:u,max:e,omitTime:!0,omitDate:!1})}function _4(u,e){return Ie({min:u,max:e,omitTime:!1,omitDate:!0}).slice(1)}function ar(u,e,a,i,r=!1){if(i&&r)return T4(i);let n=Xi("string",u);return e&&n.length>e&&(n=n.substring(0,e)),n}function J4(){return"192.168.0.1"}function $4(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function I4(){return"example.com"}function O4(){return"приклад.укр"}function W4(){return"http://example.com"}function q4(){return"../dictionary"}function Z4(){return"http://example.com/{endpoint}"}function U4(){return"http://example.com/entity/1"}function Y4(){return"/entity/1"}function Q4(u,e,a){return A4(a||"id")}function X4(){return"/json/pointer"}function ut(){return"1/relative/json/pointer"}function et(){return"/regex/"}const at={email:N4,"idn-email":R4,password:H4,"date-time":G4,date:V4,time:_4,ipv4:J4,ipv6:$4,hostname:I4,"idn-hostname":O4,iri:U4,"iri-reference":Y4,uri:W4,"uri-reference":q4,"uri-template":Z4,uuid:Q4,default:ar,"json-pointer":X4,"relative-json-pointer":ut,regex:et};function it(u,e,a,i){let r=u.format||"default",n=at[r]||ar,o=i&&i.propertyName;return n(u.minLength||0,u.maxLength,o,u.pattern,e?.enablePatterns)}class ae{constructor(e,a={}){this.pattern=e,this.separator=a.separator||".",this.segments=this._parse(e),this._hasDeepWildcard=this.segments.some(i=>i.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(i=>i.attrName!==void 0),this._hasPositionSelector=this.segments.some(i=>i.position!==void 0)}_parse(e){const a=[];let i=0,r="";for(;i<e.length;)e[i]===this.separator?i+1<e.length&&e[i+1]===this.separator?(r.trim()&&(a.push(this._parseSegment(r.trim())),r=""),a.push({type:"deep-wildcard"}),i+=2):(r.trim()&&a.push(this._parseSegment(r.trim())),r="",i++):(r+=e[i],i++);return r.trim()&&a.push(this._parseSegment(r.trim())),a}_parseSegment(e){const a={type:"tag"};let i=null,r=e;const n=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(n&&(r=n[1]+n[3],n[2])){const D=n[2].slice(1,-1);D&&(i=D)}let o,s=r;if(r.includes("::")){const D=r.indexOf("::");if(o=r.substring(0,D).trim(),s=r.substring(D+2).trim(),!o)throw new Error(`Invalid namespace in pattern: ${e}`)}let l,E=null;if(s.includes(":")){const D=s.lastIndexOf(":"),d=s.substring(0,D).trim(),m=s.substring(D+1).trim();["first","last","odd","even"].includes(m)||/^nth\(\d+\)$/.test(m)?(l=d,E=m):l=s}else l=s;if(!l)throw new Error(`Invalid segment pattern: ${e}`);if(a.tag=l,o&&(a.namespace=o),i)if(i.includes("=")){const D=i.indexOf("=");a.attrName=i.substring(0,D).trim(),a.attrValue=i.substring(D+1).trim()}else a.attrName=i.trim();if(E){const D=E.match(/^nth\((\d+)\)$/);D?(a.position="nth",a.positionValue=parseInt(D[1],10)):a.position=E}return a}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class ir{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[]}push(e,a=null,i=null){if(this.path.length>0){const D=this.path[this.path.length-1];D.values=void 0}const r=this.path.length;this.siblingStacks[r]||(this.siblingStacks[r]=new Map);const n=this.siblingStacks[r],o=i?`${i}:${e}`:e,s=n.get(o)||0;let l=0;for(const D of n.values())l+=D;n.set(o,s+1);const E={tag:e,position:l,counter:s};i!=null&&(E.namespace=i),a!=null&&(E.values=a),this.path.push(E)}pop(){if(this.path.length===0)return;const e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){const a=this.path[this.path.length-1];e!=null&&(a.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){return this.path.length===0?void 0:this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;const a=this.path[this.path.length-1];return a.values!==void 0&&e in a.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,a=!0){const i=e||this.separator;return this.path.map(r=>a&&r.namespace?`${r.namespace}:${r.tag}`:r.tag).join(i)}toArray(){return this.path.map(e=>e.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(e){const a=e.segments;return a.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(a):this._matchSimple(a)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let a=0;a<e.length;a++){const i=e[a],r=this.path[a],n=a===this.path.length-1;if(!this._matchSegment(i,r,n))return!1}return!0}_matchWithDeepWildcard(e){let a=this.path.length-1,i=e.length-1;for(;i>=0&&a>=0;){const r=e[i];if(r.type==="deep-wildcard"){if(i--,i<0)return!0;const n=e[i];let o=!1;for(let s=a;s>=0;s--){const l=s===this.path.length-1;if(this._matchSegment(n,this.path[s],l)){a=s-1,i--,o=!0;break}}if(!o)return!1}else{const n=a===this.path.length-1;if(!this._matchSegment(r,this.path[a],n))return!1;a--,i--}}return i<0}_matchSegment(e,a,i){if(e.tag!=="*"&&e.tag!==a.tag||e.namespace!==void 0&&e.namespace!=="*"&&e.namespace!==a.namespace)return!1;if(e.attrName!==void 0){if(!i||!a.values||!(e.attrName in a.values))return!1;if(e.attrValue!==void 0){const r=a.values[e.attrName];if(String(r)!==String(e.attrValue))return!1}}if(e.position!==void 0){if(!i)return!1;const r=a.counter??0;if(e.position==="first"&&r!==0)return!1;if(e.position==="odd"&&r%2!==1)return!1;if(e.position==="even"&&r%2!==0)return!1;if(e.position==="nth"&&r!==e.positionValue)return!1}return!0}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this.path=e.path.map(a=>({...a})),this.siblingStacks=e.siblingStacks.map(a=>new Map(a))}}const rt=`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Oo, b as ou, p as Su, J as Yu, c as Wo, f as Zi, g as P0, h as Ga, k as Va, m as qo, l as Zo, n as Uo, o as Yo, q as Qo, u as Xo, A as Ui, v as We } from "./replay-index-
|
|
1
|
+
import { t as Oo, b as ou, p as Su, J as Yu, c as Wo, f as Zi, g as P0, h as Ga, k as Va, m as qo, l as Zo, n as Uo, o as Yo, q as Qo, u as Xo, A as Ui, v as We } from "./replay-index-C609Ibh9.js";
|
|
2
2
|
const {
|
|
3
3
|
env: x0 = {},
|
|
4
4
|
argv: Yi = [],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as h, r as i, e as x } from "./replay-index-
|
|
2
|
-
import { d as j, a as b, j as d } from "./replay-index-
|
|
1
|
+
import { s as h, r as i, e as x } from "./replay-index-C609Ibh9.js";
|
|
2
|
+
import { d as j, a as b, j as d } from "./replay-index-C609Ibh9.js";
|
|
3
3
|
async function u(n, e) {
|
|
4
4
|
const t = h(), 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-Dg03U1So.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-Dg03U1So.js"),t=require("./replay-oauth2-redirect-handler-Bqw5UUvl.js");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.useTelemetry=e.useTelemetry;exports.useTelemetryClient=e.useTelemetryClient;exports.OAuth2Error=t.OAuth2Error;exports.handleOAuth2Redirect=t.handleOAuth2Redirect;
|
package/dist/replay.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as s, M as r, R as t, w as l, S as m, T as o, y, z as p, x as T, B as d, C as h } from "./replay-index-
|
|
1
|
+
import { E as s, M as r, R as t, w as l, S as m, T as o, y, z as p, x as T, B as d, C as h } from "./replay-index-C609Ibh9.js";
|
|
2
2
|
import { O as n, h as C } from "./replay-oauth2-redirect-handler-CqKZB3aV.js";
|
|
3
3
|
export {
|
|
4
4
|
s as EmbeddedReplay,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/replay",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0-next.0",
|
|
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.
|
|
23
|
+
"@redocly/theme": "0.64.0-next.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@ai-sdk/provider": "3.0.0",
|