@scalar/openapi-parser 0.29.12 → 0.29.14
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 +9 -0
- package/dist/utils/openapi/actions/details.d.ts.map +1 -1
- package/dist/utils/openapi/actions/details.js +1 -1
- package/dist/utils/openapi/actions/files.d.ts.map +1 -1
- package/dist/utils/openapi/actions/get.d.ts.map +1 -1
- package/dist/utils/openapi/actions/toJson.d.ts.map +1 -1
- package/dist/utils/openapi/actions/toYaml.d.ts.map +1 -1
- package/dist/utils/openapi/openapi.d.ts.map +1 -1
- package/dist/utils/openapi/utils/workThroughQueue.d.ts.map +1 -1
- package/dist/utils/openapi/utils/workThroughQueue.js +5 -6
- package/dist/utils/resolve-references.js +3 -3
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @scalar/openapi-parser
|
|
2
2
|
|
|
3
|
+
## 0.29.14
|
|
4
|
+
|
|
5
|
+
## 0.29.13
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#10559](https://github.com/scalar/scalar/pull/10559): Clean up Biome warnings in package code and tests. Handle rejected debounced callbacks and await streaming writes.
|
|
10
|
+
- [#10506](https://github.com/scalar/scalar/pull/10506): Organize imports consistently with the checks enforced in CI.
|
|
11
|
+
|
|
3
12
|
## 0.29.12
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/details.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/details.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAK3D;;GAEG;AACH,wBAAsB,OAAO,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAI3G"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getEntrypoint } from '../../../utils/get-entrypoint.js';
|
|
2
1
|
import { details as detailsUtility } from '../../../utils/details.js';
|
|
2
|
+
import { getEntrypoint } from '../../../utils/get-entrypoint.js';
|
|
3
3
|
import { workThroughQueue } from '../utils/workThroughQueue.js';
|
|
4
4
|
/**
|
|
5
5
|
* Run the chained tasks and return just some basic information about the OpenAPI document
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAI5D;;GAEG;AACH,wBAAsB,KAAK,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAIlF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAI9D;;GAEG;AACH,wBAAsB,GAAG,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAKrF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toJson.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toJson.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toJson.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAMhD;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAI3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toYaml.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toYaml.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toYaml.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toYaml.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAMhD;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAI/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../../src/utils/openapi/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workThroughQueue.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/utils/workThroughQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAO9D;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"workThroughQueue.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/utils/workThroughQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAO9D;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAiElG"}
|
|
@@ -16,12 +16,11 @@ export async function workThroughQueue(queue) {
|
|
|
16
16
|
const name = task.name;
|
|
17
17
|
const options = 'options' in task ? task.options : undefined;
|
|
18
18
|
// Use the result of the previous task, or fall back to the original input
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
: input;
|
|
19
|
+
let currentSpecification = result.specification || input;
|
|
20
|
+
if (!result.specification && typeof input === 'object') {
|
|
21
|
+
// Detach from the original object.
|
|
22
|
+
currentSpecification = structuredClone(input);
|
|
23
|
+
}
|
|
25
24
|
// load
|
|
26
25
|
if (name === 'load') {
|
|
27
26
|
result = {
|
|
@@ -36,11 +36,11 @@ errors = []) {
|
|
|
36
36
|
// Recursively resolve all references
|
|
37
37
|
dereference(finalInput, filesystem, file ?? entrypoint, new WeakSet(), errors, options);
|
|
38
38
|
// Remove duplicates (according to message) from errors
|
|
39
|
-
|
|
39
|
+
const uniqueErrors = errors.filter((error, index, self) => index === self.findIndex((t) => t.message === error.message && t.code === error.code));
|
|
40
40
|
// Return the resolved specification
|
|
41
41
|
return {
|
|
42
|
-
valid:
|
|
43
|
-
errors,
|
|
42
|
+
valid: uniqueErrors.length === 0,
|
|
43
|
+
errors: uniqueErrors,
|
|
44
44
|
schema: finalInput,
|
|
45
45
|
};
|
|
46
46
|
}
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"parser",
|
|
18
18
|
"typescript"
|
|
19
19
|
],
|
|
20
|
-
"version": "0.29.
|
|
20
|
+
"version": "0.29.14",
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=22"
|
|
23
23
|
},
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
],
|
|
49
49
|
"sideEffects": false,
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@scalar/helpers": "0.16.
|
|
52
|
-
"@scalar/json-magic": "0.
|
|
53
|
-
"@scalar/openapi-types": "0.9.
|
|
54
|
-
"@scalar/openapi-upgrader": "0.4.
|
|
55
|
-
"@scalar/openapi-validator": "0.1.
|
|
56
|
-
"@scalar/types": "0.
|
|
51
|
+
"@scalar/helpers": "0.16.4",
|
|
52
|
+
"@scalar/json-magic": "0.16.0",
|
|
53
|
+
"@scalar/openapi-types": "0.9.8",
|
|
54
|
+
"@scalar/openapi-upgrader": "0.4.5",
|
|
55
|
+
"@scalar/openapi-validator": "0.1.13",
|
|
56
|
+
"@scalar/types": "0.24.0",
|
|
57
57
|
"yaml": "^2.9.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|