zudoku 0.0.0-fix-prevent-full-deref-allof.b02efbe5 → 0.0.0-fix-firebase-export.f8270825

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.
Files changed (105) hide show
  1. package/dist/app/sentry.js +1 -1
  2. package/dist/config/validators/validate.d.ts +0 -2
  3. package/dist/config/validators/validate.js +0 -1
  4. package/dist/config/validators/validate.js.map +1 -1
  5. package/dist/flat-config.d.ts +1 -1
  6. package/dist/lib/authentication/ui/ZudokuAuthUi.js +5 -1
  7. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -1
  8. package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
  9. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  10. package/dist/lib/util/flattenAllOf.test.js +67 -12
  11. package/dist/lib/util/flattenAllOf.test.js.map +1 -1
  12. package/dist/vite/api/SchemaManager.test.js +67 -0
  13. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  14. package/dist/vite/config.js +1 -1
  15. package/dist/vite/config.js.map +1 -1
  16. package/lib/ActionButton-DUgvSylL.js +25 -0
  17. package/lib/ActionButton-DUgvSylL.js.map +1 -0
  18. package/lib/{ClaudeLogo-PxFjou9w.js → ClaudeLogo-B4Xxt-x_.js} +2 -2
  19. package/lib/{ClaudeLogo-PxFjou9w.js.map → ClaudeLogo-B4Xxt-x_.js.map} +1 -1
  20. package/lib/{ErrorAlert-BqjbNHIn.js → ErrorAlert-DrOR8w3f.js} +6 -6
  21. package/lib/{ErrorAlert-BqjbNHIn.js.map → ErrorAlert-DrOR8w3f.js.map} +1 -1
  22. package/lib/{MdxPage-CVFatbHw.js → MdxPage-BagO2c-n.js} +7 -7
  23. package/lib/{MdxPage-CVFatbHw.js.map → MdxPage-BagO2c-n.js.map} +1 -1
  24. package/lib/{Mermaid-CIFixY6C.js → Mermaid-D_VSX7_Q.js} +3 -3
  25. package/lib/{Mermaid-CIFixY6C.js.map → Mermaid-D_VSX7_Q.js.map} +1 -1
  26. package/lib/{OAuthErrorPage-Dup79DJk.js → OAuthErrorPage-Fq54RLgt.js} +6 -6
  27. package/lib/{OAuthErrorPage-Dup79DJk.js.map → OAuthErrorPage-Fq54RLgt.js.map} +1 -1
  28. package/lib/{OasProvider-C10RPbY8.js → OasProvider-DPH8mwDa.js} +3 -3
  29. package/lib/{OasProvider-C10RPbY8.js.map → OasProvider-DPH8mwDa.js.map} +1 -1
  30. package/lib/{OperationList--zX7OAlH.js → OperationList-C0jiEaG5.js} +329 -348
  31. package/lib/OperationList-C0jiEaG5.js.map +1 -0
  32. package/lib/{RouteGuard-BXy13JSz.js → RouteGuard-9wjejsKm.js} +3 -3
  33. package/lib/{RouteGuard-BXy13JSz.js.map → RouteGuard-9wjejsKm.js.map} +1 -1
  34. package/lib/{RouterError-CKOZTsDD.js → RouterError-DSLXagd5.js} +2 -2
  35. package/lib/{RouterError-CKOZTsDD.js.map → RouterError-DSLXagd5.js.map} +1 -1
  36. package/lib/{SchemaList-CxafJA_P.js → SchemaList-BU0zCHn9.js} +7 -7
  37. package/lib/{SchemaList-CxafJA_P.js.map → SchemaList-BU0zCHn9.js.map} +1 -1
  38. package/lib/{SchemaView-j0PtjY8U.js → SchemaView-DVae4RO2.js} +3 -3
  39. package/lib/{SchemaView-j0PtjY8U.js.map → SchemaView-DVae4RO2.js.map} +1 -1
  40. package/lib/Select-CkxXP5I7.js +243 -0
  41. package/lib/Select-CkxXP5I7.js.map +1 -0
  42. package/lib/Separator-CTPSeW1S.js +27 -0
  43. package/lib/Separator-CTPSeW1S.js.map +1 -0
  44. package/lib/{SignUp-Pm_LGm6T.js → SignUp-BjS4ozA7.js} +3 -3
  45. package/lib/{SignUp-Pm_LGm6T.js.map → SignUp-BjS4ozA7.js.map} +1 -1
  46. package/lib/{SyntaxHighlight-bkmst3oV.js → SyntaxHighlight-Kdyskw3C.js} +2 -2
  47. package/lib/{SyntaxHighlight-bkmst3oV.js.map → SyntaxHighlight-Kdyskw3C.js.map} +1 -1
  48. package/lib/{Toc-TUXNFbKl.js → Toc-DJxFPfcS.js} +2 -2
  49. package/lib/{Toc-TUXNFbKl.js.map → Toc-DJxFPfcS.js.map} +1 -1
  50. package/lib/{ZudokuContext-np1wheDl.js → ZudokuContext-BXldanA8.js} +5 -5
  51. package/lib/{ZudokuContext-np1wheDl.js.map → ZudokuContext-BXldanA8.js.map} +1 -1
  52. package/lib/{circular-GQ_uaom2.js → circular-CzWF1hj5.js} +2 -2
  53. package/lib/{circular-GQ_uaom2.js.map → circular-CzWF1hj5.js.map} +1 -1
  54. package/lib/{createServer-sU0O9wfJ.js → createServer-BIr2_tGn.js} +4 -4
  55. package/lib/{createServer-sU0O9wfJ.js.map → createServer-BIr2_tGn.js.map} +1 -1
  56. package/lib/createVariantComponent-B9_dVBvu.js +35 -0
  57. package/lib/createVariantComponent-B9_dVBvu.js.map +1 -0
  58. package/lib/{errors-B0hNTPFO.js → errors-Bs4duWDy.js} +2 -2
  59. package/lib/{errors-B0hNTPFO.js.map → errors-Bs4duWDy.js.map} +1 -1
  60. package/lib/firebase-qUdSEL1p.js +7366 -0
  61. package/lib/firebase-qUdSEL1p.js.map +1 -0
  62. package/lib/{hook-CvSwcbk6.js → hook-BNxidGQq.js} +2 -2
  63. package/lib/{hook-CvSwcbk6.js.map → hook-BNxidGQq.js.map} +1 -1
  64. package/lib/{index-B6SRNBIt.js → index-0oT9beQN.js} +452 -476
  65. package/lib/index-0oT9beQN.js.map +1 -0
  66. package/lib/{index-DscsS121.js → index-Bh-MffiL.js} +2 -2
  67. package/lib/{index-DscsS121.js.map → index-Bh-MffiL.js.map} +1 -1
  68. package/lib/{index-mfkNWYG-.js → index-CCmMJp02.js} +5 -5
  69. package/lib/{index-mfkNWYG-.js.map → index-CCmMJp02.js.map} +1 -1
  70. package/lib/{index-DnMgJWrI.js → index-Css56y3F.js} +3 -3
  71. package/lib/{index-DnMgJWrI.js.map → index-Css56y3F.js.map} +1 -1
  72. package/lib/index.esm-kW-Utcsi.js +32 -0
  73. package/lib/index.esm-kW-Utcsi.js.map +1 -0
  74. package/lib/{mutation-BlmnL5qL.js → mutation-BoVlx8yA.js} +2 -2
  75. package/lib/{mutation-BlmnL5qL.js.map → mutation-BoVlx8yA.js.map} +1 -1
  76. package/lib/ui/SyntaxHighlight.js +2 -2
  77. package/lib/useMutation-C6RqWmTS.js +97 -0
  78. package/lib/useMutation-C6RqWmTS.js.map +1 -0
  79. package/lib/zudoku.__internal.js +6 -6
  80. package/lib/zudoku.auth-auth0.js +1 -1
  81. package/lib/zudoku.auth-azureb2c.js +4 -4
  82. package/lib/zudoku.auth-clerk.js +2 -2
  83. package/lib/zudoku.auth-firebase.js +9 -0
  84. package/lib/zudoku.auth-firebase.js.map +1 -0
  85. package/lib/zudoku.auth-openid.js +4 -4
  86. package/lib/zudoku.auth-supabase.js +4 -4
  87. package/lib/zudoku.components.js +5 -5
  88. package/lib/zudoku.hooks.js +3 -3
  89. package/lib/zudoku.mermaid.js +3 -3
  90. package/lib/zudoku.plugin-api-catalog.js +4 -4
  91. package/lib/zudoku.plugin-api-keys.js +162 -178
  92. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  93. package/lib/zudoku.plugin-custom-pages.js +1 -1
  94. package/lib/zudoku.plugin-markdown.js +1 -1
  95. package/lib/zudoku.plugin-openapi.js +2 -2
  96. package/lib/zudoku.plugin-search-pagefind.js +2 -2
  97. package/package.json +9 -5
  98. package/src/app/sentry.ts +1 -1
  99. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +11 -1
  100. package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
  101. package/src/lib/util/flattenAllOf.test.ts +71 -19
  102. package/lib/OperationList--zX7OAlH.js.map +0 -1
  103. package/lib/Select-VmDZ-nKe.js +0 -337
  104. package/lib/Select-VmDZ-nKe.js.map +0 -1
  105. package/lib/index-B6SRNBIt.js.map +0 -1
@@ -362,16 +362,12 @@ describe("flattenAllOf processor", () => {
362
362
  },
363
363
  };
364
364
 
365
- const mockDereference = vi.fn().mockResolvedValue(schema);
366
-
367
365
  const result = await flattenAllOfProcessor({
368
366
  schema,
369
367
  file: "/test/schema.json",
370
- dereference: mockDereference,
368
+ dereference: vi.fn(),
371
369
  });
372
370
 
373
- expect(mockDereference).toHaveBeenCalledWith(schema);
374
-
375
371
  const responseSchema =
376
372
  result.paths?.["/users"]?.get?.responses?.[200]?.content?.[
377
373
  "application/json"
@@ -423,31 +419,20 @@ describe("flattenAllOf processor", () => {
423
419
  expect(userSchema).not.toHaveProperty("allOf");
424
420
  });
425
421
 
426
- it("should handle errors gracefully and return original schema", async () => {
422
+ it("should handle schemas without allOf gracefully", async () => {
427
423
  const schema: OpenAPIDocument = {
428
424
  openapi: "3.0.0",
429
425
  info: { title: "Test API", version: "1.0.0" },
430
426
  paths: {},
431
427
  };
432
428
 
433
- const mockDereference = vi
434
- .fn()
435
- .mockRejectedValue(new Error("Dereference failed"));
436
-
437
- const consoleSpy = vi.spyOn(console, "warn").mockImplementation(() => {});
438
-
439
429
  const result = await flattenAllOfProcessor({
440
430
  schema,
441
431
  file: "/test/schema.json",
442
- dereference: mockDereference,
432
+ dereference: vi.fn(),
443
433
  });
444
434
 
445
- expect(result).toBe(schema);
446
- expect(consoleSpy).toHaveBeenCalledWith(
447
- expect.stringContaining("Failed to flatten"),
448
- );
449
-
450
- consoleSpy.mockRestore();
435
+ expect(result).toStrictEqual(schema);
451
436
  });
452
437
 
453
438
  it("should only flatten schema objects, not other OpenAPI structures", async () => {
@@ -634,4 +619,71 @@ describe("flattenAllOf processor", () => {
634
619
  });
635
620
  expect(containerSchema?.oneOf?.[1]).not.toHaveProperty("allOf");
636
621
  });
622
+
623
+ it("should preserve $refs outside of allOf while flattening allOf with $refs", async () => {
624
+ // Schema with:
625
+ // 1. A reusable component (Base) that's referenced multiple times
626
+ // 2. An allOf that references Base (should be resolved for merging)
627
+ // 3. A property that references Base (should stay as $ref)
628
+ const schema = {
629
+ openapi: "3.0.0",
630
+ info: { title: "Test API", version: "1.0.0" },
631
+ paths: {},
632
+ components: {
633
+ schemas: {
634
+ Base: {
635
+ type: "object",
636
+ properties: {
637
+ id: { type: "string" },
638
+ createdAt: { type: "string", format: "date-time" },
639
+ },
640
+ },
641
+ Extended: {
642
+ allOf: [
643
+ { $ref: "#/components/schemas/Base" },
644
+ {
645
+ type: "object",
646
+ properties: {
647
+ name: { type: "string" },
648
+ },
649
+ },
650
+ ],
651
+ },
652
+ Container: {
653
+ type: "object",
654
+ properties: {
655
+ // This $ref should NOT be expanded
656
+ nested: { $ref: "#/components/schemas/Base" },
657
+ },
658
+ },
659
+ },
660
+ },
661
+ } as OpenAPIDocument;
662
+
663
+ const result = await flattenAllOfProcessor({
664
+ schema,
665
+ file: "/test/schema.json",
666
+ dereference: vi.fn(),
667
+ });
668
+
669
+ // Extended should have allOf flattened (merged with Base)
670
+ const extendedSchema = result.components?.schemas?.Extended;
671
+ expect(extendedSchema).not.toHaveProperty("allOf");
672
+ expect(extendedSchema).toMatchObject({
673
+ type: "object",
674
+ properties: {
675
+ id: { type: "string" },
676
+ createdAt: { type: "string", format: "date-time" },
677
+ name: { type: "string" },
678
+ },
679
+ });
680
+
681
+ // Container.nested should still be a $ref (NOT expanded)
682
+ const containerSchema = result.components?.schemas
683
+ ?.Container as unknown as Record<string, unknown>;
684
+ const nestedProp = (containerSchema?.properties as Record<string, unknown>)
685
+ ?.nested as Record<string, unknown>;
686
+ expect(nestedProp).toHaveProperty("$ref");
687
+ expect(nestedProp.$ref).toBe("#/components/schemas/Base");
688
+ });
637
689
  });