@redocly/cli 0.0.0-snapshot.1754478846 → 0.0.0-snapshot.1754922791
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-stringify-with-array-buffer.d.ts","sourceRoot":"","sources":["../../src/utils/json-stringify-with-array-buffer.ts"],"names":[],"mappings":"AAAA,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"json-stringify-with-array-buffer.d.ts","sourceRoot":"","sources":["../../src/utils/json-stringify-with-array-buffer.ts"],"names":[],"mappings":"AAAA,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAsCtF"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
export function jsonStringifyWithArrayBuffer(obj, space) {
|
|
2
|
+
const MAX_SIZE = 1024 * 1024; // 1MB
|
|
2
3
|
return JSON.stringify(obj, (key, value) => {
|
|
3
4
|
if (value instanceof ArrayBuffer) {
|
|
4
|
-
|
|
5
|
+
if (value.byteLength > MAX_SIZE) {
|
|
6
|
+
return {
|
|
7
|
+
__type: 'ArrayBuffer',
|
|
8
|
+
data: `File too large to serialize (${value.byteLength} bytes). Maximum allowed size is ${MAX_SIZE} bytes.`,
|
|
9
|
+
byteLength: value.byteLength,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
5
12
|
const uint8Array = new Uint8Array(value);
|
|
6
13
|
const base64 = Buffer.from(uint8Array).toString('base64');
|
|
7
14
|
return {
|
|
@@ -11,7 +18,6 @@ export function jsonStringifyWithArrayBuffer(obj, space) {
|
|
|
11
18
|
};
|
|
12
19
|
}
|
|
13
20
|
if (value instanceof File) {
|
|
14
|
-
// Convert File to a serializable object - avoid accessing properties to prevent errors
|
|
15
21
|
return {
|
|
16
22
|
__type: 'File',
|
|
17
23
|
name: value.name || '[File Object]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-stringify-with-array-buffer.js","sourceRoot":"","sources":["../../src/utils/json-stringify-with-array-buffer.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,4BAA4B,CAAC,GAAQ,EAAE,KAAuB;IAC5E,OAAO,IAAI,CAAC,SAAS,CACnB,GAAG,EACH,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACb,IAAI,KAAK,YAAY,WAAW,EAAE,CAAC;YACjC,
|
|
1
|
+
{"version":3,"file":"json-stringify-with-array-buffer.js","sourceRoot":"","sources":["../../src/utils/json-stringify-with-array-buffer.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,4BAA4B,CAAC,GAAQ,EAAE,KAAuB;IAC5E,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,GAAG,EACH,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACb,IAAI,KAAK,YAAY,WAAW,EAAE,CAAC;YACjC,IAAI,KAAK,CAAC,UAAU,GAAG,QAAQ,EAAE,CAAC;gBAChC,OAAO;oBACL,MAAM,EAAE,aAAa;oBACrB,IAAI,EAAE,gCAAgC,KAAK,CAAC,UAAU,oCAAoC,QAAQ,SAAS;oBAC3G,UAAU,EAAE,KAAK,CAAC,UAAU;iBAC7B,CAAC;YACJ,CAAC;YAED,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;YACzC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC1D,OAAO;gBACL,MAAM,EAAE,aAAa;gBACrB,IAAI,EAAE,MAAM;gBACZ,UAAU,EAAE,KAAK,CAAC,UAAU;aAC7B,CAAC;QACJ,CAAC;QAED,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;YAC1B,OAAO;gBACL,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,eAAe;gBACnC,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC;gBACrB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE;gBACtB,YAAY,EAAE,KAAK,CAAC,YAAY,IAAI,CAAC;aACtC,CAAC;QACJ,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,EACD,KAAK,CACN,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/cli",
|
|
3
|
-
"version": "0.0.0-snapshot.
|
|
3
|
+
"version": "0.0.0-snapshot.1754922791",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"@opentelemetry/resources": "2.0.1",
|
|
43
43
|
"@opentelemetry/sdk-trace-node": "2.0.1",
|
|
44
44
|
"@opentelemetry/semantic-conventions": "1.34.0",
|
|
45
|
-
"@redocly/openapi-core": "0.0.0-snapshot.
|
|
46
|
-
"@redocly/respect-core": "0.0.0-snapshot.
|
|
45
|
+
"@redocly/openapi-core": "0.0.0-snapshot.1754922791",
|
|
46
|
+
"@redocly/respect-core": "0.0.0-snapshot.1754922791",
|
|
47
47
|
"abort-controller": "^3.0.0",
|
|
48
48
|
"chokidar": "^3.5.1",
|
|
49
49
|
"colorette": "^1.2.0",
|