fumadocs-openapi 10.6.7 → 10.7.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/css/generated/shared.css +2 -5
- package/dist/_virtual/_rolldown/runtime.js +2 -1
- package/dist/i18n.js +3 -2
- package/dist/node_modules/.pnpm/@fastify_deepmerge@3.2.1/node_modules/@fastify/deepmerge/index.js +108 -0
- package/dist/node_modules/.pnpm/@scalar_helpers@0.4.3/node_modules/@scalar/helpers/dist/general/create-limiter.js +43 -0
- package/dist/node_modules/.pnpm/@scalar_helpers@0.4.3/node_modules/@scalar/helpers/dist/object/is-object.js +26 -0
- package/dist/node_modules/.pnpm/@scalar_helpers@0.4.3/node_modules/@scalar/helpers/dist/object/prevent-pollution.js +33 -0
- package/dist/node_modules/.pnpm/@scalar_helpers@0.4.3/node_modules/@scalar/helpers/dist/queue/queue.js +106 -0
- package/dist/node_modules/.pnpm/@scalar_helpers@0.4.3/node_modules/@scalar/helpers/dist/string/generate-hash.js +120 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/bundle/bundle.js +346 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js +73 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js +3 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +1 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js +51 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/bundle/value-generator.js +88 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/convert-to-local-ref.js +24 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/escape-json-pointer.js +11 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/get-schemas.js +44 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/get-segments-from-path.js +10 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/get-value-by-path.js +42 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/is-file-path.js +23 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/is-http-url.js +23 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/is-json-object.js +28 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/is-yaml.js +21 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/normalize.js +26 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/resolve-reference-path.js +30 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/set-value-at-path.js +70 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/to-relative-path.js +33 -0
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.5/node_modules/@scalar/json-magic/dist/helpers/unescape-json-pointer.js +12 -0
- package/dist/node_modules/.pnpm/@scalar_openapi-upgrader@0.2.4/node_modules/@scalar/openapi-upgrader/dist/2.0-to-3.0/upgrade-from-two-to-three.js +487 -0
- package/dist/node_modules/.pnpm/@scalar_openapi-upgrader@0.2.4/node_modules/@scalar/openapi-upgrader/dist/3.0-to-3.1/upgrade-from-three-to-three-one.js +95 -0
- package/dist/node_modules/.pnpm/@scalar_openapi-upgrader@0.2.4/node_modules/@scalar/openapi-upgrader/dist/3.1-to-3.2/upgrade-from-three-one-to-three-two.js +59 -0
- package/dist/node_modules/.pnpm/@scalar_openapi-upgrader@0.2.4/node_modules/@scalar/openapi-upgrader/dist/helpers/traverse.js +25 -0
- package/dist/node_modules/.pnpm/@scalar_openapi-upgrader@0.2.4/node_modules/@scalar/openapi-upgrader/dist/upgrade.js +15 -0
- package/dist/node_modules/.pnpm/fast-content-type-parse@3.0.0/node_modules/fast-content-type-parse/index.js +115 -0
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.js +19 -0
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +430 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/compose-collection.js +50 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/compose-doc.js +39 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/compose-node.js +85 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/compose-scalar.js +57 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/composer.js +193 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/resolve-block-map.js +82 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +173 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +40 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/resolve-end.js +36 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +153 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +204 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/resolve-props.js +105 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/util-contains-newline.js +27 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +25 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +10 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/compose/util-map-includes.js +10 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/doc/Document.js +277 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/doc/anchors.js +57 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/doc/applyReviver.js +38 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/doc/createNode.js +61 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/doc/directives.js +163 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/errors.js +48 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/index.js +16 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/log.js +6 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/Alias.js +91 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/Collection.js +117 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/Node.js +32 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/Pair.js +29 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/YAMLMap.js +106 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +104 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +49 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/identity.js +33 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/toJS.js +35 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/parse/cst-scalar.js +3 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/parse/cst-visit.js +89 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/parse/cst.js +40 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/parse/lexer.js +517 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/parse/line-counter.js +45 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/parse/parser.js +852 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/public-api.js +44 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/Schema.js +27 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/common/map.js +16 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/common/null.js +13 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/common/seq.js +16 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/core/bool.js +17 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/core/float.js +38 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/core/int.js +37 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/json/schema.js +61 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/tags.js +81 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +44 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +24 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +41 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +70 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +36 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +60 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +56 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +65 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +79 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +111 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringify.js +105 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +116 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringifyComment.js +16 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +59 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +19 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringifyPair.js +95 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringifyString.js +222 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/visit.js +187 -0
- package/dist/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/index.js +16 -0
- package/dist/playground/components/oauth-dialog.js +17 -11
- package/dist/playground/components/result-display.js +3 -2
- package/dist/playground/schema.js +1 -1
- package/dist/scalar/client.js +15 -24
- package/dist/ui/operation/get-example-requests.js +1 -1
- package/dist/ui/operation/response-tabs.js +1 -1
- package/dist/utils/document/process.js +5 -3
- package/dist/utils/schema/sample.js +442 -0
- package/package.json +26 -25
package/css/generated/shared.css
CHANGED
|
@@ -337,6 +337,7 @@
|
|
|
337
337
|
@source inline("font-semibold");
|
|
338
338
|
@source inline("for");
|
|
339
339
|
@source inline("form");
|
|
340
|
+
@source inline("formData");
|
|
340
341
|
@source inline("format");
|
|
341
342
|
@source inline("forwardRef");
|
|
342
343
|
@source inline("found");
|
|
@@ -555,7 +556,6 @@
|
|
|
555
556
|
@source inline("never");
|
|
556
557
|
@source inline("new");
|
|
557
558
|
@source inline("newKey");
|
|
558
|
-
@source inline("next-themes");
|
|
559
559
|
@source inline("no-cache");
|
|
560
560
|
@source inline("node");
|
|
561
561
|
@source inline("node:path");
|
|
@@ -591,7 +591,6 @@
|
|
|
591
591
|
@source inline("openApiData");
|
|
592
592
|
@source inline("openIdConnect");
|
|
593
593
|
@source inline("openapi");
|
|
594
|
-
@source inline("openapi-sampler");
|
|
595
594
|
@source inline("openapi-types");
|
|
596
595
|
@source inline("openid");
|
|
597
596
|
@source inline("operation");
|
|
@@ -708,7 +707,6 @@
|
|
|
708
707
|
@source inline("raw");
|
|
709
708
|
@source inline("rawSearch");
|
|
710
709
|
@source inline("react");
|
|
711
|
-
@source inline("react-hook-form");
|
|
712
710
|
@source inline("react-hooks/exhaustive-deps");
|
|
713
711
|
@source inline("react/jsx-runtime");
|
|
714
712
|
@source inline("read");
|
|
@@ -1037,12 +1035,11 @@
|
|
|
1037
1035
|
@source inline("usageTabs");
|
|
1038
1036
|
@source inline("usages");
|
|
1039
1037
|
@source inline("use");
|
|
1040
|
-
@source inline("
|
|
1038
|
+
@source inline("useApiClient");
|
|
1041
1039
|
@source inline("useApiContext");
|
|
1042
1040
|
@source inline("useAuth");
|
|
1043
1041
|
@source inline("useCopyButton");
|
|
1044
1042
|
@source inline("useFieldValue");
|
|
1045
|
-
@source inline("useForm");
|
|
1046
1043
|
@source inline("useI18n");
|
|
1047
1044
|
@source inline("useMemo");
|
|
1048
1045
|
@source inline("useNamespace");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
//#region \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
3
4
|
var __exportAll = (all, no_symbols) => {
|
|
4
5
|
let target = {};
|
|
5
6
|
for (var name in all) __defProp(target, name, {
|
|
@@ -10,4 +11,4 @@ var __exportAll = (all, no_symbols) => {
|
|
|
10
11
|
return target;
|
|
11
12
|
};
|
|
12
13
|
//#endregion
|
|
13
|
-
export { __exportAll };
|
|
14
|
+
export { __commonJSMin, __exportAll };
|
package/dist/i18n.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { require_deepmerge } from "./node_modules/.pnpm/@fastify_deepmerge@3.2.1/node_modules/@fastify/deepmerge/index.js";
|
|
2
2
|
//#region src/i18n.ts
|
|
3
|
+
var import_deepmerge = require_deepmerge();
|
|
3
4
|
const defaultTranslations = {
|
|
4
5
|
loading: "loading...",
|
|
5
6
|
empty: "Empty",
|
|
@@ -95,7 +96,7 @@ const defaultTranslations = {
|
|
|
95
96
|
playgroundInputUnset: "Unset"
|
|
96
97
|
};
|
|
97
98
|
function defineI18nOpenAPI(config, translations) {
|
|
98
|
-
const dm = deepmerge();
|
|
99
|
+
const dm = (0, import_deepmerge.deepmerge)();
|
|
99
100
|
return {
|
|
100
101
|
...config,
|
|
101
102
|
provider(locale = config.defaultLanguage) {
|
package/dist/node_modules/.pnpm/@fastify_deepmerge@3.2.1/node_modules/@fastify/deepmerge/index.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@fastify+deepmerge@3.2.1/node_modules/@fastify/deepmerge/index.js
|
|
3
|
+
var require_deepmerge = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
const JSON_PROTO = Object.getPrototypeOf({});
|
|
5
|
+
function defaultIsMergeableObjectFactory() {
|
|
6
|
+
return function defaultIsMergeableObject(value) {
|
|
7
|
+
return typeof value === "object" && value !== null && !(value instanceof RegExp) && !(value instanceof Date);
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function deepmergeConstructor(options) {
|
|
11
|
+
function isNotPrototypeKey(value) {
|
|
12
|
+
return value !== "constructor" && value !== "prototype" && value !== "__proto__";
|
|
13
|
+
}
|
|
14
|
+
function cloneArray(value) {
|
|
15
|
+
let i = 0;
|
|
16
|
+
const il = value.length;
|
|
17
|
+
const result = new Array(il);
|
|
18
|
+
for (; i < il; ++i) result[i] = clone(value[i]);
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
function cloneObject(target) {
|
|
22
|
+
const result = {};
|
|
23
|
+
if (cloneProtoObject && Object.getPrototypeOf(target) !== JSON_PROTO) return cloneProtoObject(target);
|
|
24
|
+
const targetKeys = getKeys(target);
|
|
25
|
+
let i, il, key;
|
|
26
|
+
for (i = 0, il = targetKeys.length; i < il; ++i) isNotPrototypeKey(key = targetKeys[i]) && (result[key] = clone(target[key]));
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
function concatArrays(target, source) {
|
|
30
|
+
const tl = target.length;
|
|
31
|
+
const sl = source.length;
|
|
32
|
+
let i = 0;
|
|
33
|
+
const result = new Array(tl + sl);
|
|
34
|
+
for (; i < tl; ++i) result[i] = clone(target[i]);
|
|
35
|
+
for (i = 0; i < sl; ++i) result[i + tl] = clone(source[i]);
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
const propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
39
|
+
function getSymbolsAndKeys(value) {
|
|
40
|
+
const result = Object.keys(value);
|
|
41
|
+
const keys = Object.getOwnPropertySymbols(value);
|
|
42
|
+
for (let i = 0, il = keys.length; i < il; ++i) propertyIsEnumerable.call(value, keys[i]) && result.push(keys[i]);
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
const getKeys = options?.symbols ? getSymbolsAndKeys : Object.keys;
|
|
46
|
+
const cloneProtoObject = typeof options?.cloneProtoObject === "function" ? options.cloneProtoObject : void 0;
|
|
47
|
+
const isMergeableObject = typeof options?.isMergeableObject === "function" ? options.isMergeableObject : defaultIsMergeableObjectFactory();
|
|
48
|
+
const onlyDefinedProperties = options?.onlyDefinedProperties === true;
|
|
49
|
+
function isPrimitive(value) {
|
|
50
|
+
return typeof value !== "object" || value === null;
|
|
51
|
+
}
|
|
52
|
+
const mergeArray = options && typeof options.mergeArray === "function" ? options.mergeArray({
|
|
53
|
+
clone,
|
|
54
|
+
deepmerge: _deepmerge,
|
|
55
|
+
getKeys,
|
|
56
|
+
isMergeableObject
|
|
57
|
+
}) : concatArrays;
|
|
58
|
+
function clone(entry) {
|
|
59
|
+
return isMergeableObject(entry) ? Array.isArray(entry) ? cloneArray(entry) : cloneObject(entry) : entry;
|
|
60
|
+
}
|
|
61
|
+
function mergeObject(target, source) {
|
|
62
|
+
const result = {};
|
|
63
|
+
const targetKeys = getKeys(target);
|
|
64
|
+
const sourceKeys = getKeys(source);
|
|
65
|
+
let i, il, key;
|
|
66
|
+
for (i = 0, il = targetKeys.length; i < il; ++i) isNotPrototypeKey(key = targetKeys[i]) && sourceKeys.indexOf(key) === -1 && (result[key] = clone(target[key]));
|
|
67
|
+
for (i = 0, il = sourceKeys.length; i < il; ++i) {
|
|
68
|
+
if (!isNotPrototypeKey(key = sourceKeys[i])) continue;
|
|
69
|
+
if (key in target) {
|
|
70
|
+
if (targetKeys.indexOf(key) !== -1) if (cloneProtoObject && isMergeableObject(source[key]) && Object.getPrototypeOf(source[key]) !== JSON_PROTO) result[key] = cloneProtoObject(source[key]);
|
|
71
|
+
else result[key] = _deepmerge(target[key], source[key]);
|
|
72
|
+
} else {
|
|
73
|
+
if (onlyDefinedProperties && typeof source[key] === "undefined") continue;
|
|
74
|
+
result[key] = clone(source[key]);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
function _deepmerge(target, source) {
|
|
80
|
+
if (onlyDefinedProperties && typeof source === "undefined") return clone(target);
|
|
81
|
+
const sourceIsArray = Array.isArray(source);
|
|
82
|
+
const targetIsArray = Array.isArray(target);
|
|
83
|
+
if (isPrimitive(source)) return source;
|
|
84
|
+
else if (!isMergeableObject(target)) return clone(source);
|
|
85
|
+
else if (sourceIsArray && targetIsArray) return mergeArray(target, source);
|
|
86
|
+
else if (sourceIsArray !== targetIsArray) return clone(source);
|
|
87
|
+
else return mergeObject(target, source);
|
|
88
|
+
}
|
|
89
|
+
function _deepmergeAll() {
|
|
90
|
+
switch (arguments.length) {
|
|
91
|
+
case 0: return {};
|
|
92
|
+
case 1: return clone(arguments[0]);
|
|
93
|
+
case 2: return _deepmerge(arguments[0], arguments[1]);
|
|
94
|
+
}
|
|
95
|
+
let result;
|
|
96
|
+
for (let i = 0, il = arguments.length; i < il; ++i) result = _deepmerge(result, arguments[i]);
|
|
97
|
+
return result;
|
|
98
|
+
}
|
|
99
|
+
return options?.all ? _deepmergeAll : _deepmerge;
|
|
100
|
+
}
|
|
101
|
+
module.exports = deepmergeConstructor;
|
|
102
|
+
module.exports.default = deepmergeConstructor;
|
|
103
|
+
module.exports.deepmerge = deepmergeConstructor;
|
|
104
|
+
Object.defineProperty(module.exports, "isMergeableObject", { get: defaultIsMergeableObjectFactory });
|
|
105
|
+
}));
|
|
106
|
+
//#endregion
|
|
107
|
+
export default require_deepmerge();
|
|
108
|
+
export { require_deepmerge };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Queue } from "../queue/queue.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.4.3/node_modules/@scalar/helpers/dist/general/create-limiter.js
|
|
3
|
+
/**
|
|
4
|
+
* Creates a function that limits the number of concurrent executions of async functions.
|
|
5
|
+
*
|
|
6
|
+
* @param maxConcurrent - Maximum number of concurrent executions allowed
|
|
7
|
+
* @returns A function that wraps async functions to limit their concurrent execution
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const limiter = createLimiter(2) // Allow max 2 concurrent executions
|
|
12
|
+
*
|
|
13
|
+
* // These will run with max 2 at a time
|
|
14
|
+
* const results = await Promise.all([
|
|
15
|
+
* limiter(() => fetch('/api/1')),
|
|
16
|
+
* limiter(() => fetch('/api/2')),
|
|
17
|
+
* limiter(() => fetch('/api/3')),
|
|
18
|
+
* limiter(() => fetch('/api/4'))
|
|
19
|
+
* ])
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
function createLimiter(maxConcurrent) {
|
|
23
|
+
let activeCount = 0;
|
|
24
|
+
const queue = new Queue();
|
|
25
|
+
const next = () => {
|
|
26
|
+
if (queue.isEmpty() || activeCount >= maxConcurrent) return;
|
|
27
|
+
const resolve = queue.dequeue();
|
|
28
|
+
if (resolve) resolve();
|
|
29
|
+
};
|
|
30
|
+
const run = async (fn) => {
|
|
31
|
+
if (activeCount >= maxConcurrent) await new Promise((resolve) => queue.enqueue(resolve));
|
|
32
|
+
activeCount++;
|
|
33
|
+
try {
|
|
34
|
+
return await fn();
|
|
35
|
+
} finally {
|
|
36
|
+
activeCount--;
|
|
37
|
+
next();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return run;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { createLimiter };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.4.3/node_modules/@scalar/helpers/dist/object/is-object.js
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if the provided value is a record object
|
|
4
|
+
* (i.e. not null, not an array, and has an actual object as the prototype).
|
|
5
|
+
*
|
|
6
|
+
* Differs from the previous isObject in that it returns false for Date,
|
|
7
|
+
* RegExp, Error, Map, Set, WeakMap, WeakSet, Promise, and other non-plain objects.
|
|
8
|
+
*
|
|
9
|
+
* Examples:
|
|
10
|
+
* isObject({}) // true
|
|
11
|
+
* isObject({ a: 1 }) // true
|
|
12
|
+
* isObject([]) // false (Array)
|
|
13
|
+
* isObject(null) // false
|
|
14
|
+
* isObject(123) // false
|
|
15
|
+
* isObject('string') // false
|
|
16
|
+
* isObject(new Error('test')) // false
|
|
17
|
+
* isObject(new Date()) // false
|
|
18
|
+
* isObject(Object.create(null)) // true
|
|
19
|
+
*/
|
|
20
|
+
const isObject = (value) => {
|
|
21
|
+
if (value === null || typeof value !== "object") return false;
|
|
22
|
+
const proto = Object.getPrototypeOf(value);
|
|
23
|
+
return proto === Object.prototype || proto === null;
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { isObject };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.4.3/node_modules/@scalar/helpers/dist/object/prevent-pollution.js
|
|
2
|
+
/**
|
|
3
|
+
* Set of dangerous keys that can be used for prototype pollution attacks.
|
|
4
|
+
* These keys should never be used as property names in dynamic object operations.
|
|
5
|
+
*/
|
|
6
|
+
const PROTOTYPE_POLLUTION_KEYS = new Set([
|
|
7
|
+
"__proto__",
|
|
8
|
+
"prototype",
|
|
9
|
+
"constructor"
|
|
10
|
+
]);
|
|
11
|
+
/**
|
|
12
|
+
* Validates that a key is safe to use and does not pose a prototype pollution risk.
|
|
13
|
+
* Throws an error if a dangerous key is detected.
|
|
14
|
+
*
|
|
15
|
+
* @param key - The key to validate
|
|
16
|
+
* @param context - Optional context string to help identify where the validation failed
|
|
17
|
+
* @throws {Error} If the key matches a known prototype pollution vector
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* preventPollution('__proto__') // throws Error
|
|
22
|
+
* preventPollution('safeName') // passes
|
|
23
|
+
* preventPollution('constructor', 'operation update') // throws Error with context
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
const preventPollution = (key, context) => {
|
|
27
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(key)) {
|
|
28
|
+
const errorMessage = context ? `Prototype pollution key detected: "${key}" in ${context}` : `Prototype pollution key detected: "${key}"`;
|
|
29
|
+
throw new Error(errorMessage);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { preventPollution };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.4.3/node_modules/@scalar/helpers/dist/queue/queue.js
|
|
2
|
+
/**
|
|
3
|
+
* Represents a node in a singly linked list structure, used internally by the Queue.
|
|
4
|
+
*
|
|
5
|
+
* Example:
|
|
6
|
+
* const node = new Node<number>(42);
|
|
7
|
+
* console.log(node.data); // 42
|
|
8
|
+
* console.log(node.next); // null
|
|
9
|
+
*/
|
|
10
|
+
var Node = class {
|
|
11
|
+
data;
|
|
12
|
+
next;
|
|
13
|
+
constructor(data) {
|
|
14
|
+
this.data = data;
|
|
15
|
+
this.next = null;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A generic queue implementation using a singly linked list.
|
|
20
|
+
*
|
|
21
|
+
* Example usage:
|
|
22
|
+
*
|
|
23
|
+
* const q = new Queue<number>();
|
|
24
|
+
* q.enqueue(1);
|
|
25
|
+
* q.enqueue(2);
|
|
26
|
+
* q.enqueue(3);
|
|
27
|
+
* console.log(q.dequeue()); // 1
|
|
28
|
+
* console.log(q.peek()); // 2
|
|
29
|
+
* console.log(q.getSize()); // 2
|
|
30
|
+
* console.log(q.toString()); // "2 -> 3"
|
|
31
|
+
* console.log(q.isEmpty()); // false
|
|
32
|
+
*/
|
|
33
|
+
var Queue = class {
|
|
34
|
+
front;
|
|
35
|
+
rear;
|
|
36
|
+
size;
|
|
37
|
+
constructor() {
|
|
38
|
+
this.front = null;
|
|
39
|
+
this.rear = null;
|
|
40
|
+
this.size = 0;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Adds an element to the end of the queue.
|
|
44
|
+
* @param data - The data to add to the queue.
|
|
45
|
+
*/
|
|
46
|
+
enqueue(data) {
|
|
47
|
+
const newNode = new Node(data);
|
|
48
|
+
if (this.isEmpty() || !this.rear) {
|
|
49
|
+
this.front = newNode;
|
|
50
|
+
this.rear = newNode;
|
|
51
|
+
} else {
|
|
52
|
+
this.rear.next = newNode;
|
|
53
|
+
this.rear = newNode;
|
|
54
|
+
}
|
|
55
|
+
this.size++;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Removes and returns the front element of the queue.
|
|
59
|
+
* @returns The data from the removed node, or null if the queue is empty.
|
|
60
|
+
*/
|
|
61
|
+
dequeue() {
|
|
62
|
+
if (this.isEmpty() || !this.front) return null;
|
|
63
|
+
const removedNode = this.front;
|
|
64
|
+
this.front = this.front.next;
|
|
65
|
+
if (this.front === null) this.rear = null;
|
|
66
|
+
this.size--;
|
|
67
|
+
return removedNode.data;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Returns the front element of the queue without removing it.
|
|
71
|
+
* @returns The front data, or null if the queue is empty.
|
|
72
|
+
*/
|
|
73
|
+
peek() {
|
|
74
|
+
if (this.isEmpty() || !this.front) return null;
|
|
75
|
+
return this.front.data;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Checks whether the queue is empty.
|
|
79
|
+
* @returns True if the queue has no elements, false otherwise.
|
|
80
|
+
*/
|
|
81
|
+
isEmpty() {
|
|
82
|
+
return this.size === 0;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Returns the number of elements in the queue.
|
|
86
|
+
* @returns The size of the queue.
|
|
87
|
+
*/
|
|
88
|
+
getSize() {
|
|
89
|
+
return this.size;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Returns a string representation of the queue.
|
|
93
|
+
* @returns Elements of the queue separated by ' -> '.
|
|
94
|
+
*/
|
|
95
|
+
toString() {
|
|
96
|
+
let current = this.front;
|
|
97
|
+
const elements = [];
|
|
98
|
+
while (current) {
|
|
99
|
+
elements.push(current.data);
|
|
100
|
+
current = current.next;
|
|
101
|
+
}
|
|
102
|
+
return elements.join(" -> ");
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
//#endregion
|
|
106
|
+
export { Queue };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.4.3/node_modules/@scalar/helpers/dist/string/generate-hash.js
|
|
2
|
+
/**
|
|
3
|
+
* MurmurHash3 implementation
|
|
4
|
+
*
|
|
5
|
+
* Generate a hash from a string using the MurmurHash3 algorithm
|
|
6
|
+
* Provides 64-bit hash output with excellent speed and distribution
|
|
7
|
+
*
|
|
8
|
+
* We had to move away from xxhash-wasm since it was causing issues with content security policy (CSP) violations.
|
|
9
|
+
*
|
|
10
|
+
* We cannot use crypto.subtle because it is only available in secure contexts (HTTPS) or on localhost.
|
|
11
|
+
*
|
|
12
|
+
* @param input - The string to hash
|
|
13
|
+
* @returns The 64-bit hash of the input string as a 16-character hex string
|
|
14
|
+
*/
|
|
15
|
+
const generateHash = (input) => {
|
|
16
|
+
const seed = 0;
|
|
17
|
+
let h1 = seed;
|
|
18
|
+
let h2 = seed;
|
|
19
|
+
const len = input.length;
|
|
20
|
+
const remainder = len & 15;
|
|
21
|
+
const bytes = len - remainder;
|
|
22
|
+
const c1 = 2277735313;
|
|
23
|
+
const c2 = 1291169091;
|
|
24
|
+
const c3 = 1390208809;
|
|
25
|
+
const c4 = 944331445;
|
|
26
|
+
for (let i = 0; i < bytes; i += 16) {
|
|
27
|
+
let k1 = input.charCodeAt(i) & 255 | (input.charCodeAt(i + 1) & 255) << 8 | (input.charCodeAt(i + 2) & 255) << 16 | (input.charCodeAt(i + 3) & 255) << 24;
|
|
28
|
+
let k2 = input.charCodeAt(i + 4) & 255 | (input.charCodeAt(i + 5) & 255) << 8 | (input.charCodeAt(i + 6) & 255) << 16 | (input.charCodeAt(i + 7) & 255) << 24;
|
|
29
|
+
let k3 = input.charCodeAt(i + 8) & 255 | (input.charCodeAt(i + 9) & 255) << 8 | (input.charCodeAt(i + 10) & 255) << 16 | (input.charCodeAt(i + 11) & 255) << 24;
|
|
30
|
+
let k4 = input.charCodeAt(i + 12) & 255 | (input.charCodeAt(i + 13) & 255) << 8 | (input.charCodeAt(i + 14) & 255) << 16 | (input.charCodeAt(i + 15) & 255) << 24;
|
|
31
|
+
k1 = Math.imul(k1, c1);
|
|
32
|
+
k1 = k1 << 15 | k1 >>> 17;
|
|
33
|
+
k1 = Math.imul(k1, c2);
|
|
34
|
+
h1 ^= k1;
|
|
35
|
+
h1 = h1 << 13 | h1 >>> 19;
|
|
36
|
+
h1 = Math.imul(h1, 5) + 3864292196;
|
|
37
|
+
k2 = Math.imul(k2, c2);
|
|
38
|
+
k2 = k2 << 16 | k2 >>> 16;
|
|
39
|
+
k2 = Math.imul(k2, c3);
|
|
40
|
+
h2 ^= k2;
|
|
41
|
+
h2 = h2 << 17 | h2 >>> 15;
|
|
42
|
+
h2 = Math.imul(h2, 5) + 461845907;
|
|
43
|
+
k3 = Math.imul(k3, c3);
|
|
44
|
+
k3 = k3 << 17 | k3 >>> 15;
|
|
45
|
+
k3 = Math.imul(k3, c4);
|
|
46
|
+
h1 ^= k3;
|
|
47
|
+
h1 = h1 << 15 | h1 >>> 17;
|
|
48
|
+
h1 = Math.imul(h1, 5) + 1390208809;
|
|
49
|
+
k4 = Math.imul(k4, c4);
|
|
50
|
+
k4 = k4 << 18 | k4 >>> 14;
|
|
51
|
+
k4 = Math.imul(k4, c1);
|
|
52
|
+
h2 ^= k4;
|
|
53
|
+
h2 = h2 << 13 | h2 >>> 19;
|
|
54
|
+
h2 = Math.imul(h2, 5) + 944331445;
|
|
55
|
+
}
|
|
56
|
+
if (remainder > 0) {
|
|
57
|
+
let k1 = 0;
|
|
58
|
+
let k2 = 0;
|
|
59
|
+
let k3 = 0;
|
|
60
|
+
let k4 = 0;
|
|
61
|
+
if (remainder >= 15) k4 ^= (input.charCodeAt(bytes + 14) & 255) << 16;
|
|
62
|
+
if (remainder >= 14) k4 ^= (input.charCodeAt(bytes + 13) & 255) << 8;
|
|
63
|
+
if (remainder >= 13) {
|
|
64
|
+
k4 ^= input.charCodeAt(bytes + 12) & 255;
|
|
65
|
+
k4 = Math.imul(k4, c4);
|
|
66
|
+
k4 = k4 << 18 | k4 >>> 14;
|
|
67
|
+
k4 = Math.imul(k4, c1);
|
|
68
|
+
h2 ^= k4;
|
|
69
|
+
}
|
|
70
|
+
if (remainder >= 12) k3 ^= (input.charCodeAt(bytes + 11) & 255) << 24;
|
|
71
|
+
if (remainder >= 11) k3 ^= (input.charCodeAt(bytes + 10) & 255) << 16;
|
|
72
|
+
if (remainder >= 10) k3 ^= (input.charCodeAt(bytes + 9) & 255) << 8;
|
|
73
|
+
if (remainder >= 9) {
|
|
74
|
+
k3 ^= input.charCodeAt(bytes + 8) & 255;
|
|
75
|
+
k3 = Math.imul(k3, c3);
|
|
76
|
+
k3 = k3 << 17 | k3 >>> 15;
|
|
77
|
+
k3 = Math.imul(k3, c4);
|
|
78
|
+
h1 ^= k3;
|
|
79
|
+
}
|
|
80
|
+
if (remainder >= 8) k2 ^= (input.charCodeAt(bytes + 7) & 255) << 24;
|
|
81
|
+
if (remainder >= 7) k2 ^= (input.charCodeAt(bytes + 6) & 255) << 16;
|
|
82
|
+
if (remainder >= 6) k2 ^= (input.charCodeAt(bytes + 5) & 255) << 8;
|
|
83
|
+
if (remainder >= 5) {
|
|
84
|
+
k2 ^= input.charCodeAt(bytes + 4) & 255;
|
|
85
|
+
k2 = Math.imul(k2, c2);
|
|
86
|
+
k2 = k2 << 16 | k2 >>> 16;
|
|
87
|
+
k2 = Math.imul(k2, c3);
|
|
88
|
+
h2 ^= k2;
|
|
89
|
+
}
|
|
90
|
+
if (remainder >= 4) k1 ^= (input.charCodeAt(bytes + 3) & 255) << 24;
|
|
91
|
+
if (remainder >= 3) k1 ^= (input.charCodeAt(bytes + 2) & 255) << 16;
|
|
92
|
+
if (remainder >= 2) k1 ^= (input.charCodeAt(bytes + 1) & 255) << 8;
|
|
93
|
+
if (remainder >= 1) {
|
|
94
|
+
k1 ^= input.charCodeAt(bytes) & 255;
|
|
95
|
+
k1 = Math.imul(k1, c1);
|
|
96
|
+
k1 = k1 << 15 | k1 >>> 17;
|
|
97
|
+
k1 = Math.imul(k1, c2);
|
|
98
|
+
h1 ^= k1;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
h1 ^= len;
|
|
102
|
+
h2 ^= len;
|
|
103
|
+
h1 += h2;
|
|
104
|
+
h2 += h1;
|
|
105
|
+
h1 ^= h1 >>> 16;
|
|
106
|
+
h1 = Math.imul(h1, 2246822507);
|
|
107
|
+
h1 ^= h1 >>> 13;
|
|
108
|
+
h1 = Math.imul(h1, 3266489909);
|
|
109
|
+
h1 ^= h1 >>> 16;
|
|
110
|
+
h2 ^= h2 >>> 16;
|
|
111
|
+
h2 = Math.imul(h2, 2246822507);
|
|
112
|
+
h2 ^= h2 >>> 13;
|
|
113
|
+
h2 = Math.imul(h2, 3266489909);
|
|
114
|
+
h2 ^= h2 >>> 16;
|
|
115
|
+
h1 += h2;
|
|
116
|
+
h2 += h1;
|
|
117
|
+
return (h1 >>> 0).toString(16).padStart(8, "0") + (h2 >>> 0).toString(16).padStart(8, "0");
|
|
118
|
+
};
|
|
119
|
+
//#endregion
|
|
120
|
+
export { generateHash };
|