fumadocs-openapi 10.8.3 → 10.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +20 -1
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +1 -1
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/normalize.js +2 -2
- package/dist/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/array-helper.js +11 -0
- package/dist/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/js2xml.js +256 -0
- package/dist/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/options-helper.js +31 -0
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/compose-collection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/compose-doc.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/compose-node.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/compose-scalar.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/composer.js +3 -3
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/resolve-block-map.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/resolve-end.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/resolve-props.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/util-contains-newline.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/compose/util-map-includes.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/doc/Document.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/doc/anchors.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/doc/applyReviver.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/doc/createNode.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/doc/directives.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/errors.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/log.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/nodes/Alias.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/nodes/Collection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/nodes/Node.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/nodes/Pair.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/nodes/Scalar.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/nodes/YAMLMap.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/nodes/identity.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/nodes/toJS.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/parse/cst-visit.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/parse/lexer.js +27 -15
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/parse/line-counter.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/parse/parser.js +9 -5
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/public-api.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/Schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/common/map.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/common/null.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/common/seq.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/common/string.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/core/bool.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/core/float.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/core/int.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/core/schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/json/schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/tags.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/stringify/stringify.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/stringify/stringifyComment.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/stringify/stringifyPair.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/stringify/stringifyString.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/visit.js +1 -1
- package/dist/requests/media/adapter.js +4 -2
- package/dist/requests/string-utils.js +4 -2
- package/package.json +7 -6
- /package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/parse/cst-scalar.js +0 -0
- /package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/parse/cst.js +0 -0
- /package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/index.js +0 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
8
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
4
9
|
var __exportAll = (all, no_symbols) => {
|
|
5
10
|
let target = {};
|
|
@@ -10,5 +15,19 @@ var __exportAll = (all, no_symbols) => {
|
|
|
10
15
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
11
16
|
return target;
|
|
12
17
|
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
|
+
key = keys[i];
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
22
|
+
get: ((k) => from[k]).bind(null, key),
|
|
23
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
29
|
+
value: mod,
|
|
30
|
+
enumerable: true
|
|
31
|
+
}) : target, mod));
|
|
13
32
|
//#endregion
|
|
14
|
-
export { __commonJSMin, __exportAll };
|
|
33
|
+
export { __commonJSMin, __exportAll, __toESM };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import "../../../../../../../../yaml@2.
|
|
1
|
+
import "../../../../../../../../yaml@2.9.0/node_modules/yaml/browser/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parse } from "../../../../../../yaml@2.
|
|
2
|
-
import "../../../../../../yaml@2.
|
|
1
|
+
import { parse } from "../../../../../../yaml@2.9.0/node_modules/yaml/browser/dist/public-api.js";
|
|
2
|
+
import "../../../../../../yaml@2.9.0/node_modules/yaml/browser/index.js";
|
|
3
3
|
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/normalize.js
|
|
4
4
|
/**
|
|
5
5
|
* Normalize a string (YAML, JSON, object) to a JavaScript datatype.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/array-helper.js
|
|
3
|
+
var require_array_helper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
module.exports = { isArray: function(value) {
|
|
5
|
+
if (Array.isArray) return Array.isArray(value);
|
|
6
|
+
return Object.prototype.toString.call(value) === "[object Array]";
|
|
7
|
+
} };
|
|
8
|
+
}));
|
|
9
|
+
//#endregion
|
|
10
|
+
export default require_array_helper();
|
|
11
|
+
export { require_array_helper };
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_array_helper } from "./array-helper.js";
|
|
3
|
+
import { require_options_helper } from "./options-helper.js";
|
|
4
|
+
//#region ../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/js2xml.js
|
|
5
|
+
var require_js2xml = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6
|
+
var helper = require_options_helper();
|
|
7
|
+
var isArray = require_array_helper().isArray;
|
|
8
|
+
var currentElement, currentElementName;
|
|
9
|
+
function validateOptions(userOptions) {
|
|
10
|
+
var options = helper.copyOptions(userOptions);
|
|
11
|
+
helper.ensureFlagExists("ignoreDeclaration", options);
|
|
12
|
+
helper.ensureFlagExists("ignoreInstruction", options);
|
|
13
|
+
helper.ensureFlagExists("ignoreAttributes", options);
|
|
14
|
+
helper.ensureFlagExists("ignoreText", options);
|
|
15
|
+
helper.ensureFlagExists("ignoreComment", options);
|
|
16
|
+
helper.ensureFlagExists("ignoreCdata", options);
|
|
17
|
+
helper.ensureFlagExists("ignoreDoctype", options);
|
|
18
|
+
helper.ensureFlagExists("compact", options);
|
|
19
|
+
helper.ensureFlagExists("indentText", options);
|
|
20
|
+
helper.ensureFlagExists("indentCdata", options);
|
|
21
|
+
helper.ensureFlagExists("indentAttributes", options);
|
|
22
|
+
helper.ensureFlagExists("indentInstruction", options);
|
|
23
|
+
helper.ensureFlagExists("fullTagEmptyElement", options);
|
|
24
|
+
helper.ensureFlagExists("noQuotesForNativeAttributes", options);
|
|
25
|
+
helper.ensureSpacesExists(options);
|
|
26
|
+
if (typeof options.spaces === "number") options.spaces = Array(options.spaces + 1).join(" ");
|
|
27
|
+
helper.ensureKeyExists("declaration", options);
|
|
28
|
+
helper.ensureKeyExists("instruction", options);
|
|
29
|
+
helper.ensureKeyExists("attributes", options);
|
|
30
|
+
helper.ensureKeyExists("text", options);
|
|
31
|
+
helper.ensureKeyExists("comment", options);
|
|
32
|
+
helper.ensureKeyExists("cdata", options);
|
|
33
|
+
helper.ensureKeyExists("doctype", options);
|
|
34
|
+
helper.ensureKeyExists("type", options);
|
|
35
|
+
helper.ensureKeyExists("name", options);
|
|
36
|
+
helper.ensureKeyExists("elements", options);
|
|
37
|
+
helper.checkFnExists("doctype", options);
|
|
38
|
+
helper.checkFnExists("instruction", options);
|
|
39
|
+
helper.checkFnExists("cdata", options);
|
|
40
|
+
helper.checkFnExists("comment", options);
|
|
41
|
+
helper.checkFnExists("text", options);
|
|
42
|
+
helper.checkFnExists("instructionName", options);
|
|
43
|
+
helper.checkFnExists("elementName", options);
|
|
44
|
+
helper.checkFnExists("attributeName", options);
|
|
45
|
+
helper.checkFnExists("attributeValue", options);
|
|
46
|
+
helper.checkFnExists("attributes", options);
|
|
47
|
+
helper.checkFnExists("fullTagEmptyElement", options);
|
|
48
|
+
return options;
|
|
49
|
+
}
|
|
50
|
+
function writeIndentation(options, depth, firstLine) {
|
|
51
|
+
return (!firstLine && options.spaces ? "\n" : "") + Array(depth + 1).join(options.spaces);
|
|
52
|
+
}
|
|
53
|
+
function writeAttributes(attributes, options, depth) {
|
|
54
|
+
if (options.ignoreAttributes) return "";
|
|
55
|
+
if ("attributesFn" in options) attributes = options.attributesFn(attributes, currentElementName, currentElement);
|
|
56
|
+
var key, attr, attrName, quote, result = [];
|
|
57
|
+
for (key in attributes) if (attributes.hasOwnProperty(key) && attributes[key] !== null && attributes[key] !== void 0) {
|
|
58
|
+
quote = options.noQuotesForNativeAttributes && typeof attributes[key] !== "string" ? "" : "\"";
|
|
59
|
+
attr = "" + attributes[key];
|
|
60
|
+
attr = attr.replace(/"/g, """);
|
|
61
|
+
attrName = "attributeNameFn" in options ? options.attributeNameFn(key, attr, currentElementName, currentElement) : key;
|
|
62
|
+
result.push(options.spaces && options.indentAttributes ? writeIndentation(options, depth + 1, false) : " ");
|
|
63
|
+
result.push(attrName + "=" + quote + ("attributeValueFn" in options ? options.attributeValueFn(attr, key, currentElementName, currentElement) : attr) + quote);
|
|
64
|
+
}
|
|
65
|
+
if (attributes && Object.keys(attributes).length && options.spaces && options.indentAttributes) result.push(writeIndentation(options, depth, false));
|
|
66
|
+
return result.join("");
|
|
67
|
+
}
|
|
68
|
+
function writeDeclaration(declaration, options, depth) {
|
|
69
|
+
currentElement = declaration;
|
|
70
|
+
currentElementName = "xml";
|
|
71
|
+
return options.ignoreDeclaration ? "" : "<?xml" + writeAttributes(declaration[options.attributesKey], options, depth) + "?>";
|
|
72
|
+
}
|
|
73
|
+
function writeInstruction(instruction, options, depth) {
|
|
74
|
+
if (options.ignoreInstruction) return "";
|
|
75
|
+
var key;
|
|
76
|
+
for (key in instruction) if (instruction.hasOwnProperty(key)) break;
|
|
77
|
+
var instructionName = "instructionNameFn" in options ? options.instructionNameFn(key, instruction[key], currentElementName, currentElement) : key;
|
|
78
|
+
if (typeof instruction[key] === "object") {
|
|
79
|
+
currentElement = instruction;
|
|
80
|
+
currentElementName = instructionName;
|
|
81
|
+
return "<?" + instructionName + writeAttributes(instruction[key][options.attributesKey], options, depth) + "?>";
|
|
82
|
+
} else {
|
|
83
|
+
var instructionValue = instruction[key] ? instruction[key] : "";
|
|
84
|
+
if ("instructionFn" in options) instructionValue = options.instructionFn(instructionValue, key, currentElementName, currentElement);
|
|
85
|
+
return "<?" + instructionName + (instructionValue ? " " + instructionValue : "") + "?>";
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function writeComment(comment, options) {
|
|
89
|
+
return options.ignoreComment ? "" : "<!--" + ("commentFn" in options ? options.commentFn(comment, currentElementName, currentElement) : comment) + "-->";
|
|
90
|
+
}
|
|
91
|
+
function writeCdata(cdata, options) {
|
|
92
|
+
return options.ignoreCdata ? "" : "<![CDATA[" + ("cdataFn" in options ? options.cdataFn(cdata, currentElementName, currentElement) : cdata.replace("]]>", "]]]]><![CDATA[>")) + "]]>";
|
|
93
|
+
}
|
|
94
|
+
function writeDoctype(doctype, options) {
|
|
95
|
+
return options.ignoreDoctype ? "" : "<!DOCTYPE " + ("doctypeFn" in options ? options.doctypeFn(doctype, currentElementName, currentElement) : doctype) + ">";
|
|
96
|
+
}
|
|
97
|
+
function writeText(text, options) {
|
|
98
|
+
if (options.ignoreText) return "";
|
|
99
|
+
text = "" + text;
|
|
100
|
+
text = text.replace(/&/g, "&");
|
|
101
|
+
text = text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
102
|
+
return "textFn" in options ? options.textFn(text, currentElementName, currentElement) : text;
|
|
103
|
+
}
|
|
104
|
+
function hasContent(element, options) {
|
|
105
|
+
var i;
|
|
106
|
+
if (element.elements && element.elements.length) for (i = 0; i < element.elements.length; ++i) switch (element.elements[i][options.typeKey]) {
|
|
107
|
+
case "text":
|
|
108
|
+
if (options.indentText) return true;
|
|
109
|
+
break;
|
|
110
|
+
case "cdata":
|
|
111
|
+
if (options.indentCdata) return true;
|
|
112
|
+
break;
|
|
113
|
+
case "instruction":
|
|
114
|
+
if (options.indentInstruction) return true;
|
|
115
|
+
break;
|
|
116
|
+
case "doctype":
|
|
117
|
+
case "comment":
|
|
118
|
+
case "element": return true;
|
|
119
|
+
default: return true;
|
|
120
|
+
}
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
function writeElement(element, options, depth) {
|
|
124
|
+
currentElement = element;
|
|
125
|
+
currentElementName = element.name;
|
|
126
|
+
var xml = [], elementName = "elementNameFn" in options ? options.elementNameFn(element.name, element) : element.name;
|
|
127
|
+
xml.push("<" + elementName);
|
|
128
|
+
if (element[options.attributesKey]) xml.push(writeAttributes(element[options.attributesKey], options, depth));
|
|
129
|
+
var withClosingTag = element[options.elementsKey] && element[options.elementsKey].length || element[options.attributesKey] && element[options.attributesKey]["xml:space"] === "preserve";
|
|
130
|
+
if (!withClosingTag) if ("fullTagEmptyElementFn" in options) withClosingTag = options.fullTagEmptyElementFn(element.name, element);
|
|
131
|
+
else withClosingTag = options.fullTagEmptyElement;
|
|
132
|
+
if (withClosingTag) {
|
|
133
|
+
xml.push(">");
|
|
134
|
+
if (element[options.elementsKey] && element[options.elementsKey].length) {
|
|
135
|
+
xml.push(writeElements(element[options.elementsKey], options, depth + 1));
|
|
136
|
+
currentElement = element;
|
|
137
|
+
currentElementName = element.name;
|
|
138
|
+
}
|
|
139
|
+
xml.push(options.spaces && hasContent(element, options) ? "\n" + Array(depth + 1).join(options.spaces) : "");
|
|
140
|
+
xml.push("</" + elementName + ">");
|
|
141
|
+
} else xml.push("/>");
|
|
142
|
+
return xml.join("");
|
|
143
|
+
}
|
|
144
|
+
function writeElements(elements, options, depth, firstLine) {
|
|
145
|
+
return elements.reduce(function(xml, element) {
|
|
146
|
+
var indent = writeIndentation(options, depth, firstLine && !xml);
|
|
147
|
+
switch (element.type) {
|
|
148
|
+
case "element": return xml + indent + writeElement(element, options, depth);
|
|
149
|
+
case "comment": return xml + indent + writeComment(element[options.commentKey], options);
|
|
150
|
+
case "doctype": return xml + indent + writeDoctype(element[options.doctypeKey], options);
|
|
151
|
+
case "cdata": return xml + (options.indentCdata ? indent : "") + writeCdata(element[options.cdataKey], options);
|
|
152
|
+
case "text": return xml + (options.indentText ? indent : "") + writeText(element[options.textKey], options);
|
|
153
|
+
case "instruction":
|
|
154
|
+
var instruction = {};
|
|
155
|
+
instruction[element[options.nameKey]] = element[options.attributesKey] ? element : element[options.instructionKey];
|
|
156
|
+
return xml + (options.indentInstruction ? indent : "") + writeInstruction(instruction, options, depth);
|
|
157
|
+
}
|
|
158
|
+
}, "");
|
|
159
|
+
}
|
|
160
|
+
function hasContentCompact(element, options, anyContent) {
|
|
161
|
+
var key;
|
|
162
|
+
for (key in element) if (element.hasOwnProperty(key)) switch (key) {
|
|
163
|
+
case options.parentKey:
|
|
164
|
+
case options.attributesKey: break;
|
|
165
|
+
case options.textKey:
|
|
166
|
+
if (options.indentText || anyContent) return true;
|
|
167
|
+
break;
|
|
168
|
+
case options.cdataKey:
|
|
169
|
+
if (options.indentCdata || anyContent) return true;
|
|
170
|
+
break;
|
|
171
|
+
case options.instructionKey:
|
|
172
|
+
if (options.indentInstruction || anyContent) return true;
|
|
173
|
+
break;
|
|
174
|
+
case options.doctypeKey:
|
|
175
|
+
case options.commentKey: return true;
|
|
176
|
+
default: return true;
|
|
177
|
+
}
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
function writeElementCompact(element, name, options, depth, indent) {
|
|
181
|
+
currentElement = element;
|
|
182
|
+
currentElementName = name;
|
|
183
|
+
var elementName = "elementNameFn" in options ? options.elementNameFn(name, element) : name;
|
|
184
|
+
if (typeof element === "undefined" || element === null || element === "") return "fullTagEmptyElementFn" in options && options.fullTagEmptyElementFn(name, element) || options.fullTagEmptyElement ? "<" + elementName + "></" + elementName + ">" : "<" + elementName + "/>";
|
|
185
|
+
var xml = [];
|
|
186
|
+
if (name) {
|
|
187
|
+
xml.push("<" + elementName);
|
|
188
|
+
if (typeof element !== "object") {
|
|
189
|
+
xml.push(">" + writeText(element, options) + "</" + elementName + ">");
|
|
190
|
+
return xml.join("");
|
|
191
|
+
}
|
|
192
|
+
if (element[options.attributesKey]) xml.push(writeAttributes(element[options.attributesKey], options, depth));
|
|
193
|
+
var withClosingTag = hasContentCompact(element, options, true) || element[options.attributesKey] && element[options.attributesKey]["xml:space"] === "preserve";
|
|
194
|
+
if (!withClosingTag) if ("fullTagEmptyElementFn" in options) withClosingTag = options.fullTagEmptyElementFn(name, element);
|
|
195
|
+
else withClosingTag = options.fullTagEmptyElement;
|
|
196
|
+
if (withClosingTag) xml.push(">");
|
|
197
|
+
else {
|
|
198
|
+
xml.push("/>");
|
|
199
|
+
return xml.join("");
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
xml.push(writeElementsCompact(element, options, depth + 1, false));
|
|
203
|
+
currentElement = element;
|
|
204
|
+
currentElementName = name;
|
|
205
|
+
if (name) xml.push((indent ? writeIndentation(options, depth, false) : "") + "</" + elementName + ">");
|
|
206
|
+
return xml.join("");
|
|
207
|
+
}
|
|
208
|
+
function writeElementsCompact(element, options, depth, firstLine) {
|
|
209
|
+
var i, key, nodes, xml = [];
|
|
210
|
+
for (key in element) if (element.hasOwnProperty(key)) {
|
|
211
|
+
nodes = isArray(element[key]) ? element[key] : [element[key]];
|
|
212
|
+
for (i = 0; i < nodes.length; ++i) {
|
|
213
|
+
switch (key) {
|
|
214
|
+
case options.declarationKey:
|
|
215
|
+
xml.push(writeDeclaration(nodes[i], options, depth));
|
|
216
|
+
break;
|
|
217
|
+
case options.instructionKey:
|
|
218
|
+
xml.push((options.indentInstruction ? writeIndentation(options, depth, firstLine) : "") + writeInstruction(nodes[i], options, depth));
|
|
219
|
+
break;
|
|
220
|
+
case options.attributesKey:
|
|
221
|
+
case options.parentKey: break;
|
|
222
|
+
case options.textKey:
|
|
223
|
+
xml.push((options.indentText ? writeIndentation(options, depth, firstLine) : "") + writeText(nodes[i], options));
|
|
224
|
+
break;
|
|
225
|
+
case options.cdataKey:
|
|
226
|
+
xml.push((options.indentCdata ? writeIndentation(options, depth, firstLine) : "") + writeCdata(nodes[i], options));
|
|
227
|
+
break;
|
|
228
|
+
case options.doctypeKey:
|
|
229
|
+
xml.push(writeIndentation(options, depth, firstLine) + writeDoctype(nodes[i], options));
|
|
230
|
+
break;
|
|
231
|
+
case options.commentKey:
|
|
232
|
+
xml.push(writeIndentation(options, depth, firstLine) + writeComment(nodes[i], options));
|
|
233
|
+
break;
|
|
234
|
+
default: xml.push(writeIndentation(options, depth, firstLine) + writeElementCompact(nodes[i], key, options, depth, hasContentCompact(nodes[i], options)));
|
|
235
|
+
}
|
|
236
|
+
firstLine = firstLine && !xml.length;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return xml.join("");
|
|
240
|
+
}
|
|
241
|
+
module.exports = function(js, options) {
|
|
242
|
+
options = validateOptions(options);
|
|
243
|
+
var xml = [];
|
|
244
|
+
currentElement = js;
|
|
245
|
+
currentElementName = "_root_";
|
|
246
|
+
if (options.compact) xml.push(writeElementsCompact(js, options, 0, true));
|
|
247
|
+
else {
|
|
248
|
+
if (js[options.declarationKey]) xml.push(writeDeclaration(js[options.declarationKey], options, 0));
|
|
249
|
+
if (js[options.elementsKey] && js[options.elementsKey].length) xml.push(writeElements(js[options.elementsKey], options, 0, !xml.length));
|
|
250
|
+
}
|
|
251
|
+
return xml.join("");
|
|
252
|
+
};
|
|
253
|
+
}));
|
|
254
|
+
//#endregion
|
|
255
|
+
export default require_js2xml();
|
|
256
|
+
export { require_js2xml };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_array_helper } from "./array-helper.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/options-helper.js
|
|
4
|
+
var require_options_helper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
|
+
var isArray = require_array_helper().isArray;
|
|
6
|
+
module.exports = {
|
|
7
|
+
copyOptions: function(options) {
|
|
8
|
+
var key, copy = {};
|
|
9
|
+
for (key in options) if (options.hasOwnProperty(key)) copy[key] = options[key];
|
|
10
|
+
return copy;
|
|
11
|
+
},
|
|
12
|
+
ensureFlagExists: function(item, options) {
|
|
13
|
+
if (!(item in options) || typeof options[item] !== "boolean") options[item] = false;
|
|
14
|
+
},
|
|
15
|
+
ensureSpacesExists: function(options) {
|
|
16
|
+
if (!("spaces" in options) || typeof options.spaces !== "number" && typeof options.spaces !== "string") options.spaces = 0;
|
|
17
|
+
},
|
|
18
|
+
ensureAlwaysArrayExists: function(options) {
|
|
19
|
+
if (!("alwaysArray" in options) || typeof options.alwaysArray !== "boolean" && !isArray(options.alwaysArray)) options.alwaysArray = false;
|
|
20
|
+
},
|
|
21
|
+
ensureKeyExists: function(key, options) {
|
|
22
|
+
if (!(key + "Key" in options) || typeof options[key + "Key"] !== "string") options[key + "Key"] = options.compact ? "_" + key : key;
|
|
23
|
+
},
|
|
24
|
+
checkFnExists: function(key, options) {
|
|
25
|
+
return key + "Fn" in options;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}));
|
|
29
|
+
//#endregion
|
|
30
|
+
export default require_options_helper();
|
|
31
|
+
export { require_options_helper };
|
|
@@ -5,7 +5,7 @@ import { YAMLSeq } from "../nodes/YAMLSeq.js";
|
|
|
5
5
|
import { resolveBlockMap } from "./resolve-block-map.js";
|
|
6
6
|
import { resolveBlockSeq } from "./resolve-block-seq.js";
|
|
7
7
|
import { resolveFlowCollection } from "./resolve-flow-collection.js";
|
|
8
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
8
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-collection.js
|
|
9
9
|
function resolveCollection(CN, ctx, token, onError, tagName, tag) {
|
|
10
10
|
const coll = token.type === "block-map" ? resolveBlockMap(CN, ctx, token, onError, tag) : token.type === "block-seq" ? resolveBlockSeq(CN, ctx, token, onError, tag) : resolveFlowCollection(CN, ctx, token, onError, tag);
|
|
11
11
|
const Coll = coll.constructor;
|
|
@@ -2,7 +2,7 @@ import { Document } from "../doc/Document.js";
|
|
|
2
2
|
import { resolveProps } from "./resolve-props.js";
|
|
3
3
|
import { resolveEnd } from "./resolve-end.js";
|
|
4
4
|
import { composeEmptyNode, composeNode } from "./compose-node.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
5
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-doc.js
|
|
6
6
|
function composeDoc(options, directives, { offset, start, value, end }, onError) {
|
|
7
7
|
const doc = new Document(void 0, Object.assign({ _directives: directives }, options));
|
|
8
8
|
const ctx = {
|
|
@@ -4,7 +4,7 @@ import { resolveEnd } from "./resolve-end.js";
|
|
|
4
4
|
import { composeCollection } from "./compose-collection.js";
|
|
5
5
|
import { composeScalar } from "./compose-scalar.js";
|
|
6
6
|
import { emptyScalarPosition } from "./util-empty-scalar-position.js";
|
|
7
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
7
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-node.js
|
|
8
8
|
const CN = {
|
|
9
9
|
composeNode,
|
|
10
10
|
composeEmptyNode
|
|
@@ -2,7 +2,7 @@ import { SCALAR, isScalar } from "../nodes/identity.js";
|
|
|
2
2
|
import { Scalar } from "../nodes/Scalar.js";
|
|
3
3
|
import { resolveBlockScalar } from "./resolve-block-scalar.js";
|
|
4
4
|
import { resolveFlowScalar } from "./resolve-flow-scalar.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
5
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-scalar.js
|
|
6
6
|
function composeScalar(ctx, token, tagToken, onError) {
|
|
7
7
|
const { value, type, comment, range } = token.type === "block-scalar" ? resolveBlockScalar(ctx, token, onError) : resolveFlowScalar(token, ctx.options.strict, onError);
|
|
8
8
|
const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
|
|
@@ -4,7 +4,7 @@ import { Document } from "../doc/Document.js";
|
|
|
4
4
|
import { YAMLParseError, YAMLWarning } from "../errors.js";
|
|
5
5
|
import { resolveEnd } from "./resolve-end.js";
|
|
6
6
|
import { composeDoc } from "./compose-doc.js";
|
|
7
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
7
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/composer.js
|
|
8
8
|
function getErrorPos(src) {
|
|
9
9
|
if (typeof src === "number") return [src, src + 1];
|
|
10
10
|
if (Array.isArray(src)) return src.length === 2 ? src : [src[0], src[1]];
|
|
@@ -80,8 +80,8 @@ var Composer = class {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
if (afterDoc) {
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
for (let i = 0; i < this.errors.length; ++i) doc.errors.push(this.errors[i]);
|
|
84
|
+
for (let i = 0; i < this.warnings.length; ++i) doc.warnings.push(this.warnings[i]);
|
|
85
85
|
} else {
|
|
86
86
|
doc.errors = this.errors;
|
|
87
87
|
doc.warnings = this.warnings;
|
|
@@ -4,7 +4,7 @@ import { resolveProps } from "./resolve-props.js";
|
|
|
4
4
|
import { containsNewline } from "./util-contains-newline.js";
|
|
5
5
|
import { flowIndentCheck } from "./util-flow-indent-check.js";
|
|
6
6
|
import { mapIncludes } from "./util-map-includes.js";
|
|
7
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
7
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-map.js
|
|
8
8
|
const startColMsg = "All mapping items must start at the same column";
|
|
9
9
|
function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {
|
|
10
10
|
const map = new (tag?.nodeClass ?? YAMLMap)(ctx.schema);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Scalar } from "../nodes/Scalar.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js
|
|
3
3
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
4
4
|
const start = scalar.offset;
|
|
5
5
|
const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { YAMLSeq } from "../nodes/YAMLSeq.js";
|
|
2
2
|
import { resolveProps } from "./resolve-props.js";
|
|
3
3
|
import { flowIndentCheck } from "./util-flow-indent-check.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-seq.js
|
|
5
5
|
function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {
|
|
6
6
|
const seq = new (tag?.nodeClass ?? YAMLSeq)(ctx.schema);
|
|
7
7
|
if (ctx.atRoot) ctx.atRoot = false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-end.js
|
|
2
2
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
3
3
|
let comment = "";
|
|
4
4
|
if (end) {
|
|
@@ -6,7 +6,7 @@ import { resolveProps } from "./resolve-props.js";
|
|
|
6
6
|
import { containsNewline } from "./util-contains-newline.js";
|
|
7
7
|
import { mapIncludes } from "./util-map-includes.js";
|
|
8
8
|
import { resolveEnd } from "./resolve-end.js";
|
|
9
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
9
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
|
|
10
10
|
const blockMsg = "Block collections are not allowed within flow collections";
|
|
11
11
|
const isBlock = (token) => token && (token.type === "block-map" || token.type === "block-seq");
|
|
12
12
|
function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Scalar } from "../nodes/Scalar.js";
|
|
2
2
|
import { resolveEnd } from "./resolve-end.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
|
|
4
4
|
function resolveFlowScalar(scalar, strict, onError) {
|
|
5
5
|
const { offset, type, source, end } = scalar;
|
|
6
6
|
let _type;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-props.js
|
|
2
2
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
3
3
|
let spaceBefore = false;
|
|
4
4
|
let atNewline = startOnNewline;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-contains-newline.js
|
|
2
2
|
function containsNewline(key) {
|
|
3
3
|
if (!key) return null;
|
|
4
4
|
switch (key.type) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
|
|
2
2
|
function emptyScalarPosition(offset, before, pos) {
|
|
3
3
|
if (before) {
|
|
4
4
|
pos ?? (pos = before.length);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { containsNewline } from "./util-contains-newline.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
|
|
3
3
|
function flowIndentCheck(indent, fc, onError) {
|
|
4
4
|
if (fc?.type === "flow-collection") {
|
|
5
5
|
const end = fc.end[0];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isScalar } from "../nodes/identity.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-map-includes.js
|
|
3
3
|
function mapIncludes(ctx, items, search) {
|
|
4
4
|
const { uniqueKeys } = ctx.options;
|
|
5
5
|
if (uniqueKeys === false) return false;
|
|
@@ -9,7 +9,7 @@ import { collectionFromPath, isEmptyPath } from "../nodes/Collection.js";
|
|
|
9
9
|
import { Pair } from "../nodes/Pair.js";
|
|
10
10
|
import { Schema } from "../schema/Schema.js";
|
|
11
11
|
import { stringifyDocument } from "../stringify/stringifyDocument.js";
|
|
12
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
12
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/Document.js
|
|
13
13
|
var Document = class Document {
|
|
14
14
|
constructor(value, replacer, options) {
|
|
15
15
|
/** A comment before this Document */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isCollection, isScalar } from "../nodes/identity.js";
|
|
2
2
|
import { visit } from "../visit.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/anchors.js
|
|
4
4
|
/**
|
|
5
5
|
* Verify that the input string is a valid anchor.
|
|
6
6
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/applyReviver.js
|
|
2
2
|
/**
|
|
3
3
|
* Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,
|
|
4
4
|
* in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MAP, SEQ, isDocument, isNode, isPair } from "../nodes/identity.js";
|
|
2
2
|
import { Alias } from "../nodes/Alias.js";
|
|
3
3
|
import { Scalar } from "../nodes/Scalar.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/createNode.js
|
|
5
5
|
const defaultTagPrefix = "tag:yaml.org,2002:";
|
|
6
6
|
function findTagObject(value, tagName, tags) {
|
|
7
7
|
if (tagName) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isNode } from "../nodes/identity.js";
|
|
2
2
|
import { visit } from "../visit.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/directives.js
|
|
4
4
|
const escapeChars = {
|
|
5
5
|
"!": "%21",
|
|
6
6
|
",": "%2C",
|
package/dist/node_modules/.pnpm/{yaml@2.8.4 → yaml@2.9.0}/node_modules/yaml/browser/dist/log.js
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/log.js
|
|
2
2
|
function warn(logLevel, warning) {
|
|
3
3
|
if (logLevel === "debug" || logLevel === "warn") console.warn(warning);
|
|
4
4
|
}
|
|
@@ -3,7 +3,7 @@ import { visit } from "../visit.js";
|
|
|
3
3
|
import { anchorIsValid } from "../doc/anchors.js";
|
|
4
4
|
import { toJS } from "./toJS.js";
|
|
5
5
|
import { NodeBase } from "./Node.js";
|
|
6
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
6
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Alias.js
|
|
7
7
|
var Alias = class extends NodeBase {
|
|
8
8
|
constructor(source) {
|
|
9
9
|
super(ALIAS);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isCollection, isNode, isPair, isScalar } from "./identity.js";
|
|
2
2
|
import { NodeBase } from "./Node.js";
|
|
3
3
|
import { createNode } from "../doc/createNode.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Collection.js
|
|
5
5
|
function collectionFromPath(schema, path, value) {
|
|
6
6
|
let v = value;
|
|
7
7
|
for (let i = path.length - 1; i >= 0; --i) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NODE_TYPE, isDocument } from "./identity.js";
|
|
2
2
|
import { applyReviver } from "../doc/applyReviver.js";
|
|
3
3
|
import { toJS } from "./toJS.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Node.js
|
|
5
5
|
var NodeBase = class {
|
|
6
6
|
constructor(type) {
|
|
7
7
|
Object.defineProperty(this, NODE_TYPE, { value: type });
|
|
@@ -2,7 +2,7 @@ import { NODE_TYPE, PAIR, isNode } from "./identity.js";
|
|
|
2
2
|
import { createNode } from "../doc/createNode.js";
|
|
3
3
|
import { stringifyPair } from "../stringify/stringifyPair.js";
|
|
4
4
|
import { addPairToJSMap } from "./addPairToJSMap.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
5
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Pair.js
|
|
6
6
|
function createPair(key, value, ctx) {
|
|
7
7
|
return new Pair(createNode(key, void 0, ctx), createNode(value, void 0, ctx));
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SCALAR } from "./identity.js";
|
|
2
2
|
import { toJS } from "./toJS.js";
|
|
3
3
|
import { NodeBase } from "./Node.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/yaml@2.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Scalar.js
|
|
5
5
|
const isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
|
|
6
6
|
var Scalar = class extends NodeBase {
|
|
7
7
|
constructor(value) {
|