@redocly/replay 0.24.0-next.4 → 0.24.0-next.5
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-BPxWZhxT.js → replay-index-BLUEG3ZX.js} +1 -1
- package/dist/{replay-index-BvG3rjLC.js → replay-index-BaSiOcII.js} +33728 -33110
- package/dist/{replay-index-CjmdsV7D.js → replay-index-Dr8zYd7m.js} +1327 -1306
- package/dist/{replay-index-BiiX-bai.js → replay-index-_BklGRsq.js} +1 -1
- package/dist/{replay-respect-run-D8xgGl0P.js → replay-respect-run-BTOfM8PA.js} +1 -1
- package/dist/{replay-respect-run-BIAKp3gZ.js → replay-respect-run-fEFPPKD1.js} +1 -1
- package/dist/{replay-tauri-path-C83G6xBv.js → replay-tauri-path-CdQLJfnr.js} +1 -1
- package/dist/{replay-tauri-path-BH1lgHDm.js → replay-tauri-path-S79gY9Vh.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +72 -33
- package/dist/replay.js +9 -8
- package/package.json +3 -3
|
@@ -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-Dr8zYd7m.js"),{env:E0={},argv:Ai=[],platform:ko=""}=typeof process>"u"?{}:process,Co="NO_COLOR"in E0||Ai.includes("--no-color"),ho="FORCE_COLOR"in E0||Ai.includes("--color"),go=ko==="win32",po=E0.TERM==="dumb",vo=K.tty&&void 0,bo="CI"in E0&&("GITHUB_ACTIONS"in E0||"GITLAB_CI"in E0||"CIRCLECI"in E0),Bo=!Co&&(ho||go&&!po||vo||bo),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)),Ao=(u,e,a,i,r)=>u<0?a+e+i:a+yi(u,e,i,r)+i,yo=(u,e,a=u,i=u.length+1)=>r=>r||!(r===""||r===void 0)?Ao((""+r).indexOf(e,i),r,u,e,a):"",I=(u,e,a)=>yo(`\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)},fo=({useColor:u=Bo}={})=>u?ja:Object.keys(ja).reduce((e,a)=>({...e,[a]:String}),{}),{reset:RZ,bold:Uu,dim:zo,italic:HZ,underline:So,inverse:fi,hidden:GZ,strikethrough:VZ,black:JZ,red:iu,green:m0,yellow:Yu,blue:Eu,magenta:_Z,cyan:$Z,white:Pa,gray:du,bgBlack:IZ,bgRed:q0,bgGreen:OZ,bgYellow:WZ,bgBlue:qZ,bgMagenta:ZZ,bgCyan:UZ,bgWhite:YZ,blackBright:QZ,redBright:XZ,greenBright:uU,yellowBright:eU,blueBright:aU,magentaBright:iU,cyanBright:rU,whiteBright:nU,bgBlackBright:oU,bgRedBright:tU,bgGreenBright:sU,bgYellowBright:lU,bgBlueBright:EU,bgMagentaBright:DU,bgCyanBright:xU,bgWhiteBright:cU}=fo(),Mo=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}):Mo(u)?wo(u,e,a):To(u,e,a)}function jo(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 Po(u,e){const a=Object.keys(e),i=Object.values(e);return new Function(...a,`return ${u}`)(...i)}function wo(u,e,a){const i=/\{\$(\{[^{}]*\}|[^{}])*\}/g;let r=u;return r=r.replace(i,(n,o)=>Ko(n,e,a)),r}function Ko(u,e,a){if(!u.includes("$"))return u;if(u.includes("$faker."))return jo(u,e,a);const i=S0(e)(Lo(u));return i!==void 0?i:""}const To=(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 Lo(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 Po(`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 No(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 Ro=/^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())})},Ho=async(u,e,a,i)=>{if(K.isPlainObject(u)){const r=[];Mi(r,e,u,a,i),await Promise.all(r)}},Go=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 Vo(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 Ho(a,r,n,e),{...u,payload:r}}else{if(i==="application/octet-stream"||typeof i=="string"&&Ro.test(i))return{...u,payload:await Go(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 Jo({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 _o=["parameters","failureActions","successActions"];function $o(u,e){const{reference:a,value:i}=u;if(!_o.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?$o(u,e):u}function Io(u){try{return K.parseRuntimeExpression(u)}catch{throw new Error(`Runtime expression is not valid: ${u}`)}}function Oo(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"?u4(u)?Zu(u,e,i):Xo(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"?Wo(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 Wo(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;Io(u);const i=Zo(u,e),r=Uo(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 qo(u){return u.replace(/\$([a-zA-Z0-9._-]+)/g,(e,a)=>`$${a.replace(/-/g,"_")}`)}function Zo(u,e){const a=Oo(u,e);let r=qo(a);if(r.startsWith("{")&&r.endsWith("}")){const l=r.slice(1,-1);!l.trim().startsWith("{")&&!l.trim().startsWith("[")&&(r=l)}const n=Qo(r),o=/\.header\.([a-zA-Z0-9._-]+)/g;return n.replace(o,(l,E)=>`.header.${E.toLowerCase()}`)}function Uo(u){const e={};for(const[a,i]of Object.entries(u)){const r=a.replace(/-/g,"_");e[r]=ji(i)}return e}function ji(u){return Array.isArray(u)?u:K.isPlainObject(u)?Yo(u):u}function Yo(u){return Object.keys(u).reduce((e,a)=>{const i=a.replace(/-/g,"_");return e[i]=ji(u[a]),e},{})}function Qo(u){return u.replace(/\.(\d+)/g,(e,a,i,r)=>{const n=r[i-1];return/\d/.test(n)?e:`[${a}]`})}function Xo(u,e,a){const i=/\{(?:[^{}]|\{[^{}]*\})*\}|\$[^\s{}]+(?:\([^()]*\))*/g;return u.replace(i,r=>{const n=r.trim(),o=Zu(n,e,a);return o!==void 0?o:r})}function u4(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 Pi extends Error{}class wi extends Pi{}class Ki extends Pi{}async function e4(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 a4={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},we=Symbol("skip");function b0(u){return u<10?"0"+u:u}function i4(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 Ti(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 r4(u){var e=t4(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 Ce(u){return{value:u==="object"?{}:u==="array"?[]:void 0}}function Ou(u,e){e&&u.pop()}function n4(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 o4(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}=n4(e),l=o4(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 t4(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 l4(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 E4(){Z0={},Pu=[]}function Li(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=Li(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)||l4({...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=Li(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=Hi[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 D4(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 x4(u){return!0}function Ni(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 c4(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 d4(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 m4="qwerty!@#$%^123456";function F4(){return"user@example.com"}function k4(){return"пошта@укр.нет"}function C4(u,e){let a="pa$$word";return u>a.length&&(a+="_",a+=Ti(m4,u-a.length).substring(0,u-a.length)),a}function Ge({min:u,max:e,omitTime:a,omitDate:i}){let r=i4(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 h4(u,e){return Ge({min:u,max:e,omitTime:!1,omitDate:!1})}function g4(u,e){return Ge({min:u,max:e,omitTime:!0,omitDate:!1})}function p4(u,e){return Ge({min:u,max:e,omitTime:!1,omitDate:!0}).slice(1)}function Ri(u,e,a,i,r=!1){if(i&&r)return d4(i);let n=Ti("string",u);return e&&n.length>e&&(n=n.substring(0,e)),n}function v4(){return"192.168.0.1"}function b4(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function B4(){return"example.com"}function A4(){return"приклад.укр"}function y4(){return"http://example.com"}function f4(){return"../dictionary"}function z4(){return"http://example.com/{endpoint}"}function S4(){return"http://example.com/entity/1"}function M4(){return"/entity/1"}function j4(u,e,a){return r4(a||"id")}function P4(){return"/json/pointer"}function w4(){return"1/relative/json/pointer"}function K4(){return"/regex/"}const T4={email:F4,"idn-email":k4,password:C4,"date-time":h4,date:g4,time:p4,ipv4:v4,ipv6:b4,hostname:B4,"idn-hostname":A4,iri:S4,"iri-reference":M4,uri:y4,"uri-reference":f4,"uri-template":z4,uuid:j4,default:Ri,"json-pointer":P4,"relative-json-pointer":w4,regex:K4};function L4(u,e,a,i){let r=u.format||"default",n=T4[r]||Ri,o=i&&i.propertyName;return n(u.minLength||0,u.maxLength,o,u.pattern,e?.enablePatterns)}var Hi={};const N4={skipReadOnly:!1,maxSampleDepth:15};function R4(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 H4(u,e,a){let i=Object.assign({},N4,e);E4();let r=wu(u,i,a).value;return i?.format==="xml"?R4(r,u):r}function C0(u,e){Hi[u]=e}C0("array",D4);C0("boolean",x4);C0("integer",Ni);C0("number",Ni);C0("object",c4);C0("string",L4);function Gi(u,e){if(u)try{return H4(u,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(a){e.error(q0(" Error while generating test data from JSON Schema ")+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Ao, b as iu, p as ju, J as Uu, c as yo, f as ji, B as fo, g as j0, h as Ta, k as La, m as zo, l as So, n as Mo, o as jo, q as Po, u as wo, A as Pi, v as Je } from "./replay-index-
|
|
1
|
+
import { t as Ao, b as iu, p as ju, J as Uu, c as yo, f as ji, B as fo, g as j0, h as Ta, k as La, m as zo, l as So, n as Mo, o as jo, q as Po, u as wo, A as Pi, v as Je } from "./replay-index-BaSiOcII.js";
|
|
2
2
|
const {
|
|
3
3
|
env: x0 = {},
|
|
4
4
|
argv: wi = [],
|
|
@@ -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-Dr8zYd7m.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-BaSiOcII.js";
|
|
2
|
+
import { d as j, a as b, j as d } from "./replay-index-BaSiOcII.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-Dr8zYd7m.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.d.ts
CHANGED
|
@@ -21,8 +21,6 @@ export declare class AgentLoop {
|
|
|
21
21
|
private model;
|
|
22
22
|
private tools;
|
|
23
23
|
private readonly toolLoopAgent;
|
|
24
|
-
private readonly maxHistoryMessages;
|
|
25
|
-
private readonly maxHistoryChars;
|
|
26
24
|
private readonly maxSteps;
|
|
27
25
|
private readonly context;
|
|
28
26
|
private readonly systemInstructions;
|
|
@@ -48,11 +46,9 @@ declare type AgentRuntimeConfig = {
|
|
|
48
46
|
maxRetries?: ToolLoopAgentConfig['maxRetries'];
|
|
49
47
|
onStepFinish?: ToolLoopAgentOnStepFinishCallback<ReplayToolSet>;
|
|
50
48
|
onFinish?: ToolLoopAgentOnFinishCallback<ReplayToolSet>;
|
|
51
|
-
maxHistoryMessages?: number;
|
|
52
|
-
maxHistoryChars?: number;
|
|
53
49
|
};
|
|
54
50
|
|
|
55
|
-
declare type AiChatTelemetrySendEvent =
|
|
51
|
+
declare type AiChatTelemetrySendEvent = TelemetryMethods['sendEvent'];
|
|
56
52
|
|
|
57
53
|
export declare const AiPanelContext: Context<AiPanelContextValue>;
|
|
58
54
|
|
|
@@ -117,14 +113,29 @@ declare type ClientCredentialsOAuthFlowsObject = {
|
|
|
117
113
|
|
|
118
114
|
declare type ConvertOperationFunction = (path: string, method: string, openAPI: any) => OpenAPIOperation_2 | undefined;
|
|
119
115
|
|
|
116
|
+
/**
|
|
117
|
+
* Canonical URI for Replay telemetry `data[]` items.
|
|
118
|
+
* Prefers `window.location.href` in non-Tauri browser contexts; otherwise emits a Redocly URN.
|
|
119
|
+
*
|
|
120
|
+
* The browser URL is stripped of its query string and fragment so that auth tokens, password-reset
|
|
121
|
+
* codes, OAuth `state`, session IDs, and similar secrets in `?…` or `#…` cannot leak into telemetry.
|
|
122
|
+
*
|
|
123
|
+
* @see docs/intranet/engineering/knowledge-base/telemetry/cloudevent-structure.md
|
|
124
|
+
*/
|
|
125
|
+
export declare function createResource<O extends string = string>(object: O, id: string, component?: string): {
|
|
126
|
+
object: O;
|
|
127
|
+
id: string;
|
|
128
|
+
uri: string;
|
|
129
|
+
};
|
|
130
|
+
|
|
120
131
|
declare const definitions: {
|
|
121
132
|
open_tab: Tool< {
|
|
122
133
|
action: "focus_tab" | "open_operation" | "open_collection" | "open_workflow" | "open_step" | "open_workflow_run" | "open_new_request";
|
|
123
134
|
tabIndex?: number | undefined;
|
|
124
|
-
collectionId?: string | undefined;
|
|
125
135
|
workflowId?: string | undefined;
|
|
126
136
|
stepId?: string | undefined;
|
|
127
137
|
operationId?: string | undefined;
|
|
138
|
+
collectionId?: string | undefined;
|
|
128
139
|
requestUrl?: string | undefined;
|
|
129
140
|
requestMethod?: string | undefined;
|
|
130
141
|
}, {
|
|
@@ -161,9 +172,9 @@ declare const definitions: {
|
|
|
161
172
|
error?: undefined;
|
|
162
173
|
}>;
|
|
163
174
|
run_request: Tool< {
|
|
164
|
-
collectionId: string;
|
|
165
175
|
workflowId: string;
|
|
166
176
|
stepId: string;
|
|
177
|
+
collectionId: string;
|
|
167
178
|
}, {
|
|
168
179
|
error: {
|
|
169
180
|
message: string;
|
|
@@ -185,7 +196,7 @@ declare const definitions: {
|
|
|
185
196
|
error?: undefined;
|
|
186
197
|
}>;
|
|
187
198
|
get_current_tab: Tool< {
|
|
188
|
-
sections: ("security" | "result" | "response" | "info" | "workflows" | "sourceDescriptions" | "inputs" | "
|
|
199
|
+
sections: ("security" | "result" | "response" | "info" | "workflows" | "sourceDescriptions" | "inputs" | "steps" | "parameters" | "outputs" | "successCriteria" | "requestBody" | "severity")[];
|
|
189
200
|
}, {
|
|
190
201
|
error: {
|
|
191
202
|
message: string;
|
|
@@ -204,17 +215,17 @@ declare const definitions: {
|
|
|
204
215
|
path?: string | undefined;
|
|
205
216
|
type?: "workflow" | "collection" | "api" | "step" | "api_operation" | undefined;
|
|
206
217
|
method?: string | undefined;
|
|
207
|
-
collectionId?: string | undefined;
|
|
208
|
-
workflowId?: string | undefined;
|
|
209
|
-
stepId?: string | undefined;
|
|
210
218
|
query?: string | undefined;
|
|
211
219
|
apiId?: string | undefined;
|
|
220
|
+
workflowId?: string | undefined;
|
|
221
|
+
stepId?: string | undefined;
|
|
212
222
|
operationId?: string | undefined;
|
|
223
|
+
collectionId?: string | undefined;
|
|
213
224
|
}, unknown>;
|
|
214
225
|
update_security: Tool< {
|
|
215
|
-
collectionId: string;
|
|
216
226
|
workflowId: string;
|
|
217
227
|
stepId: string;
|
|
228
|
+
collectionId: string;
|
|
218
229
|
changes: ({
|
|
219
230
|
type: import("../../../../types/security").SecurityTypes.BasicAuth;
|
|
220
231
|
action: "add" | "update";
|
|
@@ -264,7 +275,7 @@ declare const definitions: {
|
|
|
264
275
|
username?: string | undefined;
|
|
265
276
|
clientId?: string | undefined;
|
|
266
277
|
clientSecret?: string | undefined;
|
|
267
|
-
grantType?: "password" | "
|
|
278
|
+
grantType?: "password" | "implicit" | "clientCredentials" | "authorizationCode" | "clientCredentialsWithJwtAssertion" | "authorizationCodeWithPkce" | undefined;
|
|
268
279
|
tokenUrl?: string | undefined;
|
|
269
280
|
accessToken?: string | undefined;
|
|
270
281
|
authorizationUrl?: string | undefined;
|
|
@@ -282,12 +293,12 @@ declare const definitions: {
|
|
|
282
293
|
clientId?: string | undefined;
|
|
283
294
|
clientSecret?: string | undefined;
|
|
284
295
|
openIdConnectUrl?: string | undefined;
|
|
285
|
-
grantType?: "password" | "
|
|
286
|
-
userInfoUrl?: string | undefined;
|
|
296
|
+
grantType?: "password" | "implicit" | "clientCredentials" | "authorizationCode" | "clientCredentialsWithJwtAssertion" | "authorizationCodeWithPkce" | undefined;
|
|
287
297
|
tokenUrl?: string | undefined;
|
|
288
298
|
accessToken?: string | undefined;
|
|
289
299
|
authorizationUrl?: string | undefined;
|
|
290
300
|
callbackUrl?: string | undefined;
|
|
301
|
+
userInfoUrl?: string | undefined;
|
|
291
302
|
} | undefined;
|
|
292
303
|
index?: number | undefined;
|
|
293
304
|
schemeId?: string | undefined;
|
|
@@ -316,31 +327,31 @@ declare const definitions: {
|
|
|
316
327
|
error?: undefined;
|
|
317
328
|
}>;
|
|
318
329
|
update_step: Tool< {
|
|
319
|
-
collectionId: string;
|
|
320
330
|
workflowId: string;
|
|
321
331
|
stepId: string;
|
|
332
|
+
collectionId: string;
|
|
322
333
|
changes: ({
|
|
323
334
|
data: string;
|
|
335
|
+
field: "url";
|
|
324
336
|
action: "add" | "remove" | "update";
|
|
325
337
|
approved: boolean;
|
|
326
|
-
field: "url";
|
|
327
338
|
id?: string | undefined;
|
|
328
339
|
} | {
|
|
329
340
|
data: string;
|
|
341
|
+
field: "description";
|
|
330
342
|
action: "add" | "remove" | "update";
|
|
331
343
|
approved: boolean;
|
|
332
|
-
field: "description";
|
|
333
344
|
id?: string | undefined;
|
|
334
345
|
} | {
|
|
335
346
|
data: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
347
|
+
field: "method";
|
|
336
348
|
action: "add" | "remove" | "update";
|
|
337
349
|
approved: boolean;
|
|
338
|
-
field: "method";
|
|
339
350
|
id?: string | undefined;
|
|
340
351
|
} | {
|
|
352
|
+
field: "parameters";
|
|
341
353
|
action: "add" | "remove" | "update";
|
|
342
354
|
approved: boolean;
|
|
343
|
-
field: "parameters";
|
|
344
355
|
data?: {
|
|
345
356
|
name: string;
|
|
346
357
|
in: "header" | "path" | "query" | "cookie";
|
|
@@ -348,21 +359,21 @@ declare const definitions: {
|
|
|
348
359
|
} | undefined;
|
|
349
360
|
id?: string | undefined;
|
|
350
361
|
} | {
|
|
362
|
+
field: "outputs";
|
|
351
363
|
action: "add" | "remove" | "update";
|
|
352
364
|
approved: boolean;
|
|
353
|
-
field: "outputs";
|
|
354
365
|
data?: {
|
|
355
366
|
name: string;
|
|
356
367
|
expression: string;
|
|
357
368
|
} | undefined;
|
|
358
369
|
id?: string | undefined;
|
|
359
370
|
} | {
|
|
371
|
+
field: "successCriteria";
|
|
360
372
|
action: "add" | "remove" | "update";
|
|
361
373
|
approved: boolean;
|
|
362
|
-
field: "successCriteria";
|
|
363
374
|
data?: {
|
|
364
375
|
condition: string;
|
|
365
|
-
type?: "
|
|
376
|
+
type?: "regex" | "simple" | "jsonpath" | "xpath" | undefined;
|
|
366
377
|
context?: string | undefined;
|
|
367
378
|
} | undefined;
|
|
368
379
|
id?: string | undefined;
|
|
@@ -371,9 +382,9 @@ declare const definitions: {
|
|
|
371
382
|
content: string;
|
|
372
383
|
contentType?: string | undefined;
|
|
373
384
|
};
|
|
385
|
+
field: "body";
|
|
374
386
|
action: "add" | "remove" | "update";
|
|
375
387
|
approved: boolean;
|
|
376
|
-
field: "body";
|
|
377
388
|
id?: string | undefined;
|
|
378
389
|
})[];
|
|
379
390
|
}, {
|
|
@@ -407,12 +418,12 @@ declare const definitions: {
|
|
|
407
418
|
collectionId: string;
|
|
408
419
|
action: "create_workflow";
|
|
409
420
|
} | {
|
|
410
|
-
collectionId: string;
|
|
411
421
|
workflowId: string;
|
|
422
|
+
collectionId: string;
|
|
412
423
|
action: "delete_workflow";
|
|
413
424
|
} | {
|
|
414
|
-
collectionId: string;
|
|
415
425
|
workflowId: string;
|
|
426
|
+
collectionId: string;
|
|
416
427
|
action: "create_step";
|
|
417
428
|
body?: {
|
|
418
429
|
content: string;
|
|
@@ -430,10 +441,9 @@ declare const definitions: {
|
|
|
430
441
|
}[] | undefined;
|
|
431
442
|
successCriteria?: {
|
|
432
443
|
condition: string;
|
|
433
|
-
type?: "
|
|
444
|
+
type?: "regex" | "simple" | "jsonpath" | "xpath" | undefined;
|
|
434
445
|
context?: string | undefined;
|
|
435
446
|
}[] | undefined;
|
|
436
|
-
stepName?: string | undefined;
|
|
437
447
|
operation?: {
|
|
438
448
|
path: string;
|
|
439
449
|
method: string;
|
|
@@ -444,10 +454,11 @@ declare const definitions: {
|
|
|
444
454
|
url: string;
|
|
445
455
|
method: string;
|
|
446
456
|
} | undefined;
|
|
457
|
+
stepName?: string | undefined;
|
|
447
458
|
} | {
|
|
448
|
-
collectionId: string;
|
|
449
459
|
workflowId: string;
|
|
450
460
|
stepId: string;
|
|
461
|
+
collectionId: string;
|
|
451
462
|
action: "delete_step";
|
|
452
463
|
} | {
|
|
453
464
|
action: "save_tab_to_collection";
|
|
@@ -465,9 +476,9 @@ declare const definitions: {
|
|
|
465
476
|
} | {
|
|
466
477
|
data: {
|
|
467
478
|
summary: string;
|
|
468
|
-
collectionId?: string | undefined;
|
|
469
479
|
workflowId?: string | undefined;
|
|
470
480
|
stepId?: string | undefined;
|
|
481
|
+
collectionId?: string | undefined;
|
|
471
482
|
};
|
|
472
483
|
isError: false;
|
|
473
484
|
error?: undefined;
|
|
@@ -481,6 +492,9 @@ declare const definitions: {
|
|
|
481
492
|
action: "get_inputs";
|
|
482
493
|
environment?: string | undefined;
|
|
483
494
|
} | {
|
|
495
|
+
action: "get_servers";
|
|
496
|
+
environment?: string | undefined;
|
|
497
|
+
} | {
|
|
484
498
|
action: "get_input";
|
|
485
499
|
inputName: string;
|
|
486
500
|
environment?: string | undefined;
|
|
@@ -496,16 +510,33 @@ declare const definitions: {
|
|
|
496
510
|
environment?: string | undefined;
|
|
497
511
|
} | {
|
|
498
512
|
value: string;
|
|
499
|
-
action: "upsert_server";
|
|
500
513
|
apiId: string;
|
|
514
|
+
action: "upsert_server";
|
|
501
515
|
environment?: string | undefined;
|
|
502
516
|
variables?: {
|
|
503
517
|
name: string;
|
|
504
518
|
value: string;
|
|
505
519
|
}[] | undefined;
|
|
506
520
|
} | {
|
|
507
|
-
|
|
521
|
+
environment: string;
|
|
522
|
+
action: "add_environment";
|
|
523
|
+
inputs?: {
|
|
524
|
+
name: string;
|
|
525
|
+
value: string;
|
|
526
|
+
isSecret?: boolean | undefined;
|
|
527
|
+
}[] | undefined;
|
|
528
|
+
servers?: {
|
|
529
|
+
value: string;
|
|
508
530
|
apiId: string;
|
|
531
|
+
variables?: {
|
|
532
|
+
name: string;
|
|
533
|
+
value: string;
|
|
534
|
+
}[] | undefined;
|
|
535
|
+
}[] | undefined;
|
|
536
|
+
setActive?: boolean | undefined;
|
|
537
|
+
} | {
|
|
538
|
+
apiId: string;
|
|
539
|
+
action: "remove_server";
|
|
509
540
|
environment?: string | undefined;
|
|
510
541
|
} | {
|
|
511
542
|
environment: string;
|
|
@@ -527,12 +558,20 @@ declare const definitions: {
|
|
|
527
558
|
isSecret: boolean;
|
|
528
559
|
} | undefined;
|
|
529
560
|
environment?: string | undefined;
|
|
561
|
+
apiId?: string | undefined;
|
|
530
562
|
inputs?: {
|
|
531
563
|
name: string;
|
|
532
564
|
value: string;
|
|
533
565
|
isSecret: boolean;
|
|
534
566
|
}[] | undefined;
|
|
535
|
-
|
|
567
|
+
servers?: {
|
|
568
|
+
value: string;
|
|
569
|
+
apiId: string;
|
|
570
|
+
variables: {
|
|
571
|
+
name: string;
|
|
572
|
+
value: string;
|
|
573
|
+
}[];
|
|
574
|
+
}[] | undefined;
|
|
536
575
|
environmentNames?: string[] | undefined;
|
|
537
576
|
};
|
|
538
577
|
isError: false;
|
package/dist/replay.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { w as s, x as t, E as
|
|
2
|
-
import { O, h as
|
|
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-BaSiOcII.js";
|
|
2
|
+
import { O, h as x } from "./replay-oauth2-redirect-handler-CqKZB3aV.js";
|
|
3
3
|
export {
|
|
4
4
|
s as AgentLoop,
|
|
5
5
|
t as AiPanelContext,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
r as EmbeddedReplay,
|
|
7
|
+
l as Modal,
|
|
8
8
|
O as OAuth2Error,
|
|
9
9
|
o as Replay,
|
|
10
10
|
p as ReplayOverlay,
|
|
11
11
|
y as SpanStatusCode,
|
|
12
12
|
m as TelemetryClient,
|
|
13
13
|
n as applyThemeToDOM,
|
|
14
|
-
d as
|
|
15
|
-
|
|
14
|
+
d as createResource,
|
|
15
|
+
u as getCurrentTheme,
|
|
16
|
+
x as handleOAuth2Redirect,
|
|
16
17
|
T as resolveTheme,
|
|
17
18
|
h as useAiPanel,
|
|
18
19
|
i as useTelemetry,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
A as useTelemetryClient,
|
|
21
|
+
C as validateApiKey
|
|
21
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/replay",
|
|
3
|
-
"version": "0.24.0-next.
|
|
3
|
+
"version": "0.24.0-next.5",
|
|
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.65.0-next.
|
|
23
|
+
"@redocly/theme": "0.65.0-next.5"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@ai-sdk/anthropic": "3.0.1",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"ai": "6.0.111",
|
|
63
63
|
"dayjs": "^1.11.7",
|
|
64
64
|
"drizzle-orm": "^0.45.0",
|
|
65
|
-
"fast-xml-parser": "5.7.
|
|
65
|
+
"fast-xml-parser": "5.7.3",
|
|
66
66
|
"idb": "^8.0.2",
|
|
67
67
|
"js-yaml": "4.1.1",
|
|
68
68
|
"json-pointer": "^0.6.2",
|