@kubb/studio 5.15.0 → 5.15.1

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/dist/index.cjs CHANGED
@@ -234,7 +234,7 @@ function getElapsedMs(hrStart) {
234
234
  return Math.round(ms * 100) / 100;
235
235
  }
236
236
  // package.json
237
- var version = "5.15.0";
237
+ var version = "5.15.1";
238
238
  // ../../internals/shared/src/constants.ts
239
239
  /**
240
240
  * Extensions `kubb` ships at its own version, so they count as installed without being a direct
@@ -1424,6 +1424,19 @@ async function listDisk({ root, outputPath, maxFiles }) {
1424
1424
  };
1425
1425
  }
1426
1426
  /**
1427
+ * The input as Studio stores and receives it. `JSON.stringify` writes a `Set` as `{}`, so the `meta` name sets become arrays.
1428
+ */
1429
+ function toInputJson(input) {
1430
+ return {
1431
+ ...input,
1432
+ meta: {
1433
+ ...input.meta,
1434
+ circularNames: [...input.meta.circularNames],
1435
+ enumNames: [...input.meta.enumNames]
1436
+ }
1437
+ };
1438
+ }
1439
+ /**
1427
1440
  * Keeps recent generations by job id in `storage`, with an index next to them so a store on disk
1428
1441
  * survives a restart. A generation is only ever looked up by its job id, so on a pooled sandbox one
1429
1442
  * tenant never reaches another's output. Initial disk output and generated jobs each get their
@@ -1530,10 +1543,10 @@ function createGenerationStore({ storage, maxCount, maxMb, ttlMs, now = Date.now
1530
1543
  if (!input) return 0;
1531
1544
  let json;
1532
1545
  try {
1533
- json = JSON.stringify(_kubb_ast.ast.transform(input, { schema: (node) => node.type === "ref" && node.schema ? {
1546
+ json = JSON.stringify(toInputJson(_kubb_ast.ast.transform(input, { schema: (node) => node.type === "ref" && node.schema ? {
1534
1547
  ...node,
1535
1548
  schema: void 0
1536
- } : void 0 }));
1549
+ } : void 0 })));
1537
1550
  } catch {
1538
1551
  return 0;
1539
1552
  }