@redocly/replay 0.25.0-next.5 → 0.25.0-next.6
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-CAslAozB.js → replay-index-BG9oRuYU.js} +1 -1
- package/dist/{replay-index-MYWxrMRM.js → replay-index-DeWVPgYM.js} +1 -1
- package/dist/{replay-index-CWUvqp-r.js → replay-index-DuA4Mkjy.js} +7 -7
- package/dist/{replay-index-ooCgF1hB.js → replay-index-dLAVvNXX.js} +6 -6
- package/dist/{replay-respect-run-ToC_aVXw.js → replay-respect-run-BmqyyWqN.js} +1 -1
- package/dist/{replay-respect-run-CeDRayiH.js → replay-respect-run-BzjM57BJ.js} +1 -1
- package/dist/{replay-tauri-path-k_2_BOKf.js → replay-tauri-path-DHF_Nlch.js} +1 -1
- package/dist/{replay-tauri-path-0GtTXMJo.js → replay-tauri-path-DgAnxcle.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/package.json +2 -2
|
@@ -41638,7 +41638,7 @@ const UT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
41638
41638
|
class Mr {
|
|
41639
41639
|
static utils = null;
|
|
41640
41640
|
static async getUtils() {
|
|
41641
|
-
return Mr.utils || (Mr.utils = en() ? await import("./replay-tauri-path-
|
|
41641
|
+
return Mr.utils || (Mr.utils = en() ? await import("./replay-tauri-path-DgAnxcle.js") : await Promise.resolve().then(() => CPe)), Mr.utils;
|
|
41642
41642
|
}
|
|
41643
41643
|
static async dirname(e) {
|
|
41644
41644
|
return (await Mr.getUtils()).dirname(e);
|
|
@@ -78410,7 +78410,7 @@ const yI = xn({});
|
|
|
78410
78410
|
function mo() {
|
|
78411
78411
|
return Tr(yI) || {};
|
|
78412
78412
|
}
|
|
78413
|
-
const Kme = process.env.NODE_ENV === "development", wG = process.env.NODE_ENV === "production", qat = "0.25.0-next.
|
|
78413
|
+
const Kme = process.env.NODE_ENV === "development", wG = process.env.NODE_ENV === "production", qat = "0.25.0-next.6", zat = {
|
|
78414
78414
|
version: qat
|
|
78415
78415
|
}, Uat = {
|
|
78416
78416
|
organizationId: "",
|
|
@@ -79834,7 +79834,7 @@ async function adt({
|
|
|
79834
79834
|
}, { clientCert: c, clientKey: u } = l, d = en(), p = o || "response";
|
|
79835
79835
|
let f = null;
|
|
79836
79836
|
if (d) {
|
|
79837
|
-
const { open: S } = await import("./replay-index-
|
|
79837
|
+
const { open: S } = await import("./replay-index-BG9oRuYU.js"), _ = await S({ directory: !0, multiple: !1 });
|
|
79838
79838
|
if (!_)
|
|
79839
79839
|
return;
|
|
79840
79840
|
const C = Array.isArray(_) ? _[0] : _;
|
|
@@ -107707,7 +107707,7 @@ function iTt({
|
|
|
107707
107707
|
}, i = async () => {
|
|
107708
107708
|
if (en())
|
|
107709
107709
|
try {
|
|
107710
|
-
const { open: a } = await import("./replay-index-
|
|
107710
|
+
const { open: a } = await import("./replay-index-BG9oRuYU.js"), l = await a({
|
|
107711
107711
|
multiple: !0
|
|
107712
107712
|
});
|
|
107713
107713
|
if (!l)
|
|
@@ -108039,7 +108039,7 @@ const CTt = ({ data: t }) => {
|
|
|
108039
108039
|
}, s = async () => {
|
|
108040
108040
|
if (en())
|
|
108041
108041
|
try {
|
|
108042
|
-
const { open: l } = await import("./replay-index-
|
|
108042
|
+
const { open: l } = await import("./replay-index-BG9oRuYU.js"), c = await l();
|
|
108043
108043
|
if (!c)
|
|
108044
108044
|
return;
|
|
108045
108045
|
const u = await Ww(c);
|
|
@@ -111802,7 +111802,7 @@ function LAt({
|
|
|
111802
111802
|
project: { userFilesDir: r }
|
|
111803
111803
|
} = er(), { certificates: n } = Wo(), i = Gr(), { getCollection: o } = Wd(), s = o(t), a = r.get(), { inputs: l, servers: c } = i.get(), u = s?.sourceDescriptions.get() ?? [];
|
|
111804
111804
|
return { execute: async (p) => {
|
|
111805
|
-
const f = `${a}/${t}`, h = new Ume(), m = l.map((b) => JSON.stringify({ [b.name]: b.value })), g = jAt(c, u), { run: v } = await import("./replay-respect-run-
|
|
111805
|
+
const f = `${a}/${t}`, h = new Ume(), m = l.map((b) => JSON.stringify({ [b.name]: b.value })), g = jAt(c, u), { run: v } = await import("./replay-respect-run-BmqyyWqN.js");
|
|
111806
111806
|
return await v({
|
|
111807
111807
|
files: [f],
|
|
111808
111808
|
workflow: e ? [e] : [],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as fo, b as iu, p as ju, J as Uu, c as zo, f as ji, B as So, g as j0, h as Ta, k as La, m as Mo, l as jo, n as Po, o as wo, q as Ko, u as To, A as Pi, v as Je } from "./replay-index-
|
|
1
|
+
import { t as fo, b as iu, p as ju, J as Uu, c as zo, f as ji, B as So, g as j0, h as Ta, k as La, m as Mo, l as jo, n as Po, o as wo, q as Ko, u as To, A as Pi, v as Je } from "./replay-index-dLAVvNXX.js";
|
|
2
2
|
const {
|
|
3
3
|
env: x0 = {},
|
|
4
4
|
argv: wi = [],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("./replay-index-DuA4Mkjy.js"),{env:E0={},argv:Ai=[],platform:ho=""}=typeof process>"u"?{}:process,go="NO_COLOR"in E0||Ai.includes("--no-color"),po="FORCE_COLOR"in E0||Ai.includes("--color"),vo=ho==="win32",bo=E0.TERM==="dumb",Bo=K.tty&&void 0,Ao="CI"in E0&&("GITHUB_ACTIONS"in E0||"GITLAB_CI"in E0||"CIRCLECI"in E0),yo=!go&&(po||vo&&!bo||Bo||Ao),yi=(u,e,a,i,r=e.substring(0,u)+i,n=e.substring(u+a.length),o=n.indexOf(a))=>r+(o<0?n:yi(o,n,a,i)),fo=(u,e,a,i,r)=>u<0?a+e+i:a+yi(u,e,i,r)+i,zo=(u,e,a=u,i=u.length+1)=>r=>r||!(r===""||r===void 0)?fo((""+r).indexOf(e,i),r,u,e,a):"",I=(u,e,a)=>zo(`\x1B[${u}m`,`\x1B[${e}m`,a),ja={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)},So=({useColor:u=yo}={})=>u?ja:Object.keys(ja).reduce((e,a)=>({...e,[a]:String}),{}),{reset:HZ,bold:Uu,dim:Mo,italic:GZ,underline:jo,inverse:fi,hidden:VZ,strikethrough:JZ,black:_Z,red:iu,green:m0,yellow:Yu,blue:Eu,magenta:$Z,cyan:IZ,white:Pa,gray:du,bgBlack:OZ,bgRed:q0,bgGreen:WZ,bgYellow:qZ,bgBlue:ZZ,bgMagenta:UZ,bgCyan:YZ,bgWhite:QZ,blackBright:XZ,redBright:uU,greenBright:eU,yellowBright:aU,blueBright:iU,magentaBright:rU,cyanBright:nU,whiteBright:oU,bgBlackBright:tU,bgRedBright:sU,bgGreenBright:lU,bgYellowBright:EU,bgBlueBright:DU,bgMagentaBright:xU,bgCyanBright:cU,bgWhiteBright:dU}=So(),Po=u=>/\{.*?\}/.test(u);function Hu({value:u,ctx:e,logger:a}){if(!u)return u;if(K.isPlainObject(u)){const i={};for(const r in u)i[r]=Hu({value:u[r],ctx:e,logger:a});return i}else if(Array.isArray(u))return u.map(i=>Hu({value:i,ctx:e,logger:a}));return typeof u!="string"?u:u.startsWith("$faker.")?P0({pointer:u.slice(1),ctx:e,logger:a}):Po(u)?To(u,e,a):No(u,e,a)}function wo(u,e,a){const i=u.indexOf("{");if(i!==-1){const n=u.substring(i+1).slice(0,-1),o=P0({pointer:n.slice(1),ctx:e,logger:a});return o&&u.replace(/{(.*)}/,o)}else return u}function Ko(u,e){const a=Object.keys(e),i=Object.values(e);return new Function(...a,`return ${u}`)(...i)}function To(u,e,a){const i=/\{\$(\{[^{}]*\}|[^{}])*\}/g;let r=u;return r=r.replace(i,(n,o)=>Lo(n,e,a)),r}function Lo(u,e,a){if(!u.includes("$"))return u;if(u.includes("$faker."))return wo(u,e,a);const i=S0(e)(Ro(u));return i!==void 0?i:""}const No=(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=S0(e)("$sourceDescriptions");return s[n]?s[n].workflows.find(l=>l.workflowId===o):void 0}return i&&i.trim().startsWith("faker.")?P0({pointer:i,ctx:e,logger:a}):i?S0(e)(wa(i)):i.replace(/\$\{([^}]+)}/g,(r,n)=>S0(e)(wa(n)))};function Ro(u){return u.replace(/\{(.*)\}/,"$1")}function wa(u){return u.replace(/\['(.*?)'\]/g,".$1")}const S0=(u,e="")=>a=>{if(e||(e=a),!a)return u;const[i,...r]=a.split(".");if(!u)throw Error(`Cannot get ${iu(i)} from ${iu(e)}`);if(u?.[i]===void 0){const n=` Undefined ${iu(i)} at ${iu(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 S0(u[i],e)(r.join("."))};function P0({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 Ko(`ctx${n}`,r)}catch(n){a.error(iu(n.toString()));return}}function zi(u,e,a){if(typeof u=="string"&&u)return Hu({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]=Hu({value:u[i],ctx:e,logger:a})):zi(u[i],e,a)}function Ka(u,e,a){return zi(u,e,a)||u}function Ta(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 Ho(u){return K.isPlainObject(u)&&"name"in u&&"value"in u&&!("in"in u)}function He(u){return K.isPlainObject(u)&&"in"in u&&typeof u.in=="string"&&["header","query","path","cookie"].includes(u.in)}const Go=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function Si(u){return u.startsWith("$file(")&&u.endsWith(")")?u.substring(7,u.length-2):u}const La=async(u,e,a,i,r)=>{const n=K.pathBrowserifyExports.dirname(i),o=K.pathBrowserifyExports.resolve(n,Si(a));u.append(e,await r.options.requestFileLoader.getFileBody(o))},Mi=(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(La(e,l,s,i,r)):Array.isArray(s)?s.forEach(E=>{typeof E=="string"&&E.startsWith("$file(")&&E.endsWith(")")?u.push(La(e,l,E,i,r)):e.append(l,E.toString())}):K.isPlainObject(s)?Mi(u,e,s,i,r,l):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.append(l,s.toString())})},Vo=async(u,e,a,i)=>{if(K.isPlainObject(u)){const r=[];Mi(r,e,u,a,i),await Promise.all(r)}},Jo=async(u,e)=>{if(typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")){const a=K.pathBrowserifyExports.resolve(K.pathBrowserifyExports.dirname(e.options.filePath),Si(u));return e.options.requestFileLoader.getFileBody(a)}else return u};async function _o(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=K.pathBrowserifyExports.resolve(e.options.filePath);return await Vo(a,r,n,e),{...u,payload:r}}else{if(i==="application/octet-stream"||typeof i=="string"&&Go.test(i))return{...u,payload:await Jo(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 $o({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=K.JsonPointerLib.get(u,n),l=Ku({payload:o,context:a,logger:i});s!==void 0&&K.JsonPointerLib.set(u,n,l)}catch{throw new Error(`Invalid JSON Pointer: ${n}`)}}}const Io=["parameters","failureActions","successActions"];function Oo(u,e){const{reference:a,value:i}=u;if(!Io.some(n=>a.includes(`$components.${n}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const r=Hu({value:a,ctx:e,logger:e.options.logger});return K.isPlainObject(r)&&"value"in r&&i?{...r,value:i}:r}function f0(u,e){return"reference"in u?Oo(u,e):u}function ji(u){try{return K.parseRuntimeExpression(u)}catch{throw new Error(`Runtime expression is not valid: ${u}`)}}function Wo(u,e){const a=[{pattern:/\$response\.body#\/([\w/-]+)/g,ctxFunction:(r,n)=>v0(e.$response?.body,n,r)},{pattern:/\$request\.body#\/([\w/-]+)/g,ctxFunction:(r,n)=>v0(e.$request?.body,n,r)},{pattern:/\$outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,n,o)=>v0(e.$outputs?.[n],o,r)},{pattern:/\$workflows\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,n,o,s)=>v0(e.$workflows?.[n]?.outputs?.[o],s,r)},{pattern:/\$steps\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(r,n,o,s)=>v0(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 v0(u,e,a){if(u)try{const i=K.JsonPointerLib.get(u,`/${e}`);return typeof i=="string"||Array.isArray(i)||K.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 Ka(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 Ka(u,e,i)}return typeof u=="string"?e4(u)?Zu(u,e,i):u4(u,e,i):K.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 Zu(u,e,a){return typeof u=="string"?qo(u,e,a):K.isPlainObject(u)?Object.entries(u).reduce((i,[r,n])=>(i[r]=n&&Zu(n,e,a),i),{}):Array.isArray(u)?u.map(i=>Zu(i,e,a)):u}function qo(u,e,a){if(/^\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?$/.test(u))return P0({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=>P0({pointer:o.slice(1),ctx:e,logger:a})).replace(/{(.*?)}/g,"$1")}if(!u.includes("$")&&!/[=<>]/.test(u))return u;ji(u);const i=Uo(u,e),r=Yo(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 Zo(u){return u.replace(/\$([a-zA-Z0-9._-]+)/g,(e,a)=>`$${a.replace(/-/g,"_")}`)}function Uo(u,e){const a=Wo(u,e);let r=Zo(a);if(r.startsWith("{")&&r.endsWith("}")){const l=r.slice(1,-1);!l.trim().startsWith("{")&&!l.trim().startsWith("[")&&(r=l)}const n=Xo(r),o=/\.header\.([a-zA-Z0-9._-]+)/g;return n.replace(o,(l,E)=>`.header.${E.toLowerCase()}`)}function Yo(u){const e={};for(const[a,i]of Object.entries(u)){const r=a.replace(/-/g,"_");e[r]=Pi(i)}return e}function Pi(u){return Array.isArray(u)?u:K.isPlainObject(u)?Qo(u):u}function Qo(u){return Object.keys(u).reduce((e,a)=>{const i=a.replace(/-/g,"_");return e[i]=Pi(u[a]),e},{})}function Xo(u){return u.replace(/\.(\d+)/g,(e,a,i,r)=>{const n=r[i-1];return/\d/.test(n)?e:`[${a}]`})}function u4(u,e,a){const i=/\{(?:[^{}]|\{[^{}]*\})*\}|\$[^\s{}]+(?:\([^()]*\))*/g;return u.replace(i,r=>{const n=r.trim();if(!wi(n)&&!n.includes("$faker."))return r;const o=Zu(n,e,a);return o!==void 0?o:r})}function e4(u){const e=u.trim();return e.startsWith("$faker.")?!0:e.startsWith("$")&&!/\s/.test(e)||e.startsWith("{")&&e.endsWith("}")?wi(e):!1}function wi(u){try{return ji(u),!0}catch{return!1}}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 Ki extends Error{}class Ti extends Ki{}class Li extends Ki{}async function a4(u){const{descriptionPath:e,externalRefResolver:a,base:i}=u,r=await K.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 i4={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},we=Symbol("skip");function b0(u){return u<10?"0"+u:u}function r4(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 Ni(u,e){return e>u.length?u.repeat(Math.trunc(e/u.length)+1).substring(0,e):u}function X0(...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]=X0(n,o):a[r]=o}),a),Array.isArray(u[u.length-1])?[]:{})}function n4(u){var e=s4(u),a=l4(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 Ce(u){return{value:u==="object"?{}:u==="array"?[]:void 0}}function Ou(u,e){e&&u.pop()}function o4(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 t4(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 ue(u,e={},a={}){const{value:i}=u,{propertyName:r}=a,{name:n,prefix:o,namespace:s}=o4(e),l=t4(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 s4(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 l4(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 E4(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=X0(n.value||{},...o.filter(s=>typeof s=="object"));for(const s in n.value)n.value[s]===we&&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 Na={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 e=Object.keys(Na);for(var a=0;a<e.length;a++){let i=e[a],r=Na[i];if(u[i]!==void 0)return r}return null}let Z0={},Pu=[];function D4(){Z0={},Pu=[]}function Ri(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 Ra(u){const e=Ri(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 Ce(H0(u));Pu.push(u)}if(i&&i.depth>e.maxSampleDepth)return Ou(Pu,i),Ce(H0(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=K.JsonPointerLib.get(a,s);let E;if(Z0[s]!==!0){Z0[s]=!0;const D=wu(l,e,a,i);if(e.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),Ra(u)||E4({...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")),Ou(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){Ou(Pu,i);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.anyOf[0]);return o(u,s)}if(u.if&&u.then){Ou(Pu,i);const{if:s,then:l,...E}=u;return wu(X0(E,s,l),e,a,i)}let r=Ri(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=H0(u));let s=Vi[n];s&&(r=s(u,e,a,i))}return Ou(Pu,i),{value:r,readOnly:u.readOnly,writeOnly:u.writeOnly,type:n};function o(s,l){const E=Ra(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 F=X0(D.value,d.value);return{...d,value:F}}return d}}function x4(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: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(e?.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 c4(u){return!0}function Hi(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 d4(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]=we);return}if(e.skipWriteOnly&&E.writeOnly){i?.isAllOfChild&&(r[l]=we);return}if(e?.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 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 M0(u,e){return u}function Ha(u,e,a){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 e!=null&&a!=null?i=M0(parseInt(e)):e!=null&&a==null&&(i=parseInt(e));return i}function m4(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],F=o[3],k=o[4];r=Ha(k,d,F),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]==="^",F=o[2]==="-",k=o[4],b=o[5],A=o[6],w=[];let G=o[3],R=G.match(s);for(F&&w.push(45);R!=null;){if(R[0].indexOf("-")===-1)e&&isNaN(Number(R[0]))?(w.push(R[0].toUpperCase().charCodeAt(0)),w.push(R[0].toLowerCase().charCodeAt(0))):w.push(R[0].charCodeAt(0));else{const p=R[0].split("-").map(C=>C.charCodeAt(0));if(a=p[0],i=p[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);w.push(f.toUpperCase().charCodeAt(0)),w.push(f.toLowerCase().charCodeAt(0))}else w.push(C)}G=G.substring(R[0].length),R=G.match(s)}if(r=Ha(A,k,b),d){let p=-1;for(let C=48;C<=57;C++){if(p=w.indexOf(C),p>-1){w.splice(p,1);continue}w.push(C)}for(let C=65;C<=90;C++){if(p=w.indexOf(C),p>-1){w.splice(p,1);continue}w.push(C)}for(let C=97;C<=122;C++){if(p=w.indexOf(C),p>-1){w.splice(p,1);continue}w.push(C)}}const V=Array.from({length:r},()=>String.fromCharCode(w[M0(0)])).join("");u=u.slice(0,o.index)+V+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=M0(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 F4="qwerty!@#$%^123456";function k4(){return"user@example.com"}function C4(){return"пошта@укр.нет"}function h4(u,e){let a="pa$$word";return u>a.length&&(a+="_",a+=Ni(F4,u-a.length).substring(0,u-a.length)),a}function Ge({min:u,max:e,omitTime:a,omitDate:i}){let r=r4(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 Ge({min:u,max:e,omitTime:!1,omitDate:!1})}function p4(u,e){return Ge({min:u,max:e,omitTime:!0,omitDate:!1})}function v4(u,e){return Ge({min:u,max:e,omitTime:!1,omitDate:!0}).slice(1)}function Gi(u,e,a,i,r=!1){if(i&&r)return m4(i);let n=Ni("string",u);return e&&n.length>e&&(n=n.substring(0,e)),n}function b4(){return"192.168.0.1"}function B4(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function A4(){return"example.com"}function y4(){return"приклад.укр"}function f4(){return"http://example.com"}function z4(){return"../dictionary"}function S4(){return"http://example.com/{endpoint}"}function M4(){return"http://example.com/entity/1"}function j4(){return"/entity/1"}function P4(u,e,a){return n4(a||"id")}function w4(){return"/json/pointer"}function K4(){return"1/relative/json/pointer"}function T4(){return"/regex/"}const L4={email:k4,"idn-email":C4,password:h4,"date-time":g4,date:p4,time:v4,ipv4:b4,ipv6:B4,hostname:A4,"idn-hostname":y4,iri:M4,"iri-reference":j4,uri:f4,"uri-reference":z4,"uri-template":S4,uuid:P4,default:Gi,"json-pointer":w4,"relative-json-pointer":K4,regex:T4};function N4(u,e,a,i){let r=u.format||"default",n=L4[r]||Gi,o=i&&i.propertyName;return n(u.minLength||0,u.maxLength,o,u.pattern,e?.enablePatterns)}var Vi={};const R4={skipReadOnly:!1,maxSampleDepth:15};function H4(u,e){if(!u)throw new Error("Unknown format output for building XML.");return(Array.isArray(u)||Object.keys(u).length>1)&&(u={[e?.xml?.name||"root"]:u}),new K.Builder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(u)}function G4(u,e,a){let i=Object.assign({},R4,e);D4();let r=wu(u,i,a).value;return i?.format==="xml"?H4(r,u):r}function C0(u,e){Vi[u]=e}C0("array",x4);C0("boolean",c4);C0("integer",Hi);C0("number",Hi);C0("object",d4);C0("string",N4);function Ji(u,e){if(u)try{return G4(u,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(a){e.error(q0(" Error while generating test data from JSON Schema ")+`
|
|
@@ -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-DuA4Mkjy.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;
|
|
@@ -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-dLAVvNXX.js";
|
|
2
|
+
import { d as j, a as b, j as d } from "./replay-index-dLAVvNXX.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;
|
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-DuA4Mkjy.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.createResource=e.createResource;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 r, M as l, R as o, y as p, S as y, T as m, z as n, C as d, D as u, F as T, G as h, H as i, I as A, K as C } from "./replay-index-
|
|
1
|
+
import { w as s, x as t, E as r, M as l, R as o, y as p, S as y, T as m, z as n, C as d, D as u, F as T, G as h, H as i, I as A, K as C } from "./replay-index-dLAVvNXX.js";
|
|
2
2
|
import { O, h as x } 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.25.0-next.
|
|
3
|
+
"version": "0.25.0-next.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/replay.cjs",
|
|
6
6
|
"module": "./dist/replay.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react-dom": "^19.2.4",
|
|
22
22
|
"react-router-dom": "^6.30.3",
|
|
23
23
|
"styled-components": "^6.4.2",
|
|
24
|
-
"@redocly/theme": "0.66.0-next.
|
|
24
|
+
"@redocly/theme": "0.66.0-next.5"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@ai-sdk/anthropic": "3.0.1",
|