@hexclave/shared 1.0.41 → 1.0.42
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/admin-interface-Y9EZqwD6.d.ts +379 -0
- package/dist/admin-interface-Y9EZqwD6.d.ts.map +1 -0
- package/dist/admin-metrics-bsOkw4YQ.d.ts +807 -0
- package/dist/admin-metrics-bsOkw4YQ.d.ts.map +1 -0
- package/dist/ai/image-limits.d.ts.map +1 -1
- package/dist/ai/image-limits.js +6 -7
- package/dist/ai/image-limits.js.map +1 -1
- package/dist/ai/llms/llms.d.ts.map +1 -1
- package/dist/ai/llms/llms.js +2 -4
- package/dist/ai/llms/llms.js.map +1 -1
- package/dist/ai/unified-prompts/reminders.js +3 -6
- package/dist/ai/unified-prompts/reminders.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +2 -5
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.js +3 -6
- package/dist/ai/unified-prompts/skill-site-prompt-parts/brain.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.js +3 -6
- package/dist/ai/unified-prompts/skill-site-prompt-parts/cli-help.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.js +3 -6
- package/dist/ai/unified-prompts/skill-site-prompt-parts/config-docs.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js +3 -6
- package/dist/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js +3 -6
- package/dist/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +5 -6
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +1 -2
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +3 -6
- package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js +3 -6
- package/dist/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt.js +2 -4
- package/dist/ai/unified-prompts/skill-site-prompt.js.map +1 -1
- package/dist/analytics-IjkAsefy.d.ts +14 -0
- package/dist/analytics-IjkAsefy.d.ts.map +1 -0
- package/dist/apps/apps-config.d.ts.map +1 -1
- package/dist/apps/apps-config.js +2 -3
- package/dist/apps/apps-config.js.map +1 -1
- package/dist/apps/apps-ui.d.ts +1 -2
- package/dist/apps/apps-ui.d.ts.map +1 -1
- package/dist/apps/apps-ui.js +4 -5
- package/dist/apps/apps-ui.js.map +1 -1
- package/dist/client-interface-iIw4nU5k.d.ts +447 -0
- package/dist/client-interface-iIw4nU5k.d.ts.map +1 -0
- package/dist/config/db-sync-mappings.js +2 -3
- package/dist/config/db-sync-mappings.js.map +1 -1
- package/dist/config/format.d.ts +2 -61
- package/dist/config/format.js +2 -192
- package/dist/config/format.js.map +1 -1
- package/dist/config/migrate-catalogs-to-product-lines.d.ts.map +1 -1
- package/dist/config/migrate-catalogs-to-product-lines.js +2 -196
- package/dist/config/migrate-catalogs-to-product-lines.js.map +1 -1
- package/dist/config/schema-fuzzer.test.js +18 -172
- package/dist/config/schema-fuzzer.test.js.map +1 -1
- package/dist/config/schema.d.ts +2 -2328
- package/dist/config/schema.js +6 -351
- package/dist/config/schema.js.map +1 -1
- package/dist/config-authoring.d.ts +1 -1
- package/dist/config-authoring.d.ts.map +1 -1
- package/dist/config-authoring.js +2 -3
- package/dist/config-authoring.js.map +1 -1
- package/dist/config-authoring.test.js +1 -3
- package/dist/config-authoring.test.js.map +1 -1
- package/dist/config-eval.d.ts.map +1 -1
- package/dist/config-eval.js +4 -46
- package/dist/config-eval.js.map +1 -1
- package/dist/config-rendering.d.ts.map +1 -1
- package/dist/config-rendering.js +2 -48
- package/dist/config-rendering.js.map +1 -1
- package/dist/connected-accounts-D5CKe50A.d.ts +67 -0
- package/dist/connected-accounts-D5CKe50A.d.ts.map +1 -0
- package/dist/contact-channels-DW8yQxlc.d.ts +180 -0
- package/dist/contact-channels-DW8yQxlc.d.ts.map +1 -0
- package/dist/country-codes-CRWDroBE.d.ts +11 -0
- package/dist/country-codes-CRWDroBE.d.ts.map +1 -0
- package/dist/crud-CqmEW9s6.d.ts +98 -0
- package/dist/crud-CqmEW9s6.d.ts.map +1 -0
- package/dist/crud.d.ts +2 -98
- package/dist/crud.js +3 -71
- package/dist/crud.js.map +1 -1
- package/dist/currency-constants-Cq_q8twn.d.ts +45 -0
- package/dist/currency-constants-Cq_q8twn.d.ts.map +1 -0
- package/dist/current-user-BBoN3hsn.d.ts +284 -0
- package/dist/current-user-BBoN3hsn.d.ts.map +1 -0
- package/dist/dates-B6ne9iOR.d.ts +23 -0
- package/dist/dates-B6ne9iOR.d.ts.map +1 -0
- package/dist/email-outbox-B1wmVPRG.d.ts +1464 -0
- package/dist/{interface/crud/email-outbox.d.ts.map → email-outbox-B1wmVPRG.d.ts.map} +1 -1
- package/dist/emails-Ba4yEaCS.d.ts +40 -0
- package/dist/emails-Ba4yEaCS.d.ts.map +1 -0
- package/dist/errors-Cl-RUyed.d.ts +238 -0
- package/dist/errors-Cl-RUyed.d.ts.map +1 -0
- package/dist/esm/ai/image-limits.d.ts.map +1 -1
- package/dist/esm/ai/image-limits.js +5 -5
- package/dist/esm/ai/image-limits.js.map +1 -1
- package/dist/esm/ai/llms/llms.d.ts +1 -1
- package/dist/esm/ai/llms/llms.d.ts.map +1 -1
- package/dist/esm/ai/llms/llms.js +1 -2
- package/dist/esm/ai/llms/llms.js.map +1 -1
- package/dist/esm/ai/unified-prompts/reminders.js +2 -3
- package/dist/esm/ai/unified-prompts/reminders.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +25 -28
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.js +1 -2
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/brain.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.js +1 -2
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/cli-help.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.js +1 -2
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/config-docs.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js +1 -2
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js +1 -2
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +2 -3
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +1 -2
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js +1 -2
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt.js +1 -2
- package/dist/esm/ai/unified-prompts/skill-site-prompt.js.map +1 -1
- package/dist/esm/apps/apps-config.d.ts.map +1 -1
- package/dist/esm/apps/apps-config.js +1 -1
- package/dist/esm/apps/apps-config.js.map +1 -1
- package/dist/esm/apps/apps-ui.d.ts +2 -3
- package/dist/esm/apps/apps-ui.d.ts.map +1 -1
- package/dist/esm/apps/apps-ui.js +2 -3
- package/dist/esm/apps/apps-ui.js.map +1 -1
- package/dist/esm/config/db-sync-mappings.js +1 -1
- package/dist/esm/config/db-sync-mappings.js.map +1 -1
- package/dist/esm/config/format.d.ts +1 -1
- package/dist/esm/config/format.d.ts.map +1 -1
- package/dist/esm/config/format.js +1 -190
- package/dist/esm/config/format.js.map +1 -1
- package/dist/esm/config/migrate-catalogs-to-product-lines.d.ts.map +1 -1
- package/dist/esm/config/migrate-catalogs-to-product-lines.js +1 -194
- package/dist/esm/config/migrate-catalogs-to-product-lines.js.map +1 -1
- package/dist/esm/config/schema-fuzzer.test.js +20 -173
- package/dist/esm/config/schema-fuzzer.test.js.map +1 -1
- package/dist/esm/config/schema.d.ts +227 -228
- package/dist/esm/config/schema.d.ts.map +1 -1
- package/dist/esm/config/schema.js +2 -347
- package/dist/esm/config/schema.js.map +1 -1
- package/dist/esm/config-authoring.d.ts +1 -1
- package/dist/esm/config-authoring.d.ts.map +1 -1
- package/dist/esm/config-authoring.js +1 -1
- package/dist/esm/config-authoring.js.map +1 -1
- package/dist/esm/config-authoring.test.js +2 -3
- package/dist/esm/config-authoring.test.js.map +1 -1
- package/dist/esm/config-eval.d.ts +1 -1
- package/dist/esm/config-eval.d.ts.map +1 -1
- package/dist/esm/config-eval.js +1 -43
- package/dist/esm/config-eval.js.map +1 -1
- package/dist/esm/config-rendering.d.ts.map +1 -1
- package/dist/esm/config-rendering.js +1 -46
- package/dist/esm/config-rendering.js.map +1 -1
- package/dist/esm/crud.d.ts +1 -1
- package/dist/esm/crud.d.ts.map +1 -1
- package/dist/esm/crud.js +2 -69
- package/dist/esm/crud.js.map +1 -1
- package/dist/esm/helpers/emails.js +1 -2
- package/dist/esm/helpers/emails.js.map +1 -1
- package/dist/esm/helpers/init-prompt.d.ts.map +1 -1
- package/dist/esm/helpers/init-prompt.js +1 -2
- package/dist/esm/helpers/init-prompt.js.map +1 -1
- package/dist/esm/helpers/password.d.ts +1 -1
- package/dist/esm/helpers/password.d.ts.map +1 -1
- package/dist/esm/helpers/password.js +1 -2
- package/dist/esm/helpers/password.js.map +1 -1
- package/dist/esm/helpers/production-mode.d.ts +1 -1
- package/dist/esm/helpers/production-mode.d.ts.map +1 -1
- package/dist/esm/helpers/production-mode.js +1 -2
- package/dist/esm/helpers/production-mode.js.map +1 -1
- package/dist/esm/helpers/support-sla.d.ts.map +1 -1
- package/dist/esm/helpers/support-sla.js +1 -1
- package/dist/esm/helpers/support-sla.js.map +1 -1
- package/dist/esm/helpers/support-sla.test.js +2 -3
- package/dist/esm/helpers/support-sla.test.js.map +1 -1
- package/dist/esm/helpers/vault/client-side.d.ts.map +1 -1
- package/dist/esm/helpers/vault/client-side.js +1 -20
- package/dist/esm/helpers/vault/client-side.js.map +1 -1
- package/dist/esm/helpers/vault/server-side.js +1 -2
- package/dist/esm/helpers/vault/server-side.js.map +1 -1
- package/dist/esm/hooks/use-async-callback.d.ts.map +1 -1
- package/dist/esm/hooks/use-async-callback.js +1 -2
- package/dist/esm/hooks/use-async-callback.js.map +1 -1
- package/dist/esm/hooks/use-async-external-store.d.ts +1 -1
- package/dist/esm/hooks/use-async-external-store.d.ts.map +1 -1
- package/dist/esm/hooks/use-async-external-store.js +1 -2
- package/dist/esm/hooks/use-async-external-store.js.map +1 -1
- package/dist/esm/hooks/use-hash.js +1 -2
- package/dist/esm/hooks/use-hash.js.map +1 -1
- package/dist/esm/hooks/use-hover.d.ts.map +1 -1
- package/dist/esm/hooks/use-hover.js +1 -2
- package/dist/esm/hooks/use-hover.js.map +1 -1
- package/dist/esm/hooks/use-strict-memo.d.ts.map +1 -1
- package/dist/esm/hooks/use-strict-memo.js +1 -70
- package/dist/esm/hooks/use-strict-memo.js.map +1 -1
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.js +1 -2
- package/dist/esm/interface/admin-interface.d.ts +19 -19
- package/dist/esm/interface/admin-interface.d.ts.map +1 -1
- package/dist/esm/interface/admin-interface.js +2 -3
- package/dist/esm/interface/admin-interface.js.map +1 -1
- package/dist/esm/interface/admin-metrics.d.ts +10 -10
- package/dist/esm/interface/admin-metrics.d.ts.map +1 -1
- package/dist/esm/interface/admin-metrics.js +1 -2
- package/dist/esm/interface/admin-metrics.js.map +1 -1
- package/dist/esm/interface/client-interface.d.ts +22 -22
- package/dist/esm/interface/client-interface.d.ts.map +1 -1
- package/dist/esm/interface/client-interface.js +32 -16
- package/dist/esm/interface/client-interface.js.map +1 -1
- package/dist/esm/interface/client-interface.test.js +84 -13
- package/dist/esm/interface/client-interface.test.js.map +1 -1
- package/dist/esm/interface/conversations.d.ts +8 -8
- package/dist/esm/interface/conversations.d.ts.map +1 -1
- package/dist/esm/interface/conversations.js +1 -2
- package/dist/esm/interface/conversations.js.map +1 -1
- package/dist/esm/interface/crud/analytics.d.ts.map +1 -1
- package/dist/esm/interface/crud/analytics.js +1 -1
- package/dist/esm/interface/crud/connected-accounts.d.ts +15 -17
- package/dist/esm/interface/crud/connected-accounts.d.ts.map +1 -1
- package/dist/esm/interface/crud/connected-accounts.js +1 -2
- package/dist/esm/interface/crud/connected-accounts.js.map +1 -1
- package/dist/esm/interface/crud/contact-channels.d.ts +24 -26
- package/dist/esm/interface/crud/contact-channels.d.ts.map +1 -1
- package/dist/esm/interface/crud/contact-channels.js +1 -2
- package/dist/esm/interface/crud/contact-channels.js.map +1 -1
- package/dist/esm/interface/crud/current-user.d.ts +22 -24
- package/dist/esm/interface/crud/current-user.d.ts.map +1 -1
- package/dist/esm/interface/crud/current-user.js +25 -29
- package/dist/esm/interface/crud/current-user.js.map +1 -1
- package/dist/esm/interface/crud/email-outbox.d.ts +30 -32
- package/dist/esm/interface/crud/email-outbox.d.ts.map +1 -1
- package/dist/esm/interface/crud/email-outbox.js +1 -2
- package/dist/esm/interface/crud/email-outbox.js.map +1 -1
- package/dist/esm/interface/crud/email-templates.d.ts +16 -18
- package/dist/esm/interface/crud/email-templates.d.ts.map +1 -1
- package/dist/esm/interface/crud/email-templates.js +1 -2
- package/dist/esm/interface/crud/email-templates.js.map +1 -1
- package/dist/esm/interface/crud/emails.d.ts +6 -8
- package/dist/esm/interface/crud/emails.d.ts.map +1 -1
- package/dist/esm/interface/crud/emails.js +1 -2
- package/dist/esm/interface/crud/emails.js.map +1 -1
- package/dist/esm/interface/crud/internal-api-keys.d.ts +16 -18
- package/dist/esm/interface/crud/internal-api-keys.d.ts.map +1 -1
- package/dist/esm/interface/crud/internal-api-keys.js +1 -2
- package/dist/esm/interface/crud/internal-api-keys.js.map +1 -1
- package/dist/esm/interface/crud/invoices.d.ts.map +1 -1
- package/dist/esm/interface/crud/invoices.js +1 -2
- package/dist/esm/interface/crud/invoices.js.map +1 -1
- package/dist/esm/interface/crud/items.d.ts +6 -8
- package/dist/esm/interface/crud/items.d.ts.map +1 -1
- package/dist/esm/interface/crud/items.js +12 -16
- package/dist/esm/interface/crud/items.js.map +1 -1
- package/dist/esm/interface/crud/notification-preferences.d.ts +6 -8
- package/dist/esm/interface/crud/notification-preferences.d.ts.map +1 -1
- package/dist/esm/interface/crud/notification-preferences.js +8 -12
- package/dist/esm/interface/crud/notification-preferences.js.map +1 -1
- package/dist/esm/interface/crud/oauth-providers.d.ts +24 -26
- package/dist/esm/interface/crud/oauth-providers.d.ts.map +1 -1
- package/dist/esm/interface/crud/oauth-providers.js +1 -2
- package/dist/esm/interface/crud/oauth-providers.js.map +1 -1
- package/dist/esm/interface/crud/products.d.ts +21 -22
- package/dist/esm/interface/crud/products.d.ts.map +1 -1
- package/dist/esm/interface/crud/products.js +3 -2
- package/dist/esm/interface/crud/products.js.map +1 -1
- package/dist/esm/interface/crud/project-api-keys.d.ts +5 -6
- package/dist/esm/interface/crud/project-api-keys.d.ts.map +1 -1
- package/dist/esm/interface/crud/project-api-keys.js +1 -2
- package/dist/esm/interface/crud/project-api-keys.js.map +1 -1
- package/dist/esm/interface/crud/project-permissions.d.ts +29 -31
- package/dist/esm/interface/crud/project-permissions.d.ts.map +1 -1
- package/dist/esm/interface/crud/project-permissions.js +1 -2
- package/dist/esm/interface/crud/project-permissions.js.map +1 -1
- package/dist/esm/interface/crud/projects.d.ts +63 -65
- package/dist/esm/interface/crud/projects.d.ts.map +1 -1
- package/dist/esm/interface/crud/projects.js +3 -2
- package/dist/esm/interface/crud/projects.js.map +1 -1
- package/dist/esm/interface/crud/session-replays.d.ts.map +1 -1
- package/dist/esm/interface/crud/session-replays.js +1 -1
- package/dist/esm/interface/crud/sessions.d.ts +15 -17
- package/dist/esm/interface/crud/sessions.d.ts.map +1 -1
- package/dist/esm/interface/crud/sessions.js +1 -2
- package/dist/esm/interface/crud/sessions.js.map +1 -1
- package/dist/esm/interface/crud/sign-up-rules.d.ts.map +1 -1
- package/dist/esm/interface/crud/sign-up-rules.js +1 -1
- package/dist/esm/interface/crud/svix-token.d.ts +8 -10
- package/dist/esm/interface/crud/svix-token.d.ts.map +1 -1
- package/dist/esm/interface/crud/svix-token.js +1 -2
- package/dist/esm/interface/crud/svix-token.js.map +1 -1
- package/dist/esm/interface/crud/team-invitation-details.d.ts +6 -8
- package/dist/esm/interface/crud/team-invitation-details.d.ts.map +1 -1
- package/dist/esm/interface/crud/team-invitation-details.js +1 -2
- package/dist/esm/interface/crud/team-invitation-details.js.map +1 -1
- package/dist/esm/interface/crud/team-invitation.d.ts +7 -9
- package/dist/esm/interface/crud/team-invitation.d.ts.map +1 -1
- package/dist/esm/interface/crud/team-invitation.js +1 -2
- package/dist/esm/interface/crud/team-invitation.js.map +1 -1
- package/dist/esm/interface/crud/team-member-profiles.d.ts +36 -38
- package/dist/esm/interface/crud/team-member-profiles.d.ts.map +1 -1
- package/dist/esm/interface/crud/team-member-profiles.js +1 -2
- package/dist/esm/interface/crud/team-member-profiles.js.map +1 -1
- package/dist/esm/interface/crud/team-memberships.d.ts +14 -16
- package/dist/esm/interface/crud/team-memberships.d.ts.map +1 -1
- package/dist/esm/interface/crud/team-memberships.js +1 -2
- package/dist/esm/interface/crud/team-memberships.js.map +1 -1
- package/dist/esm/interface/crud/team-permissions.d.ts +29 -31
- package/dist/esm/interface/crud/team-permissions.d.ts.map +1 -1
- package/dist/esm/interface/crud/team-permissions.js +1 -2
- package/dist/esm/interface/crud/team-permissions.js.map +1 -1
- package/dist/esm/interface/crud/teams.d.ts +36 -38
- package/dist/esm/interface/crud/teams.d.ts.map +1 -1
- package/dist/esm/interface/crud/teams.js +2 -4
- package/dist/esm/interface/crud/teams.js.map +1 -1
- package/dist/esm/interface/crud/transactions.d.ts +14 -16
- package/dist/esm/interface/crud/transactions.d.ts.map +1 -1
- package/dist/esm/interface/crud/transactions.js +7 -13
- package/dist/esm/interface/crud/transactions.js.map +1 -1
- package/dist/esm/interface/crud/users.d.ts +21 -22
- package/dist/esm/interface/crud/users.d.ts.map +1 -1
- package/dist/esm/interface/crud/users.js +9 -5
- package/dist/esm/interface/crud/users.js.map +1 -1
- package/dist/esm/interface/handler-urls.d.ts +1 -1
- package/dist/esm/interface/handler-urls.d.ts.map +1 -1
- package/dist/esm/interface/handler-urls.js +1 -2
- package/dist/esm/interface/page-component-versions.d.ts +1 -1
- package/dist/esm/interface/page-component-versions.d.ts.map +1 -1
- package/dist/esm/interface/page-component-versions.js +1 -2
- package/dist/esm/interface/page-component-versions.js.map +1 -1
- package/dist/esm/interface/plan-usage.d.ts +1 -1
- package/dist/esm/interface/plan-usage.d.ts.map +1 -1
- package/dist/esm/interface/plan-usage.js +1 -2
- package/dist/esm/interface/plan-usage.js.map +1 -1
- package/dist/esm/interface/server-interface.d.ts +19 -19
- package/dist/esm/interface/server-interface.d.ts.map +1 -1
- package/dist/esm/interface/server-interface.js +2 -3
- package/dist/esm/interface/server-interface.js.map +1 -1
- package/dist/esm/interface/webhooks.d.ts +4 -4
- package/dist/esm/interface/webhooks.d.ts.map +1 -1
- package/dist/esm/interface/webhooks.js +1 -2
- package/dist/esm/interface/webhooks.js.map +1 -1
- package/dist/esm/known-errors.d.ts +2 -2
- package/dist/esm/known-errors.d.ts.map +1 -1
- package/dist/esm/known-errors.js +10 -21
- package/dist/esm/known-errors.js.map +1 -1
- package/dist/esm/payments/payment-methods.d.ts.map +1 -1
- package/dist/esm/payments/payment-methods.js +1 -1
- package/dist/esm/payments/payment-methods.js.map +1 -1
- package/dist/esm/payments/stripe-limits.d.ts.map +1 -1
- package/dist/esm/payments/stripe-limits.js +1 -1
- package/dist/esm/payments/stripe-limits.js.map +1 -1
- package/dist/esm/plans.d.ts.map +1 -1
- package/dist/esm/plans.js +1 -1
- package/dist/esm/plans.js.map +1 -1
- package/dist/esm/schema-fields.d.ts +14 -14
- package/dist/esm/schema-fields.d.ts.map +1 -1
- package/dist/esm/schema-fields.js +3 -64
- package/dist/esm/schema-fields.js.map +1 -1
- package/dist/esm/sessions.d.ts +6 -6
- package/dist/esm/sessions.d.ts.map +1 -1
- package/dist/esm/sessions.js +1 -2
- package/dist/esm/sessions.js.map +1 -1
- package/dist/esm/sessions.test.js +2 -3
- package/dist/esm/sessions.test.js.map +1 -1
- package/dist/esm/utils/analytics-clickmap-overlay.d.ts.map +1 -1
- package/dist/esm/utils/analytics-clickmap-overlay.js +1 -1
- package/dist/esm/utils/api-keys.d.ts.map +1 -1
- package/dist/esm/utils/api-keys.js +1 -2
- package/dist/esm/utils/api-keys.js.map +1 -1
- package/dist/esm/utils/arrays.d.ts.map +1 -1
- package/dist/esm/utils/arrays.js +1 -470
- package/dist/esm/utils/arrays.js.map +1 -1
- package/dist/esm/utils/auth-methods.d.ts.map +1 -1
- package/dist/esm/utils/auth-methods.js +1 -1
- package/dist/esm/utils/auth-methods.js.map +1 -1
- package/dist/esm/utils/base64.d.ts.map +1 -1
- package/dist/esm/utils/base64.js +1 -10
- package/dist/esm/utils/base64.js.map +1 -1
- package/dist/esm/utils/booleans.d.ts.map +1 -1
- package/dist/esm/utils/booleans.js +1 -25
- package/dist/esm/utils/booleans.js.map +1 -1
- package/dist/esm/utils/browser-compat.d.ts.map +1 -1
- package/dist/esm/utils/browser-compat.js +1 -1
- package/dist/esm/utils/browser-compat.js.map +1 -1
- package/dist/esm/utils/bytes.d.ts.map +1 -1
- package/dist/esm/utils/bytes.js +3 -198
- package/dist/esm/utils/bytes.js.map +1 -1
- package/dist/esm/utils/caches.d.ts +1 -1
- package/dist/esm/utils/caches.d.ts.map +1 -1
- package/dist/esm/utils/caches.js +1 -27
- package/dist/esm/utils/caches.js.map +1 -1
- package/dist/esm/utils/cel-fields.d.ts.map +1 -1
- package/dist/esm/utils/cel-fields.js +1 -2
- package/dist/esm/utils/cel-fields.js.map +1 -1
- package/dist/esm/utils/cloud-hosts.d.ts.map +1 -1
- package/dist/esm/utils/cloud-hosts.js +1 -27
- package/dist/esm/utils/cloud-hosts.js.map +1 -1
- package/dist/esm/utils/compile-time.d.ts.map +1 -1
- package/dist/esm/utils/compile-time.js +1 -1
- package/dist/esm/utils/compile-time.js.map +1 -1
- package/dist/esm/utils/country-codes.d.ts.map +1 -1
- package/dist/esm/utils/country-codes.js +1 -16
- package/dist/esm/utils/country-codes.js.map +1 -1
- package/dist/esm/utils/crypto.d.ts.map +1 -1
- package/dist/esm/utils/crypto.js +3 -113
- package/dist/esm/utils/crypto.js.map +1 -1
- package/dist/esm/utils/currencies.d.ts +1 -1
- package/dist/esm/utils/currencies.d.ts.map +1 -1
- package/dist/esm/utils/currencies.js +2 -37
- package/dist/esm/utils/currencies.js.map +1 -1
- package/dist/esm/utils/currency-constants.d.ts.map +1 -1
- package/dist/esm/utils/currency-constants.js +1 -1
- package/dist/esm/utils/currency-constants.js.map +1 -1
- package/dist/esm/utils/dates.d.ts.map +1 -1
- package/dist/esm/utils/dates.js +1 -44
- package/dist/esm/utils/dates.js.map +1 -1
- package/dist/esm/utils/dev-env-state-path.d.ts.map +1 -1
- package/dist/esm/utils/dev-env-state-path.js +1 -2
- package/dist/esm/utils/dev-env-state-path.js.map +1 -1
- package/dist/esm/utils/dev-tool.d.ts.map +1 -1
- package/dist/esm/utils/dev-tool.js +1 -1
- package/dist/esm/utils/dom.d.ts.map +1 -1
- package/dist/esm/utils/dom.js +1 -1
- package/dist/esm/utils/dom.js.map +1 -1
- package/dist/esm/utils/elements-chain.d.ts.map +1 -1
- package/dist/esm/utils/elements-chain.js +5 -50
- package/dist/esm/utils/elements-chain.js.map +1 -1
- package/dist/esm/utils/env.d.ts.map +1 -1
- package/dist/esm/utils/env.js +1 -2
- package/dist/esm/utils/env.js.map +1 -1
- package/dist/esm/utils/env.test.js +2 -3
- package/dist/esm/utils/env.test.js.map +1 -1
- package/dist/esm/utils/errors.d.ts +1 -1
- package/dist/esm/utils/errors.d.ts.map +1 -1
- package/dist/esm/utils/errors.js +1 -2
- package/dist/esm/utils/errors.js.map +1 -1
- package/dist/esm/utils/esbuild.d.ts +1 -1
- package/dist/esm/utils/esbuild.d.ts.map +1 -1
- package/dist/esm/utils/esbuild.js +2 -3
- package/dist/esm/utils/esbuild.js.map +1 -1
- package/dist/esm/utils/featurebase.d.ts.map +1 -1
- package/dist/esm/utils/featurebase.js +1 -2
- package/dist/esm/utils/featurebase.js.map +1 -1
- package/dist/esm/utils/fs.d.ts.map +1 -1
- package/dist/esm/utils/fs.js +1 -2
- package/dist/esm/utils/fs.js.map +1 -1
- package/dist/esm/utils/functions.d.ts.map +1 -1
- package/dist/esm/utils/functions.js +1 -24
- package/dist/esm/utils/functions.js.map +1 -1
- package/dist/esm/utils/geo.d.ts.map +1 -1
- package/dist/esm/utils/geo.js +1 -2
- package/dist/esm/utils/geo.js.map +1 -1
- package/dist/esm/utils/globals.d.ts.map +1 -1
- package/dist/esm/utils/globals.js +1 -1
- package/dist/esm/utils/globals.js.map +1 -1
- package/dist/esm/utils/hashes.d.ts.map +1 -1
- package/dist/esm/utils/hashes.js +1 -2
- package/dist/esm/utils/hashes.js.map +1 -1
- package/dist/esm/utils/html.d.ts.map +1 -1
- package/dist/esm/utils/html.js +1 -19
- package/dist/esm/utils/html.js.map +1 -1
- package/dist/esm/utils/http.d.ts.map +1 -1
- package/dist/esm/utils/http.js +1 -19
- package/dist/esm/utils/http.js.map +1 -1
- package/dist/esm/utils/ips.d.ts.map +1 -1
- package/dist/esm/utils/ips.js +1 -25
- package/dist/esm/utils/ips.js.map +1 -1
- package/dist/esm/utils/json.d.ts +1 -1
- package/dist/esm/utils/json.d.ts.map +1 -1
- package/dist/esm/utils/json.js +1 -155
- package/dist/esm/utils/json.js.map +1 -1
- package/dist/esm/utils/jsx-editable-transpiler.d.ts.map +1 -1
- package/dist/esm/utils/jsx-editable-transpiler.js +1 -2
- package/dist/esm/utils/jsx-editable-transpiler.js.map +1 -1
- package/dist/esm/utils/jsx-editable-transpiler.test.js +2 -3
- package/dist/esm/utils/jsx-editable-transpiler.test.js.map +1 -1
- package/dist/esm/utils/jwt.d.ts.map +1 -1
- package/dist/esm/utils/jwt.js +1 -2
- package/dist/esm/utils/jwt.js.map +1 -1
- package/dist/esm/utils/locks.d.ts.map +1 -1
- package/dist/esm/utils/locks.js +1 -2
- package/dist/esm/utils/locks.js.map +1 -1
- package/dist/esm/utils/maps.d.ts.map +1 -1
- package/dist/esm/utils/maps.js +1 -111
- package/dist/esm/utils/maps.js.map +1 -1
- package/dist/esm/utils/math.d.ts.map +1 -1
- package/dist/esm/utils/math.js +1 -11
- package/dist/esm/utils/math.js.map +1 -1
- package/dist/esm/utils/monkey-patch.d.ts.map +1 -1
- package/dist/esm/utils/monkey-patch.js +2 -3
- package/dist/esm/utils/monkey-patch.js.map +1 -1
- package/dist/esm/utils/node-http.js +1 -2
- package/dist/esm/utils/node-http.js.map +1 -1
- package/dist/esm/utils/numbers.d.ts.map +1 -1
- package/dist/esm/utils/numbers.js +1 -45
- package/dist/esm/utils/numbers.js.map +1 -1
- package/dist/esm/utils/oauth.d.ts.map +1 -1
- package/dist/esm/utils/oauth.js +1 -1
- package/dist/esm/utils/oauth.js.map +1 -1
- package/dist/esm/utils/objects.d.ts.map +1 -1
- package/dist/esm/utils/objects.js +1 -622
- package/dist/esm/utils/objects.js.map +1 -1
- package/dist/esm/utils/paginated-lists.d.ts.map +1 -1
- package/dist/esm/utils/paginated-lists.js +1 -2
- package/dist/esm/utils/paginated-lists.js.map +1 -1
- package/dist/esm/utils/paginated-lists.test.js +2 -3
- package/dist/esm/utils/paginated-lists.test.js.map +1 -1
- package/dist/esm/utils/passkey.d.ts +1 -1
- package/dist/esm/utils/passkey.js +1 -1
- package/dist/esm/utils/promises.d.ts +1 -1
- package/dist/esm/utils/promises.d.ts.map +1 -1
- package/dist/esm/utils/promises.js +2 -161
- package/dist/esm/utils/promises.js.map +1 -1
- package/dist/esm/utils/proxies.d.ts.map +1 -1
- package/dist/esm/utils/proxies.js +1 -37
- package/dist/esm/utils/proxies.js.map +1 -1
- package/dist/esm/utils/react.d.ts.map +1 -1
- package/dist/esm/utils/react.js +1 -41
- package/dist/esm/utils/react.js.map +1 -1
- package/dist/esm/utils/redirect-urls.d.ts.map +1 -1
- package/dist/esm/utils/redirect-urls.js +2 -92
- package/dist/esm/utils/redirect-urls.js.map +1 -1
- package/dist/esm/utils/regex.js +1 -1
- package/dist/esm/utils/regex.js.map +1 -1
- package/dist/esm/utils/results.d.ts.map +1 -1
- package/dist/esm/utils/results.js +1 -213
- package/dist/esm/utils/results.js.map +1 -1
- package/dist/esm/utils/sentry.js +1 -1
- package/dist/esm/utils/sentry.js.map +1 -1
- package/dist/esm/utils/stores.d.ts +3 -3
- package/dist/esm/utils/stores.d.ts.map +1 -1
- package/dist/esm/utils/stores.js +1 -2
- package/dist/esm/utils/stores.js.map +1 -1
- package/dist/esm/utils/strings.d.ts.map +1 -1
- package/dist/esm/utils/strings.js +1 -251
- package/dist/esm/utils/strings.js.map +1 -1
- package/dist/esm/utils/strings.nicify.test.js +2 -3
- package/dist/esm/utils/strings.nicify.test.js.map +1 -1
- package/dist/esm/utils/telemetry.d.ts.map +1 -1
- package/dist/esm/utils/telemetry.js +1 -2
- package/dist/esm/utils/telemetry.js.map +1 -1
- package/dist/esm/utils/turnstile-browser.d.ts +1 -1
- package/dist/esm/utils/turnstile-browser.d.ts.map +1 -1
- package/dist/esm/utils/turnstile-browser.js +1 -2
- package/dist/esm/utils/turnstile-browser.js.map +1 -1
- package/dist/esm/utils/turnstile-flow.d.ts +1 -1
- package/dist/esm/utils/turnstile-flow.d.ts.map +1 -1
- package/dist/esm/utils/turnstile-flow.js +1 -2
- package/dist/esm/utils/turnstile-flow.js.map +1 -1
- package/dist/esm/utils/turnstile-flow.test.js +2 -3
- package/dist/esm/utils/turnstile-flow.test.js.map +1 -1
- package/dist/esm/utils/turnstile.d.ts.map +1 -1
- package/dist/esm/utils/turnstile.js +1 -1
- package/dist/esm/utils/turnstile.js.map +1 -1
- package/dist/esm/utils/typed-arrays.js +1 -2
- package/dist/esm/utils/typed-arrays.js.map +1 -1
- package/dist/esm/utils/types.d.ts +1 -1
- package/dist/esm/utils/types.d.ts.map +1 -1
- package/dist/esm/utils/types.js +1 -1
- package/dist/esm/utils/types.js.map +1 -1
- package/dist/esm/utils/unicode.d.ts.map +1 -1
- package/dist/esm/utils/unicode.js +1 -13
- package/dist/esm/utils/unicode.js.map +1 -1
- package/dist/esm/utils/urls.d.ts.map +1 -1
- package/dist/esm/utils/urls.js +1 -151
- package/dist/esm/utils/urls.js.map +1 -1
- package/dist/esm/utils/uuids.d.ts.map +1 -1
- package/dist/esm/utils/uuids.js +2 -26
- package/dist/esm/utils/uuids.js.map +1 -1
- package/dist/format-4JG1MGv5.d.ts +61 -0
- package/dist/format-4JG1MGv5.d.ts.map +1 -0
- package/dist/handler-urls-BHt3v8Ai.d.ts +70 -0
- package/dist/handler-urls-BHt3v8Ai.d.ts.map +1 -0
- package/dist/helpers/emails.js +2 -4
- package/dist/helpers/emails.js.map +1 -1
- package/dist/helpers/init-prompt.d.ts.map +1 -1
- package/dist/helpers/init-prompt.js +2 -4
- package/dist/helpers/init-prompt.js.map +1 -1
- package/dist/helpers/password.d.ts +1 -1
- package/dist/helpers/password.d.ts.map +1 -1
- package/dist/helpers/password.js +2 -4
- package/dist/helpers/password.js.map +1 -1
- package/dist/helpers/production-mode.d.ts +1 -1
- package/dist/helpers/production-mode.d.ts.map +1 -1
- package/dist/helpers/production-mode.js +2 -4
- package/dist/helpers/production-mode.js.map +1 -1
- package/dist/helpers/support-sla.d.ts.map +1 -1
- package/dist/helpers/support-sla.js +2 -3
- package/dist/helpers/support-sla.js.map +1 -1
- package/dist/helpers/support-sla.test.js +1 -3
- package/dist/helpers/support-sla.test.js.map +1 -1
- package/dist/helpers/vault/client-side.d.ts.map +1 -1
- package/dist/helpers/vault/client-side.js +2 -22
- package/dist/helpers/vault/client-side.js.map +1 -1
- package/dist/helpers/vault/server-side.js +2 -4
- package/dist/helpers/vault/server-side.js.map +1 -1
- package/dist/hooks/use-async-callback.d.ts.map +1 -1
- package/dist/hooks/use-async-callback.js +4 -5
- package/dist/hooks/use-async-callback.js.map +1 -1
- package/dist/hooks/use-async-external-store.d.ts +1 -1
- package/dist/hooks/use-async-external-store.d.ts.map +1 -1
- package/dist/hooks/use-async-external-store.js +2 -4
- package/dist/hooks/use-async-external-store.js.map +1 -1
- package/dist/hooks/use-hash.js +2 -4
- package/dist/hooks/use-hash.js.map +1 -1
- package/dist/hooks/use-hover.d.ts.map +1 -1
- package/dist/hooks/use-hover.js +2 -4
- package/dist/hooks/use-hover.js.map +1 -1
- package/dist/hooks/use-strict-memo.d.ts.map +1 -1
- package/dist/hooks/use-strict-memo.js +2 -72
- package/dist/hooks/use-strict-memo.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +27 -29
- package/dist/interface/admin-interface.d.ts +3 -379
- package/dist/interface/admin-interface.js +3 -5
- package/dist/interface/admin-interface.js.map +1 -1
- package/dist/interface/admin-metrics.d.ts +2 -807
- package/dist/interface/admin-metrics.js +2 -4
- package/dist/interface/admin-metrics.js.map +1 -1
- package/dist/interface/client-interface.d.ts +2 -447
- package/dist/interface/client-interface.js +33 -18
- package/dist/interface/client-interface.js.map +1 -1
- package/dist/interface/client-interface.test.js +83 -13
- package/dist/interface/client-interface.test.js.map +1 -1
- package/dist/interface/conversations.d.ts +8 -8
- package/dist/interface/conversations.d.ts.map +1 -1
- package/dist/interface/conversations.js +2 -4
- package/dist/interface/conversations.js.map +1 -1
- package/dist/interface/crud/analytics.d.ts +2 -14
- package/dist/interface/crud/connected-accounts.d.ts +2 -68
- package/dist/interface/crud/connected-accounts.js +2 -4
- package/dist/interface/crud/connected-accounts.js.map +1 -1
- package/dist/interface/crud/contact-channels.d.ts +2 -181
- package/dist/interface/crud/contact-channels.js +2 -4
- package/dist/interface/crud/contact-channels.js.map +1 -1
- package/dist/interface/crud/current-user.d.ts +2 -285
- package/dist/interface/crud/current-user.js +2 -4
- package/dist/interface/crud/current-user.js.map +1 -1
- package/dist/interface/crud/email-outbox.d.ts +2 -1465
- package/dist/interface/crud/email-outbox.js +4 -5
- package/dist/interface/crud/email-outbox.js.map +1 -1
- package/dist/interface/crud/email-templates.d.ts +15 -16
- package/dist/interface/crud/email-templates.d.ts.map +1 -1
- package/dist/interface/crud/email-templates.js +2 -4
- package/dist/interface/crud/email-templates.js.map +1 -1
- package/dist/interface/crud/emails.d.ts +2 -41
- package/dist/interface/crud/emails.js +4 -5
- package/dist/interface/crud/emails.js.map +1 -1
- package/dist/interface/crud/internal-api-keys.d.ts +2 -140
- package/dist/interface/crud/internal-api-keys.js +2 -4
- package/dist/interface/crud/internal-api-keys.js.map +1 -1
- package/dist/interface/crud/invoices.d.ts +2 -43
- package/dist/interface/crud/invoices.js +2 -4
- package/dist/interface/crud/invoices.js.map +1 -1
- package/dist/interface/crud/items.d.ts +2 -30
- package/dist/interface/crud/items.js +2 -4
- package/dist/interface/crud/items.js.map +1 -1
- package/dist/interface/crud/notification-preferences.d.ts +2 -38
- package/dist/interface/crud/notification-preferences.js +2 -4
- package/dist/interface/crud/notification-preferences.js.map +1 -1
- package/dist/interface/crud/oauth-providers.d.ts +2 -186
- package/dist/interface/crud/oauth-providers.js +2 -4
- package/dist/interface/crud/oauth-providers.js.map +1 -1
- package/dist/interface/crud/products.d.ts +2 -182
- package/dist/interface/crud/products.js +4 -4
- package/dist/interface/crud/products.js.map +1 -1
- package/dist/interface/crud/project-api-keys.d.ts +2 -203
- package/dist/interface/crud/project-api-keys.js +2 -4
- package/dist/interface/crud/project-api-keys.js.map +1 -1
- package/dist/interface/crud/project-permissions.d.ts +2 -161
- package/dist/interface/crud/project-permissions.js +4 -5
- package/dist/interface/crud/project-permissions.js.map +1 -1
- package/dist/interface/crud/projects.d.ts +2 -901
- package/dist/interface/crud/projects.js +6 -5
- package/dist/interface/crud/projects.js.map +1 -1
- package/dist/interface/crud/session-replays.d.ts +2 -83
- package/dist/interface/crud/sessions.d.ts +2 -150
- package/dist/interface/crud/sessions.js +2 -4
- package/dist/interface/crud/sessions.js.map +1 -1
- package/dist/interface/crud/sign-up-rules.d.ts.map +1 -1
- package/dist/interface/crud/svix-token.d.ts +2 -31
- package/dist/interface/crud/svix-token.js +2 -4
- package/dist/interface/crud/svix-token.js.map +1 -1
- package/dist/interface/crud/team-invitation-details.d.ts +5 -6
- package/dist/interface/crud/team-invitation-details.d.ts.map +1 -1
- package/dist/interface/crud/team-invitation-details.js +4 -5
- package/dist/interface/crud/team-invitation-details.js.map +1 -1
- package/dist/interface/crud/team-invitation.d.ts +2 -54
- package/dist/interface/crud/team-invitation.js +4 -5
- package/dist/interface/crud/team-invitation.js.map +1 -1
- package/dist/interface/crud/team-member-profiles.d.ts +2 -286
- package/dist/interface/crud/team-member-profiles.js +4 -5
- package/dist/interface/crud/team-member-profiles.js.map +1 -1
- package/dist/interface/crud/team-memberships.d.ts +2 -75
- package/dist/interface/crud/team-memberships.js +2 -4
- package/dist/interface/crud/team-memberships.js.map +1 -1
- package/dist/interface/crud/team-permissions.d.ts +2 -169
- package/dist/interface/crud/team-permissions.js +4 -5
- package/dist/interface/crud/team-permissions.js.map +1 -1
- package/dist/interface/crud/teams.d.ts +2 -299
- package/dist/interface/crud/teams.js +5 -7
- package/dist/interface/crud/teams.js.map +1 -1
- package/dist/interface/crud/transactions.d.ts +2 -183
- package/dist/interface/crud/transactions.js +2 -4
- package/dist/interface/crud/transactions.js.map +1 -1
- package/dist/interface/crud/users.d.ts +2 -653
- package/dist/interface/crud/users.js +12 -8
- package/dist/interface/crud/users.js.map +1 -1
- package/dist/interface/handler-urls.d.ts +2 -51
- package/dist/interface/handler-urls.js +12 -14
- package/dist/interface/page-component-versions.d.ts +2 -25
- package/dist/interface/page-component-versions.js +2 -4
- package/dist/interface/page-component-versions.js.map +1 -1
- package/dist/interface/plan-usage.d.ts +2 -57
- package/dist/interface/plan-usage.js +2 -4
- package/dist/interface/plan-usage.js.map +1 -1
- package/dist/interface/server-interface.d.ts +2 -257
- package/dist/interface/server-interface.js +3 -5
- package/dist/interface/server-interface.js.map +1 -1
- package/dist/interface/webhooks.d.ts +2 -326
- package/dist/interface/webhooks.js +2 -4
- package/dist/interface/webhooks.js.map +1 -1
- package/dist/internal-api-keys-D8IYDodH.d.ts +139 -0
- package/dist/internal-api-keys-D8IYDodH.d.ts.map +1 -0
- package/dist/invoices-CHo9YKbI.d.ts +43 -0
- package/dist/invoices-CHo9YKbI.d.ts.map +1 -0
- package/dist/items-DlLSlVUD.d.ts +29 -0
- package/dist/items-DlLSlVUD.d.ts.map +1 -0
- package/dist/json-a1QIXu5z.d.ts +15 -0
- package/dist/json-a1QIXu5z.d.ts.map +1 -0
- package/dist/known-errors-Bm4a61wL.d.ts +575 -0
- package/dist/known-errors-Bm4a61wL.d.ts.map +1 -0
- package/dist/known-errors.d.ts +2 -575
- package/dist/known-errors.js +11 -23
- package/dist/known-errors.js.map +1 -1
- package/dist/notification-preferences-Bmzr_EOY.d.ts +37 -0
- package/dist/notification-preferences-Bmzr_EOY.d.ts.map +1 -0
- package/dist/oauth-providers-BMkKSSlA.d.ts +185 -0
- package/dist/oauth-providers-BMkKSSlA.d.ts.map +1 -0
- package/dist/objects-DkCkeBWE.d.ts +59 -0
- package/dist/objects-DkCkeBWE.d.ts.map +1 -0
- package/dist/passkey-CKg87UH-.d.ts +2 -0
- package/dist/payments/payment-methods.d.ts.map +1 -1
- package/dist/payments/payment-methods.js +2 -3
- package/dist/payments/payment-methods.js.map +1 -1
- package/dist/payments/stripe-limits.d.ts.map +1 -1
- package/dist/payments/stripe-limits.js +2 -3
- package/dist/payments/stripe-limits.js.map +1 -1
- package/dist/plan-usage-DfDoj5K4.d.ts +57 -0
- package/dist/plan-usage-DfDoj5K4.d.ts.map +1 -0
- package/dist/plans.d.ts.map +1 -1
- package/dist/plans.js +2 -3
- package/dist/plans.js.map +1 -1
- package/dist/products-Bs74ld-v.d.ts +182 -0
- package/dist/products-Bs74ld-v.d.ts.map +1 -0
- package/dist/project-api-keys--7V5X_UW.d.ts +203 -0
- package/dist/project-api-keys--7V5X_UW.d.ts.map +1 -0
- package/dist/project-permissions-kdi675F-.d.ts +160 -0
- package/dist/project-permissions-kdi675F-.d.ts.map +1 -0
- package/dist/projects-CFTNXRfG.d.ts +900 -0
- package/dist/projects-CFTNXRfG.d.ts.map +1 -0
- package/dist/results-DP3BzoL6.d.ts +70 -0
- package/dist/results-DP3BzoL6.d.ts.map +1 -0
- package/dist/{chunk-BE-pF4vm.js → rolldown-runtime-D6vf50IK.js} +12 -18
- package/dist/schema-CJwkGkdf.d.ts +2328 -0
- package/dist/schema-CJwkGkdf.d.ts.map +1 -0
- package/dist/schema-fields-DqGQ4kF7.d.ts +517 -0
- package/dist/schema-fields-DqGQ4kF7.d.ts.map +1 -0
- package/dist/schema-fields.d.ts +3 -518
- package/dist/schema-fields.js +21 -82
- package/dist/schema-fields.js.map +1 -1
- package/dist/server-interface-CgpxsLT_.d.ts +257 -0
- package/dist/server-interface-CgpxsLT_.d.ts.map +1 -0
- package/dist/session-replays-CXqhDpZq.d.ts +83 -0
- package/dist/session-replays-CXqhDpZq.d.ts.map +1 -0
- package/dist/sessions-B7Ko2Ldr.d.ts +149 -0
- package/dist/sessions-B7Ko2Ldr.d.ts.map +1 -0
- package/dist/sessions-d8qtvBUB.d.ts +175 -0
- package/dist/sessions-d8qtvBUB.d.ts.map +1 -0
- package/dist/sessions.d.ts +2 -175
- package/dist/sessions.js +4 -5
- package/dist/sessions.js.map +1 -1
- package/dist/sessions.test.js +1 -3
- package/dist/sessions.test.js.map +1 -1
- package/dist/strings-DWgkUybS.d.ts +76 -0
- package/dist/strings-DWgkUybS.d.ts.map +1 -0
- package/dist/svix-token-BsMrLGvy.d.ts +30 -0
- package/dist/svix-token-BsMrLGvy.d.ts.map +1 -0
- package/dist/team-invitation-Cyqt9oWw.d.ts +53 -0
- package/dist/team-invitation-Cyqt9oWw.d.ts.map +1 -0
- package/dist/team-member-profiles-BoDEqx-0.d.ts +285 -0
- package/dist/team-member-profiles-BoDEqx-0.d.ts.map +1 -0
- package/dist/team-memberships-DZHk2A5b.d.ts +74 -0
- package/dist/team-memberships-DZHk2A5b.d.ts.map +1 -0
- package/dist/team-permissions-DqOpaOWh.d.ts +168 -0
- package/dist/team-permissions-DqOpaOWh.d.ts.map +1 -0
- package/dist/teams-CQMcBnjM.d.ts +298 -0
- package/dist/teams-CQMcBnjM.d.ts.map +1 -0
- package/dist/transactions-DhnbvGH5.d.ts +182 -0
- package/dist/transactions-DhnbvGH5.d.ts.map +1 -0
- package/dist/types-DfTcxNtM.d.ts +77 -0
- package/dist/types-DfTcxNtM.d.ts.map +1 -0
- package/dist/users-DHNRwoSz.d.ts +653 -0
- package/dist/users-DHNRwoSz.d.ts.map +1 -0
- package/dist/utils/analytics-clickmap-overlay.d.ts.map +1 -1
- package/dist/utils/analytics-clickmap-overlay.js +2 -3
- package/dist/utils/analytics-clickmap-overlay.js.map +1 -1
- package/dist/utils/api-keys.d.ts.map +1 -1
- package/dist/utils/api-keys.js +4 -5
- package/dist/utils/api-keys.js.map +1 -1
- package/dist/utils/arrays.d.ts.map +1 -1
- package/dist/utils/arrays.js +2 -472
- package/dist/utils/arrays.js.map +1 -1
- package/dist/utils/auth-methods.d.ts.map +1 -1
- package/dist/utils/auth-methods.js +2 -3
- package/dist/utils/auth-methods.js.map +1 -1
- package/dist/utils/base64.d.ts.map +1 -1
- package/dist/utils/base64.js +2 -12
- package/dist/utils/base64.js.map +1 -1
- package/dist/utils/booleans.d.ts.map +1 -1
- package/dist/utils/booleans.js +2 -27
- package/dist/utils/booleans.js.map +1 -1
- package/dist/utils/browser-compat.d.ts.map +1 -1
- package/dist/utils/browser-compat.js +2 -3
- package/dist/utils/browser-compat.js.map +1 -1
- package/dist/utils/bytes.d.ts.map +1 -1
- package/dist/utils/bytes.js +4 -200
- package/dist/utils/bytes.js.map +1 -1
- package/dist/utils/caches.d.ts.map +1 -1
- package/dist/utils/caches.js +2 -29
- package/dist/utils/caches.js.map +1 -1
- package/dist/utils/cel-fields.d.ts.map +1 -1
- package/dist/utils/cel-fields.js +2 -4
- package/dist/utils/cel-fields.js.map +1 -1
- package/dist/utils/cloud-hosts.d.ts.map +1 -1
- package/dist/utils/cloud-hosts.js +2 -29
- package/dist/utils/cloud-hosts.js.map +1 -1
- package/dist/utils/compile-time.d.ts.map +1 -1
- package/dist/utils/compile-time.js +2 -3
- package/dist/utils/compile-time.js.map +1 -1
- package/dist/utils/country-codes.d.ts +2 -11
- package/dist/utils/country-codes.js +2 -18
- package/dist/utils/country-codes.js.map +1 -1
- package/dist/utils/crypto.d.ts.map +1 -1
- package/dist/utils/crypto.js +4 -115
- package/dist/utils/crypto.js.map +1 -1
- package/dist/utils/currencies.d.ts +1 -1
- package/dist/utils/currencies.d.ts.map +1 -1
- package/dist/utils/currencies.js +3 -39
- package/dist/utils/currencies.js.map +1 -1
- package/dist/utils/currency-constants.d.ts +2 -45
- package/dist/utils/currency-constants.js +2 -3
- package/dist/utils/currency-constants.js.map +1 -1
- package/dist/utils/dates.d.ts +2 -23
- package/dist/utils/dates.js +2 -46
- package/dist/utils/dates.js.map +1 -1
- package/dist/utils/dev-env-state-path.d.ts.map +1 -1
- package/dist/utils/dev-env-state-path.js +2 -4
- package/dist/utils/dev-env-state-path.js.map +1 -1
- package/dist/utils/dev-tool.d.ts.map +1 -1
- package/dist/utils/dev-tool.js +2 -3
- package/dist/utils/dev-tool.js.map +1 -1
- package/dist/utils/dom.d.ts.map +1 -1
- package/dist/utils/dom.js +2 -3
- package/dist/utils/dom.js.map +1 -1
- package/dist/utils/elements-chain.d.ts.map +1 -1
- package/dist/utils/elements-chain.js +6 -52
- package/dist/utils/elements-chain.js.map +1 -1
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +2 -4
- package/dist/utils/env.js.map +1 -1
- package/dist/utils/env.test.js +1 -3
- package/dist/utils/env.test.js.map +1 -1
- package/dist/utils/errors.d.ts +2 -238
- package/dist/utils/errors.js +2 -4
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/esbuild.d.ts +1 -1
- package/dist/utils/esbuild.d.ts.map +1 -1
- package/dist/utils/esbuild.js +5 -6
- package/dist/utils/esbuild.js.map +1 -1
- package/dist/utils/featurebase.d.ts.map +1 -1
- package/dist/utils/featurebase.js +2 -4
- package/dist/utils/featurebase.js.map +1 -1
- package/dist/utils/fs.d.ts.map +1 -1
- package/dist/utils/fs.js +5 -6
- package/dist/utils/fs.js.map +1 -1
- package/dist/utils/functions.d.ts.map +1 -1
- package/dist/utils/functions.js +2 -26
- package/dist/utils/functions.js.map +1 -1
- package/dist/utils/geo.d.ts.map +1 -1
- package/dist/utils/geo.js +2 -4
- package/dist/utils/geo.js.map +1 -1
- package/dist/utils/globals.d.ts.map +1 -1
- package/dist/utils/globals.js +2 -3
- package/dist/utils/globals.js.map +1 -1
- package/dist/utils/hashes.d.ts.map +1 -1
- package/dist/utils/hashes.js +4 -5
- package/dist/utils/hashes.js.map +1 -1
- package/dist/utils/html.d.ts.map +1 -1
- package/dist/utils/html.js +2 -21
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/http.d.ts.map +1 -1
- package/dist/utils/http.js +2 -21
- package/dist/utils/http.js.map +1 -1
- package/dist/utils/ips.d.ts.map +1 -1
- package/dist/utils/ips.js +4 -28
- package/dist/utils/ips.js.map +1 -1
- package/dist/utils/json.d.ts +2 -15
- package/dist/utils/json.js +2 -157
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/jsx-editable-transpiler.d.ts.map +1 -1
- package/dist/utils/jsx-editable-transpiler.js +7 -8
- package/dist/utils/jsx-editable-transpiler.js.map +1 -1
- package/dist/utils/jsx-editable-transpiler.test.js +1 -3
- package/dist/utils/jsx-editable-transpiler.test.js.map +1 -1
- package/dist/utils/jwt.d.ts.map +1 -1
- package/dist/utils/jwt.js +6 -7
- package/dist/utils/jwt.js.map +1 -1
- package/dist/utils/locks.d.ts.map +1 -1
- package/dist/utils/locks.js +2 -4
- package/dist/utils/locks.js.map +1 -1
- package/dist/utils/maps.d.ts.map +1 -1
- package/dist/utils/maps.js +2 -113
- package/dist/utils/maps.js.map +1 -1
- package/dist/utils/math.d.ts.map +1 -1
- package/dist/utils/math.js +2 -13
- package/dist/utils/math.js.map +1 -1
- package/dist/utils/monkey-patch.d.ts.map +1 -1
- package/dist/utils/monkey-patch.js +3 -5
- package/dist/utils/monkey-patch.js.map +1 -1
- package/dist/utils/node-http.js +2 -4
- package/dist/utils/node-http.js.map +1 -1
- package/dist/utils/numbers.d.ts.map +1 -1
- package/dist/utils/numbers.js +2 -47
- package/dist/utils/numbers.js.map +1 -1
- package/dist/utils/oauth.d.ts.map +1 -1
- package/dist/utils/oauth.js +2 -3
- package/dist/utils/oauth.js.map +1 -1
- package/dist/utils/objects.d.ts +2 -59
- package/dist/utils/objects.js +2 -624
- package/dist/utils/objects.js.map +1 -1
- package/dist/utils/paginated-lists.d.ts.map +1 -1
- package/dist/utils/paginated-lists.js +2 -4
- package/dist/utils/paginated-lists.js.map +1 -1
- package/dist/utils/paginated-lists.test.js +1 -3
- package/dist/utils/paginated-lists.test.js.map +1 -1
- package/dist/utils/passkey.d.ts +2 -2
- package/dist/utils/promises.d.ts +1 -1
- package/dist/utils/promises.d.ts.map +1 -1
- package/dist/utils/promises.js +3 -163
- package/dist/utils/promises.js.map +1 -1
- package/dist/utils/proxies.d.ts.map +1 -1
- package/dist/utils/proxies.js +2 -39
- package/dist/utils/proxies.js.map +1 -1
- package/dist/utils/react.d.ts.map +1 -1
- package/dist/utils/react.js +4 -44
- package/dist/utils/react.js.map +1 -1
- package/dist/utils/redirect-urls.d.ts.map +1 -1
- package/dist/utils/redirect-urls.js +3 -94
- package/dist/utils/redirect-urls.js.map +1 -1
- package/dist/utils/regex.js +2 -3
- package/dist/utils/regex.js.map +1 -1
- package/dist/utils/results.d.ts +2 -70
- package/dist/utils/results.js +2 -215
- package/dist/utils/results.js.map +1 -1
- package/dist/utils/sentry.js +2 -3
- package/dist/utils/sentry.js.map +1 -1
- package/dist/utils/stores.d.ts +1 -1
- package/dist/utils/stores.d.ts.map +1 -1
- package/dist/utils/stores.js +2 -4
- package/dist/utils/stores.js.map +1 -1
- package/dist/utils/strings.d.ts +2 -76
- package/dist/utils/strings.js +2 -253
- package/dist/utils/strings.js.map +1 -1
- package/dist/utils/strings.nicify.test.js +1 -3
- package/dist/utils/strings.nicify.test.js.map +1 -1
- package/dist/utils/telemetry.d.ts.map +1 -1
- package/dist/utils/telemetry.js +2 -4
- package/dist/utils/telemetry.js.map +1 -1
- package/dist/utils/turnstile-browser.d.ts.map +1 -1
- package/dist/utils/turnstile-browser.js +2 -4
- package/dist/utils/turnstile-browser.js.map +1 -1
- package/dist/utils/turnstile-flow.d.ts.map +1 -1
- package/dist/utils/turnstile-flow.js +2 -4
- package/dist/utils/turnstile-flow.js.map +1 -1
- package/dist/utils/turnstile-flow.test.js +1 -3
- package/dist/utils/turnstile-flow.test.js.map +1 -1
- package/dist/utils/turnstile.d.ts.map +1 -1
- package/dist/utils/turnstile.js +2 -3
- package/dist/utils/turnstile.js.map +1 -1
- package/dist/utils/typed-arrays.js +2 -4
- package/dist/utils/typed-arrays.js.map +1 -1
- package/dist/utils/types.d.ts +2 -77
- package/dist/utils/types.js +2 -3
- package/dist/utils/types.js.map +1 -1
- package/dist/utils/unicode.d.ts.map +1 -1
- package/dist/utils/unicode.js +2 -15
- package/dist/utils/unicode.js.map +1 -1
- package/dist/utils/urls.d.ts.map +1 -1
- package/dist/utils/urls.js +2 -153
- package/dist/utils/urls.js.map +1 -1
- package/dist/utils/uuids.d.ts.map +1 -1
- package/dist/utils/uuids.js +3 -28
- package/dist/utils/uuids.js.map +1 -1
- package/dist/webhooks-8Ts1Clcb.d.ts +326 -0
- package/dist/webhooks-8Ts1Clcb.d.ts.map +1 -0
- package/package.json +2 -8
- package/src/interface/client-interface.test.ts +77 -12
- package/src/interface/client-interface.ts +9 -9
- package/dist/config/format.d.ts.map +0 -1
- package/dist/config/schema.d.ts.map +0 -1
- package/dist/crud.d.ts.map +0 -1
- package/dist/interface/admin-interface.d.ts.map +0 -1
- package/dist/interface/admin-metrics.d.ts.map +0 -1
- package/dist/interface/client-interface.d.ts.map +0 -1
- package/dist/interface/crud/analytics.d.ts.map +0 -1
- package/dist/interface/crud/connected-accounts.d.ts.map +0 -1
- package/dist/interface/crud/contact-channels.d.ts.map +0 -1
- package/dist/interface/crud/current-user.d.ts.map +0 -1
- package/dist/interface/crud/emails.d.ts.map +0 -1
- package/dist/interface/crud/internal-api-keys.d.ts.map +0 -1
- package/dist/interface/crud/invoices.d.ts.map +0 -1
- package/dist/interface/crud/items.d.ts.map +0 -1
- package/dist/interface/crud/notification-preferences.d.ts.map +0 -1
- package/dist/interface/crud/oauth-providers.d.ts.map +0 -1
- package/dist/interface/crud/products.d.ts.map +0 -1
- package/dist/interface/crud/project-api-keys.d.ts.map +0 -1
- package/dist/interface/crud/project-permissions.d.ts.map +0 -1
- package/dist/interface/crud/projects.d.ts.map +0 -1
- package/dist/interface/crud/session-replays.d.ts.map +0 -1
- package/dist/interface/crud/sessions.d.ts.map +0 -1
- package/dist/interface/crud/svix-token.d.ts.map +0 -1
- package/dist/interface/crud/team-invitation.d.ts.map +0 -1
- package/dist/interface/crud/team-member-profiles.d.ts.map +0 -1
- package/dist/interface/crud/team-memberships.d.ts.map +0 -1
- package/dist/interface/crud/team-permissions.d.ts.map +0 -1
- package/dist/interface/crud/teams.d.ts.map +0 -1
- package/dist/interface/crud/transactions.d.ts.map +0 -1
- package/dist/interface/crud/users.d.ts.map +0 -1
- package/dist/interface/handler-urls.d.ts.map +0 -1
- package/dist/interface/page-component-versions.d.ts.map +0 -1
- package/dist/interface/plan-usage.d.ts.map +0 -1
- package/dist/interface/server-interface.d.ts.map +0 -1
- package/dist/interface/webhooks.d.ts.map +0 -1
- package/dist/known-errors.d.ts.map +0 -1
- package/dist/schema-fields.d.ts.map +0 -1
- package/dist/sessions.d.ts.map +0 -1
- package/dist/utils/country-codes.d.ts.map +0 -1
- package/dist/utils/currency-constants.d.ts.map +0 -1
- package/dist/utils/dates.d.ts.map +0 -1
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/json.d.ts.map +0 -1
- package/dist/utils/objects.d.ts.map +0 -1
- package/dist/utils/results.d.ts.map +0 -1
- package/dist/utils/strings.d.ts.map +0 -1
- package/dist/utils/types.d.ts.map +0 -1
package/dist/utils/urls.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urls.js","names":[],"sources":["../../src/utils/urls.tsx"],"sourcesContent":["import { generateSecureRandomString } from \"./crypto\";\nimport { templateIdentity } from \"./strings\";\n\nexport function createUrlIfValid(...args: ConstructorParameters<typeof URL>) {\n try {\n return new URL(...args);\n } catch (e) {\n return null;\n }\n}\nimport.meta.vitest?.test(\"createUrlIfValid\", ({ expect }) => {\n // Test with valid URLs\n expect(createUrlIfValid(\"https://example.com\")).toBeInstanceOf(URL);\n expect(createUrlIfValid(\"https://example.com/path?query=value#hash\")).toBeInstanceOf(URL);\n expect(createUrlIfValid(\"/path\", \"https://example.com\")).toBeInstanceOf(URL);\n\n // Test with invalid URLs\n expect(createUrlIfValid(\"\")).toBeNull();\n expect(createUrlIfValid(\"not a url\")).toBeNull();\n expect(createUrlIfValid(\"http://\")).toBeNull();\n});\n\nexport function isValidUrl(url: string) {\n return !!createUrlIfValid(url);\n}\nimport.meta.vitest?.test(\"isValidUrl\", ({ expect }) => {\n // Test with valid URLs\n expect(isValidUrl(\"https://example.com\")).toBe(true);\n expect(isValidUrl(\"http://localhost:3000\")).toBe(true);\n expect(isValidUrl(\"ftp://example.com\")).toBe(true);\n\n // Test with invalid URLs\n expect(isValidUrl(\"\")).toBe(false);\n expect(isValidUrl(\"not a url\")).toBe(false);\n expect(isValidUrl(\"http://\")).toBe(false);\n});\n\nexport function isValidHostname(hostname: string) {\n // Basic validation\n if (!hostname || hostname.startsWith('.') || hostname.endsWith('.') || hostname.includes('..')) {\n return false;\n }\n\n const url = createUrlIfValid(`https://${hostname}`);\n if (!url) return false;\n return url.hostname === hostname;\n}\nimport.meta.vitest?.test(\"isValidHostname\", ({ expect }) => {\n // Test with valid hostnames\n expect(isValidHostname(\"example.com\")).toBe(true);\n expect(isValidHostname(\"localhost\")).toBe(true);\n expect(isValidHostname(\"sub.domain.example.com\")).toBe(true);\n expect(isValidHostname(\"127.0.0.1\")).toBe(true);\n\n // Test with invalid hostnames\n expect(isValidHostname(\"\")).toBe(false);\n expect(isValidHostname(\"example.com/path\")).toBe(false);\n expect(isValidHostname(\"https://example.com\")).toBe(false);\n expect(isValidHostname(\"example com\")).toBe(false);\n});\n\nexport function isValidHostnameWithWildcards(hostname: string) {\n // Empty hostnames are invalid\n if (!hostname) return false;\n\n // Check if it contains wildcards\n const hasWildcard = hostname.includes('*');\n\n if (!hasWildcard) {\n // If no wildcards, validate as a normal hostname\n return isValidHostname(hostname);\n }\n\n // Basic validation checks that apply even with wildcards\n // - Hostname cannot start or end with a dot\n if (hostname.startsWith('.') || hostname.endsWith('.')) {\n return false;\n }\n\n // - No consecutive dots\n if (hostname.includes('..')) {\n return false;\n }\n\n // For wildcard validation, check that non-wildcard parts contain valid characters\n // Replace wildcards with a valid placeholder to check the rest\n const testHostname = hostname.replace(/\\*+/g, 'wildcard');\n\n // Check if the resulting string would be a valid hostname\n if (!/^[a-zA-Z0-9.-]+$/.test(testHostname)) {\n return false;\n }\n\n // Additional check: ensure the pattern makes sense\n // Check each segment between wildcards\n const segments = hostname.split(/\\*+/);\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n if (segment === '') continue; // Empty segments are OK (consecutive wildcards)\n\n // First segment can't start with dot\n if (i === 0 && segment.startsWith('.')) {\n return false;\n }\n\n // Last segment can't end with dot\n if (i === segments.length - 1 && segment.endsWith('.')) {\n return false;\n }\n\n // No segment should have consecutive dots\n if (segment.includes('..')) {\n return false;\n }\n }\n\n return true;\n}\nimport.meta.vitest?.test(\"isValidHostnameWithWildcards\", ({ expect }) => {\n // Test with valid regular hostnames\n expect(isValidHostnameWithWildcards(\"example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"localhost\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"sub.domain.example.com\")).toBe(true);\n\n // Test with valid wildcard hostnames\n expect(isValidHostnameWithWildcards(\"*.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"a-*.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"*.*.org\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"**.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"sub.**.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"*-api.*.com\")).toBe(true);\n\n // Test with invalid hostnames\n expect(isValidHostnameWithWildcards(\"\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example.com/path\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"https://example.com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\".example.com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example.com.\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example..com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"*.example..com\")).toBe(false);\n});\n\nexport function matchHostnamePattern(pattern: string, hostname: string): boolean {\n // If no wildcards, it's an exact match\n if (!pattern.includes('*')) {\n return pattern === hostname;\n }\n\n // Convert the pattern to a regex\n // First, escape all regex special characters except *\n let regexPattern = pattern.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n // Use a placeholder for ** to handle it separately from single *\n const doubleWildcardPlaceholder = '\\x00DOUBLE_WILDCARD\\x00';\n regexPattern = regexPattern.replace(/\\*\\*/g, doubleWildcardPlaceholder);\n\n // Replace single * with a pattern that matches anything except dots\n regexPattern = regexPattern.replace(/\\*/g, '[^.]*');\n\n // Replace the double wildcard placeholder with a pattern that matches anything including dots\n regexPattern = regexPattern.replace(new RegExp(doubleWildcardPlaceholder, 'g'), '.*');\n\n // Anchor the pattern to match the entire hostname\n regexPattern = '^' + regexPattern + '$';\n\n try {\n const regex = new RegExp(regexPattern);\n return regex.test(hostname);\n } catch {\n return false;\n }\n}\nimport.meta.vitest?.test(\"matchHostnamePattern\", ({ expect }) => {\n // Test exact matches\n expect(matchHostnamePattern(\"example.com\", \"example.com\")).toBe(true);\n expect(matchHostnamePattern(\"example.com\", \"other.com\")).toBe(false);\n\n // Test single wildcard matches\n expect(matchHostnamePattern(\"*.example.com\", \"api.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"*.example.com\", \"www.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"*.example.com\", \"example.com\")).toBe(false);\n expect(matchHostnamePattern(\"*.example.com\", \"api.v2.example.com\")).toBe(false);\n\n // Test double wildcard matches\n expect(matchHostnamePattern(\"**.example.com\", \"api.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"api.v2.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"a.b.c.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"example.com\")).toBe(false);\n\n // Test complex patterns\n expect(matchHostnamePattern(\"api-*.example.com\", \"api-v1.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"api-*.example.com\", \"api-v2.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"api-*.example.com\", \"api.example.com\")).toBe(false);\n expect(matchHostnamePattern(\"*.*.org\", \"mail.example.org\")).toBe(true);\n expect(matchHostnamePattern(\"*.*.org\", \"example.org\")).toBe(false);\n});\n\nexport function getHardcodedFallbackUrls(primaryBaseUrl: string): string[] {\n // `defaultBaseUrl` in `@stackframe/*` SDK builds is `https://api.stack-auth.com`\n // (see `packages/template/src/lib/hexclave-app/apps/implementations/common.ts`).\n // The `@hexclave/*` mirror packages will get this rewritten to the hexclave\n // hostname by `scripts/rewrite-packages-to-hexclave.ts` in a follow-up PR; both\n // branches below stay listed so either build resolves its own fallback set.\n if (primaryBaseUrl === \"https://api.stack-auth.com\") {\n return [\"https://api1.stack-auth.com\", \"https://api2.stack-auth.com\"];\n }\n if (primaryBaseUrl === \"https://api.dev.stack-auth.com\") {\n return [\"https://api1.dev.stack-auth.com\", \"https://api2.dev.stack-auth.com\"];\n }\n if (primaryBaseUrl === \"https://api.hexclave.com\") {\n return [\"https://api1.hexclave.com\", \"https://api2.hexclave.com\"];\n }\n if (primaryBaseUrl === \"https://api.dev.hexclave.com\") {\n return [\"https://api1.dev.hexclave.com\", \"https://api2.dev.hexclave.com\"];\n }\n const localhostMatch = primaryBaseUrl.match(/^http:\\/\\/localhost:(\\d+)02$/);\n if (localhostMatch) {\n return [`http://localhost:${localhostMatch[1]}10`];\n }\n return [];\n}\n\nexport function getDefaultApiUrls(primaryBaseUrl: string): string[] {\n return [primaryBaseUrl, ...getHardcodedFallbackUrls(primaryBaseUrl)];\n}\n\nexport function isLocalhost(urlOrString: string | URL) {\n const url = createUrlIfValid(urlOrString);\n if (!url) return false;\n if (url.hostname === \"localhost\" || url.hostname.endsWith(\".localhost\")) return true;\n if (url.hostname.match(/^127\\.\\d+\\.\\d+\\.\\d+$/)) return true;\n if (url.hostname === \"[::1]\" || url.hostname === \"::1\") return true;\n return false;\n}\nimport.meta.vitest?.test(\"isLocalhost\", ({ expect }) => {\n // Test with localhost URLs\n expect(isLocalhost(\"http://localhost\")).toBe(true);\n expect(isLocalhost(\"https://localhost:8080\")).toBe(true);\n expect(isLocalhost(\"http://sub.localhost\")).toBe(true);\n expect(isLocalhost(\"http://127.0.0.1\")).toBe(true);\n expect(isLocalhost(\"http://127.1.2.3\")).toBe(true);\n expect(isLocalhost(\"http://[::1]\")).toBe(true);\n\n // Test with non-localhost URLs\n expect(isLocalhost(\"https://example.com\")).toBe(false);\n expect(isLocalhost(\"http://192.168.1.1\")).toBe(false);\n expect(isLocalhost(\"http://10.0.0.1\")).toBe(false);\n\n // Test with URL objects\n expect(isLocalhost(new URL(\"http://localhost\"))).toBe(true);\n expect(isLocalhost(new URL(\"https://example.com\"))).toBe(false);\n\n // Test with invalid URLs\n expect(isLocalhost(\"not a url\")).toBe(false);\n expect(isLocalhost(\"\")).toBe(false);\n});\n\nexport function isRelative(url: string) {\n const randomDomain = `${generateSecureRandomString()}.stack-auth.example.com`;\n const u = createUrlIfValid(url, `https://${randomDomain}`);\n if (!u) return false;\n if (u.host !== randomDomain) return false;\n if (u.protocol !== \"https:\") return false;\n return true;\n}\nimport.meta.vitest?.test(\"isRelative\", ({ expect }) => {\n // We can't easily mock generateSecureRandomString in this context\n // but we can still test the function's behavior\n\n // Test with relative URLs\n expect(isRelative(\"/\")).toBe(true);\n expect(isRelative(\"/path\")).toBe(true);\n expect(isRelative(\"/path?query=value#hash\")).toBe(true);\n\n // Test with absolute URLs\n expect(isRelative(\"https://example.com\")).toBe(false);\n expect(isRelative(\"http://example.com\")).toBe(false);\n expect(isRelative(\"//example.com\")).toBe(false);\n\n // Note: The implementation treats empty strings and invalid URLs as relative\n // This is because they can be resolved against a base URL\n expect(isRelative(\"\")).toBe(true);\n expect(isRelative(\"not a url\")).toBe(true);\n});\n\nexport function getRelativePart(url: URL) {\n return url.pathname + url.search + url.hash;\n}\nimport.meta.vitest?.test(\"getRelativePart\", ({ expect }) => {\n // Test with various URLs\n expect(getRelativePart(new URL(\"https://example.com\"))).toBe(\"/\");\n expect(getRelativePart(new URL(\"https://example.com/path\"))).toBe(\"/path\");\n expect(getRelativePart(new URL(\"https://example.com/path?query=value\"))).toBe(\"/path?query=value\");\n expect(getRelativePart(new URL(\"https://example.com/path#hash\"))).toBe(\"/path#hash\");\n expect(getRelativePart(new URL(\"https://example.com/path?query=value#hash\"))).toBe(\"/path?query=value#hash\");\n\n // Test with different domains but same paths\n const url1 = new URL(\"https://example.com/path?query=value#hash\");\n const url2 = new URL(\"https://different.com/path?query=value#hash\");\n expect(getRelativePart(url1)).toBe(getRelativePart(url2));\n});\n\n/**\n * A template literal tag that returns a URL.\n *\n * Any values passed are encoded.\n */\nexport function url(strings: TemplateStringsArray | readonly string[], ...values: (string | number | boolean)[]): URL {\n return new URL(urlString(strings, ...values));\n}\nimport.meta.vitest?.test(\"url\", ({ expect }) => {\n // Test with no interpolation\n expect(url`https://example.com`).toBeInstanceOf(URL);\n expect(url`https://example.com`.href).toBe(\"https://example.com/\");\n\n // Test with string interpolation\n expect(url`https://example.com/${\"path\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path\"}`.pathname).toBe(\"/path\");\n\n // Test with number interpolation\n expect(url`https://example.com/${42}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${42}`.pathname).toBe(\"/42\");\n\n // Test with boolean interpolation\n expect(url`https://example.com/${true}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${true}`.pathname).toBe(\"/true\");\n\n // Test with special characters in interpolation\n expect(url`https://example.com/${\"path with spaces\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path with spaces\"}`.pathname).toBe(\"/path%20with%20spaces\");\n\n // Test with multiple interpolations\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`.pathname).toBe(\"/path\");\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`.search).toBe(\"?query=value\");\n});\n\n\n/**\n * A template literal tag that returns a URL string.\n *\n * Any values passed are encoded.\n */\nexport function urlString(strings: TemplateStringsArray | readonly string[], ...values: (string | number | boolean)[]): string {\n return templateIdentity(strings, ...values.map(encodeURIComponent));\n}\nimport.meta.vitest?.test(\"urlString\", ({ expect }) => {\n // Test with no interpolation\n expect(urlString`https://example.com`).toBe(\"https://example.com\");\n\n // Test with string interpolation\n expect(urlString`https://example.com/${\"path\"}`).toBe(\"https://example.com/path\");\n\n // Test with number interpolation\n expect(urlString`https://example.com/${42}`).toBe(\"https://example.com/42\");\n\n // Test with boolean interpolation\n expect(urlString`https://example.com/${true}`).toBe(\"https://example.com/true\");\n\n // Test with special characters in interpolation\n expect(urlString`https://example.com/${\"path with spaces\"}`).toBe(\"https://example.com/path%20with%20spaces\");\n expect(urlString`https://example.com/${\"?&=\"}`).toBe(\"https://example.com/%3F%26%3D\");\n\n // Test with multiple interpolations\n expect(urlString`https://example.com/${\"path\"}?query=${\"value\"}`).toBe(\"https://example.com/path?query=value\");\n expect(urlString`https://example.com/${\"path\"}?query=${\"value with spaces\"}`).toBe(\"https://example.com/path?query=value%20with%20spaces\");\n});\n\nexport function isChildUrl(parentUrl: URL, maybeChildUrl: URL) {\n return parentUrl.origin === maybeChildUrl.origin\n && isChildPath(parentUrl.pathname, maybeChildUrl.pathname)\n && [...parentUrl.searchParams].every(([key, value]) => maybeChildUrl.searchParams.get(key) === value)\n && (!parentUrl.hash || parentUrl.hash === maybeChildUrl.hash);\n}\nimport.meta.vitest?.test(\"isChildUrl\", ({ expect }) => {\n // true\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path?query=value\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path?query=value#hash\"))).toBe(true);\n\n // false\n expect(isChildUrl(new URL(\"https://abc.com\"), new URL(\"https://example.com\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path?query=value\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path?query=value#hash\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://example.com\"), new URL(\"https://abc.com/path?query=value#hash\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://example.com?query=value123\"), new URL(\"https://example.com/path?query=value#hash\"))).toBe(false);\n});\n\nexport function isChildPath(parentPath: string, maybeChildPath: string) {\n parentPath = parentPath.endsWith(\"/\") ? parentPath : parentPath + \"/\";\n maybeChildPath = maybeChildPath.endsWith(\"/\") ? maybeChildPath : maybeChildPath + \"/\";\n return maybeChildPath.startsWith(parentPath);\n}\nimport.meta.vitest?.test(\"isSubPath\", ({ expect }) => {\n expect(isChildPath(\"/\", \"/\")).toBe(true);\n expect(isChildPath(\"/\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path\", \"/\")).toBe(false);\n expect(isChildPath(\"/path\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path/\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path/\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path/abc\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path/abc\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path-abc\")).toBe(false);\n expect(isChildPath(\"/path\", \"/path-abc/\")).toBe(false);\n expect(isChildPath(\"/path/\", \"/path-abc\")).toBe(false);\n expect(isChildPath(\"/path/\", \"/path-abc/\")).toBe(false);\n});\n"],"mappings":";;;;;;AAGA,SAAgB,iBAAiB,GAAG,MAAyC;AAC3E,KAAI;AACF,SAAO,IAAI,IAAI,GAAG,KAAK;UAChB,GAAG;AACV,SAAO;;;CAGX,SAAW,KAAC,qBAAc,EAAA,aAAsB;AAE9C,QAAO,iBAAiB,sBAAsB,CAAC,CAAC,eAAe,IAAI;AACnE,QAAO,iBAAiB,4CAA4C,CAAC,CAAC,eAAe,IAAI;AACzF,QAAO,iBAAiB,SAAS,sBAAsB,CAAC,CAAC,eAAe,IAAI;AAG5E,QAAO,iBAAiB,GAAG,CAAC,CAAC,UAAU;AACvC,QAAO,iBAAiB,YAAY,CAAC,CAAC,UAAU;AAChD,QAAO,iBAAiB,UAAU,CAAC,CAAC,UAAU;EAC9C;AAEF,SAAgB,WAAW,KAAa;AACtC,QAAO,CAAC,CAAC,iBAAiB,IAAI;;CAEhC,SAAW,KAAC,eAAc,EAAA,aAAgB;AAExC,QAAO,WAAW,sBAAsB,CAAC,CAAC,KAAK,KAAK;AACpD,QAAO,WAAW,wBAAwB,CAAC,CAAC,KAAK,KAAK;AACtD,QAAO,WAAW,oBAAoB,CAAC,CAAC,KAAK,KAAK;AAGlD,QAAO,WAAW,GAAG,CAAC,CAAC,KAAK,MAAM;AAClC,QAAO,WAAW,YAAY,CAAC,CAAC,KAAK,MAAM;AAC3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AAU,YAAY,CAAC,CAAC,KAAK,KAAK;AACrD,QAAO,YAAY,SAAS,YAAY,CAAC,CAAC,KAAK,MAAM;AACrD,QAAO,YAAY,SAAS,aAAa,CAAC,CAAC,KAAK,MAAM;AACtD,QAAO,YAAY,UAAU,YAAY,CAAC,CAAC,KAAK,MAAM;AACtD,QAAO,YAAY,UAAU,aAAa,CAAC,CAAC,KAAK,MAAM;EACvD"}
|
|
1
|
+
{"version":3,"file":"urls.js","names":[],"sources":["../../src/utils/urls.tsx"],"sourcesContent":["import { generateSecureRandomString } from \"./crypto\";\nimport { templateIdentity } from \"./strings\";\n\nexport function createUrlIfValid(...args: ConstructorParameters<typeof URL>) {\n try {\n return new URL(...args);\n } catch (e) {\n return null;\n }\n}\nimport.meta.vitest?.test(\"createUrlIfValid\", ({ expect }) => {\n // Test with valid URLs\n expect(createUrlIfValid(\"https://example.com\")).toBeInstanceOf(URL);\n expect(createUrlIfValid(\"https://example.com/path?query=value#hash\")).toBeInstanceOf(URL);\n expect(createUrlIfValid(\"/path\", \"https://example.com\")).toBeInstanceOf(URL);\n\n // Test with invalid URLs\n expect(createUrlIfValid(\"\")).toBeNull();\n expect(createUrlIfValid(\"not a url\")).toBeNull();\n expect(createUrlIfValid(\"http://\")).toBeNull();\n});\n\nexport function isValidUrl(url: string) {\n return !!createUrlIfValid(url);\n}\nimport.meta.vitest?.test(\"isValidUrl\", ({ expect }) => {\n // Test with valid URLs\n expect(isValidUrl(\"https://example.com\")).toBe(true);\n expect(isValidUrl(\"http://localhost:3000\")).toBe(true);\n expect(isValidUrl(\"ftp://example.com\")).toBe(true);\n\n // Test with invalid URLs\n expect(isValidUrl(\"\")).toBe(false);\n expect(isValidUrl(\"not a url\")).toBe(false);\n expect(isValidUrl(\"http://\")).toBe(false);\n});\n\nexport function isValidHostname(hostname: string) {\n // Basic validation\n if (!hostname || hostname.startsWith('.') || hostname.endsWith('.') || hostname.includes('..')) {\n return false;\n }\n\n const url = createUrlIfValid(`https://${hostname}`);\n if (!url) return false;\n return url.hostname === hostname;\n}\nimport.meta.vitest?.test(\"isValidHostname\", ({ expect }) => {\n // Test with valid hostnames\n expect(isValidHostname(\"example.com\")).toBe(true);\n expect(isValidHostname(\"localhost\")).toBe(true);\n expect(isValidHostname(\"sub.domain.example.com\")).toBe(true);\n expect(isValidHostname(\"127.0.0.1\")).toBe(true);\n\n // Test with invalid hostnames\n expect(isValidHostname(\"\")).toBe(false);\n expect(isValidHostname(\"example.com/path\")).toBe(false);\n expect(isValidHostname(\"https://example.com\")).toBe(false);\n expect(isValidHostname(\"example com\")).toBe(false);\n});\n\nexport function isValidHostnameWithWildcards(hostname: string) {\n // Empty hostnames are invalid\n if (!hostname) return false;\n\n // Check if it contains wildcards\n const hasWildcard = hostname.includes('*');\n\n if (!hasWildcard) {\n // If no wildcards, validate as a normal hostname\n return isValidHostname(hostname);\n }\n\n // Basic validation checks that apply even with wildcards\n // - Hostname cannot start or end with a dot\n if (hostname.startsWith('.') || hostname.endsWith('.')) {\n return false;\n }\n\n // - No consecutive dots\n if (hostname.includes('..')) {\n return false;\n }\n\n // For wildcard validation, check that non-wildcard parts contain valid characters\n // Replace wildcards with a valid placeholder to check the rest\n const testHostname = hostname.replace(/\\*+/g, 'wildcard');\n\n // Check if the resulting string would be a valid hostname\n if (!/^[a-zA-Z0-9.-]+$/.test(testHostname)) {\n return false;\n }\n\n // Additional check: ensure the pattern makes sense\n // Check each segment between wildcards\n const segments = hostname.split(/\\*+/);\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n if (segment === '') continue; // Empty segments are OK (consecutive wildcards)\n\n // First segment can't start with dot\n if (i === 0 && segment.startsWith('.')) {\n return false;\n }\n\n // Last segment can't end with dot\n if (i === segments.length - 1 && segment.endsWith('.')) {\n return false;\n }\n\n // No segment should have consecutive dots\n if (segment.includes('..')) {\n return false;\n }\n }\n\n return true;\n}\nimport.meta.vitest?.test(\"isValidHostnameWithWildcards\", ({ expect }) => {\n // Test with valid regular hostnames\n expect(isValidHostnameWithWildcards(\"example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"localhost\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"sub.domain.example.com\")).toBe(true);\n\n // Test with valid wildcard hostnames\n expect(isValidHostnameWithWildcards(\"*.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"a-*.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"*.*.org\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"**.example.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"sub.**.com\")).toBe(true);\n expect(isValidHostnameWithWildcards(\"*-api.*.com\")).toBe(true);\n\n // Test with invalid hostnames\n expect(isValidHostnameWithWildcards(\"\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example.com/path\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"https://example.com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\".example.com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example.com.\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"example..com\")).toBe(false);\n expect(isValidHostnameWithWildcards(\"*.example..com\")).toBe(false);\n});\n\nexport function matchHostnamePattern(pattern: string, hostname: string): boolean {\n // If no wildcards, it's an exact match\n if (!pattern.includes('*')) {\n return pattern === hostname;\n }\n\n // Convert the pattern to a regex\n // First, escape all regex special characters except *\n let regexPattern = pattern.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n // Use a placeholder for ** to handle it separately from single *\n const doubleWildcardPlaceholder = '\\x00DOUBLE_WILDCARD\\x00';\n regexPattern = regexPattern.replace(/\\*\\*/g, doubleWildcardPlaceholder);\n\n // Replace single * with a pattern that matches anything except dots\n regexPattern = regexPattern.replace(/\\*/g, '[^.]*');\n\n // Replace the double wildcard placeholder with a pattern that matches anything including dots\n regexPattern = regexPattern.replace(new RegExp(doubleWildcardPlaceholder, 'g'), '.*');\n\n // Anchor the pattern to match the entire hostname\n regexPattern = '^' + regexPattern + '$';\n\n try {\n const regex = new RegExp(regexPattern);\n return regex.test(hostname);\n } catch {\n return false;\n }\n}\nimport.meta.vitest?.test(\"matchHostnamePattern\", ({ expect }) => {\n // Test exact matches\n expect(matchHostnamePattern(\"example.com\", \"example.com\")).toBe(true);\n expect(matchHostnamePattern(\"example.com\", \"other.com\")).toBe(false);\n\n // Test single wildcard matches\n expect(matchHostnamePattern(\"*.example.com\", \"api.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"*.example.com\", \"www.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"*.example.com\", \"example.com\")).toBe(false);\n expect(matchHostnamePattern(\"*.example.com\", \"api.v2.example.com\")).toBe(false);\n\n // Test double wildcard matches\n expect(matchHostnamePattern(\"**.example.com\", \"api.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"api.v2.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"a.b.c.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"**.example.com\", \"example.com\")).toBe(false);\n\n // Test complex patterns\n expect(matchHostnamePattern(\"api-*.example.com\", \"api-v1.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"api-*.example.com\", \"api-v2.example.com\")).toBe(true);\n expect(matchHostnamePattern(\"api-*.example.com\", \"api.example.com\")).toBe(false);\n expect(matchHostnamePattern(\"*.*.org\", \"mail.example.org\")).toBe(true);\n expect(matchHostnamePattern(\"*.*.org\", \"example.org\")).toBe(false);\n});\n\nexport function getHardcodedFallbackUrls(primaryBaseUrl: string): string[] {\n // `defaultBaseUrl` in `@stackframe/*` SDK builds is `https://api.stack-auth.com`\n // (see `packages/template/src/lib/hexclave-app/apps/implementations/common.ts`).\n // The `@hexclave/*` mirror packages will get this rewritten to the hexclave\n // hostname by `scripts/rewrite-packages-to-hexclave.ts` in a follow-up PR; both\n // branches below stay listed so either build resolves its own fallback set.\n if (primaryBaseUrl === \"https://api.stack-auth.com\") {\n return [\"https://api1.stack-auth.com\", \"https://api2.stack-auth.com\"];\n }\n if (primaryBaseUrl === \"https://api.dev.stack-auth.com\") {\n return [\"https://api1.dev.stack-auth.com\", \"https://api2.dev.stack-auth.com\"];\n }\n if (primaryBaseUrl === \"https://api.hexclave.com\") {\n return [\"https://api1.hexclave.com\", \"https://api2.hexclave.com\"];\n }\n if (primaryBaseUrl === \"https://api.dev.hexclave.com\") {\n return [\"https://api1.dev.hexclave.com\", \"https://api2.dev.hexclave.com\"];\n }\n const localhostMatch = primaryBaseUrl.match(/^http:\\/\\/localhost:(\\d+)02$/);\n if (localhostMatch) {\n return [`http://localhost:${localhostMatch[1]}10`];\n }\n return [];\n}\n\nexport function getDefaultApiUrls(primaryBaseUrl: string): string[] {\n return [primaryBaseUrl, ...getHardcodedFallbackUrls(primaryBaseUrl)];\n}\n\nexport function isLocalhost(urlOrString: string | URL) {\n const url = createUrlIfValid(urlOrString);\n if (!url) return false;\n if (url.hostname === \"localhost\" || url.hostname.endsWith(\".localhost\")) return true;\n if (url.hostname.match(/^127\\.\\d+\\.\\d+\\.\\d+$/)) return true;\n if (url.hostname === \"[::1]\" || url.hostname === \"::1\") return true;\n return false;\n}\nimport.meta.vitest?.test(\"isLocalhost\", ({ expect }) => {\n // Test with localhost URLs\n expect(isLocalhost(\"http://localhost\")).toBe(true);\n expect(isLocalhost(\"https://localhost:8080\")).toBe(true);\n expect(isLocalhost(\"http://sub.localhost\")).toBe(true);\n expect(isLocalhost(\"http://127.0.0.1\")).toBe(true);\n expect(isLocalhost(\"http://127.1.2.3\")).toBe(true);\n expect(isLocalhost(\"http://[::1]\")).toBe(true);\n\n // Test with non-localhost URLs\n expect(isLocalhost(\"https://example.com\")).toBe(false);\n expect(isLocalhost(\"http://192.168.1.1\")).toBe(false);\n expect(isLocalhost(\"http://10.0.0.1\")).toBe(false);\n\n // Test with URL objects\n expect(isLocalhost(new URL(\"http://localhost\"))).toBe(true);\n expect(isLocalhost(new URL(\"https://example.com\"))).toBe(false);\n\n // Test with invalid URLs\n expect(isLocalhost(\"not a url\")).toBe(false);\n expect(isLocalhost(\"\")).toBe(false);\n});\n\nexport function isRelative(url: string) {\n const randomDomain = `${generateSecureRandomString()}.stack-auth.example.com`;\n const u = createUrlIfValid(url, `https://${randomDomain}`);\n if (!u) return false;\n if (u.host !== randomDomain) return false;\n if (u.protocol !== \"https:\") return false;\n return true;\n}\nimport.meta.vitest?.test(\"isRelative\", ({ expect }) => {\n // We can't easily mock generateSecureRandomString in this context\n // but we can still test the function's behavior\n\n // Test with relative URLs\n expect(isRelative(\"/\")).toBe(true);\n expect(isRelative(\"/path\")).toBe(true);\n expect(isRelative(\"/path?query=value#hash\")).toBe(true);\n\n // Test with absolute URLs\n expect(isRelative(\"https://example.com\")).toBe(false);\n expect(isRelative(\"http://example.com\")).toBe(false);\n expect(isRelative(\"//example.com\")).toBe(false);\n\n // Note: The implementation treats empty strings and invalid URLs as relative\n // This is because they can be resolved against a base URL\n expect(isRelative(\"\")).toBe(true);\n expect(isRelative(\"not a url\")).toBe(true);\n});\n\nexport function getRelativePart(url: URL) {\n return url.pathname + url.search + url.hash;\n}\nimport.meta.vitest?.test(\"getRelativePart\", ({ expect }) => {\n // Test with various URLs\n expect(getRelativePart(new URL(\"https://example.com\"))).toBe(\"/\");\n expect(getRelativePart(new URL(\"https://example.com/path\"))).toBe(\"/path\");\n expect(getRelativePart(new URL(\"https://example.com/path?query=value\"))).toBe(\"/path?query=value\");\n expect(getRelativePart(new URL(\"https://example.com/path#hash\"))).toBe(\"/path#hash\");\n expect(getRelativePart(new URL(\"https://example.com/path?query=value#hash\"))).toBe(\"/path?query=value#hash\");\n\n // Test with different domains but same paths\n const url1 = new URL(\"https://example.com/path?query=value#hash\");\n const url2 = new URL(\"https://different.com/path?query=value#hash\");\n expect(getRelativePart(url1)).toBe(getRelativePart(url2));\n});\n\n/**\n * A template literal tag that returns a URL.\n *\n * Any values passed are encoded.\n */\nexport function url(strings: TemplateStringsArray | readonly string[], ...values: (string | number | boolean)[]): URL {\n return new URL(urlString(strings, ...values));\n}\nimport.meta.vitest?.test(\"url\", ({ expect }) => {\n // Test with no interpolation\n expect(url`https://example.com`).toBeInstanceOf(URL);\n expect(url`https://example.com`.href).toBe(\"https://example.com/\");\n\n // Test with string interpolation\n expect(url`https://example.com/${\"path\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path\"}`.pathname).toBe(\"/path\");\n\n // Test with number interpolation\n expect(url`https://example.com/${42}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${42}`.pathname).toBe(\"/42\");\n\n // Test with boolean interpolation\n expect(url`https://example.com/${true}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${true}`.pathname).toBe(\"/true\");\n\n // Test with special characters in interpolation\n expect(url`https://example.com/${\"path with spaces\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path with spaces\"}`.pathname).toBe(\"/path%20with%20spaces\");\n\n // Test with multiple interpolations\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`).toBeInstanceOf(URL);\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`.pathname).toBe(\"/path\");\n expect(url`https://example.com/${\"path\"}?query=${\"value\"}`.search).toBe(\"?query=value\");\n});\n\n\n/**\n * A template literal tag that returns a URL string.\n *\n * Any values passed are encoded.\n */\nexport function urlString(strings: TemplateStringsArray | readonly string[], ...values: (string | number | boolean)[]): string {\n return templateIdentity(strings, ...values.map(encodeURIComponent));\n}\nimport.meta.vitest?.test(\"urlString\", ({ expect }) => {\n // Test with no interpolation\n expect(urlString`https://example.com`).toBe(\"https://example.com\");\n\n // Test with string interpolation\n expect(urlString`https://example.com/${\"path\"}`).toBe(\"https://example.com/path\");\n\n // Test with number interpolation\n expect(urlString`https://example.com/${42}`).toBe(\"https://example.com/42\");\n\n // Test with boolean interpolation\n expect(urlString`https://example.com/${true}`).toBe(\"https://example.com/true\");\n\n // Test with special characters in interpolation\n expect(urlString`https://example.com/${\"path with spaces\"}`).toBe(\"https://example.com/path%20with%20spaces\");\n expect(urlString`https://example.com/${\"?&=\"}`).toBe(\"https://example.com/%3F%26%3D\");\n\n // Test with multiple interpolations\n expect(urlString`https://example.com/${\"path\"}?query=${\"value\"}`).toBe(\"https://example.com/path?query=value\");\n expect(urlString`https://example.com/${\"path\"}?query=${\"value with spaces\"}`).toBe(\"https://example.com/path?query=value%20with%20spaces\");\n});\n\nexport function isChildUrl(parentUrl: URL, maybeChildUrl: URL) {\n return parentUrl.origin === maybeChildUrl.origin\n && isChildPath(parentUrl.pathname, maybeChildUrl.pathname)\n && [...parentUrl.searchParams].every(([key, value]) => maybeChildUrl.searchParams.get(key) === value)\n && (!parentUrl.hash || parentUrl.hash === maybeChildUrl.hash);\n}\nimport.meta.vitest?.test(\"isChildUrl\", ({ expect }) => {\n // true\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path?query=value\"))).toBe(true);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://abc.com/path?query=value#hash\"))).toBe(true);\n\n // false\n expect(isChildUrl(new URL(\"https://abc.com\"), new URL(\"https://example.com\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path?query=value\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://abc.com/\"), new URL(\"https://example.com/path?query=value#hash\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://example.com\"), new URL(\"https://abc.com/path?query=value#hash\"))).toBe(false);\n expect(isChildUrl(new URL(\"https://example.com?query=value123\"), new URL(\"https://example.com/path?query=value#hash\"))).toBe(false);\n});\n\nexport function isChildPath(parentPath: string, maybeChildPath: string) {\n parentPath = parentPath.endsWith(\"/\") ? parentPath : parentPath + \"/\";\n maybeChildPath = maybeChildPath.endsWith(\"/\") ? maybeChildPath : maybeChildPath + \"/\";\n return maybeChildPath.startsWith(parentPath);\n}\nimport.meta.vitest?.test(\"isSubPath\", ({ expect }) => {\n expect(isChildPath(\"/\", \"/\")).toBe(true);\n expect(isChildPath(\"/\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path\", \"/\")).toBe(false);\n expect(isChildPath(\"/path\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path/\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path/\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path/abc\")).toBe(true);\n expect(isChildPath(\"/path/\", \"/path/abc\")).toBe(true);\n expect(isChildPath(\"/path\", \"/path-abc\")).toBe(false);\n expect(isChildPath(\"/path\", \"/path-abc/\")).toBe(false);\n expect(isChildPath(\"/path/\", \"/path-abc\")).toBe(false);\n expect(isChildPath(\"/path/\", \"/path-abc/\")).toBe(false);\n});\n"],"mappings":";;;;AAGA,SAAgB,iBAAiB,GAAG,MAAyC;CAC3E,IAAI;EACF,OAAO,IAAI,IAAI,GAAG,IAAI;CACxB,SAAS,GAAG;EACV,OAAO;CACT;AACF;AAaA,SAAgB,WAAW,KAAa;CACtC,OAAO,CAAC,CAAC,iBAAiB,GAAG;AAC/B;AAaA,SAAgB,gBAAgB,UAAkB;CAEhD,IAAI,CAAC,YAAY,SAAS,WAAW,GAAG,KAAK,SAAS,SAAS,GAAG,KAAK,SAAS,SAAS,IAAI,GAC3F,OAAO;CAGT,MAAM,MAAM,iBAAiB,WAAW,UAAU;CAClD,IAAI,CAAC,KAAK,OAAO;CACjB,OAAO,IAAI,aAAa;AAC1B;AAeA,SAAgB,6BAA6B,UAAkB;CAE7D,IAAI,CAAC,UAAU,OAAO;CAKtB,IAAI,CAFgB,SAAS,SAAS,GAEvB,GAEb,OAAO,gBAAgB,QAAQ;CAKjC,IAAI,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AAM,KAAK,MAChG,CAAC,UAAU,QAAQ,UAAU,SAAS,cAAc;AAC5D;AAiBA,SAAgB,YAAY,YAAoB,gBAAwB;CACtE,aAAa,WAAW,SAAS,GAAG,IAAI,aAAa,aAAa;CAClE,iBAAiB,eAAe,SAAS,GAAG,IAAI,iBAAiB,iBAAiB;CAClF,OAAO,eAAe,WAAW,UAAU;AAC7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuids.d.ts","names":[],"sources":["../../src/utils/uuids.tsx"],"mappings":";iBAEgB,YAAA
|
|
1
|
+
{"version":3,"file":"uuids.d.ts","names":[],"sources":["../../src/utils/uuids.tsx"],"mappings":";iBAEgB,YAAA;AAAA,iBAsBA,MAAA,CAAO,GAAW"}
|
package/dist/utils/uuids.js
CHANGED
|
@@ -1,39 +1,14 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
const require_chunk = require('../chunk-BE-pF4vm.js');
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
2
|
let __crypto_js = require("./crypto.js");
|
|
4
|
-
|
|
5
3
|
//#region src/utils/uuids.tsx
|
|
6
4
|
function generateUuid() {
|
|
7
|
-
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ (0, __crypto_js.generateRandomValues)(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16));
|
|
5
|
+
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ (0, __crypto_js.generateRandomValues)(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> +c / 4).toString(16));
|
|
8
6
|
}
|
|
9
|
-
(void 0)?.test("generateUuid", ({ expect }) => {
|
|
10
|
-
const uuid = generateUuid();
|
|
11
|
-
expect(uuid).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/);
|
|
12
|
-
const uuid2 = generateUuid();
|
|
13
|
-
expect(uuid).not.toBe(uuid2);
|
|
14
|
-
expect(uuid.charAt(14)).toBe("4");
|
|
15
|
-
expect("89ab").toContain(uuid.charAt(19));
|
|
16
|
-
});
|
|
17
7
|
function isUuid(str) {
|
|
18
8
|
return /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(str);
|
|
19
9
|
}
|
|
20
|
-
(void 0)?.test("isUuid", ({ expect }) => {
|
|
21
|
-
expect(isUuid("123e4567-e89b-42d3-a456-426614174000")).toBe(true);
|
|
22
|
-
expect(isUuid("123e4567-e89b-42d3-8456-426614174000")).toBe(true);
|
|
23
|
-
expect(isUuid("123e4567-e89b-42d3-9456-426614174000")).toBe(true);
|
|
24
|
-
expect(isUuid("123e4567-e89b-42d3-a456-426614174000")).toBe(true);
|
|
25
|
-
expect(isUuid("123e4567-e89b-42d3-b456-426614174000")).toBe(true);
|
|
26
|
-
expect(isUuid("")).toBe(false);
|
|
27
|
-
expect(isUuid("not-a-uuid")).toBe(false);
|
|
28
|
-
expect(isUuid("123e4567-e89b-12d3-a456-426614174000")).toBe(false);
|
|
29
|
-
expect(isUuid("123e4567-e89b-42d3-c456-426614174000")).toBe(false);
|
|
30
|
-
expect(isUuid("123e4567-e89b-42d3-a456-42661417400")).toBe(false);
|
|
31
|
-
expect(isUuid("123e4567-e89b-42d3-a456-4266141740000")).toBe(false);
|
|
32
|
-
expect(isUuid("123e4567-e89b-42d3-a456_426614174000")).toBe(false);
|
|
33
|
-
expect(isUuid("123E4567-E89B-42D3-A456-426614174000")).toBe(false);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
10
|
//#endregion
|
|
37
11
|
exports.generateUuid = generateUuid;
|
|
38
12
|
exports.isUuid = isUuid;
|
|
13
|
+
|
|
39
14
|
//# sourceMappingURL=uuids.js.map
|
package/dist/utils/uuids.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuids.js","names":[],"sources":["../../src/utils/uuids.tsx"],"sourcesContent":["import { generateRandomValues } from \"./crypto\";\n\nexport function generateUuid() {\n // crypto.randomUuid is not supported in all browsers, so this is a polyfill\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, c =>\n (+c ^ generateRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)\n );\n}\nimport.meta.vitest?.test(\"generateUuid\", ({ expect }) => {\n // Test that the function returns a valid UUID\n const uuid = generateUuid();\n expect(uuid).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/);\n\n // Test that multiple calls generate different UUIDs\n const uuid2 = generateUuid();\n expect(uuid).not.toBe(uuid2);\n\n // Test that the UUID is version 4 (random)\n expect(uuid.charAt(14)).toBe('4');\n\n // Test that the UUID has the correct variant (8, 9, a, or b in position 19)\n expect('89ab').toContain(uuid.charAt(19));\n});\n\nexport function isUuid(str: string) {\n return /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(str);\n}\nimport.meta.vitest?.test(\"isUuid\", ({ expect }) => {\n // Test with valid UUIDs\n expect(isUuid(\"123e4567-e89b-42d3-a456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-8456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-9456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-a456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-b456-426614174000\")).toBe(true);\n\n // Test with invalid UUIDs\n expect(isUuid(\"\")).toBe(false);\n expect(isUuid(\"not-a-uuid\")).toBe(false);\n expect(isUuid(\"123e4567-e89b-12d3-a456-426614174000\")).toBe(false); // Wrong version (not 4)\n expect(isUuid(\"123e4567-e89b-42d3-c456-426614174000\")).toBe(false); // Wrong variant (not 8, 9, a, or b)\n expect(isUuid(\"123e4567-e89b-42d3-a456-42661417400\")).toBe(false); // Too short\n expect(isUuid(\"123e4567-e89b-42d3-a456-4266141740000\")).toBe(false); // Too long\n expect(isUuid(\"123e4567-e89b-42d3-a456_426614174000\")).toBe(false); // Wrong format (underscore instead of dash)\n\n // Test with uppercase letters (should fail as UUID should be lowercase)\n expect(isUuid(\"123E4567-E89B-42D3-A456-426614174000\")).toBe(false);\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"uuids.js","names":[],"sources":["../../src/utils/uuids.tsx"],"sourcesContent":["import { generateRandomValues } from \"./crypto\";\n\nexport function generateUuid() {\n // crypto.randomUuid is not supported in all browsers, so this is a polyfill\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, c =>\n (+c ^ generateRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)\n );\n}\nimport.meta.vitest?.test(\"generateUuid\", ({ expect }) => {\n // Test that the function returns a valid UUID\n const uuid = generateUuid();\n expect(uuid).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/);\n\n // Test that multiple calls generate different UUIDs\n const uuid2 = generateUuid();\n expect(uuid).not.toBe(uuid2);\n\n // Test that the UUID is version 4 (random)\n expect(uuid.charAt(14)).toBe('4');\n\n // Test that the UUID has the correct variant (8, 9, a, or b in position 19)\n expect('89ab').toContain(uuid.charAt(19));\n});\n\nexport function isUuid(str: string) {\n return /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(str);\n}\nimport.meta.vitest?.test(\"isUuid\", ({ expect }) => {\n // Test with valid UUIDs\n expect(isUuid(\"123e4567-e89b-42d3-a456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-8456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-9456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-a456-426614174000\")).toBe(true);\n expect(isUuid(\"123e4567-e89b-42d3-b456-426614174000\")).toBe(true);\n\n // Test with invalid UUIDs\n expect(isUuid(\"\")).toBe(false);\n expect(isUuid(\"not-a-uuid\")).toBe(false);\n expect(isUuid(\"123e4567-e89b-12d3-a456-426614174000\")).toBe(false); // Wrong version (not 4)\n expect(isUuid(\"123e4567-e89b-42d3-c456-426614174000\")).toBe(false); // Wrong variant (not 8, 9, a, or b)\n expect(isUuid(\"123e4567-e89b-42d3-a456-42661417400\")).toBe(false); // Too short\n expect(isUuid(\"123e4567-e89b-42d3-a456-4266141740000\")).toBe(false); // Too long\n expect(isUuid(\"123e4567-e89b-42d3-a456_426614174000\")).toBe(false); // Wrong format (underscore instead of dash)\n\n // Test with uppercase letters (should fail as UUID should be lowercase)\n expect(isUuid(\"123E4567-E89B-42D3-A456-426614174000\")).toBe(false);\n});\n"],"mappings":";;;AAEA,SAAgB,eAAe;CAE7B,OAAO,uCAAuC,QAAQ,WAAU,OAC7D,CAAC,KAAA,GAAA,YAAA,qBAAA,iBAAyB,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,IAAI,EAAA,CAAG,SAAS,EAAE,CAC9E;AACF;AAiBA,SAAgB,OAAO,KAAa;CAClC,OAAO,wEAAwE,KAAK,GAAG;AACzF"}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import * as yup$1 from "yup";
|
|
2
|
+
|
|
3
|
+
//#region src/interface/webhooks.d.ts
|
|
4
|
+
type WebhookEvent<S extends yup$1.Schema> = {
|
|
5
|
+
type: string;
|
|
6
|
+
schema: S;
|
|
7
|
+
metadata: {
|
|
8
|
+
summary: string;
|
|
9
|
+
description: string;
|
|
10
|
+
tags?: string[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
declare const webhookEvents: readonly [WebhookEvent<yup$1.ObjectSchema<{
|
|
14
|
+
id: string;
|
|
15
|
+
primary_email: string | null;
|
|
16
|
+
primary_email_verified: boolean;
|
|
17
|
+
primary_email_auth_enabled: boolean;
|
|
18
|
+
display_name: string | null;
|
|
19
|
+
selected_team: {
|
|
20
|
+
client_metadata?: {} | null | undefined;
|
|
21
|
+
client_read_only_metadata?: {} | null | undefined;
|
|
22
|
+
server_metadata?: {} | null | undefined;
|
|
23
|
+
display_name: string;
|
|
24
|
+
id: string;
|
|
25
|
+
created_at_millis: number;
|
|
26
|
+
profile_image_url: string | null;
|
|
27
|
+
} | null;
|
|
28
|
+
selected_team_id: string | null;
|
|
29
|
+
profile_image_url: string | null;
|
|
30
|
+
signed_up_at_millis: number;
|
|
31
|
+
has_password: boolean;
|
|
32
|
+
otp_auth_enabled: boolean;
|
|
33
|
+
passkey_auth_enabled: boolean;
|
|
34
|
+
client_metadata: {} | null;
|
|
35
|
+
client_read_only_metadata: {} | null;
|
|
36
|
+
server_metadata: {} | null;
|
|
37
|
+
last_active_at_millis: number;
|
|
38
|
+
is_anonymous: boolean;
|
|
39
|
+
is_restricted: boolean;
|
|
40
|
+
restricted_reason: {
|
|
41
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
42
|
+
} | null;
|
|
43
|
+
restricted_by_admin: boolean;
|
|
44
|
+
restricted_by_admin_reason: string | null;
|
|
45
|
+
restricted_by_admin_private_details: string | null;
|
|
46
|
+
country_code: string | null;
|
|
47
|
+
risk_scores: {
|
|
48
|
+
sign_up: {
|
|
49
|
+
bot: number;
|
|
50
|
+
free_trial_abuse: number;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
oauth_providers: {
|
|
54
|
+
email?: string | null | undefined;
|
|
55
|
+
id: string;
|
|
56
|
+
account_id: string;
|
|
57
|
+
}[];
|
|
58
|
+
auth_with_email: boolean;
|
|
59
|
+
requires_totp_mfa: boolean;
|
|
60
|
+
}, yup$1.AnyObject, {
|
|
61
|
+
id: undefined;
|
|
62
|
+
primary_email: undefined;
|
|
63
|
+
primary_email_verified: undefined;
|
|
64
|
+
primary_email_auth_enabled: undefined;
|
|
65
|
+
display_name: undefined;
|
|
66
|
+
selected_team: {
|
|
67
|
+
id: undefined;
|
|
68
|
+
display_name: undefined;
|
|
69
|
+
profile_image_url: undefined;
|
|
70
|
+
client_metadata: undefined;
|
|
71
|
+
client_read_only_metadata: undefined;
|
|
72
|
+
created_at_millis: undefined;
|
|
73
|
+
server_metadata: undefined;
|
|
74
|
+
};
|
|
75
|
+
selected_team_id: undefined;
|
|
76
|
+
profile_image_url: undefined;
|
|
77
|
+
signed_up_at_millis: undefined;
|
|
78
|
+
has_password: undefined;
|
|
79
|
+
otp_auth_enabled: undefined;
|
|
80
|
+
passkey_auth_enabled: undefined;
|
|
81
|
+
client_metadata: undefined;
|
|
82
|
+
client_read_only_metadata: undefined;
|
|
83
|
+
server_metadata: undefined;
|
|
84
|
+
last_active_at_millis: undefined;
|
|
85
|
+
is_anonymous: undefined;
|
|
86
|
+
is_restricted: undefined;
|
|
87
|
+
restricted_reason: {
|
|
88
|
+
type: undefined;
|
|
89
|
+
};
|
|
90
|
+
restricted_by_admin: undefined;
|
|
91
|
+
restricted_by_admin_reason: undefined;
|
|
92
|
+
restricted_by_admin_private_details: undefined;
|
|
93
|
+
country_code: undefined;
|
|
94
|
+
risk_scores: {
|
|
95
|
+
sign_up: {
|
|
96
|
+
bot: undefined;
|
|
97
|
+
free_trial_abuse: undefined;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
oauth_providers: undefined;
|
|
101
|
+
auth_with_email: undefined;
|
|
102
|
+
requires_totp_mfa: undefined;
|
|
103
|
+
}, "">>, WebhookEvent<yup$1.ObjectSchema<{
|
|
104
|
+
id: string;
|
|
105
|
+
primary_email: string | null;
|
|
106
|
+
primary_email_verified: boolean;
|
|
107
|
+
primary_email_auth_enabled: boolean;
|
|
108
|
+
display_name: string | null;
|
|
109
|
+
selected_team: {
|
|
110
|
+
client_metadata?: {} | null | undefined;
|
|
111
|
+
client_read_only_metadata?: {} | null | undefined;
|
|
112
|
+
server_metadata?: {} | null | undefined;
|
|
113
|
+
display_name: string;
|
|
114
|
+
id: string;
|
|
115
|
+
created_at_millis: number;
|
|
116
|
+
profile_image_url: string | null;
|
|
117
|
+
} | null;
|
|
118
|
+
selected_team_id: string | null;
|
|
119
|
+
profile_image_url: string | null;
|
|
120
|
+
signed_up_at_millis: number;
|
|
121
|
+
has_password: boolean;
|
|
122
|
+
otp_auth_enabled: boolean;
|
|
123
|
+
passkey_auth_enabled: boolean;
|
|
124
|
+
client_metadata: {} | null;
|
|
125
|
+
client_read_only_metadata: {} | null;
|
|
126
|
+
server_metadata: {} | null;
|
|
127
|
+
last_active_at_millis: number;
|
|
128
|
+
is_anonymous: boolean;
|
|
129
|
+
is_restricted: boolean;
|
|
130
|
+
restricted_reason: {
|
|
131
|
+
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
132
|
+
} | null;
|
|
133
|
+
restricted_by_admin: boolean;
|
|
134
|
+
restricted_by_admin_reason: string | null;
|
|
135
|
+
restricted_by_admin_private_details: string | null;
|
|
136
|
+
country_code: string | null;
|
|
137
|
+
risk_scores: {
|
|
138
|
+
sign_up: {
|
|
139
|
+
bot: number;
|
|
140
|
+
free_trial_abuse: number;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
oauth_providers: {
|
|
144
|
+
email?: string | null | undefined;
|
|
145
|
+
id: string;
|
|
146
|
+
account_id: string;
|
|
147
|
+
}[];
|
|
148
|
+
auth_with_email: boolean;
|
|
149
|
+
requires_totp_mfa: boolean;
|
|
150
|
+
}, yup$1.AnyObject, {
|
|
151
|
+
id: undefined;
|
|
152
|
+
primary_email: undefined;
|
|
153
|
+
primary_email_verified: undefined;
|
|
154
|
+
primary_email_auth_enabled: undefined;
|
|
155
|
+
display_name: undefined;
|
|
156
|
+
selected_team: {
|
|
157
|
+
id: undefined;
|
|
158
|
+
display_name: undefined;
|
|
159
|
+
profile_image_url: undefined;
|
|
160
|
+
client_metadata: undefined;
|
|
161
|
+
client_read_only_metadata: undefined;
|
|
162
|
+
created_at_millis: undefined;
|
|
163
|
+
server_metadata: undefined;
|
|
164
|
+
};
|
|
165
|
+
selected_team_id: undefined;
|
|
166
|
+
profile_image_url: undefined;
|
|
167
|
+
signed_up_at_millis: undefined;
|
|
168
|
+
has_password: undefined;
|
|
169
|
+
otp_auth_enabled: undefined;
|
|
170
|
+
passkey_auth_enabled: undefined;
|
|
171
|
+
client_metadata: undefined;
|
|
172
|
+
client_read_only_metadata: undefined;
|
|
173
|
+
server_metadata: undefined;
|
|
174
|
+
last_active_at_millis: undefined;
|
|
175
|
+
is_anonymous: undefined;
|
|
176
|
+
is_restricted: undefined;
|
|
177
|
+
restricted_reason: {
|
|
178
|
+
type: undefined;
|
|
179
|
+
};
|
|
180
|
+
restricted_by_admin: undefined;
|
|
181
|
+
restricted_by_admin_reason: undefined;
|
|
182
|
+
restricted_by_admin_private_details: undefined;
|
|
183
|
+
country_code: undefined;
|
|
184
|
+
risk_scores: {
|
|
185
|
+
sign_up: {
|
|
186
|
+
bot: undefined;
|
|
187
|
+
free_trial_abuse: undefined;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
oauth_providers: undefined;
|
|
191
|
+
auth_with_email: undefined;
|
|
192
|
+
requires_totp_mfa: undefined;
|
|
193
|
+
}, "">>, WebhookEvent<yup$1.ObjectSchema<{
|
|
194
|
+
id: string;
|
|
195
|
+
teams: {
|
|
196
|
+
id: string;
|
|
197
|
+
}[];
|
|
198
|
+
}, yup$1.AnyObject, {
|
|
199
|
+
id: undefined;
|
|
200
|
+
teams: undefined;
|
|
201
|
+
}, "">>, {
|
|
202
|
+
type: string;
|
|
203
|
+
schema: yup$1.ObjectSchema<{
|
|
204
|
+
id: string;
|
|
205
|
+
display_name: string;
|
|
206
|
+
profile_image_url: string | null;
|
|
207
|
+
client_metadata: {} | null | undefined;
|
|
208
|
+
client_read_only_metadata: {} | null | undefined;
|
|
209
|
+
} & {
|
|
210
|
+
created_at_millis: number;
|
|
211
|
+
server_metadata: {} | null | undefined;
|
|
212
|
+
}, yup$1.AnyObject, {
|
|
213
|
+
id: undefined;
|
|
214
|
+
display_name: undefined;
|
|
215
|
+
profile_image_url: undefined;
|
|
216
|
+
client_metadata: undefined;
|
|
217
|
+
client_read_only_metadata: undefined;
|
|
218
|
+
created_at_millis: undefined;
|
|
219
|
+
server_metadata: undefined;
|
|
220
|
+
}, "">;
|
|
221
|
+
metadata: {
|
|
222
|
+
summary: string;
|
|
223
|
+
description: string;
|
|
224
|
+
tags: string[];
|
|
225
|
+
};
|
|
226
|
+
}, {
|
|
227
|
+
type: string;
|
|
228
|
+
schema: yup$1.ObjectSchema<{
|
|
229
|
+
id: string;
|
|
230
|
+
display_name: string;
|
|
231
|
+
profile_image_url: string | null;
|
|
232
|
+
client_metadata: {} | null | undefined;
|
|
233
|
+
client_read_only_metadata: {} | null | undefined;
|
|
234
|
+
} & {
|
|
235
|
+
created_at_millis: number;
|
|
236
|
+
server_metadata: {} | null | undefined;
|
|
237
|
+
}, yup$1.AnyObject, {
|
|
238
|
+
id: undefined;
|
|
239
|
+
display_name: undefined;
|
|
240
|
+
profile_image_url: undefined;
|
|
241
|
+
client_metadata: undefined;
|
|
242
|
+
client_read_only_metadata: undefined;
|
|
243
|
+
created_at_millis: undefined;
|
|
244
|
+
server_metadata: undefined;
|
|
245
|
+
}, "">;
|
|
246
|
+
metadata: {
|
|
247
|
+
summary: string;
|
|
248
|
+
description: string;
|
|
249
|
+
tags: string[];
|
|
250
|
+
};
|
|
251
|
+
}, {
|
|
252
|
+
type: string;
|
|
253
|
+
schema: yup$1.ObjectSchema<{
|
|
254
|
+
id: string;
|
|
255
|
+
}, yup$1.AnyObject, {
|
|
256
|
+
id: undefined;
|
|
257
|
+
}, "">;
|
|
258
|
+
metadata: {
|
|
259
|
+
summary: string;
|
|
260
|
+
description: string;
|
|
261
|
+
tags: string[];
|
|
262
|
+
};
|
|
263
|
+
}, {
|
|
264
|
+
type: string;
|
|
265
|
+
schema: yup$1.ObjectSchema<{
|
|
266
|
+
team_id: string;
|
|
267
|
+
user_id: string;
|
|
268
|
+
}, yup$1.AnyObject, {
|
|
269
|
+
team_id: undefined;
|
|
270
|
+
user_id: undefined;
|
|
271
|
+
}, "">;
|
|
272
|
+
metadata: {
|
|
273
|
+
summary: string;
|
|
274
|
+
description: string;
|
|
275
|
+
tags: string[];
|
|
276
|
+
};
|
|
277
|
+
}, {
|
|
278
|
+
type: string;
|
|
279
|
+
schema: yup$1.ObjectSchema<{
|
|
280
|
+
team_id: string;
|
|
281
|
+
user_id: string;
|
|
282
|
+
}, yup$1.AnyObject, {
|
|
283
|
+
team_id: undefined;
|
|
284
|
+
user_id: undefined;
|
|
285
|
+
}, "">;
|
|
286
|
+
metadata: {
|
|
287
|
+
summary: string;
|
|
288
|
+
description: string;
|
|
289
|
+
tags: string[];
|
|
290
|
+
};
|
|
291
|
+
}, {
|
|
292
|
+
type: string;
|
|
293
|
+
schema: yup$1.ObjectSchema<{
|
|
294
|
+
id: string;
|
|
295
|
+
user_id: string;
|
|
296
|
+
team_id: string;
|
|
297
|
+
}, yup$1.AnyObject, {
|
|
298
|
+
id: undefined;
|
|
299
|
+
user_id: undefined;
|
|
300
|
+
team_id: undefined;
|
|
301
|
+
}, "">;
|
|
302
|
+
metadata: {
|
|
303
|
+
summary: string;
|
|
304
|
+
description: string;
|
|
305
|
+
tags: string[];
|
|
306
|
+
};
|
|
307
|
+
}, {
|
|
308
|
+
type: string;
|
|
309
|
+
schema: yup$1.ObjectSchema<{
|
|
310
|
+
id: string;
|
|
311
|
+
user_id: string;
|
|
312
|
+
team_id: string;
|
|
313
|
+
}, yup$1.AnyObject, {
|
|
314
|
+
id: undefined;
|
|
315
|
+
user_id: undefined;
|
|
316
|
+
team_id: undefined;
|
|
317
|
+
}, "">;
|
|
318
|
+
metadata: {
|
|
319
|
+
summary: string;
|
|
320
|
+
description: string;
|
|
321
|
+
tags: string[];
|
|
322
|
+
};
|
|
323
|
+
}];
|
|
324
|
+
//#endregion
|
|
325
|
+
export { webhookEvents as n, WebhookEvent as t };
|
|
326
|
+
//# sourceMappingURL=webhooks-8Ts1Clcb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks-8Ts1Clcb.d.ts","names":[],"sources":["../src/interface/webhooks.ts"],"mappings":";;;KAMY,YAAA,WAAuB,KAAA,CAAI,MAAA;EACrC,IAAA;EACA,MAAA,EAAQ,CAAC;EACT,QAAA;IACE,OAAA;IACA,WAAA;IACA,IAAA;EAAA;AAAA;AAAA,cAIS,aAAA,YAAa,YAAA,CAAA,KAAA,CAAA,YAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hexclave/shared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.42",
|
|
4
4
|
"repository": "https://github.com/hexclave/hexclave",
|
|
5
5
|
"files": [
|
|
6
6
|
"README.md",
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@aws-sdk/client-kms": "^3.876.0",
|
|
58
58
|
"@aws-sdk/credential-provider-web-identity": "^3.972.27",
|
|
59
|
-
"@babel/core": "^7.28.5",
|
|
60
59
|
"@babel/generator": "^7.28.5",
|
|
61
60
|
"@babel/parser": "^7.28.5",
|
|
62
61
|
"@babel/traverse": "^7.28.5",
|
|
@@ -72,16 +71,12 @@
|
|
|
72
71
|
"ip-regex": "^5.0.0",
|
|
73
72
|
"jiti": "^2.4.2",
|
|
74
73
|
"jose": "^6.1.3",
|
|
75
|
-
"oauth4webapi": "^3.8.3"
|
|
76
|
-
"semver": "^7.6.3"
|
|
74
|
+
"oauth4webapi": "^3.8.3"
|
|
77
75
|
},
|
|
78
76
|
"devDependencies": {
|
|
79
|
-
"@sentry/nextjs": "^10.11.0",
|
|
80
|
-
"@types/babel__core": "^7.20.5",
|
|
81
77
|
"@types/babel__generator": "^7.27.0",
|
|
82
78
|
"@types/babel__traverse": "^7.28.0",
|
|
83
79
|
"@types/elliptic": "^6.4.18",
|
|
84
|
-
"@types/semver": "^7.5.8",
|
|
85
80
|
"react": "^19.0.1",
|
|
86
81
|
"react-dom": "^19.0.1",
|
|
87
82
|
"rimraf": "^6.1.2"
|
|
@@ -91,7 +86,6 @@
|
|
|
91
86
|
"typecheck": "tsc --noEmit",
|
|
92
87
|
"test": "vitest run",
|
|
93
88
|
"clean": "rimraf dist && rimraf node_modules",
|
|
94
|
-
"dev": "tsdown --watch",
|
|
95
89
|
"lint": "eslint --ext .tsx,.ts ."
|
|
96
90
|
}
|
|
97
91
|
}
|