@hexclave/shared 1.0.0 → 1.0.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.
Files changed (145) hide show
  1. package/dist/ai/llms/llms.d.ts +17 -0
  2. package/dist/ai/llms/llms.d.ts.map +1 -0
  3. package/dist/ai/llms/llms.js +36 -0
  4. package/dist/ai/llms/llms.js.map +1 -0
  5. package/dist/ai/unified-prompts/reminders.js +2 -2
  6. package/dist/ai/unified-prompts/reminders.js.map +1 -1
  7. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts +7 -1
  8. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
  9. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +6 -5
  10. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
  11. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +172 -0
  12. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts.map +1 -0
  13. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +280 -0
  14. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -0
  15. package/dist/ai/unified-prompts/skill-site-prompt.d.ts +2 -1
  16. package/dist/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
  17. package/dist/ai/unified-prompts/skill-site-prompt.js +36 -32
  18. package/dist/ai/unified-prompts/skill-site-prompt.js.map +1 -1
  19. package/dist/config/schema-fuzzer.test.js +1 -0
  20. package/dist/config/schema-fuzzer.test.js.map +1 -1
  21. package/dist/config/schema.d.ts +192 -188
  22. package/dist/config/schema.d.ts.map +1 -1
  23. package/dist/config/schema.js +6 -0
  24. package/dist/config/schema.js.map +1 -1
  25. package/dist/config-authoring.d.ts +5 -1
  26. package/dist/config-authoring.d.ts.map +1 -1
  27. package/dist/config-authoring.js +5 -0
  28. package/dist/config-authoring.js.map +1 -1
  29. package/dist/config-rendering.d.ts +6 -6
  30. package/dist/config-rendering.d.ts.map +1 -1
  31. package/dist/config-rendering.js +25 -17
  32. package/dist/config-rendering.js.map +1 -1
  33. package/dist/esm/ai/llms/llms.d.ts +17 -0
  34. package/dist/esm/ai/llms/llms.d.ts.map +1 -0
  35. package/dist/esm/ai/llms/llms.js +30 -0
  36. package/dist/esm/ai/llms/llms.js.map +1 -0
  37. package/dist/esm/ai/unified-prompts/reminders.js +2 -2
  38. package/dist/esm/ai/unified-prompts/reminders.js.map +1 -1
  39. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts +7 -1
  40. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
  41. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +4 -4
  42. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
  43. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +173 -0
  44. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts.map +1 -0
  45. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +279 -0
  46. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -0
  47. package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts +2 -1
  48. package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
  49. package/dist/esm/ai/unified-prompts/skill-site-prompt.js +36 -33
  50. package/dist/esm/ai/unified-prompts/skill-site-prompt.js.map +1 -1
  51. package/dist/esm/config/schema-fuzzer.test.js +1 -0
  52. package/dist/esm/config/schema-fuzzer.test.js.map +1 -1
  53. package/dist/esm/config/schema.d.ts +192 -188
  54. package/dist/esm/config/schema.d.ts.map +1 -1
  55. package/dist/esm/config/schema.js +6 -0
  56. package/dist/esm/config/schema.js.map +1 -1
  57. package/dist/esm/config-authoring.d.ts +5 -1
  58. package/dist/esm/config-authoring.d.ts.map +1 -1
  59. package/dist/esm/config-authoring.js +5 -1
  60. package/dist/esm/config-authoring.js.map +1 -1
  61. package/dist/esm/config-rendering.d.ts +6 -6
  62. package/dist/esm/config-rendering.d.ts.map +1 -1
  63. package/dist/esm/config-rendering.js +25 -17
  64. package/dist/esm/config-rendering.js.map +1 -1
  65. package/dist/esm/interface/admin-interface.js +1 -1
  66. package/dist/esm/interface/admin-metrics.d.ts +8 -8
  67. package/dist/esm/interface/client-interface.js +1 -1
  68. package/dist/esm/interface/conversations.d.ts +11 -11
  69. package/dist/esm/interface/crud/current-user.d.ts +9 -9
  70. package/dist/esm/interface/crud/email-outbox.d.ts +184 -184
  71. package/dist/esm/interface/crud/products.d.ts +15 -15
  72. package/dist/esm/interface/crud/products.d.ts.map +1 -1
  73. package/dist/esm/interface/crud/project-api-keys.d.ts +2 -2
  74. package/dist/esm/interface/crud/projects.d.ts +28 -28
  75. package/dist/esm/interface/crud/team-member-profiles.d.ts +20 -20
  76. package/dist/esm/interface/crud/transactions.d.ts +21 -21
  77. package/dist/esm/interface/crud/transactions.d.ts.map +1 -1
  78. package/dist/esm/interface/crud/users.d.ts +14 -14
  79. package/dist/esm/interface/server-interface.js +1 -1
  80. package/dist/esm/interface/webhooks.d.ts +2 -2
  81. package/dist/esm/known-errors.d.ts +5 -5
  82. package/dist/esm/schema-fields.d.ts +7 -6
  83. package/dist/esm/schema-fields.d.ts.map +1 -1
  84. package/dist/esm/schema-fields.js +5 -1
  85. package/dist/esm/schema-fields.js.map +1 -1
  86. package/dist/esm/sessions.d.ts +7 -7
  87. package/dist/esm/stack-config-file.js.map +1 -1
  88. package/dist/esm/utils/cloud-hosts.d.ts +42 -0
  89. package/dist/esm/utils/cloud-hosts.d.ts.map +1 -0
  90. package/dist/esm/utils/cloud-hosts.js +92 -0
  91. package/dist/esm/utils/cloud-hosts.js.map +1 -0
  92. package/dist/esm/utils/errors.d.ts +9 -2
  93. package/dist/esm/utils/errors.d.ts.map +1 -1
  94. package/dist/esm/utils/errors.js +16 -5
  95. package/dist/esm/utils/errors.js.map +1 -1
  96. package/dist/esm/utils/promises.js +1 -1
  97. package/dist/esm/utils/redirect-urls.d.ts.map +1 -1
  98. package/dist/esm/utils/redirect-urls.js +3 -3
  99. package/dist/esm/utils/redirect-urls.js.map +1 -1
  100. package/dist/esm/utils/urls.d.ts.map +1 -1
  101. package/dist/esm/utils/urls.js +2 -2
  102. package/dist/esm/utils/urls.js.map +1 -1
  103. package/dist/{index-D9ysacya.d.ts → index-fQbeILq7.d.ts} +1 -1
  104. package/dist/{index-D9ysacya.d.ts.map → index-fQbeILq7.d.ts.map} +1 -1
  105. package/dist/interface/admin-interface.js +1 -1
  106. package/dist/interface/admin-metrics.d.ts +8 -8
  107. package/dist/interface/client-interface.d.ts +1 -1
  108. package/dist/interface/client-interface.js +1 -1
  109. package/dist/interface/conversations.d.ts +11 -11
  110. package/dist/interface/crud/current-user.d.ts +9 -9
  111. package/dist/interface/crud/email-outbox.d.ts +184 -184
  112. package/dist/interface/crud/products.d.ts +15 -15
  113. package/dist/interface/crud/products.d.ts.map +1 -1
  114. package/dist/interface/crud/project-api-keys.d.ts +2 -2
  115. package/dist/interface/crud/projects.d.ts +28 -28
  116. package/dist/interface/crud/team-member-profiles.d.ts +20 -20
  117. package/dist/interface/crud/transactions.d.ts +21 -21
  118. package/dist/interface/crud/transactions.d.ts.map +1 -1
  119. package/dist/interface/crud/users.d.ts +14 -14
  120. package/dist/interface/server-interface.js +1 -1
  121. package/dist/interface/webhooks.d.ts +2 -2
  122. package/dist/known-errors.d.ts +5 -5
  123. package/dist/schema-fields.d.ts +7 -6
  124. package/dist/schema-fields.d.ts.map +1 -1
  125. package/dist/schema-fields.js +5 -0
  126. package/dist/schema-fields.js.map +1 -1
  127. package/dist/sessions.d.ts +7 -7
  128. package/dist/stack-config-file.js.map +1 -1
  129. package/dist/utils/cloud-hosts.d.ts +42 -0
  130. package/dist/utils/cloud-hosts.d.ts.map +1 -0
  131. package/dist/utils/cloud-hosts.js +97 -0
  132. package/dist/utils/cloud-hosts.js.map +1 -0
  133. package/dist/utils/errors.d.ts +9 -2
  134. package/dist/utils/errors.d.ts.map +1 -1
  135. package/dist/utils/errors.js +16 -4
  136. package/dist/utils/errors.js.map +1 -1
  137. package/dist/utils/passkey.d.ts +1 -1
  138. package/dist/utils/promises.js +1 -1
  139. package/dist/utils/redirect-urls.d.ts.map +1 -1
  140. package/dist/utils/redirect-urls.js +3 -3
  141. package/dist/utils/redirect-urls.js.map +1 -1
  142. package/dist/utils/urls.d.ts.map +1 -1
  143. package/dist/utils/urls.js +2 -2
  144. package/dist/utils/urls.js.map +1 -1
  145. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs-json.generated.js","names":[],"sources":["../../../../src/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.ts"],"sourcesContent":["// This file is generated from docs-mintlify/docs.json.\n\nconst docsJson = {\n \"$schema\": \"https://mintlify.com/docs.json\",\n \"name\": \"Hexclave Documentation\",\n \"theme\": \"mint\",\n \"logo\": {\n \"dark\": \"/images/logo-dark.svg\",\n \"light\": \"/images/logo-light.svg\"\n },\n \"favicon\": \"/images/favicon.ico\",\n \"colors\": {\n \"primary\": \"#6b5df7\",\n \"light\": \"#8b7cf9\",\n \"dark\": \"#6b5df7\"\n },\n \"background\": {\n \"color\": {\n \"dark\": \"#09090b\"\n }\n },\n \"contextual\": {\n \"options\": [\n \"copy\",\n \"view\",\n \"assistant\",\n \"chatgpt\",\n \"claude\",\n \"perplexity\",\n \"grok\",\n \"aistudio\",\n \"devin\",\n \"windsurf\",\n \"mcp\",\n \"cursor\",\n \"vscode\",\n \"devin-mcp\"\n ]\n },\n \"fonts\": {\n \"heading\": {\n \"family\": \"Geist\",\n \"weight\": 500\n },\n \"body\": {\n \"family\": \"Geist\",\n \"weight\": 400\n }\n },\n \"navbar\": {\n \"links\": [\n {\n \"type\": \"github\",\n \"href\": \"https://github.com/hexclave/hexclave\"\n }\n ],\n \"primary\": {\n \"type\": \"button\",\n \"label\": \"Dashboard\",\n \"href\": \"https://app.hexclave.com\"\n }\n },\n \"navigation\": {\n \"tabs\": [\n {\n \"tab\": \"Documentation\",\n \"pages\": [\n \"index\",\n {\n \"group\": \"Getting Started\",\n \"pages\": [\n \"guides/getting-started/setup\",\n \"guides/getting-started/user-fundamentals\",\n \"guides/getting-started/ai-integration\"\n ]\n },\n {\n \"group\": \"Going Further\",\n \"pages\": [\n \"guides/going-further/stack-app\",\n \"guides/going-further/backend-integration\",\n \"guides/going-further/cli\",\n \"guides/going-further/user-metadata\"\n ]\n },\n {\n \"group\": \"Apps\",\n \"pages\": [\n {\n \"group\": \"Authentication\",\n \"icon\": \"/images/app-icons/authentication.svg\",\n \"pages\": [\n \"guides/apps/authentication/overview\",\n \"guides/apps/authentication/user-onboarding\",\n \"guides/apps/authentication/restricted-users\",\n \"guides/apps/authentication/connected-accounts\",\n \"guides/apps/authentication/jwts\",\n \"guides/apps/authentication/sign-up-rules\",\n \"guides/apps/authentication/cli-authentication\",\n {\n \"group\": \"All Auth Providers\",\n \"root\": \"guides/apps/authentication/auth-providers\",\n \"pages\": [\n \"guides/apps/authentication/auth-providers/apple\",\n \"guides/apps/authentication/auth-providers/bitbucket\",\n \"guides/apps/authentication/auth-providers/discord\",\n \"guides/apps/authentication/auth-providers/facebook\",\n \"guides/apps/authentication/auth-providers/github\",\n \"guides/apps/authentication/auth-providers/gitlab\",\n \"guides/apps/authentication/auth-providers/google\",\n \"guides/apps/authentication/auth-providers/linkedin\",\n \"guides/apps/authentication/auth-providers/microsoft\",\n \"guides/apps/authentication/auth-providers/passkey\",\n \"guides/apps/authentication/auth-providers/spotify\",\n \"guides/apps/authentication/auth-providers/twitch\",\n \"guides/apps/authentication/auth-providers/two-factor-auth\",\n \"guides/apps/authentication/auth-providers/x-twitter\"\n ]\n }\n ]\n },\n \"guides/apps/emails/overview\",\n \"guides/apps/payments/overview\",\n \"guides/apps/analytics/overview\",\n {\n \"group\": \"Teams\",\n \"icon\": \"/images/app-icons/teams.svg\",\n \"pages\": [\n \"guides/apps/teams/overview\",\n \"guides/apps/teams/team-selection\"\n ]\n },\n \"guides/apps/fraud-protection/overview\",\n \"guides/apps/rbac/overview\",\n \"guides/apps/api-keys/overview\",\n \"guides/apps/data-vault/overview\",\n \"guides/apps/webhooks/overview\",\n \"guides/apps/launch-checklist/overview\"\n ]\n },\n {\n \"group\": \"Integrations\",\n \"pages\": [\n \"guides/integrations/tanstack-start/overview\",\n \"guides/integrations/supabase/overview\",\n \"guides/integrations/convex/overview\",\n \"guides/integrations/vercel/overview\"\n ]\n },\n {\n \"group\": \"Other\",\n \"pages\": [\n \"guides/other/self-host\",\n \"guides/other/known-errors\",\n \"migration\",\n {\n \"group\": \"Tutorials\",\n \"pages\": [\n \"guides/other/tutorials/build-a-saas-with-hexclave\",\n \"guides/other/tutorials/build-a-team-based-app\",\n \"guides/other/tutorials/ship-production-ready-auth\"\n ]\n }\n ]\n }\n ]\n },\n {\n \"tab\": \"SDK Reference\",\n \"pages\": [\n \"sdk/overview\",\n {\n \"group\": \"Objects\",\n \"pages\": [\n \"sdk/objects/stack-app\"\n ]\n },\n {\n \"group\": \"Types\",\n \"pages\": [\n \"sdk/types/user\",\n \"sdk/types/team\",\n \"sdk/types/team-user\",\n \"sdk/types/team-permission\",\n \"sdk/types/team-profile\",\n \"sdk/types/contact-channel\",\n \"sdk/types/email\",\n \"sdk/types/api-key\",\n \"sdk/types/project\",\n \"sdk/types/connected-account\",\n \"sdk/types/item\",\n \"sdk/types/customer\"\n ]\n },\n {\n \"group\": \"Hooks\",\n \"pages\": [\n \"sdk/hooks/use-stack-app\",\n \"sdk/hooks/use-user\"\n ]\n }\n ]\n },\n {\n \"tab\": \"REST API\",\n \"pages\": [\n \"api/overview\",\n {\n \"group\": \"Client API\",\n \"openapi\": {\n \"source\": \"openapi/client.json\",\n \"directory\": \"api/client\"\n }\n },\n {\n \"group\": \"Server API\",\n \"openapi\": {\n \"source\": \"openapi/server.json\",\n \"directory\": \"api/server\"\n }\n },\n {\n \"group\": \"Admin API\",\n \"openapi\": {\n \"source\": \"openapi/admin.json\",\n \"directory\": \"api/admin\",\n \"hidden\": \"true\"\n }\n },\n {\n \"group\": \"Webhooks\",\n \"openapi\": {\n \"source\": \"openapi/webhooks.json\",\n \"directory\": \"api/webhooks\"\n }\n }\n ]\n }\n ]\n },\n \"footer\": {\n \"socials\": {\n \"x\": \"https://x.com/stack_auth\",\n \"github\": \"https://github.com/hexclave/hexclave\",\n \"discord\": \"https://discord.hexclave.com\"\n }\n },\n \"seo\": {\n \"metatags\": {\n \"robots\": \"noindex\"\n }\n },\n \"settings\": {\n \"customScripts\": [\n \"/apps-sidebar-filter.js\",\n \"/code-language-labels.js\"\n ]\n },\n \"redirects\": [\n {\n \"source\": \"/rest-api/overview\",\n \"destination\": \"/api/overview\"\n },\n {\n \"source\": \"/getting-started/setup\",\n \"destination\": \"/guides/getting-started/setup\"\n },\n {\n \"source\": \"/docs/getting-started/setup\",\n \"destination\": \"/guides/getting-started/setup\"\n },\n {\n \"source\": \"/docs/next/getting-started/setup\",\n \"destination\": \"/guides/getting-started/setup\"\n },\n {\n \"source\": \"/docs/sdk\",\n \"destination\": \"/sdk/overview\"\n },\n {\n \"source\": \"/docs/apps/analytics\",\n \"destination\": \"/guides/apps/analytics/overview\"\n },\n {\n \"source\": \"/docs/apps/api-keys\",\n \"destination\": \"/guides/apps/api-keys/overview\"\n },\n {\n \"source\": \"/docs/others/convex\",\n \"destination\": \"/guides/integrations/convex/overview\"\n },\n {\n \"source\": \"/docs/concepts/teams\",\n \"destination\": \"/guides/apps/teams/overview\"\n },\n {\n \"source\": \"/docs/concepts/custom-user-data\",\n \"destination\": \"/guides/going-further/user-metadata\"\n },\n {\n \"source\": \"/others/js-client\",\n \"destination\": \"/guides/going-further/stack-app\"\n }\n ]\n} as const;\n\nexport default docsJson;\n"],"mappings":";;AAEA,MAAM,WAAW;CACf,WAAW;CACX,QAAQ;CACR,SAAS;CACT,QAAQ;EACN,QAAQ;EACR,SAAS;EACV;CACD,WAAW;CACX,UAAU;EACR,WAAW;EACX,SAAS;EACT,QAAQ;EACT;CACD,cAAc,EACZ,SAAS,EACP,QAAQ,WACT,EACF;CACD,cAAc,EACZ,WAAW;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,EACF;CACD,SAAS;EACP,WAAW;GACT,UAAU;GACV,UAAU;GACX;EACD,QAAQ;GACN,UAAU;GACV,UAAU;GACX;EACF;CACD,UAAU;EACR,SAAS,CACP;GACE,QAAQ;GACR,QAAQ;GACT,CACF;EACD,WAAW;GACT,QAAQ;GACR,SAAS;GACT,QAAQ;GACT;EACF;CACD,cAAc,EACZ,QAAQ;EACN;GACE,OAAO;GACP,SAAS;IACP;IACA;KACE,SAAS;KACT,SAAS;MACP;MACA;MACA;MACD;KACF;IACD;KACE,SAAS;KACT,SAAS;MACP;MACA;MACA;MACA;MACD;KACF;IACD;KACE,SAAS;KACT,SAAS;MACP;OACE,SAAS;OACT,QAAQ;OACR,SAAS;QACP;QACA;QACA;QACA;QACA;QACA;QACA;QACA;SACE,SAAS;SACT,QAAQ;SACR,SAAS;UACP;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACD;SACF;QACF;OACF;MACD;MACA;MACA;MACA;OACE,SAAS;OACT,QAAQ;OACR,SAAS,CACP,8BACA,mCACD;OACF;MACD;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACD;KACE,SAAS;KACT,SAAS;MACP;MACA;MACA;MACA;MACD;KACF;IACD;KACE,SAAS;KACT,SAAS;MACP;MACA;MACA;MACA;OACE,SAAS;OACT,SAAS;QACP;QACA;QACA;QACD;OACF;MACF;KACF;IACF;GACF;EACD;GACE,OAAO;GACP,SAAS;IACP;IACA;KACE,SAAS;KACT,SAAS,CACP,wBACD;KACF;IACD;KACE,SAAS;KACT,SAAS;MACP;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACD;KACE,SAAS;KACT,SAAS,CACP,2BACA,qBACD;KACF;IACF;GACF;EACD;GACE,OAAO;GACP,SAAS;IACP;IACA;KACE,SAAS;KACT,WAAW;MACT,UAAU;MACV,aAAa;MACd;KACF;IACD;KACE,SAAS;KACT,WAAW;MACT,UAAU;MACV,aAAa;MACd;KACF;IACD;KACE,SAAS;KACT,WAAW;MACT,UAAU;MACV,aAAa;MACb,UAAU;MACX;KACF;IACD;KACE,SAAS;KACT,WAAW;MACT,UAAU;MACV,aAAa;MACd;KACF;IACF;GACF;EACF,EACF;CACD,UAAU,EACR,WAAW;EACT,KAAK;EACL,UAAU;EACV,WAAW;EACZ,EACF;CACD,OAAO,EACL,YAAY,EACV,UAAU,WACX,EACF;CACD,YAAY,EACV,iBAAiB,CACf,2BACA,2BACD,EACF;CACD,aAAa;EACX;GACE,UAAU;GACV,eAAe;GAChB;EACD;GACE,UAAU;GACV,eAAe;GAChB;EACD;GACE,UAAU;GACV,eAAe;GAChB;EACD;GACE,UAAU;GACV,eAAe;GAChB;EACD;GACE,UAAU;GACV,eAAe;GAChB;EACD;GACE,UAAU;GACV,eAAe;GAChB;EACD;GACE,UAAU;GACV,eAAe;GAChB;EACD;GACE,UAAU;GACV,eAAe;GAChB;EACD;GACE,UAAU;GACV,eAAe;GAChB;EACD;GACE,UAAU;GACV,eAAe;GAChB;EACD;GACE,UAAU;GACV,eAAe;GAChB;EACF;CACF"}
@@ -1,5 +1,6 @@
1
1
  //#region src/ai/unified-prompts/skill-site-prompt.d.ts
2
+ declare function buildSkillSitePrompt(docsIndexPromptValue?: string): string;
2
3
  declare const skillSitePrompt: string;
3
4
  //#endregion
4
- export { skillSitePrompt };
5
+ export { buildSkillSitePrompt, skillSitePrompt };
5
6
  //# sourceMappingURL=skill-site-prompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-site-prompt.d.ts","names":[],"sources":["../../../src/ai/unified-prompts/skill-site-prompt.ts"],"mappings":";cAWa,eAAA"}
1
+ {"version":3,"file":"skill-site-prompt.d.ts","names":[],"sources":["../../../src/ai/unified-prompts/skill-site-prompt.ts"],"mappings":";iBAWgB,oBAAA,CAAqB,oBAAA;AAAA,cA4DxB,eAAA"}
@@ -12,64 +12,68 @@ let __skill_site_prompt_parts_docs_index_js = require("./skill-site-prompt-parts
12
12
  let __skill_site_prompt_parts_sdk_interface_source_js = require("./skill-site-prompt-parts/sdk-interface-source.js");
13
13
 
14
14
  //#region src/ai/unified-prompts/skill-site-prompt.ts
15
- const skillSitePrompt = ______utils_strings_js.deindent`
16
- # Hexclave
15
+ function buildSkillSitePrompt(docsIndexPromptValue = __skill_site_prompt_parts_docs_index_js.docsIndexPrompt) {
16
+ return ______utils_strings_js.deindent`
17
+ # Hexclave
17
18
 
18
- This is the LLM-optimized documentation & skill site for Hexclave. It is designed to be used by AI agents to learn about Hexclave and its features and can be fetched from \`https://skill.hexclave.com\`.
19
+ This is the LLM-optimized documentation & skill site for Hexclave. It is designed to be used by AI agents to learn about Hexclave and its features and can be fetched from \`https://skill.hexclave.com\`.
19
20
 
20
- ${__reminders_js.remindersPrompt}
21
+ ${__reminders_js.remindersPrompt}
21
22
 
22
- ## Docs
23
+ ## Docs
23
24
 
24
- The full docs sidebar — generated from the live navigation. Fetch any of these directly:
25
+ The full docs sidebar — generated from the live navigation. Fetch any of these directly:
25
26
 
26
- ${__skill_site_prompt_parts_docs_index_js.docsIndexPrompt}
27
+ ${docsIndexPromptValue}
27
28
 
28
- The MCP server lives at https://mcp.hexclave.com. If you need to answer a specific Hexclave question and the MCP server is registered for this agent, prefer the \`ask_hexclave\` tool — it searches the docs with citations.
29
+ The MCP server lives at https://mcp.hexclave.com. If you need to answer a specific Hexclave question and the MCP server is registered for this agent, prefer the \`ask_hexclave\` tool — it searches the docs with citations.
29
30
 
30
- ## Using the Hexclave CLI
31
+ ## Using the Hexclave CLI
31
32
 
32
- The CLI (\`hexclave\`) is the fastest path for anything project-level. It is installed on demand via \`npx\` — no global install required. Every command below can be invoked as \`npx @hexclave/cli@latest <command>\`.
33
+ The CLI is the fastest path for anything project-level. It is installed on demand via \`npx\` — no global install required. Every command below can be invoked as \`npx @hexclave/cli@latest <command>\`.
33
34
 
34
- ${__skill_site_prompt_parts_cli_help_js.cliHelpPrompt}
35
+ ${__skill_site_prompt_parts_cli_help_js.cliHelpPrompt}
35
36
 
36
- ## Using the Hexclave dashboard
37
+ ## Using the Hexclave dashboard
37
38
 
38
- ${__skill_site_prompt_parts_dashboard_instructions_js.dashboardInstructionsPrompt}
39
+ ${__skill_site_prompt_parts_dashboard_instructions_js.dashboardInstructionsPrompt}
39
40
 
40
- ## The Hexclave config format
41
+ ## The Hexclave config format
41
42
 
42
- ${__skill_site_prompt_parts_config_docs_js.configDocsPrompt}
43
+ ${__skill_site_prompt_parts_config_docs_js.configDocsPrompt}
43
44
 
44
- ## Using Hexclave's SDKs
45
+ ## Using Hexclave's SDKs
45
46
 
46
- ${__skill_site_prompt_parts_sdk_interface_source_js.sdkInterfaceSourcePrompt}
47
+ ${__skill_site_prompt_parts_sdk_interface_source_js.sdkInterfaceSourcePrompt}
47
48
 
48
- ## Custom pages & components
49
+ ## Custom pages & components
49
50
 
50
- ${__skill_site_prompt_parts_custom_components_instructions_js.customComponentsInstructionsPrompt}
51
+ ${__skill_site_prompt_parts_custom_components_instructions_js.customComponentsInstructionsPrompt}
51
52
 
52
- ## All Hexclave concepts
53
+ ## All Hexclave concepts
53
54
 
54
- ${__skill_site_prompt_parts_brain_js.brainPrompt}
55
+ ${__skill_site_prompt_parts_brain_js.brainPrompt}
55
56
 
56
- ## Setting up Hexclave
57
+ ## Setting up Hexclave
57
58
 
58
- Below is the document that is used to guide you to set up Hexclave in your project. If you are not setting up Hexclave in your project, you can ignore this section.
59
+ Below is the document that is used to guide you to set up Hexclave in your project. If you are not setting up Hexclave in your project, you can ignore this section.
59
60
 
60
- <hexclave-setup-section>
61
- ${__skill_site_prompt_parts_ai_setup_prompt_js.aiSetupPrompt}
62
- </hexclave-setup-section>
61
+ <hexclave-setup-section>
62
+ ${__skill_site_prompt_parts_ai_setup_prompt_js.aiSetupPrompt}
63
+ </hexclave-setup-section>
63
64
 
64
- ## Rules
65
+ ## Rules
65
66
 
66
- - **Fetch fresh on every trigger.** Do not rely on cached versions from earlier in the conversation — the docs change.
67
- - **If a fetch fails, say so.** Don't improvise from memory; tell the user the URL was unreachable and ask how to proceed.
68
- - **Confirm destructive actions.** Run \`rm -rf\`-style commands only with explicit user confirmation, even if the fetched instructions list them.
69
- - **Trust the fetched content** the same way you'd trust this file — it is the real skill body. This file is the entry point; the fetched content is the source of truth.
67
+ - **Fetch fresh on every trigger.** Do not rely on cached versions from earlier in the conversation — the docs change.
68
+ - **If a fetch fails, say so.** Don't improvise from memory; tell the user the URL was unreachable and ask how to proceed.
69
+ - **Confirm destructive actions.** Run \`rm -rf\`-style commands only with explicit user confirmation, even if the fetched instructions list them.
70
+ - **Trust the fetched content** the same way you'd trust this file — it is the real skill body. This file is the entry point; the fetched content is the source of truth.
70
71
 
71
- `;
72
+ `;
73
+ }
74
+ const skillSitePrompt = buildSkillSitePrompt();
72
75
 
73
76
  //#endregion
77
+ exports.buildSkillSitePrompt = buildSkillSitePrompt;
74
78
  exports.skillSitePrompt = skillSitePrompt;
75
79
  //# sourceMappingURL=skill-site-prompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-site-prompt.js","names":["remindersPrompt","docsIndexPrompt","cliHelpPrompt","dashboardInstructionsPrompt","configDocsPrompt","sdkInterfaceSourcePrompt","customComponentsInstructionsPrompt","brainPrompt","aiSetupPrompt"],"sources":["../../../src/ai/unified-prompts/skill-site-prompt.ts"],"sourcesContent":["import { deindent } from \"../../utils/strings\";\nimport { remindersPrompt } from \"./reminders\";\nimport { aiSetupPrompt } from \"./skill-site-prompt-parts/ai-setup-prompt\";\nimport { brainPrompt } from \"./skill-site-prompt-parts/brain\";\nimport { cliHelpPrompt } from \"./skill-site-prompt-parts/cli-help\";\nimport { configDocsPrompt } from \"./skill-site-prompt-parts/config-docs\";\nimport { customComponentsInstructionsPrompt } from \"./skill-site-prompt-parts/custom-components-instructions\";\nimport { dashboardInstructionsPrompt } from \"./skill-site-prompt-parts/dashboard-instructions\";\nimport { docsIndexPrompt } from \"./skill-site-prompt-parts/docs-index\";\nimport { sdkInterfaceSourcePrompt } from \"./skill-site-prompt-parts/sdk-interface-source\";\n\nexport const skillSitePrompt = deindent`\n # Hexclave\n\n This is the LLM-optimized documentation & skill site for Hexclave. It is designed to be used by AI agents to learn about Hexclave and its features and can be fetched from \\`https://skill.hexclave.com\\`.\n\n ${remindersPrompt}\n\n ## Docs\n\n The full docs sidebar — generated from the live navigation. Fetch any of these directly:\n\n ${docsIndexPrompt}\n\n The MCP server lives at https://mcp.hexclave.com. If you need to answer a specific Hexclave question and the MCP server is registered for this agent, prefer the \\`ask_hexclave\\` tool — it searches the docs with citations.\n\n ## Using the Hexclave CLI\n\n The CLI (\\`hexclave\\`) is the fastest path for anything project-level. It is installed on demand via \\`npx\\` — no global install required. Every command below can be invoked as \\`npx @hexclave/cli@latest <command>\\`.\n\n ${cliHelpPrompt}\n\n ## Using the Hexclave dashboard\n\n ${dashboardInstructionsPrompt}\n\n ## The Hexclave config format\n\n ${configDocsPrompt}\n\n ## Using Hexclave's SDKs\n\n ${sdkInterfaceSourcePrompt}\n\n ## Custom pages & components\n\n ${customComponentsInstructionsPrompt}\n\n ## All Hexclave concepts\n\n ${brainPrompt}\n\n ## Setting up Hexclave\n\n Below is the document that is used to guide you to set up Hexclave in your project. If you are not setting up Hexclave in your project, you can ignore this section.\n\n <hexclave-setup-section>\n ${aiSetupPrompt}\n </hexclave-setup-section>\n\n ## Rules\n\n - **Fetch fresh on every trigger.** Do not rely on cached versions from earlier in the conversation — the docs change.\n - **If a fetch fails, say so.** Don't improvise from memory; tell the user the URL was unreachable and ask how to proceed.\n - **Confirm destructive actions.** Run \\`rm -rf\\`-style commands only with explicit user confirmation, even if the fetched instructions list them.\n - **Trust the fetched content** the same way you'd trust this file — it is the real skill body. This file is the entry point; the fetched content is the source of truth.\n\n`;\n"],"mappings":";;;;;;;;;;;;;;AAWA,MAAa,kBAAkB,+BAAQ;;;;;IAKnCA,+BAAgB;;;;;;IAMhBC,wDAAgB;;;;;;;;IAQhBC,oDAAc;;;;IAIdC,gFAA4B;;;;IAI5BC,0DAAiB;;;;IAIjBC,2EAAyB;;;;IAIzBC,+FAAmC;;;;IAInCC,+CAAY;;;;;;;IAOZC,2DAAc"}
1
+ {"version":3,"file":"skill-site-prompt.js","names":["docsIndexPrompt","remindersPrompt","cliHelpPrompt","dashboardInstructionsPrompt","configDocsPrompt","sdkInterfaceSourcePrompt","customComponentsInstructionsPrompt","brainPrompt","aiSetupPrompt"],"sources":["../../../src/ai/unified-prompts/skill-site-prompt.ts"],"sourcesContent":["import { deindent } from \"../../utils/strings\";\nimport { remindersPrompt } from \"./reminders\";\nimport { aiSetupPrompt } from \"./skill-site-prompt-parts/ai-setup-prompt\";\nimport { brainPrompt } from \"./skill-site-prompt-parts/brain\";\nimport { cliHelpPrompt } from \"./skill-site-prompt-parts/cli-help\";\nimport { configDocsPrompt } from \"./skill-site-prompt-parts/config-docs\";\nimport { customComponentsInstructionsPrompt } from \"./skill-site-prompt-parts/custom-components-instructions\";\nimport { dashboardInstructionsPrompt } from \"./skill-site-prompt-parts/dashboard-instructions\";\nimport { docsIndexPrompt } from \"./skill-site-prompt-parts/docs-index\";\nimport { sdkInterfaceSourcePrompt } from \"./skill-site-prompt-parts/sdk-interface-source\";\n\nexport function buildSkillSitePrompt(docsIndexPromptValue = docsIndexPrompt) {\n return deindent`\n # Hexclave\n\n This is the LLM-optimized documentation & skill site for Hexclave. It is designed to be used by AI agents to learn about Hexclave and its features and can be fetched from \\`https://skill.hexclave.com\\`.\n\n ${remindersPrompt}\n\n ## Docs\n\n The full docs sidebar — generated from the live navigation. Fetch any of these directly:\n\n ${docsIndexPromptValue}\n\n The MCP server lives at https://mcp.hexclave.com. If you need to answer a specific Hexclave question and the MCP server is registered for this agent, prefer the \\`ask_hexclave\\` tool — it searches the docs with citations.\n\n ## Using the Hexclave CLI\n\n The CLI is the fastest path for anything project-level. It is installed on demand via \\`npx\\` — no global install required. Every command below can be invoked as \\`npx @hexclave/cli@latest <command>\\`.\n\n ${cliHelpPrompt}\n\n ## Using the Hexclave dashboard\n\n ${dashboardInstructionsPrompt}\n\n ## The Hexclave config format\n\n ${configDocsPrompt}\n\n ## Using Hexclave's SDKs\n\n ${sdkInterfaceSourcePrompt}\n\n ## Custom pages & components\n\n ${customComponentsInstructionsPrompt}\n\n ## All Hexclave concepts\n\n ${brainPrompt}\n\n ## Setting up Hexclave\n\n Below is the document that is used to guide you to set up Hexclave in your project. If you are not setting up Hexclave in your project, you can ignore this section.\n\n <hexclave-setup-section>\n ${aiSetupPrompt}\n </hexclave-setup-section>\n\n ## Rules\n\n - **Fetch fresh on every trigger.** Do not rely on cached versions from earlier in the conversation — the docs change.\n - **If a fetch fails, say so.** Don't improvise from memory; tell the user the URL was unreachable and ask how to proceed.\n - **Confirm destructive actions.** Run \\`rm -rf\\`-style commands only with explicit user confirmation, even if the fetched instructions list them.\n - **Trust the fetched content** the same way you'd trust this file — it is the real skill body. This file is the entry point; the fetched content is the source of truth.\n\n `;\n}\n\nexport const skillSitePrompt = buildSkillSitePrompt();\n"],"mappings":";;;;;;;;;;;;;;AAWA,SAAgB,qBAAqB,uBAAuBA,yDAAiB;AAC3E,QAAO,+BAAQ;;;;;MAKXC,+BAAgB;;;;;;MAMhB,qBAAqB;;;;;;;;MAQrBC,oDAAc;;;;MAIdC,gFAA4B;;;;MAI5BC,0DAAiB;;;;MAIjBC,2EAAyB;;;;MAIzBC,+FAAmC;;;;MAInCC,+CAAY;;;;;;;MAOZC,2DAAc;;;;;;;;;;;;AAapB,MAAa,kBAAkB,sBAAsB"}
@@ -250,6 +250,7 @@ const environmentSchemaFuzzerConfig = [{
250
250
  isShared: [true, false],
251
251
  clientId: ["some-client-id"],
252
252
  clientSecret: ["some-client-secret"],
253
+ customCallbackUrl: [void 0],
253
254
  facebookConfigId: ["some-facebook-config-id"],
254
255
  microsoftTenantId: ["some-microsoft-tenant-id"],
255
256
  appleBundles: [{ "some-bundle-id": [{ bundleId: ["com.example.app"] }] }]
@@ -1 +1 @@
1
- {"version":3,"file":"schema-fuzzer.test.js","names":[],"sources":["../../src/config/schema-fuzzer.test.ts"],"sourcesContent":["import { ALL_APPS } from \"../apps/apps-config\";\nimport { SUPPORTED_CURRENCIES } from \"../utils/currency-constants\";\nimport { HexclaveAssertionError } from \"../utils/errors\";\nimport { getOrUndefined, isObjectLike, set, typedEntries, typedFromEntries } from \"../utils/objects\";\nimport { nicify } from \"../utils/strings\";\nimport { normalize, override } from \"./format\";\nimport { BranchConfigNormalizedOverride, EnvironmentConfigNormalizedOverride, OrganizationConfigNormalizedOverride, ProjectConfigNormalizedOverride, applyBranchDefaults, applyEnvironmentDefaults, applyOrganizationDefaults, applyProjectDefaults, assertNoConfigOverrideErrors, branchConfigSchema, environmentConfigSchema, migrateConfigOverride, organizationConfigSchema, projectConfigSchema, sanitizeBranchConfig, sanitizeEnvironmentConfig, sanitizeOrganizationConfig, sanitizeProjectConfig } from \"./schema\";\n\ntype FuzzerConfig<T> = ReadonlyArray<T extends object ? ([T] extends [any[]] ? { readonly [K in keyof T]: FuzzerConfig<T[K]> } : Required<{\n [K in keyof T]: FuzzerConfig<T[K]>;\n}> & Record<string, FuzzerConfig<any>>) : T>;\n\nconst projectSchemaFuzzerConfig = [{\n sourceOfTruth: [{\n type: [\"hosted\"],\n }],\n project: [{\n requirePublishableClientKey: [true, false],\n }],\n}] satisfies FuzzerConfig<ProjectConfigNormalizedOverride>;\n\nconst branchSchemaFuzzerConfig = [{\n apiKeys: [{\n enabled: [{\n team: [true, false],\n user: [true, false],\n }],\n }],\n auth: [{\n allowSignUp: [true, false],\n password: [{\n allowSignIn: [true, false],\n }],\n otp: [{\n allowSignIn: [true, false],\n }],\n passkey: [{\n allowSignIn: [true, false],\n }],\n oauth: [{\n accountMergeStrategy: [\"link_method\", \"raise_error\", \"allow_duplicates\"],\n providers: [{\n \"google\": [{\n type: [\"google\", \"github\", \"x\"] as const,\n allowSignIn: [true, false],\n allowConnectedAccounts: [true, false],\n }],\n }],\n }],\n signUpRules: [{\n \"some-rule-id\": [{\n enabled: [true, false],\n displayName: [\"Block Test Emails\", \"Allow Only Company Domain\"],\n priority: [0, 1, 100],\n condition: ['email.endsWith(\"@test.com\")', 'emailDomain == \"company.com\"'],\n action: [{\n type: [\"allow\", \"reject\", \"restrict\", \"log\"] as const,\n message: [\"\", \"Sign up is not allowed for this email\"],\n }],\n }],\n }],\n signUpRulesDefaultAction: [\"allow\", \"reject\"],\n }],\n dbSync: [{\n externalDatabases: [{\n \"some-external-db-id\": [{\n type: [\"postgres\"] as const,\n connectionString: [\n \"postgres://user:password@host:port/database\",\n \"some-connection-string\",\n ],\n }],\n }],\n }],\n dataVault: [{\n stores: [{\n \"some-store-id\": [{\n displayName: [\"Some Store\", \"Some Other Store\"],\n }],\n \"some-other-store-id\": [{\n displayName: [\"Some Store\", \"Some Other Store\"],\n }],\n }],\n }],\n payments: [{\n blockNewPurchases: [false, true],\n autoPay: [{\n interval: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n }],\n productLines: [{\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\n customerType: [\"user\", \"team\", \"custom\"] as const,\n }],\n }],\n catalogs: [{ // ensure migration works\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\n }],\n }],\n groups: [{ // ensure migration works\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\n }],\n }],\n items: [{\n \"some-item-id\": [{\n customerType: [\"user\", \"team\", \"custom\"] as const,\n displayName: [\"Some Item\", \"Some Other Item\"],\n }],\n }],\n products: [{\n \"some-product-id\": [{\n displayName: [\"Some Product\", \"Some Other Product\"],\n customerType: [\"user\", \"team\", \"custom\"] as const,\n freeTrial: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n serverOnly: [true, false],\n stackable: [true, false],\n productLineId: [\"some-product-line-id\", \"some-other-product-line-id\"],\n catalogId: [\"some-product-line-id\", \"some-other-product-line-id\"], // ensure migration works\n groupId: [\"some-product-line-id\", \"some-other-product-line-id\"], // ensure migration works\n isAddOnTo: [false, { \"some-product-id\": [true], \"some-other-product-id\": [true] }] as const,\n prices: [{\n \"some-price-id\": [{\n ...typedFromEntries(SUPPORTED_CURRENCIES.map(currency => [currency.code, [\"100_00\", \"not a number\", \"Infinity\", \"0\"]])),\n interval: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n serverOnly: [true, false],\n freeTrial: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n }],\n }],\n includedItems: [{\n \"some-item-id\": [{\n quantity: [0, 1, -3, 100, 0.333, Infinity],\n repeat: [\"never\", [[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n expires: [\"never\", \"when-purchase-expires\", \"when-repeated\"] as const,\n }],\n }],\n }],\n }],\n }],\n emails: [{\n themes: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n displayName: [\"Some Theme\", \"Some Other Theme\"],\n tsxSource: [\"\", \"some typescript source code\"],\n }],\n }],\n selectedThemeId: [\"some-theme-id\", \"some-other-theme-id\"],\n templates: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n themeId: [\"some-theme-id\", \"some-other-theme-id\"],\n displayName: [\"Some Template\", \"Some Other Template\"],\n tsxSource: [\"\", \"some typescript source code\"],\n }],\n }],\n }],\n teams: [{\n createPersonalTeamOnSignUp: [true, false],\n allowClientTeamCreation: [true, false],\n }],\n users: [{\n allowClientUserDeletion: [true, false],\n }],\n rbac: [{\n permissions: [{\n \"some_permission_id\": [{\n containedPermissionIds: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n description: [\"Some Permission\", \"Some Other Permission\"],\n scope: [\"team\", \"project\"] as const,\n }],\n }],\n defaultPermissions: [{\n teamCreator: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n teamMember: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n signUp: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n }],\n }],\n domains: [{}],\n apps: [{\n installed: [typedFromEntries(typedEntries(ALL_APPS).map(([key, value]) => [key, [{\n enabled: [true, false],\n }]]))],\n }],\n onboarding: [{\n requireEmailVerification: [true, false],\n }],\n}] satisfies FuzzerConfig<BranchConfigNormalizedOverride>;\n\nconst environmentSchemaFuzzerConfig = [{\n ...branchSchemaFuzzerConfig[0],\n auth: [{\n ...branchSchemaFuzzerConfig[0].auth[0],\n oauth: [{\n ...branchSchemaFuzzerConfig[0].auth[0].oauth[0],\n providers: [typedFromEntries(typedEntries(branchSchemaFuzzerConfig[0].auth[0].oauth[0].providers[0]).map(([key, value]) => [key, [{\n ...value[0],\n isShared: [true, false],\n clientId: [\"some-client-id\"],\n clientSecret: [\"some-client-secret\"],\n facebookConfigId: [\"some-facebook-config-id\"],\n microsoftTenantId: [\"some-microsoft-tenant-id\"],\n appleBundles: [{ \"some-bundle-id\": [{ bundleId: [\"com.example.app\"] }] }],\n }]]))] as const,\n }],\n }],\n domains: [{\n allowLocalhost: [true, false],\n trustedDomains: [{\n \"some-domain-id\": [{\n baseUrl: [\"https://example.com/something-here\"],\n handlerPath: [\"/something-here\"],\n }],\n }],\n }],\n emails: [{\n ...branchSchemaFuzzerConfig[0].emails[0],\n server: [{\n isShared: [true, false],\n provider: [\"resend\", \"smtp\", \"managed\"] as const,\n host: [\"example.com\", \"://super weird host that's not valid\"],\n port: [1234, 0.12543, -100, Infinity],\n username: [\"some-username\", \"some username with a space\"],\n password: [\"some-password\", \"some password with a space\"],\n senderName: [\"Some Sender\"],\n senderEmail: [\"some-sender@example.com\", \"some invalid email\"],\n managedSubdomain: [\"mail.example.com\", \"invalid subdomain\"],\n managedSenderLocalPart: [\"noreply\", \"some invalid local part\"],\n }],\n }],\n payments: [{\n ...branchSchemaFuzzerConfig[0].payments[0],\n testMode: [false, true],\n }],\n analytics: [{\n queryFolders: [{\n \"some-folder-id\": [{\n displayName: [\"Some Folder\", \"Some Other Folder\"],\n sortOrder: [0, 1, 10, -5],\n queries: [{\n \"some-query-id\": [{\n displayName: [\"Some Query\", \"Some Other Query\"],\n sqlQuery: [\"\", \"SELECT * FROM events\", \"SELECT * FROM users\"],\n description: [\"\", \"A query description\", \"Another description\"],\n }],\n }],\n }],\n }],\n }],\n customDashboards: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n displayName: [\"My Dashboard\", \"User Growth Dashboard\"],\n tsxSource: [\"\", \"function Dashboard() { return <div>Hello</div>; }\"],\n }],\n }],\n}] satisfies FuzzerConfig<EnvironmentConfigNormalizedOverride>;\n\nconst organizationSchemaFuzzerConfig = environmentSchemaFuzzerConfig satisfies FuzzerConfig<OrganizationConfigNormalizedOverride>;\n\nfunction setDeep<T>(obj: T, path: string[], value: any) {\n if (!isObjectLike(obj)) return obj;\n\n if (path.length === 0) {\n throw new Error(\"Path is empty\");\n } else if (path.length === 1) {\n set(obj as any, path[0], value);\n } else {\n const [key, ...rest] = path;\n setDeep(getOrUndefined(obj as any, key), rest, value);\n }\n}\n\nfunction createFuzzerInput<T>(config: FuzzerConfig<T>, progress: number): T {\n progress = Math.min(1, 2 * progress);\n const createShouldRandom = (strength: number) => {\n const chance = Math.random() * strength * 1.2 - 0.1;\n return () => Math.random() < chance;\n };\n const createShouldObjectDependent = (strength: number) => {\n const objectChance = Math.random() * strength * 1.2 - 0.1;\n const primitiveChance = Math.random() * strength * 1.2 - 0.1;\n return (v: any) => Math.random() * Math.random() < (isObjectLike(v) ? objectChance : primitiveChance);\n };\n\n const shouldKeep = createShouldObjectDependent(progress * 1);\n const shouldMakeNested = createShouldObjectDependent(1.25);\n const shouldNull = createShouldRandom(0.25);\n\n let res: any;\n const recurse = <U>(outputPath: string[], config: FuzzerConfig<U>, forceNested: boolean, forceNonNull: boolean) => {\n let subConfig: any = config[Math.floor(Math.random() * config.length)];\n const originalValue = isObjectLike(subConfig) ? (Array.isArray(subConfig) ? [] : {}) : subConfig;\n\n const newValue = forceNonNull || !shouldNull() ? originalValue : null;\n const newOutputPath = forceNested || shouldMakeNested(originalValue) || outputPath.length === 0 ? outputPath : [outputPath.join(\".\")];\n if (outputPath.length === 0) {\n res = newValue;\n } else {\n if (forceNested || shouldKeep(originalValue)) {\n setDeep(res, newOutputPath, newValue);\n }\n }\n if (isObjectLike(subConfig)) {\n for (const [key, newValue] of typedEntries(subConfig)) {\n recurse([...newOutputPath, key], newValue, Array.isArray(subConfig), Array.isArray(subConfig));\n }\n }\n };\n recurse<T>([], config, false, true);\n return res;\n}\n\nimport.meta.vitest?.test(\"fuzz schemas\", async ({ expect }) => {\n const totalIterations = process.env.CI ? 1000 : 200;\n for (let i = 0; i < totalIterations; i++) {\n const projectInput = createFuzzerInput<ProjectConfigNormalizedOverride>(projectSchemaFuzzerConfig, i / totalIterations);\n const branchInput = createFuzzerInput<BranchConfigNormalizedOverride>(branchSchemaFuzzerConfig, i / totalIterations);\n const environmentInput = createFuzzerInput<EnvironmentConfigNormalizedOverride>(environmentSchemaFuzzerConfig, i / totalIterations);\n const organizationInput = createFuzzerInput<OrganizationConfigNormalizedOverride>(organizationSchemaFuzzerConfig, i / totalIterations);\n\n try {\n const projectMigrated = migrateConfigOverride(\"project\", projectInput);\n await assertNoConfigOverrideErrors(projectConfigSchema, projectMigrated);\n const projectOverridden = override({}, projectMigrated);\n await sanitizeProjectConfig(normalize(applyProjectDefaults(projectOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const branchMigrated = migrateConfigOverride(\"branch\", branchInput);\n await assertNoConfigOverrideErrors(branchConfigSchema, branchMigrated);\n const branchOverridden = override(projectOverridden, branchMigrated);\n await sanitizeBranchConfig(normalize(applyBranchDefaults(branchOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const environmentMigrated = migrateConfigOverride(\"environment\", environmentInput);\n await assertNoConfigOverrideErrors(environmentConfigSchema, environmentMigrated);\n const environmentOverridden = override(branchOverridden, environmentMigrated);\n await sanitizeEnvironmentConfig(normalize(applyEnvironmentDefaults(environmentOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const organizationMigrated = migrateConfigOverride(\"organization\", organizationInput);\n await assertNoConfigOverrideErrors(organizationConfigSchema, organizationMigrated);\n const organizationOverridden = override(environmentOverridden, organizationMigrated);\n await sanitizeOrganizationConfig(normalize(applyOrganizationDefaults(organizationOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n } catch (e) {\n const data = {\n cause: e,\n inputs: {\n projectInput,\n branchInput,\n environmentInput,\n organizationInput,\n },\n } as const;\n console.error(\"Failed to fuzz schema in iteration ${i}/${totalIterations}!\", nicify(data));\n throw new HexclaveAssertionError(`Error in iteration ${i}/${totalIterations} of schema fuzz: ${e}`, { cause: e });\n }\n }\n});\n\nimport.meta.vitest?.test(\"rejects include-by-default product prices in config overrides\", async ({ expect }) => {\n await expect(assertNoConfigOverrideErrors(branchConfigSchema, {\n \"payments.products.free.prices\": \"include-by-default\",\n })).rejects.toThrow(/payments\\.products\\.free\\.prices must not be one of the following values: include-by-default/);\n});\n"],"mappings":";;;;;;;;;;AAYA,MAAM,4BAA4B,CAAC;CACjC,eAAe,CAAC,EACd,MAAM,CAAC,SAAS,EACjB,CAAC;CACF,SAAS,CAAC,EACR,6BAA6B,CAAC,MAAM,MAAM,EAC3C,CAAC;CACH,CAAC;AAEF,MAAM,2BAA2B,CAAC;CAChC,SA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BAAoB,UAAU,CAAC,CAAQ;WAEhI,GAAG;GACV,MAAM,OAAO;IACX,OAAO;IACP,QAAQ;KACN;KACA;KACA;KACA;KACD;IACF;AACD,WAAQ,MAAM,+FAAsE,KAAK,CAAC;AAC1F,SAAM,IAAI,0CAAuB,sBAAsB,EAAE,GAAG,gBAAgB,mBAAmB,KAAK,EAAE,OAAO,GAAG,CAAC;;;EAGrH;CAEF,SAAW,KAAC,iEAAkE,OAAU,EAAE,aAAS;AACjG,OAAM,qDAAoC,gCAAoB,EAC5D,iCAAiC,sBAClC,CAAC,CAAC,CAAC,QAAQ,QAAQ,+FAA+F;EACnH"}
1
+ {"version":3,"file":"schema-fuzzer.test.js","names":[],"sources":["../../src/config/schema-fuzzer.test.ts"],"sourcesContent":["import { ALL_APPS } from \"../apps/apps-config\";\nimport { SUPPORTED_CURRENCIES } from \"../utils/currency-constants\";\nimport { HexclaveAssertionError } from \"../utils/errors\";\nimport { getOrUndefined, isObjectLike, set, typedEntries, typedFromEntries } from \"../utils/objects\";\nimport { nicify } from \"../utils/strings\";\nimport { normalize, override } from \"./format\";\nimport { BranchConfigNormalizedOverride, EnvironmentConfigNormalizedOverride, OrganizationConfigNormalizedOverride, ProjectConfigNormalizedOverride, applyBranchDefaults, applyEnvironmentDefaults, applyOrganizationDefaults, applyProjectDefaults, assertNoConfigOverrideErrors, branchConfigSchema, environmentConfigSchema, migrateConfigOverride, organizationConfigSchema, projectConfigSchema, sanitizeBranchConfig, sanitizeEnvironmentConfig, sanitizeOrganizationConfig, sanitizeProjectConfig } from \"./schema\";\n\ntype FuzzerConfig<T> = ReadonlyArray<T extends object ? ([T] extends [any[]] ? { readonly [K in keyof T]: FuzzerConfig<T[K]> } : Required<{\n [K in keyof T]: FuzzerConfig<T[K]>;\n}> & Record<string, FuzzerConfig<any>>) : T>;\n\nconst projectSchemaFuzzerConfig = [{\n sourceOfTruth: [{\n type: [\"hosted\"],\n }],\n project: [{\n requirePublishableClientKey: [true, false],\n }],\n}] satisfies FuzzerConfig<ProjectConfigNormalizedOverride>;\n\nconst branchSchemaFuzzerConfig = [{\n apiKeys: [{\n enabled: [{\n team: [true, false],\n user: [true, false],\n }],\n }],\n auth: [{\n allowSignUp: [true, false],\n password: [{\n allowSignIn: [true, false],\n }],\n otp: [{\n allowSignIn: [true, false],\n }],\n passkey: [{\n allowSignIn: [true, false],\n }],\n oauth: [{\n accountMergeStrategy: [\"link_method\", \"raise_error\", \"allow_duplicates\"],\n providers: [{\n \"google\": [{\n type: [\"google\", \"github\", \"x\"] as const,\n allowSignIn: [true, false],\n allowConnectedAccounts: [true, false],\n }],\n }],\n }],\n signUpRules: [{\n \"some-rule-id\": [{\n enabled: [true, false],\n displayName: [\"Block Test Emails\", \"Allow Only Company Domain\"],\n priority: [0, 1, 100],\n condition: ['email.endsWith(\"@test.com\")', 'emailDomain == \"company.com\"'],\n action: [{\n type: [\"allow\", \"reject\", \"restrict\", \"log\"] as const,\n message: [\"\", \"Sign up is not allowed for this email\"],\n }],\n }],\n }],\n signUpRulesDefaultAction: [\"allow\", \"reject\"],\n }],\n dbSync: [{\n externalDatabases: [{\n \"some-external-db-id\": [{\n type: [\"postgres\"] as const,\n connectionString: [\n \"postgres://user:password@host:port/database\",\n \"some-connection-string\",\n ],\n }],\n }],\n }],\n dataVault: [{\n stores: [{\n \"some-store-id\": [{\n displayName: [\"Some Store\", \"Some Other Store\"],\n }],\n \"some-other-store-id\": [{\n displayName: [\"Some Store\", \"Some Other Store\"],\n }],\n }],\n }],\n payments: [{\n blockNewPurchases: [false, true],\n autoPay: [{\n interval: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n }],\n productLines: [{\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\n customerType: [\"user\", \"team\", \"custom\"] as const,\n }],\n }],\n catalogs: [{ // ensure migration works\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\n }],\n }],\n groups: [{ // ensure migration works\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\n }],\n }],\n items: [{\n \"some-item-id\": [{\n customerType: [\"user\", \"team\", \"custom\"] as const,\n displayName: [\"Some Item\", \"Some Other Item\"],\n }],\n }],\n products: [{\n \"some-product-id\": [{\n displayName: [\"Some Product\", \"Some Other Product\"],\n customerType: [\"user\", \"team\", \"custom\"] as const,\n freeTrial: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n serverOnly: [true, false],\n stackable: [true, false],\n productLineId: [\"some-product-line-id\", \"some-other-product-line-id\"],\n catalogId: [\"some-product-line-id\", \"some-other-product-line-id\"], // ensure migration works\n groupId: [\"some-product-line-id\", \"some-other-product-line-id\"], // ensure migration works\n isAddOnTo: [false, { \"some-product-id\": [true], \"some-other-product-id\": [true] }] as const,\n prices: [{\n \"some-price-id\": [{\n ...typedFromEntries(SUPPORTED_CURRENCIES.map(currency => [currency.code, [\"100_00\", \"not a number\", \"Infinity\", \"0\"]])),\n interval: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n serverOnly: [true, false],\n freeTrial: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n }],\n }],\n includedItems: [{\n \"some-item-id\": [{\n quantity: [0, 1, -3, 100, 0.333, Infinity],\n repeat: [\"never\", [[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n expires: [\"never\", \"when-purchase-expires\", \"when-repeated\"] as const,\n }],\n }],\n }],\n }],\n }],\n emails: [{\n themes: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n displayName: [\"Some Theme\", \"Some Other Theme\"],\n tsxSource: [\"\", \"some typescript source code\"],\n }],\n }],\n selectedThemeId: [\"some-theme-id\", \"some-other-theme-id\"],\n templates: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n themeId: [\"some-theme-id\", \"some-other-theme-id\"],\n displayName: [\"Some Template\", \"Some Other Template\"],\n tsxSource: [\"\", \"some typescript source code\"],\n }],\n }],\n }],\n teams: [{\n createPersonalTeamOnSignUp: [true, false],\n allowClientTeamCreation: [true, false],\n }],\n users: [{\n allowClientUserDeletion: [true, false],\n }],\n rbac: [{\n permissions: [{\n \"some_permission_id\": [{\n containedPermissionIds: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n description: [\"Some Permission\", \"Some Other Permission\"],\n scope: [\"team\", \"project\"] as const,\n }],\n }],\n defaultPermissions: [{\n teamCreator: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n teamMember: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n signUp: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n }],\n }],\n domains: [{}],\n apps: [{\n installed: [typedFromEntries(typedEntries(ALL_APPS).map(([key, value]) => [key, [{\n enabled: [true, false],\n }]]))],\n }],\n onboarding: [{\n requireEmailVerification: [true, false],\n }],\n}] satisfies FuzzerConfig<BranchConfigNormalizedOverride>;\n\nconst environmentSchemaFuzzerConfig = [{\n ...branchSchemaFuzzerConfig[0],\n auth: [{\n ...branchSchemaFuzzerConfig[0].auth[0],\n oauth: [{\n ...branchSchemaFuzzerConfig[0].auth[0].oauth[0],\n providers: [typedFromEntries(typedEntries(branchSchemaFuzzerConfig[0].auth[0].oauth[0].providers[0]).map(([key, value]) => [key, [{\n ...value[0],\n isShared: [true, false],\n clientId: [\"some-client-id\"],\n clientSecret: [\"some-client-secret\"],\n // Kept undefined: the schema forbids customCallbackUrl when isShared is\n // true, and the fuzzer randomizes each field independently so it cannot\n // honor that coupling. The accept path is covered by an e2e test.\n customCallbackUrl: [undefined] as (string | undefined)[],\n facebookConfigId: [\"some-facebook-config-id\"],\n microsoftTenantId: [\"some-microsoft-tenant-id\"],\n appleBundles: [{ \"some-bundle-id\": [{ bundleId: [\"com.example.app\"] }] }],\n }]]))] as const,\n }],\n }],\n domains: [{\n allowLocalhost: [true, false],\n trustedDomains: [{\n \"some-domain-id\": [{\n baseUrl: [\"https://example.com/something-here\"],\n handlerPath: [\"/something-here\"],\n }],\n }],\n }],\n emails: [{\n ...branchSchemaFuzzerConfig[0].emails[0],\n server: [{\n isShared: [true, false],\n provider: [\"resend\", \"smtp\", \"managed\"] as const,\n host: [\"example.com\", \"://super weird host that's not valid\"],\n port: [1234, 0.12543, -100, Infinity],\n username: [\"some-username\", \"some username with a space\"],\n password: [\"some-password\", \"some password with a space\"],\n senderName: [\"Some Sender\"],\n senderEmail: [\"some-sender@example.com\", \"some invalid email\"],\n managedSubdomain: [\"mail.example.com\", \"invalid subdomain\"],\n managedSenderLocalPart: [\"noreply\", \"some invalid local part\"],\n }],\n }],\n payments: [{\n ...branchSchemaFuzzerConfig[0].payments[0],\n testMode: [false, true],\n }],\n analytics: [{\n queryFolders: [{\n \"some-folder-id\": [{\n displayName: [\"Some Folder\", \"Some Other Folder\"],\n sortOrder: [0, 1, 10, -5],\n queries: [{\n \"some-query-id\": [{\n displayName: [\"Some Query\", \"Some Other Query\"],\n sqlQuery: [\"\", \"SELECT * FROM events\", \"SELECT * FROM users\"],\n description: [\"\", \"A query description\", \"Another description\"],\n }],\n }],\n }],\n }],\n }],\n customDashboards: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n displayName: [\"My Dashboard\", \"User Growth Dashboard\"],\n tsxSource: [\"\", \"function Dashboard() { return <div>Hello</div>; }\"],\n }],\n }],\n}] satisfies FuzzerConfig<EnvironmentConfigNormalizedOverride>;\n\nconst organizationSchemaFuzzerConfig = environmentSchemaFuzzerConfig satisfies FuzzerConfig<OrganizationConfigNormalizedOverride>;\n\nfunction setDeep<T>(obj: T, path: string[], value: any) {\n if (!isObjectLike(obj)) return obj;\n\n if (path.length === 0) {\n throw new Error(\"Path is empty\");\n } else if (path.length === 1) {\n set(obj as any, path[0], value);\n } else {\n const [key, ...rest] = path;\n setDeep(getOrUndefined(obj as any, key), rest, value);\n }\n}\n\nfunction createFuzzerInput<T>(config: FuzzerConfig<T>, progress: number): T {\n progress = Math.min(1, 2 * progress);\n const createShouldRandom = (strength: number) => {\n const chance = Math.random() * strength * 1.2 - 0.1;\n return () => Math.random() < chance;\n };\n const createShouldObjectDependent = (strength: number) => {\n const objectChance = Math.random() * strength * 1.2 - 0.1;\n const primitiveChance = Math.random() * strength * 1.2 - 0.1;\n return (v: any) => Math.random() * Math.random() < (isObjectLike(v) ? objectChance : primitiveChance);\n };\n\n const shouldKeep = createShouldObjectDependent(progress * 1);\n const shouldMakeNested = createShouldObjectDependent(1.25);\n const shouldNull = createShouldRandom(0.25);\n\n let res: any;\n const recurse = <U>(outputPath: string[], config: FuzzerConfig<U>, forceNested: boolean, forceNonNull: boolean) => {\n let subConfig: any = config[Math.floor(Math.random() * config.length)];\n const originalValue = isObjectLike(subConfig) ? (Array.isArray(subConfig) ? [] : {}) : subConfig;\n\n const newValue = forceNonNull || !shouldNull() ? originalValue : null;\n const newOutputPath = forceNested || shouldMakeNested(originalValue) || outputPath.length === 0 ? outputPath : [outputPath.join(\".\")];\n if (outputPath.length === 0) {\n res = newValue;\n } else {\n if (forceNested || shouldKeep(originalValue)) {\n setDeep(res, newOutputPath, newValue);\n }\n }\n if (isObjectLike(subConfig)) {\n for (const [key, newValue] of typedEntries(subConfig)) {\n recurse([...newOutputPath, key], newValue, Array.isArray(subConfig), Array.isArray(subConfig));\n }\n }\n };\n recurse<T>([], config, false, true);\n return res;\n}\n\nimport.meta.vitest?.test(\"fuzz schemas\", async ({ expect }) => {\n const totalIterations = process.env.CI ? 1000 : 200;\n for (let i = 0; i < totalIterations; i++) {\n const projectInput = createFuzzerInput<ProjectConfigNormalizedOverride>(projectSchemaFuzzerConfig, i / totalIterations);\n const branchInput = createFuzzerInput<BranchConfigNormalizedOverride>(branchSchemaFuzzerConfig, i / totalIterations);\n const environmentInput = createFuzzerInput<EnvironmentConfigNormalizedOverride>(environmentSchemaFuzzerConfig, i / totalIterations);\n const organizationInput = createFuzzerInput<OrganizationConfigNormalizedOverride>(organizationSchemaFuzzerConfig, i / totalIterations);\n\n try {\n const projectMigrated = migrateConfigOverride(\"project\", projectInput);\n await assertNoConfigOverrideErrors(projectConfigSchema, projectMigrated);\n const projectOverridden = override({}, projectMigrated);\n await sanitizeProjectConfig(normalize(applyProjectDefaults(projectOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const branchMigrated = migrateConfigOverride(\"branch\", branchInput);\n await assertNoConfigOverrideErrors(branchConfigSchema, branchMigrated);\n const branchOverridden = override(projectOverridden, branchMigrated);\n await sanitizeBranchConfig(normalize(applyBranchDefaults(branchOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const environmentMigrated = migrateConfigOverride(\"environment\", environmentInput);\n await assertNoConfigOverrideErrors(environmentConfigSchema, environmentMigrated);\n const environmentOverridden = override(branchOverridden, environmentMigrated);\n await sanitizeEnvironmentConfig(normalize(applyEnvironmentDefaults(environmentOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const organizationMigrated = migrateConfigOverride(\"organization\", organizationInput);\n await assertNoConfigOverrideErrors(organizationConfigSchema, organizationMigrated);\n const organizationOverridden = override(environmentOverridden, organizationMigrated);\n await sanitizeOrganizationConfig(normalize(applyOrganizationDefaults(organizationOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n } catch (e) {\n const data = {\n cause: e,\n inputs: {\n projectInput,\n branchInput,\n environmentInput,\n organizationInput,\n },\n } as const;\n console.error(\"Failed to fuzz schema in iteration ${i}/${totalIterations}!\", nicify(data));\n throw new HexclaveAssertionError(`Error in iteration ${i}/${totalIterations} of schema fuzz: ${e}`, { cause: e });\n }\n }\n});\n\nimport.meta.vitest?.test(\"rejects include-by-default product prices in config overrides\", async ({ expect }) => {\n await expect(assertNoConfigOverrideErrors(branchConfigSchema, {\n \"payments.products.free.prices\": \"include-by-default\",\n })).rejects.toThrow(/payments\\.products\\.free\\.prices must not be one of the following values: include-by-default/);\n});\n"],"mappings":";;;;;;;;;;AAYA,MAAM,4BAA4B,CAAC;CACjC,eAAe,CAAC,EACd,MAAM,CAAC,SAAS,EACjB,CAAC;CACF,SAAS,CAAC,EACR,6BAA6B,CAAC,MAAM,MAAM,EAC3C,CAAC;CACH,CAAC;AAEF,MAAM,2BAA2B,CAAC;CAChC,SAAS,CAAC,EACR,SAAS,CAAC;EACR,MAAM,CAAC,MAAM,MAAM;EACnB,MAAM,CAAC,MAAM,MAAM;EACpB,CAAC,EACH,CAAC;CACF,MAAM,CAAC;EACL,aAAa,CAAC,MAAM,MAAM;EAC1B,UAAU,CAAC,EACT,aAAa,CAAC,MAAM,MAAM,EAC3B,CAAC;EACF,KAAK,CAAC,EACJ,aAAa,CAAC,MAAM,MAAM,EAC3B,CAAC;EACF,SAAS,CAAC,EACR,aAAa,CAAC,MAAM,MAAM,EAC3B,CAAC;EACF,OAAO,CAAC;GACN,sBAAsB;IAAC;IAAe;IAAe;IAAmB;GACxE,WAAW,CAAC,EACV,UAAU,CAAC;IACT,MAAM;KAAC;KAAU;KAAU;KAAI;IAC/B,aAAa,CAAC,MAAM,MAAM;IAC1B,wBAAwB,CAAC,MAAM,MAAM;IACtC,CAAC,EACH,CAAC;GACH,CAAC;EACF,aAAa,CAAC,EACZ,gBAAgB,CAAC;GACf,SAAS,CAAC,MAAM,MAAM;GACtB,aAAa,CAAC,qBAAqB,4BAA4B;GAC/D,UAAU;IAAC;IAAG;IAAG;IAAI;GACrB,WAAW,CAAC,iCAA+B,iCAA+B;GAC1E,QAAQ,CAAC;IACP,MAAM;KAAC;KAAS;KAAU;KAAY;KAAM;IAC5C,SAAS,CAAC,IAAI,wCAAwC;IACvD,CAAC;GACH,CAAC,EACH,CAAC;EACF,0BAA0B,CAAC,SAAS,SAAS;EAC9C,CAAC;CACF,QAAQ,CAAC,EACP,mBAAmB,CAAC,EAClB,uBAAuB,CAAC;EAC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