@redocly/replay 0.27.0-next.1 → 0.27.0-next.2
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-bPRpajHW.js → replay-index-B77jPAnD.js} +10 -10
- package/dist/{replay-index-Do1DM5K8.js → replay-index-CCy5XeI8.js} +9 -9
- package/dist/{replay-index-BuZ6mgzl.js → replay-index-CONdGsdb.js} +1 -1
- package/dist/{replay-index-CDeXY19w.js → replay-index-DPExJ2sC.js} +1 -1
- package/dist/{replay-index-BvZ2ybMG.js → replay-index-DcXUEZL6.js} +1 -1
- package/dist/{replay-index-pa2eIJu5.js → replay-index-DdzJ9I8C.js} +1 -1
- package/dist/{replay-lint-graphql-B57aMCHu.js → replay-lint-graphql-Brp19AEw.js} +1 -1
- package/dist/{replay-lint-graphql-Y42bxbeN.js → replay-lint-graphql-Ddq5ITmY.js} +1 -1
- package/dist/{replay-respect-run-b5xZwU_g.js → replay-respect-run-CpIhHBaj.js} +1 -1
- package/dist/{replay-respect-run-CrnMaVJe.js → replay-respect-run-DlcK3pCq.js} +1 -1
- package/dist/{replay-tauri-path-JT7o3Q5h.js → replay-tauri-path-B0zja3Cg.js} +1 -1
- package/dist/{replay-tauri-path-COoO22km.js → replay-tauri-path-BJH6lnH8.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/package.json +2 -2
|
@@ -37787,7 +37787,7 @@ async function ufn(t) {
|
|
|
37787
37787
|
async function S9e(t) {
|
|
37788
37788
|
const { document: e, customTypes: n, externalRefResolver: r, config: i } = t;
|
|
37789
37789
|
if (Lz(e.source.absoluteRef)) {
|
|
37790
|
-
const { lintGraphqlDocument: f } = await import("./replay-lint-graphql-
|
|
37790
|
+
const { lintGraphqlDocument: f } = await import("./replay-lint-graphql-Brp19AEw.js");
|
|
37791
37791
|
return f({ document: e, config: i });
|
|
37792
37792
|
}
|
|
37793
37793
|
const o = B$(e.parsed), s = i.getRulesForSpecVersion(Qle(o)), a = K5(i.extendTypes(n ?? dz(o), o), i), l = {
|
|
@@ -42877,7 +42877,7 @@ const Ede = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
42877
42877
|
class cr {
|
|
42878
42878
|
static utils = null;
|
|
42879
42879
|
static async getUtils() {
|
|
42880
|
-
return cr.utils || (cr.utils = lr() ? await import("./replay-tauri-path-
|
|
42880
|
+
return cr.utils || (cr.utils = lr() ? await import("./replay-tauri-path-BJH6lnH8.js") : await Promise.resolve().then(() => f$e)), cr.utils;
|
|
42881
42881
|
}
|
|
42882
42882
|
static async dirname(e) {
|
|
42883
42883
|
return (await cr.getUtils()).dirname(e);
|
|
@@ -88100,7 +88100,7 @@ const iA = pi({});
|
|
|
88100
88100
|
function ko() {
|
|
88101
88101
|
return fr(iA) || {};
|
|
88102
88102
|
}
|
|
88103
|
-
const Yq = process.env.NODE_ENV === "development", KH = process.env.NODE_ENV === "production", Pht = "0.27.0-next.
|
|
88103
|
+
const Yq = process.env.NODE_ENV === "development", KH = process.env.NODE_ENV === "production", Pht = "0.27.0-next.2", $ht = {
|
|
88104
88104
|
version: Pht
|
|
88105
88105
|
}, Eht = {
|
|
88106
88106
|
organizationId: "",
|
|
@@ -89576,7 +89576,7 @@ async function rvt({
|
|
|
89576
89576
|
}, { clientCert: c, clientKey: u } = l, d = lr(), p = o || "response";
|
|
89577
89577
|
let f = null;
|
|
89578
89578
|
if (d) {
|
|
89579
|
-
const { open: x } = await import("./replay-index-
|
|
89579
|
+
const { open: x } = await import("./replay-index-DcXUEZL6.js"), _ = await x({ directory: !0, multiple: !1 });
|
|
89580
89580
|
if (!_)
|
|
89581
89581
|
return;
|
|
89582
89582
|
const T = Array.isArray(_) ? _[0] : _;
|
|
@@ -158403,7 +158403,7 @@ function e8t({
|
|
|
158403
158403
|
}, i = async () => {
|
|
158404
158404
|
if (lr())
|
|
158405
158405
|
try {
|
|
158406
|
-
const { open: a } = await import("./replay-index-
|
|
158406
|
+
const { open: a } = await import("./replay-index-DcXUEZL6.js"), l = await a({
|
|
158407
158407
|
multiple: !0
|
|
158408
158408
|
});
|
|
158409
158409
|
if (!l)
|
|
@@ -158803,7 +158803,7 @@ const S8t = ({ data: t }) => {
|
|
|
158803
158803
|
}, s = async () => {
|
|
158804
158804
|
if (lr())
|
|
158805
158805
|
try {
|
|
158806
|
-
const { open: l } = await import("./replay-index-
|
|
158806
|
+
const { open: l } = await import("./replay-index-DcXUEZL6.js"), c = await l();
|
|
158807
158807
|
if (!c)
|
|
158808
158808
|
return;
|
|
158809
158809
|
const u = await cx(c);
|
|
@@ -159361,7 +159361,7 @@ function cXt(t) {
|
|
|
159361
159361
|
async function w5(t, e, n) {
|
|
159362
159362
|
const r = typeof t == "string" ? t : t.toString();
|
|
159363
159363
|
if (lr()) {
|
|
159364
|
-
const { openUrl: i } = await import("./replay-index-
|
|
159364
|
+
const { openUrl: i } = await import("./replay-index-CONdGsdb.js");
|
|
159365
159365
|
await i(r);
|
|
159366
159366
|
return;
|
|
159367
159367
|
}
|
|
@@ -162570,7 +162570,7 @@ function MGt({
|
|
|
162570
162570
|
project: { userFilesDir: n }
|
|
162571
162571
|
} = pn(), { certificates: r } = Es(), i = Sr(), { getCollection: o } = Zp(), s = o(t), a = n.get(), { inputs: l, servers: c } = i.get(), u = s?.sourceDescriptions.get() ?? [];
|
|
162572
162572
|
return { execute: async (p) => {
|
|
162573
|
-
const f = `${a}/${t}`, h = new _ye(), m = l.map((w) => JSON.stringify({ [w.name]: w.value })), g = DGt(c, u), { run: v } = await import("./replay-respect-run-
|
|
162573
|
+
const f = `${a}/${t}`, h = new _ye(), m = l.map((w) => JSON.stringify({ [w.name]: w.value })), g = DGt(c, u), { run: v } = await import("./replay-respect-run-CpIhHBaj.js"), y = await v({
|
|
162574
162574
|
files: [f],
|
|
162575
162575
|
workflow: e ? [e] : [],
|
|
162576
162576
|
fetch: (w, O) => {
|
|
@@ -169446,7 +169446,7 @@ const Gtn = $.div`
|
|
|
169446
169446
|
`;
|
|
169447
169447
|
async function xF(t, e, n) {
|
|
169448
169448
|
try {
|
|
169449
|
-
const { join: r, dirname: i } = await Promise.resolve().then(() => Ede), { exists: o } = await Promise.resolve().then(() => bE), { revealItemInDir: s, openPath: a } = await import("./replay-index-
|
|
169449
|
+
const { join: r, dirname: i } = await Promise.resolve().then(() => Ede), { exists: o } = await Promise.resolve().then(() => bE), { revealItemInDir: s, openPath: a } = await import("./replay-index-CONdGsdb.js"), l = await r(t, e);
|
|
169450
169450
|
if (n || !await o(l)) {
|
|
169451
169451
|
const c = await i(l);
|
|
169452
169452
|
await a(c);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-B77jPAnD.js");async function t(e,n){await i.invoke("plugin:opener|open_url",{url:e,with:n})}async function o(e,n){await i.invoke("plugin:opener|open_path",{path:e,with:n})}async function r(e){const n=typeof e=="string"?[e]:e;return i.invoke("plugin:opener|reveal_item_in_dir",{paths:n})}exports.openPath=o;exports.openUrl=t;exports.revealItemInDir=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-B77jPAnD.js");async function a(t={}){return typeof t=="object"&&Object.freeze(t),await i.invoke("plugin:dialog|open",{options:t})}async function o(t={}){return typeof t=="object"&&Object.freeze(t),await i.invoke("plugin:dialog|save",{options:t})}async function l(t,n){const e=typeof n=="string"?{title:n}:n;await i.invoke("plugin:dialog|message",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()})}async function r(t,n){const e=typeof n=="string"?{title:n}:n;return await i.invoke("plugin:dialog|ask",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()??"Yes",cancelButtonLabel:e?.cancelLabel?.toString()??"No"})}async function c(t,n){const e=typeof n=="string"?{title:n}:n;return await i.invoke("plugin:dialog|confirm",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()??"Ok",cancelButtonLabel:e?.cancelLabel?.toString()??"Cancel"})}exports.ask=r;exports.confirm=c;exports.message=l;exports.open=a;exports.save=o;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as R, T as L, N as k, O as g, P as B, Q as M, R as A, S as U, U as V, V as a, W as T, X as K, Y as G, Z as v, _ as $, $ as Y, a0 as j } from "./replay-index-
|
|
1
|
+
import { M as R, T as L, N as k, O as g, P as B, Q as M, R as A, S as U, U as V, V as a, W as T, X as K, Y as G, Z as v, _ as $, $ as Y, a0 as j } from "./replay-index-CCy5XeI8.js";
|
|
2
2
|
function u(n, t, e) {
|
|
3
3
|
return new R(`Syntax Error: ${e}`, {
|
|
4
4
|
source: n,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./replay-index-B77jPAnD.js");function u(i,t,e){return new a.GraphQLError(`Syntax Error: ${e}`,{source:i,positions:[t]})}var r;(function(i){i.SOF="<SOF>",i.EOF="<EOF>",i.BANG="!",i.DOLLAR="$",i.AMP="&",i.PAREN_L="(",i.PAREN_R=")",i.DOT=".",i.SPREAD="...",i.COLON=":",i.EQUALS="=",i.AT="@",i.BRACKET_L="[",i.BRACKET_R="]",i.BRACE_L="{",i.PIPE="|",i.BRACE_R="}",i.NAME="Name",i.INT="Int",i.FLOAT="Float",i.STRING="String",i.BLOCK_STRING="BlockString",i.COMMENT="Comment"})(r||(r={}));class R{constructor(t){const e=new a.Token(r.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==r.EOF)do if(t.next)t=t.next;else{const e=S(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===r.COMMENT);return t}}function g(i){return i===r.BANG||i===r.DOLLAR||i===r.AMP||i===r.PAREN_L||i===r.PAREN_R||i===r.DOT||i===r.SPREAD||i===r.COLON||i===r.EQUALS||i===r.AT||i===r.BRACKET_L||i===r.BRACKET_R||i===r.BRACE_L||i===r.PIPE||i===r.BRACE_R}function E(i){return i>=0&&i<=55295||i>=57344&&i<=1114111}function N(i,t){return O(i.charCodeAt(t))&&v(i.charCodeAt(t+1))}function O(i){return i>=55296&&i<=56319}function v(i){return i>=56320&&i<=57343}function x(i,t){const e=i.source.body.codePointAt(t);if(e===void 0)return r.EOF;if(e>=32&&e<=126){const s=String.fromCodePoint(e);return s==='"'?`'"'`:`"${s}"`}return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function h(i,t,e,s,n){const o=i.line,c=1+e-i.lineStart;return new a.Token(t,e,s,o,c,n)}function S(i,t){const e=i.source.body,s=e.length;let n=t;for(;n<s;){const o=e.charCodeAt(n);switch(o){case 65279:case 9:case 32:case 44:++n;continue;case 10:++n,++i.line,i.lineStart=n;continue;case 13:e.charCodeAt(n+1)===10?n+=2:++n,++i.line,i.lineStart=n;continue;case 35:return w(i,n);case 33:return h(i,r.BANG,n,n+1);case 36:return h(i,r.DOLLAR,n,n+1);case 38:return h(i,r.AMP,n,n+1);case 40:return h(i,r.PAREN_L,n,n+1);case 41:return h(i,r.PAREN_R,n,n+1);case 46:if(e.charCodeAt(n+1)===46&&e.charCodeAt(n+2)===46)return h(i,r.SPREAD,n,n+3);break;case 58:return h(i,r.COLON,n,n+1);case 61:return h(i,r.EQUALS,n,n+1);case 64:return h(i,r.AT,n,n+1);case 91:return h(i,r.BRACKET_L,n,n+1);case 93:return h(i,r.BRACKET_R,n,n+1);case 123:return h(i,r.BRACE_L,n,n+1);case 124:return h(i,r.PIPE,n,n+1);case 125:return h(i,r.BRACE_R,n,n+1);case 34:return e.charCodeAt(n+1)===34&&e.charCodeAt(n+2)===34?M(i,n):K(i,n)}if(a.isDigit(o)||o===45)return b(i,n,o);if(a.isNameStart(o))return U(i,n);throw u(i.source,n,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:E(o)||N(e,n)?`Unexpected character: ${x(i,n)}.`:`Invalid character: ${x(i,n)}.`)}return h(i,r.EOF,s,s)}function w(i,t){const e=i.source.body,s=e.length;let n=t+1;for(;n<s;){const o=e.charCodeAt(n);if(o===10||o===13)break;if(E(o))++n;else if(N(e,n))n+=2;else break}return h(i,r.COMMENT,t,n,e.slice(t+1,n))}function b(i,t,e){const s=i.source.body;let n=t,o=e,c=!1;if(o===45&&(o=s.charCodeAt(++n)),o===48){if(o=s.charCodeAt(++n),a.isDigit(o))throw u(i.source,n,`Invalid number, unexpected digit after 0: ${x(i,n)}.`)}else n=k(i,n,o),o=s.charCodeAt(n);if(o===46&&(c=!0,o=s.charCodeAt(++n),n=k(i,n,o),o=s.charCodeAt(n)),(o===69||o===101)&&(c=!0,o=s.charCodeAt(++n),(o===43||o===45)&&(o=s.charCodeAt(++n)),n=k(i,n,o),o=s.charCodeAt(n)),o===46||a.isNameStart(o))throw u(i.source,n,`Invalid number, expected digit but got: ${x(i,n)}.`);return h(i,c?r.FLOAT:r.INT,t,n,s.slice(t,n))}function k(i,t,e){if(!a.isDigit(e))throw u(i.source,t,`Invalid number, expected digit but got: ${x(i,t)}.`);const s=i.source.body;let n=t+1;for(;a.isDigit(s.charCodeAt(n));)++n;return n}function K(i,t){const e=i.source.body,s=e.length;let n=t+1,o=n,c="";for(;n<s;){const p=e.charCodeAt(n);if(p===34)return c+=e.slice(o,n),h(i,r.STRING,t,n+1,c);if(p===92){c+=e.slice(o,n);const d=e.charCodeAt(n+1)===117?e.charCodeAt(n+2)===123?P(i,n):F(i,n):B(i,n);c+=d.value,n+=d.size,o=n;continue}if(p===10||p===13)break;if(E(p))++n;else if(N(e,n))n+=2;else throw u(i.source,n,`Invalid character within String: ${x(i,n)}.`)}throw u(i.source,n,"Unterminated string.")}function P(i,t){const e=i.source.body;let s=0,n=3;for(;n<12;){const o=e.charCodeAt(t+n++);if(o===125){if(n<5||!E(s))break;return{value:String.fromCodePoint(s),size:n}}if(s=s<<4|m(o),s<0)break}throw u(i.source,t,`Invalid Unicode escape sequence: "${e.slice(t,t+n)}".`)}function F(i,t){const e=i.source.body,s=y(e,t+2);if(E(s))return{value:String.fromCodePoint(s),size:6};if(O(s)&&e.charCodeAt(t+6)===92&&e.charCodeAt(t+7)===117){const n=y(e,t+8);if(v(n))return{value:String.fromCodePoint(s,n),size:12}}throw u(i.source,t,`Invalid Unicode escape sequence: "${e.slice(t,t+6)}".`)}function y(i,t){return m(i.charCodeAt(t))<<12|m(i.charCodeAt(t+1))<<8|m(i.charCodeAt(t+2))<<4|m(i.charCodeAt(t+3))}function m(i){return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:-1}function B(i,t){const e=i.source.body;switch(e.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
|
|
2
2
|
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw u(i.source,t,`Invalid character escape sequence: "${e.slice(t,t+2)}".`)}function M(i,t){const e=i.source.body,s=e.length;let n=i.lineStart,o=t+3,c=o,p="";const d=[];for(;o<s;){const f=e.charCodeAt(o);if(f===34&&e.charCodeAt(o+1)===34&&e.charCodeAt(o+2)===34){p+=e.slice(c,o),d.push(p);const l=h(i,r.BLOCK_STRING,t,o+3,a.dedentBlockStringLines(d).join(`
|
|
3
3
|
`));return i.line+=d.length-1,i.lineStart=n,l}if(f===92&&e.charCodeAt(o+1)===34&&e.charCodeAt(o+2)===34&&e.charCodeAt(o+3)===34){p+=e.slice(c,o),c=o+1,o+=4;continue}if(f===10||f===13){p+=e.slice(c,o),d.push(p),f===13&&e.charCodeAt(o+1)===10?o+=2:++o,p="",c=o,n=o;continue}if(E(f))++o;else if(N(e,o))o+=2;else throw u(i.source,o,`Invalid character within String: ${x(i,o)}.`)}throw u(i.source,o,"Unterminated string.")}function U(i,t){const e=i.source.body,s=e.length;let n=t+1;for(;n<s;){const o=e.charCodeAt(n);if(a.isNameContinue(o))++n;else break}return h(i,r.NAME,t,n,e.slice(t,n))}class _{constructor(t,e="GraphQL request",s={line:1,column:1}){typeof t=="string"||a.devAssert(!1,`Body must be a string. Received: ${a.inspect(t)}.`),this.body=t,this.name=e,this.locationOffset=s,this.locationOffset.line>0||a.devAssert(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||a.devAssert(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function V(i){return a.instanceOf(i,_)}function G(i,t){const e=new $(i,t),s=e.parseDocument();return Object.defineProperty(s,"tokenCount",{enumerable:!1,value:e.tokenCount}),s}class ${constructor(t,e={}){const{lexer:s,...n}=e;if(s)this._lexer=s;else{const o=V(t)?t:new _(t);this._lexer=new R(o)}this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(r.NAME);return this.node(t,{kind:a.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:a.Kind.DOCUMENT,definitions:this.many(r.SOF,this.parseDefinition,r.EOF)})}parseDefinition(){if(this.peek(r.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),e=t?this._lexer.lookahead():this._lexer.token;if(t&&e.kind===r.BRACE_L)throw u(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(e.kind===r.NAME){switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw u(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(e.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(e)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(r.BRACE_L))return this.node(t,{kind:a.Kind.OPERATION_DEFINITION,operation:a.OperationTypeNode.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const e=this.parseDescription(),s=this.parseOperationType();let n;return this.peek(r.NAME)&&(n=this.parseName()),this.node(t,{kind:a.Kind.OPERATION_DEFINITION,operation:s,description:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(r.NAME);switch(t.value){case"query":return a.OperationTypeNode.QUERY;case"mutation":return a.OperationTypeNode.MUTATION;case"subscription":return a.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(r.PAREN_L,this.parseVariableDefinition,r.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:a.Kind.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(r.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(r.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(r.DOLLAR),this.node(t,{kind:a.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:a.Kind.SELECTION_SET,selections:this.many(r.BRACE_L,this.parseSelection,r.BRACE_R)})}parseSelection(){return this.peek(r.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,e=this.parseName();let s,n;return this.expectOptionalToken(r.COLON)?(s=e,n=this.parseName()):n=e,this.node(t,{kind:a.Kind.FIELD,alias:s,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(r.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(r.PAREN_L,e,r.PAREN_R)}parseArgument(t=!1){const e=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(e,{kind:a.Kind.ARGUMENT,name:s,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(r.SPREAD);const e=this.expectOptionalKeyword("on");return!e&&this.peek(r.NAME)?this.node(t,{kind:a.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:a.Kind.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token,e=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:a.Kind.FRAGMENT_DEFINITION,description:e,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:a.Kind.FRAGMENT_DEFINITION,description:e,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const e=this._lexer.token;switch(e.kind){case r.BRACKET_L:return this.parseList(t);case r.BRACE_L:return this.parseObject(t);case r.INT:return this.advanceLexer(),this.node(e,{kind:a.Kind.INT,value:e.value});case r.FLOAT:return this.advanceLexer(),this.node(e,{kind:a.Kind.FLOAT,value:e.value});case r.STRING:case r.BLOCK_STRING:return this.parseStringLiteral();case r.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:a.Kind.BOOLEAN,value:!0});case"false":return this.node(e,{kind:a.Kind.BOOLEAN,value:!1});case"null":return this.node(e,{kind:a.Kind.NULL});default:return this.node(e,{kind:a.Kind.ENUM,value:e.value})}case r.DOLLAR:if(t)if(this.expectToken(r.DOLLAR),this._lexer.token.kind===r.NAME){const s=this._lexer.token.value;throw u(this._lexer.source,e.start,`Unexpected variable "$${s}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:a.Kind.STRING,value:t.value,block:t.kind===r.BLOCK_STRING})}parseList(t){const e=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:a.Kind.LIST,values:this.any(r.BRACKET_L,e,r.BRACKET_R)})}parseObject(t){const e=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:a.Kind.OBJECT,fields:this.any(r.BRACE_L,e,r.BRACE_R)})}parseObjectField(t){const e=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(e,{kind:a.Kind.OBJECT_FIELD,name:s,value:this.parseValueLiteral(t)})}parseDirectives(t){const e=[];for(;this.peek(r.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const e=this._lexer.token;return this.expectToken(r.AT),this.node(e,{kind:a.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let e;if(this.expectOptionalToken(r.BRACKET_L)){const s=this.parseTypeReference();this.expectToken(r.BRACKET_R),e=this.node(t,{kind:a.Kind.LIST_TYPE,type:s})}else e=this.parseNamedType();return this.expectOptionalToken(r.BANG)?this.node(t,{kind:a.Kind.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:a.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(r.STRING)||this.peek(r.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("schema");const s=this.parseConstDirectives(),n=this.many(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);return this.node(t,{kind:a.Kind.SCHEMA_DEFINITION,description:e,directives:s,operationTypes:n})}parseOperationTypeDefinition(){const t=this._lexer.token,e=this.parseOperationType();this.expectToken(r.COLON);const s=this.parseNamedType();return this.node(t,{kind:a.Kind.OPERATION_TYPE_DEFINITION,operation:e,type:s})}parseScalarTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("scalar");const s=this.parseName(),n=this.parseConstDirectives();return this.node(t,{kind:a.Kind.SCALAR_TYPE_DEFINITION,description:e,name:s,directives:n})}parseObjectTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("type");const s=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),c=this.parseFieldsDefinition();return this.node(t,{kind:a.Kind.OBJECT_TYPE_DEFINITION,description:e,name:s,interfaces:n,directives:o,fields:c})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(r.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseFieldDefinition,r.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,e=this.parseDescription(),s=this.parseName(),n=this.parseArgumentDefs();this.expectToken(r.COLON);const o=this.parseTypeReference(),c=this.parseConstDirectives();return this.node(t,{kind:a.Kind.FIELD_DEFINITION,description:e,name:s,arguments:n,type:o,directives:c})}parseArgumentDefs(){return this.optionalMany(r.PAREN_L,this.parseInputValueDef,r.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,e=this.parseDescription(),s=this.parseName();this.expectToken(r.COLON);const n=this.parseTypeReference();let o;this.expectOptionalToken(r.EQUALS)&&(o=this.parseConstValueLiteral());const c=this.parseConstDirectives();return this.node(t,{kind:a.Kind.INPUT_VALUE_DEFINITION,description:e,name:s,type:n,defaultValue:o,directives:c})}parseInterfaceTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("interface");const s=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),c=this.parseFieldsDefinition();return this.node(t,{kind:a.Kind.INTERFACE_TYPE_DEFINITION,description:e,name:s,interfaces:n,directives:o,fields:c})}parseUnionTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("union");const s=this.parseName(),n=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:a.Kind.UNION_TYPE_DEFINITION,description:e,name:s,directives:n,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(r.EQUALS)?this.delimitedMany(r.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("enum");const s=this.parseName(),n=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:a.Kind.ENUM_TYPE_DEFINITION,description:e,name:s,directives:n,values:o})}parseEnumValuesDefinition(){return this.optionalMany(r.BRACE_L,this.parseEnumValueDefinition,r.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,e=this.parseDescription(),s=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(t,{kind:a.Kind.ENUM_VALUE_DEFINITION,description:e,name:s,directives:n})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw u(this._lexer.source,this._lexer.token.start,`${T(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("input");const s=this.parseName(),n=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:a.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:s,directives:n,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseInputValueDef,r.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===r.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":if(this._options.experimentalDirectivesOnDirectiveDefinitions)return this.parseDirectiveDefinitionExtension();break}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const e=this.parseConstDirectives(),s=this.optionalMany(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);if(e.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.SCHEMA_EXTENSION,directives:e,operationTypes:s})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const e=this.parseName(),s=this.parseConstDirectives();if(s.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.SCALAR_TYPE_EXTENSION,name:e,directives:s})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const e=this.parseName(),s=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&n.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.OBJECT_TYPE_EXTENSION,name:e,interfaces:s,directives:n,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const e=this.parseName(),s=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&n.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.INTERFACE_TYPE_EXTENSION,name:e,interfaces:s,directives:n,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const e=this.parseName(),s=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(s.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.UNION_TYPE_EXTENSION,name:e,directives:s,types:n})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const e=this.parseName(),s=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(s.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.ENUM_TYPE_EXTENSION,name:e,directives:s,values:n})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const e=this.parseName(),s=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(s.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:s,fields:n})}parseDirectiveDefinitionExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(r.AT);const e=this.parseName(),s=this.parseConstDirectives();if(s.length===0)throw this.unexpected();return this.node(t,{kind:a.Kind.DIRECTIVE_EXTENSION,name:e,directives:s})}parseDirectiveDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(r.AT);const s=this.parseName(),n=this.parseArgumentDefs(),o=this._options.experimentalDirectivesOnDirectiveDefinitions?this.parseConstDirectives():[],c=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const p=this.parseDirectiveLocations();return this.node(t,{kind:a.Kind.DIRECTIVE_DEFINITION,description:e,name:s,arguments:n,directives:o,repeatable:c,locations:p})}parseDirectiveLocations(){return this.delimitedMany(r.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(a.DirectiveLocation,e.value))return e;throw this.unexpected(t)}parseSchemaCoordinate(){const t=this._lexer.token,e=this.expectOptionalToken(r.AT),s=this.parseName();let n;!e&&this.expectOptionalToken(r.DOT)&&(n=this.parseName());let o;return(e||n)&&this.expectOptionalToken(r.PAREN_L)&&(o=this.parseName(),this.expectToken(r.COLON),this.expectToken(r.PAREN_R)),e?o?this.node(t,{kind:a.Kind.DIRECTIVE_ARGUMENT_COORDINATE,name:s,argumentName:o}):this.node(t,{kind:a.Kind.DIRECTIVE_COORDINATE,name:s}):n?o?this.node(t,{kind:a.Kind.ARGUMENT_COORDINATE,name:s,fieldName:n,argumentName:o}):this.node(t,{kind:a.Kind.MEMBER_COORDINATE,name:s,memberName:n}):this.node(t,{kind:a.Kind.TYPE_COORDINATE,name:s})}node(t,e){return this._options.noLocation!==!0&&(e.loc=new a.Location(t,this._lexer.lastToken,this._lexer.source)),e}peek(t){return this._lexer.token.kind===t}expectToken(t){const e=this._lexer.token;if(e.kind===t)return this.advanceLexer(),e;throw u(this._lexer.source,e.start,`Expected ${C(t)}, found ${T(e)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const e=this._lexer.token;if(e.kind===r.NAME&&e.value===t)this.advanceLexer();else throw u(this._lexer.source,e.start,`Expected "${t}", found ${T(e)}.`)}expectOptionalKeyword(t){const e=this._lexer.token;return e.kind===r.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const e=t??this._lexer.token;return u(this._lexer.source,e.start,`Unexpected ${T(e)}.`)}any(t,e,s){this.expectToken(t);const n=[];for(;!this.expectOptionalToken(s);)n.push(e.call(this));return n}optionalMany(t,e,s){if(this.expectOptionalToken(t)){const n=[];do n.push(e.call(this));while(!this.expectOptionalToken(s));return n}return[]}many(t,e,s){this.expectToken(t);const n=[];do n.push(e.call(this));while(!this.expectOptionalToken(s));return n}delimitedMany(t,e){this.expectOptionalToken(t);const s=[];do s.push(e.call(this));while(this.expectOptionalToken(t));return s}advanceLexer(){const{maxTokens:t}=this._options,e=this._lexer.advance();if(e.kind!==r.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw u(this._lexer.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function T(i){const t=i.value;return C(i.kind)+(t!=null?` "${t}"`:"")}function C(i){return g(i)?`"${i}"`:i}function Y(i,t){const e={};for(const s of Object.keys(i)){const n=i[s];if(!n)continue;const o=typeof n=="function"?n:n.enter,c=typeof n=="function"?void 0:n.leave;e[s]={...o?{enter:D(o,t)}:{},...c?{leave:D(c,t)}:{}}}return e}function D(i,t){return(e,s,n,o,c)=>{i(e,j(e,t,c))}}function j(i,t,e=[]){const{ruleId:s,severity:n,message:o,source:c,config:p,problems:d}=t,f=e.filter(l=>!Array.isArray(l));return{source:c,config:p,ancestors:f,report(l){const I=l.node??i,A=l.loc??q(I),L={source:c,pointer:void 0,start:A?.start??{line:1,col:1},end:A?.end};d.push({ruleId:l.ruleId??s,severity:l.severity??n,message:o?o.replace("{{message}}",l.message):l.message,suggest:l.suggest??[],location:[L]})}}}function q(i){if(!i?.loc)return;const t=a.getLocation(i.loc.source,i.loc.start),e=a.getLocation(i.loc.source,i.loc.end);return{start:{line:t.line,col:t.column},end:{line:e.line,col:e.column}}}function Q(i){const{document:t,config:e}=i,s=t.source;if(s.body.trim()==="")return[{ruleId:"struct",severity:"error",message:"The GraphQL document is empty. Expected at least one type definition.",suggest:[],location:[{source:s,pointer:void 0,start:{line:1,col:1}}]}];let n;try{n=G(new _(s.body,s.absoluteRef))}catch(d){if(d instanceof a.GraphQLError)return[z(d,s)];throw d}const o=e.getRulesForSpecVersion("graphql")??[],c=a.initRules(o,e,"rules","graphql");return X({ast:n,source:s,config:e,rules:c}).map(d=>e.addProblemToIgnore(d))}function z(i,t){const e=i.locations?.[0];return{ruleId:"struct",severity:"error",message:i.message,suggest:[],location:[{source:t,pointer:void 0,start:e?{line:e.line,col:e.column}:{line:1,col:1}}]}}function X(i){const{ast:t,source:e,config:s,rules:n}=i,o=[],c=n.map(({ruleId:p,severity:d,message:f,visitor:l})=>Y(l,{ruleId:p,severity:d,message:f,source:e,config:s,problems:o}));return c.length>0&&a.visit(t,a.visitInParallel(c)),o}exports.lintGraphqlDocument=Q;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as E4, b as tu, c as Mu, J as s0, f as Wu, g as c0, h as pi, B as D4, k as I0, l as ou, m as f0, n as d0, o as lu, q as cu, y as qu, t as Zu, u as vi, v as x4, w as Sa, x as c4, z as d4, A as Ma, C as m4, D as F4, E as k4, F as C4, G as bi, H as Le, I as h4, K as O0, L as ja } from "./replay-index-
|
|
1
|
+
import { p as E4, b as tu, c as Mu, J as s0, f as Wu, g as c0, h as pi, B as D4, k as I0, l as ou, m as f0, n as d0, o as lu, q as cu, y as qu, t as Zu, u as vi, v as x4, w as Sa, x as c4, z as d4, A as Ma, C as m4, D as F4, E as k4, F as C4, G as bi, H as Le, I as h4, K as O0, L as ja } from "./replay-index-CCy5XeI8.js";
|
|
2
2
|
function Pa(u, a, e) {
|
|
3
3
|
return u.split(" ").map((r) => E4(r, a, e)).join(" ");
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./replay-index-bPRpajHW.js");function ma(u,a,e){return u.split(" ").map(r=>C.pluralize(r,a,e)).join(" ")}function $1(u){return C.isPlainObject(u)&&"name"in u&&"value"in u&&!("in"in u)}function be(u){return C.isPlainObject(u)&&"in"in u&&typeof u.in=="string"&&["header","query","path","cookie"].includes(u.in)}const I1=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function ri(u){return u.startsWith("$file(")&&u.endsWith(")")?u.substring(7,u.length-2):u}const Fa=async(u,a,e,r,i)=>{const n=C.pathBrowserifyExports.dirname(r),o=C.pathBrowserifyExports.resolve(n,ri(e));u.append(a,await i.options.requestFileLoader.getFileBody(o))},ni=(u,a,e,r,i,n)=>{Object.entries(e).forEach(([o,s])=>{const E=n?`${n}[${o}]`:o;typeof s=="string"&&s.startsWith("$file(")&&s.endsWith(")")?u.push(Fa(a,E,s,r,i)):Array.isArray(s)?s.forEach(l=>{typeof l=="string"&&l.startsWith("$file(")&&l.endsWith(")")?u.push(Fa(a,E,l,r,i)):a.append(E,l.toString())}):C.isPlainObject(s)?ni(u,a,s,r,i,E):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&a.append(E,s.toString())})},O1=async(u,a,e,r)=>{if(C.isPlainObject(u)){const i=[];ni(i,a,u,e,r),await Promise.all(i)}},W1=async(u,a)=>{if(typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")){const e=C.pathBrowserifyExports.resolve(C.pathBrowserifyExports.dirname(a.options.filePath),ri(u));return a.options.requestFileLoader.getFileBody(e)}else return u};async function q1(u,a){if(!u)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:e,contentType:r}=u;if(r==="multipart/form-data"){const i=new FormData,n=C.pathBrowserifyExports.resolve(a.options.filePath);return await O1(e,i,n,a),{...u,payload:i}}else{if(r==="application/octet-stream"||typeof r=="string"&&I1.test(r))return{...u,payload:await W1(e,a),contentType:"application/octet-stream"};if(r==="application/x-www-form-urlencoded"&&typeof e=="string")return{...u,payload:Object.fromEntries(new URLSearchParams(e).entries()),contentType:"application/x-www-form-urlencoded"}}return u}function Z1({payload:u,replacements:a,expressionContext:e,logger:r}){for(const i of a){const{target:n,value:o}=i;if(typeof n!="string")throw new Error(`Invalid JSON Pointer: ${n}`);try{const s=C.JsonPointerLib.get(u,n),E=C.evaluateRuntimeExpressionPayload({payload:o,context:e,logger:r});s!==void 0&&C.JsonPointerLib.set(u,n,E)}catch{throw new Error(`Invalid JSON Pointer: ${n}`)}}}const U1=["parameters","failureActions","successActions"];function Y1(u,a){const{reference:e,value:r}=u;if(!U1.some(n=>e.includes(`$components.${n}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const i=C.getValueFromContext({value:e,ctx:a,logger:a.options.logger});return C.isPlainObject(i)&&"value"in i&&r?{...i,value:r}:i}function m0(u,a){return"reference"in u?Y1(u,a):u}const nu={SUCCESS_CRITERIA_CHECK:"success criteria check",STATUS_CODE_CHECK:"status code check",SCHEMA_CHECK:"schema check",CONTENT_TYPE_CHECK:"content-type check",GLOBAL_TIMEOUT_ERROR:"global timeout error",MAX_STEPS_REACHED_ERROR:"maximum steps reached",NETWORK_ERROR:"failed network request",UNEXPECTED_ERROR:"unexpected error"};class oi extends Error{}class ti extends oi{}class si extends oi{}async function Q1(u){const{descriptionPath:a,externalRefResolver:e,base:r}=u,i=await C.bundle({base:r,ref:a,config:u.config,dereference:!0,externalRefResolver:e});if(!i)throw new Error(`Could not find source description file '${a}'.`);return i.bundle.parsed}const X1={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},ke=Symbol("skip");function D0(u){return u<10?"0"+u:u}function uo(u,a,e,r){var i=e?"":u.getUTCFullYear()+"-"+D0(u.getUTCMonth()+1)+"-"+D0(u.getUTCDate());return a||(i+="T"+D0(u.getUTCHours())+":"+D0(u.getUTCMinutes())+":"+D0(u.getUTCSeconds())+"Z"),i}function li(u,a){return a>u.length?u.repeat(Math.trunc(a/u.length)+1).substring(0,a):u}function R0(...u){const a=e=>e&&typeof e=="object";return u.reduce((e,r)=>(Object.keys(r||{}).forEach(i=>{const n=e[i],o=r[i];a(n)&&a(o)?e[i]=R0(n,o):e[i]=o}),e),Array.isArray(u[u.length-1])?[]:{})}function eo(u){var a=ro(u),e=no(a,a,a,a),r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{var n=e()*16%16|0;return(i=="x"?n:n&3|8).toString(16)});return r}function ie(u){return{value:u==="object"?{}:u==="array"?[]:void 0}}function Gu(u,a){a&&u.pop()}function ao(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 io(u){const a=u?.xml;return a?.nodeType?a.nodeType:a?.attribute===!0?"attribute":a?.wrapped===!0&&u?.type==="array"?"element":u?.$ref||u?.$dynamicRef||u?.type==="array"||u?.oneOf||u?.anyOf||u?.allOf?"none":"element"}function H0(u,a={},e={}){const{value:r}=u,{propertyName:i}=e,{name:n,prefix:o,namespace:s}=ao(a),E=io(a);let l=n||i?`${o?o+":":""}${n||i}`:null,D=typeof r=="object"?Array.isArray(r)?[...r]:{...r}:r;switch(E){case"attribute":l&&(l=`$${l}`);break;case"text":l="#text";break;case"cdata":l="#cdata";break;case"none":a.type==="array"?(l=null,a.example!==void 0&&(l=a.items?.xml?.name||l)):l=null;break;default:a.type==="array"&&Array.isArray(D)&&(D={[l]:[...D]});break}return s&&E!=="text"&&E!=="cdata"&&E!=="none"&&(typeof D=="object"?D[`$xmlns${o?":"+o:""}`]=s:D={[`$xmlns${o?":"+o:""}`]:s,"#text":D}),{propertyName:l,value:D}}function ro(u){var a=0;if(u.length==0)return a;for(var e=0;e<u.length;e++){var r=u.charCodeAt(e);a=(a<<5)-a+r,a=a&a}return a}function no(u,a,e,r){return function(){u|=0,a|=0,e|=0,r|=0;var i=u-(a<<27|a>>>5)|0;return u=a^(e<<17|e>>>15),a=e+r|0,e=r+i|0,r=u+i|0,(r>>>0)/4294967296}}function oo(u,a,e,r,i){let n=Su(u,e,r);const o=[];for(let s of a){const{type:E,readOnly:l,writeOnly:D,value:d}=Su({type:n.type,...s},e,r,{...i,isAllOfChild:!0});n.type&&E&&E!==n.type&&(console.warn("allOf: schemas with different types can't be merged"),n.type=E),n.type=n.type||E,n.readOnly=n.readOnly||l,n.writeOnly=n.writeOnly||D,d!=null&&o.push(d)}if(n.type==="object"){n.value=R0(n.value||{},...o.filter(s=>typeof s=="object"));for(const s in n.value)n.value[s]===ke&&delete n.value[s];return n}else{n.type==="array"&&(e.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 ka={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 A0(u){if(u.type!==void 0)return Array.isArray(u.type)?u.type.length===0?null:u.type[0]:u.type;const a=Object.keys(ka);for(var e=0;e<a.length;e++){let r=a[e],i=ka[r];if(u[r]!==void 0)return i}return null}let K0={},zu=[];function to(){K0={},zu=[]}function Ei(u){let a;return u.const!==void 0?a=u.const:u.examples!==void 0&&u.examples.length?a=u.examples[0]:u.enum!==void 0&&u.enum.length?a=u.enum[0]:u.default!==void 0&&(a=u.default),a}function Ca(u){const a=Ei(u);if(a!==void 0)return{value:a,readOnly:u.readOnly,writeOnly:u.writeOnly,type:null}}function Su(u,a,e,r){if(r){if(zu.includes(u))return ie(A0(u));zu.push(u)}if(r&&r.depth>a.maxSampleDepth)return Gu(zu,r),ie(A0(u));if(u.$ref){if(!e)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let s=decodeURIComponent(u.$ref);s.startsWith("#")&&(s=s.substring(1));const E=C.JsonPointerLib.get(e,s);let l;if(K0[s]!==!0){K0[s]=!0;const D=Su(E,a,e,r);if(a.format==="xml"){const d=s.split("/").pop(),F={...r,propertyName:r?.propertyName||d},{propertyName:k,value:B}=H0(D,E,F);l={...D,value:{[k||"root"]:B}}}else l=D;K0[s]=!1}else{const D=A0(E);l=ie(D)}return Gu(zu,r),l}if(u.example!==void 0)return Gu(zu,r),{value:u.example,readOnly:u.readOnly,writeOnly:u.writeOnly,type:u.type};if(u.allOf!==void 0)return Gu(zu,r),Ca(u)||oo({...u,allOf:void 0},u.allOf,a,e,r);if(u.oneOf&&u.oneOf.length){u.anyOf&&(a.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),Gu(zu,r);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.oneOf[0]);return o(u,s)}if(u.anyOf&&u.anyOf.length){Gu(zu,r);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.anyOf[0]);return o(u,s)}if(u.if&&u.then){Gu(zu,r);const{if:s,then:E,...l}=u;return Su(R0(l,s,E),a,e,r)}let i=Ei(u),n=null;if(i===void 0){i=null,n=u.type,Array.isArray(n)&&u.type.length>0&&(n=u.type[0]),n||(n=A0(u));let s=ci[n];s&&(i=s(u,a,e,r))}return Gu(zu,r),{value:i,readOnly:u.readOnly,writeOnly:u.writeOnly,type:n};function o(s,E){const l=Ca(s);if(l!==void 0)return l;const D=Su({...s,oneOf:void 0,anyOf:void 0},a,e,r),d=Su(E,a,e,r);if(typeof D.value=="object"&&typeof d.value=="object"){const F=R0(D.value,d.value);return{...d,value:F}}return d}}function so(u,a={},e,r){const i=r&&r.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=l=>Array.isArray(o)?o[l]||{}:o||{},E=[];if(!o)return E;for(let l=0;l<n;l++){let D=s(l),{value:d}=Su(D,a,e,{depth:i+1});if(a?.format==="xml"){const{value:F,propertyName:k}=H0({value:d},D,r);k?(E?.[k]||(E={...E,[k]:[]}),E[k].push(F)):E={...E,...F}}else E.push(d)}if(a?.format==="xml"&&i===1){const{value:l,propertyName:D}=H0({value:null},u,r);D&&(l?E=Array.isArray(E)?{[D]:{...l,...E.map(d=>({"#text":{...d}}))}}:{[D]:{...E,...l}}:E={[D]:E})}return E}function lo(u){return!0}function Di(u){let a=0;if(u.type==="number"&&(u.format==="float"||u.format==="double")&&(a=.1),typeof u.exclusiveMinimum=="boolean"||typeof u.exclusiveMaximum=="boolean"){if(u.maximum&&u.minimum)return a=u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum,(u.exclusiveMaximum&&a>=u.maximum||!u.exclusiveMaximum&&a>u.maximum)&&(a=(u.maximum+u.minimum)/2),a;if(u.minimum)return u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum;if(u.maximum)return u.exclusiveMaximum?u.maximum>0?0:Math.floor(u.maximum)-1:u.maximum>0?0:u.maximum}else{if(u.minimum)return u.minimum;u.exclusiveMinimum?(a=Math.floor(u.exclusiveMinimum)+1,a===u.exclusiveMaximum&&(a=(a+Math.floor(u.exclusiveMaximum)-1)/2)):u.exclusiveMaximum?a=Math.floor(u.exclusiveMaximum)-1:u.maximum&&(a=u.maximum)}return a}function Eo(u,a={},e,r){let i={};const n=r&&r.depth||1;if(u&&typeof u.properties=="object"){const o=Array.isArray(u.required)?u.required:[],s={};for(const E of o)s[E]=!0;Object.keys(u.properties).forEach(E=>{if(a.skipNonRequired&&!s.hasOwnProperty(E))return;const l=Su(u.properties[E],a,e,{propertyName:E,depth:n+1});if(a.skipReadOnly&&l.readOnly){r?.isAllOfChild&&(i[E]=ke);return}if(a.skipWriteOnly&&l.writeOnly){r?.isAllOfChild&&(i[E]=ke);return}if(a?.format==="xml"){const{propertyName:D,value:d}=H0(l,u.properties[E],{propertyName:E});D?i[D]=d:d!==null&&typeof d=="object"&&(i={...i,...d})}else i[E]=l.value})}if(u&&typeof u.additionalProperties=="object"){const o=u.additionalProperties["x-additionalPropertiesName"]||"property";i[`${String(o)}1`]=Su(u.additionalProperties,a,e,{depth:n+1}).value,i[`${String(o)}2`]=Su(u.additionalProperties,a,e,{depth:n+1}).value}if(u&&typeof u.properties=="object"&&u.maxProperties!==void 0&&Object.keys(i).length>u.maxProperties){const o={};let s=0;(Array.isArray(u.required)?u.required:[]).forEach(l=>{i[l]!==void 0&&(o[l]=i[l],s++)}),Object.keys(i).forEach(l=>{s<u.maxProperties&&!o.hasOwnProperty(l)&&(o[l]=i[l],s++)}),i=o}return i}function k0(u,a){return u}function ha(u,a,e){let r=1;if(u)switch(u){case"?":{r=0;break}case"*":{r=k0(0);break}case"+":{r=k0(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else a!=null&&e!=null?r=k0(parseInt(a)):a!=null&&e==null&&(r=parseInt(a));return r}function Do(u){let a=!1;u instanceof RegExp&&(a=u.flags.includes("i"),u=u.toString(),u=u.match(/\/(.+?)\//)?.[1]??""),u=u.replace(/^(\^)?(.*?)(\$)?$/,"$2");let e,r,i;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];i=ha(k,d,F),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(n)}const s=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,E=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(o=u.match(E);o!=null;){const d=o[1]==="^",F=o[2]==="-",k=o[4],B=o[5],y=o[6],K=[];let G=o[3],R=G.match(s);for(F&&K.push(45);R!=null;){if(R[0].indexOf("-")===-1)a&&isNaN(Number(R[0]))?(K.push(R[0].toUpperCase().charCodeAt(0)),K.push(R[0].toLowerCase().charCodeAt(0))):K.push(R[0].charCodeAt(0));else{const v=R[0].split("-").map(h=>h.charCodeAt(0));if(e=v[0],r=v[1],e>r)throw new Error("Character range provided is out of order.");for(let h=e;h<=r;h++)if(a&&isNaN(Number(String.fromCharCode(h)))){const z=String.fromCharCode(h);K.push(z.toUpperCase().charCodeAt(0)),K.push(z.toLowerCase().charCodeAt(0))}else K.push(h)}G=G.substring(R[0].length),R=G.match(s)}if(i=ha(y,k,B),d){let v=-1;for(let h=48;h<=57;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}for(let h=65;h<=90;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}for(let h=97;h<=122;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}}const V=Array.from({length:i},()=>String.fromCharCode(K[k0(0)])).join("");u=u.slice(0,o.index)+V+u.slice(o.index+o[0].length),o=u.match(E)}const l=/(.)\{(\d+)\,(\d+)\}/;for(o=u.match(l);o!=null;){if(e=parseInt(o[2]),r=parseInt(o[3]),e>r)throw new Error("Numbers out of order in {} quantifier.");i=k0(e),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(l)}const D=/(.)\{(\d+)\}/;for(o=u.match(D);o!=null;)i=parseInt(o[2]),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(D);return u}const xo="qwerty!@#$%^123456";function co(){return"user@example.com"}function mo(){return"пошта@укр.нет"}function Fo(u,a){let e="pa$$word";return u>e.length&&(e+="_",e+=li(xo,u-e.length).substring(0,u-e.length)),e}function Be({min:u,max:a,omitTime:e,omitDate:r}){let i=uo(new Date("2019-08-24T14:15:22.123Z"),e,r);return i.length<u&&console.warn(`Using minLength = ${u} is incorrect with format "date-time"`),a&&i.length>a&&console.warn(`Using maxLength = ${a} is incorrect with format "date-time"`),i}function ko(u,a){return Be({min:u,max:a,omitTime:!1,omitDate:!1})}function Co(u,a){return Be({min:u,max:a,omitTime:!0,omitDate:!1})}function ho(u,a){return Be({min:u,max:a,omitTime:!1,omitDate:!0}).slice(1)}function xi(u,a,e,r,i=!1){if(r&&i)return Do(r);let n=li("string",u);return a&&n.length>a&&(n=n.substring(0,a)),n}function go(){return"192.168.0.1"}function po(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function vo(){return"example.com"}function bo(){return"приклад.укр"}function Bo(){return"http://example.com"}function Ao(){return"../dictionary"}function yo(){return"http://example.com/{endpoint}"}function fo(){return"http://example.com/entity/1"}function zo(){return"/entity/1"}function So(u,a,e){return eo(e||"id")}function Mo(){return"/json/pointer"}function jo(){return"1/relative/json/pointer"}function Po(){return"/regex/"}const wo={email:co,"idn-email":mo,password:Fo,"date-time":ko,date:Co,time:ho,ipv4:go,ipv6:po,hostname:vo,"idn-hostname":bo,iri:fo,"iri-reference":zo,uri:Bo,"uri-reference":Ao,"uri-template":yo,uuid:So,default:xi,"json-pointer":Mo,"relative-json-pointer":jo,regex:Po};function Ko(u,a,e,r){let i=u.format||"default",n=wo[i]||xi,o=r&&r.propertyName;return n(u.minLength||0,u.maxLength,o,u.pattern,a?.enablePatterns)}var ci={};const To={skipReadOnly:!1,maxSampleDepth:15};function Lo(u,a){if(!u)throw new Error("Unknown format output for building XML.");return(Array.isArray(u)||Object.keys(u).length>1)&&(u={[a?.xml?.name||"root"]:u}),new C.Builder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(u)}function No(u,a,e){let r=Object.assign({},To,a);to();let i=Su(u,r,e).value;return r?.format==="xml"?Lo(i,u):i}function t0(u,a){ci[u]=a}t0("array",so);t0("boolean",lo);t0("integer",Di);t0("number",Di);t0("object",Eo);t0("string",Ko);function di(u,a){if(u)try{return No(u,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(e){a.error(C.bgRed(" Error while generating test data from JSON Schema ")+`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./replay-index-B77jPAnD.js");function ma(u,a,e){return u.split(" ").map(r=>C.pluralize(r,a,e)).join(" ")}function $1(u){return C.isPlainObject(u)&&"name"in u&&"value"in u&&!("in"in u)}function be(u){return C.isPlainObject(u)&&"in"in u&&typeof u.in=="string"&&["header","query","path","cookie"].includes(u.in)}const I1=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function ri(u){return u.startsWith("$file(")&&u.endsWith(")")?u.substring(7,u.length-2):u}const Fa=async(u,a,e,r,i)=>{const n=C.pathBrowserifyExports.dirname(r),o=C.pathBrowserifyExports.resolve(n,ri(e));u.append(a,await i.options.requestFileLoader.getFileBody(o))},ni=(u,a,e,r,i,n)=>{Object.entries(e).forEach(([o,s])=>{const E=n?`${n}[${o}]`:o;typeof s=="string"&&s.startsWith("$file(")&&s.endsWith(")")?u.push(Fa(a,E,s,r,i)):Array.isArray(s)?s.forEach(l=>{typeof l=="string"&&l.startsWith("$file(")&&l.endsWith(")")?u.push(Fa(a,E,l,r,i)):a.append(E,l.toString())}):C.isPlainObject(s)?ni(u,a,s,r,i,E):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&a.append(E,s.toString())})},O1=async(u,a,e,r)=>{if(C.isPlainObject(u)){const i=[];ni(i,a,u,e,r),await Promise.all(i)}},W1=async(u,a)=>{if(typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")){const e=C.pathBrowserifyExports.resolve(C.pathBrowserifyExports.dirname(a.options.filePath),ri(u));return a.options.requestFileLoader.getFileBody(e)}else return u};async function q1(u,a){if(!u)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:e,contentType:r}=u;if(r==="multipart/form-data"){const i=new FormData,n=C.pathBrowserifyExports.resolve(a.options.filePath);return await O1(e,i,n,a),{...u,payload:i}}else{if(r==="application/octet-stream"||typeof r=="string"&&I1.test(r))return{...u,payload:await W1(e,a),contentType:"application/octet-stream"};if(r==="application/x-www-form-urlencoded"&&typeof e=="string")return{...u,payload:Object.fromEntries(new URLSearchParams(e).entries()),contentType:"application/x-www-form-urlencoded"}}return u}function Z1({payload:u,replacements:a,expressionContext:e,logger:r}){for(const i of a){const{target:n,value:o}=i;if(typeof n!="string")throw new Error(`Invalid JSON Pointer: ${n}`);try{const s=C.JsonPointerLib.get(u,n),E=C.evaluateRuntimeExpressionPayload({payload:o,context:e,logger:r});s!==void 0&&C.JsonPointerLib.set(u,n,E)}catch{throw new Error(`Invalid JSON Pointer: ${n}`)}}}const U1=["parameters","failureActions","successActions"];function Y1(u,a){const{reference:e,value:r}=u;if(!U1.some(n=>e.includes(`$components.${n}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const i=C.getValueFromContext({value:e,ctx:a,logger:a.options.logger});return C.isPlainObject(i)&&"value"in i&&r?{...i,value:r}:i}function m0(u,a){return"reference"in u?Y1(u,a):u}const nu={SUCCESS_CRITERIA_CHECK:"success criteria check",STATUS_CODE_CHECK:"status code check",SCHEMA_CHECK:"schema check",CONTENT_TYPE_CHECK:"content-type check",GLOBAL_TIMEOUT_ERROR:"global timeout error",MAX_STEPS_REACHED_ERROR:"maximum steps reached",NETWORK_ERROR:"failed network request",UNEXPECTED_ERROR:"unexpected error"};class oi extends Error{}class ti extends oi{}class si extends oi{}async function Q1(u){const{descriptionPath:a,externalRefResolver:e,base:r}=u,i=await C.bundle({base:r,ref:a,config:u.config,dereference:!0,externalRefResolver:e});if(!i)throw new Error(`Could not find source description file '${a}'.`);return i.bundle.parsed}const X1={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},ke=Symbol("skip");function D0(u){return u<10?"0"+u:u}function uo(u,a,e,r){var i=e?"":u.getUTCFullYear()+"-"+D0(u.getUTCMonth()+1)+"-"+D0(u.getUTCDate());return a||(i+="T"+D0(u.getUTCHours())+":"+D0(u.getUTCMinutes())+":"+D0(u.getUTCSeconds())+"Z"),i}function li(u,a){return a>u.length?u.repeat(Math.trunc(a/u.length)+1).substring(0,a):u}function R0(...u){const a=e=>e&&typeof e=="object";return u.reduce((e,r)=>(Object.keys(r||{}).forEach(i=>{const n=e[i],o=r[i];a(n)&&a(o)?e[i]=R0(n,o):e[i]=o}),e),Array.isArray(u[u.length-1])?[]:{})}function eo(u){var a=ro(u),e=no(a,a,a,a),r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{var n=e()*16%16|0;return(i=="x"?n:n&3|8).toString(16)});return r}function ie(u){return{value:u==="object"?{}:u==="array"?[]:void 0}}function Gu(u,a){a&&u.pop()}function ao(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 io(u){const a=u?.xml;return a?.nodeType?a.nodeType:a?.attribute===!0?"attribute":a?.wrapped===!0&&u?.type==="array"?"element":u?.$ref||u?.$dynamicRef||u?.type==="array"||u?.oneOf||u?.anyOf||u?.allOf?"none":"element"}function H0(u,a={},e={}){const{value:r}=u,{propertyName:i}=e,{name:n,prefix:o,namespace:s}=ao(a),E=io(a);let l=n||i?`${o?o+":":""}${n||i}`:null,D=typeof r=="object"?Array.isArray(r)?[...r]:{...r}:r;switch(E){case"attribute":l&&(l=`$${l}`);break;case"text":l="#text";break;case"cdata":l="#cdata";break;case"none":a.type==="array"?(l=null,a.example!==void 0&&(l=a.items?.xml?.name||l)):l=null;break;default:a.type==="array"&&Array.isArray(D)&&(D={[l]:[...D]});break}return s&&E!=="text"&&E!=="cdata"&&E!=="none"&&(typeof D=="object"?D[`$xmlns${o?":"+o:""}`]=s:D={[`$xmlns${o?":"+o:""}`]:s,"#text":D}),{propertyName:l,value:D}}function ro(u){var a=0;if(u.length==0)return a;for(var e=0;e<u.length;e++){var r=u.charCodeAt(e);a=(a<<5)-a+r,a=a&a}return a}function no(u,a,e,r){return function(){u|=0,a|=0,e|=0,r|=0;var i=u-(a<<27|a>>>5)|0;return u=a^(e<<17|e>>>15),a=e+r|0,e=r+i|0,r=u+i|0,(r>>>0)/4294967296}}function oo(u,a,e,r,i){let n=Su(u,e,r);const o=[];for(let s of a){const{type:E,readOnly:l,writeOnly:D,value:d}=Su({type:n.type,...s},e,r,{...i,isAllOfChild:!0});n.type&&E&&E!==n.type&&(console.warn("allOf: schemas with different types can't be merged"),n.type=E),n.type=n.type||E,n.readOnly=n.readOnly||l,n.writeOnly=n.writeOnly||D,d!=null&&o.push(d)}if(n.type==="object"){n.value=R0(n.value||{},...o.filter(s=>typeof s=="object"));for(const s in n.value)n.value[s]===ke&&delete n.value[s];return n}else{n.type==="array"&&(e.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 ka={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 A0(u){if(u.type!==void 0)return Array.isArray(u.type)?u.type.length===0?null:u.type[0]:u.type;const a=Object.keys(ka);for(var e=0;e<a.length;e++){let r=a[e],i=ka[r];if(u[r]!==void 0)return i}return null}let K0={},zu=[];function to(){K0={},zu=[]}function Ei(u){let a;return u.const!==void 0?a=u.const:u.examples!==void 0&&u.examples.length?a=u.examples[0]:u.enum!==void 0&&u.enum.length?a=u.enum[0]:u.default!==void 0&&(a=u.default),a}function Ca(u){const a=Ei(u);if(a!==void 0)return{value:a,readOnly:u.readOnly,writeOnly:u.writeOnly,type:null}}function Su(u,a,e,r){if(r){if(zu.includes(u))return ie(A0(u));zu.push(u)}if(r&&r.depth>a.maxSampleDepth)return Gu(zu,r),ie(A0(u));if(u.$ref){if(!e)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let s=decodeURIComponent(u.$ref);s.startsWith("#")&&(s=s.substring(1));const E=C.JsonPointerLib.get(e,s);let l;if(K0[s]!==!0){K0[s]=!0;const D=Su(E,a,e,r);if(a.format==="xml"){const d=s.split("/").pop(),F={...r,propertyName:r?.propertyName||d},{propertyName:k,value:B}=H0(D,E,F);l={...D,value:{[k||"root"]:B}}}else l=D;K0[s]=!1}else{const D=A0(E);l=ie(D)}return Gu(zu,r),l}if(u.example!==void 0)return Gu(zu,r),{value:u.example,readOnly:u.readOnly,writeOnly:u.writeOnly,type:u.type};if(u.allOf!==void 0)return Gu(zu,r),Ca(u)||oo({...u,allOf:void 0},u.allOf,a,e,r);if(u.oneOf&&u.oneOf.length){u.anyOf&&(a.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),Gu(zu,r);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.oneOf[0]);return o(u,s)}if(u.anyOf&&u.anyOf.length){Gu(zu,r);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.anyOf[0]);return o(u,s)}if(u.if&&u.then){Gu(zu,r);const{if:s,then:E,...l}=u;return Su(R0(l,s,E),a,e,r)}let i=Ei(u),n=null;if(i===void 0){i=null,n=u.type,Array.isArray(n)&&u.type.length>0&&(n=u.type[0]),n||(n=A0(u));let s=ci[n];s&&(i=s(u,a,e,r))}return Gu(zu,r),{value:i,readOnly:u.readOnly,writeOnly:u.writeOnly,type:n};function o(s,E){const l=Ca(s);if(l!==void 0)return l;const D=Su({...s,oneOf:void 0,anyOf:void 0},a,e,r),d=Su(E,a,e,r);if(typeof D.value=="object"&&typeof d.value=="object"){const F=R0(D.value,d.value);return{...d,value:F}}return d}}function so(u,a={},e,r){const i=r&&r.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=l=>Array.isArray(o)?o[l]||{}:o||{},E=[];if(!o)return E;for(let l=0;l<n;l++){let D=s(l),{value:d}=Su(D,a,e,{depth:i+1});if(a?.format==="xml"){const{value:F,propertyName:k}=H0({value:d},D,r);k?(E?.[k]||(E={...E,[k]:[]}),E[k].push(F)):E={...E,...F}}else E.push(d)}if(a?.format==="xml"&&i===1){const{value:l,propertyName:D}=H0({value:null},u,r);D&&(l?E=Array.isArray(E)?{[D]:{...l,...E.map(d=>({"#text":{...d}}))}}:{[D]:{...E,...l}}:E={[D]:E})}return E}function lo(u){return!0}function Di(u){let a=0;if(u.type==="number"&&(u.format==="float"||u.format==="double")&&(a=.1),typeof u.exclusiveMinimum=="boolean"||typeof u.exclusiveMaximum=="boolean"){if(u.maximum&&u.minimum)return a=u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum,(u.exclusiveMaximum&&a>=u.maximum||!u.exclusiveMaximum&&a>u.maximum)&&(a=(u.maximum+u.minimum)/2),a;if(u.minimum)return u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum;if(u.maximum)return u.exclusiveMaximum?u.maximum>0?0:Math.floor(u.maximum)-1:u.maximum>0?0:u.maximum}else{if(u.minimum)return u.minimum;u.exclusiveMinimum?(a=Math.floor(u.exclusiveMinimum)+1,a===u.exclusiveMaximum&&(a=(a+Math.floor(u.exclusiveMaximum)-1)/2)):u.exclusiveMaximum?a=Math.floor(u.exclusiveMaximum)-1:u.maximum&&(a=u.maximum)}return a}function Eo(u,a={},e,r){let i={};const n=r&&r.depth||1;if(u&&typeof u.properties=="object"){const o=Array.isArray(u.required)?u.required:[],s={};for(const E of o)s[E]=!0;Object.keys(u.properties).forEach(E=>{if(a.skipNonRequired&&!s.hasOwnProperty(E))return;const l=Su(u.properties[E],a,e,{propertyName:E,depth:n+1});if(a.skipReadOnly&&l.readOnly){r?.isAllOfChild&&(i[E]=ke);return}if(a.skipWriteOnly&&l.writeOnly){r?.isAllOfChild&&(i[E]=ke);return}if(a?.format==="xml"){const{propertyName:D,value:d}=H0(l,u.properties[E],{propertyName:E});D?i[D]=d:d!==null&&typeof d=="object"&&(i={...i,...d})}else i[E]=l.value})}if(u&&typeof u.additionalProperties=="object"){const o=u.additionalProperties["x-additionalPropertiesName"]||"property";i[`${String(o)}1`]=Su(u.additionalProperties,a,e,{depth:n+1}).value,i[`${String(o)}2`]=Su(u.additionalProperties,a,e,{depth:n+1}).value}if(u&&typeof u.properties=="object"&&u.maxProperties!==void 0&&Object.keys(i).length>u.maxProperties){const o={};let s=0;(Array.isArray(u.required)?u.required:[]).forEach(l=>{i[l]!==void 0&&(o[l]=i[l],s++)}),Object.keys(i).forEach(l=>{s<u.maxProperties&&!o.hasOwnProperty(l)&&(o[l]=i[l],s++)}),i=o}return i}function k0(u,a){return u}function ha(u,a,e){let r=1;if(u)switch(u){case"?":{r=0;break}case"*":{r=k0(0);break}case"+":{r=k0(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else a!=null&&e!=null?r=k0(parseInt(a)):a!=null&&e==null&&(r=parseInt(a));return r}function Do(u){let a=!1;u instanceof RegExp&&(a=u.flags.includes("i"),u=u.toString(),u=u.match(/\/(.+?)\//)?.[1]??""),u=u.replace(/^(\^)?(.*?)(\$)?$/,"$2");let e,r,i;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];i=ha(k,d,F),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(n)}const s=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,E=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(o=u.match(E);o!=null;){const d=o[1]==="^",F=o[2]==="-",k=o[4],B=o[5],y=o[6],K=[];let G=o[3],R=G.match(s);for(F&&K.push(45);R!=null;){if(R[0].indexOf("-")===-1)a&&isNaN(Number(R[0]))?(K.push(R[0].toUpperCase().charCodeAt(0)),K.push(R[0].toLowerCase().charCodeAt(0))):K.push(R[0].charCodeAt(0));else{const v=R[0].split("-").map(h=>h.charCodeAt(0));if(e=v[0],r=v[1],e>r)throw new Error("Character range provided is out of order.");for(let h=e;h<=r;h++)if(a&&isNaN(Number(String.fromCharCode(h)))){const z=String.fromCharCode(h);K.push(z.toUpperCase().charCodeAt(0)),K.push(z.toLowerCase().charCodeAt(0))}else K.push(h)}G=G.substring(R[0].length),R=G.match(s)}if(i=ha(y,k,B),d){let v=-1;for(let h=48;h<=57;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}for(let h=65;h<=90;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}for(let h=97;h<=122;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}}const V=Array.from({length:i},()=>String.fromCharCode(K[k0(0)])).join("");u=u.slice(0,o.index)+V+u.slice(o.index+o[0].length),o=u.match(E)}const l=/(.)\{(\d+)\,(\d+)\}/;for(o=u.match(l);o!=null;){if(e=parseInt(o[2]),r=parseInt(o[3]),e>r)throw new Error("Numbers out of order in {} quantifier.");i=k0(e),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(l)}const D=/(.)\{(\d+)\}/;for(o=u.match(D);o!=null;)i=parseInt(o[2]),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(D);return u}const xo="qwerty!@#$%^123456";function co(){return"user@example.com"}function mo(){return"пошта@укр.нет"}function Fo(u,a){let e="pa$$word";return u>e.length&&(e+="_",e+=li(xo,u-e.length).substring(0,u-e.length)),e}function Be({min:u,max:a,omitTime:e,omitDate:r}){let i=uo(new Date("2019-08-24T14:15:22.123Z"),e,r);return i.length<u&&console.warn(`Using minLength = ${u} is incorrect with format "date-time"`),a&&i.length>a&&console.warn(`Using maxLength = ${a} is incorrect with format "date-time"`),i}function ko(u,a){return Be({min:u,max:a,omitTime:!1,omitDate:!1})}function Co(u,a){return Be({min:u,max:a,omitTime:!0,omitDate:!1})}function ho(u,a){return Be({min:u,max:a,omitTime:!1,omitDate:!0}).slice(1)}function xi(u,a,e,r,i=!1){if(r&&i)return Do(r);let n=li("string",u);return a&&n.length>a&&(n=n.substring(0,a)),n}function go(){return"192.168.0.1"}function po(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function vo(){return"example.com"}function bo(){return"приклад.укр"}function Bo(){return"http://example.com"}function Ao(){return"../dictionary"}function yo(){return"http://example.com/{endpoint}"}function fo(){return"http://example.com/entity/1"}function zo(){return"/entity/1"}function So(u,a,e){return eo(e||"id")}function Mo(){return"/json/pointer"}function jo(){return"1/relative/json/pointer"}function Po(){return"/regex/"}const wo={email:co,"idn-email":mo,password:Fo,"date-time":ko,date:Co,time:ho,ipv4:go,ipv6:po,hostname:vo,"idn-hostname":bo,iri:fo,"iri-reference":zo,uri:Bo,"uri-reference":Ao,"uri-template":yo,uuid:So,default:xi,"json-pointer":Mo,"relative-json-pointer":jo,regex:Po};function Ko(u,a,e,r){let i=u.format||"default",n=wo[i]||xi,o=r&&r.propertyName;return n(u.minLength||0,u.maxLength,o,u.pattern,a?.enablePatterns)}var ci={};const To={skipReadOnly:!1,maxSampleDepth:15};function Lo(u,a){if(!u)throw new Error("Unknown format output for building XML.");return(Array.isArray(u)||Object.keys(u).length>1)&&(u={[a?.xml?.name||"root"]:u}),new C.Builder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(u)}function No(u,a,e){let r=Object.assign({},To,a);to();let i=Su(u,r,e).value;return r?.format==="xml"?Lo(i,u):i}function t0(u,a){ci[u]=a}t0("array",so);t0("boolean",lo);t0("integer",Di);t0("number",Di);t0("object",Eo);t0("string",Ko);function di(u,a){if(u)try{return No(u,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(e){a.error(C.bgRed(" Error while generating test data from JSON Schema ")+`
|
|
2
2
|
`+e);return}}function Ro(u,a){if(u?.example)return u.example;if(C.isPlainObject(u?.examples))return mi(u.examples);if(u?.schema)return di(u.schema,a)}function mi(u){if(C.isPlainObject(u)){const a=Object.keys(u)[0];return a?u[a]?.value:void 0}else return}function Ho(u,a){const e=u?.requestBody?.content||{},[r,i]=Object.entries(e)[0]||[],n=i?.example||mi(i?.examples)||di(i?.schema,a),o=Go(u);return{parameters:Vo([...ga(u.pathParameters,a),...ga(u.parameters,a)]).filter(({value:E})=>E),contentTypeParameters:[...r?[{name:"content-type",in:"header",value:r}]:[],...o?[{name:"accept",in:"header",value:o}]:[]],requestBody:n,contentType:r}}function Go(u){return u?.responses?Array.from(new Set(Object.values(u.responses).flatMap(a=>C.isPlainObject(a)&&"content"in a?Object.keys(a.content||{}):[]))).join(", "):void 0}function ga(u,a){return(u||[]).filter(e=>e?.required===!0).map(e=>{if(be(e))return{name:e.name,in:e.in,value:Ro(e,a),...e.allowReserved&&{allowReserved:e.allowReserved}}}).filter(e=>e!==void 0)}function Vo(u){const a={};for(const e of u)be(e)&&(a[(e.name+":"+e.in).toLowerCase()]=e);return Object.values(a)}function Jo(u,a){let e,r;if(u.includes("$sourceDescriptions.")){const[,E,l]=u.split(".");e=E,r=l}else u.includes(".")?[e,r]=u.split("."):(r=u,e=Object.keys(a)[0]);const i=Object.keys(a);if(!a[e])throw new Error(`Unknown description name ${C.red(e)} at ${C.red(u)}. Available descriptions: ${i.join(", ")}.`);const n=a[e],o=n?.components?.securitySchemes,s=n.servers;for(const[E,l]of Object.entries(a[e].paths)){if(!l)return;for(const[D,d]of Object.entries(l))if(d.operationId===r)return{servers:l.servers||s,...d,pathParameters:d.parameters||[],path:E,method:D,descriptionName:e,securitySchemes:o}}throw new Error(`Unknown operationId ${C.red(r)} at ${C.red(u)}.`)}function _o(u,a){const{$sourceDescriptions:e,sourceDescriptions:r}=a,[i,n]=u.split("#");if(!r)throw new Error("Missing described sourceDescriptions");const o=r.find(y=>{if(["openapi","arazzo"].includes(y.type)){if(i.includes("$sourceDescriptions.")){const[,K]=i.split(".");return y.name===K}return"url"in y&&y.url===i}return!1})?.name;if(!o)throw new Error(`Unknown operationPath ${C.red(u)}. API description ${C.red(i)} is not listed in 'sourceDescriptions' workflow section.`);const s=e[o]||{},E=s?.components?.securitySchemes,[l,D,d]=C.JsonPointerLib.parse(n);if(l!=="paths")throw new Error(`Invalid fragment identifier: ${n} at operationPath ${C.red(u)}.`);const{servers:F}=s,k=C.JsonPointerLib.get(s,n)||{},B=C.JsonPointerLib.get(s,C.JsonPointerLib.compile(["paths",D]))||{};return{servers:B.servers||F,...k,pathParameters:B.parameters||[],path:D,method:d,descriptionName:o,securitySchemes:E}}function $o(u,a){if(!u.operationId&&!u.operationPath)return;const{$sourceDescriptions:e,sourceDescriptions:r}=a,{operationId:i,operationPath:n}=u;return i?Jo(i,e):n?_o(n,{$sourceDescriptions:e,sourceDescriptions:r}):void 0}function Io({statusCode:u,contentType:a,descriptionResponses:e}){return e?(e[u]||e.default)?.content?.[a]?.schema:void 0}function Oo(u,a){if(!a)return;const r=a.requestBody?.content;return r&&r[u]?.schema||void 0}function Fi({ctx:u,security:a,operation:e}){const{scheme:r,schemeName:i}=a;if(r)return a.scheme;if(i){if(typeof i=="string"&&i.startsWith("$sourceDescriptions.")){const[n,o,s]=i.split("."),l=(o&&u.$sourceDescriptions[o])?.components?.securitySchemes;return s&&l?l[s]:void 0}return e?.securitySchemes?.[i]}}function y0(){}function pa(){return typeof WeakMap<"u"?new WeakMap:Wo()}function Wo(){return{add:y0,delete:y0,get:y0,set:y0,has:function(u){return!1}}}var qo=Object.prototype.hasOwnProperty,Ce=function(u,a){return qo.call(u,a)};function re(u,a){for(var e in a)Ce(a,e)&&(u[e]=a[e]);return u}var Zo=/^[ \t]*(?:\r\n|\r|\n)/,Uo=/(?:\r\n|\r|\n)[ \t]*$/,Yo=/^(?:[\r\n]|$)/,Qo=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,Xo=/^[ \t]*[\r\n][ \t\r\n]*$/;function va(u,a,e){var r=0,i=u[0].match(Qo);i&&(r=i[1].length);var n="(\\r\\n|\\r|\\n).{0,"+r+"}",o=new RegExp(n,"g");a&&(u=u.slice(1));var s=e.newline,E=e.trimLeadingNewline,l=e.trimTrailingNewline,D=typeof s=="string",d=u.length,F=u.map(function(k,B){return k=k.replace(o,"$1"),B===0&&E&&(k=k.replace(Zo,"")),B===d-1&&l&&(k=k.replace(Uo,"")),D&&(k=k.replace(/\r\n|\n|\r/g,function(y){return s})),k});return F}function u4(u,a){for(var e="",r=0,i=u.length;r<i;r++)e+=u[r],r<i-1&&(e+=a[r]);return e}function e4(u){return Ce(u,"raw")&&Ce(u,"length")}function ki(u){var a=pa(),e=pa();function r(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];if(e4(n)){var E=n,l=(o[0]===r||o[0]===Pu)&&Xo.test(E[0])&&Yo.test(E[1]),D=l?e:a,d=D.get(E);if(d||(d=va(E,l,u),D.set(E,d)),o.length===0)return d[0];var F=u4(d,l?o.slice(1):o);return F}else return ki(re(re({},u),n||{}))}var i=re(r,{string:function(n){return va([n],!1,u)[0]}});return i}var Pu=ki({trimLeadingNewline:!0,trimTrailingNewline:!0});if(typeof module<"u")try{module.exports=Pu,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.default=Pu,Pu.outdent=Pu}catch{}function a4(u){return!C.isBrowser&&process.env.NODE_ENV==="test"?"<test>ms":`${Math.ceil(performance.now()-u)}ms`}function Ae(u){const a=u.length;let e=0,r=0,i=0,n=0,o=0,s=0,E=0;const l=new Set;let D=0;const d=new Set,F=new Set;for(const k of u){const B=Ci(k.executedSteps);let y=!1;for(const K of B){if(n++,K.retriesLeft&&K.retriesLeft!==0)continue;i++;let G=!1;for(const R of K.checks)if(r++,!R.passed)switch(R.severity){case"warn":o++,l.add(k.workflowId),F.add(k.workflowId+":"+K.stepId);break;case"off":s++,d.add(k.workflowId+":"+K.stepId);break;default:e++,G=!0}G&&(D++,y=!0)}y&&E++}return{workflows:{passed:a-E,failed:E,warnings:l.size,skipped:0,total:a},steps:{passed:i-D,failed:D,warnings:F.size,skipped:d.size,total:i},checks:{passed:r-e,failed:e,warnings:o,skipped:s,total:r},totalRequests:n}}function Ci(u){return u.flatMap(a=>"executedSteps"in a?Ci(a.executedSteps):[a])}function i4(u){try{return JSON.parse(u),!0}catch{return!1}}function r4(u,a){const e=u.endsWith("/")?u.slice(0,-1):u,r=a.startsWith("/")?a.slice(1):a;return`${e}/${r}`}const ba=50;function hi({testNameToDisplay:u,checks:a,verboseLogs:e,verboseResponseLogs:r,logger:i}){const n=a.every(({passed:o})=>o);i.output(` ${n?C.green("✓"):C.red("✗")} ${C.blue(u)}`),e&&(i.output(`${Cu}
|
|
3
3
|
`+(Ba({logs:e,logger:i})||"")),i.printNewLine()),r&&(i.output(`${Cu}
|
|
4
4
|
`+(Ba({logs:r,type:"response",logger:i})||"")),i.printNewLine()),i.printNewLine();for(const o of a)i.output(`${au(n4(o,o.severity),4)}
|
|
@@ -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-B77jPAnD.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-CCy5XeI8.js";
|
|
2
|
+
import { d as j, a as b, j as d } from "./replay-index-CCy5XeI8.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-B77jPAnD.js"),t=require("./replay-oauth2-redirect-handler-Bqw5UUvl.js");exports.AI_PROVIDERS=e.AI_PROVIDERS;exports.AgentLoop=e.AgentLoop;exports.AiPanelContext=e.AiPanelContext;exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.REUNITE_AI_PROVIDER=e.REUNITE_AI_PROVIDER;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.makeProviderRecord=e.makeProviderRecord;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 { a1 as s, a2 as r, a3 as t, a4 as l, a5 as o, a6 as d, a7 as R, a8 as m, a9 as p, aa as i, ab as n, ac as y, ad as h, ae as u, af as A, ag as T, ah as O, ai as E, aj as c } from "./replay-index-
|
|
1
|
+
import { a1 as s, a2 as r, a3 as t, a4 as l, a5 as o, a6 as d, a7 as R, a8 as m, a9 as p, aa as i, ab as n, ac as y, ad as h, ae as u, af as A, ag as T, ah as O, ai as E, aj as c } from "./replay-index-CCy5XeI8.js";
|
|
2
2
|
import { O as I, h as P } from "./replay-oauth2-redirect-handler-CqKZB3aV.js";
|
|
3
3
|
export {
|
|
4
4
|
s as AI_PROVIDERS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/replay",
|
|
3
|
-
"version": "0.27.0-next.
|
|
3
|
+
"version": "0.27.0-next.2",
|
|
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.68.0-next.
|
|
24
|
+
"@redocly/theme": "0.68.0-next.1"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@ai-sdk/anthropic": "4.0.4",
|