fumadocs-openapi 10.10.1 → 10.10.3

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.
Files changed (127) hide show
  1. package/css/generated/shared.css +16 -8
  2. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/bundle.js +239 -0
  3. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/dereference.js +187 -0
  4. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js +136 -0
  5. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/normalize-args.js +41 -0
  6. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/options.js +124 -0
  7. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parse.js +109 -0
  8. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/binary.js +30 -0
  9. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/json.js +46 -0
  10. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/text.js +36 -0
  11. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/yaml.js +49 -0
  12. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.js +242 -0
  13. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.js +247 -0
  14. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/refs.js +210 -0
  15. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolve-external.js +100 -0
  16. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/file.js +41 -0
  17. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/http.js +112 -0
  18. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js +8 -0
  19. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.js +146 -0
  20. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/is-windows.js +5 -0
  21. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/maybe.js +18 -0
  22. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/next.js +11 -0
  23. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/plugins.js +99 -0
  24. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/schema-resources.js +30 -0
  25. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js +315 -0
  26. package/dist/ui/schema/client.js +70 -69
  27. package/dist/utils/document/process.js +7 -12
  28. package/package.json +4 -7
  29. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/general/create-limiter.js +0 -43
  30. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/object/is-object.js +0 -27
  31. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/object/prevent-pollution.js +0 -33
  32. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/queue/queue.js +0 -106
  33. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/string/generate-hash.js +0 -120
  34. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/bundle.js +0 -357
  35. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js +0 -73
  36. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js +0 -3
  37. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +0 -1
  38. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js +0 -51
  39. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/value-generator.js +0 -102
  40. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/convert-to-local-ref.js +0 -24
  41. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/escape-json-pointer.js +0 -11
  42. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/get-schemas.js +0 -44
  43. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/get-segments-from-path.js +0 -10
  44. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/get-value-by-path.js +0 -42
  45. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-file-path.js +0 -23
  46. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-http-url.js +0 -23
  47. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-json-object.js +0 -28
  48. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-yaml.js +0 -21
  49. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/normalize.js +0 -33
  50. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/resolve-reference-path.js +0 -30
  51. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/set-value-at-path.js +0 -70
  52. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/to-relative-path.js +0 -33
  53. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/unescape-json-pointer.js +0 -12
  54. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.js +0 -19
  55. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +0 -430
  56. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-collection.js +0 -50
  57. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-doc.js +0 -39
  58. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-node.js +0 -85
  59. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-scalar.js +0 -57
  60. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/composer.js +0 -193
  61. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-map.js +0 -82
  62. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +0 -174
  63. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +0 -40
  64. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-end.js +0 -36
  65. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +0 -153
  66. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +0 -203
  67. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-props.js +0 -105
  68. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-contains-newline.js +0 -27
  69. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +0 -25
  70. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +0 -10
  71. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-map-includes.js +0 -10
  72. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/Document.js +0 -277
  73. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/anchors.js +0 -62
  74. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/applyReviver.js +0 -38
  75. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/createNode.js +0 -61
  76. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/directives.js +0 -163
  77. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/errors.js +0 -48
  78. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/index.js +0 -16
  79. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/log.js +0 -6
  80. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Alias.js +0 -92
  81. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Collection.js +0 -117
  82. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Node.js +0 -32
  83. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Pair.js +0 -29
  84. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Scalar.js +0 -24
  85. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLMap.js +0 -106
  86. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +0 -104
  87. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +0 -49
  88. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/identity.js +0 -33
  89. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/toJS.js +0 -35
  90. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-scalar.js +0 -3
  91. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-visit.js +0 -89
  92. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst.js +0 -40
  93. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/lexer.js +0 -529
  94. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/line-counter.js +0 -45
  95. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/parser.js +0 -859
  96. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/public-api.js +0 -44
  97. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/Schema.js +0 -27
  98. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/map.js +0 -16
  99. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/null.js +0 -13
  100. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/seq.js +0 -16
  101. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/string.js +0 -14
  102. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/bool.js +0 -17
  103. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/float.js +0 -38
  104. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/int.js +0 -37
  105. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/schema.js +0 -23
  106. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/json/schema.js +0 -61
  107. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/tags.js +0 -81
  108. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +0 -52
  109. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +0 -24
  110. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +0 -41
  111. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +0 -70
  112. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +0 -39
  113. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +0 -60
  114. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +0 -56
  115. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +0 -39
  116. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +0 -65
  117. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +0 -79
  118. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +0 -111
  119. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringify.js +0 -105
  120. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +0 -116
  121. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyComment.js +0 -16
  122. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +0 -59
  123. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +0 -19
  124. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyPair.js +0 -95
  125. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyString.js +0 -222
  126. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/visit.js +0 -187
  127. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/index.js +0 -16
@@ -1,203 +0,0 @@
1
- import { Scalar } from "../nodes/Scalar.js";
2
- import { resolveEnd } from "./resolve-end.js";
3
- //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
4
- function resolveFlowScalar(scalar, strict, onError) {
5
- const { offset, type, source, end } = scalar;
6
- let _type;
7
- let value;
8
- const _onError = (rel, code, msg) => onError(offset + rel, code, msg);
9
- switch (type) {
10
- case "scalar":
11
- _type = Scalar.PLAIN;
12
- value = plainValue(source, _onError);
13
- break;
14
- case "single-quoted-scalar":
15
- _type = Scalar.QUOTE_SINGLE;
16
- value = singleQuotedValue(source, _onError);
17
- break;
18
- case "double-quoted-scalar":
19
- _type = Scalar.QUOTE_DOUBLE;
20
- value = doubleQuotedValue(source, _onError);
21
- break;
22
- /* istanbul ignore next should not happen */
23
- default:
24
- onError(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type}`);
25
- return {
26
- value: "",
27
- type: null,
28
- comment: "",
29
- range: [
30
- offset,
31
- offset + source.length,
32
- offset + source.length
33
- ]
34
- };
35
- }
36
- const valueEnd = offset + source.length;
37
- const re = resolveEnd(end, valueEnd, strict, onError);
38
- return {
39
- value,
40
- type: _type,
41
- comment: re.comment,
42
- range: [
43
- offset,
44
- valueEnd,
45
- re.offset
46
- ]
47
- };
48
- }
49
- function plainValue(source, onError) {
50
- let badChar = "";
51
- switch (source[0]) {
52
- /* istanbul ignore next should not happen */
53
- case " ":
54
- badChar = "a tab character";
55
- break;
56
- case ",":
57
- badChar = "flow indicator character ,";
58
- break;
59
- case "%":
60
- badChar = "directive indicator character %";
61
- break;
62
- case "|":
63
- case ">":
64
- badChar = `block scalar indicator ${source[0]}`;
65
- break;
66
- case "@":
67
- case "`":
68
- badChar = `reserved character ${source[0]}`;
69
- break;
70
- }
71
- if (badChar) onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`);
72
- return foldLines(source);
73
- }
74
- function singleQuotedValue(source, onError) {
75
- if (source[source.length - 1] !== "'" || source.length === 1) onError(source.length, "MISSING_CHAR", "Missing closing 'quote");
76
- return foldLines(source.slice(1, -1)).replace(/''/g, "'");
77
- }
78
- function foldLines(source) {
79
- /**
80
- * The negative lookbehind here and in the `re` RegExp is to
81
- * prevent causing a polynomial search time in certain cases.
82
- *
83
- * The try-catch is for Safari, which doesn't support this yet:
84
- * https://caniuse.com/js-regexp-lookbehind
85
- */
86
- let first, line;
87
- try {
88
- first = /* @__PURE__ */ new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
89
- line = /* @__PURE__ */ new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
90
- } catch {
91
- first = /(.*?)[ \t]*\r?\n/sy;
92
- line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
93
- }
94
- let match = first.exec(source);
95
- if (!match) return source;
96
- let res = match[1];
97
- let sep = " ";
98
- let pos = first.lastIndex;
99
- line.lastIndex = pos;
100
- while (match = line.exec(source)) {
101
- if (match[1] === "") if (sep === "\n") res += sep;
102
- else sep = "\n";
103
- else {
104
- res += sep + match[1];
105
- sep = " ";
106
- }
107
- pos = line.lastIndex;
108
- }
109
- const last = /[ \t]*(.*)/sy;
110
- last.lastIndex = pos;
111
- match = last.exec(source);
112
- return res + sep + (match?.[1] ?? "");
113
- }
114
- function doubleQuotedValue(source, onError) {
115
- let res = "";
116
- for (let i = 1; i < source.length - 1; ++i) {
117
- const ch = source[i];
118
- if (ch === "\r" && source[i + 1] === "\n") continue;
119
- if (ch === "\n") {
120
- const { fold, offset } = foldNewline(source, i);
121
- res += fold;
122
- i = offset;
123
- } else if (ch === "\\") {
124
- let next = source[++i];
125
- const cc = escapeCodes[next];
126
- if (cc) res += cc;
127
- else if (next === "\n") {
128
- next = source[i + 1];
129
- while (next === " " || next === " ") next = source[++i + 1];
130
- } else if (next === "\r" && source[i + 1] === "\n") {
131
- next = source[++i + 1];
132
- while (next === " " || next === " ") next = source[++i + 1];
133
- } else if (next === "x" || next === "u" || next === "U") {
134
- const length = next === "x" ? 2 : next === "u" ? 4 : 8;
135
- res += parseCharCode(source, i + 1, length, onError);
136
- i += length;
137
- } else {
138
- const raw = source.substr(i - 1, 2);
139
- onError(i - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`);
140
- res += raw;
141
- }
142
- } else if (ch === " " || ch === " ") {
143
- const wsStart = i;
144
- let next = source[i + 1];
145
- while (next === " " || next === " ") next = source[++i + 1];
146
- if (next !== "\n" && !(next === "\r" && source[i + 2] === "\n")) res += i > wsStart ? source.slice(wsStart, i + 1) : ch;
147
- } else res += ch;
148
- }
149
- if (source[source.length - 1] !== "\"" || source.length === 1) onError(source.length, "MISSING_CHAR", "Missing closing \"quote");
150
- return res;
151
- }
152
- /**
153
- * Fold a single newline into a space, multiple newlines to N - 1 newlines.
154
- * Presumes `source[offset] === '\n'`
155
- */
156
- function foldNewline(source, offset) {
157
- let fold = "";
158
- let ch = source[offset + 1];
159
- while (ch === " " || ch === " " || ch === "\n" || ch === "\r") {
160
- if (ch === "\r" && source[offset + 2] !== "\n") break;
161
- if (ch === "\n") fold += "\n";
162
- offset += 1;
163
- ch = source[offset + 1];
164
- }
165
- if (!fold) fold = " ";
166
- return {
167
- fold,
168
- offset
169
- };
170
- }
171
- const escapeCodes = {
172
- "0": "\0",
173
- a: "\x07",
174
- b: "\b",
175
- e: "\x1B",
176
- f: "\f",
177
- n: "\n",
178
- r: "\r",
179
- t: " ",
180
- v: "\v",
181
- N: "…",
182
- _: "\xA0",
183
- L: "\u2028",
184
- P: "\u2029",
185
- " ": " ",
186
- "\"": "\"",
187
- "/": "/",
188
- "\\": "\\",
189
- " ": " "
190
- };
191
- function parseCharCode(source, offset, length, onError) {
192
- const cc = source.substr(offset, length);
193
- const code = cc.length === length && /^[0-9a-fA-F]+$/.test(cc) ? parseInt(cc, 16) : NaN;
194
- try {
195
- return String.fromCodePoint(code);
196
- } catch {
197
- const raw = source.substr(offset - 2, length + 2);
198
- onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`);
199
- return raw;
200
- }
201
- }
202
- //#endregion
203
- export { resolveFlowScalar };
@@ -1,105 +0,0 @@
1
- //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-props.js
2
- function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
3
- let spaceBefore = false;
4
- let atNewline = startOnNewline;
5
- let hasSpace = startOnNewline;
6
- let comment = "";
7
- let commentSep = "";
8
- let hasNewline = false;
9
- let reqSpace = false;
10
- let tab = null;
11
- let anchor = null;
12
- let tag = null;
13
- let newlineAfterProp = null;
14
- let comma = null;
15
- let found = null;
16
- let start = null;
17
- for (const token of tokens) {
18
- if (reqSpace) {
19
- if (token.type !== "space" && token.type !== "newline" && token.type !== "comma") onError(token.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space");
20
- reqSpace = false;
21
- }
22
- if (tab) {
23
- if (atNewline && token.type !== "comment" && token.type !== "newline") onError(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation");
24
- tab = null;
25
- }
26
- switch (token.type) {
27
- case "space":
28
- if (!flow && (indicator !== "doc-start" || next?.type !== "flow-collection") && token.source.includes(" ")) tab = token;
29
- hasSpace = true;
30
- break;
31
- case "comment": {
32
- if (!hasSpace) onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
33
- const cb = token.source.substring(1) || " ";
34
- if (!comment) comment = cb;
35
- else comment += commentSep + cb;
36
- commentSep = "";
37
- atNewline = false;
38
- break;
39
- }
40
- case "newline":
41
- if (atNewline) {
42
- if (comment) comment += token.source;
43
- else if (!found || indicator !== "seq-item-ind") spaceBefore = true;
44
- } else commentSep += token.source;
45
- atNewline = true;
46
- hasNewline = true;
47
- if (anchor || tag) newlineAfterProp = token;
48
- hasSpace = true;
49
- break;
50
- case "anchor":
51
- if (anchor) onError(token, "MULTIPLE_ANCHORS", "A node can have at most one anchor");
52
- if (token.source.endsWith(":")) onError(token.offset + token.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", true);
53
- anchor = token;
54
- start ?? (start = token.offset);
55
- atNewline = false;
56
- hasSpace = false;
57
- reqSpace = true;
58
- break;
59
- case "tag":
60
- if (tag) onError(token, "MULTIPLE_TAGS", "A node can have at most one tag");
61
- tag = token;
62
- start ?? (start = token.offset);
63
- atNewline = false;
64
- hasSpace = false;
65
- reqSpace = true;
66
- break;
67
- case indicator:
68
- if (anchor || tag) onError(token, "BAD_PROP_ORDER", `Anchors and tags must be after the ${token.source} indicator`);
69
- if (found) onError(token, "UNEXPECTED_TOKEN", `Unexpected ${token.source} in ${flow ?? "collection"}`);
70
- found = token;
71
- atNewline = indicator === "seq-item-ind" || indicator === "explicit-key-ind";
72
- hasSpace = false;
73
- break;
74
- case "comma": if (flow) {
75
- if (comma) onError(token, "UNEXPECTED_TOKEN", `Unexpected , in ${flow}`);
76
- comma = token;
77
- atNewline = false;
78
- hasSpace = false;
79
- break;
80
- }
81
- default:
82
- onError(token, "UNEXPECTED_TOKEN", `Unexpected ${token.type} token`);
83
- atNewline = false;
84
- hasSpace = false;
85
- }
86
- }
87
- const last = tokens[tokens.length - 1];
88
- const end = last ? last.offset + last.source.length : offset;
89
- if (reqSpace && next && next.type !== "space" && next.type !== "newline" && next.type !== "comma" && (next.type !== "scalar" || next.source !== "")) onError(next.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space");
90
- if (tab && (atNewline && tab.indent <= parentIndent || next?.type === "block-map" || next?.type === "block-seq")) onError(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation");
91
- return {
92
- comma,
93
- found,
94
- spaceBefore,
95
- comment,
96
- hasNewline,
97
- anchor,
98
- tag,
99
- newlineAfterProp,
100
- end,
101
- start: start ?? end
102
- };
103
- }
104
- //#endregion
105
- export { resolveProps };
@@ -1,27 +0,0 @@
1
- //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-contains-newline.js
2
- function containsNewline(key) {
3
- if (!key) return null;
4
- switch (key.type) {
5
- case "alias":
6
- case "scalar":
7
- case "double-quoted-scalar":
8
- case "single-quoted-scalar":
9
- if (key.source.includes("\n")) return true;
10
- if (key.end) {
11
- for (const st of key.end) if (st.type === "newline") return true;
12
- }
13
- return false;
14
- case "flow-collection":
15
- for (const it of key.items) {
16
- for (const st of it.start) if (st.type === "newline") return true;
17
- if (it.sep) {
18
- for (const st of it.sep) if (st.type === "newline") return true;
19
- }
20
- if (containsNewline(it.key) || containsNewline(it.value)) return true;
21
- }
22
- return false;
23
- default: return true;
24
- }
25
- }
26
- //#endregion
27
- export { containsNewline };
@@ -1,25 +0,0 @@
1
- //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
2
- function emptyScalarPosition(offset, before, pos) {
3
- if (before) {
4
- pos ?? (pos = before.length);
5
- for (let i = pos - 1; i >= 0; --i) {
6
- let st = before[i];
7
- switch (st.type) {
8
- case "space":
9
- case "comment":
10
- case "newline":
11
- offset -= st.source.length;
12
- continue;
13
- }
14
- st = before[++i];
15
- while (st?.type === "space") {
16
- offset += st.source.length;
17
- st = before[++i];
18
- }
19
- break;
20
- }
21
- }
22
- return offset;
23
- }
24
- //#endregion
25
- export { emptyScalarPosition };
@@ -1,10 +0,0 @@
1
- import { containsNewline } from "./util-contains-newline.js";
2
- //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
3
- function flowIndentCheck(indent, fc, onError) {
4
- if (fc?.type === "flow-collection") {
5
- const end = fc.end[0];
6
- if (end.indent === indent && (end.source === "]" || end.source === "}") && containsNewline(fc)) onError(end, "BAD_INDENT", "Flow end indicator should be more indented than parent", true);
7
- }
8
- }
9
- //#endregion
10
- export { flowIndentCheck };
@@ -1,10 +0,0 @@
1
- import { isScalar } from "../nodes/identity.js";
2
- //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-map-includes.js
3
- function mapIncludes(ctx, items, search) {
4
- const { uniqueKeys } = ctx.options;
5
- if (uniqueKeys === false) return false;
6
- const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b || isScalar(a) && isScalar(b) && a.value === b.value;
7
- return items.some((pair) => isEqual(pair.key, search));
8
- }
9
- //#endregion
10
- export { mapIncludes };
@@ -1,277 +0,0 @@
1
- import { DOC, NODE_TYPE, isCollection, isNode, isScalar } from "../nodes/identity.js";
2
- import { Directives } from "./directives.js";
3
- import { anchorNames, createNodeAnchors, findNewAnchor } from "./anchors.js";
4
- import { applyReviver } from "./applyReviver.js";
5
- import { toJS } from "../nodes/toJS.js";
6
- import { Alias } from "../nodes/Alias.js";
7
- import { createNode } from "./createNode.js";
8
- import { collectionFromPath, isEmptyPath } from "../nodes/Collection.js";
9
- import { Pair } from "../nodes/Pair.js";
10
- import { Schema } from "../schema/Schema.js";
11
- import { stringifyDocument } from "../stringify/stringifyDocument.js";
12
- //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/Document.js
13
- var Document = class Document {
14
- constructor(value, replacer, options) {
15
- /** A comment before this Document */
16
- this.commentBefore = null;
17
- /** A comment immediately after this Document */
18
- this.comment = null;
19
- /** Errors encountered during parsing. */
20
- this.errors = [];
21
- /** Warnings encountered during parsing. */
22
- this.warnings = [];
23
- Object.defineProperty(this, NODE_TYPE, { value: DOC });
24
- let _replacer = null;
25
- if (typeof replacer === "function" || Array.isArray(replacer)) _replacer = replacer;
26
- else if (options === void 0 && replacer) {
27
- options = replacer;
28
- replacer = void 0;
29
- }
30
- const opt = Object.assign({
31
- intAsBigInt: false,
32
- keepSourceTokens: false,
33
- logLevel: "warn",
34
- prettyErrors: true,
35
- strict: true,
36
- stringKeys: false,
37
- uniqueKeys: true,
38
- version: "1.2"
39
- }, options);
40
- this.options = opt;
41
- let { version } = opt;
42
- if (options?._directives) {
43
- this.directives = options._directives.atDocument();
44
- if (this.directives.yaml.explicit) version = this.directives.yaml.version;
45
- } else this.directives = new Directives({ version });
46
- this.setSchema(version, options);
47
- this.contents = value === void 0 ? null : this.createNode(value, _replacer, options);
48
- }
49
- /**
50
- * Create a deep copy of this Document and its contents.
51
- *
52
- * Custom Node values that inherit from `Object` still refer to their original instances.
53
- */
54
- clone() {
55
- const copy = Object.create(Document.prototype, { [NODE_TYPE]: { value: DOC } });
56
- copy.commentBefore = this.commentBefore;
57
- copy.comment = this.comment;
58
- copy.errors = this.errors.slice();
59
- copy.warnings = this.warnings.slice();
60
- copy.options = Object.assign({}, this.options);
61
- if (this.directives) copy.directives = this.directives.clone();
62
- copy.schema = this.schema.clone();
63
- copy.contents = isNode(this.contents) ? this.contents.clone(copy.schema) : this.contents;
64
- if (this.range) copy.range = this.range.slice();
65
- return copy;
66
- }
67
- /** Adds a value to the document. */
68
- add(value) {
69
- if (assertCollection(this.contents)) this.contents.add(value);
70
- }
71
- /** Adds a value to the document. */
72
- addIn(path, value) {
73
- if (assertCollection(this.contents)) this.contents.addIn(path, value);
74
- }
75
- /**
76
- * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
77
- *
78
- * If `node` already has an anchor, `name` is ignored.
79
- * Otherwise, the `node.anchor` value will be set to `name`,
80
- * or if an anchor with that name is already present in the document,
81
- * `name` will be used as a prefix for a new unique anchor.
82
- * If `name` is undefined, the generated anchor will use 'a' as a prefix.
83
- */
84
- createAlias(node, name) {
85
- if (!node.anchor) {
86
- const prev = anchorNames(this);
87
- node.anchor = !name || prev.has(name) ? findNewAnchor(name || "a", prev) : name;
88
- }
89
- return new Alias(node.anchor);
90
- }
91
- createNode(value, replacer, options) {
92
- let _replacer = void 0;
93
- if (typeof replacer === "function") {
94
- value = replacer.call({ "": value }, "", value);
95
- _replacer = replacer;
96
- } else if (Array.isArray(replacer)) {
97
- const keyToStr = (v) => typeof v === "number" || v instanceof String || v instanceof Number;
98
- const asStr = replacer.filter(keyToStr).map(String);
99
- if (asStr.length > 0) replacer = replacer.concat(asStr);
100
- _replacer = replacer;
101
- } else if (options === void 0 && replacer) {
102
- options = replacer;
103
- replacer = void 0;
104
- }
105
- const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};
106
- const { onAnchor, setAnchors, sourceObjects } = createNodeAnchors(this, anchorPrefix || "a");
107
- const ctx = {
108
- aliasDuplicateObjects: aliasDuplicateObjects ?? true,
109
- keepUndefined: keepUndefined ?? false,
110
- onAnchor,
111
- onTagObj,
112
- replacer: _replacer,
113
- schema: this.schema,
114
- sourceObjects
115
- };
116
- const node = createNode(value, tag, ctx);
117
- if (flow && isCollection(node)) node.flow = true;
118
- setAnchors();
119
- return node;
120
- }
121
- /**
122
- * Convert a key and a value into a `Pair` using the current schema,
123
- * recursively wrapping all values as `Scalar` or `Collection` nodes.
124
- */
125
- createPair(key, value, options = {}) {
126
- return new Pair(this.createNode(key, null, options), this.createNode(value, null, options));
127
- }
128
- /**
129
- * Removes a value from the document.
130
- * @returns `true` if the item was found and removed.
131
- */
132
- delete(key) {
133
- return assertCollection(this.contents) ? this.contents.delete(key) : false;
134
- }
135
- /**
136
- * Removes a value from the document.
137
- * @returns `true` if the item was found and removed.
138
- */
139
- deleteIn(path) {
140
- if (isEmptyPath(path)) {
141
- if (this.contents == null) return false;
142
- this.contents = null;
143
- return true;
144
- }
145
- return assertCollection(this.contents) ? this.contents.deleteIn(path) : false;
146
- }
147
- /**
148
- * Returns item at `key`, or `undefined` if not found. By default unwraps
149
- * scalar values from their surrounding node; to disable set `keepScalar` to
150
- * `true` (collections are always returned intact).
151
- */
152
- get(key, keepScalar) {
153
- return isCollection(this.contents) ? this.contents.get(key, keepScalar) : void 0;
154
- }
155
- /**
156
- * Returns item at `path`, or `undefined` if not found. By default unwraps
157
- * scalar values from their surrounding node; to disable set `keepScalar` to
158
- * `true` (collections are always returned intact).
159
- */
160
- getIn(path, keepScalar) {
161
- if (isEmptyPath(path)) return !keepScalar && isScalar(this.contents) ? this.contents.value : this.contents;
162
- return isCollection(this.contents) ? this.contents.getIn(path, keepScalar) : void 0;
163
- }
164
- /**
165
- * Checks if the document includes a value with the key `key`.
166
- */
167
- has(key) {
168
- return isCollection(this.contents) ? this.contents.has(key) : false;
169
- }
170
- /**
171
- * Checks if the document includes a value at `path`.
172
- */
173
- hasIn(path) {
174
- if (isEmptyPath(path)) return this.contents !== void 0;
175
- return isCollection(this.contents) ? this.contents.hasIn(path) : false;
176
- }
177
- /**
178
- * Sets a value in this document. For `!!set`, `value` needs to be a
179
- * boolean to add/remove the item from the set.
180
- */
181
- set(key, value) {
182
- if (this.contents == null) this.contents = collectionFromPath(this.schema, [key], value);
183
- else if (assertCollection(this.contents)) this.contents.set(key, value);
184
- }
185
- /**
186
- * Sets a value in this document. For `!!set`, `value` needs to be a
187
- * boolean to add/remove the item from the set.
188
- */
189
- setIn(path, value) {
190
- if (isEmptyPath(path)) this.contents = value;
191
- else if (this.contents == null) this.contents = collectionFromPath(this.schema, Array.from(path), value);
192
- else if (assertCollection(this.contents)) this.contents.setIn(path, value);
193
- }
194
- /**
195
- * Change the YAML version and schema used by the document.
196
- * A `null` version disables support for directives, explicit tags, anchors, and aliases.
197
- * It also requires the `schema` option to be given as a `Schema` instance value.
198
- *
199
- * Overrides all previously set schema options.
200
- */
201
- setSchema(version, options = {}) {
202
- if (typeof version === "number") version = String(version);
203
- let opt;
204
- switch (version) {
205
- case "1.1":
206
- if (this.directives) this.directives.yaml.version = "1.1";
207
- else this.directives = new Directives({ version: "1.1" });
208
- opt = {
209
- resolveKnownTags: false,
210
- schema: "yaml-1.1"
211
- };
212
- break;
213
- case "1.2":
214
- case "next":
215
- if (this.directives) this.directives.yaml.version = version;
216
- else this.directives = new Directives({ version });
217
- opt = {
218
- resolveKnownTags: true,
219
- schema: "core"
220
- };
221
- break;
222
- case null:
223
- if (this.directives) delete this.directives;
224
- opt = null;
225
- break;
226
- default: {
227
- const sv = JSON.stringify(version);
228
- throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);
229
- }
230
- }
231
- if (options.schema instanceof Object) this.schema = options.schema;
232
- else if (opt) this.schema = new Schema(Object.assign(opt, options));
233
- else throw new Error(`With a null YAML version, the { schema: Schema } option is required`);
234
- }
235
- toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
236
- const ctx = {
237
- anchors: /* @__PURE__ */ new Map(),
238
- doc: this,
239
- keep: !json,
240
- mapAsMap: mapAsMap === true,
241
- mapKeyWarned: false,
242
- maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100
243
- };
244
- const res = toJS(this.contents, jsonArg ?? "", ctx);
245
- if (typeof onAnchor === "function") for (const { count, res } of ctx.anchors.values()) onAnchor(res, count);
246
- return typeof reviver === "function" ? applyReviver(reviver, { "": res }, "", res) : res;
247
- }
248
- /**
249
- * A JSON representation of the document `contents`.
250
- *
251
- * @param jsonArg Used by `JSON.stringify` to indicate the array index or
252
- * property name.
253
- */
254
- toJSON(jsonArg, onAnchor) {
255
- return this.toJS({
256
- json: true,
257
- jsonArg,
258
- mapAsMap: false,
259
- onAnchor
260
- });
261
- }
262
- /** A YAML representation of the document. */
263
- toString(options = {}) {
264
- if (this.errors.length > 0) throw new Error("Document with errors cannot be stringified");
265
- if ("indent" in options && (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {
266
- const s = JSON.stringify(options.indent);
267
- throw new Error(`"indent" option must be a positive integer, not ${s}`);
268
- }
269
- return stringifyDocument(this, options);
270
- }
271
- };
272
- function assertCollection(contents) {
273
- if (isCollection(contents)) return true;
274
- throw new Error("Expected a YAML collection as document contents");
275
- }
276
- //#endregion
277
- export { Document };