fumadocs-openapi 10.8.0 → 10.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/generated/shared.css +1 -0
- package/dist/generate-file.d.ts +2 -0
- package/dist/generate-file.js +2 -2
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/general/create-limiter.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/object/is-object.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/object/prevent-pollution.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/queue/queue.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.1 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/string/generate-hash.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/bundle.js +13 -2
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js +2 -2
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +1 -0
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/value-generator.js +17 -3
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/convert-to-local-ref.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/escape-json-pointer.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/get-schemas.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/get-segments-from-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/get-value-by-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-file-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-http-url.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-json-object.js +2 -2
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-yaml.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/normalize.js +3 -3
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/resolve-reference-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/set-value-at-path.js +2 -2
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/to-relative-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/unescape-json-pointer.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/2.0-to-3.0/upgrade-from-two-to-three.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/3.0-to-3.1/upgrade-from-three-to-three-one.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/3.1-to-3.2/upgrade-from-three-one-to-three-two.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/helpers/traverse.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.5 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/upgrade.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-collection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-doc.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-node.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-scalar.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/composer.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-block-map.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-end.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +5 -8
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-props.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-contains-newline.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-map-includes.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/Document.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/anchors.js +6 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/applyReviver.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/createNode.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/directives.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/errors.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/log.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Alias.js +2 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Collection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Node.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Pair.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Scalar.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/YAMLMap.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/identity.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/toJS.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/cst-visit.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/lexer.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/line-counter.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/parser.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/public-api.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/Schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/map.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/null.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/seq.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/string.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/bool.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/float.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/int.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/json/schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/tags.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +9 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +9 -6
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringify.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyComment.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -2
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyPair.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyString.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/visit.js +1 -1
- package/dist/playground/client.js +3 -3
- package/dist/playground/components/inputs.js +2 -2
- package/dist/playground/components/oauth-dialog.js +1 -1
- package/dist/playground/components/result-display.js +2 -2
- package/dist/playground/components/server-select.js +1 -1
- package/dist/playground/schema.js +1 -1
- package/dist/ui/base.js +1 -1
- package/dist/ui/components/dialog.js +1 -1
- package/dist/ui/create-client.js +1 -1
- package/dist/ui/operation/client.js +1 -1
- package/dist/ui/operation/index.js +2 -2
- package/dist/ui/operation/request-tabs.js +1 -1
- package/dist/ui/operation/usage-tabs/client.js +1 -1
- package/dist/ui/schema/client.js +2 -2
- package/dist/utils/document/process.js +5 -5
- package/dist/utils/pages/preset-auto.js +5 -4
- package/dist/utils/schema/index.d.ts +4 -0
- package/dist/utils/schema/to-string.js +11 -8
- package/package.json +16 -19
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.7/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +0 -1
- /package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.7 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js +0 -0
- /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/cst-scalar.js +0 -0
- /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/cst.js +0 -0
- /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/index.js +0 -0
package/css/generated/shared.css
CHANGED
package/dist/generate-file.d.ts
CHANGED
|
@@ -60,7 +60,9 @@ interface GenerateFilesConfig extends PagesToTextOptions {
|
|
|
60
60
|
beforeWrite?: (this: BeforeWriteContext, files: OutputFile[]) => void | Promise<void>;
|
|
61
61
|
}
|
|
62
62
|
interface MetaOptions {
|
|
63
|
+
/** @deprecated use `folderStyle` instead */
|
|
63
64
|
groupStyle?: 'folder' | 'separator';
|
|
65
|
+
folderStyle?: 'folder' | 'separator';
|
|
64
66
|
}
|
|
65
67
|
type Config = SchemaToPagesOptions & GenerateFilesConfig & {
|
|
66
68
|
/**
|
package/dist/generate-file.js
CHANGED
|
@@ -65,14 +65,14 @@ async function generateFilesOnly(options) {
|
|
|
65
65
|
}
|
|
66
66
|
function generateMeta(context, options) {
|
|
67
67
|
const files = [];
|
|
68
|
-
const
|
|
68
|
+
const folderStyle = options.folderStyle ?? options.groupStyle ?? "folder";
|
|
69
69
|
function scan(entries, parent) {
|
|
70
70
|
const pages = [];
|
|
71
71
|
for (const entry of entries) {
|
|
72
72
|
const relativePath = PathUtils.slash(parent ? path$1.relative(parent.path, entry.path) : entry.path);
|
|
73
73
|
if (entry.type === "group") {
|
|
74
74
|
scan(entry.entries, entry);
|
|
75
|
-
if (
|
|
75
|
+
if (folderStyle === "folder") pages.push(relativePath);
|
|
76
76
|
else pages.push(`---${entry.info.title}---`, `...${relativePath}`);
|
|
77
77
|
} else pages.push(relativePath.slice(0, -path$1.extname(entry.path).length));
|
|
78
78
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Queue } from "../queue/queue.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+helpers@0.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.6.0/node_modules/@scalar/helpers/dist/general/create-limiter.js
|
|
3
3
|
/**
|
|
4
4
|
* Creates a function that limits the number of concurrent executions of async functions.
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+helpers@0.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.6.0/node_modules/@scalar/helpers/dist/object/is-object.js
|
|
2
2
|
/**
|
|
3
3
|
* Returns true if the provided value is a record object
|
|
4
4
|
* (i.e. not null, not an array, and has an actual object as the prototype).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+helpers@0.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.6.0/node_modules/@scalar/helpers/dist/object/prevent-pollution.js
|
|
2
2
|
/**
|
|
3
3
|
* Set of dangerous keys that can be used for prototype pollution attacks.
|
|
4
4
|
* These keys should never be used as property names in dynamic object operations.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+helpers@0.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.6.0/node_modules/@scalar/helpers/dist/queue/queue.js
|
|
2
2
|
/**
|
|
3
3
|
* Represents a node in a singly linked list structure, used internally by the Queue.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+helpers@0.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+helpers@0.6.0/node_modules/@scalar/helpers/dist/string/generate-hash.js
|
|
2
2
|
/**
|
|
3
3
|
* MurmurHash3 implementation
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isObject } from "../../../../../../@scalar_helpers@0.
|
|
1
|
+
import { isObject } from "../../../../../../@scalar_helpers@0.6.0/node_modules/@scalar/helpers/dist/object/is-object.js";
|
|
2
2
|
import { convertToLocalRef } from "../helpers/convert-to-local-ref.js";
|
|
3
3
|
import { getId, getSchemas } from "../helpers/get-schemas.js";
|
|
4
4
|
import { getValueByPath } from "../helpers/get-value-by-path.js";
|
|
@@ -10,7 +10,7 @@ import { setValueAtPath } from "../helpers/set-value-at-path.js";
|
|
|
10
10
|
import { toRelativePath } from "../helpers/to-relative-path.js";
|
|
11
11
|
import { escapeJsonPointer } from "../helpers/escape-json-pointer.js";
|
|
12
12
|
import { getHash, uniqueValueGeneratorFactory } from "./value-generator.js";
|
|
13
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
13
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/bundle.js
|
|
14
14
|
/** Type guard to check if a value is an object with a $ref property */
|
|
15
15
|
const hasRef = (value) => isObject(value) && "$ref" in value && typeof value["$ref"] === "string";
|
|
16
16
|
/**
|
|
@@ -155,7 +155,18 @@ const resolveAndCopyReferences = (targetDocument, sourceDocument, referencePath,
|
|
|
155
155
|
* These custom extensions help maintain the structure and traceability of bundled documents.
|
|
156
156
|
*/
|
|
157
157
|
const extensions = {
|
|
158
|
+
/**
|
|
159
|
+
* Custom OpenAPI extension key used to store external references.
|
|
160
|
+
* This key will contain all bundled external documents.
|
|
161
|
+
* The x-ext key is used to maintain a clean separation between the main
|
|
162
|
+
* OpenAPI document and its bundled external references.
|
|
163
|
+
*/
|
|
158
164
|
externalDocuments: "x-ext",
|
|
165
|
+
/**
|
|
166
|
+
* Custom OpenAPI extension key used to maintain a mapping between
|
|
167
|
+
* hashed keys and their original URLs in x-ext.
|
|
168
|
+
* This mapping is essential for tracking the source of bundled references
|
|
169
|
+
*/
|
|
159
170
|
externalDocumentsMappings: "x-ext-urls"
|
|
160
171
|
};
|
|
161
172
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHttpUrl } from "../../../helpers/is-http-url.js";
|
|
2
|
-
import { createLimiter } from "../../../../../../../../@scalar_helpers@0.
|
|
2
|
+
import { createLimiter } from "../../../../../../../../@scalar_helpers@0.6.0/node_modules/@scalar/helpers/dist/general/create-limiter.js";
|
|
3
3
|
import { normalize } from "../../../helpers/normalize.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js
|
|
5
5
|
/**
|
|
6
6
|
* Safely checks for host from a URL
|
|
7
7
|
* Needed because we cannot create a URL from a relative remote URL ex: examples/openapi.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../../../../../../../../yaml@2.8.4/node_modules/yaml/browser/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isFilePath } from "../../../helpers/is-file-path.js";
|
|
2
2
|
import { normalize } from "../../../helpers/normalize.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js
|
|
4
4
|
/**
|
|
5
5
|
* Reads and normalizes data from a local file
|
|
6
6
|
* @param path - The file path to read from
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { generateHash } from "../../../../../../@scalar_helpers@0.
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
import { generateHash } from "../../../../../../@scalar_helpers@0.6.0/node_modules/@scalar/helpers/dist/string/generate-hash.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/value-generator.js
|
|
3
3
|
/**
|
|
4
4
|
* Generates a short hash from a string value using xxhash.
|
|
5
5
|
*
|
|
@@ -75,7 +75,21 @@ async function generateUniqueValue(compress, value, compressedToValue, prevCompr
|
|
|
75
75
|
*/
|
|
76
76
|
const uniqueValueGeneratorFactory = (compress, compressedToValue) => {
|
|
77
77
|
const valueToCompressed = Object.fromEntries(Object.entries(compressedToValue).map(([key, value]) => [value, key]));
|
|
78
|
-
return {
|
|
78
|
+
return {
|
|
79
|
+
/**
|
|
80
|
+
* Generates a unique compressed value for the given input string.
|
|
81
|
+
* First checks if a compressed value already exists in the cache.
|
|
82
|
+
* If not, generates a new unique compressed value and stores it in the cache.
|
|
83
|
+
*
|
|
84
|
+
* @param value - The original string value to compress
|
|
85
|
+
* @returns A Promise that resolves to the compressed string value
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* const generator = uniqueValueGeneratorFactory(compress, {})
|
|
89
|
+
* const compressed = await generator.generate('example.com/schema.json')
|
|
90
|
+
* // Returns a unique compressed value like 'example'
|
|
91
|
+
*/
|
|
92
|
+
generate: async (value) => {
|
|
79
93
|
const cache = valueToCompressed[value];
|
|
80
94
|
if (cache) return cache;
|
|
81
95
|
const generatedValue = await generateUniqueValue(compress, value, compressedToValue);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/convert-to-local-ref.js
|
|
2
2
|
/**
|
|
3
3
|
* Translates a JSON Reference ($ref) to a local object path within the root schema.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/escape-json-pointer.js
|
|
2
2
|
/**
|
|
3
3
|
* Escapes a JSON pointer string.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/get-schemas.js
|
|
2
2
|
/**
|
|
3
3
|
* Retrieves the $id property from the input object if it exists and is a string.
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unescapeJsonPointer } from "./unescape-json-pointer.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/get-segments-from-path.js
|
|
3
3
|
/**
|
|
4
4
|
* Translate `/paths/~1test` to `['paths', '/test']`
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getId } from "./get-schemas.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/get-value-by-path.js
|
|
3
3
|
/**
|
|
4
4
|
* Traverses an object using an array of string segments (path keys) and returns
|
|
5
5
|
* the value at the specified path along with its context (id if available).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isHttpUrl } from "./is-http-url.js";
|
|
2
2
|
import { isJsonObject } from "./is-json-object.js";
|
|
3
3
|
import { isYaml } from "./is-yaml.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/is-file-path.js
|
|
5
5
|
/**
|
|
6
6
|
* Checks if a string represents a file path by ensuring it's not a remote URL,
|
|
7
7
|
* YAML content, or JSON content.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/is-http-url.js
|
|
2
2
|
/**
|
|
3
3
|
* Checks if a string is a remote URL (starts with http:// or https://)
|
|
4
4
|
* @param value - The URL string to check
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isObject } from "../../../../../../@scalar_helpers@0.
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
import { isObject } from "../../../../../../@scalar_helpers@0.6.0/node_modules/@scalar/helpers/dist/object/is-object.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/is-json-object.js
|
|
3
3
|
/**
|
|
4
4
|
* Determines if a string represents a valid JSON object (i.e., a plain object, not an array, primitive, or null).
|
|
5
5
|
* The function first checks if the string appears to start with an opening curly brace (ignoring leading whitespace),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/is-yaml.js
|
|
2
2
|
/**
|
|
3
3
|
* Checks if a string appears to be YAML content.
|
|
4
4
|
* This function uses a simple heuristic: it looks for a line that starts with an optional dash,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { parse } from "../../../../../../yaml@2.8.
|
|
2
|
-
import "../../../../../../yaml@2.8.
|
|
3
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
import { parse } from "../../../../../../yaml@2.8.4/node_modules/yaml/browser/dist/public-api.js";
|
|
2
|
+
import "../../../../../../yaml@2.8.4/node_modules/yaml/browser/index.js";
|
|
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.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHttpUrl } from "./is-http-url.js";
|
|
2
2
|
import { posix } from "../../../../../../pathe@2.0.3/node_modules/pathe/dist/index.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/resolve-reference-path.js
|
|
4
4
|
/**
|
|
5
5
|
* Resolves a reference path by combining a base path with a relative path.
|
|
6
6
|
* Handles both remote URLs and local file paths.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { preventPollution } from "../../../../../../@scalar_helpers@0.
|
|
1
|
+
import { preventPollution } from "../../../../../../@scalar_helpers@0.6.0/node_modules/@scalar/helpers/dist/object/prevent-pollution.js";
|
|
2
2
|
import { getSegmentsFromPath } from "./get-segments-from-path.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/set-value-at-path.js
|
|
4
4
|
/**
|
|
5
5
|
* Sets a value at a specified path in an object, creating intermediate objects/arrays as needed.
|
|
6
6
|
* This function traverses the object structure and creates any missing intermediate objects
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHttpUrl } from "./is-http-url.js";
|
|
2
2
|
import { posix } from "../../../../../../pathe@2.0.3/node_modules/pathe/dist/index.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/to-relative-path.js
|
|
4
4
|
/**
|
|
5
5
|
* Converts an input path or URL to a relative path based on the provided base.
|
|
6
6
|
* Handles both remote URLs and local file system paths.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+json-magic@0.12.12/node_modules/@scalar/json-magic/dist/helpers/unescape-json-pointer.js
|
|
2
2
|
/**
|
|
3
3
|
* Unescape JSON pointer
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { traverse } from "../helpers/traverse.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.7/node_modules/@scalar/openapi-upgrader/dist/2.0-to-3.0/upgrade-from-two-to-three.js
|
|
3
3
|
const DEFAULT_MEDIA_TYPE = "application/json";
|
|
4
4
|
/** Extracts and removes x-example and x-examples extensions from an object */
|
|
5
5
|
function extractXExampleExtensions(obj) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { traverse } from "../helpers/traverse.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.7/node_modules/@scalar/openapi-upgrader/dist/3.0-to-3.1/upgrade-from-three-to-three-one.js
|
|
3
3
|
const SCHEMA_SEGMENTS = new Set([
|
|
4
4
|
"properties",
|
|
5
5
|
"items",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.7/node_modules/@scalar/openapi-upgrader/dist/3.1-to-3.2/upgrade-from-three-one-to-three-two.js
|
|
2
2
|
/**
|
|
3
3
|
* Recursively migrate XML object properties from 3.1 to 3.2 format
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.7/node_modules/@scalar/openapi-upgrader/dist/helpers/traverse.js
|
|
2
2
|
/**
|
|
3
3
|
* Recursively traverses the content and applies the transform function to each node.
|
|
4
4
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { upgradeFromThreeOneToThreeTwo } from "./3.1-to-3.2/upgrade-from-three-one-to-three-two.js";
|
|
2
2
|
import { upgradeFromTwoToThree } from "./2.0-to-3.0/upgrade-from-two-to-three.js";
|
|
3
3
|
import { upgradeFromThreeToThreeOne } from "./3.0-to-3.1/upgrade-from-three-to-three-one.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@scalar+openapi-upgrader@0.2.7/node_modules/@scalar/openapi-upgrader/dist/upgrade.js
|
|
5
5
|
function upgrade(value, targetVersion) {
|
|
6
6
|
const openapi30 = upgradeFromTwoToThree(value);
|
|
7
7
|
if (targetVersion === "3.0") return openapi30;
|
|
@@ -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.
|
|
8
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
5
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
7
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
5
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
7
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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]];
|
|
@@ -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.8.
|
|
7
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
9
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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;
|
|
@@ -131,11 +131,7 @@ function doubleQuotedValue(source, onError) {
|
|
|
131
131
|
next = source[++i + 1];
|
|
132
132
|
while (next === " " || next === " ") next = source[++i + 1];
|
|
133
133
|
} else if (next === "x" || next === "u" || next === "U") {
|
|
134
|
-
const length =
|
|
135
|
-
x: 2,
|
|
136
|
-
u: 4,
|
|
137
|
-
U: 8
|
|
138
|
-
}[next];
|
|
134
|
+
const length = next === "x" ? 2 : next === "u" ? 4 : 8;
|
|
139
135
|
res += parseCharCode(source, i + 1, length, onError);
|
|
140
136
|
i += length;
|
|
141
137
|
} else {
|
|
@@ -195,12 +191,13 @@ const escapeCodes = {
|
|
|
195
191
|
function parseCharCode(source, offset, length, onError) {
|
|
196
192
|
const cc = source.substr(offset, length);
|
|
197
193
|
const code = cc.length === length && /^[0-9a-fA-F]+$/.test(cc) ? parseInt(cc, 16) : NaN;
|
|
198
|
-
|
|
194
|
+
try {
|
|
195
|
+
return String.fromCodePoint(code);
|
|
196
|
+
} catch {
|
|
199
197
|
const raw = source.substr(offset - 2, length + 2);
|
|
200
198
|
onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`);
|
|
201
199
|
return raw;
|
|
202
200
|
}
|
|
203
|
-
return String.fromCodePoint(code);
|
|
204
201
|
}
|
|
205
202
|
//#endregion
|
|
206
203
|
export { resolveFlowScalar };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
12
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/doc/anchors.js
|
|
4
4
|
/**
|
|
5
5
|
* Verify that the input string is a valid anchor.
|
|
6
6
|
*
|
|
@@ -39,6 +39,11 @@ function createNodeAnchors(doc, prefix) {
|
|
|
39
39
|
prevAnchors.add(anchor);
|
|
40
40
|
return anchor;
|
|
41
41
|
},
|
|
42
|
+
/**
|
|
43
|
+
* With circular references, the source node is only resolved after all
|
|
44
|
+
* of its child nodes are. This is why anchors are set only after all of
|
|
45
|
+
* the nodes have been created.
|
|
46
|
+
*/
|
|
42
47
|
setAnchors: () => {
|
|
43
48
|
for (const source of aliasObjects) {
|
|
44
49
|
const ref = sourceObjects.get(source);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.8.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/log.js
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/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
|
}
|