@scalar/oas-utils 0.20.20 → 0.20.21
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 +8 -0
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +2 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @scalar/oas-utils
|
|
2
2
|
|
|
3
|
+
## 0.20.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#10967](https://github.com/scalar/scalar/pull/10967): fix: parse YAML documents that merge shared anchors into many operations
|
|
8
|
+
|
|
9
|
+
Since yaml 2.9.1, merge keys (`<<: *anchor`) count toward the alias limit, so large API Gateway exports failed with "Excessive alias count indicates a resource exhaustion attack". The limit is now 100,000 and shared through `YAML_MAX_ALIAS_COUNT` from `@scalar/helpers`.
|
|
10
|
+
|
|
3
11
|
## 0.20.20
|
|
4
12
|
|
|
5
13
|
## 0.20.19
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAS,SAAS,EAAE,MAAM,MAAM,CAAA;AAEvC,KAAK,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAE9E,4CAA4C;AAC5C,eAAO,MAAM,IAAI;IACf,2DAA2D;iBAC9C,MAAM,KAKI,aAAa;IAEpC,6CAA6C;cACnC,CAAC,SAAS,iBAAiB,OAAO,MAAM,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,GAAG,aAAa,GAAG,CAAC;;CAQxG,CAAA;AAED,4CAA4C;AAC5C,eAAO,MAAM,IAAI;IACf,2DAA2D;iBAC9C,MAAM,KAAG,aAAa;IAOnC,6CAA6C;cACnC,CAAC,SAAS,iBAAiB,OAAO,MAAM,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,GAAG,aAAa,GAAG,CAAC;qBAOtF,MAAM;CACxB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,WAG5C,CAAA;AAED,0EAA0E;AAC1E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,UAcnD;AAED,wCAAwC;AACxC,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,GAAG,aAAa,KAAG,aAkB/D,CAAA"}
|
package/dist/helpers/parse.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { YAML_MAX_ALIAS_COUNT } from '@scalar/helpers/general/yaml-max-alias-count';
|
|
1
2
|
import { parse, stringify } from 'yaml';
|
|
2
3
|
/** Yaml handling with optional safeparse */
|
|
3
4
|
export const yaml = {
|
|
4
5
|
/** Parse and throw if the return value is not an object */
|
|
5
6
|
parse: (val) => {
|
|
6
|
-
const yamlObject = parse(val, { merge: true, maxAliasCount:
|
|
7
|
+
const yamlObject = parse(val, { merge: true, maxAliasCount: YAML_MAX_ALIAS_COUNT });
|
|
7
8
|
if (typeof yamlObject !== 'object') {
|
|
8
9
|
throw Error('Invalid YAML object');
|
|
9
10
|
}
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"specification",
|
|
17
17
|
"yaml"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.20.
|
|
19
|
+
"version": "0.20.21",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=22"
|
|
22
22
|
},
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"CHANGELOG.md"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@scalar/helpers": "0.
|
|
43
|
+
"@scalar/helpers": "0.18.0",
|
|
44
44
|
"@scalar/themes": "0.20.0",
|
|
45
|
-
"@scalar/types": "0.28.
|
|
46
|
-
"@scalar/workspace-store": "0.71.
|
|
45
|
+
"@scalar/types": "0.28.1",
|
|
46
|
+
"@scalar/workspace-store": "0.71.1",
|
|
47
47
|
"flatted": "^3.4.4",
|
|
48
48
|
"vue": "^3.5.44",
|
|
49
49
|
"yaml": "^2.9.1"
|