@scalar/openapi-parser 0.23.3 → 0.23.5
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/CHANGELOG.md +16 -0
- package/dist/configuration/index.d.ts +0 -1
- package/dist/configuration/index.d.ts.map +1 -1
- package/dist/configuration/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +2 -2
- package/dist/types/index.d.ts +3 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/betterAjvErrors/helpers.d.ts +2 -6
- package/dist/utils/betterAjvErrors/helpers.d.ts.map +1 -1
- package/dist/utils/betterAjvErrors/helpers.js +1 -4
- package/dist/utils/betterAjvErrors/helpers.js.map +2 -2
- package/dist/utils/betterAjvErrors/index.d.ts +1 -1
- package/dist/utils/betterAjvErrors/index.d.ts.map +1 -1
- package/dist/utils/join/index.d.ts +1 -1
- package/dist/utils/join/index.d.ts.map +1 -1
- package/dist/utils/join/index.js.map +1 -1
- package/dist/utils/join/join.d.ts +2 -2
- package/dist/utils/join/join.d.ts.map +1 -1
- package/dist/utils/join/join.js +1 -1
- package/dist/utils/join/join.js.map +2 -2
- package/dist/utils/load/index.d.ts +2 -1
- package/dist/utils/load/index.d.ts.map +1 -1
- package/dist/utils/load/index.js.map +2 -2
- package/dist/utils/openapi/openapi.d.ts +720 -180
- package/dist/utils/openapi/openapi.d.ts.map +1 -1
- package/dist/utils/resolve-references.d.ts +2 -1
- package/dist/utils/resolve-references.d.ts.map +1 -1
- package/dist/utils/resolve-references.js.map +1 -1
- package/dist/utils/transform/sanitize.d.ts +2 -1
- package/dist/utils/transform/sanitize.d.ts.map +1 -1
- package/dist/utils/transform/sanitize.js +1 -2
- package/dist/utils/transform/sanitize.js.map +2 -2
- package/dist/utils/transform/utils/addInfoObject.d.ts +0 -1
- package/dist/utils/transform/utils/addInfoObject.d.ts.map +1 -1
- package/dist/utils/transform/utils/addInfoObject.js +0 -1
- package/dist/utils/transform/utils/addInfoObject.js.map +2 -2
- package/dist/utils/transform-errors.d.ts +1 -1
- package/dist/utils/transform-errors.d.ts.map +1 -1
- package/package.json +6 -10
- package/dist/lib/Validator/index.d.ts +0 -2
- package/dist/lib/Validator/index.d.ts.map +0 -1
- package/dist/lib/Validator/index.js +0 -5
- package/dist/lib/Validator/index.js.map +0 -7
- package/dist/utils/betterAjvErrors/json/get-meta-from-path.d.ts +0 -2
- package/dist/utils/betterAjvErrors/json/get-meta-from-path.d.ts.map +0 -1
- package/dist/utils/betterAjvErrors/json/get-meta-from-path.js +0 -27
- package/dist/utils/betterAjvErrors/json/get-meta-from-path.js.map +0 -7
- package/dist/utils/betterAjvErrors/json/index.d.ts +0 -2
- package/dist/utils/betterAjvErrors/json/index.d.ts.map +0 -1
- package/dist/utils/betterAjvErrors/json/index.js +0 -5
- package/dist/utils/betterAjvErrors/json/index.js.map +0 -7
- package/dist/utils/betterAjvErrors/json/utils.d.ts +0 -2
- package/dist/utils/betterAjvErrors/json/utils.d.ts.map +0 -1
- package/dist/utils/betterAjvErrors/json/utils.js +0 -11
- package/dist/utils/betterAjvErrors/json/utils.js.map +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @scalar/openapi-parser
|
|
2
2
|
|
|
3
|
+
## 0.23.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @scalar/json-magic@0.8.4
|
|
9
|
+
|
|
10
|
+
## 0.23.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`e04879c`](https://github.com/scalar/scalar/commit/e04879c65602dfb65393876754f5344751b8953d), [`a164d76`](https://github.com/scalar/scalar/commit/a164d76f21437b3a35210d62a996b6c9d483e5a4), [`bfd814a`](https://github.com/scalar/scalar/commit/bfd814a4219660face190041cc4845182b56ab03), [`af54a80`](https://github.com/scalar/scalar/commit/af54a80349269a4269a68f6a372f837177a3537c)]:
|
|
15
|
+
- @scalar/json-magic@0.8.3
|
|
16
|
+
- @scalar/openapi-types@0.5.2
|
|
17
|
+
- @scalar/openapi-upgrader@0.1.5
|
|
18
|
+
|
|
3
19
|
## 0.23.3
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configuration/index.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/configuration/index.ts"],
|
|
4
|
-
"sourcesContent": ["import Swagger20 from '@/schemas/v2.0/schema'\nimport OpenApi30 from '@/schemas/v3.0/schema'\nimport OpenApi31 from '@/schemas/v3.1/schema'\nimport OpenApi32 from '@/schemas/v3.2/schema'\n\n/**\n * A list of the supported OpenAPI specifications\n */\nexport const OpenApiSpecifications = {\n '2.0': Swagger20,\n '3.0': OpenApi30,\n '3.1': OpenApi31,\n '3.2': OpenApi32,\n}\n\nexport type OpenApiVersion = keyof typeof OpenApiSpecifications\n\nexport const OpenApiVersions = Object.keys(OpenApiSpecifications) as OpenApiVersion[]\n\n/**\n * List of error messages used in the Validator\n */\nexport const ERRORS = {\n EMPTY_OR_INVALID: \"Can't find JSON, YAML or filename in data.\",\n // URI_MUST_BE_STRING: 'uri parameter or $id attribute must be a string',\n OPENAPI_VERSION_NOT_SUPPORTED:\n \"Can't find supported Swagger/OpenAPI version in the provided document, version must be a string.\",\n INVALID_REFERENCE: \"Can't resolve reference: %s\",\n EXTERNAL_REFERENCE_NOT_FOUND: \"Can't resolve external reference: %s\",\n FILE_DOES_NOT_EXIST: 'File does not exist: %s',\n NO_CONTENT: 'No content found',\n} as const\n
|
|
4
|
+
"sourcesContent": ["import Swagger20 from '@/schemas/v2.0/schema'\nimport OpenApi30 from '@/schemas/v3.0/schema'\nimport OpenApi31 from '@/schemas/v3.1/schema'\nimport OpenApi32 from '@/schemas/v3.2/schema'\n\n/**\n * A list of the supported OpenAPI specifications\n */\nexport const OpenApiSpecifications = {\n '2.0': Swagger20,\n '3.0': OpenApi30,\n '3.1': OpenApi31,\n '3.2': OpenApi32,\n}\n\nexport type OpenApiVersion = keyof typeof OpenApiSpecifications\n\nexport const OpenApiVersions = Object.keys(OpenApiSpecifications) as OpenApiVersion[]\n\n/**\n * List of error messages used in the Validator\n */\nexport const ERRORS = {\n EMPTY_OR_INVALID: \"Can't find JSON, YAML or filename in data.\",\n // URI_MUST_BE_STRING: 'uri parameter or $id attribute must be a string',\n OPENAPI_VERSION_NOT_SUPPORTED:\n \"Can't find supported Swagger/OpenAPI version in the provided document, version must be a string.\",\n INVALID_REFERENCE: \"Can't resolve reference: %s\",\n EXTERNAL_REFERENCE_NOT_FOUND: \"Can't resolve external reference: %s\",\n FILE_DOES_NOT_EXIST: 'File does not exist: %s',\n NO_CONTENT: 'No content found',\n} as const\n"],
|
|
5
5
|
"mappings": "AAAA,OAAO,eAAe;AACtB,OAAO,eAAe;AACtB,OAAO,eAAe;AACtB,OAAO,eAAe;AAKf,MAAM,wBAAwB;AAAA,EACnC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT;AAIO,MAAM,kBAAkB,OAAO,KAAK,qBAAqB;AAKzD,MAAM,SAAS;AAAA,EACpB,kBAAkB;AAAA;AAAA,EAElB,+BACE;AAAA,EACF,mBAAmB;AAAA,EACnB,8BAA8B;AAAA,EAC9B,qBAAqB;AAAA,EACrB,YAAY;AACd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { upgradeFromTwoToThree } from '@scalar/openapi-upgrader/2.0-to-3.0';
|
|
|
6
6
|
/** @deprecated Please import from @scalar/openapi-upgrader/3.0-to-3.1 instead */
|
|
7
7
|
export { upgradeFromThreeToThreeOne } from '@scalar/openapi-upgrader/3.0-to-3.1';
|
|
8
8
|
export type { AnyObject, ErrorObject, Filesystem, LoadResult } from './types/index.js';
|
|
9
|
-
export {
|
|
9
|
+
export { type DereferenceOptions, dereference } from './utils/dereference.js';
|
|
10
10
|
export { filter } from './utils/filter.js';
|
|
11
11
|
export { isJson } from './utils/is-json.js';
|
|
12
12
|
export { isYaml } from './utils/is-yaml.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","s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MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["/** biome-ignore-all lint/performance/noBarrelFile: entrypoint file */\n/** @deprecated Please import from @scalar/json-magic/helpers/escape-json-pointer instead */\nexport { escapeJsonPointer } from '@scalar/json-magic/helpers/escape-json-pointer'\n/** @deprecated Please import from @scalar/openapi-upgrader/2.0-to-3.0 instead */\nexport { upgradeFromTwoToThree } from '@scalar/openapi-upgrader/2.0-to-3.0'\n/** @deprecated Please import from @scalar/openapi-upgrader/3.0-to-3.1 instead */\nexport { upgradeFromThreeToThreeOne } from '@scalar/openapi-upgrader/3.0-to-3.1'\n\nexport type { AnyObject, ErrorObject, Filesystem, LoadResult } from './types'\nexport {
|
|
5
|
-
"mappings": "AAEA,SAAS,yBAAyB;AAElC,SAAS,6BAA6B;AAEtC,SAAS,kCAAkC;AAG3C,
|
|
4
|
+
"sourcesContent": ["/** biome-ignore-all lint/performance/noBarrelFile: entrypoint file */\n/** @deprecated Please import from @scalar/json-magic/helpers/escape-json-pointer instead */\nexport { escapeJsonPointer } from '@scalar/json-magic/helpers/escape-json-pointer'\n/** @deprecated Please import from @scalar/openapi-upgrader/2.0-to-3.0 instead */\nexport { upgradeFromTwoToThree } from '@scalar/openapi-upgrader/2.0-to-3.0'\n/** @deprecated Please import from @scalar/openapi-upgrader/3.0-to-3.1 instead */\nexport { upgradeFromThreeToThreeOne } from '@scalar/openapi-upgrader/3.0-to-3.1'\n\nexport type { AnyObject, ErrorObject, Filesystem, LoadResult } from './types'\nexport { type DereferenceOptions, dereference } from './utils/dereference'\nexport { filter } from './utils/filter'\nexport { isJson } from './utils/is-json'\nexport { isYaml } from './utils/is-yaml'\nexport { join } from './utils/join'\nexport { load } from './utils/load'\nexport { normalize } from './utils/normalize'\nexport { openapi } from './utils/openapi/openapi'\nexport { toJson } from './utils/to-json'\nexport { toYaml } from './utils/to-yaml'\nexport { sanitize } from './utils/transform/sanitize'\nexport { traverse } from './utils/traverse'\nexport { unescapeJsonPointer } from './utils/unescape-json-pointer'\nexport { upgrade } from './utils/upgrade'\nexport { validate } from './utils/validate'\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,yBAAyB;AAElC,SAAS,6BAA6B;AAEtC,SAAS,kCAAkC;AAG3C,SAAkC,mBAAmB;AACrD,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAS,2BAA2B;AACpC,SAAS,eAAe;AACxB,SAAS,gBAAgB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ERRORS, OpenApiVersion } from '../configuration/index.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Merge types with each other
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
type Merge<A, B> = A & Omit<B, keyof A>;
|
|
7
7
|
export type AnyObject = Record<string, any>;
|
|
8
8
|
export type UnknownObject = Record<string, unknown>;
|
|
9
9
|
/**
|
|
@@ -44,9 +44,6 @@ export type ErrorObject = {
|
|
|
44
44
|
message: string;
|
|
45
45
|
code?: keyof typeof ERRORS | string;
|
|
46
46
|
};
|
|
47
|
-
export type AjvOptions = {
|
|
48
|
-
strict?: boolean | 'log';
|
|
49
|
-
};
|
|
50
47
|
/**
|
|
51
48
|
* Not literally a filesystem, but a list of files with their content.
|
|
52
49
|
* This is an abstraction layer to handle multiple files in the browser (without access to the hard disk).
|
|
@@ -98,7 +95,7 @@ export type Queue<T extends readonly Task[] = readonly Task[]> = {
|
|
|
98
95
|
* Available tasks, populated from the global Commands interface
|
|
99
96
|
*/
|
|
100
97
|
export type Task = Commands[keyof Commands]['task'];
|
|
101
|
-
|
|
98
|
+
type EmptyCommandChainResult = {
|
|
102
99
|
filesystem: Filesystem;
|
|
103
100
|
specification: AnyObject;
|
|
104
101
|
};
|
|
@@ -127,4 +124,5 @@ export type EmptyCommandChainResult = {
|
|
|
127
124
|
* the sequence of method calls in the fluent interface.
|
|
128
125
|
*/
|
|
129
126
|
export type CommandChain<T extends Task[]> = T extends [infer First, ...infer Rest] ? First extends Task ? Rest extends Task[] ? Merge<Commands[First['name']]['result'], CommandChain<Rest>> : never : never : EmptyCommandChainResult;
|
|
127
|
+
export {};
|
|
130
128
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAG7D;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAG7D;;GAEG;AACH,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,I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AAE,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,GAC/E,KAAK,SAAS,IAAI,GAChB,IAAI,SAAS,IAAI,EAAE,GACjB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,GAC5D,KAAK,GACP,KAAK,GACP,uBAAuB,CAAA"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
4
|
-
export declare function filterRedundantErrors(root: any, parent: any, key: any): void;
|
|
5
|
-
export declare function createErrorInstances(root: any, options: any): any;
|
|
6
|
-
export default function prettify(ajvErrors: any, options: any): any;
|
|
1
|
+
import { EnumValidationError } from './validation-errors/index.js';
|
|
2
|
+
export default function prettify(ajvErrors: any, options: any): EnumValidationError[];
|
|
7
3
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/utils/betterAjvErrors/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/utils/betterAjvErrors/helpers.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,mBAAmB,EAIpB,MAAM,qBAAqB,CAAA;AA2G5B,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,SAAS,KAAA,EAAE,OAAO,KAAA,yBAKlD"}
|
|
@@ -92,9 +92,6 @@ function prettify(ajvErrors, options) {
|
|
|
92
92
|
return createErrorInstances(tree, options);
|
|
93
93
|
}
|
|
94
94
|
export {
|
|
95
|
-
|
|
96
|
-
prettify as default,
|
|
97
|
-
filterRedundantErrors,
|
|
98
|
-
makeTree
|
|
95
|
+
prettify as default
|
|
99
96
|
};
|
|
100
97
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/utils/betterAjvErrors/helpers.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n concatAll,\n getChildren,\n getErrors,\n getSiblings,\n isAnyOfError,\n isEnumError,\n isRequiredError,\n notUndefined,\n} from './utils'\nimport {\n AdditionalPropValidationError,\n DefaultValidationError,\n EnumValidationError,\n PatternValidationError,\n RequiredValidationError,\n UnevaluatedPropValidationError,\n} from './validation-errors'\n\nconst JSON_POINTERS_REGEX = /\\/[\\w_-]+(\\/\\d+)?/g\n\n// Make a tree of errors from ajv errors array\
|
|
5
|
-
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,sBAAsB;
|
|
4
|
+
"sourcesContent": ["import {\n concatAll,\n getChildren,\n getErrors,\n getSiblings,\n isAnyOfError,\n isEnumError,\n isRequiredError,\n notUndefined,\n} from './utils'\nimport {\n AdditionalPropValidationError,\n DefaultValidationError,\n EnumValidationError,\n PatternValidationError,\n RequiredValidationError,\n UnevaluatedPropValidationError,\n} from './validation-errors'\n\nconst JSON_POINTERS_REGEX = /\\/[\\w_-]+(\\/\\d+)?/g\n\n// Make a tree of errors from ajv errors array\nfunction makeTree(ajvErrors = []) {\n const root = { children: {} }\n ajvErrors.forEach((ajvError) => {\n const instancePath = typeof ajvError.instancePath !== 'undefined' ? ajvError.instancePath : ajvError.dataPath\n\n // `dataPath === ''` is root\n const paths = instancePath === '' ? [''] : instancePath.match(JSON_POINTERS_REGEX)\n if (paths) {\n paths.reduce((obj, path, i) => {\n obj.children[path] = obj.children[path] || { children: {}, errors: [] }\n if (i === paths.length - 1) {\n obj.children[path].errors.push(ajvError)\n }\n return obj.children[path]\n }, root)\n }\n })\n return root\n}\n\nfunction filterRedundantErrors(root, parent, key) {\n /**\n * If there is a `required` error then we can just skip everythig else.\n * And, also `required` should have more priority than `anyOf`. @see #8\n */\n getErrors(root).forEach((error) => {\n if (isRequiredError(error)) {\n root.errors = [error]\n root.children = {}\n }\n })\n\n /**\n * If there is an `anyOf` error that means we have more meaningful errors\n * inside children. So we will just remove all errors from this level.\n *\n * If there are no children, then we don't delete the errors since we should\n * have at least one error to report.\n */\n if (getErrors(root).some(isAnyOfError)) {\n if (Object.keys(root.children).length > 0) {\n delete root.errors\n }\n }\n\n /**\n * If all errors are `enum` and siblings have any error then we can safely\n * ignore the node.\n *\n * **CAUTION**\n * Need explicit `root.errors` check because `[].every(fn) === true`\n * https://en.wikipedia.org/wiki/Vacuous_truth#Vacuous_truths_in_mathematics\n */\n if (root.errors?.length && getErrors(root).every(isEnumError)) {\n if (\n getSiblings(parent)(root)\n // Remove any reference which becomes `undefined` later\n .filter(notUndefined)\n .some(getErrors)\n ) {\n delete parent.children[key]\n }\n }\n\n Object.entries(root.children).forEach(([k, child]) => filterRedundantErrors(child, root, k))\n}\n\nfunction createErrorInstances(root, options): Array<EnumValidationError> {\n const errors = getErrors(root)\n if (errors.length && errors.every(isEnumError)) {\n const uniqueValues = new Set(concatAll([])(errors.map((e) => e.params.allowedValues)))\n const allowedValues = [...uniqueValues]\n const error = errors[0]\n return [\n new EnumValidationError(\n {\n ...error,\n params: { allowedValues },\n },\n options,\n ),\n ]\n }\n\n return concatAll(\n errors.reduce((ret, error) => {\n switch (error.keyword) {\n case 'additionalProperties':\n return ret.concat(new AdditionalPropValidationError(error, options))\n case 'pattern':\n return ret.concat(new PatternValidationError(error, options))\n case 'required':\n return ret.concat(new RequiredValidationError(error, options))\n case 'unevaluatedProperties':\n return ret.concat(new UnevaluatedPropValidationError(error, options))\n default:\n return ret.concat(new DefaultValidationError(error, options))\n }\n }, []),\n )(getChildren(root).map((child) => createErrorInstances(child, options)))\n}\n\nexport default function prettify(ajvErrors, options) {\n const tree = makeTree(ajvErrors || [])\n // @ts-expect-error TODO\n filterRedundantErrors(tree)\n return createErrorInstances(tree, options)\n}\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,sBAAsB;AAG5B,SAAS,SAAS,YAAY,CAAC,GAAG;AAChC,QAAM,OAAO,EAAE,UAAU,CAAC,EAAE;AAC5B,YAAU,QAAQ,CAAC,aAAa;AAC9B,UAAM,eAAe,OAAO,SAAS,iBAAiB,cAAc,SAAS,eAAe,SAAS;AAGrG,UAAM,QAAQ,iBAAiB,KAAK,CAAC,EAAE,IAAI,aAAa,MAAM,mBAAmB;AACjF,QAAI,OAAO;AACT,YAAM,OAAO,CAAC,KAAK,MAAM,MAAM;AAC7B,YAAI,SAAS,IAAI,IAAI,IAAI,SAAS,IAAI,KAAK,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,EAAE;AACtE,YAAI,MAAM,MAAM,SAAS,GAAG;AAC1B,cAAI,SAAS,IAAI,EAAE,OAAO,KAAK,QAAQ;AAAA,QACzC;AACA,eAAO,IAAI,SAAS,IAAI;AAAA,MAC1B,GAAG,IAAI;AAAA,IACT;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAEA,SAAS,sBAAsB,MAAM,QAAQ,KAAK;AAKhD,YAAU,IAAI,EAAE,QAAQ,CAAC,UAAU;AACjC,QAAI,gBAAgB,KAAK,GAAG;AAC1B,WAAK,SAAS,CAAC,KAAK;AACpB,WAAK,WAAW,CAAC;AAAA,IACnB;AAAA,EACF,CAAC;AASD,MAAI,UAAU,IAAI,EAAE,KAAK,YAAY,GAAG;AACtC,QAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,SAAS,GAAG;AACzC,a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AAA,MAChE;AAAA,IACF,GAAG,CAAC,CAAC;AAAA,EACP,EAAE,YAAY,IAAI,EAAE,IAAI,CAAC,UAAU,qBAAqB,OAAO,OAAO,CAAC,CAAC;AAC1E;AAEe,SAAR,SAA0B,WAAW,SAAS;AACnD,QAAM,OAAO,SAAS,aAAa,CAAC,CAAC;AAErC,wBAAsB,IAAI;AAC1B,SAAO,qBAAqB,MAAM,OAAO;AAC3C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -12,6 +12,6 @@ type AjvError = {
|
|
|
12
12
|
parentSchema: any;
|
|
13
13
|
data: any;
|
|
14
14
|
};
|
|
15
|
-
export declare function betterAjvErrors(schema: any, data: any, errors: AjvError[], options?: BetterAjvErrorsOptions): any;
|
|
15
|
+
export declare function betterAjvErrors(schema: any, data: any, errors: AjvError[], options?: BetterAjvErrorsOptions): any[];
|
|
16
16
|
export {};
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/betterAjvErrors/index.ts"],"names":[],"mappings":"AAEA,KAAK,sBAAsB,GAAG;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAGD,KAAK,QAAQ,GAAG;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,GAAG,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,GAAG,CAAA;IACX,YAAY,EAAE,GAAG,CAAA;IACjB,IAAI,EAAE,GAAG,CAAA;CACV,CAAA;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,OAAO,GAAE,sBAA2B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/betterAjvErrors/index.ts"],"names":[],"mappings":"AAEA,KAAK,sBAAsB,GAAG;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAGD,KAAK,QAAQ,GAAG;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,GAAG,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,GAAG,CAAA;IACX,YAAY,EAAE,GAAG,CAAA;IACjB,IAAI,EAAE,GAAG,CAAA;CACV,CAAA;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,OAAO,GAAE,sBAA2B,SAa/G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/join/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/join/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/utils/join/index.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["/** biome-ignore-all lint/performance/noBarrelFile: entrypoint */\nexport { join } from './join'\n"],
|
|
5
5
|
"mappings": "AACA,SAAS,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { UnknownObject } from '../../types/index.js';
|
|
2
1
|
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
3
|
-
|
|
2
|
+
import type { UnknownObject } from '../../types/index.js';
|
|
3
|
+
type Conflicts = {
|
|
4
4
|
type: 'path';
|
|
5
5
|
path: string;
|
|
6
6
|
method: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../../src/utils/join/join.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../../src/utils/join/join.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAyO5C,KAAK,SAAS,GACV;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAC9D,KAAK,UAAU,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,SAAS,EAAE,CAAA;CAAE,CAAA;AAEtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,IAAI,GAAU,QAAQ,aAAa,EAAE,EAAE,SAAS;IAAE,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAAE,KAAG,OAAO,CAAC,UAAU,CAkE/G,CAAA"}
|
package/dist/utils/join/join.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { bundle } from "@scalar/json-magic/bundle";
|
|
1
2
|
import { mergeObjects } from "../../utils/join/merge-objects.js";
|
|
2
3
|
import { upgrade } from "../../utils/upgrade.js";
|
|
3
|
-
import { bundle } from "@scalar/json-magic/bundle";
|
|
4
4
|
const getSetIntersection = (a, b) => {
|
|
5
5
|
const result = [];
|
|
6
6
|
for (const value of a) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/utils/join/join.ts"],
|
|
4
|
-
"sourcesContent": ["import type { UnknownObject } from '@/types'\nimport { mergeObjects } from '@/utils/join/merge-objects'\nimport { upgrade } from '@/utils/upgrade'\nimport { bundle } from '@scalar/json-magic/bundle'\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\n/**\n * Returns the intersection of two sets as an array.\n *\n * @param a - The first set\n * @param b - The second set\n * @returns An array containing the elements present in both sets\n *\n * @example\n * const setA = new Set([1, 2, 3, 4])\n * const setB = new Set([3, 4, 5, 6])\n * const intersection = getSetIntersection(setA, setB)\n * // intersection: [3, 4]\n */\nconst getSetIntersection = <T>(a: Set<T>, b: Set<T>): T[] => {\n const result: T[] = []\n for (const value of a) {\n if (b.has(value)) {\n result.push(value)\n }\n }\n return result\n}\n\n/**\n * Returns the value if it is not nullish (or, for arrays, not empty), otherwise returns the provided default value.\n * Useful for handling OpenAPI fields that may be missing or empty.\n */\nconst withDefault = <T, K>(value: T, defaultValue: K): T | K => {\n if (Array.isArray(value)) {\n return value.length ? value : defaultValue\n }\n\n if (typeof value === 'object' && value !== null) {\n return Object.keys(value).length ? value : defaultValue\n }\n\n return value ?? defaultValue\n}\n\n/**\n * Merges multiple OpenAPI PathsObjects into a single PathsObject.\n * - If a path does not exist in the result, it is added directly.\n * - If a path already exists, its operations (get, post, etc.) are merged.\n * - If the same operation (e.g., \"get\") exists for the same path in multiple inputs,\n * a conflict is recorded for that path and method.\n *\n * @param inputs - Array of OpenAPIV3_1.PathsObject to merge\n * @returns An object containing the merged paths and a list of conflicts\n */\nconst mergePaths = (inputs: OpenAPIV3_1.PathsObject[]) => {\n const result: OpenAPIV3_1.PathsObject = {}\n const conflicts: { path: string; method: string }[] = []\n\n for (const paths of inputs) {\n if (typeof paths !== 'object') {\n continue\n }\n\n for (const [path, pathItem] of Object.entries(paths)) {\n if (!result[path]) {\n // If the path does not exist, add it directly\n result[path] = pathItem\n continue\n }\n\n // Find intersecting operation keys (e.g., \"get\", \"post\") for this path\n const intersectingKeys = getSetIntersection(new Set(Object.keys(result[path])), new Set(Object.keys(pathItem)))\n\n // If the path exists, merge the operations (get, post, etc.)\n result[path] = { ...result[path], ...pathItem }\n // Record conflicts for each intersecting operation key\n intersectingKeys.forEach((key) => conflicts.push({ method: key, path }))\n }\n }\n\n return { paths: result, conflicts }\n}\n\n/**\n * Merges multiple arrays of OpenAPI TagObjects into a single array, ensuring uniqueness by tag name.\n * - If a tag with the same name appears in multiple arrays, only the first occurrence is included in the result.\n *\n * @param inputs - Array of arrays of OpenAPIV3_1.TagObject to merge\n * @returns An array of unique TagObjects (by name)\n */\nconst mergeTags = (inputs: OpenAPIV3_1.TagObject[][]) => {\n const cache = new Set<string>()\n const result: OpenAPIV3_1.TagObject[] = []\n\n for (const tags of inputs) {\n for (const tag of tags) {\n if (!cache.has(tag.name)) {\n result.push(tag)\n }\n cache.add(tag.name)\n }\n }\n\n return result\n}\n\n/**\n * Merges multiple arrays of OpenAPI ServerObjects into a single array, ensuring uniqueness by server URL.\n * - If a server with the same URL appears in multiple arrays, only the first occurrence is included in the result.\n *\n * @param inputs - Array of arrays of OpenAPIV3_1.ServerObject to merge\n * @returns An array of unique ServerObjects (by url)\n */\nconst mergeServers = (inputs: OpenAPIV3_1.ServerObject[][]) => {\n const cache = new Set<string>()\n const result: OpenAPIV3_1.ServerObject[] = []\n\n for (const servers of inputs) {\n for (const server of servers) {\n if (!cache.has(server.url)) {\n result.push(server)\n }\n cache.add(server.url)\n }\n }\n\n return result\n}\n\n/**\n * Merges multiple OpenAPI ComponentsObject instances into a single components object.\n * - If a component with the same type and name appears in multiple inputs, only the first occurrence is included.\n * - Any conflicts (duplicate component names within the same type) are recorded in the `conflicts` array.\n *\n * @param inputs - Array of OpenAPIV3_1.ComponentsObject to merge\n * @returns An object containing the merged components and an array of conflicts\n */\nconst mergeComponents = (inputs: OpenAPIV3_1.ComponentsObject[]) => {\n const result: OpenAPIV3_1.ComponentsObject = {}\n const conflicts: { componentType: string; name: string }[] = []\n\n for (const components of inputs) {\n if (typeof components !== 'object') {\n continue\n }\n\n // Merge each component type (schemas, responses, parameters, etc.)\n for (const [key, value] of Object.entries(components)) {\n for (const [name, component] of Object.entries(value)) {\n if (!result[key]) {\n result[key] = {}\n }\n\n if (result[key][name]) {\n // If the component already exists, record a conflict\n conflicts.push({ componentType: key, name })\n } else {\n // Otherwise, add the component\n result[key][name] = component\n }\n }\n }\n }\n\n return { components: result, conflicts }\n}\n\n/**\n * Prefixes component names and their references in multiple OpenAPI documents.\n *\n * This function mutates each input document in-place by:\n * 1. Prefixing all component names (e.g., schema names) with the corresponding prefix.\n * 2. Updating all $ref values that point to components to use the prefixed names.\n *\n * This is useful when merging multiple OpenAPI documents to avoid component name collisions.\n *\n * @param inputs - Array of OpenAPI documents to mutate.\n * @param prefixes - Array of prefixes to apply to each document's components.\n */\nconst prefixComponents = async (inputs: OpenAPIV3_1.Document[], prefixes: string[]) => {\n for (const index of inputs.keys()) {\n await bundle(inputs[index], {\n treeShake: false,\n urlMap: false,\n plugins: [\n // Plugin to update $ref values to use the prefixed component names\n {\n type: 'lifecycle',\n onBeforeNodeProcess: (node) => {\n const ref = node['$ref']\n\n if (typeof ref !== 'string') {\n return\n }\n\n // Only process refs that point to components\n if (!ref.startsWith('#/components/')) {\n return\n }\n\n const parts = ref.split('/')\n // Ensure the ref has the expected structure: #/components/{type}/{name}\n if (parts.length < 4) {\n return\n }\n\n // Prefix the component name (parts[3]) with the provided prefix\n parts[3] = `${prefixes[index] ?? ''}${parts[3]}`\n\n node['$ref'] = parts.join('/')\n },\n },\n // Plugin to rename component keys with the prefix\n {\n type: 'lifecycle',\n onBeforeNodeProcess: (node, context) => {\n // Check if the node is a component type object (e.g., schemas, responses) under \"components\"\n if (context.path.length === 2 && context.path[0] === 'components') {\n const prefix = prefixes[index]\n\n Object.keys(node).forEach((key) => {\n const newKey = `${prefix ?? ''}${key}`\n const childNode = node[key]\n delete node[key]\n node[newKey] = childNode\n })\n }\n },\n },\n ],\n })\n }\n}\n\nexport type Conflicts =\n | { type: 'path'; path: string; method: string }\n | { type: 'webhook'; path: string; method: string }\n | { type: 'component'; componentType: string; name: string }\ntype JoinResult = { ok: true; document: OpenAPIV3_1.Document } | { ok: false; conflicts: Conflicts[] }\n\n/**\n * Joins multiple OpenAPI documents into a single document.\n *\n * - Merges the \"info\" object, paths, webhooks, tags, and servers from all input documents.\n * - If there are conflicting paths or webhooks (same path and method), returns a list of conflicts.\n * - Only the first occurrence of a tag (by name) or server (by url) is included.\n * - The merge is performed in reverse order, so the first document in the input array has the highest precedence.\n *\n * @param inputs - Array of OpenAPI documents (UnknownObject) to join\n * @returns {JoinResult} - { ok: true, document } if successful, or { ok: false, conflicts } if there are conflicts\n *\n * @example\n * const doc1 = {\n * info: { title: \"API 1\", version: \"1.0.0\" },\n * paths: { \"/foo\": { get: { summary: \"Get Foo\" } } },\n * tags: [{ name: \"foo\" }],\n * servers: [{ url: \"https://api1.example.com\" }]\n * }\n * const doc2 = {\n * info: { description: \"Second API\" },\n * paths: { \"/bar\": { get: { summary: \"Get Bar\" } } },\n * tags: [{ name: \"bar\" }],\n * servers: [{ url: \"https://api2.example.com\" }]\n * }\n * const result = join([doc1, doc2])\n * // result.ok === true\n * // result.document.info.title === \"API 1\"\n * // result.document.info.description === \"Second API\"\n * // result.document.paths has both \"/foo\" and \"/bar\"\n * // result.document.tags contains both \"foo\" and \"bar\"\n * // result.document.servers contains both server URLs\n */\nexport const join = async (inputs: UnknownObject[], config?: { prefixComponents: string[] }): Promise<JoinResult> => {\n // Reverse the input list and upgrade them (first input has highest precedence)\n const upgraded = inputs.map((it) => upgrade(it).specification)\n\n // Preprocess documents by prefixing components if specified\n if (config?.prefixComponents) {\n await prefixComponents(upgraded, config.prefixComponents)\n }\n\n // Reverse the upgraded documents to ensure the first document has the highest precedence\n upgraded.reverse()\n\n // Merge only the \"info\" object from all inputs\n const info = upgraded.reduce<OpenAPIV3_1.InfoObject>((acc, curr) => {\n if (curr.info && typeof curr.info === 'object') {\n return mergeObjects(acc, curr.info)\n }\n return acc\n }, {} as OpenAPIV3_1.InfoObject)\n\n // Merge paths from all documents, collecting conflicts\n const { paths, conflicts: pathConflicts } = mergePaths(upgraded.map((it) => it.paths ?? {}))\n\n // Merge webhooks from all documents, collecting conflicts\n const { paths: webhooks, conflicts: webhookConflicts } = mergePaths(upgraded.map((it) => it.webhooks ?? {}))\n\n // Merge tags, ensuring uniqueness by tag name\n const tags = mergeTags(upgraded.map((it) => it.tags ?? []))\n\n // Merge servers, ensuring uniqueness by server url\n const servers = mergeServers(upgraded.map((it) => it.servers ?? []))\n\n // Merge components, collecting conflicts\n const { components, conflicts: componentConflicts } = mergeComponents(upgraded.map((it) => it.components ?? {}))\n\n // Merge all documents in the upgraded array into a single object (shallow merge)\n const result = upgraded.reduce<UnknownObject>((acc, curr) => ({ ...acc, ...curr }), {})\n\n // Collect all conflicts (paths and webhooks)\n const conflicts: Conflicts[] = [\n ...pathConflicts.map((it) => ({ type: 'path', ...it }) as const),\n ...webhookConflicts.map((it) => ({ type: 'webhook', ...it }) as const),\n ...componentConflicts.map((it) => ({ type: 'component', ...it }) as const),\n ]\n\n // If there are any conflicts, return them\n if (conflicts.length) {\n return {\n ok: false,\n conflicts,\n }\n }\n\n // Return the merged OpenAPI document\n return {\n ok: true,\n document: {\n ...result,\n info,\n paths,\n webhooks: withDefault(webhooks, undefined),\n tags: withDefault(tags, undefined),\n servers: withDefault(servers, undefined),\n components: withDefault(components, undefined),\n },\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { bundle } from '@scalar/json-magic/bundle'\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\nimport type { UnknownObject } from '@/types'\nimport { mergeObjects } from '@/utils/join/merge-objects'\nimport { upgrade } from '@/utils/upgrade'\n\n/**\n * Returns the intersection of two sets as an array.\n *\n * @param a - The first set\n * @param b - The second set\n * @returns An array containing the elements present in both sets\n *\n * @example\n * const setA = new Set([1, 2, 3, 4])\n * const setB = new Set([3, 4, 5, 6])\n * const intersection = getSetIntersection(setA, setB)\n * // intersection: [3, 4]\n */\nconst getSetIntersection = <T>(a: Set<T>, b: Set<T>): T[] => {\n const result: T[] = []\n for (const value of a) {\n if (b.has(value)) {\n result.push(value)\n }\n }\n return result\n}\n\n/**\n * Returns the value if it is not nullish (or, for arrays, not empty), otherwise returns the provided default value.\n * Useful for handling OpenAPI fields that may be missing or empty.\n */\nconst withDefault = <T, K>(value: T, defaultValue: K): T | K => {\n if (Array.isArray(value)) {\n return value.length ? value : defaultValue\n }\n\n if (typeof value === 'object' && value !== null) {\n return Object.keys(value).length ? value : defaultValue\n }\n\n return value ?? defaultValue\n}\n\n/**\n * Merges multiple OpenAPI PathsObjects into a single PathsObject.\n * - If a path does not exist in the result, it is added directly.\n * - If a path already exists, its operations (get, post, etc.) are merged.\n * - If the same operation (e.g., \"get\") exists for the same path in multiple inputs,\n * a conflict is recorded for that path and method.\n *\n * @param inputs - Array of OpenAPIV3_1.PathsObject to merge\n * @returns An object containing the merged paths and a list of conflicts\n */\nconst mergePaths = (inputs: OpenAPIV3_1.PathsObject[]) => {\n const result: OpenAPIV3_1.PathsObject = {}\n const conflicts: { path: string; method: string }[] = []\n\n for (const paths of inputs) {\n if (typeof paths !== 'object') {\n continue\n }\n\n for (const [path, pathItem] of Object.entries(paths)) {\n if (!result[path]) {\n // If the path does not exist, add it directly\n result[path] = pathItem\n continue\n }\n\n // Find intersecting operation keys (e.g., \"get\", \"post\") for this path\n const intersectingKeys = getSetIntersection(new Set(Object.keys(result[path])), new Set(Object.keys(pathItem)))\n\n // If the path exists, merge the operations (get, post, etc.)\n result[path] = { ...result[path], ...pathItem }\n // Record conflicts for each intersecting operation key\n intersectingKeys.forEach((key) => conflicts.push({ method: key, path }))\n }\n }\n\n return { paths: result, conflicts }\n}\n\n/**\n * Merges multiple arrays of OpenAPI TagObjects into a single array, ensuring uniqueness by tag name.\n * - If a tag with the same name appears in multiple arrays, only the first occurrence is included in the result.\n *\n * @param inputs - Array of arrays of OpenAPIV3_1.TagObject to merge\n * @returns An array of unique TagObjects (by name)\n */\nconst mergeTags = (inputs: OpenAPIV3_1.TagObject[][]) => {\n const cache = new Set<string>()\n const result: OpenAPIV3_1.TagObject[] = []\n\n for (const tags of inputs) {\n for (const tag of tags) {\n if (!cache.has(tag.name)) {\n result.push(tag)\n }\n cache.add(tag.name)\n }\n }\n\n return result\n}\n\n/**\n * Merges multiple arrays of OpenAPI ServerObjects into a single array, ensuring uniqueness by server URL.\n * - If a server with the same URL appears in multiple arrays, only the first occurrence is included in the result.\n *\n * @param inputs - Array of arrays of OpenAPIV3_1.ServerObject to merge\n * @returns An array of unique ServerObjects (by url)\n */\nconst mergeServers = (inputs: OpenAPIV3_1.ServerObject[][]) => {\n const cache = new Set<string>()\n const result: OpenAPIV3_1.ServerObject[] = []\n\n for (const servers of inputs) {\n for (const server of servers) {\n if (!cache.has(server.url)) {\n result.push(server)\n }\n cache.add(server.url)\n }\n }\n\n return result\n}\n\n/**\n * Merges multiple OpenAPI ComponentsObject instances into a single components object.\n * - If a component with the same type and name appears in multiple inputs, only the first occurrence is included.\n * - Any conflicts (duplicate component names within the same type) are recorded in the `conflicts` array.\n *\n * @param inputs - Array of OpenAPIV3_1.ComponentsObject to merge\n * @returns An object containing the merged components and an array of conflicts\n */\nconst mergeComponents = (inputs: OpenAPIV3_1.ComponentsObject[]) => {\n const result: OpenAPIV3_1.ComponentsObject = {}\n const conflicts: { componentType: string; name: string }[] = []\n\n for (const components of inputs) {\n if (typeof components !== 'object') {\n continue\n }\n\n // Merge each component type (schemas, responses, parameters, etc.)\n for (const [key, value] of Object.entries(components)) {\n for (const [name, component] of Object.entries(value)) {\n if (!result[key]) {\n result[key] = {}\n }\n\n if (result[key][name]) {\n // If the component already exists, record a conflict\n conflicts.push({ componentType: key, name })\n } else {\n // Otherwise, add the component\n result[key][name] = component\n }\n }\n }\n }\n\n return { components: result, conflicts }\n}\n\n/**\n * Prefixes component names and their references in multiple OpenAPI documents.\n *\n * This function mutates each input document in-place by:\n * 1. Prefixing all component names (e.g., schema names) with the corresponding prefix.\n * 2. Updating all $ref values that point to components to use the prefixed names.\n *\n * This is useful when merging multiple OpenAPI documents to avoid component name collisions.\n *\n * @param inputs - Array of OpenAPI documents to mutate.\n * @param prefixes - Array of prefixes to apply to each document's components.\n */\nconst prefixComponents = async (inputs: OpenAPIV3_1.Document[], prefixes: string[]) => {\n for (const index of inputs.keys()) {\n await bundle(inputs[index], {\n treeShake: false,\n urlMap: false,\n plugins: [\n // Plugin to update $ref values to use the prefixed component names\n {\n type: 'lifecycle',\n onBeforeNodeProcess: (node) => {\n const ref = node['$ref']\n\n if (typeof ref !== 'string') {\n return\n }\n\n // Only process refs that point to components\n if (!ref.startsWith('#/components/')) {\n return\n }\n\n const parts = ref.split('/')\n // Ensure the ref has the expected structure: #/components/{type}/{name}\n if (parts.length < 4) {\n return\n }\n\n // Prefix the component name (parts[3]) with the provided prefix\n parts[3] = `${prefixes[index] ?? ''}${parts[3]}`\n\n node['$ref'] = parts.join('/')\n },\n },\n // Plugin to rename component keys with the prefix\n {\n type: 'lifecycle',\n onBeforeNodeProcess: (node, context) => {\n // Check if the node is a component type object (e.g., schemas, responses) under \"components\"\n if (context.path.length === 2 && context.path[0] === 'components') {\n const prefix = prefixes[index]\n\n Object.keys(node).forEach((key) => {\n const newKey = `${prefix ?? ''}${key}`\n const childNode = node[key]\n delete node[key]\n node[newKey] = childNode\n })\n }\n },\n },\n ],\n })\n }\n}\n\ntype Conflicts =\n | { type: 'path'; path: string; method: string }\n | { type: 'webhook'; path: string; method: string }\n | { type: 'component'; componentType: string; name: string }\ntype JoinResult = { ok: true; document: OpenAPIV3_1.Document } | { ok: false; conflicts: Conflicts[] }\n\n/**\n * Joins multiple OpenAPI documents into a single document.\n *\n * - Merges the \"info\" object, paths, webhooks, tags, and servers from all input documents.\n * - If there are conflicting paths or webhooks (same path and method), returns a list of conflicts.\n * - Only the first occurrence of a tag (by name) or server (by url) is included.\n * - The merge is performed in reverse order, so the first document in the input array has the highest precedence.\n *\n * @param inputs - Array of OpenAPI documents (UnknownObject) to join\n * @returns {JoinResult} - { ok: true, document } if successful, or { ok: false, conflicts } if there are conflicts\n *\n * @example\n * const doc1 = {\n * info: { title: \"API 1\", version: \"1.0.0\" },\n * paths: { \"/foo\": { get: { summary: \"Get Foo\" } } },\n * tags: [{ name: \"foo\" }],\n * servers: [{ url: \"https://api1.example.com\" }]\n * }\n * const doc2 = {\n * info: { description: \"Second API\" },\n * paths: { \"/bar\": { get: { summary: \"Get Bar\" } } },\n * tags: [{ name: \"bar\" }],\n * servers: [{ url: \"https://api2.example.com\" }]\n * }\n * const result = join([doc1, doc2])\n * // result.ok === true\n * // result.document.info.title === \"API 1\"\n * // result.document.info.description === \"Second API\"\n * // result.document.paths has both \"/foo\" and \"/bar\"\n * // result.document.tags contains both \"foo\" and \"bar\"\n * // result.document.servers contains both server URLs\n */\nexport const join = async (inputs: UnknownObject[], config?: { prefixComponents: string[] }): Promise<JoinResult> => {\n // Reverse the input list and upgrade them (first input has highest precedence)\n const upgraded = inputs.map((it) => upgrade(it).specification)\n\n // Preprocess documents by prefixing components if specified\n if (config?.prefixComponents) {\n await prefixComponents(upgraded, config.prefixComponents)\n }\n\n // Reverse the upgraded documents to ensure the first document has the highest precedence\n upgraded.reverse()\n\n // Merge only the \"info\" object from all inputs\n const info = upgraded.reduce<OpenAPIV3_1.InfoObject>((acc, curr) => {\n if (curr.info && typeof curr.info === 'object') {\n return mergeObjects(acc, curr.info)\n }\n return acc\n }, {} as OpenAPIV3_1.InfoObject)\n\n // Merge paths from all documents, collecting conflicts\n const { paths, conflicts: pathConflicts } = mergePaths(upgraded.map((it) => it.paths ?? {}))\n\n // Merge webhooks from all documents, collecting conflicts\n const { paths: webhooks, conflicts: webhookConflicts } = mergePaths(upgraded.map((it) => it.webhooks ?? {}))\n\n // Merge tags, ensuring uniqueness by tag name\n const tags = mergeTags(upgraded.map((it) => it.tags ?? []))\n\n // Merge servers, ensuring uniqueness by server url\n const servers = mergeServers(upgraded.map((it) => it.servers ?? []))\n\n // Merge components, collecting conflicts\n const { components, conflicts: componentConflicts } = mergeComponents(upgraded.map((it) => it.components ?? {}))\n\n // Merge all documents in the upgraded array into a single object (shallow merge)\n const result = upgraded.reduce<UnknownObject>((acc, curr) => ({ ...acc, ...curr }), {})\n\n // Collect all conflicts (paths and webhooks)\n const conflicts: Conflicts[] = [\n ...pathConflicts.map((it) => ({ type: 'path', ...it }) as const),\n ...webhookConflicts.map((it) => ({ type: 'webhook', ...it }) as const),\n ...componentConflicts.map((it) => ({ type: 'component', ...it }) as const),\n ]\n\n // If there are any conflicts, return them\n if (conflicts.length) {\n return {\n ok: false,\n conflicts,\n }\n }\n\n // Return the merged OpenAPI document\n return {\n ok: true,\n document: {\n ...result,\n info,\n paths,\n webhooks: withDefault(webhooks, undefined),\n tags: withDefault(tags, undefined),\n servers: withDefault(servers, undefined),\n components: withDefault(components, undefined),\n },\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,cAAc;AAIvB,SAAS,oBAAoB;AAC7B,SAAS,eAAe;AAexB,MAAM,qBAAqB,CAAI,GAAW,MAAmB;AAC3D,QAAM,SAAc,CAAC;AACrB,aAAW,SAAS,GAAG;AACrB,QAAI,EAAE,IAAI,KAAK,GAAG;AAChB,aAAO,KAAK,KAAK;AAAA,IACnB;AAAA,EACF;AACA,SAAO;AACT;AAMA,MAAM,cAAc,CAAO,OAAU,iBAA2B;AAC9D,MAAI,MAA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C,CAAC,CAAC;AAG3G,QAAM,OAAO,UAAU,SAAS,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC;AAG1D,QAAM,UAAU,aAAa,SAAS,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC;AAGnE,QAAM,EAAE,YAAY,WAAW,mBAAmB,IAAI,gBAAgB,SAAS,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC;AAG/G,QAAM,SAAS,SAAS,OAAsB,CAAC,KAAK,UAAU,EAAE,GAAG,KAAK,GAAG,KAAK,IAAI,CAAC,CAAC;AAGtF,QAAM,YAAyB;AAAA,IAC7B,GAAG,cAAc,IAAI,CAAC,QAAQ,EAAE,MAAM,QAAQ,GAAG,GAAG,EAAW;AAAA,IAC/D,GAAG,iBAAiB,IAAI,CAAC,QAAQ,EAAE,MAAM,WAAW,GAAG,GAAG,EAAW;AAAA,IACrE,GAAG,mBAAmB,IAAI,CAAC,QAAQ,EAAE,MAAM,aAAa,GAAG,GAAG,EAAW;AAAA,EAC3E;AAGA,MAAI,UAAU,QAAQ;AACpB,WAAO;AAAA,MACL,IAAI;AAAA,MACJ;AAAA,IACF;AAAA,EACF;AAGA,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,UAAU;AAAA,MACR,GAAG;AAAA,MACH;AAAA,MACA;AAAA,MACA,UAAU,YAAY,UAAU,MAAS;AAAA,MACzC,MAAM,YAAY,MAAM,MAAS;AAAA,MACjC,SAAS,YAAY,SAAS,MAAS;AAAA,MACvC,YAAY,YAAY,YAAY,MAAS;AAAA,IAC/C;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/load/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/load/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/utils/load/index.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/** biome-ignore-all lint/performance/noBarrelFile: entrypoint */\nexport { load } from './load'\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|