@shopware/api-gen 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -27
- package/dist/cli.mjs +784 -394
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +4 -4
- package/dist/shared/{api-gen.BWZPGkRz.mjs → api-gen.a71ec925.mjs} +205 -791
- package/package.json +9 -8
|
@@ -2,24 +2,15 @@ import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
|
2
2
|
import { resolve, join, dirname } from 'node:path';
|
|
3
3
|
import openapiTS, { transformSchemaObjectWithComposition, astToString } from 'openapi-typescript';
|
|
4
4
|
import ts from 'typescript';
|
|
5
|
-
import { ofetch } from 'ofetch';
|
|
6
|
-
import { format as format$1 } from 'prettier';
|
|
7
|
-
import { Project } from 'ts-morph';
|
|
8
5
|
import require$$0 from 'fs';
|
|
9
6
|
import require$$1 from 'path';
|
|
10
7
|
import require$$2 from 'os';
|
|
11
8
|
import require$$3 from 'crypto';
|
|
9
|
+
import { ofetch } from 'ofetch';
|
|
10
|
+
import { format as format$1 } from 'prettier';
|
|
11
|
+
import { Project } from 'ts-morph';
|
|
12
12
|
import { createAdminAPIClient, createAPIClient } from '@shopware/api-client';
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// -- Unbuild CommonJS Shims --
|
|
17
|
-
import __cjs_url__ from 'url';
|
|
18
|
-
import __cjs_path__ from 'path';
|
|
19
|
-
import __cjs_mod__ from 'module';
|
|
20
|
-
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
21
|
-
const __dirname = __cjs_path__.dirname(__filename);
|
|
22
|
-
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
23
14
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
24
15
|
|
|
25
16
|
function getDefaultExportFromCjs$2 (x) {
|
|
@@ -54,7 +45,7 @@ function getAugmentedNamespace(n) {
|
|
|
54
45
|
var main$1 = {exports: {}};
|
|
55
46
|
|
|
56
47
|
const name = "dotenv";
|
|
57
|
-
const version$1 = "17.
|
|
48
|
+
const version$1 = "17.3.1";
|
|
58
49
|
const description = "Loads environment variables from .env file";
|
|
59
50
|
const main = "lib/main.js";
|
|
60
51
|
const types = "lib/main.d.ts";
|
|
@@ -168,12 +159,9 @@ const TIPS = [
|
|
|
168
159
|
'🔐 encrypt with Dotenvx: https://dotenvx.com',
|
|
169
160
|
'🔐 prevent committing .env to code: https://dotenvx.com/precommit',
|
|
170
161
|
'🔐 prevent building .env in docker: https://dotenvx.com/prebuild',
|
|
171
|
-
'
|
|
172
|
-
'
|
|
173
|
-
'
|
|
174
|
-
'✅ audit secrets and track compliance: https://dotenvx.com/ops',
|
|
175
|
-
'🔄 add secrets lifecycle management: https://dotenvx.com/ops',
|
|
176
|
-
'🔑 add access controls to secrets: https://dotenvx.com/ops',
|
|
162
|
+
'🤖 agentic secret storage: https://dotenvx.com/as2',
|
|
163
|
+
'⚡️ secrets for agents: https://dotenvx.com/as2',
|
|
164
|
+
'🛡️ auth for agents: https://vestauth.com',
|
|
177
165
|
'🛠️ run anywhere with `dotenvx run -- yourcommand`',
|
|
178
166
|
'⚙️ specify custom .env file path with { path: \'/custom/path/.env\' }',
|
|
179
167
|
'⚙️ enable debug logging with { debug: true }',
|
|
@@ -2076,10 +2064,10 @@ var lib = JSON5;
|
|
|
2076
2064
|
|
|
2077
2065
|
var picocolors = {exports: {}};
|
|
2078
2066
|
|
|
2079
|
-
let p
|
|
2067
|
+
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
2080
2068
|
let isColorSupported =
|
|
2081
2069
|
!(!!env.NO_COLOR || argv.includes("--no-color")) &&
|
|
2082
|
-
(!!env.FORCE_COLOR || argv.includes("--color") || p
|
|
2070
|
+
(!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI);
|
|
2083
2071
|
|
|
2084
2072
|
let formatter = (open, close, replace = open) =>
|
|
2085
2073
|
input => {
|
|
@@ -2212,7 +2200,7 @@ function createDefu(merger) {
|
|
|
2212
2200
|
const defu = createDefu();
|
|
2213
2201
|
|
|
2214
2202
|
// src/index.ts
|
|
2215
|
-
var
|
|
2203
|
+
var d = {
|
|
2216
2204
|
reset: [0, 0],
|
|
2217
2205
|
bold: [1, 22, "\x1B[22m\x1B[1m"],
|
|
2218
2206
|
dim: [2, 22, "\x1B[22m\x1B[2m"],
|
|
@@ -2254,42 +2242,43 @@ var f = {
|
|
|
2254
2242
|
bgMagentaBright: [105, 49],
|
|
2255
2243
|
bgCyanBright: [106, 49],
|
|
2256
2244
|
bgWhiteBright: [107, 49]
|
|
2257
|
-
}
|
|
2258
|
-
function
|
|
2259
|
-
return String(
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
function
|
|
2264
|
-
let e = typeof process != "undefined" ? process : void 0,
|
|
2265
|
-
return !("NO_COLOR" in
|
|
2266
|
-
}
|
|
2267
|
-
function
|
|
2268
|
-
let e =
|
|
2245
|
+
};
|
|
2246
|
+
function g(e) {
|
|
2247
|
+
return String(e);
|
|
2248
|
+
}
|
|
2249
|
+
g.open = "";
|
|
2250
|
+
g.close = "";
|
|
2251
|
+
function h() {
|
|
2252
|
+
let e = typeof process != "undefined" ? process : void 0, n = (e == null ? void 0 : e.env) || {}, a = n.FORCE_TTY !== "false", i = (e == null ? void 0 : e.argv) || [];
|
|
2253
|
+
return !("NO_COLOR" in n || i.includes("--no-color")) && ("FORCE_COLOR" in n || i.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || a && n.TERM !== "dumb" || "CI" in n) || typeof window != "undefined" && !!window.chrome;
|
|
2254
|
+
}
|
|
2255
|
+
function f() {
|
|
2256
|
+
let e = h(), n = (r, t, u, o) => {
|
|
2269
2257
|
let l = "", s = 0;
|
|
2270
2258
|
do
|
|
2271
|
-
l += r.substring(s, o) +
|
|
2259
|
+
l += r.substring(s, o) + u, s = o + t.length, o = r.indexOf(t, s);
|
|
2272
2260
|
while (~o);
|
|
2273
2261
|
return l + r.substring(s);
|
|
2274
|
-
},
|
|
2262
|
+
}, a = (r, t, u = r) => {
|
|
2275
2263
|
let o = (l) => {
|
|
2276
2264
|
let s = String(l), b = s.indexOf(t, r.length);
|
|
2277
|
-
return ~b ? r +
|
|
2265
|
+
return ~b ? r + n(s, t, u, b) + t : r + s + t;
|
|
2278
2266
|
};
|
|
2279
2267
|
return o.open = r, o.close = t, o;
|
|
2280
|
-
},
|
|
2268
|
+
}, i = {
|
|
2281
2269
|
isColorSupported: e
|
|
2282
|
-
},
|
|
2283
|
-
for (let
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2270
|
+
}, c = (r) => `\x1B[${r}m`;
|
|
2271
|
+
for (let r in d) {
|
|
2272
|
+
let t = d[r];
|
|
2273
|
+
i[r] = e ? a(
|
|
2274
|
+
c(t[0]),
|
|
2275
|
+
c(t[1]),
|
|
2287
2276
|
t[2]
|
|
2288
|
-
) :
|
|
2289
|
-
|
|
2277
|
+
) : g;
|
|
2278
|
+
}
|
|
2279
|
+
return i;
|
|
2290
2280
|
}
|
|
2291
|
-
|
|
2292
|
-
var s = p();
|
|
2281
|
+
var C = f();
|
|
2293
2282
|
|
|
2294
2283
|
function _mergeNamespaces(n, m) {
|
|
2295
2284
|
m.forEach(function (e) {
|
|
@@ -2513,6 +2502,10 @@ function printProps(keys, props, config, indentation, depth, refs, printer) {
|
|
|
2513
2502
|
const colors = config.colors;
|
|
2514
2503
|
return keys.map((key) => {
|
|
2515
2504
|
const value = props[key];
|
|
2505
|
+
// hidden injected value that should not be printed
|
|
2506
|
+
if (typeof value === "string" && value[0] === "_" && value.startsWith("__vitest_") && value.match(/__vitest_\d+__/)) {
|
|
2507
|
+
return "";
|
|
2508
|
+
}
|
|
2516
2509
|
let printed = printer(value, config, indentationNext, depth, refs);
|
|
2517
2510
|
if (typeof value !== "string") {
|
|
2518
2511
|
if (printed.includes("\n")) {
|
|
@@ -2527,6 +2520,12 @@ function printProps(keys, props, config, indentation, depth, refs, printer) {
|
|
|
2527
2520
|
function printChildren(children, config, indentation, depth, refs, printer) {
|
|
2528
2521
|
return children.map((child) => config.spacingOuter + indentation + (typeof child === "string" ? printText(child, config) : printer(child, config, indentation, depth, refs))).join("");
|
|
2529
2522
|
}
|
|
2523
|
+
function printShadowRoot(children, config, indentation, depth, refs, printer) {
|
|
2524
|
+
if (config.printShadowRoot === false) {
|
|
2525
|
+
return "";
|
|
2526
|
+
}
|
|
2527
|
+
return [`${config.spacingOuter + indentation}#shadow-root`, printChildren(children, config, indentation + config.indent, depth, refs, printer)].join("");
|
|
2528
|
+
}
|
|
2530
2529
|
function printText(text, config) {
|
|
2531
2530
|
const contentColor = config.colors.content;
|
|
2532
2531
|
return contentColor.open + escapeHTML(text) + contentColor.close;
|
|
@@ -2566,10 +2565,7 @@ function testNode(val) {
|
|
|
2566
2565
|
const isCustomElement = typeof tagName === "string" && tagName.includes("-") || testHasAttribute(val);
|
|
2567
2566
|
return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE && constructorName === "Text" || nodeType === COMMENT_NODE && constructorName === "Comment" || nodeType === FRAGMENT_NODE && constructorName === "DocumentFragment";
|
|
2568
2567
|
}
|
|
2569
|
-
const test$3 = (val) =>
|
|
2570
|
-
var _val$constructor;
|
|
2571
|
-
return (val === null || val === void 0 || (_val$constructor = val.constructor) === null || _val$constructor === void 0 ? void 0 : _val$constructor.name) && testNode(val);
|
|
2572
|
-
};
|
|
2568
|
+
const test$3 = (val) => val?.constructor?.name && testNode(val);
|
|
2573
2569
|
function nodeIsText(node) {
|
|
2574
2570
|
return node.nodeType === TEXT_NODE;
|
|
2575
2571
|
}
|
|
@@ -2593,7 +2589,7 @@ const serialize$3 = (node, config, indentation, depth, refs, printer) => {
|
|
|
2593
2589
|
return printElement(type, printProps(nodeIsFragment(node) ? [] : Array.from(node.attributes, (attr) => attr.name).sort(), nodeIsFragment(node) ? {} : [...node.attributes].reduce((props, attribute) => {
|
|
2594
2590
|
props[attribute.name] = attribute.value;
|
|
2595
2591
|
return props;
|
|
2596
|
-
}, {}), config, indentation + config.indent, depth, refs, printer), printChildren(Array.prototype.slice.call(node.childNodes || node.children), config, indentation + config.indent, depth, refs, printer), config, indentation);
|
|
2592
|
+
}, {}), config, indentation + config.indent, depth, refs, printer), (nodeIsFragment(node) || !node.shadowRoot ? "" : printShadowRoot(Array.prototype.slice.call(node.shadowRoot.children), config, indentation + config.indent, depth, refs, printer)) + printChildren(Array.prototype.slice.call(node.childNodes || node.children), config, indentation + config.indent, depth, refs, printer), config, indentation);
|
|
2597
2593
|
};
|
|
2598
2594
|
const plugin$3 = {
|
|
2599
2595
|
serialize: serialize$3,
|
|
@@ -2681,8 +2677,8 @@ const plugin$2 = {
|
|
|
2681
2677
|
test: test$2
|
|
2682
2678
|
};
|
|
2683
2679
|
|
|
2684
|
-
function getDefaultExportFromCjs$1
|
|
2685
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x,
|
|
2680
|
+
function getDefaultExportFromCjs$1(x) {
|
|
2681
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
2686
2682
|
}
|
|
2687
2683
|
|
|
2688
2684
|
var reactIs$1 = {exports: {}};
|
|
@@ -2708,8 +2704,8 @@ function requireReactIs_production () {
|
|
|
2708
2704
|
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
2709
2705
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
2710
2706
|
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
2711
|
-
REACT_PROFILER_TYPE = Symbol.for("react.profiler")
|
|
2712
|
-
|
|
2707
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
2708
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
2713
2709
|
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
2714
2710
|
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
2715
2711
|
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
@@ -2825,157 +2821,14 @@ function requireReactIs_production () {
|
|
|
2825
2821
|
return reactIs_production;
|
|
2826
2822
|
}
|
|
2827
2823
|
|
|
2828
|
-
var reactIs_development$1 = {};
|
|
2829
|
-
|
|
2830
|
-
/**
|
|
2831
|
-
* @license React
|
|
2832
|
-
* react-is.development.js
|
|
2833
|
-
*
|
|
2834
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2835
|
-
*
|
|
2836
|
-
* This source code is licensed under the MIT license found in the
|
|
2837
|
-
* LICENSE file in the root directory of this source tree.
|
|
2838
|
-
*/
|
|
2839
|
-
|
|
2840
|
-
var hasRequiredReactIs_development$1;
|
|
2841
|
-
|
|
2842
|
-
function requireReactIs_development$1 () {
|
|
2843
|
-
if (hasRequiredReactIs_development$1) return reactIs_development$1;
|
|
2844
|
-
hasRequiredReactIs_development$1 = 1;
|
|
2845
|
-
"production" !== process.env.NODE_ENV &&
|
|
2846
|
-
(function () {
|
|
2847
|
-
function typeOf(object) {
|
|
2848
|
-
if ("object" === typeof object && null !== object) {
|
|
2849
|
-
var $$typeof = object.$$typeof;
|
|
2850
|
-
switch ($$typeof) {
|
|
2851
|
-
case REACT_ELEMENT_TYPE:
|
|
2852
|
-
switch (((object = object.type), object)) {
|
|
2853
|
-
case REACT_FRAGMENT_TYPE:
|
|
2854
|
-
case REACT_PROFILER_TYPE:
|
|
2855
|
-
case REACT_STRICT_MODE_TYPE:
|
|
2856
|
-
case REACT_SUSPENSE_TYPE:
|
|
2857
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
2858
|
-
case REACT_VIEW_TRANSITION_TYPE:
|
|
2859
|
-
return object;
|
|
2860
|
-
default:
|
|
2861
|
-
switch (((object = object && object.$$typeof), object)) {
|
|
2862
|
-
case REACT_CONTEXT_TYPE:
|
|
2863
|
-
case REACT_FORWARD_REF_TYPE:
|
|
2864
|
-
case REACT_LAZY_TYPE:
|
|
2865
|
-
case REACT_MEMO_TYPE:
|
|
2866
|
-
return object;
|
|
2867
|
-
case REACT_CONSUMER_TYPE:
|
|
2868
|
-
return object;
|
|
2869
|
-
default:
|
|
2870
|
-
return $$typeof;
|
|
2871
|
-
}
|
|
2872
|
-
}
|
|
2873
|
-
case REACT_PORTAL_TYPE:
|
|
2874
|
-
return $$typeof;
|
|
2875
|
-
}
|
|
2876
|
-
}
|
|
2877
|
-
}
|
|
2878
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
2879
|
-
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
2880
|
-
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
2881
|
-
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
2882
|
-
REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
2883
|
-
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
2884
|
-
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
2885
|
-
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
2886
|
-
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
2887
|
-
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
2888
|
-
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
2889
|
-
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
2890
|
-
REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
|
|
2891
|
-
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
|
2892
|
-
reactIs_development$1.ContextConsumer = REACT_CONSUMER_TYPE;
|
|
2893
|
-
reactIs_development$1.ContextProvider = REACT_CONTEXT_TYPE;
|
|
2894
|
-
reactIs_development$1.Element = REACT_ELEMENT_TYPE;
|
|
2895
|
-
reactIs_development$1.ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
2896
|
-
reactIs_development$1.Fragment = REACT_FRAGMENT_TYPE;
|
|
2897
|
-
reactIs_development$1.Lazy = REACT_LAZY_TYPE;
|
|
2898
|
-
reactIs_development$1.Memo = REACT_MEMO_TYPE;
|
|
2899
|
-
reactIs_development$1.Portal = REACT_PORTAL_TYPE;
|
|
2900
|
-
reactIs_development$1.Profiler = REACT_PROFILER_TYPE;
|
|
2901
|
-
reactIs_development$1.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
2902
|
-
reactIs_development$1.Suspense = REACT_SUSPENSE_TYPE;
|
|
2903
|
-
reactIs_development$1.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
2904
|
-
reactIs_development$1.isContextConsumer = function (object) {
|
|
2905
|
-
return typeOf(object) === REACT_CONSUMER_TYPE;
|
|
2906
|
-
};
|
|
2907
|
-
reactIs_development$1.isContextProvider = function (object) {
|
|
2908
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
2909
|
-
};
|
|
2910
|
-
reactIs_development$1.isElement = function (object) {
|
|
2911
|
-
return (
|
|
2912
|
-
"object" === typeof object &&
|
|
2913
|
-
null !== object &&
|
|
2914
|
-
object.$$typeof === REACT_ELEMENT_TYPE
|
|
2915
|
-
);
|
|
2916
|
-
};
|
|
2917
|
-
reactIs_development$1.isForwardRef = function (object) {
|
|
2918
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
2919
|
-
};
|
|
2920
|
-
reactIs_development$1.isFragment = function (object) {
|
|
2921
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
2922
|
-
};
|
|
2923
|
-
reactIs_development$1.isLazy = function (object) {
|
|
2924
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
2925
|
-
};
|
|
2926
|
-
reactIs_development$1.isMemo = function (object) {
|
|
2927
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
2928
|
-
};
|
|
2929
|
-
reactIs_development$1.isPortal = function (object) {
|
|
2930
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
2931
|
-
};
|
|
2932
|
-
reactIs_development$1.isProfiler = function (object) {
|
|
2933
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
2934
|
-
};
|
|
2935
|
-
reactIs_development$1.isStrictMode = function (object) {
|
|
2936
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
2937
|
-
};
|
|
2938
|
-
reactIs_development$1.isSuspense = function (object) {
|
|
2939
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
2940
|
-
};
|
|
2941
|
-
reactIs_development$1.isSuspenseList = function (object) {
|
|
2942
|
-
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
2943
|
-
};
|
|
2944
|
-
reactIs_development$1.isValidElementType = function (type) {
|
|
2945
|
-
return "string" === typeof type ||
|
|
2946
|
-
"function" === typeof type ||
|
|
2947
|
-
type === REACT_FRAGMENT_TYPE ||
|
|
2948
|
-
type === REACT_PROFILER_TYPE ||
|
|
2949
|
-
type === REACT_STRICT_MODE_TYPE ||
|
|
2950
|
-
type === REACT_SUSPENSE_TYPE ||
|
|
2951
|
-
type === REACT_SUSPENSE_LIST_TYPE ||
|
|
2952
|
-
("object" === typeof type &&
|
|
2953
|
-
null !== type &&
|
|
2954
|
-
(type.$$typeof === REACT_LAZY_TYPE ||
|
|
2955
|
-
type.$$typeof === REACT_MEMO_TYPE ||
|
|
2956
|
-
type.$$typeof === REACT_CONTEXT_TYPE ||
|
|
2957
|
-
type.$$typeof === REACT_CONSUMER_TYPE ||
|
|
2958
|
-
type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
|
2959
|
-
type.$$typeof === REACT_CLIENT_REFERENCE ||
|
|
2960
|
-
void 0 !== type.getModuleId))
|
|
2961
|
-
? true
|
|
2962
|
-
: false;
|
|
2963
|
-
};
|
|
2964
|
-
reactIs_development$1.typeOf = typeOf;
|
|
2965
|
-
})();
|
|
2966
|
-
return reactIs_development$1;
|
|
2967
|
-
}
|
|
2968
|
-
|
|
2969
2824
|
var hasRequiredReactIs$1;
|
|
2970
2825
|
|
|
2971
2826
|
function requireReactIs$1 () {
|
|
2972
2827
|
if (hasRequiredReactIs$1) return reactIs$1.exports;
|
|
2973
2828
|
hasRequiredReactIs$1 = 1;
|
|
2974
2829
|
|
|
2975
|
-
|
|
2830
|
+
{
|
|
2976
2831
|
reactIs$1.exports = requireReactIs_production();
|
|
2977
|
-
} else {
|
|
2978
|
-
reactIs$1.exports = requireReactIs_development$1();
|
|
2979
2832
|
}
|
|
2980
2833
|
return reactIs$1.exports;
|
|
2981
2834
|
}
|
|
@@ -3015,245 +2868,14 @@ var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("rea
|
|
|
3015
2868
|
return reactIs_production_min;
|
|
3016
2869
|
}
|
|
3017
2870
|
|
|
3018
|
-
var reactIs_development = {};
|
|
3019
|
-
|
|
3020
|
-
/**
|
|
3021
|
-
* @license React
|
|
3022
|
-
* react-is.development.js
|
|
3023
|
-
*
|
|
3024
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3025
|
-
*
|
|
3026
|
-
* This source code is licensed under the MIT license found in the
|
|
3027
|
-
* LICENSE file in the root directory of this source tree.
|
|
3028
|
-
*/
|
|
3029
|
-
|
|
3030
|
-
var hasRequiredReactIs_development;
|
|
3031
|
-
|
|
3032
|
-
function requireReactIs_development () {
|
|
3033
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
3034
|
-
hasRequiredReactIs_development = 1;
|
|
3035
|
-
|
|
3036
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3037
|
-
(function() {
|
|
3038
|
-
|
|
3039
|
-
// ATTENTION
|
|
3040
|
-
// When adding new symbols to this file,
|
|
3041
|
-
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
3042
|
-
// The Symbol used to tag the ReactElement-like types.
|
|
3043
|
-
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
3044
|
-
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
3045
|
-
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
3046
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
3047
|
-
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
3048
|
-
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
3049
|
-
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
3050
|
-
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
|
|
3051
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
3052
|
-
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
3053
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
3054
|
-
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
3055
|
-
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
3056
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
3057
|
-
|
|
3058
|
-
// -----------------------------------------------------------------------------
|
|
3059
|
-
|
|
3060
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
3061
|
-
var enableCacheElement = false;
|
|
3062
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
3063
|
-
|
|
3064
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
3065
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
3066
|
-
// issues in DEV builds.
|
|
3067
|
-
|
|
3068
|
-
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
3069
|
-
|
|
3070
|
-
var REACT_MODULE_REFERENCE;
|
|
3071
|
-
|
|
3072
|
-
{
|
|
3073
|
-
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
3074
|
-
}
|
|
3075
|
-
|
|
3076
|
-
function isValidElementType(type) {
|
|
3077
|
-
if (typeof type === 'string' || typeof type === 'function') {
|
|
3078
|
-
return true;
|
|
3079
|
-
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
|
|
3083
|
-
return true;
|
|
3084
|
-
}
|
|
3085
|
-
|
|
3086
|
-
if (typeof type === 'object' && type !== null) {
|
|
3087
|
-
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
3088
|
-
// types supported by any Flight configuration anywhere since
|
|
3089
|
-
// we don't know which Flight build this will end up being used
|
|
3090
|
-
// with.
|
|
3091
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
3092
|
-
return true;
|
|
3093
|
-
}
|
|
3094
|
-
}
|
|
3095
|
-
|
|
3096
|
-
return false;
|
|
3097
|
-
}
|
|
3098
|
-
|
|
3099
|
-
function typeOf(object) {
|
|
3100
|
-
if (typeof object === 'object' && object !== null) {
|
|
3101
|
-
var $$typeof = object.$$typeof;
|
|
3102
|
-
|
|
3103
|
-
switch ($$typeof) {
|
|
3104
|
-
case REACT_ELEMENT_TYPE:
|
|
3105
|
-
var type = object.type;
|
|
3106
|
-
|
|
3107
|
-
switch (type) {
|
|
3108
|
-
case REACT_FRAGMENT_TYPE:
|
|
3109
|
-
case REACT_PROFILER_TYPE:
|
|
3110
|
-
case REACT_STRICT_MODE_TYPE:
|
|
3111
|
-
case REACT_SUSPENSE_TYPE:
|
|
3112
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
3113
|
-
return type;
|
|
3114
|
-
|
|
3115
|
-
default:
|
|
3116
|
-
var $$typeofType = type && type.$$typeof;
|
|
3117
|
-
|
|
3118
|
-
switch ($$typeofType) {
|
|
3119
|
-
case REACT_SERVER_CONTEXT_TYPE:
|
|
3120
|
-
case REACT_CONTEXT_TYPE:
|
|
3121
|
-
case REACT_FORWARD_REF_TYPE:
|
|
3122
|
-
case REACT_LAZY_TYPE:
|
|
3123
|
-
case REACT_MEMO_TYPE:
|
|
3124
|
-
case REACT_PROVIDER_TYPE:
|
|
3125
|
-
return $$typeofType;
|
|
3126
|
-
|
|
3127
|
-
default:
|
|
3128
|
-
return $$typeof;
|
|
3129
|
-
}
|
|
3130
|
-
|
|
3131
|
-
}
|
|
3132
|
-
|
|
3133
|
-
case REACT_PORTAL_TYPE:
|
|
3134
|
-
return $$typeof;
|
|
3135
|
-
}
|
|
3136
|
-
}
|
|
3137
|
-
|
|
3138
|
-
return undefined;
|
|
3139
|
-
}
|
|
3140
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
3141
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
3142
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
3143
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
3144
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
3145
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
3146
|
-
var Memo = REACT_MEMO_TYPE;
|
|
3147
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
3148
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
3149
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
3150
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
3151
|
-
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
3152
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
3153
|
-
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
|
|
3154
|
-
|
|
3155
|
-
function isAsyncMode(object) {
|
|
3156
|
-
{
|
|
3157
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
3158
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
3159
|
-
|
|
3160
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
3161
|
-
}
|
|
3162
|
-
}
|
|
3163
|
-
|
|
3164
|
-
return false;
|
|
3165
|
-
}
|
|
3166
|
-
function isConcurrentMode(object) {
|
|
3167
|
-
{
|
|
3168
|
-
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
|
3169
|
-
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
3170
|
-
|
|
3171
|
-
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
3172
|
-
}
|
|
3173
|
-
}
|
|
3174
|
-
|
|
3175
|
-
return false;
|
|
3176
|
-
}
|
|
3177
|
-
function isContextConsumer(object) {
|
|
3178
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
3179
|
-
}
|
|
3180
|
-
function isContextProvider(object) {
|
|
3181
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
3182
|
-
}
|
|
3183
|
-
function isElement(object) {
|
|
3184
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
3185
|
-
}
|
|
3186
|
-
function isForwardRef(object) {
|
|
3187
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
3188
|
-
}
|
|
3189
|
-
function isFragment(object) {
|
|
3190
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
3191
|
-
}
|
|
3192
|
-
function isLazy(object) {
|
|
3193
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
3194
|
-
}
|
|
3195
|
-
function isMemo(object) {
|
|
3196
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
3197
|
-
}
|
|
3198
|
-
function isPortal(object) {
|
|
3199
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
3200
|
-
}
|
|
3201
|
-
function isProfiler(object) {
|
|
3202
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
3203
|
-
}
|
|
3204
|
-
function isStrictMode(object) {
|
|
3205
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
3206
|
-
}
|
|
3207
|
-
function isSuspense(object) {
|
|
3208
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
3209
|
-
}
|
|
3210
|
-
function isSuspenseList(object) {
|
|
3211
|
-
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
3212
|
-
}
|
|
3213
|
-
|
|
3214
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
3215
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
3216
|
-
reactIs_development.Element = Element;
|
|
3217
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
3218
|
-
reactIs_development.Fragment = Fragment;
|
|
3219
|
-
reactIs_development.Lazy = Lazy;
|
|
3220
|
-
reactIs_development.Memo = Memo;
|
|
3221
|
-
reactIs_development.Portal = Portal;
|
|
3222
|
-
reactIs_development.Profiler = Profiler;
|
|
3223
|
-
reactIs_development.StrictMode = StrictMode;
|
|
3224
|
-
reactIs_development.Suspense = Suspense;
|
|
3225
|
-
reactIs_development.SuspenseList = SuspenseList;
|
|
3226
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
3227
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
3228
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
3229
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
3230
|
-
reactIs_development.isElement = isElement;
|
|
3231
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
3232
|
-
reactIs_development.isFragment = isFragment;
|
|
3233
|
-
reactIs_development.isLazy = isLazy;
|
|
3234
|
-
reactIs_development.isMemo = isMemo;
|
|
3235
|
-
reactIs_development.isPortal = isPortal;
|
|
3236
|
-
reactIs_development.isProfiler = isProfiler;
|
|
3237
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
3238
|
-
reactIs_development.isSuspense = isSuspense;
|
|
3239
|
-
reactIs_development.isSuspenseList = isSuspenseList;
|
|
3240
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
3241
|
-
reactIs_development.typeOf = typeOf;
|
|
3242
|
-
})();
|
|
3243
|
-
}
|
|
3244
|
-
return reactIs_development;
|
|
3245
|
-
}
|
|
3246
|
-
|
|
3247
2871
|
var hasRequiredReactIs;
|
|
3248
2872
|
|
|
3249
2873
|
function requireReactIs () {
|
|
3250
2874
|
if (hasRequiredReactIs) return reactIs.exports;
|
|
3251
2875
|
hasRequiredReactIs = 1;
|
|
3252
2876
|
|
|
3253
|
-
|
|
2877
|
+
{
|
|
3254
2878
|
reactIs.exports = requireReactIs_production_min();
|
|
3255
|
-
} else {
|
|
3256
|
-
reactIs.exports = requireReactIs_development();
|
|
3257
2879
|
}
|
|
3258
2880
|
return reactIs.exports;
|
|
3259
2881
|
}
|
|
@@ -3504,7 +3126,7 @@ const ErrorPlugin = {
|
|
|
3504
3126
|
}
|
|
3505
3127
|
refs = [...refs, val];
|
|
3506
3128
|
const hitMaxDepth = ++depth > config.maxDepth;
|
|
3507
|
-
const { message, cause
|
|
3129
|
+
const { message, cause, ...rest } = val;
|
|
3508
3130
|
const entries = {
|
|
3509
3131
|
message,
|
|
3510
3132
|
...typeof cause !== "undefined" ? { cause } : {},
|
|
@@ -3581,11 +3203,12 @@ const DEFAULT_OPTIONS = {
|
|
|
3581
3203
|
plugins: [],
|
|
3582
3204
|
printBasicPrototype: true,
|
|
3583
3205
|
printFunctionName: true,
|
|
3206
|
+
printShadowRoot: true,
|
|
3584
3207
|
theme: DEFAULT_THEME
|
|
3585
3208
|
};
|
|
3586
3209
|
function validateOptions(options) {
|
|
3587
3210
|
for (const key of Object.keys(options)) {
|
|
3588
|
-
if (!Object.
|
|
3211
|
+
if (!Object.hasOwn(DEFAULT_OPTIONS, key)) {
|
|
3589
3212
|
throw new Error(`pretty-format: Unknown option "${key}".`);
|
|
3590
3213
|
}
|
|
3591
3214
|
}
|
|
@@ -3596,7 +3219,7 @@ function validateOptions(options) {
|
|
|
3596
3219
|
function getColorsHighlight() {
|
|
3597
3220
|
return DEFAULT_THEME_KEYS.reduce((colors, key) => {
|
|
3598
3221
|
const value = DEFAULT_THEME[key];
|
|
3599
|
-
const color = value &&
|
|
3222
|
+
const color = value && C[value];
|
|
3600
3223
|
if (color && typeof color.close === "string" && typeof color.open === "string") {
|
|
3601
3224
|
colors[key] = color;
|
|
3602
3225
|
} else {
|
|
@@ -3615,30 +3238,31 @@ function getColorsEmpty() {
|
|
|
3615
3238
|
}, Object.create(null));
|
|
3616
3239
|
}
|
|
3617
3240
|
function getPrintFunctionName(options) {
|
|
3618
|
-
return
|
|
3241
|
+
return options?.printFunctionName ?? DEFAULT_OPTIONS.printFunctionName;
|
|
3619
3242
|
}
|
|
3620
3243
|
function getEscapeRegex(options) {
|
|
3621
|
-
return
|
|
3244
|
+
return options?.escapeRegex ?? DEFAULT_OPTIONS.escapeRegex;
|
|
3622
3245
|
}
|
|
3623
3246
|
function getEscapeString(options) {
|
|
3624
|
-
return
|
|
3247
|
+
return options?.escapeString ?? DEFAULT_OPTIONS.escapeString;
|
|
3625
3248
|
}
|
|
3626
3249
|
function getConfig(options) {
|
|
3627
3250
|
return {
|
|
3628
|
-
callToJSON:
|
|
3629
|
-
colors:
|
|
3630
|
-
compareKeys: typeof
|
|
3251
|
+
callToJSON: options?.callToJSON ?? DEFAULT_OPTIONS.callToJSON,
|
|
3252
|
+
colors: options?.highlight ? getColorsHighlight() : getColorsEmpty(),
|
|
3253
|
+
compareKeys: typeof options?.compareKeys === "function" || options?.compareKeys === null ? options.compareKeys : DEFAULT_OPTIONS.compareKeys,
|
|
3631
3254
|
escapeRegex: getEscapeRegex(options),
|
|
3632
3255
|
escapeString: getEscapeString(options),
|
|
3633
|
-
indent:
|
|
3634
|
-
maxDepth:
|
|
3635
|
-
maxWidth:
|
|
3636
|
-
min:
|
|
3637
|
-
plugins:
|
|
3638
|
-
printBasicPrototype:
|
|
3256
|
+
indent: options?.min ? "" : createIndent(options?.indent ?? DEFAULT_OPTIONS.indent),
|
|
3257
|
+
maxDepth: options?.maxDepth ?? DEFAULT_OPTIONS.maxDepth,
|
|
3258
|
+
maxWidth: options?.maxWidth ?? DEFAULT_OPTIONS.maxWidth,
|
|
3259
|
+
min: options?.min ?? DEFAULT_OPTIONS.min,
|
|
3260
|
+
plugins: options?.plugins ?? DEFAULT_OPTIONS.plugins,
|
|
3261
|
+
printBasicPrototype: options?.printBasicPrototype ?? true,
|
|
3639
3262
|
printFunctionName: getPrintFunctionName(options),
|
|
3640
|
-
|
|
3641
|
-
|
|
3263
|
+
printShadowRoot: options?.printShadowRoot ?? true,
|
|
3264
|
+
spacingInner: options?.min ? " " : "\n",
|
|
3265
|
+
spacingOuter: options?.min ? "" : "\n"
|
|
3642
3266
|
};
|
|
3643
3267
|
}
|
|
3644
3268
|
function createIndent(indent) {
|
|
@@ -3675,8 +3299,8 @@ const plugins = {
|
|
|
3675
3299
|
Error: ErrorPlugin
|
|
3676
3300
|
};
|
|
3677
3301
|
|
|
3678
|
-
function getDefaultExportFromCjs
|
|
3679
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x,
|
|
3302
|
+
function getDefaultExportFromCjs(x) {
|
|
3303
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
3680
3304
|
}
|
|
3681
3305
|
|
|
3682
3306
|
/**
|
|
@@ -4550,7 +4174,7 @@ function requireBuild () {
|
|
|
4550
4174
|
return build;
|
|
4551
4175
|
}
|
|
4552
4176
|
|
|
4553
|
-
var buildExports = requireBuild();
|
|
4177
|
+
var buildExports = /*@__PURE__*/ requireBuild();
|
|
4554
4178
|
var diffSequences = /*@__PURE__*/getDefaultExportFromCjs(buildExports);
|
|
4555
4179
|
|
|
4556
4180
|
function formatTrailingSpaces(line, trailingSpaceFormatter) {
|
|
@@ -4738,14 +4362,14 @@ const DIFF_TRUNCATE_THRESHOLD_DEFAULT = 0;
|
|
|
4738
4362
|
function getDefaultOptions() {
|
|
4739
4363
|
return {
|
|
4740
4364
|
aAnnotation: "Expected",
|
|
4741
|
-
aColor:
|
|
4365
|
+
aColor: C.green,
|
|
4742
4366
|
aIndicator: "-",
|
|
4743
4367
|
bAnnotation: "Received",
|
|
4744
|
-
bColor:
|
|
4368
|
+
bColor: C.red,
|
|
4745
4369
|
bIndicator: "+",
|
|
4746
|
-
changeColor:
|
|
4370
|
+
changeColor: C.inverse,
|
|
4747
4371
|
changeLineTrailingSpaceColor: noColor,
|
|
4748
|
-
commonColor:
|
|
4372
|
+
commonColor: C.dim,
|
|
4749
4373
|
commonIndicator: " ",
|
|
4750
4374
|
commonLineTrailingSpaceColor: noColor,
|
|
4751
4375
|
compareKeys: undefined,
|
|
@@ -4754,7 +4378,7 @@ function getDefaultOptions() {
|
|
|
4754
4378
|
expand: false,
|
|
4755
4379
|
includeChangeCounts: false,
|
|
4756
4380
|
omitAnnotationLines: false,
|
|
4757
|
-
patchColor:
|
|
4381
|
+
patchColor: C.yellow,
|
|
4758
4382
|
printBasicPrototype: false,
|
|
4759
4383
|
truncateThreshold: DIFF_TRUNCATE_THRESHOLD_DEFAULT,
|
|
4760
4384
|
truncateAnnotation: "... Diff result is truncated",
|
|
@@ -5081,21 +4705,13 @@ function getObjectsDifference(a, b, formatOptions, options) {
|
|
|
5081
4705
|
}
|
|
5082
4706
|
|
|
5083
4707
|
var __defProp = Object.defineProperty;
|
|
5084
|
-
var
|
|
4708
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5085
4709
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5086
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
5087
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
5088
|
-
};
|
|
5089
4710
|
var __export = (target, all) => {
|
|
5090
4711
|
for (var name in all)
|
|
5091
4712
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5092
4713
|
};
|
|
5093
|
-
|
|
5094
|
-
// (disabled):util
|
|
5095
|
-
var require_util = __commonJS({
|
|
5096
|
-
"(disabled):util"() {
|
|
5097
|
-
}
|
|
5098
|
-
});
|
|
4714
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5099
4715
|
|
|
5100
4716
|
// lib/chai/utils/index.js
|
|
5101
4717
|
var utils_exports = {};
|
|
@@ -5107,6 +4723,7 @@ __export(utils_exports, {
|
|
|
5107
4723
|
checkError: () => check_error_exports,
|
|
5108
4724
|
compareByInspect: () => compareByInspect,
|
|
5109
4725
|
eql: () => deep_eql_default,
|
|
4726
|
+
events: () => events,
|
|
5110
4727
|
expectTypes: () => expectTypes,
|
|
5111
4728
|
flag: () => flag,
|
|
5112
4729
|
getActual: () => getActual,
|
|
@@ -5234,19 +4851,10 @@ __name(type, "type");
|
|
|
5234
4851
|
|
|
5235
4852
|
// node_modules/assertion-error/index.js
|
|
5236
4853
|
var canElideFrames = "captureStackTrace" in Error;
|
|
5237
|
-
var
|
|
5238
|
-
static {
|
|
5239
|
-
__name(this, "AssertionError");
|
|
5240
|
-
}
|
|
5241
|
-
message;
|
|
5242
|
-
get name() {
|
|
5243
|
-
return "AssertionError";
|
|
5244
|
-
}
|
|
5245
|
-
get ok() {
|
|
5246
|
-
return false;
|
|
5247
|
-
}
|
|
4854
|
+
var _AssertionError = class _AssertionError extends Error {
|
|
5248
4855
|
constructor(message = "Unspecified AssertionError", props, ssf) {
|
|
5249
4856
|
super(message);
|
|
4857
|
+
__publicField(this, "message");
|
|
5250
4858
|
this.message = message;
|
|
5251
4859
|
if (canElideFrames) {
|
|
5252
4860
|
Error.captureStackTrace(this, ssf || _AssertionError);
|
|
@@ -5257,6 +4865,12 @@ var AssertionError = class _AssertionError extends Error {
|
|
|
5257
4865
|
}
|
|
5258
4866
|
}
|
|
5259
4867
|
}
|
|
4868
|
+
get name() {
|
|
4869
|
+
return "AssertionError";
|
|
4870
|
+
}
|
|
4871
|
+
get ok() {
|
|
4872
|
+
return false;
|
|
4873
|
+
}
|
|
5260
4874
|
toJSON(stack) {
|
|
5261
4875
|
return {
|
|
5262
4876
|
...this,
|
|
@@ -5267,6 +4881,8 @@ var AssertionError = class _AssertionError extends Error {
|
|
|
5267
4881
|
};
|
|
5268
4882
|
}
|
|
5269
4883
|
};
|
|
4884
|
+
__name(_AssertionError, "AssertionError");
|
|
4885
|
+
var AssertionError = _AssertionError;
|
|
5270
4886
|
|
|
5271
4887
|
// lib/chai/utils/expectTypes.js
|
|
5272
4888
|
function expectTypes(obj, types) {
|
|
@@ -5555,10 +5171,8 @@ function mapToEntries(map) {
|
|
|
5555
5171
|
}
|
|
5556
5172
|
__name(mapToEntries, "mapToEntries");
|
|
5557
5173
|
function inspectMap(map, options) {
|
|
5558
|
-
|
|
5559
|
-
if (size <= 0) {
|
|
5174
|
+
if (map.size === 0)
|
|
5560
5175
|
return "Map{}";
|
|
5561
|
-
}
|
|
5562
5176
|
options.truncate -= 7;
|
|
5563
5177
|
return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`;
|
|
5564
5178
|
}
|
|
@@ -5654,19 +5268,6 @@ __name(inspectSymbol, "inspectSymbol");
|
|
|
5654
5268
|
|
|
5655
5269
|
// node_modules/loupe/lib/promise.js
|
|
5656
5270
|
var getPromiseValue = /* @__PURE__ */ __name(() => "Promise{\u2026}", "getPromiseValue");
|
|
5657
|
-
try {
|
|
5658
|
-
const { getPromiseDetails, kPending, kRejected } = process.binding("util");
|
|
5659
|
-
if (Array.isArray(getPromiseDetails(Promise.resolve()))) {
|
|
5660
|
-
getPromiseValue = /* @__PURE__ */ __name((value, options) => {
|
|
5661
|
-
const [state, innerValue] = getPromiseDetails(value);
|
|
5662
|
-
if (state === kPending) {
|
|
5663
|
-
return "Promise{<pending>}";
|
|
5664
|
-
}
|
|
5665
|
-
return `Promise${state === kRejected ? "!" : ""}{${options.inspect(innerValue, options)}}`;
|
|
5666
|
-
}, "getPromiseValue");
|
|
5667
|
-
}
|
|
5668
|
-
} catch (notNode) {
|
|
5669
|
-
}
|
|
5670
5271
|
var promise_default = getPromiseValue;
|
|
5671
5272
|
|
|
5672
5273
|
// node_modules/loupe/lib/object.js
|
|
@@ -5763,10 +5364,21 @@ function inspectAttribute([key, value], options) {
|
|
|
5763
5364
|
return `${options.stylize(String(key), "yellow")}=${options.stylize(`"${value}"`, "string")}`;
|
|
5764
5365
|
}
|
|
5765
5366
|
__name(inspectAttribute, "inspectAttribute");
|
|
5766
|
-
function
|
|
5767
|
-
return inspectList(collection, options,
|
|
5367
|
+
function inspectNodeCollection(collection, options) {
|
|
5368
|
+
return inspectList(collection, options, inspectNode, "\n");
|
|
5369
|
+
}
|
|
5370
|
+
__name(inspectNodeCollection, "inspectNodeCollection");
|
|
5371
|
+
function inspectNode(node, options) {
|
|
5372
|
+
switch (node.nodeType) {
|
|
5373
|
+
case 1:
|
|
5374
|
+
return inspectHTML(node, options);
|
|
5375
|
+
case 3:
|
|
5376
|
+
return options.inspect(node.data, options);
|
|
5377
|
+
default:
|
|
5378
|
+
return options.inspect(node, options);
|
|
5379
|
+
}
|
|
5768
5380
|
}
|
|
5769
|
-
__name(
|
|
5381
|
+
__name(inspectNode, "inspectNode");
|
|
5770
5382
|
function inspectHTML(element, options) {
|
|
5771
5383
|
const properties = element.getAttributeNames();
|
|
5772
5384
|
const name = element.tagName.toLowerCase();
|
|
@@ -5781,7 +5393,7 @@ function inspectHTML(element, options) {
|
|
|
5781
5393
|
}
|
|
5782
5394
|
options.truncate -= propertyContents.length;
|
|
5783
5395
|
const truncate2 = options.truncate;
|
|
5784
|
-
let children =
|
|
5396
|
+
let children = inspectNodeCollection(element.children, options);
|
|
5785
5397
|
if (children && children.length > truncate2) {
|
|
5786
5398
|
children = `${truncator}(${element.children.length})`;
|
|
5787
5399
|
}
|
|
@@ -5791,14 +5403,8 @@ __name(inspectHTML, "inspectHTML");
|
|
|
5791
5403
|
|
|
5792
5404
|
// node_modules/loupe/lib/index.js
|
|
5793
5405
|
var symbolsSupported = typeof Symbol === "function" && typeof Symbol.for === "function";
|
|
5794
|
-
var chaiInspect = symbolsSupported ? Symbol.for("chai/inspect") : "@@chai/inspect";
|
|
5795
|
-
var nodeInspect =
|
|
5796
|
-
try {
|
|
5797
|
-
const nodeUtil = require_util();
|
|
5798
|
-
nodeInspect = nodeUtil.inspect ? nodeUtil.inspect.custom : false;
|
|
5799
|
-
} catch (noNodeInspect) {
|
|
5800
|
-
nodeInspect = false;
|
|
5801
|
-
}
|
|
5406
|
+
var chaiInspect = symbolsSupported ? /* @__PURE__ */ Symbol.for("chai/inspect") : "@@chai/inspect";
|
|
5407
|
+
var nodeInspect = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
5802
5408
|
var constructorMap = /* @__PURE__ */ new WeakMap();
|
|
5803
5409
|
var stringTagMap = {};
|
|
5804
5410
|
var baseTypesMap = {
|
|
@@ -5840,15 +5446,15 @@ var baseTypesMap = {
|
|
|
5840
5446
|
DataView: /* @__PURE__ */ __name(() => "", "DataView"),
|
|
5841
5447
|
ArrayBuffer: /* @__PURE__ */ __name(() => "", "ArrayBuffer"),
|
|
5842
5448
|
Error: inspectObject2,
|
|
5843
|
-
HTMLCollection:
|
|
5844
|
-
NodeList:
|
|
5449
|
+
HTMLCollection: inspectNodeCollection,
|
|
5450
|
+
NodeList: inspectNodeCollection
|
|
5845
5451
|
};
|
|
5846
|
-
var inspectCustom = /* @__PURE__ */ __name((value, options, type3) => {
|
|
5452
|
+
var inspectCustom = /* @__PURE__ */ __name((value, options, type3, inspectFn) => {
|
|
5847
5453
|
if (chaiInspect in value && typeof value[chaiInspect] === "function") {
|
|
5848
5454
|
return value[chaiInspect](options);
|
|
5849
5455
|
}
|
|
5850
|
-
if (nodeInspect
|
|
5851
|
-
return value[nodeInspect](options.depth, options);
|
|
5456
|
+
if (nodeInspect in value && typeof value[nodeInspect] === "function") {
|
|
5457
|
+
return value[nodeInspect](options.depth, options, inspectFn);
|
|
5852
5458
|
}
|
|
5853
5459
|
if ("inspect" in value && typeof value.inspect === "function") {
|
|
5854
5460
|
return value.inspect(options.depth, options);
|
|
@@ -5873,7 +5479,7 @@ function inspect(value, opts = {}) {
|
|
|
5873
5479
|
return baseTypesMap[type3](value, options);
|
|
5874
5480
|
}
|
|
5875
5481
|
if (customInspect && value) {
|
|
5876
|
-
const output = inspectCustom(value, options, type3);
|
|
5482
|
+
const output = inspectCustom(value, options, type3, inspect);
|
|
5877
5483
|
if (output) {
|
|
5878
5484
|
if (typeof output === "string")
|
|
5879
5485
|
return output;
|
|
@@ -6463,12 +6069,7 @@ function getPathInfo(obj, path) {
|
|
|
6463
6069
|
__name(getPathInfo, "getPathInfo");
|
|
6464
6070
|
|
|
6465
6071
|
// lib/chai/assertion.js
|
|
6466
|
-
var
|
|
6467
|
-
static {
|
|
6468
|
-
__name(this, "Assertion");
|
|
6469
|
-
}
|
|
6470
|
-
/** @type {{}} */
|
|
6471
|
-
__flags = {};
|
|
6072
|
+
var _Assertion = class _Assertion {
|
|
6472
6073
|
/**
|
|
6473
6074
|
* Creates object for chaining.
|
|
6474
6075
|
* `Assertion` objects contain metadata in the form of flags. Three flags can
|
|
@@ -6505,6 +6106,8 @@ var Assertion = class _Assertion {
|
|
|
6505
6106
|
* @param {boolean} [lockSsfi] (optional) whether or not the ssfi flag is locked
|
|
6506
6107
|
*/
|
|
6507
6108
|
constructor(obj, msg, ssfi, lockSsfi) {
|
|
6109
|
+
/** @type {{}} */
|
|
6110
|
+
__publicField(this, "__flags", {});
|
|
6508
6111
|
flag(this, "ssfi", ssfi || _Assertion);
|
|
6509
6112
|
flag(this, "lockSsfi", lockSsfi);
|
|
6510
6113
|
flag(this, "object", obj);
|
|
@@ -6640,6 +6243,20 @@ var Assertion = class _Assertion {
|
|
|
6640
6243
|
flag(this, "object", val);
|
|
6641
6244
|
}
|
|
6642
6245
|
};
|
|
6246
|
+
__name(_Assertion, "Assertion");
|
|
6247
|
+
var Assertion = _Assertion;
|
|
6248
|
+
|
|
6249
|
+
// lib/chai/utils/events.js
|
|
6250
|
+
var events = new EventTarget();
|
|
6251
|
+
var _PluginEvent = class _PluginEvent extends Event {
|
|
6252
|
+
constructor(type3, name, fn) {
|
|
6253
|
+
super(type3);
|
|
6254
|
+
this.name = String(name);
|
|
6255
|
+
this.fn = fn;
|
|
6256
|
+
}
|
|
6257
|
+
};
|
|
6258
|
+
__name(_PluginEvent, "PluginEvent");
|
|
6259
|
+
var PluginEvent = _PluginEvent;
|
|
6643
6260
|
|
|
6644
6261
|
// lib/chai/utils/isProxyEnabled.js
|
|
6645
6262
|
function isProxyEnabled() {
|
|
@@ -6664,6 +6281,7 @@ function addProperty(ctx, name, getter) {
|
|
|
6664
6281
|
}, "propertyGetter"),
|
|
6665
6282
|
configurable: true
|
|
6666
6283
|
});
|
|
6284
|
+
events.dispatchEvent(new PluginEvent("addProperty", name, getter));
|
|
6667
6285
|
}
|
|
6668
6286
|
__name(addProperty, "addProperty");
|
|
6669
6287
|
|
|
@@ -6793,6 +6411,7 @@ function addMethod(ctx, name, method) {
|
|
|
6793
6411
|
}, "methodWrapper");
|
|
6794
6412
|
addLengthGuard(methodWrapper, name, false);
|
|
6795
6413
|
ctx[name] = proxify(methodWrapper, name);
|
|
6414
|
+
events.dispatchEvent(new PluginEvent("addMethod", name, method));
|
|
6796
6415
|
}
|
|
6797
6416
|
__name(addMethod, "addMethod");
|
|
6798
6417
|
|
|
@@ -6859,6 +6478,14 @@ var excludeNames = Object.getOwnPropertyNames(testFn).filter(function(name) {
|
|
|
6859
6478
|
});
|
|
6860
6479
|
var call = Function.prototype.call;
|
|
6861
6480
|
var apply = Function.prototype.apply;
|
|
6481
|
+
var _PluginAddChainableMethodEvent = class _PluginAddChainableMethodEvent extends PluginEvent {
|
|
6482
|
+
constructor(type3, name, fn, chainingBehavior) {
|
|
6483
|
+
super(type3, name, fn);
|
|
6484
|
+
this.chainingBehavior = chainingBehavior;
|
|
6485
|
+
}
|
|
6486
|
+
};
|
|
6487
|
+
__name(_PluginAddChainableMethodEvent, "PluginAddChainableMethodEvent");
|
|
6488
|
+
var PluginAddChainableMethodEvent = _PluginAddChainableMethodEvent;
|
|
6862
6489
|
function addChainableMethod(ctx, name, method, chainingBehavior) {
|
|
6863
6490
|
if (typeof chainingBehavior !== "function") {
|
|
6864
6491
|
chainingBehavior = /* @__PURE__ */ __name(function() {
|
|
@@ -6908,6 +6535,14 @@ function addChainableMethod(ctx, name, method, chainingBehavior) {
|
|
|
6908
6535
|
}, "chainableMethodGetter"),
|
|
6909
6536
|
configurable: true
|
|
6910
6537
|
});
|
|
6538
|
+
events.dispatchEvent(
|
|
6539
|
+
new PluginAddChainableMethodEvent(
|
|
6540
|
+
"addChainableMethod",
|
|
6541
|
+
name,
|
|
6542
|
+
method,
|
|
6543
|
+
chainingBehavior
|
|
6544
|
+
)
|
|
6545
|
+
);
|
|
6911
6546
|
}
|
|
6912
6547
|
__name(addChainableMethod, "addChainableMethod");
|
|
6913
6548
|
|
|
@@ -8029,7 +7664,7 @@ function closeTo(expected, delta, msg) {
|
|
|
8029
7664
|
);
|
|
8030
7665
|
}
|
|
8031
7666
|
new Assertion(expected, flagMsg, ssfi, true).is.numeric;
|
|
8032
|
-
const abs = /* @__PURE__ */ __name((x) => x <
|
|
7667
|
+
const abs = /* @__PURE__ */ __name((x) => x < 0 ? -x : x, "abs");
|
|
8033
7668
|
const strip = /* @__PURE__ */ __name((number) => parseFloat(parseFloat(number).toPrecision(12)), "strip");
|
|
8034
7669
|
this.assert(
|
|
8035
7670
|
strip(abs(obj - expected)) <= delta,
|
|
@@ -9230,257 +8865,17 @@ function use(fn) {
|
|
|
9230
8865
|
return exports;
|
|
9231
8866
|
}
|
|
9232
8867
|
__name(use, "use");
|
|
9233
|
-
/*!
|
|
9234
|
-
* Chai - flag utility
|
|
9235
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9236
|
-
* MIT Licensed
|
|
9237
|
-
*/
|
|
9238
|
-
/*!
|
|
9239
|
-
* Chai - test utility
|
|
9240
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9241
|
-
* MIT Licensed
|
|
9242
|
-
*/
|
|
9243
|
-
/*!
|
|
9244
|
-
* Chai - expectTypes utility
|
|
9245
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9246
|
-
* MIT Licensed
|
|
9247
|
-
*/
|
|
9248
|
-
/*!
|
|
9249
|
-
* Chai - getActual utility
|
|
9250
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9251
|
-
* MIT Licensed
|
|
9252
|
-
*/
|
|
9253
|
-
/*!
|
|
9254
|
-
* Chai - message composition utility
|
|
9255
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9256
|
-
* MIT Licensed
|
|
9257
|
-
*/
|
|
9258
|
-
/*!
|
|
9259
|
-
* Chai - transferFlags utility
|
|
9260
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9261
|
-
* MIT Licensed
|
|
9262
|
-
*/
|
|
9263
|
-
/*!
|
|
9264
|
-
* chai
|
|
9265
|
-
* http://chaijs.com
|
|
9266
|
-
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9267
|
-
* MIT Licensed
|
|
9268
|
-
*/
|
|
9269
|
-
/*!
|
|
9270
|
-
* Chai - isProxyEnabled helper
|
|
9271
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9272
|
-
* MIT Licensed
|
|
9273
|
-
*/
|
|
9274
|
-
/*!
|
|
9275
|
-
* Chai - addProperty utility
|
|
9276
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9277
|
-
* MIT Licensed
|
|
9278
|
-
*/
|
|
9279
|
-
/*!
|
|
9280
|
-
* Chai - addLengthGuard utility
|
|
9281
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9282
|
-
* MIT Licensed
|
|
9283
|
-
*/
|
|
9284
|
-
/*!
|
|
9285
|
-
* Chai - getProperties utility
|
|
9286
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9287
|
-
* MIT Licensed
|
|
9288
|
-
*/
|
|
9289
|
-
/*!
|
|
9290
|
-
* Chai - proxify utility
|
|
9291
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9292
|
-
* MIT Licensed
|
|
9293
|
-
*/
|
|
9294
|
-
/*!
|
|
9295
|
-
* Chai - addMethod utility
|
|
9296
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9297
|
-
* MIT Licensed
|
|
9298
|
-
*/
|
|
9299
|
-
/*!
|
|
9300
|
-
* Chai - overwriteProperty utility
|
|
9301
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9302
|
-
* MIT Licensed
|
|
9303
|
-
*/
|
|
9304
|
-
/*!
|
|
9305
|
-
* Chai - overwriteMethod utility
|
|
9306
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9307
|
-
* MIT Licensed
|
|
9308
|
-
*/
|
|
9309
|
-
/*!
|
|
9310
|
-
* Chai - addChainingMethod utility
|
|
9311
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9312
|
-
* MIT Licensed
|
|
9313
|
-
*/
|
|
9314
|
-
/*!
|
|
9315
|
-
* Chai - overwriteChainableMethod utility
|
|
9316
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9317
|
-
* MIT Licensed
|
|
9318
|
-
*/
|
|
9319
|
-
/*!
|
|
9320
|
-
* Chai - compareByInspect utility
|
|
9321
|
-
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
9322
|
-
* MIT Licensed
|
|
9323
|
-
*/
|
|
9324
|
-
/*!
|
|
9325
|
-
* Chai - getOwnEnumerablePropertySymbols utility
|
|
9326
|
-
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
9327
|
-
* MIT Licensed
|
|
9328
|
-
*/
|
|
9329
|
-
/*!
|
|
9330
|
-
* Chai - getOwnEnumerableProperties utility
|
|
9331
|
-
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
9332
|
-
* MIT Licensed
|
|
9333
|
-
*/
|
|
9334
|
-
/*!
|
|
9335
|
-
* Chai - isNaN utility
|
|
9336
|
-
* Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
|
9337
|
-
* MIT Licensed
|
|
9338
|
-
*/
|
|
9339
|
-
/*!
|
|
9340
|
-
* chai
|
|
9341
|
-
* Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
|
|
9342
|
-
* MIT Licensed
|
|
9343
|
-
*/
|
|
9344
|
-
/*!
|
|
9345
|
-
* chai
|
|
9346
|
-
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
9347
|
-
* MIT Licensed
|
|
9348
|
-
*/
|
|
9349
|
-
/*! Bundled license information:
|
|
9350
|
-
|
|
9351
|
-
deep-eql/index.js:
|
|
9352
|
-
(*!
|
|
9353
|
-
* deep-eql
|
|
9354
|
-
* Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
|
|
9355
|
-
* MIT Licensed
|
|
9356
|
-
*)
|
|
9357
|
-
(*!
|
|
9358
|
-
* Check to see if the MemoizeMap has recorded a result of the two operands
|
|
9359
|
-
*
|
|
9360
|
-
* @param {Mixed} leftHandOperand
|
|
9361
|
-
* @param {Mixed} rightHandOperand
|
|
9362
|
-
* @param {MemoizeMap} memoizeMap
|
|
9363
|
-
* @returns {Boolean|null} result
|
|
9364
|
-
*)
|
|
9365
|
-
(*!
|
|
9366
|
-
* Set the result of the equality into the MemoizeMap
|
|
9367
|
-
*
|
|
9368
|
-
* @param {Mixed} leftHandOperand
|
|
9369
|
-
* @param {Mixed} rightHandOperand
|
|
9370
|
-
* @param {MemoizeMap} memoizeMap
|
|
9371
|
-
* @param {Boolean} result
|
|
9372
|
-
*)
|
|
9373
|
-
(*!
|
|
9374
|
-
* Primary Export
|
|
9375
|
-
*)
|
|
9376
|
-
(*!
|
|
9377
|
-
* The main logic of the `deepEqual` function.
|
|
9378
|
-
*
|
|
9379
|
-
* @param {Mixed} leftHandOperand
|
|
9380
|
-
* @param {Mixed} rightHandOperand
|
|
9381
|
-
* @param {Object} [options] (optional) Additional options
|
|
9382
|
-
* @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
|
|
9383
|
-
* @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
|
|
9384
|
-
complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
|
|
9385
|
-
references to blow the stack.
|
|
9386
|
-
* @return {Boolean} equal match
|
|
9387
|
-
*)
|
|
9388
|
-
(*!
|
|
9389
|
-
* Compare two Regular Expressions for equality.
|
|
9390
|
-
*
|
|
9391
|
-
* @param {RegExp} leftHandOperand
|
|
9392
|
-
* @param {RegExp} rightHandOperand
|
|
9393
|
-
* @return {Boolean} result
|
|
9394
|
-
*)
|
|
9395
|
-
(*!
|
|
9396
|
-
* Compare two Sets/Maps for equality. Faster than other equality functions.
|
|
9397
|
-
*
|
|
9398
|
-
* @param {Set} leftHandOperand
|
|
9399
|
-
* @param {Set} rightHandOperand
|
|
9400
|
-
* @param {Object} [options] (Optional)
|
|
9401
|
-
* @return {Boolean} result
|
|
9402
|
-
*)
|
|
9403
|
-
(*!
|
|
9404
|
-
* Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
|
|
9405
|
-
*
|
|
9406
|
-
* @param {Iterable} leftHandOperand
|
|
9407
|
-
* @param {Iterable} rightHandOperand
|
|
9408
|
-
* @param {Object} [options] (Optional)
|
|
9409
|
-
* @return {Boolean} result
|
|
9410
|
-
*)
|
|
9411
|
-
(*!
|
|
9412
|
-
* Simple equality for generator objects such as those returned by generator functions.
|
|
9413
|
-
*
|
|
9414
|
-
* @param {Iterable} leftHandOperand
|
|
9415
|
-
* @param {Iterable} rightHandOperand
|
|
9416
|
-
* @param {Object} [options] (Optional)
|
|
9417
|
-
* @return {Boolean} result
|
|
9418
|
-
*)
|
|
9419
|
-
(*!
|
|
9420
|
-
* Determine if the given object has an @@iterator function.
|
|
9421
|
-
*
|
|
9422
|
-
* @param {Object} target
|
|
9423
|
-
* @return {Boolean} `true` if the object has an @@iterator function.
|
|
9424
|
-
*)
|
|
9425
|
-
(*!
|
|
9426
|
-
* Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
|
|
9427
|
-
* This will consume the iterator - which could have side effects depending on the @@iterator implementation.
|
|
9428
|
-
*
|
|
9429
|
-
* @param {Object} target
|
|
9430
|
-
* @returns {Array} an array of entries from the @@iterator function
|
|
9431
|
-
*)
|
|
9432
|
-
(*!
|
|
9433
|
-
* Gets all entries from a Generator. This will consume the generator - which could have side effects.
|
|
9434
|
-
*
|
|
9435
|
-
* @param {Generator} target
|
|
9436
|
-
* @returns {Array} an array of entries from the Generator.
|
|
9437
|
-
*)
|
|
9438
|
-
(*!
|
|
9439
|
-
* Gets all own and inherited enumerable keys from a target.
|
|
9440
|
-
*
|
|
9441
|
-
* @param {Object} target
|
|
9442
|
-
* @returns {Array} an array of own and inherited enumerable keys from the target.
|
|
9443
|
-
*)
|
|
9444
|
-
(*!
|
|
9445
|
-
* Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
|
|
9446
|
-
* each key. If any value of the given key is not equal, the function will return false (early).
|
|
9447
|
-
*
|
|
9448
|
-
* @param {Mixed} leftHandOperand
|
|
9449
|
-
* @param {Mixed} rightHandOperand
|
|
9450
|
-
* @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
|
|
9451
|
-
* @param {Object} [options] (Optional)
|
|
9452
|
-
* @return {Boolean} result
|
|
9453
|
-
*)
|
|
9454
|
-
(*!
|
|
9455
|
-
* Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
|
|
9456
|
-
* for each enumerable key in the object.
|
|
9457
|
-
*
|
|
9458
|
-
* @param {Mixed} leftHandOperand
|
|
9459
|
-
* @param {Mixed} rightHandOperand
|
|
9460
|
-
* @param {Object} [options] (Optional)
|
|
9461
|
-
* @return {Boolean} result
|
|
9462
|
-
*)
|
|
9463
|
-
(*!
|
|
9464
|
-
* Returns true if the argument is a primitive.
|
|
9465
|
-
*
|
|
9466
|
-
* This intentionally returns true for all objects that can be compared by reference,
|
|
9467
|
-
* including functions and symbols.
|
|
9468
|
-
*
|
|
9469
|
-
* @param {Mixed} value
|
|
9470
|
-
* @return {Boolean} result
|
|
9471
|
-
*)
|
|
9472
|
-
*/
|
|
9473
8868
|
|
|
9474
8869
|
const MATCHERS_OBJECT = Symbol.for("matchers-object");
|
|
9475
8870
|
const JEST_MATCHERS_OBJECT = Symbol.for("$$jest-matchers-object");
|
|
9476
8871
|
const GLOBAL_EXPECT = Symbol.for("expect-global");
|
|
9477
8872
|
const ASYMMETRIC_MATCHERS_OBJECT = Symbol.for("asymmetric-matchers-object");
|
|
9478
8873
|
|
|
9479
|
-
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
8874
|
+
C.green;
|
|
8875
|
+
C.red;
|
|
8876
|
+
C.inverse;
|
|
8877
|
+
C.bold;
|
|
8878
|
+
C.dim;
|
|
9484
8879
|
|
|
9485
8880
|
// Extracted out of jasmine 2.5.2
|
|
9486
8881
|
function equals(a, b, customTesters, strictCheck) {
|
|
@@ -9490,24 +8885,24 @@ function equals(a, b, customTesters, strictCheck) {
|
|
|
9490
8885
|
function isAsymmetric(obj) {
|
|
9491
8886
|
return !!obj && typeof obj === "object" && "asymmetricMatch" in obj && isA("Function", obj.asymmetricMatch);
|
|
9492
8887
|
}
|
|
9493
|
-
function asymmetricMatch(a, b) {
|
|
8888
|
+
function asymmetricMatch(a, b, customTesters) {
|
|
9494
8889
|
const asymmetricA = isAsymmetric(a);
|
|
9495
8890
|
const asymmetricB = isAsymmetric(b);
|
|
9496
8891
|
if (asymmetricA && asymmetricB) {
|
|
9497
8892
|
return undefined;
|
|
9498
8893
|
}
|
|
9499
8894
|
if (asymmetricA) {
|
|
9500
|
-
return a.asymmetricMatch(b);
|
|
8895
|
+
return a.asymmetricMatch(b, customTesters);
|
|
9501
8896
|
}
|
|
9502
8897
|
if (asymmetricB) {
|
|
9503
|
-
return b.asymmetricMatch(a);
|
|
8898
|
+
return b.asymmetricMatch(a, customTesters);
|
|
9504
8899
|
}
|
|
9505
8900
|
}
|
|
9506
8901
|
// Equality function lovingly adapted from isEqual in
|
|
9507
8902
|
// [Underscore](http://underscorejs.org)
|
|
9508
8903
|
function eq(a, b, aStack, bStack, customTesters, hasKey) {
|
|
9509
8904
|
let result = true;
|
|
9510
|
-
const asymmetricResult = asymmetricMatch(a, b);
|
|
8905
|
+
const asymmetricResult = asymmetricMatch(a, b, customTesters);
|
|
9511
8906
|
if (asymmetricResult !== undefined) {
|
|
9512
8907
|
return asymmetricResult;
|
|
9513
8908
|
}
|
|
@@ -9651,7 +9046,7 @@ function hasDefinedKey(obj, key) {
|
|
|
9651
9046
|
return hasKey$1(obj, key) && obj[key] !== undefined;
|
|
9652
9047
|
}
|
|
9653
9048
|
function hasKey$1(obj, key) {
|
|
9654
|
-
return Object.
|
|
9049
|
+
return Object.hasOwn(obj, key);
|
|
9655
9050
|
}
|
|
9656
9051
|
function isA(typeName, value) {
|
|
9657
9052
|
return Object.prototype.toString.apply(value) === `[object ${typeName}]`;
|
|
@@ -9660,7 +9055,7 @@ function isDomNode(obj) {
|
|
|
9660
9055
|
return obj !== null && typeof obj === "object" && "nodeType" in obj && typeof obj.nodeType === "number" && "nodeName" in obj && typeof obj.nodeName === "string" && "isEqualNode" in obj && typeof obj.isEqualNode === "function";
|
|
9661
9056
|
}
|
|
9662
9057
|
|
|
9663
|
-
if (!Object.
|
|
9058
|
+
if (!Object.hasOwn(globalThis, MATCHERS_OBJECT)) {
|
|
9664
9059
|
const globalState = new WeakMap();
|
|
9665
9060
|
const matchers = Object.create(null);
|
|
9666
9061
|
const customEqualityTesters = [];
|
|
@@ -10963,15 +10358,20 @@ let adminApiClient;
|
|
|
10963
10358
|
let storeApiClient;
|
|
10964
10359
|
function getAdminApiClient() {
|
|
10965
10360
|
if (!adminApiClient) {
|
|
10361
|
+
const credentials = process.env.SHOPWARE_ADMIN_CLIENT_SECRET ? {
|
|
10362
|
+
grant_type: "client_credentials",
|
|
10363
|
+
client_id: process.env.SHOPWARE_ADMIN_CLIENT_ID || "",
|
|
10364
|
+
client_secret: process.env.SHOPWARE_ADMIN_CLIENT_SECRET
|
|
10365
|
+
} : {
|
|
10366
|
+
grant_type: "password",
|
|
10367
|
+
client_id: "administration",
|
|
10368
|
+
scope: "write",
|
|
10369
|
+
username: process.env.SHOPWARE_ADMIN_USERNAME || "",
|
|
10370
|
+
password: process.env.SHOPWARE_ADMIN_PASSWORD || ""
|
|
10371
|
+
};
|
|
10966
10372
|
adminApiClient = createAdminAPIClient({
|
|
10967
10373
|
baseURL: `${process.env.OPENAPI_JSON_URL}/api`,
|
|
10968
|
-
credentials
|
|
10969
|
-
grant_type: "password",
|
|
10970
|
-
client_id: "administration",
|
|
10971
|
-
scopes: "write",
|
|
10972
|
-
username: process.env.SHOPWARE_ADMIN_USERNAME || "",
|
|
10973
|
-
password: process.env.SHOPWARE_ADMIN_PASSWORD || ""
|
|
10974
|
-
}
|
|
10374
|
+
credentials
|
|
10975
10375
|
});
|
|
10976
10376
|
}
|
|
10977
10377
|
return adminApiClient;
|
|
@@ -10986,6 +10386,29 @@ function getStoreApiClient() {
|
|
|
10986
10386
|
return storeApiClient;
|
|
10987
10387
|
}
|
|
10988
10388
|
|
|
10389
|
+
function validateAdminEnvVars(env) {
|
|
10390
|
+
const hasClientSecret = !!env.SHOPWARE_ADMIN_CLIENT_SECRET?.trim();
|
|
10391
|
+
const hasClientId = !!env.SHOPWARE_ADMIN_CLIENT_ID?.trim();
|
|
10392
|
+
if (hasClientSecret || hasClientId) {
|
|
10393
|
+
const missing2 = [];
|
|
10394
|
+
if (!hasClientId) {
|
|
10395
|
+
missing2.push("SHOPWARE_ADMIN_CLIENT_ID");
|
|
10396
|
+
}
|
|
10397
|
+
if (!hasClientSecret) {
|
|
10398
|
+
missing2.push("SHOPWARE_ADMIN_CLIENT_SECRET");
|
|
10399
|
+
}
|
|
10400
|
+
return missing2;
|
|
10401
|
+
}
|
|
10402
|
+
const missing = [];
|
|
10403
|
+
if (!env.SHOPWARE_ADMIN_USERNAME) {
|
|
10404
|
+
missing.push("SHOPWARE_ADMIN_USERNAME");
|
|
10405
|
+
}
|
|
10406
|
+
if (!env.SHOPWARE_ADMIN_PASSWORD) {
|
|
10407
|
+
missing.push("SHOPWARE_ADMIN_PASSWORD");
|
|
10408
|
+
}
|
|
10409
|
+
return missing;
|
|
10410
|
+
}
|
|
10411
|
+
|
|
10989
10412
|
const SCHEMA_ENDPOINT = "_info/openapi3.json";
|
|
10990
10413
|
const STORE_API_ENDPOINT = `/store-api/${SCHEMA_ENDPOINT}`;
|
|
10991
10414
|
const ADMIN_API_ENDPOINT = `/api/${SCHEMA_ENDPOINT}`;
|
|
@@ -10999,16 +10422,7 @@ async function loadSchema(args) {
|
|
|
10999
10422
|
const isAdminApi = args.apiType === "admin";
|
|
11000
10423
|
const outputFilename = args.filename ? args.filename : `${args.apiType}ApiSchema.json`;
|
|
11001
10424
|
const OPENAPI_JSON_URL = process.env.OPENAPI_JSON_URL;
|
|
11002
|
-
const
|
|
11003
|
-
if (isAdminApi) {
|
|
11004
|
-
requiredEnvVars.push("SHOPWARE_ADMIN_USERNAME");
|
|
11005
|
-
requiredEnvVars.push("SHOPWARE_ADMIN_PASSWORD");
|
|
11006
|
-
} else {
|
|
11007
|
-
requiredEnvVars.push("OPENAPI_ACCESS_KEY");
|
|
11008
|
-
}
|
|
11009
|
-
const missingEnvVars = requiredEnvVars.filter(
|
|
11010
|
-
(envVar) => !process.env[envVar]
|
|
11011
|
-
);
|
|
10425
|
+
const missingEnvVars = isAdminApi ? validateAdminEnvVars(process.env) : process.env.OPENAPI_ACCESS_KEY ? [] : ["OPENAPI_ACCESS_KEY"];
|
|
11012
10426
|
try {
|
|
11013
10427
|
if (missingEnvVars.length || !OPENAPI_JSON_URL) {
|
|
11014
10428
|
console.error(
|
|
@@ -11093,7 +10507,7 @@ function isUppercase(char = "") {
|
|
|
11093
10507
|
return char !== char.toLowerCase();
|
|
11094
10508
|
}
|
|
11095
10509
|
function splitByCase(str, separators) {
|
|
11096
|
-
const splitters = STR_SPLITTERS;
|
|
10510
|
+
const splitters = separators ?? STR_SPLITTERS;
|
|
11097
10511
|
const parts = [];
|
|
11098
10512
|
if (!str || typeof str !== "string") {
|
|
11099
10513
|
return parts;
|
|
@@ -11136,10 +10550,10 @@ function upperFirst(str) {
|
|
|
11136
10550
|
return str ? str[0].toUpperCase() + str.slice(1) : "";
|
|
11137
10551
|
}
|
|
11138
10552
|
function pascalCase(str, opts) {
|
|
11139
|
-
return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => upperFirst(p)).join("") : "";
|
|
10553
|
+
return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => upperFirst(opts?.normalize ? p.toLowerCase() : p)).join("") : "";
|
|
11140
10554
|
}
|
|
11141
10555
|
function kebabCase(str, joiner) {
|
|
11142
|
-
return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => p.toLowerCase()).join(joiner) : "";
|
|
10556
|
+
return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => p.toLowerCase()).join(joiner ?? "-") : "";
|
|
11143
10557
|
}
|
|
11144
10558
|
function snakeCase(str) {
|
|
11145
10559
|
return kebabCase(str || "", "_");
|
|
@@ -11353,4 +10767,4 @@ async function validateJson(args) {
|
|
|
11353
10767
|
}
|
|
11354
10768
|
}
|
|
11355
10769
|
|
|
11356
|
-
export {
|
|
10770
|
+
export { generate as a, commonjsGlobal as c, getAugmentedNamespace as g, loadSchema as l, validateJson as v };
|