From 84823975144ee9fc19439f46dd9978a55b59c377 Mon Sep 17 00:00:00 2001 From: John Yeo Date: Fri, 3 Oct 2025 12:51:29 +0100 Subject: [PATCH 01/35] wip --- .gitmodules | 4 + {package => autumn-js}/.npmignore | 0 {package => autumn-js}/LICENSE.md | 0 {package => autumn-js}/README.md | 0 {package => autumn-js}/components.json | 0 {package => autumn-js}/package.json | 1 + {package => autumn-js}/postcss.config.js | 0 {package => autumn-js}/publish.sh | 0 .../scripts/css-transform-plugin.js | 0 {package => autumn-js}/scripts/post-build.js | 0 .../scripts/sync-registry.ts | 0 autumn-js/src/generated/css-content.ts | 1219 ++++ .../src/libraries/backend/better-auth.ts | 22 +- .../src/libraries/backend/constants.ts | 0 .../src/libraries/backend/elysia.ts | 12 +- .../src/libraries/backend/express.ts | 8 +- .../src/libraries/backend/fastify.ts | 7 +- .../src/libraries/backend/hono.ts | 8 +- .../src/libraries/backend/index.ts | 6 +- .../src/libraries/backend/next.ts | 7 +- .../src/libraries/backend/react-router.ts | 4 +- .../libraries/backend/routes/backendRouter.ts | 22 +- .../src/libraries/backend/routes/basePath.ts | 0 .../libraries/backend/routes/entityRoutes.ts | 29 +- .../src/libraries/backend/routes/genRoutes.ts | 45 +- .../libraries/backend/routes/productRoutes.ts | 8 +- .../backend/routes/referralRoutes.ts | 0 .../src/libraries/backend/schemas/zod.ts | 0 .../src/libraries/backend/supabase.ts | 4 +- .../src/libraries/backend/tanstack.ts | 8 +- .../libraries/backend/utils/AuthFunction.ts | 0 .../src/libraries/backend/utils/backendRes.ts | 0 .../backend/utils/betterAuth/middlewares.ts | 0 .../backend/utils/betterAuth/types.ts | 2 +- .../backend/utils/logBackendErrors.ts | 0 .../libraries/backend/utils/secretKeyCheck.ts | 0 .../src/libraries/backend/utils/withAuth.ts | 0 .../src/libraries/react/AutumnContext.tsx | 0 .../libraries/react/BaseAutumnProvider.tsx | 0 .../libraries/react/ReactAutumnProvider.tsx | 0 .../react/client/ConvexAutumnClient.tsx | 3 +- .../react/client/ReactAutumnClient.tsx | 13 +- .../react/client/clientCompMethods.ts | 9 + .../react/client/clientCusMethods.ts | 0 .../react/client/clientEntityMethods.ts | 0 .../react/client/clientGenMethods.ts | 0 .../react/client/clientProdMethods.ts | 0 .../react/client/clientReferralMethods.ts | 0 .../react/client/types/clientAttachTypes.ts | 0 .../react/client/types/clientCusTypes.ts | 0 .../react/client/types/clientEntTypes.ts | 0 .../react/client/types/clientGenTypes.ts | 0 .../client/types/clientPricingTableTypes.ts | 0 .../react/client/types/clientProdTypes.ts | 0 .../react/client/types/clientReferralTypes.ts | 0 .../react/client/types/responseTypes.ts | 0 .../checkout-dialog-synced.tsx | 0 .../checkout-dialog/lib/checkout-content.tsx | 0 .../paywall-dialog/lib/paywall-content.tsx | 0 .../paywall-dialog/paywall-dialog-synced.tsx | 0 .../lib/pricing-table-content.tsx | 0 .../pricing-table/pricing-table-synced.tsx | 0 .../react/components/ui/accordion.tsx | 0 .../libraries/react/components/ui/button.tsx | 0 .../libraries/react/components/ui/dialog.tsx | 0 .../libraries/react/components/ui/input.tsx | 0 .../libraries/react/components/ui/popover.tsx | 0 .../libraries/react/components/ui/switch.tsx | 0 .../react/errorUtils/logAuthError.ts | 0 .../react/errorUtils/logFetchError.ts | 0 .../react/hooks/helpers/handleCheck.ts | 0 .../react/hooks/helpers/useAutumnBase.tsx | 0 .../react/hooks/helpers/useDialog.tsx | 0 .../libraries/react/hooks/useAnalytics.tsx | 0 .../src/libraries/react/hooks/useCustomer.tsx | 0 .../libraries/react/hooks/useCustomerBase.tsx | 0 .../src/libraries/react/hooks/useEntity.tsx | 0 .../libraries/react/hooks/useEntityBase.tsx | 0 .../src/libraries/react/hooks/usePaywall.tsx | 0 .../libraries/react/hooks/usePricingTable.tsx | 0 .../react/hooks/usePricingTableBase.tsx | 0 .../libraries/react/hooks/useProductsBase.tsx | 0 .../src/libraries/react/index.ts | 2 +- .../src/libraries/react/lib/utils.ts | 0 .../libraries/react/utils/compareParams.ts | 0 .../src/libraries/react/utils/errorUtils.ts | 0 .../libraries/react/utils/inject-styles.ts | 0 autumn-js/src/sdk/index.ts | 3 + {package => autumn-js}/src/styles/global.css | 0 .../src/styles/global_old.css | 0 .../src/utils/entityUtils.tsx | 0 {package => autumn-js}/src/utils/logger.ts | 0 .../src/utils/toSnakeCase.ts | 0 {package => autumn-js}/tailwind.config.ts | 0 {package => autumn-js}/tsconfig.json | 0 {package => autumn-js}/tsup.config.ts | 0 {package => autumn-js}/tsup.dev.config.ts | 0 build | 11 + convex/package-lock.json | 5836 ----------------- nextjs/package.json | 1 + nextjs/sdk.ts | 28 +- .../src/archives/AutumnContext_next_old.ts | 39 - package/src/archives/useCustomerProvider.tsx | 110 - package/src/archives/useEntityProvider.tsx | 61 - .../src/archives/useEntityProvider_react.tsx | 61 - package/src/libraries/backend/convex.ts | 189 - package/src/libraries/backend/remix_dep.ts | 79 - .../react/client/clientCompMethods.ts | 9 - package/src/next/AutumnProvider.tsx | 53 - .../src/next/client/AutumnClientProvider.tsx | 136 - package/src/next/client/NextAutumnClient.tsx | 165 - .../src/next/client/NextAutumnProvider.tsx | 27 - package/src/next/client/clientUtils.ts | 78 - package/src/next/client/hooks/useAutumn.tsx | 13 - package/src/next/client/hooks/useCustomer.tsx | 13 - package/src/next/client/hooks/useEntity.tsx | 7 - .../src/next/client/hooks/usePricingTable.tsx | 15 - package/src/next/client/types.ts | 84 - package/src/next/enums.ts | 3 - package/src/next/index.ts | 25 - package/src/next/server/auth/authPlugin.ts | 18 - package/src/next/server/auth/clerk-wrapper.ts | 22 - .../src/next/server/auth/get-next-headers.ts | 16 - .../next/server/auth/handleAuthProvider.ts | 206 - .../src/next/server/auth/supabase-wrapper.ts | 47 - package/src/next/server/auth/withNextAuth.ts | 62 - package/src/next/server/componentActions.ts | 20 - package/src/next/server/cusActions.ts | 89 - package/src/next/server/genActions.ts | 113 - package/src/next/server/utils.ts | 18 - package/src/sdk/client.ts | 367 -- .../src/sdk/components/componentMethods.ts | 30 - package/src/sdk/components/componentTypes.ts | 27 - package/src/sdk/customers/cusEnums.ts | 26 - package/src/sdk/customers/cusExpandTypes.ts | 14 - package/src/sdk/customers/cusMethods.ts | 142 - package/src/sdk/customers/cusTypes.ts | 202 - package/src/sdk/customers/cusUtils.ts | 11 - .../src/sdk/customers/entities/entEnums.ts | 1 - .../src/sdk/customers/entities/entMethods.ts | 92 - .../src/sdk/customers/entities/entTypes.ts | 57 - package/src/sdk/error.ts | 33 - package/src/sdk/features/featureMethods.ts | 47 - package/src/sdk/features/featureTypes.ts | 32 - package/src/sdk/general/attachTypes.ts | 89 - package/src/sdk/general/checkTypes.ts | 90 - package/src/sdk/general/genEnums.ts | 4 - package/src/sdk/general/genMethods.ts | 124 - package/src/sdk/general/genTypes.ts | 105 - package/src/sdk/index.ts | 68 - package/src/sdk/products/prodEnums.ts | 35 - package/src/sdk/products/prodMethods.ts | 82 - package/src/sdk/products/prodTypes.ts | 124 - package/src/sdk/referrals/referralMethods.ts | 38 - package/src/sdk/referrals/referralTypes.ts | 36 - package/src/sdk/response.ts | 69 - package/src/sdk/types.ts | 15 - package/src/sdk/utils.ts | 28 - package/src/utils/encryptUtils.tsx | 60 - pnpm-lock.yaml | 1952 ++++-- pnpm-workspace.yaml | 3 +- ts-sdk | 1 + 162 files changed, 2689 insertions(+), 10415 deletions(-) create mode 100644 .gitmodules rename {package => autumn-js}/.npmignore (100%) rename {package => autumn-js}/LICENSE.md (100%) rename {package => autumn-js}/README.md (100%) rename {package => autumn-js}/components.json (100%) rename {package => autumn-js}/package.json (99%) rename {package => autumn-js}/postcss.config.js (100%) rename {package => autumn-js}/publish.sh (100%) rename {package => autumn-js}/scripts/css-transform-plugin.js (100%) rename {package => autumn-js}/scripts/post-build.js (100%) rename {package => autumn-js}/scripts/sync-registry.ts (100%) create mode 100644 autumn-js/src/generated/css-content.ts rename {package => autumn-js}/src/libraries/backend/better-auth.ts (95%) rename {package => autumn-js}/src/libraries/backend/constants.ts (100%) rename {package => autumn-js}/src/libraries/backend/elysia.ts (93%) rename {package => autumn-js}/src/libraries/backend/express.ts (93%) rename {package => autumn-js}/src/libraries/backend/fastify.ts (94%) rename {package => autumn-js}/src/libraries/backend/hono.ts (92%) rename {package => autumn-js}/src/libraries/backend/index.ts (94%) rename {package => autumn-js}/src/libraries/backend/next.ts (95%) rename {package => autumn-js}/src/libraries/backend/react-router.ts (97%) rename {package => autumn-js}/src/libraries/backend/routes/backendRouter.ts (85%) rename {package => autumn-js}/src/libraries/backend/routes/basePath.ts (100%) rename {package => autumn-js}/src/libraries/backend/routes/entityRoutes.ts (78%) rename {package => autumn-js}/src/libraries/backend/routes/genRoutes.ts (82%) rename {package => autumn-js}/src/libraries/backend/routes/productRoutes.ts (81%) rename {package => autumn-js}/src/libraries/backend/routes/referralRoutes.ts (100%) rename {package => autumn-js}/src/libraries/backend/schemas/zod.ts (100%) rename {package => autumn-js}/src/libraries/backend/supabase.ts (97%) rename {package => autumn-js}/src/libraries/backend/tanstack.ts (95%) rename {package => autumn-js}/src/libraries/backend/utils/AuthFunction.ts (100%) rename {package => autumn-js}/src/libraries/backend/utils/backendRes.ts (100%) rename {package => autumn-js}/src/libraries/backend/utils/betterAuth/middlewares.ts (100%) rename {package => autumn-js}/src/libraries/backend/utils/betterAuth/types.ts (96%) rename {package => autumn-js}/src/libraries/backend/utils/logBackendErrors.ts (100%) rename {package => autumn-js}/src/libraries/backend/utils/secretKeyCheck.ts (100%) rename {package => autumn-js}/src/libraries/backend/utils/withAuth.ts (100%) rename {package => autumn-js}/src/libraries/react/AutumnContext.tsx (100%) rename {package => autumn-js}/src/libraries/react/BaseAutumnProvider.tsx (100%) rename {package => autumn-js}/src/libraries/react/ReactAutumnProvider.tsx (100%) rename {package => autumn-js}/src/libraries/react/client/ConvexAutumnClient.tsx (99%) rename {package => autumn-js}/src/libraries/react/client/ReactAutumnClient.tsx (98%) create mode 100644 autumn-js/src/libraries/react/client/clientCompMethods.ts rename {package => autumn-js}/src/libraries/react/client/clientCusMethods.ts (100%) rename {package => autumn-js}/src/libraries/react/client/clientEntityMethods.ts (100%) rename {package => autumn-js}/src/libraries/react/client/clientGenMethods.ts (100%) rename {package => autumn-js}/src/libraries/react/client/clientProdMethods.ts (100%) rename {package => autumn-js}/src/libraries/react/client/clientReferralMethods.ts (100%) rename {package => autumn-js}/src/libraries/react/client/types/clientAttachTypes.ts (100%) rename {package => autumn-js}/src/libraries/react/client/types/clientCusTypes.ts (100%) rename {package => autumn-js}/src/libraries/react/client/types/clientEntTypes.ts (100%) rename {package => autumn-js}/src/libraries/react/client/types/clientGenTypes.ts (100%) rename {package => autumn-js}/src/libraries/react/client/types/clientPricingTableTypes.ts (100%) rename {package => autumn-js}/src/libraries/react/client/types/clientProdTypes.ts (100%) rename {package => autumn-js}/src/libraries/react/client/types/clientReferralTypes.ts (100%) rename {package => autumn-js}/src/libraries/react/client/types/responseTypes.ts (100%) rename {package => autumn-js}/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx (100%) rename {package => autumn-js}/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx (100%) rename {package => autumn-js}/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx (100%) rename {package => autumn-js}/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx (100%) rename {package => autumn-js}/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx (100%) rename {package => autumn-js}/src/libraries/react/components/pricing-table/pricing-table-synced.tsx (100%) rename {package => autumn-js}/src/libraries/react/components/ui/accordion.tsx (100%) rename {package => autumn-js}/src/libraries/react/components/ui/button.tsx (100%) rename {package => autumn-js}/src/libraries/react/components/ui/dialog.tsx (100%) rename {package => autumn-js}/src/libraries/react/components/ui/input.tsx (100%) rename {package => autumn-js}/src/libraries/react/components/ui/popover.tsx (100%) rename {package => autumn-js}/src/libraries/react/components/ui/switch.tsx (100%) rename {package => autumn-js}/src/libraries/react/errorUtils/logAuthError.ts (100%) rename {package => autumn-js}/src/libraries/react/errorUtils/logFetchError.ts (100%) rename {package => autumn-js}/src/libraries/react/hooks/helpers/handleCheck.ts (100%) rename {package => autumn-js}/src/libraries/react/hooks/helpers/useAutumnBase.tsx (100%) rename {package => autumn-js}/src/libraries/react/hooks/helpers/useDialog.tsx (100%) rename {package => autumn-js}/src/libraries/react/hooks/useAnalytics.tsx (100%) rename {package => autumn-js}/src/libraries/react/hooks/useCustomer.tsx (100%) rename {package => autumn-js}/src/libraries/react/hooks/useCustomerBase.tsx (100%) rename {package => autumn-js}/src/libraries/react/hooks/useEntity.tsx (100%) rename {package => autumn-js}/src/libraries/react/hooks/useEntityBase.tsx (100%) rename {package => autumn-js}/src/libraries/react/hooks/usePaywall.tsx (100%) rename {package => autumn-js}/src/libraries/react/hooks/usePricingTable.tsx (100%) rename {package => autumn-js}/src/libraries/react/hooks/usePricingTableBase.tsx (100%) rename {package => autumn-js}/src/libraries/react/hooks/useProductsBase.tsx (100%) rename {package => autumn-js}/src/libraries/react/index.ts (91%) rename {package => autumn-js}/src/libraries/react/lib/utils.ts (100%) rename {package => autumn-js}/src/libraries/react/utils/compareParams.ts (100%) rename {package => autumn-js}/src/libraries/react/utils/errorUtils.ts (100%) rename {package => autumn-js}/src/libraries/react/utils/inject-styles.ts (100%) create mode 100644 autumn-js/src/sdk/index.ts rename {package => autumn-js}/src/styles/global.css (100%) rename {package => autumn-js}/src/styles/global_old.css (100%) rename {package => autumn-js}/src/utils/entityUtils.tsx (100%) rename {package => autumn-js}/src/utils/logger.ts (100%) rename {package => autumn-js}/src/utils/toSnakeCase.ts (100%) rename {package => autumn-js}/tailwind.config.ts (100%) rename {package => autumn-js}/tsconfig.json (100%) rename {package => autumn-js}/tsup.config.ts (100%) rename {package => autumn-js}/tsup.dev.config.ts (100%) create mode 100755 build delete mode 100644 convex/package-lock.json delete mode 100644 package/src/archives/AutumnContext_next_old.ts delete mode 100644 package/src/archives/useCustomerProvider.tsx delete mode 100644 package/src/archives/useEntityProvider.tsx delete mode 100644 package/src/archives/useEntityProvider_react.tsx delete mode 100644 package/src/libraries/backend/convex.ts delete mode 100644 package/src/libraries/backend/remix_dep.ts delete mode 100644 package/src/libraries/react/client/clientCompMethods.ts delete mode 100644 package/src/next/AutumnProvider.tsx delete mode 100644 package/src/next/client/AutumnClientProvider.tsx delete mode 100644 package/src/next/client/NextAutumnClient.tsx delete mode 100644 package/src/next/client/NextAutumnProvider.tsx delete mode 100644 package/src/next/client/clientUtils.ts delete mode 100644 package/src/next/client/hooks/useAutumn.tsx delete mode 100644 package/src/next/client/hooks/useCustomer.tsx delete mode 100644 package/src/next/client/hooks/useEntity.tsx delete mode 100644 package/src/next/client/hooks/usePricingTable.tsx delete mode 100644 package/src/next/client/types.ts delete mode 100644 package/src/next/enums.ts delete mode 100644 package/src/next/index.ts delete mode 100644 package/src/next/server/auth/authPlugin.ts delete mode 100644 package/src/next/server/auth/clerk-wrapper.ts delete mode 100644 package/src/next/server/auth/get-next-headers.ts delete mode 100644 package/src/next/server/auth/handleAuthProvider.ts delete mode 100644 package/src/next/server/auth/supabase-wrapper.ts delete mode 100644 package/src/next/server/auth/withNextAuth.ts delete mode 100644 package/src/next/server/componentActions.ts delete mode 100644 package/src/next/server/cusActions.ts delete mode 100644 package/src/next/server/genActions.ts delete mode 100644 package/src/next/server/utils.ts delete mode 100644 package/src/sdk/client.ts delete mode 100644 package/src/sdk/components/componentMethods.ts delete mode 100644 package/src/sdk/components/componentTypes.ts delete mode 100644 package/src/sdk/customers/cusEnums.ts delete mode 100644 package/src/sdk/customers/cusExpandTypes.ts delete mode 100644 package/src/sdk/customers/cusMethods.ts delete mode 100644 package/src/sdk/customers/cusTypes.ts delete mode 100644 package/src/sdk/customers/cusUtils.ts delete mode 100644 package/src/sdk/customers/entities/entEnums.ts delete mode 100644 package/src/sdk/customers/entities/entMethods.ts delete mode 100644 package/src/sdk/customers/entities/entTypes.ts delete mode 100644 package/src/sdk/error.ts delete mode 100644 package/src/sdk/features/featureMethods.ts delete mode 100644 package/src/sdk/features/featureTypes.ts delete mode 100644 package/src/sdk/general/attachTypes.ts delete mode 100644 package/src/sdk/general/checkTypes.ts delete mode 100644 package/src/sdk/general/genEnums.ts delete mode 100644 package/src/sdk/general/genMethods.ts delete mode 100644 package/src/sdk/general/genTypes.ts delete mode 100644 package/src/sdk/index.ts delete mode 100644 package/src/sdk/products/prodEnums.ts delete mode 100644 package/src/sdk/products/prodMethods.ts delete mode 100644 package/src/sdk/products/prodTypes.ts delete mode 100644 package/src/sdk/referrals/referralMethods.ts delete mode 100644 package/src/sdk/referrals/referralTypes.ts delete mode 100644 package/src/sdk/response.ts delete mode 100644 package/src/sdk/types.ts delete mode 100644 package/src/sdk/utils.ts delete mode 100644 package/src/utils/encryptUtils.tsx create mode 160000 ts-sdk diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..6037d3ce --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "ts-sdk"] + path = ts-sdk + url = https://github.com/useautumn/ts-sdk + branch = next diff --git a/package/.npmignore b/autumn-js/.npmignore similarity index 100% rename from package/.npmignore rename to autumn-js/.npmignore diff --git a/package/LICENSE.md b/autumn-js/LICENSE.md similarity index 100% rename from package/LICENSE.md rename to autumn-js/LICENSE.md diff --git a/package/README.md b/autumn-js/README.md similarity index 100% rename from package/README.md rename to autumn-js/README.md diff --git a/package/components.json b/autumn-js/components.json similarity index 100% rename from package/components.json rename to autumn-js/components.json diff --git a/package/package.json b/autumn-js/package.json similarity index 99% rename from package/package.json rename to autumn-js/package.json index 25b3c355..08645e3c 100644 --- a/package/package.json +++ b/autumn-js/package.json @@ -159,6 +159,7 @@ } }, "dependencies": { + "@useautumn/sdk": "workspace:*", "query-string": "^9.2.2", "rou3": "^0.6.1", "swr": "^2.3.3", diff --git a/package/postcss.config.js b/autumn-js/postcss.config.js similarity index 100% rename from package/postcss.config.js rename to autumn-js/postcss.config.js diff --git a/package/publish.sh b/autumn-js/publish.sh similarity index 100% rename from package/publish.sh rename to autumn-js/publish.sh diff --git a/package/scripts/css-transform-plugin.js b/autumn-js/scripts/css-transform-plugin.js similarity index 100% rename from package/scripts/css-transform-plugin.js rename to autumn-js/scripts/css-transform-plugin.js diff --git a/package/scripts/post-build.js b/autumn-js/scripts/post-build.js similarity index 100% rename from package/scripts/post-build.js rename to autumn-js/scripts/post-build.js diff --git a/package/scripts/sync-registry.ts b/autumn-js/scripts/sync-registry.ts similarity index 100% rename from package/scripts/sync-registry.ts rename to autumn-js/scripts/sync-registry.ts diff --git a/autumn-js/src/generated/css-content.ts b/autumn-js/src/generated/css-content.ts new file mode 100644 index 00000000..88ec2987 --- /dev/null +++ b/autumn-js/src/generated/css-content.ts @@ -0,0 +1,1219 @@ +// Auto-generated CSS content - do not edit manually +export const CSS_CONTENT = `/* src/styles/global.css */ +*:where(.au-root, .au-root *), +:where(.au-root, .au-root *)::before, +:where(.au-root, .au-root *)::after { + box-sizing: border-box; + border-width: 0; + border-style: solid; + border-color: #e5e7eb; +} +:where(.au-root, .au-root *)::before, +:where(.au-root, .au-root *)::after { + --tw-content: ""; +} +.au-root { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + font-family: + ui-sans-serif, + system-ui, + sans-serif, + "Apple Color Emoji", + "Segoe UI Emoji", + "Segoe UI Symbol", + "Noto Color Emoji"; + font-feature-settings: normal; + font-variation-settings: normal; + -webkit-tap-highlight-color: transparent; +} +.au-root { + margin: 0; + line-height: inherit; +} +hr:where(.au-root, .au-root *) { + height: 0; + color: inherit; + border-top-width: 1px; +} +abbr:where([title]):where(.au-root, .au-root *) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} +h1:where(.au-root, .au-root *), +h2:where(.au-root, .au-root *), +h3:where(.au-root, .au-root *), +h4:where(.au-root, .au-root *), +h5:where(.au-root, .au-root *), +h6:where(.au-root, .au-root *) { + font-size: inherit; + font-weight: inherit; +} +a:where(.au-root, .au-root *) { + color: inherit; + text-decoration: inherit; +} +b:where(.au-root, .au-root *), +strong:where(.au-root, .au-root *) { + font-weight: bolder; +} +code:where(.au-root, .au-root *), +kbd:where(.au-root, .au-root *), +samp:where(.au-root, .au-root *), +pre:where(.au-root, .au-root *) { + font-family: + ui-monospace, + SFMono-Regular, + Menlo, + Monaco, + Consolas, + "Liberation Mono", + "Courier New", + monospace; + font-feature-settings: normal; + font-variation-settings: normal; + font-size: 1em; +} +small:where(.au-root, .au-root *) { + font-size: 80%; +} +sub:where(.au-root, .au-root *), +sup:where(.au-root, .au-root *) { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sub:where(.au-root, .au-root *) { + bottom: -0.25em; +} +sup:where(.au-root, .au-root *) { + top: -0.5em; +} +table:where(.au-root, .au-root *) { + text-indent: 0; + border-color: inherit; + border-collapse: collapse; +} +button:where(.au-root, .au-root *), +input:where(.au-root, .au-root *), +optgroup:where(.au-root, .au-root *), +select:where(.au-root, .au-root *), +textarea:where(.au-root, .au-root *) { + font-family: inherit; + font-feature-settings: inherit; + font-variation-settings: inherit; + font-size: 100%; + font-weight: inherit; + line-height: inherit; + color: inherit; + margin: 0; + padding: 0; +} +button:where(.au-root, .au-root *), +select:where(.au-root, .au-root *) { + text-transform: none; +} +button:where(.au-root, .au-root *), +[type=button]:where(.au-root, .au-root *), +[type=reset]:where(.au-root, .au-root *), +[type=submit]:where(.au-root, .au-root *) { + -webkit-appearance: button; + background-color: transparent; + background-image: none; +} +:-moz-focusring:where(.au-root, .au-root *) { + outline: auto; +} +:-moz-ui-invalid:where(.au-root, .au-root *) { + box-shadow: none; +} +progress:where(.au-root, .au-root *) { + vertical-align: baseline; +} +:where(.au-root, .au-root *) ::-webkit-inner-spin-button, +:where(.au-root, .au-root *) ::-webkit-outer-spin-button { + height: auto; +} +[type=search]:where(.au-root, .au-root *) { + -webkit-appearance: textfield; + outline-offset: -2px; +} +:where(.au-root, .au-root *) ::-webkit-search-decoration { + -webkit-appearance: none; +} +:where(.au-root, .au-root *) ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; +} +summary:where(.au-root, .au-root *) { + display: list-item; +} +blockquote:where(.au-root, .au-root *), +dl:where(.au-root, .au-root *), +dd:where(.au-root, .au-root *), +h1:where(.au-root, .au-root *), +h2:where(.au-root, .au-root *), +h3:where(.au-root, .au-root *), +h4:where(.au-root, .au-root *), +h5:where(.au-root, .au-root *), +h6:where(.au-root, .au-root *), +hr:where(.au-root, .au-root *), +figure:where(.au-root, .au-root *), +p:where(.au-root, .au-root *), +pre:where(.au-root, .au-root *) { + margin: 0; +} +fieldset:where(.au-root, .au-root *) { + margin: 0; + padding: 0; +} +legend:where(.au-root, .au-root *) { + padding: 0; +} +ol:where(.au-root, .au-root *), +ul:where(.au-root, .au-root *), +menu:where(.au-root, .au-root *) { + list-style: none; + margin: 0; + padding: 0; +} +dialog:where(.au-root, .au-root *) { + padding: 0; +} +textarea:where(.au-root, .au-root *) { + resize: vertical; +} +:where(.au-root, .au-root *) input::-moz-placeholder, +:where(.au-root, .au-root *) textarea::-moz-placeholder { + opacity: 1; + color: #9ca3af; +} +:where(.au-root, .au-root *) input::placeholder, +:where(.au-root, .au-root *) textarea::placeholder { + opacity: 1; + color: #9ca3af; +} +button:where(.au-root, .au-root *), +[role=button]:where(.au-root, .au-root *) { + cursor: pointer; +} +:disabled:where(.au-root, .au-root *) { + cursor: default; +} +img:where(.au-root, .au-root *), +svg:where(.au-root, .au-root *), +video:where(.au-root, .au-root *), +canvas:where(.au-root, .au-root *), +audio:where(.au-root, .au-root *), +iframe:where(.au-root, .au-root *), +embed:where(.au-root, .au-root *), +object:where(.au-root, .au-root *) { + display: block; + vertical-align: middle; +} +img:where(.au-root, .au-root *), +video:where(.au-root, .au-root *) { + max-width: 100%; + height: auto; +} +[hidden]:where(.au-root, .au-root *) { + display: none; +} +.au-root *, +.au-root ::before, +.au-root ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +} +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +} +.au-sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} +.au-pointer-events-none { + pointer-events: none; +} +.au-fixed { + position: fixed; +} +.au-absolute { + position: absolute; +} +.au-relative { + position: relative; +} +.au-inset-0 { + inset: 0px; +} +.au-left-\\[50\\%\\] { + left: 50%; +} +.au-right-4 { + right: 1rem; +} +.au-right-\\[-1px\\] { + right: -1px; +} +.au-top-4 { + top: 1rem; +} +.au-top-\\[-1px\\] { + top: -1px; +} +.au-top-\\[50\\%\\] { + top: 50%; +} +.au-z-50 { + z-index: 50; +} +.au-my-2 { + margin-top: 0.5rem; + margin-bottom: 0.5rem; +} +.au-mb-1 { + margin-bottom: 0.25rem; +} +.au-mb-2 { + margin-bottom: 0.5rem; +} +.au-mb-4 { + margin-bottom: 1rem; +} +.au-mb-6 { + margin-bottom: 1.5rem; +} +.au-mb-8 { + margin-bottom: 2rem; +} +.au-mr-2 { + margin-right: 0.5rem; +} +.au-mt-0 { + margin-top: 0px; +} +.au-mt-0\\.5 { + margin-top: 0.125rem; +} +.au-mt-1 { + margin-top: 0.25rem; +} +.au-mt-2 { + margin-top: 0.5rem; +} +.au-mt-4 { + margin-top: 1rem; +} +.au-line-clamp-2 { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} +.au-block { + display: block; +} +.au-flex { + display: flex; +} +.au-inline-flex { + display: inline-flex; +} +.au-grid { + display: grid; +} +.\\!au-h-3 { + height: 0.75rem !important; +} +.au-h-10 { + height: 2.5rem; +} +.au-h-16 { + height: 4rem; +} +.au-h-4 { + height: 1rem; +} +.au-h-5 { + height: 1.25rem; +} +.au-h-6 { + height: 1.5rem; +} +.au-h-8 { + height: 2rem; +} +.au-h-9 { + height: 2.25rem; +} +.au-h-full { + height: 100%; +} +.au-min-h-\\[300px\\] { + min-height: 300px; +} +.au-w-4 { + width: 1rem; +} +.au-w-6 { + width: 1.5rem; +} +.au-w-8 { + width: 2rem; +} +.au-w-9 { + width: 2.25rem; +} +.au-w-full { + width: 100%; +} +.au-min-w-16 { + min-width: 4rem; +} +.au-min-w-20 { + min-width: 5rem; +} +.au-max-w-lg { + max-width: 32rem; +} +.au-max-w-xl { + max-width: 36rem; +} +.au-flex-1 { + flex: 1 1 0%; +} +.au-flex-shrink-0 { + flex-shrink: 0; +} +.au-shrink-0 { + flex-shrink: 0; +} +.au-flex-grow { + flex-grow: 1; +} +.au-translate-x-\\[-50\\%\\] { + --tw-translate-x: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.au-translate-y-\\[-50\\%\\] { + --tw-translate-y: -50%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.au-translate-y-\\[130\\%\\] { + --tw-translate-y: 130%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +@keyframes au-spin { + to { + transform: rotate(360deg); + } +} +.au-animate-spin { + animation: au-spin 1s linear infinite; +} +.au-cursor-pointer { + cursor: pointer; +} +.au-grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); +} +.au-flex-row { + flex-direction: row; +} +.au-flex-col { + flex-direction: column; +} +.au-flex-col-reverse { + flex-direction: column-reverse; +} +.au-items-start { + align-items: flex-start; +} +.au-items-center { + align-items: center; +} +.au-justify-center { + justify-content: center; +} +.au-justify-between { + justify-content: space-between; +} +.au-gap-0 { + gap: 0px; +} +.au-gap-1 { + gap: 0.25rem; +} +.au-gap-2 { + gap: 0.5rem; +} +.au-gap-4 { + gap: 1rem; +} +.au-gap-x-4 { + -moz-column-gap: 1rem; + column-gap: 1rem; +} +.au-space-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.5rem * var(--tw-space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); +} +.au-space-y-1 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); +} +.au-space-y-1\\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.375rem * var(--tw-space-y-reverse)); +} +.au-space-y-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); +} +.au-overflow-hidden { + overflow: hidden; +} +.au-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.au-whitespace-nowrap { + white-space: nowrap; +} +.au-rounded-full { + border-radius: 9999px; +} +.au-rounded-lg { + border-radius: var(--au-radius); +} +.au-rounded-md { + border-radius: calc(var(--au-radius) - 2px); +} +.au-rounded-sm { + border-radius: calc(var(--au-radius) - 4px); +} +.au-rounded-bl-lg { + border-bottom-left-radius: var(--au-radius); +} +.au-border { + border-width: 1px; +} +.au-border-2 { + border-width: 2px; +} +.au-border-y { + border-top-width: 1px; + border-bottom-width: 1px; +} +.au-border-t { + border-top-width: 1px; +} +.au-border-input { + border-color: hsl(var(--au-input)); +} +.au-border-transparent { + border-color: transparent; +} +.au-bg-background { + background-color: hsl(var(--au-background)); +} +.au-bg-black\\/80 { + background-color: rgb(0 0 0 / 0.8); +} +.au-bg-destructive { + background-color: hsl(var(--au-destructive)); +} +.au-bg-primary { + background-color: hsl(var(--au-primary)); +} +.au-bg-secondary { + background-color: hsl(var(--au-secondary)); +} +.au-bg-secondary\\/40 { + background-color: hsl(var(--au-secondary) / 0.4); +} +.au-p-0 { + padding: 0px; +} +.au-p-6 { + padding: 1.5rem; +} +.\\!au-py-10 { + padding-top: 2.5rem !important; + padding-bottom: 2.5rem !important; +} +.au-px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} +.au-px-4 { + padding-left: 1rem; + padding-right: 1rem; +} +.au-px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; +} +.au-px-8 { + padding-left: 2rem; + padding-right: 2rem; +} +.au-py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} +.au-py-3 { + padding-top: 0.75rem; + padding-bottom: 0.75rem; +} +.au-py-6 { + padding-top: 1.5rem; + padding-bottom: 1.5rem; +} +.au-pb-0 { + padding-bottom: 0px; +} +.au-pb-0\\.5 { + padding-bottom: 0.125rem; +} +.au-pb-4 { + padding-bottom: 1rem; +} +.au-pl-6 { + padding-left: 1.5rem; +} +.au-pr-3 { + padding-right: 0.75rem; +} +.au-pt-4 { + padding-top: 1rem; +} +.au-text-center { + text-align: center; +} +.au-text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} +.au-text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +} +.au-text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} +.au-text-xl { + font-size: 1.25rem; + line-height: 1.75rem; +} +.au-text-xs { + font-size: 0.75rem; + line-height: 1rem; +} +.au-font-bold { + font-weight: 700; +} +.au-font-medium { + font-weight: 500; +} +.au-font-normal { + font-weight: 400; +} +.au-font-semibold { + font-weight: 600; +} +.au-leading-none { + line-height: 1; +} +.au-tracking-tight { + letter-spacing: -0.025em; +} +.au-text-destructive-foreground { + color: hsl(var(--au-destructive-foreground)); +} +.au-text-foreground { + color: hsl(var(--au-foreground)); +} +.au-text-muted-foreground { + color: hsl(var(--au-muted-foreground)); +} +.au-text-primary { + color: hsl(var(--au-primary)); +} +.au-text-primary-foreground { + color: hsl(var(--au-primary-foreground)); +} +.au-text-secondary-foreground { + color: hsl(var(--au-secondary-foreground)); +} +.au-text-zinc-400 { + --tw-text-opacity: 1; + color: rgb(161 161 170 / var(--tw-text-opacity)); +} +.au-underline-offset-4 { + text-underline-offset: 4px; +} +.au-opacity-70 { + opacity: 0.7; +} +.au-shadow { + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: + var(--tw-ring-offset-shadow, 0 0 #0000), + var(--tw-ring-shadow, 0 0 #0000), + var(--tw-shadow); +} +.au-shadow-inner { + --tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color); + box-shadow: + var(--tw-ring-offset-shadow, 0 0 #0000), + var(--tw-ring-shadow, 0 0 #0000), + var(--tw-shadow); +} +.au-shadow-lg { + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: + var(--tw-ring-offset-shadow, 0 0 #0000), + var(--tw-ring-shadow, 0 0 #0000), + var(--tw-shadow); +} +.au-shadow-sm { + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: + var(--tw-ring-offset-shadow, 0 0 #0000), + var(--tw-ring-shadow, 0 0 #0000), + var(--tw-shadow); +} +.au-shadow-stone-400 { + --tw-shadow-color: #a8a29e; + --tw-shadow: var(--tw-shadow-colored); +} +.au-ring-0 { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: + var(--tw-ring-offset-shadow), + var(--tw-ring-shadow), + var(--tw-shadow, 0 0 #0000); +} +.au-ring-offset-background { + --tw-ring-offset-color: hsl(var(--au-background)); +} +.au-transition { + transition-property: + color, + background-color, + border-color, + text-decoration-color, + fill, + stroke, + opacity, + box-shadow, + transform, + filter, + -webkit-backdrop-filter; + transition-property: + color, + background-color, + border-color, + text-decoration-color, + fill, + stroke, + opacity, + box-shadow, + transform, + filter, + backdrop-filter; + transition-property: + color, + background-color, + border-color, + text-decoration-color, + fill, + stroke, + opacity, + box-shadow, + transform, + filter, + backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.au-transition-all { + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.au-transition-colors { + transition-property: + color, + background-color, + border-color, + text-decoration-color, + fill, + stroke; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.au-transition-opacity { + transition-property: opacity; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.au-transition-transform { + transition-property: transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} +.au-duration-200 { + transition-duration: 200ms; +} +.au-duration-300 { + transition-duration: 300ms; +} +@keyframes enter { + from { + opacity: var(--tw-enter-opacity, 1); + transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0)); + } +} +@keyframes exit { + to { + opacity: var(--tw-exit-opacity, 1); + transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0)); + } +} +.au-duration-200 { + animation-duration: 200ms; +} +.au-duration-300 { + animation-duration: 300ms; +} +:root { + --au-background: 0 0% 100%; + --au-foreground: 240 10% 3.9%; + --au-card: 0 0% 100%; + --au-card-foreground: 240 10% 3.9%; + --au-popover: 0 0% 100%; + --au-popover-foreground: 240 10% 3.9%; + --au-primary: 240 5.9% 10%; + --au-primary-foreground: 0 0% 98%; + --au-secondary: 240 4.8% 95.9%; + --au-secondary-foreground: 240 5.9% 10%; + --au-muted: 240 4.8% 95.9%; + --au-muted-foreground: 240 3.8% 46.1%; + --au-accent: 240 4.8% 95.9%; + --au-accent-foreground: 240 5.9% 10%; + --au-destructive: 0 84.2% 60.2%; + --au-destructive-foreground: 0 0% 98%; + --au-border: 240 5.9% 90%; + --au-input: 240 5.9% 90%; + --au-ring: 240 10% 3.9%; + --au-chart-1: 12 76% 61%; + --au-chart-2: 173 58% 39%; + --au-chart-3: 197 37% 24%; + --au-chart-4: 43 74% 66%; + --au-chart-5: 27 87% 67%; + --au-radius: 0.5rem; + --au-sidebar-background: 0 0% 98%; + --au-sidebar-foreground: 240 5.3% 26.1%; + --au-sidebar-primary: 240 5.9% 10%; + --au-sidebar-primary-foreground: 0 0% 98%; + --au-sidebar-accent: 240 4.8% 95.9%; + --au-sidebar-accent-foreground: 240 5.9% 10%; + --au-sidebar-border: 220 13% 91%; + --au-sidebar-ring: 217.2 91.2% 59.8%; +} +.dark { + --au-background: 240 10% 3.9%; + --au-foreground: 0 0% 98%; + --au-card: 240 10% 3.9%; + --au-card-foreground: 0 0% 98%; + --au-popover: 240 10% 3.9%; + --au-popover-foreground: 0 0% 98%; + --au-primary: 0 0% 98%; + --au-primary-foreground: 240 5.9% 10%; + --au-secondary: 240 3.7% 15.9%; + --au-secondary-foreground: 0 0% 98%; + --au-muted: 240 3.7% 15.9%; + --au-muted-foreground: 240 5% 64.9%; + --au-accent: 240 3.7% 15.9%; + --au-accent-foreground: 0 0% 98%; + --au-destructive: 0 62.8% 30.6%; + --au-destructive-foreground: 0 0% 98%; + --au-border: 240 3.7% 15.9%; + --au-input: 240 3.7% 15.9%; + --au-ring: 240 4.9% 83.9%; + --au-chart-1: 220 70% 50%; + --au-chart-2: 160 60% 45%; + --au-chart-3: 30 80% 55%; + --au-chart-4: 280 65% 60%; + --au-chart-5: 340 75% 55%; + --au-sidebar-background: 240 5.9% 10%; + --au-sidebar-foreground: 240 4.8% 95.9%; + --au-sidebar-primary: 224.3 76.3% 48%; + --au-sidebar-primary-foreground: 0 0% 100%; + --au-sidebar-accent: 240 3.7% 15.9%; + --au-sidebar-accent-foreground: 240 4.8% 95.9%; + --au-sidebar-border: 240 3.7% 15.9%; + --au-sidebar-ring: 217.2 91.2% 59.8%; +} +.hover\\:au-bg-accent:hover { + background-color: hsl(var(--au-accent)); +} +.hover\\:au-bg-destructive\\/90:hover { + background-color: hsl(var(--au-destructive) / 0.9); +} +.hover\\:au-bg-primary\\/90:hover { + background-color: hsl(var(--au-primary) / 0.9); +} +.hover\\:au-bg-secondary\\/80:hover { + background-color: hsl(var(--au-secondary) / 0.8); +} +.hover\\:au-text-accent-foreground:hover { + color: hsl(var(--au-accent-foreground)); +} +.hover\\:au-underline:hover { + text-decoration-line: underline; +} +.hover\\:au-opacity-100:hover { + opacity: 1; +} +.hover\\:au-brightness-90:hover { + --tw-brightness: brightness(.9); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} +.focus\\:au-outline-none:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} +.focus\\:au-ring-2:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: + var(--tw-ring-offset-shadow), + var(--tw-ring-shadow), + var(--tw-shadow, 0 0 #0000); +} +.focus\\:au-ring-ring:focus { + --tw-ring-color: hsl(var(--au-ring)); +} +.focus\\:au-ring-offset-2:focus { + --tw-ring-offset-width: 2px; +} +.focus-visible\\:au-outline-none:focus-visible { + outline: 2px solid transparent; + outline-offset: 2px; +} +.focus-visible\\:au-ring-1:focus-visible { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: + var(--tw-ring-offset-shadow), + var(--tw-ring-shadow), + var(--tw-shadow, 0 0 #0000); +} +.focus-visible\\:au-ring-2:focus-visible { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: + var(--tw-ring-offset-shadow), + var(--tw-ring-shadow), + var(--tw-shadow, 0 0 #0000); +} +.focus-visible\\:au-ring-ring:focus-visible { + --tw-ring-color: hsl(var(--au-ring)); +} +.focus-visible\\:au-ring-offset-2:focus-visible { + --tw-ring-offset-width: 2px; +} +.focus-visible\\:au-ring-offset-background:focus-visible { + --tw-ring-offset-color: hsl(var(--au-background)); +} +.disabled\\:au-pointer-events-none:disabled { + pointer-events: none; +} +.disabled\\:au-opacity-50:disabled { + opacity: 0.5; +} +.au-group:hover .group-hover\\:au-mt-0 { + margin-top: 0px; +} +.au-group:hover .group-hover\\:au-translate-y-0 { + --tw-translate-y: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.au-group:hover .group-hover\\:au-translate-y-\\[-130\\%\\] { + --tw-translate-y: -130%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.data-\\[state\\=checked\\]\\:au-translate-x-4[data-state=checked] { + --tw-translate-x: 1rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.data-\\[state\\=unchecked\\]\\:au-translate-x-0[data-state=unchecked] { + --tw-translate-x: 0px; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} +.data-\\[state\\=checked\\]\\:au-bg-primary[data-state=checked] { + background-color: hsl(var(--au-primary)); +} +.data-\\[state\\=open\\]\\:au-bg-accent[data-state=open] { + background-color: hsl(var(--au-accent)); +} +.data-\\[state\\=unchecked\\]\\:au-bg-input[data-state=unchecked] { + background-color: hsl(var(--au-input)); +} +.data-\\[state\\=open\\]\\:au-text-muted-foreground[data-state=open] { + color: hsl(var(--au-muted-foreground)); +} +.data-\\[state\\=open\\]\\:au-animate-in[data-state=open] { + animation-name: enter; + animation-duration: 150ms; + --tw-enter-opacity: initial; + --tw-enter-scale: initial; + --tw-enter-rotate: initial; + --tw-enter-translate-x: initial; + --tw-enter-translate-y: initial; +} +.data-\\[state\\=closed\\]\\:au-animate-out[data-state=closed] { + animation-name: exit; + animation-duration: 150ms; + --tw-exit-opacity: initial; + --tw-exit-scale: initial; + --tw-exit-rotate: initial; + --tw-exit-translate-x: initial; + --tw-exit-translate-y: initial; +} +.data-\\[state\\=closed\\]\\:au-fade-out-0[data-state=closed] { + --tw-exit-opacity: 0; +} +.data-\\[state\\=open\\]\\:au-fade-in-0[data-state=open] { + --tw-enter-opacity: 0; +} +.data-\\[state\\=closed\\]\\:au-zoom-out-95[data-state=closed] { + --tw-exit-scale: .95; +} +.data-\\[state\\=open\\]\\:au-zoom-in-95[data-state=open] { + --tw-enter-scale: .95; +} +.data-\\[state\\=closed\\]\\:au-slide-out-to-left-1\\/2[data-state=closed] { + --tw-exit-translate-x: -50%; +} +.data-\\[state\\=closed\\]\\:au-slide-out-to-top-\\[48\\%\\][data-state=closed] { + --tw-exit-translate-y: -48%; +} +.data-\\[state\\=open\\]\\:au-slide-in-from-left-1\\/2[data-state=open] { + --tw-enter-translate-x: -50%; +} +.data-\\[state\\=open\\]\\:au-slide-in-from-top-\\[48\\%\\][data-state=open] { + --tw-enter-translate-y: -48%; +} +:is(.au-dark .dark\\:au-shadow-zinc-800\\/80) { + --tw-shadow-color: rgb(39 39 42 / 0.8); + --tw-shadow: var(--tw-shadow-colored); +} +@media (min-width: 640px) { + .sm\\:au-h-7 { + height: 1.75rem; + } + .sm\\:au-grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + .sm\\:au-flex-row { + flex-direction: row; + } + .sm\\:au-items-center { + align-items: center; + } + .sm\\:au-justify-end { + justify-content: flex-end; + } + .sm\\:au-gap-2 { + gap: 0.5rem; + } + .sm\\:au-space-x-2 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.5rem * var(--tw-space-x-reverse)); + margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); + } + .sm\\:au-rounded-lg { + border-radius: var(--au-radius); + } + .sm\\:au-pb-0 { + padding-bottom: 0px; + } + .sm\\:au-text-left { + text-align: left; + } +} +@media (min-width: 1024px) { + .lg\\:au-right-4 { + right: 1rem; + } + .lg\\:au-top-4 { + top: 1rem; + } + .lg\\:au-h-\\[calc\\(100\\%\\+48px\\)\\] { + height: calc(100% + 48px); + } + .lg\\:au--translate-y-12 { + --tw-translate-y: -3rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + } + .lg\\:au--translate-y-6 { + --tw-translate-y: -1.5rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + } + .lg\\:au-translate-y-6 { + --tw-translate-y: 1.5rem; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + } + .lg\\:au-grid-cols-\\[repeat\\(auto-fit\\,minmax\\(200px\\,1fr\\)\\)\\] { + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + } + .lg\\:au-rounded-full { + border-radius: 9999px; + } + .lg\\:au-py-0 { + padding-top: 0px; + padding-bottom: 0px; + } + .lg\\:au-py-0\\.5 { + padding-top: 0.125rem; + padding-bottom: 0.125rem; + } + .lg\\:au-shadow-lg { + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: + var(--tw-ring-offset-shadow, 0 0 #0000), + var(--tw-ring-shadow, 0 0 #0000), + var(--tw-shadow); + } +} +.\\[\\&_svg\\]\\:au-pointer-events-none svg { + pointer-events: none; +} +.\\[\\&_svg\\]\\:au-size-4 svg { + width: 1rem; + height: 1rem; +} +.\\[\\&_svg\\]\\:au-shrink-0 svg { + flex-shrink: 0; +} +`; diff --git a/package/src/libraries/backend/better-auth.ts b/autumn-js/src/libraries/backend/better-auth.ts similarity index 95% rename from package/src/libraries/backend/better-auth.ts rename to autumn-js/src/libraries/backend/better-auth.ts index 63706cb1..75965509 100644 --- a/package/src/libraries/backend/better-auth.ts +++ b/autumn-js/src/libraries/backend/better-auth.ts @@ -1,18 +1,16 @@ -import { CustomerExpandEnum } from "@sdk"; + +import { Autumn } from "@sdk"; import type { AuthContext, BetterAuthPlugin, - EndpointContext, - Middleware, + EndpointContext } from "better-auth"; -import { getSessionFromCtx, sessionMiddleware } from "better-auth/api"; -import { createAuthEndpoint, type Organization } from "better-auth/plugins"; +import { getSessionFromCtx } from "better-auth/api"; +import { createAuthEndpoint } from "better-auth/plugins"; import { APIError, createEndpoint, - type EndpointOptions, - type Method, - type Status, + type EndpointOptions, type Status } from "better-call"; import { findRoute } from "rou3"; import { z } from "zod/v4"; @@ -31,9 +29,8 @@ import { CreateReferralCodeParamsSchema, RedeemReferralCodeParamsSchema, } from "@/client/types/clientReferralTypes"; -import { Autumn } from "../../sdk/client"; + import { createRouterWithOptions } from "./routes/backendRouter"; -import type { AuthResult } from "./utils/AuthFunction"; import { getIdentityContext, getOrganizationContext, @@ -41,7 +38,6 @@ import { } from "./utils/betterAuth/middlewares"; import type { AutumnOptions } from "./utils/betterAuth/types"; import { secretKeyCheck } from "./utils/secretKeyCheck"; -import { toSnakeCase } from "@utils/toSnakeCase"; const router = createRouterWithOptions(); @@ -78,7 +74,7 @@ const handleReq = async ({ } const client = new Autumn({ - url: options?.url, + baseURL: options?.baseURL, secretKey: options?.secretKey, }); @@ -186,7 +182,7 @@ export const autumn = (options?: AutumnOptions) => { use: [], body: z.object({ errorOnNotFound: z.boolean().optional(), - expand: z.array(CustomerExpandEnum).optional(), + expand: z.array(z.string()).optional(), }), metadata: { isAction: false, diff --git a/package/src/libraries/backend/constants.ts b/autumn-js/src/libraries/backend/constants.ts similarity index 100% rename from package/src/libraries/backend/constants.ts rename to autumn-js/src/libraries/backend/constants.ts diff --git a/package/src/libraries/backend/elysia.ts b/autumn-js/src/libraries/backend/elysia.ts similarity index 93% rename from package/src/libraries/backend/elysia.ts rename to autumn-js/src/libraries/backend/elysia.ts index 631f67c9..75369c7f 100644 --- a/package/src/libraries/backend/elysia.ts +++ b/autumn-js/src/libraries/backend/elysia.ts @@ -1,17 +1,17 @@ import { findRoute } from "rou3"; -import { Autumn } from "../../sdk"; +import { Autumn } from "@sdk"; import { createRouterWithOptions } from "./routes/backendRouter"; import { AuthResult } from "./utils/AuthFunction"; import { autumnApiUrl } from "./constants"; import { secretKeyCheck } from "./utils/secretKeyCheck"; -import type { Elysia, Context } from "elysia"; +import type { Elysia } from "elysia"; import { toSnakeCase } from "@utils/toSnakeCase"; export function autumnHandler(options: { identify: (context: any) => AuthResult | Promise; - version?: string; + apiVersion?: string; secretKey?: string; - url?: string; + baseURL?: string; }) { const { found, error: resError } = secretKeyCheck(options.secretKey); if (!found && !options.secretKey) { @@ -51,8 +51,8 @@ export function autumnHandler(options: { } const autumn = new Autumn({ - url: options.url || autumnApiUrl, - version: options.version, + baseURL: options.baseURL || autumnApiUrl, + apiVersion: options.apiVersion, secretKey: options.secretKey, }); diff --git a/package/src/libraries/backend/express.ts b/autumn-js/src/libraries/backend/express.ts similarity index 93% rename from package/src/libraries/backend/express.ts rename to autumn-js/src/libraries/backend/express.ts index 5e83bf6a..6198fd21 100644 --- a/package/src/libraries/backend/express.ts +++ b/autumn-js/src/libraries/backend/express.ts @@ -1,5 +1,5 @@ import { findRoute } from "rou3"; -import { Autumn } from "../../sdk"; +import { Autumn } from "@sdk"; import { createRouterWithOptions } from "./routes/backendRouter"; import { AuthResult } from "./utils/AuthFunction"; import { autumnApiUrl } from "./constants"; @@ -12,7 +12,7 @@ export type AutumnHandlerOptions = { identify: (req: any, res: any) => AuthResult; version?: string; secretKey?: string; - url?: string; + baseURL?: string; autumn?: (req: any) => Autumn | Autumn; }; @@ -33,8 +33,8 @@ export const autumnHandler = ( ? options.autumn(req) : options?.autumn || new Autumn({ - url: options?.url || autumnApiUrl, - version: options?.version, + baseURL: options?.baseURL || autumnApiUrl, + apiVersion: options?.version, }); let path = req.path; diff --git a/package/src/libraries/backend/fastify.ts b/autumn-js/src/libraries/backend/fastify.ts similarity index 94% rename from package/src/libraries/backend/fastify.ts rename to autumn-js/src/libraries/backend/fastify.ts index 0fea7564..78737f74 100644 --- a/package/src/libraries/backend/fastify.ts +++ b/autumn-js/src/libraries/backend/fastify.ts @@ -1,5 +1,5 @@ import { findRoute } from "rou3"; -import { Autumn } from "../../sdk"; +import { Autumn } from "@sdk"; import { createRouterWithOptions } from "./routes/backendRouter"; import { AuthResult } from "./utils/AuthFunction"; import { autumnApiUrl } from "./constants"; @@ -9,10 +9,11 @@ export function autumnHandler(options: { identify: (request: any) => AuthResult; version?: string; secretKey?: string; + baseURL?: string; }) { const autumn = new Autumn({ - url: autumnApiUrl, - version: options.version, + baseURL: autumnApiUrl, + apiVersion: options.version, }); const router = createRouterWithOptions(); diff --git a/package/src/libraries/backend/hono.ts b/autumn-js/src/libraries/backend/hono.ts similarity index 92% rename from package/src/libraries/backend/hono.ts rename to autumn-js/src/libraries/backend/hono.ts index 57090429..8366d33a 100644 --- a/package/src/libraries/backend/hono.ts +++ b/autumn-js/src/libraries/backend/hono.ts @@ -1,5 +1,5 @@ import { findRoute } from "rou3"; -import { Autumn } from "../../sdk"; +import { Autumn } from "@sdk"; import { createRouterWithOptions } from "./routes/backendRouter"; import { Context, Next } from "hono"; import { AuthResult } from "./utils/AuthFunction"; @@ -8,13 +8,13 @@ import { secretKeyCheck } from "./utils/secretKeyCheck"; export const autumnHandler = (options: { identify: (c: ContextType) => AuthResult; - url?: string; + baseURL?: string; version?: string; secretKey?: string; }) => { const autumn = new Autumn({ - url: options.url || autumnApiUrl, - version: options.version, + baseURL: options.baseURL || autumnApiUrl, + apiVersion: options.version, }); const router = createRouterWithOptions(); diff --git a/package/src/libraries/backend/index.ts b/autumn-js/src/libraries/backend/index.ts similarity index 94% rename from package/src/libraries/backend/index.ts rename to autumn-js/src/libraries/backend/index.ts index f1c721ae..927d27e1 100644 --- a/package/src/libraries/backend/index.ts +++ b/autumn-js/src/libraries/backend/index.ts @@ -1,4 +1,4 @@ -import { Autumn } from "../../sdk/index"; +import { Autumn } from "@sdk"; import { createRouterWithOptions } from "./routes/backendRouter"; import { secretKeyCheck } from "./utils/secretKeyCheck"; import { findRoute } from "rou3"; @@ -22,7 +22,7 @@ export async function autumnHandler(options: { clientOptions?: { secretKey?: string; - url?: string; + baseURL?: string; }; }) { const router = createRouterWithOptions(); @@ -40,7 +40,7 @@ export async function autumnHandler(options: { const autumn = new Autumn({ secretKey: options.clientOptions?.secretKey, - url: options.clientOptions?.url, + baseURL: options.clientOptions?.baseURL, }); const { method, url: requestUrl, body } = options.request; diff --git a/package/src/libraries/backend/next.ts b/autumn-js/src/libraries/backend/next.ts similarity index 95% rename from package/src/libraries/backend/next.ts rename to autumn-js/src/libraries/backend/next.ts index 47f41f6c..3cf69abe 100644 --- a/package/src/libraries/backend/next.ts +++ b/autumn-js/src/libraries/backend/next.ts @@ -1,7 +1,7 @@ import { findRoute } from "rou3"; -import { Autumn } from "../../sdk"; +import { Autumn } from "@sdk"; -import { NextRequest, NextResponse } from "next/server"; +import { NextResponse } from "next/server"; import { AuthResult } from "./utils/AuthFunction"; import { createRouterWithOptions } from "./routes/backendRouter"; import { autumnApiUrl } from "./constants"; @@ -31,7 +31,7 @@ export function autumnHandler(options: { const autumn = new Autumn({ secretKey: options.secretKey || undefined, - url: options.url || autumnApiUrl, + baseURL: options.url || autumnApiUrl, }); if (!found) { @@ -97,3 +97,4 @@ export function autumnHandler(options: { POST: handler, }; } + diff --git a/package/src/libraries/backend/react-router.ts b/autumn-js/src/libraries/backend/react-router.ts similarity index 97% rename from package/src/libraries/backend/react-router.ts rename to autumn-js/src/libraries/backend/react-router.ts index 40f52666..1e71167d 100644 --- a/package/src/libraries/backend/react-router.ts +++ b/autumn-js/src/libraries/backend/react-router.ts @@ -1,5 +1,5 @@ import { findRoute } from "rou3"; -import { Autumn } from "../../sdk"; +import { Autumn } from "@sdk"; import { AuthResult } from "./utils/AuthFunction"; import { createRouterWithOptions } from "./routes/backendRouter"; import { autumnApiUrl } from "./constants"; @@ -12,7 +12,7 @@ export function autumnHandler(options: { }) { const autumn = new Autumn({ secretKey: options.secretKey || undefined, - url: autumnApiUrl, + baseURL: autumnApiUrl, }); const router = createRouterWithOptions(); diff --git a/package/src/libraries/backend/routes/backendRouter.ts b/autumn-js/src/libraries/backend/routes/backendRouter.ts similarity index 85% rename from package/src/libraries/backend/routes/backendRouter.ts rename to autumn-js/src/libraries/backend/routes/backendRouter.ts index dca52d61..b4ce6544 100644 --- a/package/src/libraries/backend/routes/backendRouter.ts +++ b/autumn-js/src/libraries/backend/routes/backendRouter.ts @@ -2,10 +2,7 @@ import { withAuth } from "../utils/withAuth"; import { addGenRoutes } from "./genRoutes"; import { addRoute, createRouter } from "rou3"; import { - Autumn, - CreateCustomerParams, - CustomerData, - fetchPricingTable, + Autumn } from "../../../sdk"; import { BASE_PATH } from "../constants"; import { addEntityRoutes } from "./entityRoutes"; @@ -35,8 +32,8 @@ const createCustomerHandler = withAuth({ }: { autumn: Autumn; customer_id: string; - customer_data?: CustomerData; - body: CreateCustomerParams; + customer_data?: Autumn.CustomerData; + body: Autumn.CustomerCreateParams; }) => { let res = await autumn.customers.create({ id: customer_id, @@ -56,12 +53,13 @@ const getPricingTableHandler = withAuth({ autumn: Autumn; customer_id: string; }) => { - return await fetchPricingTable({ - instance: autumn, - params: { - customer_id: customer_id || undefined, - }, - }); + throw new Error("fetch pricing table is deprecated") + // return await fetchPricingTable({ + // instance: autumn, + // params: { + // customer_id: customer_id || undefined, + // }, + // }); }, requireCustomer: false, }); diff --git a/package/src/libraries/backend/routes/basePath.ts b/autumn-js/src/libraries/backend/routes/basePath.ts similarity index 100% rename from package/src/libraries/backend/routes/basePath.ts rename to autumn-js/src/libraries/backend/routes/basePath.ts diff --git a/package/src/libraries/backend/routes/entityRoutes.ts b/autumn-js/src/libraries/backend/routes/entityRoutes.ts similarity index 78% rename from package/src/libraries/backend/routes/entityRoutes.ts rename to autumn-js/src/libraries/backend/routes/entityRoutes.ts index 224f0e1f..c871cc0e 100644 --- a/package/src/libraries/backend/routes/entityRoutes.ts +++ b/autumn-js/src/libraries/backend/routes/entityRoutes.ts @@ -2,10 +2,10 @@ import { RouterContext } from "rou3"; import { addRoute } from "rou3"; import { Autumn, - CreateEntityParams, - CustomerData, - GetEntityParams, -} from "../../../sdk"; + // CreateEntityParams, + // CustomerData, + // GetEntityParams, +} from "@sdk"; import { withAuth } from "../utils/withAuth"; const createEntityHandler = withAuth({ @@ -16,7 +16,7 @@ const createEntityHandler = withAuth({ }: { autumn: Autumn; customer_id: string; - body: CreateEntityParams | CreateEntityParams[]; + body: Autumn.EntityCreateParams; }) => { return await autumn.entities.create(customer_id, body); }, @@ -44,17 +44,10 @@ const getEntityHandler = withAuth({ }; } - let params: GetEntityParams = { - expand: searchParams?.expand?.split(",") as "invoices"[], - }; - - let res = await autumn.entities.get( - customer_id, - pathParams.entityId, - params - ); - - return res; + return await autumn.entities.get(pathParams.entityId, { + customer_id: customer_id, + expand: searchParams?.expand ? searchParams?.expand.split(",") as "invoices"[] : undefined, + }); }, }); @@ -78,7 +71,9 @@ const deleteEntityHandler = withAuth({ }; } - return await autumn.entities.delete(customer_id, pathParams.entityId); + return await autumn.entities.delete(pathParams.entityId, { + customer_id: customer_id, + }); }, }); diff --git a/package/src/libraries/backend/routes/genRoutes.ts b/autumn-js/src/libraries/backend/routes/genRoutes.ts similarity index 82% rename from package/src/libraries/backend/routes/genRoutes.ts rename to autumn-js/src/libraries/backend/routes/genRoutes.ts index f22906eb..16162958 100644 --- a/package/src/libraries/backend/routes/genRoutes.ts +++ b/autumn-js/src/libraries/backend/routes/genRoutes.ts @@ -1,15 +1,15 @@ -import type { AttachParams, CheckoutParams } from "@sdk/general/attachTypes"; +// import type { AttachParams, CheckoutParams } from "@sdk/general/attachTypes"; import { addRoute, type RouterContext } from "rou3"; import type { QueryParams } from "@/client/types/clientGenTypes"; import type { Autumn, - BillingPortalParams, - CancelParams, - CheckParams, - CustomerData, - SetupPaymentParams, - TrackParams, -} from "../../../sdk"; + // BillingPortalParams, + // CancelParams, + // CheckParams, + // CustomerData, + // SetupPaymentParams, + // TrackParams, +} from "@sdk"; import { BASE_PATH } from "../constants"; import { withAuth } from "../utils/withAuth"; @@ -29,8 +29,8 @@ const checkoutHandler = withAuth({ }: { autumn: Autumn; customer_id: string; - customer_data?: CustomerData; - body: CheckoutParams; + customer_data?: Autumn.CustomerData; + body: Autumn.CheckoutParams; }) => { const result = await autumn.checkout({ ...sanitizeBody(body), @@ -50,8 +50,8 @@ const attachHandler = withAuth({ }: { autumn: Autumn; customer_id: string; - customer_data?: CustomerData; - body: AttachParams; + customer_data?: Autumn.CustomerData; + body: Autumn.AttachParams; }) => { console.log("Body: ", body); console.log("Customer ID: ", customer_id); @@ -71,8 +71,8 @@ const setupPaymentHandler = withAuth({ }: { autumn: Autumn; customer_id: string; - customer_data?: CustomerData; - body: SetupPaymentParams; + customer_data?: Autumn.CustomerData; + body: Autumn.SetupPaymentParams; }) => { return await autumn.setupPayment({ ...sanitizeBody(body), @@ -90,7 +90,7 @@ const cancelHandler = withAuth({ }: { autumn: Autumn; customer_id: string; - body: CancelParams; + body: Autumn.CancelParams; }) => { return await autumn.cancel({ ...sanitizeBody(body), @@ -108,8 +108,8 @@ const checkHandler = withAuth({ }: { autumn: Autumn; customer_id: string; - customer_data?: CustomerData; - body: CheckParams; + customer_data?: Autumn.CustomerData; + body: Autumn.CheckParams; }) => { @@ -132,8 +132,8 @@ const trackHandler = withAuth({ }: { autumn: Autumn; customer_id: string; - customer_data?: CustomerData; - body: TrackParams; + customer_data?: Autumn.CustomerData; + body: Autumn.TrackParams; }) => { return await autumn.track({ ...sanitizeBody(body), @@ -151,9 +151,12 @@ const openBillingPortalHandler = withAuth({ }: { autumn: Autumn; customer_id: string; - body: BillingPortalParams; + body: Autumn.BillingPortalParams; }) => { - return await autumn.customers.billingPortal(customer_id, body); + return await autumn.billingPortal({ + customer_id, + return_url: body.return_url, + }); }, }); diff --git a/package/src/libraries/backend/routes/productRoutes.ts b/autumn-js/src/libraries/backend/routes/productRoutes.ts similarity index 81% rename from package/src/libraries/backend/routes/productRoutes.ts rename to autumn-js/src/libraries/backend/routes/productRoutes.ts index d7a7fb23..5dae5cf4 100644 --- a/package/src/libraries/backend/routes/productRoutes.ts +++ b/autumn-js/src/libraries/backend/routes/productRoutes.ts @@ -1,5 +1,5 @@ import { addRoute, RouterContext } from "rou3"; -import { Autumn } from "../../../sdk"; +import { Autumn } from "@sdk"; import { withAuth } from "../utils/withAuth"; import { BASE_PATH } from "../constants"; @@ -11,9 +11,9 @@ const listProductsHandler = withAuth({ autumn: Autumn; customer_id: string; }) => { - return await autumn.products.list({ - customer_id, - }); + // return await autumn.products.list({ + // customer_id, + // }); }, requireCustomer: false, }); diff --git a/package/src/libraries/backend/routes/referralRoutes.ts b/autumn-js/src/libraries/backend/routes/referralRoutes.ts similarity index 100% rename from package/src/libraries/backend/routes/referralRoutes.ts rename to autumn-js/src/libraries/backend/routes/referralRoutes.ts diff --git a/package/src/libraries/backend/schemas/zod.ts b/autumn-js/src/libraries/backend/schemas/zod.ts similarity index 100% rename from package/src/libraries/backend/schemas/zod.ts rename to autumn-js/src/libraries/backend/schemas/zod.ts diff --git a/package/src/libraries/backend/supabase.ts b/autumn-js/src/libraries/backend/supabase.ts similarity index 97% rename from package/src/libraries/backend/supabase.ts rename to autumn-js/src/libraries/backend/supabase.ts index 997fb20a..1ff81a0c 100644 --- a/package/src/libraries/backend/supabase.ts +++ b/autumn-js/src/libraries/backend/supabase.ts @@ -1,5 +1,5 @@ import { findRoute } from "rou3"; -import { Autumn } from "../../sdk"; +import { Autumn } from "@sdk"; import { AuthResult } from "./utils/AuthFunction"; import { createRouterWithOptions } from "./routes/backendRouter"; import { autumnApiUrl } from "./constants"; @@ -20,7 +20,7 @@ export function autumnHandler(options: { } const autumn = new Autumn({ - url: autumnApiUrl, + baseURL: autumnApiUrl, secretKey, }); diff --git a/package/src/libraries/backend/tanstack.ts b/autumn-js/src/libraries/backend/tanstack.ts similarity index 95% rename from package/src/libraries/backend/tanstack.ts rename to autumn-js/src/libraries/backend/tanstack.ts index 43d26673..bce6a319 100644 --- a/package/src/libraries/backend/tanstack.ts +++ b/autumn-js/src/libraries/backend/tanstack.ts @@ -1,5 +1,5 @@ import { findRoute } from "rou3"; -import { Autumn } from "../../sdk"; +import { Autumn } from "@sdk"; import { autumnApiUrl } from "./constants"; import { createRouterWithOptions } from "./routes/backendRouter"; import { AuthResult } from "./utils/AuthFunction"; @@ -9,12 +9,12 @@ import { secretKeyCheck } from "./utils/secretKeyCheck"; // Create a factory function for your Autumn handler export const autumnHandler = (options: { identify: (ctx: { request: any }) => AuthResult; - version?: string; + apiVersion?: string; secretKey?: string; }) => { const autumn = new Autumn({ - url: autumnApiUrl, - version: options.version, + baseURL: autumnApiUrl, + apiVersion: options.apiVersion, }); const router = createRouterWithOptions(); diff --git a/package/src/libraries/backend/utils/AuthFunction.ts b/autumn-js/src/libraries/backend/utils/AuthFunction.ts similarity index 100% rename from package/src/libraries/backend/utils/AuthFunction.ts rename to autumn-js/src/libraries/backend/utils/AuthFunction.ts diff --git a/package/src/libraries/backend/utils/backendRes.ts b/autumn-js/src/libraries/backend/utils/backendRes.ts similarity index 100% rename from package/src/libraries/backend/utils/backendRes.ts rename to autumn-js/src/libraries/backend/utils/backendRes.ts diff --git a/package/src/libraries/backend/utils/betterAuth/middlewares.ts b/autumn-js/src/libraries/backend/utils/betterAuth/middlewares.ts similarity index 100% rename from package/src/libraries/backend/utils/betterAuth/middlewares.ts rename to autumn-js/src/libraries/backend/utils/betterAuth/middlewares.ts diff --git a/package/src/libraries/backend/utils/betterAuth/types.ts b/autumn-js/src/libraries/backend/utils/betterAuth/types.ts similarity index 96% rename from package/src/libraries/backend/utils/betterAuth/types.ts rename to autumn-js/src/libraries/backend/utils/betterAuth/types.ts index 0e7b6621..27fc6f42 100644 --- a/package/src/libraries/backend/utils/betterAuth/types.ts +++ b/autumn-js/src/libraries/backend/utils/betterAuth/types.ts @@ -6,7 +6,7 @@ import { getSessionFromCtx } from "better-auth/api"; export type Session = ReturnType; export type AutumnOptions = { - url?: string; + baseURL?: string; secretKey?: string; // enableOrganizations?: boolean; customerScope?: "user" | "organization" | "user_and_organization"; diff --git a/package/src/libraries/backend/utils/logBackendErrors.ts b/autumn-js/src/libraries/backend/utils/logBackendErrors.ts similarity index 100% rename from package/src/libraries/backend/utils/logBackendErrors.ts rename to autumn-js/src/libraries/backend/utils/logBackendErrors.ts diff --git a/package/src/libraries/backend/utils/secretKeyCheck.ts b/autumn-js/src/libraries/backend/utils/secretKeyCheck.ts similarity index 100% rename from package/src/libraries/backend/utils/secretKeyCheck.ts rename to autumn-js/src/libraries/backend/utils/secretKeyCheck.ts diff --git a/package/src/libraries/backend/utils/withAuth.ts b/autumn-js/src/libraries/backend/utils/withAuth.ts similarity index 100% rename from package/src/libraries/backend/utils/withAuth.ts rename to autumn-js/src/libraries/backend/utils/withAuth.ts diff --git a/package/src/libraries/react/AutumnContext.tsx b/autumn-js/src/libraries/react/AutumnContext.tsx similarity index 100% rename from package/src/libraries/react/AutumnContext.tsx rename to autumn-js/src/libraries/react/AutumnContext.tsx diff --git a/package/src/libraries/react/BaseAutumnProvider.tsx b/autumn-js/src/libraries/react/BaseAutumnProvider.tsx similarity index 100% rename from package/src/libraries/react/BaseAutumnProvider.tsx rename to autumn-js/src/libraries/react/BaseAutumnProvider.tsx diff --git a/package/src/libraries/react/ReactAutumnProvider.tsx b/autumn-js/src/libraries/react/ReactAutumnProvider.tsx similarity index 100% rename from package/src/libraries/react/ReactAutumnProvider.tsx rename to autumn-js/src/libraries/react/ReactAutumnProvider.tsx diff --git a/package/src/libraries/react/client/ConvexAutumnClient.tsx b/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx similarity index 99% rename from package/src/libraries/react/client/ConvexAutumnClient.tsx rename to autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx index aff52288..3563baa4 100644 --- a/package/src/libraries/react/client/ConvexAutumnClient.tsx +++ b/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx @@ -1,11 +1,10 @@ -import { ConvexHttpClient } from "convex/browser"; import { AutumnError, CreateCustomerParams, CustomerData, AutumnPromise, Product, -} from "../../../sdk"; +} from "@sdk"; import { IAutumnClient } from "./ReactAutumnClient"; export interface ErrorResponse { diff --git a/package/src/libraries/react/client/ReactAutumnClient.tsx b/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx similarity index 98% rename from package/src/libraries/react/client/ReactAutumnClient.tsx rename to autumn-js/src/libraries/react/client/ReactAutumnClient.tsx index 539415a1..ad4cafa6 100644 --- a/package/src/libraries/react/client/ReactAutumnClient.tsx +++ b/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx @@ -1,14 +1,13 @@ import { logAuthError } from "@/errorUtils/logAuthError"; import { AutumnError, - AutumnPromise, - CreateCustomerParams, - CustomerData, - Product, - toContainerResult, -} from "../../../sdk"; + // AutumnPromise, + // CreateCustomerParams, + // CustomerData, + // Product, + // toContainerResult, +} from "@sdk"; import { logFetchError } from "../errorUtils/logFetchError"; -import { getPricingTableMethod } from "./clientCompMethods"; import { createCustomerMethod } from "./clientCusMethods"; import { createEntityMethod, diff --git a/autumn-js/src/libraries/react/client/clientCompMethods.ts b/autumn-js/src/libraries/react/client/clientCompMethods.ts new file mode 100644 index 00000000..8aaafce5 --- /dev/null +++ b/autumn-js/src/libraries/react/client/clientCompMethods.ts @@ -0,0 +1,9 @@ +// import { AutumnClient } from "./ReactAutumnClient"; +// import { AutumnPromise, PricingTableProduct } from "../../../sdk"; + +// export async function getPricingTableMethod(this: AutumnClient): AutumnPromise<{ +// list: PricingTableProduct[]; +// }> { +// const res = await this.get(`${this.prefix}/components/pricing_table`); +// return res; +// } diff --git a/package/src/libraries/react/client/clientCusMethods.ts b/autumn-js/src/libraries/react/client/clientCusMethods.ts similarity index 100% rename from package/src/libraries/react/client/clientCusMethods.ts rename to autumn-js/src/libraries/react/client/clientCusMethods.ts diff --git a/package/src/libraries/react/client/clientEntityMethods.ts b/autumn-js/src/libraries/react/client/clientEntityMethods.ts similarity index 100% rename from package/src/libraries/react/client/clientEntityMethods.ts rename to autumn-js/src/libraries/react/client/clientEntityMethods.ts diff --git a/package/src/libraries/react/client/clientGenMethods.ts b/autumn-js/src/libraries/react/client/clientGenMethods.ts similarity index 100% rename from package/src/libraries/react/client/clientGenMethods.ts rename to autumn-js/src/libraries/react/client/clientGenMethods.ts diff --git a/package/src/libraries/react/client/clientProdMethods.ts b/autumn-js/src/libraries/react/client/clientProdMethods.ts similarity index 100% rename from package/src/libraries/react/client/clientProdMethods.ts rename to autumn-js/src/libraries/react/client/clientProdMethods.ts diff --git a/package/src/libraries/react/client/clientReferralMethods.ts b/autumn-js/src/libraries/react/client/clientReferralMethods.ts similarity index 100% rename from package/src/libraries/react/client/clientReferralMethods.ts rename to autumn-js/src/libraries/react/client/clientReferralMethods.ts diff --git a/package/src/libraries/react/client/types/clientAttachTypes.ts b/autumn-js/src/libraries/react/client/types/clientAttachTypes.ts similarity index 100% rename from package/src/libraries/react/client/types/clientAttachTypes.ts rename to autumn-js/src/libraries/react/client/types/clientAttachTypes.ts diff --git a/package/src/libraries/react/client/types/clientCusTypes.ts b/autumn-js/src/libraries/react/client/types/clientCusTypes.ts similarity index 100% rename from package/src/libraries/react/client/types/clientCusTypes.ts rename to autumn-js/src/libraries/react/client/types/clientCusTypes.ts diff --git a/package/src/libraries/react/client/types/clientEntTypes.ts b/autumn-js/src/libraries/react/client/types/clientEntTypes.ts similarity index 100% rename from package/src/libraries/react/client/types/clientEntTypes.ts rename to autumn-js/src/libraries/react/client/types/clientEntTypes.ts diff --git a/package/src/libraries/react/client/types/clientGenTypes.ts b/autumn-js/src/libraries/react/client/types/clientGenTypes.ts similarity index 100% rename from package/src/libraries/react/client/types/clientGenTypes.ts rename to autumn-js/src/libraries/react/client/types/clientGenTypes.ts diff --git a/package/src/libraries/react/client/types/clientPricingTableTypes.ts b/autumn-js/src/libraries/react/client/types/clientPricingTableTypes.ts similarity index 100% rename from package/src/libraries/react/client/types/clientPricingTableTypes.ts rename to autumn-js/src/libraries/react/client/types/clientPricingTableTypes.ts diff --git a/package/src/libraries/react/client/types/clientProdTypes.ts b/autumn-js/src/libraries/react/client/types/clientProdTypes.ts similarity index 100% rename from package/src/libraries/react/client/types/clientProdTypes.ts rename to autumn-js/src/libraries/react/client/types/clientProdTypes.ts diff --git a/package/src/libraries/react/client/types/clientReferralTypes.ts b/autumn-js/src/libraries/react/client/types/clientReferralTypes.ts similarity index 100% rename from package/src/libraries/react/client/types/clientReferralTypes.ts rename to autumn-js/src/libraries/react/client/types/clientReferralTypes.ts diff --git a/package/src/libraries/react/client/types/responseTypes.ts b/autumn-js/src/libraries/react/client/types/responseTypes.ts similarity index 100% rename from package/src/libraries/react/client/types/responseTypes.ts rename to autumn-js/src/libraries/react/client/types/responseTypes.ts diff --git a/package/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx b/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx similarity index 100% rename from package/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx rename to autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx diff --git a/package/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx b/autumn-js/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx similarity index 100% rename from package/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx rename to autumn-js/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx diff --git a/package/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx b/autumn-js/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx similarity index 100% rename from package/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx rename to autumn-js/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx diff --git a/package/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx b/autumn-js/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx similarity index 100% rename from package/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx rename to autumn-js/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx diff --git a/package/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx b/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx similarity index 100% rename from package/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx rename to autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx diff --git a/package/src/libraries/react/components/pricing-table/pricing-table-synced.tsx b/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx similarity index 100% rename from package/src/libraries/react/components/pricing-table/pricing-table-synced.tsx rename to autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx diff --git a/package/src/libraries/react/components/ui/accordion.tsx b/autumn-js/src/libraries/react/components/ui/accordion.tsx similarity index 100% rename from package/src/libraries/react/components/ui/accordion.tsx rename to autumn-js/src/libraries/react/components/ui/accordion.tsx diff --git a/package/src/libraries/react/components/ui/button.tsx b/autumn-js/src/libraries/react/components/ui/button.tsx similarity index 100% rename from package/src/libraries/react/components/ui/button.tsx rename to autumn-js/src/libraries/react/components/ui/button.tsx diff --git a/package/src/libraries/react/components/ui/dialog.tsx b/autumn-js/src/libraries/react/components/ui/dialog.tsx similarity index 100% rename from package/src/libraries/react/components/ui/dialog.tsx rename to autumn-js/src/libraries/react/components/ui/dialog.tsx diff --git a/package/src/libraries/react/components/ui/input.tsx b/autumn-js/src/libraries/react/components/ui/input.tsx similarity index 100% rename from package/src/libraries/react/components/ui/input.tsx rename to autumn-js/src/libraries/react/components/ui/input.tsx diff --git a/package/src/libraries/react/components/ui/popover.tsx b/autumn-js/src/libraries/react/components/ui/popover.tsx similarity index 100% rename from package/src/libraries/react/components/ui/popover.tsx rename to autumn-js/src/libraries/react/components/ui/popover.tsx diff --git a/package/src/libraries/react/components/ui/switch.tsx b/autumn-js/src/libraries/react/components/ui/switch.tsx similarity index 100% rename from package/src/libraries/react/components/ui/switch.tsx rename to autumn-js/src/libraries/react/components/ui/switch.tsx diff --git a/package/src/libraries/react/errorUtils/logAuthError.ts b/autumn-js/src/libraries/react/errorUtils/logAuthError.ts similarity index 100% rename from package/src/libraries/react/errorUtils/logAuthError.ts rename to autumn-js/src/libraries/react/errorUtils/logAuthError.ts diff --git a/package/src/libraries/react/errorUtils/logFetchError.ts b/autumn-js/src/libraries/react/errorUtils/logFetchError.ts similarity index 100% rename from package/src/libraries/react/errorUtils/logFetchError.ts rename to autumn-js/src/libraries/react/errorUtils/logFetchError.ts diff --git a/package/src/libraries/react/hooks/helpers/handleCheck.ts b/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts similarity index 100% rename from package/src/libraries/react/hooks/helpers/handleCheck.ts rename to autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts diff --git a/package/src/libraries/react/hooks/helpers/useAutumnBase.tsx b/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx similarity index 100% rename from package/src/libraries/react/hooks/helpers/useAutumnBase.tsx rename to autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx diff --git a/package/src/libraries/react/hooks/helpers/useDialog.tsx b/autumn-js/src/libraries/react/hooks/helpers/useDialog.tsx similarity index 100% rename from package/src/libraries/react/hooks/helpers/useDialog.tsx rename to autumn-js/src/libraries/react/hooks/helpers/useDialog.tsx diff --git a/package/src/libraries/react/hooks/useAnalytics.tsx b/autumn-js/src/libraries/react/hooks/useAnalytics.tsx similarity index 100% rename from package/src/libraries/react/hooks/useAnalytics.tsx rename to autumn-js/src/libraries/react/hooks/useAnalytics.tsx diff --git a/package/src/libraries/react/hooks/useCustomer.tsx b/autumn-js/src/libraries/react/hooks/useCustomer.tsx similarity index 100% rename from package/src/libraries/react/hooks/useCustomer.tsx rename to autumn-js/src/libraries/react/hooks/useCustomer.tsx diff --git a/package/src/libraries/react/hooks/useCustomerBase.tsx b/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx similarity index 100% rename from package/src/libraries/react/hooks/useCustomerBase.tsx rename to autumn-js/src/libraries/react/hooks/useCustomerBase.tsx diff --git a/package/src/libraries/react/hooks/useEntity.tsx b/autumn-js/src/libraries/react/hooks/useEntity.tsx similarity index 100% rename from package/src/libraries/react/hooks/useEntity.tsx rename to autumn-js/src/libraries/react/hooks/useEntity.tsx diff --git a/package/src/libraries/react/hooks/useEntityBase.tsx b/autumn-js/src/libraries/react/hooks/useEntityBase.tsx similarity index 100% rename from package/src/libraries/react/hooks/useEntityBase.tsx rename to autumn-js/src/libraries/react/hooks/useEntityBase.tsx diff --git a/package/src/libraries/react/hooks/usePaywall.tsx b/autumn-js/src/libraries/react/hooks/usePaywall.tsx similarity index 100% rename from package/src/libraries/react/hooks/usePaywall.tsx rename to autumn-js/src/libraries/react/hooks/usePaywall.tsx diff --git a/package/src/libraries/react/hooks/usePricingTable.tsx b/autumn-js/src/libraries/react/hooks/usePricingTable.tsx similarity index 100% rename from package/src/libraries/react/hooks/usePricingTable.tsx rename to autumn-js/src/libraries/react/hooks/usePricingTable.tsx diff --git a/package/src/libraries/react/hooks/usePricingTableBase.tsx b/autumn-js/src/libraries/react/hooks/usePricingTableBase.tsx similarity index 100% rename from package/src/libraries/react/hooks/usePricingTableBase.tsx rename to autumn-js/src/libraries/react/hooks/usePricingTableBase.tsx diff --git a/package/src/libraries/react/hooks/useProductsBase.tsx b/autumn-js/src/libraries/react/hooks/useProductsBase.tsx similarity index 100% rename from package/src/libraries/react/hooks/useProductsBase.tsx rename to autumn-js/src/libraries/react/hooks/useProductsBase.tsx diff --git a/package/src/libraries/react/index.ts b/autumn-js/src/libraries/react/index.ts similarity index 91% rename from package/src/libraries/react/index.ts rename to autumn-js/src/libraries/react/index.ts index f66fe08f..ca78457f 100644 --- a/package/src/libraries/react/index.ts +++ b/autumn-js/src/libraries/react/index.ts @@ -3,7 +3,7 @@ import "../../styles/global.css"; export { ReactAutumnProvider as AutumnProvider } from "./ReactAutumnProvider"; -export type { PricingTableProduct } from "@sdk/components/componentTypes"; +// export type { PricingTableProduct } from "@sdk/components/componentTypes"; export type { ProductDetails } from "./client/types/clientPricingTableTypes"; export { useCustomer } from "./hooks/useCustomer"; diff --git a/package/src/libraries/react/lib/utils.ts b/autumn-js/src/libraries/react/lib/utils.ts similarity index 100% rename from package/src/libraries/react/lib/utils.ts rename to autumn-js/src/libraries/react/lib/utils.ts diff --git a/package/src/libraries/react/utils/compareParams.ts b/autumn-js/src/libraries/react/utils/compareParams.ts similarity index 100% rename from package/src/libraries/react/utils/compareParams.ts rename to autumn-js/src/libraries/react/utils/compareParams.ts diff --git a/package/src/libraries/react/utils/errorUtils.ts b/autumn-js/src/libraries/react/utils/errorUtils.ts similarity index 100% rename from package/src/libraries/react/utils/errorUtils.ts rename to autumn-js/src/libraries/react/utils/errorUtils.ts diff --git a/package/src/libraries/react/utils/inject-styles.ts b/autumn-js/src/libraries/react/utils/inject-styles.ts similarity index 100% rename from package/src/libraries/react/utils/inject-styles.ts rename to autumn-js/src/libraries/react/utils/inject-styles.ts diff --git a/autumn-js/src/sdk/index.ts b/autumn-js/src/sdk/index.ts new file mode 100644 index 00000000..99b60817 --- /dev/null +++ b/autumn-js/src/sdk/index.ts @@ -0,0 +1,3 @@ +// autumn-js/src/sdk/index.ts +export * from '@useautumn/sdk'; +export { default } from '@useautumn/sdk'; \ No newline at end of file diff --git a/package/src/styles/global.css b/autumn-js/src/styles/global.css similarity index 100% rename from package/src/styles/global.css rename to autumn-js/src/styles/global.css diff --git a/package/src/styles/global_old.css b/autumn-js/src/styles/global_old.css similarity index 100% rename from package/src/styles/global_old.css rename to autumn-js/src/styles/global_old.css diff --git a/package/src/utils/entityUtils.tsx b/autumn-js/src/utils/entityUtils.tsx similarity index 100% rename from package/src/utils/entityUtils.tsx rename to autumn-js/src/utils/entityUtils.tsx diff --git a/package/src/utils/logger.ts b/autumn-js/src/utils/logger.ts similarity index 100% rename from package/src/utils/logger.ts rename to autumn-js/src/utils/logger.ts diff --git a/package/src/utils/toSnakeCase.ts b/autumn-js/src/utils/toSnakeCase.ts similarity index 100% rename from package/src/utils/toSnakeCase.ts rename to autumn-js/src/utils/toSnakeCase.ts diff --git a/package/tailwind.config.ts b/autumn-js/tailwind.config.ts similarity index 100% rename from package/tailwind.config.ts rename to autumn-js/tailwind.config.ts diff --git a/package/tsconfig.json b/autumn-js/tsconfig.json similarity index 100% rename from package/tsconfig.json rename to autumn-js/tsconfig.json diff --git a/package/tsup.config.ts b/autumn-js/tsup.config.ts similarity index 100% rename from package/tsup.config.ts rename to autumn-js/tsup.config.ts diff --git a/package/tsup.dev.config.ts b/autumn-js/tsup.dev.config.ts similarity index 100% rename from package/tsup.dev.config.ts rename to autumn-js/tsup.dev.config.ts diff --git a/build b/build new file mode 100755 index 00000000..ddd6705d --- /dev/null +++ b/build @@ -0,0 +1,11 @@ +#!/bin/bash +echo "📦 Step 1: Building ts-sdk..." +./ts-sdk/scripts/bootstrap && ./ts-sdk/scripts/build + +echo "🎨 Step 2: Installing dependencies..." +pnpm install + +# echo "🚀 Step 3: Building autumn-js..." +# cd autumn-js && pnpm run build + +echo "✅ Build complete! Ready to test in nextjs/" \ No newline at end of file diff --git a/convex/package-lock.json b/convex/package-lock.json deleted file mode 100644 index ec15c809..00000000 --- a/convex/package-lock.json +++ /dev/null @@ -1,5836 +0,0 @@ -{ - "name": "convex", - "version": "0.0.12", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "convex", - "version": "0.0.12", - "license": "Apache-2.0", - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.4", - "@edge-runtime/vm": "^5.0.0", - "@eslint/js": "9.29.0", - "@types/node": "18.17.0", - "chokidar-cli": "3.0.0", - "convex-test": "0.0.37", - "eslint": "9.29.0", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", - "globals": "^15.9.0", - "npm-run-all2": "7.0.2", - "prettier": "3.2.5", - "tsc-alias": "^1.8.16", - "typescript": "5.5.4", - "typescript-eslint": "8.34.1", - "vitest": "3.2.4" - }, - "peerDependencies": { - "convex": "^1.24.8", - "react": "^18.3.1 || ^19.0.0" - } - }, - "node_modules/@andrewbranch/untar.js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@andrewbranch/untar.js/-/untar.js-1.0.3.tgz", - "integrity": "sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==", - "dev": true - }, - "node_modules/@arethetypeswrong/cli": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/@arethetypeswrong/cli/-/cli-0.17.4.tgz", - "integrity": "sha512-AeiKxtf67XD/NdOqXgBOE5TZWH3EOCt+0GkbUpekOzngc+Q/cRZ5azjWyMxISxxfp0EItgm5NoSld9p7BAA5xQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@arethetypeswrong/core": "0.17.4", - "chalk": "^4.1.2", - "cli-table3": "^0.6.3", - "commander": "^10.0.1", - "marked": "^9.1.2", - "marked-terminal": "^7.1.0", - "semver": "^7.5.4" - }, - "bin": { - "attw": "dist/index.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@arethetypeswrong/core": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/@arethetypeswrong/core/-/core-0.17.4.tgz", - "integrity": "sha512-Izvir8iIoU+X4SKtDAa5kpb+9cpifclzsbA8x/AZY0k0gIfXYQ1fa1B6Epfe6vNA2YfDX8VtrZFgvnXB6aPEoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@andrewbranch/untar.js": "^1.0.3", - "@loaderkit/resolve": "^1.0.2", - "cjs-module-lexer": "^1.2.3", - "fflate": "^0.8.2", - "lru-cache": "^10.4.3", - "semver": "^7.5.4", - "typescript": "5.6.1-rc", - "validate-npm-package-name": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@arethetypeswrong/core/node_modules/typescript": { - "version": "5.6.1-rc", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.1-rc.tgz", - "integrity": "sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/@braidai/lang": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@braidai/lang/-/lang-1.1.1.tgz", - "integrity": "sha512-5uM+no3i3DafVgkoW7ayPhEGHNNBZCSj5TrGDQt0ayEKQda5f3lAXlmQg0MR5E0gKgmTzUUEtSWHsEC3h9jUcg==", - "dev": true - }, - "node_modules/@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/@edge-runtime/primitives": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@edge-runtime/primitives/-/primitives-6.0.0.tgz", - "integrity": "sha512-FqoxaBT+prPBHBwE1WXS1ocnu/VLTQyZ6NMUBAdbP7N2hsFTTxMC/jMu2D/8GAlMQfxeuppcPuCUk/HO3fpIvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/@edge-runtime/vm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@edge-runtime/vm/-/vm-5.0.0.tgz", - "integrity": "sha512-NKBGBSIKUG584qrS1tyxVpX/AKJKQw5HgjYEnPLC0QsTw79JrGn+qUr8CXFb955Iy7GUdiiUv1rJ6JBGvaKb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@edge-runtime/primitives": "6.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz", - "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.1.tgz", - "integrity": "sha512-OL0RJzC/CBzli0DrrR31qzj6d6i6Mm3HByuhflhl4LOBiWxN+3i6/t/ZQQNii4tjksXi8r2CRW1wMpWA2ULUEw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^2.1.6", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.3.tgz", - "integrity": "sha512-u180qk2Um1le4yf0ruXH3PYFeEZeYC3p/4wCTKrr2U1CmGdzGi3KtY0nuPDH48UJxlKCC5RDzbcbh4X0XlqgHg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", - "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "9.29.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.29.0.tgz", - "integrity": "sha512-3PIF4cBw/y+1u2EazflInpV+lYsSG0aByVIQzAgb1m1MhHFSbqTyNqtBKHgWf/9Ykud+DhILS9EGkmekVhbKoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.2.tgz", - "integrity": "sha512-4SaFZCNfJqvk/kenHpI8xvN42DMaoycy4PzKc5otHxRswww1kAt82OlBuwRVLofCACCTZEcla2Ydxv8scMXaTg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.15.0", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.0.tgz", - "integrity": "sha512-b7ePw78tEWWkpgZCDYkbqDOP8dmM6qe+AOC6iuJqlq1R/0ahMAeH3qynpnqKFGkMltrp44ohV4ubGyvLX28tzw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", - "dev": true, - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@loaderkit/resolve": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@loaderkit/resolve/-/resolve-1.0.4.tgz", - "integrity": "sha512-rJzYKVcV4dxJv+vW6jlvagF8zvGxHJ2+HTr1e2qOejfmGhAApgJHl8Aog4mMszxceTRiKTTbnpgmTO1bEZHV/A==", - "dev": true, - "license": "ISC", - "dependencies": { - "@braidai/lang": "^1.0.0" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.43.0.tgz", - "integrity": "sha512-eKoL8ykZ7zz8MjgBenEF2OoTNFAPFz1/lyJ5UmmFSz5jW+7XbH1+MAgCVHy72aG59rbuQLcJeiMrP8qP5d/N0A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" - } - }, - "node_modules/@types/chai": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", - "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/deep-eql": "*" - } - }, - "node_modules/@types/deep-eql": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "node_modules/@types/node": { - "version": "18.17.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.0.tgz", - "integrity": "sha512-GXZxEtOxYGFchyUzxvKI14iff9KZ2DI+A6a37o6EQevtg6uO9t+aUZKcaC1Te5Ng1OnLM7K9NVVj+FbecD9cJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.34.1.tgz", - "integrity": "sha512-STXcN6ebF6li4PxwNeFnqF8/2BNDvBupf2OPx2yWNzr6mKNGF7q49VM00Pz5FaomJyqvbXpY6PhO+T9w139YEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.34.1", - "@typescript-eslint/type-utils": "8.34.1", - "@typescript-eslint/utils": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1", - "graphemer": "^1.4.0", - "ignore": "^7.0.0", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.34.1", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.34.1.tgz", - "integrity": "sha512-4O3idHxhyzjClSMJ0a29AcoK0+YwnEqzI6oz3vlRf3xw0zbzt15MzXwItOlnr5nIth6zlY2RENLsOPvhyrKAQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.34.1", - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/typescript-estree": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.34.1.tgz", - "integrity": "sha512-nuHlOmFZfuRwLJKDGQOVc0xnQrAmuq1Mj/ISou5044y1ajGNp2BNliIqp7F2LPQ5sForz8lempMFCovfeS1XoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.34.1", - "@typescript-eslint/types": "^8.34.1", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.34.1.tgz", - "integrity": "sha512-beu6o6QY4hJAgL1E8RaXNC071G4Kso2MGmJskCFQhRhg8VOH/FDbC8soP8NHN7e/Hdphwp8G8cE6OBzC8o41ZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.1.tgz", - "integrity": "sha512-K4Sjdo4/xF9NEeA2khOb7Y5nY6NSXBnod87uniVYW9kHP+hNlDV8trUSFeynA2uxWam4gIWgWoygPrv9VMWrYg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.34.1.tgz", - "integrity": "sha512-Tv7tCCr6e5m8hP4+xFugcrwTOucB8lshffJ6zf1mF1TbU67R+ntCc6DzLNKM+s/uzDyv8gLq7tufaAhIBYeV8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "8.34.1", - "@typescript-eslint/utils": "8.34.1", - "debug": "^4.3.4", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.34.1.tgz", - "integrity": "sha512-rjLVbmE7HR18kDsjNIZQHxmv9RZwlgzavryL5Lnj2ujIRTeXlKtILHgRNmQ3j4daw7zd+mQgy+uyt6Zo6I0IGA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.34.1.tgz", - "integrity": "sha512-rjCNqqYPuMUF5ODD+hWBNmOitjBWghkGKJg6hiCHzUvXRy6rK22Jd3rwbP2Xi+R7oYVvIKhokHVhH41BxPV5mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.34.1", - "@typescript-eslint/tsconfig-utils": "8.34.1", - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/visitor-keys": "8.34.1", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.34.1.tgz", - "integrity": "sha512-mqOwUdZ3KjtGk7xJJnLbHxTuWVn3GO2WZZuM+Slhkun4+qthLdXx32C8xIXbO1kfCECb3jIs3eoxK3eryk7aoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.34.1", - "@typescript-eslint/types": "8.34.1", - "@typescript-eslint/typescript-estree": "8.34.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.34.1.tgz", - "integrity": "sha512-xoh5rJ+tgsRKoXnkBPFRLZ7rjKM0AfVbC68UZ/ECXoDbfggb9RbEySN359acY1vS3qZ0jVTVWzbtfapwm5ztxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.34.1", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@vitest/expect": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", - "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/mocker": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", - "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "3.2.4", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.17" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, - "node_modules/@vitest/pretty-format": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", - "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", - "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "3.2.4", - "pathe": "^2.0.3", - "strip-literal": "^3.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", - "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "3.2.4", - "magic-string": "^0.30.17", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/spy": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", - "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyspy": "^4.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/utils": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", - "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "3.2.4", - "loupe": "^3.1.4", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-escapes": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", - "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "environment": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true, - "license": "MIT" - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", - "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.0", - "es-object-atoms": "^1.1.1", - "get-intrinsic": "^1.3.0", - "is-string": "^1.1.1", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/array.prototype.findlast": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", - "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", - "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", - "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/async-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", - "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/chai": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz", - "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "assertion-error": "^2.0.1", - "check-error": "^2.1.1", - "deep-eql": "^5.0.1", - "loupe": "^3.1.0", - "pathval": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/check-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", - "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar-cli": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chokidar-cli/-/chokidar-cli-3.0.0.tgz", - "integrity": "sha512-xVW+Qeh7z15uZRxHOkP93Ux8A0xbPzwK4GaqD8dQOYc34TlkqUhVSS59fK36DOp5WdJlrRzlYSy02Ht99FjZqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "chokidar": "^3.5.2", - "lodash.debounce": "^4.0.8", - "lodash.throttle": "^4.1.1", - "yargs": "^13.3.0" - }, - "bin": { - "chokidar": "index.js" - }, - "engines": { - "node": ">= 8.10.0" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", - "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/cli-highlight": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz", - "integrity": "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==", - "dev": true, - "license": "ISC", - "dependencies": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "bin": { - "highlight": "bin/highlight" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "node_modules/cli-highlight/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/cli-highlight/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/cli-highlight/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/cli-highlight/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/cli-highlight/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/cli-highlight/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/cli-table3": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", - "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "string-width": "^4.2.0" - }, - "engines": { - "node": "10.* || >= 12.*" - }, - "optionalDependencies": { - "@colors/colors": "1.5.0" - } - }, - "node_modules/cli-table3/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-table3/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/cli-table3/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-table3/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-table3/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/convex": { - "version": "1.24.8", - "resolved": "https://registry.npmjs.org/convex/-/convex-1.24.8.tgz", - "integrity": "sha512-WNKLXhOboRthS1cAi8EbBpiEsXJF2UD2H6rEd4f6BjISd+/5P+aDMw5xUpYMsbATdxqSmEoIl5QsciWJcXyW+A==", - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "esbuild": "0.25.2", - "jwt-decode": "^4.0.0", - "prettier": "3.5.3" - }, - "bin": { - "convex": "bin/main.js" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=7.0.0" - }, - "peerDependencies": { - "@auth0/auth0-react": "^2.0.1", - "@clerk/clerk-react": "^4.12.8 || ^5.0.0", - "react": "^18.0.0 || ^19.0.0-0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@auth0/auth0-react": { - "optional": true - }, - "@clerk/clerk-react": { - "optional": true - }, - "react": { - "optional": true - } - } - }, - "node_modules/convex-test": { - "version": "0.0.37", - "resolved": "https://registry.npmjs.org/convex-test/-/convex-test-0.0.37.tgz", - "integrity": "sha512-gC2ReAGgPAlCCWKNHAjJnEr/IMi1oo5ux9g5cLL68m401Ne1xXc43TfVAD+m/FiGDztmsHtfPr61EWn51mCRjw==", - "dev": true, - "license": "Apache-2.0", - "peerDependencies": { - "convex": "^1.16.4" - } - }, - "node_modules/convex/node_modules/prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", - "license": "MIT", - "peer": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/data-view-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/inspect-js" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deep-eql": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", - "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true, - "license": "MIT" - }, - "node_modules/emojilib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/emojilib/-/emojilib-2.4.0.tgz", - "integrity": "sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==", - "dev": true, - "license": "MIT" - }, - "node_modules/environment": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", - "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/es-abstract": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", - "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.3.0", - "get-proto": "^1.0.1", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.2.1", - "is-set": "^2.0.3", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.1", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.4", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "stop-iteration-iterator": "^1.1.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.19" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-iterator-helpers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz", - "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.6", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "iterator.prototype": "^1.1.4", - "safe-array-concat": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", - "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", - "dev": true, - "license": "MIT" - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", - "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", - "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7", - "is-date-object": "^1.0.5", - "is-symbol": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/esbuild": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz", - "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==", - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.2", - "@esbuild/android-arm": "0.25.2", - "@esbuild/android-arm64": "0.25.2", - "@esbuild/android-x64": "0.25.2", - "@esbuild/darwin-arm64": "0.25.2", - "@esbuild/darwin-x64": "0.25.2", - "@esbuild/freebsd-arm64": "0.25.2", - "@esbuild/freebsd-x64": "0.25.2", - "@esbuild/linux-arm": "0.25.2", - "@esbuild/linux-arm64": "0.25.2", - "@esbuild/linux-ia32": "0.25.2", - "@esbuild/linux-loong64": "0.25.2", - "@esbuild/linux-mips64el": "0.25.2", - "@esbuild/linux-ppc64": "0.25.2", - "@esbuild/linux-riscv64": "0.25.2", - "@esbuild/linux-s390x": "0.25.2", - "@esbuild/linux-x64": "0.25.2", - "@esbuild/netbsd-arm64": "0.25.2", - "@esbuild/netbsd-x64": "0.25.2", - "@esbuild/openbsd-arm64": "0.25.2", - "@esbuild/openbsd-x64": "0.25.2", - "@esbuild/sunos-x64": "0.25.2", - "@esbuild/win32-arm64": "0.25.2", - "@esbuild/win32-ia32": "0.25.2", - "@esbuild/win32-x64": "0.25.2" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "9.29.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.29.0.tgz", - "integrity": "sha512-GsGizj2Y1rCWDu6XoEekL3RLilp0voSePurjZIkxL3wlm5o5EC9VpgaP7lrCvjnkuLvzFBQWB3vWB3K5KQTveQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.20.1", - "@eslint/config-helpers": "^0.2.1", - "@eslint/core": "^0.14.0", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.29.0", - "@eslint/plugin-kit": "^0.3.1", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.4.0", - "eslint-visitor-keys": "^4.2.1", - "espree": "^10.4.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.37.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", - "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.3", - "array.prototype.tosorted": "^1.1.4", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.2.1", - "estraverse": "^5.3.0", - "hasown": "^2.0.2", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.9", - "object.fromentries": "^2.0.8", - "object.values": "^1.2.1", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.12", - "string.prototype.repeat": "^1.0.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" - } - }, - "node_modules/eslint-plugin-react-hooks": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", - "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-scope": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", - "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", - "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.15.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expect-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz", - "integrity": "sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fflate": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", - "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", - "dev": true, - "license": "MIT" - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", - "dev": true - }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", - "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "functions-have-names": "^1.2.3", - "hasown": "^2.0.2", - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-symbol-description": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-tsconfig": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", - "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "15.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.12.0.tgz", - "integrity": "sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, - "node_modules/has-bigints": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": "*" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/internal-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-async-function": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", - "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-object": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", - "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finalizationregistry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/is-generator-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", - "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", - "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", - "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/iterator.prototype": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", - "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "get-proto": "^1.0.0", - "has-symbols": "^1.1.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/js-tokens": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", - "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-4.0.0.tgz", - "integrity": "sha512-lR4MXjGNgkJc7tkQ97kb2nuEMnNCyU//XYVH0MKTGcXEiSudQ5MKGKen3C5QubYy0vmq+JGitUg92uuywGEwIA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/jwt-decode": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz", - "integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lodash.throttle": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", - "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/loose-envify/node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/loupe": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.4.tgz", - "integrity": "sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg==", - "dev": true, - "license": "MIT" - }, - "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/magic-string": { - "version": "0.30.17", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" - } - }, - "node_modules/marked": { - "version": "9.1.6", - "resolved": "https://registry.npmjs.org/marked/-/marked-9.1.6.tgz", - "integrity": "sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==", - "dev": true, - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 16" - } - }, - "node_modules/marked-terminal": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-7.3.0.tgz", - "integrity": "sha512-t4rBvPsHc57uE/2nJOLmMbZCQ4tgAccAED3ngXQqW6g+TxA488JzJ+FK3lQkzBQOI1mRV/r/Kq+1ZlJ4D0owQw==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^7.0.0", - "ansi-regex": "^6.1.0", - "chalk": "^5.4.1", - "cli-highlight": "^2.1.11", - "cli-table3": "^0.6.5", - "node-emoji": "^2.2.0", - "supports-hyperlinks": "^3.1.0" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "marked": ">=1 <16" - } - }, - "node_modules/marked-terminal/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/marked-terminal/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", - "dev": true, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/mylas": { - "version": "2.1.13", - "resolved": "https://registry.npmjs.org/mylas/-/mylas-2.1.13.tgz", - "integrity": "sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/raouldeheer" - } - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/node-emoji": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-2.2.0.tgz", - "integrity": "sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sindresorhus/is": "^4.6.0", - "char-regex": "^1.0.2", - "emojilib": "^2.4.0", - "skin-tone": "^2.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-normalize-package-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz", - "integrity": "sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/npm-run-all2": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/npm-run-all2/-/npm-run-all2-7.0.2.tgz", - "integrity": "sha512-7tXR+r9hzRNOPNTvXegM+QzCuMjzUIIq66VDunL6j60O4RrExx32XUhlrS7UK4VcdGw5/Wxzb3kfNcFix9JKDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "cross-spawn": "^7.0.6", - "memorystream": "^0.3.1", - "minimatch": "^9.0.0", - "pidtree": "^0.6.0", - "read-package-json-fast": "^4.0.0", - "shell-quote": "^1.7.3", - "which": "^5.0.0" - }, - "bin": { - "npm-run-all": "bin/npm-run-all/index.js", - "npm-run-all2": "bin/npm-run-all/index.js", - "run-p": "bin/run-p/index.js", - "run-s": "bin/run-s/index.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0", - "npm": ">= 9" - } - }, - "node_modules/npm-run-all2/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/npm-run-all2/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/npm-run-all2/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=16" - } - }, - "node_modules/npm-run-all2/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm-run-all2/node_modules/which": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", - "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", - "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.values": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", - "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/own-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", - "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.6", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", - "dev": true, - "license": "MIT" - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "parse5": "^6.0.1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, - "node_modules/pathval": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", - "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.16" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pidtree": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", - "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", - "dev": true, - "license": "MIT", - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/plimit-lit": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/plimit-lit/-/plimit-lit-1.6.1.tgz", - "integrity": "sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "queue-lit": "^1.5.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/postcss": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "license": "MIT", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-lit": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/queue-lit/-/queue-lit-1.5.2.tgz", - "integrity": "sha512-tLc36IOPeMAubu8BkW8YDBV+WyIgKlYU7zUNs0J5Vk9skSZ4JfGlPOqplP0aHdfv7HL0B2Pg6nwiq60Qc6M2Hw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/react": { - "version": "19.1.0", - "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz", - "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/read-package-json-fast": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-4.0.0.tgz", - "integrity": "sha512-qpt8EwugBWDw2cgE2W+/3oxC+KTez2uSVR8JU9Q36TXPAGCaozfQUs59v4j4GFpWTaw0i6hAZSvOmu1J0uOEUg==", - "dev": true, - "license": "ISC", - "dependencies": { - "json-parse-even-better-errors": "^4.0.0", - "npm-normalize-package-bin": "^4.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", - "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true, - "license": "ISC" - }, - "node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rollup": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.43.0.tgz", - "integrity": "sha512-wdN2Kd3Twh8MAEOEJZsuxuLKCsBEo4PVNLK6tQWAn10VhsVewQLzcucMgLolRlhFybGxfclbPeEYBaP6RvUFGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.7" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.43.0", - "@rollup/rollup-android-arm64": "4.43.0", - "@rollup/rollup-darwin-arm64": "4.43.0", - "@rollup/rollup-darwin-x64": "4.43.0", - "@rollup/rollup-freebsd-arm64": "4.43.0", - "@rollup/rollup-freebsd-x64": "4.43.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.43.0", - "@rollup/rollup-linux-arm-musleabihf": "4.43.0", - "@rollup/rollup-linux-arm64-gnu": "4.43.0", - "@rollup/rollup-linux-arm64-musl": "4.43.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.43.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.43.0", - "@rollup/rollup-linux-riscv64-gnu": "4.43.0", - "@rollup/rollup-linux-riscv64-musl": "4.43.0", - "@rollup/rollup-linux-s390x-gnu": "4.43.0", - "@rollup/rollup-linux-x64-gnu": "4.43.0", - "@rollup/rollup-linux-x64-musl": "4.43.0", - "@rollup/rollup-win32-arm64-msvc": "4.43.0", - "@rollup/rollup-win32-ia32-msvc": "4.43.0", - "@rollup/rollup-win32-x64-msvc": "4.43.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-array-concat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", - "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-push-apply": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true, - "license": "ISC" - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", - "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/shell-quote": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", - "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true - }, - "node_modules/skin-tone": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/skin-tone/-/skin-tone-2.0.0.tgz", - "integrity": "sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "unicode-emoji-modifier-base": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true - }, - "node_modules/std-env": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", - "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", - "dev": true, - "license": "MIT" - }, - "node_modules/stop-iteration-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", - "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "internal-slot": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/string.prototype.matchall": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", - "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "regexp.prototype.flags": "^1.5.3", - "set-function-name": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.repeat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", - "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", - "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", - "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/strip-literal": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", - "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^9.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.2.0.tgz", - "integrity": "sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=14.18" - }, - "funding": { - "url": "https://github.com/chalk/supports-hyperlinks?sponsor=1" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tinybench": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", - "dev": true - }, - "node_modules/tinyexec": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", - "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyglobby": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", - "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", - "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/tinypool": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", - "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.0.0 || >=20.0.0" - } - }, - "node_modules/tinyrainbow": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", - "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tinyspy": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", - "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-api-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", - "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/tsc-alias": { - "version": "1.8.16", - "resolved": "https://registry.npmjs.org/tsc-alias/-/tsc-alias-1.8.16.tgz", - "integrity": "sha512-QjCyu55NFyRSBAl6+MTFwplpFcnm2Pq01rR/uxfqJoLMm6X3O14KEGtaSDZpJYaE1bJBGDjD0eSuiIWPe2T58g==", - "dev": true, - "license": "MIT", - "dependencies": { - "chokidar": "^3.5.3", - "commander": "^9.0.0", - "get-tsconfig": "^4.10.0", - "globby": "^11.0.4", - "mylas": "^2.1.9", - "normalize-path": "^3.0.0", - "plimit-lit": "^1.2.6" - }, - "bin": { - "tsc-alias": "dist/bin/index.js" - }, - "engines": { - "node": ">=16.20.2" - } - }, - "node_modules/tsc-alias/node_modules/commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/tsc-alias/node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tsc-alias/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", - "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0", - "reflect.getprototypeof": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "8.34.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.34.1.tgz", - "integrity": "sha512-XjS+b6Vg9oT1BaIUfkW3M3LvqZE++rbzAMEHuccCfO/YkP43ha6w3jTEMilQxMF92nVOYCcdjv1ZUhAa1D/0ow==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.34.1", - "@typescript-eslint/parser": "8.34.1", - "@typescript-eslint/utils": "8.34.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/unicode-emoji-modifier-base": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unicode-emoji-modifier-base/-/unicode-emoji-modifier-base-1.0.0.tgz", - "integrity": "sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/validate-npm-package-name": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", - "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/vite": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", - "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.25.0", - "fdir": "^6.4.4", - "picomatch": "^4.0.2", - "postcss": "^8.5.3", - "rollup": "^4.34.9", - "tinyglobby": "^0.2.13" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "jiti": ">=1.21.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/vite-node": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", - "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.4.1", - "es-module-lexer": "^1.7.0", - "pathe": "^2.0.3", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/vite/node_modules/fdir": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", - "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/vite/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/vitest": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", - "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/expect": "3.2.4", - "@vitest/mocker": "3.2.4", - "@vitest/pretty-format": "^3.2.4", - "@vitest/runner": "3.2.4", - "@vitest/snapshot": "3.2.4", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "debug": "^4.4.1", - "expect-type": "^1.2.1", - "magic-string": "^0.30.17", - "pathe": "^2.0.3", - "picomatch": "^4.0.2", - "std-env": "^3.9.0", - "tinybench": "^2.9.0", - "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.14", - "tinypool": "^1.1.1", - "tinyrainbow": "^2.0.0", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", - "vite-node": "3.2.4", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/debug": "^4.1.12", - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.2.4", - "@vitest/ui": "3.2.4", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/debug": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "node_modules/vitest/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/which-typed-array": { - "version": "1.1.19", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", - "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/why-is-node-running": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", - "dev": true, - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/yargs/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/nextjs/package.json b/nextjs/package.json index 08ecdbc9..cd554641 100644 --- a/nextjs/package.json +++ b/nextjs/package.json @@ -12,6 +12,7 @@ }, "dependencies": { "@clerk/nextjs": "^6.28.1", + "@useautumn/sdk": "workspace:*", "@radix-ui/react-accordion": "^1.2.11", "@radix-ui/react-dialog": "^1.1.14", "@radix-ui/react-popover": "^1.1.14", diff --git a/nextjs/sdk.ts b/nextjs/sdk.ts index 6c47b259..64f5abf8 100644 --- a/nextjs/sdk.ts +++ b/nextjs/sdk.ts @@ -1,12 +1,34 @@ import "dotenv/config"; -import { Autumn } from "autumn-js"; +// import { Autumn } from "autumn-js"; +// import { Autumn } from "@useautumn/sdk"; + +// import { Autumn } from "autumn-js"; +import { Autumn } from "@useautumn/sdk"; const main = async () => { + const autumn = new Autumn({ + baseURL: "http://localhost:8080/v1", secretKey: process.env.AUTUMN_SECRET_KEY, - }); + }) + + // const stripe = new Stripe(""); + + // await stripe.customers.create({ + // email: "john@doe.com", + // name: "John Doe", + // }) + + + // const autumn = new Autumn({ + // baseURL: "http://localhost:8080/v1", + // secretKey: process.env.AUTUMN_SECRET_KEY, + // }) - + // await autumn.core.attach({ + // customer_id: "123", + // free_trial: true, + // }); }; main(); diff --git a/package/src/archives/AutumnContext_next_old.ts b/package/src/archives/AutumnContext_next_old.ts deleted file mode 100644 index a4b38a9c..00000000 --- a/package/src/archives/AutumnContext_next_old.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { createContext, useContext } from "react"; -import { AutumnContextParams } from "../next/client/types"; - -export const AutumnContext = createContext({ - encryptedCustomerId: "", - customerData: {}, - - entity: null, - setEntity: () => {}, - - customer: null, - setCustomer: () => {}, - prodChangeDialog: { - found: false, - setProps: () => {}, - setOpen: () => {}, - setComponent: () => {}, - }, - paywallDialog: { - found: false, - setProps: () => {}, - setOpen: () => {}, - setComponent: () => {}, - }, - pricingTableProducts: null, - setPricingTableProducts: () => {}, -}); - -export const useAutumnContext = () => { - const context = useContext(AutumnContext); - - if (context === undefined) { - throw new Error( - "useAutumnContext must be used within a AutumnContextProvider" - ); - } - - return context; -}; diff --git a/package/src/archives/useCustomerProvider.tsx b/package/src/archives/useCustomerProvider.tsx deleted file mode 100644 index cf0148af..00000000 --- a/package/src/archives/useCustomerProvider.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { useState, useRef } from "react"; -import { AutumnClient } from "../client/ReactAutumnClient"; -import { Customer, AutumnError, CustomerExpandOption } from "../../../sdk"; - -export interface UseCustomerParams { - expand?: CustomerExpandOption[]; -} - -export interface CustomerState { - customer: Customer | null; - isLoading: boolean; - error: AutumnError | null; -} - -export interface CustomerProvider { - refetch: ({ - params, - errorOnNotFound, - }: { - params?: UseCustomerParams; - errorOnNotFound?: boolean; - }) => Promise; - getState: (params?: UseCustomerParams) => CustomerState; - refetchFirstTwo: () => Promise; -} - -export function useCustomerProvider(client: AutumnClient): CustomerProvider { - const [stateMap, setStateMap] = useState>({}); - const inProgressFetches = useRef>({}); - - const getQueryKey = (params?: UseCustomerParams) => { - return JSON.stringify(params || {}); - }; - - const getState = (params?: UseCustomerParams) => { - const queryKey = getQueryKey(params); - if (!stateMap[queryKey]) { - return { - customer: null, - isLoading: true, - error: null, - }; - } - - return stateMap[queryKey]; - }; - - const refetch = async ({ - params, - errorOnNotFound = true, - }: { - params?: UseCustomerParams; - errorOnNotFound?: boolean; - }) => { - const queryKey = getQueryKey(params); - - if (inProgressFetches.current[queryKey]) { - return; - } - - inProgressFetches.current[queryKey] = true; - - setStateMap((prevState) => ({ - ...prevState, - [queryKey]: { - ...(prevState[queryKey] || { customer: null }), - isLoading: true, - error: null, - }, - })); - - const { data, error } = await client.createCustomer({ - expand: params?.expand, - errorOnNotFound, - }); - - let newState = { - customer: data, - isLoading: false, - error: error, - }; - - setStateMap((prevState) => ({ - ...prevState, - [queryKey]: newState, - })); - - inProgressFetches.current[queryKey] = false; - }; - - const refetchFirstTwo = async () => { - try { - let batchRefetch = []; - for (const key of Object.keys(stateMap)) { - batchRefetch.push(refetch({ params: JSON.parse(key) })); - } - await Promise.all(batchRefetch); - } catch (error) { - console.error("Failed to refetch customer (useCustomerProvider)"); - console.error(error); - } - }; - - return { - // stateMap, - getState, - refetch, - refetchFirstTwo, - }; -} diff --git a/package/src/archives/useEntityProvider.tsx b/package/src/archives/useEntityProvider.tsx deleted file mode 100644 index a454d77b..00000000 --- a/package/src/archives/useEntityProvider.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import useSWR from "swr"; -import { GetEntityParams } from "../libraries/react/client/types/clientEntTypes"; -import { getEntityAction } from "../next/server/cusActions"; -import { useAutumnContext } from "../libraries/react/AutumnContext"; - -export const useEntityProvider = ( - entityId?: string, - params?: GetEntityParams -) => { - const { encryptedCustomerId } = useAutumnContext(); - const queryKey = ["entity", entityId, params?.expand]; - - const fetchEntity = async () => { - if (!entityId) { - return null; - } - - const { data, error } = await getEntityAction({ - encryptedCustomerId, - entityId, - params, - }); - - if (error) { - throw error; - } - - if (!data) { - return null; - } - - return data; - }; - - const { data, error, isLoading, mutate } = useSWR(queryKey, fetchEntity, { - fallbackData: null, - onErrorRetry: (error, key, config) => { - if (error.code == "entity_not_found") { - return false; - } - - return true; - }, - }); - - if (!entityId) { - return { - entity: null, - isLoading: false, - error: null, - refetch: mutate, - }; - } - - return { - entity: error ? null : data, - isLoading, - error, - refetch: mutate, - }; -}; diff --git a/package/src/archives/useEntityProvider_react.tsx b/package/src/archives/useEntityProvider_react.tsx deleted file mode 100644 index 8f298477..00000000 --- a/package/src/archives/useEntityProvider_react.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { useState } from "react"; - -import { AutumnError, Entity } from "../sdk"; -import { GetEntityParams } from "../libraries/react/client/types/clientEntTypes"; -import { AutumnClient } from "../libraries/react/client/ReactAutumnClient"; - -export interface EntityProvider { - entity: Entity | null; - isLoading: boolean; - error: AutumnError | null; - refetch: (args: { - entityId?: string; - params?: GetEntityParams; - }) => Promise; - lastParams: GetEntityParams | null; -} - -export const useEntityProvider = ({ client }: { client: AutumnClient }) => { - const [entity, setEntity] = useState(null); - const [error, setError] = useState(null); - const [isLoading, setIsLoading] = useState(true); - const [lastParams, setLastParams] = useState(null); - - const fetchEntity = async ({ - entityId, - params, - }: { - entityId?: string; - params?: GetEntityParams; - }) => { - if (!entityId) { - console.warn("(Autumn) No entity ID provided in useEntity hook"); - return; - } - - setIsLoading(true); - setLastParams(params || null); - - try { - const { data, error } = await client.entities.get(entityId, params); - - if (error) { - setError(error); - setEntity(null); - } else { - setEntity(data); - setError(null); - } - } catch (error: any) { - setError( - new AutumnError({ - message: error?.message || "Failed to fetch entity", - code: "entity_fetch_failed", - }) - ); - } - setIsLoading(false); - }; - - return { entity, isLoading, error, refetch: fetchEntity, lastParams }; -}; diff --git a/package/src/libraries/backend/convex.ts b/package/src/libraries/backend/convex.ts deleted file mode 100644 index 7a57b90c..00000000 --- a/package/src/libraries/backend/convex.ts +++ /dev/null @@ -1,189 +0,0 @@ -import { AuthResult } from "./utils/AuthFunction"; -import { createRouterWithOptions } from "./routes/backendRouter"; - -import { secretKeyCheck } from "./utils/secretKeyCheck"; -import { Autumn } from "@sdk"; -import { findRoute } from "rou3"; - -export function autumnHandler(options: { - httpAction: any; - identify: (ctx: any, request: any) => AuthResult; - url?: string; - secretKey?: string; -}) { - const router = createRouterWithOptions(); - - return options.httpAction(async (ctx: any, request: Request) => { - const headers = request.headers; - if ( - headers.get("Origin") !== null && - headers.get("Access-Control-Request-Method") !== null && - headers.get("Access-Control-Request-Headers") !== null - ) { - return new Response(null, { - headers: new Headers({ - // e.g. https://mywebsite.com, configured on your Convex dashboard, or passed in as an option - "Access-Control-Allow-Origin": - process.env.CLIENT_ORIGIN ?? "http://localhost:3000", - "Access-Control-Allow-Methods": "POST, GET, PATCH, DELETE, OPTIONS", - "Access-Control-Allow-Headers": - "Content-Type, Digest, Authorization, Cookie", - "Access-Control-Allow-Credentials": "true", - "Access-Control-Max-Age": "86400", - }), - }); - } - - let { found, error: resError } = secretKeyCheck(options.secretKey); - - if (!found && !options.secretKey) { - return Response.json(resError, { status: resError!.statusCode }); - } - - const method = request.method; - const url = new URL(request.url); - const searchParams = Object.fromEntries(url.searchParams); - const pathname = url.pathname; - const match = findRoute(router, method, pathname); - - if (!match) { - return Response.json({ error: "Not found" }, { status: 404 }); - } - - const { data, params: pathParams } = match; - const { handler } = data; - - const autumn = new Autumn({ - secretKey: options.secretKey || undefined, - url: options.url, - }); - - let body = null; - if (method === "POST" || method === "PUT" || method === "PATCH") { - try { - body = await request.json(); - } catch (error) {} - } - - const result = await handler({ - autumn, - body, - path: url.pathname, - getCustomer: async () => await options.identify(ctx, request), - pathParams, - searchParams, - }); - - return Response.json(result.body, { - status: result.statusCode, - headers: new Headers({ - "Access-Control-Allow-Origin": - process.env.CLIENT_ORIGIN ?? "http://localhost:3000", - "Access-Control-Allow-Credentials": "true", - Vary: "origin", - }), - }); - }); -} - - -export function convexHandler(options: { - identity: Awaited; - url?: string; - secretKey?: string; - corsOrigin?: string; -}) { - const router = createRouterWithOptions(); - - // CORS headers, can be customized or made configurable if needed - const corsHeaders = { - "Access-Control-Allow-Origin": options.corsOrigin ?? process.env.CLIENT_ORIGIN ?? "http://localhost:3000", - "Access-Control-Allow-Methods": "POST, GET, PATCH, DELETE, OPTIONS", - "Access-Control-Allow-Headers": "*", - "Access-Control-Allow-Credentials": "true", - "Access-Control-Max-Age": "86400", - "Vary": "Origin", - }; - - return async (ctx: any, request: Request) => { - const headers = request.headers; - - // Handle CORS preflight (OPTIONS) requests - if (request.method === "OPTIONS") { - return new Response(null, { - headers: new Headers(corsHeaders), - }); - } - - let { found, error: resError } = secretKeyCheck(options.secretKey); - - if (!found && !options.secretKey) { - return new Response(JSON.stringify(resError), { - status: resError!.statusCode, - headers: { - "Content-Type": "application/json", - ...corsHeaders, - }, - }); - } - - const method = request.method; - const url = new URL(request.url); - const searchParams = Object.fromEntries(url.searchParams); - const pathname = url.pathname; - const match = findRoute(router, method, pathname); - - if (!match) { - return new Response(JSON.stringify({ error: "Not found" }), { - status: 404, - headers: { - "Content-Type": "application/json", - ...corsHeaders, - }, - }); - } - - const { data, params: pathParams } = match; - const { handler } = data; - - const autumn = new Autumn({ - secretKey: options.secretKey || undefined, - url: options.url, - }); - - let body = null; - if (method === "POST" || method === "PUT" || method === "PATCH") { - try { - body = await request.json(); - } catch (error) {} - } - - try { - console.log("Identity in convex.ts:", options.identity); - const result = await handler({ - autumn, - body, - path: url.pathname, - getCustomer: async () => options.identity, - pathParams, - searchParams, - }); - - return new Response(JSON.stringify(result.body), { - status: result.statusCode, - headers: { - "Content-Type": "application/json", - ...corsHeaders, - }, - }); - } catch (error) { - return new Response(JSON.stringify({ error: "Internal server error" }), { - status: 500, - headers: { - "Content-Type": "application/json", - ...corsHeaders, - }, - }); - } - }; -} diff --git a/package/src/libraries/backend/remix_dep.ts b/package/src/libraries/backend/remix_dep.ts deleted file mode 100644 index e329818c..00000000 --- a/package/src/libraries/backend/remix_dep.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Autumn } from "../../sdk"; -import { createRouterWithOptions } from "./routes/backendRouter"; -import { findRoute } from "rou3"; -import { AuthResult } from "./utils/AuthFunction"; -import { autumnApiUrl } from "./constants"; - -export function autumnHandler(options: { - secretKey?: string; - identify: (args: { - request: Request; - params: Record; - }) => AuthResult; - version?: string; -}) { - const autumn = new Autumn({ - url: autumnApiUrl, - version: options.version, - }); - - const router = createRouterWithOptions(); - - // Common handler for both loader and action - async function handleAutumnRequest(args: { - request: Request; - params: Record; - }) { - let path = args.params["*"] || ""; - - const url = new URL(args.request.url); - const pathname = url.pathname; - const searchParams = Object.fromEntries(url.searchParams); - - const match = findRoute(router, args.request.method, pathname); - - if (!match) { - return new Response(JSON.stringify({ error: "Not found" }), { - status: 404, - headers: { "Content-Type": "application/json" }, - }); - } - - const { data, params: pathParams } = match; - const { handler } = data; - - let body = null; - if (args.request.method !== "GET") { - try { - body = await args.request.json(); - } catch (error) {} - } - - const result = await handler({ - autumn, - body, - path, - getCustomer: async () => { - return await options.identify(args); - }, - pathParams, - searchParams, - }); - - return new Response(JSON.stringify(result.body), { - status: result.statusCode, - headers: { "Content-Type": "application/json" }, - }); - } - - // Return loader and action that both use the common handler - return { - loader: async (args: any) => { - return handleAutumnRequest(args); - }, - - action: async (args: any) => { - return handleAutumnRequest(args); - }, - }; -} diff --git a/package/src/libraries/react/client/clientCompMethods.ts b/package/src/libraries/react/client/clientCompMethods.ts deleted file mode 100644 index 81858f3f..00000000 --- a/package/src/libraries/react/client/clientCompMethods.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { AutumnClient } from "./ReactAutumnClient"; -import { AutumnPromise, PricingTableProduct } from "../../../sdk"; - -export async function getPricingTableMethod(this: AutumnClient): AutumnPromise<{ - list: PricingTableProduct[]; -}> { - const res = await this.get(`${this.prefix}/components/pricing_table`); - return res; -} diff --git a/package/src/next/AutumnProvider.tsx b/package/src/next/AutumnProvider.tsx deleted file mode 100644 index a1aaec6a..00000000 --- a/package/src/next/AutumnProvider.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { encryptData } from "../utils/encryptUtils"; -import { CustomerData } from "../sdk"; -import { AuthPluginOptions, setupAuthPlugin } from "./server/auth/authPlugin"; -import { NextAutumnProvider } from "./client/NextAutumnProvider"; - - -interface AutumnProviderProps { - customerId?: string; - customerData?: CustomerData; - authPlugin?: AuthPluginOptions; - children?: React.ReactNode; -} - -const notNullish = (value: any) => { - return value !== null && value !== undefined; -}; - -export const AutumnProvider = ({ - customerId, - customerData, - authPlugin, - children, -}: AutumnProviderProps) => { - if (typeof window !== "undefined") { - throw new Error( - "AutumnProvider must be used in a server component. It cannot be used in client components." - ); - } - - if (notNullish(customerId) && notNullish(authPlugin)) { - throw new Error( - "AutumnProvider cannot have both customerId and authPlugin provided." - ); - } - - let encryptedCustomerId = customerId ? encryptData(customerId) : undefined; - - if (authPlugin) { - setupAuthPlugin({ - useUser: true, - ...authPlugin, - }); - } - - return ( - - {children} - - ); -}; diff --git a/package/src/next/client/AutumnClientProvider.tsx b/package/src/next/client/AutumnClientProvider.tsx deleted file mode 100644 index c671b043..00000000 --- a/package/src/next/client/AutumnClientProvider.tsx +++ /dev/null @@ -1,136 +0,0 @@ -// import { Entity } from "src/sdk/customers/entities/entTypes"; -// import { CustomerData } from "src/sdk"; -// import { AutumnContext } from "./AutumnContext"; -// import { useEffect, useState } from "react"; -// import { Customer, PricingTableProduct } from "src/sdk"; -// import { useCustomer } from "./hooks/useCustomer"; - -// export interface AutumnProviderProps { -// children?: React.ReactNode; -// encryptedCustomerId?: string; -// customerData?: CustomerData; -// } - -// const useDialog = (component?: any) => { -// const [dialogFound, setDialogFound] = useState(false); -// const [dialogProps, setDialogProps] = useState(null); -// const [dialogOpen, setDialogOpen] = useState(false); - -// // useEffect(() => { -// // if (dialogProps) { -// // setDialogOpen(true); -// // } -// // }, [dialogProps]); - -// useEffect(() => { -// if (!dialogOpen) { -// setTimeout(() => { -// setDialogProps(null); -// }, 200); -// } -// }, [dialogOpen]); - -// const loadDialog = async () => { -// if (component) { -// setDialogFound(true); -// } else { -// setDialogFound(false); -// } -// }; - -// useEffect(() => { -// loadDialog(); -// }, []); - -// return [dialogFound, dialogProps, setDialogProps, dialogOpen, setDialogOpen]; -// }; - -// export const AutumnClientProvider = ({ -// children, -// encryptedCustomerId, -// customerData, -// }: AutumnProviderProps) => { -// let [customer, setCustomer] = useState(null); - -// useCustomer(); - -// let [pricingTableProducts, setPricingTableProducts] = useState< -// PricingTableProduct[] | null -// >(null); - -// const [components, setComponents] = useState<{ -// paywallDialog?: any; -// productChangeDialog?: any; -// }>({}); - -// const [entity, setEntity] = useState(null); - -// const [ -// prodChangeDialogFound, -// prodChangeDialogProps, -// setProdChangeDialogProps, -// prodChangeDialogOpen, -// setProdChangeDialogOpen, -// ] = useDialog(components?.productChangeDialog); - -// const [ -// paywallFound, -// paywallProps, -// setPaywallProps, -// paywallOpen, -// setPaywallOpen, -// ] = useDialog(components?.paywallDialog); - -// return ( -// { -// setComponents({ -// ...components, -// productChangeDialog: component, -// }); -// }, -// }, -// paywallDialog: { -// found: paywallFound, -// setProps: setPaywallProps, -// setOpen: setPaywallOpen, -// setComponent: (component: any) => { -// setComponents({ -// ...components, -// paywallDialog: component, -// }); -// }, -// }, -// pricingTableProducts, -// setPricingTableProducts, -// entity, -// setEntity, -// }} -// > -// {components?.productChangeDialog && ( -// -// )} -// {components?.paywallDialog && ( -// -// )} -// {children} -// -// ); -// }; diff --git a/package/src/next/client/NextAutumnClient.tsx b/package/src/next/client/NextAutumnClient.tsx deleted file mode 100644 index 75f84f00..00000000 --- a/package/src/next/client/NextAutumnClient.tsx +++ /dev/null @@ -1,165 +0,0 @@ -import { - CustomerData, - CreateCustomerParams, - AutumnPromise, - TrackResult, - CheckResult, - CancelResult, - Entity, - DeleteEntityResult, - RedeemReferralCodeParams, -} from "@sdk"; -import { AutumnClient } from "../../libraries/react/client/ReactAutumnClient"; - -import { - createCusAction, - createEntityAction, - deleteEntityAction, - getEntityAction, -} from "../server/cusActions"; -import { getPricingTableAction } from "../server/componentActions"; - -import { - CancelParams, - TrackParams, - OpenBillingPortalParams, - CheckParams, -} from "../../libraries/react/client/types/clientGenTypes"; -import { AttachParams } from "@/client/types/clientAttachTypes"; -import { - attachAction, - cancelAction, - checkAction, - getBillingPortalAction, - trackAction, -} from "../server/genActions"; -import { - CreateEntityParams, - GetEntityParams, -} from "../../libraries/react/client/types/clientEntTypes"; -import { CreateReferralCodeParams } from "../../libraries/react/client/types/clientReferralTypes"; -import { AttachResult, CheckoutResult } from "@sdk/general/attachTypes"; - -export interface ErrorResponse { - message: string; - code: string; -} - -export type OmitCustomerType = - | "id" - | "name" - | "email" - | "fingerprint" - | "customer_id"; - -export interface NextAutumnClientConfig { - encryptedCustomerId?: string; - customerData?: CustomerData; -} - -export class NextAutumnClient extends AutumnClient { - private readonly encryptedCustomerId?: string; - - constructor({ encryptedCustomerId, customerData }: NextAutumnClientConfig) { - super({ - customerData, - }); - this.encryptedCustomerId = encryptedCustomerId; - } - - // Override createCustomer to use Next.js server actions instead of HTTP requests - async createCustomer( - params: Omit & { - errorOnNotFound?: boolean; - } - ) { - const res = await createCusAction({ - encryptedCustomerId: this.encryptedCustomerId, - customerData: this.customerData, - ...params, - }); - - return res; - } - - // Pricing table - async getPricingTable() { - return await getPricingTableAction({ - encryptedCustomerId: this.encryptedCustomerId, - }); - } - - // Entities - attach = async (params: AttachParams): AutumnPromise => { - const res = await attachAction({ - encryptedCustomerId: this.encryptedCustomerId, - customerData: this.customerData, - ...params, - }); - return res; - }; - - cancel = async (params: CancelParams): AutumnPromise => { - return await cancelAction({ - encryptedCustomerId: this.encryptedCustomerId, - ...params, - }); - }; - - check = async (params: CheckParams): AutumnPromise => { - return await checkAction({ - encryptedCustomerId: this.encryptedCustomerId, - ...params, - }); - }; - - track = async (params: TrackParams): AutumnPromise => { - return await trackAction({ - encryptedCustomerId: this.encryptedCustomerId, - ...params, - }); - }; - - openBillingPortal = async (params?: OpenBillingPortalParams | undefined) => { - return await getBillingPortalAction({ - encryptedCustomerId: this.encryptedCustomerId, - ...(params || {}), - }); - }; - - entities = { - create: async ( - params: CreateEntityParams | CreateEntityParams[] - ): AutumnPromise => { - return await createEntityAction({ - encryptedCustomerId: this.encryptedCustomerId, - entity: params, - }); - }, - get: async ( - entityId: string, - params?: GetEntityParams - ): AutumnPromise => { - return await getEntityAction({ - encryptedCustomerId: this.encryptedCustomerId, - entityId, - ...params, - }); - }, - delete: async (entityId: string): AutumnPromise => { - return await deleteEntityAction({ - encryptedCustomerId: this.encryptedCustomerId, - entityId, - }); - }, - }; - - referrals: any = { - createCode: async (params: CreateReferralCodeParams) => { - throw new Error("Not implemented"); - }, - redeemCode: async (params: RedeemReferralCodeParams) => { - throw new Error("Not implemented"); - }, - }; -} diff --git a/package/src/next/client/NextAutumnProvider.tsx b/package/src/next/client/NextAutumnProvider.tsx deleted file mode 100644 index c72ba105..00000000 --- a/package/src/next/client/NextAutumnProvider.tsx +++ /dev/null @@ -1,27 +0,0 @@ -"use client"; - -import { CustomerData } from "../../sdk"; -import { NextAutumnClient } from "./NextAutumnClient"; -import { AutumnContext } from "../../libraries/react/AutumnContext"; -import { BaseAutumnProvider } from "../../libraries/react/BaseAutumnProvider"; - -export const NextAutumnProvider = ({ - encryptedCustomerId, - customerData, - children, -}: { - encryptedCustomerId?: string; - customerData?: CustomerData; - children: React.ReactNode; -}) => { - const client = new NextAutumnClient({ - encryptedCustomerId, - customerData, - }); - - return ( - - {children} - - ); -}; diff --git a/package/src/next/client/clientUtils.ts b/package/src/next/client/clientUtils.ts deleted file mode 100644 index 7d30974a..00000000 --- a/package/src/next/client/clientUtils.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { getPricingTableAction } from "../server/componentActions"; -import { AutumnClientError, PricingTableProduct } from "./types"; - -export const toClientErrorResponse = (error: any) => { - let msg = "Unknown error"; - let code = "unknown"; - - if (error?.message) { - msg = error.message; - } - if (error?.code) { - code = error.code; - } - - console.error("Autumn Error: ", msg); - return { - data: null, - error: new AutumnClientError({ message: msg, code: code }), - }; -}; - -export const toClientError = (error: any, log = true) => { - let msg = "Unknown error"; - let code = "unknown"; - if (error?.message) { - msg = error.message; - } - if (error?.code) { - code = error.code; - } - if (log) { - console.error("Autumn Error: ", msg); - } - return new AutumnClientError({ message: msg, code }); -}; - -export const fetchPricingTableData = async ({ - setIsLoading, - setError, - setProducts, - encryptedCustomerId, -}: { - setIsLoading?: (isLoading: boolean) => void; - setError?: (error: any) => void; - setProducts: (products: PricingTableProduct[]) => void; - encryptedCustomerId?: string; -}) => { - let returnData: PricingTableProduct[] | null = null; - try { - if (setIsLoading) { - setIsLoading(true); - } - const res = await getPricingTableAction({ - encryptedCustomerId, - }); - - if (res.error) { - if (setError) { - setError(res.error); - } - return res; - } - - let products = res.data.list; - - setProducts(products); - returnData = products; - } catch (error) { - if (setError) { - setError(error); - } - } finally { - if (setIsLoading) { - setIsLoading(false); - } - } - return returnData; -}; diff --git a/package/src/next/client/hooks/useAutumn.tsx b/package/src/next/client/hooks/useAutumn.tsx deleted file mode 100644 index b5d05b26..00000000 --- a/package/src/next/client/hooks/useAutumn.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { - AutumnContext, - useAutumnContext, -} from "../../../libraries/react/AutumnContext"; -import { useAutumnBase } from "../../../libraries/react/hooks/helpers/useAutumnBase"; - -export const useAutumn = () => { - const context = useAutumnContext({ - AutumnContext, - name: "useAutumn", - }); - return useAutumnBase({ context, client: context.client }); -}; diff --git a/package/src/next/client/hooks/useCustomer.tsx b/package/src/next/client/hooks/useCustomer.tsx deleted file mode 100644 index 4ef24096..00000000 --- a/package/src/next/client/hooks/useCustomer.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { AutumnContext } from "../../../libraries/react/AutumnContext"; -import { - type UseCustomerParams, - type UseCustomerResult, - useCustomerBase, -} from "../../../libraries/react/hooks/useCustomerBase"; - -export const useCustomer = (params?: UseCustomerParams): UseCustomerResult => { - return useCustomerBase({ - params, - AutumnContext: AutumnContext, - }); -}; diff --git a/package/src/next/client/hooks/useEntity.tsx b/package/src/next/client/hooks/useEntity.tsx deleted file mode 100644 index 49951fbb..00000000 --- a/package/src/next/client/hooks/useEntity.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { GetEntityParams } from "../../../sdk/customers/entities/entTypes"; -import { useEntityBase } from "../../../libraries/react/hooks/useEntityBase"; -import { AutumnContext } from "../../../libraries/react/AutumnContext"; - -export const useEntity = (entityId: string | null, params?: GetEntityParams) => { - return useEntityBase({ AutumnContext, entityId, params }); -}; diff --git a/package/src/next/client/hooks/usePricingTable.tsx b/package/src/next/client/hooks/usePricingTable.tsx deleted file mode 100644 index ecd76563..00000000 --- a/package/src/next/client/hooks/usePricingTable.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { usePricingTableBase } from "../../../libraries/react/hooks/usePricingTableBase"; -import { AutumnContext, useAutumnContext } from "../../../libraries/react/AutumnContext"; -import { ProductDetails } from "../../../libraries/react/client/types/clientPricingTableTypes"; - -export const usePricingTable = (params?: { - productDetails?: ProductDetails[]; -}) => { - const context = useAutumnContext({ - AutumnContext, - name: "usePricingTable", - }); - - return usePricingTableBase({ client: context.client, params }); -}; - diff --git a/package/src/next/client/types.ts b/package/src/next/client/types.ts deleted file mode 100644 index bfa2e13f..00000000 --- a/package/src/next/client/types.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Customer, CustomerData } from "src/sdk"; -import { Entity } from "src/sdk/customers/entities/entTypes"; - -export interface ProductDetails { - id: string; - description?: string; - buttonText?: string; - recommendText?: string; - everythingFrom?: string; - - price?: { - primaryText: string; - secondaryText?: string; - }; - items?: { - featureId?: string; - primaryText: string; - secondaryText?: string; - }[]; -} - -export interface PricingTableProduct { - id: string; - name: string; - buttonText: string; - - price: { - primaryText: string; - secondaryText?: string; - }; - - items: { - primaryText: string; - secondaryText?: string; - }[]; -} - -export class AutumnClientError extends Error { - code: string; - constructor({ message, code }: { message: string; code: string }) { - super(message); - this.code = code; - } - - toString() { - return `${this.message} (${this.code})`; - } - - toJSON() { - return { - message: this.message, - code: this.code, - }; - } -} - -export interface AutumnContextParams { - encryptedCustomerId?: string; - customerData?: CustomerData; - authProvider?: "clerk" | "better-auth"; - customer: Customer | null; - setCustomer: (customer: Customer | null) => void; - entity: Entity | null; - setEntity: (entity: Entity | null) => void; - entityId?: string; - prodChangeDialog: { - found: boolean; - setProps: (props: any) => void; - setOpen: (open: boolean) => void; - setComponent: (component: any) => void; - }; - paywallDialog: { - found: boolean; - setProps: (props: any) => void; - setOpen: (open: boolean) => void; - setComponent: (component: any) => void; - }; - pricingTableProducts: PricingTableProduct[] | null; - setPricingTableProducts: (products: PricingTableProduct[]) => void; -} - -export interface AutumnProviderProps extends AutumnContextParams { - children?: React.ReactNode; -} diff --git a/package/src/next/enums.ts b/package/src/next/enums.ts deleted file mode 100644 index 99f95e62..00000000 --- a/package/src/next/enums.ts +++ /dev/null @@ -1,3 +0,0 @@ -export enum AuthProvider { - Clerk = "clerk", -} diff --git a/package/src/next/index.ts b/package/src/next/index.ts deleted file mode 100644 index 20fe4800..00000000 --- a/package/src/next/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -// export * from "./client/hooks/useAutumn"; -// export * from "./client/NextAutumnProvider"; -// export * from "./client/hooks/useCustomer"; -// export * from "./client/hooks/usePricingTable"; -// export * from "./client/hooks/useEntity"; -// export * from "./client/hooks/useAutumn"; -// export * from "./AutumnProvider"; - -// export { AutumnContext } from "../libraries/react/AutumnContext"; - -// export * from "./client/hooks/useCustomer"; -// export * from "./client/hooks/useCustomer"; - -// export * from "./client/hooks/usePricingTable"; -// export * from "./client/hooks/useEntity"; - -// export * from "./client/AutumnContext"; -// export * from "./client/AutumnProvider"; -// export * from "./client/AutumnContext"; - -// // export * from "./server/cusActions"; -// // export * from "./server/genActions"; -// export * from "./server/auth/withAuth"; - -export * from "../libraries/backend/next"; diff --git a/package/src/next/server/auth/authPlugin.ts b/package/src/next/server/auth/authPlugin.ts deleted file mode 100644 index 0b7ee480..00000000 --- a/package/src/next/server/auth/authPlugin.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface AuthPluginOptions { - provider: "better-auth" | "supabase" | "clerk"; - instance?: any; - useOrg?: boolean; - useUser?: boolean; -} - -declare global { - var __autumnAuth: AuthPluginOptions; -} - -export const setupAuthPlugin = (options: AuthPluginOptions) => { - global.__autumnAuth = options; -}; - -export const getAuthPlugin = () => { - return global.__autumnAuth; -}; diff --git a/package/src/next/server/auth/clerk-wrapper.ts b/package/src/next/server/auth/clerk-wrapper.ts deleted file mode 100644 index 43223981..00000000 --- a/package/src/next/server/auth/clerk-wrapper.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Create a separate file that manages the import -// clerks-wrapper.ts -let clerkModule: any = null; - -export async function getClerkModule() { - if (!clerkModule) { - try { - clerkModule = await import( - /* webpackIgnore: true */ - // @ts-ignore - "@clerk/backend" - ); - } catch (e) { - throw { - message: - "Failed to import @clerk/backend. Please ensure you have the @clerk/backend package installed.", - code: "failed_to_import_clerk_backend", - }; - } - } - return clerkModule; -} diff --git a/package/src/next/server/auth/get-next-headers.ts b/package/src/next/server/auth/get-next-headers.ts deleted file mode 100644 index 3cb3d57f..00000000 --- a/package/src/next/server/auth/get-next-headers.ts +++ /dev/null @@ -1,16 +0,0 @@ -export async function getNextHeadersAndCookies() { - try { - // @ts-ignore - let headerModule = await import("next/headers"); - return { - headers: headerModule.headers, - cookies: headerModule.cookies, - }; - } catch (e) { - throw { - message: - "Failed to import next/headers. Please ensure Next.js is installed correctly.", - code: "failed_to_import_next_headers", - }; - } -} diff --git a/package/src/next/server/auth/handleAuthProvider.ts b/package/src/next/server/auth/handleAuthProvider.ts deleted file mode 100644 index 52b8c061..00000000 --- a/package/src/next/server/auth/handleAuthProvider.ts +++ /dev/null @@ -1,206 +0,0 @@ -import { AuthPluginOptions } from "./authPlugin"; -import { createSupabaseClient } from "./supabase-wrapper"; -import { getClerkModule } from "./clerk-wrapper"; -import { getNextHeadersAndCookies } from "./get-next-headers"; - -export const handleBetterAuth = async (options: AuthPluginOptions) => { - let betterAuth: any = options.instance; - if (!betterAuth) { - throw { - message: "BetterAuth instance is required", - code: "auth_instance_required", - }; - } - - const { headers } = await getNextHeadersAndCookies(); - - if (options.useOrg) { - try { - let org = await betterAuth.api.getFullOrganization({ - headers: await headers(), - }); - - let session = await betterAuth.api.getSession({ - headers: await headers(), - }); - - if (org) { - return { - customerId: org.id, - customerData: { - name: org.name, - email: session?.user?.email, - }, - }; - } - } catch (error) { - throw { - message: "Failed to get/create organization", - code: "failed_to_create_organization", - }; - } - } - - if (options.useUser) { - try { - let session = await betterAuth.api.getSession({ - headers: await headers(), - }); - - if (session) { - return { - customerId: session.user.id, - customerData: { - name: session.user.name, - email: session.user.email, - }, - }; - } - } catch (error) { - throw { - message: "Failed to get/create user", - code: "failed_to_create_user", - }; - } - } - - return null; -}; - -export const handleClerk = async ({ - options, - withCustomerData, -}: { - options: AuthPluginOptions; - withCustomerData: boolean; -}) => { - const { verifyToken, createClerkClient } = await getClerkModule(); - const { cookies } = await getNextHeadersAndCookies(); - const cookieStore = await cookies(); - let sessionToken = cookieStore.get("__session")?.value; - - if (!sessionToken) { - console.warn("(Autumn) No clerk session token found"); - return null; - } - - const clerk = createClerkClient({ - secretKey: process.env.CLERK_SECRET_KEY, - }); - - const authData = await verifyToken(sessionToken, { - secretKey: process.env.CLERK_SECRET_KEY, - }); - - let orgId = authData.org_id; - let userId = authData.sub; - - if (options.useOrg) { - try { - if (orgId && withCustomerData) { - let org = await clerk.organizations.getOrganization({ - organizationId: orgId, - }); - - let email = null; - if (userId) { - let user = await clerk.users.getUser(userId); - email = user.primaryEmailAddress?.emailAddress; - } - - return { - customerId: orgId, - customerData: { - name: org.name, - email: email, - }, - }; - } else { - if (authData.orgId) { - return { - customerId: authData.orgId, - }; - } - } - } catch (error) { - throw { - message: `Failed to get/create clerk organization: ${error}`, - code: "failed_to_create_clerk_organization", - }; - } - } - - if (options.useUser && userId) { - try { - let user = await clerk.users.getUser(userId); - return { - customerId: userId, - customerData: { - name: user.fullName, - email: user.primaryEmailAddress?.emailAddress, - }, - }; - } catch (error) { - throw { - message: `Failed to get/create clerk user: ${error}`, - code: "failed_to_create_clerk_user", - }; - } - } - - return null; -}; - -export const handleSupabase = async (options: AuthPluginOptions) => { - let supabase; - - supabase = await createSupabaseClient(); - - if (options.useOrg) { - console.warn("Supabase does not support organizations"); - } - - if (options.useUser) { - const { - data: { user }, - } = await supabase.auth.getUser(); - - if (!user) { - return null; - } - - return { - customerId: user?.id, - customerData: { - name: user?.user_metadata?.name, - email: user?.email, - }, - }; - } - - return null; -}; - -export const handleAuthProvider = ({ - authPlugin, - withCustomerData, -}: { - authPlugin: AuthPluginOptions; - withCustomerData: boolean; -}) => { - let authProvider = authPlugin.provider; - - switch (authProvider) { - case "better-auth": - return handleBetterAuth(authPlugin); - case "clerk": - return handleClerk({ options: authPlugin, withCustomerData }); - case "supabase": - return handleSupabase(authPlugin); - default: - throw { - message: `Unsupported auth provider: ${authProvider}`, - code: "unsupported_auth_provider", - }; - } -}; diff --git a/package/src/next/server/auth/supabase-wrapper.ts b/package/src/next/server/auth/supabase-wrapper.ts deleted file mode 100644 index beae70c6..00000000 --- a/package/src/next/server/auth/supabase-wrapper.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { getNextHeadersAndCookies } from "./get-next-headers"; - -export async function createSupabaseClient() { - let createServerClient: any; - - // 1. Try to import the createServerClient function - try { - let module = await import(/* webpackIgnore: true */ "@supabase/ssr"); - createServerClient = module.createServerClient; - } catch (error) { - throw { - message: `Failed to import @supabase/ssr. Please ensure you have the @supabase/ssr package installed.`, - code: "failed_to_import_supabase_ssr", - }; - } - - const { cookies } = await getNextHeadersAndCookies(); - - // 2. Try to create the client - try { - const cookieStore = await cookies(); - - return createServerClient( - process.env.NEXT_PUBLIC_SUPABASE_URL!, - process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!, - { - cookies: { - getAll() { - return cookieStore.getAll(); - }, - setAll(cookiesToSet: any) { - cookiesToSet.forEach(({ name, value, options }: any) => - cookieStore.set(name, value, options) - ); - }, - }, - } - ); - } catch (error: any) { - throw { - message: `Failed to create supabase client. Error: ${ - error.message || error - }`, - code: "failed_to_create_supabase_client", - }; - } -} diff --git a/package/src/next/server/auth/withNextAuth.ts b/package/src/next/server/auth/withNextAuth.ts deleted file mode 100644 index 6bc3d519..00000000 --- a/package/src/next/server/auth/withNextAuth.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { CustomerData } from "@sdk"; -import { decryptData } from "../../../utils/encryptUtils"; -import { handleAuthProvider } from "./handleAuthProvider"; -import { getAuthPlugin } from "./authPlugin"; - -const noCustomerIdError = () => { - return { - data: null, - error: { - message: "Customer ID is required", - code: "no_customer_id", - }, - }; -}; - -export const withAuth = < - T extends { - customerId?: string; - customerData?: CustomerData; - authProvider?: string; - }, ->({ - fn, - withCustomerData = false, - requireCustomer = true, -}: { - fn: (args: T) => Promise; - withCustomerData?: boolean; - requireCustomer?: boolean; -}) => { - return async ( - args: Omit & { encryptedCustomerId?: string }, - request?: Request - ) => { - let customerId = null; - let customerData = args.customerData || undefined; - - const authConfig = getAuthPlugin(); - - if (authConfig?.provider) { - let result = await handleAuthProvider({ - authPlugin: authConfig, - withCustomerData: withCustomerData, - }); - - customerId = result?.customerId; - customerData = result?.customerData || undefined; - } else { - let encryptedCustomerId = args.encryptedCustomerId; - - customerId = encryptedCustomerId - ? decryptData(encryptedCustomerId) - : null; - } - - if (!customerId && requireCustomer) { - return noCustomerIdError(); - } - - return fn({ ...args, customerId, customerData } as T); - }; -}; diff --git a/package/src/next/server/componentActions.ts b/package/src/next/server/componentActions.ts deleted file mode 100644 index f404e58c..00000000 --- a/package/src/next/server/componentActions.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { withAuth } from "./auth/withNextAuth"; -import { createAutumnClient } from "./cusActions"; -import { fetchPricingTable } from "../../sdk"; -import { toServerResponse } from "./utils"; - -export const getPricingTableAction = withAuth({ - fn: async ({ customerId }) => { - let autumn = createAutumnClient(); - - const res = await fetchPricingTable({ - instance: autumn, - params: { - customer_id: customerId, - }, - }); - - return toServerResponse(res); - }, - requireCustomer: false, -}); diff --git a/package/src/next/server/cusActions.ts b/package/src/next/server/cusActions.ts deleted file mode 100644 index 932673a2..00000000 --- a/package/src/next/server/cusActions.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { Autumn, CreateCustomerParams, CustomerData } from "../../sdk"; -import { withAuth } from "./auth/withNextAuth"; -import { toServerResponse } from "./utils"; -import { - CreateEntityParams, - GetEntityParams, -} from "../../libraries/react/client/types/clientEntTypes"; -import { toSnakeCase } from "@utils/toSnakeCase"; - -export const createAutumnClient = (publishableKey?: string) => { - return new Autumn({ - publishableKey, - }); -}; - -export const createCusAction = withAuth({ - fn: async ({ - customerId, - customerData, - ...params - }: { - customerId: string; - customerData?: CustomerData; - params?: CreateCustomerParams; - }) => { - const autumn = createAutumnClient(); - - const result = await autumn.customers.create({ - id: customerId, - ...customerData, - ...params, - }); - - return toServerResponse(result); - }, - withCustomerData: true, -}); - -export const getEntityAction = withAuth({ - fn: async ({ - customerId, - entityId, - ...params - }: { - customerId: string; - entityId: string; - params?: GetEntityParams; - }) => { - const autumn = createAutumnClient(); - - let snakeParams = toSnakeCase({ obj: params }); - const result = await autumn.entities.get( - customerId, - entityId, - snakeParams as any - ); - - return toServerResponse(result); - }, -}); - -export const createEntityAction = withAuth({ - fn: async ({ - customerId, - entity, - }: { - customerId: string; - entity: CreateEntityParams | CreateEntityParams[]; - }) => { - const autumn = createAutumnClient(); - let snakeEntity = toSnakeCase({ obj: entity }) as any; - const result = await autumn.entities.create(customerId, snakeEntity); - return toServerResponse(result); - }, -}); - -export const deleteEntityAction = withAuth({ - fn: async ({ - customerId, - entityId, - }: { - customerId: string; - entityId: string; - }) => { - const autumn = createAutumnClient(); - const result = await autumn.entities.delete(customerId, entityId); - return toServerResponse(result); - }, -}); diff --git a/package/src/next/server/genActions.ts b/package/src/next/server/genActions.ts deleted file mode 100644 index 0360fb55..00000000 --- a/package/src/next/server/genActions.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { BillingPortalParams, CustomerData, EntityData } from "../../sdk"; -import { createAutumnClient } from "../server/cusActions"; -import { withAuth } from "./auth/withNextAuth"; -import { toServerResponse } from "./utils"; -import { - CancelParams, - CheckParams, - TrackParams, -} from "../../libraries/react/client/types/clientGenTypes"; -import { toSnakeCase } from "@utils/toSnakeCase"; -import { AttachParams } from "@/client/types/clientAttachTypes"; - -export const attachAction = withAuth({ - fn: async ( - params: AttachParams & { customerId: string; customerData?: CustomerData } - ) => { - const autumn = createAutumnClient(); - - let res = await autumn.attach({ - customer_id: params.customerId, - customer_data: params.customerData, - ...(toSnakeCase({ obj: params }) as any), - }); - - return toServerResponse(res); - }, - - withCustomerData: true, -}); - -export const cancelAction = withAuth({ - fn: async (params: CancelParams & { customerId: string }) => { - const autumn = createAutumnClient(); - let res = await autumn.cancel(toSnakeCase({ obj: params }) as any); - - return toServerResponse(res); - }, -}); - -export const checkAction = withAuth({ - fn: async ( - params: CheckParams & { customerId: string; customerData?: CustomerData } - ) => { - const autumn = createAutumnClient(); - - let res = await autumn.check({ - customer_id: params.customerId, - customer_data: params.customerData, - ...(toSnakeCase({ obj: params }) as any), - }); - - return toServerResponse(res); - }, - withCustomerData: true, -}); - -export const trackAction = withAuth({ - fn: async ( - params: TrackParams & { customerId: string; customerData?: CustomerData } - ) => { - const autumn = createAutumnClient(); - let res = await autumn.track({ - customer_id: params.customerId, - customer_data: params.customerData, - ...(toSnakeCase({ obj: params }) as any), - }); - - return toServerResponse(res); - }, - withCustomerData: true, -}); - -export const getBillingPortalAction = withAuth({ - fn: async ({ - customerId, - params, - }: { - customerId: string; - params?: BillingPortalParams; - }) => { - const autumn = createAutumnClient(); - let result = await autumn.customers.billingPortal(customerId, params); - return toServerResponse(result); - }, -}); - -export const generateReferralCodeAction = withAuth({ - fn: async ({ - customerId, - programId, - }: { - customerId: string; - programId: string; - }) => { - const autumn = createAutumnClient(); - let result = await autumn.referrals.createCode({ - customer_id: customerId, - program_id: programId, - }); - return toServerResponse(result); - }, -}); - -export const redeemReferralCodeAction = withAuth({ - fn: async ({ code, customerId }: { code: string; customerId: string }) => { - const autumn = createAutumnClient(); - let result = await autumn.referrals.redeemCode({ - code, - customer_id: customerId, - }); - return toServerResponse(result); - }, -}); diff --git a/package/src/next/server/utils.ts b/package/src/next/server/utils.ts deleted file mode 100644 index 0234bd1e..00000000 --- a/package/src/next/server/utils.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Result } from "@sdk/response"; -import { AutumnError, ErrorResponse } from "../../sdk"; - -export const toServerResponse = ( - result: Result -): Result => { - if (result.error) { - return { - data: null, - error: result.error.toJSON(), - }; - } - - return { - data: result.data, - error: null, - }; -}; diff --git a/package/src/sdk/client.ts b/package/src/sdk/client.ts deleted file mode 100644 index 07e25b04..00000000 --- a/package/src/sdk/client.ts +++ /dev/null @@ -1,367 +0,0 @@ -import { - handleAttach, - handleCancel, - handleCheck, - handleCheckout, - handleEntitled, - handleEvent, - handleQuery, - handleSetupPayment, - handleTrack, - handleUsage, -} from "./general/genMethods"; - -import { - CancelParams, - CheckParams, - QueryParams, - SetupPaymentParams, - TrackParams, - UsageParams, -} from "./general/genTypes"; - -import { AttachParams, CheckoutParams } from "./general/attachTypes"; - -import { autumnApiUrl } from "../libraries/backend/constants"; -import { customerMethods } from "./customers/cusMethods"; -import { entityMethods } from "./customers/entities/entMethods"; -import { productMethods } from "./products/prodMethods"; -import { referralMethods } from "./referrals/referralMethods"; -import { toContainerResult } from "./response"; -import { staticWrapper } from "./utils"; -import { logger } from "../utils/logger"; -import { featureMethods } from "./features/featureMethods"; - -const LATEST_API_VERSION = "1.2"; - -export class Autumn { - private readonly secretKey: string | undefined; - private readonly publishableKey: string | undefined; - private headers: Record; - private url: string; - private logger: any = console; - - constructor(options?: { - secretKey?: string; - publishableKey?: string; - url?: string; - version?: string; - headers?: Record; - logLevel?: string; - }) { - try { - this.secretKey = options?.secretKey || process.env.AUTUMN_SECRET_KEY; - this.publishableKey = - options?.publishableKey || process.env.AUTUMN_PUBLISHABLE_KEY; - } catch (error) {} - - if (!this.secretKey && !this.publishableKey && !options?.headers) { - throw new Error("Autumn secret key or publishable key is required"); - } - - this.headers = options?.headers || { - Authorization: `Bearer ${this.secretKey || this.publishableKey}`, - "Content-Type": "application/json", - }; - - let version = options?.version || LATEST_API_VERSION; - this.headers["x-api-version"] = version; - this.url = options?.url || autumnApiUrl; - - this.logger = logger; - this.logger.level = options?.logLevel || "info"; - } - - async get(path: string) { - const response = await fetch(`${this.url}${path}`, { - headers: this.headers, - }); - - return toContainerResult({ response, logger: this.logger }); - } - - async post(path: string, body: any) { - try { - const response = await fetch(`${this.url}${path}`, { - method: "POST", - headers: this.headers, - body: JSON.stringify(body), - }); - - return toContainerResult({ response, logger: this.logger }); - } catch (error) { - console.error("Error sending request:", error); - throw error; - } - } - - async delete(path: string) { - const response = await fetch(`${this.url}${path}`, { - method: "DELETE", - headers: this.headers, - }); - return toContainerResult({ response, logger: this.logger }); - } - - static customers = customerMethods(); - static products = productMethods(); - static entities = entityMethods(); - static referrals = referralMethods(); - static features = featureMethods(); - - customers = customerMethods(this); - products = productMethods(this); - entities = entityMethods(this); - referrals = referralMethods(this); - features = featureMethods(this); - - - - /** - * Initiates a checkout flow for a product purchase. - * - * The checkout function handles the purchase process for products with pricing. - * It determines whether to show a dialog for user input or redirect directly - * to Stripe based on the customer's state and product requirements. - * - * @param params - Checkout parameters including product ID, customer data, and options - * @returns Promise resolving to checkout details including pricing, prorations, and URLs - * - * @example - * ```typescript - * const result = await autumn.checkout({ - * customer_id: "user_123", - * product_id: "pro", - * success_url: "https://myapp.com/success" - * }); - * - * if (result.url) { - * // Redirect to Stripe checkout - * window.location.href = result.url; - * } - * ``` - */ - async checkout(params: CheckoutParams) { - return handleCheckout({ - instance: this, - params, - }); - } - - static checkout = (params: CheckoutParams) => - staticWrapper(handleCheckout, undefined, { params }); - - - - static usage = (params: UsageParams) => - staticWrapper(handleUsage, undefined, { params }); - - /** - * Attaches a product to a customer, enabling access and handling billing. - * - * The attach function activates a product for a customer and applies all product items. - * When you attach a product: - * - The customer gains access to all features in the product - * - If the product has prices, the customer will be billed accordingly - * - If there's no existing payment method, a checkout URL will be generated - * - * @param params - Attach parameters including customer ID, product ID, and options - * @returns Promise resolving to attachment result with checkout URL if needed - * - * @example - * ```typescript - * const result = await autumn.attach({ - * customer_id: "user_123", - * product_id: "pro", - * success_url: "https://myapp.com/success" - * }); - * - * if (result.checkout_url) { - * // Payment required - redirect to checkout - * window.location.href = result.checkout_url; - * } else { - * // Product successfully attached - * console.log("Access granted:", result.message); - * } - * ``` - */ - async attach(params: AttachParams) { - return handleAttach({ - instance: this, - params, - }); - } - static attach = (params: AttachParams) => - staticWrapper(handleAttach, undefined, { params }); - - static setupPayment = (params: SetupPaymentParams) => - staticWrapper(handleSetupPayment, undefined, { params }); - /** - * Sets up a payment method for a customer. - * - * This method allows you to set up payment methods for customers without - * immediately charging them. Useful for collecting payment information - * before product attachment or for updating existing payment methods. - * - * @param params - Setup payment parameters including customer information - * @returns Promise resolving to setup payment result - * - * @example - * ```typescript - * const result = await autumn.setupPayment({ - * customer_id: "user_123" - * }); - * ``` - */ - async setupPayment(params: SetupPaymentParams) { - return handleSetupPayment({ - instance: this, - params, - }); - } - - static cancel = (params: CancelParams) => - staticWrapper(handleCancel, undefined, { params }); - - /** - * Cancels a customer's subscription or product attachment. - * - * This method allows you to cancel a customer's subscription to a specific product. - * You can choose to cancel immediately or at the end of the billing cycle. - * - * @param params - Cancel parameters including customer ID and product ID - * @returns Promise resolving to cancellation result - * - * @example - * ```typescript - * const result = await autumn.cancel({ - * customer_id: "user_123", - * product_id: "pro", - * cancel_immediately: false // Cancel at end of billing cycle - * }); - * ``` - */ - async cancel(params: CancelParams) { - return handleCancel({ - instance: this, - params, - }); - } - - static check = (params: CheckParams) => - staticWrapper(handleCheck, undefined, { params }); - - /** - * Checks if a customer has access to a specific feature. - * - * This method verifies whether a customer has permission to use a feature - * and checks their remaining balance/usage limits. It can be used to gate - * features and determine when to show upgrade prompts. - * - * @param params - Check parameters including customer ID and feature ID - * @returns Promise resolving to access check result with allowed status and balance info - * - * @example - * ```typescript - * const result = await autumn.check({ - * customer_id: "user_123", - * feature_id: "messages", - * required_balance: 1 - * }); - * - * if (!result.allowed) { - * console.log("Feature access denied - upgrade required"); - * } - * ``` - */ - async check(params: CheckParams) { - return handleCheck({ - instance: this, - params, - }); - } - - static track = (params: TrackParams) => - staticWrapper(handleTrack, undefined, { params }); - - /** - * Tracks usage events for features or analytics. - * - * This method records usage events for metered features, updating the customer's - * balance and usage statistics. It's typically used server-side to ensure - * accurate tracking that cannot be manipulated by users. - * - * @param params - Track parameters including customer ID, feature ID, and usage value - * @returns Promise resolving to tracking result - * - * @example - * ```typescript - * const result = await autumn.track({ - * customer_id: "user_123", - * feature_id: "messages", - * value: 1 // Track 1 message sent - * }); - * ``` - */ - async track(params: TrackParams) { - return handleTrack({ - instance: this, - params, - }); - } - - /** - * Retrieves usage statistics and analytics for a customer. - * - * This method fetches detailed usage information for a customer's features, - * including current balances, usage history, and analytics data. Useful - * for displaying usage dashboards or generating reports. - * - * @param params - Usage parameters including customer ID and optional filters - * @returns Promise resolving to usage statistics and analytics data - * - * @example - * ```typescript - * const result = await autumn.usage({ - * customer_id: "user_123", - * feature_id: "messages" - * value: 20 // Usage value - * }); - * ``` - */ - async usage(params: UsageParams) { - return handleUsage({ - instance: this, - params, - }); - } - - static query = (params: QueryParams) => - staticWrapper(handleQuery, undefined, { params }); - - /** - * Performs advanced queries on customer data and analytics. - * - * This method allows you to run complex queries against customer data, - * usage patterns, and billing information. Useful for generating reports, - * analytics, and custom data insights. - * - * @param params - Query parameters including customer ID and query specifications - * @returns Promise resolving to query results with requested data - * - * @example - * ```typescript - * const result = await autumn.query({ - * customer_id: "user_123", - * feature_id: "messages" // feature id to fetch for query, can also be an array - * }); - * - * ``` - */ - async query(params: QueryParams) { - return handleQuery({ - instance: this, - params, - }); - } -} diff --git a/package/src/sdk/components/componentMethods.ts b/package/src/sdk/components/componentMethods.ts deleted file mode 100644 index 28561eae..00000000 --- a/package/src/sdk/components/componentMethods.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Autumn } from "../client"; -import { AutumnPromise } from "../response"; -import { GetPricingTableParams, PricingTableProduct } from "./componentTypes"; - -export const fetchPricingTable = async ({ - instance, - params, -}: { - instance: Autumn; - params?: GetPricingTableParams; -}): AutumnPromise => { - let path = "/components/pricing_table"; - - if (params) { - const queryParams = new URLSearchParams(); - for (const [key, value] of Object.entries(params)) { - if (key === "products") { - continue; - } - if (value !== undefined) { - queryParams.append(key, String(value)); - } - } - const queryString = queryParams.toString(); - if (queryString) { - path += `?${queryString}`; - } - } - return await instance.get(path); -}; diff --git a/package/src/sdk/components/componentTypes.ts b/package/src/sdk/components/componentTypes.ts deleted file mode 100644 index f646a7b6..00000000 --- a/package/src/sdk/components/componentTypes.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ProductScenario } from "@sdk/general/checkTypes"; -import { ProductItem } from "../products/prodTypes"; - -export interface GetPricingTableParams { - customer_id?: string; -} - -export interface PricingTableProduct { - id: string; - name: string; - description?: string; - button_text?: string; - recommend_text?: string; - everything_from?: string; - - price: { - primary_text: string; - secondary_text?: string; - } & ProductItem; - - items: ({ - primary_text: string; - secondary_text?: string; - } & ProductItem)[]; - - scenario: ProductScenario; -} diff --git a/package/src/sdk/customers/cusEnums.ts b/package/src/sdk/customers/cusEnums.ts deleted file mode 100644 index 1c0bbfc5..00000000 --- a/package/src/sdk/customers/cusEnums.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { z } from "zod/v4"; - -export enum ProductStatus { - Active = "active", - Expired = "expired", - Trialing = "trialing", - Scheduled = "scheduled", - PastDue = "past_due", -} - -export const CustomerExpandEnum = z.enum([ - "invoices", - "rewards", - "trials_used", - "entities", - "referrals", - "payment_method", -]); - -export type CustomerExpandOption = - | "invoices" - | "rewards" - | "trials_used" - | "entities" - | "referrals" - | "payment_method"; diff --git a/package/src/sdk/customers/cusExpandTypes.ts b/package/src/sdk/customers/cusExpandTypes.ts deleted file mode 100644 index 9dde9d06..00000000 --- a/package/src/sdk/customers/cusExpandTypes.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type Stripe from "stripe"; - -export interface CustomerReferral { - program_id: string; - customer: { - id: string; - name: string | null; - email: string | null; - }; - reward_applied: boolean; - created_at: number; -} - -export type CustomerPaymentMethod = Stripe.PaymentMethod; diff --git a/package/src/sdk/customers/cusMethods.ts b/package/src/sdk/customers/cusMethods.ts deleted file mode 100644 index 9fdbd9e0..00000000 --- a/package/src/sdk/customers/cusMethods.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { Autumn } from "../client"; -import { - Customer, - CreateCustomerParams, - UpdateCustomerParams, - BillingPortalParams, - BillingPortalResult, - GetCustomerParams, - UpdateBalancesParams, - UpdateBalancesResult, - DeleteCustomerParams, - ListCustomersParams, -} from "./cusTypes"; -import { staticWrapper, buildPathWithQuery } from "../utils"; -import { AutumnPromise } from "../response"; -import { AutumnError } from "../error"; - -export const customerMethods = (instance?: Autumn) => { - return { - list: (params?: ListCustomersParams) => staticWrapper(listCustomers, instance, { params }), - get: (id: string, params?: GetCustomerParams) => - staticWrapper(getCustomer, instance, { id, params }), - create: (params?: CreateCustomerParams) => - staticWrapper(createCustomer, instance, { params }), - update: (id: string, params: UpdateCustomerParams) => - staticWrapper(updateCustomer, instance, { id, params }), - - delete: (id: string, params?: DeleteCustomerParams) => staticWrapper(deleteCustomer, instance, { id, params }), - - billingPortal: (id: string, params?: BillingPortalParams) => - staticWrapper(billingPortal, instance, { id, params }), - - updateBalances: (id: string, params: UpdateBalancesParams) => - staticWrapper(updateBalances, instance, { id, params }), - }; -}; - - -export const getExpandStr = (expand?: string[]) => { - if (!expand) { - return ""; - } - return `expand=${expand.join(",")}`; -}; - -export const listCustomers = async ({ - instance, - params, -}: { - instance: Autumn; - params?: ListCustomersParams; -}): AutumnPromise<{ - list: Customer[]; - total: number; - limit: number; - offset: number; -}> => { - const path = buildPathWithQuery("/customers", params); - return instance.get(path); -}; - -export const getCustomer = async ({ - instance, - id, - params, -}: { - instance: Autumn; - id: string; - params?: GetCustomerParams; -}): AutumnPromise => { - if (!id) { - return { - data: null, - error: new AutumnError({ - message: "Customer ID is required", - code: "CUSTOMER_ID_REQUIRED", - }), - }; - } - - return instance.get(`/customers/${id}?${getExpandStr(params?.expand)}`); -}; - -export const createCustomer = async ({ - instance, - params, -}: { - instance: Autumn; - params?: CreateCustomerParams; -}): AutumnPromise => { - return instance.post(`/customers?${getExpandStr(params?.expand)}`, params); -}; - -export const updateCustomer = async ({ - instance, - id, - params, -}: { - instance: Autumn; - id: string; - params: UpdateCustomerParams; -}): AutumnPromise => { - return instance.post(`/customers/${id}`, params); -}; - -export const deleteCustomer = async ({ - instance, - id, - params, -}: { - instance: Autumn; - id: string; - params?: DeleteCustomerParams; -}): AutumnPromise => { - return instance.delete(`/customers/${id}${params?.delete_in_stripe ? "?delete_in_stripe=true" : ""}`); -}; - -export const billingPortal = async ({ - instance, - id, - params, -}: { - instance: Autumn; - id: string; - params?: BillingPortalParams; -}): AutumnPromise => { - return instance.post(`/customers/${id}/billing_portal`, params); -}; - -export const updateBalances = async ({ - instance, - id, - params, -}: { - instance: Autumn; - id: string; - params: UpdateBalancesParams; -}): AutumnPromise => { - return instance.post(`/customers/${id}/balances`, { - balances: Array.isArray(params) ? params : [params], - }); -}; diff --git a/package/src/sdk/customers/cusTypes.ts b/package/src/sdk/customers/cusTypes.ts deleted file mode 100644 index 6dfcb216..00000000 --- a/package/src/sdk/customers/cusTypes.ts +++ /dev/null @@ -1,202 +0,0 @@ -import type { ProductItem } from "@sdk/products/prodTypes"; -import type { AppEnv } from "../general/genEnums"; -import { ProductItemInterval } from "../products/prodEnums"; -import { - CustomerExpandEnum, - type CustomerExpandOption, - type ProductStatus, -} from "./cusEnums"; -import { z } from "zod/v4"; - -export const CoreCusFeatureSchema = z.object({ - unlimited: z.boolean().optional(), - interval: z.enum(ProductItemInterval).optional(), - balance: z.number().nullish(), - usage: z.number().optional(), - included_usage: z.number().optional(), - next_reset_at: z.number().nullish(), - overage_allowed: z.boolean().optional(), - usage_limit: z.number().optional(), - - rollovers: z - .object({ - balance: z.number(), - expires_at: z.number(), - }) - .optional(), - - breakdown: z - .array( - z.object({ - interval: z.enum(ProductItemInterval), - balance: z.number().optional(), - usage: z.number().optional(), - included_usage: z.number().optional(), - next_reset_at: z.number().optional(), - }) - ) - .optional(), - - credit_schema: z - .array( - z.object({ - feature_id: z.string(), - credit_amount: z.number(), - }) - ) - .optional(), -}); - -export type CoreCustomerFeature = z.infer; - -export interface CustomerFeature extends CoreCustomerFeature { - id: string; - name: string; - type: "static" | "single_use" | "continuous_use"; -} - -export interface CustomerReferral { - program_id: string; - customer: { - id: string; - name: string | null; - email: string | null; - }; - reward_applied: boolean; - created_at: number; -} - -export interface CustomerProduct { - id: string; - name: string | null; - group: string | null; - status: ProductStatus; - started_at: number; - canceled_at: number | null; - version: number; - - subscription_ids?: string[] | null; - current_period_start?: number | null; - current_period_end?: number | null; - - trial_ends_at?: number; - entity_id?: string; - - is_add_on: boolean; - is_default: boolean; - - items: ProductItem[]; -} - -export interface Customer { - // Internal fields - id: string | null; - created_at: number; - name: string | null; - email: string | null; - fingerprint: string | null; - stripe_id: string | null; - env: AppEnv; - metadata: Record; - - products: CustomerProduct[]; - features: Record; - - // Expanded fields - invoices?: CustomerInvoice[]; - payment_method?: any; - referrals?: CustomerReferral[]; -} - -export const CustomerDataSchema = z.object({ - name: z.string().nullish(), - email: z.string().nullish(), - fingerprint: z.string().nullish(), -}); - -export type CustomerData = z.infer; - -export interface GetCustomerParams { - expand?: CustomerExpandOption[]; -} - -export const CreateCustomerParamsSchema = z.object({ - id: z.string().nullish(), - email: z.string().nullish(), - name: z.string().nullish(), - fingerprint: z.string().nullish(), - metadata: z.record(z.string(), z.any()).optional(), - expand: z.array(CustomerExpandEnum).optional(), - stripe_id: z.string().nullish(), -}); - -export type CreateCustomerParams = z.infer; - -// export interface CreateCustomerParams { -// id?: string | null; -// email?: string | null; -// name?: string | null; -// fingerprint?: string | null; -// metadata?: Record; -// expand?: CustomerExpandOption[]; -// } - -export interface UpdateCustomerParams { - id?: string | null; - name?: string | null; - email?: string | null; - fingerprint?: string | null; - metadata?: Record; - stripe_id?: string; -} - -export const BillingPortalParamsSchema = z.object({ - return_url: z.string().optional(), -}); - -export type BillingPortalParams = z.infer; - -export interface BillingPortalResult { - customer_id: string; - url: string; -} - -export interface CustomerInvoice { - product_ids: string[]; - stripe_id: string; - status: string; - total: number; - currency: string; - created_at: number; - hosted_invoice_url: string; -} - -export const UpdateBalancesParamsSchema = z - .object({ - feature_id: z.string(), - balance: z.number(), - }) - .or( - z.array( - z.object({ - feature_id: z.string(), - balance: z.number(), - }) - ) - ); - -export const DeleteCustomerParamsSchema = z.object({ - delete_in_stripe: z.boolean().optional(), -}); - -export const ListCustomersParamsSchema = z.object({ - limit: z.number().optional(), - offset: z.number().optional(), -}); - -export type ListCustomersParams = z.infer; -export type DeleteCustomerParams = z.infer; -export type UpdateBalancesParams = z.infer; -export type UpdateBalancesResult = { success: boolean }; - - diff --git a/package/src/sdk/customers/cusUtils.ts b/package/src/sdk/customers/cusUtils.ts deleted file mode 100644 index 9bfa678d..00000000 --- a/package/src/sdk/customers/cusUtils.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { AutumnError } from "../error"; -import { CreateCustomerParams } from "./cusTypes"; - -export const validateCreateCustomer = (params: CreateCustomerParams) => { - if (!params.email && !params.id) { - throw new AutumnError({ - message: "Email or id is required", - code: "invalid_params", - }); - } -}; diff --git a/package/src/sdk/customers/entities/entEnums.ts b/package/src/sdk/customers/entities/entEnums.ts deleted file mode 100644 index f9f8a604..00000000 --- a/package/src/sdk/customers/entities/entEnums.ts +++ /dev/null @@ -1 +0,0 @@ -export type EntityExpandOption = "invoices"; diff --git a/package/src/sdk/customers/entities/entMethods.ts b/package/src/sdk/customers/entities/entMethods.ts deleted file mode 100644 index bcbd7510..00000000 --- a/package/src/sdk/customers/entities/entMethods.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { Autumn } from "../../client"; -import { - CreateEntityParams, - CreateEntityResult, - DeleteEntityResult, - Entity, - GetEntityParams, - TransferProductParams, - TransferProductResult, -} from "./entTypes"; -import { staticWrapper } from "../../utils"; -import { AutumnPromise } from "../../response"; - -export const entityMethods = (instance?: Autumn) => { - return { - get: (customer_id: string, entity_id: string, params?: GetEntityParams) => - staticWrapper(getEntity, instance, { - customer_id, - entity_id, - params, - }), - create: ( - customer_id: string, - params?: CreateEntityParams | CreateEntityParams[] - ) => staticWrapper(createEntity, instance, { customer_id, params }), - transfer: (customer_id: string, params: TransferProductParams) => - staticWrapper(transferProduct, instance, { customer_id, params }), - delete: (customer_id: string, entity_id: string) => - staticWrapper(deleteEntity, instance, { customer_id, entity_id }), - }; -}; - -export const getExpandStr = (expand?: string[]) => { - if (!expand) { - return ""; - } - return `expand=${expand.join(",")}`; -}; - -export const getEntity = async ({ - instance, - customer_id, - entity_id, - params, -}: { - instance: Autumn; - customer_id: string; - entity_id: string; - params?: GetEntityParams; -}): AutumnPromise => { - return instance.get( - `/customers/${customer_id}/entities/${entity_id}?${getExpandStr( - params?.expand - )}` - ); -}; - -export const createEntity = async ({ - instance, - customer_id, - params, -}: { - instance: Autumn; - customer_id: string; - params?: CreateEntityParams | CreateEntityParams[]; -}): AutumnPromise => { - return instance.post(`/customers/${customer_id}/entities`, params); -}; - -export const deleteEntity = async ({ - instance, - customer_id, - entity_id, -}: { - instance: Autumn; - customer_id: string; - entity_id: string; -}): AutumnPromise => { - return instance.delete(`/customers/${customer_id}/entities/${entity_id}`); -}; - -export const transferProduct = async ({ - instance, - customer_id, - params, -}: { - instance: Autumn; - customer_id: string; - params: TransferProductParams; -}): AutumnPromise => { - return instance.post(`/customers/${customer_id}/transfer`, params); -}; \ No newline at end of file diff --git a/package/src/sdk/customers/entities/entTypes.ts b/package/src/sdk/customers/entities/entTypes.ts deleted file mode 100644 index b4212dc9..00000000 --- a/package/src/sdk/customers/entities/entTypes.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { - CustomerData, - CustomerFeature, - CustomerInvoice, - CustomerProduct, -} from "../cusTypes"; -import type { EntityExpandOption } from "./entEnums"; -import { z } from "zod/v4"; - -export interface CreateEntityParams { - id: string; - name: string; - feature_id: string; - customer_data?: CustomerData; -} - -export interface CreateEntityResult { - success: boolean; -} - -export interface DeleteEntityResult { - success: boolean; -} - -export interface GetEntityParams { - expand?: EntityExpandOption[]; -} - -export interface Entity { - id: string; - name: string; - customer_id: string; - created_at: number; - env: string; - products: CustomerProduct[]; - features: Record; - invoices?: CustomerInvoice[]; -} - -export const EntityDataSchema = z.object({ - name: z.string().optional(), - feature_id: z.string(), -}); - -export type EntityData = z.infer; - -export const TransferProductParamsSchema = z.object({ - from_entity_id: z.string(), - to_entity_id: z.string(), - product_id: z.string(), -}); - -export type TransferProductParams = z.infer; - -export type TransferProductResult = { - success: boolean; -}; \ No newline at end of file diff --git a/package/src/sdk/error.ts b/package/src/sdk/error.ts deleted file mode 100644 index 0a4de221..00000000 --- a/package/src/sdk/error.ts +++ /dev/null @@ -1,33 +0,0 @@ -export interface ErrorResponse { - message: string; - code: string; -} - -export class AutumnError extends Error { - public readonly message: string; - public readonly code: string; - - constructor(response: ErrorResponse) { - super(response.message); - this.message = response.message; - this.code = response.code; - } - - static fromError(error: any) { - return new AutumnError({ - message: error.message || "Unknown error", - code: error.code || "unknown_error", - }); - } - - toString() { - return `${this.message} (code: ${this.code})`; - } - - toJSON() { - return { - message: this.message, - code: this.code, - }; - } -} diff --git a/package/src/sdk/features/featureMethods.ts b/package/src/sdk/features/featureMethods.ts deleted file mode 100644 index 5187146b..00000000 --- a/package/src/sdk/features/featureMethods.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Autumn } from "../client"; - -import { AutumnPromise } from "../response"; -import { staticWrapper } from "../utils"; -import { Feature } from "./featureTypes"; - -export const featureMethods = (instance?: Autumn) => { - return { - list: () => staticWrapper(listFeatures, instance, {}), - get: (id: string) => staticWrapper(getFeature, instance, { id }), - }; -}; - -export const listFeatures = async ({ - instance, - params, -}: { - instance: Autumn; - params?: {}; -}): AutumnPromise<{ - list: Feature[]; -}> => { - let path = "/features"; - if (params) { - const queryParams = new URLSearchParams(); - for (const [key, value] of Object.entries(params)) { - if (value !== undefined) { - queryParams.append(key, String(value)); - } - } - const queryString = queryParams.toString(); - if (queryString) { - path += `?${queryString}`; - } - } - return instance.get(path); -}; - -export const getFeature = async ({ - instance, - id, -}: { - instance: Autumn; - id: string; -}): AutumnPromise => { - return instance.get(`/features/${id}`); -}; diff --git a/package/src/sdk/features/featureTypes.ts b/package/src/sdk/features/featureTypes.ts deleted file mode 100644 index 8f07a7fd..00000000 --- a/package/src/sdk/features/featureTypes.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { z } from "zod/v4"; - -export enum FeatureType { - Boolean = "boolean", - SingleUse = "single_use", - ContinuousUse = "continuous_use", - CreditSystem = "credit_system", -} - -export const FeatureSchema = z.object({ - id: z.string(), - name: z.string(), - type: z.enum(FeatureType), - display: z - .object({ - singular: z.string(), - plural: z.string(), - }) - .nullish(), - - credit_schema: z - .array( - z.object({ - metered_feature_id: z.string(), - credit_cost: z.number(), - }) - ) - .nullish(), - archived: z.boolean(), -}); - -export type Feature = z.infer; diff --git a/package/src/sdk/general/attachTypes.ts b/package/src/sdk/general/attachTypes.ts deleted file mode 100644 index 56e1e37b..00000000 --- a/package/src/sdk/general/attachTypes.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { CustomerDataSchema } from "@sdk/customers/cusTypes"; -import type { Product, ProductItem } from "@sdk/products/prodTypes"; -import { z } from "zod/v4"; -// Attach -export const AttachFeatureOptionsSchema = z.object({ - feature_id: z.string(), - quantity: z.number(), -}); -export type AttachFeatureOptions = z.infer; - -export const AttachParamsSchema = z.object({ - customer_id: z.string(), - product_id: z.string().optional(), - entity_id: z.string().optional(), - options: z.array(AttachFeatureOptionsSchema).optional(), - - product_ids: z.array(z.string()).optional(), - free_trial: z.boolean().optional(), - success_url: z.string().optional(), - metadata: z.record(z.string(), z.string()).optional(), - force_checkout: z.boolean().optional(), - - customer_data: CustomerDataSchema.optional(), - entity_data: z.any().optional(), - - checkout_session_params: z.record(z.string(), z.any()).optional(), - reward: z.string().optional(), - invoice: z.boolean().optional(), -}); - -export type AttachParams = z.infer; - -export const AttachResultSchema = z.object({ - checkout_url: z.string().optional(), - customer_id: z.string(), - product_ids: z.array(z.string()), - code: z.string(), - message: z.string(), - customer_data: z.any().optional(), - invoice: z - .object({ - status: z.string(), - stripe_id: z.string(), - hosted_invoice_url: z.string().nullable(), - total: z.number(), - currency: z.string(), - }) - .optional(), -}); - -export type AttachResult = z.infer; - -export const CheckoutParamsSchema = z.object({ - customer_id: z.string(), - product_id: z.string(), - product_ids: z.array(z.string()).optional(), - entity_id: z.string().optional(), - options: z.array(AttachFeatureOptionsSchema).optional(), - force_checkout: z.boolean().optional(), - invoice: z.boolean().optional(), - success_url: z.string().optional(), - customer_data: CustomerDataSchema.optional(), - entity_data: z.any().optional(), - checkout_session_params: z.record(z.string(), z.any()).optional(), - reward: z.string().optional(), -}); - -export type CheckoutParams = z.infer; - -export type CheckoutResult = { - url?: string; - customer_id: string; - has_prorations: boolean; - lines: { - description: string; - amount: number; - item: ProductItem; - }[]; - total: number; - currency: string; - options: AttachFeatureOptions[]; - product: Product; - current_product: Product; - free_trial?: boolean; - next_cycle?: { - starts_at: number; - total: number; - }; -}; diff --git a/package/src/sdk/general/checkTypes.ts b/package/src/sdk/general/checkTypes.ts deleted file mode 100644 index f16c7e1d..00000000 --- a/package/src/sdk/general/checkTypes.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { CoreCusFeatureSchema } from "@sdk/customers/cusTypes"; -import type { UsageModelType } from "../products/prodEnums"; -import type { Product } from "../products/prodTypes"; -import { z } from "zod/v4"; - -export type CheckFeatureScenario = "usage_limit" | "feature_flag"; - -export const CheckFeatureResultSchema = z - .object({ - allowed: z.boolean(), - feature_id: z.string(), - customer_id: z.string(), - entity_id: z.string().optional(), - required_balance: z.number(), - }) - .extend(CoreCusFeatureSchema.shape); - -export type CheckFeatureResult = z.infer; -// export interface CheckFeatureResult extends CoreCustomerFeature { -// allowed: boolean; -// feature_id: string; -// customer_id: string; -// entity_id?: string; -// required_balance: number; -// preview?: CheckFeaturePreview; -// } - -export interface CheckFeaturePreview { - scenario: CheckFeatureScenario; - title: string; - message: string; - feature_id: string; - feature_name: string; - products: Product[]; -} - -export type ProductScenario = - | "scheduled" - | "active" - | "new" - | "renew" - | "upgrade" - | "downgrade" - | "cancel"; - -export interface CheckProductResult { - allowed: boolean; - customer_id: string; - product_id: string; - entity_id?: string; - status?: string; - preview?: CheckProductPreview; -} - -export interface CheckProductPreview { - scenario: ProductScenario; - product_id: string; - product_name: string; - recurring: boolean; - error_on_attach?: boolean; - next_cycle_at?: number; - current_product_name?: string; - - items?: { - price: string; - description: string; - usage_model?: UsageModelType; - }[]; - - options?: { - feature_id: string; - feature_name: string; - billing_units: number; - price?: number; - tiers?: { - to: number | string; - amount: number; - }[]; - }[]; - - due_today?: { - price: number; - currency: string; - }; - - due_next_cycle?: { - price: number; - currency: string; - }; -} diff --git a/package/src/sdk/general/genEnums.ts b/package/src/sdk/general/genEnums.ts deleted file mode 100644 index 57b14243..00000000 --- a/package/src/sdk/general/genEnums.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum AppEnv { - Sandbox = "sandbox", - Live = "live", -} diff --git a/package/src/sdk/general/genMethods.ts b/package/src/sdk/general/genMethods.ts deleted file mode 100644 index 9594985c..00000000 --- a/package/src/sdk/general/genMethods.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Autumn } from "../client"; - -import { AutumnPromise } from "../response"; -import { - AttachParams, - AttachResult, - CheckoutParams, - CheckoutResult, -} from "./attachTypes"; -import { - CancelParams, - CancelResult, - CheckParams, - CheckResult, - QueryParams, - QueryResult, - SetupPaymentParams, - SetupPaymentResult, - TrackParams, - TrackResult, - UsageParams, - UsageResult, -} from "./genTypes"; - -export const handleCheckout = async ({ - instance, - params, -}: { - instance: Autumn; - params: CheckoutParams; -}): AutumnPromise => { - return instance.post("/checkout", params); -}; - -export const handleAttach = async ({ - instance, - params, -}: { - instance: Autumn; - params: AttachParams; -}): AutumnPromise => { - return instance.post("/attach", params); -}; - -export const handleSetupPayment = async ({ - instance, - params, -}: { - instance: Autumn; - params: SetupPaymentParams; -}): AutumnPromise => { - return instance.post("/setup_payment", params); -}; - -export const handleCancel = async ({ - instance, - params, -}: { - instance: Autumn; - params: CancelParams; -}): AutumnPromise => { - return instance.post("/cancel", params); -}; - -export const handleEntitled = async ({ - instance, - params, -}: { - instance: Autumn; - params: CheckParams; -}): AutumnPromise => { - return instance.post("/entitled", params); -}; - -export const handleEvent = async ({ - instance, - params, -}: { - instance: Autumn; - params: TrackParams; -}): AutumnPromise => { - return instance.post("/events", params); -}; - -export const handleTrack = async ({ - instance, - params, -}: { - instance: Autumn; - params: TrackParams; -}): AutumnPromise => { - return instance.post("/track", params); -}; - -export const handleUsage = async ({ - instance, - params, -}: { - instance: Autumn; - params: UsageParams; -}): AutumnPromise => { - return instance.post("/usage", params); -}; - -export const handleCheck = async ({ - instance, - params, -}: { - instance: Autumn; - params: CheckParams; -}): AutumnPromise => { - return instance.post("/check", params); -}; - -export const handleQuery = async ({ - instance, - params, -}: { - instance: Autumn; - params: QueryParams; -}): AutumnPromise => { - - return instance.post("/query", params); -}; diff --git a/package/src/sdk/general/genTypes.ts b/package/src/sdk/general/genTypes.ts deleted file mode 100644 index b57b1265..00000000 --- a/package/src/sdk/general/genTypes.ts +++ /dev/null @@ -1,105 +0,0 @@ -import type { CustomerData } from "../customers/cusTypes"; -import { EntityDataSchema } from "../customers/entities/entTypes"; -import type { CheckFeatureResult, CheckProductResult } from "./checkTypes"; -import { z } from "zod/v4"; - -export const CancelParamsSchema = z.object({ - customer_id: z.string(), - product_id: z.string(), - entity_id: z.string().optional(), - cancel_immediately: z.boolean().optional(), -}); - -export type CancelParams = z.infer; - -export const CancelResultSchema = z.object({ - success: z.boolean(), - customer_id: z.string(), - product_id: z.string(), -}); - -export type CancelResult = z.infer; - -// Events -export const TrackParamsSchema = z.object({ - customer_id: z.string(), - value: z.number().optional(), - feature_id: z.string().optional(), - event_name: z.string().optional(), - entity_id: z.string().optional(), - customer_data: z.any().optional(), - idempotency_key: z.string().optional(), - entity_data: z.any().optional(), - properties: z.record(z.string(), z.any()).optional(), -}); - -export type TrackParams = z.infer; - -export const TrackResultSchema = z.object({ - id: z.string(), - code: z.string(), - customer_id: z.string(), - feature_id: z.string().optional(), - event_name: z.string().optional(), -}); - -export type TrackResult = z.infer; - -export const CheckParamsSchema = z.object({ - customer_id: z.string(), - feature_id: z.string().optional(), - product_id: z.string().optional(), - entity_id: z.string().optional(), - customer_data: z.any().optional(), - required_balance: z.number().optional(), - send_event: z.boolean().optional(), - with_preview: z.boolean().optional(), - entity_data: EntityDataSchema.optional(), -}); - -export type CheckParams = z.infer; - -export type CheckResult = CheckFeatureResult & CheckProductResult; - -export interface UsageParams { - customer_id: string; - feature_id: string; - value: number; - customer_data?: CustomerData; -} - -export interface UsageResult { - code: string; // Success code - customer_id: string; // Customer ID - feature_id: string; // Feature ID -} - -export interface SetupPaymentParams { - customer_id: string; - success_url?: string; - checkout_session_params?: Record; -} - -export interface SetupPaymentResult { - customer_id: string; - url: string; -} - -export const QueryRangeEnum = z.enum(["24h", "7d", "30d", "90d", "last_cycle"]); -export const QueryParamsSchema = z.object({ - customer_id: z.string(), - feature_id: z.string().or(z.array(z.string())), - range: QueryRangeEnum.optional(), -}); - -export type QueryParams = z.infer; - -export type QueryResult = { - list: Array< - { - period: number; - } & { - [key: string]: number; - } - >; -}; diff --git a/package/src/sdk/index.ts b/package/src/sdk/index.ts deleted file mode 100644 index 25d16161..00000000 --- a/package/src/sdk/index.ts +++ /dev/null @@ -1,68 +0,0 @@ -export * from "./error"; -export * from "./client"; - -export * from "./general/checkTypes"; -export * from "./general/genTypes"; -export * from "./general/genEnums"; - -export * from "./customers/cusTypes"; -export * from "./customers/cusEnums"; - -export * from "./products/prodTypes"; -export * from "./products/prodEnums"; - -export * from "./components/componentTypes"; -export * from "./components/componentMethods"; - -export * from "./customers/entities/entTypes"; -export * from "./customers/entities/entEnums"; - -export * from "./referrals/referralTypes"; -export * from "./general/attachTypes"; - -export type { AutumnPromise } from "./response"; -export { toContainerResult } from "./response"; - -// Export Zod schemas for convex integration -export { - CancelParamsSchema, - CancelResultSchema, - TrackParamsSchema, - TrackResultSchema, - CheckParamsSchema, - QueryParamsSchema, - QueryRangeEnum, -} from "./general/genTypes"; - -export { - AttachFeatureOptionsSchema, - AttachParamsSchema, - AttachResultSchema, - CheckoutParamsSchema, -} from "./general/attachTypes"; - -export { - CustomerDataSchema, - CoreCusFeatureSchema, - CreateCustomerParamsSchema, - BillingPortalParamsSchema, - UpdateBalancesParamsSchema, -} from "./customers/cusTypes"; - -export { - EntityDataSchema, - TransferProductParamsSchema, -} from "./customers/entities/entTypes"; - -export { - CreateReferralCodeParamsSchema, - RedeemReferralCodeParamsSchema, -} from "./referrals/referralTypes"; - -export { - CheckFeatureResultSchema, -} from "./general/checkTypes"; - -export { - FeatureSchema, -} from "./features/featureTypes"; diff --git a/package/src/sdk/products/prodEnums.ts b/package/src/sdk/products/prodEnums.ts deleted file mode 100644 index 40c34440..00000000 --- a/package/src/sdk/products/prodEnums.ts +++ /dev/null @@ -1,35 +0,0 @@ -export const Infinite = "inf"; - -export enum FreeTrialDuration { - Day = "day", -} - -export enum UsageModel { - Prepaid = "prepaid", - PayPerUse = "pay_per_use", -} - -export type UsageModelType = "prepaid" | "pay_per_use"; - -export enum ProductItemInterval { - Minute = "minute", - Hour = "hour", - Day = "day", - Week = "week", - Month = "month", - Quarter = "quarter", - SemiAnnual = "semi_annual", - Year = "year", - Multiple = "multiple", -} - -export type ProductItemIntervalType = - | "minute" - | "hour" - | "day" - | "week" - | "month" - | "quarter" - | "semi_annual" - | "year" - | "multiple"; diff --git a/package/src/sdk/products/prodMethods.ts b/package/src/sdk/products/prodMethods.ts deleted file mode 100644 index a32066cf..00000000 --- a/package/src/sdk/products/prodMethods.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Autumn } from "../client"; - -import { AutumnPromise } from "../response"; -import { buildPathWithQuery, staticWrapper } from "../utils"; -import { - CreateProductParams, - DeleteProductParams, - ListProductsParams, - Product, -} from "./prodTypes"; - -export const productMethods = (instance?: Autumn) => { - return { - get: (id: string) => staticWrapper(getProduct, instance, { id }), - create: (params?: CreateProductParams) => - staticWrapper(createProduct, instance, { params }), - list: (params?: ListProductsParams) => - staticWrapper(listProducts, instance, { params }), - delete: (id: string) => staticWrapper(deleteProduct, instance, { id }), - }; -}; - -export const listProducts = async ({ - instance, - params, -}: { - instance: Autumn; - params?: ListProductsParams; -}): AutumnPromise<{ - list: Product[]; -}> => { - let path = "/products_beta"; - if (params) { - const queryParams = new URLSearchParams(); - for (const [key, value] of Object.entries(params)) { - if (value !== undefined) { - queryParams.append(key, String(value)); - } - } - const queryString = queryParams.toString(); - if (queryString) { - path += `?${queryString}`; - } - } - return instance.get(path); -}; - -export const getProduct = async ({ - instance, - id, -}: { - instance: Autumn; - id: string; -}): AutumnPromise => { - return instance.get(`/products/${id}`); -}; - -export const createProduct = async ({ - instance, - params, -}: { - instance: Autumn; - params?: CreateProductParams; -}): AutumnPromise => { - return instance.post("/products", params); -}; - -export const deleteProduct = async ({ - instance, - id, - params, -}: { - instance: Autumn; - id: string; - params?: DeleteProductParams; -}): AutumnPromise<{ - success: boolean; -}> => { - // Build query params - const path = buildPathWithQuery(`/products/${id}`, params); - return instance.delete(path); -}; diff --git a/package/src/sdk/products/prodTypes.ts b/package/src/sdk/products/prodTypes.ts deleted file mode 100644 index df497c55..00000000 --- a/package/src/sdk/products/prodTypes.ts +++ /dev/null @@ -1,124 +0,0 @@ -import type { ProductScenario } from "@sdk/general/checkTypes"; -import type { AppEnv } from "../general/genEnums"; -import type { - FreeTrialDuration, - Infinite, - ProductItemIntervalType, - UsageModel, -} from "./prodEnums"; - -export interface PriceTier { - to: number; - amount: number | "inf"; -} - -// export const ProductItemSchema = z.object({ -// type: z.enum(["feature", "priced_feature", "price"]), -// feature_id: z.string().optional(), -// included_usage: z.number().optional(), -// interval: z.enum(["month", "year"]).optional(), -// usage_model: z.enum(["usage", "quantity"]).optional(), -// price: z.number().optional(), -// billing_units: z.number().optional(), -// entity_feature_id: z.string().optional(), -// reset_usage_when_enabled: z.boolean().optional(), - -// quantity: z.number().optional(), -// next_cycle_quantity: z.number().optional(), - -// display: z -// .object({ -// primary_text: z.string().optional(), -// secondary_text: z.string().optional(), -// }) -// .optional(), -// }); - -export interface Feature { - id: string; - name: string; - type: "boolean" | "continuous_use" | "single_use" | "credit_system"; -} - -export interface ProductItem { - type?: "feature" | "priced_feature" | "price"; - feature_id?: string; - included_usage?: number | typeof Infinite; - interval?: ProductItemIntervalType; - - feature?: Feature; - - // Price config - usage_model?: UsageModel; - price?: number; - billing_units?: number; - entity_feature_id?: string; - reset_usage_when_enabled?: boolean; - - quantity?: number; - next_cycle_quantity?: number; - - display?: { - primary_text?: string; - secondary_text?: string; - }; -} - -export interface FreeTrial { - duration: FreeTrialDuration; - length: number; - unique_fingerprint: boolean; - trial_available?: boolean; -} - -export interface Product { - id: string; - created_at: number; - name: string; - env: AppEnv; - - is_add_on: boolean; - is_default: boolean; - group: string; - version: number; - - items: ProductItem[]; - free_trial: FreeTrial | null; - - scenario?: ProductScenario; - base_variant_id: string | null; - - properties: { - is_free: boolean; - is_one_off: boolean; - interval_group: string; - has_trial: boolean; - updateable: boolean; - }; - - display?: { - name?: string; - description?: string; - button_text?: string; - recommend_text?: string; - everything_from?: string; - button_url?: string; - }; -} - -export interface CreateProductParams { - id: string; - name?: string; - is_add_on?: boolean; - is_default?: boolean; - items?: ProductItem[]; - free_trial?: FreeTrial; -} - -export interface ListProductsParams { - customer_id?: string; -} - -export interface DeleteProductParams { - all_versions?: boolean; -} diff --git a/package/src/sdk/referrals/referralMethods.ts b/package/src/sdk/referrals/referralMethods.ts deleted file mode 100644 index 0c0ba053..00000000 --- a/package/src/sdk/referrals/referralMethods.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { AutumnPromise } from "@sdk/response"; -import { Autumn } from "../client"; -import { staticWrapper } from "../utils"; -import { - CreateReferralCodeParams, - CreateReferralCodeResult, - RedeemReferralCodeParams, - RedeemReferralCodeResult, -} from "./referralTypes"; - -export const referralMethods = (instance?: Autumn) => { - return { - createCode: (params: CreateReferralCodeParams) => - staticWrapper(createReferralCode, instance, { params }), - redeemCode: (params: RedeemReferralCodeParams) => - staticWrapper(redeemReferralCode, instance, { params }), - }; -}; - -export const createReferralCode = async ({ - instance, - params, -}: { - instance: Autumn; - params: CreateReferralCodeParams; -}): AutumnPromise => { - return instance.post("/referrals/code", params); -}; - -export const redeemReferralCode = async ({ - instance, - params, -}: { - instance: Autumn; - params: RedeemReferralCodeParams; -}): AutumnPromise => { - return instance.post("/referrals/redeem", params); -}; diff --git a/package/src/sdk/referrals/referralTypes.ts b/package/src/sdk/referrals/referralTypes.ts deleted file mode 100644 index b7d4e687..00000000 --- a/package/src/sdk/referrals/referralTypes.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { z } from "zod/v4"; - -export const CreateReferralCodeParamsSchema = z.object({ - customer_id: z.string(), - program_id: z.string(), -}); - -export type CreateReferralCodeParams = z.infer< - typeof CreateReferralCodeParamsSchema ->; - -export interface CreateReferralCodeResult { - code: string; - customer_id: string; - created_at: number; -} - -export const RedeemReferralCodeParamsSchema = z.object({ - code: z.string(), - customer_id: z.string(), -}); - -export type RedeemReferralCodeParams = z.infer< - typeof RedeemReferralCodeParamsSchema ->; - -export interface RedeemReferralCodeResult { - id: string; - customer_id: string; - reward_id: string; - referrer: { - id: string; - name: string | null; - email: string | null; - }; -} diff --git a/package/src/sdk/response.ts b/package/src/sdk/response.ts deleted file mode 100644 index f3fd5968..00000000 --- a/package/src/sdk/response.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { AutumnError } from "./error"; - -export type Success = { - data: T; - error: null; - statusCode?: number; -}; - -type Failure = { - data: null; - error: E; - statusCode?: number; -}; - -export const toContainerResult = async ({ - response, - logger, - logError = true, -}: { - response: Response; - logger: Console; - logError?: boolean; -}): Promise> => { - if (response.status < 200 || response.status >= 300) { - let error: any; - try { - error = await response.json(); - if (logError) { - logger.error(`[Autumn] ${error.message}`); - } - } catch (error) { - // biome-ignore lint/complexity/noUselessCatch: idk - throw error; - // return { - // data: null, - // error: new AutumnError({ - // message: "Failed to parse JSON response from Autumn", - // code: "internal_error", - // }), - // statusCode: response.status, - // }; - } - - return { - data: null, - error: new AutumnError({ - message: error.message, - code: error.code, - }), - statusCode: response.status, - }; - } - - try { - const data = await response.json(); - - return { - data: data, - error: null, - statusCode: response?.status, - }; - } catch (error) { - // biome-ignore lint/complexity/noUselessCatch: idk - throw error; - } -}; - -export type Result = Success | Failure; -export type AutumnPromise = Promise>; diff --git a/package/src/sdk/types.ts b/package/src/sdk/types.ts deleted file mode 100644 index abbddb4e..00000000 --- a/package/src/sdk/types.ts +++ /dev/null @@ -1,15 +0,0 @@ -// import { -// CusProductResponseSchema, -// CustomerResponseSchema, -// } from "@autumn/shared"; -// import { z } from "zod"; - -// export type Customer = z.infer; -// export type CustomerProduct = z.infer; - -// export interface CustomerCreateParams { -// id?: string; -// email?: string; -// name?: string; -// fingerprint?: string; -// } diff --git a/package/src/sdk/utils.ts b/package/src/sdk/utils.ts deleted file mode 100644 index 19c2b239..00000000 --- a/package/src/sdk/utils.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Autumn } from "./client"; -import queryString from "query-string"; - -export const staticWrapper = , TReturn>( - callback: (params: { instance: Autumn } & TArgs) => Promise, - instance: Autumn | undefined, - args: TArgs -): Promise => { - if (!instance) { - instance = new Autumn(); - } - - return callback({ instance, ...args }); -}; - -export const buildQueryString = (params?: Record): string => { - if (!params) return ""; - - return queryString.stringify(params, { - skipNull: true, - skipEmptyString: true - }); -}; - -export const buildPathWithQuery = (basePath: string, params?: Record): string => { - const query = buildQueryString(params); - return query ? `${basePath}?${query}` : basePath; -}; diff --git a/package/src/utils/encryptUtils.tsx b/package/src/utils/encryptUtils.tsx deleted file mode 100644 index 4bdafcc2..00000000 --- a/package/src/utils/encryptUtils.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import crypto from "crypto"; -import { AutumnError } from "../sdk"; - -const getKey = () => { - if (!process.env.AUTUMN_SECRET_KEY) { - throw new AutumnError({ - message: - "Autumn secret key not found in process.env.AUTUMN_SECRET_KEY. Please set it in your .env file.", - code: "secret_key_not_found", - }); - } - - return crypto - .createHash("sha512") - .update(process.env.AUTUMN_SECRET_KEY!) - .digest("hex") - .substring(0, 32); -}; - -export function encryptData(data: string) { - let key: string; - try { - key = getKey(); - } catch (error: any) { - throw new AutumnError({ - message: `Failed to encrypt customer ID. ${error.message}`, - code: "encrypt_customer_id_failed", - }); - } - - const iv = crypto.randomBytes(16); - const cipher = crypto.createCipheriv("aes-256-cbc", key, iv); - - const encrypted = Buffer.concat([ - cipher.update(data, "utf8"), - cipher.final(), - ]); - - // Combine IV and encrypted data - const result = Buffer.concat([iv, encrypted]); - return result.toString("base64"); -} - -export function decryptData(encryptedData: string) { - const buffer = Buffer.from(encryptedData, "base64"); - - // Extract IV and encrypted data - const iv = buffer.slice(0, 16); - const encrypted = buffer.slice(16); - - const key = getKey(); - const decipher = crypto.createDecipheriv("aes-256-cbc", key, iv); - - const decrypted = Buffer.concat([ - decipher.update(encrypted), - decipher.final(), - ]); - - return decrypted.toString("utf8"); -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3c9454ce..755f8b03 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -86,16 +86,161 @@ importers: version: 3.0.0(@types/react@18.3.23) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@24.3.0)(typescript@5.9.2) + version: 10.9.2(@swc/core@1.13.5)(@types/node@24.3.0)(typescript@5.9.2) tsup: specifier: ^8.5.0 - version: 8.5.0(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.2)(yaml@2.8.1) + version: 8.5.0(@swc/core@1.13.5)(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.2)(yaml@2.8.1) typescript: specifier: ^5.0.3 version: 5.9.2 xo: specifier: ^0.53.1 - version: 0.53.1(webpack@5.101.1(esbuild@0.25.9)) + version: 0.53.1(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) + + autumn-js: + dependencies: + '@useautumn/sdk': + specifier: workspace:* + version: link:../ts-sdk + better-auth: + specifier: ^1.3.17 + version: 1.3.24(next@15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + better-call: + specifier: ^1.0.12 + version: 1.0.19 + query-string: + specifier: ^9.2.2 + version: 9.2.2 + rou3: + specifier: ^0.6.1 + version: 0.6.3 + swr: + specifier: ^2.3.3 + version: 2.3.6(react@19.1.1) + zod: + specifier: ^4.0.0 + version: 4.1.5 + devDependencies: + '@radix-ui/react-accordion': + specifier: ^1.2.11 + version: 1.2.11(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-dialog': + specifier: ^1.1.14 + version: 1.1.15(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-popover': + specifier: ^1.1.14 + version: 1.1.15(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-slot': + specifier: ^1.2.3 + version: 1.2.3(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-switch': + specifier: ^1.2.5 + version: 1.2.5(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@remix-run/node': + specifier: ^2.16.6 + version: 2.17.0(typescript@5.8.3) + '@supabase/ssr': + specifier: ^0.6.1 + version: 0.6.1(@supabase/supabase-js@2.55.0) + '@tanstack/react-start': + specifier: ^1.120.5 + version: 1.131.8(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) + '@types/express': + specifier: ^5.0.1 + version: 5.0.3 + '@types/node': + specifier: ^22.15.32 + version: 22.17.1 + '@types/react': + specifier: ^19 + version: 19.1.12 + autoprefixer: + specifier: ^10.4.21 + version: 10.4.21(postcss@8.5.6) + autumn-js: + specifier: ^0.0.115 + version: 0.0.115(better-auth@1.3.24(next@15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-call@1.0.19)(react@19.1.1) + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + concurrently: + specifier: ^9.2.0 + version: 9.2.1 + convex: + specifier: ^1.25.4 + version: 1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + elysia: + specifier: ^1.3.5 + version: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3) + esbuild-plugin-path-alias: + specifier: ^1.0.7 + version: 1.0.7(esbuild@0.25.9) + esbuild-postcss: + specifier: ^0.0.4 + version: 0.0.4(esbuild@0.25.9)(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) + express: + specifier: ^5.1.0 + version: 5.1.0 + fastify: + specifier: ^5.3.3 + version: 5.5.0 + hono: + specifier: ^4.7.9 + version: 4.9.1 + install: + specifier: ^0.13.0 + version: 0.13.0 + lucide-react: + specifier: ^0.523.0 + version: 0.523.0(react@19.1.1) + next: + specifier: ^15.2.3 + version: 15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + nodemon: + specifier: ^3.1.10 + version: 3.1.10 + postcss: + specifier: ^8.5.6 + version: 8.5.6 + postcss-nested: + specifier: ^7.0.2 + version: 7.0.2(postcss@8.5.6) + postcss-prefix-selector: + specifier: ^2.1.1 + version: 2.1.1(postcss@8.5.6) + react-dom: + specifier: ^19.1.0 + version: 19.1.1(react@19.1.1) + stripe: + specifier: ^18.3.0 + version: 18.4.0(@types/node@22.17.1) + tailwind-merge: + specifier: ^2.6.0 + version: 2.6.0 + tailwindcss: + specifier: ^3.4.1 + version: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3))) + tailwindcss-scoped-preflight: + specifier: ^3.4.12 + version: 3.4.12(postcss@8.5.6)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3))) + tsconfig-paths: + specifier: ^4.2.0 + version: 4.2.0 + tsup: + specifier: ^8.4.0 + version: 8.5.0(@swc/core@1.13.5)(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.8.3)(yaml@2.8.1) + tsx: + specifier: ^4.19.3 + version: 4.20.4 + typescript: + specifier: ^5.8.3 + version: 5.8.3 convex: dependencies: @@ -123,7 +268,7 @@ importers: version: 18.17.0 autumn-js: specifier: workspace:* - version: link:../package + version: link:../autumn-js chokidar-cli: specifier: 3.0.0 version: 3.0.0 @@ -171,7 +316,7 @@ importers: version: link:../../convex autumn-js: specifier: workspace:* - version: link:../../package + version: link:../../autumn-js better-auth: specifier: 1.3.7 version: 1.3.7(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(zod@3.25.76) @@ -244,7 +389,7 @@ importers: version: link:../../convex autumn-js: specifier: workspace:* - version: link:../../package + version: link:../../autumn-js convex: specifier: ^1.26.0 version: 1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) @@ -317,7 +462,7 @@ importers: version: link:../../convex autumn-js: specifier: workspace:* - version: link:../../package + version: link:../../autumn-js convex: specifier: ^1.26.0 version: 1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) @@ -411,7 +556,7 @@ importers: version: 7.69.1(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)) autumn-js: specifier: workspace:* - version: link:../../package + version: link:../../autumn-js class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -499,7 +644,7 @@ importers: version: 1.3.1(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3))(hono@4.9.1) autumn-js: specifier: workspace:* - version: link:../../package + version: link:../../autumn-js elysia: specifier: '1' version: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3) @@ -524,7 +669,7 @@ importers: version: 1.7.26(express@4.21.2)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) autumn-js: specifier: workspace:* - version: link:../../package + version: link:../../autumn-js better-auth: specifier: ^1.2.8 version: 1.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -597,7 +742,7 @@ importers: version: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)) + version: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) nodemon: specifier: ^3.1.7 version: 3.1.10 @@ -606,10 +751,10 @@ importers: version: 7.1.4 ts-jest: specifier: ^29.2.5 - version: 29.4.1(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)))(typescript@5.8.3) + version: 29.4.1(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@30.2.0)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)))(typescript@5.8.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.17.1)(typescript@5.8.3) + version: 10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3) typescript: specifier: ^5.6.3 version: 5.8.3 @@ -661,7 +806,7 @@ importers: version: 2.55.0 autumn-js: specifier: workspace:* - version: link:../../package + version: link:../../autumn-js better-auth: specifier: ^1.2.8 version: 1.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -692,7 +837,7 @@ importers: dependencies: autumn-js: specifier: workspace:* - version: link:../../package + version: link:../../autumn-js next: specifier: 15.4.1 version: 15.4.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -744,7 +889,7 @@ importers: version: 7.8.2(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3) autumn-js: specifier: workspace:* - version: link:../../package + version: link:../../autumn-js isbot: specifier: ^5.1.27 version: 5.1.29 @@ -799,13 +944,13 @@ importers: version: 1.131.28(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@tanstack/router-core@1.131.7)(csstype@3.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(solid-js@1.9.9)(tiny-invariant@1.3.3) '@tanstack/react-start': specifier: ^1.120.5 - version: 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1) + version: 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)) '@types/pg': specifier: ^8.15.2 version: 8.15.5 autumn-js: specifier: workspace:* - version: link:../../package + version: link:../../autumn-js better-auth: specifier: ^1.2.8 version: 1.3.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -842,7 +987,7 @@ importers: version: 8.5.6 tailwindcss: specifier: ^3.4.17 - version: 3.4.17(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)) + version: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) typescript: specifier: ^5.7.2 version: 5.8.3 @@ -850,6 +995,8 @@ importers: specifier: ^5.1.4 version: 5.1.4(typescript@5.8.3)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + frameworks/test: {} + frameworks/vite: dependencies: '@clerk/clerk-react': @@ -878,7 +1025,7 @@ importers: version: 4.1.12(vite@6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) autumn-js: specifier: workspace:* - version: link:../../package + version: link:../../autumn-js better-auth: specifier: ^1.2.8 version: 1.3.4(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -973,9 +1120,15 @@ importers: '@tailwindcss/cli': specifier: ^4.1.11 version: 4.1.11 + '@useautumn/sdk': + specifier: workspace:* + version: link:../ts-sdk atmn: specifier: workspace:* version: link:../atmn + autumn-js: + specifier: workspace:* + version: link:../autumn-js better-auth: specifier: ^1.2.12 version: 1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.0.17) @@ -1056,147 +1209,71 @@ importers: specifier: ^5 version: 5.9.2 - package: - dependencies: - better-auth: - specifier: ^1.3.4 - version: 1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.0.17) - better-call: - specifier: ^1.0.12 - version: 1.0.13 - query-string: - specifier: ^9.2.2 - version: 9.2.2 - rou3: - specifier: ^0.6.1 - version: 0.6.3 - swr: - specifier: ^2.3.3 - version: 2.3.6(react@19.1.1) - zod: - specifier: ^4.0.0 - version: 4.0.17 + ts-sdk: devDependencies: - '@radix-ui/react-accordion': - specifier: ^1.2.11 - version: 1.2.11(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-dialog': - specifier: ^1.1.14 - version: 1.1.14(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-popover': - specifier: ^1.1.14 - version: 1.1.14(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': - specifier: ^1.2.3 - version: 1.2.3(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-switch': - specifier: ^1.2.5 - version: 1.2.5(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@remix-run/node': - specifier: ^2.16.6 - version: 2.17.0(typescript@5.9.2) - '@supabase/ssr': - specifier: ^0.6.1 - version: 0.6.1(@supabase/supabase-js@2.55.0) - '@tanstack/react-start': - specifier: ^1.120.5 - version: 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(esbuild@0.25.9)) - '@types/express': - specifier: ^5.0.1 - version: 5.0.3 + '@arethetypeswrong/cli': + specifier: ^0.17.0 + version: 0.17.4 + '@swc/core': + specifier: ^1.3.102 + version: 1.13.5 + '@swc/jest': + specifier: ^0.2.29 + version: 0.2.39(@swc/core@1.13.5) + '@types/jest': + specifier: ^29.4.0 + version: 29.5.14 '@types/node': - specifier: ^22.15.32 - version: 22.17.1 - '@types/react': - specifier: ^19 - version: 19.1.10 - autoprefixer: - specifier: ^10.4.21 - version: 10.4.21(postcss@8.5.6) - autumn-js: - specifier: ^0.0.115 - version: 0.0.115(better-auth@1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.0.17))(better-call@1.0.13)(react@19.1.1) - class-variance-authority: - specifier: ^0.7.1 - version: 0.7.1 - clsx: - specifier: ^2.1.1 - version: 2.1.1 - concurrently: - specifier: ^9.2.0 - version: 9.2.0 - convex: - specifier: ^1.25.4 - version: 1.25.4(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - elysia: - specifier: ^1.3.5 - version: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2) - esbuild-plugin-path-alias: - specifier: ^1.0.7 - version: 1.0.7(esbuild@0.25.9) - esbuild-postcss: - specifier: ^0.0.4 - version: 0.0.4(esbuild@0.25.9)(postcss@8.5.6)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2)) - express: - specifier: ^5.1.0 - version: 5.1.0 - fastify: - specifier: ^5.3.3 - version: 5.5.0 - hono: - specifier: ^4.7.9 - version: 4.9.1 - install: - specifier: ^0.13.0 - version: 0.13.0 - lucide-react: - specifier: ^0.523.0 - version: 0.523.0(react@19.1.1) - next: - specifier: ^15.2.3 - version: 15.3.4(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - nodemon: - specifier: ^3.1.10 - version: 3.1.10 - postcss: - specifier: ^8.5.6 - version: 8.5.6 - postcss-nested: - specifier: ^7.0.2 - version: 7.0.2(postcss@8.5.6) - postcss-prefix-selector: - specifier: ^2.1.1 - version: 2.1.1(postcss@8.5.6) - react-dom: - specifier: ^19.1.0 - version: 19.1.1(react@19.1.1) - stripe: - specifier: ^18.3.0 - version: 18.4.0(@types/node@22.17.1) - tailwind-merge: - specifier: ^2.6.0 - version: 2.6.0 - tailwindcss: - specifier: ^3.4.1 - version: 3.4.17(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2)) - tailwindcss-animate: - specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2))) - tailwindcss-scoped-preflight: - specifier: ^3.4.12 - version: 3.4.12(postcss@8.5.6)(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2))) + specifier: ^20.17.6 + version: 20.19.11 + '@typescript-eslint/eslint-plugin': + specifier: 8.31.1 + version: 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/parser': + specifier: 8.31.1 + version: 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + eslint: + specifier: ^9.20.1 + version: 9.34.0(jiti@2.5.1) + eslint-plugin-prettier: + specifier: ^5.4.1 + version: 5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@8.10.2(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1))(prettier@3.6.2) + eslint-plugin-unused-imports: + specifier: ^4.1.4 + version: 4.2.0(@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)) + iconv-lite: + specifier: ^0.6.3 + version: 0.6.3 + jest: + specifier: ^29.4.0 + version: 29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) + prettier: + specifier: ^3.0.0 + version: 3.6.2 + publint: + specifier: ^0.2.12 + version: 0.2.12 + ts-jest: + specifier: ^29.1.0 + version: 29.4.1(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@30.2.0)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)))(typescript@5.8.3) + ts-node: + specifier: ^10.5.0 + version: 10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3) + tsc-multi: + specifier: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz + version: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz(typescript@5.8.3) tsconfig-paths: - specifier: ^4.2.0 + specifier: ^4.0.0 version: 4.2.0 - tsup: - specifier: ^8.4.0 - version: 8.5.0(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.2)(yaml@2.8.1) - tsx: - specifier: ^4.19.3 - version: 4.20.4 + tslib: + specifier: ^2.8.1 + version: 2.8.1 typescript: - specifier: ^5.8.3 - version: 5.9.2 + specifier: 5.8.3 + version: 5.8.3 + typescript-eslint: + specifier: 8.31.1 + version: 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) ui: dependencies: @@ -1232,7 +1309,7 @@ importers: version: 3.1.1(@babel/runtime@7.28.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) autumn-js: specifier: 0.0.111 - version: 0.0.111(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(better-auth@1.3.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@4.0.17))(better-call@1.0.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 0.0.111(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(better-auth@1.3.24(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(better-call@1.0.19)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -1250,7 +1327,7 @@ importers: version: 11.7.5(acorn@8.15.0)(fumadocs-core@15.6.10(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1))(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(vite@7.1.2(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) fumadocs-ui: specifier: ^15.2.11 - version: 15.6.10(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@20.19.10)(typescript@5.9.2))) + version: 15.6.10(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2))) lucide-react: specifier: ^0.471.2 version: 0.471.2(react@18.3.1) @@ -1289,7 +1366,7 @@ importers: version: 2.6.0 tailwindcss-animate: specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@20.19.10)(typescript@5.9.2))) + version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2))) zod: specifier: ^4.0.0 version: 4.0.17 @@ -1323,7 +1400,7 @@ importers: version: 8.5.6 tailwindcss: specifier: ^3.4.1 - version: 3.4.17(ts-node@10.9.2(@types/node@20.19.10)(typescript@5.9.2)) + version: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2)) typescript: specifier: ^5 version: 5.9.2 @@ -1616,12 +1693,18 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + '@better-auth/core@1.3.24': + resolution: {integrity: sha512-nU4aj5SA0COXAls0p3htIWmGPOG+76HULd9tG8CEUfwcK95rRrUIUN74FKvsAu3b18AVj3E7cL4bYrQS3KYKRw==} + '@better-auth/utils@0.2.5': resolution: {integrity: sha512-uI2+/8h/zVsH8RrYdG8eUErbuGBk16rZKQfz8CjxQOyCE6v7BqFYEbFwvOkvl1KbUdxhqOnXp78+uE5h8qVEgQ==} '@better-auth/utils@0.2.6': resolution: {integrity: sha512-3y/vaL5Ox33dBwgJ6ub3OPkVqr6B5xL2kgxNHG8eHZuryLyG/4JSPGqjbdRSgjuy9kALUZYDFl+ORIAxlWMSuA==} + '@better-auth/utils@0.3.0': + resolution: {integrity: sha512-W+Adw6ZA6mgvnSnhOki270rwJ42t4XzSK6YWGF//BbVXL6SwCLWfyzBc1lN2m/4RM28KubdBKQ4X5VMoLRNPQw==} + '@better-fetch/fetch@1.1.18': resolution: {integrity: sha512-rEFOE1MYIsBmoMJtQbl32PGHHXuG2hDxvEd7rUHE0vCBoFQVSDqaVs9hkZEtHCxRoY+CljXKFCOuJ8uxqw1LcA==} @@ -2968,6 +3051,10 @@ packages: node-notifier: optional: true + '@jest/create-cache-key-function@30.2.0': + resolution: {integrity: sha512-44F4l4Enf+MirJN8X/NhdGkl71k5rBYiwdVlo4HxOwbu0sHV8QKrGEedb1VUU4K3W7fBKE0HGfbn7eZm0Ti3zg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + '@jest/environment@29.7.0': resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2988,6 +3075,10 @@ packages: resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/pattern@30.0.1': + resolution: {integrity: sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + '@jest/reporters@29.7.0': resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3001,6 +3092,10 @@ packages: resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/schemas@30.0.5': + resolution: {integrity: sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + '@jest/source-map@29.6.3': resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3021,6 +3116,10 @@ packages: resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/types@30.2.0': + resolution: {integrity: sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} @@ -3335,10 +3434,18 @@ packages: '@noble/ciphers@0.6.0': resolution: {integrity: sha512-mIbq/R9QXk5/cTfESb1OKtyFnk7oc1Om/8onA1158K9/OZUQFDEVy55jVTato+xmp3XX6F6Qh0zz0Nc1AxAlRQ==} + '@noble/ciphers@2.0.1': + resolution: {integrity: sha512-xHK3XHPUW8DTAobU+G0XT+/w+JLM7/8k1UFdB5xg/zTFPnFCobhftzw8wl4Lw2aq/Rvir5pxfZV5fEazmeCJ2g==} + engines: {node: '>= 20.19.0'} + '@noble/hashes@1.8.0': resolution: {integrity: sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==} engines: {node: ^14.21.3 || >=16} + '@noble/hashes@2.0.1': + resolution: {integrity: sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==} + engines: {node: '>= 20.19.0'} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -3527,6 +3634,10 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@pkgr/core@0.2.9': + resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@poppinss/colors@4.1.5': resolution: {integrity: sha512-FvdDqtcRCtz6hThExcFOgW0cWX+xwSMWcRuQe5ZEb2m7cVQOAVZOIMt+/v9RxGiD9/OY16qJBXK4CVKWAPalBw==} @@ -4643,12 +4754,90 @@ packages: '@supabase/supabase-js@2.55.0': resolution: {integrity: sha512-Y1uV4nEMjQV1x83DGn7+Z9LOisVVRlY1geSARrUHbXWgbyKLZ6/08dvc0Us1r6AJ4tcKpwpCZWG9yDQYo1JgHg==} + '@swc/core-darwin-arm64@1.13.5': + resolution: {integrity: sha512-lKNv7SujeXvKn16gvQqUQI5DdyY8v7xcoO3k06/FJbHJS90zEwZdQiMNRiqpYw/orU543tPaWgz7cIYWhbopiQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + + '@swc/core-darwin-x64@1.13.5': + resolution: {integrity: sha512-ILd38Fg/w23vHb0yVjlWvQBoE37ZJTdlLHa8LRCFDdX4WKfnVBiblsCU9ar4QTMNdeTBEX9iUF4IrbNWhaF1Ng==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + + '@swc/core-linux-arm-gnueabihf@1.13.5': + resolution: {integrity: sha512-Q6eS3Pt8GLkXxqz9TAw+AUk9HpVJt8Uzm54MvPsqp2yuGmY0/sNaPPNVqctCX9fu/Nu8eaWUen0si6iEiCsazQ==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + + '@swc/core-linux-arm64-gnu@1.13.5': + resolution: {integrity: sha512-aNDfeN+9af+y+M2MYfxCzCy/VDq7Z5YIbMqRI739o8Ganz6ST+27kjQFd8Y/57JN/hcnUEa9xqdS3XY7WaVtSw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-arm64-musl@1.13.5': + resolution: {integrity: sha512-9+ZxFN5GJag4CnYnq6apKTnnezpfJhCumyz0504/JbHLo+Ue+ZtJnf3RhyA9W9TINtLE0bC4hKpWi8ZKoETyOQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-x64-gnu@1.13.5': + resolution: {integrity: sha512-WD530qvHrki8Ywt/PloKUjaRKgstQqNGvmZl54g06kA+hqtSE2FTG9gngXr3UJxYu/cNAjJYiBifm7+w4nbHbA==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-linux-x64-musl@1.13.5': + resolution: {integrity: sha512-Luj8y4OFYx4DHNQTWjdIuKTq2f5k6uSXICqx+FSabnXptaOBAbJHNbHT/06JZh6NRUouaf0mYXN0mcsqvkhd7Q==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-win32-arm64-msvc@1.13.5': + resolution: {integrity: sha512-cZ6UpumhF9SDJvv4DA2fo9WIzlNFuKSkZpZmPG1c+4PFSEMy5DFOjBSllCvnqihCabzXzpn6ykCwBmHpy31vQw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + + '@swc/core-win32-ia32-msvc@1.13.5': + resolution: {integrity: sha512-C5Yi/xIikrFUzZcyGj9L3RpKljFvKiDMtyDzPKzlsDrKIw2EYY+bF88gB6oGY5RGmv4DAX8dbnpRAqgFD0FMEw==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + + '@swc/core-win32-x64-msvc@1.13.5': + resolution: {integrity: sha512-YrKdMVxbYmlfybCSbRtrilc6UA8GF5aPmGKBdPvjrarvsmf4i7ZHGCEnLtfOMd3Lwbs2WUZq3WdMbozYeLU93Q==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + + '@swc/core@1.13.5': + resolution: {integrity: sha512-WezcBo8a0Dg2rnR82zhwoR6aRNxeTGfK5QCD6TQ+kg3xx/zNT02s/0o+81h/3zhvFSB24NtqEr8FTw88O5W/JQ==} + engines: {node: '>=10'} + peerDependencies: + '@swc/helpers': '>=0.5.17' + peerDependenciesMeta: + '@swc/helpers': + optional: true + '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@swc/jest@0.2.39': + resolution: {integrity: sha512-eyokjOwYd0Q8RnMHri+8/FS1HIrIUKK/sRrFp8c1dThUOfNeCWbLmBP1P5VsKdvmkd25JaH+OKYwEYiAYg9YAA==} + engines: {npm: '>= 7.0.0'} + peerDependencies: + '@swc/core': '*' + + '@swc/types@0.1.25': + resolution: {integrity: sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==} + '@tailwindcss/cli@4.1.11': resolution: {integrity: sha512-7RAFOrVaXCFz5ooEG36Kbh+sMJiI2j4+Ozp71smgjnLfBRu7DTfoq8DsTvzse2/6nDeo2M3vS/FGaxfDgr3rtQ==} hasBin: true @@ -5329,6 +5518,14 @@ packages: typescript: optional: true + '@typescript-eslint/eslint-plugin@8.31.1': + resolution: {integrity: sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/eslint-plugin@8.34.1': resolution: {integrity: sha512-STXcN6ebF6li4PxwNeFnqF8/2BNDvBupf2OPx2yWNzr6mKNGF7q49VM00Pz5FaomJyqvbXpY6PhO+T9w139YEQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5355,6 +5552,13 @@ packages: typescript: optional: true + '@typescript-eslint/parser@8.31.1': + resolution: {integrity: sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/parser@8.34.1': resolution: {integrity: sha512-4O3idHxhyzjClSMJ0a29AcoK0+YwnEqzI6oz3vlRf3xw0zbzt15MzXwItOlnr5nIth6zlY2RENLsOPvhyrKAQA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5375,12 +5579,6 @@ packages: peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/project-service@8.39.1': - resolution: {integrity: sha512-8fZxek3ONTwBu9ptw5nCKqZOSkXshZB7uAxuFF0J/wTMkKydjXCzqqga7MlFMpHi9DoG4BadhmTkITBcg8Aybw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.41.0': resolution: {integrity: sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5391,6 +5589,10 @@ packages: resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.31.1': + resolution: {integrity: sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.34.1': resolution: {integrity: sha512-beu6o6QY4hJAgL1E8RaXNC071G4Kso2MGmJskCFQhRhg8VOH/FDbC8soP8NHN7e/Hdphwp8G8cE6OBzC8o41ZA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5427,6 +5629,13 @@ packages: typescript: optional: true + '@typescript-eslint/type-utils@8.31.1': + resolution: {integrity: sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/type-utils@8.34.1': resolution: {integrity: sha512-Tv7tCCr6e5m8hP4+xFugcrwTOucB8lshffJ6zf1mF1TbU67R+ntCc6DzLNKM+s/uzDyv8gLq7tufaAhIBYeV8g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5445,12 +5654,12 @@ packages: resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/types@8.34.1': - resolution: {integrity: sha512-rjLVbmE7HR18kDsjNIZQHxmv9RZwlgzavryL5Lnj2ujIRTeXlKtILHgRNmQ3j4daw7zd+mQgy+uyt6Zo6I0IGA==} + '@typescript-eslint/types@8.31.1': + resolution: {integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.39.1': - resolution: {integrity: sha512-7sPDKQQp+S11laqTrhHqeAbsCfMkwJMrV7oTDvtDds4mEofJYir414bYKUEb8YPUm9QL3U+8f6L6YExSoAGdQw==} + '@typescript-eslint/types@8.34.1': + resolution: {integrity: sha512-rjLVbmE7HR18kDsjNIZQHxmv9RZwlgzavryL5Lnj2ujIRTeXlKtILHgRNmQ3j4daw7zd+mQgy+uyt6Zo6I0IGA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/types@8.41.0': @@ -5466,17 +5675,17 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.34.1': - resolution: {integrity: sha512-rjCNqqYPuMUF5ODD+hWBNmOitjBWghkGKJg6hiCHzUvXRy6rK22Jd3rwbP2Xi+R7oYVvIKhokHVhH41BxPV5mA==} + '@typescript-eslint/typescript-estree@8.31.1': + resolution: {integrity: sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/typescript-estree@8.39.1': - resolution: {integrity: sha512-EKkpcPuIux48dddVDXyQBlKdeTPMmALqBUbEk38McWv0qVEZwOpVJBi7ugK5qVNgeuYjGNQxrrnoM/5+TI/BPw==} + '@typescript-eslint/typescript-estree@8.34.1': + resolution: {integrity: sha512-rjCNqqYPuMUF5ODD+hWBNmOitjBWghkGKJg6hiCHzUvXRy6rK22Jd3rwbP2Xi+R7oYVvIKhokHVhH41BxPV5mA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '>=4.8.4 <6.0.0' + typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/typescript-estree@8.41.0': resolution: {integrity: sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==} @@ -5490,6 +5699,13 @@ packages: peerDependencies: eslint: ^8.56.0 + '@typescript-eslint/utils@8.31.1': + resolution: {integrity: sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/utils@8.34.1': resolution: {integrity: sha512-mqOwUdZ3KjtGk7xJJnLbHxTuWVn3GO2WZZuM+Slhkun4+qthLdXx32C8xIXbO1kfCECb3jIs3eoxK3eryk7aoQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5508,12 +5724,12 @@ packages: resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/visitor-keys@8.34.1': - resolution: {integrity: sha512-xoh5rJ+tgsRKoXnkBPFRLZ7rjKM0AfVbC68UZ/ECXoDbfggb9RbEySN359acY1vS3qZ0jVTVWzbtfapwm5ztxw==} + '@typescript-eslint/visitor-keys@8.31.1': + resolution: {integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.39.1': - resolution: {integrity: sha512-W8FQi6kEh2e8zVhQ0eeRnxdvIoOkAp/CPAahcNio6nO9dsIwb9b34z90KOlheoyuVf6LSOEdjlkxSkapNEc+4A==} + '@typescript-eslint/visitor-keys@8.34.1': + resolution: {integrity: sha512-xoh5rJ+tgsRKoXnkBPFRLZ7rjKM0AfVbC68UZ/ECXoDbfggb9RbEySN359acY1vS3qZ0jVTVWzbtfapwm5ztxw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/visitor-keys@8.41.0': @@ -5844,6 +6060,10 @@ packages: resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} engines: {node: '>= 14'} + aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + aggregate-error@4.0.1: resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==} engines: {node: '>=12'} @@ -6172,6 +6392,35 @@ packages: bcp-47-match@2.0.3: resolution: {integrity: sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==} + better-auth@1.3.24: + resolution: {integrity: sha512-LyxIbnB2FExhjqQ/J1G8S8EAbmTBDFOz6CjqHNNu15Gux+c4fF0Si1YNLprROEb4EGNuGUfslurW0Q6nZ+Dobg==} + peerDependencies: + '@lynx-js/react': '*' + '@sveltejs/kit': '*' + next: '*' + react: '*' + react-dom: '*' + solid-js: '*' + svelte: '*' + vue: '*' + peerDependenciesMeta: + '@lynx-js/react': + optional: true + '@sveltejs/kit': + optional: true + next: + optional: true + react: + optional: true + react-dom: + optional: true + solid-js: + optional: true + svelte: + optional: true + vue: + optional: true + better-auth@1.3.4: resolution: {integrity: sha512-JbZYam6Cs3Eu5CSoMK120zSshfaKvrCftSo/+v7524H1RvhryQ7UtMbzagBcXj0Digjj8hZtVkkR4tTZD/wK2g==} peerDependencies: @@ -6198,6 +6447,9 @@ packages: better-call@1.0.13: resolution: {integrity: sha512-auqdP9lnNOli9tKpZIiv0nEIwmmyaD/RotM3Mucql+Ef88etoZi/t7Ph5LjlmZt/hiSahhNTt6YVnx6++rziXA==} + better-call@1.0.19: + resolution: {integrity: sha512-sI3GcA1SCVa3H+CDHl8W8qzhlrckwXOTKhqq3OOPXjgn5aTOMIqGY34zLY/pHA6tRRMjTUC3lz5Mi7EbDA24Kw==} + better-sqlite3@12.2.0: resolution: {integrity: sha512-eGbYq2CT+tos1fBwLQ/tkBt9J5M3JEHjku4hbvQUePCckkvVf14xWj+1m7dGoK81M/fOjFT7yM9UMeKT/+vFLQ==} engines: {node: 20.x || 22.x || 23.x || 24.x} @@ -6474,6 +6726,10 @@ packages: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} + clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + clean-stack@4.2.0: resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} engines: {node: '>=12'} @@ -6655,11 +6911,6 @@ packages: resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} - concurrently@9.2.0: - resolution: {integrity: sha512-IsB/fiXTupmagMW4MNp2lx2cdSN2FfZq78vF90LBB+zZHArbIQZjQtzXCiXnvTxCZSvXanTqFLWBjw2UkLx1SQ==} - engines: {node: '>=18'} - hasBin: true - concurrently@9.2.1: resolution: {integrity: sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==} engines: {node: '>=18'} @@ -7647,10 +7898,24 @@ packages: resolution: {integrity: sha512-9Ni+xgemM2IWLq6aXEpP2+V/V30GeA/46Ar629vcMqVPodFFWC9skHu/D1phvuqtS8bJCFnNf01/qcmqYEwNfg==} engines: {node: '>=12.0.0'} peerDependencies: - eslint: '>=7.28.0' - eslint-config-prettier: '*' - prettier: '>=2.0.0' + eslint: '>=7.28.0' + eslint-config-prettier: '*' + prettier: '>=2.0.0' + peerDependenciesMeta: + eslint-config-prettier: + optional: true + + eslint-plugin-prettier@5.5.4: + resolution: {integrity: sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' + eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0' + prettier: '>=3.0.0' peerDependenciesMeta: + '@types/eslint': + optional: true eslint-config-prettier: optional: true @@ -7683,6 +7948,15 @@ packages: peerDependencies: eslint: '>=8.23.1' + eslint-plugin-unused-imports@4.2.0: + resolution: {integrity: sha512-hLbJ2/wnjKq4kGA9AUaExVFIbNzyxYdVo49QZmKCnhk5pc9wcYRbfgLHvWJ8tnsdcseGhoUAddm9gn/lt+d74w==} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0 + eslint: ^9.0.0 || ^8.0.0 + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + eslint-rule-docs@1.1.235: resolution: {integrity: sha512-+TQ+x4JdTnDoFEXXb3fDvfGOwnyNV7duH8fXWTPD1ieaBmB8omj7Gw/pMBBu4uI2uJCCU8APDaQJzWuXnTsH4A==} @@ -8262,6 +8536,10 @@ packages: resolution: {integrity: sha512-7oKuKzAGKj0ag+eWZwcGw2fjiZ78tXnXQoBgY0aU7ZOxTu4bB7hSuQSDgtKy978EDH062P5FmD2EWiDpQS9K9Q==} engines: {node: '>=0.10.0'} + get-stdin@8.0.0: + resolution: {integrity: sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==} + engines: {node: '>=10'} + get-stdin@9.0.0: resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==} engines: {node: '>=12'} @@ -8314,6 +8592,11 @@ packages: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported + glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported + globals@13.24.0: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} @@ -8560,6 +8843,10 @@ packages: resolution: {integrity: sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==} engines: {node: '>=10 <11 || >=12 <13 || >=14'} + ignore-walk@5.0.1: + resolution: {integrity: sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -9147,6 +9434,10 @@ packages: resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-regex-util@30.0.1: + resolution: {integrity: sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + jest-resolve-dependencies@29.7.0: resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -9211,6 +9502,9 @@ packages: jose@5.6.3: resolution: {integrity: sha512-1Jh//hEEwMhNYPDDLwXHa2ePWgWiFNNUadVmguAAw2IJ6sj9mNxV5tGXJNqlMkJAybF6Lgw1mISDxTePP/187g==} + jose@6.1.0: + resolution: {integrity: sha512-TTQJyoEoKcC1lscpVDCSsVgYzUDg/0Bt3WE//WiTPK6uOCQC2KZS4MpugbMWt/zyjkopgZoXhZuCi00gLudfUA==} + joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} @@ -9293,6 +9587,9 @@ packages: engines: {node: '>=6'} hasBin: true + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + jsonfile@6.2.0: resolution: {integrity: sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==} @@ -10006,6 +10303,10 @@ packages: resolution: {integrity: sha512-k1oiVNN4hDK8NcNERSZLQiMfRzEGtfnvZvdBvey3SQbgn8Dcrk0h1I6vpxApjb10PFUflZrgJ2WEZyJQ+5v7YQ==} engines: {node: ^18.0.0 || >=20.0.0} + nanostores@1.0.1: + resolution: {integrity: sha512-kNZ9xnoJYKg/AfxjrVL4SS0fKX++4awQReGqWnwTRHxeHGZ1FJFVgTqr/eMrNQdp0Tz7M7tG/TDaX8QfHDwVCw==} + engines: {node: ^20.0.0 || >=22.0.0} + napi-build-utils@2.0.0: resolution: {integrity: sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==} @@ -10253,10 +10554,18 @@ packages: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} engines: {node: '>=0.10.0'} + npm-bundled@2.0.1: + resolution: {integrity: sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + npm-install-checks@6.3.0: resolution: {integrity: sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + npm-normalize-package-bin@2.0.0: + resolution: {integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + npm-normalize-package-bin@3.0.1: resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -10269,6 +10578,11 @@ packages: resolution: {integrity: sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + npm-packlist@5.1.3: + resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + hasBin: true + npm-pick-manifest@8.0.2: resolution: {integrity: sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -10418,6 +10732,10 @@ packages: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} engines: {node: '>= 0.4'} + p-all@3.0.0: + resolution: {integrity: sha512-qUZbvbBFVXm6uJ7U/WDiO0fv6waBMbjlCm4E66oZdRR+egswICarIdHyVSZZHudH8T5SF8x/JG0q0duFzPnlBw==} + engines: {node: '>=10'} + p-defer@1.0.0: resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==} engines: {node: '>=4'} @@ -10458,6 +10776,10 @@ packages: resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-map@4.0.0: + resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} + engines: {node: '>=10'} + p-map@5.5.0: resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==} engines: {node: '>=12'} @@ -10971,6 +11293,11 @@ packages: pstree.remy@1.1.8: resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} + publint@0.2.12: + resolution: {integrity: sha512-YNeUtCVeM4j9nDiTT2OPczmlyzOkIXNtdDZnSuajAxS/nZ6j3t7Vs9SUB4euQNddiltIwu7Tdd3s+hr08fAsMw==} + engines: {node: '>=16'} + hasBin: true + pump@3.0.3: resolution: {integrity: sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==} @@ -11480,6 +11807,10 @@ packages: rxjs@7.8.2: resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} + sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + safe-array-concat@1.1.3: resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==} engines: {node: '>=0.4'} @@ -11838,6 +12169,9 @@ packages: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} + string-to-stream@3.0.1: + resolution: {integrity: sha512-Hl092MV3USJuUCC6mfl9sPzGloA3K5VwdIeJjYIkXY/8K+mUvaeEabWJgArp+xXrsWxCajeT2pc4axbVhIZJyg==} + string-width@3.1.0: resolution: {integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==} engines: {node: '>=6'} @@ -11982,6 +12316,10 @@ packages: resolution: {integrity: sha512-y/hkYGeXAj7wUMjxRbB21g/l6aAEituGXM9Rwl4o20+SX3e8YOSV6BxFXl+dL3Uk0mjSL3kCbNkwURm8/gEDig==} engines: {node: '>=14.18.0'} + superstruct@1.0.4: + resolution: {integrity: sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==} + engines: {node: '>=14.0.0'} + supertap@3.0.1: resolution: {integrity: sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -12033,6 +12371,10 @@ packages: peerDependencies: react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + synckit@0.11.11: + resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==} + engines: {node: ^14.18.0 || >=16.0.0} + system-architecture@0.1.0: resolution: {integrity: sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA==} engines: {node: '>=18'} @@ -12308,6 +12650,14 @@ packages: engines: {node: '>=16.20.2'} hasBin: true + tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz: + resolution: {tarball: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz} + version: 1.1.9 + engines: {node: '>=14'} + hasBin: true + peerDependencies: + typescript: '>=4.3.0' + tsconfck@3.1.6: resolution: {integrity: sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==} engines: {node: ^18 || >=20} @@ -12456,6 +12806,13 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} + typescript-eslint@8.31.1: + resolution: {integrity: sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + typescript-eslint@8.34.1: resolution: {integrity: sha512-XjS+b6Vg9oT1BaIUfkW3M3LvqZE++rbzAMEHuccCfO/YkP43ha6w3jTEMilQxMF92nVOYCcdjv1ZUhAa1D/0ow==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -13668,15 +14025,22 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} + '@better-auth/core@1.3.24': + dependencies: + better-call: 1.0.19 + zod: 4.1.5 + '@better-auth/utils@0.2.5': dependencies: - typescript: 5.9.2 + typescript: 5.8.3 uncrypto: 0.1.3 '@better-auth/utils@0.2.6': dependencies: uncrypto: 0.1.3 + '@better-auth/utils@0.3.0': {} + '@better-fetch/fetch@1.1.18': {} '@borewit/text-codec@0.1.1': {} @@ -14351,7 +14715,7 @@ snapshots: '@eslint/config-array@0.20.1': dependencies: '@eslint/object-schema': 2.1.6 - debug: 4.4.1 + debug: 4.4.1(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -14407,7 +14771,7 @@ snapshots: '@eslint/eslintrc@3.3.1': dependencies: ajv: 6.12.6 - debug: 4.4.1 + debug: 4.4.1(supports-color@5.5.0) espree: 10.4.0 globals: 14.0.0 ignore: 5.3.2 @@ -14927,7 +15291,42 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3))': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 22.17.1 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.8 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node + + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -14941,7 +15340,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)) + jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -14962,6 +15361,10 @@ snapshots: - supports-color - ts-node + '@jest/create-cache-key-function@30.2.0': + dependencies: + '@jest/types': 30.2.0 + '@jest/environment@29.7.0': dependencies: '@jest/fake-timers': 29.7.0 @@ -14998,6 +15401,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@jest/pattern@30.0.1': + dependencies: + '@types/node': 22.17.1 + jest-regex-util: 30.0.1 + '@jest/reporters@29.7.0': dependencies: '@bcoe/v8-coverage': 0.2.3 @@ -15031,6 +15439,10 @@ snapshots: dependencies: '@sinclair/typebox': 0.27.8 + '@jest/schemas@30.0.5': + dependencies: + '@sinclair/typebox': 0.34.38 + '@jest/source-map@29.6.3': dependencies: '@jridgewell/trace-mapping': 0.3.30 @@ -15080,6 +15492,16 @@ snapshots: '@types/yargs': 17.0.33 chalk: 4.1.2 + '@jest/types@30.2.0': + dependencies: + '@jest/pattern': 30.0.1 + '@jest/schemas': 30.0.5 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 22.17.1 + '@types/yargs': 17.0.33 + chalk: 4.1.2 + '@jridgewell/gen-mapping@0.3.13': dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -15416,8 +15838,12 @@ snapshots: '@noble/ciphers@0.6.0': {} + '@noble/ciphers@2.0.1': {} + '@noble/hashes@1.8.0': {} + '@noble/hashes@2.0.1': {} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -15615,6 +16041,8 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true + '@pkgr/core@0.2.9': {} + '@poppinss/colors@4.1.5': dependencies: kleur: 4.1.5 @@ -15671,22 +16099,22 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-accordion@1.2.11(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-accordion@1.2.11(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-collapsible': 1.1.11(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-direction': 1.1.1(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.10)(react@19.1.1) + '@radix-ui/react-collapsible': 1.1.11(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-direction': 1.1.1(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.12)(react@19.1.1) react: 19.1.1 react-dom: 19.1.1(react@19.1.1) optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) + '@types/react': 19.1.12 + '@types/react-dom': 19.1.9(@types/react@19.1.12) '@radix-ui/react-arrow@1.1.7(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -15715,15 +16143,6 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) - '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -15778,21 +16197,21 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-collapsible@1.1.11(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-collapsible@1.1.11(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-id': 1.1.1(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.12)(react@19.1.1) react: 19.1.1 react-dom: 19.1.1(react@19.1.1) optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) + '@types/react': 19.1.12 + '@types/react-dom': 19.1.9(@types/react@19.1.12) '@radix-ui/react-collapsible@1.1.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -15850,18 +16269,6 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-collection@1.1.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.1.10)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) - '@radix-ui/react-collection@1.1.7(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) @@ -15988,28 +16395,6 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-dialog@1.1.14(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.10(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.10)(react@19.1.1) - aria-hidden: 1.2.6 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - react-remove-scroll: 2.7.1(@types/react@19.1.10)(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) - '@radix-ui/react-dialog@1.1.15(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.3 @@ -16111,19 +16496,6 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-dismissable-layer@1.1.10(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.1.10)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) - '@radix-ui/react-dismissable-layer@1.1.11(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.3 @@ -16241,17 +16613,6 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.10)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) - '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) @@ -16412,29 +16773,6 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-popover@1.1.14(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.10(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-popper': 1.2.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.10)(react@19.1.1) - aria-hidden: 1.2.6 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - react-remove-scroll: 2.7.1(@types/react@19.1.10)(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) - '@radix-ui/react-popover@1.1.15(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.3 @@ -16517,24 +16855,6 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-popper@1.2.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@floating-ui/react-dom': 2.1.5(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-arrow': 1.1.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-use-rect': 1.1.1(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/rect': 1.1.1 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) - '@radix-ui/react-popper@1.2.8(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@floating-ui/react-dom': 2.1.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -16619,16 +16939,6 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-portal@1.1.9(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) - '@radix-ui/react-portal@1.1.9(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -16669,15 +16979,15 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-presence@1.1.4(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-presence@1.1.4(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.12)(react@19.1.1) react: 19.1.1 react-dom: 19.1.1(react@19.1.1) optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) + '@types/react': 19.1.12 + '@types/react-dom': 19.1.9(@types/react@19.1.12) '@radix-ui/react-presence@1.1.5(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -16736,15 +17046,6 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/react-slot': 1.2.3(@types/react@19.1.10)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) - '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-slot': 1.2.3(@types/react@19.1.12)(react@19.1.1) @@ -16896,20 +17197,20 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-switch@1.2.5(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-switch@1.2.5(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.10)(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.12)(react@19.1.1) react: 19.1.1 react-dom: 19.1.1(react@19.1.1) optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) + '@types/react': 19.1.12 + '@types/react-dom': 19.1.9(@types/react@19.1.12) '@radix-ui/react-tabs@1.1.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -17128,6 +17429,12 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 + '@radix-ui/react-use-previous@1.1.1(@types/react@19.1.12)(react@19.1.1)': + dependencies: + react: 19.1.1 + optionalDependencies: + '@types/react': 19.1.12 + '@radix-ui/react-use-rect@1.1.1(@types/react@18.3.23)(react@18.3.1)': dependencies: '@radix-ui/rect': 1.1.1 @@ -17295,9 +17602,9 @@ snapshots: - supports-color - typescript - '@remix-run/node@2.17.0(typescript@5.9.2)': + '@remix-run/node@2.17.0(typescript@5.8.3)': dependencies: - '@remix-run/server-runtime': 2.17.0(typescript@5.9.2) + '@remix-run/server-runtime': 2.17.0(typescript@5.8.3) '@remix-run/web-fetch': 4.4.2 '@web3-storage/multipart-parser': 1.0.0 cookie-signature: 1.2.2 @@ -17305,11 +17612,11 @@ snapshots: stream-slice: 0.1.2 undici: 6.21.3 optionalDependencies: - typescript: 5.9.2 + typescript: 5.8.3 '@remix-run/router@1.23.0': {} - '@remix-run/server-runtime@2.17.0(typescript@5.9.2)': + '@remix-run/server-runtime@2.17.0(typescript@5.8.3)': dependencies: '@remix-run/router': 1.23.0 '@types/cookie': 0.6.0 @@ -17319,7 +17626,7 @@ snapshots: source-map: 0.7.6 turbo-stream: 2.4.1 optionalDependencies: - typescript: 5.9.2 + typescript: 5.8.3 '@remix-run/web-blob@3.1.0': dependencies: @@ -17649,8 +17956,7 @@ snapshots: '@sinclair/typebox@0.27.8': {} - '@sinclair/typebox@0.34.38': - optional: true + '@sinclair/typebox@0.34.38': {} '@sindresorhus/is@4.6.0': {} @@ -17723,12 +18029,69 @@ snapshots: - bufferutil - utf-8-validate + '@swc/core-darwin-arm64@1.13.5': + optional: true + + '@swc/core-darwin-x64@1.13.5': + optional: true + + '@swc/core-linux-arm-gnueabihf@1.13.5': + optional: true + + '@swc/core-linux-arm64-gnu@1.13.5': + optional: true + + '@swc/core-linux-arm64-musl@1.13.5': + optional: true + + '@swc/core-linux-x64-gnu@1.13.5': + optional: true + + '@swc/core-linux-x64-musl@1.13.5': + optional: true + + '@swc/core-win32-arm64-msvc@1.13.5': + optional: true + + '@swc/core-win32-ia32-msvc@1.13.5': + optional: true + + '@swc/core-win32-x64-msvc@1.13.5': + optional: true + + '@swc/core@1.13.5': + dependencies: + '@swc/counter': 0.1.3 + '@swc/types': 0.1.25 + optionalDependencies: + '@swc/core-darwin-arm64': 1.13.5 + '@swc/core-darwin-x64': 1.13.5 + '@swc/core-linux-arm-gnueabihf': 1.13.5 + '@swc/core-linux-arm64-gnu': 1.13.5 + '@swc/core-linux-arm64-musl': 1.13.5 + '@swc/core-linux-x64-gnu': 1.13.5 + '@swc/core-linux-x64-musl': 1.13.5 + '@swc/core-win32-arm64-msvc': 1.13.5 + '@swc/core-win32-ia32-msvc': 1.13.5 + '@swc/core-win32-x64-msvc': 1.13.5 + '@swc/counter@0.1.3': {} '@swc/helpers@0.5.15': dependencies: tslib: 2.8.1 + '@swc/jest@0.2.39(@swc/core@1.13.5)': + dependencies: + '@jest/create-cache-key-function': 30.2.0 + '@swc/core': 1.13.5 + '@swc/counter': 0.1.3 + jsonc-parser: 3.3.1 + + '@swc/types@0.1.25': + dependencies: + '@swc/counter': 0.1.3 + '@tailwindcss/cli@4.1.11': dependencies: '@parcel/watcher': 2.5.1 @@ -17975,9 +18338,9 @@ snapshots: tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - '@tanstack/react-start-plugin@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1)': + '@tanstack/react-start-plugin@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5))': dependencies: - '@tanstack/start-plugin-core': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1) + '@tanstack/start-plugin-core': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)) '@vitejs/plugin-react': 5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) pathe: 2.0.3 vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) @@ -18014,9 +18377,9 @@ snapshots: - webpack - xml2js - '@tanstack/react-start-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(esbuild@0.25.9))': + '@tanstack/react-start-plugin@1.131.8(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: - '@tanstack/start-plugin-core': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(esbuild@0.25.9)) + '@tanstack/start-plugin-core': 1.131.8(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) '@vitejs/plugin-react': 5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) pathe: 2.0.3 vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) @@ -18077,10 +18440,10 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - '@tanstack/react-start@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1)': + '@tanstack/react-start@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5))': dependencies: '@tanstack/react-start-client': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/react-start-plugin': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1) + '@tanstack/react-start-plugin': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)) '@tanstack/react-start-server': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tanstack/start-server-functions-client': 1.131.7(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) '@tanstack/start-server-functions-server': 1.131.2(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) @@ -18120,10 +18483,10 @@ snapshots: - webpack - xml2js - '@tanstack/react-start@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(esbuild@0.25.9))': + '@tanstack/react-start@1.131.8(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: '@tanstack/react-start-client': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@tanstack/react-start-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(esbuild@0.25.9)) + '@tanstack/react-start-plugin': 1.131.8(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) '@tanstack/react-start-server': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@tanstack/start-server-functions-client': 1.131.7(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) '@tanstack/start-server-functions-server': 1.131.2(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) @@ -18210,7 +18573,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@tanstack/router-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1)': + '@tanstack/router-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5))': dependencies: '@babel/core': 7.28.3 '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) @@ -18229,11 +18592,11 @@ snapshots: optionalDependencies: '@tanstack/react-router': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - webpack: 5.101.1 + webpack: 5.101.1(@swc/core@1.13.5) transitivePeerDependencies: - supports-color - '@tanstack/router-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(esbuild@0.25.9))': + '@tanstack/router-plugin@1.131.8(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: '@babel/core': 7.28.3 '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) @@ -18250,9 +18613,8 @@ snapshots: unplugin: 2.3.5 zod: 3.25.76 optionalDependencies: - '@tanstack/react-router': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - webpack: 5.101.1(esbuild@0.25.9) + webpack: 5.101.1(@swc/core@1.13.5)(esbuild@0.25.9) transitivePeerDependencies: - supports-color @@ -18291,14 +18653,14 @@ snapshots: tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - '@tanstack/start-plugin-core@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1)': + '@tanstack/start-plugin-core@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5))': dependencies: '@babel/code-frame': 7.26.2 '@babel/core': 7.28.3 '@babel/types': 7.28.2 '@tanstack/router-core': 1.131.7 '@tanstack/router-generator': 1.131.7 - '@tanstack/router-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1) + '@tanstack/router-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)) '@tanstack/router-utils': 1.131.2 '@tanstack/server-functions-plugin': 1.131.2(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) '@tanstack/start-server-core': 1.131.7 @@ -18346,14 +18708,14 @@ snapshots: - webpack - xml2js - '@tanstack/start-plugin-core@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(esbuild@0.25.9))': + '@tanstack/start-plugin-core@1.131.8(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: '@babel/code-frame': 7.26.2 '@babel/core': 7.28.3 '@babel/types': 7.28.2 '@tanstack/router-core': 1.131.7 '@tanstack/router-generator': 1.131.7 - '@tanstack/router-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(esbuild@0.25.9)) + '@tanstack/router-plugin': 1.131.8(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) '@tanstack/router-utils': 1.131.2 '@tanstack/server-functions-plugin': 1.131.2(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) '@tanstack/start-server-core': 1.131.7 @@ -18541,7 +18903,7 @@ snapshots: '@types/cookies@0.7.7': dependencies: '@types/connect': 3.4.38 - '@types/express': 4.17.23 + '@types/express': 5.0.3 '@types/keygrip': 1.0.6 '@types/node': 22.17.1 @@ -18767,11 +19129,6 @@ snapshots: dependencies: '@types/react': 19.1.10 - '@types/react-dom@19.1.9(@types/react@19.1.10)': - dependencies: - '@types/react': 19.1.10 - optional: true - '@types/react-dom@19.1.9(@types/react@19.1.12)': dependencies: '@types/react': 19.1.12 @@ -18931,6 +19288,23 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/type-utils': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 + eslint: 9.34.0(jiti@2.5.1) + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/eslint-plugin@8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4))(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -19014,7 +19388,7 @@ snapshots: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.4.1 + debug: 4.4.1(supports-color@5.5.0) eslint: 9.29.0(jiti@2.5.1) optionalDependencies: typescript: 5.9.2 @@ -19047,6 +19421,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 + debug: 4.4.1(supports-color@5.5.0) + eslint: 9.34.0(jiti@2.5.1) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/parser@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 8.34.1 @@ -19086,7 +19472,7 @@ snapshots: '@typescript-eslint/project-service@8.34.1(typescript@5.5.4)': dependencies: '@typescript-eslint/tsconfig-utils': 8.39.1(typescript@5.5.4) - '@typescript-eslint/types': 8.39.1 + '@typescript-eslint/types': 8.41.0 debug: 4.4.1(supports-color@5.5.0) typescript: 5.5.4 transitivePeerDependencies: @@ -19095,21 +19481,12 @@ snapshots: '@typescript-eslint/project-service@8.34.1(typescript@5.7.3)': dependencies: '@typescript-eslint/tsconfig-utils': 8.39.1(typescript@5.7.3) - '@typescript-eslint/types': 8.39.1 + '@typescript-eslint/types': 8.41.0 debug: 4.4.1(supports-color@5.5.0) typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.39.1(typescript@5.9.2)': - dependencies: - '@typescript-eslint/tsconfig-utils': 8.39.1(typescript@5.9.2) - '@typescript-eslint/types': 8.39.1 - debug: 4.4.1(supports-color@5.5.0) - typescript: 5.9.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/project-service@8.41.0(typescript@5.8.3)': dependencies: '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.8.3) @@ -19124,6 +19501,11 @@ snapshots: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/scope-manager@8.31.1': + dependencies: + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 + '@typescript-eslint/scope-manager@8.34.1': dependencies: '@typescript-eslint/types': 8.34.1 @@ -19150,10 +19532,6 @@ snapshots: dependencies: typescript: 5.7.3 - '@typescript-eslint/tsconfig-utils@8.39.1(typescript@5.9.2)': - dependencies: - typescript: 5.9.2 - '@typescript-eslint/tsconfig-utils@8.41.0(typescript@5.8.3)': dependencies: typescript: 5.8.3 @@ -19186,7 +19564,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) '@typescript-eslint/utils': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) - debug: 4.4.1 + debug: 4.4.1(supports-color@5.5.0) eslint: 9.29.0(jiti@2.5.1) ts-api-utils: 1.4.3(typescript@5.9.2) optionalDependencies: @@ -19218,6 +19596,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/type-utils@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': + dependencies: + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + debug: 4.4.1(supports-color@5.5.0) + eslint: 9.34.0(jiti@2.5.1) + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/type-utils@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.5.4) @@ -19254,9 +19643,9 @@ snapshots: '@typescript-eslint/types@7.18.0': {} - '@typescript-eslint/types@8.34.1': {} + '@typescript-eslint/types@8.31.1': {} - '@typescript-eslint/types@8.39.1': {} + '@typescript-eslint/types@8.34.1': {} '@typescript-eslint/types@8.41.0': {} @@ -19279,7 +19668,7 @@ snapshots: dependencies: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.4.1 + debug: 4.4.1(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.5 @@ -19290,6 +19679,20 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.31.1(typescript@5.8.3)': + dependencies: + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 + debug: 4.4.1(supports-color@5.5.0) + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.2 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/typescript-estree@8.34.1(typescript@5.5.4)': dependencies: '@typescript-eslint/project-service': 8.34.1(typescript@5.5.4) @@ -19322,22 +19725,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.39.1(typescript@5.9.2)': - dependencies: - '@typescript-eslint/project-service': 8.39.1(typescript@5.9.2) - '@typescript-eslint/tsconfig-utils': 8.39.1(typescript@5.9.2) - '@typescript-eslint/types': 8.39.1 - '@typescript-eslint/visitor-keys': 8.39.1 - debug: 4.4.1(supports-color@5.5.0) - fast-glob: 3.3.3 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.7.2 - ts-api-utils: 2.1.0(typescript@5.9.2) - typescript: 5.9.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.41.0(typescript@5.8.3)': dependencies: '@typescript-eslint/project-service': 8.41.0(typescript@5.8.3) @@ -19409,6 +19796,17 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': + dependencies: + '@eslint-community/eslint-utils': 4.7.0(eslint@9.34.0(jiti@2.5.1)) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + eslint: 9.34.0(jiti@2.5.1) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4)': dependencies: '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.5.1)) @@ -19447,14 +19845,14 @@ snapshots: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.34.1': + '@typescript-eslint/visitor-keys@8.31.1': dependencies: - '@typescript-eslint/types': 8.34.1 + '@typescript-eslint/types': 8.31.1 eslint-visitor-keys: 4.2.1 - '@typescript-eslint/visitor-keys@8.39.1': + '@typescript-eslint/visitor-keys@8.34.1': dependencies: - '@typescript-eslint/types': 8.39.1 + '@typescript-eslint/types': 8.34.1 eslint-visitor-keys: 4.2.1 '@typescript-eslint/visitor-keys@8.41.0': @@ -19875,6 +20273,11 @@ snapshots: agent-base@7.1.4: {} + aggregate-error@3.1.0: + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + aggregate-error@4.0.1: dependencies: clean-stack: 4.2.0 @@ -20108,7 +20511,7 @@ snapshots: postcss: 8.5.6 postcss-value-parser: 4.2.0 - autumn-js@0.0.111(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(better-auth@1.3.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@4.0.17))(better-call@1.0.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + autumn-js@0.0.111(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(better-auth@1.3.24(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(better-call@1.0.19)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@radix-ui/react-accordion': 1.2.11(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-popover': 1.1.15(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -20122,8 +20525,8 @@ snapshots: swr: 2.3.6(react@18.3.1) zod: 3.25.76 optionalDependencies: - better-auth: 1.3.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@4.0.17) - better-call: 1.0.13 + better-auth: 1.3.24(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + better-call: 1.0.19 react: 18.3.1 transitivePeerDependencies: - '@types/react' @@ -20134,14 +20537,14 @@ snapshots: - react-dom - utf-8-validate - autumn-js@0.0.115(better-auth@1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.0.17))(better-call@1.0.13)(react@19.1.1): + autumn-js@0.0.115(better-auth@1.3.24(next@15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-call@1.0.19)(react@19.1.1): dependencies: rou3: 0.6.3 swr: 2.3.6(react@19.1.1) zod: 3.25.76 optionalDependencies: - better-auth: 1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.0.17) - better-call: 1.0.13 + better-auth: 1.3.24(next@15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + better-call: 1.0.19 react: 19.1.1 ava@5.3.1: @@ -20294,25 +20697,48 @@ snapshots: bcp-47-match@2.0.3: {} - better-auth@1.3.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + better-auth@1.3.24(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@better-auth/utils': 0.2.5 + '@better-auth/core': 1.3.24 + '@better-auth/utils': 0.3.0 '@better-fetch/fetch': 1.1.18 - '@noble/ciphers': 0.6.0 - '@noble/hashes': 1.8.0 + '@noble/ciphers': 2.0.1 + '@noble/hashes': 2.0.1 '@simplewebauthn/browser': 13.1.2 '@simplewebauthn/server': 13.1.2 - better-call: 1.0.13 + better-call: 1.0.19 defu: 6.1.4 - jose: 5.10.0 + jose: 6.1.0 kysely: 0.28.5 - nanostores: 0.11.4 + nanostores: 1.0.1 zod: 4.1.5 optionalDependencies: + next: 15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) + optional: true - better-auth@1.3.4(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + better-auth@1.3.24(next@15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + dependencies: + '@better-auth/core': 1.3.24 + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.18 + '@noble/ciphers': 2.0.1 + '@noble/hashes': 2.0.1 + '@simplewebauthn/browser': 13.1.2 + '@simplewebauthn/server': 13.1.2 + better-call: 1.0.19 + defu: 6.1.4 + jose: 6.1.0 + kysely: 0.28.5 + nanostores: 1.0.1 + zod: 4.1.5 + optionalDependencies: + next: 15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + react: 19.1.1 + react-dom: 19.1.1(react@19.1.1) + + better-auth@1.3.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@better-auth/utils': 0.2.5 '@better-fetch/fetch': 1.1.18 @@ -20320,17 +20746,17 @@ snapshots: '@noble/hashes': 1.8.0 '@simplewebauthn/browser': 13.1.2 '@simplewebauthn/server': 13.1.2 - better-call: 1.0.13 + better-call: 1.0.19 defu: 6.1.4 jose: 5.10.0 kysely: 0.28.5 nanostores: 0.11.4 zod: 4.1.5 optionalDependencies: - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) - better-auth@1.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + better-auth@1.3.4(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: '@better-auth/utils': 0.2.5 '@better-fetch/fetch': 1.1.18 @@ -20338,34 +20764,33 @@ snapshots: '@noble/hashes': 1.8.0 '@simplewebauthn/browser': 13.1.2 '@simplewebauthn/server': 13.1.2 - better-call: 1.0.13 + better-call: 1.0.19 defu: 6.1.4 jose: 5.10.0 kysely: 0.28.5 nanostores: 0.11.4 zod: 4.1.5 optionalDependencies: - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) - better-auth@1.3.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@4.0.17): + better-auth@1.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: - '@better-auth/utils': 0.2.6 + '@better-auth/utils': 0.2.5 '@better-fetch/fetch': 1.1.18 '@noble/ciphers': 0.6.0 '@noble/hashes': 1.8.0 '@simplewebauthn/browser': 13.1.2 '@simplewebauthn/server': 13.1.2 - better-call: 1.0.13 + better-call: 1.0.19 defu: 6.1.4 jose: 5.10.0 kysely: 0.28.5 nanostores: 0.11.4 - zod: 4.0.17 + zod: 4.1.5 optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - optional: true + react: 19.1.1 + react-dom: 19.1.1(react@19.1.1) better-auth@1.3.7(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(zod@3.25.76): dependencies: @@ -20375,7 +20800,7 @@ snapshots: '@noble/hashes': 1.8.0 '@simplewebauthn/browser': 13.1.2 '@simplewebauthn/server': 13.1.2 - better-call: 1.0.13 + better-call: 1.0.19 defu: 6.1.4 jose: 5.10.0 kysely: 0.28.5 @@ -20393,7 +20818,7 @@ snapshots: '@noble/hashes': 1.8.0 '@simplewebauthn/browser': 13.1.2 '@simplewebauthn/server': 13.1.2 - better-call: 1.0.13 + better-call: 1.0.19 defu: 6.1.4 jose: 5.10.0 kysely: 0.28.5 @@ -20410,6 +20835,14 @@ snapshots: set-cookie-parser: 2.7.1 uncrypto: 0.1.3 + better-call@1.0.19: + dependencies: + '@better-auth/utils': 0.3.0 + '@better-fetch/fetch': 1.1.18 + rou3: 0.5.1 + set-cookie-parser: 2.7.1 + uncrypto: 0.1.3 + better-sqlite3@12.2.0: dependencies: bindings: 1.5.0 @@ -20743,6 +21176,8 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 + clean-stack@2.2.0: {} + clean-stack@4.2.0: dependencies: escape-string-regexp: 5.0.0 @@ -20928,16 +21363,6 @@ snapshots: semver: 7.7.2 well-known-symbols: 2.0.0 - concurrently@9.2.0: - dependencies: - chalk: 4.1.2 - lodash: 4.17.21 - rxjs: 7.8.2 - shell-quote: 1.8.3 - supports-color: 8.1.1 - tree-kill: 1.2.2 - yargs: 17.7.2 - concurrently@9.2.1: dependencies: chalk: 4.1.2 @@ -21076,13 +21501,28 @@ snapshots: crc-32: 1.2.2 readable-stream: 4.7.0 - create-jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)): + create-jest@29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + create-jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)) + jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -21222,10 +21662,6 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.4.1: - dependencies: - ms: 2.1.3 - debug@4.4.1(supports-color@5.5.0): dependencies: ms: 2.1.3 @@ -21354,16 +21790,16 @@ snapshots: detective-stylus@5.0.1: {} - detective-typescript@14.0.0(typescript@5.9.2): + detective-typescript@14.0.0(typescript@5.8.3): dependencies: - '@typescript-eslint/typescript-estree': 8.39.1(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.8.3) ast-module-types: 6.0.1 node-source-walk: 7.0.1 - typescript: 5.9.2 + typescript: 5.8.3 transitivePeerDependencies: - supports-color - detective-vue2@2.2.0(typescript@5.9.2): + detective-vue2@2.2.0(typescript@5.8.3): dependencies: '@dependents/detective-less': 5.0.1 '@vue/compiler-sfc': 3.5.18 @@ -21371,8 +21807,8 @@ snapshots: detective-sass: 6.0.1 detective-scss: 5.0.1 detective-stylus: 5.0.1 - detective-typescript: 14.0.0(typescript@5.9.2) - typescript: 5.9.2 + detective-typescript: 14.0.0(typescript@5.8.3) + typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -21485,17 +21921,6 @@ snapshots: '@sinclair/typebox': 0.34.38 openapi-types: 12.1.3 - elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2): - dependencies: - cookie: 1.0.2 - exact-mirror: 0.1.5(@sinclair/typebox@0.34.38) - fast-decode-uri-component: 1.0.1 - file-type: 21.0.0 - typescript: 5.9.2 - optionalDependencies: - '@sinclair/typebox': 0.34.38 - openapi-types: 12.1.3 - emittery@0.13.1: {} emittery@1.2.0: {} @@ -21683,11 +22108,11 @@ snapshots: dependencies: esbuild: 0.25.9 - esbuild-postcss@0.0.4(esbuild@0.25.9)(postcss@8.5.6)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2)): + esbuild-postcss@0.0.4(esbuild@0.25.9)(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): dependencies: esbuild: 0.25.9 postcss: 8.5.6 - postcss-load-config: 3.1.4(postcss@8.5.6)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2)) + postcss-load-config: 3.1.4(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) transitivePeerDependencies: - ts-node @@ -21848,8 +22273,8 @@ snapshots: '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.29.0(jiti@2.5.1)) @@ -21868,8 +22293,8 @@ snapshots: '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.34.0(jiti@2.5.1)) @@ -21888,8 +22313,8 @@ snapshots: '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.29.0(jiti@2.5.1)) @@ -21908,8 +22333,8 @@ snapshots: '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.29.0(jiti@2.5.1)) @@ -21928,8 +22353,8 @@ snapshots: '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.34.0(jiti@2.5.1)) @@ -21944,6 +22369,11 @@ snapshots: dependencies: eslint: 8.57.1 + eslint-config-prettier@8.10.2(eslint@9.34.0(jiti@2.5.1)): + dependencies: + eslint: 9.34.0(jiti@2.5.1) + optional: true + eslint-config-xo-react@0.27.0(eslint-plugin-react-hooks@4.6.2(eslint@8.57.1))(eslint-plugin-react@7.37.5(eslint@8.57.1))(eslint@8.57.1): dependencies: eslint: 8.57.1 @@ -21974,25 +22404,25 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@5.5.0) - eslint: 8.57.1 + eslint: 9.29.0(jiti@2.5.1) get-tsconfig: 4.10.1 is-bun-module: 2.0.0 stable-hash: 0.0.5 tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 - debug: 4.4.1 + debug: 4.4.1(supports-color@5.5.0) eslint: 9.29.0(jiti@2.5.1) get-tsconfig: 4.10.1 is-bun-module: 2.0.0 @@ -22000,11 +22430,26 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + transitivePeerDependencies: + - supports-color + + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): + dependencies: + '@nolyfill/is-core-module': 1.0.39 + debug: 4.4.1(supports-color@5.5.0) + eslint: 9.34.0(jiti@2.5.1) + get-tsconfig: 4.10.1 + is-bun-module: 2.0.0 + stable-hash: 0.0.5 + tinyglobby: 0.2.14 + unrs-resolver: 1.11.1 + optionalDependencies: + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@5.5.0) @@ -22015,11 +22460,26 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) + transitivePeerDependencies: + - supports-color + + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1): + dependencies: + '@nolyfill/is-core-module': 1.0.39 + debug: 4.4.1(supports-color@5.5.0) + eslint: 8.57.1 + get-tsconfig: 4.10.1 + is-bun-module: 2.0.0 + stable-hash: 0.0.5 + tinyglobby: 0.2.14 + unrs-resolver: 1.11.1 + optionalDependencies: + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) transitivePeerDependencies: - supports-color - eslint-import-resolver-webpack@0.13.10(eslint-plugin-import@2.32.0(eslint@8.57.1))(webpack@5.101.1(esbuild@0.25.9)): + eslint-import-resolver-webpack@0.13.10(eslint-plugin-import@2.32.0(eslint@8.57.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)): dependencies: debug: 3.2.7 enhanced-resolve: 0.9.1 @@ -22032,7 +22492,7 @@ snapshots: lodash: 4.17.21 resolve: 2.0.0-next.5 semver: 5.7.2 - webpack: 5.101.1(esbuild@0.25.9) + webpack: 5.101.1(@swc/core@1.13.5)(esbuild@0.25.9) transitivePeerDependencies: - supports-color @@ -22047,57 +22507,57 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.10(eslint-plugin-import@2.32.0(eslint@8.57.1))(webpack@5.101.1(esbuild@0.25.9)))(eslint@8.57.1): + eslint-module-utils@2.12.1(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.10)(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-webpack: 0.13.10(eslint-plugin-import@2.32.0(eslint@8.57.1))(webpack@5.101.1(esbuild@0.25.9)) + eslint-import-resolver-webpack: 0.13.10(eslint-plugin-import@2.32.0(eslint@8.57.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) transitivePeerDependencies: - supports-color @@ -22154,7 +22614,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22165,7 +22625,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22183,7 +22643,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22194,7 +22654,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22212,7 +22672,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22223,7 +22683,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22241,7 +22701,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22252,7 +22712,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22281,7 +22741,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.10(eslint-plugin-import@2.32.0(eslint@8.57.1))(webpack@5.101.1(esbuild@0.25.9)))(eslint@8.57.1) + eslint-module-utils: 2.12.1(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.10)(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22362,6 +22822,16 @@ snapshots: optionalDependencies: eslint-config-prettier: 8.10.2(eslint@8.57.1) + eslint-plugin-prettier@5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@8.10.2(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1))(prettier@3.6.2): + dependencies: + eslint: 9.34.0(jiti@2.5.1) + prettier: 3.6.2 + prettier-linter-helpers: 1.0.0 + synckit: 0.11.11 + optionalDependencies: + '@types/eslint': 9.6.1 + eslint-config-prettier: 8.10.2(eslint@9.34.0(jiti@2.5.1)) + eslint-plugin-react-hooks@4.6.2(eslint@8.57.1): dependencies: eslint: 8.57.1 @@ -22466,6 +22936,12 @@ snapshots: semver: 7.7.2 strip-indent: 3.0.0 + eslint-plugin-unused-imports@4.2.0(@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)): + dependencies: + eslint: 9.34.0(jiti@2.5.1) + optionalDependencies: + '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + eslint-rule-docs@1.1.235: {} eslint-scope@5.1.1: @@ -22561,7 +23037,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.1 + debug: 4.4.1(supports-color@5.5.0) escape-string-regexp: 4.0.0 eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 @@ -23178,7 +23654,7 @@ snapshots: - acorn - supports-color - fumadocs-ui@15.6.10(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@20.19.10)(typescript@5.9.2))): + fumadocs-ui@15.6.10(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2))): dependencies: '@radix-ui/react-accordion': 1.2.11(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -23203,7 +23679,7 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 next: 15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - tailwindcss: 3.4.17(ts-node@10.9.2(@types/node@20.19.10)(typescript@5.9.2)) + tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2)) transitivePeerDependencies: - '@mixedbread/sdk' - '@oramacloud/client' @@ -23266,6 +23742,8 @@ snapshots: get-set-props@0.1.0: {} + get-stdin@8.0.0: {} + get-stdin@9.0.0: {} get-stream@5.2.0: @@ -23327,6 +23805,14 @@ snapshots: once: 1.4.0 path-is-absolute: 1.0.1 + glob@8.1.0: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + globals@13.24.0: dependencies: type-fest: 0.20.2 @@ -23672,6 +24158,10 @@ snapshots: ignore-by-default@2.1.0: {} + ignore-walk@5.0.1: + dependencies: + minimatch: 5.1.6 + ignore@5.3.2: {} ignore@7.0.5: {} @@ -24186,16 +24676,35 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)): + jest-cli@29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + chalk: 4.1.2 + create-jest: 29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) + exit: 0.1.2 + import-local: 3.2.0 + jest-config: 29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + jest-cli@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)) + create-jest: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)) + jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -24205,7 +24714,69 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)): + jest-config@29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)): + dependencies: + '@babel/core': 7.28.3 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.28.3) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 20.19.11 + ts-node: 10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-config@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)): + dependencies: + '@babel/core': 7.28.3 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.28.3) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 22.17.1 + ts-node: 10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-config@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): dependencies: '@babel/core': 7.28.3 '@jest/test-sequencer': 29.7.0 @@ -24231,7 +24802,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 22.17.1 - ts-node: 10.9.2(@types/node@22.17.1)(typescript@5.8.3) + ts-node: 10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -24318,6 +24889,8 @@ snapshots: jest-regex-util@29.6.3: {} + jest-regex-util@30.0.1: {} + jest-resolve-dependencies@29.7.0: dependencies: jest-regex-util: 29.6.3 @@ -24457,12 +25030,24 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)): + jest@29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) + '@jest/types': 29.6.3 + import-local: 3.2.0 + jest-cli: 29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)) + jest-cli: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -24477,6 +25062,8 @@ snapshots: jose@5.6.3: {} + jose@6.1.0: {} + joycon@3.1.1: {} js-cookie@3.0.1: {} @@ -24530,6 +25117,8 @@ snapshots: json5@2.2.3: {} + jsonc-parser@3.3.1: {} + jsonfile@6.2.0: dependencies: universalify: 2.0.1 @@ -25487,6 +26076,8 @@ snapshots: nanostores@0.11.4: {} + nanostores@1.0.1: {} + napi-build-utils@2.0.0: {} napi-postinstall@0.3.3: {} @@ -25610,7 +26201,7 @@ snapshots: - '@babel/core' - babel-plugin-macros - next@15.3.4(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: '@next/env': 15.3.4 '@swc/counter': 0.1.3 @@ -25635,26 +26226,24 @@ snapshots: - '@babel/core' - babel-plugin-macros - next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + next@15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: - '@next/env': 15.3.4 - '@swc/counter': 0.1.3 + '@next/env': 15.4.1 '@swc/helpers': 0.5.15 - busboy: 1.6.0 - caniuse-lite: 1.0.30001734 + caniuse-lite: 1.0.30001736 postcss: 8.4.31 react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - styled-jsx: 5.1.6(react@19.1.1) + styled-jsx: 5.1.6(@babel/core@7.28.3)(react@19.1.1) optionalDependencies: - '@next/swc-darwin-arm64': 15.3.4 - '@next/swc-darwin-x64': 15.3.4 - '@next/swc-linux-arm64-gnu': 15.3.4 - '@next/swc-linux-arm64-musl': 15.3.4 - '@next/swc-linux-x64-gnu': 15.3.4 - '@next/swc-linux-x64-musl': 15.3.4 - '@next/swc-win32-arm64-msvc': 15.3.4 - '@next/swc-win32-x64-msvc': 15.3.4 + '@next/swc-darwin-arm64': 15.4.1 + '@next/swc-darwin-x64': 15.4.1 + '@next/swc-linux-arm64-gnu': 15.4.1 + '@next/swc-linux-arm64-musl': 15.4.1 + '@next/swc-linux-x64-gnu': 15.4.1 + '@next/swc-linux-x64-musl': 15.4.1 + '@next/swc-win32-arm64-msvc': 15.4.1 + '@next/swc-win32-x64-msvc': 15.4.1 sharp: 0.34.3 transitivePeerDependencies: - '@babel/core' @@ -25894,10 +26483,16 @@ snapshots: normalize-range@0.1.2: {} + npm-bundled@2.0.1: + dependencies: + npm-normalize-package-bin: 2.0.0 + npm-install-checks@6.3.0: dependencies: semver: 7.7.2 + npm-normalize-package-bin@2.0.0: {} + npm-normalize-package-bin@3.0.1: {} npm-normalize-package-bin@4.0.0: {} @@ -25909,6 +26504,13 @@ snapshots: semver: 7.7.2 validate-npm-package-name: 5.0.1 + npm-packlist@5.1.3: + dependencies: + glob: 8.1.0 + ignore-walk: 5.0.1 + npm-bundled: 2.0.1 + npm-normalize-package-bin: 2.0.0 + npm-pick-manifest@8.0.2: dependencies: npm-install-checks: 6.3.0 @@ -26105,6 +26707,10 @@ snapshots: object-keys: 1.1.1 safe-push-apply: 1.0.0 + p-all@3.0.0: + dependencies: + p-map: 4.0.0 + p-defer@1.0.0: {} p-event@5.0.1: @@ -26143,6 +26749,10 @@ snapshots: dependencies: p-limit: 4.0.0 + p-map@4.0.0: + dependencies: + aggregate-error: 3.1.0 + p-map@5.5.0: dependencies: aggregate-error: 4.0.1 @@ -26407,37 +27017,29 @@ snapshots: camelcase-css: 2.0.1 postcss: 8.5.6 - postcss-load-config@3.1.4(postcss@8.5.6)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2)): + postcss-load-config@3.1.4(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): dependencies: lilconfig: 2.1.0 yaml: 1.10.2 optionalDependencies: postcss: 8.5.6 - ts-node: 10.9.2(@types/node@22.17.1)(typescript@5.9.2) - - postcss-load-config@4.0.2(postcss@8.5.6)(ts-node@10.9.2(@types/node@20.19.10)(typescript@5.9.2)): - dependencies: - lilconfig: 3.1.3 - yaml: 2.8.1 - optionalDependencies: - postcss: 8.5.6 - ts-node: 10.9.2(@types/node@20.19.10)(typescript@5.9.2) + ts-node: 10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3) - postcss-load-config@4.0.2(postcss@8.5.6)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)): + postcss-load-config@4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2)): dependencies: lilconfig: 3.1.3 yaml: 2.8.1 optionalDependencies: postcss: 8.5.6 - ts-node: 10.9.2(@types/node@22.17.1)(typescript@5.8.3) + ts-node: 10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2) - postcss-load-config@4.0.2(postcss@8.5.6)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2)): + postcss-load-config@4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): dependencies: lilconfig: 3.1.3 yaml: 2.8.1 optionalDependencies: postcss: 8.5.6 - ts-node: 10.9.2(@types/node@22.17.1)(typescript@5.9.2) + ts-node: 10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3) postcss-load-config@6.0.1(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(yaml@2.8.1): dependencies: @@ -26529,12 +27131,12 @@ snapshots: detective-sass: 6.0.1 detective-scss: 5.0.1 detective-stylus: 5.0.1 - detective-typescript: 14.0.0(typescript@5.9.2) - detective-vue2: 2.2.0(typescript@5.9.2) + detective-typescript: 14.0.0(typescript@5.8.3) + detective-vue2: 2.2.0(typescript@5.8.3) module-definition: 6.0.1 node-source-walk: 7.0.1 postcss: 8.5.6 - typescript: 5.9.2 + typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -26615,6 +27217,12 @@ snapshots: pstree.remy@1.1.8: {} + publint@0.2.12: + dependencies: + npm-packlist: 5.1.3 + picocolors: 1.1.1 + sade: 1.8.1 + pump@3.0.3: dependencies: end-of-stream: 1.4.5 @@ -27367,6 +27975,10 @@ snapshots: dependencies: tslib: 2.8.1 + sade@1.8.1: + dependencies: + mri: 1.2.0 + safe-array-concat@1.1.3: dependencies: call-bind: 1.0.8 @@ -27846,6 +28458,10 @@ snapshots: char-regex: 1.0.2 strip-ansi: 6.0.1 + string-to-stream@3.0.1: + dependencies: + readable-stream: 3.6.2 + string-width@3.1.0: dependencies: emoji-regex: 7.0.3 @@ -28019,11 +28635,6 @@ snapshots: client-only: 0.0.1 react: 19.1.0 - styled-jsx@5.1.6(react@19.1.1): - dependencies: - client-only: 0.0.1 - react: 19.1.1 - sucrase@3.35.0: dependencies: '@jridgewell/gen-mapping': 0.3.13 @@ -28048,6 +28659,8 @@ snapshots: transitivePeerDependencies: - supports-color + superstruct@1.0.4: {} + supertap@3.0.1: dependencies: indent-string: 5.0.0 @@ -28117,53 +28730,30 @@ snapshots: react: 19.1.1 use-sync-external-store: 1.5.0(react@19.1.1) + synckit@0.11.11: + dependencies: + '@pkgr/core': 0.2.9 + system-architecture@0.1.0: {} tailwind-merge@2.6.0: {} tailwind-merge@3.3.1: {} - tailwindcss-animate@1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@20.19.10)(typescript@5.9.2))): - dependencies: - tailwindcss: 3.4.17(ts-node@10.9.2(@types/node@20.19.10)(typescript@5.9.2)) - - tailwindcss-animate@1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2))): + tailwindcss-animate@1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2))): dependencies: - tailwindcss: 3.4.17(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2)) + tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2)) - tailwindcss-scoped-preflight@3.4.12(postcss@8.5.6)(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2))): + tailwindcss-animate@1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3))): dependencies: - postcss: 8.5.6 - tailwindcss: 3.4.17(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2)) + tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) - tailwindcss@3.4.17(ts-node@10.9.2(@types/node@20.19.10)(typescript@5.9.2)): + tailwindcss-scoped-preflight@3.4.12(postcss@8.5.6)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3))): dependencies: - '@alloc/quick-lru': 5.2.0 - arg: 5.0.2 - chokidar: 3.6.0 - didyoumean: 1.2.2 - dlv: 1.1.3 - fast-glob: 3.3.3 - glob-parent: 6.0.2 - is-glob: 4.0.3 - jiti: 1.21.7 - lilconfig: 3.1.3 - micromatch: 4.0.8 - normalize-path: 3.0.0 - object-hash: 3.0.0 - picocolors: 1.1.1 postcss: 8.5.6 - postcss-import: 15.1.0(postcss@8.5.6) - postcss-js: 4.0.1(postcss@8.5.6) - postcss-load-config: 4.0.2(postcss@8.5.6)(ts-node@10.9.2(@types/node@20.19.10)(typescript@5.9.2)) - postcss-nested: 6.2.0(postcss@8.5.6) - postcss-selector-parser: 6.1.2 - resolve: 1.22.10 - sucrase: 3.35.0 - transitivePeerDependencies: - - ts-node + tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) - tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)): + tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -28182,7 +28772,7 @@ snapshots: postcss: 8.5.6 postcss-import: 15.1.0(postcss@8.5.6) postcss-js: 4.0.1(postcss@8.5.6) - postcss-load-config: 4.0.2(postcss@8.5.6)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)) + postcss-load-config: 4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2)) postcss-nested: 6.2.0(postcss@8.5.6) postcss-selector-parser: 6.1.2 resolve: 1.22.10 @@ -28190,7 +28780,7 @@ snapshots: transitivePeerDependencies: - ts-node - tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2)): + tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -28209,7 +28799,7 @@ snapshots: postcss: 8.5.6 postcss-import: 15.1.0(postcss@8.5.6) postcss-js: 4.0.1(postcss@8.5.6) - postcss-load-config: 4.0.2(postcss@8.5.6)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2)) + postcss-load-config: 4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) postcss-nested: 6.2.0(postcss@8.5.6) postcss-selector-parser: 6.1.2 resolve: 1.22.10 @@ -28257,25 +28847,28 @@ snapshots: temp-dir@3.0.0: {} - terser-webpack-plugin@5.3.14(esbuild@0.25.9)(webpack@5.101.1(esbuild@0.25.9)): + terser-webpack-plugin@5.3.14(@swc/core@1.13.5)(esbuild@0.25.9)(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 schema-utils: 4.3.2 serialize-javascript: 6.0.2 terser: 5.43.1 - webpack: 5.101.1(esbuild@0.25.9) + webpack: 5.101.1(@swc/core@1.13.5)(esbuild@0.25.9) optionalDependencies: + '@swc/core': 1.13.5 esbuild: 0.25.9 - terser-webpack-plugin@5.3.14(webpack@5.101.1): + terser-webpack-plugin@5.3.14(@swc/core@1.13.5)(webpack@5.101.1(@swc/core@1.13.5)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 schema-utils: 4.3.2 serialize-javascript: 6.0.2 terser: 5.43.1 - webpack: 5.101.1 + webpack: 5.101.1(@swc/core@1.13.5) + optionalDependencies: + '@swc/core': 1.13.5 optional: true terser@5.43.1: @@ -28418,18 +29011,14 @@ snapshots: dependencies: typescript: 5.8.3 - ts-api-utils@2.1.0(typescript@5.9.2): - dependencies: - typescript: 5.9.2 - ts-interface-checker@0.1.13: {} - ts-jest@29.4.1(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)))(typescript@5.8.3): + ts-jest@29.4.1(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@30.2.0)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)))(typescript@5.8.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 handlebars: 4.7.8 - jest: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3)) + jest: 29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 @@ -28440,7 +29029,27 @@ snapshots: optionalDependencies: '@babel/core': 7.28.3 '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 + '@jest/types': 30.2.0 + babel-jest: 29.7.0(@babel/core@7.28.3) + jest-util: 29.7.0 + + ts-jest@29.4.1(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@30.2.0)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)))(typescript@5.8.3): + dependencies: + bs-logger: 0.2.6 + fast-json-stable-stringify: 2.1.0 + handlebars: 4.7.8 + jest: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.7.2 + type-fest: 4.41.0 + typescript: 5.8.3 + yargs-parser: 21.1.1 + optionalDependencies: + '@babel/core': 7.28.3 + '@jest/transform': 29.7.0 + '@jest/types': 30.2.0 babel-jest: 29.7.0(@babel/core@7.28.3) jest-util: 29.7.0 @@ -28449,7 +29058,7 @@ snapshots: '@ts-morph/common': 0.19.0 code-block-writer: 12.0.0 - ts-node@10.9.2(@types/node@20.19.10)(typescript@5.9.2): + ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -28466,16 +29075,18 @@ snapshots: typescript: 5.9.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.13.5 optional: true - ts-node@10.9.2(@types/node@22.17.1)(typescript@5.8.3): + ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.17.1 + '@types/node': 20.19.11 acorn: 8.15.0 acorn-walk: 8.3.4 arg: 4.1.3 @@ -28485,8 +29096,10 @@ snapshots: typescript: 5.8.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.13.5 - ts-node@10.9.2(@types/node@22.17.1)(typescript@5.9.2): + ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -28500,12 +29113,13 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.9.2 + typescript: 5.8.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - optional: true + optionalDependencies: + '@swc/core': 1.13.5 - ts-node@10.9.2(@types/node@24.3.0)(typescript@5.9.2): + ts-node@10.9.2(@swc/core@1.13.5)(@types/node@24.3.0)(typescript@5.9.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -28522,6 +29136,8 @@ snapshots: typescript: 5.9.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.13.5 tsc-alias@1.8.16: dependencies: @@ -28533,6 +29149,22 @@ snapshots: normalize-path: 3.0.0 plimit-lit: 1.6.1 + tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz(typescript@5.8.3): + dependencies: + debug: 4.4.1(supports-color@5.5.0) + fast-glob: 3.3.3 + get-stdin: 8.0.0 + p-all: 3.0.0 + picocolors: 1.1.1 + signal-exit: 3.0.7 + string-to-stream: 3.0.1 + superstruct: 1.0.4 + tslib: 2.8.1 + typescript: 5.8.3 + yargs: 17.7.2 + transitivePeerDependencies: + - supports-color + tsconfck@3.1.6(typescript@5.8.3): optionalDependencies: typescript: 5.8.3 @@ -28577,7 +29209,36 @@ snapshots: tslib@2.8.1: {} - tsup@8.5.0(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.2)(yaml@2.8.1): + tsup@8.5.0(@swc/core@1.13.5)(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.8.3)(yaml@2.8.1): + dependencies: + bundle-require: 5.1.0(esbuild@0.25.9) + cac: 6.7.14 + chokidar: 4.0.3 + consola: 3.4.2 + debug: 4.4.1(supports-color@5.5.0) + esbuild: 0.25.9 + fix-dts-default-cjs-exports: 1.0.1 + joycon: 3.1.1 + picocolors: 1.1.1 + postcss-load-config: 6.0.1(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(yaml@2.8.1) + resolve-from: 5.0.0 + rollup: 4.46.2 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.14 + tree-kill: 1.2.2 + optionalDependencies: + '@swc/core': 1.13.5 + postcss: 8.5.6 + typescript: 5.8.3 + transitivePeerDependencies: + - jiti + - supports-color + - tsx + - yaml + + tsup@8.5.0(@swc/core@1.13.5)(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.2)(yaml@2.8.1): dependencies: bundle-require: 5.1.0(esbuild@0.25.9) cac: 6.7.14 @@ -28597,6 +29258,7 @@ snapshots: tinyglobby: 0.2.14 tree-kill: 1.2.2 optionalDependencies: + '@swc/core': 1.13.5 postcss: 8.5.6 typescript: 5.9.2 transitivePeerDependencies: @@ -28690,6 +29352,16 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 + typescript-eslint@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/parser': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + eslint: 9.34.0(jiti@2.5.1) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + typescript-eslint@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4): dependencies: '@typescript-eslint/eslint-plugin': 8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4))(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4) @@ -29519,7 +30191,7 @@ snapshots: webpack-virtual-modules@0.6.2: {} - webpack@5.101.1: + webpack@5.101.1(@swc/core@1.13.5): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.8 @@ -29543,7 +30215,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.2 tapable: 2.2.2 - terser-webpack-plugin: 5.3.14(webpack@5.101.1) + terser-webpack-plugin: 5.3.14(@swc/core@1.13.5)(webpack@5.101.1(@swc/core@1.13.5)) watchpack: 2.4.4 webpack-sources: 3.3.3 transitivePeerDependencies: @@ -29552,7 +30224,7 @@ snapshots: - uglify-js optional: true - webpack@5.101.1(esbuild@0.25.9): + webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.8 @@ -29576,7 +30248,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.2 tapable: 2.2.2 - terser-webpack-plugin: 5.3.14(esbuild@0.25.9)(webpack@5.101.1(esbuild@0.25.9)) + terser-webpack-plugin: 5.3.14(@swc/core@1.13.5)(esbuild@0.25.9)(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) watchpack: 2.4.4 webpack-sources: 3.3.3 transitivePeerDependencies: @@ -29763,7 +30435,7 @@ snapshots: '@oozcitak/util': 8.3.8 js-yaml: 3.14.1 - xo@0.53.1(webpack@5.101.1(esbuild@0.25.9)): + xo@0.53.1(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)): dependencies: '@eslint/eslintrc': 1.4.1 arrify: 3.0.0 @@ -29773,7 +30445,7 @@ snapshots: eslint-config-prettier: 8.10.2(eslint@8.57.1) eslint-config-xo: 0.43.1(eslint@8.57.1) eslint-formatter-pretty: 4.1.0 - eslint-import-resolver-webpack: 0.13.10(eslint-plugin-import@2.32.0(eslint@8.57.1))(webpack@5.101.1(esbuild@0.25.9)) + eslint-import-resolver-webpack: 0.13.10(eslint-plugin-import@2.32.0(eslint@8.57.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) eslint-plugin-ava: 13.2.0(eslint@8.57.1) eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) eslint-plugin-import: 2.32.0(eslint-import-resolver-webpack@0.13.10)(eslint@8.57.1) @@ -29799,7 +30471,7 @@ snapshots: to-absolute-glob: 2.0.2 typescript: 4.9.5 optionalDependencies: - webpack: 5.101.1(esbuild@0.25.9) + webpack: 5.101.1(@swc/core@1.13.5)(esbuild@0.25.9) transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-typescript diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 6aefd808..2782d670 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,5 @@ packages: - - package + - autumn-js - frameworks/* - nextjs - compose @@ -11,6 +11,7 @@ packages: - next-bug - vite-spa - convex + - ts-sdk ignoredBuiltDependencies: - better-sqlite3 diff --git a/ts-sdk b/ts-sdk new file mode 160000 index 00000000..a8b0f8c8 --- /dev/null +++ b/ts-sdk @@ -0,0 +1 @@ +Subproject commit a8b0f8c87dc5de7f45c360f674d1cd2bfe116b62 From 824ab43522e4e2c437f6fd7c1b7f20226aed96a5 Mon Sep 17 00:00:00 2001 From: John Yeo Date: Fri, 3 Oct 2025 18:02:10 +0100 Subject: [PATCH 02/35] wip --- .../src/libraries/backend/better-auth.ts | 169 +-------- .../src/libraries/backend/routes/genRoutes.ts | 2 +- .../backend/routes/referralRoutes.ts | 37 +- .../src/libraries/backend/utils/backendRes.ts | 19 +- .../backend/utils/logBackendErrors.ts | 11 - .../src/libraries/backend/utils/withAuth.ts | 11 +- .../libraries/react/ReactAutumnProvider.tsx | 2 +- .../react/client/ConvexAutumnClient.tsx | 353 +++++------------- ...PricingTableTypes.ts => ProductDetails.ts} | 12 + .../react/client/ReactAutumnClient.tsx | 50 ++- .../react/client/clientCusMethods.ts | 8 +- .../react/client/clientEntityMethods.ts | 25 +- .../react/client/clientGenMethods.ts | 37 +- .../react/client/clientProdMethods.ts | 8 +- .../react/client/clientReferralMethods.ts | 21 +- .../react/client/types/clientAttachTypes.ts | 62 --- .../react/client/types/clientCusTypes.ts | 3 - .../react/client/types/clientEntTypes.ts | 22 -- .../react/client/types/clientGenTypes.ts | 58 --- .../react/client/types/clientProdTypes.ts | 3 - .../react/client/types/clientReferralTypes.ts | 13 - .../react/client/types/responseTypes.ts | 5 - .../react/clientTypes/attachTypes.ts | 97 +++++ .../react/clientTypes/billingPortalTypes.ts | 20 + .../react/clientTypes/cancelTypes.ts | 31 ++ .../libraries/react/clientTypes/checkTypes.ts | 71 ++++ .../react/clientTypes/checkoutTypes.ts | 91 +++++ .../react/clientTypes/createCustomerTypes.ts | 64 ++++ .../react/clientTypes/createEntityTypes.ts | 25 ++ .../clientTypes/createReferralCodeTypes.ts | 13 + .../react/clientTypes/customerDataTypes.ts | 41 ++ .../react/clientTypes/entityDataTypes.ts | 22 ++ .../react/clientTypes/getEntityTypes.ts | 13 + .../src/libraries/react/clientTypes/index.ts | 19 + .../libraries/react/clientTypes/queryTypes.ts | 19 + .../clientTypes/redeemReferralCodeTypes.ts | 13 + .../react/clientTypes/setupPaymentTypes.ts | 25 ++ .../libraries/react/clientTypes/trackTypes.ts | 71 ++++ .../checkout-dialog-synced.tsx | 74 ++-- .../checkout-dialog/lib/checkout-content.tsx | 21 +- .../paywall-dialog/lib/paywall-content.tsx | 4 +- .../lib/pricing-table-content.tsx | 8 +- .../pricing-table/pricing-table-synced.tsx | 14 +- .../react/hooks/helpers/handleCheck.ts | 134 +++---- .../react/hooks/helpers/useAutumnBase.tsx | 142 ++----- .../libraries/react/hooks/useAnalytics.tsx | 20 +- .../libraries/react/hooks/useCustomerBase.tsx | 122 +++--- .../src/libraries/react/hooks/useEntity.tsx | 4 +- .../libraries/react/hooks/useEntityBase.tsx | 24 +- .../src/libraries/react/hooks/usePaywall.tsx | 9 +- .../libraries/react/hooks/usePricingTable.tsx | 3 +- .../react/hooks/usePricingTableBase.tsx | 50 +-- .../libraries/react/hooks/useProductsBase.tsx | 4 +- autumn-js/src/libraries/react/index.ts | 4 +- autumn-js/src/utils/ErrorResponse.ts | 33 ++ autumn-js/src/utils/handleFetchResult.ts | 47 +++ autumn-js/tsup.config.ts | 88 ++--- autumn-js/tsup.dev.config.ts | 66 +--- 58 files changed, 1208 insertions(+), 1229 deletions(-) delete mode 100644 autumn-js/src/libraries/backend/utils/logBackendErrors.ts rename autumn-js/src/libraries/react/client/{types/clientPricingTableTypes.ts => ProductDetails.ts} (57%) delete mode 100644 autumn-js/src/libraries/react/client/types/clientAttachTypes.ts delete mode 100644 autumn-js/src/libraries/react/client/types/clientCusTypes.ts delete mode 100644 autumn-js/src/libraries/react/client/types/clientEntTypes.ts delete mode 100644 autumn-js/src/libraries/react/client/types/clientGenTypes.ts delete mode 100644 autumn-js/src/libraries/react/client/types/clientProdTypes.ts delete mode 100644 autumn-js/src/libraries/react/client/types/clientReferralTypes.ts delete mode 100644 autumn-js/src/libraries/react/client/types/responseTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/attachTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/cancelTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/checkTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/getEntityTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/index.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/queryTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts create mode 100644 autumn-js/src/libraries/react/clientTypes/trackTypes.ts create mode 100644 autumn-js/src/utils/ErrorResponse.ts create mode 100644 autumn-js/src/utils/handleFetchResult.ts diff --git a/autumn-js/src/libraries/backend/better-auth.ts b/autumn-js/src/libraries/backend/better-auth.ts index 75965509..dd321e76 100644 --- a/autumn-js/src/libraries/backend/better-auth.ts +++ b/autumn-js/src/libraries/backend/better-auth.ts @@ -17,18 +17,15 @@ import { z } from "zod/v4"; import { AttachParamsSchema, CheckoutParamsSchema, -} from "@/client/types/clientAttachTypes"; -import { CreateEntityParamsSchema } from "@/client/types/clientEntTypes"; -import { + EntityCreateParamsSchema, CancelParamsSchema, CheckParamsSchema, - OpenBillingPortalParamsSchema, + BillingPortalParamsSchema, TrackParamsSchema, -} from "@/client/types/clientGenTypes"; -import { - CreateReferralCodeParamsSchema, - RedeemReferralCodeParamsSchema, -} from "@/client/types/clientReferralTypes"; + ReferralCreateCodeParamsSchema, + ReferralRedeemCodeParamsSchema, +} from "@/clientTypes"; + import { createRouterWithOptions } from "./routes/backendRouter"; import { @@ -255,7 +252,7 @@ export const autumn = (options?: AutumnOptions) => { { method: "POST", use: [], - body: CreateReferralCodeParamsSchema, + body: ReferralCreateCodeParamsSchema, }, async (ctx) => { return await handleReq({ ctx, options, method: "POST" }); @@ -266,7 +263,7 @@ export const autumn = (options?: AutumnOptions) => { { method: "POST", use: [], - body: RedeemReferralCodeParamsSchema, + body: ReferralRedeemCodeParamsSchema, }, async (ctx) => { return await handleReq({ ctx, options, method: "POST" }); @@ -277,7 +274,7 @@ export const autumn = (options?: AutumnOptions) => { { method: "POST", use: [], - body: OpenBillingPortalParamsSchema, + body: BillingPortalParamsSchema, metadata: { isAction: false, }, @@ -291,7 +288,7 @@ export const autumn = (options?: AutumnOptions) => { { method: "POST", use: [], - body: CreateEntityParamsSchema, + body: EntityCreateParamsSchema, }, async (ctx) => { return await handleReq({ ctx, options, method: "POST" }); @@ -318,149 +315,3 @@ export const autumn = (options?: AutumnOptions) => { }, } satisfies BetterAuthPlugin; }; - -// // Function to create endpoint configurations (to access options parameter) -// const createEndpointConfigs = (options?: AutumnOptions): EndpointConfig[] => [ -// { -// key: "identifyOrg", -// path: "/autumn/identify-org", -// method: "GET", -// useAuth: false, -// customHandler: async (ctx) => { -// const session = await getSessionFromCtx( -// ctx as Parameters[0] -// ); -// const org = ( -// ctx.context as unknown as { activeOrganization: Organization } -// ).activeOrganization; -// return ctx.json({ -// orgId: org?.id, -// identity: (ctx.context as unknown as { autumnIdentity: AuthResult }) -// .autumnIdentity, -// session, -// org, -// }); -// }, -// }, -// { -// key: "createCustomer", -// path: "/autumn/customers", -// method: "POST", -// useAuth: false, -// body: z.object({ -// errorOnNotFound: z.boolean().optional(), -// expand: z.array(CustomerExpandEnum).optional(), -// }), -// metadata: { -// isAction: false, -// }, -// customHandler: async (ctx) => { -// const session = await getSessionFromCtx( -// ctx as Parameters[0] -// ); - -// return await handleReq({ ctx, options, method: "POST", session }); -// }, -// }, -// { -// key: "listProducts", -// path: "/autumn/products", -// method: "GET", -// useAuth: false, -// customHandler: async (ctx) => { -// return await handleReq({ ctx, options, method: "GET" }); -// }, -// }, -// { -// key: "checkout", -// path: "/autumn/checkout", -// method: "POST", -// body: CheckoutParamsSchema, -// useAuth: true, -// }, -// { -// key: "attach", -// path: "/autumn/attach", -// method: "POST", -// body: AttachParamsSchema, -// useAuth: true, -// }, -// { -// key: "check", -// path: "/autumn/check", -// method: "POST", -// body: CheckParamsSchema, -// useAuth: true, -// }, -// { -// key: "track", -// path: "/autumn/track", -// method: "POST", -// body: TrackParamsSchema, -// useAuth: true, -// }, -// { -// key: "cancel", -// path: "/autumn/cancel", -// method: "POST", -// body: CancelParamsSchema, -// useAuth: true, -// }, -// { -// key: "createReferralCode", -// path: "/autumn/referrals/code", -// method: "POST", -// body: CreateReferralCodeParamsSchema, -// useAuth: true, -// }, -// { -// key: "redeemReferralCode", -// path: "/autumn/referrals/redeem", -// method: "POST", -// body: RedeemReferralCodeParamsSchema, -// useAuth: true, -// }, -// { -// key: "billingPortal", -// path: "/autumn/billing_portal", -// method: "POST", -// body: OpenBillingPortalParamsSchema, -// useAuth: true, -// metadata: { -// isAction: false, -// }, -// }, -// { -// key: "createEntity", -// path: "/autumn/entities", -// method: "POST", -// body: CreateEntityParamsSchema, -// useAuth: true, -// }, -// { -// key: "getEntity", -// path: "/autumn/entities/:entityId", -// method: "GET", -// useAuth: true, -// }, -// { -// key: "deleteEntity", -// path: "/autumn/entities/:entityId", -// method: "DELETE", -// useAuth: true, -// }, -// ]; - -// // Endpoint configuration type -// interface EndpointConfig { -// key: string; -// path: string; -// method: Method; -// body?: ZodSchema; -// metadata?: Record; -// useAuth?: boolean; -// customHandler?: ( -// ctx: EndpointContext, -// options?: AutumnOptions -// ) => Promise; -// } diff --git a/autumn-js/src/libraries/backend/routes/genRoutes.ts b/autumn-js/src/libraries/backend/routes/genRoutes.ts index 16162958..a2ae6e1e 100644 --- a/autumn-js/src/libraries/backend/routes/genRoutes.ts +++ b/autumn-js/src/libraries/backend/routes/genRoutes.ts @@ -1,6 +1,6 @@ // import type { AttachParams, CheckoutParams } from "@sdk/general/attachTypes"; import { addRoute, type RouterContext } from "rou3"; -import type { QueryParams } from "@/client/types/clientGenTypes"; +import type { QueryParams } from "@/clientTypes"; import type { Autumn, // BillingPortalParams, diff --git a/autumn-js/src/libraries/backend/routes/referralRoutes.ts b/autumn-js/src/libraries/backend/routes/referralRoutes.ts index 847bddda..10ea6fe2 100644 --- a/autumn-js/src/libraries/backend/routes/referralRoutes.ts +++ b/autumn-js/src/libraries/backend/routes/referralRoutes.ts @@ -1,9 +1,9 @@ import { addRoute, RouterContext } from "rou3"; import { Autumn, - CreateReferralCodeParams, - RedeemReferralCodeParams, -} from "../../../sdk"; + // CreateReferralCodeParams, + // RedeemReferralCodeParams, +} from "@sdk"; import { withAuth } from "../utils/withAuth"; import { BASE_PATH } from "../constants"; @@ -11,20 +11,19 @@ const createReferralCodeHandler = withAuth({ fn: async ({ autumn, customer_id, - body, + // body, }: { autumn: Autumn; customer_id: string; - body: CreateReferralCodeParams; + // body: CreateReferralCodeParams; }) => { - console.log("Creating referral code for customer: ", customer_id); - console.log("Body: ", body); - const res = await autumn.referrals.createCode({ - ...body, - customer_id, - }); - console.log("Res: ", res); - return res; + + // const res = await autumn.referrals.createCode({ + // ...body, + // customer_id, + // }); + + // return res; }, }); @@ -32,16 +31,16 @@ const redeemReferralCodeHandler = withAuth({ fn: async ({ autumn, customer_id, - body, + // body, }: { autumn: Autumn; customer_id: string; - body: RedeemReferralCodeParams; + // body: RedeemReferralCodeParams; }) => { - return await autumn.referrals.redeemCode({ - ...body, - customer_id, - }); + // return await autumn.referrals.redeemCode({ + // ...body, + // customer_id, + // }); }, }); diff --git a/autumn-js/src/libraries/backend/utils/backendRes.ts b/autumn-js/src/libraries/backend/utils/backendRes.ts index c8ab87e8..94e7e155 100644 --- a/autumn-js/src/libraries/backend/utils/backendRes.ts +++ b/autumn-js/src/libraries/backend/utils/backendRes.ts @@ -1,14 +1,13 @@ -import { AutumnError } from "../../../sdk"; -import { Result } from "../../../sdk/response"; +import { ErrorResponse } from "@utils/ErrorResponse"; -export const toBackendRes = ({ res }: { res: Result }) => { - let statusCode = res.statusCode ? res.statusCode : res.error ? 500 : 200; +// export const toBackendRes = ({ res }: { res: Result }) => { +// let statusCode = res.statusCode ? res.statusCode : res.error ? 500 : 200; - return { - body: res.data ? res.data : res.error, - statusCode, - }; -}; +// return { +// body: res.data ? res.data : res.error, +// statusCode, +// }; +// }; export const toBackendError = ({ path, @@ -23,7 +22,7 @@ export const toBackendError = ({ }) => { return { statusCode, - body: new AutumnError({ + body: new ErrorResponse({ message: message || "Internal server error", code: code || "internal_server_error", }), diff --git a/autumn-js/src/libraries/backend/utils/logBackendErrors.ts b/autumn-js/src/libraries/backend/utils/logBackendErrors.ts deleted file mode 100644 index 1e47a434..00000000 --- a/autumn-js/src/libraries/backend/utils/logBackendErrors.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { logger } from "../../../utils/logger"; -import { Result } from "../../../sdk/response"; -import { AutumnError } from "../../../sdk"; - - -export const logBackendErrors = async (res: Result) => { - let { statusCode, error } = res; - if (!error) return; - - logger.error(`[Autumn] ${error.message}`); -}; diff --git a/autumn-js/src/libraries/backend/utils/withAuth.ts b/autumn-js/src/libraries/backend/utils/withAuth.ts index 653ba3cd..8a7929a4 100644 --- a/autumn-js/src/libraries/backend/utils/withAuth.ts +++ b/autumn-js/src/libraries/backend/utils/withAuth.ts @@ -1,9 +1,9 @@ -import { Autumn, CustomerData } from "../../../sdk"; -import { toBackendError, toBackendRes } from "./backendRes"; + +import { toBackendError } from "./backendRes"; import { AuthResult } from "./AuthFunction"; -import { logBackendErrors } from "./logBackendErrors"; import { logger } from "../../../utils/logger"; import { toSnakeCase } from "@utils/toSnakeCase"; +import Autumn from "@sdk"; // 1. Takes in export const withAuth = ({ @@ -14,7 +14,7 @@ export const withAuth = ({ autumn: Autumn; body: any; customer_id: string; - customer_data?: CustomerData; + customer_data?: Autumn.CustomerData; pathParams?: Record; searchParams?: Record; }) => Promise; @@ -67,7 +67,7 @@ export const withAuth = ({ } try { - let res = await fn({ + return await fn({ body, autumn, customer_id: customerId!, @@ -76,7 +76,6 @@ export const withAuth = ({ searchParams, }); - return toBackendRes({ res }); } catch (error: any) { logger.error(`${error.message}`); return toBackendError({ diff --git a/autumn-js/src/libraries/react/ReactAutumnProvider.tsx b/autumn-js/src/libraries/react/ReactAutumnProvider.tsx index 5c83643f..dccddfd8 100644 --- a/autumn-js/src/libraries/react/ReactAutumnProvider.tsx +++ b/autumn-js/src/libraries/react/ReactAutumnProvider.tsx @@ -1,9 +1,9 @@ import { BaseAutumnProvider } from "./BaseAutumnProvider"; import { AutumnClient } from "./client/ReactAutumnClient"; -import { CustomerData } from "../../sdk"; import { AutumnContext } from "./AutumnContext"; import { IAutumnClient } from "./client/ReactAutumnClient"; import { ConvexAutumnClient } from "./client/ConvexAutumnClient"; +import { CustomerData } from "./clientTypes"; const getBackendUrl = (backendUrl?: string) => { if (backendUrl) { diff --git a/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx b/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx index 3563baa4..c90cbbea 100644 --- a/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx +++ b/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx @@ -1,11 +1,5 @@ -import { - AutumnError, - CreateCustomerParams, - CustomerData, - AutumnPromise, - Product, -} from "@sdk"; import { IAutumnClient } from "./ReactAutumnClient"; +import { CustomerCreateParams, CustomerData } from "@/clientTypes"; export interface ErrorResponse { message: string; @@ -86,308 +80,155 @@ export class ConvexAutumnClient implements IAutumnClient { } async createCustomer( - params: Omit & { + params: CustomerCreateParams & { errorOnNotFound?: boolean; } ) { - try { - const result = await this.convex.action( - this.convexApi.createCustomer, - params - ); - - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + return await this.convex.action( + this.convexApi.createCustomer, + params + ); } // Core methods that wrap Convex actions attach = async (args: any) => { - try { - // Filter out frontend-only parameters - const { dialog, ...backendArgs } = args; - - const result = await this.convex.action( - this.convexApi.attach, - backendArgs - ); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + // Filter out frontend-only parameters + const { dialog, ...backendArgs } = args; + + const result = await this.convex.action( + this.convexApi.attach, + backendArgs + ); + return result; }; checkout = async (args: any) => { - try { - // Filter out frontend-only parameters - const { dialog, ...backendArgs } = args; - - const result = await this.convex.action( - this.convexApi.checkout, - backendArgs - ); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + // Filter out frontend-only parameters + const { dialog, ...backendArgs } = args; + + const result = await this.convex.action( + this.convexApi.checkout, + backendArgs + ); + return result; }; cancel = async (args: any) => { - try { - const result = await this.convex.action(this.convexApi.cancel, args); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + const result = await this.convex.action(this.convexApi.cancel, args); + return result; }; check = async (args: any) => { - try { - const result = await this.convex.action(this.convexApi.check, args); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + const result = await this.convex.action(this.convexApi.check, args); + return result; }; track = async (args: any) => { - try { - const result = await this.convex.action(this.convexApi.track, args); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + const result = await this.convex.action(this.convexApi.track, args); + return result; }; openBillingPortal = async (args: any) => { - try { - const result = await this.convex.action(this.convexApi.billingPortal, { - ...args, - openInNewTab: undefined, - }); + const result = await this.convex.action(this.convexApi.billingPortal, { + ...args, + openInNewTab: undefined, + }); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + return result; }; setupPayment = async (args: any) => { - try { - const result = await this.convex.action( - this.convexApi.setupPayment, - args - ); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + const result = await this.convex.action( + this.convexApi.setupPayment, + args + ); + return result; }; query = async (args: any) => { - try { - const result = await this.convex.action(this.convexApi.query, args); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + const result = await this.convex.action(this.convexApi.query, args); + return result; }; entities = { create: async (args: any) => { - try { - // Check if args is an array or single entity - if (Array.isArray(args)) { - // Multiple entities - use createEntities method - throw new Error( - "Passing an array of entities to createEntity() is not supported for Convex" - ); - // const entityArgs = { entities: args }; - // const result = await this.convex.action( - // this.convexApi.createEntities, - // entityArgs - // ); - // return result; - } else { - // Single entity - use createEntity method directly (no entities wrapper) - const result = await this.convex.action( - this.convexApi.createEntity, - args - ); - return result; - } - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; + // Check if args is an array or single entity + if (Array.isArray(args)) { + // Multiple entities - use createEntities method + throw new Error( + "Passing an array of entities to createEntity() is not supported for Convex" + ); + // const entityArgs = { entities: args }; + // const result = await this.convex.action( + // this.convexApi.createEntities, + // entityArgs + // ); + // return result; + } else { + // Single entity - use createEntity method directly (no entities wrapper) + const result = await this.convex.action( + this.convexApi.createEntity, + args + ); + return result; } }, get: async (entityId: string, args: any) => { - try { - const result = await this.convex.action(this.convexApi.getEntity, { - entityId, - ...args, - }); + const result = await this.convex.action(this.convexApi.getEntity, { + entityId, + ...args, + }); - return result; - } catch (error: any) { - console.error("Error fetching entity: ", error); - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + return result; }, delete: async (args: any) => { - try { - // Set auth token for the request - backend will extract identity - // if (this.getBearerToken) { - // this.convexClient.setAuth( - // (await this.getBearerToken()) ?? "" - // ); - // } - const result = await this.convex.action( - this.convexApi.deleteEntity, - args - ); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + // Set auth token for the request - backend will extract identity + // if (this.getBearerToken) { + // this.convexClient.setAuth( + // (await this.getBearerToken()) ?? "" + // ); + // } + const result = await this.convex.action( + this.convexApi.deleteEntity, + args + ); + return result; }, }; referrals = { createCode: async (args: any) => { - try { - const result = await this.convex.action( - this.convexApi.createReferralCode, - args - ); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + const result = await this.convex.action( + this.convexApi.createReferralCode, + args + ); + return result; }, redeemCode: async (args: any) => { - try { - // Set auth token for the request - backend will extract identity - // if (this.getBearerToken) { - // this.convexClient.setAuth( - // (await this.getBearerToken()) ?? "" - // ); - // } - const result = await this.convex.action( - this.convexApi.redeemReferralCode, - args - ); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + // Set auth token for the request - backend will extract identity + // if (this.getBearerToken) { + // this.convexClient.setAuth( + // (await this.getBearerToken()) ?? "" + // ); + // } + const result = await this.convex.action( + this.convexApi.redeemReferralCode, + args + ); + return result; }, }; products = { - list: async (): AutumnPromise<{ list: Product[] }> => { - try { - const result = await this.convex.action( - this.convexApi.listProducts, - {} - ); - return result; - } catch (error: any) { - return { - data: null, - error: new AutumnError({ - message: error.message, - code: "convex_action_failed", - }), - }; - } + list: async (): Promise => { + const result = await this.convex.action( + this.convexApi.listProducts, + {} + ); + return result; }, }; } diff --git a/autumn-js/src/libraries/react/client/types/clientPricingTableTypes.ts b/autumn-js/src/libraries/react/client/ProductDetails.ts similarity index 57% rename from autumn-js/src/libraries/react/client/types/clientPricingTableTypes.ts rename to autumn-js/src/libraries/react/client/ProductDetails.ts index f7057f9d..58ddc38c 100644 --- a/autumn-js/src/libraries/react/client/types/clientPricingTableTypes.ts +++ b/autumn-js/src/libraries/react/client/ProductDetails.ts @@ -1,3 +1,5 @@ +import { Autumn } from "@sdk"; + export interface ProductDetails { id?: string; name?: string; @@ -18,3 +20,13 @@ export interface ProductDetails { secondaryText?: string; }[]; } +export interface ProductWithDisplay extends Autumn.Product { + display?: { + name?: string; + description?: string; + button_text?: string; + recommend_text?: string; + everything_from?: string; + button_url?: string; + }; +} \ No newline at end of file diff --git a/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx b/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx index ad4cafa6..3c08adcf 100644 --- a/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx +++ b/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx @@ -1,12 +1,4 @@ import { logAuthError } from "@/errorUtils/logAuthError"; -import { - AutumnError, - // AutumnPromise, - // CreateCustomerParams, - // CustomerData, - // Product, - // toContainerResult, -} from "@sdk"; import { logFetchError } from "../errorUtils/logFetchError"; import { createCustomerMethod } from "./clientCusMethods"; import { @@ -27,6 +19,8 @@ import { } from "./clientGenMethods"; import { listProductsMethod } from "./clientProdMethods"; import { createCode, redeemCode } from "./clientReferralMethods"; +import { CustomerData, CustomerCreateParams } from "@/clientTypes"; +import { handleFetchResult } from "@utils/handleFetchResult"; export interface ErrorResponse { message: string; @@ -58,7 +52,7 @@ export interface IAutumnClient { // Core methods createCustomer( - params: Omit & { + params: CustomerCreateParams & { errorOnNotFound?: boolean; } ): Promise; @@ -101,10 +95,12 @@ export interface IAutumnClient { }; products: { - list(): AutumnPromise<{ list: Product[] }>; + list(): Promise; }; } + + export class AutumnClient implements IAutumnClient { public readonly backendUrl?: string; protected readonly getBearerToken?: () => Promise; @@ -190,6 +186,7 @@ export class AutumnClient implements IAutumnClient { } } } + /** * Automatically determines whether to include credentials based on CORS detection */ @@ -243,14 +240,14 @@ export class AutumnClient implements IAutumnClient { return headers; } - async handleFetch({ + async handleFetch>({ path, method, body, }: { path: string; method: string; - body?: Record | Record[]; + body?: any; }) { body = method === "POST" @@ -263,6 +260,8 @@ export class AutumnClient implements IAutumnClient { const includeCredentials = await this.shouldIncludeCredentials(); + + try { const response = await fetch(`${this.backendUrl}${path}`, { method, @@ -273,7 +272,7 @@ export class AutumnClient implements IAutumnClient { const loggedError = await logAuthError(response); - return await toContainerResult({ + return await handleFetchResult({ response, logger: console, logError: !loggedError, @@ -285,20 +284,21 @@ export class AutumnClient implements IAutumnClient { path, error, }); - return { - data: null, - error: new AutumnError({ - message: - error instanceof Error ? error.message : JSON.stringify(error), - code: "fetch_failed", - }), - }; + throw error; + // return { + // data: null, + // error: new AutumnError({ + // message: + // error instanceof Error ? error.message : JSON.stringify(error), + // code: "fetch_failed", + // }), + // }; } } - async post( + async post( path: string, - body: Record | Record[] + body: T | T[] ) { return await this.handleFetch({ path, @@ -322,9 +322,7 @@ export class AutumnClient implements IAutumnClient { } async createCustomer( - params: Omit & { - errorOnNotFound?: boolean; - } + params: CustomerCreateParams & { errorOnNotFound?: boolean;} ) { return await createCustomerMethod({ client: this, diff --git a/autumn-js/src/libraries/react/client/clientCusMethods.ts b/autumn-js/src/libraries/react/client/clientCusMethods.ts index 58f1ddab..31e9d46a 100644 --- a/autumn-js/src/libraries/react/client/clientCusMethods.ts +++ b/autumn-js/src/libraries/react/client/clientCusMethods.ts @@ -1,14 +1,14 @@ +import Autumn from "@sdk"; import { AutumnClient, OmitCustomerType } from "./ReactAutumnClient"; -import { CreateCustomerParams, Customer } from "../../../sdk"; -import { AutumnPromise } from "../../../sdk/response"; + export const createCustomerMethod = async ({ client, params, }: { client: AutumnClient; - params: Omit; -}): AutumnPromise => { + params: Omit; +}): Promise => { let result = await client.post(`${client.prefix}/customers`, params); return result; }; diff --git a/autumn-js/src/libraries/react/client/clientEntityMethods.ts b/autumn-js/src/libraries/react/client/clientEntityMethods.ts index c746696d..3a6d91f5 100644 --- a/autumn-js/src/libraries/react/client/clientEntityMethods.ts +++ b/autumn-js/src/libraries/react/client/clientEntityMethods.ts @@ -1,16 +1,17 @@ -import { toSnakeCase } from "@utils/toSnakeCase"; -import type { AutumnPromise, DeleteEntityResult, Entity } from "../../../sdk"; + +import Autumn from "@sdk"; import { getEntityExpandStr } from "../../../utils/entityUtils"; import type { AutumnClient } from "./ReactAutumnClient"; -import type { - CreateEntityParams, - GetEntityParams, -} from "./types/clientEntTypes"; +// import type { +// CreateEntityParams, +// GetEntityParams, +// } from "./types/clientEntTypes"; +import { EntityCreateParams, EntityGetParams } from "@/clientTypes"; export async function createEntityMethod( this: AutumnClient, - params: CreateEntityParams | CreateEntityParams[] -): AutumnPromise { + params: EntityCreateParams +): Promise { const res = await this.post(`${this.prefix}/entities`, params); return res; } @@ -18,9 +19,9 @@ export async function createEntityMethod( export async function getEntityMethod( this: AutumnClient, entityId: string, - params?: GetEntityParams -): AutumnPromise { - const expand = getEntityExpandStr(params?.expand); + params?: EntityGetParams +): Promise { + const expand = getEntityExpandStr(params?.expand as Array); const res = await this.get(`${this.prefix}/entities/${entityId}?${expand}`); return res; @@ -29,7 +30,7 @@ export async function getEntityMethod( export async function deleteEntityMethod( this: AutumnClient, entityId: string -): AutumnPromise { +): Promise { const res = await this.delete(`${this.prefix}/entities/${entityId}`); return res; } diff --git a/autumn-js/src/libraries/react/client/clientGenMethods.ts b/autumn-js/src/libraries/react/client/clientGenMethods.ts index d85b1fe7..d62d003a 100644 --- a/autumn-js/src/libraries/react/client/clientGenMethods.ts +++ b/autumn-js/src/libraries/react/client/clientGenMethods.ts @@ -1,29 +1,14 @@ import type { - AutumnPromise, - BillingPortalResult, - CancelResult, - CheckResult, - QueryResult, - SetupPaymentResult, - TrackResult, + Autumn } from "@sdk"; -import type { AttachResult, CheckoutResult } from "@sdk/general/attachTypes"; import type { AutumnClient } from "./ReactAutumnClient"; +import { AttachParams, CheckoutParams, CancelParams, CheckParams, BillingPortalParams, QueryParams, SetupPaymentParams, TrackParams } from "@/clientTypes"; -import type { AttachParams, CheckoutParams } from "./types/clientAttachTypes"; -import type { - CancelParams, - CheckParams, - OpenBillingPortalParams, - QueryParams, - SetupPaymentParams, - TrackParams, -} from "./types/clientGenTypes"; export async function checkoutMethod( this: AutumnClient, params: CheckoutParams -): AutumnPromise { +): Promise { const res = await this.post(`${this.prefix}/checkout`, params); return res; } @@ -31,14 +16,14 @@ export async function checkoutMethod( export async function attachMethod( this: AutumnClient, params: AttachParams -): AutumnPromise { +): Promise { const res = await this.post(`${this.prefix}/attach`, params); return res; } export async function setupPaymentMethod( this: AutumnClient, params: SetupPaymentParams -): AutumnPromise { +): Promise { const res = await this.post(`${this.prefix}/setup_payment`, params); return res; } @@ -46,7 +31,7 @@ export async function setupPaymentMethod( export async function cancelMethod( this: AutumnClient, params: CancelParams -): AutumnPromise { +): Promise { const res = await this.post(`${this.prefix}/cancel`, params); return res; } @@ -54,7 +39,7 @@ export async function cancelMethod( export async function checkMethod( this: AutumnClient, params: CheckParams -): AutumnPromise { +): Promise { // Remove dialog from params const noDialogParams = { ...params, @@ -68,15 +53,15 @@ export async function checkMethod( export async function trackMethod( this: AutumnClient, params: TrackParams -): AutumnPromise { +): Promise { const res = await this.post(`${this.prefix}/track`, params); return res; } export async function openBillingPortalMethod( this: AutumnClient, - params?: OpenBillingPortalParams -): AutumnPromise { + params?: BillingPortalParams +): Promise { const res = await this.post(`${this.prefix}/billing_portal`, params || {}); return res; } @@ -84,7 +69,7 @@ export async function openBillingPortalMethod( export async function queryMethod( this: AutumnClient, params: QueryParams -): AutumnPromise { +): Promise { const res = await this.post(`${this.prefix}/query`, params); return res; } diff --git a/autumn-js/src/libraries/react/client/clientProdMethods.ts b/autumn-js/src/libraries/react/client/clientProdMethods.ts index 1ae07f97..8d613471 100644 --- a/autumn-js/src/libraries/react/client/clientProdMethods.ts +++ b/autumn-js/src/libraries/react/client/clientProdMethods.ts @@ -1,10 +1,8 @@ -import type { AutumnPromise } from "@sdk/response"; -import type { Product } from "src/sdk/products/prodTypes"; + import type { AutumnClient } from "./ReactAutumnClient"; +import Autumn from "@sdk"; -export async function listProductsMethod(this: AutumnClient): AutumnPromise<{ - list: Product[]; -}> { +export async function listProductsMethod(this: AutumnClient): Promise { const res = await this.get(`${this.prefix}/products`); return res; } diff --git a/autumn-js/src/libraries/react/client/clientReferralMethods.ts b/autumn-js/src/libraries/react/client/clientReferralMethods.ts index 73af7f55..bd7c3a69 100644 --- a/autumn-js/src/libraries/react/client/clientReferralMethods.ts +++ b/autumn-js/src/libraries/react/client/clientReferralMethods.ts @@ -1,27 +1,22 @@ -import { toSnakeCase } from "@utils/toSnakeCase"; -import type { - AutumnPromise, - CreateReferralCodeResult, - RedeemReferralCodeResult, -} from "../../../sdk"; import type { AutumnClient } from "./ReactAutumnClient"; import type { - CreateReferralCodeParams, - RedeemReferralCodeParams, -} from "./types/clientReferralTypes"; + ReferralCreateCodeParams, + ReferralRedeemCodeParams, +} from "@/clientTypes"; +import { Autumn } from "@sdk"; export async function createCode( this: AutumnClient, - params: CreateReferralCodeParams -): AutumnPromise { + params: ReferralCreateCodeParams +): Promise { const res = await this.post(`${this.prefix}/referrals/code`, params); return res; } export async function redeemCode( this: AutumnClient, - params: RedeemReferralCodeParams -): AutumnPromise { + params: ReferralRedeemCodeParams +): Promise { const res = await this.post(`${this.prefix}/referrals/redeem`, params); return res; } diff --git a/autumn-js/src/libraries/react/client/types/clientAttachTypes.ts b/autumn-js/src/libraries/react/client/types/clientAttachTypes.ts deleted file mode 100644 index 06198ef8..00000000 --- a/autumn-js/src/libraries/react/client/types/clientAttachTypes.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { z } from "zod/v4"; - -export const AttachFeatureOptionsSchema = z.object({ - featureId: z.string(), - quantity: z.number(), -}); - -export type AttachFeatureOptions = z.infer; - -export const AttachParamsSchema = z.object({ - productId: z.string().optional(), - entityId: z.string().optional(), - options: z.array(AttachFeatureOptionsSchema).optional(), - productIds: z.array(z.string()).optional(), - freeTrial: z.boolean().optional(), - successUrl: z.string().optional(), - metadata: z.record(z.string(), z.string()).optional(), - forceCheckout: z.boolean().optional(), - - /** - * @deprecated This field is deprecated and will be removed in a future version. - */ - dialog: z - .any() - .optional() - .describe( - "DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead." - ), - entityData: z.any().optional(), - openInNewTab: z.boolean().optional(), - reward: z.string().optional(), - checkoutSessionParams: z.record(z.string(), z.any()).optional(), -}); - -export type AttachParams = z.infer; - -export const CheckoutParamsSchema = z.object({ - productId: z.string().optional(), - productIds: z.array(z.string()).optional(), - entityId: z.string().optional(), - entityData: z.any().optional(), - - options: z.array(AttachFeatureOptionsSchema).optional(), - successUrl: z.string().optional(), - openInNewTab: z.boolean().optional(), - dialog: z.any().optional(), - forceCheckout: z.boolean().optional(), - - checkoutSessionParams: z.record(z.string(), z.any()).optional(), - reward: z.string().optional(), -}); - -export type CheckoutParams = z.infer; - -// export type CheckoutParams = { -// productId: string; -// entityId?: string; -// options?: AttachFeatureOptions[]; -// successUrl?: string; -// dialog?: any; -// openInNewTab?: boolean; -// }; diff --git a/autumn-js/src/libraries/react/client/types/clientCusTypes.ts b/autumn-js/src/libraries/react/client/types/clientCusTypes.ts deleted file mode 100644 index 11461df6..00000000 --- a/autumn-js/src/libraries/react/client/types/clientCusTypes.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type GetCustomerParams = { - expand?: string[]; -}; diff --git a/autumn-js/src/libraries/react/client/types/clientEntTypes.ts b/autumn-js/src/libraries/react/client/types/clientEntTypes.ts deleted file mode 100644 index 0d36cc04..00000000 --- a/autumn-js/src/libraries/react/client/types/clientEntTypes.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { z } from "zod/v4"; - -export const CreateEntityParamsSchema = z.object({ - id: z.string(), - name: z.string().optional(), - featureId: z.string(), -}); - -export type CreateEntityParams = z.infer; - -export const GetEntityParamsSchema = z.object({ - expand: z.array(z.string()).optional(), -}); - -export type GetEntityParams = z.infer; - -export const EntityDataParamsSchema = z.object({ - name: z.string().optional(), - featureId: z.string(), -}); - -export type EntityDataParams = z.infer; \ No newline at end of file diff --git a/autumn-js/src/libraries/react/client/types/clientGenTypes.ts b/autumn-js/src/libraries/react/client/types/clientGenTypes.ts deleted file mode 100644 index ce684ab1..00000000 --- a/autumn-js/src/libraries/react/client/types/clientGenTypes.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { QueryRangeEnum } from "@sdk"; -import { z } from "zod/v4"; - -export const CancelParamsSchema = z.object({ - productId: z.string(), - entityId: z.string().optional(), - cancelImmediately: z.boolean().optional(), -}); - -export type CancelParams = z.infer; - -// Add interfaces for function params -export const CheckParamsSchema = z.object({ - featureId: z.string().optional(), - productId: z.string().optional(), - entityId: z.string().optional(), - requiredBalance: z.number().optional(), - sendEvent: z.boolean().optional(), - withPreview: z.boolean().optional(), - dialog: z.any().optional(), - entityData: z.any().optional(), - properties: z.record(z.string(), z.any()).optional(), -}); - -export type CheckParams = z.infer; - -export const TrackParamsSchema = z.object({ - featureId: z.string().optional(), - eventName: z.string().optional(), - entityId: z.string().optional(), - value: z.number().optional(), - idempotencyKey: z.string().optional(), - entityData: z.any().optional(), -}); - -export type TrackParams = z.infer; - -export const OpenBillingPortalParamsSchema = z.object({ - returnUrl: z.string().optional(), - openInNewTab: z.boolean().optional(), -}); - -export type OpenBillingPortalParams = z.infer; - -export const SetupPaymentParamsSchema = z.object({ - successUrl: z.string().optional(), - checkoutSessionParams: z.record(z.string(), z.any()).optional(), - openInNewTab: z.boolean().optional(), -}); - -export type SetupPaymentParams = z.infer; - -export const QueryParamsSchema = z.object({ - featureId: z.string().or(z.array(z.string())), - range: QueryRangeEnum.optional(), -}); - -export type QueryParams = z.infer; diff --git a/autumn-js/src/libraries/react/client/types/clientProdTypes.ts b/autumn-js/src/libraries/react/client/types/clientProdTypes.ts deleted file mode 100644 index de003808..00000000 --- a/autumn-js/src/libraries/react/client/types/clientProdTypes.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ListProductsParams { - customerId?: string; -} diff --git a/autumn-js/src/libraries/react/client/types/clientReferralTypes.ts b/autumn-js/src/libraries/react/client/types/clientReferralTypes.ts deleted file mode 100644 index 22eb15b0..00000000 --- a/autumn-js/src/libraries/react/client/types/clientReferralTypes.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { z } from "zod/v4"; - -export const CreateReferralCodeParamsSchema = z.object({ - programId: z.string() -}); - -export type CreateReferralCodeParams = z.infer; - -export const RedeemReferralCodeParamsSchema = z.object({ - code: z.string() -}); - -export type RedeemReferralCodeParams = z.infer; diff --git a/autumn-js/src/libraries/react/client/types/responseTypes.ts b/autumn-js/src/libraries/react/client/types/responseTypes.ts deleted file mode 100644 index 67c7e8b6..00000000 --- a/autumn-js/src/libraries/react/client/types/responseTypes.ts +++ /dev/null @@ -1,5 +0,0 @@ -// export type AutumnResponse = { -// data: T; -// error: null; -// statusCode: number; -// }; diff --git a/autumn-js/src/libraries/react/clientTypes/attachTypes.ts b/autumn-js/src/libraries/react/clientTypes/attachTypes.ts new file mode 100644 index 00000000..5baa0d46 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/attachTypes.ts @@ -0,0 +1,97 @@ +// Auto-generated Zod schema +import { z } from "zod"; +import { CustomerDataSchema } from "./customerDataTypes"; +import { EntityDataSchema } from "./entityDataTypes"; +import type { CustomerData } from "./customerDataTypes"; +import type { EntityData } from "./entityDataTypes"; + +export const AttachParamsOptionSchema = z.object({ + featureId: z.string(), + quantity: z.number(), + adjustableQuantity: z.boolean().nullable().optional(), + internalFeatureId: z.string().nullable().optional(), + upcomingQuantity: z.number().nullable().optional() +}); + +export const AttachParamsSchema = z.object({ + checkoutSessionParams: z.unknown().optional(), + customerData: CustomerDataSchema.describe("Customer data if using attach to auto create customer").optional(), + entityData: EntityDataSchema.describe("Entity data for creating an entity").optional(), + entityId: z.string().nullable().optional(), + forceCheckout: z.boolean().optional(), + freeTrial: z.boolean().optional(), + invoice: z.boolean().optional(), + options: z.array(AttachParamsOptionSchema).nullable().optional(), + productId: z.string().nullable().optional(), + productIds: z.array(z.string()).nullable().optional(), + reward: z.union([z.string(), z.array(z.string())]).optional(), + setupPayment: z.boolean().optional(), + skipCheckout: z.boolean().optional(), + successUrl: z.string().optional(), + dialog: z.any().optional().describe("DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead."), + openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab"), + metadata: z.record(z.string(), z.string()).optional().describe("Additional metadata for the request") +}); + +export interface AttachParamsOption { + featureId: string; + + quantity: number; + + adjustableQuantity?: boolean | null; + + internalFeatureId?: string | null; + + upcomingQuantity?: number | null; +} + +export interface AttachParams { + checkoutSessionParams?: unknown; + + /** + * Customer data if using attach to auto create customer + */ + customerData?: CustomerData; + + /** + * Entity data for creating an entity + */ + entityData?: EntityData; + + entityId?: string | null; + + forceCheckout?: boolean; + + freeTrial?: boolean; + + invoice?: boolean; + + options?: AttachParamsOption[] | null; + + productId?: string | null; + + productIds?: string[] | null; + + reward?: string | Array; + + setupPayment?: boolean; + + skipCheckout?: boolean; + + successUrl?: string; + + /** + * DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead. + */ + dialog?: any; + + /** + * Whether to open checkout in a new tab + */ + openInNewTab?: boolean; + + /** + * Additional metadata for the request + */ + metadata?: Record; +} diff --git a/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts b/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts new file mode 100644 index 00000000..e82ee988 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts @@ -0,0 +1,20 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const BillingPortalParamsSchema = z.object({ + returnUrl: z.string().describe("URL to return to after exiting the billing portal. Must include http:// or\nhttps://").optional(), + openInNewTab: z.boolean().optional().describe("Whether to open billing portal in a new tab") +}); + +export interface BillingPortalParams { + /** + * URL to return to after exiting the billing portal. Must include http:// or +https:// + */ + returnUrl?: string; + + /** + * Whether to open billing portal in a new tab + */ + openInNewTab?: boolean; +} diff --git a/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts b/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts new file mode 100644 index 00000000..b43f2f86 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts @@ -0,0 +1,31 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const CancelParamsSchema = z.object({ + productId: z.string().describe("The ID of the product to cancel"), + cancelImmediately: z.boolean().describe("Whether to cancel the product immediately or at period end").optional(), + entityId: z.string().nullable().describe("The ID of the entity (optional)").optional(), + prorate: z.boolean().nullable().describe("Whether to prorate the cancellation (defaults to true if not specified)").optional() +}); + +export interface CancelParams { + /** + * The ID of the product to cancel + */ + productId: string; + + /** + * Whether to cancel the product immediately or at period end + */ + cancelImmediately?: boolean; + + /** + * The ID of the entity (optional) + */ + entityId?: string | null; + + /** + * Whether to prorate the cancellation (defaults to true if not specified) + */ + prorate?: boolean | null; +} diff --git a/autumn-js/src/libraries/react/clientTypes/checkTypes.ts b/autumn-js/src/libraries/react/clientTypes/checkTypes.ts new file mode 100644 index 00000000..4e244e0d --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/checkTypes.ts @@ -0,0 +1,71 @@ +// Auto-generated Zod schema +import { z } from "zod"; +import { CustomerDataSchema } from "./customerDataTypes"; +import { EntityDataSchema } from "./entityDataTypes"; +import type { CustomerData } from "./customerDataTypes"; +import type { EntityData } from "./entityDataTypes"; + +export const CheckParamsSchema = z.object({ + customerData: CustomerDataSchema.describe("Customer data to create or update the customer if they don't exist").optional(), + entityData: EntityDataSchema.describe("Entity data to create the entity if it doesn't exist").optional(), + entityId: z.string().describe("The ID of the entity (optional)").optional(), + featureId: z.string().describe("The ID of the feature to check access for").optional(), + productId: z.string().describe("The ID of the product to check").optional(), + requiredBalance: z.number().describe("The required balance for the check").optional(), + sendEvent: z.boolean().describe("Whether to send a usage event if allowed").optional(), + withPreview: z.boolean().describe("Whether to include preview information in the response").optional(), + dialog: z.any().optional().describe("Dialog configuration for feature check flow"), + properties: z.record(z.string(), z.any()).optional().describe("Additional properties for the feature check") +}); + +export interface CheckParams { + /** + * Customer data to create or update the customer if they don't exist + */ + customerData?: CustomerData; + + /** + * Entity data to create the entity if it doesn't exist + */ + entityData?: EntityData; + + /** + * The ID of the entity (optional) + */ + entityId?: string; + + /** + * The ID of the feature to check access for + */ + featureId?: string; + + /** + * The ID of the product to check + */ + productId?: string; + + /** + * The required balance for the check + */ + requiredBalance?: number; + + /** + * Whether to send a usage event if allowed + */ + sendEvent?: boolean; + + /** + * Whether to include preview information in the response + */ + withPreview?: boolean; + + /** + * Dialog configuration for feature check flow + */ + dialog?: any; + + /** + * Additional properties for the feature check + */ + properties?: Record; +} diff --git a/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts b/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts new file mode 100644 index 00000000..0a4330eb --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts @@ -0,0 +1,91 @@ +// Auto-generated Zod schema +import { z } from "zod"; +import { CustomerDataSchema } from "./customerDataTypes"; +import { EntityDataSchema } from "./entityDataTypes"; +import type { CustomerData } from "./customerDataTypes"; +import type { EntityData } from "./entityDataTypes"; + +export const CheckoutParamsOptionSchema = z.object({ + featureId: z.string(), + quantity: z.number(), + adjustableQuantity: z.boolean().nullable().optional(), + internalFeatureId: z.string().nullable().optional(), + upcomingQuantity: z.number().nullable().optional() +}); + +export const CheckoutParamsSchema = z.object({ + checkoutSessionParams: z.unknown().optional(), + customerData: CustomerDataSchema.describe("Customer data if using attach to auto create customer").optional(), + entityData: EntityDataSchema.describe("Entity data for creating an entity").optional(), + entityId: z.string().nullable().optional(), + forceCheckout: z.boolean().optional(), + freeTrial: z.boolean().optional(), + invoice: z.boolean().optional(), + options: z.array(CheckoutParamsOptionSchema).nullable().optional(), + productId: z.string().nullable().optional(), + productIds: z.array(z.string()).nullable().optional(), + reward: z.union([z.string(), z.array(z.string())]).optional(), + setupPayment: z.boolean().optional(), + skipCheckout: z.boolean().optional(), + successUrl: z.string().optional(), + dialog: z.any().optional().describe("Dialog configuration for checkout flow"), + openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab") +}); + +export interface CheckoutParamsOption { + featureId: string; + + quantity: number; + + adjustableQuantity?: boolean | null; + + internalFeatureId?: string | null; + + upcomingQuantity?: number | null; +} + +export interface CheckoutParams { + checkoutSessionParams?: unknown; + + /** + * Customer data if using attach to auto create customer + */ + customerData?: CustomerData; + + /** + * Entity data for creating an entity + */ + entityData?: EntityData; + + entityId?: string | null; + + forceCheckout?: boolean; + + freeTrial?: boolean; + + invoice?: boolean; + + options?: CheckoutParamsOption[] | null; + + productId?: string | null; + + productIds?: string[] | null; + + reward?: string | Array; + + setupPayment?: boolean; + + skipCheckout?: boolean; + + successUrl?: string; + + /** + * Dialog configuration for checkout flow + */ + dialog?: any; + + /** + * Whether to open checkout in a new tab + */ + openInNewTab?: boolean; +} diff --git a/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts b/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts new file mode 100644 index 00000000..53f89b13 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts @@ -0,0 +1,64 @@ +// Auto-generated Zod schema +import { z } from "zod"; +import { EntityDataSchema } from "./entityDataTypes"; +import type { EntityData } from "./entityDataTypes"; + +export const CustomerCreateParamsSchema = z.object({ + expand: z.string().describe("Query param:").optional(), + email: z.string().nullable().describe("Body param: Customer's email address").optional(), + entityData: EntityDataSchema.nullable().describe("Body param: Entity data for creating an entity").optional(), + entityId: z.string().nullable().describe("Body param: Entity ID to associate with the customer").optional(), + fingerprint: z.string().nullable().describe("Body param: Unique identifier (eg, serial number) to detect duplicate customers\nand prevent free trial abuse").optional(), + metadata: z.record(z.string(), z.unknown()).nullable().describe("Body param: Additional metadata for the customer").optional(), + name: z.string().nullable().describe("Body param: Customer's name").optional(), + stripeId: z.string().nullable().describe("Body param: Stripe customer ID if you already have one").optional(), + errorOnNotFound: z.boolean().optional().describe("Whether to return an error if customer is not found") +}); + +export interface CustomerCreateParams { + /** + * Query param: + */ + expand?: string; + + /** + * Body param: Customer's email address + */ + email?: string | null; + + /** + * Body param: Entity data for creating an entity + */ + entityData?: EntityData | null; + + /** + * Body param: Entity ID to associate with the customer + */ + entityId?: string | null; + + /** + * Body param: Unique identifier (eg, serial number) to detect duplicate customers +and prevent free trial abuse + */ + fingerprint?: string | null; + + /** + * Body param: Additional metadata for the customer + */ + metadata?: { [key: string]: unknown } | null; + + /** + * Body param: Customer's name + */ + name?: string | null; + + /** + * Body param: Stripe customer ID if you already have one + */ + stripeId?: string | null; + + /** + * Whether to return an error if customer is not found + */ + errorOnNotFound?: boolean; +} diff --git a/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts b/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts new file mode 100644 index 00000000..87533000 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts @@ -0,0 +1,25 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const EntityCreateParamsSchema = z.object({ + id: z.string().describe("The ID of the entity"), + featureId: z.string().describe("The ID of the feature this entity is associated with"), + name: z.string().nullable().describe("The name of the entity").optional() +}); + +export interface EntityCreateParams { + /** + * The ID of the entity + */ + id: string; + + /** + * The ID of the feature this entity is associated with + */ + featureId: string; + + /** + * The name of the entity + */ + name?: string | null; +} diff --git a/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts b/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts new file mode 100644 index 00000000..489e6776 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts @@ -0,0 +1,13 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const ReferralCreateCodeParamsSchema = z.object({ + programId: z.string().describe("ID of your referral program") +}); + +export interface ReferralCreateCodeParams { + /** + * ID of your referral program + */ + programId: string; +} diff --git a/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts b/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts new file mode 100644 index 00000000..351c6b64 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts @@ -0,0 +1,41 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const CustomerDataSchema = z.object({ + email: z.string().nullable().describe("Customer's email address").optional(), + fingerprint: z.string().nullable().describe("Unique identifier (eg, serial number) to detect duplicate customers and prevent\nfree trial abuse").optional(), + metadata: z.record(z.string(), z.unknown()).nullable().describe("Additional metadata for the customer").optional(), + name: z.string().nullable().describe("Customer's name").optional(), + stripeId: z.string().nullable().describe("Stripe customer ID if you already have one").optional() +}).describe("Customer data for creating or updating a customer"); + +/** + * Customer data for creating or updating a customer + */ +export interface CustomerData { + /** + * Customer's email address + */ + email?: string | null; + + /** + * Unique identifier (eg, serial number) to detect duplicate customers and prevent +free trial abuse + */ + fingerprint?: string | null; + + /** + * Additional metadata for the customer + */ + metadata?: { [key: string]: unknown } | null; + + /** + * Customer's name + */ + name?: string | null; + + /** + * Stripe customer ID if you already have one + */ + stripeId?: string | null; +} diff --git a/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts b/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts new file mode 100644 index 00000000..c6463b74 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts @@ -0,0 +1,22 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const EntityDataSchema = z.object({ + featureId: z.string().describe("The feature ID that this entity is associated with"), + name: z.string().describe("Name of the entity").optional() +}).describe("Entity data for creating an entity"); + +/** + * Entity data for creating an entity + */ +export interface EntityData { + /** + * The feature ID that this entity is associated with + */ + featureId: string; + + /** + * Name of the entity + */ + name?: string; +} diff --git a/autumn-js/src/libraries/react/clientTypes/getEntityTypes.ts b/autumn-js/src/libraries/react/clientTypes/getEntityTypes.ts new file mode 100644 index 00000000..51df2328 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/getEntityTypes.ts @@ -0,0 +1,13 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const EntityGetParamsSchema = z.object({ + expand: z.array(z.unknown()).describe("Query param:").optional() +}); + +export interface EntityGetParams { + /** + * Query param: + */ + expand?: 'invoices'[]; +} diff --git a/autumn-js/src/libraries/react/clientTypes/index.ts b/autumn-js/src/libraries/react/clientTypes/index.ts new file mode 100644 index 00000000..afd88f68 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/index.ts @@ -0,0 +1,19 @@ +// Auto-generated exports for all camelCase types +// This file is generated by typegen pipeline +// DO NOT EDIT MANUALLY - changes will be overwritten + +export * from './customerDataTypes'; +export * from './entityDataTypes'; +export * from './createCustomerTypes'; +export * from './createEntityTypes'; +export * from './getEntityTypes'; +export * from './createReferralCodeTypes'; +export * from './redeemReferralCodeTypes'; +export * from './attachTypes'; +export * from './checkoutTypes'; +export * from './billingPortalTypes'; +export * from './setupPaymentTypes'; +export * from './cancelTypes'; +export * from './checkTypes'; +export * from './trackTypes'; +export * from './queryTypes'; diff --git a/autumn-js/src/libraries/react/clientTypes/queryTypes.ts b/autumn-js/src/libraries/react/clientTypes/queryTypes.ts new file mode 100644 index 00000000..d95a934d --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/queryTypes.ts @@ -0,0 +1,19 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const QueryParamsSchema = z.object({ + featureId: z.union([z.string(), z.array(z.string())]).describe("The feature ID(s) to query"), + range: z.union([z.literal('24h'), z.literal('7d'), z.literal('30d'), z.literal('90d'), z.literal('last_cycle')]).nullable().describe("Time range for the query (defaults to last_cycle if not provided)").optional() +}); + +export interface QueryParams { + /** + * The feature ID(s) to query + */ + featureId: string | Array; + + /** + * Time range for the query (defaults to last_cycle if not provided) + */ + range?: '24h' | '7d' | '30d' | '90d' | 'last_cycle' | null; +} diff --git a/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts b/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts new file mode 100644 index 00000000..b65323ed --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts @@ -0,0 +1,13 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const ReferralRedeemCodeParamsSchema = z.object({ + code: z.string().describe("The referral code to redeem") +}); + +export interface ReferralRedeemCodeParams { + /** + * The referral code to redeem + */ + code: string; +} diff --git a/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts b/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts new file mode 100644 index 00000000..48c43529 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts @@ -0,0 +1,25 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const SetupPaymentParamsSchema = z.object({ + checkoutSessionParams: z.record(z.string(), z.unknown()).describe("Additional parameters for the checkout session").optional(), + successUrl: z.string().describe("URL to redirect to after successful payment setup").optional(), + openInNewTab: z.boolean().optional().describe("Whether to open payment setup in a new tab") +}); + +export interface SetupPaymentParams { + /** + * Additional parameters for the checkout session + */ + checkoutSessionParams?: { [key: string]: unknown }; + + /** + * URL to redirect to after successful payment setup + */ + successUrl?: string; + + /** + * Whether to open payment setup in a new tab + */ + openInNewTab?: boolean; +} diff --git a/autumn-js/src/libraries/react/clientTypes/trackTypes.ts b/autumn-js/src/libraries/react/clientTypes/trackTypes.ts new file mode 100644 index 00000000..ed442ad9 --- /dev/null +++ b/autumn-js/src/libraries/react/clientTypes/trackTypes.ts @@ -0,0 +1,71 @@ +// Auto-generated Zod schema +import { z } from "zod"; +import { CustomerDataSchema } from "./customerDataTypes"; +import { EntityDataSchema } from "./entityDataTypes"; +import type { CustomerData } from "./customerDataTypes"; +import type { EntityData } from "./entityDataTypes"; + +export const TrackParamsSchema = z.object({ + customerData: CustomerDataSchema.nullable().describe("Customer data for creating or updating a customer").optional(), + entityData: EntityDataSchema.nullable().describe("Entity data for creating an entity").optional(), + entityId: z.string().nullable().describe("The ID of the entity this event is associated with").optional(), + eventName: z.string().describe("The name of the event to track").optional(), + featureId: z.string().describe("The ID of the feature (alternative to event_name for usage events)").optional(), + idempotencyKey: z.string().nullable().describe("Idempotency key to prevent duplicate events").optional(), + properties: z.record(z.string(), z.unknown()).nullable().describe("Additional properties for the event").optional(), + setUsage: z.boolean().nullable().describe("Whether to set the usage to this value instead of increment").optional(), + timestamp: z.number().nullable().describe("Unix timestamp in milliseconds when the event occurred").optional(), + value: z.number().nullable().describe("The value/count of the event").optional() +}); + +export interface TrackParams { + /** + * Customer data for creating or updating a customer + */ + customerData?: CustomerData | null; + + /** + * Entity data for creating an entity + */ + entityData?: EntityData | null; + + /** + * The ID of the entity this event is associated with + */ + entityId?: string | null; + + /** + * The name of the event to track + */ + eventName?: string; + + /** + * The ID of the feature (alternative to event_name for usage events) + */ + featureId?: string; + + /** + * Idempotency key to prevent duplicate events + */ + idempotencyKey?: string | null; + + /** + * Additional properties for the event + */ + properties?: { [key: string]: unknown } | null; + + /** + * Whether to set the usage to this value instead of increment + */ + setUsage?: boolean | null; + + /** + * Unix timestamp in milliseconds when the event occurred + */ + timestamp?: number | null; + + /** + * The value/count of the event + */ + value?: number | null; +} diff --git a/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx b/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx index 82b3efe8..27253d6d 100644 --- a/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx +++ b/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx @@ -1,6 +1,7 @@ "use client"; import * as AccordionPrimitive from "@radix-ui/react-accordion"; -import type { CheckoutParams, CheckoutResult, ProductItem } from "@sdk"; +// import type { CheckoutParams, CheckoutResult, ProductItem } from "@sdk"; +import { Autumn } from "@sdk"; import { ArrowRight, ChevronDown, Loader2 } from "lucide-react"; import type React from "react"; import { useEffect, useState } from "react"; @@ -29,8 +30,8 @@ import { getCheckoutContent } from "./lib/checkout-content"; export interface CheckoutDialogProps { open: boolean; setOpen: (open: boolean) => void; - checkoutResult: CheckoutResult; - checkoutParams?: CheckoutParams; + checkoutResult: Autumn.CheckoutResponse; + checkoutParams?: Autumn.CheckoutParams; } const formatCurrency = ({ @@ -49,7 +50,7 @@ const formatCurrency = ({ export default function CheckoutDialog(params: CheckoutDialogProps) { const { attach } = useCustomer(); const [checkoutResult, setCheckoutResult] = useState< - CheckoutResult | undefined + Autumn.CheckoutResponse | undefined >(params?.checkoutResult); useEffect(() => { @@ -67,7 +68,7 @@ export default function CheckoutDialog(params: CheckoutDialogProps) { const { open, setOpen } = params; const { title, message } = getCheckoutContent(checkoutResult); - const isFree = checkoutResult?.product.properties?.is_free; + const isFree = checkoutResult?.product?.properties?.is_free; const isPaid = isFree === false; return ( @@ -91,7 +92,7 @@ export default function CheckoutDialog(params: CheckoutDialogProps) { onClick={async () => { setLoading(true); - const options = checkoutResult.options.map((option) => { + const options = checkoutResult.options?.map((option: Autumn.CheckoutResponse.Option) => { return { featureId: option.feature_id, quantity: option.quantity, @@ -99,7 +100,7 @@ export default function CheckoutDialog(params: CheckoutDialogProps) { }); await attach({ - productId: checkoutResult.product.id, + productId: checkoutResult.product?.id, ...(params.checkoutParams || {}), options, }); @@ -129,8 +130,8 @@ function PriceInformation({ checkoutResult, setCheckoutResult, }: { - checkoutResult: CheckoutResult; - setCheckoutResult: (checkoutResult: CheckoutResult) => void; + checkoutResult: Autumn.CheckoutResponse; + setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; }) { return (
@@ -149,13 +150,13 @@ function PriceInformation({ ); } -function DueAmounts({ checkoutResult }: { checkoutResult: CheckoutResult }) { +function DueAmounts({ checkoutResult }: { checkoutResult: Autumn.CheckoutResponse }) { const { next_cycle, product } = checkoutResult; const nextCycleAtStr = next_cycle ? new Date(next_cycle.starts_at).toLocaleDateString() : undefined; - const hasUsagePrice = product.items.some( + const hasUsagePrice = product?.items.some( (item) => item.usage_model === "pay_per_use", ); @@ -170,8 +171,8 @@ function DueAmounts({ checkoutResult }: { checkoutResult: CheckoutResult }) {

{formatCurrency({ - amount: checkoutResult?.total, - currency: checkoutResult?.currency, + amount: checkoutResult?.total ?? 0, + currency: checkoutResult?.currency ?? "usd", })}

@@ -182,8 +183,8 @@ function DueAmounts({ checkoutResult }: { checkoutResult: CheckoutResult }) {

{formatCurrency({ - amount: next_cycle.total, - currency: checkoutResult?.currency, + amount: next_cycle.total ?? 0, + currency: checkoutResult?.currency ?? "usd", })} {hasUsagePrice && + usage prices}

@@ -197,20 +198,20 @@ function ProductItems({ checkoutResult, setCheckoutResult, }: { - checkoutResult: CheckoutResult; - setCheckoutResult: (checkoutResult: CheckoutResult) => void; + checkoutResult: Autumn.CheckoutResponse; + setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; }) { const isUpdateQuantity = - checkoutResult?.product.scenario === "active" && - checkoutResult.product.properties.updateable; + checkoutResult?.product?.scenario === "active" && + checkoutResult.product?.properties?.updateable; - const isOneOff = checkoutResult?.product.properties.is_one_off; + const isOneOff = checkoutResult?.product?.properties?.is_one_off; return (

Price

- {checkoutResult?.product.items - .filter((item) => item.type !== "feature") + {checkoutResult?.product?.items + .filter((item: Autumn.ProductItem) => item.type !== "feature") .map((item, index) => { if (item.usage_model == "prepaid") { return ( @@ -246,7 +247,7 @@ function ProductItems({ ); } -function CheckoutLines({ checkoutResult }: { checkoutResult: CheckoutResult }) { +function CheckoutLines({ checkoutResult }: { checkoutResult: Autumn.CheckoutResponse }) { return ( @@ -263,7 +264,7 @@ function CheckoutLines({ checkoutResult }: { checkoutResult: CheckoutResult }) { {checkoutResult?.lines - .filter((line) => line.amount !== 0) + .filter((line: Autumn.CheckoutResponse.Line) => line.amount !== 0) .map((line, index) => { return (
@@ -271,7 +272,7 @@ function CheckoutLines({ checkoutResult }: { checkoutResult: CheckoutResult }) {

{new Intl.NumberFormat("en-US", { style: "currency", - currency: checkoutResult?.currency, + currency: checkoutResult?.currency ?? "usd", }).format(line.amount)}

@@ -309,23 +310,26 @@ const PrepaidItem = ({ checkoutResult, setCheckoutResult, }: { - item: ProductItem; - checkoutResult: CheckoutResult; - setCheckoutResult: (checkoutResult: CheckoutResult) => void; + item: Autumn.ProductItem; + checkoutResult: Autumn.CheckoutResponse; + setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; }) => { - const { quantity = 0, billing_units: billingUnits = 1 } = item; + let { quantity = 0, billing_units: billingUnits = 1 } = item; + quantity = quantity ?? 0; + billingUnits = billingUnits ?? 1; + const [quantityInput, setQuantityInput] = useState( (quantity / billingUnits).toString(), ); const { checkout } = useCustomer(); const [loading, setLoading] = useState(false); const [open, setOpen] = useState(false); - const scenario = checkoutResult.product.scenario; + const scenario = checkoutResult.product?.scenario; const handleSave = async () => { setLoading(true); try { - const newOptions = checkoutResult.options + const newOptions = (checkoutResult.options ?? []) .filter((option) => option.feature_id !== item.feature_id) .map((option) => { return { @@ -339,16 +343,12 @@ const PrepaidItem = ({ quantity: Number(quantityInput) * billingUnits, }); - const { data, error } = await checkout({ - productId: checkoutResult.product.id, + const data = await checkout({ + productId: checkoutResult.product?.id, options: newOptions, dialog: CheckoutDialog, }); - if (error) { - console.error(error); - return; - } setCheckoutResult(data!); } catch (error) { console.error(error); diff --git a/autumn-js/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx b/autumn-js/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx index c4db01ff..ec2d5bb3 100644 --- a/autumn-js/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx +++ b/autumn-js/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx @@ -1,15 +1,20 @@ -import { type CheckoutResult } from "@sdk"; +import { Autumn } from "@sdk"; -export const getCheckoutContent = (checkoutResult: CheckoutResult) => { +export const getCheckoutContent = (checkoutResult: Autumn.CheckoutResponse) => { const { product, current_product, next_cycle } = checkoutResult; - const { is_one_off, is_free, has_trial, updateable } = product.properties; - const scenario = product.scenario; + const { is_one_off, is_free, has_trial, updateable } = product?.properties || { + is_one_off: false, + is_free: false, + has_trial: false, + updateable: false, + }; + const scenario = product?.scenario; const nextCycleAtStr = next_cycle ? new Date(next_cycle.starts_at).toLocaleDateString() : undefined; - const productName = product.name; + const productName = product?.name || ""; if (is_one_off) { return { @@ -55,7 +60,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult) => { title:

{productName} product already scheduled

, message: (

- You are currently on product {current_product.name} and are + You are currently on product {current_product?.name || ""} and are scheduled to start {productName} on {nextCycleAtStr}.

), @@ -116,7 +121,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult) => { message: (

By clicking confirm, your current subscription to{" "} - {current_product.name} will be cancelled and a new subscription to{" "} + {current_product?.name || ""} will be cancelled and a new subscription to{" "} {productName} will begin on {nextCycleAtStr}.

), @@ -127,7 +132,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult) => { title:

Cancel

, message: (

- By clicking confirm, your subscription to {current_product.name}{" "} + By clicking confirm, your subscription to {current_product?.name || ""}{" "} will end on {nextCycleAtStr}.

), diff --git a/autumn-js/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx b/autumn-js/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx index e6721288..452eb442 100644 --- a/autumn-js/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx +++ b/autumn-js/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx @@ -1,6 +1,6 @@ -import { type CheckFeaturePreview } from "@sdk"; +import { Autumn } from "@sdk"; -export const getPaywallContent = (preview?: CheckFeaturePreview) => { +export const getPaywallContent = (preview?: Autumn.CheckResponse.Preview) => { if (!preview) { return { title: "Feature Unavailable", diff --git a/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx b/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx index e8594a69..7d3e91bc 100644 --- a/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx +++ b/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx @@ -1,8 +1,8 @@ -import { type Product } from "@sdk"; +import { type ProductWithDisplay } from "@/index"; -export const getPricingTableContent = (product: Product) => { - const { scenario, free_trial, properties } = product; - const { is_one_off, updateable, has_trial } = properties; +export const getPricingTableContent = (product: ProductWithDisplay) => { + const { scenario, properties } = product; + const { is_one_off = false, updateable = false, has_trial = false } = properties || {}; if (has_trial) { return { diff --git a/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx b/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx index 29af4acd..6348d0a4 100644 --- a/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx +++ b/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx @@ -1,13 +1,13 @@ import React from "react"; -import { useCustomer, usePricingTable, ProductDetails } from "@/index"; +import { useCustomer, usePricingTable, ProductDetails, ProductWithDisplay } from "@/index"; +import { Autumn } from "@sdk"; import { createContext, useContext, useState } from "react"; import { cn } from "@/lib/utils"; import { Switch } from "@/components/ui/switch"; import { Button } from "@/components/ui/button"; import CheckoutDialog from "../checkout-dialog/checkout-dialog-synced"; import { getPricingTableContent } from "./lib/pricing-table-content"; -import type { Product, ProductItem } from "@sdk"; import { loadingStyles, spinnerStyles } from "@/utils/inject-styles"; import { Loader2 } from "lucide-react"; @@ -41,7 +41,7 @@ export default function PricingTable({ const multiInterval = intervals.length > 1; - const intervalFilter = (product: Product) => { + const intervalFilter = (product: Autumn.Product) => { if (!product.properties?.interval_group) { return true; } @@ -73,7 +73,7 @@ export default function PricingTable({ buttonProps={{ disabled: (product.scenario === "active" && - !product.properties.updateable) || + !product.properties?.updateable) || product.scenario === "scheduled", onClick: async () => { @@ -98,7 +98,7 @@ export default function PricingTable({ const PricingTableContext = createContext<{ isAnnualToggle: boolean; setIsAnnualToggle: (isAnnual: boolean) => void; - products: Product[]; + products: ProductWithDisplay[]; showFeatures: boolean; }>({ isAnnualToggle: false, @@ -127,7 +127,7 @@ export const PricingTableContainer = ({ multiInterval, }: { children?: React.ReactNode; - products?: Product[]; + products?: ProductWithDisplay[]; showFeatures?: boolean; className?: string; isAnnualToggle: boolean; @@ -289,7 +289,7 @@ export const PricingFeatureList = ({ everythingFrom, className, }: { - items: ProductItem[]; + items: Autumn.Products.ProductItem[]; everythingFrom?: string; className?: string; }) => { diff --git a/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts b/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts index 10f8d553..962e3738 100644 --- a/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts +++ b/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts @@ -1,16 +1,15 @@ import { AutumnContextParams } from "@/AutumnContext"; -import { CheckParams } from "@/client/types/clientGenTypes"; -import { - AutumnError, - CheckFeatureResult, - CheckFeatureResultSchema, - CheckProductResult, - CheckResult, - Customer, - CustomerFeature, - Entity, -} from "@sdk"; -import { Result } from "@sdk/response"; +import { CheckParams } from "@/clientTypes"; +import Autumn from "@sdk"; +// import { +// CheckFeatureResult, +// CheckFeatureResultSchema, +// CheckProductResult, +// CheckResult, +// Customer, +// CustomerFeature, +// Entity +// } from "@sdk"; export interface AllowedParams { featureId?: string; @@ -23,12 +22,12 @@ const getCusFeature = ({ featureId, requiredBalance = 1, }: { - customer: Customer | Entity; + customer: Autumn.Customer | Autumn.Entity; featureId: string; requiredBalance?: number; }) => { // 1. If there's a cusFeature and balance > requiredBalance, use it... - let cusFeature = customer.features[featureId]; + let cusFeature = customer.features?.[featureId]; if ( cusFeature && typeof cusFeature.balance === "number" && @@ -41,8 +40,8 @@ const getCusFeature = ({ } // 1. If credit system exists, use it - let creditSchema = Object.values(customer.features).find( - (f: CustomerFeature) => + let creditSchema = Object.values(customer.features ?? {}).find( + (f: Autumn.CustomerFeature) => f.credit_schema && f.credit_schema.some((c) => c.feature_id === featureId) ); @@ -69,7 +68,7 @@ const getFeatureAllowed = ({ cusFeature, requiredBalance, }: { - cusFeature: CustomerFeature | undefined; + cusFeature: Autumn.CustomerFeature | undefined; requiredBalance: number; }) => { if (!cusFeature) return false; @@ -88,7 +87,7 @@ const handleFeatureCheck = ({ isEntity, params, }: { - customer: Customer | Entity; + customer: Autumn.Customer | Autumn.Entity; isEntity?: boolean; params: AllowedParams; }) => { @@ -109,56 +108,57 @@ const handleFeatureCheck = ({ let result = { allowed, feature_id: cusFeature?.id ?? params.featureId!, - customer_id: isEntity ? (customer as Entity).customer_id : customer.id, + customer_id: isEntity ? (customer as Autumn.Entity).customer_id : customer.id, required_balance: requiredBalance, + code: "", ...cusFeature, - } as CheckFeatureResult; + } as Autumn.CheckResponse; if (isEntity) { - result.entity_id = (customer as Entity).id; + result.entity_id = (customer as Autumn.Entity).id; } try { - return CheckFeatureResultSchema.parse(result); + return result; } catch (error) { return result; } }; -const handleProductCheck = ({ - customer, - isEntity, - params, -}: { - customer: Customer | Entity; - isEntity?: boolean; - params: AllowedParams; -}) => { - let product = customer.products.find((p) => p.id == params.productId); - let allowed = product?.status === "active"; - - let result = { - allowed, - customer_id: isEntity ? (customer as Entity).customer_id : customer.id, - product_id: params.productId!, - } as CheckProductResult; - if (product) { - result.status = product.status; - } - - if (isEntity) { - result.entity_id = (customer as Entity).id; - } - - return result; -}; +// const handleProductCheck = ({ +// customer, +// isEntity, +// params, +// }: { +// customer: Autumn.Customer | Autumn.Entity; +// isEntity?: boolean; +// params: AllowedParams; +// }) => { +// let product = customer.products.find((p) => p.id == params.productId); +// let allowed = product?.status === "active"; + +// let result = { +// allowed, +// customer_id: isEntity ? (customer as Autumn.Entity).customer_id : customer.id, +// product_id: params.productId!, +// } as CheckProductResult; +// if (product) { +// result.status = product.status; +// } + +// if (isEntity) { +// result.entity_id = (customer as Autumn.Entity).id; +// } + +// return result; +// }; export const openDialog = ({ result, params, context, }: { - result: CheckResult | null; + result: Autumn.CheckResponse | null; params: CheckParams; context: AutumnContextParams; }) => { @@ -198,40 +198,24 @@ export const handleCheck = ({ params, context, }: { - customer: Customer | Entity | null; + customer: Autumn.Customer | Autumn.Entity | null; isEntity?: boolean; params: CheckParams; context?: AutumnContextParams; -}): { - data: CheckResult; - error: null; -} => { +}): Autumn.CheckResponse => { if (!customer) { return { - data: { - allowed: false, - feature_id: "", - customer_id: "", - required_balance: 0, - } as CheckResult, - error: null, - }; + allowed: false, + feature_id: "", + customer_id: "", + required_balance: 0, + code: "", + } as Autumn.CheckResponse; } if (!params.featureId && !params.productId) { throw new Error("allowed() requires either featureId or productId"); } - let result; - - if (params.featureId) - result = handleFeatureCheck({ customer, params, isEntity }); - - if (params.productId) - result = handleProductCheck({ customer, params, isEntity }); - - return { - data: result as CheckResult, - error: null, - }; + return handleFeatureCheck({ customer, params, isEntity }); }; diff --git a/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx b/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx index e2882d8f..488eeab7 100644 --- a/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx +++ b/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx @@ -1,25 +1,12 @@ -import { - BillingPortalResult, - CancelResult, - CheckResult, - SetupPaymentResult, - TrackResult, -} from "@sdk"; + +import Autumn from "@sdk"; import { AutumnContextParams } from "@/AutumnContext"; -import { - CancelParams, - CheckParams, - OpenBillingPortalParams, - SetupPaymentParams, - TrackParams, -} from "@/client/types/clientGenTypes"; -import { AutumnPromise } from "@sdk"; import { usePricingTableBase } from "../usePricingTableBase"; -import { AttachResult } from "@sdk/general/attachTypes"; -import { AttachParams, CheckoutParams } from "@/client/types/clientAttachTypes"; +import { AttachParams, CheckoutParams, CancelParams, BillingPortalParams, SetupPaymentParams, TrackParams } from "@/clientTypes"; import { AutumnClient } from "@/client/ReactAutumnClient"; import { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; + export const useAutumnBase = ({ // AutumnContext, context, @@ -35,20 +22,14 @@ export const useAutumnBase = ({ const { refetch: refetchPricingTable } = usePricingTableBase({ client }); - const attachWithoutDialog = async (params: AttachParams) => { + const attachWithoutDialog = async (params: AttachParams): Promise => { const result = await client.attach(params); - if (result.error) { - return result; - } - - let data = result.data; - - if (data?.checkout_url && typeof window !== "undefined") { + if (result.checkout_url && typeof window !== "undefined") { if (params.openInNewTab) { - window.open(data.checkout_url, "_blank"); + window.open(result.checkout_url, "_blank"); } else { - window.location.href = data.checkout_url; + window.location.href = result.checkout_url; } } @@ -62,8 +43,8 @@ export const useAutumnBase = ({ return result; }; - const checkout = async (params: CheckoutParams) => { - const { data, error } = await client.checkout(params); + const checkout = async (params: CheckoutParams): Promise => { + const data = await client.checkout(params); const { dialog, ...rest } = params; if (params.dialog && params.productIds) { @@ -72,11 +53,9 @@ export const useAutumnBase = ({ ); } - if (error) { - return { data, error }; - } + - const hasPrepaid = data.product.items.some( + const hasPrepaid = data.product?.items?.some( (item: any) => item.usage_model === "prepaid" ); @@ -89,7 +68,7 @@ export const useAutumnBase = ({ window.location.href = data.url; } - return { data, error }; + return data; } if (params.dialog) { @@ -98,28 +77,23 @@ export const useAutumnBase = ({ attachDialog?.setOpen(true); } - return { data, error }; + return data; }; const attachWithDialog = async ( params: AttachParams - ): AutumnPromise => { + ): Promise => { let { ...rest } = params; - const { productId, entityId, entityData } = params; + const { entityId, entityData } = params; const checkRes = await client.check({ - productId, - entityId, entityData, withPreview: true, + entityId: entityId ?? undefined, }); - if (checkRes.error) { - return checkRes; - } - - let preview = checkRes.data.preview; + let preview = checkRes.preview; if (!preview) { return await attachWithoutDialog(rest); @@ -131,67 +105,31 @@ export const useAutumnBase = ({ return checkRes; }; - const attach = async (params: AttachParams) => { + const attach = async (params: AttachParams): Promise => { const { dialog } = params; if (dialog && !attachDialog?.open) { attachDialog?.setComponent(dialog); - return await attachWithDialog(params); + return await attachWithDialog(params) as Autumn.AttachResponse; } return await attachWithoutDialog(params); }; - const cancel = async (params: CancelParams): AutumnPromise => { + const cancel = async (params: CancelParams): Promise => { const res = await client.cancel(params); - - if (res.error) { - return res; - } - return res; }; - // const check = async (params: CheckParams): AutumnPromise => { - // let { dialog, withPreview } = params; - - // if (dialog) { - // paywallDialog?.setComponent(dialog); - // } - - // const res = await client.check({ - // ...params, - // withPreview: withPreview || dialog ? true : false, - // }); - - // if (res.error) { - // return res; - // } - - // let data = res.data; - - // if (data && data.preview && dialog) { - // let preview = data.preview; - // paywallDialog?.setProps({ preview }); - // paywallDialog?.setOpen(true); - // } - // return res; - // }; - - const track = async (params: TrackParams): AutumnPromise => { + const track = async (params: TrackParams): Promise => { const res = await client.track(params); - - if (res.error) { - return res; - } - return res; }; const openBillingPortal = async ( - params?: OpenBillingPortalParams - ): AutumnPromise => { + params?: BillingPortalParams + ): Promise => { let defaultParams = { openInNewTab: false, }; @@ -203,28 +141,20 @@ export const useAutumnBase = ({ const res = await client.openBillingPortal(finalParams); - if (res.error) { - return res; - } - - let data = res.data; - - if (data?.url && typeof window !== "undefined") { + if (res.url && typeof window !== "undefined") { if (finalParams.openInNewTab) { - window.open(data.url, "_blank"); + window.open(res.url, "_blank"); } else { - window.open(data.url, "_self"); + window.open(res.url, "_self"); } - - return res; - } else { - return res; } + + return res; }; const setupPayment = async ( params?: SetupPaymentParams - ): AutumnPromise => { + ): Promise => { let defaultParams = { openInNewTab: false, }; @@ -236,17 +166,15 @@ export const useAutumnBase = ({ const res = await client.setupPayment(finalParams); - if (res.data?.url && typeof window !== "undefined") { + if (res.url && typeof window !== "undefined") { if (finalParams.openInNewTab) { - window.open(res.data.url, "_blank"); + window.open(res.url, "_blank"); } else { - window.open(res.data.url, "_self"); + window.open(res.url, "_self"); } - - return res; - } else { - return res; } + + return res; }; return { diff --git a/autumn-js/src/libraries/react/hooks/useAnalytics.tsx b/autumn-js/src/libraries/react/hooks/useAnalytics.tsx index 0cea4ae0..1e0aa144 100644 --- a/autumn-js/src/libraries/react/hooks/useAnalytics.tsx +++ b/autumn-js/src/libraries/react/hooks/useAnalytics.tsx @@ -1,6 +1,6 @@ import { AutumnContext, useAutumnContext } from "@/AutumnContext"; -import { QueryParams } from "@/client/types/clientGenTypes"; -import { AutumnError, QueryResult } from "@sdk"; +import { QueryParams } from "@/clientTypes"; +import Autumn from "@sdk"; import useSWR from "swr"; export const useAnalytics = (params: QueryParams) => { @@ -12,27 +12,19 @@ export const useAnalytics = (params: QueryParams) => { const client = context.client; const fetcher = async () => { - try { - const { data, error } = await client.query(params); - if (error) throw error; + const data = await client.query(params); - return data; - } catch (error) { - throw new AutumnError({ - message: "Failed to fetch analytics", - code: "fetch_analytics_failed", - }); - } + return data?.list || []; }; - const { data, error, mutate } = useSWR( + const { data, error, mutate } = useSWR( ["analytics", params.featureId, params.range], fetcher, { refreshInterval: 0 } ); return { - data: data?.list, + data: data, isLoading: !error && !data, error, refetch: mutate, diff --git a/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx b/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx index b0396122..22fcbbf6 100644 --- a/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx +++ b/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx @@ -1,48 +1,22 @@ import type { + Autumn, AutumnError, - AutumnPromise, - BillingPortalResult, - CancelResult, - CheckResult, - CreateReferralCodeResult, - Customer, - CustomerExpandOption, - Entity, - RedeemReferralCodeResult, - SetupPaymentResult, - TrackResult, } from "@sdk"; -import type { AttachResult, CheckoutResult } from "@sdk/general/attachTypes"; -import type { Success } from "@sdk/response"; + import type React from "react"; -import { useEffect } from "react"; import useSWR, { type SWRConfiguration } from "swr"; -import type { - AttachParams, - CheckoutParams, -} from "@/client/types/clientAttachTypes"; -import type { - CancelParams, - CheckParams, - OpenBillingPortalParams, - SetupPaymentParams, - TrackParams, -} from "@/client/types/clientGenTypes"; + import { handleCheck, openDialog } from "./helpers/handleCheck"; import { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; import { AutumnClient } from "@/client/ReactAutumnClient"; import { AutumnContextParams, useAutumnContext } from "@/AutumnContext"; import { useAutumnBase } from "./helpers/useAutumnBase"; -import { CreateEntityParams } from "@/client/types/clientEntTypes"; -import { - CreateReferralCodeParams, - RedeemReferralCodeParams, -} from "@/client/types/clientReferralTypes"; +import { AttachParams, CheckoutParams, CancelParams, TrackParams, SetupPaymentParams, BillingPortalParams, CheckParams, EntityCreateParams } from "@/clientTypes"; -export interface UseCustomerResult { +export interface UseCustomerResult { /** The current customer data including subscription and feature information */ - customer: Customer | null; + customer: Autumn.Customer | null; /** Whether customer data is currently being loaded */ isLoading: boolean; /** Any error that occurred while fetching customer data */ @@ -53,19 +27,19 @@ export interface UseCustomerResult { * Attaches a product to the current customer, enabling access and handling billing. * Activates a product and applies all product items with automatic payment handling. */ - attach: (params: AttachParams) => AutumnPromise; + attach: (params: AttachParams) => Promise; /** * Tracks usage events for metered features. * Records feature usage and updates customer balances server-side. */ - track: (params: TrackParams) => AutumnPromise; + track: (params: TrackParams) => Promise; /** * Cancels a customer's subscription or product attachment. * Can cancel immediately or at the end of the billing cycle. */ - cancel: (params: CancelParams) => AutumnPromise; + cancel: (params: CancelParams) => Promise; /** * Sets up a payment method for the customer. @@ -73,59 +47,61 @@ export interface UseCustomerResult { */ setupPayment: ( params: SetupPaymentParams - ) => AutumnPromise; + ) => Promise; /** * Opens the Stripe billing portal for the customer. * Allows customers to manage their subscription and payment methods. */ openBillingPortal: ( - params?: OpenBillingPortalParams - ) => AutumnPromise; + params?: BillingPortalParams + ) => Promise; /** * Initiates a checkout flow for product purchase. * Handles payment collection and redirects to Stripe checkout when needed. */ - checkout: (params: CheckoutParams) => AutumnPromise; + checkout: (params: CheckoutParams) => Promise; /** Refetches the customer data from the server */ - refetch: () => Promise; + refetch: () => Promise; /** * Creates new entities for granular feature tracking. * Entities allow per-user or per-workspace feature limits. */ createEntity: ( - params: CreateEntityParams | CreateEntityParams[] - ) => AutumnPromise; - - /** - * Creates a referral code for the customer. - * Generates codes that can be shared for referral programs. - */ - createReferralCode: ( - params: CreateReferralCodeParams - ) => AutumnPromise; - - /** - * Redeems a referral code for the customer. - * Applies referral benefits when a valid code is provided. - */ - redeemReferralCode: ( - params: RedeemReferralCodeParams - ) => AutumnPromise; + params: EntityCreateParams + ) => Promise; /** * Checks if a customer has access to a feature and shows paywalls if needed. * Client-side feature gating with optional dialog display for upgrades. */ - check: (params: CheckParams) => Success; + check: (params: CheckParams) => Autumn.CheckResponse; + + // /** + // * Creates a referral code for the customer. + // * Generates codes that can be shared for referral programs. + // */ + // createReferralCode: ( + // params: CreateReferralCodeParams + // ) => AutumnPromise; + + // /** + // * Redeems a referral code for the customer. + // * Applies referral benefits when a valid code is provided. + // */ + // redeemReferralCode: ( + // params: RedeemReferralCodeParams + // ) => AutumnPromise; + + } export interface UseCustomerParams { errorOnNotFound?: boolean; - expand?: CustomerExpandOption[]; + expand?: Autumn.Customers.CustomerGetParams['expand']; swrConfig?: SWRConfiguration; } @@ -156,20 +132,20 @@ export const useCustomerBase = ({ const queryKey = ["customer", baseUrl, params?.expand]; const fetchCustomer = async () => { - const { data, error } = await client!.createCustomer({ + return await client!.createCustomer({ errorOnNotFound: params?.errorOnNotFound, - expand: params?.expand, + expand: params?.expand?.join(","), }); - if (error) { - throw error; - } + // if (error) { + // throw error; + // } - if (!data) { - return null; - } + // if (!data) { + // return null; + // } - return data; + // return data; }; const { @@ -197,12 +173,12 @@ export const useCustomerBase = ({ customer: error ? null : customer, isLoading, error, - refetch: mutate as () => Promise, + refetch: mutate as () => Promise, ...autumnFunctions, createEntity: client.entities.create, - createReferralCode: client.referrals.createCode, - redeemReferralCode: client.referrals.redeemCode, + // createReferralCode: client.referrals.createCode, + // redeemReferralCode: client.referrals.redeemCode, check: (params: CheckParams) => { const res = handleCheck({ customer, @@ -212,7 +188,7 @@ export const useCustomerBase = ({ }); openDialog({ - result: res.data, + result: res, params, context: context!, }); diff --git a/autumn-js/src/libraries/react/hooks/useEntity.tsx b/autumn-js/src/libraries/react/hooks/useEntity.tsx index 790b7a57..5140bb14 100644 --- a/autumn-js/src/libraries/react/hooks/useEntity.tsx +++ b/autumn-js/src/libraries/react/hooks/useEntity.tsx @@ -1,10 +1,10 @@ import { AutumnContext } from "../AutumnContext"; -import { GetEntityParams } from "../client/types/clientEntTypes"; +import { EntityGetParams } from "@/clientTypes"; import { useEntityBase } from "./useEntityBase"; export const useEntity = ( entityId: string | null, - params?: GetEntityParams + params?: EntityGetParams ) => { return useEntityBase({ AutumnContext, entityId, params }); }; diff --git a/autumn-js/src/libraries/react/hooks/useEntityBase.tsx b/autumn-js/src/libraries/react/hooks/useEntityBase.tsx index 4cfd2d01..50680645 100644 --- a/autumn-js/src/libraries/react/hooks/useEntityBase.tsx +++ b/autumn-js/src/libraries/react/hooks/useEntityBase.tsx @@ -1,15 +1,15 @@ import useSWR from "swr"; -import { GetEntityParams } from "../../../libraries/react/client/types/clientEntTypes"; import { useContext } from "react"; import { AutumnContextParams, useAutumnContext } from "../AutumnContext"; -import { AllowedParams, handleCheck, openDialog } from "./helpers/handleCheck"; +import { handleCheck, openDialog } from "./helpers/handleCheck"; import { useAutumnBase } from "./helpers/useAutumnBase"; import { + EntityGetParams, CancelParams, CheckParams, TrackParams, -} from "@/client/types/clientGenTypes"; -import { AttachParams } from "@/client/types/clientAttachTypes"; + AttachParams, +} from "@/clientTypes"; export const useEntityBase = ({ entityId, @@ -17,7 +17,7 @@ export const useEntityBase = ({ AutumnContext, }: { entityId: string | null; - params?: GetEntityParams; + params?: EntityGetParams; AutumnContext: React.Context; }) => { const { client } = useContext(AutumnContext); @@ -34,17 +34,7 @@ export const useEntityBase = ({ } - const { data, error } = await client.entities.get(entityId, params); - - if (error) { - throw error; - } - - if (!data) { - return null; - } - - return data; + return await client.entities.get(entityId, params); }; const { data, error, isLoading, mutate } = useSWR(queryKey, fetchEntity, { @@ -69,7 +59,7 @@ export const useEntityBase = ({ const result = handleCheck({ customer: data, params, isEntity: true }); openDialog({ - result: result.data, + result: result, params, context: context!, }); diff --git a/autumn-js/src/libraries/react/hooks/usePaywall.tsx b/autumn-js/src/libraries/react/hooks/usePaywall.tsx index 87fbde5b..72b2fb89 100644 --- a/autumn-js/src/libraries/react/hooks/usePaywall.tsx +++ b/autumn-js/src/libraries/react/hooks/usePaywall.tsx @@ -1,6 +1,5 @@ import { AutumnContext, useAutumnContext } from "@/AutumnContext"; -import { AutumnClient } from "@/client/ReactAutumnClient"; -import { CheckFeaturePreview } from "@sdk"; +import Autumn from "@sdk"; import useSWR from "swr"; export const usePaywall = ({ @@ -22,12 +21,10 @@ export const usePaywall = ({ return { preview: undefined }; } - const { data, error } = await context.client.check({ + return await context.client.check({ featureId, withPreview: true, }); - if (error) throw error; - return data; }; const queryKey = [`check`, featureId, entityId]; @@ -38,7 +35,7 @@ export const usePaywall = ({ }); return { - data: data?.preview as CheckFeaturePreview | undefined, + data: data?.preview as Autumn.CheckResponse.Preview | undefined, error, isLoading, }; diff --git a/autumn-js/src/libraries/react/hooks/usePricingTable.tsx b/autumn-js/src/libraries/react/hooks/usePricingTable.tsx index f3bcac40..bdcec0a7 100644 --- a/autumn-js/src/libraries/react/hooks/usePricingTable.tsx +++ b/autumn-js/src/libraries/react/hooks/usePricingTable.tsx @@ -1,6 +1,7 @@ import { usePricingTableBase } from "./usePricingTableBase"; -import { ProductDetails } from "../client/types/clientPricingTableTypes"; import { AutumnContext, useAutumnContext } from "@/AutumnContext"; +import { ProductDetails } from "../client/ProductDetails"; + export const usePricingTable = (params?: { productDetails?: ProductDetails[]; diff --git a/autumn-js/src/libraries/react/hooks/usePricingTableBase.tsx b/autumn-js/src/libraries/react/hooks/usePricingTableBase.tsx index 9f7f6fca..70d1ec1c 100644 --- a/autumn-js/src/libraries/react/hooks/usePricingTableBase.tsx +++ b/autumn-js/src/libraries/react/hooks/usePricingTableBase.tsx @@ -1,14 +1,15 @@ import useSWR, { SWRConfiguration } from "swr"; -import { AutumnError, Product } from "@sdk"; -import { ProductDetails } from "../client/types/clientPricingTableTypes"; -import { AutumnContextParams, useAutumnContext } from "../AutumnContext"; +import { ProductDetails, ProductWithDisplay } from "../client/ProductDetails"; import { AutumnClient } from "@/client/ReactAutumnClient"; import { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; +import Autumn from "@sdk"; + + const mergeProductDetails = ( - products: Product[] | undefined, + products: Autumn.Product[] | undefined, productDetails?: ProductDetails[] -): Product[] | null => { +): ProductWithDisplay[] | null => { if (!products) { return null; } @@ -33,7 +34,7 @@ const mergeProductDetails = ( let fetchedProducts = structuredClone(products); - let mergedProducts: Product[] = []; + let mergedProducts: ProductWithDisplay[] = []; for (const overrideDetails of productDetails) { if (!overrideDetails.id) { @@ -80,7 +81,7 @@ const mergeProductDetails = ( }, items: overrideItems, properties, - } as unknown as Product); + } as unknown as Autumn.Product); continue; } @@ -106,10 +107,10 @@ const mergeProductDetails = ( let overrideProperties = fetchedProduct.properties || {}; let overrideItems = overrideDetails.items; let overridePrice = overrideDetails.price; - let mergedItems = []; + let mergedItems: Autumn.Products.ProductItem[] = []; if (overridePrice) { - overrideProperties.is_free = false; + // overrideProperties.is_free = false; if (originalIsFree || overrideItems !== undefined) { mergedItems.push({ @@ -135,7 +136,7 @@ const mergeProductDetails = ( if (!overrideItem.featureId) { mergedItems.push({ display: { - primary_text: overrideItem.primaryText, + primary_text: overrideItem.primaryText || "", secondary_text: overrideItem.secondaryText, }, }); @@ -153,7 +154,7 @@ const mergeProductDetails = ( ...fetchedItem, display: { primary_text: - overrideItem.primaryText || fetchedItem.display?.primary_text, + overrideItem.primaryText || fetchedItem.display?.primary_text || "", secondary_text: overrideItem.secondaryText || fetchedItem.display?.secondary_text, @@ -165,10 +166,17 @@ const mergeProductDetails = ( mergedItems = fetchedProduct.items; } - const mergedProduct: Product = { + const mergedProduct: Autumn.Product & { display: { + name?: string; + description?: string; + button_text?: string; + recommend_text?: string; + everything_from?: string; + button_url?: string; + } } = { ...fetchedProduct, items: mergedItems, - properties: overrideProperties, + properties: overrideProperties as Autumn.Product["properties"], display: { name: displayName, description: overrideDetails.description, @@ -198,20 +206,12 @@ export const usePricingTableBase = ({ }; }) => { const fetcher = async () => { - try { - const { data, error } = await client.products.list(); - if (error) throw error; - - return data?.list || []; - } catch (error) { - throw new AutumnError({ - message: "Failed to fetch pricing table products", - code: "failed_to_fetch_pricing_table_products", - }); - } + const data = await client.products.list(); + + return data?.list || []; }; - const { data, error, mutate } = useSWR( + const { data, error, mutate } = useSWR( ["pricing-table", client.backendUrl], fetcher, { ...defaultSWRConfig } diff --git a/autumn-js/src/libraries/react/hooks/useProductsBase.tsx b/autumn-js/src/libraries/react/hooks/useProductsBase.tsx index b0457f6c..bc66aee0 100644 --- a/autumn-js/src/libraries/react/hooks/useProductsBase.tsx +++ b/autumn-js/src/libraries/react/hooks/useProductsBase.tsx @@ -1,11 +1,9 @@ import { AutumnClient } from "@/client/ReactAutumnClient"; -import { AutumnContext, useAutumnContext } from "../AutumnContext"; import useSWR from "swr"; export const useProductsBase = ({ client }: { client: AutumnClient }) => { const fetcher = async () => { - const { data, error } = await client.products.list(); - if (error) throw error; + const data = await client.products.list(); return data?.list || []; }; diff --git a/autumn-js/src/libraries/react/index.ts b/autumn-js/src/libraries/react/index.ts index ca78457f..19738e7e 100644 --- a/autumn-js/src/libraries/react/index.ts +++ b/autumn-js/src/libraries/react/index.ts @@ -4,8 +4,7 @@ import "../../styles/global.css"; export { ReactAutumnProvider as AutumnProvider } from "./ReactAutumnProvider"; // export type { PricingTableProduct } from "@sdk/components/componentTypes"; -export type { ProductDetails } from "./client/types/clientPricingTableTypes"; - +export type { ProductDetails, ProductWithDisplay } from "./client/ProductDetails"; export { useCustomer } from "./hooks/useCustomer"; export { usePricingTable } from "./hooks/usePricingTable"; export { useEntity } from "./hooks/useEntity"; @@ -19,3 +18,4 @@ export const useAutumn = () => {}; export { default as CheckoutDialog } from "./components/checkout-dialog/checkout-dialog-synced"; export { default as PaywallDialog } from "./components/paywall-dialog/paywall-dialog-synced"; export { default as PricingTable } from "./components/pricing-table/pricing-table-synced"; + diff --git a/autumn-js/src/utils/ErrorResponse.ts b/autumn-js/src/utils/ErrorResponse.ts new file mode 100644 index 00000000..7a36e31b --- /dev/null +++ b/autumn-js/src/utils/ErrorResponse.ts @@ -0,0 +1,33 @@ +// export interface ErrorResponse { +// message: string; +// code: string; +// } + +export class ErrorResponse extends Error { + public readonly message: string; + public readonly code: string; + + constructor(response: { message: string; code: string }) { + super(response.message); + this.message = response.message; + this.code = response.code; + } + + static fromError(error: any) { + return new ErrorResponse({ + message: error.message || "Unknown error", + code: error.code || "unknown_error", + }); + } + + toString() { + return `${this.message} (code: ${this.code})`; + } + + toJSON() { + return { + message: this.message, + code: this.code, + }; + } +} diff --git a/autumn-js/src/utils/handleFetchResult.ts b/autumn-js/src/utils/handleFetchResult.ts new file mode 100644 index 00000000..63706e68 --- /dev/null +++ b/autumn-js/src/utils/handleFetchResult.ts @@ -0,0 +1,47 @@ +export const handleFetchResult = async ({ + response, + logger, + logError = true, +}: { + response: Response; + logger: Console; + logError?: boolean; +}): Promise => { + if (response.status < 200 || response.status >= 300) { + let error: any; + try { + error = await response.json(); + if (logError) { + logger.error(`[Autumn] ${error.message}`); + } + + throw error; + } catch (error) { + // biome-ignore lint/complexity/noUselessCatch: idk + throw error; + } + + // return { + // data: null, + // error: new AutumnError({ + // message: error.message, + // code: error.code, + // }), + // statusCode: response.status, + // }; + } + + try { + const data = await response.json(); + + return data; + // return { + // data: data, + // error: null, + // statusCode: response?.status, + // }; + } catch (error) { + // biome-ignore lint/complexity/noUselessCatch: idk + throw error; + } +}; \ No newline at end of file diff --git a/autumn-js/tsup.config.ts b/autumn-js/tsup.config.ts index 5b7d8143..0268b8ed 100644 --- a/autumn-js/tsup.config.ts +++ b/autumn-js/tsup.config.ts @@ -89,6 +89,7 @@ export default defineConfig([ shims: true, clean: false, outDir: "./dist/sdk", + splitting: false, treeshake: true, target: "es2020", @@ -101,6 +102,7 @@ export default defineConfig([ __dirname: "import.meta.dirname", __filename: "import.meta.filename", }; + options.mainFields = ["module", "main"]; }, }, @@ -125,46 +127,26 @@ export default defineConfig([ }, // SDK - { - entry: ["src/next/*.{ts,tsx}"], - format: ["cjs", "esm"], - dts: true, - clean: false, // Don't clean on subsequent builds - outDir: "./dist/next", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: false, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.define = { - ...options.define, - __dirname: "import.meta.dirname", - __filename: "import.meta.filename", - }; - }, - }, + // { + // entry: ["src/next/*.{ts,tsx}"], + // format: ["cjs", "esm"], + // dts: true, + // clean: false, // Don't clean on subsequent builds + // outDir: "./dist/next", + // external: ["react", "react/jsx-runtime", "react-dom"], + // bundle: false, + // esbuildOptions(options) { + // options.plugins = options.plugins || []; + // options.plugins.push(alias(pathAliases)); + // options.define = { + // ...options.define, + // __dirname: "import.meta.dirname", + // __filename: "import.meta.filename", + // }; + // }, + // }, ...reactConfigs, - // React client components - { - entry: ["src/next/client/**/*.ts", "src/next/client/**/*.tsx"], - format: ["cjs", "esm"], - dts: true, - clean: true, - outDir: "./dist/next/client", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: false, - banner: { - js: '"use client";\n', - }, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.platform = "browser"; - options.format = "esm"; - }, - }, - // Styles - Properly process CSS with PostCSS and Tailwind { entry: ["src/styles/global.css"], @@ -174,33 +156,5 @@ export default defineConfig([ bundle: true, }, - // React server components - { - entry: ["src/next/server/**/*.{ts,tsx}"], - format: ["cjs", "esm"], - dts: true, - clean: true, - outDir: "./dist/next/server", - external: [ - "react", - "react/jsx-runtime", - "react-dom", - "@clerk/backend", - "better-auth", - "@supabase/ssr", - ], - bundle: false, - banner: { - js: '"use server";', - }, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.banner = { - js: '"use server";', - }; - options.platform = "node"; - options.format = "esm"; - }, - }, + ]); diff --git a/autumn-js/tsup.dev.config.ts b/autumn-js/tsup.dev.config.ts index 9fc34fba..20cbf70f 100644 --- a/autumn-js/tsup.dev.config.ts +++ b/autumn-js/tsup.dev.config.ts @@ -96,6 +96,7 @@ export default defineConfig([ shims: true, clean: false, outDir: "./dist/sdk", + splitting: false, treeshake: true, target: "es2020", @@ -103,6 +104,7 @@ export default defineConfig([ esbuildOptions(options) { options.plugins = options.plugins || []; options.plugins.push(alias(pathAliases)); + options.mainFields = ["module", "main"]; }, }, @@ -121,42 +123,8 @@ export default defineConfig([ }, }, - // SDK - { - entry: ["src/next/*.{ts,tsx}"], - format: ["cjs", "esm"], - dts: false, - clean: false, // Don't clean on subsequent builds - outDir: "./dist/next", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: false, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - }, - }, ...reactConfigs, - // React client components - { - entry: ["src/next/client/**/*.ts", "src/next/client/**/*.tsx"], - format: ["cjs", "esm"], - dts: false, - clean: true, - outDir: "./dist/next/client", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: false, - banner: { - js: '"use client";\n', - }, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.platform = "browser"; - options.format = "esm"; - }, - }, - // Styles - Properly process CSS with PostCSS and Tailwind { entry: ["src/styles/global.css"], @@ -165,34 +133,4 @@ export default defineConfig([ clean: false, bundle: true, }, - - // React server components - { - entry: ["src/next/server/**/*.{ts,tsx}"], - format: ["cjs", "esm"], - dts: false, - clean: true, - outDir: "./dist/next/server", - external: [ - "react", - "react/jsx-runtime", - "react-dom", - "@clerk/backend", - "better-auth", - "@supabase/ssr", - ], - bundle: false, - banner: { - js: '"use server";', - }, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.banner = { - js: '"use server";', - }; - options.platform = "node"; - options.format = "esm"; - }, - }, ]); From 031c96abb392fad1e322717e7c4d1553daddc7f5 Mon Sep 17 00:00:00 2001 From: John Yeo Date: Fri, 3 Oct 2025 20:50:56 +0100 Subject: [PATCH 03/35] wip --- nextjs/package.json | 3 +- nextjs/sdk.ts | 27 +- pnpm-lock.yaml | 139 ++-- ts-sdk | 2 +- typegen/README.md | 412 ++++++++++++ typegen/genUtils/TypeGenerator.ts | 125 ++++ typegen/genUtils/auto-schema-generator.ts | 734 ++++++++++++++++++++++ typegen/genUtils/index.ts | 7 + typegen/genUtils/utils.ts | 59 ++ typegen/generate-autumn-js-types.ts | 48 ++ typegen/typeConfigs.ts | 243 +++++++ 11 files changed, 1707 insertions(+), 92 deletions(-) create mode 100644 typegen/README.md create mode 100644 typegen/genUtils/TypeGenerator.ts create mode 100644 typegen/genUtils/auto-schema-generator.ts create mode 100644 typegen/genUtils/index.ts create mode 100644 typegen/genUtils/utils.ts create mode 100644 typegen/generate-autumn-js-types.ts create mode 100644 typegen/typeConfigs.ts diff --git a/nextjs/package.json b/nextjs/package.json index cd554641..adf60afa 100644 --- a/nextjs/package.json +++ b/nextjs/package.json @@ -12,13 +12,14 @@ }, "dependencies": { "@clerk/nextjs": "^6.28.1", - "@useautumn/sdk": "workspace:*", + "@knocklabs/node": "^1.19.0", "@radix-ui/react-accordion": "^1.2.11", "@radix-ui/react-dialog": "^1.1.14", "@radix-ui/react-popover": "^1.1.14", "@radix-ui/react-slot": "^1.2.3", "@radix-ui/react-switch": "^1.2.5", "@tailwindcss/cli": "^4.1.11", + "@useautumn/sdk": "workspace:*", "atmn": "workspace:*", "autumn-js": "workspace:*", "better-auth": "^1.2.12", diff --git a/nextjs/sdk.ts b/nextjs/sdk.ts index 64f5abf8..83e10239 100644 --- a/nextjs/sdk.ts +++ b/nextjs/sdk.ts @@ -4,6 +4,7 @@ import "dotenv/config"; // import { Autumn } from "autumn-js"; import { Autumn } from "@useautumn/sdk"; +import { Knock } from "@knocklabs/node"; const main = async () => { @@ -12,23 +13,19 @@ const main = async () => { secretKey: process.env.AUTUMN_SECRET_KEY, }) - // const stripe = new Stripe(""); - - // await stripe.customers.create({ - // email: "john@doe.com", - // name: "John Doe", - // }) - + const knock = new Knock({ + apiKey: process.env.KNOCK_API_KEY, + }) - // const autumn = new Autumn({ - // baseURL: "http://localhost:8080/v1", - // secretKey: process.env.AUTUMN_SECRET_KEY, - // }) + await knock.channels.bulk.updateMessageStatus("123", "seen", { + recipient_ids: ["123"], + }) - // await autumn.core.attach({ - // customer_id: "123", - // free_trial: true, - // }); + + await autumn.attach({ + customer_id: "123", + product_id: "pro", + }) }; main(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 755f8b03..4cdadc55 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -144,7 +144,7 @@ importers: version: 0.6.1(@supabase/supabase-js@2.55.0) '@tanstack/react-start': specifier: ^1.120.5 - version: 1.131.8(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) + version: 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) '@types/express': specifier: ^5.0.1 version: 5.0.3 @@ -1102,6 +1102,9 @@ importers: '@clerk/nextjs': specifier: ^6.28.1 version: 6.30.1(next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@knocklabs/node': + specifier: ^1.19.0 + version: 1.19.0 '@radix-ui/react-accordion': specifier: ^1.2.11 version: 1.2.11(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -1174,7 +1177,7 @@ importers: version: 4.1.11 '@types/bun': specifier: latest - version: 1.2.22(@types/react@19.1.10) + version: 1.2.23(@types/react@19.1.10) '@types/node': specifier: ^20 version: 20.19.10 @@ -3142,6 +3145,9 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@knocklabs/node@1.19.0': + resolution: {integrity: sha512-akSKCKJlZGITemTD1lvkHvIf4knL0D3NHaL7h5gOj6Oq0dVceOVYTujHhiSe4H4GB2bKWVjPVEBMs0THWMmFTA==} + '@levischuck/tiny-cbor@0.2.11': resolution: {integrity: sha512-llBRm4dT4Z89aRsm6u2oEZ8tfwL/2l6BwpZ7JcyieouniDECM5AqNgr/y08zalEIvW3RSK4upYyybDcmjXqAow==} @@ -5233,6 +5239,9 @@ packages: '@types/bun@1.2.22': resolution: {integrity: sha512-5A/KrKos2ZcN0c6ljRSOa1fYIyCKhZfIVYeuyb4snnvomnpFqC0tTsEkdqNxbAgExV384OETQ//WAjl3XbYqQA==} + '@types/bun@1.2.23': + resolution: {integrity: sha512-le8ueOY5b6VKYf19xT3McVbXqLqmxzPXHsQT/q9JHgikJ2X22wyTW3g3ohz2ZMnp7dod6aduIiq8A14Xyimm0A==} + '@types/chai@5.2.2': resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} @@ -6543,6 +6552,11 @@ packages: peerDependencies: '@types/react': ^19 + bun-types@1.2.23: + resolution: {integrity: sha512-R9f0hKAZXgFU3mlrA0YpE/fiDvwV0FT9rORApt2aQVWSuJDzZOyB5QLc0N/4HF57CS8IXJ6+L5E4W1bW6NS2Aw==} + peerDependencies: + '@types/react': ^19 + bundle-name@4.1.0: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} engines: {node: '>=18'} @@ -15531,6 +15545,10 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 + '@knocklabs/node@1.19.0': + dependencies: + jose: 6.1.0 + '@levischuck/tiny-cbor@0.2.11': {} '@loaderkit/resolve@1.0.4': @@ -18377,9 +18395,9 @@ snapshots: - webpack - xml2js - '@tanstack/react-start-plugin@1.131.8(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': + '@tanstack/react-start-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: - '@tanstack/start-plugin-core': 1.131.8(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) + '@tanstack/start-plugin-core': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) '@vitejs/plugin-react': 5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) pathe: 2.0.3 vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) @@ -18483,10 +18501,10 @@ snapshots: - webpack - xml2js - '@tanstack/react-start@1.131.8(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': + '@tanstack/react-start@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: '@tanstack/react-start-client': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@tanstack/react-start-plugin': 1.131.8(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) + '@tanstack/react-start-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) '@tanstack/react-start-server': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@tanstack/start-server-functions-client': 1.131.7(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) '@tanstack/start-server-functions-server': 1.131.2(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) @@ -18596,7 +18614,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@tanstack/router-plugin@1.131.8(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': + '@tanstack/router-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: '@babel/core': 7.28.3 '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) @@ -18613,6 +18631,7 @@ snapshots: unplugin: 2.3.5 zod: 3.25.76 optionalDependencies: + '@tanstack/react-router': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) webpack: 5.101.1(@swc/core@1.13.5)(esbuild@0.25.9) transitivePeerDependencies: @@ -18708,14 +18727,14 @@ snapshots: - webpack - xml2js - '@tanstack/start-plugin-core@1.131.8(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': + '@tanstack/start-plugin-core@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: '@babel/code-frame': 7.26.2 '@babel/core': 7.28.3 '@babel/types': 7.28.2 '@tanstack/router-core': 1.131.7 '@tanstack/router-generator': 1.131.7 - '@tanstack/router-plugin': 1.131.8(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) + '@tanstack/router-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) '@tanstack/router-utils': 1.131.2 '@tanstack/server-functions-plugin': 1.131.2(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) '@tanstack/start-server-core': 1.131.7 @@ -18878,9 +18897,9 @@ snapshots: transitivePeerDependencies: - '@types/react' - '@types/bun@1.2.22(@types/react@19.1.10)': + '@types/bun@1.2.23(@types/react@19.1.10)': dependencies: - bun-types: 1.2.22(@types/react@19.1.10) + bun-types: 1.2.23(@types/react@19.1.10) transitivePeerDependencies: - '@types/react' @@ -20976,7 +20995,7 @@ snapshots: '@types/node': 22.17.1 '@types/react': 18.3.23 - bun-types@1.2.22(@types/react@19.1.10): + bun-types@1.2.23(@types/react@19.1.10): dependencies: '@types/node': 22.17.1 '@types/react': 19.1.10 @@ -22273,8 +22292,8 @@ snapshots: '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.29.0(jiti@2.5.1)) @@ -22293,8 +22312,8 @@ snapshots: '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.34.0(jiti@2.5.1)) @@ -22313,8 +22332,8 @@ snapshots: '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.29.0(jiti@2.5.1)) @@ -22333,8 +22352,8 @@ snapshots: '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.29.0(jiti@2.5.1)) @@ -22353,8 +22372,8 @@ snapshots: '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.34.0(jiti@2.5.1)) @@ -22404,22 +22423,22 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@5.5.0) - eslint: 9.29.0(jiti@2.5.1) + eslint: 8.57.1 get-tsconfig: 4.10.1 is-bun-module: 2.0.0 stable-hash: 0.0.5 tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@5.5.0) @@ -22430,11 +22449,11 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@5.5.0) @@ -22445,37 +22464,7 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) - transitivePeerDependencies: - - supports-color - - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): - dependencies: - '@nolyfill/is-core-module': 1.0.39 - debug: 4.4.1(supports-color@5.5.0) - eslint: 9.34.0(jiti@2.5.1) - get-tsconfig: 4.10.1 - is-bun-module: 2.0.0 - stable-hash: 0.0.5 - tinyglobby: 0.2.14 - unrs-resolver: 1.11.1 - optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) - transitivePeerDependencies: - - supports-color - - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1): - dependencies: - '@nolyfill/is-core-module': 1.0.39 - debug: 4.4.1(supports-color@5.5.0) - eslint: 8.57.1 - get-tsconfig: 4.10.1 - is-bun-module: 2.0.0 - stable-hash: 0.0.5 - tinyglobby: 0.2.14 - unrs-resolver: 1.11.1 - optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color @@ -22507,47 +22496,47 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color @@ -22614,7 +22603,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22625,7 +22614,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22643,7 +22632,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22654,7 +22643,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22672,7 +22661,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22683,7 +22672,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22701,7 +22690,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22712,7 +22701,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.34.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)))(eslint@9.34.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 diff --git a/ts-sdk b/ts-sdk index a8b0f8c8..5b4c7f39 160000 --- a/ts-sdk +++ b/ts-sdk @@ -1 +1 @@ -Subproject commit a8b0f8c87dc5de7f45c360f674d1cd2bfe116b62 +Subproject commit 5b4c7f3971e0b5bb9c6e5967f0feaf6431e35177 diff --git a/typegen/README.md b/typegen/README.md new file mode 100644 index 00000000..3f464da0 --- /dev/null +++ b/typegen/README.md @@ -0,0 +1,412 @@ +# Typegen - Type Generation Pipeline + +This directory contains the automated type generation system that converts snake_case SDK types to camelCase Zod schemas for JS packages. + +## 📁 Structure + +``` +typegen/ +├── README.md # This file +├── typeConfigs.ts # 🎯 MAIN CONFIG - defines which types are generated +├── generate-autumn-js-types.ts # Main generation script (executable via tsx) +├── archives/ +│ └── run-generator.ts # Legacy script (archived) +└── genUtils/ # Utility modules + ├── index.ts # Clean exports + ├── TypeGenerator.ts # Main generator class (orchestrates parallel generation) + ├── utils.ts # Helper utilities (path validation, case conversion) + └── auto-schema-generator.ts # Core Zod schema generation logic +``` + +## 🎯 Quick Start + +### View Currently Generated Types +Check `typeConfigs.ts` to see exactly which types are being generated. The config now returns a `TypeGenerationConfig` object: + +```typescript +// Example from typeConfigs.ts +export function getAutumnJSTypeConfigs(tsSDKPath: string, autumnJSPath: string): TypeGenerationConfig { + return { + outputDir: "src/libraries/react/clientTypes", // Where types are generated + configs: [ + { + sourceName: "AttachParams", // From @ts-sdk (snake_case) + targetName: "AttachParams", // For autumn-js (camelCase) + sourceFile: topLevelFile, // Full path to source file + targetFile: path.join(generatedDir, "attachTypes.ts"), + omitFields: ["customer_id"], // Fields to exclude + extendFields: { /* ... */ } // Additional fields to add + }, + // ... more configs + ] + }; +} +``` + +### Generate Types +```bash +# From the root typescript/ directory +pnpm run generate-types # Run once +pnpm run generate-types:watch # Watch mode (auto-regenerate on changes) +``` + +The generator runs in **parallel** for fast processing and outputs timing information for each type. + +### Add New Types +1. Open `typeConfigs.ts` +2. Add new configuration to the `configs` array in `getAutumnJSTypeConfigs()` +3. Run `pnpm run generate-types` +4. Generated files appear in `autumn-js/src/libraries/react/clientTypes/` + +### Customize Types with Omit/Extend +```typescript +{ + sourceName: "CustomerCreateParams", + targetName: "CreateCustomerParams", + sourceFile: customersFile, + targetFile: path.join(generatedDir, "createCustomerTypes.ts"), + omitFields: ["id", "data"], // Remove these fields from SDK type + extendFields: { + "errorOnNotFound": { + zodType: "z.boolean().optional()", + description: "Whether to return an error if customer is not found" + }, + "customField": { + zodType: "z.string()", + description: "A custom field for client use" + } + } +} +``` + +## 📋 Current Type Mappings + +### autumn-js Types +Generated in: `autumn-js/src/libraries/react/clientTypes/` + +| SDK Type (snake_case) | Client Type (camelCase) | Purpose | Source File | Customizations | +|----------------------|------------------------|---------|-------------|---------------| +| **Shared/Common Types** | +| `CustomerData` | `CustomerData` | Customer info for creation/updates | `shared.ts` | None | +| `EntityData` | `EntityData` | Entity creation data | `shared.ts` | None | +| **Customer Management** | +| `CustomerCreateParams` | `CreateCustomerParams` | Customer creation | `customers.ts` | Omits: `id`
Adds: `errorOnNotFound` | +| **Entity Management** | +| `EntityCreateParams` | `CreateEntityParams` | Entity creation | `entities.ts` | None | +| `EntityGetParams` | `GetEntityParams` | Entity retrieval | `entities.ts` | Omits: `customer_id` | +| **Core Attachment Flow** | +| `AttachParams` | `AttachParams` | Product attachment | `top-level.ts` | Omits: `customer_id`
Adds: `dialog`, `openInNewTab`, `metadata` | +| `CheckoutParams` | `CheckoutParams` | Checkout flow | `top-level.ts` | Omits: `customer_id`
Adds: `dialog`, `openInNewTab` | +| **Billing & Payment** | +| `BillingPortalParams` | `OpenBillingPortalParams` | Billing portal access | `top-level.ts` | Omits: `customer_id`
Adds: `openInNewTab` | +| `SetupPaymentParams` | `SetupPaymentParams` | Payment method setup | `top-level.ts` | Omits: `customer_id`
Adds: `openInNewTab` | +| **Product Management** | +| `CancelParams` | `CancelParams` | Product cancellation | `top-level.ts` | Omits: `customer_id` | +| **Usage & Analytics** | +| `CheckParams` | `CheckParams` | Feature access checks | `top-level.ts` | Omits: `customer_id`
Adds: `dialog`, `properties` | +| `TrackParams` | `TrackParams` | Usage event tracking | `top-level.ts` | Omits: `customer_id` | +| `QueryParams` | `QueryParams` | Analytics queries | `top-level.ts` | Omits: `customer_id` | + +**Total: 13 types** organized into 6 categories + +## 🔧 How It Works + +### 1. Configuration Loading +- `generate-autumn-js-types.ts` loads configurations from `typeConfigs.ts` +- Validates that source paths (`@ts-sdk`) and target paths (`autumn-js`) exist +- Logs all types that will be generated + +### 2. Parallel Generation (`TypeGenerator` class) +- Processes all types in **parallel** using `Promise.allSettled` +- Each type generation is independent and runs concurrently +- Tracks timing for each individual type conversion +- Reports success/failure for each type in real-time + +### 3. Source Analysis (per type) +- Reads TypeScript interfaces from SDK source files: + - `src/resources/top-level.ts` - Most API method params + - `src/resources/shared.ts` - Common data types + - `src/resources/customers.ts` - Customer-specific types + - `src/resources/entities.ts` - Entity-specific types +- Identifies nested interfaces (e.g., `AttachParams.Option`) +- Extracts type definitions and relationships + +### 4. Schema Generation (`auto-schema-generator.ts`) +- Converts snake_case field names to camelCase +- Generates proper Zod schemas with validation +- Handles complex types: arrays, unions, nullables, Records, unknowns +- Creates nested schemas for interface namespaces +- Applies `omitFields` to exclude SDK-only fields (like `customer_id`) +- Applies `extendFields` to add client-only fields (like `openInNewTab`) + +### 5. Output Organization +- Creates individual files per type in `clientTypes/` directory + - Example: `attachTypes.ts`, `checkoutTypes.ts`, etc. +- Auto-generates `index.ts` with all exports for easy importing +- Maintains proper TypeScript imports between related types +- Adds warnings for auto-generated files: "DO NOT EDIT MANUALLY" + +### 6. Summary & Validation +- Prints generation summary with success/failure counts +- Shows total execution time and per-type timing +- Lists any failed generations with error messages + +## 🚀 Example Conversion + +**Input (SDK - snake_case from `@ts-sdk`):** +```typescript +// src/resources/top-level.ts +export interface AttachParams { + customer_id: string; + product_id?: string | null; + free_trial?: boolean; + customer_data?: CustomerData; + entity_data?: EntityData; + options?: Array | null; +} + +export namespace AttachParams { + export interface Option { + feature_id: string; + quantity: number; + adjustable_quantity?: boolean | null; + } +} +``` + +**Configuration in `typeConfigs.ts`:** +```typescript +{ + sourceName: "AttachParams", + targetName: "AttachParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "attachTypes.ts"), + omitFields: ["customer_id"], // Remove - handled by client + extendFields: { + "dialog": { + zodType: "z.any().optional()", + description: "DEPRECATED: Use checkout() method instead" + }, + "openInNewTab": { + zodType: "z.boolean().optional()", + description: "Whether to open checkout in a new tab" + }, + "metadata": { + zodType: "z.record(z.string(), z.string()).optional()", + description: "Additional metadata for the request" + } + } +} +``` + +**Output (autumn-js - camelCase in `clientTypes/attachTypes.ts`):** +```typescript +// Auto-generated Zod schema +import { z } from "zod"; +import { CustomerDataSchema } from "./customerDataTypes"; +import { EntityDataSchema } from "./entityDataTypes"; + +export const AttachParamsOptionSchema = z.object({ + featureId: z.string(), + quantity: z.number(), + adjustableQuantity: z.boolean().nullable().optional() +}); + +export const AttachParamsSchema = z.object({ + productId: z.string().nullable().optional(), + freeTrial: z.boolean().optional(), + customerData: CustomerDataSchema.optional(), // ✨ Properly typed & imported! + entityData: EntityDataSchema.optional(), // ✨ Properly typed & imported! + options: z.array(AttachParamsOptionSchema).nullable().optional(), + // 👇 Extended fields (client-specific) + dialog: z.any().optional().describe("DEPRECATED: Use checkout() method instead"), + openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab"), + metadata: z.record(z.string(), z.string()).optional().describe("Additional metadata for the request") +}); + +export type AttachParams = z.infer; +``` + +**Key transformations:** +- ✅ `snake_case` → `camelCase` (e.g., `product_id` → `productId`) +- ✅ Omitted `customer_id` (handled automatically by client) +- ✅ Added client-specific fields (`dialog`, `openInNewTab`, `metadata`) +- ✅ Proper imports for related schemas (`CustomerDataSchema`, `EntityDataSchema`) +- ✅ Preserved optional/nullable modifiers +- ✅ Nested namespaces converted to separate schemas (`Option` → `AttachParamsOptionSchema`) + +## 🔮 Future Extensions + +The typegen system is designed to support multiple packages. Placeholder functions exist in `typeConfigs.ts`: + +### Convex Types +```typescript +export function getConvexTypeConfigs(tsSDKPath: string, convexPath: string): TypeGenerationConfig { + // TODO: Define Convex-specific type mappings + // Will generate types for @useautumn/convex package + return { outputDir: "src/types", configs: [] }; +} +``` + +### CLI Types +```typescript +export function getAtmnTypeConfigs(tsSDKPath: string, atmnPath: string): TypeGenerationConfig { + // TODO: Define CLI-specific type mappings + // Will generate types for atmn CLI package + return { outputDir: "source/types", configs: [] }; +} +``` + +To implement: +1. Create a new generation script (e.g., `generate-convex-types.ts`) +2. Implement the config function in `typeConfigs.ts` +3. Add npm script to `package.json` +4. Run the generator + +## 🛠 Maintenance + +### Adding New SDK Types +When new types are added to `@ts-sdk`: +1. Types are automatically available from the SDK package +2. Add new configuration entry to `typeConfigs.ts` in the appropriate section +3. Run `pnpm run generate-types` to generate the new type +4. Verify output in `autumn-js/src/libraries/react/clientTypes/` + +### Modifying Existing Types +To change how a type is generated: +1. Update the configuration in `typeConfigs.ts`: + - Add/remove fields in `omitFields` + - Add/modify fields in `extendFields` +2. Re-run generation +3. Check git diff to verify changes + +### Debugging Generation Issues +**Parallel generation provides detailed logs:** +- Each type logs its generation time +- Failed types show specific error messages +- Summary section shows overall statistics + +**Common issues:** +- **Source file not found**: Verify `sourceFile` path in config +- **Import errors**: Check that related types are generated first +- **Invalid Zod syntax**: Check `extendFields` zodType strings + +**Debug steps:** +1. Check console output for specific error messages +2. Verify source file paths exist: `ls -la ../ts-sdk/src/resources/` +3. Ensure target directory is writable +4. Try generating a single type by temporarily commenting out others + +### Updating Type Conversion Logic +To modify how types are converted: +1. Edit `genUtils/auto-schema-generator.ts` for core conversion logic +2. Edit `genUtils/TypeGenerator.ts` for orchestration/output +3. Edit `genUtils/utils.ts` for helper functions +4. Test changes: `pnpm run generate-types` +5. Verify output files are correct +6. Check that imports resolve properly + +### Performance Optimization +The generator already runs types in **parallel**. Performance is typically: +- ~50-200ms per type +- ~1-2 seconds total for all 13 types + +If generation is slow, check: +- Large source files (SDK types) +- Complex nested types +- File system I/O (SSD recommended) + +## 📦 Generated Output Structure + +After running `pnpm run generate-types`, the following files are created: + +``` +autumn-js/src/libraries/react/clientTypes/ +├── index.ts # Auto-generated exports +├── customerDataTypes.ts # CustomerData schema +├── entityDataTypes.ts # EntityData schema +├── createCustomerTypes.ts # CreateCustomerParams schema +├── createEntityTypes.ts # CreateEntityParams schema +├── getEntityTypes.ts # GetEntityParams schema +├── attachTypes.ts # AttachParams + AttachParams.Option schemas +├── checkoutTypes.ts # CheckoutParams schema +├── billingPortalTypes.ts # OpenBillingPortalParams schema +├── setupPaymentTypes.ts # SetupPaymentParams schema +├── cancelTypes.ts # CancelParams schema +├── checkTypes.ts # CheckParams schema +├── trackTypes.ts # TrackParams schema +└── queryTypes.ts # QueryParams schema +``` + +Each file contains: +- Zod schema definition (e.g., `AttachParamsSchema`) +- TypeScript type (e.g., `type AttachParams = z.infer<...>`) +- Nested schemas if applicable (e.g., `AttachParamsOptionSchema`) +- Auto-generated imports for related types +- Warning comment: "DO NOT EDIT MANUALLY" + +## 🎨 Using Generated Types + +### In autumn-js (React) +```typescript +// Import from the barrel export +import { AttachParams, AttachParamsSchema } from './clientTypes'; + +// Use the type +const params: AttachParams = { + productId: "prod_123", + freeTrial: true, + openInNewTab: true, + metadata: { source: "web" } +}; + +// Validate with Zod +const result = AttachParamsSchema.safeParse(params); +if (result.success) { + // params is valid! +} +``` + +### Type Safety Benefits +- ✅ **Compile-time validation**: TypeScript catches type errors +- ✅ **Runtime validation**: Zod validates actual values +- ✅ **Auto-completion**: IDEs provide intellisense +- ✅ **Consistent API**: Same types across SDK and client +- ✅ **Automatic updates**: Regenerate when SDK changes + +## 🔄 Workflow Integration + +### During Development +```bash +# Terminal 1: Watch mode for auto-regeneration +pnpm run generate-types:watch + +# Terminal 2: Your dev server +cd autumn-js && pnpm run dev +``` + +### Before Committing +```bash +# Regenerate types to ensure they're up-to-date +pnpm run generate-types + +# Check what changed +git diff autumn-js/src/libraries/react/clientTypes/ + +# Commit generated files along with config changes +git add typegen/ autumn-js/src/libraries/react/clientTypes/ +git commit -m "feat: add new type generation for X" +``` + +### CI/CD Recommendations +Consider adding a check to ensure generated types are up-to-date: +```bash +# In your CI pipeline +pnpm run generate-types +git diff --exit-code autumn-js/src/libraries/react/clientTypes/ +# Fails if types are out of sync +``` + +--- + +**Questions or Issues?** Check the console output from `pnpm run generate-types` - it provides detailed error messages and timing information for debugging. \ No newline at end of file diff --git a/typegen/genUtils/TypeGenerator.ts b/typegen/genUtils/TypeGenerator.ts new file mode 100644 index 00000000..62361682 --- /dev/null +++ b/typegen/genUtils/TypeGenerator.ts @@ -0,0 +1,125 @@ +import { writeFileSync, mkdirSync, existsSync } from "fs"; +import path from "path"; +import { generateCamelZod } from "./auto-schema-generator"; +import type { TypeConfig, TypeGenerationConfig } from "../typeConfigs"; + +/** + * Main Type Generator class that orchestrates the conversion process + * + * This class handles the generation of camelCase Zod schemas from snake_case SDK types. + * It processes multiple type configurations and generates organized output files. + */ +export class TypeGenerator { + private readonly tsSDKPath: string; + private readonly targetPath: string; + + constructor(tsSDKPath: string, targetPath: string) { + this.tsSDKPath = tsSDKPath; + this.targetPath = targetPath; + } + + /** + * Generate all types based on provided configurations + */ + async generateTypes(config: TypeGenerationConfig): Promise { + const { configs, outputDir } = config; + const startTime = Date.now(); + + console.log(`⚡ Processing ${configs.length} types...`); + + // Generate all types in parallel (no await in the map) + const startGeneration = Date.now(); + const results = await Promise.allSettled( + configs.map(async (config, index) => { + const typeStart = Date.now(); + try { + this.generateSingleType(config); + return { config, success: true as const }; + } catch (error) { + const errorMessage = error instanceof Error ? error.message : String(error); + console.error(`❌ Failed ${config.targetName}: ${errorMessage}`); + return { config, success: false as const, error: errorMessage }; + } + }) + ); + + const endGeneration = Date.now(); + + // Extract results from Promise.allSettled + const processedResults = results.map(result => + result.status === 'fulfilled' ? result.value : { + config: configs[results.indexOf(result)], + success: false as const, + error: result.reason?.message || 'Unknown error' + } + ); + + // Generate index file and print summary + const duration = Date.now() - startTime; + this.printSummary(processedResults, duration); + await this.generateIndexFile(configs, outputDir); + } + + /** + * Generate a single type based on configuration + */ + private generateSingleType(config: TypeConfig): void { + // Ensure output directory exists + const outputDir = path.dirname(config.targetFile); + if (!existsSync(outputDir)) { + mkdirSync(outputDir, { recursive: true }); + } + + // Generate the camelCase Zod schema + generateCamelZod({ + inputFile: config.sourceFile, + typeName: config.sourceName, + outputFile: config.targetFile, + camelCase: true, + omitFields: config.omitFields, + extendFields: config.extendFields, + }); + } + + /** + * Generate an index file that exports all generated types + */ + private async generateIndexFile(configs: TypeConfig[], outputDir: string): Promise { + const indexPath = path.join(this.targetPath, outputDir, "index.ts"); + + const exports = configs.map(config => { + const fileName = path.basename(config.targetFile, '.ts'); + return `export * from './${fileName}';`; + }).join('\n'); + + const content = `// Auto-generated exports for all camelCase types +// This file is generated by typegen pipeline +// DO NOT EDIT MANUALLY - changes will be overwritten + +${exports} +`; + + writeFileSync(indexPath, content); + // Removed verbose index file log + } + + /** + * Print a summary of the generation process + */ + private printSummary( + results: { config: TypeConfig; success: boolean; error?: string }[], + duration?: number + ): void { + const successful = results.filter(r => r.success).length; + const failed = results.filter(r => r.success === false).length; + + console.log(`📊 ${successful} successful, ${failed} failed (${duration}ms)`); + + if (failed > 0) { + console.log(`\n❌ Failed generations:`); + results.filter(r => !r.success).forEach(r => { + console.log(` - ${r.config.sourceName}: ${r.error}`); + }); + } + } +} \ No newline at end of file diff --git a/typegen/genUtils/auto-schema-generator.ts b/typegen/genUtils/auto-schema-generator.ts new file mode 100644 index 00000000..e699e29e --- /dev/null +++ b/typegen/genUtils/auto-schema-generator.ts @@ -0,0 +1,734 @@ +import { writeFileSync } from "fs"; +import * as ts from "typescript"; + +interface GenerateZodOptions { + inputFile: string; + typeName: string; + outputFile: string; + camelCase?: boolean; +} + +/** + * Generate camelCase Zod schema from TypeScript interface + */ +export function generateCamelZod(options: GenerateZodOptions & { + omitFields?: string[]; + extendFields?: Record; +}) { + return generateCleanZodSchema( + options.inputFile, + options.typeName, + options.outputFile, + options.camelCase ?? true, + options.omitFields ?? [], + options.extendFields ?? {} + ); +} + +/** + * Automatically generate clean Zod schemas from TypeScript interfaces + * This avoids the nested type reference issues from ts-to-zod + */ +// Cache TypeScript programs to avoid recompilation +const programCache = new Map(); + +function getOrCreateProgram(sourceFilePath: string) { + if (programCache.has(sourceFilePath)) { + return programCache.get(sourceFilePath)!; + } + + const program = ts.createProgram([sourceFilePath], { + target: ts.ScriptTarget.ES2020, + module: ts.ModuleKind.CommonJS, + skipLibCheck: true, // Skip type checking for faster parsing + noResolve: true, // Don't resolve module imports + }); + + const sourceFile = program.getSourceFile(sourceFilePath); + if (!sourceFile) { + throw new Error(`Could not find source file: ${sourceFilePath}`); + } + + const cached = { program, sourceFile }; + programCache.set(sourceFilePath, cached); + return cached; +} + +export function generateCleanZodSchema( + sourceFilePath: string, + interfaceName: string, + outputFilePath: string, + camelCase = false, + omitFields: string[] = [], + extendFields: Record = {} +) { + const { sourceFile } = getOrCreateProgram(sourceFilePath); + + const interfaceDeclaration = findInterface(sourceFile, interfaceName); + if (!interfaceDeclaration) { + throw new Error(`Interface ${interfaceName} not found`); + } + + // Find all nested interfaces and namespaces + const nestedInterfaces = findNestedInterfaces(sourceFile, interfaceName); + + // Generate schemas for nested interfaces first + const nestedSchemas = nestedInterfaces.map(nested => { + const schemaCode = generateSchemaCode(nested.interface, sourceFile, camelCase, nested.name); + // Convert "CheckoutParamsOption" to "CheckoutParamsOptionSchema" (PascalCase) + const schemaName = nested.name + 'Schema'; + return `export const ${schemaName} = ${schemaCode};`; + }).join('\n\n'); + + // Extract JSDoc comment for the main interface + const interfaceDescription = extractJSDocComment(interfaceDeclaration, sourceFile); + + const schemaCode = generateSchemaCode( + interfaceDeclaration, + sourceFile, + camelCase, + interfaceName, + nestedInterfaces.map(n => n.name), + omitFields, + extendFields + ); + + // Add description to the main schema if available + const finalSchemaCode = interfaceDescription ? + `${schemaCode}.describe("${interfaceDescription.replace(/"/g, '\\"')}")` : + schemaCode; + + // Check if we need imports for external schemas + const needsCustomerDataImport = finalSchemaCode.includes('CustomerDataSchema') || nestedSchemas.includes('CustomerDataSchema'); + const needsEntityDataImport = finalSchemaCode.includes('EntityDataSchema') || nestedSchemas.includes('EntityDataSchema'); + + // Generate imports + let imports = `import { z } from "zod";`; + if (needsCustomerDataImport) { + imports += `\nimport { CustomerDataSchema } from "./customerDataTypes";`; + } + if (needsEntityDataImport) { + imports += `\nimport { EntityDataSchema } from "./entityDataTypes";`; + } + + // Generate type imports for interfaces + let typeImports = ''; + if (needsCustomerDataImport) { + typeImports += `import type { CustomerData } from "./customerDataTypes";\n`; + } + if (needsEntityDataImport) { + typeImports += `import type { EntityData } from "./entityDataTypes";\n`; + } + + // Generate explicit interface with JSDoc comments + const explicitInterface = generateExplicitInterface( + interfaceDeclaration, + sourceFile, + camelCase, + interfaceName, + nestedInterfaces.map(n => n.name), + omitFields, + extendFields, + interfaceDescription + ); + + // Generate nested interfaces + const nestedInterfaces_generated = nestedInterfaces.map(nested => { + return generateExplicitInterface( + nested.interface, + sourceFile, + camelCase, + nested.name, + [], + [], + {}, + null + ); + }).join('\n\n'); + + const fullCode = `// Auto-generated Zod schema +${imports} +${typeImports} +${nestedSchemas ? nestedSchemas + '\n\n' : ''}export const ${camelCase ? toCamelCase(interfaceName) : interfaceName.toLowerCase()}Schema = ${finalSchemaCode}; + +${nestedInterfaces_generated ? nestedInterfaces_generated + '\n\n' : ''}${explicitInterface} +`; + + writeFileSync(outputFilePath, fullCode); + return fullCode; +} + +function findInterface( + sourceFile: ts.SourceFile, + interfaceName: string, +): ts.InterfaceDeclaration | undefined { + let result: ts.InterfaceDeclaration | undefined; + + function visit(node: ts.Node) { + if (ts.isInterfaceDeclaration(node) && node.name.text === interfaceName) { + result = node; + return; + } + ts.forEachChild(node, visit); + } + + visit(sourceFile); + return result; +} + +function findNestedInterfaces( + sourceFile: ts.SourceFile, + parentInterfaceName: string, +): { name: string; interface: ts.InterfaceDeclaration }[] { + const results: { name: string; interface: ts.InterfaceDeclaration }[] = []; + + function visit(node: ts.Node) { + // Look for namespace declarations that match our parent interface name + if (ts.isModuleDeclaration(node) && + node.name && + ts.isIdentifier(node.name) && + node.name.text === parentInterfaceName && + node.body && + ts.isModuleBlock(node.body)) { + + // Find interfaces within this namespace + node.body.statements.forEach(statement => { + if (ts.isInterfaceDeclaration(statement)) { + const nestedName = `${parentInterfaceName}${statement.name.text}`; + results.push({ + name: nestedName, + interface: statement + }); + } + }); + } + ts.forEachChild(node, visit); + } + + visit(sourceFile); + return results; +} + +function generateSchemaCode( + interfaceDecl: ts.InterfaceDeclaration, + sourceFile: ts.SourceFile, + camelCase: boolean, + interfaceName?: string, + availableNestedTypes?: string[], + omitFields: string[] = [], + extendFields: Record = {} +): string { + const properties: string[] = []; + + interfaceDecl.members.forEach((member) => { + if (ts.isPropertySignature(member)) { + const propertyName = member.name?.getText(sourceFile); + const isOptional = member.questionToken !== undefined; + const typeNode = member.type; + + if (propertyName && typeNode) { + const finalPropertyName = camelCase + ? toCamelCase(propertyName) + : propertyName; + + // Check if this field should be omitted + if (omitFields.includes(propertyName)) { + return; // Skip this property + } + + const zodType = convertTypeToZod(typeNode, sourceFile, interfaceName, availableNestedTypes); + + // Extract JSDoc comment for this property + const description = extractJSDocComment(member, sourceFile); + + // Debug logging (remove in production) + if (process.env.DEBUG_JSDOC) { + console.log(`Property ${propertyName}: ${description || 'No description found'}`); + } + + // Build the Zod property with description + let zodProperty = description + ? `${zodType}.describe("${escapeDescription(description)}")` + : zodType; + + zodProperty = isOptional + ? `${finalPropertyName}: ${zodProperty}.optional()` + : `${finalPropertyName}: ${zodProperty}`; + properties.push(zodProperty); + } + } + }); + + // Add extended fields + Object.entries(extendFields).forEach(([fieldName, config]) => { + const finalFieldName = camelCase ? toCamelCase(fieldName) : fieldName; + + let zodProperty = config.description + ? `${config.zodType}.describe("${escapeDescription(config.description)}")` + : config.zodType; + + properties.push(`${finalFieldName}: ${zodProperty}`); + }); + + return `z.object({\n ${properties.join(",\n ")}\n})`; +} + +function convertTypeToZod( + typeNode: ts.TypeNode, + sourceFile: ts.SourceFile, + parentInterface?: string, + availableNestedTypes?: string[] +): string { + const typeText = typeNode.getText(sourceFile).trim(); + + // Handle nested interface references (e.g., AttachParams.Option) + if (parentInterface && typeText.includes(`${parentInterface}.`)) { + const nestedTypeName = typeText.replace(`${parentInterface}.`, `${parentInterface}`); + if (availableNestedTypes?.includes(nestedTypeName)) { + // Convert "CheckoutParamsOption" to "CheckoutParamsOptionSchema" (PascalCase) + const schemaName = nestedTypeName + 'Schema'; + return schemaName; + } + } + + // Handle external type references (CustomerData, EntityData, etc.) + if (typeText === "CustomerData" || typeText === "Shared.CustomerData") { + return "CustomerDataSchema"; + } + if (typeText === "EntityData" || typeText === "Shared.EntityData") { + return "EntityDataSchema"; + } + + // Handle basic types + if (typeText === "string") return "z.string()"; + if (typeText === "number") return "z.number()"; + if (typeText === "boolean") return "z.boolean()"; + if (typeText === "unknown") return "z.unknown()"; + if (typeText === "any") return "z.any()"; + + // Handle nullable types + if (typeText.includes(" | null")) { + const baseType = typeText.replace(" | null", "").trim(); + const baseZodType = convertTypeToZod( + { getText: () => baseType } as any, + sourceFile, + parentInterface, + availableNestedTypes + ); + return `${baseZodType}.nullable()`; + } + + // Handle union types + if (typeText.includes(" | ") && !typeText.includes("null")) { + const types = typeText.split(" | ").map((t) => t.trim()); + const zodTypes = types.map((type) => { + if (type === "string") return "z.string()"; + if (type === "number") return "z.number()"; + if (type === "boolean") return "z.boolean()"; + if (type.startsWith("'") && type.endsWith("'")) { + return `z.literal(${type})`; + } + if (type.startsWith('"') && type.endsWith('"')) { + return `z.literal(${type})`; + } + // Handle Array in unions + if (type.startsWith("Array<") && type.endsWith(">")) { + const innerType = type.slice(6, -1); + const innerZodType = convertTypeToZod( + { getText: () => innerType } as any, + sourceFile, + parentInterface, + availableNestedTypes + ); + return `z.array(${innerZodType})`; + } + return "z.unknown()"; + }); + return `z.union([${zodTypes.join(", ")}])`; + } + + // Handle arrays + if (typeText.startsWith("Array<") && typeText.endsWith(">")) { + const innerType = typeText.slice(6, -1); + const innerZodType = convertTypeToZod( + { getText: () => innerType } as any, + sourceFile, + parentInterface, + availableNestedTypes + ); + return `z.array(${innerZodType})`; + } + + if (typeText.endsWith("[]")) { + const innerType = typeText.slice(0, -2); + const innerZodType = convertTypeToZod( + { getText: () => innerType } as unknown as ts.TypeNode, + sourceFile, + parentInterface, + availableNestedTypes + ); + return `z.array(${innerZodType})`; + } + + // Handle Record types + if (typeText.startsWith("Record<")) { + // Extract key and value types from Record + const match = typeText.match(/Record<([^,]+),\s*([^>]+)>/); + if (match) { + const keyType = match[1].trim(); + const valueType = match[2].trim(); + + const keyZodType = keyType === "string" ? "z.string()" : "z.string()"; // Default to string keys + const valueZodType = convertTypeToZod( + { getText: () => valueType } as any, + sourceFile, + parentInterface, + availableNestedTypes + ); + return `z.record(${keyZodType}, ${valueZodType})`; + } + return "z.record(z.string(), z.unknown())"; + } + + // Handle index signature types like { [key: string]: unknown } + if (typeText.match(/\{\s*\[\s*\w+\s*:\s*string\s*\]\s*:\s*\w+\s*\}/)) { + const match = typeText.match(/\{\s*\[\s*\w+\s*:\s*string\s*\]\s*:\s*(\w+)\s*\}/); + if (match) { + const valueType = match[1].trim(); + const valueZodType = valueType === "unknown" ? "z.unknown()" : + valueType === "string" ? "z.string()" : + valueType === "number" ? "z.number()" : + valueType === "boolean" ? "z.boolean()" : + "z.unknown()"; + return `z.record(z.string(), ${valueZodType})`; + } + } + + // Handle object types with properties + if (typeText.includes("{") && typeText.includes("}")) { + return "z.object({})"; // Simplified for complex objects + } + + // Default to unknown for complex types + return "z.unknown()"; +} + +function toCamelCase(str: string): string { + return str.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase()); +} + +/** + * Extract JSDoc comment text from a TypeScript node + */ +function extractJSDocComment(node: ts.Node, sourceFile: ts.SourceFile): string | null { + // For interface declarations, only use JSDoc that's directly attached to the interface + // Don't fall back to parsing text, as this can pick up JSDoc from properties + if (ts.isInterfaceDeclaration(node)) { + const jsDocNodes = (node as any).jsDoc; + if (jsDocNodes && jsDocNodes.length > 0) { + const jsDoc = jsDocNodes[0]; + if (jsDoc.comment) { + if (typeof jsDoc.comment === 'string') { + return jsDoc.comment.trim(); + } else if (Array.isArray(jsDoc.comment)) { + return jsDoc.comment + .map((part: any) => typeof part === 'string' ? part : part.text) + .join('') + .trim(); + } + } + } + // For interfaces without direct JSDoc, return null + return null; + } + + // For other nodes (properties, etc.), use the existing logic + const jsDocNodes = (node as any).jsDoc; + if (jsDocNodes && jsDocNodes.length > 0) { + const jsDoc = jsDocNodes[0]; + if (jsDoc.comment) { + if (typeof jsDoc.comment === 'string') { + return jsDoc.comment.trim(); + } else if (Array.isArray(jsDoc.comment)) { + return jsDoc.comment + .map((part: any) => typeof part === 'string' ? part : part.text) + .join('') + .trim(); + } + } + } + + // Fallback: try the full text and parse manually (for property nodes) + const fullText = node.getFullText(sourceFile); + const jsDocMatch = fullText.match(/\/\*\*\s*([\s\S]*?)\s*\*\//); + if (jsDocMatch) { + // Clean up the JSDoc comment + return jsDocMatch[1] + .split('\n') + .map(line => line.replace(/^\s*\*\s?/, '').trim()) // Remove leading * and whitespace + .filter(line => line.length > 0) // Remove empty lines + .join(' ') + .trim(); + } + + return null; +} + +/** + * Escape description text for use in Zod .describe() calls + */ +function escapeDescription(description: string): string { + return description + .replace(/\\/g, '\\\\') // Escape backslashes + .replace(/"/g, '\\"') // Escape quotes + .replace(/\n/g, '\\n') // Escape newlines + .replace(/\r/g, '\\r') // Escape carriage returns + .replace(/\t/g, '\\t'); // Escape tabs +} + +/** + * Generate an explicit TypeScript interface with JSDoc comments + */ +function generateExplicitInterface( + interfaceDecl: ts.InterfaceDeclaration, + sourceFile: ts.SourceFile, + camelCase: boolean, + interfaceName: string, + availableNestedTypes: string[] = [], + omitFields: string[] = [], + extendFields: Record = {}, + interfaceDescription: string | null = null +): string { + const properties: string[] = []; + const finalInterfaceName = camelCase ? toCamelCase(interfaceName) : interfaceName; + + // Process existing interface members + interfaceDecl.members.forEach((member) => { + if (ts.isPropertySignature(member)) { + const propertyName = member.name?.getText(sourceFile); + const isOptional = member.questionToken !== undefined; + const typeNode = member.type; + + if (propertyName && typeNode) { + // Check if this field should be omitted + if (omitFields.includes(propertyName)) { + return; // Skip this property + } + + const finalPropertyName = camelCase + ? toCamelCase(propertyName) + : propertyName; + + const tsType = convertZodToTypeScript(typeNode, sourceFile, interfaceName, availableNestedTypes); + + // Extract JSDoc comment for this property + const description = extractJSDocComment(member, sourceFile); + + // Build the TypeScript property with JSDoc + let propertyString = ''; + if (description) { + propertyString += ` /**\n * ${description.replace(/\*\//g, '* /')}\n */\n`; + } + + propertyString += ` ${finalPropertyName}${isOptional ? '?' : ''}: ${tsType};`; + properties.push(propertyString); + } + } + }); + + // Add extended fields + Object.entries(extendFields).forEach(([fieldName, config]) => { + const finalFieldName = camelCase ? toCamelCase(fieldName) : fieldName; + + let propertyString = ''; + if (config.description) { + propertyString += ` /**\n * ${config.description.replace(/\*\//g, '* /')}\n */\n`; + } + + const tsType = convertZodTypeToTypeScript(config.zodType); + // Extended fields from config are typically optional + propertyString += ` ${finalFieldName}?: ${tsType};`; + properties.push(propertyString); + }); + + // Generate the interface with JSDoc + let interfaceString = ''; + if (interfaceDescription) { + interfaceString += `/**\n * ${interfaceDescription.replace(/\*\//g, '* /')}\n */\n`; + } + + interfaceString += `export interface ${finalInterfaceName} {\n${properties.join('\n\n')}\n}`; + + return interfaceString; +} + +/** + * Convert a TypeScript type node to TypeScript type string for interface generation + */ +function convertZodToTypeScript( + typeNode: ts.TypeNode, + sourceFile: ts.SourceFile, + parentInterface?: string, + availableNestedTypes?: string[] +): string { + const typeText = typeNode.getText(sourceFile).trim(); + + // Handle nested interface references (e.g., AttachParams.Option) + if (parentInterface && typeText.includes(`${parentInterface}.`)) { + const nestedTypeName = typeText.replace(`${parentInterface}.`, `${parentInterface}`); + if (availableNestedTypes?.includes(nestedTypeName)) { + return nestedTypeName; + } + } + + // Handle external type references (CustomerData, EntityData, etc.) + if (typeText === "CustomerData" || typeText === "Shared.CustomerData") { + return "CustomerData"; + } + if (typeText === "EntityData" || typeText === "Shared.EntityData") { + return "EntityData"; + } + + // Handle arrays + if (typeText.startsWith("Array<") && typeText.endsWith(">")) { + const innerType = typeText.slice(6, -1); + const innerTsType = convertZodToTypeScript( + { getText: () => innerType } as any, + sourceFile, + parentInterface, + availableNestedTypes + ); + return `${innerTsType}[]`; + } + + if (typeText.endsWith("[]")) { + const innerType = typeText.slice(0, -2); + const innerTsType = convertZodToTypeScript( + { getText: () => innerType } as unknown as ts.TypeNode, + sourceFile, + parentInterface, + availableNestedTypes + ); + return `${innerTsType}[]`; + } + + // Handle Record types + if (typeText.startsWith("Record<")) { + return typeText; // Keep Record as is + } + + // Handle nullable types + if (typeText.includes(" | null")) { + const baseType = typeText.replace(" | null", "").trim(); + const baseTsType = convertZodToTypeScript( + { getText: () => baseType } as any, + sourceFile, + parentInterface, + availableNestedTypes + ); + return `${baseTsType} | null`; + } + + // Return the type as is for basic types and others + return typeText; +} + +/** + * Convert a Zod type string to TypeScript type string + */ +function convertZodTypeToTypeScript(zodType: string): string { + // Handle common Zod types + if (zodType.includes('z.string()') && !zodType.includes('z.record(')) return 'string'; + if (zodType.includes('z.number()')) return 'number'; + if (zodType.includes('z.boolean()')) return 'boolean'; + if (zodType.includes('z.any()') && !zodType.includes('z.record(')) return 'any'; + if (zodType.includes('z.unknown()')) return 'unknown'; + + // Handle arrays + if (zodType.includes('z.array(')) { + if (zodType.includes('z.array(z.string())')) return 'string[]'; + if (zodType.includes('z.array(z.number())')) return 'number[]'; + if (zodType.includes('z.array(z.boolean())')) return 'boolean[]'; + // Handle nested schema arrays (e.g., z.array(AttachParamsOptionSchema)) + const arraySchemaMatch = zodType.match(/z\.array\((\w+Schema)\)/); + if (arraySchemaMatch) { + const schemaName = arraySchemaMatch[1]; + const interfaceName = schemaName.replace('Schema', ''); + return `${interfaceName}[]`; + } + return 'any[]'; // Fallback for complex arrays + } + + // Handle records - need to parse more carefully to handle nested parentheses + if (zodType.includes('z.record(')) { + // Handle the simple case: z.record(z.string(), z.any()) + const simpleRecordMatch = zodType.match(/z\.record\(z\.string\(\),\s*z\.any\(\)\)/); + if (simpleRecordMatch) { + return 'Record'; + } + + // Handle other z.record patterns + const recordMatch = zodType.match(/z\.record\(([^,]+),\s*([^)]+)\)/); + if (recordMatch) { + const keyType = convertZodTypeToTypeScript(recordMatch[1].trim()); + const valueType = convertZodTypeToTypeScript(recordMatch[2].trim()); + return `Record<${keyType}, ${valueType}>`; + } + return 'Record'; + } + + // Handle unions + if (zodType.includes('z.union(')) { + // Try to parse union types more intelligently + const unionMatch = zodType.match(/z\.union\(\[(.*)\]\)/); + if (unionMatch) { + const unionTypes = unionMatch[1].split(', ').map(type => { + return convertZodTypeToTypeScript(type.trim()); + }); + return unionTypes.join(' | '); + } + return 'string | number'; // Simplified fallback + } + + // Handle literals + if (zodType.includes('z.literal(')) { + const literalMatch = zodType.match(/z\.literal\(([^)]+)\)/); + if (literalMatch) { + return literalMatch[1]; + } + } + + // Handle nullable types with .nullable() + if (zodType.includes('.nullable()')) { + const baseType = zodType.replace('.nullable()', '').trim(); + const baseTs = convertZodTypeToTypeScript(baseType); + return `${baseTs} | null`; + } + + // Handle optional types (shouldn't affect the type itself) + if (zodType.includes('.optional()')) { + const baseType = zodType.replace('.optional()', '').trim(); + return convertZodTypeToTypeScript(baseType); + } + + // Handle describe calls + if (zodType.includes('.describe(')) { + const baseType = zodType.replace(/\.describe\([^)]+\)/, '').trim(); + return convertZodTypeToTypeScript(baseType); + } + + // Fallback + return 'any'; +} + +// Example usage +export function generateCoreAttachParamsSchema() { + return generateCamelZod({ + inputFile: + "/Users/johnyeocx/Autumn/autumn-js/stainless/autumn-typescript/src/resources/core.ts", + typeName: "CoreAttachParams", + outputFile: + "/Users/johnyeocx/Autumn/autumn-js/nextjs/utils/core-attach-schema.ts", + camelCase: true, + }); +} diff --git a/typegen/genUtils/index.ts b/typegen/genUtils/index.ts new file mode 100644 index 00000000..64609794 --- /dev/null +++ b/typegen/genUtils/index.ts @@ -0,0 +1,7 @@ +// Type generation utilities +export { TypeGenerator } from './TypeGenerator'; +export { TypeGeneratorUtils } from './utils'; +export { + generateCamelZod, + generateCleanZodSchema +} from './auto-schema-generator'; \ No newline at end of file diff --git a/typegen/genUtils/utils.ts b/typegen/genUtils/utils.ts new file mode 100644 index 00000000..8f71989a --- /dev/null +++ b/typegen/genUtils/utils.ts @@ -0,0 +1,59 @@ +import { existsSync } from "fs"; +import path from "path"; + +/** + * Utility functions for type generation + */ +export class TypeGeneratorUtils { + /** + * Convert snake_case to camelCase + */ + static toCamelCase(str: string): string { + return str.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase()); + } + + /** + * Convert camelCase to snake_case + */ + static toSnakeCase(str: string): string { + return str.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`); + } + + /** + * Get relative path between two directories + */ + static getRelativePath(from: string, to: string): string { + return path.relative(path.dirname(from), to); + } + + /** + * Validate that source file exists + */ + static validateSourceFile(filePath: string): boolean { + return existsSync(filePath); + } + + /** + * Validate that all required paths exist + */ + static validatePaths(paths: { name: string; path: string }[]): void { + const missing = paths.filter(p => !existsSync(p.path)); + if (missing.length > 0) { + const missingPaths = missing.map(p => `${p.name}: ${p.path}`).join('\n '); + throw new Error(`Missing required paths:\n ${missingPaths}`); + } + } + + /** + * Create a standardized log message + */ + static createLogMessage(level: 'info' | 'success' | 'error' | 'warn', message: string): string { + const icons = { + info: '📝', + success: '✅', + error: '❌', + warn: '⚠️' + }; + return `${icons[level]} ${message}`; + } +} \ No newline at end of file diff --git a/typegen/generate-autumn-js-types.ts b/typegen/generate-autumn-js-types.ts new file mode 100644 index 00000000..26f1a470 --- /dev/null +++ b/typegen/generate-autumn-js-types.ts @@ -0,0 +1,48 @@ +#!/usr/bin/env tsx + +import path from "path"; +import { TypeGenerator, TypeGeneratorUtils } from "./genUtils"; +import { getAutumnJSTypeConfigs } from "./typeConfigs"; + +/** + * Generate camelCase types for autumn-js from @ts-sdk + * + * This script converts snake_case SDK types to camelCase Zod schemas + * for use in the autumn-js React library. + * + * Configuration is defined in ./typeConfigs.ts - check there to see + * exactly which types are being generated. + */ +async function main() { + console.log("🎯 Generating camelCase types for autumn-js...\n"); + + try { + // Define paths relative to this script + const tsSDKPath = path.resolve(__dirname, "../ts-sdk"); + const autumnJSPath = path.resolve(__dirname, "../autumn-js"); + + // Validate all required paths exist + TypeGeneratorUtils.validatePaths([ + { name: "@ts-sdk", path: tsSDKPath }, + { name: "autumn-js", path: autumnJSPath } + ]); + + // Get type configurations + const typeConfig = getAutumnJSTypeConfigs(tsSDKPath, autumnJSPath); + + console.log(`📋 Generating ${typeConfig.configs.length} types...`); + + // Generate all types + const generator = new TypeGenerator(tsSDKPath, autumnJSPath); + await generator.generateTypes(typeConfig); + + console.log("✅ Type generation completed!"); + + } catch (error) { + console.error("💥 autumn-js type generation failed:", error); + process.exit(1); + } +} + +// Run immediately +main(); \ No newline at end of file diff --git a/typegen/typeConfigs.ts b/typegen/typeConfigs.ts new file mode 100644 index 00000000..6ec78c6d --- /dev/null +++ b/typegen/typeConfigs.ts @@ -0,0 +1,243 @@ +import path from "path"; + +/** + * Configuration for individual type generation + */ +export interface TypeConfig { + /** Snake case type name from @ts-sdk */ + sourceName: string; + /** Camel case type name for autumn-js */ + targetName: string; + /** Source file path in @ts-sdk */ + sourceFile: string; + /** Target file path in autumn-js */ + targetFile: string; + /** Fields to omit from the generated schema */ + omitFields?: string[]; + /** Additional fields to extend the schema with (field name -> Zod schema) */ + extendFields?: Record; +} + +/** + * Configuration for type generation including output directory + */ +export interface TypeGenerationConfig { + /** Array of type configurations */ + configs: TypeConfig[]; + /** Relative path within target package for generated types */ + outputDir: string; +} + +/** + * Type configurations for autumn-js generation + * + * This is the main configuration file that defines which types get converted + * from snake_case (@ts-sdk) to camelCase (autumn-js). + * + * Add new type conversions here to extend the generation pipeline. + */ +export function getAutumnJSTypeConfigs(tsSDKPath: string, autumnJSPath: string): TypeGenerationConfig { + const topLevelFile = path.join(tsSDKPath, "src/resources/top-level.ts"); + const sharedFile = path.join(tsSDKPath, "src/resources/shared.ts"); + const customersFile = path.join(tsSDKPath, "src/resources/customers.ts"); + const entitiesFile = path.join(tsSDKPath, "src/resources/entities.ts"); + const referralsFile = path.join(tsSDKPath, "src/resources/referrals.ts"); + + // Output directory configuration - change this to modify where types are generated + const outputDir = "src/libraries/react/clientTypes"; + const generatedDir = path.join(autumnJSPath, outputDir); + + return { + outputDir, + configs: [ + // Shared/common types (used across multiple schemas) + { + sourceName: "CustomerData", + targetName: "CustomerData", + sourceFile: sharedFile, + targetFile: path.join(generatedDir, "customerDataTypes.ts"), + }, + { + sourceName: "EntityData", + targetName: "EntityData", + sourceFile: sharedFile, + targetFile: path.join(generatedDir, "entityDataTypes.ts"), + }, + + // Customer management types + { + sourceName: "CustomerCreateParams", + targetName: "CreateCustomerParams", + sourceFile: customersFile, + targetFile: path.join(generatedDir, "createCustomerTypes.ts"), + omitFields: ["id"], // Omit "id" field as mentioned in your usage + extendFields: { + "errorOnNotFound": { + zodType: "z.boolean().optional()", + description: "Whether to return an error if customer is not found" + } + } + }, + + // Entity management types + { + sourceName: "EntityCreateParams", + targetName: "CreateEntityParams", + sourceFile: entitiesFile, + targetFile: path.join(generatedDir, "createEntityTypes.ts"), + // No omitFields needed - EntityCreateParams doesn't have customer_id + }, + { + sourceName: "EntityGetParams", + targetName: "GetEntityParams", + sourceFile: entitiesFile, + targetFile: path.join(generatedDir, "getEntityTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + + // Referral management types + { + sourceName: "ReferralCreateCodeParams", + targetName: "CreateReferralCodeParams", + sourceFile: referralsFile, + targetFile: path.join(generatedDir, "createReferralCodeTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + { + sourceName: "ReferralRedeemCodeParams", + targetName: "RedeemReferralCodeParams", + sourceFile: referralsFile, + targetFile: path.join(generatedDir, "redeemReferralCodeTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + + // Core attachment flow types + { + sourceName: "AttachParams", + targetName: "AttachParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "attachTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + extendFields: { + "dialog": { + zodType: "z.any().optional()", + description: "DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead." + }, + "openInNewTab": { + zodType: "z.boolean().optional()", + description: "Whether to open checkout in a new tab" + }, + "metadata": { + zodType: "z.record(z.string(), z.string()).optional()", + description: "Additional metadata for the request" + } + } + }, + { + sourceName: "CheckoutParams", + targetName: "CheckoutParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "checkoutTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + extendFields: { + "dialog": { + zodType: "z.any().optional()", + description: "Dialog configuration for checkout flow" + }, + "openInNewTab": { + zodType: "z.boolean().optional()", + description: "Whether to open checkout in a new tab" + } + } + }, + + // Billing and payment types + { + sourceName: "BillingPortalParams", + targetName: "OpenBillingPortalParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "billingPortalTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + extendFields: { + "openInNewTab": { + zodType: "z.boolean().optional()", + description: "Whether to open billing portal in a new tab" + } + } + }, + { + sourceName: "SetupPaymentParams", + targetName: "SetupPaymentParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "setupPaymentTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + extendFields: { + "openInNewTab": { + zodType: "z.boolean().optional()", + description: "Whether to open payment setup in a new tab" + } + } + }, + + // Product management types + { + sourceName: "CancelParams", + targetName: "CancelParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "cancelTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + + // Usage and analytics types + { + sourceName: "CheckParams", + targetName: "CheckParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "checkTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + extendFields: { + "dialog": { + zodType: "z.any().optional()", + description: "Dialog configuration for feature check flow" + }, + "properties": { + zodType: "z.record(z.string(), z.any()).optional()", + description: "Additional properties for the feature check" + } + } + }, + { + sourceName: "TrackParams", + targetName: "TrackParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "trackTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + { + sourceName: "QueryParams", + targetName: "QueryParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "queryTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + ] + }; +} + +/** + * Type configurations for @useautumn/convex generation + * TODO: Implement when ready to generate Convex types + */ +export function getConvexTypeConfigs(_tsSDKPath: string, _convexPath: string): TypeConfig[] { + // Placeholder for future Convex type generation + return []; +} + +/** + * Type configurations for atmn CLI generation + * TODO: Implement when ready to generate CLI types + */ +export function getAtmnTypeConfigs(_tsSDKPath: string, _atmnPath: string): TypeConfig[] { + // Placeholder for future CLI type generation + return []; +} \ No newline at end of file From 2e2141668c331d51579cf22ea9ecf36931bb1fee Mon Sep 17 00:00:00 2001 From: John Yeo Date: Thu, 9 Oct 2025 16:17:50 +0100 Subject: [PATCH 04/35] fix: typegen --- .../react/clientTypes/attachTypes.ts | 60 +++++--- .../react/clientTypes/checkoutTypes.ts | 60 +++++--- nextjs/autumn.config.ts.backup | 134 ++++++++---------- package.json | 3 +- 4 files changed, 151 insertions(+), 106 deletions(-) diff --git a/autumn-js/src/libraries/react/clientTypes/attachTypes.ts b/autumn-js/src/libraries/react/clientTypes/attachTypes.ts index 5baa0d46..5d6d9705 100644 --- a/autumn-js/src/libraries/react/clientTypes/attachTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/attachTypes.ts @@ -14,20 +14,19 @@ export const AttachParamsOptionSchema = z.object({ }); export const AttachParamsSchema = z.object({ - checkoutSessionParams: z.unknown().optional(), - customerData: CustomerDataSchema.describe("Customer data if using attach to auto create customer").optional(), - entityData: EntityDataSchema.describe("Entity data for creating an entity").optional(), - entityId: z.string().nullable().optional(), - forceCheckout: z.boolean().optional(), - freeTrial: z.boolean().optional(), + checkoutSessionParams: z.unknown().describe("Additional parameters to pass onto Stripe when creating the checkout session").optional(), + customerData: CustomerDataSchema.describe("If auto creating a customer, the properties from this field will be used.").optional(), + entityData: EntityDataSchema.describe("If attaching a product to an entity and auto creating the entity, the properties\nfrom this field will be used. feature_id is required.").optional(), + entityId: z.string().nullable().describe("If attaching a product to an entity, can be used to auto create the entity").optional(), + forceCheckout: z.boolean().describe("Always return a Stripe Checkout URL, even if the customer's card is already on\nfile").optional(), + freeTrial: z.boolean().describe("If the product has a free trial, this field can be used to disable it when\nattaching (by passing in false)").optional(), invoice: z.boolean().optional(), - options: z.array(AttachParamsOptionSchema).nullable().optional(), - productId: z.string().nullable().optional(), - productIds: z.array(z.string()).nullable().optional(), - reward: z.union([z.string(), z.array(z.string())]).optional(), + options: z.array(AttachParamsOptionSchema).nullable().describe("Pass in quantities for prepaid features").optional(), + productId: z.string().nullable().describe("Product ID, set when creating the product in the Autumn dashboard").optional(), + productIds: z.array(z.string()).nullable().describe("Can be used to attach multiple products to the customer at once. For example,\nattaching a main product and an add-on.").optional(), + reward: z.union([z.string(), z.array(z.string())]).describe("An Autumn promo_code or reward_id to apply at checkout").optional(), setupPayment: z.boolean().optional(), - skipCheckout: z.boolean().optional(), - successUrl: z.string().optional(), + successUrl: z.string().describe("URL to redirect to after the purchase is successful").optional(), dialog: z.any().optional().describe("DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead."), openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab"), metadata: z.record(z.string(), z.string()).optional().describe("Additional metadata for the request") @@ -46,38 +45,67 @@ export interface AttachParamsOption { } export interface AttachParams { + /** + * Additional parameters to pass onto Stripe when creating the checkout session + */ checkoutSessionParams?: unknown; /** - * Customer data if using attach to auto create customer + * If auto creating a customer, the properties from this field will be used. */ customerData?: CustomerData; /** - * Entity data for creating an entity + * If attaching a product to an entity and auto creating the entity, the properties +from this field will be used. feature_id is required. */ entityData?: EntityData; + /** + * If attaching a product to an entity, can be used to auto create the entity + */ entityId?: string | null; + /** + * Always return a Stripe Checkout URL, even if the customer's card is already on +file + */ forceCheckout?: boolean; + /** + * If the product has a free trial, this field can be used to disable it when +attaching (by passing in false) + */ freeTrial?: boolean; invoice?: boolean; + /** + * Pass in quantities for prepaid features + */ options?: AttachParamsOption[] | null; + /** + * Product ID, set when creating the product in the Autumn dashboard + */ productId?: string | null; + /** + * Can be used to attach multiple products to the customer at once. For example, +attaching a main product and an add-on. + */ productIds?: string[] | null; + /** + * An Autumn promo_code or reward_id to apply at checkout + */ reward?: string | Array; setupPayment?: boolean; - skipCheckout?: boolean; - + /** + * URL to redirect to after the purchase is successful + */ successUrl?: string; /** diff --git a/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts b/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts index 0a4330eb..8481c9ea 100644 --- a/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts @@ -14,20 +14,19 @@ export const CheckoutParamsOptionSchema = z.object({ }); export const CheckoutParamsSchema = z.object({ - checkoutSessionParams: z.unknown().optional(), - customerData: CustomerDataSchema.describe("Customer data if using attach to auto create customer").optional(), - entityData: EntityDataSchema.describe("Entity data for creating an entity").optional(), - entityId: z.string().nullable().optional(), - forceCheckout: z.boolean().optional(), - freeTrial: z.boolean().optional(), + checkoutSessionParams: z.unknown().describe("Additional parameters to pass onto Stripe when creating the checkout session").optional(), + customerData: CustomerDataSchema.describe("If auto creating a customer, the properties from this field will be used.").optional(), + entityData: EntityDataSchema.describe("If attaching a product to an entity and auto creating the entity, the properties\nfrom this field will be used. feature_id is required.").optional(), + entityId: z.string().nullable().describe("If attaching a product to an entity, can be used to auto create the entity").optional(), + forceCheckout: z.boolean().describe("Always return a Stripe Checkout URL, even if the customer's card is already on\nfile").optional(), + freeTrial: z.boolean().describe("If the product has a free trial, this field can be used to disable it when\nattaching (by passing in false)").optional(), invoice: z.boolean().optional(), - options: z.array(CheckoutParamsOptionSchema).nullable().optional(), - productId: z.string().nullable().optional(), - productIds: z.array(z.string()).nullable().optional(), - reward: z.union([z.string(), z.array(z.string())]).optional(), + options: z.array(CheckoutParamsOptionSchema).nullable().describe("Pass in quantities for prepaid features").optional(), + productId: z.string().nullable().describe("Product ID, set when creating the product in the Autumn dashboard").optional(), + productIds: z.array(z.string()).nullable().describe("Can be used to attach multiple products to the customer at once. For example,\nattaching a main product and an add-on.").optional(), + reward: z.union([z.string(), z.array(z.string())]).describe("An Autumn promo_code or reward_id to apply at checkout").optional(), setupPayment: z.boolean().optional(), - skipCheckout: z.boolean().optional(), - successUrl: z.string().optional(), + successUrl: z.string().describe("URL to redirect to after the purchase is successful").optional(), dialog: z.any().optional().describe("Dialog configuration for checkout flow"), openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab") }); @@ -45,38 +44,67 @@ export interface CheckoutParamsOption { } export interface CheckoutParams { + /** + * Additional parameters to pass onto Stripe when creating the checkout session + */ checkoutSessionParams?: unknown; /** - * Customer data if using attach to auto create customer + * If auto creating a customer, the properties from this field will be used. */ customerData?: CustomerData; /** - * Entity data for creating an entity + * If attaching a product to an entity and auto creating the entity, the properties +from this field will be used. feature_id is required. */ entityData?: EntityData; + /** + * If attaching a product to an entity, can be used to auto create the entity + */ entityId?: string | null; + /** + * Always return a Stripe Checkout URL, even if the customer's card is already on +file + */ forceCheckout?: boolean; + /** + * If the product has a free trial, this field can be used to disable it when +attaching (by passing in false) + */ freeTrial?: boolean; invoice?: boolean; + /** + * Pass in quantities for prepaid features + */ options?: CheckoutParamsOption[] | null; + /** + * Product ID, set when creating the product in the Autumn dashboard + */ productId?: string | null; + /** + * Can be used to attach multiple products to the customer at once. For example, +attaching a main product and an add-on. + */ productIds?: string[] | null; + /** + * An Autumn promo_code or reward_id to apply at checkout + */ reward?: string | Array; setupPayment?: boolean; - skipCheckout?: boolean; - + /** + * URL to redirect to after the purchase is successful + */ successUrl?: string; /** diff --git a/nextjs/autumn.config.ts.backup b/nextjs/autumn.config.ts.backup index 1028fbc1..23a383ed 100644 --- a/nextjs/autumn.config.ts.backup +++ b/nextjs/autumn.config.ts.backup @@ -1,108 +1,96 @@ import { feature, + product, featureItem, pricedFeatureItem, priceItem, - product, } from "atmn"; // Features -export const seats = feature({ - id: "seats", - name: "Seats", +export const pages = feature({ + id: "pages", + name: "Waitlist Pages", type: "continuous_use", }); -export const messages = feature({ - id: "messages", - name: "Messages", - type: "single_use", +export const projects = feature({ + id: "projects", + name: "Projects", + type: "continuous_use", }); -// Products -export const entities = product({ - id: "entities", - name: "Entities", - items: [ - featureItem({ - feature_id: messages.id, - included_usage: 100, - interval: "month", - entity_feature_id: seats.id, - }), - - featureItem({ - feature_id: seats.id, - included_usage: 10, - }), - ], +export const warmupEmails = feature({ + id: "warmup_emails", + name: "Warmup emails", + type: "single_use", }); -export const free = product({ - id: "free", - name: "Free", - items: [ - featureItem({ - feature_id: messages.id, - included_usage: 10, - interval: "month", - }), +export const slackNotifications = feature({ + id: "slack_notifications", + name: "Slack notifications", + type: "boolean", +}); - featureItem({ - feature_id: seats.id, - included_usage: 10, - }), - ], +export const discordNotifications = feature({ + id: "discord_notifications", + name: "Discord notifications", + type: "boolean", }); -export const oneOff = product({ - id: "one_off", - name: "One off", - items: [ - priceItem({ - price: 10, - }), - ], +export const waitlists = feature({ + id: "waitlists", + name: "Waitlists", + type: "continuous_use", }); -export const pro = product({ - id: "pro", - name: "Pro", +// Products +export const project = product({ + id: "project", + name: "Project", items: [ priceItem({ - price: 10, - interval: "month", - }), - - featureItem({ - feature_id: messages.id, - included_usage: 1000, + price: 29.99, interval: "month", }), - featureItem({ - feature_id: seats.id, - included_usage: 100, + pricedFeatureItem({ + feature_id: pages.id, + price: 5, + interval: "week", + included_usage: 1, + billing_units: 1, + usage_model: "pay_per_use", + entity_feature_id: waitlists.id, }), - ], -}); -export const prepaid = product({ - id: "prepaid", - name: "Prepaid", - items: [ - priceItem({ - price: 10, + pricedFeatureItem({ + feature_id: waitlists.id, + price: 5, interval: "month", + included_usage: 1, + billing_units: 1, + usage_model: "prepaid", }), pricedFeatureItem({ - feature_id: messages.id, - price: 10, - interval: "month", - included_usage: 0, - billing_units: 1, + feature_id: warmupEmails.id, + price: 0.5, + included_usage: 1000, + billing_units: 1000, usage_model: "prepaid", + entity_feature_id: waitlists.id, + }), + + featureItem({ + feature_id: discordNotifications.id, + included_usage: undefined, + entity_feature_id: waitlists.id, + }), + + featureItem({ + feature_id: slackNotifications.id, + included_usage: undefined, + entity_feature_id: waitlists.id, }), ], }); diff --git a/package.json b/package.json index de43d21c..654b38f0 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "private": true, "packageManager": "pnpm@10.14.0", "scripts": { - "test-cli": "pnpm --filter atmn test-cli" + "test-cli": "pnpm --filter atmn test-cli", + "gen:autumn-js": "tsx typegen/generate-autumn-js-types.ts" }, "workspaces": [ "package", From 0954a8d2a38e273f596dd329b57c17b62c021aae Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Fri, 10 Oct 2025 19:06:42 +0100 Subject: [PATCH 05/35] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20js=20docs=20?= =?UTF-8?q?for=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/libraries/react/AutumnContext.tsx | 86 +- .../react/clientTypes/attachTypes.ts | 94 +- .../react/clientTypes/billingPortalTypes.ts | 6 +- .../react/clientTypes/cancelTypes.ts | 20 +- .../libraries/react/clientTypes/checkTypes.ts | 75 +- .../react/clientTypes/checkoutTypes.ts | 94 +- .../react/clientTypes/createCustomerTypes.ts | 54 +- .../react/clientTypes/createEntityTypes.ts | 15 +- .../clientTypes/createReferralCodeTypes.ts | 5 +- .../react/clientTypes/customerDataTypes.ts | 31 +- .../react/clientTypes/entityDataTypes.ts | 15 +- .../libraries/react/clientTypes/queryTypes.ts | 10 +- .../clientTypes/redeemReferralCodeTypes.ts | 5 +- .../react/clientTypes/setupPaymentTypes.ts | 10 +- .../libraries/react/clientTypes/trackTypes.ts | 89 +- .../react/hooks/helpers/handleCheck.ts | 315 +- .../react/hooks/types/useCustomerMethods.ts | 183 + .../react/hooks/types/useEntityMethods.ts | 120 + .../libraries/react/hooks/useAnalytics.tsx | 15 + .../libraries/react/hooks/useCustomerBase.tsx | 413 +- .../src/libraries/react/hooks/useEntity.tsx | 16 + .../libraries/react/hooks/useEntityBase.tsx | 29 +- package.json | 40 +- pnpm-lock.yaml | 6363 ++--------------- ts-sdk | 2 +- typegen/genUtils/HookGenerator.ts | 123 + typegen/genUtils/MethodGenerator.ts | 271 + typegen/genUtils/auto-schema-generator.ts | 500 +- typegen/genUtils/index.ts | 16 +- typegen/generate-autumn-js-types.ts | 93 +- typegen/hookDocs.ts | 227 + typegen/package.json | 17 + typegen/tsconfig.json | 44 + typegen/typeConfigs.ts | 584 +- .../checkout-dialog/checkout-dialog.tsx | 74 +- .../checkout-dialog/lib/checkout-content.tsx | 21 +- .../paywall-dialog/lib/paywall-content.tsx | 4 +- .../lib/pricing-table-content.tsx | 8 +- ui/registry/pricing-table/pricing-table.tsx | 14 +- 39 files changed, 3198 insertions(+), 6903 deletions(-) create mode 100644 autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts create mode 100644 autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts create mode 100644 typegen/genUtils/HookGenerator.ts create mode 100644 typegen/genUtils/MethodGenerator.ts mode change 100644 => 100755 typegen/generate-autumn-js-types.ts create mode 100644 typegen/hookDocs.ts create mode 100644 typegen/package.json create mode 100644 typegen/tsconfig.json diff --git a/autumn-js/src/libraries/react/AutumnContext.tsx b/autumn-js/src/libraries/react/AutumnContext.tsx index 6dcd7b1d..fc150689 100644 --- a/autumn-js/src/libraries/react/AutumnContext.tsx +++ b/autumn-js/src/libraries/react/AutumnContext.tsx @@ -1,65 +1,67 @@ -import { AutumnClient } from "./client/ReactAutumnClient"; import { createContext, useContext } from "react"; +import { AutumnClient } from "./client/ReactAutumnClient"; export interface AutumnDialogContext { - props: any; - setProps: (props: any) => void; - open: boolean; - setOpen: (open: boolean) => void; - setComponent: (component: any) => void; + props: any; + setProps: (props: any) => void; + open: boolean; + setOpen: (open: boolean) => void; + setComponent: (component: any) => void; } export interface AutumnContextParams { - initialized: boolean; - disableDialogs: boolean; + initialized: boolean; + disableDialogs: boolean; - client: AutumnClient; + client: AutumnClient; - // Internal - paywallDialog: AutumnDialogContext; - attachDialog: AutumnDialogContext; - paywallRef: React.RefObject; + // Internal + paywallDialog: AutumnDialogContext; + attachDialog: AutumnDialogContext; + paywallRef: React.RefObject; } +export type AutumnContextType = React.Context; + export const AutumnContext = createContext({ - initialized: false, - disableDialogs: false, + initialized: false, + disableDialogs: false, - client: new AutumnClient({ backendUrl: "" }), + client: new AutumnClient({ backendUrl: "" }), - paywallDialog: { - props: null, - setProps: () => {}, - open: false, - setOpen: () => {}, - setComponent: () => {}, - }, + paywallDialog: { + props: null, + setProps: () => {}, + open: false, + setOpen: () => {}, + setComponent: () => {}, + }, - attachDialog: { - props: null, - setProps: () => {}, - open: false, - setOpen: () => {}, - setComponent: () => {}, - }, + attachDialog: { + props: null, + setProps: () => {}, + open: false, + setOpen: () => {}, + setComponent: () => {}, + }, - paywallRef: { current: null }, + paywallRef: { current: null }, }); export const useAutumnContext = ({ - AutumnContext, - name, - errorIfNotInitialized = true, + AutumnContext, + name, + errorIfNotInitialized = true, }: { - AutumnContext: React.Context; - name: string; - errorIfNotInitialized?: boolean; + AutumnContext: React.Context; + name: string; + errorIfNotInitialized?: boolean; }) => { - const context = useContext(AutumnContext); + const context = useContext(AutumnContext); - if (!context.initialized && errorIfNotInitialized) { - throw new Error(`${name} must be used within `); - } + if (!context.initialized && errorIfNotInitialized) { + throw new Error(`${name} must be used within `); + } - return context; + return context; }; diff --git a/autumn-js/src/libraries/react/clientTypes/attachTypes.ts b/autumn-js/src/libraries/react/clientTypes/attachTypes.ts index 5d6d9705..e0e1f939 100644 --- a/autumn-js/src/libraries/react/clientTypes/attachTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/attachTypes.ts @@ -5,6 +5,19 @@ import { EntityDataSchema } from "./entityDataTypes"; import type { CustomerData } from "./customerDataTypes"; import type { EntityData } from "./entityDataTypes"; +export const AttachParamsCustomerDataSchema = z.object({ + email: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + metadata: z.record(z.string(), z.unknown()).nullable().optional(), + name: z.string().nullable().optional(), + stripeId: z.string().nullable().optional() +}); + +export const AttachParamsEntityDataSchema = z.object({ + featureId: z.string(), + name: z.string().optional() +}); + export const AttachParamsOptionSchema = z.object({ featureId: z.string(), quantity: z.number(), @@ -14,24 +27,42 @@ export const AttachParamsOptionSchema = z.object({ }); export const AttachParamsSchema = z.object({ - checkoutSessionParams: z.unknown().describe("Additional parameters to pass onto Stripe when creating the checkout session").optional(), - customerData: CustomerDataSchema.describe("If auto creating a customer, the properties from this field will be used.").optional(), - entityData: EntityDataSchema.describe("If attaching a product to an entity and auto creating the entity, the properties\nfrom this field will be used. feature_id is required.").optional(), - entityId: z.string().nullable().describe("If attaching a product to an entity, can be used to auto create the entity").optional(), - forceCheckout: z.boolean().describe("Always return a Stripe Checkout URL, even if the customer's card is already on\nfile").optional(), - freeTrial: z.boolean().describe("If the product has a free trial, this field can be used to disable it when\nattaching (by passing in false)").optional(), + checkoutSessionParams: z.unknown().optional(), + customerData: AttachParamsCustomerDataSchema.optional(), + entityData: AttachParamsEntityDataSchema.optional(), + entityId: z.string().nullable().optional(), + forceCheckout: z.boolean().optional(), + freeTrial: z.boolean().optional(), invoice: z.boolean().optional(), - options: z.array(AttachParamsOptionSchema).nullable().describe("Pass in quantities for prepaid features").optional(), - productId: z.string().nullable().describe("Product ID, set when creating the product in the Autumn dashboard").optional(), - productIds: z.array(z.string()).nullable().describe("Can be used to attach multiple products to the customer at once. For example,\nattaching a main product and an add-on.").optional(), - reward: z.union([z.string(), z.array(z.string())]).describe("An Autumn promo_code or reward_id to apply at checkout").optional(), + options: z.array(AttachParamsOptionSchema).nullable().optional(), + productId: z.string().nullable().optional(), + productIds: z.array(z.string()).nullable().optional(), + reward: z.union([z.string(), z.array(z.string())]).optional(), setupPayment: z.boolean().optional(), - successUrl: z.string().describe("URL to redirect to after the purchase is successful").optional(), + successUrl: z.string().optional(), dialog: z.any().optional().describe("DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead."), openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab"), metadata: z.record(z.string(), z.string()).optional().describe("Additional metadata for the request") }); +export interface AttachParamsCustomerData { + email?: string | null; + + fingerprint?: string | null; + + metadata?: { [key: string]: unknown } | null; + + name?: string | null; + + stripeId?: string | null; +} + +export interface AttachParamsEntityData { + featureId: string; + + name?: string; +} + export interface AttachParamsOption { featureId: string; @@ -45,67 +76,30 @@ export interface AttachParamsOption { } export interface AttachParams { - /** - * Additional parameters to pass onto Stripe when creating the checkout session - */ checkoutSessionParams?: unknown; - /** - * If auto creating a customer, the properties from this field will be used. - */ - customerData?: CustomerData; + customerData?: AttachParamsCustomerData; - /** - * If attaching a product to an entity and auto creating the entity, the properties -from this field will be used. feature_id is required. - */ - entityData?: EntityData; + entityData?: AttachParamsEntityData; - /** - * If attaching a product to an entity, can be used to auto create the entity - */ entityId?: string | null; - /** - * Always return a Stripe Checkout URL, even if the customer's card is already on -file - */ forceCheckout?: boolean; - /** - * If the product has a free trial, this field can be used to disable it when -attaching (by passing in false) - */ freeTrial?: boolean; invoice?: boolean; - /** - * Pass in quantities for prepaid features - */ options?: AttachParamsOption[] | null; - /** - * Product ID, set when creating the product in the Autumn dashboard - */ productId?: string | null; - /** - * Can be used to attach multiple products to the customer at once. For example, -attaching a main product and an add-on. - */ productIds?: string[] | null; - /** - * An Autumn promo_code or reward_id to apply at checkout - */ reward?: string | Array; setupPayment?: boolean; - /** - * URL to redirect to after the purchase is successful - */ successUrl?: string; /** diff --git a/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts b/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts index e82ee988..739746a9 100644 --- a/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts @@ -2,15 +2,11 @@ import { z } from "zod"; export const BillingPortalParamsSchema = z.object({ - returnUrl: z.string().describe("URL to return to after exiting the billing portal. Must include http:// or\nhttps://").optional(), + returnUrl: z.string().optional(), openInNewTab: z.boolean().optional().describe("Whether to open billing portal in a new tab") }); export interface BillingPortalParams { - /** - * URL to return to after exiting the billing portal. Must include http:// or -https:// - */ returnUrl?: string; /** diff --git a/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts b/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts index b43f2f86..a66c6857 100644 --- a/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts @@ -2,30 +2,18 @@ import { z } from "zod"; export const CancelParamsSchema = z.object({ - productId: z.string().describe("The ID of the product to cancel"), - cancelImmediately: z.boolean().describe("Whether to cancel the product immediately or at period end").optional(), - entityId: z.string().nullable().describe("The ID of the entity (optional)").optional(), - prorate: z.boolean().nullable().describe("Whether to prorate the cancellation (defaults to true if not specified)").optional() + productId: z.string(), + cancelImmediately: z.boolean().optional(), + entityId: z.string().nullable().optional(), + prorate: z.boolean().nullable().optional() }); export interface CancelParams { - /** - * The ID of the product to cancel - */ productId: string; - /** - * Whether to cancel the product immediately or at period end - */ cancelImmediately?: boolean; - /** - * The ID of the entity (optional) - */ entityId?: string | null; - /** - * Whether to prorate the cancellation (defaults to true if not specified) - */ prorate?: boolean | null; } diff --git a/autumn-js/src/libraries/react/clientTypes/checkTypes.ts b/autumn-js/src/libraries/react/clientTypes/checkTypes.ts index 4e244e0d..6dea51ce 100644 --- a/autumn-js/src/libraries/react/clientTypes/checkTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/checkTypes.ts @@ -5,58 +5,65 @@ import { EntityDataSchema } from "./entityDataTypes"; import type { CustomerData } from "./customerDataTypes"; import type { EntityData } from "./entityDataTypes"; +export const CheckParamsCustomerDataSchema = z.object({ + email: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + metadata: z.record(z.string(), z.unknown()).nullable().optional(), + name: z.string().nullable().optional(), + stripeId: z.string().nullable().optional() +}); + +export const CheckParamsEntityDataSchema = z.object({ + featureId: z.string(), + name: z.string().optional() +}); + export const CheckParamsSchema = z.object({ - customerData: CustomerDataSchema.describe("Customer data to create or update the customer if they don't exist").optional(), - entityData: EntityDataSchema.describe("Entity data to create the entity if it doesn't exist").optional(), - entityId: z.string().describe("The ID of the entity (optional)").optional(), - featureId: z.string().describe("The ID of the feature to check access for").optional(), - productId: z.string().describe("The ID of the product to check").optional(), - requiredBalance: z.number().describe("The required balance for the check").optional(), - sendEvent: z.boolean().describe("Whether to send a usage event if allowed").optional(), - withPreview: z.boolean().describe("Whether to include preview information in the response").optional(), + customerData: CheckParamsCustomerDataSchema.optional(), + entityData: CheckParamsEntityDataSchema.optional(), + entityId: z.string().optional(), + featureId: z.string().optional(), + productId: z.string().optional(), + requiredBalance: z.number().optional(), + sendEvent: z.boolean().optional(), + withPreview: z.boolean().optional(), dialog: z.any().optional().describe("Dialog configuration for feature check flow"), properties: z.record(z.string(), z.any()).optional().describe("Additional properties for the feature check") }); +export interface CheckParamsCustomerData { + email?: string | null; + + fingerprint?: string | null; + + metadata?: { [key: string]: unknown } | null; + + name?: string | null; + + stripeId?: string | null; +} + +export interface CheckParamsEntityData { + featureId: string; + + name?: string; +} + export interface CheckParams { - /** - * Customer data to create or update the customer if they don't exist - */ - customerData?: CustomerData; + customerData?: CheckParamsCustomerData; - /** - * Entity data to create the entity if it doesn't exist - */ - entityData?: EntityData; + entityData?: CheckParamsEntityData; - /** - * The ID of the entity (optional) - */ entityId?: string; - /** - * The ID of the feature to check access for - */ featureId?: string; - /** - * The ID of the product to check - */ productId?: string; - /** - * The required balance for the check - */ requiredBalance?: number; - /** - * Whether to send a usage event if allowed - */ sendEvent?: boolean; - /** - * Whether to include preview information in the response - */ withPreview?: boolean; /** diff --git a/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts b/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts index 8481c9ea..42efa0a3 100644 --- a/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts @@ -5,6 +5,19 @@ import { EntityDataSchema } from "./entityDataTypes"; import type { CustomerData } from "./customerDataTypes"; import type { EntityData } from "./entityDataTypes"; +export const CheckoutParamsCustomerDataSchema = z.object({ + email: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + metadata: z.record(z.string(), z.unknown()).nullable().optional(), + name: z.string().nullable().optional(), + stripeId: z.string().nullable().optional() +}); + +export const CheckoutParamsEntityDataSchema = z.object({ + featureId: z.string(), + name: z.string().optional() +}); + export const CheckoutParamsOptionSchema = z.object({ featureId: z.string(), quantity: z.number(), @@ -14,23 +27,41 @@ export const CheckoutParamsOptionSchema = z.object({ }); export const CheckoutParamsSchema = z.object({ - checkoutSessionParams: z.unknown().describe("Additional parameters to pass onto Stripe when creating the checkout session").optional(), - customerData: CustomerDataSchema.describe("If auto creating a customer, the properties from this field will be used.").optional(), - entityData: EntityDataSchema.describe("If attaching a product to an entity and auto creating the entity, the properties\nfrom this field will be used. feature_id is required.").optional(), - entityId: z.string().nullable().describe("If attaching a product to an entity, can be used to auto create the entity").optional(), - forceCheckout: z.boolean().describe("Always return a Stripe Checkout URL, even if the customer's card is already on\nfile").optional(), - freeTrial: z.boolean().describe("If the product has a free trial, this field can be used to disable it when\nattaching (by passing in false)").optional(), + checkoutSessionParams: z.unknown().optional(), + customerData: CheckoutParamsCustomerDataSchema.optional(), + entityData: CheckoutParamsEntityDataSchema.optional(), + entityId: z.string().nullable().optional(), + forceCheckout: z.boolean().optional(), + freeTrial: z.boolean().optional(), invoice: z.boolean().optional(), - options: z.array(CheckoutParamsOptionSchema).nullable().describe("Pass in quantities for prepaid features").optional(), - productId: z.string().nullable().describe("Product ID, set when creating the product in the Autumn dashboard").optional(), - productIds: z.array(z.string()).nullable().describe("Can be used to attach multiple products to the customer at once. For example,\nattaching a main product and an add-on.").optional(), - reward: z.union([z.string(), z.array(z.string())]).describe("An Autumn promo_code or reward_id to apply at checkout").optional(), + options: z.array(CheckoutParamsOptionSchema).nullable().optional(), + productId: z.string().nullable().optional(), + productIds: z.array(z.string()).nullable().optional(), + reward: z.union([z.string(), z.array(z.string())]).optional(), setupPayment: z.boolean().optional(), - successUrl: z.string().describe("URL to redirect to after the purchase is successful").optional(), + successUrl: z.string().optional(), dialog: z.any().optional().describe("Dialog configuration for checkout flow"), openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab") }); +export interface CheckoutParamsCustomerData { + email?: string | null; + + fingerprint?: string | null; + + metadata?: { [key: string]: unknown } | null; + + name?: string | null; + + stripeId?: string | null; +} + +export interface CheckoutParamsEntityData { + featureId: string; + + name?: string; +} + export interface CheckoutParamsOption { featureId: string; @@ -44,67 +75,30 @@ export interface CheckoutParamsOption { } export interface CheckoutParams { - /** - * Additional parameters to pass onto Stripe when creating the checkout session - */ checkoutSessionParams?: unknown; - /** - * If auto creating a customer, the properties from this field will be used. - */ - customerData?: CustomerData; + customerData?: CheckoutParamsCustomerData; - /** - * If attaching a product to an entity and auto creating the entity, the properties -from this field will be used. feature_id is required. - */ - entityData?: EntityData; + entityData?: CheckoutParamsEntityData; - /** - * If attaching a product to an entity, can be used to auto create the entity - */ entityId?: string | null; - /** - * Always return a Stripe Checkout URL, even if the customer's card is already on -file - */ forceCheckout?: boolean; - /** - * If the product has a free trial, this field can be used to disable it when -attaching (by passing in false) - */ freeTrial?: boolean; invoice?: boolean; - /** - * Pass in quantities for prepaid features - */ options?: CheckoutParamsOption[] | null; - /** - * Product ID, set when creating the product in the Autumn dashboard - */ productId?: string | null; - /** - * Can be used to attach multiple products to the customer at once. For example, -attaching a main product and an add-on. - */ productIds?: string[] | null; - /** - * An Autumn promo_code or reward_id to apply at checkout - */ reward?: string | Array; setupPayment?: boolean; - /** - * URL to redirect to after the purchase is successful - */ successUrl?: string; /** diff --git a/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts b/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts index 53f89b13..4a5fe396 100644 --- a/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts @@ -3,59 +3,69 @@ import { z } from "zod"; import { EntityDataSchema } from "./entityDataTypes"; import type { EntityData } from "./entityDataTypes"; +export const CustomerCreateParamsEntityDataSchema = z.object({ + featureId: z.string(), + name: z.string().optional() +}); + export const CustomerCreateParamsSchema = z.object({ - expand: z.string().describe("Query param:").optional(), - email: z.string().nullable().describe("Body param: Customer's email address").optional(), - entityData: EntityDataSchema.nullable().describe("Body param: Entity data for creating an entity").optional(), - entityId: z.string().nullable().describe("Body param: Entity ID to associate with the customer").optional(), - fingerprint: z.string().nullable().describe("Body param: Unique identifier (eg, serial number) to detect duplicate customers\nand prevent free trial abuse").optional(), - metadata: z.record(z.string(), z.unknown()).nullable().describe("Body param: Additional metadata for the customer").optional(), - name: z.string().nullable().describe("Body param: Customer's name").optional(), - stripeId: z.string().nullable().describe("Body param: Stripe customer ID if you already have one").optional(), + expand: z.union([z.unknown(), z.literal('trials_used'), z.literal('rewards'), z.literal('entities'), z.literal('referrals'), z.literal('payment_method'), z.unknown()]).describe("Query param:").optional(), + email: z.string().nullable().describe("Body param:").optional(), + entityData: CustomerCreateParamsEntityDataSchema.describe("Body param:").optional(), + entityId: z.string().describe("Body param:").optional(), + fingerprint: z.string().describe("Body param:").optional(), + metadata: z.record(z.string(), z.unknown()).describe("Body param:").optional(), + name: z.string().nullable().describe("Body param:").optional(), + stripeId: z.string().describe("Body param:").optional(), errorOnNotFound: z.boolean().optional().describe("Whether to return an error if customer is not found") }); +export interface CustomerCreateParamsEntityData { + featureId: string; + + name?: string; +} + export interface CustomerCreateParams { /** * Query param: */ - expand?: string; + expand?: ('invoices' | 'trials_used' | 'rewards' | 'entities' | 'referrals' | 'payment_method' | 'upcoming_invoice')[]; /** - * Body param: Customer's email address + * Body param: */ email?: string | null; /** - * Body param: Entity data for creating an entity + * Body param: */ - entityData?: EntityData | null; + entityData?: CustomerCreateParamsEntityData; /** - * Body param: Entity ID to associate with the customer + * Body param: */ - entityId?: string | null; + entityId?: string; /** - * Body param: Unique identifier (eg, serial number) to detect duplicate customers -and prevent free trial abuse + * Body param: */ - fingerprint?: string | null; + fingerprint?: string; /** - * Body param: Additional metadata for the customer + * Body param: */ - metadata?: { [key: string]: unknown } | null; + metadata?: { [key: string]: unknown }; /** - * Body param: Customer's name + * Body param: */ name?: string | null; /** - * Body param: Stripe customer ID if you already have one + * Body param: */ - stripeId?: string | null; + stripeId?: string; /** * Whether to return an error if customer is not found diff --git a/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts b/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts index 87533000..a9cba182 100644 --- a/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts @@ -2,24 +2,15 @@ import { z } from "zod"; export const EntityCreateParamsSchema = z.object({ - id: z.string().describe("The ID of the entity"), - featureId: z.string().describe("The ID of the feature this entity is associated with"), - name: z.string().nullable().describe("The name of the entity").optional() + id: z.string(), + featureId: z.string(), + name: z.string().nullable().optional() }); export interface EntityCreateParams { - /** - * The ID of the entity - */ id: string; - /** - * The ID of the feature this entity is associated with - */ featureId: string; - /** - * The name of the entity - */ name?: string | null; } diff --git a/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts b/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts index 489e6776..1f3e7500 100644 --- a/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts @@ -2,12 +2,9 @@ import { z } from "zod"; export const ReferralCreateCodeParamsSchema = z.object({ - programId: z.string().describe("ID of your referral program") + programId: z.string() }); export interface ReferralCreateCodeParams { - /** - * ID of your referral program - */ programId: string; } diff --git a/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts b/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts index 351c6b64..7bd8d891 100644 --- a/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts @@ -2,40 +2,21 @@ import { z } from "zod"; export const CustomerDataSchema = z.object({ - email: z.string().nullable().describe("Customer's email address").optional(), - fingerprint: z.string().nullable().describe("Unique identifier (eg, serial number) to detect duplicate customers and prevent\nfree trial abuse").optional(), - metadata: z.record(z.string(), z.unknown()).nullable().describe("Additional metadata for the customer").optional(), - name: z.string().nullable().describe("Customer's name").optional(), - stripeId: z.string().nullable().describe("Stripe customer ID if you already have one").optional() -}).describe("Customer data for creating or updating a customer"); + email: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + metadata: z.record(z.string(), z.unknown()).nullable().optional(), + name: z.string().nullable().optional(), + stripeId: z.string().nullable().optional() +}); -/** - * Customer data for creating or updating a customer - */ export interface CustomerData { - /** - * Customer's email address - */ email?: string | null; - /** - * Unique identifier (eg, serial number) to detect duplicate customers and prevent -free trial abuse - */ fingerprint?: string | null; - /** - * Additional metadata for the customer - */ metadata?: { [key: string]: unknown } | null; - /** - * Customer's name - */ name?: string | null; - /** - * Stripe customer ID if you already have one - */ stripeId?: string | null; } diff --git a/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts b/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts index c6463b74..4fd967ec 100644 --- a/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts @@ -2,21 +2,12 @@ import { z } from "zod"; export const EntityDataSchema = z.object({ - featureId: z.string().describe("The feature ID that this entity is associated with"), - name: z.string().describe("Name of the entity").optional() -}).describe("Entity data for creating an entity"); + featureId: z.string(), + name: z.string().optional() +}); -/** - * Entity data for creating an entity - */ export interface EntityData { - /** - * The feature ID that this entity is associated with - */ featureId: string; - /** - * Name of the entity - */ name?: string; } diff --git a/autumn-js/src/libraries/react/clientTypes/queryTypes.ts b/autumn-js/src/libraries/react/clientTypes/queryTypes.ts index d95a934d..fb80cfdc 100644 --- a/autumn-js/src/libraries/react/clientTypes/queryTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/queryTypes.ts @@ -2,18 +2,12 @@ import { z } from "zod"; export const QueryParamsSchema = z.object({ - featureId: z.union([z.string(), z.array(z.string())]).describe("The feature ID(s) to query"), - range: z.union([z.literal('24h'), z.literal('7d'), z.literal('30d'), z.literal('90d'), z.literal('last_cycle')]).nullable().describe("Time range for the query (defaults to last_cycle if not provided)").optional() + featureId: z.union([z.string(), z.array(z.string())]), + range: z.union([z.literal('24h'), z.literal('7d'), z.literal('30d'), z.literal('90d'), z.literal('last_cycle')]).nullable().optional() }); export interface QueryParams { - /** - * The feature ID(s) to query - */ featureId: string | Array; - /** - * Time range for the query (defaults to last_cycle if not provided) - */ range?: '24h' | '7d' | '30d' | '90d' | 'last_cycle' | null; } diff --git a/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts b/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts index b65323ed..2abf1459 100644 --- a/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts @@ -2,12 +2,9 @@ import { z } from "zod"; export const ReferralRedeemCodeParamsSchema = z.object({ - code: z.string().describe("The referral code to redeem") + code: z.string() }); export interface ReferralRedeemCodeParams { - /** - * The referral code to redeem - */ code: string; } diff --git a/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts b/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts index 48c43529..e7a76a34 100644 --- a/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts @@ -2,20 +2,14 @@ import { z } from "zod"; export const SetupPaymentParamsSchema = z.object({ - checkoutSessionParams: z.record(z.string(), z.unknown()).describe("Additional parameters for the checkout session").optional(), - successUrl: z.string().describe("URL to redirect to after successful payment setup").optional(), + checkoutSessionParams: z.record(z.string(), z.unknown()).optional(), + successUrl: z.string().optional(), openInNewTab: z.boolean().optional().describe("Whether to open payment setup in a new tab") }); export interface SetupPaymentParams { - /** - * Additional parameters for the checkout session - */ checkoutSessionParams?: { [key: string]: unknown }; - /** - * URL to redirect to after successful payment setup - */ successUrl?: string; /** diff --git a/autumn-js/src/libraries/react/clientTypes/trackTypes.ts b/autumn-js/src/libraries/react/clientTypes/trackTypes.ts index ed442ad9..f725e904 100644 --- a/autumn-js/src/libraries/react/clientTypes/trackTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/trackTypes.ts @@ -5,67 +5,68 @@ import { EntityDataSchema } from "./entityDataTypes"; import type { CustomerData } from "./customerDataTypes"; import type { EntityData } from "./entityDataTypes"; +export const TrackParamsCustomerDataSchema = z.object({ + email: z.string().nullable().optional(), + fingerprint: z.string().nullable().optional(), + metadata: z.record(z.string(), z.unknown()).nullable().optional(), + name: z.string().nullable().optional(), + stripeId: z.string().nullable().optional() +}); + +export const TrackParamsEntityDataSchema = z.object({ + featureId: z.string(), + name: z.string().optional() +}); + export const TrackParamsSchema = z.object({ - customerData: CustomerDataSchema.nullable().describe("Customer data for creating or updating a customer").optional(), - entityData: EntityDataSchema.nullable().describe("Entity data for creating an entity").optional(), - entityId: z.string().nullable().describe("The ID of the entity this event is associated with").optional(), - eventName: z.string().describe("The name of the event to track").optional(), - featureId: z.string().describe("The ID of the feature (alternative to event_name for usage events)").optional(), - idempotencyKey: z.string().nullable().describe("Idempotency key to prevent duplicate events").optional(), - properties: z.record(z.string(), z.unknown()).nullable().describe("Additional properties for the event").optional(), - setUsage: z.boolean().nullable().describe("Whether to set the usage to this value instead of increment").optional(), - timestamp: z.number().nullable().describe("Unix timestamp in milliseconds when the event occurred").optional(), - value: z.number().nullable().describe("The value/count of the event").optional() + customerData: TrackParamsCustomerDataSchema.nullable().optional(), + entityData: TrackParamsEntityDataSchema.nullable().optional(), + entityId: z.string().nullable().optional(), + eventName: z.string().optional(), + featureId: z.string().optional(), + idempotencyKey: z.string().nullable().optional(), + properties: z.record(z.string(), z.unknown()).nullable().optional(), + setUsage: z.boolean().nullable().optional(), + timestamp: z.number().nullable().optional(), + value: z.number().nullable().optional() }); +export interface TrackParamsCustomerData { + email?: string | null; + + fingerprint?: string | null; + + metadata?: { [key: string]: unknown } | null; + + name?: string | null; + + stripeId?: string | null; +} + +export interface TrackParamsEntityData { + featureId: string; + + name?: string; +} + export interface TrackParams { - /** - * Customer data for creating or updating a customer - */ - customerData?: CustomerData | null; - - /** - * Entity data for creating an entity - */ - entityData?: EntityData | null; - - /** - * The ID of the entity this event is associated with - */ + customerData?: TrackParamsCustomerData | null; + + entityData?: TrackParamsEntityData | null; + entityId?: string | null; - /** - * The name of the event to track - */ eventName?: string; - /** - * The ID of the feature (alternative to event_name for usage events) - */ featureId?: string; - /** - * Idempotency key to prevent duplicate events - */ idempotencyKey?: string | null; - /** - * Additional properties for the event - */ properties?: { [key: string]: unknown } | null; - /** - * Whether to set the usage to this value instead of increment - */ setUsage?: boolean | null; - /** - * Unix timestamp in milliseconds when the event occurred - */ timestamp?: number | null; - /** - * The value/count of the event - */ value?: number | null; } diff --git a/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts b/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts index 962e3738..7eefb8e4 100644 --- a/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts +++ b/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts @@ -1,6 +1,6 @@ -import { AutumnContextParams } from "@/AutumnContext"; -import { CheckParams } from "@/clientTypes"; -import Autumn from "@sdk"; +import type Autumn from "@sdk"; +import type { AutumnContextParams } from "@/AutumnContext"; +import type { CheckParams } from "@/clientTypes"; // import { // CheckFeatureResult, // CheckFeatureResultSchema, @@ -12,117 +12,120 @@ import Autumn from "@sdk"; // } from "@sdk"; export interface AllowedParams { - featureId?: string; - productId?: string; - requiredBalance?: number; + featureId?: string; + productId?: string; + requiredBalance?: number; } const getCusFeature = ({ - customer, - featureId, - requiredBalance = 1, + customer, + featureId, + requiredBalance = 1, }: { - customer: Autumn.Customer | Autumn.Entity; - featureId: string; - requiredBalance?: number; + customer: Autumn.Customer | Autumn.Entity; + featureId: string; + requiredBalance?: number; }) => { - // 1. If there's a cusFeature and balance > requiredBalance, use it... - let cusFeature = customer.features?.[featureId]; - if ( - cusFeature && - typeof cusFeature.balance === "number" && - cusFeature.balance >= requiredBalance - ) { - return { - cusFeature, - requiredBalance: requiredBalance, - }; - } - - // 1. If credit system exists, use it - let creditSchema = Object.values(customer.features ?? {}).find( - (f: Autumn.CustomerFeature) => - f.credit_schema && f.credit_schema.some((c) => c.feature_id === featureId) - ); - - // 2. If there's a credit schema, use it... - if (creditSchema) { - let schemaItem = creditSchema.credit_schema?.find( - (c) => c.feature_id === featureId - )!; - - return { - cusFeature: creditSchema, - requiredBalance: schemaItem.credit_amount * requiredBalance, - }; - } - - // 2. If no credit system exists, use the feature - return { - cusFeature: customer.features[featureId], - requiredBalance: requiredBalance, - }; + // 1. If there's a cusFeature and balance > requiredBalance, use it... + const cusFeature = customer.features?.[featureId]; + if ( + cusFeature && + typeof cusFeature.balance === "number" && + cusFeature.balance >= requiredBalance + ) { + return { + cusFeature, + requiredBalance: requiredBalance, + }; + } + + // 1. If credit system exists, use it + const creditSchema = Object.values(customer.features ?? {}).find( + (f: Autumn.CustomerFeature) => + f.credit_schema && + f.credit_schema.some((c) => c.feature_id === featureId), + ); + + // 2. If there's a credit schema, use it... + if (creditSchema) { + const schemaItem = creditSchema.credit_schema?.find( + (c) => c.feature_id === featureId, + )!; + + return { + cusFeature: creditSchema, + requiredBalance: schemaItem.credit_amount * requiredBalance, + }; + } + + // 2. If no credit system exists, use the feature + return { + cusFeature: customer.features?.[featureId], + requiredBalance: requiredBalance, + }; }; const getFeatureAllowed = ({ - cusFeature, - requiredBalance, + cusFeature, + requiredBalance, }: { - cusFeature: Autumn.CustomerFeature | undefined; - requiredBalance: number; + cusFeature: Autumn.CustomerFeature | undefined; + requiredBalance: number; }) => { - if (!cusFeature) return false; - if (cusFeature.type == "static") return true; - if (cusFeature.unlimited || cusFeature.overage_allowed) return true; - if (cusFeature.usage_limit) { - let extraUsage = - (cusFeature.usage_limit || 0) - (cusFeature.included_usage || 0); - return (cusFeature.balance || 0) + extraUsage >= requiredBalance; - } - return (cusFeature.balance || 0) >= requiredBalance; + if (!cusFeature) return false; + if (cusFeature.type === "static") return true; + if (cusFeature.unlimited || cusFeature.overage_allowed) return true; + if (cusFeature.usage_limit) { + const extraUsage = + (cusFeature.usage_limit || 0) - (cusFeature.included_usage || 0); + return (cusFeature.balance || 0) + extraUsage >= requiredBalance; + } + return (cusFeature.balance || 0) >= requiredBalance; }; const handleFeatureCheck = ({ - customer, - isEntity, - params, + customer, + isEntity, + params, }: { - customer: Autumn.Customer | Autumn.Entity; - isEntity?: boolean; - params: AllowedParams; + customer: Autumn.Customer | Autumn.Entity; + isEntity?: boolean; + params: AllowedParams; }) => { - // 1. Get feature to use... - let { cusFeature, requiredBalance } = getCusFeature({ - customer, - featureId: params.featureId!, - ...(params.requiredBalance - ? { requiredBalance: params.requiredBalance } - : {}), - }); - - let allowed = getFeatureAllowed({ - cusFeature, - requiredBalance: requiredBalance ?? 1, - }); - - let result = { - allowed, - feature_id: cusFeature?.id ?? params.featureId!, - customer_id: isEntity ? (customer as Autumn.Entity).customer_id : customer.id, - required_balance: requiredBalance, - code: "", - ...cusFeature, - } as Autumn.CheckResponse; - - if (isEntity) { - result.entity_id = (customer as Autumn.Entity).id; - } - - try { - return result; - } catch (error) { - return result; - } + // 1. Get feature to use... + const { cusFeature, requiredBalance } = getCusFeature({ + customer, + featureId: params.featureId!, + ...(params.requiredBalance + ? { requiredBalance: params.requiredBalance } + : {}), + }); + + const allowed = getFeatureAllowed({ + cusFeature, + requiredBalance: requiredBalance ?? 1, + }); + + const result = { + allowed, + feature_id: cusFeature?.id ?? params.featureId!, + customer_id: isEntity + ? (customer as Autumn.Entity).customer_id + : customer.id, + required_balance: requiredBalance, + code: "", + ...cusFeature, + } as Autumn.CheckResponse; + + if (isEntity) { + result.entity_id = (customer as Autumn.Entity).id; + } + + try { + return result; + } catch (error) { + return result; + } }; // const handleProductCheck = ({ @@ -154,68 +157,68 @@ const handleFeatureCheck = ({ // }; export const openDialog = ({ - result, - params, - context, + result, + params, + context, }: { - result: Autumn.CheckResponse | null; - params: CheckParams; - context: AutumnContextParams; + result: Autumn.CheckResponse | null; + params: CheckParams; + context: AutumnContextParams; }) => { - let open = result?.allowed === false && params.dialog && context; - - if (!open) return; - - const isInRenderCycle = (() => { - const stack = new Error().stack || ""; - return ( - stack.includes("renderWithHooks") || - stack.includes("updateFunctionComponent") || - stack.includes("beginWork") || - stack.includes("performUnitOfWork") || - stack.includes("workLoop") || - stack.includes("Component.render") || - stack.includes("FunctionComponent") - ); - })(); - - if (isInRenderCycle) { - context.paywallRef.current = { - component: params.dialog, - open: true, - props: params, - }; - } else { - context.paywallDialog.setComponent(params.dialog); - context.paywallDialog.setProps(params); - context.paywallDialog.setOpen(true); - } + const open = result?.allowed === false && params.dialog && context; + + if (!open) return; + + const isInRenderCycle = (() => { + const stack = new Error().stack || ""; + return ( + stack.includes("renderWithHooks") || + stack.includes("updateFunctionComponent") || + stack.includes("beginWork") || + stack.includes("performUnitOfWork") || + stack.includes("workLoop") || + stack.includes("Component.render") || + stack.includes("FunctionComponent") + ); + })(); + + if (isInRenderCycle) { + context.paywallRef.current = { + component: params.dialog, + open: true, + props: params, + }; + } else { + context.paywallDialog.setComponent(params.dialog); + context.paywallDialog.setProps(params); + context.paywallDialog.setOpen(true); + } }; export const handleCheck = ({ - customer, - isEntity, - params, - context, + customer, + isEntity, + params, + context, }: { - customer: Autumn.Customer | Autumn.Entity | null; - isEntity?: boolean; - params: CheckParams; - context?: AutumnContextParams; + customer: Autumn.Customer | Autumn.Entity | null; + isEntity?: boolean; + params: CheckParams; + context?: AutumnContextParams; }): Autumn.CheckResponse => { - if (!customer) { - return { - allowed: false, - feature_id: "", - customer_id: "", - required_balance: 0, - code: "", - } as Autumn.CheckResponse; - } - - if (!params.featureId && !params.productId) { - throw new Error("allowed() requires either featureId or productId"); - } - - return handleFeatureCheck({ customer, params, isEntity }); + if (!customer) { + return { + allowed: false, + feature_id: "", + customer_id: "", + required_balance: 0, + code: "", + } as Autumn.CheckResponse; + } + + if (!params.featureId && !params.productId) { + throw new Error("allowed() requires either featureId or productId"); + } + + return handleFeatureCheck({ customer, params, isEntity }); }; diff --git a/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts b/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts new file mode 100644 index 00000000..cbe0dc76 --- /dev/null +++ b/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts @@ -0,0 +1,183 @@ +// Auto-generated method signatures with JSDoc +// This file is generated by typegen pipeline from ts-sdk/src/client.ts +// DO NOT EDIT MANUALLY - changes will be overwritten +// +// To update documentation: +// 1. Edit JSDoc in backend: sirtenzin-autumn/shared/api/core/coreOpenApi.ts +// 2. Regenerate OpenAPI spec and SDK +// 3. Run: pnpm run gen:autumn-js + +import type { Autumn } from "@sdk"; +import type { + AttachParams, + BillingPortalParams, + CancelParams, + CheckoutParams, + CheckParams, + QueryParams, + SetupPaymentParams, + TrackParams, +} from "@/clientTypes"; + +/** + * Methods available in useCustomer hook for managing customer subscriptions and features + */ +export interface UseCustomerMethods { + /** + * Enables a product for a customer and processes payment if their payment method is already on file. + * Use this when the customer already has a payment method saved. + * For new customers without payment info, use `checkout` instead. + * + * @param params.product_id - Product ID, set when creating the product in the Autumn dashboard + * @param params.entity_id - If attaching a product to an entity, can be used to auto create the entity + * @param params.customer_data - If auto creating a customer, the properties from this field will be used. + * @param params.entity_data - If attaching a product to an entity and auto creating the entity, the properties from this field will be used. feature_id is required. + * @param params.product_ids - Can be used to attach multiple products to the customer at once. For example, attaching a main product and an add-on. + * @param params.options - Pass in quantities for prepaid features + * @param params.free_trial - If the product has a free trial, this field can be used to disable it when attaching (by passing in false) + * @param params.success_url - URL to redirect to after the purchase is successful + * @param params.force_checkout - Always return a Stripe Checkout URL, even if the customer's card is already on file + * @param params.checkout_session_params - Additional parameters to pass onto Stripe when creating the checkout session + * @param params.reward - An Autumn promo_code or reward_id to apply at checkout + * + * @example + * ```typescript // Attach a product to a customer const response = await client.attach({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/attach Product Attachments} + * + * @example + * ```ts const response = await client.attach({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` + */ + attach: (params: AttachParams) => Promise; + + /** + * Creates a checkout session for a customer to purchase a product with payment collection. + * Use this for new customers or when payment info is needed. + * For customers with existing payment methods, use `attach` instead. + * + * @param params.product_id - Product ID, set when creating the product in the Autumn dashboard + * @param params.entity_id - If attaching a product to an entity, can be used to auto create the entity + * @param params.customer_data - If auto creating a customer, the properties from this field will be used. + * @param params.entity_data - If attaching a product to an entity and auto creating the entity, the properties from this field will be used. feature_id is required. + * @param params.product_ids - Can be used to attach multiple products to the customer at once. For example, attaching a main product and an add-on. + * @param params.options - Pass in quantities for prepaid features + * @param params.free_trial - If the product has a free trial, this field can be used to disable it when attaching (by passing in false) + * @param params.success_url - URL to redirect to after the purchase is successful + * @param params.force_checkout - Always return a Stripe Checkout URL, even if the customer's card is already on file + * @param params.checkout_session_params - Additional parameters to pass onto Stripe when creating the checkout session + * @param params.reward - An Autumn promo_code or reward_id to apply at checkout + * + * @example + * ```typescript // Create a checkout session const response = await client.checkout({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/checkout Checkout Sessions} + * + * @example + * ```ts const response = await client.checkout({ customer_id: 'customer_id', }); ``` + */ + checkout: (params: CheckoutParams) => Promise; + + /** + * Check whether a customer has access to a product, feature or remaining usage. + * + * @param params.feature_id - The ID of the feature to check access for + * @param params.product_id - The ID of the product to check + * @param params.entity_id - The ID of the entity (optional) + * @param params.customer_data - Customer data to create or update the customer if they don't exist + * @param params.required_balance - The required balance for the check + * @param params.send_event - Whether to send a usage event if allowed + * @param params.with_preview - Whether to include preview information in the response + * @param params.entity_data - Entity data to create the entity if it doesn't exist + * + * @example + * ```typescript // Check feature access const response = await client.check({ customer_id: "cus_123", feature_id: "api_calls", }); ``` + * + * @example + * ```ts const response = await client.check({ customer_id: 'customer_id', }); ``` + */ + check: (params: CheckParams) => Autumn.CheckResponse; + + /** + * Track usage events for metered features or record analytics events. + * Use this to increment usage counters for pay-as-you-go features or track customer activity. + * + * @param params.customer_data - Customer data to create or update the customer if they don't exist + * @param params.event_name - The name of the event to track + * @param params.feature_id - The ID of the feature (alternative to event_name for usage events) + * @param params.properties - Additional properties for the event + * @param params.timestamp - Unix timestamp in milliseconds when the event occurred + * @param params.idempotency_key - Idempotency key to prevent duplicate events + * @param params.value - The value/count of the event + * @param params.set_usage - Whether to set the usage to this value instead of increment + * @param params.entity_id - The ID of the entity this event is associated with + * @param params.entity_data - Data for creating the entity if it doesn't exist + * + * @example + * ```typescript // Track a usage event const response = await client.track({ customer_id: "cus_123", feature_id: "api_calls", value: 1, }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/track Usage Tracking} + * + * @example + * ```ts const response = await client.track({ customer_id: 'x' }); ``` + */ + track: (params: TrackParams) => Promise; + + /** + * Cancel a customer's subscription to a product. + * Use this when a customer wants to stop their subscription. + * Supports immediate or end-of-period cancellation. + * + * @param params.product_id - The ID of the product to cancel + * @param params.entity_id - The ID of the entity (optional) + * @param params.cancel_immediately - Whether to cancel the product immediately or at period end + * @param params.prorate - Whether to prorate the cancellation (defaults to true if not specified) + * + * @example + * ```typescript // Cancel a subscription const response = await client.cancel({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/cancel Cancel Subscriptions} + * + * @example + * ```ts const response = await client.cancel({ customer_id: 'customer_id', product_id: 'product_id', }); ``` + */ + cancel: (params: CancelParams) => Promise; + + /** + * Creates a session for a customer to add or update their payment method. + * Use this to collect payment information without immediately charging the customer. + * + * @param params.success_url - URL to redirect to after successful payment setup + * @param params.checkout_session_params - Additional parameters for the checkout session + * + * @example + * ```typescript // Setup payment method const response = await client.setupPayment({ customer_id: "cus_123", success_url: "https://example.com/success", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/setup-payment Payment Setup} + * + * @example + * ```ts const response = await client.setupPayment({ customer_id: 'customer_id', }); ``` + */ + setupPayment: (params: SetupPaymentParams) => Promise; + + /** + * Creates a billing portal session where customers can manage their subscription and payment methods. + * Use this to give customers self-service access to view invoices, update payment info, and manage subscriptions. + * + * @param params.return_url - Time range for the query (defaults to last_cycle if not provided) + * + * @example + * ```typescript // Open billing portal const response = await client.billingPortal({ customer_id: "cus_123", return_url: "https://example.com/account", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/billing-portal Billing Portal} + * + * @example + * ```ts const response = await client.billingPortal({ customer_id: 'customer_id', }); ``` + */ + openBillingPortal: (params: BillingPortalParams) => Promise; +} diff --git a/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts b/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts new file mode 100644 index 00000000..18490493 --- /dev/null +++ b/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts @@ -0,0 +1,120 @@ +// Auto-generated method signatures with JSDoc +// This file is generated by typegen pipeline from ts-sdk/src/client.ts +// DO NOT EDIT MANUALLY - changes will be overwritten +// +// To update documentation: +// 1. Edit JSDoc in backend: sirtenzin-autumn/shared/api/core/coreOpenApi.ts +// 2. Regenerate OpenAPI spec and SDK +// 3. Run: pnpm run gen:autumn-js + +import type { Autumn } from "@sdk"; +import type { + AttachParams, + BillingPortalParams, + CancelParams, + CheckoutParams, + CheckParams, + QueryParams, + SetupPaymentParams, + TrackParams, +} from "@/clientTypes"; + +/** + * Methods available in useEntity hook for entity-scoped subscription operations + */ +export interface UseEntityMethods { + /** + * Enables a product for a customer and processes payment if their payment method is already on file. + * Use this when the customer already has a payment method saved. + * For new customers without payment info, use `checkout` instead. + * + * @param params.product_id - Product ID, set when creating the product in the Autumn dashboard + * @param params.entity_id - If attaching a product to an entity, can be used to auto create the entity + * @param params.customer_data - If auto creating a customer, the properties from this field will be used. + * @param params.entity_data - If attaching a product to an entity and auto creating the entity, the properties from this field will be used. feature_id is required. + * @param params.product_ids - Can be used to attach multiple products to the customer at once. For example, attaching a main product and an add-on. + * @param params.options - Pass in quantities for prepaid features + * @param params.free_trial - If the product has a free trial, this field can be used to disable it when attaching (by passing in false) + * @param params.success_url - URL to redirect to after the purchase is successful + * @param params.force_checkout - Always return a Stripe Checkout URL, even if the customer's card is already on file + * @param params.checkout_session_params - Additional parameters to pass onto Stripe when creating the checkout session + * @param params.reward - An Autumn promo_code or reward_id to apply at checkout + * + * @example + * ```typescript // Attach a product to a customer const response = await client.attach({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/attach Product Attachments} + * + * @example + * ```ts const response = await client.attach({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` + */ + attach: (params: AttachParams) => Promise; + + /** + * Cancel a customer's subscription to a product. + * Use this when a customer wants to stop their subscription. + * Supports immediate or end-of-period cancellation. + * + * @param params.product_id - The ID of the product to cancel + * @param params.entity_id - The ID of the entity (optional) + * @param params.cancel_immediately - Whether to cancel the product immediately or at period end + * @param params.prorate - Whether to prorate the cancellation (defaults to true if not specified) + * + * @example + * ```typescript // Cancel a subscription const response = await client.cancel({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/cancel Cancel Subscriptions} + * + * @example + * ```ts const response = await client.cancel({ customer_id: 'customer_id', product_id: 'product_id', }); ``` + */ + cancel: (params: CancelParams) => Promise; + + /** + * Track usage events for metered features or record analytics events. + * Use this to increment usage counters for pay-as-you-go features or track customer activity. + * + * @param params.customer_data - Customer data to create or update the customer if they don't exist + * @param params.event_name - The name of the event to track + * @param params.feature_id - The ID of the feature (alternative to event_name for usage events) + * @param params.properties - Additional properties for the event + * @param params.timestamp - Unix timestamp in milliseconds when the event occurred + * @param params.idempotency_key - Idempotency key to prevent duplicate events + * @param params.value - The value/count of the event + * @param params.set_usage - Whether to set the usage to this value instead of increment + * @param params.entity_id - The ID of the entity this event is associated with + * @param params.entity_data - Data for creating the entity if it doesn't exist + * + * @example + * ```typescript // Track a usage event const response = await client.track({ customer_id: "cus_123", feature_id: "api_calls", value: 1, }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/track Usage Tracking} + * + * @example + * ```ts const response = await client.track({ customer_id: 'x' }); ``` + */ + track: (params: TrackParams) => Promise; + + /** + * Check whether a customer has access to a product, feature or remaining usage. + * + * @param params.feature_id - The ID of the feature to check access for + * @param params.product_id - The ID of the product to check + * @param params.entity_id - The ID of the entity (optional) + * @param params.customer_data - Customer data to create or update the customer if they don't exist + * @param params.required_balance - The required balance for the check + * @param params.send_event - Whether to send a usage event if allowed + * @param params.with_preview - Whether to include preview information in the response + * @param params.entity_data - Entity data to create the entity if it doesn't exist + * + * @example + * ```typescript // Check feature access const response = await client.check({ customer_id: "cus_123", feature_id: "api_calls", }); ``` + * + * @example + * ```ts const response = await client.check({ customer_id: 'customer_id', }); ``` + */ + check: (params: CheckParams) => Autumn.CheckResponse; +} diff --git a/autumn-js/src/libraries/react/hooks/useAnalytics.tsx b/autumn-js/src/libraries/react/hooks/useAnalytics.tsx index 1e0aa144..30f4ffc2 100644 --- a/autumn-js/src/libraries/react/hooks/useAnalytics.tsx +++ b/autumn-js/src/libraries/react/hooks/useAnalytics.tsx @@ -3,6 +3,21 @@ import { QueryParams } from "@/clientTypes"; import Autumn from "@sdk"; import useSWR from "swr"; +/** + * Query usage analytics data from your React components. + * + * The `useAnalytics` hook provides access to usage analytics and reporting data. It's the client-side equivalent of the `/query` endpoint, allowing you to fetch and display usage data directly in your React components. + * + * @param params.featureId - Feature ID(s) to query usage data for + * @param params.range - Time range for analytics query. Defaults to '30d' (optional) + * + * @returns data - Array of usage data points with period timestamps and feature usage counts + * @returns isLoading - Whether analytics data is being fetched + * @returns error - Any error that occurred while fetching + * @returns refetch - Manually refetch analytics data + * + * @see {@link https://docs.useautumn.com/api-reference/hooks/useAnalytics} + */ export const useAnalytics = (params: QueryParams) => { const context = useAutumnContext({ AutumnContext, diff --git a/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx b/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx index 22fcbbf6..fa60ebb4 100644 --- a/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx +++ b/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx @@ -1,199 +1,240 @@ -import type { - Autumn, - AutumnError, -} from "@sdk"; - +/** biome-ignore-all lint/style/noNonNullAssertion: no other choice */ +import type { Autumn, AutumnError } from "@sdk"; -import type React from "react"; import useSWR, { type SWRConfiguration } from "swr"; - +import { + type AutumnContextParams, + type AutumnContextType, + useAutumnContext, +} from "@/AutumnContext"; +import type { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; +import type { AutumnClient } from "@/client/ReactAutumnClient"; +import type { + CheckParams, + CustomerCreateParams, + EntityCreateParams, +} from "@/clientTypes"; import { handleCheck, openDialog } from "./helpers/handleCheck"; -import { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; -import { AutumnClient } from "@/client/ReactAutumnClient"; -import { AutumnContextParams, useAutumnContext } from "@/AutumnContext"; import { useAutumnBase } from "./helpers/useAutumnBase"; -import { AttachParams, CheckoutParams, CancelParams, TrackParams, SetupPaymentParams, BillingPortalParams, CheckParams, EntityCreateParams } from "@/clientTypes"; - -export interface UseCustomerResult { - /** The current customer data including subscription and feature information */ - customer: Autumn.Customer | null; - /** Whether customer data is currently being loaded */ - isLoading: boolean; - /** Any error that occurred while fetching customer data */ - error: AutumnError | null; - - // Autumn functions - /** - * Attaches a product to the current customer, enabling access and handling billing. - * Activates a product and applies all product items with automatic payment handling. - */ - attach: (params: AttachParams) => Promise; - - /** - * Tracks usage events for metered features. - * Records feature usage and updates customer balances server-side. - */ - track: (params: TrackParams) => Promise; - - /** - * Cancels a customer's subscription or product attachment. - * Can cancel immediately or at the end of the billing cycle. - */ - cancel: (params: CancelParams) => Promise; - - /** - * Sets up a payment method for the customer. - * Collects payment information without immediately charging. - */ - setupPayment: ( - params: SetupPaymentParams - ) => Promise; - - /** - * Opens the Stripe billing portal for the customer. - * Allows customers to manage their subscription and payment methods. - */ - openBillingPortal: ( - params?: BillingPortalParams - ) => Promise; - - /** - * Initiates a checkout flow for product purchase. - * Handles payment collection and redirects to Stripe checkout when needed. - */ - checkout: (params: CheckoutParams) => Promise; - - /** Refetches the customer data from the server */ - refetch: () => Promise; - - /** - * Creates new entities for granular feature tracking. - * Entities allow per-user or per-workspace feature limits. - */ - createEntity: ( - params: EntityCreateParams - ) => Promise; - - /** - * Checks if a customer has access to a feature and shows paywalls if needed. - * Client-side feature gating with optional dialog display for upgrades. - */ - check: (params: CheckParams) => Autumn.CheckResponse; - - // /** - // * Creates a referral code for the customer. - // * Generates codes that can be shared for referral programs. - // */ - // createReferralCode: ( - // params: CreateReferralCodeParams - // ) => AutumnPromise; - - // /** - // * Redeems a referral code for the customer. - // * Applies referral benefits when a valid code is provided. - // */ - // redeemReferralCode: ( - // params: RedeemReferralCodeParams - // ) => AutumnPromise; - - + +// export interface UseCustomerResult { +// /** The current customer data including subscription and feature information */ +// customer: Autumn.Customer | null; +// /** Whether customer data is currently being loaded */ +// isLoading: boolean; +// /** Any error that occurred while fetching customer data */ +// error: AutumnError | null; + +// // Autumn functions +// /** +// * Attaches a product to the current customer, enabling access and handling billing. +// * Activates a product and applies all product items with automatic payment handling. +// */ +// attach: (params: AttachParams) => Promise; + +// /** +// * Tracks usage events for metered features. +// * Records feature usage and updates customer balances server-side. +// */ +// track: (params: TrackParams) => Promise; + +// /** +// * Cancels a customer's subscription or product attachment. +// * Can cancel immediately or at the end of the billing cycle. +// */ +// cancel: (params: CancelParams) => Promise; + +// /** +// * Sets up a payment method for the customer. +// * Collects payment information without immediately charging. +// */ +// setupPayment: ( +// params: SetupPaymentParams, +// ) => Promise; + +// /** +// * Opens the Stripe billing portal for the customer. +// * Allows customers to manage their subscription and payment methods. +// */ +// openBillingPortal: ( +// params?: BillingPortalParams, +// ) => Promise; + +// /** +// * Initiates a checkout flow for product purchase. +// * Handles payment collection and redirects to Stripe checkout when needed. +// */ +// checkout: (params: CheckoutParams) => Promise; + +// /** Refetches the customer data from the server */ +// refetch: () => Promise; + +// /** +// * Creates new entities for granular feature tracking. +// * Entities allow per-user or per-workspace feature limits. +// */ +// createEntity: (params: EntityCreateParams) => Promise; + +// /** +// * Checks if a customer has access to a feature and shows paywalls if needed. +// * Client-side feature gating with optional dialog display for upgrades. +// */ +// check: (params: CheckParams) => Autumn.CheckResponse; + +// // /** +// // * Creates a referral code for the customer. +// // * Generates codes that can be shared for referral programs. +// // */ +// // createReferralCode: ( +// // params: CreateReferralCodeParams +// // ) => AutumnPromise; + +// // /** +// // * Redeems a referral code for the customer. +// // * Applies referral benefits when a valid code is provided. +// // */ +// // redeemReferralCode: ( +// // params: RedeemReferralCodeParams +// // ) => AutumnPromise; +// } + +import type { UseCustomerMethods } from "./types/useCustomerMethods"; + +export interface UseCustomerResult extends UseCustomerMethods { + /** The current customer data including subscription and feature information */ + customer: Autumn.Customer | null; + + /** Whether customer data is currently being loaded */ + isLoading: boolean; + + /** Any error that occurred while fetching customer data */ + error: AutumnError | null; + + /** Refetches the customer data from the server */ + refetch: () => Promise; + + /** + * Creates new entities for granular feature tracking. + * Entities allow per-user or per-workspace feature limits. + */ + createEntity: (params: EntityCreateParams) => Promise; + + // All hook methods (attach, checkout, check, etc.) are inherited from UseCustomerMethods } export interface UseCustomerParams { - errorOnNotFound?: boolean; - expand?: Autumn.Customers.CustomerGetParams['expand']; - swrConfig?: SWRConfiguration; + errorOnNotFound?: boolean; + expand?: Autumn.Customers.CustomerGetParams["expand"]; + swrConfig?: SWRConfiguration; } +/** + * Access a customer's state and use it to display information in your React app. + * + * The `useCustomer` hook provides access to customer data and related operations. You can use it from your frontend to retrieve customer information, manage loading states, and create entities. + * + * @param params.expand - Additional data to include (invoices, rewards, trials_used, entities, referrals, payment_method) (optional) + * @param params.errorOnNotFound - Whether to throw error if customer not found (optional) + * @param params.swrConfig - SWR configuration options (optional) + * + * @returns customer - Customer object with subscription and feature data + * @returns isLoading - Whether customer data is being fetched + * @returns error - Any error that occurred while fetching + * @returns refetch - Refetch customer data + * @returns ...methods - All subscription methods (attach, checkout, cancel, track, setupPayment, openBillingPortal) + * @returns createEntity - Create entities for granular feature tracking + * + * @see {@link https://docs.useautumn.com/api-reference/hooks/useCustomer} + */ export const useCustomerBase = ({ - params, - AutumnContext, - client, + params, + AutumnContext, + client, }: { - params?: UseCustomerParams; - AutumnContext?: React.Context; - client?: AutumnClient | ConvexAutumnClient; + params?: UseCustomerParams; + AutumnContext?: AutumnContextType; + client?: AutumnClient | ConvexAutumnClient; }): UseCustomerResult => { - let context: AutumnContextParams | undefined; - - if (AutumnContext) { - // biome-ignore lint/correctness/useHookAtTopLevel: needed - context = useAutumnContext({ - AutumnContext, - name: "useCustomer", - }); - } - - if (!client) { - client = context!.client; - } - - const baseUrl = client?.backendUrl || ""; - const queryKey = ["customer", baseUrl, params?.expand]; - - const fetchCustomer = async () => { - return await client!.createCustomer({ - errorOnNotFound: params?.errorOnNotFound, - expand: params?.expand?.join(","), - }); - - // if (error) { - // throw error; - // } - - // if (!data) { - // return null; - // } - - // return data; - }; - - const { - data: customer, - error, - isLoading, - mutate, - } = useSWR(queryKey, fetchCustomer, { - // Default to 5 minutes - fallbackData: null, - swrConfig: { - shouldRetryOnError: false, - refreshInterval: 0, - ...params?.swrConfig, - }, - }); - - const autumnFunctions = useAutumnBase({ - context, - client, - refetchCustomer: mutate, - }); - - return { - customer: error ? null : customer, - isLoading, - error, - refetch: mutate as () => Promise, - - ...autumnFunctions, - createEntity: client.entities.create, - // createReferralCode: client.referrals.createCode, - // redeemReferralCode: client.referrals.redeemCode, - check: (params: CheckParams) => { - const res = handleCheck({ - customer, - params, - isEntity: false, - context, - }); - - openDialog({ - result: res, - params, - context: context!, - }); - - return res; - }, - }; + let context: AutumnContextParams | undefined; + + if (AutumnContext) { + // biome-ignore lint/correctness/useHookAtTopLevel: needed + context = useAutumnContext({ + AutumnContext, + name: "useCustomer", + }); + } + + if (!client) { + client = context?.client; + } + + const baseUrl = client?.backendUrl || ""; + const queryKey = ["customer", baseUrl, params?.expand]; + + const fetchCustomer = async () => { + return await client?.createCustomer({ + errorOnNotFound: params?.errorOnNotFound, + expand: params?.expand?.join(",") as CustomerCreateParams["expand"], + }); + + // if (error) { + // throw error; + // } + + // if (!data) { + // return null; + // } + + // return data; + }; + + const { + data: customer, + error, + isLoading, + mutate, + } = useSWR(queryKey, fetchCustomer, { + // Default to 5 minutes + fallbackData: null, + swrConfig: { + shouldRetryOnError: false, + refreshInterval: 0, + ...params?.swrConfig, + }, + }); + + const autumnFunctions = useAutumnBase({ + context, + client: client!, + refetchCustomer: mutate, + }); + + return { + customer: error ? null : customer, + isLoading, + error, + refetch: mutate as () => Promise, + + ...autumnFunctions, + createEntity: client?.entities.create!, + // createReferralCode: client.referrals.createCode, + // redeemReferralCode: client.referrals.redeemCode, + check: (params: CheckParams) => { + const res = handleCheck({ + customer, + params, + isEntity: false, + context, + }); + + openDialog({ + result: res, + params, + context: context!, + }); + + return res; + }, + }; }; diff --git a/autumn-js/src/libraries/react/hooks/useEntity.tsx b/autumn-js/src/libraries/react/hooks/useEntity.tsx index 5140bb14..378bd45e 100644 --- a/autumn-js/src/libraries/react/hooks/useEntity.tsx +++ b/autumn-js/src/libraries/react/hooks/useEntity.tsx @@ -2,6 +2,22 @@ import { AutumnContext } from "../AutumnContext"; import { EntityGetParams } from "@/clientTypes"; import { useEntityBase } from "./useEntityBase"; +/** + * Access an entity's state and use it to display information in your React app. + * + * The `useEntity` hook provides access to entity data and related operations. You can use it from your frontend to retrieve entity information and manage loading states. + * + * @param entityId - The ID of the entity to retrieve + * @param params.expand - Additional data to include in entity response (optional) + * + * @returns entity - The entity object containing all entity data + * @returns isLoading - Whether entity data is being fetched + * @returns error - Any error that occurred while fetching + * @returns refetch - Refetch entity data + * @returns ...methods - Entity-scoped methods (attach, cancel, track, check) + * + * @see {@link https://docs.useautumn.com/api-reference/hooks/useEntity} + */ export const useEntity = ( entityId: string | null, params?: EntityGetParams diff --git a/autumn-js/src/libraries/react/hooks/useEntityBase.tsx b/autumn-js/src/libraries/react/hooks/useEntityBase.tsx index 50680645..6f14ca09 100644 --- a/autumn-js/src/libraries/react/hooks/useEntityBase.tsx +++ b/autumn-js/src/libraries/react/hooks/useEntityBase.tsx @@ -1,5 +1,6 @@ import useSWR from "swr"; import { useContext } from "react"; +import type { Autumn, AutumnError } from "@sdk"; import { AutumnContextParams, useAutumnContext } from "../AutumnContext"; import { handleCheck, openDialog } from "./helpers/handleCheck"; import { useAutumnBase } from "./helpers/useAutumnBase"; @@ -10,6 +11,23 @@ import { TrackParams, AttachParams, } from "@/clientTypes"; +import type { UseEntityMethods } from "./types/useEntityMethods"; + +export interface UseEntityResult extends UseEntityMethods { + /** The entity object containing all entity data */ + entity: Autumn.Entity | null; + + /** Whether entity data is currently being loaded */ + isLoading: boolean; + + /** Any error that occurred while fetching entity data */ + error: AutumnError | null; + + /** Refetches the entity data from the server */ + refetch: () => Promise; + + // All hook methods (attach, cancel, track, check) are inherited from UseEntityMethods +} export const useEntityBase = ({ entityId, @@ -19,7 +37,7 @@ export const useEntityBase = ({ entityId: string | null; params?: EntityGetParams; AutumnContext: React.Context; -}) => { +}): UseEntityResult => { const { client } = useContext(AutumnContext); const queryKey = ["entity", entityId, params?.expand]; @@ -74,12 +92,17 @@ export const useEntityBase = ({ const track = (params: TrackParams) => trackAutumn({ ...params, entityId: entityId || undefined }); + const refetch = async () => { + const result = await mutate(); + return result ?? null; + }; + if (!entityId) { return { entity: null, isLoading: false, error: null, - refetch: mutate, + refetch, check, attach, cancel, @@ -91,7 +114,7 @@ export const useEntityBase = ({ entity: error ? null : data, isLoading, error, - refetch: mutate, + refetch, check, attach, cancel, diff --git a/package.json b/package.json index 654b38f0..5c94c827 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,24 @@ { - "name": "autumn-js-monorepo", - "private": true, - "packageManager": "pnpm@10.14.0", - "scripts": { - "test-cli": "pnpm --filter atmn test-cli", - "gen:autumn-js": "tsx typegen/generate-autumn-js-types.ts" - }, - "workspaces": [ - "package", - "frameworks/*", - "ui", - "atmn", - "nextjs" - ], - "dependencies": { - "@types/better-sqlite3": "^7.6.13", - "better-sqlite3": "^12.2.0" - } + "name": "autumn-js-monorepo", + "private": true, + "packageManager": "pnpm@10.14.0", + "scripts": { + "test-cli": "pnpm --filter atmn test-cli", + "gen:autumn-js": "bun typegen/generate-autumn-js-types.ts" + }, + "workspaces": [ + "package", + "frameworks/*", + "ui", + "atmn", + "nextjs" + ], + "dependencies": { + "@types/better-sqlite3": "^7.6.13", + "better-sqlite3": "^12.2.0" + }, + "devDependencies": { + "tsx": "^4.20.4", + "typescript": "^5.9.3" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4cdadc55..710c0333 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,13 @@ importers: better-sqlite3: specifier: ^12.2.0 version: 12.2.0 + devDependencies: + tsx: + specifier: ^4.20.4 + version: 4.20.4 + typescript: + specifier: ^5.9.3 + version: 5.9.3 atmn: dependencies: @@ -141,10 +148,10 @@ importers: version: 2.17.0(typescript@5.8.3) '@supabase/ssr': specifier: ^0.6.1 - version: 0.6.1(@supabase/supabase-js@2.55.0) + version: 0.6.1(@supabase/supabase-js@2.75.0) '@tanstack/react-start': specifier: ^1.120.5 - version: 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) + version: 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) '@types/express': specifier: ^5.0.1 version: 5.0.3 @@ -306,824 +313,253 @@ importers: specifier: 3.2.4 version: 3.2.4(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@18.17.0)(jiti@2.5.1)(lightningcss@1.30.1)(msw@2.10.4(@types/node@18.17.0)(typescript@5.5.4))(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - frameworks/conv: + frameworks/convex-quick: dependencies: - '@convex-dev/better-auth': - specifier: ^0.7.17 - version: 0.7.17(@standard-schema/spec@1.0.0)(better-auth@1.3.7(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(zod@3.25.76))(convex@1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0))(hono@4.9.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3) - '@useautumn/convex': - specifier: workspace:* - version: link:../../convex autumn-js: specifier: workspace:* version: link:../../autumn-js - better-auth: - specifier: 1.3.7 - version: 1.3.7(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(zod@3.25.76) convex: - specifier: ^1.26.0 - version: 1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) - react: - specifier: ^19.0.0 - version: 19.1.0 - react-dom: - specifier: ^19.0.0 - version: 19.1.0(react@19.1.0) - devDependencies: - '@eslint/js': - specifier: ^9.21.0 - version: 9.29.0 - '@tailwindcss/vite': - specifier: ^4.0.14 - version: 4.1.12(vite@6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@types/node': - specifier: ^22.13.10 - version: 22.17.1 - '@types/react': - specifier: ^19.0.10 - version: 19.1.10 - '@types/react-dom': - specifier: ^19.0.4 - version: 19.1.7(@types/react@19.1.10) - '@vitejs/plugin-react': - specifier: ^4.3.4 - version: 4.7.0(vite@6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - eslint: - specifier: ^9.21.0 - version: 9.29.0(jiti@2.5.1) - eslint-plugin-react-hooks: - specifier: ^5.1.0 - version: 5.2.0(eslint@9.29.0(jiti@2.5.1)) - eslint-plugin-react-refresh: - specifier: ^0.4.19 - version: 0.4.20(eslint@9.29.0(jiti@2.5.1)) - globals: - specifier: ^15.15.0 - version: 15.15.0 - npm-run-all: - specifier: ^4.1.5 - version: 4.1.5 - prettier: - specifier: ^3.5.3 - version: 3.6.2 - tailwindcss: - specifier: ^4.0.14 - version: 4.1.12 + specifier: ^1.27.4 + version: 1.27.5(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) typescript: - specifier: ~5.7.2 - version: 5.7.3 - typescript-eslint: - specifier: ^8.24.1 - version: 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3) - vite: - specifier: ^6.2.0 - version: 6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - - frameworks/conv-clerk: - dependencies: - '@clerk/clerk-react': - specifier: ^5.25.0 - version: 5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@useautumn/convex': - specifier: workspace:* - version: link:../../convex - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - convex: - specifier: ^1.26.0 - version: 1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) - react: - specifier: ^19.0.0 - version: 19.1.0 - react-dom: - specifier: ^19.0.0 - version: 19.1.0(react@19.1.0) + specifier: ^5 + version: 5.8.3 devDependencies: - '@eslint/js': - specifier: ^9.21.0 - version: 9.29.0 - '@tailwindcss/vite': - specifier: ^4.0.14 - version: 4.1.12(vite@6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@types/node': - specifier: ^22.13.10 - version: 22.17.1 - '@types/react': - specifier: ^19.0.10 - version: 19.1.10 - '@types/react-dom': - specifier: ^19.0.4 - version: 19.1.7(@types/react@19.1.10) - '@vitejs/plugin-react': - specifier: ^4.3.4 - version: 4.7.0(vite@6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - eslint: - specifier: ^9.21.0 - version: 9.29.0(jiti@2.5.1) - eslint-plugin-react-hooks: - specifier: ^5.1.0 - version: 5.2.0(eslint@9.29.0(jiti@2.5.1)) - eslint-plugin-react-refresh: - specifier: ^0.4.19 - version: 0.4.20(eslint@9.29.0(jiti@2.5.1)) - globals: - specifier: ^15.15.0 - version: 15.15.0 - npm-run-all: - specifier: ^4.1.5 - version: 4.1.5 - prettier: - specifier: ^3.5.3 - version: 3.6.2 - tailwindcss: - specifier: ^4.0.14 - version: 4.1.12 - typescript: - specifier: ~5.7.2 - version: 5.7.3 - typescript-eslint: - specifier: ^8.24.1 - version: 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3) - vite: - specifier: ^6.2.0 - version: 6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + '@types/bun': + specifier: latest + version: 1.2.23(@types/react@19.1.12) - frameworks/conv-next-clerk: + frameworks/nextjs-test: dependencies: - '@clerk/clerk-react': - specifier: ^5.25.0 - version: 5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) '@clerk/nextjs': - specifier: ^6.12.6 - version: 6.30.1(next@15.2.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@useautumn/convex': + specifier: ^6.28.1 + version: 6.30.1(next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-accordion': + specifier: ^1.2.11 + version: 1.2.11(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-dialog': + specifier: ^1.1.14 + version: 1.1.15(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-popover': + specifier: ^1.1.14 + version: 1.1.15(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-slot': + specifier: ^1.2.3 + version: 1.2.3(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-switch': + specifier: ^1.2.5 + version: 1.2.5(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@tailwindcss/cli': + specifier: ^4.1.11 + version: 4.1.11 + atmn: specifier: workspace:* - version: link:../../convex + version: link:../../atmn autumn-js: specifier: workspace:* version: link:../../autumn-js - convex: - specifier: ^1.26.0 - version: 1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) + better-auth: + specifier: ^1.2.12 + version: 1.3.24(next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + lucide-react: + specifier: ^0.525.0 + version: 0.525.0(react@19.1.1) next: - specifier: 15.2.3 - version: 15.2.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + specifier: 15.3.4 + version: 15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + pg: + specifier: ^8.16.3 + version: 8.16.3 react: specifier: ^19.0.0 - version: 19.1.0 + version: 19.1.1 react-dom: specifier: ^19.0.0 - version: 19.1.0(react@19.1.0) + version: 19.1.1(react@19.1.1) + recharts: + specifier: 2.15.4 + version: 2.15.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + tailwind-merge: + specifier: ^3.3.1 + version: 3.3.1 + zod: + specifier: ^4.0.0 + version: 4.1.5 devDependencies: '@eslint/eslintrc': specifier: ^3 version: 3.3.1 '@tailwindcss/postcss': - specifier: ^4 - version: 4.1.11 + specifier: ^4.0.0 + version: 4.1.12 '@types/node': specifier: ^20 - version: 20.19.10 + version: 20.19.11 + '@types/pg': + specifier: ^8.15.2 + version: 8.15.5 '@types/react': specifier: ^19 - version: 19.1.10 + version: 19.1.12 '@types/react-dom': specifier: ^19 - version: 19.1.7(@types/react@19.1.10) + version: 19.1.9(@types/react@19.1.12) + autoprefixer: + specifier: ^10.4.21 + version: 10.4.21(postcss@8.5.6) eslint: specifier: ^9 version: 9.29.0(jiti@2.5.1) eslint-config-next: - specifier: 15.2.3 - version: 15.2.3(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) - npm-run-all: - specifier: ^4.1.5 - version: 4.1.5 - prettier: - specifier: ^3.5.3 - version: 3.6.2 + specifier: 15.3.4 + version: 15.3.4(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) + postcss-prefix-selector: + specifier: ^2.1.1 + version: 2.1.1(postcss@8.5.6) tailwindcss: - specifier: ^4 + specifier: ^4.1.10 version: 4.1.12 + tw-animate-css: + specifier: ^1.3.4 + version: 1.3.7 typescript: specifier: ^5 version: 5.8.3 - frameworks/conv-workos: - dependencies: - '@convex-dev/workos': - specifier: ^0.0.1 - version: 0.0.1(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@20.19.11)(convex@1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1))(jiti@2.5.1)(react@19.1.1)(typescript@5.9.2) - '@hookform/resolvers': - specifier: ^5.2.1 - version: 5.2.1(react-hook-form@7.62.0(react@19.1.1)) - '@radix-ui/react-avatar': - specifier: ^1.1.10 - version: 1.1.10(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-collapsible': - specifier: ^1.1.12 - version: 1.1.12(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-dialog': - specifier: ^1.1.15 - version: 1.1.15(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + frameworks/quick-test: + dependencies: + atmn: + specifier: workspace:* + version: link:../../atmn + autumn-js: + specifier: workspace:* + version: link:../../autumn-js + + frameworks/speakeasy-test: + dependencies: + dotenv: + specifier: ^17.2.2 + version: 17.2.3 + typescript: + specifier: ^5 + version: 5.8.3 + devDependencies: + '@types/bun': + specifier: latest + version: 1.2.23(@types/react@19.1.12) + + frameworks/with-supabase: + dependencies: + '@radix-ui/react-checkbox': + specifier: ^1.3.1 + version: 1.3.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@radix-ui/react-dropdown-menu': - specifier: ^2.1.16 + specifier: ^2.1.14 version: 2.1.16(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@radix-ui/react-label': - specifier: ^2.1.7 + specifier: ^2.1.6 version: 2.1.7(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-popover': - specifier: ^1.1.15 - version: 1.1.15(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-separator': - specifier: ^1.1.7 - version: 1.1.7(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@radix-ui/react-slot': - specifier: ^1.2.3 + specifier: ^1.2.2 version: 1.2.3(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-tooltip': - specifier: ^1.2.8 - version: 1.2.8(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@useautumn/convex': - specifier: workspace:* - version: link:../../convex - '@workos-inc/authkit-nextjs': - specifier: ^2.5.0 - version: 2.5.0(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@workos-inc/node': - specifier: ^7.69.1 - version: 7.69.1(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)) - autumn-js: - specifier: workspace:* - version: link:../../autumn-js + '@supabase/ssr': + specifier: latest + version: 0.7.0(@supabase/supabase-js@2.75.0) + '@supabase/supabase-js': + specifier: latest + version: 2.75.0 class-variance-authority: specifier: ^0.7.1 version: 0.7.1 clsx: specifier: ^2.1.1 version: 2.1.1 - convex: - specifier: ^1.26.2 - version: 1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - country-flag-icons: - specifier: ^1.5.19 - version: 1.5.19 - input-otp: - specifier: ^1.4.2 - version: 1.4.2(react-dom@19.1.1(react@19.1.1))(react@19.1.1) lucide-react: - specifier: ^0.542.0 - version: 0.542.0(react@19.1.1) + specifier: ^0.511.0 + version: 0.511.0(react@19.1.1) next: - specifier: 15.2.1 - version: 15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - next-intl: - specifier: ^4.3.5 - version: 4.3.5(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(typescript@5.9.2) + specifier: latest + version: 15.5.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) next-themes: specifier: ^0.4.6 version: 0.4.6(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: - specifier: ^19.1.1 + specifier: ^19.0.0 version: 19.1.1 react-dom: - specifier: ^19.1.1 + specifier: ^19.0.0 version: 19.1.1(react@19.1.1) - react-hook-form: - specifier: ^7.62.0 - version: 7.62.0(react@19.1.1) tailwind-merge: - specifier: ^3.3.1 + specifier: ^3.3.0 version: 3.3.1 - zod: - specifier: ^4.1.3 - version: 4.1.5 devDependencies: '@eslint/eslintrc': - specifier: ^3.3.1 + specifier: ^3 version: 3.3.1 - '@tailwindcss/postcss': - specifier: ^4.1.12 - version: 4.1.12 '@types/node': - specifier: ^20.19.11 + specifier: ^20 version: 20.19.11 '@types/react': - specifier: ^19.1.11 + specifier: ^19 version: 19.1.12 '@types/react-dom': - specifier: ^19.1.8 + specifier: ^19 version: 19.1.9(@types/react@19.1.12) - concurrently: - specifier: ^9.2.1 - version: 9.2.1 + autoprefixer: + specifier: ^10.4.20 + version: 10.4.21(postcss@8.5.6) eslint: - specifier: ^9.34.0 - version: 9.34.0(jiti@2.5.1) + specifier: ^9 + version: 9.29.0(jiti@2.5.1) eslint-config-next: - specifier: 15.2.1 - version: 15.2.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) + specifier: 15.3.1 + version: 15.3.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) + postcss: + specifier: ^8 + version: 8.5.6 tailwindcss: - specifier: ^4.1.12 - version: 4.1.12 - tw-animate-css: - specifier: ^1.3.7 - version: 1.3.7 - typescript: - specifier: ^5.9.2 - version: 5.9.2 - - frameworks/elysia: - dependencies: - '@elysiajs/cors': - specifier: ^1.3.3 - version: 1.3.3(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3)) - '@elysiajs/node': - specifier: '1' - version: 1.3.1(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3))(hono@4.9.1) - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - elysia: - specifier: '1' - version: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3) - elysia-clerk: - specifier: ^0.12.0 - version: 0.12.1(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - devDependencies: - tsx: - specifier: '4' - version: 4.20.4 + specifier: ^3.4.1 + version: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3))) typescript: - specifier: '5' + specifier: ^5 version: 5.8.3 - frameworks/express: + nextjs: dependencies: - '@clerk/clerk-sdk-node': - specifier: ^4.13.23 - version: 4.13.23(react@19.1.1) - '@clerk/express': - specifier: ^1.7.15 - version: 1.7.26(express@4.21.2)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - better-auth: - specifier: ^1.2.8 - version: 1.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - better-call: - specifier: ^1.0.9 - version: 1.0.13 - cors: - specifier: ^2.8.5 - version: 2.8.5 - dotenv: - specifier: ^16.4.5 - version: 16.6.1 - express: - specifier: ^4.21.1 - version: 4.21.2 - helmet: - specifier: ^8.0.0 - version: 8.1.0 - morgan: - specifier: ^1.10.0 - version: 1.10.1 - pg: - specifier: ^8.16.0 - version: 8.16.3 - rou3: - specifier: ^0.6.1 - version: 0.6.3 - tsx: - specifier: ^4.19.4 - version: 4.20.4 - devDependencies: - '@types/cors': - specifier: ^2.8.17 - version: 2.8.19 - '@types/express': - specifier: ^4.17.20 - version: 4.17.23 - '@types/jest': - specifier: ^29.5.13 - version: 29.5.14 - '@types/morgan': - specifier: ^1.9.9 - version: 1.9.10 - '@types/node': - specifier: ^22.7.5 - version: 22.17.1 - '@types/pg': - specifier: ^8.15.2 - version: 8.15.5 - '@types/supertest': - specifier: ^6.0.2 - version: 6.0.3 - '@typescript-eslint/eslint-plugin': - specifier: ^7.16.1 - version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/parser': - specifier: ^7.16.1 - version: 7.18.0(eslint@8.57.1)(typescript@5.8.3) - eslint: - specifier: ^8.57.0 - version: 8.57.1 - eslint-config-airbnb-typescript: - specifier: ^18.0.0 - version: 18.0.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3))(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-plugin-import@2.32.0)(eslint@8.57.1) - eslint-import-resolver-typescript: - specifier: ^3.6.3 - version: 3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1) - eslint-plugin-import: - specifier: ^2.31.0 - version: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) - jest: - specifier: ^29.7.0 - version: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) - nodemon: - specifier: ^3.1.7 - version: 3.1.10 - supertest: - specifier: ^7.0.0 - version: 7.1.4 - ts-jest: - specifier: ^29.2.5 - version: 29.4.1(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@30.2.0)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)))(typescript@5.8.3) - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3) - typescript: - specifier: ^5.6.3 - version: 5.8.3 - - frameworks/fastify: - dependencies: - '@fastify/cors': - specifier: ^11.0.1 - version: 11.1.0 - '@types/pg': - specifier: ^8.15.2 - version: 8.15.5 - better-auth: - specifier: ^1.2.8 - version: 1.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - dotenv: - specifier: ^16.5.0 - version: 16.6.1 - fastify: - specifier: ^5.3.3 - version: 5.5.0 - pg: - specifier: ^8.16.0 - version: 8.16.3 - tsx: - specifier: ^4.19.4 - version: 4.20.4 - devDependencies: - '@types/node': - specifier: ^22.15.18 - version: 22.17.1 - typescript: - specifier: ^5.8.3 - version: 5.8.3 - - frameworks/hono: - dependencies: - '@clerk/backend': - specifier: ^1.32.1 - version: 1.34.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@hono/clerk-auth': - specifier: ^2.0.0 - version: 2.0.1(@clerk/backend@1.34.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(hono@4.9.1) - '@hono/node-server': - specifier: ^1.14.1 - version: 1.19.0(hono@4.9.1) - '@supabase/supabase-js': - specifier: ^2.53.0 - version: 2.55.0 - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - better-auth: - specifier: ^1.2.8 - version: 1.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - dotenv: - specifier: ^16.5.0 - version: 16.6.1 - hono: - specifier: ^4.7.9 - version: 4.9.1 - pg: - specifier: ^8.16.0 - version: 8.16.3 - devDependencies: - '@types/node': - specifier: ^20.11.17 - version: 20.19.10 - '@types/pg': - specifier: ^8.15.2 - version: 8.15.5 - tsx: - specifier: ^4.7.1 - version: 4.20.4 - typescript: - specifier: ^5.8.3 - version: 5.8.3 - - frameworks/next14: - dependencies: - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - next: - specifier: 15.4.1 - version: 15.4.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - react: - specifier: 19.1.0 - version: 19.1.0 - react-dom: - specifier: 19.1.0 - version: 19.1.0(react@19.1.0) - devDependencies: - '@eslint/eslintrc': - specifier: ^3 - version: 3.3.1 - '@tailwindcss/postcss': - specifier: ^4 - version: 4.1.11 - '@types/node': - specifier: ^20 - version: 20.19.10 - '@types/react': - specifier: ^19 - version: 19.1.10 - '@types/react-dom': - specifier: ^19 - version: 19.1.7(@types/react@19.1.10) - eslint: - specifier: ^9 - version: 9.34.0(jiti@2.5.1) - eslint-config-next: - specifier: 15.4.1 - version: 15.4.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - tailwindcss: - specifier: ^4 - version: 4.1.12 - typescript: - specifier: ^5 - version: 5.8.3 - - frameworks/rr7: - dependencies: - '@clerk/react-router': - specifier: ^1.8.9 - version: 1.9.6(react-dom@19.1.0(react@19.1.0))(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) - '@react-router/node': - specifier: ^7.5.3 - version: 7.8.2(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3) - '@react-router/serve': - specifier: ^7.5.3 - version: 7.8.2(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3) - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - isbot: - specifier: ^5.1.27 - version: 5.1.29 - react: - specifier: ^19.1.0 - version: 19.1.0 - react-dom: - specifier: ^19.1.0 - version: 19.1.0(react@19.1.0) - react-router: - specifier: ^7.5.3 - version: 7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - devDependencies: - '@react-router/dev': - specifier: ^7.5.3 - version: 7.8.2(@react-router/serve@7.8.2(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3))(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(react-dom@19.1.0(react@19.1.0))(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(terser@5.43.1)(tsx@4.20.4)(typescript@5.8.3)(vite@6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(yaml@2.8.1) - '@tailwindcss/vite': - specifier: ^4.1.4 - version: 4.1.12(vite@6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@types/node': - specifier: ^20.19.0 - version: 20.19.10 - '@types/react': - specifier: ^19.1.2 - version: 19.1.10 - '@types/react-dom': - specifier: ^19.1.2 - version: 19.1.7(@types/react@19.1.10) - tailwindcss: - specifier: ^4.1.4 - version: 4.1.12 - typescript: - specifier: ^5.8.3 - version: 5.8.3 - vite: - specifier: ^6.3.3 - version: 6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - vite-tsconfig-paths: - specifier: ^5.1.4 - version: 5.1.4(typescript@5.8.3)(vite@6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - - frameworks/tanstack: - dependencies: - '@tailwindcss/postcss': - specifier: ^4.1.7 - version: 4.1.11 - '@tanstack/react-router': - specifier: ^1.120.5 - version: 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/react-router-devtools': - specifier: ^1.120.5 - version: 1.131.28(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@tanstack/router-core@1.131.7)(csstype@3.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(solid-js@1.9.9)(tiny-invariant@1.3.3) - '@tanstack/react-start': - specifier: ^1.120.5 - version: 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)) - '@types/pg': - specifier: ^8.15.2 - version: 8.15.5 - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - better-auth: - specifier: ^1.2.8 - version: 1.3.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - pg: - specifier: ^8.16.0 - version: 8.16.3 - react: - specifier: ^18.3.1 - version: 18.3.1 - react-dom: - specifier: ^18.3.1 - version: 18.3.1(react@18.3.1) - tailwind-merge: - specifier: ^2.6.0 - version: 2.6.0 - vinxi: - specifier: 0.5.3 - version: 0.5.3(@netlify/blobs@9.1.2)(@types/node@22.17.1)(better-sqlite3@12.2.0)(db0@0.3.2(better-sqlite3@12.2.0))(ioredis@5.7.0)(jiti@2.5.1)(lightningcss@1.30.1)(rolldown@1.0.0-beta.34)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - devDependencies: - '@types/node': - specifier: ^22.5.4 - version: 22.17.1 - '@types/react': - specifier: ^18.3.14 - version: 18.3.23 - '@types/react-dom': - specifier: ^18.3.5 - version: 18.3.7(@types/react@18.3.23) - autoprefixer: - specifier: ^10.4.20 - version: 10.4.21(postcss@8.5.6) - postcss: - specifier: ^8.5.3 - version: 8.5.6 - tailwindcss: - specifier: ^3.4.17 - version: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) - typescript: - specifier: ^5.7.2 - version: 5.8.3 - vite-tsconfig-paths: - specifier: ^5.1.4 - version: 5.1.4(typescript@5.8.3)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - - frameworks/test: {} - - frameworks/vite: - dependencies: - '@clerk/clerk-react': - specifier: ^5.32.1 - version: 5.41.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-dialog': - specifier: ^1.1.13 - version: 1.1.14(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-label': - specifier: ^2.1.6 - version: 2.1.7(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-slot': - specifier: ^1.2.2 - version: 1.2.3(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-switch': - specifier: ^1.2.4 - version: 1.2.5(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-tooltip': - specifier: ^1.2.6 - version: 1.2.8(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@supabase/supabase-js': - specifier: ^2.53.0 - version: 2.55.0 - '@tailwindcss/vite': - specifier: ^4.1.7 - version: 4.1.12(vite@6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - better-auth: - specifier: ^1.2.8 - version: 1.3.4(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - class-variance-authority: - specifier: ^0.7.1 - version: 0.7.1 - clsx: - specifier: ^2.1.1 - version: 2.1.1 - lucide-react: - specifier: ^0.510.0 - version: 0.510.0(react@19.1.0) - next-themes: - specifier: ^0.4.6 - version: 0.4.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - react: - specifier: ^19.1.0 - version: 19.1.0 - react-dom: - specifier: ^19.1.0 - version: 19.1.0(react@19.1.0) - sonner: - specifier: ^2.0.3 - version: 2.0.7(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - tailwind-merge: - specifier: ^3.3.0 - version: 3.3.1 - tailwindcss: - specifier: ^4.1.7 - version: 4.1.12 - devDependencies: - '@eslint/js': - specifier: ^9.25.0 - version: 9.34.0 - '@types/node': - specifier: ^22.15.18 - version: 22.17.1 - '@types/react': - specifier: ^19.1.2 - version: 19.1.10 - '@types/react-dom': - specifier: ^19.1.2 - version: 19.1.7(@types/react@19.1.10) - '@vitejs/plugin-react': - specifier: ^4.4.1 - version: 4.7.0(vite@6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - eslint: - specifier: ^9.25.0 - version: 9.34.0(jiti@2.5.1) - eslint-plugin-react-hooks: - specifier: ^5.2.0 - version: 5.2.0(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-react-refresh: - specifier: ^0.4.19 - version: 0.4.20(eslint@9.34.0(jiti@2.5.1)) - globals: - specifier: ^16.0.0 - version: 16.3.0 - tw-animate-css: - specifier: ^1.2.9 - version: 1.3.6 - typescript: - specifier: ~5.8.3 - version: 5.8.3 - typescript-eslint: - specifier: ^8.30.1 - version: 8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - vite: - specifier: ^6.3.5 - version: 6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - - nextjs: - dependencies: - '@clerk/nextjs': - specifier: ^6.28.1 - version: 6.30.1(next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@knocklabs/node': - specifier: ^1.19.0 - version: 1.19.0 - '@radix-ui/react-accordion': - specifier: ^1.2.11 - version: 1.2.11(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-dialog': - specifier: ^1.1.14 - version: 1.1.14(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-popover': - specifier: ^1.1.14 - version: 1.1.14(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': - specifier: ^1.2.3 - version: 1.2.3(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-switch': - specifier: ^1.2.5 - version: 1.2.5(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@tailwindcss/cli': - specifier: ^4.1.11 - version: 4.1.11 - '@useautumn/sdk': + '@clerk/nextjs': + specifier: ^6.28.1 + version: 6.30.1(next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@knocklabs/node': + specifier: ^1.19.0 + version: 1.19.0 + '@radix-ui/react-accordion': + specifier: ^1.2.11 + version: 1.2.11(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-dialog': + specifier: ^1.1.14 + version: 1.1.14(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-popover': + specifier: ^1.1.14 + version: 1.1.14(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-slot': + specifier: ^1.2.3 + version: 1.2.3(@types/react@19.1.10)(react@19.1.1) + '@radix-ui/react-switch': + specifier: ^1.2.5 + version: 1.2.5(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@tailwindcss/cli': + specifier: ^4.1.11 + version: 4.1.11 + '@useautumn/sdk': specifier: workspace:* version: link:../ts-sdk atmn: @@ -1699,9 +1135,6 @@ packages: '@better-auth/core@1.3.24': resolution: {integrity: sha512-nU4aj5SA0COXAls0p3htIWmGPOG+76HULd9tG8CEUfwcK95rRrUIUN74FKvsAu3b18AVj3E7cL4bYrQS3KYKRw==} - '@better-auth/utils@0.2.5': - resolution: {integrity: sha512-uI2+/8h/zVsH8RrYdG8eUErbuGBk16rZKQfz8CjxQOyCE6v7BqFYEbFwvOkvl1KbUdxhqOnXp78+uE5h8qVEgQ==} - '@better-auth/utils@0.2.6': resolution: {integrity: sha512-3y/vaL5Ox33dBwgJ6ub3OPkVqr6B5xL2kgxNHG8eHZuryLyG/4JSPGqjbdRSgjuy9kALUZYDFl+ORIAxlWMSuA==} @@ -1726,34 +1159,10 @@ packages: '@bundled-es-modules/tough-cookie@0.1.6': resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==} - '@clerk/backend@0.38.15': - resolution: {integrity: sha512-zmd0jPyb1iALlmyzyRbgujQXrGqw8sf+VpFjm5GkndpBeq5+9+oH7QgMaFEmWi9oxvTd2sZ+EN+QT4+OXPUnGA==} - engines: {node: '>=14'} - - '@clerk/backend@1.34.0': - resolution: {integrity: sha512-9rZ8hQJVpX5KX2bEpiuVXfpjhojQCiqCWADJDdCI0PCeKxn58Ep0JPYiIcczg4VKUc3a7jve9vXylykG2XajLQ==} - engines: {node: '>=18.17.0'} - peerDependencies: - svix: ^1.62.0 - peerDependenciesMeta: - svix: - optional: true - - '@clerk/backend@2.10.1': - resolution: {integrity: sha512-6UV9OblBhApQolpTBYg9jRHT5LGEwbAkC10nQoycWs6+3r2LiBE5DAGFp3R0NX0VzqJt4Es3d3e691V/waNAPw==} - engines: {node: '>=18.17.0'} - '@clerk/backend@2.7.1': resolution: {integrity: sha512-/Ha0cHNgX5tGBqfzMnasXZFMS5R+nNBUnSueZB0F223S+sUhnY3SMzLB5S3kLSFJWjxO2cGkiB0r1NcFLyLZfw==} engines: {node: '>=18.17.0'} - '@clerk/clerk-react@5.41.0': - resolution: {integrity: sha512-XhBCAYa0xHCqMFy6QmlSHS772nMOVPT6daS/VXW8lxbQnOIo6/tSSbZUYzzJ0F/BrFxSViZjhVBZB0cvgO4fSA==} - engines: {node: '>=18.17.0'} - peerDependencies: - react: ^18.0.0 || ^19.0.0 || ^19.0.0-0 - react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-0 - '@clerk/clerk-react@5.45.0': resolution: {integrity: sha512-TgEEUDToeBZlEi+FuzbibAIed7+UazLWmzZZ0Z1ztvI7U8iGYaGrC8+VIE4PosMjrWUy11aW4C5nCwQdq2o5hw==} engines: {node: '>=18.17.0'} @@ -1761,16 +1170,6 @@ packages: react: ^18.0.0 || ^19.0.0 || ^19.0.0-0 react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-0 - '@clerk/clerk-sdk-node@4.13.23': - resolution: {integrity: sha512-D3/O5zLqOtIcoNjA5tza1WK+o3Bs20DcmFc2z8swv7p8p5i5fj5Q1rEZl31bnz+fEQGo2YtTYZyG0zY/HkioQw==} - engines: {node: '>=14'} - - '@clerk/express@1.7.26': - resolution: {integrity: sha512-qVNg5hHUTZsN0Cs5s6InQllz3P1LLCkDA5DOCGuvp3EJ7+tFil1yUTmpn3QyXg3j1IlP8QMGPeUiYev7Mt+ivA==} - engines: {node: '>=18.17.0'} - peerDependencies: - express: ^4.17.0 || ^5.0.0 - '@clerk/nextjs@6.30.1': resolution: {integrity: sha512-TogyNkqP11DDMGr/CHKTXxvS7WsAUTsSp8P/t8yAVtlVj4VzgAMGafOmeAKxaAAi45GG+NUdeyFL0h0go0XC4w==} engines: {node: '>=18.17.0'} @@ -1779,22 +1178,6 @@ packages: react: ^18.0.0 || ^19.0.0 || ^19.0.0-0 react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-0 - '@clerk/react-router@1.9.6': - resolution: {integrity: sha512-7pDG9tLAsTm2gZGPIo2M1Zug4ek9YKh3ksg1tvyD1XslskGXsqX76sveMdzesuM2iF9z8Igp94KdyFvm6T2wGQ==} - engines: {node: '>=20.0.0'} - peerDependencies: - react: ^18.0.0 || ^19.0.0 || ^19.0.0-0 - react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-0 - react-router: ^7.1.2 - - '@clerk/shared@1.4.2': - resolution: {integrity: sha512-R+OkzCtnNU7sn/F6dBfdY5lKs84TN785VZdBBefmyr7zsXcFEqbCcfQzyvgtIS28Ln5SifFEBoAyYR334IXO8w==} - peerDependencies: - react: '>=16' - peerDependenciesMeta: - react: - optional: true - '@clerk/shared@3.19.0': resolution: {integrity: sha512-yZ4ZKNyyQwugtyeVVTFytFLDW3gyQrEa+9DTKwF04nxRE7cBY9gseHjycOWVMBjDtLeqF34zdQPxkM7FtZoTkw==} engines: {node: '>=18.17.0'} @@ -1819,10 +1202,6 @@ packages: react-dom: optional: true - '@clerk/types@3.65.5': - resolution: {integrity: sha512-RGO8v2a52Ybo1jwVj42UWT8VKyxAk/qOxrkA3VNIYBNEajPSmZNa9r9MTgqSgZRyz1XTlQHdVb7UK7q78yAGfA==} - engines: {node: '>=14'} - '@clerk/types@4.75.0': resolution: {integrity: sha512-b5bL+XhV4ZO7Q54YqsxV4LyopaWuV0fzg6acsYD5mM2ibQaVY/SIAQgH40sGBT1D25c2jyvVY2JDKPRPqB1I5g==} engines: {node: '>=18.17.0'} @@ -1843,20 +1222,6 @@ packages: resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} - '@convex-dev/better-auth@0.7.17': - resolution: {integrity: sha512-ozV4SgXqsg3lsDjDIbmedjqWxl02YPbSO1+2+0nRcHVdV0eAZ7fAtSWdCc8QrCQlBqynTacgYF02uL5dGvnthA==} - peerDependencies: - better-auth: 1.3.7 - convex: '>=1.25.0 <1.35.0' - react: ^18.3.1 || ^19.0.0 - react-dom: ^18.3.1 || ^19.0.0 - - '@convex-dev/workos@0.0.1': - resolution: {integrity: sha512-8gZOgmcTitcKXwagdU69XC4Va6wMPFIhSqSOEaXmFXMEPtkMgxPW1dhJzrmm9UQ4iRgZsckjd2O5aQjUH7kHGQ==} - peerDependencies: - convex: ^1.25.4 - react: ^18.0.0 || ^19.0.0-0 || ^19.0.0 - '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -1864,12 +1229,6 @@ packages: '@dabh/diagnostics@2.0.3': resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} - '@deno/shim-deno-test@0.5.0': - resolution: {integrity: sha512-4nMhecpGlPi0cSzT67L+Tm+GOJqvuk8gqHBziqcUQOarnuIax1z96/gJHCSIz2Z0zhxE6Rzwb3IZXPtFh51j+w==} - - '@deno/shim-deno@0.19.2': - resolution: {integrity: sha512-q3VTHl44ad8T2Tw2SpeAvghdGOjlnLPDNO2cpOxwMrBE/PVas6geWpbpIgrM+czOCH0yejp0yi8OaTuB+NU40Q==} - '@dependents/detective-less@5.0.1': resolution: {integrity: sha512-Y6+WUMsTFWE5jb20IFP4YGa5IrGY/+a/FbOSjDF/wz9gepU2hwCYSXRHP/vPwBvwcY3SVMASt4yXxbXNXigmZQ==} engines: {node: '>=18'} @@ -1882,16 +1241,6 @@ packages: resolution: {integrity: sha512-NKBGBSIKUG584qrS1tyxVpX/AKJKQw5HgjYEnPLC0QsTw79JrGn+qUr8CXFb955Iy7GUdiiUv1rJ6JBGvaKb6w==} engines: {node: '>=18'} - '@elysiajs/cors@1.3.3': - resolution: {integrity: sha512-mYIU6PyMM6xIJuj7d27Vt0/wuzVKIEnFPjcvlkyd7t/m9xspAG37cwNjFxVOnyvY43oOd2I/oW2DB85utXpA2Q==} - peerDependencies: - elysia: '>= 1.3.0' - - '@elysiajs/node@1.3.1': - resolution: {integrity: sha512-l+0gmdUCPW+s2MfUg8OtOkam/qJxEQK936WfCfr+rIeZwHXMYNFgbYdkTysrT6jFDdxSpd1nLqlsJjv29RHChw==} - peerDependencies: - elysia: '>= 1.3.18' - '@emnapi/core@1.4.5': resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==} @@ -1901,12 +1250,6 @@ packages: '@emnapi/wasi-threads@1.0.4': resolution: {integrity: sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g==} - '@esbuild/aix-ppc64@0.20.2': - resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [aix] - '@esbuild/aix-ppc64@0.25.4': resolution: {integrity: sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==} engines: {node: '>=18'} @@ -1925,12 +1268,6 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.20.2': - resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm64@0.25.4': resolution: {integrity: sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==} engines: {node: '>=18'} @@ -1949,12 +1286,6 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm@0.20.2': - resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - '@esbuild/android-arm@0.25.4': resolution: {integrity: sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==} engines: {node: '>=18'} @@ -1973,12 +1304,6 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-x64@0.20.2': - resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - '@esbuild/android-x64@0.25.4': resolution: {integrity: sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==} engines: {node: '>=18'} @@ -1997,12 +1322,6 @@ packages: cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.20.2': - resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-arm64@0.25.4': resolution: {integrity: sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==} engines: {node: '>=18'} @@ -2021,12 +1340,6 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.20.2': - resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - '@esbuild/darwin-x64@0.25.4': resolution: {integrity: sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==} engines: {node: '>=18'} @@ -2045,12 +1358,6 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.20.2': - resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-arm64@0.25.4': resolution: {integrity: sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==} engines: {node: '>=18'} @@ -2069,12 +1376,6 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.20.2': - resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - '@esbuild/freebsd-x64@0.25.4': resolution: {integrity: sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==} engines: {node: '>=18'} @@ -2093,12 +1394,6 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.20.2': - resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm64@0.25.4': resolution: {integrity: sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==} engines: {node: '>=18'} @@ -2117,12 +1412,6 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.20.2': - resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - '@esbuild/linux-arm@0.25.4': resolution: {integrity: sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==} engines: {node: '>=18'} @@ -2141,12 +1430,6 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.20.2': - resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-ia32@0.25.4': resolution: {integrity: sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==} engines: {node: '>=18'} @@ -2165,12 +1448,6 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.20.2': - resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-loong64@0.25.4': resolution: {integrity: sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==} engines: {node: '>=18'} @@ -2189,12 +1466,6 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.20.2': - resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-mips64el@0.25.4': resolution: {integrity: sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==} engines: {node: '>=18'} @@ -2213,12 +1484,6 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.20.2': - resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-ppc64@0.25.4': resolution: {integrity: sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==} engines: {node: '>=18'} @@ -2237,12 +1502,6 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.20.2': - resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-riscv64@0.25.4': resolution: {integrity: sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==} engines: {node: '>=18'} @@ -2261,12 +1520,6 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.20.2': - resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-s390x@0.25.4': resolution: {integrity: sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==} engines: {node: '>=18'} @@ -2285,12 +1538,6 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.20.2': - resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - '@esbuild/linux-x64@0.25.4': resolution: {integrity: sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==} engines: {node: '>=18'} @@ -2327,12 +1574,6 @@ packages: cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.20.2': - resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - '@esbuild/netbsd-x64@0.25.4': resolution: {integrity: sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==} engines: {node: '>=18'} @@ -2369,12 +1610,6 @@ packages: cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.20.2': - resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - '@esbuild/openbsd-x64@0.25.4': resolution: {integrity: sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==} engines: {node: '>=18'} @@ -2399,12 +1634,6 @@ packages: cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.20.2': - resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - '@esbuild/sunos-x64@0.25.4': resolution: {integrity: sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==} engines: {node: '>=18'} @@ -2423,12 +1652,6 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.20.2': - resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-arm64@0.25.4': resolution: {integrity: sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==} engines: {node: '>=18'} @@ -2447,12 +1670,6 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.20.2': - resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-ia32@0.25.4': resolution: {integrity: sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==} engines: {node: '>=18'} @@ -2471,12 +1688,6 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.20.2': - resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - '@esbuild/win32-x64@0.25.4': resolution: {integrity: sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==} engines: {node: '>=18'} @@ -2567,9 +1778,6 @@ packages: '@fastify/busboy@3.1.1': resolution: {integrity: sha512-5DGmA8FTdB2XbDeEwc/5ZXBl6UbBAyBOOLlPuBnZ/N1SwdH9Ii+cOX3tBROlDgcTXxjOYnLMVoKk9+FXAw0CJw==} - '@fastify/cors@11.1.0': - resolution: {integrity: sha512-sUw8ed8wP2SouWZTIbA7V2OQtMNpLj2W6qJOYhNdcmINTu6gsxVYXjQiM9mdi8UUDlcoDDJ/W2syPo1WB2QjYA==} - '@fastify/error@4.2.0': resolution: {integrity: sha512-RSo3sVDXfHskiBZKBPRgnQTtIqpi/7zhJOEmAxCiBcM7d0uwdGdxLlsCaLzGs8v8NnxIRlfG0N51p5yFaOentQ==} @@ -2600,45 +1808,12 @@ packages: '@floating-ui/utils@0.2.10': resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==} - '@formatjs/ecma402-abstract@2.3.4': - resolution: {integrity: sha512-qrycXDeaORzIqNhBOx0btnhpD1c+/qFIHAN9znofuMJX6QBwtbrmlpWfD4oiUUD2vJUOIYFA/gYtg2KAMGG7sA==} - - '@formatjs/fast-memoize@2.2.7': - resolution: {integrity: sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ==} - - '@formatjs/icu-messageformat-parser@2.11.2': - resolution: {integrity: sha512-AfiMi5NOSo2TQImsYAg8UYddsNJ/vUEv/HaNqiFjnI3ZFfWihUtD5QtuX6kHl8+H+d3qvnE/3HZrfzgdWpsLNA==} - - '@formatjs/icu-skeleton-parser@1.8.14': - resolution: {integrity: sha512-i4q4V4qslThK4Ig8SxyD76cp3+QJ3sAqr7f6q9VVfeGtxG9OhiAk3y9XF6Q41OymsKzsGQ6OQQoJNY4/lI8TcQ==} - - '@formatjs/intl-localematcher@0.5.10': - resolution: {integrity: sha512-af3qATX+m4Rnd9+wHcjJ4w2ijq+rAVP3CCinJQvFv1kgSu1W6jypUmvleJxcewdxmutM8dmIRZFxO/IQBZmP2Q==} - '@formatjs/intl-localematcher@0.6.1': resolution: {integrity: sha512-ePEgLgVCqi2BBFnTMWPfIghu6FkbZnnBVhO2sSxvLfrdFw7wCHAHiDoM2h4NRgjbaY7+B7HgOLZGkK187pZTZg==} '@hexagon/base64@1.1.28': resolution: {integrity: sha512-lhqDEAvWixy3bZ+UOYbPwUbBkwBq5C1LAJ/xPC8Oi+lL54oyakv/npbA0aU2hgCsx/1NUd4IBvV03+aUBWxerw==} - '@hono/clerk-auth@2.0.1': - resolution: {integrity: sha512-tc59vpU022NgM4AHHI+r0FIext6slHEXsZaRcMNfllTnN2gkcNmSNCrAH04lLmGr9Lfb/RmpATefgW+6/cnuNA==} - engines: {node: '>=16.x.x'} - peerDependencies: - '@clerk/backend': ^1.0.0 - hono: '>=3.*' - - '@hono/node-server@1.19.0': - resolution: {integrity: sha512-1k8/8OHf5VIymJEcJyVksFpT+AQ5euY0VA5hUkCnlKpD4mr8FSbvXaHblxeTTEr90OaqWzAkQaqD80qHZQKxBA==} - engines: {node: '>=18.14.1'} - peerDependencies: - hono: ^4 - - '@hookform/resolvers@5.2.1': - resolution: {integrity: sha512-u0+6X58gkjMcxur1wRWokA7XsiiBJ6aK17aPZxhkoYiK5J+HcTx0Vhu9ovXe6H+dVpO6cjrn2FkJTryXEMlryQ==} - peerDependencies: - react-hook-form: ^7.55.0 - '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -2668,65 +1843,33 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} - '@img/sharp-darwin-arm64@0.33.5': - resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [darwin] - '@img/sharp-darwin-arm64@0.34.3': resolution: {integrity: sha512-ryFMfvxxpQRsgZJqBd4wsttYQbCxsJksrv9Lw/v798JcQ8+w84mBWuXwl+TT0WJ/WrYOLaYpwQXi3sA9nTIaIg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [darwin] - '@img/sharp-darwin-x64@0.33.5': - resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [darwin] - '@img/sharp-darwin-x64@0.34.3': resolution: {integrity: sha512-yHpJYynROAj12TA6qil58hmPmAwxKKC7reUqtGLzsOHfP7/rniNGTL8tjWX6L3CTV4+5P4ypcS7Pp+7OB+8ihA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [darwin] - '@img/sharp-libvips-darwin-arm64@1.0.4': - resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} - cpu: [arm64] - os: [darwin] - '@img/sharp-libvips-darwin-arm64@1.2.0': resolution: {integrity: sha512-sBZmpwmxqwlqG9ueWFXtockhsxefaV6O84BMOrhtg/YqbTaRdqDE7hxraVE3y6gVM4eExmfzW4a8el9ArLeEiQ==} cpu: [arm64] os: [darwin] - '@img/sharp-libvips-darwin-x64@1.0.4': - resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} - cpu: [x64] - os: [darwin] - '@img/sharp-libvips-darwin-x64@1.2.0': resolution: {integrity: sha512-M64XVuL94OgiNHa5/m2YvEQI5q2cl9d/wk0qFTDVXcYzi43lxuiFTftMR1tOnFQovVXNZJ5TURSDK2pNe9Yzqg==} cpu: [x64] os: [darwin] - '@img/sharp-libvips-linux-arm64@1.0.4': - resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} - cpu: [arm64] - os: [linux] - '@img/sharp-libvips-linux-arm64@1.2.0': resolution: {integrity: sha512-RXwd0CgG+uPRX5YYrkzKyalt2OJYRiJQ8ED/fi1tq9WQW2jsQIn0tqrlR5l5dr/rjqq6AHAxURhj2DVjyQWSOA==} cpu: [arm64] os: [linux] - '@img/sharp-libvips-linux-arm@1.0.5': - resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} - cpu: [arm] - os: [linux] - '@img/sharp-libvips-linux-arm@1.2.0': resolution: {integrity: sha512-mWd2uWvDtL/nvIzThLq3fr2nnGfyr/XMXlq8ZJ9WMR6PXijHlC3ksp0IpuhK6bougvQrchUAfzRLnbsen0Cqvw==} cpu: [arm] @@ -2737,64 +1880,32 @@ packages: cpu: [ppc64] os: [linux] - '@img/sharp-libvips-linux-s390x@1.0.4': - resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} - cpu: [s390x] - os: [linux] - '@img/sharp-libvips-linux-s390x@1.2.0': resolution: {integrity: sha512-eMKfzDxLGT8mnmPJTNMcjfO33fLiTDsrMlUVcp6b96ETbnJmd4uvZxVJSKPQfS+odwfVaGifhsB07J1LynFehw==} cpu: [s390x] os: [linux] - '@img/sharp-libvips-linux-x64@1.0.4': - resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} - cpu: [x64] - os: [linux] - '@img/sharp-libvips-linux-x64@1.2.0': resolution: {integrity: sha512-ZW3FPWIc7K1sH9E3nxIGB3y3dZkpJlMnkk7z5tu1nSkBoCgw2nSRTFHI5pB/3CQaJM0pdzMF3paf9ckKMSE9Tg==} cpu: [x64] os: [linux] - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': - resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} - cpu: [arm64] - os: [linux] - '@img/sharp-libvips-linuxmusl-arm64@1.2.0': resolution: {integrity: sha512-UG+LqQJbf5VJ8NWJ5Z3tdIe/HXjuIdo4JeVNADXBFuG7z9zjoegpzzGIyV5zQKi4zaJjnAd2+g2nna8TZvuW9Q==} cpu: [arm64] os: [linux] - '@img/sharp-libvips-linuxmusl-x64@1.0.4': - resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} - cpu: [x64] - os: [linux] - '@img/sharp-libvips-linuxmusl-x64@1.2.0': resolution: {integrity: sha512-SRYOLR7CXPgNze8akZwjoGBoN1ThNZoqpOgfnOxmWsklTGVfJiGJoC/Lod7aNMGA1jSsKWM1+HRX43OP6p9+6Q==} cpu: [x64] os: [linux] - '@img/sharp-linux-arm64@0.33.5': - resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [linux] - '@img/sharp-linux-arm64@0.34.3': resolution: {integrity: sha512-QdrKe3EvQrqwkDrtuTIjI0bu6YEJHTgEeqdzI3uWJOH6G1O8Nl1iEeVYRGdj1h5I21CqxSvQp1Yv7xeU3ZewbA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - '@img/sharp-linux-arm@0.33.5': - resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm] - os: [linux] - '@img/sharp-linux-arm@0.34.3': resolution: {integrity: sha512-oBK9l+h6KBN0i3dC8rYntLiVfW8D8wH+NPNT3O/WBHeW0OQWCjfWksLUaPidsrDKpJgXp3G3/hkmhptAW0I3+A==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -2807,59 +1918,30 @@ packages: cpu: [ppc64] os: [linux] - '@img/sharp-linux-s390x@0.33.5': - resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [s390x] - os: [linux] - '@img/sharp-linux-s390x@0.34.3': resolution: {integrity: sha512-3gahT+A6c4cdc2edhsLHmIOXMb17ltffJlxR0aC2VPZfwKoTGZec6u5GrFgdR7ciJSsHT27BD3TIuGcuRT0KmQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [s390x] os: [linux] - '@img/sharp-linux-x64@0.33.5': - resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [linux] - '@img/sharp-linux-x64@0.34.3': resolution: {integrity: sha512-8kYso8d806ypnSq3/Ly0QEw90V5ZoHh10yH0HnrzOCr6DKAPI6QVHvwleqMkVQ0m+fc7EH8ah0BB0QPuWY6zJQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - '@img/sharp-linuxmusl-arm64@0.33.5': - resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [linux] - '@img/sharp-linuxmusl-arm64@0.34.3': resolution: {integrity: sha512-vAjbHDlr4izEiXM1OTggpCcPg9tn4YriK5vAjowJsHwdBIdx0fYRsURkxLG2RLm9gyBq66gwtWI8Gx0/ov+JKQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - '@img/sharp-linuxmusl-x64@0.33.5': - resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [linux] - '@img/sharp-linuxmusl-x64@0.34.3': resolution: {integrity: sha512-gCWUn9547K5bwvOn9l5XGAEjVTTRji4aPTqLzGXHvIr6bIDZKNTA34seMPgM0WmSf+RYBH411VavCejp3PkOeQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - '@img/sharp-wasm32@0.33.5': - resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [wasm32] - '@img/sharp-wasm32@0.34.3': resolution: {integrity: sha512-+CyRcpagHMGteySaWos8IbnXcHgfDn7pO2fiC2slJxvNq9gDipYBN42/RagzctVRKgxATmfqOSulgZv5e1RdMg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -2871,24 +1953,12 @@ packages: cpu: [arm64] os: [win32] - '@img/sharp-win32-ia32@0.33.5': - resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [ia32] - os: [win32] - '@img/sharp-win32-ia32@0.34.3': resolution: {integrity: sha512-xuCdhH44WxuXgOM714hn4amodJMZl3OEvf0GVTm0BEyMeA2to+8HEdRPShH0SLYptJY1uBw+SCFP9WVQi1Q/cw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [ia32] os: [win32] - '@img/sharp-win32-x64@0.33.5': - resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [win32] - '@img/sharp-win32-x64@0.34.3': resolution: {integrity: sha512-OWwz05d++TxzLEv4VnsTz5CmZ6mI6S05sfQGEMrNrQcOEERbX46332IvE7pO/EUiw7jUrrS40z/M7kPyjfl04g==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -3162,12 +2232,6 @@ packages: '@mdx-js/mdx@3.1.0': resolution: {integrity: sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==} - '@mjackson/node-fetch-server@0.2.0': - resolution: {integrity: sha512-EMlH1e30yzmTpGLQjlFmaDAjyOeZhng1/XCd7DExR8PNAnG/G1tyruZxEoUe11ClnwGhGrtsdnyyUx1frSzjng==} - - '@mjackson/node-fetch-server@0.7.0': - resolution: {integrity: sha512-un8diyEBKU3BTVj3GzlTPA1kIjCkGdD+AMYQy31Gf9JCkfoZzwgJ79GUtHrF2BN3XPNMLpubbzPcxys+a3uZEw==} - '@modelcontextprotocol/sdk@1.17.2': resolution: {integrity: sha512-EFLRNXR/ixpXQWu6/3Cu30ndDFIFNaqUXcTqsGebujeMan9FzhAaFFswLRiFj61rgygDRr8WO1N+UijjgRxX9g==} engines: {node: '>=18'} @@ -3218,45 +2282,24 @@ packages: engines: {node: '>=18.14.0'} hasBin: true - '@next/env@15.2.1': - resolution: {integrity: sha512-JmY0qvnPuS2NCWOz2bbby3Pe0VzdAQ7XpEB6uLIHmtXNfAsAO0KLQLkuAoc42Bxbo3/jMC3dcn9cdf+piCcG2Q==} - - '@next/env@15.2.3': - resolution: {integrity: sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw==} - '@next/env@15.3.4': resolution: {integrity: sha512-ZkdYzBseS6UjYzz6ylVKPOK+//zLWvD6Ta+vpoye8cW11AjiQjGYVibF0xuvT4L0iJfAPfZLFidaEzAOywyOAQ==} '@next/env@15.4.1': resolution: {integrity: sha512-DXQwFGAE2VH+f2TJsKepRXpODPU+scf5fDbKOME8MMyeyswe4XwgRdiiIYmBfkXU+2ssliLYznajTrOQdnLR5A==} + '@next/env@15.5.4': + resolution: {integrity: sha512-27SQhYp5QryzIT5uO8hq99C69eLQ7qkzkDPsk3N+GuS2XgOgoYEeOav7Pf8Tn4drECOVDsDg8oj+/DVy8qQL2A==} + '@next/eslint-plugin-next@15.1.4': resolution: {integrity: sha512-HwlEXwCK3sr6zmVGEvWBjW9tBFs1Oe6hTmTLoFQtpm4As5HCdu8jfSE0XJOp7uhfEGLniIx8yrGxEWwNnY0fmQ==} - '@next/eslint-plugin-next@15.2.1': - resolution: {integrity: sha512-6ppeToFd02z38SllzWxayLxjjNfzvc7Wm07gQOKSLjyASvKcXjNStZrLXMHuaWkhjqxe+cnhb2uzfWXm1VEj/Q==} - - '@next/eslint-plugin-next@15.2.3': - resolution: {integrity: sha512-eNSOIMJtjs+dp4Ms1tB1PPPJUQHP3uZK+OQ7iFY9qXpGO6ojT6imCL+KcUOqE/GXGidWbBZJzYdgAdPHqeCEPA==} + '@next/eslint-plugin-next@15.3.1': + resolution: {integrity: sha512-oEs4dsfM6iyER3jTzMm4kDSbrQJq8wZw5fmT6fg2V3SMo+kgG+cShzLfEV20senZzv8VF+puNLheiGPlBGsv2A==} '@next/eslint-plugin-next@15.3.4': resolution: {integrity: sha512-lBxYdj7TI8phbJcLSAqDt57nIcobEign5NYIKCiy0hXQhrUbTqLqOaSDi568U6vFg4hJfBdZYsG4iP/uKhCqgg==} - '@next/eslint-plugin-next@15.4.1': - resolution: {integrity: sha512-lQnHUxN7mMksK7IxgKDIXNMWFOBmksVrjamMEURXiYfo7zgsc30lnU8u4y/MJktSh+nB80ktTQeQbWdQO6c8Ow==} - - '@next/swc-darwin-arm64@15.2.1': - resolution: {integrity: sha512-aWXT+5KEREoy3K5AKtiKwioeblmOvFFjd+F3dVleLvvLiQ/mD//jOOuUcx5hzcO9ISSw4lrqtUPntTpK32uXXQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - - '@next/swc-darwin-arm64@15.2.3': - resolution: {integrity: sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - '@next/swc-darwin-arm64@15.3.4': resolution: {integrity: sha512-z0qIYTONmPRbwHWvpyrFXJd5F9YWLCsw3Sjrzj2ZvMYy9NPQMPZ1NjOJh4ojr4oQzcGYwgJKfidzehaNa1BpEg==} engines: {node: '>= 10'} @@ -3269,16 +2312,10 @@ packages: cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@15.2.1': - resolution: {integrity: sha512-E/w8ervu4fcG5SkLhvn1NE/2POuDCDEy5gFbfhmnYXkyONZR68qbUlJlZwuN82o7BrBVAw+tkR8nTIjGiMW1jQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - - '@next/swc-darwin-x64@15.2.3': - resolution: {integrity: sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw==} + '@next/swc-darwin-arm64@15.5.4': + resolution: {integrity: sha512-nopqz+Ov6uvorej8ndRX6HlxCYWCO3AHLfKK2TYvxoSB2scETOcfm/HSS3piPqc3A+MUgyHoqE6je4wnkjfrOA==} engines: {node: '>= 10'} - cpu: [x64] + cpu: [arm64] os: [darwin] '@next/swc-darwin-x64@15.3.4': @@ -3293,17 +2330,11 @@ packages: cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@15.2.1': - resolution: {integrity: sha512-gXDX5lIboebbjhiMT6kFgu4svQyjoSed6dHyjx5uZsjlvTwOAnZpn13w9XDaIMFFHw7K8CpBK7HfDKw0VZvUXQ==} + '@next/swc-darwin-x64@15.5.4': + resolution: {integrity: sha512-QOTCFq8b09ghfjRJKfb68kU9k2K+2wsC4A67psOiMn849K9ZXgCSRQr0oVHfmKnoqCbEmQWG1f2h1T2vtJJ9mA==} engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@next/swc-linux-arm64-gnu@15.2.3': - resolution: {integrity: sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] + cpu: [x64] + os: [darwin] '@next/swc-linux-arm64-gnu@15.3.4': resolution: {integrity: sha512-l8ZQOCCg7adwmsnFm8m5q9eIPAHdaB2F3cxhufYtVo84pymwKuWfpYTKcUiFcutJdp9xGHC+F1Uq3xnFU1B/7g==} @@ -3317,14 +2348,8 @@ packages: cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@15.2.1': - resolution: {integrity: sha512-3v0pF/adKZkBWfUffmB/ROa+QcNTrnmYG4/SS+r52HPwAK479XcWoES2I+7F7lcbqc7mTeVXrIvb4h6rR/iDKg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@next/swc-linux-arm64-musl@15.2.3': - resolution: {integrity: sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q==} + '@next/swc-linux-arm64-gnu@15.5.4': + resolution: {integrity: sha512-eRD5zkts6jS3VfE/J0Kt1VxdFqTnMc3QgO5lFE5GKN3KDI/uUpSyK3CjQHmfEkYR4wCOl0R0XrsjpxfWEA++XA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -3341,16 +2366,10 @@ packages: cpu: [arm64] os: [linux] - '@next/swc-linux-x64-gnu@15.2.1': - resolution: {integrity: sha512-RbsVq2iB6KFJRZ2cHrU67jLVLKeuOIhnQB05ygu5fCNgg8oTewxweJE8XlLV+Ii6Y6u4EHwETdUiRNXIAfpBww==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@next/swc-linux-x64-gnu@15.2.3': - resolution: {integrity: sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w==} + '@next/swc-linux-arm64-musl@15.5.4': + resolution: {integrity: sha512-TOK7iTxmXFc45UrtKqWdZ1shfxuL4tnVAOuuJK4S88rX3oyVV4ZkLjtMT85wQkfBrOOvU55aLty+MV8xmcJR8A==} engines: {node: '>= 10'} - cpu: [x64] + cpu: [arm64] os: [linux] '@next/swc-linux-x64-gnu@15.3.4': @@ -3365,14 +2384,8 @@ packages: cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@15.2.1': - resolution: {integrity: sha512-QHsMLAyAIu6/fWjHmkN/F78EFPKmhQlyX5C8pRIS2RwVA7z+t9cTb0IaYWC3EHLOTjsU7MNQW+n2xGXr11QPpg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@next/swc-linux-x64-musl@15.2.3': - resolution: {integrity: sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg==} + '@next/swc-linux-x64-gnu@15.5.4': + resolution: {integrity: sha512-7HKolaj+481FSW/5lL0BcTkA4Ueam9SPYWyN/ib/WGAFZf0DGAN8frNpNZYFHtM4ZstrHZS3LY3vrwlIQfsiMA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -3389,17 +2402,11 @@ packages: cpu: [x64] os: [linux] - '@next/swc-win32-arm64-msvc@15.2.1': - resolution: {integrity: sha512-Gk42XZXo1cE89i3hPLa/9KZ8OuupTjkDmhLaMKFohjf9brOeZVEa3BQy1J9s9TWUqPhgAEbwv6B2+ciGfe54Vw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - - '@next/swc-win32-arm64-msvc@15.2.3': - resolution: {integrity: sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q==} + '@next/swc-linux-x64-musl@15.5.4': + resolution: {integrity: sha512-nlQQ6nfgN0nCO/KuyEUwwOdwQIGjOs4WNMjEUtpIQJPR2NUfmGpW2wkJln1d4nJ7oUzd1g4GivH5GoEPBgfsdw==} engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] + cpu: [x64] + os: [linux] '@next/swc-win32-arm64-msvc@15.3.4': resolution: {integrity: sha512-ay5+qADDN3rwRbRpEhTOreOn1OyJIXS60tg9WMYTWCy3fB6rGoyjLVxc4dR9PYjEdR2iDYsaF5h03NA+XuYPQQ==} @@ -3413,16 +2420,10 @@ packages: cpu: [arm64] os: [win32] - '@next/swc-win32-x64-msvc@15.2.1': - resolution: {integrity: sha512-YjqXCl8QGhVlMR8uBftWk0iTmvtntr41PhG1kvzGp0sUP/5ehTM+cwx25hKE54J0CRnHYjSGjSH3gkHEaHIN9g==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - - '@next/swc-win32-x64-msvc@15.2.3': - resolution: {integrity: sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w==} + '@next/swc-win32-arm64-msvc@15.5.4': + resolution: {integrity: sha512-PcR2bN7FlM32XM6eumklmyWLLbu2vs+D7nJX8OAIoWy69Kef8mfiN4e8TUv2KohprwifdpFKPzIP1njuCjD0YA==} engines: {node: '>= 10'} - cpu: [x64] + cpu: [arm64] os: [win32] '@next/swc-win32-x64-msvc@15.3.4': @@ -3437,6 +2438,12 @@ packages: cpu: [x64] os: [win32] + '@next/swc-win32-x64-msvc@15.5.4': + resolution: {integrity: sha512-1ur2tSHZj8Px/KMAthmuI9FMp/YFusMMGoRNJaRZMOlSkgvLjzosSdQI0cJAKogdHl3qXUQKL9MGaYvKwA7DXg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + '@noble/ciphers@0.6.0': resolution: {integrity: sha512-mIbq/R9QXk5/cTfESb1OKtyFnk7oc1Om/8onA1158K9/OZUQFDEVy55jVTato+xmp3XX6F6Qh0zz0Nc1AxAlRQ==} @@ -3468,18 +2475,6 @@ packages: resolution: {integrity: sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==} engines: {node: '>=12.4.0'} - '@npmcli/git@4.1.0': - resolution: {integrity: sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - - '@npmcli/package-json@4.0.1': - resolution: {integrity: sha512-lRCEGdHZomFsURroh522YvA/2cVb9oPIJrjHanCJZkiasz1BzcnLr3tBJhlV7S86MBJBuAQ33is2D60YitZL2Q==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - - '@npmcli/promise-spawn@6.0.2': - resolution: {integrity: sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - '@oozcitak/dom@1.15.10': resolution: {integrity: sha512-0JT29/LaxVgRcGKvHmSrUTEvZ8BXvZhGl2LASRUgHqDTC1M5g1pLmVv56IYNyt3bG2CUjDkc67wnyZC14pbQrQ==} engines: {node: '>=8.0'} @@ -3516,9 +2511,6 @@ packages: '@oxc-project/types@0.82.3': resolution: {integrity: sha512-6nCUxBnGX0c6qfZW5MaF6/fmu5dHJDMiMPaioKHKs5mi5+8/FHQ7WGjgQIz1zxpmceMYfdIXkOaLYE+ejbuOtA==} - '@paralleldrive/cuid2@2.2.2': - resolution: {integrity: sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==} - '@parcel/watcher-android-arm64@2.5.1': resolution: {integrity: sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==} engines: {node: '>= 10.0.0'} @@ -3579,12 +2571,6 @@ packages: cpu: [x64] os: [linux] - '@parcel/watcher-wasm@2.3.0': - resolution: {integrity: sha512-ejBAX8H0ZGsD8lSICDNyMbSEtPMWgDL0WFCt/0z7hyf5v8Imz4rAM8xY379mBsECkq/Wdqa5WEDLqtjZ+6NxfA==} - engines: {node: '>= 10.0.0'} - bundledDependencies: - - napi-wasm - '@parcel/watcher-wasm@2.5.1': resolution: {integrity: sha512-RJxlQQLkaMMIuWRozy+z2vEqbaQlCuaCgVZIUCzQLYggY22LZbP5Y1+ia+FD724Ids9e+XIyOLXLrLgQSHIthw==} engines: {node: '>= 10.0.0'} @@ -3628,14 +2614,6 @@ packages: '@peculiar/asn1-x509@2.4.0': resolution: {integrity: sha512-F7mIZY2Eao2TaoVqigGMLv+NDdpwuBKU1fucHPONfzaBS4JXXCNCmfO0Z3dsy7JzKGqtDcYC1mr9JjaZQZNiuw==} - '@peculiar/json-schema@1.1.12': - resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==} - engines: {node: '>=8.0.0'} - - '@peculiar/webcrypto@1.4.1': - resolution: {integrity: sha512-eK4C6WTNYxoI7JOabMoZICiyqRRtJB220bh0Mbj5RwRycleZf9BPyZoxsTvpP0FpmVS2aS13NKOuh5/tN3sIRw==} - engines: {node: '>=10.12.0'} - '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -3653,9 +2631,6 @@ packages: '@poppinss/exception@1.2.2': resolution: {integrity: sha512-m7bpKCD4QMlFCjA/nKTs23fuvoVFoA83brRKmObCUNmi/9tVu8Ve3w4YQAnJu4q3Tjf5fr685HYIC/IA2zHRSg==} - '@quansync/fs@0.1.5': - resolution: {integrity: sha512-lNS9hL2aS2NZgNW7BBj+6EBl4rOf8l+tQ0eRY6JWCI8jI2kc53gSoqbjojU0OnAWhzoXiOjFyGsHcDGePB3lhA==} - '@radix-ui/number@1.1.1': resolution: {integrity: sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==} @@ -3691,8 +2666,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-avatar@1.1.10': - resolution: {integrity: sha512-V8piFfWapM5OmNCXTzVQY+E1rDa53zY+MQ4Y7356v4fFz6vqCyUtIz2rUD44ZEdwg78/jKmMJHj07+C/Z/rcog==} + '@radix-ui/react-checkbox@1.3.3': + resolution: {integrity: sha512-wBbpv+NQftHDdG86Qc0pIyXk5IR3tM8Vd0nWLKDcX8nNn4nXFOFwsKuqw2okA/1D/mpaAkmuyndrPJTYDNZtFw==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4105,19 +3080,6 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-tooltip@1.2.8': - resolution: {integrity: sha512-tY7sVt1yL9ozIxvmbtN5qtmH2krXcBCfjEiCgKGLqunJHvgvZG2Pcl2oQ3kbcZARb1BGEHdkLzcYGO8ynVlieg==} - peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - '@types/react': - optional: true - '@types/react-dom': - optional: true - '@radix-ui/react-use-callback-ref@1.1.1': resolution: {integrity: sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==} peerDependencies: @@ -4154,15 +3116,6 @@ packages: '@types/react': optional: true - '@radix-ui/react-use-is-hydrated@0.1.0': - resolution: {integrity: sha512-U+UORVEq+cTnRIaostJv9AGdV3G6Y+zbVd+12e18jQ5A3c0xL03IhnHuiU4UV69wolOQp5GfR58NW/EgdQhwOA==} - peerDependencies: - '@types/react': '*' - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - '@types/react': - optional: true - '@radix-ui/react-use-layout-effect@1.1.1': resolution: {integrity: sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==} peerDependencies: @@ -4205,61 +3158,15 @@ packages: '@types/react': '*' '@types/react-dom': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - '@types/react': - optional: true - '@types/react-dom': - optional: true - - '@radix-ui/rect@1.1.1': - resolution: {integrity: sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==} - - '@react-router/dev@7.8.2': - resolution: {integrity: sha512-9ilgQoNhvgvUyQKDapALt9qVO3GpSw9ng5X2BwIhLIwqh8CTyRM/jz5cK53p5yzGiVeyx9njXXfeuxUlvQgJuA==} - engines: {node: '>=20.0.0'} - hasBin: true - peerDependencies: - '@react-router/serve': ^7.8.2 - react-router: ^7.8.2 - typescript: ^5.1.0 - vite: ^5.1.0 || ^6.0.0 || ^7.0.0 - wrangler: ^3.28.2 || ^4.0.0 - peerDependenciesMeta: - '@react-router/serve': - optional: true - typescript: - optional: true - wrangler: - optional: true - - '@react-router/express@7.8.2': - resolution: {integrity: sha512-AJUNsE5Q+vD8TsNlKTw2MGUUnp/QJGlRV1jG2ItV30lwIx2wE7d4NHx/jWkGZIEblHQBTpodcp6MFirZXbisJw==} - engines: {node: '>=20.0.0'} - peerDependencies: - express: ^4.17.1 || ^5 - react-router: 7.8.2 - typescript: ^5.1.0 - peerDependenciesMeta: - typescript: - optional: true - - '@react-router/node@7.8.2': - resolution: {integrity: sha512-FNepNg4Aya6V0ZxD/+uObtqxtMXcsBGa0ax9PznUh5qr8g4M6Xo9IN+soLb1tghz6iS/F9djFyhJ/lDkF77dEw==} - engines: {node: '>=20.0.0'} - peerDependencies: - react-router: 7.8.2 - typescript: ^5.1.0 + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: - typescript: + '@types/react': + optional: true + '@types/react-dom': optional: true - '@react-router/serve@7.8.2': - resolution: {integrity: sha512-1AwKjBWmyWWA7dGCRjn2glWwO6cA7dDX7roP1tosFi5cu1EvqHaqelRH6K6MZSV10Tv6oPtFG7rgV+rCafJvyw==} - engines: {node: '>=20.0.0'} - hasBin: true - peerDependencies: - react-router: 7.8.2 + '@radix-ui/rect@1.1.1': + resolution: {integrity: sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==} '@remix-run/node@2.17.0': resolution: {integrity: sha512-ISy3N4peKB+Fo8ddh+mU6ki3HzQqLXwJxUrAtqxYxrBDM4Pwc7EvISrcQ4QasB6ORBknJeEZSBu69WDRhGzrjA==} @@ -4369,9 +3276,6 @@ packages: cpu: [x64] os: [win32] - '@rolldown/pluginutils@1.0.0-beta.27': - resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==} - '@rolldown/pluginutils@1.0.0-beta.30': resolution: {integrity: sha512-whXaSoNUFiyDAjkUF8OBpOm77Szdbk5lGNqFe6CbVbJFrhCCPinCbRA3NjawwlNHla1No7xvXXh+CpSxnPfUEw==} @@ -4656,9 +3560,6 @@ packages: '@rushstack/eslint-patch@1.12.0': resolution: {integrity: sha512-5EwMtOqvJMMa3HbmxLlF74e+3/HhwBTMcvt3nqVJgGCozO6hzIPOBlwm8mGVNR9SN2IJpxSnlxczyDjcn7qIyw==} - '@schummar/icu-type-parser@1.21.5': - resolution: {integrity: sha512-bXHSaW5jRTmke9Vd0h5P7BtWZG9Znqb8gSDxZnxaGSJnGwPLDPfS+3g0BKzeWqzgZPsIVZkM7m2tbo18cm5HBw==} - '@shikijs/core@3.9.2': resolution: {integrity: sha512-3q/mzmw09B2B6PgFNeiaN8pkNOixWS726IHmJEpjDAcneDPMQmUg2cweT9cWXY4XcyQS3i6mOOUgQz9RRUP6HA==} @@ -4730,35 +3631,37 @@ packages: '@standard-schema/spec@1.0.0': resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==} - '@standard-schema/utils@0.3.0': - resolution: {integrity: sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==} + '@supabase/auth-js@2.75.0': + resolution: {integrity: sha512-J8TkeqCOMCV4KwGKVoxmEBuDdHRwoInML2vJilthOo7awVCro2SM+tOcpljORwuBQ1vHUtV62Leit+5wlxrNtw==} - '@supabase/auth-js@2.71.1': - resolution: {integrity: sha512-mMIQHBRc+SKpZFRB2qtupuzulaUhFYupNyxqDj5Jp/LyPvcWvjaJzZzObv6URtL/O6lPxkanASnotGtNpS3H2Q==} - - '@supabase/functions-js@2.4.5': - resolution: {integrity: sha512-v5GSqb9zbosquTo6gBwIiq7W9eQ7rE5QazsK/ezNiQXdCbY+bH8D9qEaBIkhVvX4ZRW5rP03gEfw5yw9tiq4EQ==} + '@supabase/functions-js@2.75.0': + resolution: {integrity: sha512-18yk07Moj/xtQ28zkqswxDavXC3vbOwt1hDuYM3/7xPnwwpKnsmPyZ7bQ5th4uqiJzQ135t74La9tuaxBR6e7w==} '@supabase/node-fetch@2.6.15': resolution: {integrity: sha512-1ibVeYUacxWYi9i0cf5efil6adJ9WRyZBLivgjs+AUpewx1F3xPi7gLgaASI2SmIQxPoCEjAsLAzKPgMJVgOUQ==} engines: {node: 4.x || >=6.0.0} - '@supabase/postgrest-js@1.19.4': - resolution: {integrity: sha512-O4soKqKtZIW3olqmbXXbKugUtByD2jPa8kL2m2c1oozAO11uCcGrRhkZL0kVxjBLrXHE0mdSkFsMj7jDSfyNpw==} + '@supabase/postgrest-js@2.75.0': + resolution: {integrity: sha512-YfBz4W/z7eYCFyuvHhfjOTTzRrQIvsMG2bVwJAKEVVUqGdzqfvyidXssLBG0Fqlql1zJFgtsPpK1n4meHrI7tg==} - '@supabase/realtime-js@2.15.1': - resolution: {integrity: sha512-edRFa2IrQw50kNntvUyS38hsL7t2d/psah6om6aNTLLcWem0R6bOUq7sk7DsGeSlNfuwEwWn57FdYSva6VddYw==} + '@supabase/realtime-js@2.75.0': + resolution: {integrity: sha512-B4Xxsf2NHd5cEnM6MGswOSPSsZKljkYXpvzKKmNxoUmNQOfB7D8HOa6NwHcUBSlxcjV+vIrYKcYXtavGJqeGrw==} '@supabase/ssr@0.6.1': resolution: {integrity: sha512-QtQgEMvaDzr77Mk3vZ3jWg2/y+D8tExYF7vcJT+wQ8ysuvOeGGjYbZlvj5bHYsj/SpC0bihcisnwPrM4Gp5G4g==} peerDependencies: '@supabase/supabase-js': ^2.43.4 - '@supabase/storage-js@2.11.0': - resolution: {integrity: sha512-Y+kx/wDgd4oasAgoAq0bsbQojwQ+ejIif8uczZ9qufRHWFLMU5cODT+ApHsSrDufqUcVKt+eyxtOXSkeh2v9ww==} + '@supabase/ssr@0.7.0': + resolution: {integrity: sha512-G65t5EhLSJ5c8hTCcXifSL9Q/ZRXvqgXeNo+d3P56f4U1IxwTqjB64UfmfixvmMcjuxnq2yGqEWVJqUcO+AzAg==} + peerDependencies: + '@supabase/supabase-js': ^2.43.4 + + '@supabase/storage-js@2.75.0': + resolution: {integrity: sha512-wpJMYdfFDckDiHQaTpK+Ib14N/O2o0AAWWhguKvmmMurB6Unx17GGmYp5rrrqCTf8S1qq4IfIxTXxS4hzrUySg==} - '@supabase/supabase-js@2.55.0': - resolution: {integrity: sha512-Y1uV4nEMjQV1x83DGn7+Z9LOisVVRlY1geSARrUHbXWgbyKLZ6/08dvc0Us1r6AJ4tcKpwpCZWG9yDQYo1JgHg==} + '@supabase/supabase-js@2.75.0': + resolution: {integrity: sha512-8UN/vATSgS2JFuJlMVr51L3eUDz+j1m7Ww63wlvHLKULzCDaVWYzvacCjBTLW/lX/vedI2LBI4Vg+01G9ufsJQ==} '@swc/core-darwin-arm64@1.13.5': resolution: {integrity: sha512-lKNv7SujeXvKn16gvQqUQI5DdyY8v7xcoO3k06/FJbHJS90zEwZdQiMNRiqpYw/orU543tPaWgz7cIYWhbopiQ==} @@ -5024,11 +3927,6 @@ packages: '@tailwindcss/postcss@4.1.12': resolution: {integrity: sha512-5PpLYhCAwf9SJEeIsSmCDLgyVfdBhdBpzX1OJ87anT9IVR0Z9pjM0FNixCAUAHGnMBGB8K99SwAheXrT0Kh6QQ==} - '@tailwindcss/vite@4.1.12': - resolution: {integrity: sha512-4pt0AMFDx7gzIrAOIYgYP0KCBuKWqyW8ayrdiLEjoJTT4pKTjrzG/e4uzWtTLDziC+66R9wbUqZBccJalSE5vQ==} - peerDependencies: - vite: ^5.2.0 || ^6 || ^7 - '@tanstack/directive-functions-plugin@1.131.2': resolution: {integrity: sha512-5Pz6aVPS0BW+0bLvMzWsoajfjI6ZeWqkbVBaQfIbSTm4DOBO05JuQ/pb7W7m3GbCb5TK1a/SKDhuTX6Ag5I7UQ==} engines: {node: '>=12'} @@ -5047,14 +3945,6 @@ packages: peerDependencies: react: ^18 || ^19 - '@tanstack/react-router-devtools@1.131.28': - resolution: {integrity: sha512-2EOxuvc2k7vT14XVEGJRuqEZhQkZ7RnHwpw2aGY6m/7xprl2elNwKtLExTntirAxE6HDokg8sRAnqvySHf1OVA==} - engines: {node: '>=12'} - peerDependencies: - '@tanstack/react-router': ^1.131.28 - react: '>=18.0.0 || >=19.0.0' - react-dom: '>=18.0.0 || >=19.0.0' - '@tanstack/react-router@1.131.8': resolution: {integrity: sha512-FbfUB8p42N3PmwGN2NpFx+f59pKmhu1B1QOcmyF3IlbC3y6R0jZofx1FbnmWFLz8cUHVmIP52L0s5DUj3Bj6fQ==} engines: {node: '>=12'} @@ -5102,18 +3992,6 @@ packages: resolution: {integrity: sha512-NpFfAG1muv4abrCij6sEtRrVzlU+xYpY30NAgquHNhMMMNIiN7djzsaGV+vCJdR4u5mi13+f0c3f+f9MdekY5A==} engines: {node: '>=12'} - '@tanstack/router-devtools-core@1.131.28': - resolution: {integrity: sha512-CPj8wv/00sfHm5tjUCJ44A5tWBYvui5PVstkNfEyNW/Cmo6aknMk4SHiWIa/khCbj5HGjVMWSBRn6XZixEdOxw==} - engines: {node: '>=12'} - peerDependencies: - '@tanstack/router-core': ^1.131.28 - csstype: ^3.0.10 - solid-js: '>=1.9.5' - tiny-invariant: ^1.3.3 - peerDependenciesMeta: - csstype: - optional: true - '@tanstack/router-generator@1.131.7': resolution: {integrity: sha512-djwY5O1LdJo300EOZiYog5RsjB1DYzFtgX6a3uOkAmii7LHX9k9mhFXx2KrI4dLHLQsnlKexV9QvU6cSTFmsag==} engines: {node: '>=12'} @@ -5209,9 +4087,6 @@ packages: '@tybys/wasm-util@0.10.0': resolution: {integrity: sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==} - '@types/accepts@1.3.7': - resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==} - '@types/babel__code-frame@7.0.6': resolution: {integrity: sha512-Anitqkl3+KrzcW2k77lRlg/GfLZLWXBuNgbEcIOU6M92yw42vsd3xV/Z/yAHEj8m+KUjL6bWOVOFqX8PFPJ4LA==} @@ -5233,9 +4108,6 @@ packages: '@types/body-parser@1.19.6': resolution: {integrity: sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==} - '@types/braces@3.0.5': - resolution: {integrity: sha512-SQFof9H+LXeWNz8wDe7oN5zu7ket0qwMu5vZubW4GCJ8Kkeh6nBWUz87+KTz/G3Kqsrp0j/W253XJb3KMEeg3w==} - '@types/bun@1.2.22': resolution: {integrity: sha512-5A/KrKos2ZcN0c6ljRSOa1fYIyCKhZfIVYeuyb4snnvomnpFqC0tTsEkdqNxbAgExV384OETQ//WAjl3XbYqQA==} @@ -5248,24 +4120,9 @@ packages: '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} - '@types/content-disposition@0.5.9': - resolution: {integrity: sha512-8uYXI3Gw35MhiVYhG3s295oihrxRyytcRHjSjqnqZVDDy/xcGBRny7+Xj1Wgfhv5QzRtN2hB2dVRBUX9XW3UcQ==} - - '@types/cookie@0.5.4': - resolution: {integrity: sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA==} - '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - '@types/cookiejar@2.1.5': - resolution: {integrity: sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==} - - '@types/cookies@0.7.7': - resolution: {integrity: sha512-h7BcvPUogWbKCzBR2lY4oqaZbO3jXZksexYJVFvkrFeLgbZjQkU4x8pRq6eg2MHXQhY0McQdqmmsxRWlVAHooA==} - - '@types/cors@2.8.19': - resolution: {integrity: sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==} - '@types/d3-array@3.2.1': resolution: {integrity: sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==} @@ -5314,18 +4171,9 @@ packages: '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} - '@types/express-serve-static-core@4.19.6': - resolution: {integrity: sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==} - '@types/express-serve-static-core@5.0.7': resolution: {integrity: sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ==} - '@types/express@4.17.14': - resolution: {integrity: sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==} - - '@types/express@4.17.23': - resolution: {integrity: sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==} - '@types/express@5.0.3': resolution: {integrity: sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==} @@ -5338,9 +4186,6 @@ packages: '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/http-assert@1.5.6': - resolution: {integrity: sha512-TTEwmtjgVbYAzZYWyeHPrrtWnfVkm8tQkP8P21uQifPgMRgjrow3XDEYqucuC8SKZJT7pUnhU/JymvjggxO9vw==} - '@types/http-errors@2.0.5': resolution: {integrity: sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==} @@ -5362,48 +4207,21 @@ packages: '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/keygrip@1.0.6': - resolution: {integrity: sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==} - - '@types/koa-compose@3.2.8': - resolution: {integrity: sha512-4Olc63RY+MKvxMwVknCUDhRQX1pFQoBZ/lXcRLP69PQkEpze/0cr8LNqJQe5NFb/b19DWi2a5bTi2VAlQzhJuA==} - - '@types/koa@2.15.0': - resolution: {integrity: sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g==} - '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} '@types/mdx@2.0.13': resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} - '@types/methods@1.1.4': - resolution: {integrity: sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==} - - '@types/micromatch@4.0.9': - resolution: {integrity: sha512-7V+8ncr22h4UoYRLnLXSpTxjQrNUXtWHGeMPRJt1nULXI57G9bIcpyrHlmrQ7QK24EyyuXvYcSSWAM8GA9nqCg==} - '@types/mime@1.3.5': resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} '@types/minimist@1.2.5': resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/morgan@1.9.10': - resolution: {integrity: sha512-sS4A1zheMvsADRVfT0lYbJ4S9lmsey8Zo2F7cnbYjWHP67Q0AwMYuuzLlkIM2N8gAbb9cubhIVFwcIN2XyYCkA==} - '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node-fetch@2.6.2': - resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} - - '@types/node@16.18.6': - resolution: {integrity: sha512-vmYJF0REqDyyU0gviezF/KHq/fYaUbFhkcNbQCuPGFQj6VTbXuHZoxs/Y7mutWe73C8AC6l9fFu8mSYiBAqkGA==} - - '@types/node@17.0.45': - resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@types/node@18.17.0': resolution: {integrity: sha512-GXZxEtOxYGFchyUzxvKI14iff9KZ2DI+A6a37o6EQevtg6uO9t+aUZKcaC1Te5Ng1OnLM7K9NVVj+FbecD9cJg==} @@ -5486,12 +4304,6 @@ packages: '@types/statuses@2.0.6': resolution: {integrity: sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==} - '@types/superagent@8.1.9': - resolution: {integrity: sha512-pTVjI73witn+9ILmoJdajHGW2jkSaOzhiFYF1Rd3EQ94kymLqB9PjD9ISg7WaALC7+dCHT0FGe9T2LktLq/3GQ==} - - '@types/supertest@6.0.3': - resolution: {integrity: sha512-8WzXq62EXFhJ7QsH3Ocb/iKQ/Ty9ZVWnVzoTKc9tyyFRRF3a74Tk2+TLFgaFFw364Ere+npzHKEJ6ga2LzIL7w==} - '@types/tough-cookie@4.0.5': resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} @@ -5543,14 +4355,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/eslint-plugin@8.41.0': - resolution: {integrity: sha512-8fz6oa6wEKZrhXWro/S3n2eRJqlRcIa6SlDh59FXJ5Wp5XRZ8B9ixpJDcjadHq47hMx0u+HW6SNa6LjJQ6NLtw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/parser': ^8.41.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/parser@7.18.0': resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -5575,13 +4379,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/parser@8.41.0': - resolution: {integrity: sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.34.1': resolution: {integrity: sha512-nuHlOmFZfuRwLJKDGQOVc0xnQrAmuq1Mj/ISou5044y1ajGNp2BNliIqp7F2LPQ5sForz8lempMFCovfeS1XoA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5606,10 +4403,6 @@ packages: resolution: {integrity: sha512-beu6o6QY4hJAgL1E8RaXNC071G4Kso2MGmJskCFQhRhg8VOH/FDbC8soP8NHN7e/Hdphwp8G8cE6OBzC8o41ZA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.41.0': - resolution: {integrity: sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.34.1': resolution: {integrity: sha512-K4Sjdo4/xF9NEeA2khOb7Y5nY6NSXBnod87uniVYW9kHP+hNlDV8trUSFeynA2uxWam4gIWgWoygPrv9VMWrYg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5652,13 +4445,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/type-utils@8.41.0': - resolution: {integrity: sha512-63qt1h91vg3KsjVVonFJWjgSK7pZHSQFKH6uwqxAH9bBrsyRhO6ONoKyXxyVBzG1lJnFAJcKAcxLS54N1ee1OQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/types@7.18.0': resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} engines: {node: ^18.18.0 || >=20.0.0} @@ -5722,13 +4508,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@8.41.0': - resolution: {integrity: sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/visitor-keys@7.18.0': resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -5858,29 +4637,12 @@ packages: engines: {node: '>=18'} hasBin: true - '@vinxi/listhen@1.5.6': - resolution: {integrity: sha512-WSN1z931BtasZJlgPp704zJFnQFRg7yzSjkm3MzAWQYe4uXFXlFr1hc5Ac2zae5/HDOz5x1/zDM5Cb54vTCnWw==} - hasBin: true - - '@vitejs/plugin-react@4.7.0': - resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 - '@vitejs/plugin-react@5.0.0': resolution: {integrity: sha512-Jx9JfsTa05bYkS9xo0hkofp2dCmp1blrKjw9JONs5BTHOvJCgLbaPSuZLGSVJW6u2qe0tc4eevY0+gSNNi0YCw==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 - '@vitejs/plugin-rsc@0.4.11': - resolution: {integrity: sha512-+4H4wLi+Y9yF58znBfKgGfX8zcqUGt8ngnmNgzrdGdF1SVz7EO0sg7WnhK5fFVHt6fUxsVEjmEabsCWHKPL1Tw==} - peerDependencies: - react: '*' - react-dom: '*' - vite: '*' - '@vitest/expect@3.2.4': resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==} @@ -5993,25 +4755,6 @@ packages: resolution: {integrity: sha512-ueFCcIPaMgtuYDS9u0qlUoEvj6GiSsKrwnOLPp9SshqjtcRaR1IEHRjoReq3sXNydsF5i0ZnmuYgXq9dV53t0g==} engines: {node: '>=18.0.0'} - '@workos-inc/authkit-js@0.13.0': - resolution: {integrity: sha512-iA0Dt7D1BmY2/1s4oeA36W/aRt8/b5iyH6rP4AlgnjrcH2lUGkBgDXL76NXc0M7repkDQTMcJJ2NhCSo2rcWmg==} - - '@workos-inc/authkit-nextjs@2.5.0': - resolution: {integrity: sha512-lXECydEgEV8C6K6qAXnparMhOrlET7rB7br0BWwKq47XHrIufkWS7VdXVLofQYBAf/I/688owKp8WJ1HLku3IA==} - peerDependencies: - next: ^13.5.9 || ^14.2.26 || ^15.2.3 - react: ^18.0 || ^19.0.0 - react-dom: ^18.0 || ^19.0.0 - - '@workos-inc/authkit-react@0.11.0': - resolution: {integrity: sha512-67HFSxP4wXC8ECGyvc1yGMwuD5NGkwT2OPt8DavHoKAlO+hRaAlu9wwzqUx1EJrHht0Dcx+l20Byq8Ab0bEhlg==} - peerDependencies: - react: '>=17' - - '@workos-inc/node@7.69.1': - resolution: {integrity: sha512-ml2TqUHjUVkubq4EnIIM1O1g+eR0ctKnpdHUJntG/1PuVt64CfntJrAUi/5ePgR4d12EeXunHyjOTK75k+f9Ww==} - engines: {node: '>=16'} - '@xtuc/ieee754@1.2.0': resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} @@ -6032,10 +4775,6 @@ packages: abstract-logging@2.0.1: resolution: {integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==} - accepts@1.3.8: - resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} - engines: {node: '>= 0.6'} - accepts@2.0.0: resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} engines: {node: '>= 0.6'} @@ -6104,9 +4843,6 @@ packages: ajv@8.17.1: resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} - ansi-align@3.0.1: - resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} - ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -6190,9 +4926,6 @@ packages: resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==} engines: {node: '>=0.10.0'} - array-flatten@1.1.1: - resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} - array-includes@3.1.9: resolution: {integrity: sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==} engines: {node: '>= 0.4'} @@ -6237,9 +4970,6 @@ packages: resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==} engines: {node: '>=12'} - asap@2.0.6: - resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} - asn1js@3.0.6: resolution: {integrity: sha512-UOCGPYbl0tv8+006qks/dTgV9ajs97X2p0FAbyS2iyCRrmLSRolDaHdp+v/CLgnzHc3fVB+CwYiUmei7ndFcgA==} engines: {node: '>=12.0.0'} @@ -6248,10 +4978,6 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - ast-kit@2.1.2: - resolution: {integrity: sha512-cl76xfBQM6pztbrFWRnxbrDm9EOqDr1BF6+qQnnDZG2Co2LjyUktkN9GTJfBAfdae+DbT2nJf2nCGAdDDN7W2g==} - engines: {node: '>=20.18.0'} - ast-module-types@6.0.1: resolution: {integrity: sha512-WHw67kLXYbZuHTmcdbIrVArCq5wxo6NEuj3hiYAWr8mwJeC+C2mMCIBIWCiDoCye/OF/xelc+teJ1ERoWmnEIA==} engines: {node: '>=18'} @@ -6394,10 +5120,6 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - basic-auth@2.0.1: - resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} - engines: {node: '>= 0.8'} - bcp-47-match@2.0.3: resolution: {integrity: sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==} @@ -6430,17 +5152,6 @@ packages: vue: optional: true - better-auth@1.3.4: - resolution: {integrity: sha512-JbZYam6Cs3Eu5CSoMK120zSshfaKvrCftSo/+v7524H1RvhryQ7UtMbzagBcXj0Digjj8hZtVkkR4tTZD/wK2g==} - peerDependencies: - react: ^18.0.0 || ^19.0.0 - react-dom: ^18.0.0 || ^19.0.0 - peerDependenciesMeta: - react: - optional: true - react-dom: - optional: true - better-auth@1.3.7: resolution: {integrity: sha512-/1fEyx2SGgJQM5ujozDCh9eJksnVkNU/J7Fk/tG5Y390l8nKbrPvqiFlCjlMM+scR+UABJbQzA6An7HT50LHyQ==} peerDependencies: @@ -6453,9 +5164,6 @@ packages: react-dom: optional: true - better-call@1.0.13: - resolution: {integrity: sha512-auqdP9lnNOli9tKpZIiv0nEIwmmyaD/RotM3Mucql+Ef88etoZi/t7Ph5LjlmZt/hiSahhNTt6YVnx6++rziXA==} - better-call@1.0.19: resolution: {integrity: sha512-sI3GcA1SCVa3H+CDHl8W8qzhlrckwXOTKhqq3OOPXjgn5aTOMIqGY34zLY/pHA6tRRMjTUC3lz5Mi7EbDA24Kw==} @@ -6470,9 +5178,6 @@ packages: bindings@1.5.0: resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - birpc@2.5.0: - resolution: {integrity: sha512-VSWO/W6nNQdyP520F1mhf+Lc2f8pjGQOtoHHm7Ze8Go1kX7akpVIrtTa0fn+HB0QJEDVacl6aO08YE0PgXfdnQ==} - bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} @@ -6482,10 +5187,6 @@ packages: blueimp-md5@2.19.0: resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} - body-parser@1.20.3: - resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - body-parser@2.2.0: resolution: {integrity: sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==} engines: {node: '>=18'} @@ -6493,10 +5194,6 @@ packages: boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - boxen@7.1.1: - resolution: {integrity: sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==} - engines: {node: '>=14.16'} - brace-expansion@1.1.12: resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} @@ -6614,10 +5311,6 @@ packages: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} - camelcase-keys@6.2.2: - resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} - engines: {node: '>=8'} - camelcase-keys@8.0.2: resolution: {integrity: sha512-qMKdlOfsjlezMqxkUGGMaWWs17i2HoL15tM+wtx8ld4nLrUwU58TFdvyGOz/piNP842KeO8yXvggVQSdQ828NA==} engines: {node: '>=14.16'} @@ -6651,10 +5344,6 @@ packages: resolution: {integrity: sha512-48af6xm9gQK8rhIcOxWwdGzIervm8BVTin+yRp9HEvU20BtVZ2lBywlIJBzwaDtvo0FvjeL7QdCADoUoqIbV3A==} engines: {node: '>=18'} - chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -6890,31 +5579,16 @@ packages: common-path-prefix@3.0.0: resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} - common-tags@1.8.2: - resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} - engines: {node: '>=4.0.0'} - commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} compatx@0.2.0: resolution: {integrity: sha512-6gLRNt4ygsi5NyMVhceOCFv14CIdDFN7fQjX1U4+47qVE/+kjPoXMK65KWK+dWxmFzMTuKazoQ9sch6pM0p5oA==} - component-emitter@1.3.1: - resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} - compress-commons@6.0.2: resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} engines: {node: '>= 14'} - compressible@2.0.18: - resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} - engines: {node: '>= 0.6'} - - compression@1.8.1: - resolution: {integrity: sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==} - engines: {node: '>= 0.8.0'} - compute-scroll-into-view@3.1.1: resolution: {integrity: sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw==} @@ -6943,10 +5617,6 @@ packages: resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} engines: {node: ^14.18.0 || >=16.10.0} - content-disposition@0.5.4: - resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} - engines: {node: '>= 0.6'} - content-disposition@1.0.0: resolution: {integrity: sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==} engines: {node: '>= 0.6'} @@ -7021,27 +5691,32 @@ packages: react: optional: true + convex@1.27.5: + resolution: {integrity: sha512-6YU/AVPnoNdAaJABKBI9c5IqRSKsow/c4yo/ntaOWtd8Dff2P2zaImA/ougICfPgTuTvjKRbgkxk6lJhODzb4g==} + engines: {node: '>=18.0.0', npm: '>=7.0.0'} + hasBin: true + peerDependencies: + '@auth0/auth0-react': ^2.0.1 + '@clerk/clerk-react': ^4.12.8 || ^5.0.0 + react: ^18.0.0 || ^19.0.0-0 || ^19.0.0 + peerDependenciesMeta: + '@auth0/auth0-react': + optional: true + '@clerk/clerk-react': + optional: true + react: + optional: true + cookie-es@1.2.2: resolution: {integrity: sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==} cookie-es@2.0.0: resolution: {integrity: sha512-RAj4E421UYRgqokKUmotqAwuplYw15qtdXfY+hGzgCJ/MBjCVZcSoHK/kH9kocfjRjcDME7IiDWR/1WX1TM2Pg==} - cookie-signature@1.0.6: - resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} - cookie-signature@1.2.2: resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} engines: {node: '>=6.6.0'} - cookie@0.5.0: - resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} - engines: {node: '>= 0.6'} - - cookie@0.7.1: - resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} - engines: {node: '>= 0.6'} - cookie@0.7.2: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} @@ -7050,9 +5725,6 @@ packages: resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} engines: {node: '>=18'} - cookiejar@2.1.4: - resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} - copy-file@11.1.0: resolution: {integrity: sha512-X8XDzyvYaA6msMyAM575CUoygY5b44QzLcGRKsK3MFmXcOvQa518dNPLsKYwkYsn72g3EiW+LE0ytd/FlqWmyw==} engines: {node: '>=18'} @@ -7077,9 +5749,6 @@ packages: typescript: optional: true - country-flag-icons@1.5.19: - resolution: {integrity: sha512-D/ZkRyj+ywJC6b2IrAN3/tpbReMUqmuRLlcKFoY/o0+EPQN9Ev/e8tV+D3+9scvu/tarxwLErNwS73C3yzxs/g==} - crc-32@1.2.2: resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} engines: {node: '>=0.8'} @@ -7105,10 +5774,6 @@ packages: resolution: {integrity: sha512-p9nwwR4qyT5W996vBZhdvBCnMhicY5ytZkR4D1Xj0wuTDEiMnjwR57Q3RXYY/s0EpX6Ay3vgIcfaR+ewGHsi+g==} engines: {node: '>=18.0'} - cross-spawn@6.0.6: - resolution: {integrity: sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==} - engines: {node: '>=4.8'} - cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -7131,9 +5796,6 @@ packages: engines: {node: '>=4'} hasBin: true - csstype@3.1.1: - resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} - csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} @@ -7212,9 +5874,6 @@ packages: resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} engines: {node: '>=6'} - dax-sh@0.39.2: - resolution: {integrity: sha512-gpuGEkBQM+5y6p4cWaw9+ePy5TNon+fdwFVtTI8leU3UhwhsBfPewRxMXGuQNC+M2b/MDGMlfgpqynkcd0C3FQ==} - db0@0.3.2: resolution: {integrity: sha512-xzWNQ6jk/+NtdfLyXEipbX55dmDSeteLFt/ayF+wZUU5bzKgmrDOxmInUTbyVRp46YwnJdkDA1KhB7WIXFofJw==} peerDependencies: @@ -7238,14 +5897,6 @@ packages: sqlite3: optional: true - debug@2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -7281,9 +5932,6 @@ packages: decimal.js-light@2.5.1: resolution: {integrity: sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==} - decimal.js@10.6.0: - resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} - decode-named-character-reference@1.2.0: resolution: {integrity: sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==} @@ -7314,10 +5962,6 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - deepmerge@4.2.2: - resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} - engines: {node: '>=0.10.0'} - deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} @@ -7371,10 +6015,6 @@ packages: destr@2.0.5: resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} - destroy@1.2.0: - resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - detect-libc@1.0.3: resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} engines: {node: '>=0.10'} @@ -7437,9 +6077,6 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - dezalgo@1.0.4: - resolution: {integrity: sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==} - didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -7494,9 +6131,6 @@ packages: domutils@3.2.2: resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} - dot-case@3.0.4: - resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} - dot-prop@9.0.0: resolution: {integrity: sha512-1gxPBJpI/pcjQhKgIU91II6Wkay+dLcN3M6rf2uwP8hRur3HtQXjVrdAK3sjC0piaEuxzMwjXChcETiJl47lAQ==} engines: {node: '>=18'} @@ -7509,14 +6143,9 @@ packages: resolution: {integrity: sha512-kQhDYKZecqnM0fCnzI5eIv5L4cAe/iRI+HqMbO/hbRdTAeXDG+M9FjipUxNfbARuEg4iHIbhnhs78BCHNbSxEQ==} engines: {node: '>=12'} - dts-resolver@2.1.2: - resolution: {integrity: sha512-xeXHBQkn2ISSXxbJWD828PFjtyg+/UrMDo7W4Ffcs7+YWCquxU8YjV1KoxuiL+eJ5pg3ll+bC6flVv61L3LKZg==} - engines: {node: '>=20.18.0'} - peerDependencies: - oxc-resolver: '>=11.0.0' - peerDependenciesMeta: - oxc-resolver: - optional: true + dotenv@17.2.3: + resolution: {integrity: sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==} + engines: {node: '>=12'} dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} @@ -7537,11 +6166,6 @@ packages: electron-to-chromium@1.5.208: resolution: {integrity: sha512-ozZyibehoe7tOhNaf16lKmljVf+3npZcJIEbJRVftVsmAg5TeA1mGS9dVCZzOwr2xT7xK15V0p7+GZqSPgkuPg==} - elysia-clerk@0.12.1: - resolution: {integrity: sha512-W+/7qZ3RAQaVRHk8I/NoP84XbBlSNnbMRmgriMI2hkoE0MQLnyGMkXZJfGMEMcjG0sXHEeOFBxfLpzfOE7BpGw==} - peerDependencies: - elysia: ^1.2.0 - elysia@1.3.8: resolution: {integrity: sha512-kxYFhegJbUEf5otzmisEvGt3R7d/dPBNVERO2nHo0kFqKBHyj5slArc90mSRKLfi1vamMtPcz67rL6Zeg5F2yg==} peerDependencies: @@ -7572,17 +6196,9 @@ packages: emojilib@2.4.0: resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} - empathic@2.0.0: - resolution: {integrity: sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==} - engines: {node: '>=14'} - enabled@2.0.0: resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} - encodeurl@1.0.2: - resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} - engines: {node: '>= 0.8'} - encodeurl@2.0.0: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} @@ -7625,9 +6241,6 @@ packages: resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} engines: {node: '>=18'} - err-code@2.0.3: - resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} - error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} @@ -7689,11 +6302,6 @@ packages: esbuild: '*' postcss: ^8.0.0 - esbuild@0.20.2: - resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} - engines: {node: '>=12'} - hasBin: true - esbuild@0.25.4: resolution: {integrity: sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==} engines: {node: '>=18'} @@ -7737,20 +6345,6 @@ packages: engines: {node: '>=6.0'} hasBin: true - eslint-config-airbnb-base@15.0.0: - resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==} - engines: {node: ^10.12.0 || >=12.0.0} - peerDependencies: - eslint: ^7.32.0 || ^8.2.0 - eslint-plugin-import: ^2.25.2 - - eslint-config-airbnb-typescript@18.0.0: - resolution: {integrity: sha512-oc+Lxzgzsu8FQyFVa4QFaVKiitTYiiW3frB9KYW5OWdPrqFc7FzxgB20hP4cHMlr+MBzGcLl3jnCOVOydL9mIg==} - peerDependencies: - '@typescript-eslint/eslint-plugin': ^7.0.0 - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 - eslint-config-next@15.1.4: resolution: {integrity: sha512-u9+7lFmfhKNgGjhQ9tBeyCFsPJyq0SvGioMJBngPC7HXUpR0U+ckEwQR48s7TrRNHra1REm6evGL2ie38agALg==} peerDependencies: @@ -7760,17 +6354,8 @@ packages: typescript: optional: true - eslint-config-next@15.2.1: - resolution: {integrity: sha512-mhsprz7l0no8X+PdDnVHF4dZKu9YBJp2Rf6ztWbXBLJ4h6gxmW//owbbGJMBVUU+PibGJDAqZhW4pt8SC8HSow==} - peerDependencies: - eslint: ^7.23.0 || ^8.0.0 || ^9.0.0 - typescript: '>=3.3.1' - peerDependenciesMeta: - typescript: - optional: true - - eslint-config-next@15.2.3: - resolution: {integrity: sha512-VDQwbajhNMFmrhLWVyUXCqsGPN+zz5G8Ys/QwFubfsxTIrkqdx3N3x3QPW+pERz8bzGPP0IgEm8cNbZcd8PFRQ==} + eslint-config-next@15.3.1: + resolution: {integrity: sha512-GnmyVd9TE/Ihe3RrvcafFhXErErtr2jS0JDeCSp3vWvy86AXwHsRBt0E3MqP/m8ACS1ivcsi5uaqjbhsG18qKw==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 || ^9.0.0 typescript: '>=3.3.1' @@ -7787,15 +6372,6 @@ packages: typescript: optional: true - eslint-config-next@15.4.1: - resolution: {integrity: sha512-XIIN+lq8XuSwXUrcv+0uHMDFGJFPxLAw04/a4muFZYygSvStvVa15nY7kh4Il6yOVJyxdMUyVdQ9ApGedaeupw==} - peerDependencies: - eslint: ^7.23.0 || ^8.0.0 || ^9.0.0 - typescript: '>=3.3.1' - peerDependenciesMeta: - typescript: - optional: true - eslint-config-prettier@8.10.2: resolution: {integrity: sha512-/IGJ6+Dka158JnP5n5YFMOszjDWrXggGz1LaK/guZq9vZTmniaKlHcsscvkAhn9y4U+BU3JuUdYvtAMcv30y4A==} hasBin: true @@ -7945,11 +6521,6 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - eslint-plugin-react-refresh@0.4.20: - resolution: {integrity: sha512-XpbHQ2q5gUF8BGOX4dHe+71qoirYMhApEPZ7sfhF/dNnOF1UXnCMGZf79SFTBO7Bz5YEIT4TMieSlJBWhP9WBA==} - peerDependencies: - eslint: '>=8.40' - eslint-plugin-react@7.37.5: resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==} engines: {node: '>=4'} @@ -8147,10 +6718,6 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - exit-hook@2.2.1: - resolution: {integrity: sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==} - engines: {node: '>=6'} - exit@0.1.2: resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} engines: {node: '>= 0.8.0'} @@ -8173,10 +6740,6 @@ packages: peerDependencies: express: '>= 4.11' - express@4.21.2: - resolution: {integrity: sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==} - engines: {node: '>= 0.10.0'} - express@5.1.0: resolution: {integrity: sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==} engines: {node: '>= 18'} @@ -8232,18 +6795,12 @@ packages: resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==} engines: {node: '>=6'} - fast-safe-stringify@2.1.1: - resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} - fast-sha256@1.3.0: resolution: {integrity: sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==} fast-uri@3.0.6: resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==} - fastify-plugin@5.0.1: - resolution: {integrity: sha512-HCxs+YnRaWzCl+cWRYFnHmeRFyR5GVnJTAaCJQiYzQSDwK9MgJdyAsuL3nh0EWRCYMgQ5MeziymvmAhUHYHDUQ==} - fastify@5.5.0: resolution: {integrity: sha512-ZWSWlzj3K/DcULCnCjEiC2zn2FBPdlZsSA/pnPa/dbUfLvxkD/Nqmb0XXMXLrWkeM4uQPUvjdJpwtXmTfriXqw==} @@ -8306,10 +6863,6 @@ packages: resolution: {integrity: sha512-xdMtCAODmPloU9qtmPcdBV9Kd27NtMse+4ayThxqIHUES5Z2S6bGpap5PpdmNM56ub7y3i1eyr+vJJIIgWGKmA==} engines: {node: '>=18'} - finalhandler@1.3.1: - resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} - engines: {node: '>= 0.8'} - finalhandler@2.1.0: resolution: {integrity: sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==} engines: {node: '>= 0.8'} @@ -8383,10 +6936,6 @@ packages: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} - form-data@3.0.4: - resolution: {integrity: sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ==} - engines: {node: '>= 6'} - form-data@4.0.4: resolution: {integrity: sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==} engines: {node: '>= 6'} @@ -8395,10 +6944,6 @@ packages: resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} engines: {node: '>=12.20.0'} - formidable@3.5.4: - resolution: {integrity: sha512-YikH+7CUTOtP44ZTnUhR7Ic2UASBPOqmaRkRKxRbywPTe5VxF7RRCck4af9wutiZ/QKM5nME9Bie2fFaPz5Gug==} - engines: {node: '>=14.0.0'} - forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -8406,10 +6951,6 @@ packages: fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} - fresh@0.5.2: - resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} - engines: {node: '>= 0.6'} - fresh@2.0.0: resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} engines: {node: '>= 0.8'} @@ -8538,10 +7079,6 @@ packages: get-port-please@3.2.0: resolution: {integrity: sha512-I9QVvBw5U/hw3RmWpYKRumUeaDgxTPd401x364rLmWBJcOQ753eov1eTgzDqRG9bqFIfDc7gfzcQEWrUri3o1A==} - get-port@5.1.1: - resolution: {integrity: sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==} - engines: {node: '>=8'} - get-proto@1.0.1: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} @@ -8623,10 +7160,6 @@ packages: resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} engines: {node: '>=18'} - globals@16.3.0: - resolution: {integrity: sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==} - engines: {node: '>=18'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -8643,19 +7176,11 @@ packages: resolution: {integrity: sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==} engines: {node: '>=18'} - globrex@0.1.2: - resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - gonzales-pe@4.3.0: resolution: {integrity: sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==} engines: {node: '>=0.6.0'} hasBin: true - goober@2.1.16: - resolution: {integrity: sha512-erjk19y1U33+XAMe1VTvIONHYoSqE4iS7BYUZfHaqeohLmnC0FdxEh7rQU+6MZ4OajItzjZFSRtVANrQwNq6/g==} - peerDependencies: - csstype: ^3.0.10 - gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -8762,10 +7287,6 @@ packages: headers-polyfill@4.0.3: resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} - helmet@8.1.0: - resolution: {integrity: sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==} - engines: {node: '>=18.0.0'} - highlight.js@10.7.3: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} @@ -8787,10 +7308,6 @@ packages: resolution: {integrity: sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - hosted-git-info@6.1.3: - resolution: {integrity: sha512-HVJyzUrLIL1c0QmviVh5E8VGyUS7xCFPS6yydaVd1UegW+ibV/CohqTH9MkOLDp5o+rb82DMo77PTuc9F/8GKw==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - hosted-git-info@7.0.2: resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} engines: {node: ^16.14.0 || >=18.0.0} @@ -8808,10 +7325,6 @@ packages: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} - http-proxy@1.18.1: - resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} - engines: {node: '>=8.0.0'} - http-shutdown@1.2.2: resolution: {integrity: sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} @@ -8839,10 +7352,6 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} - iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} - iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -8941,12 +7450,6 @@ packages: inline-style-parser@0.2.4: resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==} - input-otp@1.4.2: - resolution: {integrity: sha512-l3jWwYNvrEa6NTCt7BECfCm48GvwuZzkoeG3gBL2w4CHeOXW3eKFmf9UNYkNfYc3mxMrthMnxjIE07MT0zLBQA==} - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc - inquirer@12.9.1: resolution: {integrity: sha512-G7uXAb9OiLcd+9jmA/7KKrItvFF00kKk/jb6CtG+Tm2zSPWfzzhyJwDhVCy+mBmE32o2zJnB5JnknIIv2Ft+AA==} engines: {node: '>=18'} @@ -8972,9 +7475,6 @@ packages: resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} engines: {node: '>= 0.10'} - intl-messageformat@10.7.16: - resolution: {integrity: sha512-UmdmHUmp5CIKKjSoE10la5yfU+AYJAaiYLsodbjL4lji83JNvgOQUjGaGhGrpFCb0Uh7sl7qfP1IyILa8Z40ug==} - ioredis@5.7.0: resolution: {integrity: sha512-NUcA93i1lukyXU+riqEyPtSEkyFq8tX90uL659J+qpCZ3rEdViB/APC58oAhIh3+bJln2hzdlZbBZsGNrlsR8g==} engines: {node: '>=12.22.0'} @@ -8987,27 +7487,6 @@ packages: resolution: {integrity: sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==} engines: {node: '>= 10'} - iron-session@6.3.1: - resolution: {integrity: sha512-3UJ7y2vk/WomAtEySmPgM6qtYF1cZ3tXuWX5GsVX4PJXAcs5y/sV9HuSfpjKS6HkTL/OhZcTDWJNLZ7w+Erx3A==} - engines: {node: '>=12'} - peerDependencies: - express: '>=4' - koa: '>=2' - next: '>=10' - peerDependenciesMeta: - express: - optional: true - koa: - optional: true - next: - optional: true - - iron-session@8.0.4: - resolution: {integrity: sha512-9ivNnaKOd08osD0lJ3i6If23GFS2LsxyMU8Gf/uBUEgm8/8CC1hrrCHFDpMo3IFbpBgwoo/eairRsaD3c5itxA==} - - iron-webcrypto@0.2.8: - resolution: {integrity: sha512-YPdCvjFMOBjXaYuDj5tiHst5CEk6Xw84Jo8Y2+jzhMceclAnb3+vNPP/CTtb5fO2ZEuXEaO4N+w62Vfko757KA==} - iron-webcrypto@1.2.1: resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==} @@ -9168,10 +7647,6 @@ packages: resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} engines: {node: '>= 0.4'} - is-network-error@1.1.0: - resolution: {integrity: sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==} - engines: {node: '>=16'} - is-node-process@1.2.0: resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==} @@ -9223,9 +7698,6 @@ packages: is-reference@1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} - is-reference@3.0.3: - resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} - is-regex@1.2.1: resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} engines: {node: '>= 0.4'} @@ -9513,9 +7985,6 @@ packages: jose@5.10.0: resolution: {integrity: sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==} - jose@5.6.3: - resolution: {integrity: sha512-1Jh//hEEwMhNYPDDLwXHa2ePWgWiFNNUadVmguAAw2IJ6sj9mNxV5tGXJNqlMkJAybF6Lgw1mISDxTePP/187g==} - jose@6.1.0: resolution: {integrity: sha512-TTQJyoEoKcC1lscpVDCSsVgYzUDg/0Bt3WE//WiTPK6uOCQC2KZS4MpugbMWt/zyjkopgZoXhZuCi00gLudfUA==} @@ -9523,10 +7992,6 @@ packages: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} - js-cookie@3.0.1: - resolution: {integrity: sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==} - engines: {node: '>=12'} - js-cookie@3.0.5: resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} engines: {node: '>=14'} @@ -9553,11 +8018,6 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true - jsesc@3.0.2: - resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} - engines: {node: '>=6'} - hasBin: true - jsesc@3.1.0: resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} engines: {node: '>=6'} @@ -9566,16 +8026,9 @@ packages: json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - json-parse-better-errors@1.0.2: - resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} - json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - json-parse-even-better-errors@3.0.2: - resolution: {integrity: sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - json-parse-even-better-errors@4.0.0: resolution: {integrity: sha512-lR4MXjGNgkJc7tkQ97kb2nuEMnNCyU//XYVH0MKTGcXEiSudQ5MKGKen3C5QubYy0vmq+JGitUg92uuywGEwIA==} engines: {node: ^18.17.0 || >=20.5.0} @@ -9664,9 +8117,6 @@ packages: resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==} engines: {node: '>= 0.6.3'} - leb@1.0.0: - resolution: {integrity: sha512-Y3c3QZfvKWHX60BVOQPhLCvVGmDYWyJEiINE3drOog6KCyN2AOwvuQQzlS3uJg1J85kzpILXIUwRXULWavir+w==} - leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -9761,10 +8211,6 @@ packages: resolution: {integrity: sha512-I8oW2+QL5KJo8zXNWX046M134WchxsXC7SawLPvRQpogCbkyQIaFxPE89A2HiwR7vAK2Dm2ERBAmyjTYGYEpBg==} hasBin: true - load-json-file@4.0.0: - resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} - engines: {node: '>=4'} - load-json-file@7.0.1: resolution: {integrity: sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -9846,9 +8292,6 @@ packages: loupe@3.2.1: resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} - lower-case@2.0.2: - resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} - lowercase-keys@1.0.1: resolution: {integrity: sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==} engines: {node: '>=0.10.0'} @@ -9876,8 +8319,8 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 - lucide-react@0.510.0: - resolution: {integrity: sha512-p8SQRAMVh7NhsAIETokSqDrc5CHnDLbV29mMnzaXx+Vc/hnqQzwI2r0FMWCcoTXnbw2KEjy48xwpGdEL+ck06Q==} + lucide-react@0.511.0: + resolution: {integrity: sha512-VK5a2ydJ7xm8GvBeKLS9mu1pVK6ucef9780JVUjw6bAjJL/QXnd4Y0p7SPeOUMC27YhzNCZvm5d/QX0Tp3rc0w==} peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -9891,11 +8334,6 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 - lucide-react@0.542.0: - resolution: {integrity: sha512-w3hD8/SQB7+lzU2r4VdFyzzOzKnUjTZIF/MQJGSSvni7Llewni4vuViRppfRAa2guOsY5k4jZyxw/i9DQHv+dw==} - peerDependencies: - react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 - luxon@3.7.1: resolution: {integrity: sha512-RkRWjA926cTvz5rAb1BqyWkKbbjzCGchDUIKMCUvNi17j6f6j8uHGDV82Aqcqtzd+icoYpELmG3ksgGiFNNcNg==} engines: {node: '>=12'} @@ -10006,10 +8444,6 @@ packages: mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} - media-typer@0.3.0: - resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} - engines: {node: '>= 0.6'} - media-typer@1.1.0: resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} engines: {node: '>= 0.8'} @@ -10029,9 +8463,6 @@ packages: resolution: {integrity: sha512-Cl0yeeIrko6d94KpUo1M+0X1sB14ikoaqlIGuTH1fW4I+E3+YljL54/hb/BWmVfrV9tTV9zU04+xjw08Fh2WkA==} engines: {node: '>=14.16'} - merge-descriptors@1.0.3: - resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} - merge-descriptors@2.0.0: resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} engines: {node: '>=18'} @@ -10047,10 +8478,6 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - methods@1.1.2: - resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} - engines: {node: '>= 0.6'} - micro-api-client@3.3.0: resolution: {integrity: sha512-y0y6CUB9RLVsy3kfgayU28746QrNMpSm9O/AYGNsBgOkJr/X/Jk0VLGoO8Ude7Bpa8adywzF+MzXNZRFRsNPhg==} @@ -10182,16 +8609,6 @@ packages: resolution: {integrity: sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==} engines: {node: '>= 0.6'} - mime@1.6.0: - resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} - engines: {node: '>=4'} - hasBin: true - - mime@2.6.0: - resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} - engines: {node: '>=4.0.0'} - hasBin: true - mime@3.0.0: resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} engines: {node: '>=10.0.0'} @@ -10269,10 +8686,6 @@ packages: engines: {node: '>=18'} hasBin: true - morgan@1.10.1: - resolution: {integrity: sha512-223dMRJtI/l25dJKWpgij2cMtywuG/WiUKXdvwfbhGKBhy1puASqXwFzmWZ7+K73vUPoR7SS2Qz2cI/g9MKw0A==} - engines: {node: '>= 0.8.0'} - mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -10281,9 +8694,6 @@ packages: resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} engines: {node: '>=10'} - ms@2.0.0: - resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -10332,14 +8742,6 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - negotiator@0.6.3: - resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} - engines: {node: '>= 0.6'} - - negotiator@0.6.4: - resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==} - engines: {node: '>= 0.6'} - negotiator@1.0.0: resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} engines: {node: '>= 0.6'} @@ -10351,45 +8753,14 @@ packages: resolution: {integrity: sha512-Nc3loyVASW59W+8fLDZT1lncpG7llffyZ2o0UQLx/Fr20i7P8oP+lE7+TEcFvXj9IUWU6LjB9P3BH+iFGyp+mg==} engines: {node: ^14.16.0 || >=16.0.0} - next-intl@4.3.5: - resolution: {integrity: sha512-tT3SltfpPOCAQ9kVNr+8t6FUtVf8G0WFlJcVc8zj4WCMfuF8XFk4gZCN/MtjgDgkUISw5aKamOClJB4EsV95WQ==} - peerDependencies: - next: ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0 - typescript: ^5.0.0 - peerDependenciesMeta: - typescript: - optional: true - next-themes@0.4.6: resolution: {integrity: sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==} peerDependencies: react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc - next@15.2.1: - resolution: {integrity: sha512-zxbsdQv3OqWXybK5tMkPCBKyhIz63RstJ+NvlfkaLMc/m5MwXgz2e92k+hSKcyBpyADhMk2C31RIiaDjUZae7g==} - engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} - hasBin: true - peerDependencies: - '@opentelemetry/api': ^1.1.0 - '@playwright/test': ^1.41.2 - babel-plugin-react-compiler: '*' - react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 - react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 - sass: ^1.3.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - '@playwright/test': - optional: true - babel-plugin-react-compiler: - optional: true - sass: - optional: true - - next@15.2.3: - resolution: {integrity: sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w==} + next@15.3.4: + resolution: {integrity: sha512-mHKd50C+mCjam/gcnwqL1T1vPx/XQNFlXqFIVdgQdVAFY9iIQtY0IfaVflEYzKiqjeA7B0cYYMaCrmAYFjs4rA==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} hasBin: true peerDependencies: @@ -10409,13 +8780,13 @@ packages: sass: optional: true - next@15.3.4: - resolution: {integrity: sha512-mHKd50C+mCjam/gcnwqL1T1vPx/XQNFlXqFIVdgQdVAFY9iIQtY0IfaVflEYzKiqjeA7B0cYYMaCrmAYFjs4rA==} + next@15.4.1: + resolution: {integrity: sha512-eNKB1q8C7o9zXF8+jgJs2CzSLIU3T6bQtX6DcTnCq1sIR1CJ0GlSyRs1BubQi3/JgCnr9Vr+rS5mOMI38FFyQw==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 - '@playwright/test': ^1.41.2 + '@playwright/test': ^1.51.1 babel-plugin-react-compiler: '*' react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 @@ -10430,8 +8801,8 @@ packages: sass: optional: true - next@15.4.1: - resolution: {integrity: sha512-eNKB1q8C7o9zXF8+jgJs2CzSLIU3T6bQtX6DcTnCq1sIR1CJ0GlSyRs1BubQi3/JgCnr9Vr+rS5mOMI38FFyQw==} + next@15.5.4: + resolution: {integrity: sha512-xH4Yjhb82sFYQfY3vbkJfgSDgXvBB6a8xPs9i35k6oZJRoQRihZH+4s9Yo2qsWpzBmZ3lPXaJ2KPXLfkvW4LnA==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} hasBin: true peerDependencies: @@ -10451,9 +8822,6 @@ packages: sass: optional: true - nice-try@1.0.5: - resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} - nitropack@2.12.4: resolution: {integrity: sha512-MPmPRJWTeH03f/NmpN4q3iI3Woik4uaaWIoX34W3gMJiW06Vm1te/lPzuu5EXpXOK7Q2m3FymGMPXcExqih96Q==} engines: {node: ^16.11.0 || >=17.0.0} @@ -10464,9 +8832,6 @@ packages: xml2js: optional: true - no-case@3.0.4: - resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - node-abi@3.75.0: resolution: {integrity: sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==} engines: {node: '>=10'} @@ -10483,9 +8848,6 @@ packages: resolution: {integrity: sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw==} engines: {node: '>=18'} - node-fetch-native@1.0.1: - resolution: {integrity: sha512-VzW+TAk2wE4X9maiKMlT+GsPU4OMmR1U9CrHSmd3DFLn2IcZ9VJ6M6BBugGfYUnPCLSYxXdZy17M0BEJyhUTwg==} - node-fetch-native@1.6.7: resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==} @@ -10548,10 +8910,6 @@ packages: resolution: {integrity: sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - normalize-package-data@5.0.0: - resolution: {integrity: sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - normalize-package-data@6.0.2: resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==} engines: {node: ^16.14.0 || >=18.0.0} @@ -10572,45 +8930,24 @@ packages: resolution: {integrity: sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - npm-install-checks@6.3.0: - resolution: {integrity: sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - npm-normalize-package-bin@2.0.0: resolution: {integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - npm-normalize-package-bin@3.0.1: - resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - npm-normalize-package-bin@4.0.0: resolution: {integrity: sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==} engines: {node: ^18.17.0 || >=20.5.0} - npm-package-arg@10.1.0: - resolution: {integrity: sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - npm-packlist@5.1.3: resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} hasBin: true - npm-pick-manifest@8.0.2: - resolution: {integrity: sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - npm-run-all2@7.0.2: resolution: {integrity: sha512-7tXR+r9hzRNOPNTvXegM+QzCuMjzUIIq66VDunL6j60O4RrExx32XUhlrS7UK4VcdGw5/Wxzb3kfNcFix9JKDA==} engines: {node: ^18.17.0 || >=20.5.0, npm: '>= 9'} hasBin: true - npm-run-all@4.1.5: - resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==} - engines: {node: '>= 4'} - hasBin: true - npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -10684,18 +9021,10 @@ packages: resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} engines: {node: '>=14.0.0'} - on-finished@2.3.0: - resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} - engines: {node: '>= 0.8'} - on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} - on-headers@1.1.0: - resolution: {integrity: sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==} - engines: {node: '>= 0.8'} - once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -10832,10 +9161,6 @@ packages: resolution: {integrity: sha512-RmVuCHWsfu0QPNW+mraxh/xjQVw/lhUCUru8Zni3Ctq3AoMhpDTq0OVdKS6iesd6Kqb7viCV3isAL43dciOSog==} engines: {node: '>=14'} - parse-json@4.0.0: - resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} - engines: {node: '>=4'} - parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -10896,10 +9221,6 @@ packages: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} - path-key@2.0.1: - resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} - engines: {node: '>=4'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -10915,9 +9236,6 @@ packages: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} - path-to-regexp@0.1.12: - resolution: {integrity: sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==} - path-to-regexp@6.3.0: resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} @@ -10925,10 +9243,6 @@ packages: resolution: {integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==} engines: {node: '>=16'} - path-type@3.0.0: - resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} - engines: {node: '>=4'} - path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -10953,9 +9267,6 @@ packages: perfect-debounce@1.0.0: resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} - periscopic@4.0.2: - resolution: {integrity: sha512-sqpQDUy8vgB7ycLkendSKS6HnVz1Rneoc3Rc+ZBUCe2pbqlVuCC5vF52l0NJ1aiMg/r1qfYF9/myz8CZeI2rjA==} - pg-cloudflare@1.2.7: resolution: {integrity: sha512-YgCtzMH0ptvZJslLM1ffsY4EuGaU0cx4XSdXLRFae8bPP4dS5xL1tNB3k2o/N64cHJpwU7dxKli/nZ2lUa5fLg==} @@ -11001,11 +9312,6 @@ packages: resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} engines: {node: '>=12'} - pidtree@0.3.1: - resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==} - engines: {node: '>=0.10'} - hasBin: true - pidtree@0.6.0: resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} engines: {node: '>=0.10'} @@ -11015,10 +9321,6 @@ packages: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} - pify@3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - pino-abstract-transport@2.0.0: resolution: {integrity: sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==} @@ -11248,10 +9550,6 @@ packages: resolution: {integrity: sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==} engines: {node: '>=6'} - proc-log@3.0.0: - resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} @@ -11265,18 +9563,6 @@ packages: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} - promise-inflight@1.0.1: - resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} - peerDependencies: - bluebird: '*' - peerDependenciesMeta: - bluebird: - optional: true - - promise-retry@2.0.1: - resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} - engines: {node: '>=10'} - prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} @@ -11329,10 +9615,6 @@ packages: resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==} engines: {node: '>=6.0.0'} - qs@6.13.0: - resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} - engines: {node: '>=0.6'} - qs@6.14.0: resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} engines: {node: '>=0.6'} @@ -11340,9 +9622,6 @@ packages: quansync@0.2.10: resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==} - quansync@0.2.11: - resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} - query-string@9.2.2: resolution: {integrity: sha512-pDSIZJ9sFuOp6VnD+5IkakSVf+rICAuuU88Hcsr6AKL0QtxSIfVuKiVP2oahFI7tk3CRSexwV+Ya6MOoTxzg9g==} engines: {node: '>=18'} @@ -11360,10 +9639,6 @@ packages: quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} - quick-lru@4.0.1: - resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} - engines: {node: '>=8'} - quick-lru@6.1.2: resolution: {integrity: sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==} engines: {node: '>=12'} @@ -11381,10 +9656,6 @@ packages: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} - raw-body@2.5.2: - resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} - engines: {node: '>= 0.8'} - raw-body@3.0.0: resolution: {integrity: sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==} engines: {node: '>= 0.8'} @@ -11401,22 +9672,11 @@ packages: peerDependencies: react: ^18.3.1 - react-dom@19.1.0: - resolution: {integrity: sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==} - peerDependencies: - react: ^19.1.0 - react-dom@19.1.1: resolution: {integrity: sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==} peerDependencies: react: ^19.1.1 - react-hook-form@7.62.0: - resolution: {integrity: sha512-7KWFejc98xqG/F4bAxpL41NB3o1nnvQO1RWZT3TqRZYL8RryQETGfEdVnJN2fy1crCiBLLjkRBVK05j24FxJGA==} - engines: {node: '>=18.0.0'} - peerDependencies: - react: ^16.8.0 || ^17 || ^18 || ^19 - react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -11435,10 +9695,6 @@ packages: peerDependencies: react: ^19.1.0 - react-refresh@0.14.2: - resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} - engines: {node: '>=0.10.0'} - react-refresh@0.17.0: resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} engines: {node: '>=0.10.0'} @@ -11505,10 +9761,6 @@ packages: resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} - react@19.1.0: - resolution: {integrity: sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==} - engines: {node: '>=0.10.0'} - react@19.1.1: resolution: {integrity: sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==} engines: {node: '>=0.10.0'} @@ -11532,10 +9784,6 @@ packages: resolution: {integrity: sha512-vaMRR1AC1nrd5CQM0PhlRsO5oc2AAigqr7cCrZ/MW/Rsaflz4RlgzkpL4qoU/z1F6wrbd85iFv1OQj/y5RdGvg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - read-pkg@3.0.0: - resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} - engines: {node: '>=4'} - read-pkg@5.2.0: resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} engines: {node: '>=8'} @@ -11738,10 +9986,6 @@ packages: resolution: {integrity: sha512-I1XxrZSQ+oErkRR4jYbAyEEu2I0avBvvMM5JN+6EBprOGRCs63ENqZ3vjavq8fBw2+62G5LF5XelKwuJpcvcxw==} engines: {node: '>=10'} - retry@0.12.0: - resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} - engines: {node: '>= 4'} - reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -11754,22 +9998,6 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rolldown-plugin-dts@0.13.14: - resolution: {integrity: sha512-wjNhHZz9dlN6PTIXyizB6u/mAg1wEFMW9yw7imEVe3CxHSRnNHVyycIX0yDEOVJfDNISLPbkCIPEpFpizy5+PQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - '@typescript/native-preview': '>=7.0.0-dev.20250601.1' - rolldown: ^1.0.0-beta.9 - typescript: ^5.0.0 - vue-tsc: ^2.2.0 || ^3.0.0 - peerDependenciesMeta: - '@typescript/native-preview': - optional: true - typescript: - optional: true - vue-tsc: - optional: true - rolldown@1.0.0-beta.34: resolution: {integrity: sha512-Wwh7EwalMzzX3Yy3VN58VEajeR2Si8+HDNMf706jPLIqU7CxneRW+dQVfznf5O0TWTnJyu4npelwg2bzTXB1Nw==} hasBin: true @@ -11888,10 +10116,6 @@ packages: engines: {node: '>=10'} hasBin: true - send@0.19.0: - resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} - engines: {node: '>= 0.8.0'} - send@1.2.0: resolution: {integrity: sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==} engines: {node: '>= 18'} @@ -11916,10 +10140,6 @@ packages: serve-placeholder@2.0.2: resolution: {integrity: sha512-/TMG8SboeiQbZJWRlfTCqMs2DD3SZgWp0kDQePz9yUuCnDfDh/92gf7/PxGhzXTKBIPASIHxFcZndoNbp6QOLQ==} - serve-static@1.16.2: - resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} - engines: {node: '>= 0.8.0'} - serve-static@2.2.0: resolution: {integrity: sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==} engines: {node: '>= 18'} @@ -11952,26 +10172,14 @@ packages: resolution: {integrity: sha512-/zxjmHGbaYVFtI6bUridFVV7VFStIv3vU/w1h7xenhz7KRzc9pqHsyFvcExZprG7dlA5kW9knRgv8+Cl/H7w9w==} hasBin: true - sharp@0.33.5: - resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - sharp@0.34.3: resolution: {integrity: sha512-eX2IQ6nFohW4DbvHIOLRB3MHFpYqaqvXd3Tp5e/T/dSH83fxaNJQRvDMhASmkNTsNTVF2/OOopzRCt7xokgPfg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} - shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} - shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} @@ -12052,33 +10260,9 @@ packages: smob@1.5.0: resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==} - snake-case@3.0.4: - resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} - - snakecase-keys@3.2.1: - resolution: {integrity: sha512-CjU5pyRfwOtaOITYv5C8DzpZ8XA/ieRsDpr93HI2r6e3YInC6moZpSQbmUtg8cTk58tq2x3jcG2gv+p1IZGmMA==} - engines: {node: '>=8'} - - snakecase-keys@5.4.4: - resolution: {integrity: sha512-YTywJG93yxwHLgrYLZjlC75moVEX04LZM4FHfihjHe1FCXm+QaLOFfSf535aXOAd0ArVQMWUAe8ZPm4VtWyXaA==} - engines: {node: '>=12'} - - snakecase-keys@8.0.1: - resolution: {integrity: sha512-Sj51kE1zC7zh6TDlNNz0/Jn1n5HiHdoQErxO8jLtnyrkJW/M5PrI7x05uDgY3BO7OUQYKCvmeMurW6BPUdwEOw==} - engines: {node: '>=18'} - - solid-js@1.9.9: - resolution: {integrity: sha512-A0ZBPJQldAeGCTW0YRYJmt7RCeh5rbFfPZ2aOttgYnctHE7HgKeHCBB/PVc2P7eOfmNXqMFFFoYYdm3S4dcbkA==} - sonic-boom@4.2.0: resolution: {integrity: sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==} - sonner@2.0.7: - resolution: {integrity: sha512-W6ZN4p58k8aDKA4XPcx2hpIQXBRAgyiWVkYhT7CvK6D3iAu7xjvVyhQHg2/iaKJZ1XVJ4r7XuwGL+WGEK37i9w==} - peerDependencies: - react: ^18.0.0 || ^19.0.0 || ^19.0.0-rc - react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-rc - source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -12210,10 +10394,6 @@ packages: resolution: {integrity: sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==} engines: {node: '>= 0.4'} - string.prototype.padend@3.1.6: - resolution: {integrity: sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==} - engines: {node: '>= 0.4'} - string.prototype.repeat@1.0.0: resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} @@ -12326,10 +10506,6 @@ packages: engines: {node: '>=16 || 14 >=14.17'} hasBin: true - superagent@10.2.3: - resolution: {integrity: sha512-y/hkYGeXAj7wUMjxRbB21g/l6aAEituGXM9Rwl4o20+SX3e8YOSV6BxFXl+dL3Uk0mjSL3kCbNkwURm8/gEDig==} - engines: {node: '>=14.18.0'} - superstruct@1.0.4: resolution: {integrity: sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==} engines: {node: '>=14.0.0'} @@ -12338,10 +10514,6 @@ packages: resolution: {integrity: sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - supertest@7.1.4: - resolution: {integrity: sha512-tjLPs7dVyqgItVFirHYqe2T+MfWc2VOBQ8QFKKbWTA3PU7liZR8zoSpAi/C1k1ilm9RsXIKYf197oap9wXGVYg==} - engines: {node: '>=14.18.0'} - supports-color@10.1.0: resolution: {integrity: sha512-GBuewsPrhJPftT+fqDa9oI/zc5HNsG9nREqwzoSFDOIqf0NggOZbHQj2TE1P1CDJK8ZogFnlZY9hWoUiur7I/A==} engines: {node: '>=18'} @@ -12370,11 +10542,6 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - swr@2.2.0: - resolution: {integrity: sha512-AjqHOv2lAhkuUdIiBu9xbuettzAzWXmCEcLONNKJRba87WAefz8Ca9d6ds/SzrPc235n1IxWYdhJ2zF3MNUaoQ==} - peerDependencies: - react: ^16.11.0 || ^17.0.0 || ^18.0.0 - swr@2.3.4: resolution: {integrity: sha512-bYd2lrhc+VarcpkgWclcUi92wYCpOgMws9Sd1hG1ntAu0NEy+14CbotuFjshBU2kt9rYj9TSmDcybpxpeTU1fg==} peerDependencies: @@ -12540,19 +10707,10 @@ packages: resolution: {integrity: sha512-rtwLUQEwT8ZeKQbyFJyomBRYXyE16U5VKuy0ftxLMK/PZb2fkOsg5r9kHdauuVDbsNdIBoC/HCthpidamQFXYA==} engines: {node: '>=0.10.0'} - to-no-case@1.0.2: - resolution: {integrity: sha512-Z3g735FxuZY8rodxV4gH7LxClE4H0hTIyHNIHdk+vpQxjLm0cwnKXq/OFVZ76SOQmto7txVcwSCwkU5kqp+FKg==} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - to-snake-case@1.0.0: - resolution: {integrity: sha512-joRpzBAk1Bhi2eGEYBjukEWHOe/IvclOkiJl3DtA91jV6NwQ3MwXA4FHYeqk8BNp/D8bmi9tcNbRu/SozP0jbQ==} - - to-space-case@1.0.0: - resolution: {integrity: sha512-rLdvwXZ39VOn1IxGL3V6ZstoTbwLRckQmn/U8ZDLuWwIXNpuZDhQ3AiRUlhTbOXFVE9C+dR51wM0CBDhk31VcA==} - toad-cache@3.7.0: resolution: {integrity: sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw==} engines: {node: '>=12'} @@ -12672,16 +10830,6 @@ packages: peerDependencies: typescript: '>=4.3.0' - tsconfck@3.1.6: - resolution: {integrity: sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==} - engines: {node: ^18 || >=20} - hasBin: true - peerDependencies: - typescript: ^5.0.0 - peerDependenciesMeta: - typescript: - optional: true - tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} @@ -12689,31 +10837,6 @@ packages: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} - tsdown@0.12.9: - resolution: {integrity: sha512-MfrXm9PIlT3saovtWKf/gCJJ/NQCdE0SiREkdNC+9Qy6UHhdeDPxnkFaBD7xttVUmgp0yUHtGirpoLB+OVLuLA==} - engines: {node: '>=18.0.0'} - hasBin: true - peerDependencies: - '@arethetypeswrong/core': ^0.18.1 - publint: ^0.3.0 - typescript: ^5.0.0 - unplugin-lightningcss: ^0.4.0 - unplugin-unused: ^0.5.0 - peerDependenciesMeta: - '@arethetypeswrong/core': - optional: true - publint: - optional: true - typescript: - optional: true - unplugin-lightningcss: - optional: true - unplugin-unused: - optional: true - - tslib@2.4.1: - resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} - tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -12747,9 +10870,6 @@ packages: turbo-stream@2.4.1: resolution: {integrity: sha512-v8kOJXpG3WoTN/+at8vK7erSzo6nW6CIaeOvNOkHQVDajfz1ZVeSxCbc6tOH4hrGZW7VUCV0TOXd8CPzYnYkrw==} - turbo-stream@3.1.0: - resolution: {integrity: sha512-tVI25WEXl4fckNEmrq70xU1XumxUwEx/FZD5AgEcV8ri7Wvrg2o7GEq8U7htrNx3CajciGm+kDyhRf5JB6t7/A==} - tw-animate-css@1.3.6: resolution: {integrity: sha512-9dy0R9UsYEGmgf26L8UcHiLmSFTHa9+D7+dAt/G/sF5dCnPePZbfgDYinc7/UzAM7g/baVrmS6m9yEpU46d+LA==} @@ -12796,10 +10916,6 @@ packages: resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} - type-is@1.6.18: - resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} - engines: {node: '>= 0.6'} - type-is@2.0.1: resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==} engines: {node: '>= 0.6'} @@ -12834,13 +10950,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' - typescript-eslint@8.41.0: - resolution: {integrity: sha512-n66rzs5OBXW3SFSnZHr2T685q1i4ODm2nulFJhMZBotaTavsS8TrI3d7bDlRSs9yWo7HmyWrN9qDu14Qv7Y0Dw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' - typescript@4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} @@ -12856,11 +10965,6 @@ packages: engines: {node: '>=14.17'} hasBin: true - typescript@5.7.3: - resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} - engines: {node: '>=14.17'} - hasBin: true - typescript@5.8.3: resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} engines: {node: '>=14.17'} @@ -12871,6 +10975,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + engines: {node: '>=14.17'} + hasBin: true + ufo@1.6.1: resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} @@ -12894,9 +11003,6 @@ packages: resolution: {integrity: sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==} engines: {node: '>=0.10.0'} - unconfig@7.3.3: - resolution: {integrity: sha512-QCkQoOnJF8L107gxfHL0uavn7WD9b3dpBcFX6HtfQYmjw2YzWxGuFQ0N0J6tE9oguCBJn9KOvfqYDCMPHIZrBA==} - uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} @@ -12906,9 +11012,6 @@ packages: undefsafe@2.0.5: resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} - undici-types@5.28.4: - resolution: {integrity: sha512-3OeMF5Lyowe8VW0skf5qaIE7Or3yS9LS7fvMUI0gg4YxpIBVg0L8BxCmROw2CcYhSkpR68Epz7CGc8MPj94Uww==} - undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} @@ -13104,11 +11207,6 @@ packages: '@types/react': optional: true - use-intl@4.3.5: - resolution: {integrity: sha512-qyL1TZNesVbzj/75ZbYsi+xzNSiFqp5rIVsiAN0JT8rPMSjX0/3KQz76aJIrngI1/wIQdVYFVdImWh5yAv+dWA==} - peerDependencies: - react: ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0 - use-sidecar@1.1.3: resolution: {integrity: sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==} engines: {node: '>=10'} @@ -13130,10 +11228,6 @@ packages: util@0.12.5: resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} - utils-merge@1.0.1: - resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} - engines: {node: '>= 0.4.0'} - uuid@11.1.0: resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==} hasBin: true @@ -13145,14 +11239,6 @@ packages: resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} engines: {node: '>=10.12.0'} - valibot@0.41.0: - resolution: {integrity: sha512-igDBb8CTYr8YTQlOKgaN9nSS0Be7z+WRuaeYqGf3Cjz3aKmSnqEmYnkfVjzIuumGqfHpa3fLIvMEAfhrpqN8ng==} - peerDependencies: - typescript: '>=5' - peerDependenciesMeta: - typescript: - optional: true - validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} @@ -13176,23 +11262,11 @@ packages: victory-vendor@36.9.2: resolution: {integrity: sha512-PnpQQMuxlwYdocC8fIJqVXvkeViHYzotI+NJrCuav0ZYFoq912ZHBk3mCeuj+5/VpodOjPe1z0Fk2ihgzlXqjQ==} - vinxi@0.5.3: - resolution: {integrity: sha512-4sL2SMrRzdzClapP44oXdGjCE1oq7/DagsbjY5A09EibmoIO4LP8ScRVdh03lfXxKRk7nCWK7n7dqKvm+fp/9w==} - hasBin: true - vite-node@3.2.4: resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true - vite-tsconfig-paths@5.1.4: - resolution: {integrity: sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==} - peerDependencies: - vite: '*' - peerDependenciesMeta: - vite: - optional: true - vite@6.3.5: resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -13329,9 +11403,6 @@ packages: resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} engines: {node: '>= 8'} - webcrypto-core@1.8.1: - resolution: {integrity: sha512-P+x1MvlNCXlKbLSOY4cYrdreqPG5hbzkmawbcXLKN/mf6DZW0SdNNkZ+sjwsqVkI4A4Ko2sPZmkZtCKY58w83A==} - webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -13392,25 +11463,11 @@ packages: resolution: {integrity: sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==} engines: {node: '>= 0.4'} - which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true - which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} hasBin: true - which@3.0.1: - resolution: {integrity: sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - hasBin: true - - which@4.0.0: - resolution: {integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==} - engines: {node: ^16.13.0 || >=18.0.0} - hasBin: true - which@5.0.0: resolution: {integrity: sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==} engines: {node: ^18.17.0 || >=20.5.0} @@ -13421,10 +11478,6 @@ packages: engines: {node: '>=8'} hasBin: true - widest-line@4.0.1: - resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==} - engines: {node: '>=12'} - widest-line@5.0.0: resolution: {integrity: sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA==} engines: {node: '>=18'} @@ -13602,9 +11655,6 @@ packages: resolution: {integrity: sha512-rY2A2lSF7zC+l7HH9Mq+83D1dLlsPnEvy8jTouzaptDZM6geqZ3aJe/b7ULCwRURPtWV3vbDjA2DDMdoBol0HQ==} engines: {node: '>=18'} - zimmerframe@1.1.2: - resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} - zip-stream@6.0.1: resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} engines: {node: '>= 14'} @@ -14044,11 +12094,6 @@ snapshots: better-call: 1.0.19 zod: 4.1.5 - '@better-auth/utils@0.2.5': - dependencies: - typescript: 5.8.3 - uncrypto: 0.1.3 - '@better-auth/utils@0.2.6': dependencies: uncrypto: 0.1.3 @@ -14059,78 +12104,20 @@ snapshots: '@borewit/text-codec@0.1.1': {} - '@braidai/lang@1.1.2': {} - - '@bundled-es-modules/cookie@2.0.1': - dependencies: - cookie: 0.7.2 - - '@bundled-es-modules/statuses@1.0.1': - dependencies: - statuses: 2.0.2 - - '@bundled-es-modules/tough-cookie@0.1.6': - dependencies: - '@types/tough-cookie': 4.0.5 - tough-cookie: 4.1.4 - - '@clerk/backend@0.38.15(react@19.1.1)': - dependencies: - '@clerk/shared': 1.4.2(react@19.1.1) - '@clerk/types': 3.65.5 - '@peculiar/webcrypto': 1.4.1 - '@types/node': 16.18.6 - cookie: 0.5.0 - deepmerge: 4.2.2 - node-fetch-native: 1.0.1 - snakecase-keys: 5.4.4 - tslib: 2.4.1 - transitivePeerDependencies: - - react - - '@clerk/backend@1.34.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@clerk/shared': 3.19.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/types': 4.75.0 - cookie: 1.0.2 - snakecase-keys: 8.0.1 - tslib: 2.8.1 - transitivePeerDependencies: - - react - - react-dom - - '@clerk/backend@2.10.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@clerk/shared': 3.23.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@clerk/types': 4.83.0 - cookie: 1.0.2 - standardwebhooks: 1.0.0 - tslib: 2.8.1 - transitivePeerDependencies: - - react - - react-dom - - '@clerk/backend@2.10.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@braidai/lang@1.1.2': {} + + '@bundled-es-modules/cookie@2.0.1': dependencies: - '@clerk/shared': 3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/types': 4.83.0 - cookie: 1.0.2 - standardwebhooks: 1.0.0 - tslib: 2.8.1 - transitivePeerDependencies: - - react - - react-dom + cookie: 0.7.2 - '@clerk/backend@2.7.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': + '@bundled-es-modules/statuses@1.0.1': dependencies: - '@clerk/shared': 3.19.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@clerk/types': 4.75.0 - cookie: 1.0.2 - standardwebhooks: 1.0.0 - tslib: 2.8.1 - transitivePeerDependencies: - - react - - react-dom + statuses: 2.0.2 + + '@bundled-es-modules/tough-cookie@0.1.6': + dependencies: + '@types/tough-cookie': 4.0.5 + tough-cookie: 4.1.4 '@clerk/backend@2.7.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: @@ -14143,22 +12130,6 @@ snapshots: - react - react-dom - '@clerk/clerk-react@5.41.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@clerk/shared': 3.19.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@clerk/types': 4.75.0 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - tslib: 2.8.1 - - '@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@clerk/shared': 3.23.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@clerk/types': 4.83.0 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - tslib: 2.8.1 - '@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@clerk/shared': 3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -14167,43 +12138,6 @@ snapshots: react-dom: 19.1.1(react@19.1.1) tslib: 2.8.1 - '@clerk/clerk-sdk-node@4.13.23(react@19.1.1)': - dependencies: - '@clerk/backend': 0.38.15(react@19.1.1) - '@clerk/shared': 1.4.2(react@19.1.1) - '@clerk/types': 3.65.5 - '@types/cookies': 0.7.7 - '@types/express': 4.17.14 - '@types/node-fetch': 2.6.2 - camelcase-keys: 6.2.2 - snakecase-keys: 3.2.1 - tslib: 2.4.1 - transitivePeerDependencies: - - react - - '@clerk/express@1.7.26(express@4.21.2)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@clerk/backend': 2.10.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/shared': 3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/types': 4.83.0 - express: 4.21.2 - tslib: 2.8.1 - transitivePeerDependencies: - - react - - react-dom - - '@clerk/nextjs@6.30.1(next@15.2.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@clerk/backend': 2.7.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@clerk/clerk-react': 5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@clerk/shared': 3.19.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@clerk/types': 4.75.0 - next: 15.2.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - server-only: 0.0.1 - tslib: 2.8.1 - '@clerk/nextjs@6.30.1(next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@clerk/backend': 2.7.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -14216,38 +12150,6 @@ snapshots: server-only: 0.0.1 tslib: 2.8.1 - '@clerk/react-router@1.9.6(react-dom@19.1.0(react@19.1.0))(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)': - dependencies: - '@clerk/backend': 2.10.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@clerk/clerk-react': 5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@clerk/shared': 3.23.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@clerk/types': 4.83.0 - cookie: 0.7.2 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - react-router: 7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - tslib: 2.8.1 - - '@clerk/shared@1.4.2(react@19.1.1)': - dependencies: - glob-to-regexp: 0.4.1 - js-cookie: 3.0.1 - swr: 2.2.0(react@19.1.1) - optionalDependencies: - react: 19.1.1 - - '@clerk/shared@3.19.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@clerk/types': 4.75.0 - dequal: 2.0.3 - glob-to-regexp: 0.4.1 - js-cookie: 3.0.5 - std-env: 3.9.0 - swr: 2.3.4(react@19.1.0) - optionalDependencies: - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - '@clerk/shared@3.19.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@clerk/types': 4.75.0 @@ -14260,18 +12162,6 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - '@clerk/shared@3.23.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@clerk/types': 4.83.0 - dequal: 2.0.3 - glob-to-regexp: 0.4.1 - js-cookie: 3.0.5 - std-env: 3.9.0 - swr: 2.3.4(react@19.1.0) - optionalDependencies: - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - '@clerk/shared@3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@clerk/types': 4.83.0 @@ -14284,10 +12174,6 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - '@clerk/types@3.65.5': - dependencies: - csstype: 3.1.1 - '@clerk/types@4.75.0': dependencies: csstype: 3.1.3 @@ -14305,58 +12191,6 @@ snapshots: '@colors/colors@1.6.0': {} - '@convex-dev/better-auth@0.7.17(@standard-schema/spec@1.0.0)(better-auth@1.3.7(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(zod@3.25.76))(convex@1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0))(hono@4.9.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.7.3)': - dependencies: - better-auth: 1.3.7(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(zod@3.25.76) - common-tags: 1.8.2 - convex: 1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) - convex-helpers: 0.1.104(@standard-schema/spec@1.0.0)(convex@1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0))(hono@4.9.1)(react@19.1.0)(typescript@5.7.3)(zod@3.25.76) - is-network-error: 1.1.0 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - type-fest: 4.41.0 - zod: 3.25.76 - transitivePeerDependencies: - - '@standard-schema/spec' - - hono - - typescript - - '@convex-dev/workos@0.0.1(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@20.19.11)(convex@1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1))(jiti@2.5.1)(react@19.1.1)(typescript@5.9.2)': - dependencies: - '@workos-inc/authkit-react': 0.11.0(react@19.1.1) - convex: 1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - react: 19.1.1 - tsdown: 0.12.9(typescript@5.9.2) - vitest: 3.2.4(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@20.19.11)(jiti@2.5.1) - transitivePeerDependencies: - - '@arethetypeswrong/core' - - '@edge-runtime/vm' - - '@types/debug' - - '@types/node' - - '@typescript/native-preview' - - '@vitest/browser' - - '@vitest/ui' - - happy-dom - - jiti - - jsdom - - less - - lightningcss - - msw - - oxc-resolver - - publint - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - typescript - - unplugin-lightningcss - - unplugin-unused - - vue-tsc - - yaml - '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 @@ -14367,13 +12201,6 @@ snapshots: enabled: 2.0.0 kuler: 2.0.0 - '@deno/shim-deno-test@0.5.0': {} - - '@deno/shim-deno@0.19.2': - dependencies: - '@deno/shim-deno-test': 0.5.0 - which: 4.0.0 - '@dependents/detective-less@5.0.1': dependencies: gonzales-pe: 4.3.0 @@ -14385,17 +12212,6 @@ snapshots: dependencies: '@edge-runtime/primitives': 6.0.0 - '@elysiajs/cors@1.3.3(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3))': - dependencies: - elysia: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3) - - '@elysiajs/node@1.3.1(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3))(hono@4.9.1)': - dependencies: - '@hono/node-server': 1.19.0(hono@4.9.1) - elysia: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3) - transitivePeerDependencies: - - hono - '@emnapi/core@1.4.5': dependencies: '@emnapi/wasi-threads': 1.0.4 @@ -14412,9 +12228,6 @@ snapshots: tslib: 2.8.1 optional: true - '@esbuild/aix-ppc64@0.20.2': - optional: true - '@esbuild/aix-ppc64@0.25.4': optional: true @@ -14424,9 +12237,6 @@ snapshots: '@esbuild/aix-ppc64@0.25.9': optional: true - '@esbuild/android-arm64@0.20.2': - optional: true - '@esbuild/android-arm64@0.25.4': optional: true @@ -14436,9 +12246,6 @@ snapshots: '@esbuild/android-arm64@0.25.9': optional: true - '@esbuild/android-arm@0.20.2': - optional: true - '@esbuild/android-arm@0.25.4': optional: true @@ -14448,9 +12255,6 @@ snapshots: '@esbuild/android-arm@0.25.9': optional: true - '@esbuild/android-x64@0.20.2': - optional: true - '@esbuild/android-x64@0.25.4': optional: true @@ -14460,9 +12264,6 @@ snapshots: '@esbuild/android-x64@0.25.9': optional: true - '@esbuild/darwin-arm64@0.20.2': - optional: true - '@esbuild/darwin-arm64@0.25.4': optional: true @@ -14472,9 +12273,6 @@ snapshots: '@esbuild/darwin-arm64@0.25.9': optional: true - '@esbuild/darwin-x64@0.20.2': - optional: true - '@esbuild/darwin-x64@0.25.4': optional: true @@ -14484,9 +12282,6 @@ snapshots: '@esbuild/darwin-x64@0.25.9': optional: true - '@esbuild/freebsd-arm64@0.20.2': - optional: true - '@esbuild/freebsd-arm64@0.25.4': optional: true @@ -14496,9 +12291,6 @@ snapshots: '@esbuild/freebsd-arm64@0.25.9': optional: true - '@esbuild/freebsd-x64@0.20.2': - optional: true - '@esbuild/freebsd-x64@0.25.4': optional: true @@ -14508,9 +12300,6 @@ snapshots: '@esbuild/freebsd-x64@0.25.9': optional: true - '@esbuild/linux-arm64@0.20.2': - optional: true - '@esbuild/linux-arm64@0.25.4': optional: true @@ -14520,9 +12309,6 @@ snapshots: '@esbuild/linux-arm64@0.25.9': optional: true - '@esbuild/linux-arm@0.20.2': - optional: true - '@esbuild/linux-arm@0.25.4': optional: true @@ -14532,9 +12318,6 @@ snapshots: '@esbuild/linux-arm@0.25.9': optional: true - '@esbuild/linux-ia32@0.20.2': - optional: true - '@esbuild/linux-ia32@0.25.4': optional: true @@ -14544,9 +12327,6 @@ snapshots: '@esbuild/linux-ia32@0.25.9': optional: true - '@esbuild/linux-loong64@0.20.2': - optional: true - '@esbuild/linux-loong64@0.25.4': optional: true @@ -14556,9 +12336,6 @@ snapshots: '@esbuild/linux-loong64@0.25.9': optional: true - '@esbuild/linux-mips64el@0.20.2': - optional: true - '@esbuild/linux-mips64el@0.25.4': optional: true @@ -14568,9 +12345,6 @@ snapshots: '@esbuild/linux-mips64el@0.25.9': optional: true - '@esbuild/linux-ppc64@0.20.2': - optional: true - '@esbuild/linux-ppc64@0.25.4': optional: true @@ -14580,9 +12354,6 @@ snapshots: '@esbuild/linux-ppc64@0.25.9': optional: true - '@esbuild/linux-riscv64@0.20.2': - optional: true - '@esbuild/linux-riscv64@0.25.4': optional: true @@ -14592,9 +12363,6 @@ snapshots: '@esbuild/linux-riscv64@0.25.9': optional: true - '@esbuild/linux-s390x@0.20.2': - optional: true - '@esbuild/linux-s390x@0.25.4': optional: true @@ -14604,9 +12372,6 @@ snapshots: '@esbuild/linux-s390x@0.25.9': optional: true - '@esbuild/linux-x64@0.20.2': - optional: true - '@esbuild/linux-x64@0.25.4': optional: true @@ -14625,9 +12390,6 @@ snapshots: '@esbuild/netbsd-arm64@0.25.9': optional: true - '@esbuild/netbsd-x64@0.20.2': - optional: true - '@esbuild/netbsd-x64@0.25.4': optional: true @@ -14646,9 +12408,6 @@ snapshots: '@esbuild/openbsd-arm64@0.25.9': optional: true - '@esbuild/openbsd-x64@0.20.2': - optional: true - '@esbuild/openbsd-x64@0.25.4': optional: true @@ -14661,9 +12420,6 @@ snapshots: '@esbuild/openharmony-arm64@0.25.9': optional: true - '@esbuild/sunos-x64@0.20.2': - optional: true - '@esbuild/sunos-x64@0.25.4': optional: true @@ -14673,9 +12429,6 @@ snapshots: '@esbuild/sunos-x64@0.25.9': optional: true - '@esbuild/win32-arm64@0.20.2': - optional: true - '@esbuild/win32-arm64@0.25.4': optional: true @@ -14685,9 +12438,6 @@ snapshots: '@esbuild/win32-arm64@0.25.9': optional: true - '@esbuild/win32-ia32@0.20.2': - optional: true - '@esbuild/win32-ia32@0.25.4': optional: true @@ -14697,9 +12447,6 @@ snapshots: '@esbuild/win32-ia32@0.25.9': optional: true - '@esbuild/win32-x64@0.20.2': - optional: true - '@esbuild/win32-x64@0.25.4': optional: true @@ -14817,11 +12564,6 @@ snapshots: '@fastify/busboy@3.1.1': {} - '@fastify/cors@11.1.0': - dependencies: - fastify-plugin: 5.0.1 - toad-cache: 3.7.0 - '@fastify/error@4.2.0': {} '@fastify/fast-json-stringify-compiler@5.0.3': @@ -14854,12 +12596,6 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@floating-ui/react-dom@2.1.5(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@floating-ui/dom': 1.7.3 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - '@floating-ui/react-dom@2.1.5(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@floating-ui/dom': 1.7.3 @@ -14868,52 +12604,12 @@ snapshots: '@floating-ui/utils@0.2.10': {} - '@formatjs/ecma402-abstract@2.3.4': - dependencies: - '@formatjs/fast-memoize': 2.2.7 - '@formatjs/intl-localematcher': 0.6.1 - decimal.js: 10.6.0 - tslib: 2.8.1 - - '@formatjs/fast-memoize@2.2.7': - dependencies: - tslib: 2.8.1 - - '@formatjs/icu-messageformat-parser@2.11.2': - dependencies: - '@formatjs/ecma402-abstract': 2.3.4 - '@formatjs/icu-skeleton-parser': 1.8.14 - tslib: 2.8.1 - - '@formatjs/icu-skeleton-parser@1.8.14': - dependencies: - '@formatjs/ecma402-abstract': 2.3.4 - tslib: 2.8.1 - - '@formatjs/intl-localematcher@0.5.10': - dependencies: - tslib: 2.8.1 - '@formatjs/intl-localematcher@0.6.1': dependencies: tslib: 2.8.1 '@hexagon/base64@1.1.28': {} - '@hono/clerk-auth@2.0.1(@clerk/backend@1.34.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(hono@4.9.1)': - dependencies: - '@clerk/backend': 1.34.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - hono: 4.9.1 - - '@hono/node-server@1.19.0(hono@4.9.1)': - dependencies: - hono: 4.9.1 - - '@hookform/resolvers@5.2.1(react-hook-form@7.62.0(react@19.1.1))': - dependencies: - '@standard-schema/utils': 0.3.0 - react-hook-form: 7.62.0(react@19.1.1) - '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.6': @@ -14937,92 +12633,48 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@img/sharp-darwin-arm64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.0.4 - optional: true - '@img/sharp-darwin-arm64@0.34.3': optionalDependencies: '@img/sharp-libvips-darwin-arm64': 1.2.0 optional: true - '@img/sharp-darwin-x64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.0.4 - optional: true - '@img/sharp-darwin-x64@0.34.3': optionalDependencies: '@img/sharp-libvips-darwin-x64': 1.2.0 optional: true - '@img/sharp-libvips-darwin-arm64@1.0.4': - optional: true - '@img/sharp-libvips-darwin-arm64@1.2.0': optional: true - '@img/sharp-libvips-darwin-x64@1.0.4': - optional: true - '@img/sharp-libvips-darwin-x64@1.2.0': optional: true - '@img/sharp-libvips-linux-arm64@1.0.4': - optional: true - '@img/sharp-libvips-linux-arm64@1.2.0': optional: true - '@img/sharp-libvips-linux-arm@1.0.5': - optional: true - '@img/sharp-libvips-linux-arm@1.2.0': optional: true '@img/sharp-libvips-linux-ppc64@1.2.0': optional: true - '@img/sharp-libvips-linux-s390x@1.0.4': - optional: true - '@img/sharp-libvips-linux-s390x@1.2.0': optional: true - '@img/sharp-libvips-linux-x64@1.0.4': - optional: true - '@img/sharp-libvips-linux-x64@1.2.0': optional: true - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': - optional: true - '@img/sharp-libvips-linuxmusl-arm64@1.2.0': optional: true - '@img/sharp-libvips-linuxmusl-x64@1.0.4': - optional: true - '@img/sharp-libvips-linuxmusl-x64@1.2.0': optional: true - '@img/sharp-linux-arm64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.0.4 - optional: true - '@img/sharp-linux-arm64@0.34.3': optionalDependencies: '@img/sharp-libvips-linux-arm64': 1.2.0 optional: true - '@img/sharp-linux-arm@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.0.5 - optional: true - '@img/sharp-linux-arm@0.34.3': optionalDependencies: '@img/sharp-libvips-linux-arm': 1.2.0 @@ -15033,51 +12685,26 @@ snapshots: '@img/sharp-libvips-linux-ppc64': 1.2.0 optional: true - '@img/sharp-linux-s390x@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.0.4 - optional: true - '@img/sharp-linux-s390x@0.34.3': optionalDependencies: '@img/sharp-libvips-linux-s390x': 1.2.0 optional: true - '@img/sharp-linux-x64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.0.4 - optional: true - '@img/sharp-linux-x64@0.34.3': optionalDependencies: '@img/sharp-libvips-linux-x64': 1.2.0 optional: true - '@img/sharp-linuxmusl-arm64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 - optional: true - '@img/sharp-linuxmusl-arm64@0.34.3': optionalDependencies: '@img/sharp-libvips-linuxmusl-arm64': 1.2.0 optional: true - '@img/sharp-linuxmusl-x64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.0.4 - optional: true - '@img/sharp-linuxmusl-x64@0.34.3': optionalDependencies: '@img/sharp-libvips-linuxmusl-x64': 1.2.0 optional: true - '@img/sharp-wasm32@0.33.5': - dependencies: - '@emnapi/runtime': 1.4.5 - optional: true - '@img/sharp-wasm32@0.34.3': dependencies: '@emnapi/runtime': 1.4.5 @@ -15086,15 +12713,9 @@ snapshots: '@img/sharp-win32-arm64@0.34.3': optional: true - '@img/sharp-win32-ia32@0.33.5': - optional: true - '@img/sharp-win32-ia32@0.34.3': optional: true - '@img/sharp-win32-x64@0.33.5': - optional: true - '@img/sharp-win32-x64@0.34.3': optional: true @@ -15298,63 +12919,28 @@ snapshots: '@jest/console@29.7.0': dependencies: - '@jest/types': 29.6.3 - '@types/node': 22.17.1 - chalk: 4.1.2 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - slash: 3.0.0 - - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3))': - dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.17.1 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.9.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) - jest-haste-map: 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.19.11 + chalk: 4.1.2 jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.8 - pretty-format: 29.7.0 slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 20.19.11 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) + jest-config: 29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -15383,7 +12969,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 20.19.11 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -15401,7 +12987,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.17.1 + '@types/node': 20.19.11 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -15417,7 +13003,7 @@ snapshots: '@jest/pattern@30.0.1': dependencies: - '@types/node': 22.17.1 + '@types/node': 20.19.11 jest-regex-util: 30.0.1 '@jest/reporters@29.7.0': @@ -15428,7 +13014,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.30 - '@types/node': 22.17.1 + '@types/node': 20.19.11 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -15502,7 +13088,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.17.1 + '@types/node': 20.19.11 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -15512,7 +13098,7 @@ snapshots: '@jest/schemas': 30.0.5 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.17.1 + '@types/node': 20.19.11 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -15598,10 +13184,6 @@ snapshots: - acorn - supports-color - '@mjackson/node-fetch-server@0.2.0': {} - - '@mjackson/node-fetch-server@0.7.0': {} - '@modelcontextprotocol/sdk@1.17.2': dependencies: ajv: 6.12.6 @@ -15730,23 +13312,17 @@ snapshots: - rollup - supports-color - '@next/env@15.2.1': {} - - '@next/env@15.2.3': {} - '@next/env@15.3.4': {} '@next/env@15.4.1': {} - '@next/eslint-plugin-next@15.1.4': - dependencies: - fast-glob: 3.3.1 + '@next/env@15.5.4': {} - '@next/eslint-plugin-next@15.2.1': + '@next/eslint-plugin-next@15.1.4': dependencies: fast-glob: 3.3.1 - '@next/eslint-plugin-next@15.2.3': + '@next/eslint-plugin-next@15.3.1': dependencies: fast-glob: 3.3.1 @@ -15754,26 +13330,13 @@ snapshots: dependencies: fast-glob: 3.3.1 - '@next/eslint-plugin-next@15.4.1': - dependencies: - fast-glob: 3.3.1 - - '@next/swc-darwin-arm64@15.2.1': - optional: true - - '@next/swc-darwin-arm64@15.2.3': - optional: true - '@next/swc-darwin-arm64@15.3.4': optional: true '@next/swc-darwin-arm64@15.4.1': optional: true - '@next/swc-darwin-x64@15.2.1': - optional: true - - '@next/swc-darwin-x64@15.2.3': + '@next/swc-darwin-arm64@15.5.4': optional: true '@next/swc-darwin-x64@15.3.4': @@ -15782,10 +13345,7 @@ snapshots: '@next/swc-darwin-x64@15.4.1': optional: true - '@next/swc-linux-arm64-gnu@15.2.1': - optional: true - - '@next/swc-linux-arm64-gnu@15.2.3': + '@next/swc-darwin-x64@15.5.4': optional: true '@next/swc-linux-arm64-gnu@15.3.4': @@ -15794,10 +13354,7 @@ snapshots: '@next/swc-linux-arm64-gnu@15.4.1': optional: true - '@next/swc-linux-arm64-musl@15.2.1': - optional: true - - '@next/swc-linux-arm64-musl@15.2.3': + '@next/swc-linux-arm64-gnu@15.5.4': optional: true '@next/swc-linux-arm64-musl@15.3.4': @@ -15806,10 +13363,7 @@ snapshots: '@next/swc-linux-arm64-musl@15.4.1': optional: true - '@next/swc-linux-x64-gnu@15.2.1': - optional: true - - '@next/swc-linux-x64-gnu@15.2.3': + '@next/swc-linux-arm64-musl@15.5.4': optional: true '@next/swc-linux-x64-gnu@15.3.4': @@ -15818,10 +13372,7 @@ snapshots: '@next/swc-linux-x64-gnu@15.4.1': optional: true - '@next/swc-linux-x64-musl@15.2.1': - optional: true - - '@next/swc-linux-x64-musl@15.2.3': + '@next/swc-linux-x64-gnu@15.5.4': optional: true '@next/swc-linux-x64-musl@15.3.4': @@ -15830,10 +13381,7 @@ snapshots: '@next/swc-linux-x64-musl@15.4.1': optional: true - '@next/swc-win32-arm64-msvc@15.2.1': - optional: true - - '@next/swc-win32-arm64-msvc@15.2.3': + '@next/swc-linux-x64-musl@15.5.4': optional: true '@next/swc-win32-arm64-msvc@15.3.4': @@ -15842,10 +13390,7 @@ snapshots: '@next/swc-win32-arm64-msvc@15.4.1': optional: true - '@next/swc-win32-x64-msvc@15.2.1': - optional: true - - '@next/swc-win32-x64-msvc@15.2.3': + '@next/swc-win32-arm64-msvc@15.5.4': optional: true '@next/swc-win32-x64-msvc@15.3.4': @@ -15854,6 +13399,9 @@ snapshots: '@next/swc-win32-x64-msvc@15.4.1': optional: true + '@next/swc-win32-x64-msvc@15.5.4': + optional: true + '@noble/ciphers@0.6.0': {} '@noble/ciphers@2.0.1': {} @@ -15876,35 +13424,6 @@ snapshots: '@nolyfill/is-core-module@1.0.39': {} - '@npmcli/git@4.1.0': - dependencies: - '@npmcli/promise-spawn': 6.0.2 - lru-cache: 7.18.3 - npm-pick-manifest: 8.0.2 - proc-log: 3.0.0 - promise-inflight: 1.0.1 - promise-retry: 2.0.1 - semver: 7.7.2 - which: 3.0.1 - transitivePeerDependencies: - - bluebird - - '@npmcli/package-json@4.0.1': - dependencies: - '@npmcli/git': 4.1.0 - glob: 10.4.5 - hosted-git-info: 6.1.3 - json-parse-even-better-errors: 3.0.2 - normalize-package-data: 5.0.0 - proc-log: 3.0.0 - semver: 7.7.2 - transitivePeerDependencies: - - bluebird - - '@npmcli/promise-spawn@6.0.2': - dependencies: - which: 3.0.1 - '@oozcitak/dom@1.15.10': dependencies: '@oozcitak/infra': 1.0.8 @@ -15933,13 +13452,11 @@ snapshots: '@orama/orama@3.1.11': {} - '@oxc-project/runtime@0.82.3': {} - - '@oxc-project/types@0.82.3': {} + '@oxc-project/runtime@0.82.3': + optional: true - '@paralleldrive/cuid2@2.2.2': - dependencies: - '@noble/hashes': 1.8.0 + '@oxc-project/types@0.82.3': + optional: true '@parcel/watcher-android-arm64@2.5.1': optional: true @@ -15971,11 +13488,6 @@ snapshots: '@parcel/watcher-linux-x64-musl@2.5.1': optional: true - '@parcel/watcher-wasm@2.3.0': - dependencies: - is-glob: 4.0.3 - micromatch: 4.0.8 - '@parcel/watcher-wasm@2.5.1': dependencies: is-glob: 4.0.3 @@ -16044,18 +13556,6 @@ snapshots: pvtsutils: 1.3.6 tslib: 2.8.1 - '@peculiar/json-schema@1.1.12': - dependencies: - tslib: 2.8.1 - - '@peculiar/webcrypto@1.4.1': - dependencies: - '@peculiar/asn1-schema': 2.4.0 - '@peculiar/json-schema': 1.1.12 - pvtsutils: 1.3.6 - tslib: 2.8.1 - webcrypto-core: 1.8.1 - '@pkgjs/parseargs@0.11.0': optional: true @@ -16073,10 +13573,6 @@ snapshots: '@poppinss/exception@1.2.2': {} - '@quansync/fs@0.1.5': - dependencies: - quansync: 0.2.11 - '@radix-ui/number@1.1.1': {} '@radix-ui/primitive@1.1.2': {} @@ -16143,15 +13639,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -16170,13 +13657,16 @@ snapshots: '@types/react': 19.1.12 '@types/react-dom': 19.1.9(@types/react@19.1.12) - '@radix-ui/react-avatar@1.1.10(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-checkbox@1.3.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) '@radix-ui/react-context': 1.1.2(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-use-is-hydrated': 0.1.0(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.12)(react@19.1.1) react: 19.1.1 react-dom: 19.1.1(react@19.1.1) optionalDependencies: @@ -16247,22 +13737,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-collapsible@1.1.12(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.12)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.12 - '@types/react-dom': 19.1.9(@types/react@19.1.12) - '@radix-ui/react-collection@1.1.7(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/react-compose-refs': 1.1.2(@types/react@18.3.23)(react@18.3.1) @@ -16305,12 +13779,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-compose-refs@1.1.2(@types/react@19.1.10)(react@19.1.0)': - dependencies: - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-compose-refs@1.1.2(@types/react@19.1.10)(react@19.1.1)': dependencies: react: 19.1.1 @@ -16329,12 +13797,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-context@1.1.2(@types/react@19.1.10)(react@19.1.0)': - dependencies: - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-context@1.1.2(@types/react@19.1.10)(react@19.1.1)': dependencies: react: 19.1.1 @@ -16369,28 +13831,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-dialog@1.1.14(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-dismissable-layer': 1.1.10(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-id': 1.1.1(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-slot': 1.2.3(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.10)(react@19.1.0) - aria-hidden: 1.2.6 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - react-remove-scroll: 2.7.1(@types/react@19.1.10)(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-dialog@1.1.14(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/primitive': 1.1.2 @@ -16488,19 +13928,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-dismissable-layer@1.1.10(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-dismissable-layer@1.1.10(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/primitive': 1.1.2 @@ -16527,19 +13954,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-dismissable-layer@1.1.11(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-dismissable-layer@1.1.11(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/primitive': 1.1.3 @@ -16574,12 +13988,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-focus-guards@1.1.2(@types/react@19.1.10)(react@19.1.0)': - dependencies: - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-focus-guards@1.1.2(@types/react@19.1.10)(react@19.1.1)': dependencies: react: 19.1.1 @@ -16609,17 +14017,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) @@ -16649,13 +14046,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-id@1.1.1(@types/react@19.1.10)(react@19.1.0)': - dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-id@1.1.1(@types/react@19.1.10)(react@19.1.1)': dependencies: '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.1) @@ -16679,15 +14069,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-label@2.1.7(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-label@2.1.7(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -16891,24 +14272,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-popper@1.2.8(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@floating-ui/react-dom': 2.1.5(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-arrow': 1.1.7(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-rect': 1.1.1(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/rect': 1.1.1 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-popper@1.2.8(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@floating-ui/react-dom': 2.1.5(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -16937,16 +14300,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-portal@1.1.9(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-portal@1.1.9(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -16977,16 +14330,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-presence@1.1.4(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-presence@1.1.4(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) @@ -17017,16 +14360,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-presence@1.1.5(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-presence@1.1.5(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) @@ -17046,15 +14379,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/react-slot': 1.2.3(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/react-slot': 1.2.3(@types/react@19.1.10)(react@19.1.1) @@ -17133,15 +14457,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-separator@1.1.7(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.12 - '@types/react-dom': 19.1.9(@types/react@19.1.12) - '@radix-ui/react-slot@1.2.3(@types/react@18.3.23)(react@18.3.1)': dependencies: '@radix-ui/react-compose-refs': 1.1.2(@types/react@18.3.23)(react@18.3.1) @@ -17149,13 +14464,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-slot@1.2.3(@types/react@19.1.10)(react@19.1.0)': - dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-slot@1.2.3(@types/react@19.1.10)(react@19.1.1)': dependencies: '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) @@ -17185,21 +14493,6 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-switch@1.2.5(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-switch@1.2.5(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@radix-ui/primitive': 1.1.2 @@ -17222,81 +14515,35 @@ snapshots: '@radix-ui/react-context': 1.1.2(@types/react@19.1.12)(react@19.1.1) '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.12)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.12 - '@types/react-dom': 19.1.9(@types/react@19.1.12) - - '@radix-ui/react-tabs@1.1.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-context': 1.1.2(@types/react@18.3.23)(react@18.3.1) - '@radix-ui/react-direction': 1.1.1(@types/react@18.3.23)(react@18.3.1) - '@radix-ui/react-id': 1.1.1(@types/react@18.3.23)(react@18.3.1) - '@radix-ui/react-presence': 1.1.4(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-roving-focus': 1.1.10(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@18.3.23)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - optionalDependencies: - '@types/react': 18.3.23 - '@types/react-dom': 18.3.7(@types/react@18.3.23) - - '@radix-ui/react-tooltip@1.2.8(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-id': 1.1.1(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@radix-ui/react-slot': 1.2.3(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - - '@radix-ui/react-tooltip@1.2.8(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.12)(react@19.1.1) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.12)(react@19.1.1) react: 19.1.1 react-dom: 19.1.1(react@19.1.1) optionalDependencies: '@types/react': 19.1.12 '@types/react-dom': 19.1.9(@types/react@19.1.12) - '@radix-ui/react-use-callback-ref@1.1.1(@types/react@18.3.23)(react@18.3.1)': + '@radix-ui/react-tabs@1.1.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-context': 1.1.2(@types/react@18.3.23)(react@18.3.1) + '@radix-ui/react-direction': 1.1.1(@types/react@18.3.23)(react@18.3.1) + '@radix-ui/react-id': 1.1.1(@types/react@18.3.23)(react@18.3.1) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-roving-focus': 1.1.10(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@18.3.23)(react@18.3.1) react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) optionalDependencies: '@types/react': 18.3.23 + '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.1.10)(react@19.1.0)': + '@radix-ui/react-use-callback-ref@1.1.1(@types/react@18.3.23)(react@18.3.1)': dependencies: - react: 19.1.0 + react: 18.3.1 optionalDependencies: - '@types/react': 19.1.10 + '@types/react': 18.3.23 '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.1.10)(react@19.1.1)': dependencies: @@ -17318,14 +14565,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.1.10)(react@19.1.0)': - dependencies: - '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.1.10)(react@19.1.0) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.1.10)(react@19.1.1)': dependencies: '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.1.10)(react@19.1.1) @@ -17349,13 +14588,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.1.10)(react@19.1.0)': - dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.1.10)(react@19.1.1)': dependencies: '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.1) @@ -17377,13 +14609,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.1.10)(react@19.1.0)': - dependencies: - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.1.10)(react@19.1.1)': dependencies: '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.10)(react@19.1.1) @@ -17398,25 +14623,12 @@ snapshots: optionalDependencies: '@types/react': 19.1.12 - '@radix-ui/react-use-is-hydrated@0.1.0(@types/react@19.1.12)(react@19.1.1)': - dependencies: - react: 19.1.1 - use-sync-external-store: 1.5.0(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.12 - '@radix-ui/react-use-layout-effect@1.1.1(@types/react@18.3.23)(react@18.3.1)': dependencies: react: 18.3.1 optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.1.10)(react@19.1.0)': - dependencies: - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.1.10)(react@19.1.1)': dependencies: react: 19.1.1 @@ -17435,12 +14647,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-use-previous@1.1.1(@types/react@19.1.10)(react@19.1.0)': - dependencies: - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-use-previous@1.1.1(@types/react@19.1.10)(react@19.1.1)': dependencies: react: 19.1.1 @@ -17460,13 +14666,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-use-rect@1.1.1(@types/react@19.1.10)(react@19.1.0)': - dependencies: - '@radix-ui/rect': 1.1.1 - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-use-rect@1.1.1(@types/react@19.1.10)(react@19.1.1)': dependencies: '@radix-ui/rect': 1.1.1 @@ -17488,13 +14687,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-use-size@1.1.1(@types/react@19.1.10)(react@19.1.0)': - dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.0) - react: 19.1.0 - optionalDependencies: - '@types/react': 19.1.10 - '@radix-ui/react-use-size@1.1.1(@types/react@19.1.10)(react@19.1.1)': dependencies: '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.1) @@ -17518,108 +14710,8 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-visually-hidden@1.2.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': - dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) - - '@radix-ui/react-visually-hidden@1.2.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.12 - '@types/react-dom': 19.1.9(@types/react@19.1.12) - '@radix-ui/rect@1.1.1': {} - '@react-router/dev@7.8.2(@react-router/serve@7.8.2(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3))(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(react-dom@19.1.0(react@19.1.0))(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(terser@5.43.1)(tsx@4.20.4)(typescript@5.8.3)(vite@6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(yaml@2.8.1)': - dependencies: - '@babel/core': 7.28.3 - '@babel/generator': 7.28.3 - '@babel/parser': 7.28.3 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) - '@babel/preset-typescript': 7.27.1(@babel/core@7.28.3) - '@babel/traverse': 7.28.3 - '@babel/types': 7.28.2 - '@npmcli/package-json': 4.0.1 - '@react-router/node': 7.8.2(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3) - '@vitejs/plugin-rsc': 0.4.11(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(vite@6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - arg: 5.0.2 - babel-dead-code-elimination: 1.0.10 - chokidar: 4.0.3 - dedent: 1.6.0 - es-module-lexer: 1.7.0 - exit-hook: 2.2.1 - isbot: 5.1.29 - jsesc: 3.0.2 - lodash: 4.17.21 - pathe: 1.1.2 - picocolors: 1.1.1 - prettier: 3.6.2 - react-refresh: 0.14.2 - react-router: 7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - semver: 7.7.2 - set-cookie-parser: 2.7.1 - tinyglobby: 0.2.14 - valibot: 0.41.0(typescript@5.8.3) - vite: 6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - vite-node: 3.2.4(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - optionalDependencies: - '@react-router/serve': 7.8.2(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - bluebird - - jiti - - less - - lightningcss - - react - - react-dom - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - - '@react-router/express@7.8.2(express@4.21.2)(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3)': - dependencies: - '@react-router/node': 7.8.2(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3) - express: 4.21.2 - react-router: 7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - optionalDependencies: - typescript: 5.8.3 - - '@react-router/node@7.8.2(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3)': - dependencies: - '@mjackson/node-fetch-server': 0.2.0 - react-router: 7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - optionalDependencies: - typescript: 5.8.3 - - '@react-router/serve@7.8.2(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3)': - dependencies: - '@react-router/express': 7.8.2(express@4.21.2)(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3) - '@react-router/node': 7.8.2(react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3) - compression: 1.8.1 - express: 4.21.2 - get-port: 5.1.1 - morgan: 1.10.1 - react-router: 7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - source-map-support: 0.5.21 - transitivePeerDependencies: - - supports-color - - typescript - '@remix-run/node@2.17.0(typescript@5.8.3)': dependencies: '@remix-run/server-runtime': 2.17.0(typescript@5.8.3) @@ -17718,11 +14810,10 @@ snapshots: '@rolldown/binding-win32-x64-msvc@1.0.0-beta.34': optional: true - '@rolldown/pluginutils@1.0.0-beta.27': {} - '@rolldown/pluginutils@1.0.0-beta.30': {} - '@rolldown/pluginutils@1.0.0-beta.34': {} + '@rolldown/pluginutils@1.0.0-beta.34': + optional: true '@rollup/plugin-alias@5.1.1(rollup@4.47.1)': optionalDependencies: @@ -17911,8 +15002,6 @@ snapshots: '@rushstack/eslint-patch@1.12.0': {} - '@schummar/icu-type-parser@1.21.5': {} - '@shikijs/core@3.9.2': dependencies: '@shikijs/types': 3.9.2 @@ -17998,13 +15087,11 @@ snapshots: '@standard-schema/spec@1.0.0': {} - '@standard-schema/utils@0.3.0': {} - - '@supabase/auth-js@2.71.1': + '@supabase/auth-js@2.75.0': dependencies: '@supabase/node-fetch': 2.6.15 - '@supabase/functions-js@2.4.5': + '@supabase/functions-js@2.75.0': dependencies: '@supabase/node-fetch': 2.6.15 @@ -18012,11 +15099,11 @@ snapshots: dependencies: whatwg-url: 5.0.0 - '@supabase/postgrest-js@1.19.4': + '@supabase/postgrest-js@2.75.0': dependencies: '@supabase/node-fetch': 2.6.15 - '@supabase/realtime-js@2.15.1': + '@supabase/realtime-js@2.75.0': dependencies: '@supabase/node-fetch': 2.6.15 '@types/phoenix': 1.6.6 @@ -18026,23 +15113,28 @@ snapshots: - bufferutil - utf-8-validate - '@supabase/ssr@0.6.1(@supabase/supabase-js@2.55.0)': + '@supabase/ssr@0.6.1(@supabase/supabase-js@2.75.0)': + dependencies: + '@supabase/supabase-js': 2.75.0 + cookie: 1.0.2 + + '@supabase/ssr@0.7.0(@supabase/supabase-js@2.75.0)': dependencies: - '@supabase/supabase-js': 2.55.0 + '@supabase/supabase-js': 2.75.0 cookie: 1.0.2 - '@supabase/storage-js@2.11.0': + '@supabase/storage-js@2.75.0': dependencies: '@supabase/node-fetch': 2.6.15 - '@supabase/supabase-js@2.55.0': + '@supabase/supabase-js@2.75.0': dependencies: - '@supabase/auth-js': 2.71.1 - '@supabase/functions-js': 2.4.5 + '@supabase/auth-js': 2.75.0 + '@supabase/functions-js': 2.75.0 '@supabase/node-fetch': 2.6.15 - '@supabase/postgrest-js': 1.19.4 - '@supabase/realtime-js': 2.15.1 - '@supabase/storage-js': 2.11.0 + '@supabase/postgrest-js': 2.75.0 + '@supabase/realtime-js': 2.75.0 + '@supabase/storage-js': 2.75.0 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -18264,20 +15356,6 @@ snapshots: postcss: 8.5.6 tailwindcss: 4.1.12 - '@tailwindcss/vite@4.1.12(vite@6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': - dependencies: - '@tailwindcss/node': 4.1.12 - '@tailwindcss/oxide': 4.1.12 - tailwindcss: 4.1.12 - vite: 6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - - '@tailwindcss/vite@4.1.12(vite@6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': - dependencies: - '@tailwindcss/node': 4.1.12 - '@tailwindcss/oxide': 4.1.12 - tailwindcss: 4.1.12 - vite: 6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - '@tanstack/directive-functions-plugin@1.131.2(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': dependencies: '@babel/code-frame': 7.27.1 @@ -18300,29 +15378,6 @@ snapshots: '@tanstack/query-core': 5.83.1 react: 18.3.1 - '@tanstack/react-router-devtools@1.131.28(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@tanstack/router-core@1.131.7)(csstype@3.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(solid-js@1.9.9)(tiny-invariant@1.3.3)': - dependencies: - '@tanstack/react-router': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/router-devtools-core': 1.131.28(@tanstack/router-core@1.131.7)(csstype@3.1.3)(solid-js@1.9.9)(tiny-invariant@1.3.3) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - transitivePeerDependencies: - - '@tanstack/router-core' - - csstype - - solid-js - - tiny-invariant - - '@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@tanstack/history': 1.131.2 - '@tanstack/react-store': 0.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/router-core': 1.131.7 - isbot: 5.1.29 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - tiny-invariant: 1.3.3 - tiny-warning: 1.0.3 - '@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@tanstack/history': 1.131.2 @@ -18334,17 +15389,6 @@ snapshots: tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - '@tanstack/react-start-client@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@tanstack/react-router': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/router-core': 1.131.7 - '@tanstack/start-client-core': 1.131.7 - cookie-es: 1.2.2 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - tiny-invariant: 1.3.3 - tiny-warning: 1.0.3 - '@tanstack/react-start-client@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@tanstack/react-router': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -18356,48 +15400,9 @@ snapshots: tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - '@tanstack/react-start-plugin@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5))': - dependencies: - '@tanstack/start-plugin-core': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)) - '@vitejs/plugin-react': 5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - pathe: 2.0.3 - vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - zod: 3.25.76 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@rsbuild/core' - - '@tanstack/react-router' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/kv' - - aws4fetch - - better-sqlite3 - - drizzle-orm - - encoding - - idb-keyval - - mysql2 - - rolldown - - sqlite3 - - supports-color - - uploadthing - - vite-plugin-solid - - webpack - - xml2js - - '@tanstack/react-start-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': + '@tanstack/react-start-plugin@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: - '@tanstack/start-plugin-core': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) + '@tanstack/start-plugin-core': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) '@vitejs/plugin-react': 5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) pathe: 2.0.3 vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) @@ -18434,77 +15439,22 @@ snapshots: - webpack - xml2js - '@tanstack/react-start-server@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@tanstack/history': 1.131.2 - '@tanstack/react-router': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/router-core': 1.131.7 - '@tanstack/start-client-core': 1.131.7 - '@tanstack/start-server-core': 1.131.7 - h3: 1.13.0 - isbot: 5.1.29 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - '@tanstack/react-start-server@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: - '@tanstack/history': 1.131.2 - '@tanstack/react-router': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@tanstack/router-core': 1.131.7 - '@tanstack/start-client-core': 1.131.7 - '@tanstack/start-server-core': 1.131.7 - h3: 1.13.0 - isbot: 5.1.29 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - - '@tanstack/react-start@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5))': - dependencies: - '@tanstack/react-start-client': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/react-start-plugin': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)) - '@tanstack/react-start-server': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/start-server-functions-client': 1.131.7(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@tanstack/start-server-functions-server': 1.131.2(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@vitejs/plugin-react': 5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@rsbuild/core' - - '@tanstack/react-router' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/kv' - - aws4fetch - - better-sqlite3 - - drizzle-orm - - encoding - - idb-keyval - - mysql2 - - rolldown - - sqlite3 - - supports-color - - uploadthing - - vite-plugin-solid - - webpack - - xml2js + '@tanstack/history': 1.131.2 + '@tanstack/react-router': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@tanstack/router-core': 1.131.7 + '@tanstack/start-client-core': 1.131.7 + '@tanstack/start-server-core': 1.131.7 + h3: 1.13.0 + isbot: 5.1.29 + react: 19.1.1 + react-dom: 19.1.1(react@19.1.1) - '@tanstack/react-start@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': + '@tanstack/react-start@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: '@tanstack/react-start-client': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@tanstack/react-start-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) + '@tanstack/react-start-plugin': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9)) '@tanstack/react-start-server': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@tanstack/start-server-functions-client': 1.131.7(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) '@tanstack/start-server-functions-server': 1.131.2(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) @@ -18544,13 +15494,6 @@ snapshots: - webpack - xml2js - '@tanstack/react-store@0.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@tanstack/store': 0.7.2 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - use-sync-external-store: 1.5.0(react@18.3.1) - '@tanstack/react-store@0.7.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@tanstack/store': 0.7.2 @@ -18568,16 +15511,6 @@ snapshots: tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - '@tanstack/router-devtools-core@1.131.28(@tanstack/router-core@1.131.7)(csstype@3.1.3)(solid-js@1.9.9)(tiny-invariant@1.3.3)': - dependencies: - '@tanstack/router-core': 1.131.7 - clsx: 2.1.1 - goober: 2.1.16(csstype@3.1.3) - solid-js: 1.9.9 - tiny-invariant: 1.3.3 - optionalDependencies: - csstype: 3.1.3 - '@tanstack/router-generator@1.131.7': dependencies: '@tanstack/router-core': 1.131.7 @@ -18591,29 +15524,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@tanstack/router-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5))': - dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.3) - '@babel/template': 7.27.2 - '@babel/traverse': 7.28.3 - '@babel/types': 7.28.2 - '@tanstack/router-core': 1.131.7 - '@tanstack/router-generator': 1.131.7 - '@tanstack/router-utils': 1.131.2 - '@tanstack/virtual-file-routes': 1.131.2 - babel-dead-code-elimination: 1.0.10 - chokidar: 3.6.0 - unplugin: 2.3.5 - zod: 3.25.76 - optionalDependencies: - '@tanstack/react-router': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - webpack: 5.101.1(@swc/core@1.13.5) - transitivePeerDependencies: - - supports-color - '@tanstack/router-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: '@babel/core': 7.28.3 @@ -18672,62 +15582,7 @@ snapshots: tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - '@tanstack/start-plugin-core@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5))': - dependencies: - '@babel/code-frame': 7.26.2 - '@babel/core': 7.28.3 - '@babel/types': 7.28.2 - '@tanstack/router-core': 1.131.7 - '@tanstack/router-generator': 1.131.7 - '@tanstack/router-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)) - '@tanstack/router-utils': 1.131.2 - '@tanstack/server-functions-plugin': 1.131.2(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@tanstack/start-server-core': 1.131.7 - '@types/babel__code-frame': 7.0.6 - '@types/babel__core': 7.20.5 - babel-dead-code-elimination: 1.0.10 - cheerio: 1.1.2 - h3: 1.13.0 - nitropack: 2.12.4(@netlify/blobs@9.1.2)(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34) - pathe: 2.0.3 - ufo: 1.6.1 - vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - vitefu: 1.1.1(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - xmlbuilder2: 3.1.1 - zod: 3.25.76 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@rsbuild/core' - - '@tanstack/react-router' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/kv' - - aws4fetch - - better-sqlite3 - - drizzle-orm - - encoding - - idb-keyval - - mysql2 - - rolldown - - sqlite3 - - supports-color - - uploadthing - - vite-plugin-solid - - webpack - - xml2js - - '@tanstack/start-plugin-core@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-sqlite3@12.2.0)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': + '@tanstack/start-plugin-core@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9))': dependencies: '@babel/code-frame': 7.26.2 '@babel/core': 7.28.3 @@ -18853,10 +15708,6 @@ snapshots: tslib: 2.8.1 optional: true - '@types/accepts@1.3.7': - dependencies: - '@types/node': 22.17.1 - '@types/babel__code-frame@7.0.6': {} '@types/babel__core@7.20.5': @@ -18887,9 +15738,7 @@ snapshots: '@types/body-parser@1.19.6': dependencies: '@types/connect': 3.4.38 - '@types/node': 22.17.1 - - '@types/braces@3.0.5': {} + '@types/node': 20.19.11 '@types/bun@1.2.22(@types/react@18.3.23)': dependencies: @@ -18903,33 +15752,22 @@ snapshots: transitivePeerDependencies: - '@types/react' + '@types/bun@1.2.23(@types/react@19.1.12)': + dependencies: + bun-types: 1.2.23(@types/react@19.1.12) + transitivePeerDependencies: + - '@types/react' + '@types/chai@5.2.2': dependencies: '@types/deep-eql': 4.0.2 '@types/connect@3.4.38': dependencies: - '@types/node': 22.17.1 - - '@types/content-disposition@0.5.9': {} - - '@types/cookie@0.5.4': {} + '@types/node': 20.19.11 '@types/cookie@0.6.0': {} - '@types/cookiejar@2.1.5': {} - - '@types/cookies@0.7.7': - dependencies: - '@types/connect': 3.4.38 - '@types/express': 5.0.3 - '@types/keygrip': 1.0.6 - '@types/node': 22.17.1 - - '@types/cors@2.8.19': - dependencies: - '@types/node': 22.17.1 - '@types/d3-array@3.2.1': {} '@types/d3-color@3.1.3': {} @@ -18981,34 +15819,13 @@ snapshots: '@types/estree@1.0.8': {} - '@types/express-serve-static-core@4.19.6': - dependencies: - '@types/node': 22.17.1 - '@types/qs': 6.14.0 - '@types/range-parser': 1.2.7 - '@types/send': 0.17.5 - '@types/express-serve-static-core@5.0.7': dependencies: - '@types/node': 22.17.1 + '@types/node': 20.19.11 '@types/qs': 6.14.0 '@types/range-parser': 1.2.7 '@types/send': 0.17.5 - '@types/express@4.17.14': - dependencies: - '@types/body-parser': 1.19.6 - '@types/express-serve-static-core': 4.19.6 - '@types/qs': 6.14.0 - '@types/serve-static': 1.15.8 - - '@types/express@4.17.23': - dependencies: - '@types/body-parser': 1.19.6 - '@types/express-serve-static-core': 4.19.6 - '@types/qs': 6.14.0 - '@types/serve-static': 1.15.8 - '@types/express@5.0.3': dependencies: '@types/body-parser': 1.19.6 @@ -19017,7 +15834,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.17.1 + '@types/node': 20.19.11 '@types/hast@2.3.10': dependencies: @@ -19027,8 +15844,6 @@ snapshots: dependencies: '@types/unist': 3.0.3 - '@types/http-assert@1.5.6': {} - '@types/http-errors@2.0.5': {} '@types/istanbul-lib-coverage@2.0.6': {} @@ -19050,54 +15865,18 @@ snapshots: '@types/json5@0.0.29': {} - '@types/keygrip@1.0.6': {} - - '@types/koa-compose@3.2.8': - dependencies: - '@types/koa': 2.15.0 - - '@types/koa@2.15.0': - dependencies: - '@types/accepts': 1.3.7 - '@types/content-disposition': 0.5.9 - '@types/cookies': 0.7.7 - '@types/http-assert': 1.5.6 - '@types/http-errors': 2.0.5 - '@types/keygrip': 1.0.6 - '@types/koa-compose': 3.2.8 - '@types/node': 22.17.1 - '@types/mdast@4.0.4': dependencies: '@types/unist': 3.0.3 '@types/mdx@2.0.13': {} - '@types/methods@1.1.4': {} - - '@types/micromatch@4.0.9': - dependencies: - '@types/braces': 3.0.5 - '@types/mime@1.3.5': {} '@types/minimist@1.2.5': {} - '@types/morgan@1.9.10': - dependencies: - '@types/node': 22.17.1 - '@types/ms@2.1.0': {} - '@types/node-fetch@2.6.2': - dependencies: - '@types/node': 22.17.1 - form-data: 3.0.4 - - '@types/node@16.18.6': {} - - '@types/node@17.0.45': {} - '@types/node@18.17.0': {} '@types/node@20.19.10': @@ -19122,7 +15901,7 @@ snapshots: '@types/pg@8.15.5': dependencies: - '@types/node': 22.17.1 + '@types/node': 20.19.11 pg-protocol: 1.10.3 pg-types: 2.2.0 @@ -19170,30 +15949,18 @@ snapshots: '@types/send@0.17.5': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.17.1 + '@types/node': 20.19.11 '@types/serve-static@1.15.8': dependencies: '@types/http-errors': 2.0.5 - '@types/node': 22.17.1 + '@types/node': 20.19.11 '@types/send': 0.17.5 '@types/stack-utils@2.0.3': {} '@types/statuses@2.0.6': {} - '@types/superagent@8.1.9': - dependencies: - '@types/cookiejar': 2.1.5 - '@types/methods': 1.1.4 - '@types/node': 22.17.1 - form-data: 4.0.4 - - '@types/supertest@6.0.3': - dependencies: - '@types/methods': 1.1.4 - '@types/superagent': 8.1.9 - '@types/tough-cookie@4.0.5': {} '@types/triple-beam@1.3.5': {} @@ -19204,7 +15971,7 @@ snapshots: '@types/ws@8.18.1': dependencies: - '@types/node': 22.17.1 + '@types/node': 20.19.11 '@types/yargs-parser@21.0.3': {} @@ -19214,45 +15981,9 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.17.1 + '@types/node': 20.19.11 optional: true - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 7.18.0 - eslint: 8.57.1 - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/utils': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 7.18.0 - eslint: 9.29.0(jiti@2.5.1) - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -19271,51 +16002,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/utils': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 7.18.0 - eslint: 9.34.0(jiti@2.5.1) - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/utils': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/visitor-keys': 7.18.0 - eslint: 9.34.0(jiti@2.5.1) - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.4.3(typescript@5.9.2) - optionalDependencies: - typescript: 5.9.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) '@typescript-eslint/scope-manager': 8.31.1 - '@typescript-eslint/type-utils': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/utils': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/type-utils': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.31.1 - eslint: 9.34.0(jiti@2.5.1) + eslint: 9.29.0(jiti@2.5.1) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -19324,80 +16019,54 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4))(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4) - '@typescript-eslint/scope-manager': 8.34.1 - '@typescript-eslint/type-utils': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4) - '@typescript-eslint/utils': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4) - '@typescript-eslint/visitor-keys': 8.34.1 - eslint: 9.29.0(jiti@2.5.1) - graphemer: 1.4.0 - ignore: 7.0.5 - natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.5.4) - typescript: 5.5.4 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/eslint-plugin@8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3))(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3) - '@typescript-eslint/scope-manager': 8.34.1 - '@typescript-eslint/type-utils': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3) - '@typescript-eslint/utils': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3) - '@typescript-eslint/visitor-keys': 8.34.1 + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/type-utils': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/utils': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.31.1 eslint: 9.29.0(jiti@2.5.1) graphemer: 1.4.0 - ignore: 7.0.5 + ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.7.3) - typescript: 5.7.3 + ts-api-utils: 2.1.0(typescript@5.9.2) + typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.41.0(@typescript-eslint/parser@8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/scope-manager': 8.41.0 - '@typescript-eslint/type-utils': 8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/utils': 8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.41.0 + '@typescript-eslint/parser': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/type-utils': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 eslint: 9.34.0(jiti@2.5.1) graphemer: 1.4.0 - ignore: 7.0.5 + ignore: 5.3.2 natural-compare: 1.4.0 ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3)': - dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.4.1(supports-color@5.5.0) - eslint: 8.57.1 - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4))(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4)': dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.4.1(supports-color@5.5.0) + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4) + '@typescript-eslint/scope-manager': 8.34.1 + '@typescript-eslint/type-utils': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4) + '@typescript-eslint/utils': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.34.1 eslint: 9.29.0(jiti@2.5.1) - optionalDependencies: - typescript: 5.8.3 + graphemer: 1.4.0 + ignore: 7.0.5 + natural-compare: 1.4.0 + ts-api-utils: 2.1.0(typescript@5.5.4) + typescript: 5.5.4 transitivePeerDependencies: - supports-color @@ -19414,28 +16083,26 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': + '@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3)': dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 debug: 4.4.1(supports-color@5.5.0) - eslint: 9.34.0(jiti@2.5.1) - optionalDependencies: + eslint: 9.29.0(jiti@2.5.1) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': + '@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) - '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.31.1 debug: 4.4.1(supports-color@5.5.0) - eslint: 9.34.0(jiti@2.5.1) - optionalDependencies: + eslint: 9.29.0(jiti@2.5.1) typescript: 5.9.2 transitivePeerDependencies: - supports-color @@ -19464,30 +16131,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.34.1 - '@typescript-eslint/types': 8.34.1 - '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.7.3) - '@typescript-eslint/visitor-keys': 8.34.1 - debug: 4.4.1(supports-color@5.5.0) - eslint: 9.29.0(jiti@2.5.1) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.41.0 - '@typescript-eslint/types': 8.41.0 - '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.41.0 - debug: 4.4.1(supports-color@5.5.0) - eslint: 9.34.0(jiti@2.5.1) - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/project-service@8.34.1(typescript@5.5.4)': dependencies: '@typescript-eslint/tsconfig-utils': 8.39.1(typescript@5.5.4) @@ -19497,21 +16140,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.34.1(typescript@5.7.3)': - dependencies: - '@typescript-eslint/tsconfig-utils': 8.39.1(typescript@5.7.3) - '@typescript-eslint/types': 8.41.0 - debug: 4.4.1(supports-color@5.5.0) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/project-service@8.41.0(typescript@5.8.3)': + '@typescript-eslint/project-service@8.41.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.8.3) + '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.9.3) '@typescript-eslint/types': 8.41.0 debug: 4.4.1(supports-color@5.5.0) - typescript: 5.8.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -19530,54 +16164,17 @@ snapshots: '@typescript-eslint/types': 8.34.1 '@typescript-eslint/visitor-keys': 8.34.1 - '@typescript-eslint/scope-manager@8.41.0': - dependencies: - '@typescript-eslint/types': 8.41.0 - '@typescript-eslint/visitor-keys': 8.41.0 - '@typescript-eslint/tsconfig-utils@8.34.1(typescript@5.5.4)': dependencies: typescript: 5.5.4 - '@typescript-eslint/tsconfig-utils@8.34.1(typescript@5.7.3)': - dependencies: - typescript: 5.7.3 - '@typescript-eslint/tsconfig-utils@8.39.1(typescript@5.5.4)': dependencies: typescript: 5.5.4 - '@typescript-eslint/tsconfig-utils@8.39.1(typescript@5.7.3)': - dependencies: - typescript: 5.7.3 - - '@typescript-eslint/tsconfig-utils@8.41.0(typescript@5.8.3)': - dependencies: - typescript: 5.8.3 - - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.8.3)': - dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - debug: 4.4.1(supports-color@5.5.0) - eslint: 8.57.1 - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/type-utils@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3)': + '@typescript-eslint/tsconfig-utils@8.41.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - '@typescript-eslint/utils': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) - debug: 4.4.1(supports-color@5.5.0) - eslint: 9.29.0(jiti@2.5.1) - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color + typescript: 5.9.3 '@typescript-eslint/type-utils@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: @@ -19591,26 +16188,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3)': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - '@typescript-eslint/utils': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) debug: 4.4.1(supports-color@5.5.0) - eslint: 9.34.0(jiti@2.5.1) - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: + eslint: 9.29.0(jiti@2.5.1) + ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': + '@typescript-eslint/type-utils@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) - '@typescript-eslint/utils': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.9.2) + '@typescript-eslint/utils': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) debug: 4.4.1(supports-color@5.5.0) - eslint: 9.34.0(jiti@2.5.1) - ts-api-utils: 1.4.3(typescript@5.9.2) - optionalDependencies: + eslint: 9.29.0(jiti@2.5.1) + ts-api-utils: 2.1.0(typescript@5.9.2) typescript: 5.9.2 transitivePeerDependencies: - supports-color @@ -19637,29 +16232,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3)': - dependencies: - '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.7.3) - '@typescript-eslint/utils': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3) - debug: 4.4.1(supports-color@5.5.0) - eslint: 9.29.0(jiti@2.5.1) - ts-api-utils: 2.1.0(typescript@5.7.3) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/type-utils@8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': - dependencies: - '@typescript-eslint/types': 8.41.0 - '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - debug: 4.4.1(supports-color@5.5.0) - eslint: 9.34.0(jiti@2.5.1) - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/types@7.18.0': {} '@typescript-eslint/types@8.31.1': {} @@ -19668,21 +16240,6 @@ snapshots: '@typescript-eslint/types@8.41.0': {} - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.8.3)': - dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.4.1(supports-color@5.5.0) - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.7.2 - ts-api-utils: 1.4.3(typescript@5.8.3) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.9.2)': dependencies: '@typescript-eslint/types': 7.18.0 @@ -19712,26 +16269,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.34.1(typescript@5.5.4)': + '@typescript-eslint/typescript-estree@8.31.1(typescript@5.9.2)': dependencies: - '@typescript-eslint/project-service': 8.34.1(typescript@5.5.4) - '@typescript-eslint/tsconfig-utils': 8.34.1(typescript@5.5.4) - '@typescript-eslint/types': 8.34.1 - '@typescript-eslint/visitor-keys': 8.34.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 debug: 4.4.1(supports-color@5.5.0) fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.7.2 - ts-api-utils: 2.1.0(typescript@5.5.4) - typescript: 5.5.4 + ts-api-utils: 2.1.0(typescript@5.9.2) + typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.34.1(typescript@5.7.3)': + '@typescript-eslint/typescript-estree@8.34.1(typescript@5.5.4)': dependencies: - '@typescript-eslint/project-service': 8.34.1(typescript@5.7.3) - '@typescript-eslint/tsconfig-utils': 8.34.1(typescript@5.7.3) + '@typescript-eslint/project-service': 8.34.1(typescript@5.5.4) + '@typescript-eslint/tsconfig-utils': 8.34.1(typescript@5.5.4) '@typescript-eslint/types': 8.34.1 '@typescript-eslint/visitor-keys': 8.34.1 debug: 4.4.1(supports-color@5.5.0) @@ -19739,15 +16294,15 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.7.2 - ts-api-utils: 2.1.0(typescript@5.7.3) - typescript: 5.7.3 + ts-api-utils: 2.1.0(typescript@5.5.4) + typescript: 5.5.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.41.0(typescript@5.8.3)': + '@typescript-eslint/typescript-estree@8.41.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/project-service': 8.41.0(typescript@5.8.3) - '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.8.3) + '@typescript-eslint/project-service': 8.41.0(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.9.3) '@typescript-eslint/types': 8.41.0 '@typescript-eslint/visitor-keys': 8.41.0 debug: 4.4.1(supports-color@5.5.0) @@ -19755,32 +16310,10 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.7.2 - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.8.3)': - dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/utils@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3)': - dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.5.1)) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - eslint: 9.29.0(jiti@2.5.1) + ts-api-utils: 2.1.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - supports-color - - typescript '@typescript-eslint/utils@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: @@ -19793,27 +16326,27 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': + '@typescript-eslint/utils@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.34.0(jiti@2.5.1)) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.3) - eslint: 9.34.0(jiti@2.5.1) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.5.1)) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + eslint: 9.29.0(jiti@2.5.1) + typescript: 5.8.3 transitivePeerDependencies: - supports-color - - typescript - '@typescript-eslint/utils@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': + '@typescript-eslint/utils@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.34.0(jiti@2.5.1)) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) - eslint: 9.34.0(jiti@2.5.1) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.5.1)) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.9.2) + eslint: 9.29.0(jiti@2.5.1) + typescript: 5.9.2 transitivePeerDependencies: - supports-color - - typescript '@typescript-eslint/utils@8.31.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': dependencies: @@ -19837,28 +16370,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3)': - dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.5.1)) - '@typescript-eslint/scope-manager': 8.34.1 - '@typescript-eslint/types': 8.34.1 - '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.7.3) - eslint: 9.29.0(jiti@2.5.1) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3)': - dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.34.0(jiti@2.5.1)) - '@typescript-eslint/scope-manager': 8.41.0 - '@typescript-eslint/types': 8.41.0 - '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.8.3) - eslint: 9.34.0(jiti@2.5.1) - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/visitor-keys@7.18.0': dependencies: '@typescript-eslint/types': 7.18.0 @@ -19948,57 +16459,25 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true - '@vdemedes/prettier-config@2.0.1': {} - - '@vercel/nft@0.29.4(rollup@4.47.1)': - dependencies: - '@mapbox/node-pre-gyp': 2.0.0 - '@rollup/pluginutils': 5.2.0(rollup@4.47.1) - acorn: 8.15.0 - acorn-import-attributes: 1.9.5(acorn@8.15.0) - async-sema: 3.1.1 - bindings: 1.5.0 - estree-walker: 2.0.2 - glob: 10.4.5 - graceful-fs: 4.2.11 - node-gyp-build: 4.8.4 - picomatch: 4.0.3 - resolve-from: 5.0.0 - transitivePeerDependencies: - - encoding - - rollup - - supports-color - - '@vinxi/listhen@1.5.6': - dependencies: - '@parcel/watcher': 2.5.1 - '@parcel/watcher-wasm': 2.3.0 - citty: 0.1.6 - clipboardy: 4.0.0 - consola: 3.4.2 - defu: 6.1.4 - get-port-please: 3.2.0 - h3: 1.15.4 - http-shutdown: 1.2.2 - jiti: 1.21.7 - mlly: 1.7.4 - node-forge: 1.3.1 - pathe: 1.1.2 - std-env: 3.9.0 - ufo: 1.6.1 - untun: 0.1.3 - uqr: 0.1.2 + '@vdemedes/prettier-config@2.0.1': {} - '@vitejs/plugin-react@4.7.0(vite@6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': + '@vercel/nft@0.29.4(rollup@4.47.1)': dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.28.3) - '@rolldown/pluginutils': 1.0.0-beta.27 - '@types/babel__core': 7.20.5 - react-refresh: 0.17.0 - vite: 6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + '@mapbox/node-pre-gyp': 2.0.0 + '@rollup/pluginutils': 5.2.0(rollup@4.47.1) + acorn: 8.15.0 + acorn-import-attributes: 1.9.5(acorn@8.15.0) + async-sema: 3.1.1 + bindings: 1.5.0 + estree-walker: 2.0.2 + glob: 10.4.5 + graceful-fs: 4.2.11 + node-gyp-build: 4.8.4 + picomatch: 4.0.3 + resolve-from: 5.0.0 transitivePeerDependencies: + - encoding + - rollup - supports-color '@vitejs/plugin-react@5.0.0(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': @@ -20013,19 +16492,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-rsc@0.4.11(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(vite@6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': - dependencies: - '@mjackson/node-fetch-server': 0.7.0 - es-module-lexer: 1.7.0 - estree-walker: 3.0.3 - magic-string: 0.30.17 - periscopic: 4.0.2 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - turbo-stream: 3.1.0 - vite: 6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - vitefu: 1.1.1(vite@6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@vitest/expect@3.2.4': dependencies: '@types/chai': 5.2.2 @@ -20043,14 +16509,6 @@ snapshots: msw: 2.10.4(@types/node@18.17.0)(typescript@5.5.4) vite: 6.3.5(@types/node@18.17.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - '@vitest/mocker@3.2.4(vite@6.3.5(@types/node@20.19.11)(jiti@2.5.1))': - dependencies: - '@vitest/spy': 3.2.4 - estree-walker: 3.0.3 - magic-string: 0.30.17 - optionalDependencies: - vite: 6.3.5(@types/node@20.19.11)(jiti@2.5.1) - '@vitest/pretty-format@3.2.4': dependencies: tinyrainbow: 2.0.0 @@ -20215,38 +16673,6 @@ snapshots: '@whatwg-node/promise-helpers': 1.3.2 tslib: 2.8.1 - '@workos-inc/authkit-js@0.13.0': {} - - '@workos-inc/authkit-nextjs@2.5.0(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@workos-inc/node': 7.69.1(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)) - iron-session: 8.0.4 - jose: 5.10.0 - next: 15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - path-to-regexp: 6.3.0 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - transitivePeerDependencies: - - express - - koa - - '@workos-inc/authkit-react@0.11.0(react@19.1.1)': - dependencies: - '@workos-inc/authkit-js': 0.13.0 - react: 19.1.1 - - '@workos-inc/node@7.69.1(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))': - dependencies: - iron-session: 6.3.1(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)) - jose: 5.6.3 - leb: 1.0.0 - pluralize: 8.0.0 - qs: 6.14.0 - transitivePeerDependencies: - - express - - koa - - next - '@xtuc/ieee754@1.2.0': {} '@xtuc/long@4.2.2': {} @@ -20262,11 +16688,6 @@ snapshots: abstract-logging@2.0.1: {} - accepts@1.3.8: - dependencies: - mime-types: 2.1.35 - negotiator: 0.6.3 - accepts@2.0.0: dependencies: mime-types: 3.0.1 @@ -20329,10 +16750,6 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - ansi-align@3.0.1: - dependencies: - string-width: 4.2.3 - ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 @@ -20411,8 +16828,6 @@ snapshots: array-find-index@1.0.2: {} - array-flatten@1.1.1: {} - array-includes@3.1.9: dependencies: call-bind: 1.0.8 @@ -20483,8 +16898,6 @@ snapshots: arrify@3.0.0: {} - asap@2.0.6: {} - asn1js@3.0.6: dependencies: pvtsutils: 1.3.6 @@ -20493,11 +16906,6 @@ snapshots: assertion-error@2.0.1: {} - ast-kit@2.1.2: - dependencies: - '@babel/parser': 7.28.3 - pathe: 2.0.3 - ast-module-types@6.0.1: {} ast-types-flow@0.0.8: {} @@ -20710,10 +17118,6 @@ snapshots: base64-js@1.5.1: {} - basic-auth@2.0.1: - dependencies: - safe-buffer: 5.1.2 - bcp-47-match@2.0.3: {} better-auth@1.3.24(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): @@ -20737,7 +17141,7 @@ snapshots: react-dom: 18.3.1(react@18.3.1) optional: true - better-auth@1.3.24(next@15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + better-auth@1.3.24(next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: '@better-auth/core': 1.3.24 '@better-auth/utils': 0.3.0 @@ -20753,82 +17157,30 @@ snapshots: nanostores: 1.0.1 zod: 4.1.5 optionalDependencies: - next: 15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + next: 15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - better-auth@1.3.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1): - dependencies: - '@better-auth/utils': 0.2.5 - '@better-fetch/fetch': 1.1.18 - '@noble/ciphers': 0.6.0 - '@noble/hashes': 1.8.0 - '@simplewebauthn/browser': 13.1.2 - '@simplewebauthn/server': 13.1.2 - better-call: 1.0.19 - defu: 6.1.4 - jose: 5.10.0 - kysely: 0.28.5 - nanostores: 0.11.4 - zod: 4.1.5 - optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - better-auth@1.3.4(react-dom@19.1.0(react@19.1.0))(react@19.1.0): - dependencies: - '@better-auth/utils': 0.2.5 - '@better-fetch/fetch': 1.1.18 - '@noble/ciphers': 0.6.0 - '@noble/hashes': 1.8.0 - '@simplewebauthn/browser': 13.1.2 - '@simplewebauthn/server': 13.1.2 - better-call: 1.0.19 - defu: 6.1.4 - jose: 5.10.0 - kysely: 0.28.5 - nanostores: 0.11.4 - zod: 4.1.5 - optionalDependencies: - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - - better-auth@1.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + better-auth@1.3.24(next@15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: - '@better-auth/utils': 0.2.5 + '@better-auth/core': 1.3.24 + '@better-auth/utils': 0.3.0 '@better-fetch/fetch': 1.1.18 - '@noble/ciphers': 0.6.0 - '@noble/hashes': 1.8.0 + '@noble/ciphers': 2.0.1 + '@noble/hashes': 2.0.1 '@simplewebauthn/browser': 13.1.2 '@simplewebauthn/server': 13.1.2 better-call: 1.0.19 defu: 6.1.4 - jose: 5.10.0 + jose: 6.1.0 kysely: 0.28.5 - nanostores: 0.11.4 + nanostores: 1.0.1 zod: 4.1.5 optionalDependencies: + next: 15.4.1(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - better-auth@1.3.7(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(zod@3.25.76): - dependencies: - '@better-auth/utils': 0.2.6 - '@better-fetch/fetch': 1.1.18 - '@noble/ciphers': 0.6.0 - '@noble/hashes': 1.8.0 - '@simplewebauthn/browser': 13.1.2 - '@simplewebauthn/server': 13.1.2 - better-call: 1.0.19 - defu: 6.1.4 - jose: 5.10.0 - kysely: 0.28.5 - nanostores: 0.11.4 - zod: 3.25.76 - optionalDependencies: - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - better-auth@1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.0.17): dependencies: '@better-auth/utils': 0.2.6 @@ -20847,13 +17199,6 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - better-call@1.0.13: - dependencies: - '@better-fetch/fetch': 1.1.18 - rou3: 0.5.1 - set-cookie-parser: 2.7.1 - uncrypto: 0.1.3 - better-call@1.0.19: dependencies: '@better-auth/utils': 0.3.0 @@ -20873,8 +17218,6 @@ snapshots: dependencies: file-uri-to-path: 1.0.0 - birpc@2.5.0: {} - bl@4.1.0: dependencies: buffer: 5.7.1 @@ -20889,23 +17232,6 @@ snapshots: blueimp-md5@2.19.0: {} - body-parser@1.20.3: - dependencies: - bytes: 3.1.2 - content-type: 1.0.5 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.13.0 - raw-body: 2.5.2 - type-is: 1.6.18 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - body-parser@2.2.0: dependencies: bytes: 3.1.2 @@ -20922,17 +17248,6 @@ snapshots: boolbase@1.0.0: {} - boxen@7.1.1: - dependencies: - ansi-align: 3.0.1 - camelcase: 7.0.1 - chalk: 5.5.0 - cli-boxes: 3.0.0 - string-width: 5.1.2 - type-fest: 2.19.0 - widest-line: 4.0.1 - wrap-ansi: 8.1.0 - brace-expansion@1.1.12: dependencies: balanced-match: 1.0.2 @@ -20992,14 +17307,19 @@ snapshots: bun-types@1.2.22(@types/react@18.3.23): dependencies: - '@types/node': 22.17.1 + '@types/node': 20.19.11 '@types/react': 18.3.23 bun-types@1.2.23(@types/react@19.1.10): dependencies: - '@types/node': 22.17.1 + '@types/node': 20.19.11 '@types/react': 19.1.10 + bun-types@1.2.23(@types/react@19.1.12): + dependencies: + '@types/node': 20.19.11 + '@types/react': 19.1.12 + bundle-name@4.1.0: dependencies: run-applescript: 7.0.0 @@ -21020,7 +17340,7 @@ snapshots: chokidar: 4.0.3 confbox: 0.2.2 defu: 6.1.4 - dotenv: 17.2.1 + dotenv: 17.2.3 exsolve: 1.0.7 giget: 2.0.0 jiti: 2.5.1 @@ -21059,12 +17379,6 @@ snapshots: camelcase-css@2.0.1: {} - camelcase-keys@6.2.2: - dependencies: - camelcase: 5.3.1 - map-obj: 4.3.0 - quick-lru: 4.0.1 - camelcase-keys@8.0.2: dependencies: camelcase: 7.0.1 @@ -21096,12 +17410,6 @@ snapshots: loupe: 3.2.1 pathval: 2.0.1 - chalk@2.4.2: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -21335,14 +17643,10 @@ snapshots: common-path-prefix@3.0.0: {} - common-tags@1.8.2: {} - commondir@1.0.1: {} compatx@0.2.0: {} - component-emitter@1.3.1: {} - compress-commons@6.0.2: dependencies: crc-32: 1.2.2 @@ -21351,22 +17655,6 @@ snapshots: normalize-path: 3.0.0 readable-stream: 4.7.0 - compressible@2.0.18: - dependencies: - mime-db: 1.54.0 - - compression@1.8.1: - dependencies: - bytes: 3.1.2 - compressible: 2.0.18 - debug: 2.6.9 - negotiator: 0.6.4 - on-headers: 1.1.0 - safe-buffer: 5.2.1 - vary: 1.1.2 - transitivePeerDependencies: - - supports-color - compute-scroll-into-view@3.1.1: {} concat-map@0.0.1: {} @@ -21399,10 +17687,6 @@ snapshots: consola@3.4.2: {} - content-disposition@0.5.4: - dependencies: - safe-buffer: 5.2.1 - content-disposition@1.0.0: dependencies: safe-buffer: 5.2.1 @@ -21423,16 +17707,6 @@ snapshots: typescript: 5.5.4 zod: 4.1.5 - convex-helpers@0.1.104(@standard-schema/spec@1.0.0)(convex@1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0))(hono@4.9.1)(react@19.1.0)(typescript@5.7.3)(zod@3.25.76): - dependencies: - convex: 1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) - optionalDependencies: - '@standard-schema/spec': 1.0.0 - hono: 4.9.1 - react: 19.1.0 - typescript: 5.7.3 - zod: 3.25.76 - convex-test@0.0.37(convex@1.25.4(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)): dependencies: convex: 1.25.4(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) @@ -21446,19 +17720,18 @@ snapshots: '@clerk/clerk-react': 5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: 19.1.1 - convex@1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0): + convex@1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1): dependencies: esbuild: 0.25.4 jwt-decode: 4.0.0 prettier: 3.6.2 optionalDependencies: - '@clerk/clerk-react': 5.45.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - react: 19.1.0 + '@clerk/clerk-react': 5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + react: 19.1.1 - convex@1.26.2(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1): + convex@1.27.5(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1): dependencies: esbuild: 0.25.4 - jwt-decode: 4.0.0 prettier: 3.6.2 optionalDependencies: '@clerk/clerk-react': 5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -21468,20 +17741,12 @@ snapshots: cookie-es@2.0.0: {} - cookie-signature@1.0.6: {} - cookie-signature@1.2.2: {} - cookie@0.5.0: {} - - cookie@0.7.1: {} - cookie@0.7.2: {} cookie@1.0.2: {} - cookiejar@2.1.4: {} - copy-file@11.1.0: dependencies: graceful-fs: 4.2.11 @@ -21511,8 +17776,6 @@ snapshots: optionalDependencies: typescript: 5.9.2 - country-flag-icons@1.5.19: {} - crc-32@1.2.2: {} crc32-stream@6.0.0: @@ -21535,21 +17798,6 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - create-require@1.1.1: {} cron-parser@4.9.0: @@ -21558,14 +17806,6 @@ snapshots: croner@9.1.0: {} - cross-spawn@6.0.6: - dependencies: - nice-try: 1.0.5 - path-key: 2.0.1 - semver: 5.7.2 - shebang-command: 1.2.0 - which: 1.3.1 - cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -21590,8 +17830,6 @@ snapshots: cssesc@3.0.0: {} - csstype@3.1.1: {} - csstype@3.1.3: {} currently-unhandled@0.4.1: @@ -21664,19 +17902,10 @@ snapshots: dependencies: time-zone: 1.0.0 - dax-sh@0.39.2: - dependencies: - '@deno/shim-deno': 0.19.2 - undici-types: 5.28.4 - db0@0.3.2(better-sqlite3@12.2.0): optionalDependencies: better-sqlite3: 12.2.0 - debug@2.6.9: - dependencies: - ms: 2.0.0 - debug@3.2.7: dependencies: ms: 2.1.3 @@ -21702,8 +17931,6 @@ snapshots: decimal.js-light@2.5.1: {} - decimal.js@10.6.0: {} - decode-named-character-reference@1.2.0: dependencies: character-entities: 2.0.2 @@ -21722,8 +17949,6 @@ snapshots: deep-is@0.1.4: {} - deepmerge@4.2.2: {} - deepmerge@4.3.1: {} default-browser-id@5.0.0: {} @@ -21765,8 +17990,6 @@ snapshots: destr@2.0.5: {} - destroy@1.2.0: {} - detect-libc@1.0.3: {} detect-libc@2.0.4: {} @@ -21809,16 +18032,16 @@ snapshots: detective-stylus@5.0.1: {} - detective-typescript@14.0.0(typescript@5.8.3): + detective-typescript@14.0.0(typescript@5.9.3): dependencies: - '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.9.3) ast-module-types: 6.0.1 node-source-walk: 7.0.1 - typescript: 5.8.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color - detective-vue2@2.2.0(typescript@5.8.3): + detective-vue2@2.2.0(typescript@5.9.3): dependencies: '@dependents/detective-less': 5.0.1 '@vue/compiler-sfc': 3.5.18 @@ -21826,8 +18049,8 @@ snapshots: detective-sass: 6.0.1 detective-scss: 5.0.1 detective-stylus: 5.0.1 - detective-typescript: 14.0.0(typescript@5.8.3) - typescript: 5.8.3 + detective-typescript: 14.0.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -21835,11 +18058,6 @@ snapshots: dependencies: dequal: 2.0.3 - dezalgo@1.0.4: - dependencies: - asap: 2.0.6 - wrappy: 1.0.2 - didyoumean@1.2.2: {} diff-sequences@29.6.3: {} @@ -21889,11 +18107,6 @@ snapshots: domelementtype: 2.3.0 domhandler: 5.0.3 - dot-case@3.0.4: - dependencies: - no-case: 3.0.4 - tslib: 2.8.1 - dot-prop@9.0.0: dependencies: type-fest: 4.41.0 @@ -21902,7 +18115,7 @@ snapshots: dotenv@17.2.1: {} - dts-resolver@2.1.2: {} + dotenv@17.2.3: {} dunder-proto@1.0.1: dependencies: @@ -21920,15 +18133,6 @@ snapshots: electron-to-chromium@1.5.208: {} - elysia-clerk@0.12.1(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3))(react-dom@19.1.1(react@19.1.1))(react@19.1.1): - dependencies: - '@clerk/backend': 2.7.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/shared': 3.19.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - elysia: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3) - transitivePeerDependencies: - - react - - react-dom - elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.8.3): dependencies: cookie: 1.0.2 @@ -21954,12 +18158,8 @@ snapshots: emojilib@2.4.0: {} - empathic@2.0.0: {} - enabled@2.0.0: {} - encodeurl@1.0.2: {} - encodeurl@2.0.0: {} encoding-sniffer@0.2.1: @@ -21996,8 +18196,6 @@ snapshots: environment@1.1.0: {} - err-code@2.0.3: {} - error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 @@ -22135,32 +18333,6 @@ snapshots: transitivePeerDependencies: - ts-node - esbuild@0.20.2: - optionalDependencies: - '@esbuild/aix-ppc64': 0.20.2 - '@esbuild/android-arm': 0.20.2 - '@esbuild/android-arm64': 0.20.2 - '@esbuild/android-x64': 0.20.2 - '@esbuild/darwin-arm64': 0.20.2 - '@esbuild/darwin-x64': 0.20.2 - '@esbuild/freebsd-arm64': 0.20.2 - '@esbuild/freebsd-x64': 0.20.2 - '@esbuild/linux-arm': 0.20.2 - '@esbuild/linux-arm64': 0.20.2 - '@esbuild/linux-ia32': 0.20.2 - '@esbuild/linux-loong64': 0.20.2 - '@esbuild/linux-mips64el': 0.20.2 - '@esbuild/linux-ppc64': 0.20.2 - '@esbuild/linux-riscv64': 0.20.2 - '@esbuild/linux-s390x': 0.20.2 - '@esbuild/linux-x64': 0.20.2 - '@esbuild/netbsd-x64': 0.20.2 - '@esbuild/openbsd-x64': 0.20.2 - '@esbuild/sunos-x64': 0.20.2 - '@esbuild/win32-arm64': 0.20.2 - '@esbuild/win32-ia32': 0.20.2 - '@esbuild/win32-x64': 0.20.2 - esbuild@0.25.4: optionalDependencies: '@esbuild/aix-ppc64': 0.25.4 @@ -22256,33 +18428,15 @@ snapshots: escape-string-regexp@4.0.0: {} - escape-string-regexp@5.0.0: {} - - escodegen@2.1.0: - dependencies: - esprima: 4.0.1 - estraverse: 5.3.0 - esutils: 2.0.3 - optionalDependencies: - source-map: 0.6.1 - - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.32.0)(eslint@8.57.1): - dependencies: - confusing-browser-globals: 1.0.11 - eslint: 8.57.1 - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) - object.assign: 4.1.7 - object.entries: 1.1.9 - semver: 6.3.1 - - eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3))(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-plugin-import@2.32.0)(eslint@8.57.1): + escape-string-regexp@5.0.0: {} + + escodegen@2.1.0: dependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint@8.57.1)(typescript@5.8.3) - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - eslint: 8.57.1 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.32.0)(eslint@8.57.1) - transitivePeerDependencies: - - eslint-plugin-import + esprima: 4.0.1 + estraverse: 5.3.0 + esutils: 2.0.3 + optionalDependencies: + source-map: 0.6.1 eslint-config-next@15.1.4(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2): dependencies: @@ -22304,36 +18458,36 @@ snapshots: - eslint-plugin-import-x - supports-color - eslint-config-next@15.2.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2): + eslint-config-next@15.3.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3): dependencies: - '@next/eslint-plugin-next': 15.2.1 + '@next/eslint-plugin-next': 15.3.1 '@rushstack/eslint-patch': 1.12.0 - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - eslint: 9.34.0(jiti@2.5.1) + '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) + eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-jsx-a11y: 6.10.2(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-react: 7.37.5(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-react-hooks: 5.2.0(eslint@9.34.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-react-hooks: 5.2.0(eslint@9.29.0(jiti@2.5.1)) optionalDependencies: - typescript: 5.9.2 + typescript: 5.8.3 transitivePeerDependencies: - eslint-import-resolver-webpack - eslint-plugin-import-x - supports-color - eslint-config-next@15.2.3(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3): + eslint-config-next@15.3.4(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3): dependencies: - '@next/eslint-plugin-next': 15.2.3 + '@next/eslint-plugin-next': 15.3.4 '@rushstack/eslint-patch': 1.12.0 - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.29.0(jiti@2.5.1)) @@ -22348,12 +18502,12 @@ snapshots: dependencies: '@next/eslint-plugin-next': 15.3.4 '@rushstack/eslint-patch': 1.12.0 - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.29.0(jiti@2.5.1)) @@ -22364,26 +18518,6 @@ snapshots: - eslint-plugin-import-x - supports-color - eslint-config-next@15.4.1(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3): - dependencies: - '@next/eslint-plugin-next': 15.4.1 - '@rushstack/eslint-patch': 1.12.0 - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - eslint: 9.34.0(jiti@2.5.1) - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-jsx-a11y: 6.10.2(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-react: 7.37.5(eslint@9.34.0(jiti@2.5.1)) - eslint-plugin-react-hooks: 5.2.0(eslint@9.34.0(jiti@2.5.1)) - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - eslint-import-resolver-webpack - - eslint-plugin-import-x - - supports-color - eslint-config-prettier@8.10.2(eslint@8.57.1): dependencies: eslint: 8.57.1 @@ -22423,18 +18557,18 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@5.5.0) - eslint: 8.57.1 + eslint: 9.29.0(jiti@2.5.1) get-tsconfig: 4.10.1 is-bun-module: 2.0.0 stable-hash: 0.0.5 tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color @@ -22449,22 +18583,7 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) - transitivePeerDependencies: - - supports-color - - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)): - dependencies: - '@nolyfill/is-core-module': 1.0.39 - debug: 4.4.1(supports-color@5.5.0) - eslint: 9.34.0(jiti@2.5.1) - get-tsconfig: 4.10.1 - is-bun-module: 2.0.0 - stable-hash: 0.0.5 - tinyglobby: 0.2.14 - unrs-resolver: 1.11.1 - optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color @@ -22485,28 +18604,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - eslint: 8.57.1 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1) - transitivePeerDependencies: - - supports-color - - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) - eslint: 9.29.0(jiti@2.5.1) - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) - transitivePeerDependencies: - - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): dependencies: debug: 3.2.7 @@ -22518,25 +18615,25 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - eslint: 9.34.0(jiti@2.5.1) + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) + eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - eslint: 9.34.0(jiti@2.5.1) + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) + eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.34.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color @@ -22574,64 +18671,6 @@ snapshots: eslint: 8.57.1 ignore: 5.3.2 - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1): - dependencies: - '@rtsao/scc': 1.1.0 - array-includes: 3.1.9 - array.prototype.findlastindex: 1.2.6 - array.prototype.flat: 1.3.3 - array.prototype.flatmap: 1.3.3 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.57.1 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) - hasown: 2.0.2 - is-core-module: 2.16.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.1 - semver: 6.3.1 - string.prototype.trimend: 1.0.9 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.3) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): - dependencies: - '@rtsao/scc': 1.1.0 - array-includes: 3.1.9 - array.prototype.findlastindex: 1.2.6 - array.prototype.flat: 1.3.3 - array.prototype.flatmap: 1.3.3 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 9.29.0(jiti@2.5.1) - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) - hasown: 2.0.2 - is-core-module: 2.16.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.1 - semver: 6.3.1 - string.prototype.trimend: 1.0.9 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 @@ -22661,7 +18700,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22670,9 +18709,9 @@ snapshots: array.prototype.flatmap: 1.3.3 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.34.0(jiti@2.5.1) + eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)))(eslint@9.29.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22684,13 +18723,13 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.8.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22699,9 +18738,9 @@ snapshots: array.prototype.flatmap: 1.3.3 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.34.0(jiti@2.5.1) + eslint: 9.29.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.34.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22713,7 +18752,7 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.9.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -22765,25 +18804,6 @@ snapshots: safe-regex-test: 1.1.0 string.prototype.includes: 2.0.1 - eslint-plugin-jsx-a11y@6.10.2(eslint@9.34.0(jiti@2.5.1)): - dependencies: - aria-query: 5.3.2 - array-includes: 3.1.9 - array.prototype.flatmap: 1.3.3 - ast-types-flow: 0.0.8 - axe-core: 4.10.3 - axobject-query: 4.1.0 - damerau-levenshtein: 1.0.8 - emoji-regex: 9.2.2 - eslint: 9.34.0(jiti@2.5.1) - hasown: 2.0.2 - jsx-ast-utils: 3.3.5 - language-tags: 1.0.9 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - safe-regex-test: 1.1.0 - string.prototype.includes: 2.0.1 - eslint-plugin-n@15.7.0(eslint@8.57.1): dependencies: builtins: 5.1.0 @@ -22829,18 +18849,6 @@ snapshots: dependencies: eslint: 9.29.0(jiti@2.5.1) - eslint-plugin-react-hooks@5.2.0(eslint@9.34.0(jiti@2.5.1)): - dependencies: - eslint: 9.34.0(jiti@2.5.1) - - eslint-plugin-react-refresh@0.4.20(eslint@9.29.0(jiti@2.5.1)): - dependencies: - eslint: 9.29.0(jiti@2.5.1) - - eslint-plugin-react-refresh@0.4.20(eslint@9.34.0(jiti@2.5.1)): - dependencies: - eslint: 9.34.0(jiti@2.5.1) - eslint-plugin-react@7.37.5(eslint@8.57.1): dependencies: array-includes: 3.1.9 @@ -22885,28 +18893,6 @@ snapshots: string.prototype.matchall: 4.0.12 string.prototype.repeat: 1.0.0 - eslint-plugin-react@7.37.5(eslint@9.34.0(jiti@2.5.1)): - dependencies: - array-includes: 3.1.9 - array.prototype.findlast: 1.2.5 - array.prototype.flatmap: 1.3.3 - array.prototype.tosorted: 1.1.4 - doctrine: 2.1.0 - es-iterator-helpers: 1.2.1 - eslint: 9.34.0(jiti@2.5.1) - estraverse: 5.3.0 - hasown: 2.0.2 - jsx-ast-utils: 3.3.5 - minimatch: 3.1.2 - object.entries: 1.1.9 - object.fromentries: 2.0.8 - object.values: 1.2.1 - prop-types: 15.8.1 - resolve: 2.0.0-next.5 - semver: 6.3.1 - string.prototype.matchall: 4.0.12 - string.prototype.repeat: 1.0.0 - eslint-plugin-unicorn@44.0.2(eslint@8.57.1): dependencies: '@babel/helper-validator-identifier': 7.27.1 @@ -23220,8 +19206,6 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - exit-hook@2.2.1: {} - exit@0.1.2: {} expand-template@2.0.3: {} @@ -23240,42 +19224,6 @@ snapshots: dependencies: express: 5.1.0 - express@4.21.2: - dependencies: - accepts: 1.3.8 - array-flatten: 1.1.1 - body-parser: 1.20.3 - content-disposition: 0.5.4 - content-type: 1.0.5 - cookie: 0.7.1 - cookie-signature: 1.0.6 - debug: 2.6.9 - depd: 2.0.0 - encodeurl: 2.0.0 - escape-html: 1.0.3 - etag: 1.8.1 - finalhandler: 1.3.1 - fresh: 0.5.2 - http-errors: 2.0.0 - merge-descriptors: 1.0.3 - methods: 1.1.2 - on-finished: 2.4.1 - parseurl: 1.3.3 - path-to-regexp: 0.1.12 - proxy-addr: 2.0.7 - qs: 6.13.0 - range-parser: 1.2.1 - safe-buffer: 5.2.1 - send: 0.19.0 - serve-static: 1.16.2 - setprototypeof: 1.2.0 - statuses: 2.0.1 - type-is: 1.6.18 - utils-merge: 1.0.1 - vary: 1.1.2 - transitivePeerDependencies: - - supports-color - express@5.1.0: dependencies: accepts: 2.0.0 @@ -23367,14 +19315,10 @@ snapshots: fast-redact@3.5.0: {} - fast-safe-stringify@2.1.1: {} - fast-sha256@1.3.0: {} fast-uri@3.0.6: {} - fastify-plugin@5.0.1: {} - fastify@5.5.0: dependencies: '@fastify/ajv-compiler': 4.0.2 @@ -23450,18 +19394,6 @@ snapshots: filter-obj@6.1.0: {} - finalhandler@1.3.1: - dependencies: - debug: 2.6.9 - encodeurl: 2.0.0 - escape-html: 1.0.3 - on-finished: 2.4.1 - parseurl: 1.3.3 - statuses: 2.0.1 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - finalhandler@2.1.0: dependencies: debug: 4.4.1(supports-color@5.5.0) @@ -23545,14 +19477,6 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - form-data@3.0.4: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - es-set-tostringtag: 2.1.0 - hasown: 2.0.2 - mime-types: 2.1.35 - form-data@4.0.4: dependencies: asynckit: 0.4.0 @@ -23565,18 +19489,10 @@ snapshots: dependencies: fetch-blob: 3.2.0 - formidable@3.5.4: - dependencies: - '@paralleldrive/cuid2': 2.2.2 - dezalgo: 1.0.4 - once: 1.4.0 - forwarded@0.2.0: {} fraction.js@4.3.7: {} - fresh@0.5.2: {} - fresh@2.0.0: {} fs-constants@1.0.0: {} @@ -23722,8 +19638,6 @@ snapshots: get-port-please@3.2.0: {} - get-port@5.1.1: {} - get-proto@1.0.1: dependencies: dunder-proto: 1.0.1 @@ -23810,8 +19724,6 @@ snapshots: globals@15.15.0: {} - globals@16.3.0: {} - globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -23843,16 +19755,10 @@ snapshots: slash: 5.1.0 unicorn-magic: 0.3.0 - globrex@0.1.2: {} - gonzales-pe@4.3.0: dependencies: minimist: 1.2.8 - goober@2.1.16(csstype@3.1.3): - dependencies: - csstype: 3.1.3 - gopd@1.2.0: {} graceful-fs@4.2.11: {} @@ -24056,8 +19962,6 @@ snapshots: headers-polyfill@4.0.3: {} - helmet@8.1.0: {} - highlight.js@10.7.3: {} hono@4.9.1: {} @@ -24074,10 +19978,6 @@ snapshots: dependencies: lru-cache: 7.18.3 - hosted-git-info@6.1.3: - dependencies: - lru-cache: 7.18.3 - hosted-git-info@7.0.2: dependencies: lru-cache: 10.4.3 @@ -24101,14 +20001,6 @@ snapshots: statuses: 2.0.1 toidentifier: 1.0.1 - http-proxy@1.18.1: - dependencies: - eventemitter3: 4.0.7 - follow-redirects: 1.15.11 - requires-port: 1.0.0 - transitivePeerDependencies: - - debug - http-shutdown@1.2.2: {} https-proxy-agent@6.2.1: @@ -24133,10 +20025,6 @@ snapshots: human-signals@5.0.0: {} - iconv-lite@0.4.24: - dependencies: - safer-buffer: 2.1.2 - iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 @@ -24227,11 +20115,6 @@ snapshots: inline-style-parser@0.2.4: {} - input-otp@1.4.2(react-dom@19.1.1(react@19.1.1))(react@19.1.1): - dependencies: - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - inquirer@12.9.1(@types/node@24.3.0): dependencies: '@inquirer/core': 10.1.15(@types/node@24.3.0) @@ -24256,13 +20139,6 @@ snapshots: interpret@1.4.0: {} - intl-messageformat@10.7.16: - dependencies: - '@formatjs/ecma402-abstract': 2.3.4 - '@formatjs/fast-memoize': 2.2.7 - '@formatjs/icu-messageformat-parser': 2.11.2 - tslib: 2.8.1 - ioredis@5.7.0: dependencies: '@ioredis/commands': 1.3.0 @@ -24277,32 +20153,9 @@ snapshots: transitivePeerDependencies: - supports-color - ipaddr.js@1.9.1: {} - - ipaddr.js@2.2.0: {} - - iron-session@6.3.1(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)): - dependencies: - '@peculiar/webcrypto': 1.4.1 - '@types/cookie': 0.5.4 - '@types/express': 4.17.23 - '@types/koa': 2.15.0 - '@types/node': 17.0.45 - cookie: 0.5.0 - iron-webcrypto: 0.2.8 - optionalDependencies: - express: 5.1.0 - next: 15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - - iron-session@8.0.4: - dependencies: - cookie: 0.7.2 - iron-webcrypto: 1.2.1 - uncrypto: 0.1.3 + ipaddr.js@1.9.1: {} - iron-webcrypto@0.2.8: - dependencies: - buffer: 6.0.3 + ipaddr.js@2.2.0: {} iron-webcrypto@1.2.1: {} @@ -24445,8 +20298,6 @@ snapshots: is-negative-zero@2.0.3: {} - is-network-error@1.1.0: {} - is-node-process@1.2.0: {} is-number-object@1.1.1: @@ -24486,10 +20337,6 @@ snapshots: dependencies: '@types/estree': 1.0.8 - is-reference@3.0.3: - dependencies: - '@types/estree': 1.0.8 - is-regex@1.2.1: dependencies: call-bound: 1.0.4 @@ -24645,7 +20492,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 20.19.11 chalk: 4.1.2 co: 4.6.0 dedent: 1.6.0 @@ -24684,25 +20531,6 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) - exit: 0.1.2 - import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) - jest-util: 29.7.0 - jest-validate: 29.7.0 - yargs: 17.7.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jest-config@29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)): dependencies: '@babel/core': 7.28.3 @@ -24734,68 +20562,6 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)): - dependencies: - '@babel/core': 7.28.3 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.28.3) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.8 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 22.17.1 - ts-node: 10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - jest-config@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): - dependencies: - '@babel/core': 7.28.3 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.28.3) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.8 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 22.17.1 - ts-node: 10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - jest-diff@29.7.0: dependencies: chalk: 4.1.2 @@ -24820,7 +20586,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 20.19.11 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -24830,7 +20596,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.17.1 + '@types/node': 20.19.11 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -24869,7 +20635,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 20.19.11 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -24906,7 +20672,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 20.19.11 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -24934,7 +20700,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 20.19.11 chalk: 4.1.2 cjs-module-lexer: 1.4.3 collect-v8-coverage: 1.0.2 @@ -24980,7 +20746,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 20.19.11 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -24999,7 +20765,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 20.19.11 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -25008,13 +20774,13 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.17.1 + '@types/node': 20.19.11 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.17.1 + '@types/node': 20.19.11 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -25031,32 +20797,16 @@ snapshots: - supports-color - ts-node - jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) - '@jest/types': 29.6.3 - import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jiti@1.21.7: {} jiti@2.5.1: {} jose@5.10.0: {} - jose@5.6.3: {} - jose@6.1.0: {} joycon@3.1.1: {} - js-cookie@3.0.1: {} - js-cookie@3.0.5: {} js-string-escape@1.0.1: {} @@ -25076,18 +20826,12 @@ snapshots: dependencies: argparse: 2.0.1 - jsesc@3.0.2: {} - jsesc@3.1.0: {} json-buffer@3.0.1: {} - json-parse-better-errors@1.0.2: {} - json-parse-even-better-errors@2.3.1: {} - json-parse-even-better-errors@3.0.2: {} - json-parse-even-better-errors@4.0.0: {} json-schema-ref-resolver@2.0.1: @@ -25159,8 +20903,6 @@ snapshots: dependencies: readable-stream: 2.3.8 - leb@1.0.0: {} - leven@3.1.0: {} levn@0.4.1: @@ -25250,13 +20992,6 @@ snapshots: untun: 0.1.3 uqr: 0.1.2 - load-json-file@4.0.0: - dependencies: - graceful-fs: 4.2.11 - parse-json: 4.0.0 - pify: 3.0.0 - strip-bom: 3.0.0 - load-json-file@7.0.1: {} load-tsconfig@0.2.5: {} @@ -25331,10 +21066,6 @@ snapshots: loupe@3.2.1: {} - lower-case@2.0.2: - dependencies: - tslib: 2.8.1 - lowercase-keys@1.0.1: {} lru-cache@10.4.3: {} @@ -25355,9 +21086,9 @@ snapshots: dependencies: react: 18.3.1 - lucide-react@0.510.0(react@19.1.0): + lucide-react@0.511.0(react@19.1.1): dependencies: - react: 19.1.0 + react: 19.1.1 lucide-react@0.523.0(react@19.1.1): dependencies: @@ -25367,10 +21098,6 @@ snapshots: dependencies: react: 19.1.1 - lucide-react@0.542.0(react@19.1.1): - dependencies: - react: 19.1.1 - luxon@3.7.1: {} magic-string@0.30.17: @@ -25591,8 +21318,6 @@ snapshots: dependencies: '@types/mdast': 4.0.4 - media-typer@0.3.0: {} - media-typer@1.1.0: {} mem@9.0.2: @@ -25619,8 +21344,6 @@ snapshots: type-fest: 3.13.1 yargs-parser: 21.1.1 - merge-descriptors@1.0.3: {} - merge-descriptors@2.0.0: {} merge-options@3.0.4: @@ -25631,8 +21354,6 @@ snapshots: merge2@1.4.1: {} - methods@1.1.2: {} - micro-api-client@3.3.0: {} micro-spelling-correcter@1.1.1: {} @@ -25918,10 +21639,6 @@ snapshots: dependencies: mime-db: 1.54.0 - mime@1.6.0: {} - - mime@2.6.0: {} - mime@3.0.0: {} mime@4.0.7: {} @@ -25982,22 +21699,10 @@ snapshots: ast-module-types: 6.0.1 node-source-walk: 7.0.1 - morgan@1.10.1: - dependencies: - basic-auth: 2.0.1 - debug: 2.6.9 - depd: 2.0.0 - on-finished: 2.3.0 - on-headers: 1.1.0 - transitivePeerDependencies: - - supports-color - mri@1.2.0: {} mrmime@1.0.1: {} - ms@2.0.0: {} - ms@2.1.3: {} msw@2.10.4(@types/node@18.17.0)(typescript@5.5.4): @@ -26073,10 +21778,6 @@ snapshots: natural-compare@1.4.0: {} - negotiator@0.6.3: {} - - negotiator@0.6.4: {} - negotiator@1.0.0: {} neo-async@2.6.2: {} @@ -26090,81 +21791,16 @@ snapshots: p-wait-for: 5.0.2 qs: 6.14.0 - next-intl@4.3.5(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(typescript@5.9.2): - dependencies: - '@formatjs/intl-localematcher': 0.5.10 - negotiator: 1.0.0 - next: 15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - use-intl: 4.3.5(react@19.1.1) - optionalDependencies: - typescript: 5.9.2 - next-themes@0.4.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - next-themes@0.4.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0): - dependencies: - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - next-themes@0.4.6(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1): - dependencies: - '@next/env': 15.2.1 - '@swc/counter': 0.1.3 - '@swc/helpers': 0.5.15 - busboy: 1.6.0 - caniuse-lite: 1.0.30001736 - postcss: 8.4.31 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - styled-jsx: 5.1.6(@babel/core@7.28.3)(react@19.1.1) - optionalDependencies: - '@next/swc-darwin-arm64': 15.2.1 - '@next/swc-darwin-x64': 15.2.1 - '@next/swc-linux-arm64-gnu': 15.2.1 - '@next/swc-linux-arm64-musl': 15.2.1 - '@next/swc-linux-x64-gnu': 15.2.1 - '@next/swc-linux-x64-musl': 15.2.1 - '@next/swc-win32-arm64-msvc': 15.2.1 - '@next/swc-win32-x64-msvc': 15.2.1 - sharp: 0.33.5 - transitivePeerDependencies: - - '@babel/core' - - babel-plugin-macros - - next@15.2.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0): - dependencies: - '@next/env': 15.2.3 - '@swc/counter': 0.1.3 - '@swc/helpers': 0.5.15 - busboy: 1.6.0 - caniuse-lite: 1.0.30001736 - postcss: 8.4.31 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - styled-jsx: 5.1.6(react@19.1.0) - optionalDependencies: - '@next/swc-darwin-arm64': 15.2.3 - '@next/swc-darwin-x64': 15.2.3 - '@next/swc-linux-arm64-gnu': 15.2.3 - '@next/swc-linux-arm64-musl': 15.2.3 - '@next/swc-linux-x64-gnu': 15.2.3 - '@next/swc-linux-x64-musl': 15.2.3 - '@next/swc-win32-arm64-msvc': 15.2.3 - '@next/swc-win32-x64-msvc': 15.2.3 - sharp: 0.33.5 - transitivePeerDependencies: - - '@babel/core' - - babel-plugin-macros - next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 15.3.4 @@ -26238,31 +21874,29 @@ snapshots: - '@babel/core' - babel-plugin-macros - next@15.4.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + next@15.5.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: - '@next/env': 15.4.1 + '@next/env': 15.5.4 '@swc/helpers': 0.5.15 caniuse-lite: 1.0.30001736 postcss: 8.4.31 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - styled-jsx: 5.1.6(react@19.1.0) + react: 19.1.1 + react-dom: 19.1.1(react@19.1.1) + styled-jsx: 5.1.6(@babel/core@7.28.3)(react@19.1.1) optionalDependencies: - '@next/swc-darwin-arm64': 15.4.1 - '@next/swc-darwin-x64': 15.4.1 - '@next/swc-linux-arm64-gnu': 15.4.1 - '@next/swc-linux-arm64-musl': 15.4.1 - '@next/swc-linux-x64-gnu': 15.4.1 - '@next/swc-linux-x64-musl': 15.4.1 - '@next/swc-win32-arm64-msvc': 15.4.1 - '@next/swc-win32-x64-msvc': 15.4.1 + '@next/swc-darwin-arm64': 15.5.4 + '@next/swc-darwin-x64': 15.5.4 + '@next/swc-linux-arm64-gnu': 15.5.4 + '@next/swc-linux-arm64-musl': 15.5.4 + '@next/swc-linux-x64-gnu': 15.5.4 + '@next/swc-linux-x64-musl': 15.5.4 + '@next/swc-win32-arm64-msvc': 15.5.4 + '@next/swc-win32-x64-msvc': 15.5.4 sharp: 0.34.3 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros - nice-try@1.0.5: {} - nitropack@2.12.4(@netlify/blobs@9.1.2)(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34): dependencies: '@cloudflare/kv-asset-handler': 0.4.0 @@ -26363,11 +21997,6 @@ snapshots: - supports-color - uploadthing - no-case@3.0.4: - dependencies: - lower-case: 2.0.2 - tslib: 2.8.1 - node-abi@3.75.0: dependencies: semver: 7.7.2 @@ -26383,8 +22012,6 @@ snapshots: emojilib: 2.4.0 skin-tone: 2.0.0 - node-fetch-native@1.0.1: {} - node-fetch-native@1.6.7: {} node-fetch@2.7.0: @@ -26451,13 +22078,6 @@ snapshots: semver: 7.7.2 validate-npm-package-license: 3.0.4 - normalize-package-data@5.0.0: - dependencies: - hosted-git-info: 6.1.3 - is-core-module: 2.16.1 - semver: 7.7.2 - validate-npm-package-license: 3.0.4 - normalize-package-data@6.0.2: dependencies: hosted-git-info: 7.0.2 @@ -26476,23 +22096,10 @@ snapshots: dependencies: npm-normalize-package-bin: 2.0.0 - npm-install-checks@6.3.0: - dependencies: - semver: 7.7.2 - npm-normalize-package-bin@2.0.0: {} - npm-normalize-package-bin@3.0.1: {} - npm-normalize-package-bin@4.0.0: {} - npm-package-arg@10.1.0: - dependencies: - hosted-git-info: 6.1.3 - proc-log: 3.0.0 - semver: 7.7.2 - validate-npm-package-name: 5.0.1 - npm-packlist@5.1.3: dependencies: glob: 8.1.0 @@ -26500,13 +22107,6 @@ snapshots: npm-bundled: 2.0.1 npm-normalize-package-bin: 2.0.0 - npm-pick-manifest@8.0.2: - dependencies: - npm-install-checks: 6.3.0 - npm-normalize-package-bin: 3.0.1 - npm-package-arg: 10.1.0 - semver: 7.7.2 - npm-run-all2@7.0.2: dependencies: ansi-styles: 6.2.1 @@ -26518,18 +22118,6 @@ snapshots: shell-quote: 1.8.3 which: 5.0.0 - npm-run-all@4.1.5: - dependencies: - ansi-styles: 3.2.1 - chalk: 2.4.2 - cross-spawn: 6.0.6 - memorystream: 0.3.1 - minimatch: 3.1.2 - pidtree: 0.3.1 - read-pkg: 3.0.0 - shell-quote: 1.8.3 - string.prototype.padend: 3.1.6 - npm-run-path@4.0.1: dependencies: path-key: 3.1.1 @@ -26610,16 +22198,10 @@ snapshots: on-exit-leak-free@2.1.2: {} - on-finished@2.3.0: - dependencies: - ee-first: 1.1.1 - on-finished@2.4.1: dependencies: ee-first: 1.1.1 - on-headers@1.1.0: {} - once@1.4.0: dependencies: wrappy: 1.0.2 @@ -26776,11 +22358,6 @@ snapshots: parse-gitignore@2.0.0: {} - parse-json@4.0.0: - dependencies: - error-ex: 1.3.2 - json-parse-better-errors: 1.0.2 - parse-json@5.2.0: dependencies: '@babel/code-frame': 7.27.1 @@ -26833,8 +22410,6 @@ snapshots: path-is-absolute@1.0.1: {} - path-key@2.0.1: {} - path-key@3.1.1: {} path-key@4.0.0: {} @@ -26846,16 +22421,10 @@ snapshots: lru-cache: 10.4.3 minipass: 7.1.2 - path-to-regexp@0.1.12: {} - path-to-regexp@6.3.0: {} path-to-regexp@8.2.0: {} - path-type@3.0.0: - dependencies: - pify: 3.0.0 - path-type@4.0.0: {} path-type@6.0.0: {} @@ -26870,12 +22439,6 @@ snapshots: perfect-debounce@1.0.0: {} - periscopic@4.0.2: - dependencies: - '@types/estree': 1.0.8 - is-reference: 3.0.3 - zimmerframe: 1.1.2 - pg-cloudflare@1.2.7: optional: true @@ -26917,14 +22480,10 @@ snapshots: picomatch@4.0.3: {} - pidtree@0.3.1: {} - pidtree@0.6.0: {} pify@2.3.0: {} - pify@3.0.0: {} - pino-abstract-transport@2.0.0: dependencies: split2: 4.2.0 @@ -27022,6 +22581,14 @@ snapshots: postcss: 8.5.6 ts-node: 10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2) + postcss-load-config@4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)): + dependencies: + lilconfig: 3.1.3 + yaml: 2.8.1 + optionalDependencies: + postcss: 8.5.6 + ts-node: 10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3) + postcss-load-config@4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): dependencies: lilconfig: 3.1.3 @@ -27120,12 +22687,12 @@ snapshots: detective-sass: 6.0.1 detective-scss: 5.0.1 detective-stylus: 5.0.1 - detective-typescript: 14.0.0(typescript@5.8.3) - detective-vue2: 2.2.0(typescript@5.8.3) + detective-typescript: 14.0.0(typescript@5.9.3) + detective-vue2: 2.2.0(typescript@5.9.3) module-definition: 6.0.1 node-source-walk: 7.0.1 postcss: 8.5.6 - typescript: 5.8.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -27159,8 +22726,6 @@ snapshots: prismjs@1.30.0: {} - proc-log@3.0.0: {} - process-nextick-args@2.0.1: {} process-warning@4.0.1: {} @@ -27169,13 +22734,6 @@ snapshots: process@0.11.10: {} - promise-inflight@1.0.1: {} - - promise-retry@2.0.1: - dependencies: - err-code: 2.0.3 - retry: 0.12.0 - prompts@2.4.2: dependencies: kleur: 3.0.3 @@ -27227,18 +22785,12 @@ snapshots: pvutils@1.1.3: {} - qs@6.13.0: - dependencies: - side-channel: 1.1.0 - qs@6.14.0: dependencies: side-channel: 1.1.0 quansync@0.2.10: {} - quansync@0.2.11: {} - query-string@9.2.2: dependencies: decode-uri-component: 0.4.1 @@ -27253,8 +22805,6 @@ snapshots: quick-format-unescaped@4.0.4: {} - quick-lru@4.0.1: {} - quick-lru@6.1.2: {} quote-unquote@1.0.0: {} @@ -27267,13 +22817,6 @@ snapshots: range-parser@1.2.1: {} - raw-body@2.5.2: - dependencies: - bytes: 3.1.2 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - unpipe: 1.0.0 - raw-body@3.0.0: dependencies: bytes: 3.1.2 @@ -27296,23 +22839,14 @@ snapshots: react-dom@18.3.1(react@18.3.1): dependencies: loose-envify: 1.4.0 - react: 18.3.1 - scheduler: 0.23.2 - - react-dom@19.1.0(react@19.1.0): - dependencies: - react: 19.1.0 - scheduler: 0.26.0 + react: 18.3.1 + scheduler: 0.23.2 react-dom@19.1.1(react@19.1.1): dependencies: react: 19.1.1 scheduler: 0.26.0 - react-hook-form@7.62.0(react@19.1.1): - dependencies: - react: 19.1.1 - react-is@16.13.1: {} react-is@18.3.1: {} @@ -27327,8 +22861,6 @@ snapshots: react: 18.3.1 scheduler: 0.26.0 - react-refresh@0.14.2: {} - react-refresh@0.17.0: {} react-remove-scroll-bar@2.3.8(@types/react@18.3.23)(react@18.3.1): @@ -27339,14 +22871,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - react-remove-scroll-bar@2.3.8(@types/react@19.1.10)(react@19.1.0): - dependencies: - react: 19.1.0 - react-style-singleton: 2.2.3(@types/react@19.1.10)(react@19.1.0) - tslib: 2.8.1 - optionalDependencies: - '@types/react': 19.1.10 - react-remove-scroll-bar@2.3.8(@types/react@19.1.10)(react@19.1.1): dependencies: react: 19.1.1 @@ -27374,17 +22898,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - react-remove-scroll@2.7.1(@types/react@19.1.10)(react@19.1.0): - dependencies: - react: 19.1.0 - react-remove-scroll-bar: 2.3.8(@types/react@19.1.10)(react@19.1.0) - react-style-singleton: 2.2.3(@types/react@19.1.10)(react@19.1.0) - tslib: 2.8.1 - use-callback-ref: 1.3.3(@types/react@19.1.10)(react@19.1.0) - use-sidecar: 1.1.3(@types/react@19.1.10)(react@19.1.0) - optionalDependencies: - '@types/react': 19.1.10 - react-remove-scroll@2.7.1(@types/react@19.1.10)(react@19.1.1): dependencies: react: 19.1.1 @@ -27416,14 +22929,6 @@ snapshots: react-dom: 18.3.1(react@18.3.1) optional: true - react-router@7.8.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0): - dependencies: - cookie: 1.0.2 - react: 19.1.0 - set-cookie-parser: 2.7.1 - optionalDependencies: - react-dom: 19.1.0(react@19.1.0) - react-simple-code-editor@0.14.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: react: 18.3.1 @@ -27445,14 +22950,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - react-style-singleton@2.2.3(@types/react@19.1.10)(react@19.1.0): - dependencies: - get-nonce: 1.0.1 - react: 19.1.0 - tslib: 2.8.1 - optionalDependencies: - '@types/react': 19.1.10 - react-style-singleton@2.2.3(@types/react@19.1.10)(react@19.1.1): dependencies: get-nonce: 1.0.1 @@ -27482,8 +22979,6 @@ snapshots: dependencies: loose-envify: 1.4.0 - react@19.1.0: {} - react@19.1.1: {} read-cache@1.0.0: @@ -27513,12 +23008,6 @@ snapshots: read-pkg: 7.1.0 type-fest: 2.19.0 - read-pkg@3.0.0: - dependencies: - load-json-file: 4.0.0 - normalize-package-data: 2.5.0 - path-type: 3.0.0 - read-pkg@5.2.0: dependencies: '@types/normalize-package-data': 2.4.4 @@ -27827,8 +23316,6 @@ snapshots: ret@0.5.0: {} - retry@0.12.0: {} - reusify@1.1.0: {} rfdc@1.4.1: {} @@ -27837,23 +23324,6 @@ snapshots: dependencies: glob: 7.2.3 - rolldown-plugin-dts@0.13.14(rolldown@1.0.0-beta.34)(typescript@5.9.2): - dependencies: - '@babel/generator': 7.28.3 - '@babel/parser': 7.28.3 - '@babel/types': 7.28.2 - ast-kit: 2.1.2 - birpc: 2.5.0 - debug: 4.4.1(supports-color@5.5.0) - dts-resolver: 2.1.2 - get-tsconfig: 4.10.1 - rolldown: 1.0.0-beta.34 - optionalDependencies: - typescript: 5.9.2 - transitivePeerDependencies: - - oxc-resolver - - supports-color - rolldown@1.0.0-beta.34: dependencies: '@oxc-project/runtime': 0.82.3 @@ -27875,6 +23345,7 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.34 '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.34 '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.34 + optional: true rollup-plugin-visualizer@6.0.3(rolldown@1.0.0-beta.34)(rollup@4.47.1): dependencies: @@ -28030,24 +23501,6 @@ snapshots: semver@7.7.2: {} - send@0.19.0: - dependencies: - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - encodeurl: 1.0.2 - escape-html: 1.0.3 - etag: 1.8.1 - fresh: 0.5.2 - http-errors: 2.0.0 - mime: 1.6.0 - ms: 2.1.3 - on-finished: 2.4.1 - range-parser: 1.2.1 - statuses: 2.0.1 - transitivePeerDependencies: - - supports-color - send@1.2.0: dependencies: debug: 4.4.1(supports-color@5.5.0) @@ -28082,15 +23535,6 @@ snapshots: dependencies: defu: 6.1.4 - serve-static@1.16.2: - dependencies: - encodeurl: 2.0.0 - escape-html: 1.0.3 - parseurl: 1.3.3 - send: 0.19.0 - transitivePeerDependencies: - - supports-color - serve-static@2.2.0: dependencies: encodeurl: 2.0.0 @@ -28162,33 +23606,6 @@ snapshots: - supports-color - typescript - sharp@0.33.5: - dependencies: - color: 4.2.3 - detect-libc: 2.0.4 - semver: 7.7.2 - optionalDependencies: - '@img/sharp-darwin-arm64': 0.33.5 - '@img/sharp-darwin-x64': 0.33.5 - '@img/sharp-libvips-darwin-arm64': 1.0.4 - '@img/sharp-libvips-darwin-x64': 1.0.4 - '@img/sharp-libvips-linux-arm': 1.0.5 - '@img/sharp-libvips-linux-arm64': 1.0.4 - '@img/sharp-libvips-linux-s390x': 1.0.4 - '@img/sharp-libvips-linux-x64': 1.0.4 - '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 - '@img/sharp-libvips-linuxmusl-x64': 1.0.4 - '@img/sharp-linux-arm': 0.33.5 - '@img/sharp-linux-arm64': 0.33.5 - '@img/sharp-linux-s390x': 0.33.5 - '@img/sharp-linux-x64': 0.33.5 - '@img/sharp-linuxmusl-arm64': 0.33.5 - '@img/sharp-linuxmusl-x64': 0.33.5 - '@img/sharp-wasm32': 0.33.5 - '@img/sharp-win32-ia32': 0.33.5 - '@img/sharp-win32-x64': 0.33.5 - optional: true - sharp@0.34.3: dependencies: color: 4.2.3 @@ -28219,16 +23636,10 @@ snapshots: '@img/sharp-win32-x64': 0.34.3 optional: true - shebang-command@1.2.0: - dependencies: - shebang-regex: 1.0.0 - shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 - shebang-regex@1.0.0: {} - shebang-regex@3.0.0: {} shell-quote@1.8.3: {} @@ -28318,43 +23729,10 @@ snapshots: smob@1.5.0: {} - snake-case@3.0.4: - dependencies: - dot-case: 3.0.4 - tslib: 2.8.1 - - snakecase-keys@3.2.1: - dependencies: - map-obj: 4.3.0 - to-snake-case: 1.0.0 - - snakecase-keys@5.4.4: - dependencies: - map-obj: 4.3.0 - snake-case: 3.0.4 - type-fest: 2.19.0 - - snakecase-keys@8.0.1: - dependencies: - map-obj: 4.3.0 - snake-case: 3.0.4 - type-fest: 4.41.0 - - solid-js@1.9.9: - dependencies: - csstype: 3.1.3 - seroval: 1.3.2 - seroval-plugins: 1.3.2(seroval@1.3.2) - sonic-boom@4.2.0: dependencies: atomic-sleep: 1.0.0 - sonner@2.0.7(react-dom@19.1.0(react@19.1.0))(react@19.1.0): - dependencies: - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - source-map-js@1.2.1: {} source-map-support@0.5.13: @@ -28497,13 +23875,6 @@ snapshots: set-function-name: 2.0.2 side-channel: 1.1.0 - string.prototype.padend@3.1.6: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-abstract: 1.24.0 - es-object-atoms: 1.1.1 - string.prototype.repeat@1.0.0: dependencies: define-properties: 1.2.1 @@ -28619,11 +23990,6 @@ snapshots: optionalDependencies: '@babel/core': 7.28.3 - styled-jsx@5.1.6(react@19.1.0): - dependencies: - client-only: 0.0.1 - react: 19.1.0 - sucrase@3.35.0: dependencies: '@jridgewell/gen-mapping': 0.3.13 @@ -28634,20 +24000,6 @@ snapshots: pirates: 4.0.7 ts-interface-checker: 0.1.13 - superagent@10.2.3: - dependencies: - component-emitter: 1.3.1 - cookiejar: 2.1.4 - debug: 4.4.1(supports-color@5.5.0) - fast-safe-stringify: 2.1.1 - form-data: 4.0.4 - formidable: 3.5.4 - methods: 1.1.2 - mime: 2.6.0 - qs: 6.14.0 - transitivePeerDependencies: - - supports-color - superstruct@1.0.4: {} supertap@3.0.1: @@ -28657,13 +24009,6 @@ snapshots: serialize-error: 7.0.1 strip-ansi: 7.1.0 - supertest@7.1.4: - dependencies: - methods: 1.1.2 - superagent: 10.2.3 - transitivePeerDependencies: - - supports-color - supports-color@10.1.0: {} supports-color@5.5.0: @@ -28690,17 +24035,6 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - swr@2.2.0(react@19.1.1): - dependencies: - react: 19.1.1 - use-sync-external-store: 1.5.0(react@19.1.1) - - swr@2.3.4(react@19.1.0): - dependencies: - dequal: 2.0.3 - react: 19.1.0 - use-sync-external-store: 1.5.0(react@19.1.0) - swr@2.3.4(react@19.1.1): dependencies: dequal: 2.0.3 @@ -28733,6 +24067,10 @@ snapshots: dependencies: tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.10)(typescript@5.9.2)) + tailwindcss-animate@1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3))): + dependencies: + tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) + tailwindcss-animate@1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3))): dependencies: tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) @@ -28769,6 +24107,33 @@ snapshots: transitivePeerDependencies: - ts-node + tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)): + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.6.0 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.3 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.7 + lilconfig: 3.1.3 + micromatch: 4.0.8 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.1.1 + postcss: 8.5.6 + postcss-import: 15.1.0(postcss@8.5.6) + postcss-js: 4.0.1(postcss@8.5.6) + postcss-load-config: 4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)) + postcss-nested: 6.2.0(postcss@8.5.6) + postcss-selector-parser: 6.1.2 + resolve: 1.22.10 + sucrase: 3.35.0 + transitivePeerDependencies: + - ts-node + tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)): dependencies: '@alloc/quick-lru': 5.2.0 @@ -28848,18 +24213,6 @@ snapshots: '@swc/core': 1.13.5 esbuild: 0.25.9 - terser-webpack-plugin@5.3.14(@swc/core@1.13.5)(webpack@5.101.1(@swc/core@1.13.5)): - dependencies: - '@jridgewell/trace-mapping': 0.3.30 - jest-worker: 27.5.1 - schema-utils: 4.3.2 - serialize-javascript: 6.0.2 - terser: 5.43.1 - webpack: 5.101.1(@swc/core@1.13.5) - optionalDependencies: - '@swc/core': 1.13.5 - optional: true - terser@5.43.1: dependencies: '@jridgewell/source-map': 0.3.11 @@ -28929,20 +24282,10 @@ snapshots: is-absolute: 1.0.0 is-negated-glob: 1.0.0 - to-no-case@1.0.2: {} - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 - to-snake-case@1.0.0: - dependencies: - to-space-case: 1.0.0 - - to-space-case@1.0.0: - dependencies: - to-no-case: 1.0.2 - toad-cache@3.7.0: {} toidentifier@1.0.1: {} @@ -28980,10 +24323,6 @@ snapshots: trough@2.2.0: {} - ts-api-utils@1.4.3(typescript@5.8.3): - dependencies: - typescript: 5.8.3 - ts-api-utils@1.4.3(typescript@5.9.2): dependencies: typescript: 5.9.2 @@ -28992,14 +24331,18 @@ snapshots: dependencies: typescript: 5.5.4 - ts-api-utils@2.1.0(typescript@5.7.3): - dependencies: - typescript: 5.7.3 - ts-api-utils@2.1.0(typescript@5.8.3): dependencies: typescript: 5.8.3 + ts-api-utils@2.1.0(typescript@5.9.2): + dependencies: + typescript: 5.9.2 + + ts-api-utils@2.1.0(typescript@5.9.3): + dependencies: + typescript: 5.9.3 + ts-interface-checker@0.1.13: {} ts-jest@29.4.1(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@30.2.0)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@20.19.11)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@20.19.11)(typescript@5.8.3)))(typescript@5.8.3): @@ -29022,26 +24365,6 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.28.3) jest-util: 29.7.0 - ts-jest@29.4.1(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@30.2.0)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)))(typescript@5.8.3): - dependencies: - bs-logger: 0.2.6 - fast-json-stable-stringify: 2.1.0 - handlebars: 4.7.8 - jest: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.17.1)(typescript@5.8.3)) - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.7.2 - type-fest: 4.41.0 - typescript: 5.8.3 - yargs-parser: 21.1.1 - optionalDependencies: - '@babel/core': 7.28.3 - '@jest/transform': 29.7.0 - '@jest/types': 30.2.0 - babel-jest: 29.7.0(@babel/core@7.28.3) - jest-util: 29.7.0 - ts-morph@18.0.0: dependencies: '@ts-morph/common': 0.19.0 @@ -29107,6 +24430,7 @@ snapshots: yn: 3.1.1 optionalDependencies: '@swc/core': 1.13.5 + optional: true ts-node@10.9.2(@swc/core@1.13.5)(@types/node@24.3.0)(typescript@5.9.2): dependencies: @@ -29154,10 +24478,6 @@ snapshots: transitivePeerDependencies: - supports-color - tsconfck@3.1.6(typescript@5.8.3): - optionalDependencies: - typescript: 5.8.3 - tsconfig-paths@3.15.0: dependencies: '@types/json5': 0.0.29 @@ -29171,31 +24491,6 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tsdown@0.12.9(typescript@5.9.2): - dependencies: - ansis: 4.1.0 - cac: 6.7.14 - chokidar: 4.0.3 - debug: 4.4.1(supports-color@5.5.0) - diff: 8.0.2 - empathic: 2.0.0 - hookable: 5.5.3 - rolldown: 1.0.0-beta.34 - rolldown-plugin-dts: 0.13.14(rolldown@1.0.0-beta.34)(typescript@5.9.2) - semver: 7.7.2 - tinyexec: 1.0.1 - tinyglobby: 0.2.14 - unconfig: 7.3.3 - optionalDependencies: - typescript: 5.9.2 - transitivePeerDependencies: - - '@typescript/native-preview' - - oxc-resolver - - supports-color - - vue-tsc - - tslib@2.4.1: {} - tslib@2.8.1: {} tsup@8.5.0(@swc/core@1.13.5)(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.8.3)(yaml@2.8.1): @@ -29269,8 +24564,6 @@ snapshots: turbo-stream@2.4.1: {} - turbo-stream@3.1.0: {} - tw-animate-css@1.3.6: {} tw-animate-css@1.3.7: {} @@ -29297,11 +24590,6 @@ snapshots: type-fest@4.41.0: {} - type-is@1.6.18: - dependencies: - media-typer: 0.3.0 - mime-types: 2.1.35 - type-is@2.0.1: dependencies: content-type: 1.0.5 @@ -29361,39 +24649,18 @@ snapshots: transitivePeerDependencies: - supports-color - typescript-eslint@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3): - dependencies: - '@typescript-eslint/eslint-plugin': 8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3))(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3) - '@typescript-eslint/parser': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3) - '@typescript-eslint/utils': 8.34.1(eslint@9.29.0(jiti@2.5.1))(typescript@5.7.3) - eslint: 9.29.0(jiti@2.5.1) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - typescript-eslint@8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3): - dependencies: - '@typescript-eslint/eslint-plugin': 8.41.0(@typescript-eslint/parser@8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/parser': 8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.41.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.8.3) - eslint: 9.34.0(jiti@2.5.1) - typescript: 5.8.3 - transitivePeerDependencies: - - supports-color - typescript@4.9.5: {} typescript@5.5.4: {} typescript@5.6.1-rc: {} - typescript@5.7.3: {} - typescript@5.8.3: {} typescript@5.9.2: {} + typescript@5.9.3: {} + ufo@1.6.1: {} uglify-js@3.19.3: @@ -29412,13 +24679,6 @@ snapshots: unc-path-regex@0.1.2: {} - unconfig@7.3.3: - dependencies: - '@quansync/fs': 0.1.5 - defu: 6.1.4 - jiti: 2.5.1 - quansync: 0.2.11 - uncrypto@0.1.3: {} unctx@2.4.1: @@ -29430,8 +24690,6 @@ snapshots: undefsafe@2.0.5: {} - undici-types@5.28.4: {} - undici-types@6.21.0: {} undici-types@7.10.0: {} @@ -29646,13 +24904,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - use-callback-ref@1.3.3(@types/react@19.1.10)(react@19.1.0): - dependencies: - react: 19.1.0 - tslib: 2.8.1 - optionalDependencies: - '@types/react': 19.1.10 - use-callback-ref@1.3.3(@types/react@19.1.10)(react@19.1.1): dependencies: react: 19.1.1 @@ -29667,13 +24918,6 @@ snapshots: optionalDependencies: '@types/react': 19.1.12 - use-intl@4.3.5(react@19.1.1): - dependencies: - '@formatjs/fast-memoize': 2.2.7 - '@schummar/icu-type-parser': 1.21.5 - intl-messageformat: 10.7.16 - react: 19.1.1 - use-sidecar@1.1.3(@types/react@18.3.23)(react@18.3.1): dependencies: detect-node-es: 1.1.0 @@ -29682,14 +24926,6 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - use-sidecar@1.1.3(@types/react@19.1.10)(react@19.1.0): - dependencies: - detect-node-es: 1.1.0 - react: 19.1.0 - tslib: 2.8.1 - optionalDependencies: - '@types/react': 19.1.10 - use-sidecar@1.1.3(@types/react@19.1.10)(react@19.1.1): dependencies: detect-node-es: 1.1.0 @@ -29710,10 +24946,6 @@ snapshots: dependencies: react: 18.3.1 - use-sync-external-store@1.5.0(react@19.1.0): - dependencies: - react: 19.1.0 - use-sync-external-store@1.5.0(react@19.1.1): dependencies: react: 19.1.1 @@ -29728,8 +24960,6 @@ snapshots: is-typed-array: 1.1.15 which-typed-array: 1.1.19 - utils-merge@1.0.1: {} - uuid@11.1.0: {} v8-compile-cache-lib@3.0.1: {} @@ -29738,11 +24968,7 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.30 '@types/istanbul-lib-coverage': 2.0.6 - convert-source-map: 2.0.0 - - valibot@0.41.0(typescript@5.8.3): - optionalDependencies: - typescript: 5.8.3 + convert-source-map: 2.0.0 validate-npm-package-license@3.0.4: dependencies: @@ -29785,84 +25011,6 @@ snapshots: d3-time: 3.1.0 d3-timer: 3.0.1 - vinxi@0.5.3(@netlify/blobs@9.1.2)(@types/node@22.17.1)(better-sqlite3@12.2.0)(db0@0.3.2(better-sqlite3@12.2.0))(ioredis@5.7.0)(jiti@2.5.1)(lightningcss@1.30.1)(rolldown@1.0.0-beta.34)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): - dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.3) - '@types/micromatch': 4.0.9 - '@vinxi/listhen': 1.5.6 - boxen: 7.1.1 - chokidar: 3.6.0 - citty: 0.1.6 - consola: 3.4.2 - crossws: 0.3.5 - dax-sh: 0.39.2 - defu: 6.1.4 - es-module-lexer: 1.7.0 - esbuild: 0.20.2 - fast-glob: 3.3.3 - get-port-please: 3.2.0 - h3: 1.13.0 - hookable: 5.5.3 - http-proxy: 1.18.1 - micromatch: 4.0.8 - nitropack: 2.12.4(@netlify/blobs@9.1.2)(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34) - node-fetch-native: 1.6.7 - path-to-regexp: 6.3.0 - pathe: 1.1.2 - radix3: 1.1.2 - resolve: 1.22.10 - serve-placeholder: 2.0.2 - serve-static: 1.16.2 - ufo: 1.6.1 - unctx: 2.4.1 - unenv: 1.10.0 - unstorage: 1.16.1(@netlify/blobs@9.1.2)(db0@0.3.2(better-sqlite3@12.2.0))(ioredis@5.7.0) - vite: 6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - zod: 3.25.76 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@types/node' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/kv' - - aws4fetch - - better-sqlite3 - - db0 - - debug - - drizzle-orm - - encoding - - idb-keyval - - ioredis - - jiti - - less - - lightningcss - - mysql2 - - rolldown - - sass - - sass-embedded - - sqlite3 - - stylus - - sugarss - - supports-color - - terser - - tsx - - uploadthing - - xml2js - - yaml - vite-node@3.2.4(@types/node@18.17.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: cac: 6.7.14 @@ -29884,70 +25032,6 @@ snapshots: - tsx - yaml - vite-node@3.2.4(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): - dependencies: - cac: 6.7.14 - debug: 4.4.1(supports-color@5.5.0) - es-module-lexer: 1.7.0 - pathe: 2.0.3 - vite: 6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - transitivePeerDependencies: - - '@types/node' - - jiti - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - - vite-node@3.2.4(@types/node@20.19.11)(jiti@2.5.1): - dependencies: - cac: 6.7.14 - debug: 4.4.1(supports-color@5.5.0) - es-module-lexer: 1.7.0 - pathe: 2.0.3 - vite: 6.3.5(@types/node@20.19.11)(jiti@2.5.1) - transitivePeerDependencies: - - '@types/node' - - jiti - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - - vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)): - dependencies: - debug: 4.4.1(supports-color@5.5.0) - globrex: 0.1.2 - tsconfck: 3.1.6(typescript@5.8.3) - optionalDependencies: - vite: 6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - transitivePeerDependencies: - - supports-color - - typescript - - vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)): - dependencies: - debug: 4.4.1(supports-color@5.5.0) - globrex: 0.1.2 - tsconfck: 3.1.6(typescript@5.8.3) - optionalDependencies: - vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - transitivePeerDependencies: - - supports-color - - typescript - vite@6.3.5(@types/node@18.17.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: esbuild: 0.25.9 @@ -29965,53 +25049,6 @@ snapshots: tsx: 4.20.4 yaml: 2.8.1 - vite@6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): - dependencies: - esbuild: 0.25.9 - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 - postcss: 8.5.6 - rollup: 4.47.1 - tinyglobby: 0.2.14 - optionalDependencies: - '@types/node': 20.19.10 - fsevents: 2.3.3 - jiti: 2.5.1 - lightningcss: 1.30.1 - terser: 5.43.1 - tsx: 4.20.4 - yaml: 2.8.1 - - vite@6.3.5(@types/node@20.19.11)(jiti@2.5.1): - dependencies: - esbuild: 0.25.9 - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 - postcss: 8.5.6 - rollup: 4.47.1 - tinyglobby: 0.2.14 - optionalDependencies: - '@types/node': 20.19.11 - fsevents: 2.3.3 - jiti: 2.5.1 - - vite@6.3.5(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): - dependencies: - esbuild: 0.25.9 - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 - postcss: 8.5.6 - rollup: 4.47.1 - tinyglobby: 0.2.14 - optionalDependencies: - '@types/node': 22.17.1 - fsevents: 2.3.3 - jiti: 2.5.1 - lightningcss: 1.30.1 - terser: 5.43.1 - tsx: 4.20.4 - yaml: 2.8.1 - vite@7.1.2(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: esbuild: 0.25.9 @@ -30047,10 +25084,6 @@ snapshots: tsx: 4.20.4 yaml: 2.8.1 - vitefu@1.1.1(vite@6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)): - optionalDependencies: - vite: 6.3.5(@types/node@20.19.10)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - vitefu@1.1.1(vite@7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)): optionalDependencies: vite: 7.1.2(@types/node@22.17.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) @@ -30098,49 +25131,6 @@ snapshots: - tsx - yaml - vitest@3.2.4(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@20.19.11)(jiti@2.5.1): - dependencies: - '@types/chai': 5.2.2 - '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@20.19.11)(jiti@2.5.1)) - '@vitest/pretty-format': 3.2.4 - '@vitest/runner': 3.2.4 - '@vitest/snapshot': 3.2.4 - '@vitest/spy': 3.2.4 - '@vitest/utils': 3.2.4 - chai: 5.3.1 - debug: 4.4.1(supports-color@5.5.0) - expect-type: 1.2.2 - magic-string: 0.30.17 - pathe: 2.0.3 - picomatch: 4.0.3 - std-env: 3.9.0 - tinybench: 2.9.0 - tinyexec: 0.3.2 - tinyglobby: 0.2.14 - tinypool: 1.1.1 - tinyrainbow: 2.0.0 - vite: 6.3.5(@types/node@20.19.11)(jiti@2.5.1) - vite-node: 3.2.4(@types/node@20.19.11)(jiti@2.5.1) - why-is-node-running: 2.3.0 - optionalDependencies: - '@edge-runtime/vm': 5.0.0 - '@types/debug': 4.1.12 - '@types/node': 20.19.11 - transitivePeerDependencies: - - jiti - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - walker@1.0.8: dependencies: makeerror: 1.0.12 @@ -30164,14 +25154,6 @@ snapshots: web-streams-polyfill@3.3.3: {} - webcrypto-core@1.8.1: - dependencies: - '@peculiar/asn1-schema': 2.4.0 - '@peculiar/json-schema': 1.1.12 - asn1js: 3.0.6 - pvtsutils: 1.3.6 - tslib: 2.8.1 - webidl-conversions@3.0.1: {} webidl-conversions@4.0.2: {} @@ -30180,39 +25162,6 @@ snapshots: webpack-virtual-modules@0.6.2: {} - webpack@5.101.1(@swc/core@1.13.5): - dependencies: - '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.8 - '@types/json-schema': 7.0.15 - '@webassemblyjs/ast': 1.14.1 - '@webassemblyjs/wasm-edit': 1.14.1 - '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.15.0 - acorn-import-phases: 1.0.4(acorn@8.15.0) - browserslist: 4.25.3 - chrome-trace-event: 1.0.4 - enhanced-resolve: 5.18.3 - es-module-lexer: 1.7.0 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - json-parse-even-better-errors: 2.3.1 - loader-runner: 4.3.0 - mime-types: 2.1.35 - neo-async: 2.6.2 - schema-utils: 4.3.2 - tapable: 2.2.2 - terser-webpack-plugin: 5.3.14(@swc/core@1.13.5)(webpack@5.101.1(@swc/core@1.13.5)) - watchpack: 2.4.4 - webpack-sources: 3.3.3 - transitivePeerDependencies: - - '@swc/core' - - esbuild - - uglify-js - optional: true - webpack@5.101.1(@swc/core@1.13.5)(esbuild@0.25.9): dependencies: '@types/eslint-scope': 3.7.7 @@ -30307,22 +25256,10 @@ snapshots: gopd: 1.2.0 has-tostringtag: 1.0.2 - which@1.3.1: - dependencies: - isexe: 2.0.0 - which@2.0.2: dependencies: isexe: 2.0.0 - which@3.0.1: - dependencies: - isexe: 2.0.0 - - which@4.0.0: - dependencies: - isexe: 3.1.1 - which@5.0.0: dependencies: isexe: 3.1.1 @@ -30332,10 +25269,6 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 - widest-line@4.0.1: - dependencies: - string-width: 5.1.2 - widest-line@5.0.0: dependencies: string-width: 7.2.0 @@ -30558,8 +25491,6 @@ snapshots: cookie: 1.0.2 youch-core: 0.3.3 - zimmerframe@1.1.2: {} - zip-stream@6.0.1: dependencies: archiver-utils: 5.0.2 diff --git a/ts-sdk b/ts-sdk index 5b4c7f39..8f1459fe 160000 --- a/ts-sdk +++ b/ts-sdk @@ -1 +1 @@ -Subproject commit 5b4c7f3971e0b5bb9c6e5967f0feaf6431e35177 +Subproject commit 8f1459fe927f69a00463bef8d335f7690edbec44 diff --git a/typegen/genUtils/HookGenerator.ts b/typegen/genUtils/HookGenerator.ts new file mode 100644 index 00000000..46b12a53 --- /dev/null +++ b/typegen/genUtils/HookGenerator.ts @@ -0,0 +1,123 @@ +import { existsSync, readFileSync, writeFileSync } from "node:fs"; +import type { HookConfig, HookGenerationConfig } from "../typeConfigs.js"; + +/** + * Generates and injects JSDoc comments into React hook files + */ +export class HookGenerator { + private readonly autumnJSPath: string; + + constructor(autumnJSPath: string) { + this.autumnJSPath = autumnJSPath; + } + + /** + * Generate hook documentation by injecting JSDoc into hook files + */ + async generateHookDocs(config: HookGenerationConfig): Promise { + console.log(`⚡ Generating ${config.hooks.length} hook documentation...`); + + let successCount = 0; + let failCount = 0; + + for (const hookConfig of config.hooks) { + try { + await this.injectHookJSDoc(hookConfig); + successCount++; + } catch (error) { + console.error( + `❌ Failed to generate docs for ${hookConfig.name}:`, + error, + ); + failCount++; + } + } + + console.log( + `✅ Generated ${successCount} hook docs${failCount > 0 ? `, ${failCount} failed` : ""}`, + ); + } + + /** + * Inject JSDoc into a hook file + */ + private async injectHookJSDoc(config: HookConfig): Promise { + if (!existsSync(config.filePath)) { + throw new Error(`Hook file not found: ${config.filePath}`); + } + + // Read the current file content + const fileContent = readFileSync(config.filePath, "utf-8"); + + // Find the export statement + const exportRegex = new RegExp( + `export\\s+const\\s+${config.exportName}\\s*=`, + "m", + ); + const match = fileContent.match(exportRegex); + + if (!match) { + throw new Error( + `Could not find export for ${config.exportName} in ${config.filePath}`, + ); + } + + const exportIndex = match.index!; + + // Check if there's already JSDoc before this export + const beforeExport = fileContent.slice(0, exportIndex); + const lines = beforeExport.split("\n"); + + // Find if there's a JSDoc comment immediately before the export + let jsDocStart = -1; + let jsDocEnd = -1; + + for (let i = lines.length - 1; i >= 0; i--) { + const line = lines[i]?.trim() ?? ""; + + if (line === "") { + // Empty line, keep looking + continue; + } + + if (line === "*/") { + // Found end of JSDoc + jsDocEnd = i; + } else if (line.startsWith("/**") && jsDocEnd !== -1) { + // Found start of JSDoc + jsDocStart = i; + break; + } else if (!line.startsWith("*") && !line.startsWith("/**")) { + // Found non-JSDoc content, stop looking + break; + } + } + + // Build the new JSDoc comment + const jsdocLines = config.jsdoc.split("\n"); + const formattedJSDoc = `/**\n${jsdocLines.map((line) => (line ? ` * ${line}` : " *")).join("\n")}\n */\n`; + + let newContent: string; + + if (jsDocStart !== -1 && jsDocEnd !== -1) { + // Replace existing JSDoc + const beforeJSDoc = lines.slice(0, jsDocStart).join("\n"); + const afterJSDoc = lines.slice(jsDocEnd + 1).join("\n"); + newContent = + beforeJSDoc + + "\n" + + formattedJSDoc + + afterJSDoc + + fileContent.slice(exportIndex); + } else { + // Insert new JSDoc before export + newContent = + fileContent.slice(0, exportIndex) + + formattedJSDoc + + fileContent.slice(exportIndex); + } + + // Write the updated content back + writeFileSync(config.filePath, newContent, "utf-8"); + } +} diff --git a/typegen/genUtils/MethodGenerator.ts b/typegen/genUtils/MethodGenerator.ts new file mode 100644 index 00000000..29bd090b --- /dev/null +++ b/typegen/genUtils/MethodGenerator.ts @@ -0,0 +1,271 @@ +import { existsSync, mkdirSync, writeFileSync } from "node:fs"; +import path from "node:path"; +import * as ts from "typescript"; +import type { MethodConfig, MethodGenerationConfig } from "../typeConfigs.js"; +import { extractMethodInfo } from "./auto-schema-generator.js"; + +/** + * Generates TypeScript method signatures with JSDoc from SDK client methods + */ +export class MethodGenerator { + private readonly tsSDKPath: string; + private readonly targetPath: string; + + constructor(tsSDKPath: string, targetPath: string) { + this.tsSDKPath = tsSDKPath; + this.targetPath = targetPath; + } + + /** + * Generate method signatures based on configuration(s) + */ + async generateMethods( + configs: MethodGenerationConfig | MethodGenerationConfig[], + ): Promise { + const configArray = Array.isArray(configs) ? configs : [configs]; + const totalMethods = configArray.reduce( + (sum, config) => sum + config.methods.length, + 0, + ); + + console.log(`⚡ Generating ${totalMethods} method signatures...`); + + for (const config of configArray) { + // Ensure output directory exists + const outputDir = path.dirname(config.targetFile); + if (!existsSync(outputDir)) { + mkdirSync(outputDir, { recursive: true }); + } + + // Parse the SDK client file + const program = ts.createProgram([config.sourceFile], { + target: ts.ScriptTarget.ES2020, + module: ts.ModuleKind.CommonJS, + skipLibCheck: true, + noResolve: true, + }); + + const sourceFile = program.getSourceFile(config.sourceFile); + if (!sourceFile) { + throw new Error(`Could not find source file: ${config.sourceFile}`); + } + + // Extract and generate each method + const methodSignatures: string[] = []; + + for (const methodConfig of config.methods) { + const extracted = extractMethodInfo( + sourceFile, + methodConfig.sourceName, + ); + + if (!extracted) { + console.warn( + `⚠️ Method ${methodConfig.sourceName} not found in SDK`, + ); + continue; + } + + const signature = this.buildMethodSignature(methodConfig, extracted); + methodSignatures.push(signature); + } + + // Generate the complete output file + const outputContent = this.generateOutputFile( + methodSignatures, + config.interfaceName, + config.interfaceDescription, + ); + writeFileSync(config.targetFile, outputContent); + } + + console.log(`✅ Generated ${totalMethods} method signatures`); + } + + /** + * Build a single method signature with JSDoc + */ + private buildMethodSignature( + config: MethodConfig, + extracted: { + jsdoc: string | null; + paramType: string | null; + returnType: string | null; + }, + ): string { + // Get the param type name (camelCase version from our typegen) + const paramType = this.getClientParamType(config.sourceName); + + // Get the return type + const returnType = this.getReturnType(config, extracted.returnType); + + // Build the JSDoc - use extracted JSDoc directly + let jsdoc = ""; + if (extracted.jsdoc) { + // Clean up the JSDoc with configured exclusions + const cleanedJsdoc = this.cleanJsDoc( + extracted.jsdoc, + config.exclusions || [], + ); + jsdoc = ` /**\n${cleanedJsdoc}\n */`; + } else { + jsdoc = ` /**\n * ${config.targetName} method\n */`; + } + + // Build the method signature + const signature = ` ${config.targetName}: (params: ${paramType}) => ${returnType};`; + + return `${jsdoc}\n${signature}`; + } + + /** + * Clean JSDoc by removing excluded params and formatting + */ + private cleanJsDoc(jsdoc: string, exclusions: string[]): string { + // First, join all lines and clean up, replacing line breaks within JSDoc + const cleanedText = jsdoc + .split("\n") + .map((line) => line.replace(/^\s*\*\s?/, "")) // Remove leading * and whitespace + .join(" ") + .replace(/\s+/g, " "); // Normalize whitespace + + // Split by @param, @example, @see, @returns to get sections + const sections: string[] = []; + let currentText = cleanedText; + + // Extract and process @param tags + const paramMatches = currentText.matchAll(/@param\s+([^\s]+)\s+-\s+([^@]+)/g); + const params: Array<{ name: string; description: string }> = []; + + for (const match of paramMatches) { + const paramName = match[1] ?? ""; + const description = (match[2] ?? "").trim(); + params.push({ name: paramName, description }); + } + + // Remove all @param tags from the text to get the description and other tags + const textWithoutParams = currentText.replace( + /@param\s+[^\s]+\s+-\s+[^@]+/g, + "", + ); + + // Split into sections by tags + const parts = textWithoutParams.split(/(@example|@see|@returns)/); + const processedLines: string[] = []; + + // Add description (before any tags) + const description = parts[0]?.trim() ?? ""; + if (description) { + // Split description into multiple lines if needed (wrap at reasonable length) + const descLines = description.split(/\.\s+/).filter((l) => l.trim()); + for (const line of descLines) { + if (line.trim()) { + processedLines.push(` * ${line.trim()}${line.endsWith(".") ? "" : "."}`); + } + } + processedLines.push(" *"); + } + + // Add filtered @param tags + for (const param of params) { + const shouldExclude = exclusions.some((exclusion) => + `@param ${param.name}`.includes(`@param ${exclusion}`), + ); + + if (!shouldExclude) { + // Transform body.field → params.field + const transformedName = param.name.replace(/^body\./, "params."); + processedLines.push( + ` * @param ${transformedName} - ${param.description}`, + ); + } + } + + // Add other tags (@example, @see, etc.) + for (let i = 1; i < parts.length; i += 2) { + const tag = parts[i]; + const content = parts[i + 1]; + if (tag && content) { + processedLines.push(" *"); + processedLines.push(` * ${tag}`); + // Keep content as-is for @example and @see + const contentLines = content.trim().split("\n"); + for (const line of contentLines) { + if (line.trim()) { + processedLines.push(` * ${line.trim()}`); + } + } + } + } + + return processedLines.join("\n"); + } + + /** + * Get client-side parameter type name (generated by typegen) + */ + private getClientParamType(methodName: string): string { + // Convert method name to PascalCase + Params + const pascal = methodName.charAt(0).toUpperCase() + methodName.slice(1); + return `${pascal}Params`; + } + + /** + * Get return type for the method + */ + private getReturnType( + config: MethodConfig, + sdkReturnType: string | null, + ): string { + if (config.isSync) { + // Synchronous methods return the response directly + return `Autumn.${sdkReturnType || "CheckResponse"}`; + } + + // Async methods return Promise + return `Promise`; + } + + /** + * Generate the complete output file with all methods + */ + private generateOutputFile( + methodSignatures: string[], + interfaceName?: string, + interfaceDescription?: string, + ): string { + const finalInterfaceName = interfaceName || "UseCustomerMethods"; + const finalDescription = + interfaceDescription || + "Methods available in useCustomer and useEntity hooks\n *\n * All method documentation is extracted from the SDK, which is generated\n * from the OpenAPI spec in the backend repository."; + + return `// Auto-generated method signatures with JSDoc +// This file is generated by typegen pipeline from ts-sdk/src/client.ts +// DO NOT EDIT MANUALLY - changes will be overwritten +// +// To update documentation: +// 1. Edit JSDoc in backend: sirtenzin-autumn/shared/api/core/coreOpenApi.ts +// 2. Regenerate OpenAPI spec and SDK +// 3. Run: pnpm run gen:autumn-js + +import type { Autumn } from "@sdk"; +import type { + AttachParams, + BillingPortalParams, + CancelParams, + CheckoutParams, + CheckParams, + QueryParams, + SetupPaymentParams, + TrackParams, +} from "@/clientTypes"; + +/** + * ${finalDescription} + */ +export interface ${finalInterfaceName} { +${methodSignatures.join("\n\n")} +} +`; + } +} diff --git a/typegen/genUtils/auto-schema-generator.ts b/typegen/genUtils/auto-schema-generator.ts index e699e29e..1c29e1e3 100644 --- a/typegen/genUtils/auto-schema-generator.ts +++ b/typegen/genUtils/auto-schema-generator.ts @@ -1,4 +1,4 @@ -import { writeFileSync } from "fs"; +import { writeFileSync } from "node:fs"; import * as ts from "typescript"; interface GenerateZodOptions { @@ -11,17 +11,19 @@ interface GenerateZodOptions { /** * Generate camelCase Zod schema from TypeScript interface */ -export function generateCamelZod(options: GenerateZodOptions & { - omitFields?: string[]; - extendFields?: Record; -}) { +export function generateCamelZod( + options: GenerateZodOptions & { + omitFields?: string[]; + extendFields?: Record; + }, +) { return generateCleanZodSchema( options.inputFile, options.typeName, options.outputFile, options.camelCase ?? true, options.omitFields ?? [], - options.extendFields ?? {} + options.extendFields ?? {}, ); } @@ -30,7 +32,10 @@ export function generateCamelZod(options: GenerateZodOptions & { * This avoids the nested type reference issues from ts-to-zod */ // Cache TypeScript programs to avoid recompilation -const programCache = new Map(); +const programCache = new Map< + string, + { program: ts.Program; sourceFile: ts.SourceFile } +>(); function getOrCreateProgram(sourceFilePath: string) { if (programCache.has(sourceFilePath)) { @@ -40,8 +45,8 @@ function getOrCreateProgram(sourceFilePath: string) { const program = ts.createProgram([sourceFilePath], { target: ts.ScriptTarget.ES2020, module: ts.ModuleKind.CommonJS, - skipLibCheck: true, // Skip type checking for faster parsing - noResolve: true, // Don't resolve module imports + skipLibCheck: true, // Skip type checking for faster parsing + noResolve: true, // Don't resolve module imports }); const sourceFile = program.getSourceFile(sourceFilePath); @@ -60,7 +65,7 @@ export function generateCleanZodSchema( outputFilePath: string, camelCase = false, omitFields: string[] = [], - extendFields: Record = {} + extendFields: Record = {}, ) { const { sourceFile } = getOrCreateProgram(sourceFilePath); @@ -71,37 +76,51 @@ export function generateCleanZodSchema( // Find all nested interfaces and namespaces const nestedInterfaces = findNestedInterfaces(sourceFile, interfaceName); - + // Generate schemas for nested interfaces first - const nestedSchemas = nestedInterfaces.map(nested => { - const schemaCode = generateSchemaCode(nested.interface, sourceFile, camelCase, nested.name); - // Convert "CheckoutParamsOption" to "CheckoutParamsOptionSchema" (PascalCase) - const schemaName = nested.name + 'Schema'; - return `export const ${schemaName} = ${schemaCode};`; - }).join('\n\n'); + const nestedSchemas = nestedInterfaces + .map((nested) => { + const schemaCode = generateSchemaCode( + nested.interface, + sourceFile, + camelCase, + nested.name, + ); + // Convert "CheckoutParamsOption" to "CheckoutParamsOptionSchema" (PascalCase) + const schemaName = `${nested.name}Schema`; + return `export const ${schemaName} = ${schemaCode};`; + }) + .join("\n\n"); // Extract JSDoc comment for the main interface - const interfaceDescription = extractJSDocComment(interfaceDeclaration, sourceFile); - + const interfaceDescription = extractJSDocComment( + interfaceDeclaration, + sourceFile, + ); + const schemaCode = generateSchemaCode( interfaceDeclaration, sourceFile, camelCase, interfaceName, - nestedInterfaces.map(n => n.name), + nestedInterfaces.map((n) => n.name), omitFields, - extendFields + extendFields, ); - + // Add description to the main schema if available - const finalSchemaCode = interfaceDescription ? - `${schemaCode}.describe("${interfaceDescription.replace(/"/g, '\\"')}")` : - schemaCode; - + const finalSchemaCode = interfaceDescription + ? `${schemaCode}.describe("${interfaceDescription.replace(/"/g, '\\"')}")` + : schemaCode; + // Check if we need imports for external schemas - const needsCustomerDataImport = finalSchemaCode.includes('CustomerDataSchema') || nestedSchemas.includes('CustomerDataSchema'); - const needsEntityDataImport = finalSchemaCode.includes('EntityDataSchema') || nestedSchemas.includes('EntityDataSchema'); - + const needsCustomerDataImport = + finalSchemaCode.includes("CustomerDataSchema") || + nestedSchemas.includes("CustomerDataSchema"); + const needsEntityDataImport = + finalSchemaCode.includes("EntityDataSchema") || + nestedSchemas.includes("EntityDataSchema"); + // Generate imports let imports = `import { z } from "zod";`; if (needsCustomerDataImport) { @@ -112,46 +131,48 @@ export function generateCleanZodSchema( } // Generate type imports for interfaces - let typeImports = ''; + let typeImports = ""; if (needsCustomerDataImport) { typeImports += `import type { CustomerData } from "./customerDataTypes";\n`; } if (needsEntityDataImport) { typeImports += `import type { EntityData } from "./entityDataTypes";\n`; } - + // Generate explicit interface with JSDoc comments const explicitInterface = generateExplicitInterface( interfaceDeclaration, sourceFile, camelCase, interfaceName, - nestedInterfaces.map(n => n.name), + nestedInterfaces.map((n) => n.name), omitFields, extendFields, - interfaceDescription + interfaceDescription, ); // Generate nested interfaces - const nestedInterfaces_generated = nestedInterfaces.map(nested => { - return generateExplicitInterface( - nested.interface, - sourceFile, - camelCase, - nested.name, - [], - [], - {}, - null - ); - }).join('\n\n'); + const nestedInterfaces_generated = nestedInterfaces + .map((nested) => { + return generateExplicitInterface( + nested.interface, + sourceFile, + camelCase, + nested.name, + [], + [], + {}, + null, + ); + }) + .join("\n\n"); const fullCode = `// Auto-generated Zod schema ${imports} ${typeImports} -${nestedSchemas ? nestedSchemas + '\n\n' : ''}export const ${camelCase ? toCamelCase(interfaceName) : interfaceName.toLowerCase()}Schema = ${finalSchemaCode}; +${nestedSchemas ? `${nestedSchemas}\n\n` : ""}export const ${camelCase ? toCamelCase(interfaceName) : interfaceName.toLowerCase()}Schema = ${finalSchemaCode}; -${nestedInterfaces_generated ? nestedInterfaces_generated + '\n\n' : ''}${explicitInterface} +${nestedInterfaces_generated ? `${nestedInterfaces_generated}\n\n` : ""}${explicitInterface} `; writeFileSync(outputFilePath, fullCode); @@ -184,20 +205,21 @@ function findNestedInterfaces( function visit(node: ts.Node) { // Look for namespace declarations that match our parent interface name - if (ts.isModuleDeclaration(node) && - node.name && - ts.isIdentifier(node.name) && + if ( + ts.isModuleDeclaration(node) && + node.name && + ts.isIdentifier(node.name) && node.name.text === parentInterfaceName && node.body && - ts.isModuleBlock(node.body)) { - + ts.isModuleBlock(node.body) + ) { // Find interfaces within this namespace - node.body.statements.forEach(statement => { + node.body.statements.forEach((statement) => { if (ts.isInterfaceDeclaration(statement)) { const nestedName = `${parentInterfaceName}${statement.name.text}`; results.push({ name: nestedName, - interface: statement + interface: statement, }); } }); @@ -216,7 +238,7 @@ function generateSchemaCode( interfaceName?: string, availableNestedTypes?: string[], omitFields: string[] = [], - extendFields: Record = {} + extendFields: Record = {}, ): string { const properties: string[] = []; @@ -230,27 +252,34 @@ function generateSchemaCode( const finalPropertyName = camelCase ? toCamelCase(propertyName) : propertyName; - + // Check if this field should be omitted if (omitFields.includes(propertyName)) { return; // Skip this property } - - const zodType = convertTypeToZod(typeNode, sourceFile, interfaceName, availableNestedTypes); - + + const zodType = convertTypeToZod( + typeNode, + sourceFile, + interfaceName, + availableNestedTypes, + ); + // Extract JSDoc comment for this property const description = extractJSDocComment(member, sourceFile); - + // Debug logging (remove in production) if (process.env.DEBUG_JSDOC) { - console.log(`Property ${propertyName}: ${description || 'No description found'}`); + console.log( + `Property ${propertyName}: ${description || "No description found"}`, + ); } - + // Build the Zod property with description - let zodProperty = description + let zodProperty = description ? `${zodType}.describe("${escapeDescription(description)}")` : zodType; - + zodProperty = isOptional ? `${finalPropertyName}: ${zodProperty}.optional()` : `${finalPropertyName}: ${zodProperty}`; @@ -262,11 +291,11 @@ function generateSchemaCode( // Add extended fields Object.entries(extendFields).forEach(([fieldName, config]) => { const finalFieldName = camelCase ? toCamelCase(fieldName) : fieldName; - - let zodProperty = config.description + + const zodProperty = config.description ? `${config.zodType}.describe("${escapeDescription(config.description)}")` : config.zodType; - + properties.push(`${finalFieldName}: ${zodProperty}`); }); @@ -277,16 +306,19 @@ function convertTypeToZod( typeNode: ts.TypeNode, sourceFile: ts.SourceFile, parentInterface?: string, - availableNestedTypes?: string[] + availableNestedTypes?: string[], ): string { const typeText = typeNode.getText(sourceFile).trim(); // Handle nested interface references (e.g., AttachParams.Option) if (parentInterface && typeText.includes(`${parentInterface}.`)) { - const nestedTypeName = typeText.replace(`${parentInterface}.`, `${parentInterface}`); + const nestedTypeName = typeText.replace( + `${parentInterface}.`, + `${parentInterface}`, + ); if (availableNestedTypes?.includes(nestedTypeName)) { // Convert "CheckoutParamsOption" to "CheckoutParamsOptionSchema" (PascalCase) - const schemaName = nestedTypeName + 'Schema'; + const schemaName = `${nestedTypeName}Schema`; return schemaName; } } @@ -310,10 +342,10 @@ function convertTypeToZod( if (typeText.includes(" | null")) { const baseType = typeText.replace(" | null", "").trim(); const baseZodType = convertTypeToZod( - { getText: () => baseType } as any, + { getText: () => baseType } as ts.TypeNode, sourceFile, parentInterface, - availableNestedTypes + availableNestedTypes, ); return `${baseZodType}.nullable()`; } @@ -335,10 +367,10 @@ function convertTypeToZod( if (type.startsWith("Array<") && type.endsWith(">")) { const innerType = type.slice(6, -1); const innerZodType = convertTypeToZod( - { getText: () => innerType } as any, + { getText: () => innerType } as ts.TypeNode, sourceFile, parentInterface, - availableNestedTypes + availableNestedTypes, ); return `z.array(${innerZodType})`; } @@ -351,10 +383,10 @@ function convertTypeToZod( if (typeText.startsWith("Array<") && typeText.endsWith(">")) { const innerType = typeText.slice(6, -1); const innerZodType = convertTypeToZod( - { getText: () => innerType } as any, + { getText: () => innerType } as ts.TypeNode, sourceFile, parentInterface, - availableNestedTypes + availableNestedTypes, ); return `z.array(${innerZodType})`; } @@ -365,7 +397,7 @@ function convertTypeToZod( { getText: () => innerType } as unknown as ts.TypeNode, sourceFile, parentInterface, - availableNestedTypes + availableNestedTypes, ); return `z.array(${innerZodType})`; } @@ -375,15 +407,15 @@ function convertTypeToZod( // Extract key and value types from Record const match = typeText.match(/Record<([^,]+),\s*([^>]+)>/); if (match) { - const keyType = match[1].trim(); - const valueType = match[2].trim(); - + const keyType = match[1]?.trim() ?? ""; + const valueType = match[2]?.trim() ?? ""; + const keyZodType = keyType === "string" ? "z.string()" : "z.string()"; // Default to string keys const valueZodType = convertTypeToZod( - { getText: () => valueType } as any, + { getText: () => valueType } as ts.TypeNode, sourceFile, parentInterface, - availableNestedTypes + availableNestedTypes, ); return `z.record(${keyZodType}, ${valueZodType})`; } @@ -392,14 +424,21 @@ function convertTypeToZod( // Handle index signature types like { [key: string]: unknown } if (typeText.match(/\{\s*\[\s*\w+\s*:\s*string\s*\]\s*:\s*\w+\s*\}/)) { - const match = typeText.match(/\{\s*\[\s*\w+\s*:\s*string\s*\]\s*:\s*(\w+)\s*\}/); + const match = typeText.match( + /\{\s*\[\s*\w+\s*:\s*string\s*\]\s*:\s*(\w+)\s*\}/, + ); if (match) { - const valueType = match[1].trim(); - const valueZodType = valueType === "unknown" ? "z.unknown()" : - valueType === "string" ? "z.string()" : - valueType === "number" ? "z.number()" : - valueType === "boolean" ? "z.boolean()" : - "z.unknown()"; + const valueType = match[1]?.trim() ?? ""; + const valueZodType = + valueType === "unknown" + ? "z.unknown()" + : valueType === "string" + ? "z.string()" + : valueType === "number" + ? "z.number()" + : valueType === "boolean" + ? "z.boolean()" + : "z.unknown()"; return `z.record(z.string(), ${valueZodType})`; } } @@ -420,20 +459,25 @@ function toCamelCase(str: string): string { /** * Extract JSDoc comment text from a TypeScript node */ -function extractJSDocComment(node: ts.Node, sourceFile: ts.SourceFile): string | null { +function extractJSDocComment( + node: ts.Node, + sourceFile: ts.SourceFile, +): string | null { // For interface declarations, only use JSDoc that's directly attached to the interface // Don't fall back to parsing text, as this can pick up JSDoc from properties if (ts.isInterfaceDeclaration(node)) { - const jsDocNodes = (node as any).jsDoc; + const jsDocNodes = (node as unknown as { jsDoc: ts.JSDoc[] }).jsDoc; if (jsDocNodes && jsDocNodes.length > 0) { const jsDoc = jsDocNodes[0]; - if (jsDoc.comment) { - if (typeof jsDoc.comment === 'string') { + if (jsDoc?.comment) { + if (typeof jsDoc.comment === "string") { return jsDoc.comment.trim(); } else if (Array.isArray(jsDoc.comment)) { return jsDoc.comment - .map((part: any) => typeof part === 'string' ? part : part.text) - .join('') + .map((part: { text: string }) => + typeof part === "string" ? part : part.text, + ) + .join("") .trim(); } } @@ -443,16 +487,18 @@ function extractJSDocComment(node: ts.Node, sourceFile: ts.SourceFile): string | } // For other nodes (properties, etc.), use the existing logic - const jsDocNodes = (node as any).jsDoc; + const jsDocNodes = (node as unknown as { jsDoc: ts.JSDoc[] }).jsDoc; if (jsDocNodes && jsDocNodes.length > 0) { const jsDoc = jsDocNodes[0]; - if (jsDoc.comment) { - if (typeof jsDoc.comment === 'string') { + if (jsDoc?.comment) { + if (typeof jsDoc.comment === "string") { return jsDoc.comment.trim(); } else if (Array.isArray(jsDoc.comment)) { return jsDoc.comment - .map((part: any) => typeof part === 'string' ? part : part.text) - .join('') + .map((part: { text: string }) => + typeof part === "string" ? part : part.text, + ) + .join("") .trim(); } } @@ -463,27 +509,103 @@ function extractJSDocComment(node: ts.Node, sourceFile: ts.SourceFile): string | const jsDocMatch = fullText.match(/\/\*\*\s*([\s\S]*?)\s*\*\//); if (jsDocMatch) { // Clean up the JSDoc comment - return jsDocMatch[1] - .split('\n') - .map(line => line.replace(/^\s*\*\s?/, '').trim()) // Remove leading * and whitespace - .filter(line => line.length > 0) // Remove empty lines - .join(' ') - .trim(); - } - + return ( + jsDocMatch[1] ?? + "" + .split("\n") + .map((line) => line.replace(/^\s*\*\s?/, "").trim()) // Remove leading * and whitespace + .filter((line) => line.length > 0) // Remove empty lines + .join(" ") + .trim() + ); + } + return null; } +/** + * Extract method signature and full JSDoc from a class method + */ +export function extractMethodInfo( + sourceFile: ts.SourceFile, + methodName: string, +): { + jsdoc: string | null; + paramType: string | null; + returnType: string | null; +} | null { + let result: { + jsdoc: string | null; + paramType: string | null; + returnType: string | null; + } | null = null; + + // Find the class and the method + ts.forEachChild(sourceFile, (node) => { + if (ts.isClassDeclaration(node)) { + node.members.forEach((member) => { + if ( + ts.isMethodDeclaration(member) && + member.name && + ts.isIdentifier(member.name) && + member.name.text === methodName + ) { + // Extract full JSDoc including @param tags + let jsdoc: string | null = null; + const jsDocNodes = (member as unknown as { jsDoc: ts.JSDoc[] }).jsDoc; + if (jsDocNodes && jsDocNodes.length > 0) { + const jsDoc = jsDocNodes[0]; + // Get the full JSDoc text from the source file + const fullText = jsDoc?.getFullText(sourceFile) ?? ""; + // Remove leading /** and trailing */ and clean up + jsdoc = fullText + .replace(/^\/\*\*/, "") + .replace(/\*\/$/, "") + .trim(); + } + + // Extract parameter type (first parameter's type) + let paramType: string | null = null; + if (member.parameters.length > 0) { + const firstParam = member.parameters[0]; + if (firstParam?.type) { + // Get the type text and clean it up + const typeText = firstParam.type?.getText(sourceFile) ?? ""; + // Extract just the type name (e.g., "TopLevelAPI.AttachParams") + paramType = typeText.replace(/^.*\./, ""); // Remove namespace prefix + } + } + + // Extract return type + let returnType: string | null = null; + if (member.type) { + const typeText = member.type.getText(sourceFile); + // Extract response type from APIPromise + const match = typeText.match(/APIPromise<.*\.(\w+Response)>/); + if (match) { + returnType = match[1] ?? ""; + } + } + + result = { jsdoc, paramType, returnType }; + } + }); + } + }); + + return result; +} + /** * Escape description text for use in Zod .describe() calls */ function escapeDescription(description: string): string { return description - .replace(/\\/g, '\\\\') // Escape backslashes - .replace(/"/g, '\\"') // Escape quotes - .replace(/\n/g, '\\n') // Escape newlines - .replace(/\r/g, '\\r') // Escape carriage returns - .replace(/\t/g, '\\t'); // Escape tabs + .replace(/\\/g, "\\\\") // Escape backslashes + .replace(/"/g, '\\"') // Escape quotes + .replace(/\n/g, "\\n") // Escape newlines + .replace(/\r/g, "\\r") // Escape carriage returns + .replace(/\t/g, "\\t"); // Escape tabs } /** @@ -497,10 +619,12 @@ function generateExplicitInterface( availableNestedTypes: string[] = [], omitFields: string[] = [], extendFields: Record = {}, - interfaceDescription: string | null = null + interfaceDescription: string | null = null, ): string { const properties: string[] = []; - const finalInterfaceName = camelCase ? toCamelCase(interfaceName) : interfaceName; + const finalInterfaceName = camelCase + ? toCamelCase(interfaceName) + : interfaceName; // Process existing interface members interfaceDecl.members.forEach((member) => { @@ -518,19 +642,24 @@ function generateExplicitInterface( const finalPropertyName = camelCase ? toCamelCase(propertyName) : propertyName; - - const tsType = convertZodToTypeScript(typeNode, sourceFile, interfaceName, availableNestedTypes); - + + const tsType = convertZodToTypeScript( + typeNode, + sourceFile, + interfaceName, + availableNestedTypes, + ); + // Extract JSDoc comment for this property const description = extractJSDocComment(member, sourceFile); - + // Build the TypeScript property with JSDoc - let propertyString = ''; + let propertyString = ""; if (description) { - propertyString += ` /**\n * ${description.replace(/\*\//g, '* /')}\n */\n`; + propertyString += ` /**\n * ${description.replace(/\*\//g, "* /")}\n */\n`; } - - propertyString += ` ${finalPropertyName}${isOptional ? '?' : ''}: ${tsType};`; + + propertyString += ` ${finalPropertyName}${isOptional ? "?" : ""}: ${tsType};`; properties.push(propertyString); } } @@ -539,12 +668,12 @@ function generateExplicitInterface( // Add extended fields Object.entries(extendFields).forEach(([fieldName, config]) => { const finalFieldName = camelCase ? toCamelCase(fieldName) : fieldName; - - let propertyString = ''; + + let propertyString = ""; if (config.description) { - propertyString += ` /**\n * ${config.description.replace(/\*\//g, '* /')}\n */\n`; + propertyString += ` /**\n * ${config.description.replace(/\*\//g, "* /")}\n */\n`; } - + const tsType = convertZodTypeToTypeScript(config.zodType); // Extended fields from config are typically optional propertyString += ` ${finalFieldName}?: ${tsType};`; @@ -552,13 +681,13 @@ function generateExplicitInterface( }); // Generate the interface with JSDoc - let interfaceString = ''; + let interfaceString = ""; if (interfaceDescription) { - interfaceString += `/**\n * ${interfaceDescription.replace(/\*\//g, '* /')}\n */\n`; + interfaceString += `/**\n * ${interfaceDescription.replace(/\*\//g, "* /")}\n */\n`; } - - interfaceString += `export interface ${finalInterfaceName} {\n${properties.join('\n\n')}\n}`; - + + interfaceString += `export interface ${finalInterfaceName} {\n${properties.join("\n\n")}\n}`; + return interfaceString; } @@ -569,13 +698,16 @@ function convertZodToTypeScript( typeNode: ts.TypeNode, sourceFile: ts.SourceFile, parentInterface?: string, - availableNestedTypes?: string[] + availableNestedTypes?: string[], ): string { const typeText = typeNode.getText(sourceFile).trim(); // Handle nested interface references (e.g., AttachParams.Option) if (parentInterface && typeText.includes(`${parentInterface}.`)) { - const nestedTypeName = typeText.replace(`${parentInterface}.`, `${parentInterface}`); + const nestedTypeName = typeText.replace( + `${parentInterface}.`, + `${parentInterface}`, + ); if (availableNestedTypes?.includes(nestedTypeName)) { return nestedTypeName; } @@ -593,11 +725,15 @@ function convertZodToTypeScript( if (typeText.startsWith("Array<") && typeText.endsWith(">")) { const innerType = typeText.slice(6, -1); const innerTsType = convertZodToTypeScript( - { getText: () => innerType } as any, + { getText: () => innerType } as ts.TypeNode, sourceFile, parentInterface, - availableNestedTypes + availableNestedTypes, ); + // Wrap union types in parentheses before appending [] + if (innerTsType.includes(" | ")) { + return `(${innerTsType})[]`; + } return `${innerTsType}[]`; } @@ -607,8 +743,12 @@ function convertZodToTypeScript( { getText: () => innerType } as unknown as ts.TypeNode, sourceFile, parentInterface, - availableNestedTypes + availableNestedTypes, ); + // Wrap union types in parentheses before appending [] + if (innerTsType.includes(" | ")) { + return `(${innerTsType})[]`; + } return `${innerTsType}[]`; } @@ -621,10 +761,10 @@ function convertZodToTypeScript( if (typeText.includes(" | null")) { const baseType = typeText.replace(" | null", "").trim(); const baseTsType = convertZodToTypeScript( - { getText: () => baseType } as any, + { getText: () => baseType } as ts.TypeNode, sourceFile, parentInterface, - availableNestedTypes + availableNestedTypes, ); return `${baseTsType} | null`; } @@ -638,87 +778,93 @@ function convertZodToTypeScript( */ function convertZodTypeToTypeScript(zodType: string): string { // Handle common Zod types - if (zodType.includes('z.string()') && !zodType.includes('z.record(')) return 'string'; - if (zodType.includes('z.number()')) return 'number'; - if (zodType.includes('z.boolean()')) return 'boolean'; - if (zodType.includes('z.any()') && !zodType.includes('z.record(')) return 'any'; - if (zodType.includes('z.unknown()')) return 'unknown'; - + if (zodType.includes("z.string()") && !zodType.includes("z.record(")) + return "string"; + if (zodType.includes("z.number()")) return "number"; + if (zodType.includes("z.boolean()")) return "boolean"; + if (zodType.includes("z.any()") && !zodType.includes("z.record(")) + return "any"; + if (zodType.includes("z.unknown()")) return "unknown"; + // Handle arrays - if (zodType.includes('z.array(')) { - if (zodType.includes('z.array(z.string())')) return 'string[]'; - if (zodType.includes('z.array(z.number())')) return 'number[]'; - if (zodType.includes('z.array(z.boolean())')) return 'boolean[]'; + if (zodType.includes("z.array(")) { + if (zodType.includes("z.array(z.string())")) return "string[]"; + if (zodType.includes("z.array(z.number())")) return "number[]"; + if (zodType.includes("z.array(z.boolean())")) return "boolean[]"; // Handle nested schema arrays (e.g., z.array(AttachParamsOptionSchema)) const arraySchemaMatch = zodType.match(/z\.array\((\w+Schema)\)/); if (arraySchemaMatch) { const schemaName = arraySchemaMatch[1]; - const interfaceName = schemaName.replace('Schema', ''); + const interfaceName = schemaName?.replace("Schema", "") ?? ""; return `${interfaceName}[]`; } - return 'any[]'; // Fallback for complex arrays + return "any[]"; // Fallback for complex arrays } - + // Handle records - need to parse more carefully to handle nested parentheses - if (zodType.includes('z.record(')) { + if (zodType.includes("z.record(")) { // Handle the simple case: z.record(z.string(), z.any()) - const simpleRecordMatch = zodType.match(/z\.record\(z\.string\(\),\s*z\.any\(\)\)/); + const simpleRecordMatch = zodType.match( + /z\.record\(z\.string\(\),\s*z\.any\(\)\)/, + ); if (simpleRecordMatch) { - return 'Record'; + return "Record"; } - + // Handle other z.record patterns const recordMatch = zodType.match(/z\.record\(([^,]+),\s*([^)]+)\)/); if (recordMatch) { - const keyType = convertZodTypeToTypeScript(recordMatch[1].trim()); - const valueType = convertZodTypeToTypeScript(recordMatch[2].trim()); + const keyType = convertZodTypeToTypeScript(recordMatch[1]?.trim() ?? ""); + const valueType = convertZodTypeToTypeScript( + recordMatch[2]?.trim() ?? "", + ); return `Record<${keyType}, ${valueType}>`; } - return 'Record'; + return "Record"; } - + // Handle unions - if (zodType.includes('z.union(')) { + if (zodType.includes("z.union(")) { // Try to parse union types more intelligently const unionMatch = zodType.match(/z\.union\(\[(.*)\]\)/); if (unionMatch) { - const unionTypes = unionMatch[1].split(', ').map(type => { + const unionTypes = unionMatch[1]?.split(", ").map((type) => { return convertZodTypeToTypeScript(type.trim()); }); - return unionTypes.join(' | '); + return unionTypes?.join(" | ") ?? ""; } - return 'string | number'; // Simplified fallback + return "string | number"; // Simplified fallback } - + // Handle literals - if (zodType.includes('z.literal(')) { + if (zodType.includes("z.literal(")) { const literalMatch = zodType.match(/z\.literal\(([^)]+)\)/); if (literalMatch) { - return literalMatch[1]; + return literalMatch[1] ?? ""; } } - + // Handle nullable types with .nullable() - if (zodType.includes('.nullable()')) { - const baseType = zodType.replace('.nullable()', '').trim(); + if (zodType.includes(".nullable()")) { + const baseType = zodType.replace(".nullable()", "").trim(); const baseTs = convertZodTypeToTypeScript(baseType); return `${baseTs} | null`; } - + // Handle optional types (shouldn't affect the type itself) - if (zodType.includes('.optional()')) { - const baseType = zodType.replace('.optional()', '').trim(); + if (zodType.includes(".optional()")) { + const baseType = zodType.replace(".optional()", "").trim(); return convertZodTypeToTypeScript(baseType); } // Handle describe calls - if (zodType.includes('.describe(')) { - const baseType = zodType.replace(/\.describe\([^)]+\)/, '').trim(); + if (zodType.includes(".describe(")) { + const baseType = zodType.replace(/\.describe\([^)]+\)/, "").trim(); return convertZodTypeToTypeScript(baseType); } - + // Fallback - return 'any'; + return "any"; } // Example usage diff --git a/typegen/genUtils/index.ts b/typegen/genUtils/index.ts index 64609794..edb2a14d 100644 --- a/typegen/genUtils/index.ts +++ b/typegen/genUtils/index.ts @@ -1,7 +1,11 @@ // Type generation utilities -export { TypeGenerator } from './TypeGenerator'; -export { TypeGeneratorUtils } from './utils'; -export { - generateCamelZod, - generateCleanZodSchema -} from './auto-schema-generator'; \ No newline at end of file + +export { + extractMethodInfo, + generateCamelZod, + generateCleanZodSchema, +} from "./auto-schema-generator.js"; +export { HookGenerator } from "./HookGenerator.js"; +export { MethodGenerator } from "./MethodGenerator.js"; +export { TypeGenerator } from "./TypeGenerator.js"; +export { TypeGeneratorUtils } from "./utils.js"; diff --git a/typegen/generate-autumn-js-types.ts b/typegen/generate-autumn-js-types.ts old mode 100644 new mode 100755 index 26f1a470..f5b78d8b --- a/typegen/generate-autumn-js-types.ts +++ b/typegen/generate-autumn-js-types.ts @@ -1,48 +1,73 @@ #!/usr/bin/env tsx -import path from "path"; -import { TypeGenerator, TypeGeneratorUtils } from "./genUtils"; -import { getAutumnJSTypeConfigs } from "./typeConfigs"; +import path from "node:path"; +import { + HookGenerator, + MethodGenerator, + TypeGenerator, + TypeGeneratorUtils, +} from "./genUtils/index.js"; +import { + getAutumnJSHookConfigs, + getAutumnJSMethodConfigs, + getAutumnJSTypeConfigs, +} from "./typeConfigs.js"; /** * Generate camelCase types for autumn-js from @ts-sdk - * + * * This script converts snake_case SDK types to camelCase Zod schemas * for use in the autumn-js React library. - * + * * Configuration is defined in ./typeConfigs.ts - check there to see * exactly which types are being generated. */ async function main() { - console.log("🎯 Generating camelCase types for autumn-js...\n"); - - try { - // Define paths relative to this script - const tsSDKPath = path.resolve(__dirname, "../ts-sdk"); - const autumnJSPath = path.resolve(__dirname, "../autumn-js"); - - // Validate all required paths exist - TypeGeneratorUtils.validatePaths([ - { name: "@ts-sdk", path: tsSDKPath }, - { name: "autumn-js", path: autumnJSPath } - ]); - - // Get type configurations - const typeConfig = getAutumnJSTypeConfigs(tsSDKPath, autumnJSPath); - - console.log(`📋 Generating ${typeConfig.configs.length} types...`); - - // Generate all types - const generator = new TypeGenerator(tsSDKPath, autumnJSPath); - await generator.generateTypes(typeConfig); - - console.log("✅ Type generation completed!"); - - } catch (error) { - console.error("💥 autumn-js type generation failed:", error); - process.exit(1); - } + const startTime = Date.now(); + console.log("🎯 Generating camelCase types for autumn-js...\n"); + + try { + // Define paths relative to this script + const tsSDKPath = path.resolve(__dirname, "../ts-sdk"); + const autumnJSPath = path.resolve(__dirname, "../autumn-js"); + + // Validate all required paths exist + TypeGeneratorUtils.validatePaths([ + { name: "@ts-sdk", path: tsSDKPath }, + { name: "autumn-js", path: autumnJSPath }, + ]); + + // Generate parameter types + const typeStart = Date.now(); + const typeConfig = getAutumnJSTypeConfigs(tsSDKPath, autumnJSPath); + console.log(`📋 Generating ${typeConfig.configs.length} parameter types...`); + const generator = new TypeGenerator(tsSDKPath, autumnJSPath); + await generator.generateTypes(typeConfig); + console.log(` ⏱️ Types generated in ${Date.now() - typeStart}ms`); + + // Generate method signatures (useCustomer + useEntity) + const methodStart = Date.now(); + console.log(`\n🔧 Generating method signatures...`); + const methodConfigs = getAutumnJSMethodConfigs(tsSDKPath, autumnJSPath); + const methodGenerator = new MethodGenerator(tsSDKPath, autumnJSPath); + await methodGenerator.generateMethods(methodConfigs); + console.log(` ⏱️ Methods generated in ${Date.now() - methodStart}ms`); + + // Generate hook documentation + const hookStart = Date.now(); + console.log(`\n📝 Generating hook documentation...`); + const hookConfig = getAutumnJSHookConfigs(autumnJSPath); + const hookGenerator = new HookGenerator(autumnJSPath); + await hookGenerator.generateHookDocs(hookConfig); + console.log(` ⏱️ Hooks documented in ${Date.now() - hookStart}ms`); + + const totalTime = Date.now() - startTime; + console.log(`\n✅ All type generation completed in ${totalTime}ms!`); + } catch (error) { + console.error("💥 autumn-js type generation failed:", error); + process.exit(1); + } } // Run immediately -main(); \ No newline at end of file +main(); diff --git a/typegen/hookDocs.ts b/typegen/hookDocs.ts new file mode 100644 index 00000000..506b34a1 --- /dev/null +++ b/typegen/hookDocs.ts @@ -0,0 +1,227 @@ +/** + * Centralized hook documentation definitions. + * These generate JSDoc comments for React hooks in autumn-js. + */ + +interface HookJSDocParameter { + name: string; + type: string; + description: string; + required?: boolean; +} + +interface HookJSDocReturn { + name: string; + type: string; + description: string; +} + +interface HookJSDocOptions { + name: string; + description: string; + whenToUse?: string; + parameters: HookJSDocParameter[]; + returns: HookJSDocReturn[]; + docsUrl: string; +} + +/** + * Generate JSDoc comment for a React hook + */ +export function createHookJSDoc(options: HookJSDocOptions): string { + const parts: string[] = []; + + // Main description + parts.push(options.description); + + // When to use section + if (options.whenToUse) { + parts.push(""); + parts.push(options.whenToUse); + } + + // Parameters + if (options.parameters.length > 0) { + parts.push(""); + for (const param of options.parameters) { + const requiredTag = param.required ? "" : " (optional)"; + parts.push(`@param ${param.name} - ${param.description}${requiredTag}`); + } + } + + // Returns + if (options.returns.length > 0) { + parts.push(""); + for (const ret of options.returns) { + parts.push(`@returns ${ret.name} - ${ret.description}`); + } + } + + // Documentation link + if (options.docsUrl) { + parts.push(""); + parts.push(`@see {@link ${options.docsUrl}}`); + } + + return parts.join("\n"); +} + +/** + * Hook documentation for useCustomer + * Seeded from: autumn-docs/api-reference/hooks/useCustomer.mdx + */ +export const useCustomerHookDoc = createHookJSDoc({ + name: "useCustomer", + description: + "Access a customer's state and use it to display information in your React app.\n\nThe `useCustomer` hook provides access to customer data and related operations. You can use it from your frontend to retrieve customer information, manage loading states, and create entities.", + parameters: [ + { + name: "params.expand", + type: "CustomerExpandOption[]", + description: + "Additional data to include (invoices, rewards, trials_used, entities, referrals, payment_method)", + }, + { + name: "params.errorOnNotFound", + type: "boolean", + description: "Whether to throw error if customer not found", + }, + { + name: "params.swrConfig", + type: "SWRConfiguration", + description: "SWR configuration options", + }, + ], + returns: [ + { + name: "customer", + type: "Autumn.Customer | null", + description: "Customer object with subscription and feature data", + }, + { + name: "isLoading", + type: "boolean", + description: "Whether customer data is being fetched", + }, + { + name: "error", + type: "AutumnError | null", + description: "Any error that occurred while fetching", + }, + { + name: "refetch", + type: "() => Promise", + description: "Refetch customer data", + }, + { + name: "...methods", + type: "UseCustomerMethods", + description: + "All subscription methods (attach, checkout, cancel, track, setupPayment, openBillingPortal)", + }, + { + name: "createEntity", + type: "(params: EntityCreateParams) => Promise", + description: "Create entities for granular feature tracking", + }, + ], + docsUrl: "https://docs.useautumn.com/api-reference/hooks/useCustomer", +}); + +/** + * Hook documentation for useEntity + * Seeded from: autumn-docs/api-reference/hooks/useEntity.mdx + */ +export const useEntityHookDoc = createHookJSDoc({ + name: "useEntity", + description: + "Access an entity's state and use it to display information in your React app.\n\nThe `useEntity` hook provides access to entity data and related operations. You can use it from your frontend to retrieve entity information and manage loading states.", + parameters: [ + { + name: "entityId", + type: "string | null", + description: "The ID of the entity to retrieve", + required: true, + }, + { + name: "params.expand", + type: "'invoices'[]", + description: "Additional data to include in entity response", + }, + ], + returns: [ + { + name: "entity", + type: "Autumn.Entity | null", + description: "The entity object containing all entity data", + }, + { + name: "isLoading", + type: "boolean", + description: "Whether entity data is being fetched", + }, + { + name: "error", + type: "AutumnError | null", + description: "Any error that occurred while fetching", + }, + { + name: "refetch", + type: "() => Promise", + description: "Refetch entity data", + }, + { + name: "...methods", + type: "Subset", + description: "Entity-scoped methods (attach, cancel, track, check)", + }, + ], + docsUrl: "https://docs.useautumn.com/api-reference/hooks/useEntity", +}); + +/** + * Hook documentation for useAnalytics + * Seeded from: autumn-docs/api-reference/hooks/useAnalytics.mdx + */ +export const useAnalyticsHookDoc = createHookJSDoc({ + name: "useAnalytics", + description: + "Query usage analytics data from your React components.\n\nThe `useAnalytics` hook provides access to usage analytics and reporting data. It's the client-side equivalent of the `/query` endpoint, allowing you to fetch and display usage data directly in your React components.", + parameters: [ + { + name: "params.featureId", + type: "string | string[]", + description: "Feature ID(s) to query usage data for", + required: true, + }, + { + name: "params.range", + type: "'24h' | '7d' | '30d' | '90d' | 'last_cycle'", + description: "Time range for analytics query. Defaults to '30d'", + }, + ], + returns: [ + { + name: "data", + type: "QueryResponse['list']", + description: + "Array of usage data points with period timestamps and feature usage counts", + }, + { + name: "isLoading", + type: "boolean", + description: "Whether analytics data is being fetched", + }, + { + name: "error", + type: "AutumnError | null", + description: "Any error that occurred while fetching", + }, + { + name: "refetch", + type: "() => Promise", + description: "Manually refetch analytics data", + }, + ], + docsUrl: "https://docs.useautumn.com/api-reference/hooks/useAnalytics", +}); diff --git a/typegen/package.json b/typegen/package.json new file mode 100644 index 00000000..243eba2f --- /dev/null +++ b/typegen/package.json @@ -0,0 +1,17 @@ +{ + "name": "typegen", + "version": "1.0.0", + "description": "", + "type": "module", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "packageManager": "pnpm@10.14.0", + "dependencies": { + "@types/node": "^24.7.1" + } +} diff --git a/typegen/tsconfig.json b/typegen/tsconfig.json new file mode 100644 index 00000000..a4e14317 --- /dev/null +++ b/typegen/tsconfig.json @@ -0,0 +1,44 @@ +{ + // Visit https://aka.ms/tsconfig to read more about this file + "compilerOptions": { + // File Layout + // "rootDir": "./src", + // "outDir": "./dist", + + // Environment Settings + // See also https://aka.ms/tsconfig/module + "module": "nodenext", + "target": "esnext", + "types": ["node"], + // For nodejs: + // "lib": ["esnext"], + // "types": ["node"], + // and npm install -D @types/node + + // Other Outputs + "sourceMap": true, + "declaration": true, + "declarationMap": true, + + // Stricter Typechecking Options + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true, + + // Style Options + // "noImplicitReturns": true, + // "noImplicitOverride": true, + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noFallthroughCasesInSwitch": true, + // "noPropertyAccessFromIndexSignature": true, + + // Recommended Options + "strict": true, + "jsx": "react-jsx", + "verbatimModuleSyntax": true, + "isolatedModules": true, + "noUncheckedSideEffectImports": true, + "moduleDetection": "force", + "skipLibCheck": true, + } +} diff --git a/typegen/typeConfigs.ts b/typegen/typeConfigs.ts index 6ec78c6d..76ee2cd5 100644 --- a/typegen/typeConfigs.ts +++ b/typegen/typeConfigs.ts @@ -1,243 +1,403 @@ import path from "path"; +/** + * Configuration for a single method to generate + */ +export interface MethodConfig { + /** SDK method name (e.g., "attach") */ + sourceName: string; + /** Client method name (e.g., "attach" or "openBillingPortal") */ + targetName: string; + /** Whether this method returns synchronously (not a Promise) in the client */ + isSync?: boolean; + /** @param tags to exclude from JSDoc (e.g., ["body.customer_id"]) */ + exclusions?: string[]; +} + +/** + * Configuration for method generation + */ +export interface MethodGenerationConfig { + /** Source file path (SDK client.ts) */ + sourceFile: string; + /** Target output file path */ + targetFile: string; + /** List of methods to extract and generate */ + methods: MethodConfig[]; + /** Interface name (e.g., "UseCustomerMethods", "UseEntityMethods") */ + interfaceName?: string; + /** Interface description */ + interfaceDescription?: string; +} + +/** + * Configuration for a single hook to document + */ +export interface HookConfig { + /** Hook name (e.g., "useCustomer") */ + name: string; + /** File path to the hook */ + filePath: string; + /** JSDoc content from hookDocs.ts */ + jsdoc: string; + /** Function name to document (e.g., "useCustomerBase") */ + exportName: string; +} + +/** + * Configuration for hook documentation generation + */ +export interface HookGenerationConfig { + /** List of hooks to document */ + hooks: HookConfig[]; +} + /** * Configuration for individual type generation */ export interface TypeConfig { - /** Snake case type name from @ts-sdk */ - sourceName: string; - /** Camel case type name for autumn-js */ - targetName: string; - /** Source file path in @ts-sdk */ - sourceFile: string; - /** Target file path in autumn-js */ - targetFile: string; - /** Fields to omit from the generated schema */ - omitFields?: string[]; - /** Additional fields to extend the schema with (field name -> Zod schema) */ - extendFields?: Record; + /** Snake case type name from @ts-sdk */ + sourceName: string; + /** Camel case type name for autumn-js */ + targetName: string; + /** Source file path in @ts-sdk */ + sourceFile: string; + /** Target file path in autumn-js */ + targetFile: string; + /** Fields to omit from the generated schema */ + omitFields?: string[]; + /** Additional fields to extend the schema with (field name -> Zod schema) */ + extendFields?: Record; } /** * Configuration for type generation including output directory */ export interface TypeGenerationConfig { - /** Array of type configurations */ - configs: TypeConfig[]; - /** Relative path within target package for generated types */ - outputDir: string; + /** Array of type configurations */ + configs: TypeConfig[]; + /** Relative path within target package for generated types */ + outputDir: string; } /** * Type configurations for autumn-js generation - * + * * This is the main configuration file that defines which types get converted * from snake_case (@ts-sdk) to camelCase (autumn-js). - * + * * Add new type conversions here to extend the generation pipeline. */ -export function getAutumnJSTypeConfigs(tsSDKPath: string, autumnJSPath: string): TypeGenerationConfig { - const topLevelFile = path.join(tsSDKPath, "src/resources/top-level.ts"); - const sharedFile = path.join(tsSDKPath, "src/resources/shared.ts"); - const customersFile = path.join(tsSDKPath, "src/resources/customers.ts"); - const entitiesFile = path.join(tsSDKPath, "src/resources/entities.ts"); - const referralsFile = path.join(tsSDKPath, "src/resources/referrals.ts"); - - // Output directory configuration - change this to modify where types are generated - const outputDir = "src/libraries/react/clientTypes"; - const generatedDir = path.join(autumnJSPath, outputDir); - - return { - outputDir, - configs: [ - // Shared/common types (used across multiple schemas) - { - sourceName: "CustomerData", - targetName: "CustomerData", - sourceFile: sharedFile, - targetFile: path.join(generatedDir, "customerDataTypes.ts"), - }, - { - sourceName: "EntityData", - targetName: "EntityData", - sourceFile: sharedFile, - targetFile: path.join(generatedDir, "entityDataTypes.ts"), - }, - - // Customer management types - { - sourceName: "CustomerCreateParams", - targetName: "CreateCustomerParams", - sourceFile: customersFile, - targetFile: path.join(generatedDir, "createCustomerTypes.ts"), - omitFields: ["id"], // Omit "id" field as mentioned in your usage - extendFields: { - "errorOnNotFound": { - zodType: "z.boolean().optional()", - description: "Whether to return an error if customer is not found" - } - } - }, - - // Entity management types - { - sourceName: "EntityCreateParams", - targetName: "CreateEntityParams", - sourceFile: entitiesFile, - targetFile: path.join(generatedDir, "createEntityTypes.ts"), - // No omitFields needed - EntityCreateParams doesn't have customer_id - }, - { - sourceName: "EntityGetParams", - targetName: "GetEntityParams", - sourceFile: entitiesFile, - targetFile: path.join(generatedDir, "getEntityTypes.ts"), - omitFields: ["customer_id"], // Remove customerId - handled by client - }, - - // Referral management types - { - sourceName: "ReferralCreateCodeParams", - targetName: "CreateReferralCodeParams", - sourceFile: referralsFile, - targetFile: path.join(generatedDir, "createReferralCodeTypes.ts"), - omitFields: ["customer_id"], // Remove customerId - handled by client - }, - { - sourceName: "ReferralRedeemCodeParams", - targetName: "RedeemReferralCodeParams", - sourceFile: referralsFile, - targetFile: path.join(generatedDir, "redeemReferralCodeTypes.ts"), - omitFields: ["customer_id"], // Remove customerId - handled by client - }, - - // Core attachment flow types - { - sourceName: "AttachParams", - targetName: "AttachParams", - sourceFile: topLevelFile, - targetFile: path.join(generatedDir, "attachTypes.ts"), - omitFields: ["customer_id"], // Remove customerId - handled by client - extendFields: { - "dialog": { - zodType: "z.any().optional()", - description: "DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead." - }, - "openInNewTab": { - zodType: "z.boolean().optional()", - description: "Whether to open checkout in a new tab" - }, - "metadata": { - zodType: "z.record(z.string(), z.string()).optional()", - description: "Additional metadata for the request" - } - } - }, - { - sourceName: "CheckoutParams", - targetName: "CheckoutParams", - sourceFile: topLevelFile, - targetFile: path.join(generatedDir, "checkoutTypes.ts"), - omitFields: ["customer_id"], // Remove customerId - handled by client - extendFields: { - "dialog": { - zodType: "z.any().optional()", - description: "Dialog configuration for checkout flow" - }, - "openInNewTab": { - zodType: "z.boolean().optional()", - description: "Whether to open checkout in a new tab" - } - } - }, - - // Billing and payment types - { - sourceName: "BillingPortalParams", - targetName: "OpenBillingPortalParams", - sourceFile: topLevelFile, - targetFile: path.join(generatedDir, "billingPortalTypes.ts"), - omitFields: ["customer_id"], // Remove customerId - handled by client - extendFields: { - "openInNewTab": { - zodType: "z.boolean().optional()", - description: "Whether to open billing portal in a new tab" - } - } - }, - { - sourceName: "SetupPaymentParams", - targetName: "SetupPaymentParams", - sourceFile: topLevelFile, - targetFile: path.join(generatedDir, "setupPaymentTypes.ts"), - omitFields: ["customer_id"], // Remove customerId - handled by client - extendFields: { - "openInNewTab": { - zodType: "z.boolean().optional()", - description: "Whether to open payment setup in a new tab" - } - } - }, - - // Product management types - { - sourceName: "CancelParams", - targetName: "CancelParams", - sourceFile: topLevelFile, - targetFile: path.join(generatedDir, "cancelTypes.ts"), - omitFields: ["customer_id"], // Remove customerId - handled by client - }, - - // Usage and analytics types - { - sourceName: "CheckParams", - targetName: "CheckParams", - sourceFile: topLevelFile, - targetFile: path.join(generatedDir, "checkTypes.ts"), - omitFields: ["customer_id"], // Remove customerId - handled by client - extendFields: { - "dialog": { - zodType: "z.any().optional()", - description: "Dialog configuration for feature check flow" - }, - "properties": { - zodType: "z.record(z.string(), z.any()).optional()", - description: "Additional properties for the feature check" - } - } - }, - { - sourceName: "TrackParams", - targetName: "TrackParams", - sourceFile: topLevelFile, - targetFile: path.join(generatedDir, "trackTypes.ts"), - omitFields: ["customer_id"], // Remove customerId - handled by client - }, - { - sourceName: "QueryParams", - targetName: "QueryParams", - sourceFile: topLevelFile, - targetFile: path.join(generatedDir, "queryTypes.ts"), - omitFields: ["customer_id"], // Remove customerId - handled by client - }, - ] - }; +export function getAutumnJSTypeConfigs( + tsSDKPath: string, + autumnJSPath: string, +): TypeGenerationConfig { + const topLevelFile = path.join(tsSDKPath, "src/resources/top-level.ts"); + const sharedFile = path.join(tsSDKPath, "src/resources/shared.ts"); + const customersFile = path.join(tsSDKPath, "src/resources/customers.ts"); + const entitiesFile = path.join(tsSDKPath, "src/resources/entities.ts"); + const referralsFile = path.join(tsSDKPath, "src/resources/referrals.ts"); + + // Output directory configuration - change this to modify where types are generated + const outputDir = "src/libraries/react/clientTypes"; + const generatedDir = path.join(autumnJSPath, outputDir); + + return { + outputDir, + configs: [ + // Shared/common types (used across multiple schemas) + { + sourceName: "CustomerData", + targetName: "CustomerData", + sourceFile: sharedFile, + targetFile: path.join(generatedDir, "customerDataTypes.ts"), + }, + { + sourceName: "EntityData", + targetName: "EntityData", + sourceFile: sharedFile, + targetFile: path.join(generatedDir, "entityDataTypes.ts"), + }, + + // Customer management types + { + sourceName: "CustomerCreateParams", + targetName: "CreateCustomerParams", + sourceFile: customersFile, + targetFile: path.join(generatedDir, "createCustomerTypes.ts"), + omitFields: ["id"], // Omit "id" field as mentioned in your usage + extendFields: { + errorOnNotFound: { + zodType: "z.boolean().optional()", + description: "Whether to return an error if customer is not found", + }, + }, + }, + + // Entity management types + { + sourceName: "EntityCreateParams", + targetName: "CreateEntityParams", + sourceFile: entitiesFile, + targetFile: path.join(generatedDir, "createEntityTypes.ts"), + // No omitFields needed - EntityCreateParams doesn't have customer_id + }, + { + sourceName: "EntityGetParams", + targetName: "GetEntityParams", + sourceFile: entitiesFile, + targetFile: path.join(generatedDir, "getEntityTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + + // Referral management types + { + sourceName: "ReferralCreateCodeParams", + targetName: "CreateReferralCodeParams", + sourceFile: referralsFile, + targetFile: path.join(generatedDir, "createReferralCodeTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + { + sourceName: "ReferralRedeemCodeParams", + targetName: "RedeemReferralCodeParams", + sourceFile: referralsFile, + targetFile: path.join(generatedDir, "redeemReferralCodeTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + + // Core attachment flow types + { + sourceName: "AttachParams", + targetName: "AttachParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "attachTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + extendFields: { + dialog: { + zodType: "z.any().optional()", + description: + "DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead.", + }, + openInNewTab: { + zodType: "z.boolean().optional()", + description: "Whether to open checkout in a new tab", + }, + metadata: { + zodType: "z.record(z.string(), z.string()).optional()", + description: "Additional metadata for the request", + }, + }, + }, + { + sourceName: "CheckoutParams", + targetName: "CheckoutParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "checkoutTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + extendFields: { + dialog: { + zodType: "z.any().optional()", + description: "Dialog configuration for checkout flow", + }, + openInNewTab: { + zodType: "z.boolean().optional()", + description: "Whether to open checkout in a new tab", + }, + }, + }, + + // Billing and payment types + { + sourceName: "BillingPortalParams", + targetName: "OpenBillingPortalParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "billingPortalTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + extendFields: { + openInNewTab: { + zodType: "z.boolean().optional()", + description: "Whether to open billing portal in a new tab", + }, + }, + }, + { + sourceName: "SetupPaymentParams", + targetName: "SetupPaymentParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "setupPaymentTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + extendFields: { + openInNewTab: { + zodType: "z.boolean().optional()", + description: "Whether to open payment setup in a new tab", + }, + }, + }, + + // Product management types + { + sourceName: "CancelParams", + targetName: "CancelParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "cancelTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + + // Usage and analytics types + { + sourceName: "CheckParams", + targetName: "CheckParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "checkTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + extendFields: { + dialog: { + zodType: "z.any().optional()", + description: "Dialog configuration for feature check flow", + }, + properties: { + zodType: "z.record(z.string(), z.any()).optional()", + description: "Additional properties for the feature check", + }, + }, + }, + { + sourceName: "TrackParams", + targetName: "TrackParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "trackTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + { + sourceName: "QueryParams", + targetName: "QueryParams", + sourceFile: topLevelFile, + targetFile: path.join(generatedDir, "queryTypes.ts"), + omitFields: ["customer_id"], // Remove customerId - handled by client + }, + ], + }; +} + +/** + * Method configurations for autumn-js hooks (UseCustomer + UseEntity) + * Extracts method signatures and JSDoc from SDK client.ts + */ +export function getAutumnJSMethodConfigs( + tsSDKPath: string, + autumnJSPath: string, +): MethodGenerationConfig[] { + const clientFile = path.join(tsSDKPath, "src/client.ts"); + + return [ + // UseCustomer methods + { + sourceFile: clientFile, + targetFile: path.join( + autumnJSPath, + "src/libraries/react/hooks/types/useCustomerMethods.ts", + ), + interfaceName: "UseCustomerMethods", + interfaceDescription: + "Methods available in useCustomer hook for managing customer subscriptions and features", + methods: [ + { sourceName: "attach", targetName: "attach", exclusions: ["body.customer_id"] }, + { sourceName: "checkout", targetName: "checkout", exclusions: ["body.customer_id"] }, + { sourceName: "check", targetName: "check", isSync: true, exclusions: ["body.customer_id"] }, + { sourceName: "track", targetName: "track", exclusions: ["body.customer_id"] }, + { sourceName: "cancel", targetName: "cancel", exclusions: ["body.customer_id"] }, + { sourceName: "setupPayment", targetName: "setupPayment", exclusions: ["body.customer_id"] }, + { sourceName: "billingPortal", targetName: "openBillingPortal", exclusions: ["body.customer_id"] }, + ], + }, + // UseEntity methods + { + sourceFile: clientFile, + targetFile: path.join( + autumnJSPath, + "src/libraries/react/hooks/types/useEntityMethods.ts", + ), + interfaceName: "UseEntityMethods", + interfaceDescription: + "Methods available in useEntity hook for entity-scoped subscription operations", + methods: [ + { sourceName: "attach", targetName: "attach", exclusions: ["body.customer_id"] }, + { sourceName: "cancel", targetName: "cancel", exclusions: ["body.customer_id"] }, + { sourceName: "track", targetName: "track", exclusions: ["body.customer_id"] }, + { sourceName: "check", targetName: "check", isSync: true, exclusions: ["body.customer_id"] }, + ], + }, + ]; +} + +/** + * Hook documentation configurations for autumn-js + * Injects JSDoc into React hook files from hookDocs.ts + */ +export function getAutumnJSHookConfigs( + autumnJSPath: string, +): HookGenerationConfig { + // Import hook docs (will be available at runtime) + const { + useCustomerHookDoc, + useEntityHookDoc, + useAnalyticsHookDoc, + } = require("./hookDocs.js"); + + return { + hooks: [ + { + name: "useCustomer", + filePath: path.join( + autumnJSPath, + "src/libraries/react/hooks/useCustomerBase.tsx", + ), + jsdoc: useCustomerHookDoc, + exportName: "useCustomerBase", + }, + { + name: "useEntity", + filePath: path.join( + autumnJSPath, + "src/libraries/react/hooks/useEntity.tsx", + ), + jsdoc: useEntityHookDoc, + exportName: "useEntity", + }, + { + name: "useAnalytics", + filePath: path.join( + autumnJSPath, + "src/libraries/react/hooks/useAnalytics.tsx", + ), + jsdoc: useAnalyticsHookDoc, + exportName: "useAnalytics", + }, + ], + }; } /** * Type configurations for @useautumn/convex generation * TODO: Implement when ready to generate Convex types */ -export function getConvexTypeConfigs(_tsSDKPath: string, _convexPath: string): TypeConfig[] { - // Placeholder for future Convex type generation - return []; +export function getConvexTypeConfigs( + _tsSDKPath: string, + _convexPath: string, +): TypeConfig[] { + // Placeholder for future Convex type generation + return []; } /** - * Type configurations for atmn CLI generation + * Type configurations for atmn CLI generation * TODO: Implement when ready to generate CLI types */ -export function getAtmnTypeConfigs(_tsSDKPath: string, _atmnPath: string): TypeConfig[] { - // Placeholder for future CLI type generation - return []; -} \ No newline at end of file +export function getAtmnTypeConfigs( + _tsSDKPath: string, + _atmnPath: string, +): TypeConfig[] { + // Placeholder for future CLI type generation + return []; +} diff --git a/ui/registry/checkout-dialog/checkout-dialog.tsx b/ui/registry/checkout-dialog/checkout-dialog.tsx index 968593df..2c596648 100644 --- a/ui/registry/checkout-dialog/checkout-dialog.tsx +++ b/ui/registry/checkout-dialog/checkout-dialog.tsx @@ -1,6 +1,7 @@ "use client"; import * as AccordionPrimitive from "@radix-ui/react-accordion"; -import type { CheckoutParams, CheckoutResult, ProductItem } from "autumn-js"; +// import type { CheckoutParams, CheckoutResult, ProductItem } from "autumn-js"; +import { Autumn } from "autumn-js"; import { ArrowRight, ChevronDown, Loader2 } from "lucide-react"; import type React from "react"; import { useEffect, useState } from "react"; @@ -29,8 +30,8 @@ import { getCheckoutContent } from "@/registry/checkout-dialog/lib/checkout-cont export interface CheckoutDialogProps { open: boolean; setOpen: (open: boolean) => void; - checkoutResult: CheckoutResult; - checkoutParams?: CheckoutParams; + checkoutResult: Autumn.CheckoutResponse; + checkoutParams?: Autumn.CheckoutParams; } const formatCurrency = ({ @@ -49,7 +50,7 @@ const formatCurrency = ({ export default function CheckoutDialog(params: CheckoutDialogProps) { const { attach } = useCustomer(); const [checkoutResult, setCheckoutResult] = useState< - CheckoutResult | undefined + Autumn.CheckoutResponse | undefined >(params?.checkoutResult); useEffect(() => { @@ -67,7 +68,7 @@ export default function CheckoutDialog(params: CheckoutDialogProps) { const { open, setOpen } = params; const { title, message } = getCheckoutContent(checkoutResult); - const isFree = checkoutResult?.product.properties?.is_free; + const isFree = checkoutResult?.product?.properties?.is_free; const isPaid = isFree === false; return ( @@ -91,7 +92,7 @@ export default function CheckoutDialog(params: CheckoutDialogProps) { onClick={async () => { setLoading(true); - const options = checkoutResult.options.map((option) => { + const options = checkoutResult.options?.map((option: Autumn.CheckoutResponse.Option) => { return { featureId: option.feature_id, quantity: option.quantity, @@ -99,7 +100,7 @@ export default function CheckoutDialog(params: CheckoutDialogProps) { }); await attach({ - productId: checkoutResult.product.id, + productId: checkoutResult.product?.id, ...(params.checkoutParams || {}), options, }); @@ -129,8 +130,8 @@ function PriceInformation({ checkoutResult, setCheckoutResult, }: { - checkoutResult: CheckoutResult; - setCheckoutResult: (checkoutResult: CheckoutResult) => void; + checkoutResult: Autumn.CheckoutResponse; + setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; }) { return (
@@ -149,13 +150,13 @@ function PriceInformation({ ); } -function DueAmounts({ checkoutResult }: { checkoutResult: CheckoutResult }) { +function DueAmounts({ checkoutResult }: { checkoutResult: Autumn.CheckoutResponse }) { const { next_cycle, product } = checkoutResult; const nextCycleAtStr = next_cycle ? new Date(next_cycle.starts_at).toLocaleDateString() : undefined; - const hasUsagePrice = product.items.some( + const hasUsagePrice = product?.items.some( (item) => item.usage_model === "pay_per_use", ); @@ -170,8 +171,8 @@ function DueAmounts({ checkoutResult }: { checkoutResult: CheckoutResult }) {

{formatCurrency({ - amount: checkoutResult?.total, - currency: checkoutResult?.currency, + amount: checkoutResult?.total ?? 0, + currency: checkoutResult?.currency ?? "usd", })}

@@ -182,8 +183,8 @@ function DueAmounts({ checkoutResult }: { checkoutResult: CheckoutResult }) {

{formatCurrency({ - amount: next_cycle.total, - currency: checkoutResult?.currency, + amount: next_cycle.total ?? 0, + currency: checkoutResult?.currency ?? "usd", })} {hasUsagePrice && + usage prices}

@@ -197,20 +198,20 @@ function ProductItems({ checkoutResult, setCheckoutResult, }: { - checkoutResult: CheckoutResult; - setCheckoutResult: (checkoutResult: CheckoutResult) => void; + checkoutResult: Autumn.CheckoutResponse; + setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; }) { const isUpdateQuantity = - checkoutResult?.product.scenario === "active" && - checkoutResult.product.properties.updateable; + checkoutResult?.product?.scenario === "active" && + checkoutResult.product?.properties?.updateable; - const isOneOff = checkoutResult?.product.properties.is_one_off; + const isOneOff = checkoutResult?.product?.properties?.is_one_off; return (

Price

- {checkoutResult?.product.items - .filter((item) => item.type !== "feature") + {checkoutResult?.product?.items + .filter((item: Autumn.ProductItem) => item.type !== "feature") .map((item, index) => { if (item.usage_model == "prepaid") { return ( @@ -246,7 +247,7 @@ function ProductItems({ ); } -function CheckoutLines({ checkoutResult }: { checkoutResult: CheckoutResult }) { +function CheckoutLines({ checkoutResult }: { checkoutResult: Autumn.CheckoutResponse }) { return ( @@ -263,7 +264,7 @@ function CheckoutLines({ checkoutResult }: { checkoutResult: CheckoutResult }) { {checkoutResult?.lines - .filter((line) => line.amount !== 0) + .filter((line: Autumn.CheckoutResponse.Line) => line.amount !== 0) .map((line, index) => { return (
@@ -271,7 +272,7 @@ function CheckoutLines({ checkoutResult }: { checkoutResult: CheckoutResult }) {

{new Intl.NumberFormat("en-US", { style: "currency", - currency: checkoutResult?.currency, + currency: checkoutResult?.currency ?? "usd", }).format(line.amount)}

@@ -309,23 +310,26 @@ const PrepaidItem = ({ checkoutResult, setCheckoutResult, }: { - item: ProductItem; - checkoutResult: CheckoutResult; - setCheckoutResult: (checkoutResult: CheckoutResult) => void; + item: Autumn.ProductItem; + checkoutResult: Autumn.CheckoutResponse; + setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; }) => { - const { quantity = 0, billing_units: billingUnits = 1 } = item; + let { quantity = 0, billing_units: billingUnits = 1 } = item; + quantity = quantity ?? 0; + billingUnits = billingUnits ?? 1; + const [quantityInput, setQuantityInput] = useState( (quantity / billingUnits).toString(), ); const { checkout } = useCustomer(); const [loading, setLoading] = useState(false); const [open, setOpen] = useState(false); - const scenario = checkoutResult.product.scenario; + const scenario = checkoutResult.product?.scenario; const handleSave = async () => { setLoading(true); try { - const newOptions = checkoutResult.options + const newOptions = (checkoutResult.options ?? []) .filter((option) => option.feature_id !== item.feature_id) .map((option) => { return { @@ -339,16 +343,12 @@ const PrepaidItem = ({ quantity: Number(quantityInput) * billingUnits, }); - const { data, error } = await checkout({ - productId: checkoutResult.product.id, + const data = await checkout({ + productId: checkoutResult.product?.id, options: newOptions, dialog: CheckoutDialog, }); - if (error) { - console.error(error); - return; - } setCheckoutResult(data!); } catch (error) { console.error(error); diff --git a/ui/registry/checkout-dialog/lib/checkout-content.tsx b/ui/registry/checkout-dialog/lib/checkout-content.tsx index 35131811..7fee361b 100644 --- a/ui/registry/checkout-dialog/lib/checkout-content.tsx +++ b/ui/registry/checkout-dialog/lib/checkout-content.tsx @@ -1,15 +1,20 @@ -import { type CheckoutResult } from "autumn-js"; +import { Autumn } from "autumn-js"; -export const getCheckoutContent = (checkoutResult: CheckoutResult) => { +export const getCheckoutContent = (checkoutResult: Autumn.CheckoutResponse) => { const { product, current_product, next_cycle } = checkoutResult; - const { is_one_off, is_free, has_trial, updateable } = product.properties; - const scenario = product.scenario; + const { is_one_off, is_free, has_trial, updateable } = product?.properties || { + is_one_off: false, + is_free: false, + has_trial: false, + updateable: false, + }; + const scenario = product?.scenario; const nextCycleAtStr = next_cycle ? new Date(next_cycle.starts_at).toLocaleDateString() : undefined; - const productName = product.name; + const productName = product?.name || ""; if (is_one_off) { return { @@ -55,7 +60,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult) => { title:

{productName} product already scheduled

, message: (

- You are currently on product {current_product.name} and are + You are currently on product {current_product?.name || ""} and are scheduled to start {productName} on {nextCycleAtStr}.

), @@ -116,7 +121,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult) => { message: (

By clicking confirm, your current subscription to{" "} - {current_product.name} will be cancelled and a new subscription to{" "} + {current_product?.name || ""} will be cancelled and a new subscription to{" "} {productName} will begin on {nextCycleAtStr}.

), @@ -127,7 +132,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult) => { title:

Cancel

, message: (

- By clicking confirm, your subscription to {current_product.name}{" "} + By clicking confirm, your subscription to {current_product?.name || ""}{" "} will end on {nextCycleAtStr}.

), diff --git a/ui/registry/paywall-dialog/lib/paywall-content.tsx b/ui/registry/paywall-dialog/lib/paywall-content.tsx index affacbc6..ac29a179 100644 --- a/ui/registry/paywall-dialog/lib/paywall-content.tsx +++ b/ui/registry/paywall-dialog/lib/paywall-content.tsx @@ -1,6 +1,6 @@ -import { type CheckFeaturePreview } from "autumn-js"; +import { Autumn } from "autumn-js"; -export const getPaywallContent = (preview?: CheckFeaturePreview) => { +export const getPaywallContent = (preview?: Autumn.CheckResponse.Preview) => { if (!preview) { return { title: "Feature Unavailable", diff --git a/ui/registry/pricing-table/lib/pricing-table-content.tsx b/ui/registry/pricing-table/lib/pricing-table-content.tsx index d41984c2..722ce918 100644 --- a/ui/registry/pricing-table/lib/pricing-table-content.tsx +++ b/ui/registry/pricing-table/lib/pricing-table-content.tsx @@ -1,8 +1,8 @@ -import { type Product } from "autumn-js"; +import { type ProductWithDisplay } from "autumn-js/react"; -export const getPricingTableContent = (product: Product) => { - const { scenario, free_trial, properties } = product; - const { is_one_off, updateable, has_trial } = properties; +export const getPricingTableContent = (product: ProductWithDisplay) => { + const { scenario, properties } = product; + const { is_one_off = false, updateable = false, has_trial = false } = properties || {}; if (has_trial) { return { diff --git a/ui/registry/pricing-table/pricing-table.tsx b/ui/registry/pricing-table/pricing-table.tsx index 6f460dff..4708709c 100644 --- a/ui/registry/pricing-table/pricing-table.tsx +++ b/ui/registry/pricing-table/pricing-table.tsx @@ -1,13 +1,13 @@ import React from "react"; -import { useCustomer, usePricingTable, ProductDetails } from "autumn-js/react"; +import { useCustomer, usePricingTable, ProductDetails, ProductWithDisplay } from "autumn-js/react"; +import { Autumn } from "autumn-js"; import { createContext, useContext, useState } from "react"; import { cn } from "@/lib/utils"; import { Switch } from "@/components/ui/switch"; import { Button } from "@/components/ui/button"; import CheckoutDialog from "@/registry/checkout-dialog/checkout-dialog"; import { getPricingTableContent } from "@/registry/pricing-table/lib/pricing-table-content"; -import type { Product, ProductItem } from "autumn-js"; import { Loader2 } from "lucide-react"; export default function PricingTable({ @@ -40,7 +40,7 @@ export default function PricingTable({ const multiInterval = intervals.length > 1; - const intervalFilter = (product: Product) => { + const intervalFilter = (product: Autumn.Product) => { if (!product.properties?.interval_group) { return true; } @@ -72,7 +72,7 @@ export default function PricingTable({ buttonProps={{ disabled: (product.scenario === "active" && - !product.properties.updateable) || + !product.properties?.updateable) || product.scenario === "scheduled", onClick: async () => { @@ -97,7 +97,7 @@ export default function PricingTable({ const PricingTableContext = createContext<{ isAnnualToggle: boolean; setIsAnnualToggle: (isAnnual: boolean) => void; - products: Product[]; + products: ProductWithDisplay[]; showFeatures: boolean; }>({ isAnnualToggle: false, @@ -126,7 +126,7 @@ export const PricingTableContainer = ({ multiInterval, }: { children?: React.ReactNode; - products?: Product[]; + products?: ProductWithDisplay[]; showFeatures?: boolean; className?: string; isAnnualToggle: boolean; @@ -288,7 +288,7 @@ export const PricingFeatureList = ({ everythingFrom, className, }: { - items: ProductItem[]; + items: Autumn.Products.ProductItem[]; everythingFrom?: string; className?: string; }) => { From d5fbcd9e09a6d0d153d20eecae8a494b184600cd Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Mon, 13 Oct 2025 18:10:44 +0100 Subject: [PATCH 06/35] =?UTF-8?q?chore:=20=F0=9F=A4=96=20delete=20unecessa?= =?UTF-8?q?ry=20stuff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- convex/src/component/lib.test.ts | 21 ------ convex/src/component/lib.ts | 100 ----------------------------- convex/src/component/setup.test.ts | 5 -- 3 files changed, 126 deletions(-) delete mode 100644 convex/src/component/lib.test.ts delete mode 100644 convex/src/component/lib.ts delete mode 100644 convex/src/component/setup.test.ts diff --git a/convex/src/component/lib.test.ts b/convex/src/component/lib.test.ts deleted file mode 100644 index 27ee5c2e..00000000 --- a/convex/src/component/lib.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -/// - -import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; -import { convexTest } from "convex-test"; -import schema from "./schema.js"; -import { api } from "./_generated/api.js"; -import { modules } from "./setup.test.js"; - -describe("component lib", () => { - beforeEach(async () => { - vi.useFakeTimers(); - }); - afterEach(() => { - vi.useRealTimers(); - }); - test("add and subtract", async () => { - const t = convexTest(schema, modules); - // await t.mutation(api.lib.add, { name: "beans", count: 10 }); - // expect(await t.query(api.lib.count, { name: "beans" })).toEqual(10); - }); -}); diff --git a/convex/src/component/lib.ts b/convex/src/component/lib.ts deleted file mode 100644 index 10c935ac..00000000 --- a/convex/src/component/lib.ts +++ /dev/null @@ -1,100 +0,0 @@ -// import { Autumn } from "autumn-js"; -// import { -// type TrackArgsType, -// type AttachArgsType, -// type CheckArgsType, -// type CheckoutArgsType, -// type ListProductsArgsType, -// type UsageArgsType, -// type QueryArgsType, -// type CancelArgsType, -// type SetupPaymentArgsType, -// type FetchCustomerArgsType, -// } from "../types.js"; -// import { camelToSnake } from "../utils.js"; - -// export const fetchCustomer = async (args: FetchCustomerArgsType) => { -// const autumn = new Autumn({ -// secretKey: args.apiKey, -// }); -// const customer = await autumn.customers.create({ -// id: args.customer_id, -// email: args.customer_data?.email, -// name: args.customer_data?.name, -// expand: args.expand, -// }); -// return customer; -// }; - -// export const track = async (args: TrackArgsType) => { -// const autumn = new Autumn({ -// secretKey: args.apiKey, -// }); - -// const res = await autumn.track(camelToSnake(args)); -// return res; -// }; - -// export const attach = async (args: AttachArgsType) => { -// const autumn = new Autumn({ -// secretKey: args.apiKey, -// }); -// const res = await autumn.attach(camelToSnake(args)); -// return res; -// }; - -// export const check = async (args: CheckArgsType) => { -// const autumn = new Autumn({ -// secretKey: args.apiKey, -// }); -// const res = await autumn.check(camelToSnake(args)); -// return res; -// }; - -// export const checkout = async (args: CheckoutArgsType) => { -// const autumn = new Autumn({ -// secretKey: args.apiKey, -// }); -// const res = await autumn.checkout(camelToSnake(args)); -// return res; -// }; - -// export const usage = async (args: UsageArgsType) => { -// const autumn = new Autumn({ -// secretKey: args.apiKey, -// }); -// const res = await autumn.usage(camelToSnake(args)); -// return res; -// }; - -// export const autumnQuery = async (args: QueryArgsType) => { -// const autumn = new Autumn({ -// secretKey: args.apiKey, -// }); -// const res = await autumn.query(camelToSnake(args)); -// return res; -// }; - -// export const cancel = async (args: CancelArgsType) => { -// const autumn = new Autumn({ -// secretKey: args.apiKey, -// }); -// const res = await autumn.cancel(camelToSnake(args)); -// return res; -// }; - -// export const setupPayment = async (args: SetupPaymentArgsType) => { -// const autumn = new Autumn({ -// secretKey: args.apiKey, -// }); -// const res = await autumn.setupPayment(camelToSnake(args)); -// return res; -// }; - -// export const listProducts = async (args: ListProductsArgsType) => { -// const autumn = new Autumn({ -// secretKey: args.apiKey, -// }); -// const res = await autumn.products.list(camelToSnake(args)); -// return res; -// }; diff --git a/convex/src/component/setup.test.ts b/convex/src/component/setup.test.ts deleted file mode 100644 index c53e1e4e..00000000 --- a/convex/src/component/setup.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -import { test } from "vitest"; -export const modules = import.meta.glob("./**/*.*s"); - -test("setup", () => {}); From 71703ac0dca919e25a7e93c76e8e37785e44548f Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Mon, 13 Oct 2025 18:10:51 +0100 Subject: [PATCH 07/35] =?UTF-8?q?chore:=20=F0=9F=A4=96=20remove=20shcmea?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- convex/src/component/schema.ts | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 convex/src/component/schema.ts diff --git a/convex/src/component/schema.ts b/convex/src/component/schema.ts deleted file mode 100644 index 9f5ad023..00000000 --- a/convex/src/component/schema.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { defineSchema, defineTable } from "convex/server"; -import { v } from "convex/values"; - -export default defineSchema({ - counters: defineTable({ - name: v.string(), - value: v.number(), - shard: v.number(), - }).index("name", ["name", "shard"]), -}); From fd5437a2477e10c827e6d6d5cedcc6aa5b4cd5c3 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Mon, 13 Oct 2025 18:12:39 +0100 Subject: [PATCH 08/35] =?UTF-8?q?chore:=20=F0=9F=A4=96=20pnpm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- convex/package.json | 171 +++++++++++++++--------------- convex/tsconfig.build.tsbuildinfo | 2 +- package.json | 6 +- pnpm-lock.yaml | 9 ++ typegen/tsconfig.json | 74 ++++++------- 5 files changed, 138 insertions(+), 124 deletions(-) diff --git a/convex/package.json b/convex/package.json index 0ec16a23..b8c8b216 100644 --- a/convex/package.json +++ b/convex/package.json @@ -1,87 +1,88 @@ { - "name": "@useautumn/convex", - "description": "A autumn component for Convex.", - "repository": "github:useautumn/autumn-js", - "homepage": "https://docs.useautumn.com/setup/convex", - "bugs": { - "email": "hey@useautumn.com", - "url": "https://github.com/useautumn/autumn-js/issues" - }, - "version": "0.0.12", - "license": "Apache-2.0", - "keywords": [ - "convex", - "component" - ], - "type": "module", - "scripts": { - "example": "cd example && npm run dev", - "dashboard": "cd example && npx convex dashboard", - "dev": "run-p 'example' 'build:watch'", - "setup": "npm i && npm run build && cd example && npm i && npx convex dev --once", - "build:watch": "cd src && npx chokidar '../tsconfig.json' '*.ts' 'react/**/*.ts' 'component/**/*.ts' 'client/**/*.ts' -c 'npm run build' --initial", - "build": "tsc --project ./tsconfig.build.json && tsc-alias -p tsconfig.build.json && echo '{ \"type\": \"module\" }' > dist/package.json", - "typecheck": "tsc --noEmit", - "clean": "rm -rf dist tsconfig.build.tsbuildinfo", - "alpha": "npm run clean && npm run build && run-p test lint typecheck attw && npm version prerelease --preid alpha && npm publish --tag alpha && git push --tags", - "release": "npm run clean && npm run build && run-p test lint typecheck attw && npm version patch && npm publish && git push --tags", - "test": "vitest run --typecheck", - "test:watch": "vitest --typecheck", - "test:debug": "vitest --inspect-brk --no-file-parallelism", - "test:coverage": "vitest run --coverage --coverage.reporter=text", - "lint": "eslint src", - "attw": "attw $(npm pack -s) --exclude-entrypoints ./convex.config --profile esm-only", - "version": "pbcopy <<<$npm_package_version; vim CHANGELOG.md && git add CHANGELOG.md" - }, - "files": [ - "dist", - "src" - ], - "exports": { - "./package.json": "./package.json", - ".": { - "@convex-dev/component-source": "./src/client/index.ts", - "types": "./dist/client/index.d.ts", - "default": "./dist/client/index.js" - }, - "./convex.config": { - "@convex-dev/component-source": "./src/component/convex.config.ts", - "types": "./dist/component/convex.config.d.ts", - "default": "./dist/component/convex.config.js" - } - }, - "peerDependencies": { - "convex": "^1.25.0", - "react": "^18.3.1 || ^19.0.0", - "autumn-js": "^0.1.24" - }, - "devDependencies": { - "autumn-js": "workspace:*", - "@arethetypeswrong/cli": "^0.17.4", - "@edge-runtime/vm": "^5.0.0", - "@eslint/js": "9.29.0", - "@types/node": "18.17.0", - "chokidar-cli": "3.0.0", - "convex-test": "0.0.37", - "eslint": "9.29.0", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", - "globals": "^15.9.0", - "npm-run-all2": "7.0.2", - "prettier": "3.2.5", - "tsc-alias": "^1.8.16", - "typescript": "5.5.4", - "typescript-eslint": "8.34.1", - "vitest": "3.2.4" - }, - "peerDependenciesMeta": { - "autumn-js": { - "optional": false - } - }, - "types": "./dist/client/index.d.ts", - "module": "./dist/client/index.js", - "dependencies": { - "convex-helpers": "^0.1.104" - } + "name": "@useautumn/convex", + "description": "A autumn component for Convex.", + "repository": "github:useautumn/autumn-js", + "homepage": "https://docs.useautumn.com/setup/convex", + "bugs": { + "email": "hey@useautumn.com", + "url": "https://github.com/useautumn/autumn-js/issues" + }, + "version": "0.0.12", + "license": "Apache-2.0", + "keywords": [ + "convex", + "component" + ], + "type": "module", + "scripts": { + "example": "cd example && npm run dev", + "dashboard": "cd example && npx convex dashboard", + "dev": "run-p 'example' 'build:watch'", + "setup": "npm i && npm run build && cd example && npm i && npx convex dev --once", + "build:watch": "cd src && npx chokidar '../tsconfig.json' '*.ts' 'react/**/*.ts' 'component/**/*.ts' 'client/**/*.ts' -c 'npm run build' --initial", + "build": "tsc --project ./tsconfig.build.json && tsc-alias -p tsconfig.build.json && echo '{ \"type\": \"module\" }' > dist/package.json", + "typecheck": "tsc --noEmit", + "clean": "rm -rf dist tsconfig.build.tsbuildinfo", + "alpha": "npm run clean && npm run build && run-p test lint typecheck attw && npm version prerelease --preid alpha && npm publish --tag alpha && git push --tags", + "release": "npm run clean && npm run build && run-p test lint typecheck attw && npm version patch && npm publish && git push --tags", + "test": "vitest run --typecheck", + "test:watch": "vitest --typecheck", + "test:debug": "vitest --inspect-brk --no-file-parallelism", + "test:coverage": "vitest run --coverage --coverage.reporter=text", + "lint": "eslint src", + "attw": "attw $(npm pack -s) --exclude-entrypoints ./convex.config --profile esm-only", + "version": "pbcopy <<<$npm_package_version; vim CHANGELOG.md && git add CHANGELOG.md" + }, + "files": [ + "dist", + "src" + ], + "exports": { + "./package.json": "./package.json", + ".": { + "@convex-dev/component-source": "./src/client/index.ts", + "types": "./dist/client/index.d.ts", + "default": "./dist/client/index.js" + }, + "./convex.config": { + "@convex-dev/component-source": "./src/component/convex.config.ts", + "types": "./dist/component/convex.config.d.ts", + "default": "./dist/component/convex.config.js" + } + }, + "peerDependencies": { + "convex": "^1.25.0", + "react": "^18.3.1 || ^19.0.0", + "autumn-js": "^0.1.24" + }, + "devDependencies": { + "autumn-js": "workspace:*", + "@useautumn/sdk": "workspace:*", + "@arethetypeswrong/cli": "^0.17.4", + "@edge-runtime/vm": "^5.0.0", + "@eslint/js": "9.29.0", + "@types/node": "18.17.0", + "chokidar-cli": "3.0.0", + "convex-test": "0.0.37", + "eslint": "9.29.0", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^5.2.0", + "globals": "^15.9.0", + "npm-run-all2": "7.0.2", + "prettier": "3.2.5", + "tsc-alias": "^1.8.16", + "typescript": "5.5.4", + "typescript-eslint": "8.34.1", + "vitest": "3.2.4" + }, + "peerDependenciesMeta": { + "autumn-js": { + "optional": false + } + }, + "types": "./dist/client/index.d.ts", + "module": "./dist/client/index.js", + "dependencies": { + "convex-helpers": "^0.1.104" + } } diff --git a/convex/tsconfig.build.tsbuildinfo b/convex/tsconfig.build.tsbuildinfo index e892f2df..06449f24 100644 --- a/convex/tsconfig.build.tsbuildinfo +++ b/convex/tsconfig.build.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.dom.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/value.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/type_utils.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/validators.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/validator.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/base64.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/errors.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/compare.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/index.d.ts","./src/types.ts","./src/utils.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/authentication.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/data_model.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/filter_builder.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/index_range_builder.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/pagination.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/search_filter_builder.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/query.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/system_fields.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/schema.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/database.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/api.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/scheduler.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/vector_search.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/registration.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/impl/registration_impl.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/storage.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/cron.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/router.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/components/paths.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/components/index.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/index.d.ts","./src/component/lib.ts","./src/component/_generated/api.d.ts","./src/client/types.ts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/standard-schema.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/util.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/versions.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/schemas.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/checks.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/errors.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/core.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/parse.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/regexes.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/ar.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/az.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/be.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/ca.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/cs.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/da.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/de.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/en.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/eo.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/es.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/fa.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/fi.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/fr.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/fr-ca.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/he.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/hu.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/id.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/is.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/it.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/ja.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/kh.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/ko.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/mk.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/ms.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/nl.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/no.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/ota.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/ps.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/pl.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/pt.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/ru.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/sl.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/sv.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/ta.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/th.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/tr.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/ua.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/ur.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/vi.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/zh-cn.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/zh-tw.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/yo.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/locales/index.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/registries.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/doc.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/function.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/api.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/json-schema.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/to-json-schema.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/core/index.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/classic/errors.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/classic/parse.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/classic/schemas.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/classic/checks.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/classic/compat.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/classic/iso.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/classic/coerce.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/classic/external.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/classic/index.d.cts","../node_modules/.pnpm/zod@4.0.17/node_modules/zod/v4/index.d.cts","../package/dist/sdk/index.d.ts","./src/client/helpers/utils.ts","./src/client/helpers/customers.ts","./src/client/helpers/entities.ts","./src/client/helpers/products.ts","./src/client/helpers/referrals.ts","./src/client/helpers/index.ts","./src/client/index.ts","./src/client/_generated/_ignore.ts","./src/component/convex.config.ts","./src/component/schema.ts","./src/component/_generated/api.js","./src/component/_generated/datamodel.d.ts","./src/component/_generated/server.d.ts","./src/component/_generated/server.js","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/assert.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/assert/strict.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/globals.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/async_hooks.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/buffer.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/child_process.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/cluster.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/console.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/constants.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/crypto.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/dgram.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/dns.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/dns/promises.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/domain.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/dom-events.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/events.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/fs.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/fs/promises.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/http.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/http2.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/https.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/inspector.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/module.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/net.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/os.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/path.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/perf_hooks.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/process.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/punycode.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/querystring.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/readline.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/readline/promises.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/repl.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/stream.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/stream/promises.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/stream/consumers.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/stream/web.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/string_decoder.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/test.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/timers.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/timers/promises.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/tls.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/trace_events.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/tty.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/url.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/util.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/v8.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/vm.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/wasi.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/worker_threads.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/zlib.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/globals.global.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/index.d.ts","../node_modules/@types/babel__code-frame/index.d.ts","../node_modules/@babel/types/lib/index.d.ts","../node_modules/@types/babel__generator/index.d.ts","../node_modules/@babel/parser/typings/babel-parser.d.ts","../node_modules/@types/babel__template/index.d.ts","../node_modules/@types/babel__traverse/index.d.ts","../node_modules/@types/babel__core/index.d.ts","../node_modules/.pnpm/@types+better-sqlite3@7.6.13/node_modules/@types/better-sqlite3/index.d.ts","../node_modules/@types/connect/index.d.ts","../node_modules/@types/body-parser/index.d.ts","../node_modules/@types/braces/index.d.ts","../node_modules/@types/cookie/index.d.ts","../node_modules/@types/cookiejar/index.d.ts","../node_modules/@types/keygrip/index.d.ts","../node_modules/@types/mime/index.d.ts","../node_modules/@types/send/index.d.ts","../node_modules/@types/qs/index.d.ts","../node_modules/@types/range-parser/index.d.ts","../node_modules/@types/express-serve-static-core/index.d.ts","../node_modules/@types/http-errors/index.d.ts","../node_modules/@types/serve-static/index.d.ts","../node_modules/@types/express/index.d.ts","../node_modules/@types/cookies/index.d.ts","../node_modules/@types/cors/index.d.ts","../node_modules/@types/ms/index.d.ts","../node_modules/@types/debug/index.d.ts","../node_modules/.pnpm/@types+eslint@7.29.0/node_modules/@types/eslint/helpers.d.ts","../node_modules/.pnpm/@types+eslint@7.29.0/node_modules/@types/eslint/lib/rules/index.d.ts","../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts","../node_modules/.pnpm/@types+estree@1.0.8/node_modules/@types/estree/index.d.ts","../node_modules/.pnpm/@types+eslint@7.29.0/node_modules/@types/eslint/index.d.ts","../node_modules/.pnpm/@types+eslint@9.6.1/node_modules/@types/eslint/use-at-your-own-risk.d.ts","../node_modules/.pnpm/@types+eslint@9.6.1/node_modules/@types/eslint/index.d.ts","../node_modules/.pnpm/@types+eslint-scope@3.7.7/node_modules/@types/eslint-scope/index.d.ts","../node_modules/@types/estree/index.d.ts","../node_modules/@types/estree-jsx/index.d.ts","../node_modules/@types/graceful-fs/index.d.ts","../node_modules/@types/unist/index.d.ts","../node_modules/@types/hast/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/istanbul-lib-report/index.d.ts","../node_modules/@types/istanbul-reports/index.d.ts","../node_modules/@jest/expect-utils/build/index.d.ts","../node_modules/jest-matcher-utils/node_modules/chalk/index.d.ts","../node_modules/@jest/schemas/node_modules/@sinclair/typebox/typebox.d.ts","../node_modules/@jest/schemas/build/index.d.ts","../node_modules/pretty-format/build/index.d.ts","../node_modules/jest-diff/build/index.d.ts","../node_modules/jest-matcher-utils/build/index.d.ts","../node_modules/expect/build/index.d.ts","../node_modules/@types/jest/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/json5/index.d.ts","../node_modules/@types/mdast/index.d.ts","../node_modules/@types/mdx/types.d.ts","../node_modules/@types/mdx/index.d.ts","../node_modules/@types/methods/index.d.ts","../node_modules/@types/micromatch/index.d.ts","../node_modules/@types/minimist/index.d.ts","../node_modules/@types/morgan/index.d.ts","../node_modules/@types/node-fetch/node_modules/form-data/index.d.ts","../node_modules/@types/node-fetch/externals.d.ts","../node_modules/@types/node-fetch/index.d.ts","../node_modules/@types/normalize-package-data/index.d.ts","../node_modules/@types/parse-json/index.d.ts","../node_modules/pg-types/index.d.ts","../node_modules/pg-protocol/dist/messages.d.ts","../node_modules/pg-protocol/dist/serializer.d.ts","../node_modules/pg-protocol/dist/parser.d.ts","../node_modules/pg-protocol/dist/index.d.ts","../node_modules/@types/pg/lib/type-overrides.d.ts","../node_modules/@types/pg/index.d.ts","../node_modules/@types/phoenix/index.d.ts","../node_modules/.pnpm/prettier@3.2.5/node_modules/prettier/doc.d.ts","../node_modules/.pnpm/prettier@3.2.5/node_modules/prettier/index.d.ts","../node_modules/@types/prismjs/index.d.ts","../node_modules/@types/prop-types/index.d.ts","../node_modules/@types/react/global.d.ts","../node_modules/csstype/index.d.ts","../node_modules/@types/react/index.d.ts","../node_modules/@types/react-dom/node_modules/@types/react/global.d.ts","../node_modules/@types/react-dom/node_modules/@types/react/index.d.ts","../node_modules/@types/react-dom/index.d.ts","../node_modules/@types/resolve/index.d.ts","../node_modules/@types/stack-utils/index.d.ts","../node_modules/@types/statuses/index.d.ts","../node_modules/@types/superagent/lib/agent-base.d.ts","../node_modules/@types/superagent/lib/node/response.d.ts","../node_modules/@types/superagent/types.d.ts","../node_modules/@types/superagent/lib/node/agent.d.ts","../node_modules/buffer/index.d.ts","../node_modules/@types/superagent/lib/request-base.d.ts","../node_modules/form-data/index.d.ts","../node_modules/@types/superagent/lib/node/http2wrapper.d.ts","../node_modules/@types/superagent/lib/node/index.d.ts","../node_modules/@types/superagent/index.d.ts","../node_modules/@types/supertest/types.d.ts","../node_modules/@types/supertest/lib/agent.d.ts","../node_modules/@types/supertest/lib/test.d.ts","../node_modules/@types/supertest/index.d.ts","../node_modules/@types/tough-cookie/index.d.ts","../node_modules/@types/triple-beam/index.d.ts","../node_modules/@types/ws/index.d.ts","../node_modules/@types/yargs-parser/index.d.ts","../node_modules/@types/yargs/index.d.ts","../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"8567c4f44c0d1c40726745701a7bbd715c0e8301b6b15bc25b208cec0317bd3d","56c7652b9e41b2acf8fc249f13bbf293f2fd5d20a6826a779fb13f2b41310285","d619113674b97169b14dd63cec0cd38ca586550be0b898342d84860c6966e016","bfc119214b3543fbaabe2c6e1d5c1daa9c0186d4f7fc3a87d72975d2600ea0c1","f37104775d567bf587acc198edd4baa7222f79810463d469375c8ef0d292a157","c5ee44dca52898ad7262cadc354f5e6f434a007c2d904a53ecfb4ee0e419b403","cb44dd6fd99ade30c70496a3fa535590aed5f2bb64ba7bc92aa34156c10c0f25","d52cc473d0d96c4d8a8e9768846f8a38d24b053750b1a1d1c01f9d8112fe05c7",{"version":"420c05e98c0116369a683541572138225c087992d5954e6bee9394df9514f418","signature":"5b8606547db9879a0001bf340e9860e2b1bb89509f092f9c9b283b4ee49b5e2a"},{"version":"665f8d01aad8be703bae1bf37feaec6ce292c54f0c4c6d000044588b0b6fda5f","signature":"5c8ed9d17620d4c9074632c343fe0a77fe667614ce32c04c2c27ffacbaafc1ef"},"4f1687039de5c1e162e419c3e70fd7007e035613f75ffa912dc3e4a6e3d34f4b","2ad00018e95065d0b14bbd4dcc4ececec08d104860651668452f5c6305692b41","c4dd27a0c3897b8f1b7082f70d70f38231f0e0973813680c8ca08ddf0e7d16c1","b23fad2190be146426a7de0fa403e24fccbc9c985d49d22f8b9f39803db47699","2b972d3d61798fcef479dfc84ad519c805fcf4cdc7a5a270b698975371872614","895d89df016d846222abdd633b1f6e3a7f4c820f56901dbda853916d302c16f2","fe05dff4d835a34d8b61468deeb948abf13e77378cb2ec24607f132f2a4065f4","ab59a5f7526fc8309ee5a5a28e3e358f6ed457bdb599dd6542becb706c0419dc","404c3d86960d2a714c16591f26124a8a214f477c3f59c83de59fbf02480e1393","76c33b84606e8124aa33a2ace448ae9b035d1ad59de61e447bba7b94750f8854","64a8c0db1ac49d639d35064e7f20360b8ebb2f64266136adf94a604d698b4ff7","0a2602130be5a581a921d84f465ce0f81e62c961b4d2ffe10e9bcd4060dd41cf","7c1c1d4c8fe888eecca43aa8d1bb12811c4915ffd27718b939c9bb127f2225bf","0d4079e5d31dee0ea3f724aad8ff19a01e248d5e4d234ee81dfe561731b484d9","886e27d585b99cea11db1f8ec5504e7d3da92f48fc819db0e8fc1b615a47f9b5","5c4621a72b5994b6c8d84ca2dc6592ab7288c70a72e86df68b89187f801ebfa7","9f2a41d65629c9d3218d3451b5b73dd96956f9078720e5ea2acf469ea6895240","2d1924bb4fa9f785437228ca40cd05162795b36295b9addaed7aaef2e8e5c7e5","47634f6761f27d52983664d8f1367085d8885d3def57642ae7b490f0c4e4833a","34c57354a2a1b8e654bc730ab55aeeb857ee342ebe848660a078803e0bbd940a","675e46f900b0941dc2657a49ccb533c1dac12aa296fe1ac0c36285b7bf3d7b20",{"version":"55ecfb9f5ead2b86bc6ec3e6415a8368f758a246d01131afdf6c2ed763c8794a","signature":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"cb4f235a5befe5de32057f9a2bf1b6520ec1352da1850dddfcde2523cacfef41",{"version":"f581e76a9cbd988d7637ed1ff48f53f58cca29752f95d9eb7d4c4fd6e31890ef","signature":"dfa123b38999d7b8a748b606c2640681a8150d87d43f0d5bc13b61411e030e54"},"309ebd217636d68cf8784cbc3272c16fb94fb8e969e18b6fe88c35200340aef1","0d12ec196376eed72af136a7b183c098f34e9b85b4f2436159cb19f6f4f5314a","ef9b6279acc69002a779d0172916ef22e8be5de2d2469ff2f4bb019a21e89de2","d75a11da9d377db802111121a8b37d9cadb43022e85edbf3c3b94399458fef10","8d67b13da77316a8a2fabc21d340866ddf8a4b99e76a6c951cc45189142df652","7952419455ca298776db0005b9b5b75571d484d526a29bfbdf041652213bce6f","c8339efc1f5e27162af89b5de2eb6eac029a9e70bd227e35d7f2eaea30fdbf32","35575179030368798cbcd50da928a275234445c9a0df32d4a2c694b2b3d20439","c368a404da68872b1772715b3417fa7e70122b6cd61ff015c8db3011a6dc09f7","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","26384fb401f582cae1234213c3dc75fdc80e3d728a0a1c55b405be8a0c6dddbe","26384fb401f582cae1234213c3dc75fdc80e3d728a0a1c55b405be8a0c6dddbe","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","26384fb401f582cae1234213c3dc75fdc80e3d728a0a1c55b405be8a0c6dddbe","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","26384fb401f582cae1234213c3dc75fdc80e3d728a0a1c55b405be8a0c6dddbe","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","e0bfe601a9fdf6defe94ed62dc60ac71597566001a1f86e705c95e431a9c816d","fc1cc0ed976a163fb02f9ac7d786049d743757db739b6e04c9a0f9e4c1bcf675","759ad7eef39e24d9283143e90437dbb363a4e35417659be139672c8ce55955cc","add0ce7b77ba5b308492fa68f77f24d1ed1d9148534bdf05ac17c30763fc1a79","53f00dc83ccceb8fad22eb3aade64e4bcdb082115f230c8ba3d40f79c835c30e","602e651f5de3e5749a74cf29870fcf74d4cbc7dfe39e2af1292da8d036c012d5","70312f860574ce23a4f095ce25106f59f1002671af01b60c18824a1c17996e92","2c390795b88bbb145150db62b7128fd9d29ccdedabf3372f731476a7a16b5527","451abef2a26cebb6f54236e68de3c33691e3b47b548fd4c8fa05fd84ab2238ff","6042774c61ece4ba77b3bf375f15942eb054675b7957882a00c22c0e4fe5865c","41f185713d78f7af0253a339927dc04b485f46210d6bc0691cf908e3e8ded2a1","e75456b743870667f11263021d7e5f434f4b3b49e8e34798c17325ea51e17e36","7b9496d2e1664155c3c293e1fbbe2aba288614163c88cb81ed6061905924b8f9","e27451b24234dfed45f6cf22112a04955183a99c42a2691fb4936d63cfe42761","58d65a2803c3b6629b0e18c8bf1bc883a686fcf0333230dd0151ab6e85b74307","e818471014c77c103330aee11f00a7a00b37b35500b53ea6f337aefacd6174c9","dca963a986285211cfa75b9bb57914538de29585d34217d03b538e6473ac4c44","d8bc0c5487582c6d887c32c92d8b4ffb23310146fcb1d82adf4b15c77f57c4ac","8cb31102790372bebfd78dd56d6752913b0f3e2cefbeb08375acd9f5ba737155","828fc6d8b8e14217853a7271bfc13d2aed7063f5f40b18933e2905b36dd9eb1d",{"version":"88a2d4bda1826c509f546dd3dd92b2d0ed3e34e8a258e606896516f6eb080822","signature":"6f0f52837947928dcb48c693a69c0c312baeeb1fd00df7b39c98bf7f7e001d7f"},{"version":"af45a68a94f446ae496912024ac4249687a5eeb5494b38bb2abe200ccbea41d0","signature":"cd0c32aef82b619e1d04309fa7dd5fe77d50348ecf9d92be046fdd7aaf4b863e"},{"version":"5d59af8a6c9fbc8d3a5253c006d3439dab422ce7fe45b629701611a48d44c67d","signature":"574a19e3b79ebe0d31bc0ce5f4765d950714eae4c2ffd2ad679c9e0fe05c1e47"},{"version":"63b5d3d7beeb6412e81c4dc3bc615a2749a330e72cc5e9a5202a86044840732e","signature":"9657867c333e9639983a6fa1dc74e8dc3a906f8d15f4c191bafe4ade6a5ba356"},{"version":"26ed5ba611e48aab9039f3eafd1a7b588b922bde6212f43134968ef6415b2f02","signature":"ac7463de289abf3f530d582004f289afce5973c3cf3f877d25c68d936daf68f5"},{"version":"397685d559ee6582dc55414a24257509c0b5e22cf5e3335398eb5c84a72332a7","signature":"1df5d7515b9c489ccc2265afca98664b15391603f128b36ebe98c90d986f60bb"},{"version":"d2ea909b930f4e95d23cea1f529b00e034c3f26bc598f0fbd4e7e27d3c4b1a7c","signature":"22c166265f71125e229c4537673c9b112543aa4bbfff5985badc6bec9938df76"},{"version":"3c6a5f6fcbf2781495525e2719bac38e2f78a7a72f10a0f3076313cc751ab42e","signature":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},{"version":"87439a9023976653f8ff5ba48ca29e0ef6f04aafb5ca38257d25995064134ff0","signature":"1bd8c7274e7d8287dc12a4747b43bad5e1c5245e748b5b2b19aba56a75b8da18"},{"version":"0bf18754bb68d3066f218a24f9253af09eefa604664bdabc19d7aaf0257614cf","signature":"b6eee4179d6c9a5ec1eb3a648c1e94962cd9f4e199db613c3ad88b7563645a1b"},{"version":"f513058549831e85376f8d19cafaf2a4a770b6eb1b859fb371141f2c9dec0d70","signature":"a5ea917f718dc111c6ac49a64d604190dc489ced7830f85f9072d13b31696b77"},"d70591b280b4c77c0b82243785056025463e4d4b115412deb71dc443114b4d99","532915b9a7eb59faea346c48b5de7046339eacf1141692e25319dcd72da375fc",{"version":"25f4af06aef1a0021ef7a774c29fd426d1aab745ac6a6377c07737c7f3583e50","signature":"f6371f9ab11bc15bd11abe1badb553f61bcc33b48c9f888463366a8eac7512eb"},"ba8691cf6bea9d53e6bf6cbc22af964a9633a21793981a1be3dce65e7a714d8b","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"bce910d9164785c9f0d4dcea4be359f5f92130c7c7833dea6138ab1db310a1f9","affectsGlobalScope":true},"7d2e3fea24c712c99c03ad8f556abedbfe105f87f1be10b95dbd409d24bc05a3",{"version":"7c387a02bf156d8d45667134d32518ac3ca1b99ca50ca9deff2c1a03eb6d1a81","affectsGlobalScope":true},"3719525a8f6ab731e3dfd585d9f87df55ec7d50d461df84f74eb4d68bb165244","f993522fd7d01ae1ead930091fe35130b8415720d6c2123dc2a7e8eb11bb3cba",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","b787b5b54349a24f07d089b612a9fb8ff024dbbe991ff52ea2b188a6b1230644","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","1cdcfc1f624d6c08aa12c73935f6e13f095919cd99edf95752951796eb225729","df6d4b6ba1e64f682091862faa30104e93891f9e7202d006bf5e7a88ab4a0dbe","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"c2fcbd6fad600e96fee8c5df1a62e908d477f5b47a9374b2bab7e74f52cfcc92","affectsGlobalScope":true},"5e3f2470ce8038c4005ff1baff18a69848383f431d6817d453e70d66e037f4a2","cc68e79b99f80e4dfd01967ec96be69efb0ff5bd7f779d9a2cc09dfe590ffd28","91d3d8f536f22dcaeeace0fc6f3544d3562e266a27cf3a2fe280b8051af5d006","9503113febdd737095465792cc074d541902c82c0aea3922f940de18784812ad","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"0715e4cd28ad471b2a93f3e552ff51a3ae423417a01a10aa1d3bc7c6b95059d6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","b28adf3fee5d3caf55b45bcbb01ade346059359239e21e774b224fb535b09d14","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda",{"version":"d9b4afd96c3c0ff70e90d05ef022e582b102e665e9029d34940472dc3058360e","affectsGlobalScope":true},{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","1422cd9e705adcc09088fda85a900c2b70e3ad36ea85846f68bd1a884cdf4e2b","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"22d7b95cb63dead43834ae20ee492c9c8b6d90db3957d21665199f0efb1d3e26","affectsGlobalScope":true},{"version":"a9fc1469744055a3435f203123246b96c094e7ff8c4e1c3863829d9b705b7a34","affectsGlobalScope":true},"868831cab82b65dfe1d68180e898af1f2101e89ba9b754d1db6fb8cc2fac1921","0fe8985a28f82c450a04a6edf1279d7181c0893f37da7d2a27f8efd4fd5edb03","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"52120bb7e4583612225bdf08e7c12559548170f11e660d33a33623bae9bbdbba","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"d5be4343a9ace4611f04a6fffd91ceba91265fa15bfb0149306e0a6963e1a015","3dcefe176e6dce7a06bd345522e19f631f7fdb370335e2e93bc225b3afbb0bd0","a28ac3e717907284b3910b8e9b3f9844a4e0b0a861bea7b923e5adf90f620330","b6d03c9cfe2cf0ba4c673c209fcd7c46c815b2619fd2aad59fc4229aaef2ed43","82e5a50e17833a10eb091923b7e429dc846d42f1c6161eb6beeb964288d98a15","670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","81df92841a7a12d551fcbc7e4e83dbb7d54e0c73f33a82162d13e9ae89700079","069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","c2a6a737189ced24ffe0634e9239b087e4c26378d0490f95141b9b9b042b746c","104c67f0da1bdf0d94865419247e20eded83ce7f9911a1aa75fc675c077ca66e","cc0d0b339f31ce0ab3b7a5b714d8e578ce698f1e13d7f8c60bfb766baeb1d35c","2b91a6a00be41e4dea6d25220ef9d4d1c843872d1ad6b9f0597c720d2d45c256","1748c03e7a7d118f7f6648c709507971eb0d416f489958492c5ae625de445184","0dc6940ff35d845686a118ee7384713a84024d60ef26f25a2f87992ec7ddbd64","6847334317c1bc1e6fc4b679b0095bbd2b6ee3b85fe3f26fc26bac462f68ef5e","d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769","b78cd10245a90e27e62d0558564f5d9a16576294eee724a59ae21b91f9269e4a","baac9896d29bcc55391d769e408ff400d61273d832dd500f21de766205255acb","2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed",{"version":"a8932b7a5ef936687cc5b2492b525e2ad5e7ed321becfea4a17d5a6c80f49e92","affectsGlobalScope":true},"b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b","0e13570a7e86c6d83dd92e81758a930f63747483e2cd34ef36fcdb47d1f9726a","d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","eb96a2321f717bccc3e49e104e299152984b927ea4546b559ae631c06565819c","25be1eb939c9c63242c7a45446edb20c40541da967f43f1aa6a00ed53c0552db","fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"0133ebdd17a823ae56861948870cde4dac18dd8818ab641039c85bbb720429e0","f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","874d84ca5699231d5af2868fef01fc63f948bd83be928881479db48508f92ca0","a4a39b5714adfcadd3bbea6698ca2e942606d833bde62ad5fb6ec55f5e438ff8","bbc1d029093135d7d9bfa4b38cbf8761db505026cc458b5e9c8b74f4000e5e75","1f68ab0e055994eb337b67aa87d2a15e0200951e9664959b3866ee6f6b11a0fe","151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","5d08a179b846f5ee674624b349ebebe2121c455e3a265dc93da4e8d9e89722b4","afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","89121c1bf2990f5219bfd802a3e7fc557de447c62058d6af68d6b6348d64499a","79b4369233a12c6fa4a07301ecb7085802c98f3a77cf9ab97eee27e1656f82e6","035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec",{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true},"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","d4a22007b481fe2a2e6bfd3a42c00cd62d41edb36d30fc4697df2692e9891fc8","f8a6bb79327f4a6afc63d28624654522fc80f7536efa7a617ef48200b7a5f673","8e0733c50eaac49b4e84954106acc144ec1a8019922d6afcde3762523a3634af","b0f9ef6423d6b29dde29fd60d83d215796b2c1b76bfca28ac374ae18702cfb8e","33a0782502805f6dac67362b4290250e29755139a9c0d93a42e9da3a6e282e85","fbca5ffaebf282ec3cdac47b0d1d4a138a8b0bb32105251a38acb235087d3318","4095f4086e7db146d9e08ad0b24c795ba6e4bddbd4aa87c5c06855efbda974aa","736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","3898e3dbe94b6fe529fbe8f0faee1309c1923100516d7a014b301955e52ece77","3663d1b50f356656a314e5df169bb51cb9d5fd75905fa703f75db6bb32030568","22293bd6fa12747929f8dfca3ec1684a3fe08638aa18023dd286ab337e88a592","916be7d770b0ae0406be9486ac12eb9825f21514961dd050594c4b250617d5a8","f60e3e3060207ac982da13363181fd7ee4beecc19a7c569f0d6bb034331066c2","17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","6e5c9272f6b3783be7bdddaf207cccdb8e033be3d14c5beacc03ae9d27d50929","9b4f7ff9681448c72abe38ea8eefd7ffe0c3aefe495137f02012a08801373f71","0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","798367363a3274220cbed839b883fe2f52ba7197b25e8cb2ac59c1e1fd8af6b7","fe62b82c98a4d5bca3f8de616b606d20211b18c14e881bb6856807d9ab58131b","f4ae5546352701fd6932fdd86419438bb51253e4627a44808489742035bac644","2f848b4e660b568651a6350565afc8ac5b0644853a2a863862807602cf244a05","e7049308a11ff36ca7eee4ff33df35106eb108018ea4cd4cdb00efe8e9711ce0","e85d04f57b46201ddc8ba238a84322432a4803a5d65e0bbd8b3b4f05345edd51","87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc",{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true},"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9",{"version":"472f5aab7edc498a0a761096e8e254c5bc3323d07a1e7f5f8b8ec0d6395b60a0","affectsGlobalScope":true},{"version":"170d4db14678c68178ee8a3d5a990d5afb759ecb6ec44dbd885c50f6da6204f6","affectsGlobalScope":true},"d4d7d3f832882a4b2d611a7eaaa80c780c3342b5732090130fa9af4a40bd051e","a0acca63c9e39580f32a10945df231815f0fe554c074da96ba6564010ffbd2d8","8baa5d0febc68db886c40bf341e5c90dc215a90cd64552e47e8184be6b7e3358","ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","1f4ae755492a669b317903a6b1664cb7af3fe0c3d1eec6447f4e95a80616d15a","e7bb49fac2aa46a13011b5eb5e4a8648f70a28aea1853fab2444dd4fcb4d4ec7","464e45d1a56dae066d7e1a2f32e55b8de4bfb072610c3483a4091d73c9924908","da318e126ac39362c899829547cc8ee24fa3e8328b52cdd27e34173cf19c7941","24bd01a91f187b22456c7171c07dbf44f3ad57ebd50735aab5c13fa23d7114b4","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","4738eefeaaba4d4288a08c1c226a76086095a4d5bcc7826d2564e7c29da47671","736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","dbec715e9e82df297e49e3ed0029f6151aa40517ebfd6fcdba277a8a2e1d3a1b","097f1f8ca02e8940cfdcca553279e281f726485fa6fb214b3c9f7084476f6bcc","8f75e211a2e83ff216eb66330790fb6412dcda2feb60c4f165c903cf375633ee","c3fb0d969970b37d91f0dbf493c014497fe457a2280ac42ae24567015963dbf7","a9155c6deffc2f6a69e69dc12f0950ba1b4db03b3d26ab7a523efc89149ce979","c99faf0d7cb755b0424a743ea0cbf195606bf6cd023b5d10082dba8d3714673c","21942c5a654cc18ffc2e1e063c8328aca3b127bbf259c4e97906d4696e3fa915","03c258e060b7da220973f84b89615e4e9850e9b5d30b3a8e4840b3e3268ae8eb","908217c4f2244ec402b73533ebfcc46d6dcd34fc1c807ff403d7f98702abb3bc","1ba59c8bbeed2cb75b239bb12041582fa3e8ef32f8d0bd0ec802e38442d3f317","bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","74d5a87c3616cd5d8691059d531504403aa857e09cbaecb1c64dfb9ace0db185"],"root":[60,61,[83,85],[156,169]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"declaration":true,"declarationMap":true,"module":99,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99},"fileIdsList":[[216],[60,61,155,156,216],[60,61,155,156,157,158,159,160,216],[60,155,156,216],[59,60,82,84,85,155,161,216],[59,82,216],[82,216],[59,82,165,216],[82,167,216],[59,216],[216,223],[216,253,256,259],[216,250,251,252,253,259],[216,254],[216,252,253,255,259],[216,256],[170,216],[173,216],[174,179,207,216],[175,186,187,194,204,215,216],[175,176,186,194,216],[177,216],[178,179,187,195,216],[179,204,212,216],[180,182,186,194,216],[181,216],[182,183,216],[186,216],[184,186,216],[186,187,188,204,215,216],[186,187,188,201,204,207,216],[216,220],[182,186,189,194,204,215,216],[186,187,189,190,194,204,212,215,216],[189,191,204,212,215,216],[170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222],[186,192,216],[193,215,216],[182,186,194,204,216],[195,216],[196,216],[173,197,216],[198,214,216,220],[199,216],[200,216],[186,201,202,216],[201,203,216,218],[174,186,204,205,206,207,216],[174,204,206,216],[204,205,216],[207,216],[208,216],[204,216],[186,210,211,216],[210,211,216],[179,194,204,212,216],[213,216],[194,214,216],[174,189,200,215,216],[179,216],[204,216,217],[216,218],[216,219],[174,179,186,188,197,204,215,216,218,220],[204,216,221],[53,66,75,216],[72,75,80,216],[59,72,73,216],[59,63,68,69,70,216],[59,63,216],[63,75,216],[53,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,81,216],[63,216],[54,216],[63,64,65,66,67,216],[52,53,54,55,63,72,73,74,82,216],[75,216],[52,72,216],[53,54,55,63,69,216],[53,59,63,216],[52,63,216],[52,216],[52,54,55,56,57,58,216],[53,54,59,216],[52,55,59,216],[216,297],[144,216],[144,147,216],[137,144,145,146,147,148,149,150,151,216],[152,216],[144,145,216],[144,146,216],[87,89,90,91,92,216],[87,89,91,92,216],[87,89,91,216],[86,87,89,90,92,216],[87,89,92,216],[87,88,89,90,91,92,93,94,137,138,139,140,141,142,143,216],[89,92,216],[86,87,88,90,91,92,216],[89,138,142,216],[89,90,91,92,216],[153,216],[91,216],[95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,216],[216,225],[216,268],[216,225,226,227,228,229],[216,225,227],[189,216,223,232],[189,216,223],[189,216,223,232,237,245],[216,248],[216,253,259],[186,189,216,223,239,240,241],[216,233,242,244],[187,216,223],[216,261],[216,263],[216,264],[216,270,273],[216,278,279],[216,234],[189,215,216,223,284,285],[189,204,216,223],[186,204,212,216,223,289,290,293,294,295],[216,295],[216,305],[216,302,304],[216,300,301,302],[187,204,216,223,238],[189,216,223,239,243],[216,318],[216,236,280,310,312,319],[190,194,204,212,216,223],[174,187,189,190,191,194,204,216,280,311,312,313,315,316,317],[189,204,216,318],[174,187,216,311,312],[215,216,311],[216,319,320,321,322],[216,319,320,323],[216,319,320],[189,190,194,216,280,319],[186,189,191,194,204,212,215,216,221,223],[216,327],[186,204,216,223],[216,266,272],[216,270],[216,267,271],[216,223,290,291,292],[204,216,223,290],[216,269],[154,216]],"referencedMap":[[163,1],[157,2],[158,2],[161,3],[159,4],[160,4],[156,1],[162,5],[85,6],[84,7],[166,7],[167,8],[168,9],[169,7],[164,7],[83,1],[165,6],[60,10],[61,1],[231,11],[257,12],[250,1],[254,13],[251,14],[256,15],[255,16],[253,1],[252,1],[170,17],[171,17],[173,18],[174,19],[175,20],[176,21],[177,22],[178,23],[179,24],[180,25],[181,26],[182,27],[183,27],[185,28],[184,29],[186,28],[187,30],[188,31],[172,32],[222,1],[189,33],[190,34],[191,35],[223,36],[192,37],[193,38],[194,39],[195,40],[196,41],[197,42],[198,43],[199,44],[200,45],[201,46],[202,46],[203,47],[204,48],[206,49],[205,50],[207,51],[208,52],[209,53],[210,54],[211,55],[212,56],[213,57],[214,58],[215,59],[216,60],[217,61],[218,62],[219,63],[220,64],[221,65],[72,66],[62,10],[81,67],[80,1],[78,68],[63,10],[71,69],[64,70],[76,71],[82,72],[65,73],[66,74],[68,75],[75,76],[79,77],[73,78],[70,79],[67,73],[77,10],[69,80],[74,81],[53,1],[56,1],[58,82],[57,82],[59,83],[55,84],[54,85],[52,1],[297,1],[298,86],[50,1],[51,1],[9,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[20,1],[4,1],[21,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[36,1],[33,1],[34,1],[35,1],[37,1],[7,1],[38,1],[43,1],[44,1],[39,1],[40,1],[41,1],[42,1],[8,1],[48,1],[45,1],[46,1],[47,1],[1,1],[49,1],[148,87],[151,88],[149,88],[145,87],[152,89],[153,90],[150,88],[146,91],[147,92],[141,93],[90,94],[92,95],[139,1],[91,96],[140,97],[144,98],[142,1],[93,94],[94,1],[138,99],[89,100],[86,1],[143,101],[87,102],[88,1],[154,103],[95,104],[96,104],[97,104],[98,104],[99,104],[100,104],[101,104],[102,104],[103,104],[104,104],[105,104],[106,104],[108,104],[107,104],[109,104],[110,104],[111,104],[137,105],[112,104],[113,104],[114,104],[115,104],[116,104],[117,104],[118,104],[119,104],[120,104],[121,104],[123,104],[122,104],[124,104],[125,104],[126,104],[127,104],[128,104],[129,104],[130,104],[131,104],[132,104],[133,104],[136,104],[134,104],[135,104],[227,106],[225,1],[266,1],[269,107],[268,1],[224,1],[230,108],[226,106],[228,109],[229,106],[233,110],[234,1],[232,111],[235,1],[236,1],[246,112],[247,111],[249,113],[259,114],[258,1],[242,115],[245,116],[260,117],[262,118],[243,1],[263,1],[264,119],[265,120],[274,121],[275,1],[276,1],[237,1],[277,118],[279,122],[278,1],[280,1],[281,123],[238,1],[282,1],[283,111],[248,1],[285,1],[286,124],[284,125],[287,1],[288,1],[295,126],[294,127],[296,1],[299,1],[300,1],[240,1],[241,1],[306,128],[304,1],[305,129],[301,1],[303,130],[307,1],[239,131],[244,132],[308,1],[309,1],[319,133],[310,1],[313,134],[317,135],[318,136],[311,137],[315,138],[312,139],[323,140],[321,141],[322,142],[320,143],[324,1],[325,1],[261,1],[326,144],[327,1],[328,145],[329,146],[314,1],[302,1],[273,147],[316,125],[271,148],[272,149],[267,1],[293,150],[290,11],[292,151],[291,1],[289,1],[270,152],[155,153]],"latestChangedDtsFile":"./dist/client/index.d.ts"},"version":"5.5.4"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.dom.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/value.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/type_utils.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/validators.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/validator.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/base64.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/errors.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/compare.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/values/index.d.ts","./src/types.ts","./src/utils.ts","../ts-sdk/dist/internal/builtin-types.d.mts","../ts-sdk/dist/internal/types.d.mts","../ts-sdk/dist/internal/headers.d.mts","../ts-sdk/dist/internal/request-options.d.mts","../ts-sdk/dist/internal/utils/log.d.mts","../ts-sdk/dist/core/error.d.mts","../ts-sdk/dist/internal/uploads.d.mts","../ts-sdk/dist/internal/to-file.d.mts","../ts-sdk/dist/core/uploads.d.mts","../ts-sdk/dist/resources/shared.d.mts","../ts-sdk/dist/core/resource.d.mts","../ts-sdk/dist/internal/parse.d.mts","../ts-sdk/dist/core/api-promise.d.mts","../ts-sdk/dist/resources/customers.d.mts","../ts-sdk/dist/resources/entities.d.mts","../ts-sdk/dist/resources/features.d.mts","../ts-sdk/dist/resources/products.d.mts","../ts-sdk/dist/resources/referrals.d.mts","../ts-sdk/dist/resources/top-level.d.mts","../ts-sdk/dist/resources/index.d.mts","../ts-sdk/dist/client.d.mts","../ts-sdk/dist/index.d.mts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/authentication.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/data_model.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/filter_builder.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/index_range_builder.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/pagination.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/search_filter_builder.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/query.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/system_fields.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/schema.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/database.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/api.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/scheduler.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/vector_search.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/registration.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/impl/registration_impl.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/storage.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/cron.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/router.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/components/paths.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/components/index.d.ts","../node_modules/.pnpm/convex@1.25.4_@clerk+clerk-react@5.45.0_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/convex/dist/esm-types/server/index.d.ts","./src/component/_generated/api.d.ts","./src/client/helpers/utils.ts","./src/client/helpers/customers.ts","./src/client/helpers/entities.ts","./src/client/helpers/products.ts","./src/client/helpers/referrals.ts","./src/client/helpers/index.ts","./src/client/types.ts","./src/client/index.ts","./src/client/_generated/_ignore.ts","./src/component/convex.config.ts","./src/component/schema.ts","./src/component/_generated/api.js","./src/component/_generated/datamodel.d.ts","./src/component/_generated/server.d.ts","./src/component/_generated/server.js","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/assert.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/assert/strict.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/globals.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/async_hooks.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/buffer.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/child_process.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/cluster.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/console.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/constants.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/crypto.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/dgram.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/dns.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/dns/promises.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/domain.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/dom-events.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/events.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/fs.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/fs/promises.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/http.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/http2.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/https.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/inspector.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/module.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/net.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/os.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/path.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/perf_hooks.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/process.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/punycode.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/querystring.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/readline.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/readline/promises.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/repl.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/stream.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/stream/promises.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/stream/consumers.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/stream/web.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/string_decoder.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/test.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/timers.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/timers/promises.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/tls.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/trace_events.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/tty.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/url.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/util.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/v8.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/vm.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/wasi.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/worker_threads.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/zlib.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/globals.global.d.ts","../node_modules/.pnpm/@types+node@18.17.0/node_modules/@types/node/index.d.ts","../node_modules/.pnpm/@types+better-sqlite3@7.6.13/node_modules/@types/better-sqlite3/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"8567c4f44c0d1c40726745701a7bbd715c0e8301b6b15bc25b208cec0317bd3d","56c7652b9e41b2acf8fc249f13bbf293f2fd5d20a6826a779fb13f2b41310285","d619113674b97169b14dd63cec0cd38ca586550be0b898342d84860c6966e016","bfc119214b3543fbaabe2c6e1d5c1daa9c0186d4f7fc3a87d72975d2600ea0c1","f37104775d567bf587acc198edd4baa7222f79810463d469375c8ef0d292a157","c5ee44dca52898ad7262cadc354f5e6f434a007c2d904a53ecfb4ee0e419b403","cb44dd6fd99ade30c70496a3fa535590aed5f2bb64ba7bc92aa34156c10c0f25","d52cc473d0d96c4d8a8e9768846f8a38d24b053750b1a1d1c01f9d8112fe05c7",{"version":"e17b2320b36db452acebddb9b5c6e09d597d87eb94b52a4f04028c3967696cec","signature":"6b030b0f477df09f3469eb450b94c5d1166ce90033bce089791080a0edc4e6e6"},{"version":"665f8d01aad8be703bae1bf37feaec6ce292c54f0c4c6d000044588b0b6fda5f","signature":"5c8ed9d17620d4c9074632c343fe0a77fe667614ce32c04c2c27ffacbaafc1ef"},"86d4ff8ba66b5ea1df375fe6092d2b167682ccd5dd0d9b003a7d30d95a0cda32","dbab1950ef4bf06f44795b144026a352a7b4a3a68a969bbf32eb55addd0fb95a","2b5368217b57528a60433558585186a925d9842fe64c1262adde8eac5cb8de33","a024d87dcb8c2ff7f8d20de426c3b111bff84d90e7f33ce9875c0c8063457f6a","4dee5a9f38de061012bb24699498c99857567e7cd8d7676653f005d2d13e9c3a","633ae046e03a1016414a9759a1beeefe133008cbecf978386a58b3f432f017df","89e7423fb821654cfd304480c30da118a6940ffc9d30a89531354ce780c3b503","ddaf5d3ddc45282b19fb0fecec91c87fc9b4d1f45c2ee611677345c81383c5c5","5668033966c8247576fc316629df131d6175d24ccf22940324c19c159671e1c1","e9af3dcb1b3be4b5ad998368065272b9675c458bc2e9eebf6f80e67b45aa1a95","54281819d417d09df14fc8d4ecda943038e84f821c3ba653646d4f6229e99018","4e71ba5ba546fecd34468ceae252f0f7d926be6a74694d63f2e5a1231940cfb7","56c5614e9c48fbb66fec22ea49126b9e9aa2cefda9206dd92ba944cf134d7632","459b59809a2b8016c5de8f4772cdeeddc2ac145861f8bb4bc616c48d32b28157","3b2bf1a31c5280056e4e4a6d6e79b90e60ffaef5d0937f8eff1874e011946ec7","de8cf570c601225868c3aecd16c738454cf0673dfb5d5300e9f19f0211d8058e","4975868680956fbfbeac6c9141f0a37da00511e349f37750208979205ed47429","f4b939c95405a4821722e1d53d718021f199e289a41478e61a947ae7c254f518","f4f8d6be3a61e6861375213f522cd575292ae211151611e83c2a1d2420146adf","9b688239ebb59b7e827c1a5a7ed35dc269eb40c13a09ea2edf26bbba2666d65e","f2af97f79ef560cbb025683c0259debe6d0d968214d22dce228670b29341eeef","86765e6e3bb6848c64a6b045ce9d4c4bf6b251585f75246a6ef6eb579fe7ef47","4f1687039de5c1e162e419c3e70fd7007e035613f75ffa912dc3e4a6e3d34f4b","2ad00018e95065d0b14bbd4dcc4ececec08d104860651668452f5c6305692b41","c4dd27a0c3897b8f1b7082f70d70f38231f0e0973813680c8ca08ddf0e7d16c1","b23fad2190be146426a7de0fa403e24fccbc9c985d49d22f8b9f39803db47699","2b972d3d61798fcef479dfc84ad519c805fcf4cdc7a5a270b698975371872614","895d89df016d846222abdd633b1f6e3a7f4c820f56901dbda853916d302c16f2","fe05dff4d835a34d8b61468deeb948abf13e77378cb2ec24607f132f2a4065f4","ab59a5f7526fc8309ee5a5a28e3e358f6ed457bdb599dd6542becb706c0419dc","404c3d86960d2a714c16591f26124a8a214f477c3f59c83de59fbf02480e1393","76c33b84606e8124aa33a2ace448ae9b035d1ad59de61e447bba7b94750f8854","64a8c0db1ac49d639d35064e7f20360b8ebb2f64266136adf94a604d698b4ff7","0a2602130be5a581a921d84f465ce0f81e62c961b4d2ffe10e9bcd4060dd41cf","7c1c1d4c8fe888eecca43aa8d1bb12811c4915ffd27718b939c9bb127f2225bf","0d4079e5d31dee0ea3f724aad8ff19a01e248d5e4d234ee81dfe561731b484d9","886e27d585b99cea11db1f8ec5504e7d3da92f48fc819db0e8fc1b615a47f9b5","5c4621a72b5994b6c8d84ca2dc6592ab7288c70a72e86df68b89187f801ebfa7","9f2a41d65629c9d3218d3451b5b73dd96956f9078720e5ea2acf469ea6895240","2d1924bb4fa9f785437228ca40cd05162795b36295b9addaed7aaef2e8e5c7e5","47634f6761f27d52983664d8f1367085d8885d3def57642ae7b490f0c4e4833a","34c57354a2a1b8e654bc730ab55aeeb857ee342ebe848660a078803e0bbd940a","675e46f900b0941dc2657a49ccb533c1dac12aa296fe1ac0c36285b7bf3d7b20","cb4f235a5befe5de32057f9a2bf1b6520ec1352da1850dddfcde2523cacfef41",{"version":"ca4e7b681128f70e8955664af1e5a168ebe697bad6fc75d3e216843439681f27","signature":"6f0f52837947928dcb48c693a69c0c312baeeb1fd00df7b39c98bf7f7e001d7f"},{"version":"116356827cbdeed35d987129fa851c2b989d23a4968311e4cb24b0d42e92f829","signature":"a676c65a7819a442fcd114563d5d70a28f0f302f278eed62f19d84a495e87fd1"},{"version":"cc9e74f133cdd74ecd49304f8ab8f1fa1a9ebc75cfe085d55c53ffc5f1c19251","signature":"23f0cc641115c82e564dff840e92a7be38d75556fd0ba25c2200604800814172"},{"version":"707d8e99c006eb034622ed3897205237c6d8f958941c506629d05b110445c5b1","signature":"ed762bb15a294d66c53e11ce64488e7ce83a555742666009d108e99dbbfca56b"},{"version":"6a1e77e1137246a03c462a6deb8f40c1186d37d217cbda0451fd4aa236c95462","signature":"692ad61453398939f1f77cff746e22d248c3e66baa13500a1925690b651ca073"},{"version":"fff84e5753b16503b2041a6b1d5cbb3d123786cdd64ff0ef04da871bfe14be3c","signature":"129172f35a61696e09e57b846aaf80b63aed589767a2f9fc686f69a339df653b"},{"version":"ea96a3ec1e22b3dea11ce6e5693d92b2be58730c175bec3e312317c0b837e711","signature":"dfa123b38999d7b8a748b606c2640681a8150d87d43f0d5bc13b61411e030e54"},{"version":"6d2d691b2c6ae7f1dcf3ee13d29754f199242e29c93a0341a50f494ddf71d6c9","signature":"2dcc8ff54624ecd941b0207366b5f878e476a6f78438c7258b478fa7d2efa503"},{"version":"3c6a5f6fcbf2781495525e2719bac38e2f78a7a72f10a0f3076313cc751ab42e","signature":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},{"version":"87439a9023976653f8ff5ba48ca29e0ef6f04aafb5ca38257d25995064134ff0","signature":"1bd8c7274e7d8287dc12a4747b43bad5e1c5245e748b5b2b19aba56a75b8da18"},{"version":"0bf18754bb68d3066f218a24f9253af09eefa604664bdabc19d7aaf0257614cf","signature":"b6eee4179d6c9a5ec1eb3a648c1e94962cd9f4e199db613c3ad88b7563645a1b"},{"version":"f513058549831e85376f8d19cafaf2a4a770b6eb1b859fb371141f2c9dec0d70","signature":"a5ea917f718dc111c6ac49a64d604190dc489ced7830f85f9072d13b31696b77"},"d70591b280b4c77c0b82243785056025463e4d4b115412deb71dc443114b4d99","532915b9a7eb59faea346c48b5de7046339eacf1141692e25319dcd72da375fc",{"version":"25f4af06aef1a0021ef7a774c29fd426d1aab745ac6a6377c07737c7f3583e50","signature":"f6371f9ab11bc15bd11abe1badb553f61bcc33b48c9f888463366a8eac7512eb"},"ba8691cf6bea9d53e6bf6cbc22af964a9633a21793981a1be3dce65e7a714d8b","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"bce910d9164785c9f0d4dcea4be359f5f92130c7c7833dea6138ab1db310a1f9","affectsGlobalScope":true},"7d2e3fea24c712c99c03ad8f556abedbfe105f87f1be10b95dbd409d24bc05a3",{"version":"7c387a02bf156d8d45667134d32518ac3ca1b99ca50ca9deff2c1a03eb6d1a81","affectsGlobalScope":true},"3719525a8f6ab731e3dfd585d9f87df55ec7d50d461df84f74eb4d68bb165244","f993522fd7d01ae1ead930091fe35130b8415720d6c2123dc2a7e8eb11bb3cba",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","b787b5b54349a24f07d089b612a9fb8ff024dbbe991ff52ea2b188a6b1230644","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","1cdcfc1f624d6c08aa12c73935f6e13f095919cd99edf95752951796eb225729","df6d4b6ba1e64f682091862faa30104e93891f9e7202d006bf5e7a88ab4a0dbe","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"c2fcbd6fad600e96fee8c5df1a62e908d477f5b47a9374b2bab7e74f52cfcc92","affectsGlobalScope":true},"5e3f2470ce8038c4005ff1baff18a69848383f431d6817d453e70d66e037f4a2","cc68e79b99f80e4dfd01967ec96be69efb0ff5bd7f779d9a2cc09dfe590ffd28","91d3d8f536f22dcaeeace0fc6f3544d3562e266a27cf3a2fe280b8051af5d006","9503113febdd737095465792cc074d541902c82c0aea3922f940de18784812ad","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"0715e4cd28ad471b2a93f3e552ff51a3ae423417a01a10aa1d3bc7c6b95059d6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","b28adf3fee5d3caf55b45bcbb01ade346059359239e21e774b224fb535b09d14","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda",{"version":"d9b4afd96c3c0ff70e90d05ef022e582b102e665e9029d34940472dc3058360e","affectsGlobalScope":true},{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","1422cd9e705adcc09088fda85a900c2b70e3ad36ea85846f68bd1a884cdf4e2b","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"22d7b95cb63dead43834ae20ee492c9c8b6d90db3957d21665199f0efb1d3e26","affectsGlobalScope":true},{"version":"a9fc1469744055a3435f203123246b96c094e7ff8c4e1c3863829d9b705b7a34","affectsGlobalScope":true},"868831cab82b65dfe1d68180e898af1f2101e89ba9b754d1db6fb8cc2fac1921","0fe8985a28f82c450a04a6edf1279d7181c0893f37da7d2a27f8efd4fd5edb03","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"52120bb7e4583612225bdf08e7c12559548170f11e660d33a33623bae9bbdbba","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"d5be4343a9ace4611f04a6fffd91ceba91265fa15bfb0149306e0a6963e1a015","c2a6a737189ced24ffe0634e9239b087e4c26378d0490f95141b9b9b042b746c"],"root":[60,61,[105,120]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"declaration":true,"declarationMap":true,"module":99,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99},"fileIdsList":[[167],[60,61,83,106,167],[60,61,83,106,107,108,109,110,167],[60,83,106,167],[59,60,83,104,105,111,112,167],[59,104,167],[104,167],[59,104,116,167],[104,118,167],[59,167],[167,174],[121,167],[124,167],[125,130,158,167],[126,137,138,145,155,166,167],[126,127,137,145,167],[128,167],[129,130,138,146,167],[130,155,163,167],[131,133,137,145,167],[132,167],[133,134,167],[137,167],[135,137,167],[137,138,139,155,166,167],[137,138,139,152,155,158,167],[167,171],[133,137,140,145,155,166,167],[137,138,140,141,145,155,163,166,167],[140,142,155,163,166,167],[121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173],[137,143,167],[144,166,167],[133,137,145,155,167],[146,167],[147,167],[124,148,167],[149,165,167,171],[150,167],[151,167],[137,152,153,167],[152,154,167,169],[125,137,155,156,157,158,167],[125,155,157,167],[155,156,167],[158,167],[159,167],[155,167],[137,161,162,167],[161,162,167],[130,145,155,163,167],[164,167],[145,165,167],[125,140,151,166,167],[130,167],[155,167,168],[167,169],[167,170],[125,130,137,139,148,155,166,167,169,171],[155,167,172],[53,88,97,167],[94,97,102,167],[59,94,95,167],[59,85,90,91,92,167],[59,85,167],[85,97,167],[53,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,103,167],[85,167],[54,167],[85,86,87,88,89,167],[52,53,54,55,85,94,95,96,104,167],[97,167],[52,94,167],[53,54,55,85,91,167],[53,59,85,167],[52,85,167],[52,167],[52,54,55,56,57,58,167],[53,54,59,167],[52,55,59,167],[62,63,64,65,66,67,70,74,75,76,77,78,79,80,81,167],[63,73,82,167],[82,167],[68,69,167],[67,70,74,82,167],[65,82,167],[62,63,64,167],[62,167],[62,65,82,167],[65,71,72,74,167],[71,75,76,77,78,79,80,167],[65,72,74,167]],"referencedMap":[[114,1],[107,2],[108,2],[111,3],[109,4],[110,4],[106,1],[113,5],[112,6],[105,7],[117,7],[118,8],[119,9],[120,7],[115,7],[116,6],[60,10],[61,1],[175,11],[121,12],[122,12],[124,13],[125,14],[126,15],[127,16],[128,17],[129,18],[130,19],[131,20],[132,21],[133,22],[134,22],[136,23],[135,24],[137,23],[138,25],[139,26],[123,27],[173,1],[140,28],[141,29],[142,30],[174,31],[143,32],[144,33],[145,34],[146,35],[147,36],[148,37],[149,38],[150,39],[151,40],[152,41],[153,41],[154,42],[155,43],[157,44],[156,45],[158,46],[159,47],[160,48],[161,49],[162,50],[163,51],[164,52],[165,53],[166,54],[167,55],[168,56],[169,57],[170,58],[171,59],[172,60],[94,61],[84,10],[103,62],[102,1],[100,63],[85,10],[93,64],[86,65],[98,66],[104,67],[87,68],[88,69],[90,70],[97,71],[101,72],[95,73],[92,74],[89,68],[99,10],[91,75],[96,76],[53,1],[56,1],[58,77],[57,77],[59,78],[55,79],[54,80],[52,1],[50,1],[51,1],[9,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[20,1],[4,1],[21,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[36,1],[33,1],[34,1],[35,1],[37,1],[7,1],[38,1],[43,1],[44,1],[39,1],[40,1],[41,1],[42,1],[8,1],[48,1],[45,1],[46,1],[47,1],[1,1],[49,1],[82,81],[74,82],[67,1],[72,83],[70,84],[83,85],[62,1],[64,1],[73,86],[65,87],[69,88],[63,1],[68,89],[66,86],[75,90],[76,90],[77,90],[81,91],[78,90],[79,92],[71,1],[80,1]],"latestChangedDtsFile":"./dist/client/index.d.ts"},"version":"5.5.4"} \ No newline at end of file diff --git a/package.json b/package.json index 5c94c827..ff21e184 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,11 @@ "packageManager": "pnpm@10.14.0", "scripts": { "test-cli": "pnpm --filter atmn test-cli", - "gen:autumn-js": "bun typegen/generate-autumn-js-types.ts" + "gen": "pnpm gen:ajs && pnpm gen:convex", + "gen:autumn-js": "bun typegen/generate-autumn-js-types.ts", + "gen:ajs": "bun typegen/generate-autumn-js-types.ts", + "gen:convex": "bun typegen/generate-convex-types.ts", + "gen:atmn": "bun typegen/generate-atmn-types.ts" }, "workspaces": [ "package", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 710c0333..c17f6f45 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -273,6 +273,9 @@ importers: '@types/node': specifier: 18.17.0 version: 18.17.0 + '@useautumn/sdk': + specifier: workspace:* + version: link:../ts-sdk autumn-js: specifier: workspace:* version: link:../autumn-js @@ -315,6 +318,12 @@ importers: frameworks/convex-quick: dependencies: + '@useautumn/convex': + specifier: workspace:* + version: link:../../convex + '@useautumn/sdk': + specifier: workspace:* + version: link:../../ts-sdk autumn-js: specifier: workspace:* version: link:../../autumn-js diff --git a/typegen/tsconfig.json b/typegen/tsconfig.json index a4e14317..e6b8459d 100644 --- a/typegen/tsconfig.json +++ b/typegen/tsconfig.json @@ -1,44 +1,44 @@ { - // Visit https://aka.ms/tsconfig to read more about this file - "compilerOptions": { - // File Layout - // "rootDir": "./src", - // "outDir": "./dist", + // Visit https://aka.ms/tsconfig to read more about this file + "compilerOptions": { + // File Layout + // "rootDir": "./src", + // "outDir": "./dist", - // Environment Settings - // See also https://aka.ms/tsconfig/module - "module": "nodenext", - "target": "esnext", - "types": ["node"], - // For nodejs: - // "lib": ["esnext"], - // "types": ["node"], - // and npm install -D @types/node + // Environment Settings + // See also https://aka.ms/tsconfig/module + "module": "nodenext", + "target": "esnext", + "types": ["node"], + // For nodejs: + // "lib": ["esnext"], + // "types": ["node"], + // and npm install -D @types/node - // Other Outputs - "sourceMap": true, - "declaration": true, - "declarationMap": true, + // Other Outputs + "sourceMap": true, + "declaration": true, + "declarationMap": true, - // Stricter Typechecking Options - "noUncheckedIndexedAccess": true, - "exactOptionalPropertyTypes": true, + // Stricter Typechecking Options + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true, - // Style Options - // "noImplicitReturns": true, - // "noImplicitOverride": true, - // "noUnusedLocals": true, - // "noUnusedParameters": true, - // "noFallthroughCasesInSwitch": true, - // "noPropertyAccessFromIndexSignature": true, + // Style Options + // "noImplicitReturns": true, + // "noImplicitOverride": true, + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noFallthroughCasesInSwitch": true, + // "noPropertyAccessFromIndexSignature": true, - // Recommended Options - "strict": true, - "jsx": "react-jsx", - "verbatimModuleSyntax": true, - "isolatedModules": true, - "noUncheckedSideEffectImports": true, - "moduleDetection": "force", - "skipLibCheck": true, - } + // Recommended Options + "strict": true, + "jsx": "react-jsx", + "verbatimModuleSyntax": true, + "isolatedModules": true, + "noUncheckedSideEffectImports": true, + "moduleDetection": "force", + "skipLibCheck": true + } } From 6d3849feaa711fb5abcdb166a0c21ac517a27839 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Mon, 13 Oct 2025 18:12:53 +0100 Subject: [PATCH 09/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20convex=20auto=20ty?= =?UTF-8?q?pegen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- convex/src/client/helpers/customers.ts | 157 ++-- convex/src/client/helpers/entities.ts | 77 +- convex/src/client/helpers/index.ts | 337 ++++--- convex/src/client/helpers/products.ts | 32 +- convex/src/client/helpers/referrals.ts | 56 +- convex/src/client/helpers/utils.ts | 58 +- convex/src/client/index.test.ts | 142 +-- convex/src/client/index.ts | 900 ++++++++++--------- convex/src/client/setup.test.ts | 23 +- convex/src/client/types.ts | 93 +- convex/src/types.ts | 292 +++--- typegen/convexTypeConfigs.ts | 181 ++++ typegen/genUtils/ConvexValidatorGenerator.ts | 419 +++++++++ typegen/genUtils/index.ts | 1 + typegen/generate-convex-types.ts | 51 ++ 15 files changed, 1746 insertions(+), 1073 deletions(-) create mode 100644 typegen/convexTypeConfigs.ts create mode 100644 typegen/genUtils/ConvexValidatorGenerator.ts create mode 100644 typegen/generate-convex-types.ts diff --git a/convex/src/client/helpers/customers.ts b/convex/src/client/helpers/customers.ts index 2048f525..d4e031b0 100644 --- a/convex/src/client/helpers/customers.ts +++ b/convex/src/client/helpers/customers.ts @@ -1,92 +1,119 @@ -import type { Autumn } from "autumn-js"; -import { wrapSdkCall } from "./utils.js"; -import { - type GetCustomerArgsType, - type CreateCustomerArgsType, - type UpdateCustomerArgsType, - type BillingPortalArgsType, - type IdentifierOptsType, +import type { Autumn } from "@useautumn/sdk"; +import type { + BillingPortalArgsType, + CreateCustomerArgsType, + GetCustomerArgsType, + IdentifierOptsType, + UpdateBalancesArgsType, + UpdateCustomerArgsType, } from "../../types.js"; import { toSnakeCase } from "../../utils.js"; +import { wrapSdkCall } from "./utils.js"; export const get = async ({ - autumn, - identifierOpts, - args, + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args?: GetCustomerArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args?: GetCustomerArgsType; }) => { - return await wrapSdkCall(() => - autumn.customers.get(identifierOpts.customerId, { - expand: args?.expand, - }) - ); + return await wrapSdkCall(() => + autumn.customers.get(identifierOpts.customerId, { + expand: args?.expand, + }), + ); }; export const create = async ({ - autumn, - identifierOpts, - args, - useArgs = true, + autumn, + identifierOpts, + args, + useArgs = true, }: { - autumn: Autumn; - identifierOpts?: IdentifierOptsType; - args: CreateCustomerArgsType; - useArgs?: boolean; + autumn: Autumn; + identifierOpts?: IdentifierOptsType; + args: CreateCustomerArgsType; + useArgs?: boolean; }) => { - return await wrapSdkCall(() => - autumn.customers.create({ - id: useArgs ? identifierOpts?.customerId : args.id, - name: useArgs ? identifierOpts?.customerData?.name : args.name, - email: useArgs ? identifierOpts?.customerData?.email : args.email, - ...args, - }) - ); + return await wrapSdkCall(() => + autumn.customers.create({ + ...(useArgs + ? { + id: identifierOpts?.customerId, + name: identifierOpts?.customerData?.name, + email: identifierOpts?.customerData?.email, + } + : { + id: args.id, + name: args.name, + email: args.email, + }), + ...args, + }), + ); }; export const update = async ({ - autumn, - identifierOpts, - args, + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: UpdateCustomerArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: UpdateCustomerArgsType; }) => { - return await wrapSdkCall(() => - autumn.customers.update( - identifierOpts.customerId, - toSnakeCase({ obj: args }) - ) - ); + return await wrapSdkCall(() => + autumn.customers.update( + identifierOpts.customerId, + toSnakeCase({ obj: args }), + ), + ); }; export const discard = async ({ - autumn, - identifierOpts, + autumn, + identifierOpts, +}: { + autumn: Autumn; + identifierOpts: IdentifierOptsType; +}) => { + return await wrapSdkCall(() => + autumn.customers.delete(identifierOpts.customerId), + ); +}; + +export const updateBalances = async ({ + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: UpdateBalancesArgsType; }) => { - return await wrapSdkCall(() => - autumn.customers.delete(identifierOpts.customerId) - ); + return await wrapSdkCall(() => + autumn.customers.updateBalances( + identifierOpts.customerId, + toSnakeCase({ obj: args }), + ), + ); }; export const billingPortal = async ({ - autumn, - identifierOpts, - args, + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: BillingPortalArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: BillingPortalArgsType; }) => { - return await wrapSdkCall(() => - autumn.customers.billingPortal(identifierOpts.customerId, { - return_url: args.returnUrl, - }) - ); + return await wrapSdkCall(() => + autumn.billingPortal({ + customer_id: identifierOpts.customerId, + return_url: args.returnUrl, + }), + ); }; diff --git a/convex/src/client/helpers/entities.ts b/convex/src/client/helpers/entities.ts index a81638bd..5b0704a8 100644 --- a/convex/src/client/helpers/entities.ts +++ b/convex/src/client/helpers/entities.ts @@ -1,55 +1,58 @@ -import type { Autumn, CreateEntityParams } from "autumn-js"; +import type { Autumn } from "@useautumn/sdk"; import type { - IdentifierOptsType, - CreateEntityArgsType, - GetEntityArgsType, + CreateEntityArgsType, + GetEntityArgsType, + IdentifierOptsType, } from "../../types.js"; -import { wrapSdkCall } from "./utils.js"; import { toSnakeCase } from "../../utils.js"; +import { wrapSdkCall } from "./utils.js"; export const create = async ({ - autumn, - identifierOpts, - args, + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: CreateEntityArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: CreateEntityArgsType; }) => { - return await wrapSdkCall(() => - autumn.entities.create( - identifierOpts.customerId, - toSnakeCase({ obj: args }) as unknown as CreateEntityParams - ) - ); + return await wrapSdkCall(() => + autumn.entities.create( + identifierOpts.customerId, + toSnakeCase({ obj: args }) as any, + ), + ); }; export const discard = async ({ - autumn, - identifierOpts, - entityId, + autumn, + identifierOpts, + entityId, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - entityId: string; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + entityId: string; }) => { - return await wrapSdkCall(() => - autumn.entities.delete(identifierOpts.customerId, entityId) - ); + return await wrapSdkCall(() => + autumn.entities.delete(entityId, { + customer_id: identifierOpts.customerId, + }), + ); }; export const get = async ({ - autumn, - identifierOpts, - args, + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: GetEntityArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: GetEntityArgsType & { entityId: string }; }) => { - return await wrapSdkCall(() => - autumn.entities.get(identifierOpts.customerId, args.entityId, { - expand: args.expand, - }) - ); + return await wrapSdkCall(() => + autumn.entities.get(args.entityId, { + customer_id: identifierOpts.customerId, + expand: args.expand, + } as any), + ); }; diff --git a/convex/src/client/helpers/index.ts b/convex/src/client/helpers/index.ts index 6690b88c..a12cce57 100644 --- a/convex/src/client/helpers/index.ts +++ b/convex/src/client/helpers/index.ts @@ -1,218 +1,211 @@ +import type { Autumn } from "@useautumn/sdk"; import type { - AttachParams, - Autumn, - CancelParams, - CheckoutParams, - QueryParams, - SetupPaymentParams, - UsageParams, -} from "autumn-js"; -import { wrapSdkCall } from "./utils.js"; -import type { - AttachArgsType, - CheckArgsType, - CheckoutArgsType, - QueryArgsType, - CancelArgsType, - SetupPaymentArgsType, - TrackArgsType, - IdentifierOptsType, - UsageArgsType, + AttachArgsType, + CancelArgsType, + CheckArgsType, + CheckoutArgsType, + IdentifierOptsType, + QueryArgsType, + SetupPaymentArgsType, + TrackArgsType, + UsageArgsType, } from "../../types.js"; import { toSnakeCase } from "../../utils.js"; +import { wrapSdkCall } from "./utils.js"; export const track = async ({ - autumn, - identifierOpts, - args, + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: TrackArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: TrackArgsType; }) => { - return await wrapSdkCall(() => - autumn.track( - toSnakeCase({ - obj: { - ...args, - customer_id: identifierOpts.customerId, - customer_data: identifierOpts.customerData, - }, - excludeChildrenOf: ["properties"], - }) - ) - ); + return await wrapSdkCall(() => + autumn.track( + toSnakeCase({ + obj: { + ...args, + customer_id: identifierOpts.customerId, + customer_data: identifierOpts.customerData, + }, + excludeChildrenOf: ["properties"], + }), + ), + ); }; -export const check = async ({ - autumn, - identifierOpts, - args, +export const usage = async ({ + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: CheckArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: UsageArgsType; }) => { - return await wrapSdkCall(() => - autumn.check( - toSnakeCase({ - obj: { - ...args, - customer_id: identifierOpts.customerId, - customer_data: identifierOpts.customerData, - }, - }) - ) - ); + return await wrapSdkCall(() => + autumn.usage( + toSnakeCase({ + obj: { + ...args, + customer_id: identifierOpts.customerId, + customer_data: identifierOpts.customerData, + }, + excludeChildrenOf: ["properties"], + }), + ), + ); }; -export const attach = async ({ - autumn, - identifierOpts, - args, +export const check = async ({ + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: AttachArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: CheckArgsType; }) => { - return await wrapSdkCall(() => - autumn.attach( - toSnakeCase({ - obj: { - ...args, - customer_id: identifierOpts.customerId, - customer_data: identifierOpts.customerData, - }, - excludeChildrenOf: ["checkoutSessionParams"], - }) as unknown as AttachParams - ) - ); + return await wrapSdkCall(() => + autumn.check( + toSnakeCase({ + obj: { + ...args, + customer_id: identifierOpts.customerId, + customer_data: identifierOpts.customerData, + }, + }), + ), + ); }; -export const checkout = async ({ - autumn, - identifierOpts, - args, +export const attach = async ({ + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: CheckoutArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: AttachArgsType; }) => { - return await wrapSdkCall(() => - autumn.checkout( - toSnakeCase({ - obj: { - ...args, - customer_id: identifierOpts.customerId, - customer_data: identifierOpts.customerData, - }, - excludeChildrenOf: ["checkoutSessionParams"], - }) as unknown as CheckoutParams - ) - ); + return await wrapSdkCall(() => + autumn.attach( + toSnakeCase({ + obj: { + ...args, + customer_id: identifierOpts.customerId, + customer_data: identifierOpts.customerData, + }, + excludeChildrenOf: ["checkoutSessionParams"], + }), + ), + ); }; -export const usage = async ({ - autumn, - identifierOpts, - args, +export const checkout = async ({ + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: UsageArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: CheckoutArgsType; }) => { - return await wrapSdkCall(() => - autumn.usage( - toSnakeCase({ - obj: { - ...args, - customer_id: identifierOpts.customerId, - customer_data: identifierOpts.customerData, - }, - }) as unknown as UsageParams - ) - ); + return await wrapSdkCall(() => + autumn.checkout( + toSnakeCase({ + obj: { + ...args, + customer_id: identifierOpts.customerId, + customer_data: identifierOpts.customerData, + }, + excludeChildrenOf: ["checkoutSessionParams"], + }), + ), + ); }; export const autumnQuery = async ({ - autumn, - identifierOpts, - args, + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: QueryArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: QueryArgsType; }) => { - return await wrapSdkCall(() => - autumn.query( - toSnakeCase({ - obj: { - ...args, - customer_id: identifierOpts.customerId, - customer_data: identifierOpts.customerData, - }, - }) as unknown as QueryParams - ) - ); + return await wrapSdkCall(() => + autumn.query( + toSnakeCase({ + obj: { + ...args, + customer_id: identifierOpts.customerId, + customer_data: identifierOpts.customerData, + }, + }) as unknown as Autumn.QueryParams, + ), + ); }; export const cancel = async ({ - autumn, - identifierOpts, - args, + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: CancelArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: CancelArgsType; }) => { - return await wrapSdkCall(() => - autumn.cancel( - toSnakeCase({ - obj: { - ...args, - customer_id: identifierOpts.customerId, - customer_data: identifierOpts.customerData, - }, - }) as unknown as CancelParams - ) - ); + return await wrapSdkCall(() => + autumn.cancel( + toSnakeCase({ + obj: { + ...args, + customer_id: identifierOpts.customerId, + customer_data: identifierOpts.customerData, + }, + }) as unknown as Autumn.CancelParams, + ), + ); }; export const setupPayment = async ({ - autumn, - identifierOpts, - args, + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: SetupPaymentArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: SetupPaymentArgsType; }) => { - return await wrapSdkCall(() => - autumn.setupPayment( - toSnakeCase({ - obj: { - ...args, - customer_id: identifierOpts.customerId, - customer_data: identifierOpts.customerData, - }, - excludeChildrenOf: ["checkoutSessionParams"], - }) as unknown as SetupPaymentParams - ) - ); + return await wrapSdkCall(() => + autumn.setupPayment( + toSnakeCase({ + obj: { + ...args, + customer_id: identifierOpts.customerId, + customer_data: identifierOpts.customerData, + }, + excludeChildrenOf: ["checkoutSessionParams"], + }), + ), + ); }; export const listProducts = async ({ - autumn, - identifierOpts, + autumn, + identifierOpts, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; }) => { - return await wrapSdkCall(() => - autumn.products.list({ - customer_id: identifierOpts.customerId, - }) - ); + return await wrapSdkCall(() => + autumn.products.list({ + customer_id: identifierOpts.customerId, + }), + ); }; export * as customers from "./customers.js"; diff --git a/convex/src/client/helpers/products.ts b/convex/src/client/helpers/products.ts index ea0b94ed..cc847bfa 100644 --- a/convex/src/client/helpers/products.ts +++ b/convex/src/client/helpers/products.ts @@ -1,27 +1,27 @@ -import type { Autumn } from "autumn-js"; -import { type IdentifierOptsType } from "../../types.js"; +import type { Autumn } from "@useautumn/sdk"; +import type { IdentifierOptsType } from "../../types.js"; import { wrapSdkCall } from "./utils.js"; export const get = async ({ - autumn, - productId, + autumn, + productId, }: { - autumn: Autumn; - productId: string; + autumn: Autumn; + productId: string; }) => { - return await wrapSdkCall(() => autumn.products.get(productId)); + return await wrapSdkCall(() => autumn.products.get(productId)); }; export const list = async ({ - autumn, - identifierOpts, + autumn, + identifierOpts, }: { - autumn: Autumn; - identifierOpts?: IdentifierOptsType; + autumn: Autumn; + identifierOpts?: IdentifierOptsType; }) => { - return await wrapSdkCall(() => - autumn.products.list({ - customer_id: identifierOpts?.customerId ?? undefined, - }) - ); + return await wrapSdkCall(() => + autumn.products.list({ + customer_id: identifierOpts?.customerId ?? undefined, + }), + ); }; diff --git a/convex/src/client/helpers/referrals.ts b/convex/src/client/helpers/referrals.ts index 058cc5fc..b1b44692 100644 --- a/convex/src/client/helpers/referrals.ts +++ b/convex/src/client/helpers/referrals.ts @@ -1,41 +1,41 @@ -import type { Autumn } from "autumn-js"; +import type { Autumn } from "@useautumn/sdk"; import type { - IdentifierOptsType, - CreateReferralCodeArgsType, - RedeemReferralCodeArgsType, + CreateReferralCodeArgsType, + IdentifierOptsType, + RedeemReferralCodeArgsType, } from "../../types.js"; import { wrapSdkCall } from "./utils.js"; export const createCode = async ({ - autumn, - identifierOpts, - args, + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: CreateReferralCodeArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: CreateReferralCodeArgsType; }) => { - return await wrapSdkCall(() => - autumn.referrals.createCode({ - customer_id: identifierOpts.customerId, - program_id: args.programId, - }) - ); + return await wrapSdkCall(() => + autumn.referrals.createCode({ + customer_id: identifierOpts.customerId, + program_id: args.programId, + }), + ); }; export const redeemCode = async ({ - autumn, - identifierOpts, - args, + autumn, + identifierOpts, + args, }: { - autumn: Autumn; - identifierOpts: IdentifierOptsType; - args: RedeemReferralCodeArgsType; + autumn: Autumn; + identifierOpts: IdentifierOptsType; + args: RedeemReferralCodeArgsType; }) => { - return await wrapSdkCall(() => - autumn.referrals.redeemCode({ - customer_id: identifierOpts.customerId, - code: args.code, - }) - ); + return await wrapSdkCall(() => + autumn.referrals.redeemCode({ + customer_id: identifierOpts.customerId, + code: args.code, + }), + ); }; diff --git a/convex/src/client/helpers/utils.ts b/convex/src/client/helpers/utils.ts index 1a619de2..6a2b5cd0 100644 --- a/convex/src/client/helpers/utils.ts +++ b/convex/src/client/helpers/utils.ts @@ -1,36 +1,36 @@ export type PlainError = { message: string; code: string }; export const toPlainError = (error: unknown): PlainError => { - if (error && typeof error === "object") { - const errorObj = error as Record; - const message = - typeof errorObj.message === "string" - ? errorObj.message - : JSON.stringify(errorObj.message ?? "Unknown error"); - const code = - typeof errorObj.code === "string" - ? errorObj.code - : "unknown_error"; - return { message, code }; - } - return { message: String(error ?? "Unknown error"), code: "unknown_error" }; + if (error && typeof error === "object") { + const errorObj = error as Record; + const message = + typeof errorObj.message === "string" + ? errorObj.message + : JSON.stringify(errorObj.message ?? "Unknown error"); + const code = + typeof errorObj.code === "string" ? errorObj.code : "unknown_error"; + return { message, code }; + } + return { message: String(error ?? "Unknown error"), code: "unknown_error" }; }; -export async function wrapSdkCall(fn: () => Promise): Promise< - T extends { error?: any } - ? Omit & { error: PlainError | null } - : T | { data: null; error: PlainError } +export async function wrapSdkCall( + fn: () => Promise, +): Promise< + T extends { error?: any } + ? Omit & { error: PlainError | null } + : T | { data: null; error: PlainError } > { - try { - const res = await fn(); - if (res && typeof res === "object" && "error" in res) { - return { - ...(res as Omit), - error: (res as any).error ? toPlainError((res as any).error) : null, - } as any; - } - return res as any; - } catch (error) { - return { data: null, error: toPlainError(error) } as any; - } + try { + const res = await fn(); + if (res && typeof res === "object" && "error" in res) { + return { + ...(res as Omit), + error: (res as any).error ? toPlainError((res as any).error) : null, + } as any; + } + return res as any; + } catch (error) { + return { data: null, error: toPlainError(error) } as any; + } } diff --git a/convex/src/client/index.test.ts b/convex/src/client/index.test.ts index e1d705f7..900b6a8b 100644 --- a/convex/src/client/index.test.ts +++ b/convex/src/client/index.test.ts @@ -1,20 +1,20 @@ -import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; -import { Autumn } from "./index.js"; -import type { DataModelFromSchemaDefinition } from "convex/server"; -import { - anyApi, - queryGeneric, - mutationGeneric, - actionGeneric, -} from "convex/server"; import type { - ApiFromModules, - ActionBuilder, - MutationBuilder, - QueryBuilder, + ActionBuilder, + ApiFromModules, + DataModelFromSchemaDefinition, + MutationBuilder, + QueryBuilder, +} from "convex/server"; +import { + actionGeneric, + anyApi, + defineSchema, + mutationGeneric, + queryGeneric, } from "convex/server"; import { v } from "convex/values"; -import { defineSchema } from "convex/server"; +import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; +import { Autumn } from "./index.js"; import { components, initConvexTest } from "./setup.test.js"; // The schema for the tests @@ -26,76 +26,76 @@ const mutation = mutationGeneric as MutationBuilder; const action = actionGeneric as ActionBuilder; const autumn = new Autumn(components.autumn, { - identify: async (ctx) => ({ - customerId: "test-customer", - customerData: { - name: "Test User", - email: "test@example.com", - }, - }), - apiKey: "test-api-key", + identify: async (ctx) => ({ + customerId: "test-customer", + customerData: { + name: "Test User", + email: "test@example.com", + }, + }), + apiKey: "test-api-key", }); export const testQuery = query({ - args: { name: v.string() }, - handler: async (ctx, args) => { - return await autumn.count(ctx, args.name); - }, + args: { name: v.string() }, + handler: async (ctx, args) => { + return await autumn.count(ctx, args.name); + }, }); export const testMutation = mutation({ - args: { name: v.string(), count: v.number() }, - handler: async (ctx, args) => { - return await autumn.add(ctx, args.name, args.count); - }, + args: { name: v.string(), count: v.number() }, + handler: async (ctx, args) => { + return await autumn.add(ctx, args.name, args.count); + }, }); export const testAction = action({ - args: { name: v.string(), count: v.number() }, - handler: async (ctx, args) => { - return await autumn.add(ctx, args.name, args.count); - }, + args: { name: v.string(), count: v.number() }, + handler: async (ctx, args) => { + return await autumn.add(ctx, args.name, args.count); + }, }); const testApi: ApiFromModules<{ - fns: { - testQuery: typeof testQuery; - testMutation: typeof testMutation; - testAction: typeof testAction; - }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any + fns: { + testQuery: typeof testQuery; + testMutation: typeof testMutation; + testAction: typeof testAction; + }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any }>["fns"] = anyApi["index.test"] as any; describe("Autumn thick client", () => { - beforeEach(async () => { - vi.useFakeTimers(); - }); - afterEach(() => { - vi.useRealTimers(); - }); - test("should make thick client", async () => { - const c = new Autumn(components.autumn, { - identify: async (ctx) => ({ - customerId: "test-customer", - customerData: { - name: "Test User", - email: "test@example.com", - }, - }), - apiKey: "test-api-key", - }); - const t = initConvexTest(schema); - await t.run(async (ctx) => { - await c.add(ctx, "beans", 1); - expect(await c.count(ctx, "beans")).toBe(1); - }); - }); - test("should work from a test function", async () => { - const t = initConvexTest(schema); - const result = await t.mutation(testApi.testMutation, { - name: "beans", - count: 1, - }); - expect(result).toBe(null); - }); + beforeEach(async () => { + vi.useFakeTimers(); + }); + afterEach(() => { + vi.useRealTimers(); + }); + test("should make thick client", async () => { + const c = new Autumn(components.autumn, { + identify: async (ctx) => ({ + customerId: "test-customer", + customerData: { + name: "Test User", + email: "test@example.com", + }, + }), + apiKey: "test-api-key", + }); + const t = initConvexTest(schema); + await t.run(async (ctx) => { + await c.add(ctx, "beans", 1); + expect(await c.count(ctx, "beans")).toBe(1); + }); + }); + test("should work from a test function", async () => { + const t = initConvexTest(schema); + const result = await t.mutation(testApi.testMutation, { + name: "beans", + count: 1, + }); + expect(result).toBe(null); + }); }); diff --git a/convex/src/client/index.ts b/convex/src/client/index.ts index fe6eaa94..b4bc8520 100644 --- a/convex/src/client/index.ts +++ b/convex/src/client/index.ts @@ -1,39 +1,37 @@ +/** biome-ignore-all lint/suspicious/noExplicitAny: necessary */ +import { Autumn as AutumnSDK } from "@useautumn/sdk"; import { actionGeneric } from "convex/server"; import { v } from "convex/values"; import type { Mounts } from "../component/_generated/api.js"; -import type { UseApi } from "./types.js"; import { - type TrackArgsType, - type CheckoutArgsType, - TrackArgs, - CheckArgs, - AttachArgs, - CheckoutArgs, - type CheckArgsType, - type AttachArgsType, - QueryArgs, - CancelArgs, - SetupPaymentArgs, - UsageArgs, - BillingPortalArgs, - CreateReferralCodeArgs, - RedeemReferralCodeArgs, - CreateEntityArgs, - GetEntityArgs, - type GetCustomerArgsType, - type UpdateCustomerArgsType, - type CreateCustomerArgsType, - ExpandArgs, - type BillingPortalArgsType, - type GetEntityArgsType, - type CreateEntityArgsType, - type CreateReferralCodeArgsType, - type RedeemReferralCodeArgsType, + AttachArgs, + type AttachArgsType, + BillingPortalArgs, + type BillingPortalArgsType, + CancelArgs, + CheckArgs, + type CheckArgsType, + CheckoutArgs, + type CheckoutArgsType, + type CreateCustomerArgsType, + CreateEntityArgs, + type CreateEntityArgsType, + CreateReferralCodeArgs, + type CreateReferralCodeArgsType, + ExpandArgs, + type GetCustomerArgsType, + type GetEntityArgsType, + QueryArgs, + RedeemReferralCodeArgs, + type RedeemReferralCodeArgsType, + SetupPaymentArgs, + TrackArgs, + type TrackArgsType, + type UpdateCustomerArgsType, + UsageArgs, } from "../types.js"; - -import { Autumn as AutumnSDK } from "autumn-js"; - import * as autumnHelpers from "./helpers/index.js"; +import type { UseApi } from "./types.js"; // UseApi is an alternative that has jump-to-definition but is // less stable and reliant on types within the component files, which can cause @@ -41,422 +39,428 @@ import * as autumnHelpers from "./helpers/index.js"; export type AutumnComponent = UseApi; export class Autumn { - constructor( - public component: AutumnComponent, - public options: { - identify: any; - secretKey: string; - url?: string; - } - ) {} - - async getAuthParams({ - ctx, - requireAuth = true, - }: { - ctx: any; - requireAuth?: boolean; - }) { - const identifierOpts = await this.getIdentifierOpts(ctx); - const autumn = new AutumnSDK({ - secretKey: this.options.secretKey || process.env.AUTUMN_SECRET_KEY, - }); - - if (requireAuth) { - if (!identifierOpts) { - throw new Error("No customer identifier found for Autumn.identify()"); - } - } - - return { - autumn, - identifierOpts, - }; - } - - async track(ctx: any, args: TrackArgsType) { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.track({ - autumn, - identifierOpts, - args, - }); - } - - async check(ctx: any, args: CheckArgsType) { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.check({ - autumn, - identifierOpts, - args, - }); - } - - async attach(ctx: any, args: AttachArgsType) { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.attach({ - autumn, - identifierOpts, - args, - }); - } - - async checkout(ctx: any, args: CheckoutArgsType) { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.checkout({ - autumn, - identifierOpts, - args, - }); - } - - customers = { - get: async (ctx: any, args?: GetCustomerArgsType) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.customers.get({ - autumn, - identifierOpts, - args, - }); - }, - - update: async (ctx: any, args: UpdateCustomerArgsType) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.customers.update({ - autumn, - identifierOpts, - args, - }); - }, - delete: async (ctx: any) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.customers.discard({ - autumn, - identifierOpts, - }); - }, - create: async (ctx: any, args: CreateCustomerArgsType) => { - const { autumn } = await this.getAuthParams({ - ctx, - }); - return await autumnHelpers.customers.create({ - autumn, - args, - useArgs: false, - }); - }, - - billingPortal: async (ctx: any, args: BillingPortalArgsType) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.customers.billingPortal({ - autumn, - identifierOpts, - args, - }); - }, - }; - - entities = { - get: async ( - ctx: any, - entityId: string, - args?: Omit - ) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.entities.get({ - autumn, - identifierOpts, - args: { entityId, ...(args || {}) }, - }); - }, - - create: async (ctx: any, args: CreateEntityArgsType) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.entities.create({ - autumn, - identifierOpts, - args, - }); - }, - - delete: async (ctx: any, entityId: string) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.entities.discard({ - autumn, - identifierOpts, - entityId, - }); - }, - }; - - products = { - get: async (ctx: any, productId: string) => { - const { autumn } = await this.getAuthParams({ ctx, requireAuth: false }); - return await autumnHelpers.products.get({ - autumn, - productId, - }); - }, - list: async (ctx: any) => { - const { autumn, identifierOpts } = await this.getAuthParams({ - ctx, - requireAuth: false, - }); - - return await autumnHelpers.products.list({ - autumn, - identifierOpts, - }); - }, - }; - - referrals = { - createCode: async (ctx: any, args: CreateReferralCodeArgsType) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.referrals.createCode({ - autumn, - identifierOpts, - args, - }); - }, - redeemCode: async (ctx: any, args: RedeemReferralCodeArgsType) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.referrals.redeemCode({ - autumn, - identifierOpts, - args, - }); - }, - }; - - /** - * Utility to re-export actions with automatic customer identification. - * Example usage: - * autumn.api().track({ featureId: "message" }) - */ - api() { - return { - // Core tracking and checking methods - track: actionGeneric({ - args: TrackArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - - return await autumnHelpers.track({ - autumn, - identifierOpts, - args, - }); - }, - }), - - check: actionGeneric({ - args: CheckArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - - return await autumnHelpers.check({ - autumn, - identifierOpts, - args, - }); - }, - }), - - // Product attachment and checkout - attach: actionGeneric({ - args: AttachArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - - return await autumnHelpers.attach({ - autumn, - identifierOpts, - args, - }); - }, - }), - - checkout: actionGeneric({ - args: CheckoutArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - - return await autumnHelpers.checkout({ - autumn, - identifierOpts, - args, - }); - }, - }), - - createCustomer: actionGeneric({ - args: v.object({ - expand: ExpandArgs, - errorOnNotFound: v.optional(v.boolean()), - }), - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ - ctx, - requireAuth: args.errorOnNotFound === false ? false : true, - }); - - if (args.errorOnNotFound === false && !identifierOpts) { - return { - data: null, - error: null, - statusCode: 202, - }; - } - - return await autumnHelpers.customers.create({ - autumn, - identifierOpts, - args, - }); - }, - }), - - listProducts: actionGeneric({ - args: {}, - handler: async (ctx) => { - const { autumn, identifierOpts } = await this.getAuthParams({ - ctx, - requireAuth: false, - }); - - const result = await autumnHelpers.products.list({ - autumn, - identifierOpts, - }); - - return result; - }, - }), - - // Additional general methods - usage: actionGeneric({ - args: UsageArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - - return await autumnHelpers.usage({ - autumn, - identifierOpts, - args, - }); - }, - }), - - query: actionGeneric({ - args: QueryArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - - return await autumnHelpers.autumnQuery({ - autumn, - identifierOpts, - args, - }); - }, - }), - - cancel: actionGeneric({ - args: CancelArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - - return await autumnHelpers.cancel({ - autumn, - identifierOpts, - args, - }); - }, - }), - - setupPayment: actionGeneric({ - args: SetupPaymentArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - - return await autumnHelpers.setupPayment({ - autumn, - identifierOpts, - args, - }); - }, - }), - - billingPortal: actionGeneric({ - args: BillingPortalArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - - return await autumnHelpers.customers.billingPortal({ - autumn, - identifierOpts, - args, - }); - }, - }), - - createReferralCode: actionGeneric({ - args: CreateReferralCodeArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ - ctx, - }); - return await autumnHelpers.referrals.createCode({ - autumn, - identifierOpts, - args, - }); - }, - }), - - redeemReferralCode: actionGeneric({ - args: RedeemReferralCodeArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ - ctx, - }); - return await autumnHelpers.referrals.redeemCode({ - autumn, - identifierOpts, - args, - }); - }, - }), - - createEntity: actionGeneric({ - args: CreateEntityArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.entities.create({ - autumn, - identifierOpts, - args, - }); - }, - }), - - getEntity: actionGeneric({ - args: GetEntityArgs, - handler: async (ctx, args) => { - const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); - return await autumnHelpers.entities.get({ - autumn, - identifierOpts, - args, - }); - }, - }), - }; - } - - async getIdentifierOpts(ctx: any) { - const identifierOpts = await this.options.identify(ctx); - - return identifierOpts; - } + constructor( + public component: AutumnComponent, + public options: { + identify: any; + secretKey: string; + url?: string; + }, + ) {} + + async getAuthParams({ + ctx, + requireAuth = true, + }: { + ctx: any; + requireAuth?: boolean; + }) { + const identifierOpts = await this.getIdentifierOpts(ctx); + const autumn = new AutumnSDK({ + secretKey: this.options.secretKey || process.env.AUTUMN_SECRET_KEY, + }); + + if (requireAuth) { + if (!identifierOpts) { + throw new Error("No customer identifier found for Autumn.identify()"); + } + } + + return { + autumn, + identifierOpts, + }; + } + + async track(ctx: any, args: TrackArgsType) { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.track({ + autumn, + identifierOpts, + args, + }); + } + + async check(ctx: any, args: CheckArgsType) { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.check({ + autumn, + identifierOpts, + args, + }); + } + + async attach(ctx: any, args: AttachArgsType) { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.attach({ + autumn, + identifierOpts, + args, + }); + } + + async checkout(ctx: any, args: CheckoutArgsType) { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.checkout({ + autumn, + identifierOpts, + args, + }); + } + + customers = { + get: async (ctx: any, args?: GetCustomerArgsType) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.customers.get({ + autumn, + identifierOpts, + args, + }); + }, + + update: async (ctx: any, args: UpdateCustomerArgsType) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.customers.update({ + autumn, + identifierOpts, + args, + }); + }, + delete: async (ctx: any) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.customers.discard({ + autumn, + identifierOpts, + }); + }, + create: async (ctx: any, args: CreateCustomerArgsType) => { + const { autumn } = await this.getAuthParams({ + ctx, + }); + return await autumnHelpers.customers.create({ + autumn, + args, + useArgs: false, + }); + }, + + billingPortal: async (ctx: any, args: BillingPortalArgsType) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.customers.billingPortal({ + autumn, + identifierOpts, + args, + }); + }, + }; + + entities = { + get: async ( + ctx: any, + entityId: string, + args?: Omit, + ) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.entities.get({ + autumn, + identifierOpts, + args: { entityId, ...(args || {}) }, + }); + }, + + create: async (ctx: any, args: CreateEntityArgsType) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.entities.create({ + autumn, + identifierOpts, + args, + }); + }, + + delete: async (ctx: any, entityId: string) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.entities.discard({ + autumn, + identifierOpts, + entityId, + }); + }, + }; + + products = { + get: async (ctx: any, productId: string) => { + const { autumn } = await this.getAuthParams({ ctx, requireAuth: false }); + return await autumnHelpers.products.get({ + autumn, + productId, + }); + }, + list: async (ctx: any) => { + const { autumn, identifierOpts } = await this.getAuthParams({ + ctx, + requireAuth: false, + }); + + return await autumnHelpers.products.list({ + autumn, + identifierOpts, + }); + }, + }; + + referrals = { + createCode: async (ctx: any, args: CreateReferralCodeArgsType) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.referrals.createCode({ + autumn, + identifierOpts, + args, + }); + }, + redeemCode: async (ctx: any, args: RedeemReferralCodeArgsType) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.referrals.redeemCode({ + autumn, + identifierOpts, + args, + }); + }, + }; + + /** + * Utility to re-export actions with automatic customer identification. + * Example usage: + * autumn.api().track({ featureId: "message" }) + */ + api() { + return { + // Core tracking and checking methods + track: actionGeneric({ + args: TrackArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + + return await autumnHelpers.track({ + autumn, + identifierOpts, + args, + }); + }, + }), + + check: actionGeneric({ + args: CheckArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + + return await autumnHelpers.check({ + autumn, + identifierOpts, + args, + }); + }, + }), + + // Product attachment and checkout + attach: actionGeneric({ + args: AttachArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + + return await autumnHelpers.attach({ + autumn, + identifierOpts, + args, + }); + }, + }), + + checkout: actionGeneric({ + args: CheckoutArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + + return await autumnHelpers.checkout({ + autumn, + identifierOpts, + args, + }); + }, + }), + + createCustomer: actionGeneric({ + args: v.object({ + expand: ExpandArgs, + errorOnNotFound: v.optional(v.boolean()), + }), + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ + ctx, + requireAuth: args.errorOnNotFound === false ? false : true, + }); + + if (args.errorOnNotFound === false && !identifierOpts) { + return { + data: null, + error: null, + statusCode: 202, + }; + } + + return await autumnHelpers.customers.create({ + autumn, + identifierOpts, + args: { + ...args, + id: identifierOpts?.customerId || null, + } as CreateCustomerArgsType, + }); + }, + }), + + listProducts: actionGeneric({ + args: {}, + handler: async (ctx) => { + const { autumn, identifierOpts } = await this.getAuthParams({ + ctx, + requireAuth: false, + }); + + const result = await autumnHelpers.products.list({ + autumn, + identifierOpts, + }); + + return result; + }, + }), + + // Additional general methods + usage: actionGeneric({ + args: UsageArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + + return await autumnHelpers.usage({ + autumn, + identifierOpts, + args, + }); + }, + }), + + query: actionGeneric({ + args: QueryArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + + return await autumnHelpers.autumnQuery({ + autumn, + identifierOpts, + args, + }); + }, + }), + + cancel: actionGeneric({ + args: CancelArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + + return await autumnHelpers.cancel({ + autumn, + identifierOpts, + args, + }); + }, + }), + + setupPayment: actionGeneric({ + args: SetupPaymentArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + + return await autumnHelpers.setupPayment({ + autumn, + identifierOpts, + args, + }); + }, + }), + + billingPortal: actionGeneric({ + args: BillingPortalArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + + return await autumnHelpers.customers.billingPortal({ + autumn, + identifierOpts, + args, + }); + }, + }), + + createReferralCode: actionGeneric({ + args: CreateReferralCodeArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ + ctx, + }); + return await autumnHelpers.referrals.createCode({ + autumn, + identifierOpts, + args, + }); + }, + }), + + redeemReferralCode: actionGeneric({ + args: RedeemReferralCodeArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ + ctx, + }); + return await autumnHelpers.referrals.redeemCode({ + autumn, + identifierOpts, + args, + }); + }, + }), + + createEntity: actionGeneric({ + args: CreateEntityArgs, + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.entities.create({ + autumn, + identifierOpts, + args, + }); + }, + }), + + getEntity: actionGeneric({ + args: v.object({ + entityId: v.string(), + expand: v.optional(v.array(v.any())), + }), + handler: async (ctx, args) => { + const { autumn, identifierOpts } = await this.getAuthParams({ ctx }); + return await autumnHelpers.entities.get({ + autumn, + identifierOpts, + args, + }); + }, + }), + }; + } + + async getIdentifierOpts(ctx: any) { + const identifierOpts = await this.options.identify(ctx); + + return identifierOpts; + } } diff --git a/convex/src/client/setup.test.ts b/convex/src/client/setup.test.ts index 1a2b65c8..9f00a54b 100644 --- a/convex/src/client/setup.test.ts +++ b/convex/src/client/setup.test.ts @@ -1,28 +1,29 @@ /// -import { test } from "vitest"; + import { convexTest } from "convex-test"; +import { test } from "vitest"; export const modules = import.meta.glob("./**/*.*s"); import { - defineSchema, - type GenericSchema, - type SchemaDefinition, + componentsGeneric, + defineSchema, + type GenericSchema, + type SchemaDefinition, } from "convex/server"; -import { type AutumnComponent } from "./index.js"; -import { componentsGeneric } from "convex/server"; import componentSchema from "../component/schema.js"; +import type { AutumnComponent } from "./index.js"; export { componentSchema }; export const componentModules = import.meta.glob("../component/**/*.ts"); export function initConvexTest< - Schema extends SchemaDefinition, + Schema extends SchemaDefinition, >(schema?: Schema) { - const t = convexTest(schema ?? defineSchema({}), modules); - t.registerComponent("autumn", componentSchema, componentModules); - return t; + const t = convexTest(schema ?? defineSchema({}), modules); + t.registerComponent("autumn", componentSchema, componentModules); + return t; } export const components = componentsGeneric() as unknown as { - autumn: AutumnComponent; + autumn: AutumnComponent; }; test("setup", () => {}); diff --git a/convex/src/client/types.ts b/convex/src/client/types.ts index d8c7c7d4..27cb58c5 100644 --- a/convex/src/client/types.ts +++ b/convex/src/client/types.ts @@ -1,67 +1,66 @@ import type { - Expand, - FunctionArgs, - FunctionReference, - FunctionReturnType, - StorageActionWriter, - StorageReader, + Expand, + FunctionArgs, + FunctionReference, + FunctionReturnType, + StorageActionWriter, + StorageReader, } from "convex/server"; import type { GenericId } from "convex/values"; // Type utils follow export type RunQueryCtx = { - runQuery: >( - query: Query, - args: FunctionArgs - ) => Promise>; + runQuery: >( + query: Query, + args: FunctionArgs, + ) => Promise>; }; export type RunMutationCtx = RunQueryCtx & { - runMutation: >( - mutation: Mutation, - args: FunctionArgs - ) => Promise>; + runMutation: >( + mutation: Mutation, + args: FunctionArgs, + ) => Promise>; }; export type RunActionCtx = RunMutationCtx & { - runAction>( - action: Action, - args: FunctionArgs - ): Promise>; + runAction>( + action: Action, + args: FunctionArgs, + ): Promise>; }; export type ActionCtx = RunActionCtx & { - storage: StorageActionWriter; + storage: StorageActionWriter; }; export type QueryCtx = RunQueryCtx & { - storage: StorageReader; + storage: StorageReader; }; -export type OpaqueIds = - T extends GenericId - ? string - : T extends (infer U)[] - ? OpaqueIds[] - : T extends ArrayBuffer - ? ArrayBuffer - : T extends object - ? { - [K in keyof T]: OpaqueIds; - } - : T; +export type OpaqueIds = T extends GenericId + ? string + : T extends (infer U)[] + ? OpaqueIds[] + : T extends ArrayBuffer + ? ArrayBuffer + : T extends object + ? { + [K in keyof T]: OpaqueIds; + } + : T; export type UseApi = Expand<{ - [mod in keyof API]: API[mod] extends FunctionReference< - infer FType, - "public", - infer FArgs, - infer FReturnType, - infer FComponentPath - > - ? FunctionReference< - FType, - "internal", - OpaqueIds, - OpaqueIds, - FComponentPath - > - : UseApi; + [mod in keyof API]: API[mod] extends FunctionReference< + infer FType, + "public", + infer FArgs, + infer FReturnType, + infer FComponentPath + > + ? FunctionReference< + FType, + "internal", + OpaqueIds, + OpaqueIds, + FComponentPath + > + : UseApi; }>; diff --git a/convex/src/types.ts b/convex/src/types.ts index be384076..e2509e9d 100644 --- a/convex/src/types.ts +++ b/convex/src/types.ts @@ -1,5 +1,16 @@ +/** + * 🤖 AUTO-GENERATED - DO NOT EDIT + * + * Generated by: typegen/generate-convex-types.ts + * Source: @ts-sdk OpenAPI-generated interfaces + * + * To regenerate: pnpm gen:convex-types + */ + import { v, type Infer } from "convex/values"; +// Manual type definitions (not in SDK) + export const IdentifierOpts = v.object({ customerId: v.string(), customerData: v.optional( @@ -12,232 +23,215 @@ export const IdentifierOpts = v.object({ export type IdentifierOptsType = Infer; -export const CustomerDataConvex = v.object({ - name: v.optional(v.string()), - email: v.optional(v.string()), - fingerprint: v.optional(v.string()), -}); - export const AttachFeatureOptionsConvex = v.object({ featureId: v.string(), quantity: v.number(), }); +export const EntityDataConvex = v.object({ + name: v.optional(v.string()), + featureId: v.string(), + id: v.optional(v.string()), +}); + +export const ExpandArgs = v.optional( + v.array( + v.union( + v.literal("payment_method"), + v.literal("invoices"), + v.literal("rewards"), + v.literal("trials_used"), + v.literal("entities"), + v.literal("referrals") + ) + ) +); + + +export const CustomerDataConvex = v.object({ + email: v.optional(v.union(v.string(), v.null())), + fingerprint: v.optional(v.union(v.string(), v.null())), + metadata: v.optional(v.union(v.record(v.string(), v.any()), v.null())), + name: v.optional(v.union(v.string(), v.null())), + stripeId: v.optional(v.union(v.string(), v.null())) +}); + +export type CustomerDataConvexType = Infer; + export const TrackArgs = v.object({ - featureId: v.optional(v.string()), // Made optional to match SDK - value: v.optional(v.number()), - entityId: v.optional(v.string()), + customerData: v.optional(v.union(CustomerDataConvex, v.null())), + entityData: v.optional(v.union(EntityDataConvex, v.null())), + entityId: v.optional(v.union(v.string(), v.null())), eventName: v.optional(v.string()), - idempotencyKey: v.optional(v.string()), - customerData: v.optional(CustomerDataConvex), // User-facing camelCase - entityData: v.optional(v.any()), // Added to match SDK - properties: v.optional(v.record(v.string(), v.any())), + featureId: v.optional(v.string()), + idempotencyKey: v.optional(v.union(v.string(), v.null())), + properties: v.optional(v.union(v.record(v.string(), v.any()), v.null())), + setUsage: v.optional(v.union(v.boolean(), v.null())), + timestamp: v.optional(v.union(v.number(), v.null())), + value: v.optional(v.union(v.number(), v.null())) }); export type TrackArgsType = Infer; +export const UsageArgs = v.object({ + customerData: v.optional(v.union(v.any(), v.null())), + entityData: v.optional(v.union(v.any(), v.null())), + entityId: v.optional(v.union(v.string(), v.null())), + eventName: v.optional(v.string()), + featureId: v.optional(v.string()), + idempotencyKey: v.optional(v.union(v.string(), v.null())), + properties: v.optional(v.union(v.record(v.string(), v.any()), v.null())), + setUsage: v.optional(v.union(v.boolean(), v.null())), + timestamp: v.optional(v.union(v.number(), v.null())), + value: v.optional(v.union(v.number(), v.null())) +}); + +export type UsageArgsType = Infer; + export const CheckArgs = v.object({ - productId: v.optional(v.string()), + customerData: v.optional(v.any()), + entityData: v.optional(v.any()), + entityId: v.optional(v.string()), featureId: v.optional(v.string()), + productId: v.optional(v.string()), requiredBalance: v.optional(v.number()), sendEvent: v.optional(v.boolean()), - withPreview: v.optional(v.boolean()), - entityId: v.optional(v.string()), - customerData: v.optional(CustomerDataConvex), // User-facing camelCase - entityData: v.optional(v.any()), // Added to match SDK + withPreview: v.optional(v.boolean()) }); export type CheckArgsType = Infer; export const AttachArgs = v.object({ - productId: v.optional(v.string()), // Made optional to match SDK - productIds: v.optional(v.array(v.string())), - entityId: v.optional(v.string()), - options: v.optional(v.array(AttachFeatureOptionsConvex)), // Changed to use proper schema - freeTrial: v.optional(v.boolean()), // Added to match SDK - successUrl: v.optional(v.string()), - metadata: v.optional(v.object({})), + checkoutSessionParams: v.optional(v.any()), + customerData: v.optional(v.any()), + entityData: v.optional(v.any()), + entityId: v.optional(v.union(v.string(), v.null())), forceCheckout: v.optional(v.boolean()), - customerData: v.optional(CustomerDataConvex), // User-facing camelCase - entityData: v.optional(v.any()), // Added to match SDK - checkoutSessionParams: v.optional(v.object({})), - reward: v.optional(v.string()), - invoice: v.optional(v.boolean()), // Added to match SDK + freeTrial: v.optional(v.boolean()), + invoice: v.optional(v.boolean()), + options: v.optional(v.union(v.array(v.any()), v.null())), + productId: v.optional(v.union(v.string(), v.null())), + productIds: v.optional(v.union(v.array(v.string()), v.null())), + reward: v.optional(v.union(v.string(), v.any())), + setupPayment: v.optional(v.boolean()), + successUrl: v.optional(v.string()) }); export type AttachArgsType = Infer; export const CheckoutArgs = v.object({ - productId: v.string(), - entityId: v.optional(v.string()), - options: v.optional(v.array(AttachFeatureOptionsConvex)), // Changed to use proper schema - forceCheckout: v.optional(v.boolean()), // Added to match SDK - invoice: v.optional(v.boolean()), // Added to match SDK - successUrl: v.optional(v.string()), - customerData: v.optional(CustomerDataConvex), // User-facing camelCase - entityData: v.optional(v.any()), // Added to match SDK - checkoutSessionParams: v.optional(v.object({})), - reward: v.optional(v.string()), + checkoutSessionParams: v.optional(v.any()), + customerData: v.optional(v.any()), + entityData: v.optional(v.any()), + entityId: v.optional(v.union(v.string(), v.null())), + forceCheckout: v.optional(v.boolean()), + freeTrial: v.optional(v.boolean()), + invoice: v.optional(v.boolean()), + options: v.optional(v.union(v.array(v.any()), v.null())), + productId: v.optional(v.union(v.string(), v.null())), + productIds: v.optional(v.union(v.array(v.string()), v.null())), + reward: v.optional(v.union(v.string(), v.any())), + setupPayment: v.optional(v.boolean()), + successUrl: v.optional(v.string()) }); export type CheckoutArgsType = Infer; export const CancelArgs = v.object({ productId: v.string(), - entityId: v.optional(v.string()), cancelImmediately: v.optional(v.boolean()), - customerData: v.optional(CustomerDataConvex), + entityId: v.optional(v.union(v.string(), v.null())), + prorate: v.optional(v.union(v.boolean(), v.null())) }); export type CancelArgsType = Infer; -export const UsageArgs = v.object({ - featureId: v.string(), - value: v.number(), - customerData: v.optional(CustomerDataConvex), -}); - -export type UsageArgsType = Infer; - export const QueryArgs = v.object({ - featureId: v.union(v.string(), v.array(v.string())), - range: v.optional(v.union( - v.literal("24h"), - v.literal("7d"), - v.literal("30d"), - v.literal("90d"), - v.literal("last_cycle"), - )), - customerData: v.optional(CustomerDataConvex), + featureId: v.union(v.string(), v.any()), + range: v.optional(v.union(v.union(v.literal('24h'), v.literal('7d'), v.literal('30d'), v.literal('90d'), v.literal('last_cycle')), v.null())) }); export type QueryArgsType = Infer; export const SetupPaymentArgs = v.object({ - successUrl: v.optional(v.string()), - checkoutSessionParams: v.optional(v.object({})), - customerData: v.optional(CustomerDataConvex), + checkoutSessionParams: v.optional(v.record(v.string(), v.any())), + successUrl: v.optional(v.string()) }); export type SetupPaymentArgsType = Infer; -// Entity management - fallback to manual conversion -export const EntityDataConvex = v.object({ - name: v.optional(v.string()), - feature_id: v.string(), - id: v.optional(v.string()), -}); - -// User-facing entity creation args (camelCase for user-friendly API) - -// Alternative single entity creation args for convenience -export const UserCreateSingleEntityArgs = v.object({ - name: v.optional(v.string()), - featureId: v.string(), - id: v.optional(v.string()), -}); - -export const CreateEntityArgs = v.object({ - name: v.optional(v.string()), - featureId: v.string(), - id: v.optional(v.string()), -}); - -export type CreateEntityArgsType = Infer; - -export const DeleteEntityArgs = v.object({ - customer_id: v.string(), - entity_id: v.string(), - apiKey: v.string(), -}); - -export const UserGetEntityArgs = v.object({ - entity_id: v.string(), - expand: v.optional(v.array(v.literal("invoices"))), -}); - -export const GetEntityArgs = v.object({ - entityId: v.string(), - expand: v.optional(v.array(v.literal("invoices"))), -}); - -export type GetEntityArgsType = Infer; - -export const ExpandArgs = v.optional( - v.array( - v.union( - v.literal("payment_method"), - v.literal("invoices"), - v.literal("rewards"), - v.literal("trials_used"), - v.literal("entities"), - v.literal("referrals") - ) - ) -); - -// Customer management export const GetCustomerArgs = v.object({ - expand: ExpandArgs, + expand: v.optional(v.array(v.union(v.literal('invoices'), v.literal('trials_used'), v.literal('rewards'), v.literal('entities'), v.literal('referrals'), v.literal('payment_method'), v.literal('upcoming_invoice')))) }); + export type GetCustomerArgsType = Infer; export const CreateCustomerArgs = v.object({ - id: v.optional(v.string()), - email: v.optional(v.string()), - name: v.optional(v.string()), - expand: ExpandArgs, - errorOnNotFound: v.optional(v.boolean()), + id: v.union(v.string(), v.null()), + expand: v.optional(v.array(v.union(v.literal('invoices'), v.literal('trials_used'), v.literal('rewards'), v.literal('entities'), v.literal('referrals'), v.literal('payment_method'), v.literal('upcoming_invoice')))), + email: v.optional(v.union(v.string(), v.null())), + entityData: v.optional(v.any()), + entityId: v.optional(v.string()), + fingerprint: v.optional(v.string()), + metadata: v.optional(v.record(v.string(), v.any())), + name: v.optional(v.union(v.string(), v.null())), + stripeId: v.optional(v.string()) }); export type CreateCustomerArgsType = Infer; export const UpdateCustomerArgs = v.object({ - name: v.optional(v.string()), - email: v.optional(v.string()), - fingerprint: v.optional(v.string()), - metadata: v.optional(v.record(v.string(), v.any())), - stripeId: v.optional(v.string()), + expand: v.optional(v.string()), + id: v.optional(v.union(v.string(), v.null())), + email: v.optional(v.union(v.string(), v.null())), + fingerprint: v.optional(v.union(v.string(), v.null())), + metadata: v.optional(v.union(v.record(v.string(), v.any()), v.null())), + name: v.optional(v.union(v.string(), v.null())), + stripeId: v.optional(v.union(v.string(), v.null())) }); + export type UpdateCustomerArgsType = Infer; -export const DeleteCustomerArgs = v.object({ - customer_id: v.string(), - apiKey: v.string(), +export const UpdateBalancesArgs = v.object({ + balances: v.array(v.any()) }); +export type UpdateBalancesArgsType = Infer; + export const BillingPortalArgs = v.object({ - returnUrl: v.optional(v.string()), + returnUrl: v.optional(v.string()) }); export type BillingPortalArgsType = Infer; -export const ListProductsArgs = v.object({}); +export const CreateEntityArgs = v.object({ + id: v.string(), + featureId: v.string(), + name: v.optional(v.union(v.string(), v.null())) +}); + +export type CreateEntityArgsType = Infer; + +export const GetEntityArgs = v.object({ + expand: v.optional(v.array(v.any())) +}); + +export type GetEntityArgsType = Infer; -// Referral management export const CreateReferralCodeArgs = v.object({ - programId: v.string(), + programId: v.string() }); export type CreateReferralCodeArgsType = Infer; export const RedeemReferralCodeArgs = v.object({ - code: v.string(), + code: v.string() }); export type RedeemReferralCodeArgsType = Infer; +export const ListProductsArgs = v.object({ +}); -export type UserCreateSingleEntityArgsType = Infer< - typeof UserCreateSingleEntityArgs ->; - -export type DeleteEntityArgsType = Infer; -export type UserGetEntityArgsType = Infer; - -export type DeleteCustomerArgsType = Infer; - -export type ListProductsArgsType = Infer; - - +export type ListProductsArgsType = Infer; \ No newline at end of file diff --git a/typegen/convexTypeConfigs.ts b/typegen/convexTypeConfigs.ts new file mode 100644 index 00000000..05b9f5b1 --- /dev/null +++ b/typegen/convexTypeConfigs.ts @@ -0,0 +1,181 @@ +import path from "path"; + +/** + * Configuration for generating a single Convex validator + */ +export interface ConvexValidatorConfig { + /** Source interface name from SDK (e.g., "TrackParams") */ + sourceName: string; + /** Target validator name (e.g., "TrackArgs") */ + targetName: string; + /** Path to source file containing the interface */ + sourceFile: string; + /** Fields to exclude from validation (e.g., ["customer_id"]) */ + excludeFields: string[]; + /** Whether to convert snake_case to camelCase */ + camelCase: boolean; +} + +/** + * Get all Convex validator configurations + * + * This defines which SDK interfaces get converted to Convex validators + * and how they should be transformed (field exclusions, camelCase, etc.) + */ +export function getConvexValidatorConfigs( + tsSDKPath: string, + convexPath: string +): ConvexValidatorConfig[] { + const topLevelFile = path.join(tsSDKPath, "src/resources/top-level.ts"); + const sharedFile = path.join(tsSDKPath, "src/resources/shared.ts"); + const customersFile = path.join(tsSDKPath, "src/resources/customers.ts"); + const entitiesFile = path.join(tsSDKPath, "src/resources/entities.ts"); + const referralsFile = path.join(tsSDKPath, "src/resources/referrals.ts"); + + return [ + // Common/shared types (used by multiple validators) + { + sourceName: "CustomerData", + targetName: "CustomerDataConvex", + sourceFile: sharedFile, + excludeFields: [], + camelCase: true, + }, + + // Core operation validators + { + sourceName: "TrackParams", + targetName: "TrackArgs", + sourceFile: topLevelFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "UsageParams", + targetName: "UsageArgs", + sourceFile: topLevelFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "CheckParams", + targetName: "CheckArgs", + sourceFile: topLevelFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "AttachParams", + targetName: "AttachArgs", + sourceFile: topLevelFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "CheckoutParams", + targetName: "CheckoutArgs", + sourceFile: topLevelFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "CancelParams", + targetName: "CancelArgs", + sourceFile: topLevelFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "QueryParams", + targetName: "QueryArgs", + sourceFile: topLevelFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "SetupPaymentParams", + targetName: "SetupPaymentArgs", + sourceFile: topLevelFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + + // Customer management validators + { + sourceName: "CustomerGetParams", + targetName: "GetCustomerArgs", + sourceFile: customersFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "CustomerCreateParams", + targetName: "CreateCustomerArgs", + sourceFile: customersFile, + excludeFields: [], + camelCase: true, + }, + { + sourceName: "CustomerUpdateParams", + targetName: "UpdateCustomerArgs", + sourceFile: customersFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "CustomerUpdateBalancesParams", + targetName: "UpdateBalancesArgs", + sourceFile: customersFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "BillingPortalParams", + targetName: "BillingPortalArgs", + sourceFile: topLevelFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + + // Entity management validators + { + sourceName: "EntityCreateParams", + targetName: "CreateEntityArgs", + sourceFile: entitiesFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "EntityGetParams", + targetName: "GetEntityArgs", + sourceFile: entitiesFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + + // Referral management validators + { + sourceName: "ReferralCreateCodeParams", + targetName: "CreateReferralCodeArgs", + sourceFile: referralsFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + { + sourceName: "ReferralRedeemCodeParams", + targetName: "RedeemReferralCodeArgs", + sourceFile: referralsFile, + excludeFields: ["customer_id"], + camelCase: true, + }, + + // Misc validators + { + sourceName: "ProductListParams", + targetName: "ListProductsArgs", + sourceFile: path.join(tsSDKPath, "src/resources/products.ts"), + excludeFields: ["customer_id"], + camelCase: true, + }, + ]; +} diff --git a/typegen/genUtils/ConvexValidatorGenerator.ts b/typegen/genUtils/ConvexValidatorGenerator.ts new file mode 100644 index 00000000..fc7b074f --- /dev/null +++ b/typegen/genUtils/ConvexValidatorGenerator.ts @@ -0,0 +1,419 @@ +import { existsSync, mkdirSync, writeFileSync } from "node:fs"; +import path from "node:path"; +import * as ts from "typescript"; +import type { ConvexValidatorConfig } from "../convexTypeConfigs.js"; + +/** + * Generates Convex v.object() validators from TypeScript interfaces + * + * Similar to TypeGenerator but outputs Convex validators instead of Zod schemas. + * Converts TypeScript SDK types to Convex validation schemas with camelCase field names. + */ +export class ConvexValidatorGenerator { + private programCache = new Map< + string, + { program: ts.Program; sourceFile: ts.SourceFile } + >(); + + /** + * Generate all validators based on provided configurations + */ + async generateValidators( + configs: ConvexValidatorConfig[], + outputPath: string, + ): Promise { + const startTime = Date.now(); + console.log(`⚡ Processing ${configs.length} validators...`); + + const validatorCodes: string[] = []; + const results = await Promise.allSettled( + configs.map(async (config) => { + try { + const code = this.generateSingleValidator(config); + validatorCodes.push(code); + return { config, success: true as const }; + } catch (error) { + const errorMessage = + error instanceof Error ? error.message : String(error); + console.error(`❌ Failed ${config.targetName}: ${errorMessage}`); + return { config, success: false as const, error: errorMessage }; + } + }), + ); + + const processedResults = results.map((result, index) => { + if (result.status === "fulfilled") { + return result.value; + } + const config = configs[index]; + if (!config) { + throw new Error(`Config not found at index ${index}`); + } + return { + config, + success: false as const, + error: result.reason?.message || "Unknown error", + }; + }); + + // Write all validators to output file + this.writeOutputFile(outputPath, validatorCodes); + + const duration = Date.now() - startTime; + this.printSummary(processedResults, duration); + } + + /** + * Generate a single validator from TypeScript interface + */ + private generateSingleValidator(config: ConvexValidatorConfig): string { + const { sourceFile } = this.getOrCreateProgram(config.sourceFile); + const interfaceDecl = this.findInterface(sourceFile, config.sourceName); + + if (!interfaceDecl) { + throw new Error( + `Interface ${config.sourceName} not found in ${config.sourceFile}`, + ); + } + + const validatorCode = this.generateValidatorCode( + interfaceDecl, + sourceFile, + config.targetName, + config.excludeFields, + config.camelCase, + ); + + console.log(`✓ Generated ${config.targetName}`); + return validatorCode; + } + + /** + * Generate Convex validator code from interface + */ + private generateValidatorCode( + interfaceDecl: ts.InterfaceDeclaration, + sourceFile: ts.SourceFile, + targetName: string, + excludeFields: string[], + camelCase: boolean, + ): string { + const properties: string[] = []; + + interfaceDecl.members.forEach((member) => { + if (ts.isPropertySignature(member)) { + const propertyName = member.name?.getText(sourceFile); + const isOptional = member.questionToken !== undefined; + const typeNode = member.type; + + if (propertyName && typeNode && !excludeFields.includes(propertyName)) { + const finalPropertyName = camelCase + ? this.toCamelCase(propertyName) + : propertyName; + const convexType = this.convertTypeToConvex( + typeNode, + sourceFile, + isOptional, + ); + + properties.push(` ${finalPropertyName}: ${convexType}`); + } + } + }); + + return `export const ${targetName} = v.object({\n${properties.join(",\n")}\n});\n\nexport type ${targetName}Type = Infer;`; + } + + /** + * Convert TypeScript type to Convex validator + */ + private convertTypeToConvex( + typeNode: ts.TypeNode, + sourceFile: ts.SourceFile, + isOptional: boolean, + ): string { + const typeText = typeNode.getText(sourceFile).trim(); + + // Build base type + const baseType = this.getBaseConvexType(typeText, sourceFile); + + // Wrap in optional if needed + return isOptional ? `v.optional(${baseType})` : baseType; + } + + /** + * Get base Convex type (without optional wrapper) + */ + private getBaseConvexType( + typeText: string, + sourceFile: ts.SourceFile, + ): string { + // Handle basic types + if (typeText === "string") return "v.string()"; + if (typeText === "number") return "v.number()"; + if (typeText === "boolean") return "v.boolean()"; + if (typeText === "unknown" || typeText === "any") return "v.any()"; + + // Handle nullable types (string | null) + if (typeText.includes(" | null")) { + const baseType = typeText.replace(" | null", "").trim(); + const baseConvex = this.getBaseConvexType(baseType, sourceFile); + return `v.union(${baseConvex}, v.null())`; + } + + // Handle arrays (must be before union types to catch Array<'a' | 'b'>) + if (typeText.startsWith("Array<") && typeText.endsWith(">")) { + const innerType = typeText.slice(6, -1).trim(); + + // Normalize whitespace - replace all newlines and multiple spaces with single space + const normalizedInner = innerType.replace(/\s+/g, " ").trim(); + + // Check if this is a union of literals + if (normalizedInner.includes(" | ")) { + const parts = normalizedInner.split(" | ").map((t) => t.trim()); + const allLiterals = parts.every( + (p) => p.startsWith("'") || p.startsWith('"'), + ); + + if (allLiterals) { + const convexLiterals = parts + .map((lit) => `v.literal(${lit})`) + .join(", "); + return `v.array(v.union(${convexLiterals}))`; + } + } + + const innerConvex = this.getBaseConvexType(normalizedInner, sourceFile); + return `v.array(${innerConvex})`; + } + + // Handle union types + if (typeText.includes(" | ") && !typeText.includes("null")) { + const types = typeText.split(" | ").map((t) => t.trim()); + const convexTypes = types.map((type) => { + if (type === "string") return "v.string()"; + if (type === "number") return "v.number()"; + if (type === "boolean") return "v.boolean()"; + if (type.startsWith("'") || type.startsWith('"')) { + return `v.literal(${type})`; + } + return "v.any()"; + }); + return `v.union(${convexTypes.join(", ")})`; + } + + if (typeText.endsWith("[]")) { + const innerType = typeText.slice(0, -2); + const innerConvex = this.getBaseConvexType(innerType, sourceFile); + return `v.array(${innerConvex})`; + } + + // Handle Record types + if (typeText.startsWith("Record<")) { + const match = typeText.match(/Record<([^,]+),\s*([^>]+)>/); + if (match) { + const valueType = match[2]?.trim() ?? ""; + const valueConvex = this.getBaseConvexType(valueType, sourceFile); + return `v.record(v.string(), ${valueConvex})`; + } + } + + // Handle index signature types like { [key: string]: unknown } + if (typeText.match(/\{\s*\[\s*\w+\s*:\s*string\s*\]\s*:\s*\w+\s*\}/)) { + const match = typeText.match( + /\{\s*\[\s*\w+\s*:\s*string\s*\]\s*:\s*(\w+)\s*\}/, + ); + if (match) { + const valueType = match[1]?.trim() ?? ""; + const valueConvex = this.getBaseConvexType(valueType, sourceFile); + return `v.record(v.string(), ${valueConvex})`; + } + } + + // Handle external type references (CustomerData, EntityData) + if ( + typeText === "TrackParams.CustomerData" || + typeText === "Shared.CustomerData" || + typeText === "CustomerData" + ) { + return "CustomerDataConvex"; + } + if ( + typeText === "TrackParams.EntityData" || + typeText === "Shared.EntityData" || + typeText === "EntityData" + ) { + return "EntityDataConvex"; + } + + // Handle object types + if (typeText.includes("{") && typeText.includes("}")) { + return "v.object({})"; + } + + // Default to any for complex types + return "v.any()"; + } + + /** + * Convert snake_case to camelCase + */ + private toCamelCase(str: string): string { + return str.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase()); + } + + /** + * Find interface in source file + */ + private findInterface( + sourceFile: ts.SourceFile, + interfaceName: string, + ): ts.InterfaceDeclaration | null { + let result: ts.InterfaceDeclaration | null = null; + + function visit(node: ts.Node) { + if (ts.isInterfaceDeclaration(node) && node.name.text === interfaceName) { + result = node; + } + ts.forEachChild(node, visit); + } + + visit(sourceFile); + return result; + } + + /** + * Get or create TypeScript program for a file + */ + private getOrCreateProgram(sourceFilePath: string): { program: ts.Program; sourceFile: ts.SourceFile } { + const cached = this.programCache.get(sourceFilePath); + if (cached) { + return cached; + } + + const program = ts.createProgram([sourceFilePath], { + target: ts.ScriptTarget.ES2020, + module: ts.ModuleKind.CommonJS, + skipLibCheck: true, + noResolve: true, + }); + + const sourceFile = program.getSourceFile(sourceFilePath); + if (!sourceFile) { + throw new Error(`Could not find source file: ${sourceFilePath}`); + } + + const result = { program, sourceFile }; + this.programCache.set(sourceFilePath, result); + return result; + } + + /** + * Write all validators to output file + */ + private writeOutputFile(outputPath: string, validatorCodes: string[]): void { + const header = `/** + * 🤖 AUTO-GENERATED - DO NOT EDIT + * + * Generated by: typegen/generate-convex-types.ts + * Source: @ts-sdk OpenAPI-generated interfaces + * + * To regenerate: pnpm gen:convex-types + */ + +import { v, type Infer } from "convex/values"; + +`; + + // Note: CustomerDataConvex and EntityDataConvex are generated from SDK, + // so they'll appear in validatorCodes. Manual types that depend on them + // must come AFTER the generated types. + const manualTypesPrefix = `// Manual type definitions (not in SDK) + +export const IdentifierOpts = v.object({ + customerId: v.string(), + customerData: v.optional( + v.object({ + name: v.optional(v.string()), + email: v.optional(v.string()), + }) + ), +}); + +export type IdentifierOptsType = Infer; + +export const AttachFeatureOptionsConvex = v.object({ + featureId: v.string(), + quantity: v.number(), +}); + +export const EntityDataConvex = v.object({ + name: v.optional(v.string()), + featureId: v.string(), + id: v.optional(v.string()), +}); + +export const ExpandArgs = v.optional( + v.array( + v.union( + v.literal("payment_method"), + v.literal("invoices"), + v.literal("rewards"), + v.literal("trials_used"), + v.literal("entities"), + v.literal("referrals") + ) + ) +); + +`; + + // Manual types that depend on generated types (must come after) + // Currently empty - all types are now auto-generated + const manualTypesSuffix = ""; + + const content = + header + + manualTypesPrefix + + "\n" + + validatorCodes.join("\n\n") + + (manualTypesSuffix ? "\n" + manualTypesSuffix : ""); + + // Ensure output directory exists + const outputDir = path.dirname(outputPath); + if (!existsSync(outputDir)) { + mkdirSync(outputDir, { recursive: true }); + } + + writeFileSync(outputPath, content); + console.log(`\n📝 Wrote validators to ${outputPath}`); + } + + /** + * Print summary of generation process + */ + private printSummary( + results: { + config: ConvexValidatorConfig; + success: boolean; + error?: string; + }[], + duration: number, + ): void { + const successful = results.filter((r) => r.success).length; + const failed = results.filter((r) => !r.success).length; + + console.log( + `📊 ${successful} successful, ${failed} failed (${duration}ms)`, + ); + + if (failed > 0) { + console.log(`\n❌ Failed generations:`); + results + .filter((r) => !r.success) + .forEach((r) => { + console.log(` - ${r.config.sourceName}: ${r.error}`); + }); + } + } +} diff --git a/typegen/genUtils/index.ts b/typegen/genUtils/index.ts index edb2a14d..e84e70c8 100644 --- a/typegen/genUtils/index.ts +++ b/typegen/genUtils/index.ts @@ -8,4 +8,5 @@ export { export { HookGenerator } from "./HookGenerator.js"; export { MethodGenerator } from "./MethodGenerator.js"; export { TypeGenerator } from "./TypeGenerator.js"; +export { ConvexValidatorGenerator } from "./ConvexValidatorGenerator.js"; export { TypeGeneratorUtils } from "./utils.js"; diff --git a/typegen/generate-convex-types.ts b/typegen/generate-convex-types.ts new file mode 100644 index 00000000..2c1e036e --- /dev/null +++ b/typegen/generate-convex-types.ts @@ -0,0 +1,51 @@ +#!/usr/bin/env tsx + +import path from "node:path"; +import { ConvexValidatorGenerator } from "./genUtils/ConvexValidatorGenerator.js"; +import { getConvexValidatorConfigs } from "./convexTypeConfigs.js"; +import { TypeGeneratorUtils } from "./genUtils/index.js"; + +/** + * Generate Convex v.object() validators from @ts-sdk + * + * This script converts snake_case SDK types to camelCase Convex validators + * for use in the @useautumn/convex package. + * + * Configuration is defined in ./convexTypeConfigs.ts + */ +async function main() { + const startTime = Date.now(); + console.log("🎯 Generating Convex validators...\n"); + + try { + // Define paths relative to this script + const tsSDKPath = path.resolve(__dirname, "../ts-sdk"); + const convexPath = path.resolve(__dirname, "../convex"); + + // Validate all required paths exist + TypeGeneratorUtils.validatePaths([ + { name: "@ts-sdk", path: tsSDKPath }, + { name: "@useautumn/convex", path: convexPath }, + ]); + + // Get validator configurations + const configs = getConvexValidatorConfigs(tsSDKPath, convexPath); + console.log(`📋 Generating ${configs.length} Convex validators...`); + + // Define output path + const outputPath = path.join(convexPath, "src/types.ts"); + + // Generate validators + const generator = new ConvexValidatorGenerator(); + await generator.generateValidators(configs, outputPath); + + const totalTime = Date.now() - startTime; + console.log(`\n✅ Convex validator generation completed in ${totalTime}ms!`); + } catch (error) { + console.error("💥 Convex validator generation failed:", error); + process.exit(1); + } +} + +// Run immediately +main(); From 731b7ca9b278804e12abb69bc387bdea4f50a791 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Thu, 23 Oct 2025 15:34:31 +0100 Subject: [PATCH 10/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20cli?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmn/package.json | 2 +- atmn/readme.md | 51 +- atmn/source/commands/nuke.ts | 18 +- atmn/source/commands/pull.ts | 23 +- atmn/source/commands/push.ts | 174 ++--- .../compose/builders/builderFunctions.ts | 153 +++-- atmn/source/compose/index.ts | 28 +- atmn/source/compose/models/composeModels.ts | 54 -- atmn/source/compose/models/featureModels.ts | 38 + atmn/source/compose/models/index.ts | 8 + atmn/source/compose/models/planModels.ts | 439 ++++++++++++ .../compose/models/productItemModels.ts | 94 --- atmn/source/constants.ts | 48 +- atmn/source/core/api.ts | 1 + atmn/source/core/builders/featureBuilder.ts | 14 +- atmn/source/core/builders/freeTrialBuilder.ts | 7 +- atmn/source/core/builders/planBuilder.ts | 206 ++++++ atmn/source/core/builders/productBuilder.ts | 209 ------ atmn/source/core/config.ts | 54 +- atmn/source/core/nuke.ts | 8 +- atmn/source/core/pull.ts | 39 +- atmn/source/core/push.ts | 88 +-- atmn/source/core/requests/prodRequests.ts | 4 +- .../core/transformers/productV2ToPlan.ts | 130 ++++ .../react/hooks/types/useCustomerMethods.ts | 2 +- .../react/hooks/types/useEntityMethods.ts | 2 +- package.json | 2 +- typegen/.gitignore | 1 + typegen/genUtils/BuilderGenerator.ts | 121 ++++ typegen/genUtils/MethodGenerator.ts | 2 +- typegen/genUtils/TypeGenerator.ts | 285 +++++++- typegen/genUtils/ZodSchemaGenerator.ts | 455 ++++++++++++ typegen/genUtils/atmnTypeHelpers.ts | 649 ++++++++++++++++++ typegen/genUtils/index.ts | 20 + typegen/generate-atmn-types.ts | 108 +++ typegen/package.json | 3 +- typegen/typeConfigs.ts | 311 ++++++++- 37 files changed, 3118 insertions(+), 733 deletions(-) delete mode 100644 atmn/source/compose/models/composeModels.ts create mode 100644 atmn/source/compose/models/featureModels.ts create mode 100644 atmn/source/compose/models/index.ts create mode 100644 atmn/source/compose/models/planModels.ts delete mode 100644 atmn/source/compose/models/productItemModels.ts create mode 100644 atmn/source/core/builders/planBuilder.ts delete mode 100644 atmn/source/core/builders/productBuilder.ts create mode 100644 atmn/source/core/transformers/productV2ToPlan.ts create mode 100644 typegen/.gitignore create mode 100644 typegen/genUtils/BuilderGenerator.ts create mode 100644 typegen/genUtils/ZodSchemaGenerator.ts create mode 100644 typegen/genUtils/atmnTypeHelpers.ts create mode 100644 typegen/generate-atmn-types.ts diff --git a/atmn/package.json b/atmn/package.json index 02d5748c..f5843adb 100644 --- a/atmn/package.json +++ b/atmn/package.json @@ -13,7 +13,7 @@ "build": "tsup", "dev": "tsup --watch", "test2": "prettier --check . && xo && ava", - "test": "node --trace-deprecation -- ./dist/cli.js" + "test-cli": "node --trace-deprecation -- ./dist/cli.js" }, "files": [ "dist", diff --git a/atmn/readme.md b/atmn/readme.md index 8eb49cea..608a16f8 100644 --- a/atmn/readme.md +++ b/atmn/readme.md @@ -3,9 +3,8 @@ The CLI tool for [Autumn](https://useautumn.com)'s REST API. ## Features -Features -- Create your features in products **in-code**. +- Create your features and plans **in-code**. - Authenticate with the CLI tool. - Easily push and pull changes to and from Autumn. @@ -49,53 +48,57 @@ production key, and comment out your sandbox key. ```typescript autumn.config.ts import { feature, - product, - priceItem, - featureItem, - pricedFeatureItem, -} from 'autumn-js/compose'; + plan, + planFeature, +} from 'atmn'; -const seats = feature({ +export const seats = feature({ id: 'seats', name: 'Seats', type: 'continuous_use', }); -const messages = feature({ +export const messages = feature({ id: 'messages', name: 'Messages', type: 'single_use', }); -const pro = product({ +export const pro = plan({ id: 'pro', name: 'Pro', - items: [ + description: 'Professional plan for growing teams', + add_on: false, + default: false, + price: { + amount: 50, + interval: 'month', + }, + features: [ // 500 messages per month - featureItem({ + planFeature({ feature_id: messages.id, - included_usage: 500, - interval: 'month', + granted: 500, + reset: { interval: 'month' }, }), // $10 per seat per month - pricedFeatureItem({ + planFeature({ feature_id: seats.id, - price: 10, - interval: 'month', - }), - - // $50 / month - priceItem({ - price: 50, - interval: 'month', + granted: 1, + price: { + amount: 10, + interval: 'month', + usage_model: 'pay_per_use', + billing_units: 1, + }, }), ], }); export default { features: [seats, messages], - products: [pro], + plans: [pro], }; ``` diff --git a/atmn/source/commands/nuke.ts b/atmn/source/commands/nuke.ts index a1dbb7fa..f8f0e274 100644 --- a/atmn/source/commands/nuke.ts +++ b/atmn/source/commands/nuke.ts @@ -1,11 +1,11 @@ import fs from 'node:fs'; import {confirm} from '@inquirer/prompts'; import chalk from 'chalk'; -import {nukeCustomers, nukeFeatures, nukeProducts} from '../core/nuke.js'; -import {getAllProducts, getCustomers, getFeatures} from '../core/pull.js'; +import {nukeCustomers, nukeFeatures, nukePlans} from '../core/nuke.js'; +import {getAllPlans, getCustomers, getFeatures} from '../core/pull.js'; import {initSpinner, isSandboxKey, readFromEnv} from '../core/utils.js'; import {getOrg} from '../core/requests/orgRequests.js'; -import {Feature} from '../compose/models/composeModels.js'; +import {Feature} from '../compose/models/featureModels.js'; async function promptAndConfirmNuke(orgName: string): Promise { console.log('\n' + chalk.bgRed.white.bold(' DANGER: SANDBOX NUKE ')); @@ -20,13 +20,13 @@ async function promptAndConfirmNuke(orgName: string): Promise { `\n • ` + chalk.yellowBright('features') + `\n • ` + - chalk.yellowBright('products') + + chalk.yellowBright('plans') + `\n`, ), ); const shouldProceed = await confirm({ - message: `Confirm to continue. This will delete ${chalk.redBright.bold('all')} your ${chalk.redBright.bold('products')}, ${chalk.redBright.bold('features')} and ${chalk.redBright.bold('customers')} from your sandbox environment. You will confirm twice.`, + message: `Confirm to continue. This will delete ${chalk.redBright.bold('all')} your ${chalk.redBright.bold('plans')}, ${chalk.redBright.bold('features')} and ${chalk.redBright.bold('customers')} from your sandbox environment. You will confirm twice.`, default: false, }); @@ -70,14 +70,14 @@ export default async function Nuke() { console.log(chalk.red('Nuking sandbox...')); const s = initSpinner( - `Preparing ${chalk.yellowBright('customers')}, ${chalk.yellowBright('features')} and ${chalk.yellowBright('products')} for deletion...`, + `Preparing ${chalk.yellowBright('customers')}, ${chalk.yellowBright('features')} and ${chalk.yellowBright('plans')} for deletion...`, ); - const products = await getAllProducts({archived: true}); + const plans = await getAllPlans({archived: true}); const features = await getFeatures(); const customers = await getCustomers(); s.success( - `Loaded all ${chalk.yellowBright('customers')}, ${chalk.yellowBright('features')} and ${chalk.yellowBright('products')} for deletion`, + `Loaded all ${chalk.yellowBright('customers')}, ${chalk.yellowBright('features')} and ${chalk.yellowBright('plans')} for deletion`, ); features.sort((a: Feature, b: Feature) => { @@ -89,7 +89,7 @@ export default async function Nuke() { try { await nukeCustomers(customers); - await nukeProducts(products.map((product: {id: string}) => product.id)); + await nukePlans(plans.map((plan: {id: string}) => plan.id)); await nukeFeatures(features.map((feature: {id: string}) => feature.id)); } catch (e: unknown) { console.error(chalk.red('Failed to nuke sandbox:')); diff --git a/atmn/source/commands/pull.ts b/atmn/source/commands/pull.ts index 6810fedb..89a2bbf9 100644 --- a/atmn/source/commands/pull.ts +++ b/atmn/source/commands/pull.ts @@ -1,20 +1,25 @@ import chalk from 'chalk'; import prettier from 'prettier'; -import {getAllProducts, getFeatures} from '../core/pull.js'; -import {productBuilder} from '../core/builders/productBuilder.js'; +import {getAllPlans, getFeatures} from '../core/pull.js'; +import {planBuilder} from '../core/builders/planBuilder.js'; import {featureBuilder} from '../core/builders/featureBuilder.js'; import {writeConfig} from '../core/config.js'; -import {importBuilder, exportBuilder} from '../core/builders/productBuilder.js'; +import {importBuilder, exportBuilder} from '../core/builders/planBuilder.js'; import {snakeCaseToCamelCase} from '../core/utils.js'; -import {Feature, Product} from '../compose/models/composeModels.js'; +import {transformProductV2ToPlan} from '../core/transformers/productV2ToPlan.js'; +import {Feature} from '../compose/models/featureModels.js'; +import {Plan} from '../compose/models/planModels.js'; export default async function Pull(options?: {archived?: boolean}) { - console.log(chalk.green('Pulling products and features from Autumn...')); - const products = await getAllProducts({archived: options?.archived ?? false}); + console.log(chalk.green('Pulling plans and features from Autumn...')); + const productsV2 = await getAllPlans({archived: options?.archived ?? false}); const features = await getFeatures({includeArchived: true}); - const productSnippets = products.map((product: Product) => - productBuilder({product, features}), + // Transform Product V2 API response to Plan V1 format + const plans = productsV2.map((productV2: any) => transformProductV2ToPlan(productV2)); + + const planSnippets = plans.map((plan: Plan) => + planBuilder({plan, features}), ); const featureSnippets = features @@ -26,7 +31,7 @@ ${importBuilder()} // Features${featureSnippets.join('\n')} -// Products${productSnippets.join('\n')} +// Plans${planSnippets.join('\n')} `; const formattedConfig = await prettier.format(autumnConfig, { diff --git a/atmn/source/commands/push.ts b/atmn/source/commands/push.ts index ada064be..f5b5ad5a 100644 --- a/atmn/source/commands/push.ts +++ b/atmn/source/commands/push.ts @@ -1,14 +1,14 @@ import {confirm} from '@inquirer/prompts'; import chalk from 'chalk'; import yoctoSpinner from 'yocto-spinner'; -import type {Feature, Product} from '../compose/index.js'; +import type {Feature, Plan} from '../compose/index.js'; import {FRONTEND_URL} from '../constants.js'; import {deleteFeature, deleteProduct} from '../core/api.js'; import { checkForDeletables, - checkProductForConfirmation, + checkPlanForConfirmation, upsertFeature, - upsertProduct, + upsertPlan, } from '../core/push.js'; import {initSpinner} from '../core/utils.js'; import { @@ -29,30 +29,30 @@ const createSpinner = ({message}: {message?: string}) => { return spinner; }; -const gatherProductDeletionDecisions = async ({ - productsToDelete, +const gatherPlanDeletionDecisions = async ({ + plansToDelete, yes, }: { - productsToDelete: string[]; + plansToDelete: string[]; yes: boolean; }) => { - const productDeletionDecisions = new Map< + const planDeletionDecisions = new Map< string, 'delete' | 'archive' | 'skip' >(); - const batchCheckProducts = []; + const batchCheckPlans = []; - for (const productId of productsToDelete) { - batchCheckProducts.push(getProductDeleteInfo({productId})); + for (const planId of plansToDelete) { + batchCheckPlans.push(getProductDeleteInfo({productId: planId})); } - const checkProductResults = await Promise.all(batchCheckProducts); + const checkPlanResults = await Promise.all(batchCheckPlans); - for (let i = 0; i < productsToDelete.length; i++) { - const productId = productsToDelete[i]; - const result = checkProductResults[i]; + for (let i = 0; i < plansToDelete.length; i++) { + const planId = plansToDelete[i]; + const result = checkPlanResults[i]; - if (!productId) continue; + if (!planId) continue; if (result && result.totalCount > 0) { const otherCustomersText = @@ -63,51 +63,51 @@ const gatherProductDeletionDecisions = async ({ const shouldArchive = yes || (await confirm({ - message: `Product ${productId} has customer ${customerNameText}${otherCustomersText}. As such, you cannot delete it. Would you like to archive the product instead?`, + message: `Plan ${planId} has customer ${customerNameText}${otherCustomersText}. As such, you cannot delete it. Would you like to archive the plan instead?`, })); - productDeletionDecisions.set( - productId, + planDeletionDecisions.set( + planId, shouldArchive ? 'archive' : 'skip', ); } else { - productDeletionDecisions.set(productId, 'delete'); + planDeletionDecisions.set(planId, 'delete'); } } - return productDeletionDecisions; + return planDeletionDecisions; }; -const handleProductDeletion = async ({ - productsToDelete, +const handlePlanDeletion = async ({ + plansToDelete, yes, }: { - productsToDelete: string[]; + plansToDelete: string[]; yes: boolean; }) => { - const productDeletionDecisions = await gatherProductDeletionDecisions({ - productsToDelete, + const planDeletionDecisions = await gatherPlanDeletionDecisions({ + plansToDelete, yes, }); - for (const productId of productsToDelete) { - const decision = productDeletionDecisions.get(productId); + for (const planId of plansToDelete) { + const decision = planDeletionDecisions.get(planId); if (decision === 'delete') { const shouldDelete = yes || (await confirm({ - message: `Delete product [${productId}]?`, + message: `Delete plan [${planId}]?`, })); if (shouldDelete) { - const s = createSpinner({message: `Deleting product [${productId}]`}); - await deleteProduct({id: productId}); - s.success(`Product [${productId}] deleted successfully!`); + const s = createSpinner({message: `Deleting plan [${planId}]`}); + await deleteProduct({id: planId}); + s.success(`Plan [${planId}] deleted successfully!`); } } else if (decision === 'archive') { - const s = createSpinner({message: `Archiving product [${productId}]`}); - await updateProduct({productId, update: {archived: true}}); - s.success(`Product [${productId}] archived successfully!`); + const s = createSpinner({message: `Archiving plan [${planId}]`}); + await updateProduct({productId: planId, update: {archived: true}}); + s.success(`Plan [${planId}] archived successfully!`); } } }; @@ -160,45 +160,45 @@ const pushFeatures = async ({ console.log(); // Empty line for spacing }; -const gatherProductDecisions = async ({ - products, - curProducts, +const gatherPlanDecisions = async ({ + plans, + curPlans, yes, }: { - products: Product[]; - curProducts: any[]; + plans: Plan[]; + curPlans: any[]; yes: boolean; }) => { - const productDecisions = new Map(); - const batchCheckProducts = []; - - for (const product of products) { - batchCheckProducts.push( - checkProductForConfirmation({ - curProducts, - product, + const planDecisions = new Map(); + const batchCheckPlans = []; + + for (const plan of plans) { + batchCheckPlans.push( + checkPlanForConfirmation({ + curPlans, + plan, }), ); } - const checkProductResults = await Promise.all(batchCheckProducts); + const checkPlanResults = await Promise.all(batchCheckPlans); - for (const result of checkProductResults) { + for (const result of checkPlanResults) { if (result.archived) { const shouldUnarchive = yes || (await confirm({ - message: `Product ${result.id} is currently archived. Would you like to un-archive it before pushing?`, + message: `Plan ${result.id} is currently archived. Would you like to un-archive it before pushing?`, })); if (shouldUnarchive) { const s = createSpinner({ - message: `Un-archiving product [${result.id}]`, + message: `Un-archiving plan [${result.id}]`, }); await updateProduct({productId: result.id, update: {archived: false}}); - s.success(`Product [${result.id}] un-archived successfully!`); - productDecisions.set(result.id, true); + s.success(`Plan [${result.id}] un-archived successfully!`); + planDecisions.set(result.id, true); } else { - productDecisions.set(result.id, false); + planDecisions.set(result.id, false); } } @@ -206,42 +206,42 @@ const gatherProductDecisions = async ({ const shouldUpdate = yes || (await confirm({ - message: `Product ${result.id} has customers on it and updating it will create a new version.\nAre you sure you'd like to continue? `, + message: `Plan ${result.id} has customers on it and updating it will create a new version.\nAre you sure you'd like to continue? `, })); - productDecisions.set(result.id, shouldUpdate); + planDecisions.set(result.id, shouldUpdate); } else { - productDecisions.set(result.id, true); + planDecisions.set(result.id, true); } } - return productDecisions; + return planDecisions; }; -const pushProducts = async ({ - products, - curProducts, - productDecisions, +const pushPlans = async ({ + plans, + curPlans, + planDecisions, yes, }: { - products: Product[]; - curProducts: any[]; - productDecisions: Map; + plans: Plan[]; + curPlans: any[]; + planDecisions: Map; yes: boolean; }) => { - const s2 = initSpinner(`Pushing products`); - const batchProducts = []; + const s2 = initSpinner(`Pushing plans`); + const batchPlans = []; - for (const product of products) { - const shouldUpdate = productDecisions.get(product.id); - batchProducts.push( - upsertProduct({curProducts, product, spinner: s2, shouldUpdate}), + for (const plan of plans) { + const shouldUpdate = planDecisions.get(plan.id); + batchPlans.push( + upsertPlan({curPlans, plan, spinner: s2, shouldUpdate}), ); } - const prodResults = await Promise.all(batchProducts); - s2.success(`Products pushed successfully!`); - console.log(chalk.dim('\nProducts pushed:')); - prodResults.forEach((result: {id: string; action: string}) => { + const planResults = await Promise.all(batchPlans); + s2.success(`Plans pushed successfully!`); + console.log(chalk.dim('\nPlans pushed:')); + planResults.forEach((result: {id: string; action: string}) => { const action = result.action; console.log( chalk.cyan( @@ -251,7 +251,7 @@ const pushProducts = async ({ }); console.log(); // Empty line for spacing - return prodResults; + return planResults; }; const gatherFeatureDeletionDecisions = async ({ @@ -345,13 +345,13 @@ const showSuccessMessage = ({env, prod}: {env: string; prod: boolean}) => { if (prod) { console.log( chalk.magentaBright( - `You can view the products at ${FRONTEND_URL}/products`, + `You can view the plans at ${FRONTEND_URL}/products`, ), ); } else { console.log( chalk.magentaBright( - `You can view the products at ${FRONTEND_URL}/sandbox/products`, + `You can view the plans at ${FRONTEND_URL}/sandbox/products`, ), ); } @@ -364,13 +364,13 @@ export default async function Push({ }: { config: { features: Feature[]; - products: Product[]; + plans: Plan[]; env: string; }; yes: boolean; prod: boolean; }) { - const {features, products, env} = config; + const {features, plans, env} = config; if (env === 'prod') { const shouldProceed = @@ -386,18 +386,18 @@ export default async function Push({ } } - const {allFeatures, curProducts, featuresToDelete, productsToDelete} = - await checkForDeletables(features, products); + const {allFeatures, curPlans, featuresToDelete, plansToDelete} = + await checkForDeletables(features, plans); - await handleProductDeletion({productsToDelete, yes}); + await handlePlanDeletion({plansToDelete, yes}); await pushFeatures({features, allFeatures, yes}); - const productDecisions = await gatherProductDecisions({ - products, - curProducts, + const planDecisions = await gatherPlanDecisions({ + plans, + curPlans, yes, }); - await pushProducts({products, curProducts, productDecisions, yes}); + await pushPlans({plans, curPlans, planDecisions, yes}); await handleFeatureDeletion({featuresToDelete, yes}); showSuccessMessage({env, prod}); diff --git a/atmn/source/compose/builders/builderFunctions.ts b/atmn/source/compose/builders/builderFunctions.ts index 6d6d1ec8..f33acc82 100644 --- a/atmn/source/compose/builders/builderFunctions.ts +++ b/atmn/source/compose/builders/builderFunctions.ts @@ -1,79 +1,90 @@ -import type { Feature, Product } from "../models/composeModels.js"; +// AUTO-GENERATED - DO NOT EDIT MANUALLY +// Generated from @autumn/shared schemas +// Run `pnpm gen:atmn` to regenerate -import type { - ProductItem, - ProductItemInterval, - UsageModel, -} from "../models/productItemModels.js"; +import type { Plan, PlanFeature, FreeTrial } from "../models/planModels.js"; +import type { Feature } from "../models/featureModels.js"; -export const product = (p: Product) => p; -export const feature = (f: Feature) => f; +type PlanInput = Omit & Partial>; -export const featureItem = ({ - feature_id, - included_usage, - interval, - reset_usage_when_enabled, - entity_feature_id, -}: { - feature_id: string; - included_usage?: number | 'inf'; - interval?: ProductItemInterval; - reset_usage_when_enabled?: boolean; - entity_feature_id?: string; -}): ProductItem => { - return { - included_usage, - feature_id, - interval, - reset_usage_when_enabled, - entity_feature_id, - }; +/** + * Define a pricing plan in your Autumn configuration + * + * @param p - Plan configuration + * @returns Plan object for use in autumn.config.ts + * + * @example + * export const pro = plan({ + * id: 'pro', + * name: 'Pro Plan', + * description: 'For growing teams', + * features: [ + * planFeature({ feature_id: seats.id, granted: 10 }), + * planFeature({ + * feature_id: messages.id, + * granted: 1000, + * reset: { interval: 'month' } + * }) + * ], + * price: { amount: 50, interval: 'month' } + * }); + */ +export const plan = (params: PlanInput): Plan => { + return { + ...params, + description: params.description ?? null, + add_on: params.add_on ?? false, + default: params.default ?? false, + group: params.group ?? "" + }; }; -export const pricedFeatureItem = ({ - feature_id, - price, - tiers, - interval, - included_usage = undefined, - billing_units = 1, - usage_model = "pay_per_use", - reset_usage_when_enabled, - entity_feature_id, -}: { - feature_id: string; - price?: number; - tiers?: {to: number | 'inf'; amount: number}[]; - interval?: ProductItemInterval; - included_usage?: number; - billing_units?: number; - usage_model?: UsageModel; - reset_usage_when_enabled?: boolean; - entity_feature_id?: string; -}): ProductItem => { - return { - price, - tiers, - interval, - billing_units, - feature_id, - usage_model, - included_usage, - reset_usage_when_enabled, - entity_feature_id, - }; +/** + * Define a feature that can be included in plans + * + * @param f - Feature configuration + * @returns Feature object for use in autumn.config.ts + * + * @example + * export const seats = feature({ + * id: 'seats', + * name: 'Team Seats', + * type: 'continuous_use' + * }); + */ +export const feature = (params: Feature): Feature => { + return params; }; -export const priceItem = ({ - price, - interval, -}: { - price: number; - interval?: ProductItemInterval; -}): ProductItem => { - return { - price, - interval, - }; +/** + * Include a feature in a plan with specific configuration + * + * @param config - Feature configuration for this plan + * @returns PlanFeature for use in plan's features array + * + * @example + * // Simple included usage + * planFeature({ + * feature_id: messages.id, + * granted: 1000, + * reset: { interval: 'month' } + * }) + * + * @example + * // Priced feature with tiers + * planFeature({ + * feature_id: seats.id, + * granted: 5, + * price: { + * tiers: [ + * { to: 10, amount: 10 }, + * { to: 'inf', amount: 8 } + * ], + * interval: 'month', + * usage_model: 'pay_per_use' + * } + * }) + */ +export const planFeature = (params: PlanFeature): PlanFeature => { + return params; }; diff --git a/atmn/source/compose/index.ts b/atmn/source/compose/index.ts index 01da3097..36a4ab7a 100644 --- a/atmn/source/compose/index.ts +++ b/atmn/source/compose/index.ts @@ -1,21 +1,29 @@ import { feature, - featureItem, - pricedFeatureItem, - priceItem, - product, + plan, + planFeature, } from "./builders/builderFunctions.js"; -import type { Feature, Product } from "./models/composeModels.js"; -import type { ProductItem } from "./models/productItemModels.js"; +import type { Feature } from "./models/featureModels.js"; +import type { + Plan, + PlanFeature, + FreeTrial, +} from "./models/planModels.js"; -export { product, priceItem, feature, featureItem, pricedFeatureItem }; +export { plan, feature, planFeature }; + +export type { + Feature, + Plan, + PlanFeature, + FreeTrial, +}; -export type { Feature, Product, ProductItem }; export type Infinity = "infinity"; -// CLi types +// CLI types export type AutumnConfig = { - products: Product[]; + plans: Plan[]; features: Feature[]; }; diff --git a/atmn/source/compose/models/composeModels.ts b/atmn/source/compose/models/composeModels.ts deleted file mode 100644 index 39e2c6d1..00000000 --- a/atmn/source/compose/models/composeModels.ts +++ /dev/null @@ -1,54 +0,0 @@ -import {z} from 'zod/v4'; -import {ProductItemSchema} from './productItemModels.js'; - -export const FreeTrialSchema = z.object({ - duration: z.enum(['day', 'month', 'year'], { - message: "Duration must be 'day', 'month', or 'year'", - }), - length: z.number({ - message: 'Length must be a valid number', - }), - unique_fingerprint: z.boolean({ - message: 'Unique fingerprint must be true or false', - }), - card_required: z.boolean({ - message: 'Card required must be true or false', - }), -}); - -export const ProductSchema = z.object({ - id: z.string().min(1, 'Product ID is required and cannot be empty'), - name: z.string().min(1, 'Product name is required and cannot be empty'), - is_add_on: z.boolean().prefault(false).optional(), - is_default: z.boolean().prefault(false).optional(), - items: z.array(ProductItemSchema, { - message: 'Items must be an array of product items', - }), - free_trial: FreeTrialSchema.optional(), -}); - -export const FeatureSchema = z.object({ - id: z.string().min(1, 'Feature ID is required and cannot be empty'), - name: z.string().optional(), - type: z.enum(['boolean', 'single_use', 'continuous_use', 'credit_system'], { - message: - "Type must be 'boolean', 'single_use', 'continuous_use', or 'credit_system'", - }), - credit_schema: z - .array( - z.object({ - metered_feature_id: z.string({ - message: 'Metered feature ID must be a string', - }), - credit_cost: z.number({ - message: 'Credit cost must be a valid number', - }), - }), - ) - .optional(), - archived: z.boolean().optional(), -}); - -export type Feature = z.infer; -export type Product = z.infer; -export type FreeTrial = z.infer; diff --git a/atmn/source/compose/models/featureModels.ts b/atmn/source/compose/models/featureModels.ts new file mode 100644 index 00000000..087e1bf0 --- /dev/null +++ b/atmn/source/compose/models/featureModels.ts @@ -0,0 +1,38 @@ +// AUTO-GENERATED - DO NOT EDIT MANUALLY +// Generated from @autumn/shared schemas +// Run `pnpm gen:atmn` to regenerate + +import { z } from "zod/v4"; + + +export const FeatureSchema = z.object({ + id: z.string().meta({ + description: "The unique identifier of the feature", + example: "", + }), + name: z.string().nullish().meta({ + description: "The name of the feature", + example: "", + }), + credit_schema: z + .array( + z.object({ + metered_feature_id: z.string(), + credit_cost: z.number(), + }), + ) + .nullish() + .meta({ + description: "Credit cost schema for credit system features", + example: [{ metered_feature_id: "", credit_cost: 123 }], + }), + archived: z.boolean().nullish().meta({ + description: "Whether or not the feature is archived", + example: false, + }), + /** The type of the feature (boolean, single_use, continuous_use, credit_system) */ + type: z.string() +}); + +export type Feature = z.infer; + diff --git a/atmn/source/compose/models/index.ts b/atmn/source/compose/models/index.ts new file mode 100644 index 00000000..ea6de68f --- /dev/null +++ b/atmn/source/compose/models/index.ts @@ -0,0 +1,8 @@ +// Auto-generated exports for all camelCase types +// This file is generated by typegen pipeline +// DO NOT EDIT MANUALLY - changes will be overwritten + +export * from './planModels'; +export * from './planModels'; +export * from './featureModels'; +export * from './planModels'; diff --git a/atmn/source/compose/models/planModels.ts b/atmn/source/compose/models/planModels.ts new file mode 100644 index 00000000..03913909 --- /dev/null +++ b/atmn/source/compose/models/planModels.ts @@ -0,0 +1,439 @@ +// AUTO-GENERATED - DO NOT EDIT MANUALLY +// Generated from @autumn/shared schemas +// Run `pnpm gen:atmn` to regenerate + +import { z } from "zod/v4"; + +export const UsageTierSchema = z.object({ + to: z.union([z.number(), z.literal("inf")]), + amount: z.number(), +}); + +const idRegex = /^[a-zA-Z0-9_-]+$/; + + +export const PlanFeatureSchema = z.object({ + feature_id: z.string().meta({ + description: "Reference to the feature being configured", + example: "seats", + }), + granted: z.number().optional().meta({ + description: "Amount of usage granted to customers", + example: 1000, + }), + unlimited: z.boolean().optional().meta({ + description: "Whether usage is unlimited", + example: false, + }), + reset: z + .object({ + interval: z.union([z.literal("one_off"), z.literal("minute"), z.literal("hour"), z.literal("day"), z.literal("week"), z.literal("month"), z.literal("quarter"), z.literal("year")]).optional().meta({ + description: "How often usage resets", + example: "month", + }), + interval_count: z.number().optional().meta({ + description: "Number of intervals between resets", + example: 1, + }), + when_enabled: z.boolean().optional().meta({ + description: "Whether to reset usage when feature is enabled", + example: true, + }), + }) + .optional() + .meta({ + description: "Reset configuration for metered features", + example: { interval: "month" }, + }), + price: z + .object({ + amount: z.number().optional().meta({ + description: "Flat price per unit in cents", + example: 1000, + }), + tiers: z.array(UsageTierSchema).optional().meta({ + description: "Tiered pricing structure based on usage ranges", + example: [{ to: 10, amount: 1000 }, { to: "inf", amount: 800 }], + }), + + interval: z.union([z.literal("month"), z.literal("quarter"), z.literal("semi_annual"), z.literal("year")]).meta({ + description: "Billing frequency (cannot be used with reset.interval)", + example: "month", + }), + interval_count: z.number().default(1).optional().meta({ + description: "Number of intervals between billing", + example: 1, + }), + + billing_units: z.number().default(1).optional().meta({ + description: "Number of units per billing cycle", + example: 1, + }), + usage_model: z.union([z.literal("prepaid"), z.literal("pay_per_use")]).meta({ + description: "Billing model: 'prepaid' or 'pay_per_use'", + example: "pay_per_use", + }), + max_purchase: z.number().optional().meta({ + description: "Maximum purchasable quantity", + example: 100, + }), + }) + .optional() + .meta({ + description: "Pricing configuration for usage-based billing", + example: { interval: "month", usage_model: "pay_per_use" }, + }), + proration: z + .object({ + on_increase: z.union([z.literal("prorate"), z.literal("charge_immediately")]).meta({ + description: "Behavior when quantity increases", + example: "prorate", + }), + on_decrease: z.union([z.literal("prorate"), z.literal("refund_immediately"), z.literal("no_action")]).meta({ + description: "Behavior when quantity decreases", + example: "no_action", + }), + }) + .optional() + .meta({ + description: "Proration rules for quantity changes", + example: { on_increase: "prorate", on_decrease: "no_action" }, + }), + rollover: z + .object({ + max: z.number().meta({ + description: "Maximum amount that can roll over", + example: 1000, + }), + expiry_duration_type: z.union([z.literal("one_off"), z.literal("minute"), z.literal("hour"), z.literal("day"), z.literal("week"), z.literal("month"), z.literal("quarter"), z.literal("year")]).meta({ + description: "How long rollover lasts before expiring", + example: "month", + }), + expiry_duration_length: z.number().optional().meta({ + description: "Duration length for rollover expiry", + example: 1, + }), + }) + .optional() + .meta({ + description: "Rollover policy for unused usage", + example: { max: 1000, expiry_duration_type: "month" }, + }) +}); + +export const FreeTrialSchema = z.object({ + duration_type: z.union([z.literal("day"), z.literal("month"), z.literal("year")]).meta({ + description: "Unit of time: 'day', 'month', or 'year'", + example: "day", + }), + duration_length: z.number().meta({ + description: "Number of duration units", + example: 14, + }), + card_required: z.boolean().meta({ + description: "Whether credit card is required upfront", + example: true, + }) +}); + +export const PlanSchema = z.object({ + description: z.string().nullable().default(null).meta({ + description: "Optional description explaining what this plan offers", + example: "Perfect for growing teams", + }), + add_on: z.boolean().default(false).meta({ + description: "Whether this plan can be purchased alongside other plans", + example: false, + }), + default: z.boolean().default(false).meta({ + description: "Whether this is the default plan for new customers", + example: false, + }), + price: z + .object({ + amount: z.number().meta({ + description: "Price in cents (e.g., 5000 for $50.00)", + example: 5000, + }), + interval: z.union([z.literal("month"), z.literal("quarter"), z.literal("semi_annual"), z.literal("year")]).meta({ + description: "Billing frequency", + example: "month", + }), + }) + .optional() + .meta({ + description: "Base subscription price for the plan", + example: { amount: 5000, interval: "month" }, + }), + features: z.array(PlanFeatureSchema).optional().meta({ + description: "Features included with usage limits and pricing", + example: [], + }), + free_trial: FreeTrialSchema.nullable().optional().meta({ + description: "Free trial period before billing begins", + example: { duration_type: "day", duration_length: 14, card_required: true }, + }), + /** Unique identifier for the plan */ + id: z.string().nonempty().regex(idRegex), + /** Display name for the plan */ + name: z.string().nonempty(), + /** Group for organizing plans */ + group: z.string().default("") +}); + + +// Type aliases for literal unions +export type ResetInterval = "one_off" | "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year"; +export type BillingInterval = "month" | "quarter" | "semi_annual" | "year"; +export type UsageModel = "prepaid" | "pay_per_use"; +export type OnIncrease = "prorate" | "charge_immediately"; +export type OnDecrease = "prorate" | "refund_immediately" | "no_action"; + +// Base type for PlanFeature +type PlanFeatureBase = z.infer; + +/** + * Reset with interval (price cannot have interval) + */ +export type PlanFeatureWithReset = { + /** Reference to the feature being configured */ + feature_id: string; + + /** Amount of usage granted to customers */ + granted?: number; + + /** Whether usage is unlimited */ + unlimited?: boolean; + + /** Reset configuration for metered features */ + reset: { + /** How often usage resets */ + interval: ResetInterval; + + /** Number of intervals between resets */ + interval_count?: number; + + /** Whether to reset usage when feature is enabled */ + when_enabled?: boolean; } + + /** Pricing configuration (interval not allowed when using reset.interval) */ + price?: { + /** Flat price per unit in cents */ + amount?: number; + + /** Tiered pricing structure based on usage ranges */ + tiers?: Array<{ to: number | "inf"; amount: number }>; + + /** Cannot be used with reset.interval */ + interval?: never; + + /** Cannot be used with reset.interval */ + interval_count?: never; + + /** Number of units per billing cycle */ + billing_units?: number; + + /** Billing model: 'prepaid' or 'pay_per_use' */ + usage_model?: UsageModel; + + /** Maximum purchasable quantity */ + max_purchase?: number; } + + /** Proration rules for quantity changes */ + proration?: { + /** Behavior when quantity increases */ + on_increase: OnIncrease; + + /** Behavior when quantity decreases */ + on_decrease: OnDecrease; } + + /** Rollover policy for unused usage */ + rollover?: { + /** Maximum amount that can roll over */ + max: number; + + /** How long rollover lasts before expiring */ + expiry_duration_type: ResetInterval; + + /** Duration length for rollover expiry */ + expiry_duration_length?: number; } +}; + +/** + * Price with interval (reset cannot have interval) + */ +export type PlanFeatureWithPrice = { + /** Reference to the feature being configured */ + feature_id: string; + + /** Amount of usage granted to customers */ + granted?: number; + + /** Whether usage is unlimited */ + unlimited?: boolean; + + /** Reset configuration (interval not allowed when using price.interval) */ + reset?: { + /** Cannot be used with price.interval */ + interval?: never; + + /** Cannot be used with price.interval */ + interval_count?: never; + + /** Whether to reset usage when feature is enabled */ + when_enabled?: boolean; } + + /** Pricing configuration for usage-based billing */ + price: { + /** Flat price per unit in cents */ + amount?: number; + + /** Tiered pricing structure based on usage ranges */ + tiers?: Array<{ to: number | "inf"; amount: number }>; + + /** Billing frequency (cannot be used with reset.interval) */ + interval: BillingInterval; + + /** Number of intervals between billing */ + interval_count?: number; + + /** Number of units per billing cycle */ + billing_units?: number; + + /** Billing model: 'prepaid' or 'pay_per_use' */ + usage_model: UsageModel; + + /** Maximum purchasable quantity */ + max_purchase?: number; } + + /** Proration rules for quantity changes */ + proration?: { + /** Behavior when quantity increases */ + on_increase: OnIncrease; + + /** Behavior when quantity decreases */ + on_decrease: OnDecrease; } + + /** Rollover policy for unused usage */ + rollover?: { + /** Maximum amount that can roll over */ + max: number; + + /** How long rollover lasts before expiring */ + expiry_duration_type: ResetInterval; + + /** Duration length for rollover expiry */ + expiry_duration_length?: number; } +}; + +/** + * Neither has interval + */ +export type PlanFeatureBasic = { + /** Reference to the feature being configured */ + feature_id: string; + + /** Amount of usage granted to customers */ + granted?: number; + + /** Whether usage is unlimited */ + unlimited?: boolean; + + /** Reset configuration (no interval) */ + reset?: { + /** Not allowed in this variant */ + interval?: never; + + /** Not allowed in this variant */ + interval_count?: never; + + /** Whether to reset usage when feature is enabled */ + when_enabled?: boolean; } + + /** Pricing configuration (no interval) */ + price?: { + /** Flat price per unit in cents */ + amount?: number; + + /** Tiered pricing structure based on usage ranges */ + tiers?: Array<{ to: number | "inf"; amount: number }>; + + /** Not allowed in this variant */ + interval?: never; + + /** Not allowed in this variant */ + interval_count?: never; + + /** Number of units per billing cycle */ + billing_units?: number; + + /** Billing model: 'prepaid' or 'pay_per_use' */ + usage_model?: UsageModel; + + /** Maximum purchasable quantity */ + max_purchase?: number; } + + /** Proration rules for quantity changes */ + proration?: { + /** Behavior when quantity increases */ + on_increase: OnIncrease; + + /** Behavior when quantity decreases */ + on_decrease: OnDecrease; } + + /** Rollover policy for unused usage */ + rollover?: { + /** Maximum amount that can roll over */ + max: number; + + /** How long rollover lasts before expiring */ + expiry_duration_type: ResetInterval; + + /** Duration length for rollover expiry */ + expiry_duration_length?: number; } +}; + +/** + * Plan feature configuration with compile-time mutual exclusivity validation. Use reset.interval OR price.interval, but not both. + */ +export type PlanFeature = PlanFeatureWithReset | PlanFeatureWithPrice | PlanFeatureBasic; + + +// Override Plan type to use PlanFeature discriminated union +type PlanBase = z.infer; +export type FreeTrial = z.infer; + +export type Plan = { + /** Unique identifier for the plan */ + id: string; + + /** Display name for the plan */ + name: string; + + /** Optional description explaining what this plan offers */ + description?: string | null; + + /** Grouping identifier for organizing related plans */ + group?: string; + + /** Whether this plan can be purchased alongside other plans */ + add_on?: boolean; + + /** Whether this is the default plan for new customers */ + default?: boolean; + + /** Base price for the plan */ + price?: { + /** Price in your currency (e.g., 50 for $50.00) */ + amount: number; + + /** Billing frequency */ + interval: BillingInterval; } + + /** Features included with usage limits and pricing */ + features?: PlanFeature[]; + + /** Free trial period before billing begins */ + free_trial?: FreeTrial | null; +}; + diff --git a/atmn/source/compose/models/productItemModels.ts b/atmn/source/compose/models/productItemModels.ts deleted file mode 100644 index 6ee2d14f..00000000 --- a/atmn/source/compose/models/productItemModels.ts +++ /dev/null @@ -1,94 +0,0 @@ -import {z} from 'zod/v4'; - -export const ProductItemIntervalEnum = z.enum( - ['minute', 'hour', 'day', 'week', 'month', 'quarter', 'semi_annual', 'year'], - { - message: - "Interval must be 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'semi_annual', or 'year'", - }, -); - -export const UsageModelEnum = z.enum(['prepaid', 'pay_per_use'], { - message: "Usage model must be 'prepaid' or 'pay_per_use'", -}); - -export type ProductItemInterval = z.infer; -export type UsageModel = z.infer; - -export const ProductItemSchema = z.object({ - type: z - .enum(['feature', 'priced_feature'], { - message: "Type must be 'feature' or 'priced_feature'", - }) - .nullish(), - feature_id: z - .string({ - message: 'Feature ID must be a string', - }) - .nullish(), - included_usage: z - .union([z.number(), z.literal('inf')], { - message: 'Included usage must be a number or "inf"', - }) - .nullish(), - interval: ProductItemIntervalEnum.nullish(), - usage_model: UsageModelEnum.nullish(), - price: z - .number({ - message: 'Price must be a valid number', - }) - .nullish(), - tiers: z - .array( - z.object({ - amount: z.number({ - message: 'Tier amount must be a valid number', - }), - to: z.union([z.number(), z.literal('inf')], { - message: 'Tier "to" must be a number or "inf"', - }), - }), - ) - .nullish(), - billing_units: z - .number({ - message: 'Billing units must be a valid number', - }) - .nullish(), - - reset_usage_when_enabled: z - .boolean({ - message: 'Reset usage when enabled must be true or false', - }) - .optional(), - entity_feature_id: z - .string({ - message: 'Entity feature ID must be a string', - }) - .optional(), -}); - -export const FeatureItemSchema = z.object({ - feature_id: z.string({ - message: 'Feature ID is required and must be a string', - }), - included_usage: z - .number({ - message: 'Included usage must be a valid number', - }) - .nullish(), - interval: ProductItemIntervalEnum.nullish(), -}); - -export const PriceItemSchema = z.object({ - price: z - .number({ - message: 'Price must be a valid number', - }) - .gt(0, 'Price must be greater than 0'), - interval: ProductItemIntervalEnum.nullish(), -}); - -export type FeatureItem = z.infer; -export type PriceItem = z.infer; -export type ProductItem = z.infer; diff --git a/atmn/source/constants.ts b/atmn/source/constants.ts index b997348f..ba1200d0 100644 --- a/atmn/source/constants.ts +++ b/atmn/source/constants.ts @@ -1,14 +1,12 @@ -// export const FRONTEND_URL = 'http://localhost:3000'; -// export const BACKEND_URL = 'http://localhost:8080'; -export const FRONTEND_URL = 'http://app.useautumn.com'; -export const BACKEND_URL = 'https://api.useautumn.com'; +export const FRONTEND_URL = "http://localhost:3000"; +export const BACKEND_URL = "http://localhost:8080"; +// export const FRONTEND_URL = 'http://app.useautumn.com'; +// export const BACKEND_URL = 'https://api.useautumn.com'; export const DEFAULT_CONFIG = `import { feature, - product, - priceItem, - featureItem, - pricedFeatureItem, + plan, + planFeature, } from 'atmn'; export const seats = feature({ @@ -23,28 +21,34 @@ export const messages = feature({ type: 'single_use', }); -export const pro = product({ +export const pro = plan({ id: 'pro', name: 'Pro', - items: [ + description: 'Professional plan for growing teams', + add_on: false, + default: false, + price: { + amount: 50, + interval: 'month', + }, + features: [ // 500 messages per month - featureItem({ + planFeature({ feature_id: messages.id, - included_usage: 500, - interval: 'month', + granted: 500, + reset: { interval: 'month' }, }), // $10 per seat per month - pricedFeatureItem({ + planFeature({ feature_id: seats.id, - price: 10, - interval: 'month', - }), - - // $50 / month - priceItem({ - price: 50, - interval: 'month', + granted: 1, + price: { + amount: 10, + interval: 'month', + usage_model: 'pay_per_use', + billing_units: 1, + }, }), ], }); diff --git a/atmn/source/core/api.ts b/atmn/source/core/api.ts index 01bd9004..1789f5a6 100644 --- a/atmn/source/core/api.ts +++ b/atmn/source/core/api.ts @@ -49,6 +49,7 @@ export async function request({ params: queryParams, headers: { 'Content-Type': 'application/json', + 'X-API-Version': '2.0.0', ...headers, Authorization: customAuth || `Bearer ${apiKey}`, }, diff --git a/atmn/source/core/builders/featureBuilder.ts b/atmn/source/core/builders/featureBuilder.ts index 2b28f9d6..e45aab14 100644 --- a/atmn/source/core/builders/featureBuilder.ts +++ b/atmn/source/core/builders/featureBuilder.ts @@ -1,8 +1,8 @@ import {Feature} from '../../compose/index.js'; -import {idToVar} from '../utils.js'; +import {idToVar, notNullish} from '../utils.js'; const creditSchemaBuilder = (feature: Feature) => { - if (feature.type == 'credit_system') { + if (feature.type === 'credit_system' && feature.credit_schema) { let creditSchema = feature.credit_schema || []; return ` credit_schema: [ @@ -14,17 +14,19 @@ const creditSchemaBuilder = (feature: Feature) => { }`, ) .join(',\n ')} - ]`; + ],`; } return ''; }; export function featureBuilder(feature: Feature) { + const nameStr = notNullish(feature.name) ? `\n name: '${feature.name}',` : ''; + const creditSchemaStr = creditSchemaBuilder(feature); + const snippet = ` export const ${idToVar({id: feature.id, prefix: 'feature'})} = feature({ - id: '${feature.id}', - name: '${feature.name}', - type: '${feature.type}',${creditSchemaBuilder(feature)} + id: '${feature.id}',${nameStr} + type: '${feature.type}',${creditSchemaStr} })`; return snippet; } diff --git a/atmn/source/core/builders/freeTrialBuilder.ts b/atmn/source/core/builders/freeTrialBuilder.ts index c2bc8737..19a05c5e 100644 --- a/atmn/source/core/builders/freeTrialBuilder.ts +++ b/atmn/source/core/builders/freeTrialBuilder.ts @@ -1,10 +1,9 @@ -import {FreeTrial} from '../../compose/models/composeModels.js'; +import {FreeTrial} from '../../compose/models/planModels.js'; export function freeTrialBuilder({freeTrial}: {freeTrial: FreeTrial}) { return `free_trial: { - duration: '${freeTrial.duration}', - length: ${freeTrial.length}, - unique_fingerprint: ${freeTrial.unique_fingerprint}, + duration_type: '${freeTrial.duration_type}', + duration_length: ${freeTrial.duration_length}, card_required: ${freeTrial.card_required}, },`; } diff --git a/atmn/source/core/builders/planBuilder.ts b/atmn/source/core/builders/planBuilder.ts new file mode 100644 index 00000000..e725541f --- /dev/null +++ b/atmn/source/core/builders/planBuilder.ts @@ -0,0 +1,206 @@ +import {Plan, PlanFeature, Feature} from '../../compose/index.js'; +import {idToVar, notNullish, nullish} from '../utils.js'; + +export function importBuilder() { + return ` +import { + feature, + plan, + planFeature, +} from 'atmn'; + `; +} + +export function exportBuilder(planIds: string[], featureIds: string[]) { + const snippet = ` +const autumnConfig = { + plans: [${planIds.map(id => `${idToVar({id, prefix: 'plan'})}`).join(', ')}], + features: [${featureIds.map(id => `${idToVar({id, prefix: 'feature'})}`).join(', ')}] +} + +export default autumnConfig; + `; + return snippet; +} + +export function planBuilder({ + plan, + features, +}: { + plan: Plan; + features: Feature[]; +}) { + const planFeaturesStr = plan.features + ?.map((pf: PlanFeature) => planFeatureBuilder({planFeature: pf, features})) + .join(',\n ') || ''; + + const priceStr = plan.price + ? `\n price: {\n amount: ${plan.price.amount},\n interval: '${plan.price.interval}',\n },` + : ''; + + const descriptionStr = plan.description && plan.description !== null + ? `\n description: '${plan.description.replace(/'/g, "\\'")}',` + : ''; + + const groupStr = plan.group && plan.group !== '' && plan.group !== null + ? `\n group: '${plan.group}',` + : ''; + + const addOnStr = plan.add_on === true + ? `\n add_on: true,` + : ''; + + const defaultStr = plan.default === true + ? `\n default: true,` + : ''; + + const freeTrialStr = plan.free_trial && plan.free_trial !== null + ? `\n free_trial: {\n duration_type: '${plan.free_trial.duration_type}',\n duration_length: ${plan.free_trial.duration_length},\n card_required: ${plan.free_trial.card_required},\n },` + : ''; + + const snippet = ` +export const ${idToVar({id: plan.id, prefix: 'plan'})} = plan({ + id: '${plan.id}', + name: '${plan.name}',${descriptionStr}${groupStr}${addOnStr}${defaultStr}${priceStr} + features: [ + ${planFeaturesStr} + ],${freeTrialStr} +}); +`; + return snippet; +} + +export const getFeatureIdStr = ({ + featureId, + features, +}: { + featureId: string; + features: Feature[]; +}) => { + if (nullish(featureId)) return ''; + + let feature = features.find(f => f.id === featureId); + + if (feature?.archived) return `"${featureId}"`; + return `${idToVar({id: featureId, prefix: 'feature'})}.id`; +}; + +// Plan Feature Builder + +function planFeatureBuilder({ + planFeature, + features, +}: { + planFeature: PlanFeature; + features: Feature[]; +}) { + const featureIdStr = getFeatureIdStr({ + featureId: planFeature.feature_id, + features, + }); + + let parts: string[] = [`feature_id: ${featureIdStr}`]; + + // Granted usage (only if has a value) + if (notNullish(planFeature.granted) && planFeature.granted > 0) { + parts.push(`granted: ${planFeature.granted}`); + } + + // Unlimited (only if true) + if (planFeature.unlimited === true) { + parts.push(`unlimited: true`); + } + + // Reset configuration (only if has meaningful fields) + if (planFeature.reset) { + const resetParts: string[] = []; + if (planFeature.reset.interval) { + resetParts.push(`interval: '${planFeature.reset.interval}'`); + } + if (notNullish(planFeature.reset.interval_count) && planFeature.reset.interval_count !== 1) { + resetParts.push(`interval_count: ${planFeature.reset.interval_count}`); + } + if (planFeature.reset.when_enabled === true) { + resetParts.push(`when_enabled: true`); + } + if (planFeature.reset.when_enabled === false) { + resetParts.push(`when_enabled: false`); + } + if (resetParts.length > 0) { + parts.push(`reset: { ${resetParts.join(', ')} }`); + } + } + + // Price configuration (only if has meaningful fields) + if (planFeature.price) { + const priceParts: string[] = []; + + if (notNullish(planFeature.price.amount)) { + priceParts.push(`amount: ${planFeature.price.amount}`); + } + + if (planFeature.price.tiers && planFeature.price.tiers.length > 0) { + const tiersStr = planFeature.price.tiers + .map(tier => `{ to: ${tier.to === 'inf' ? "'inf'" : tier.to}, amount: ${tier.amount} }`) + .join(', '); + priceParts.push(`tiers: [${tiersStr}]`); + } + + if (planFeature.price.interval) { + priceParts.push(`interval: '${planFeature.price.interval}'`); + } + + if (notNullish(planFeature.price.interval_count) && planFeature.price.interval_count !== 1) { + priceParts.push(`interval_count: ${planFeature.price.interval_count}`); + } + + if (notNullish(planFeature.price.billing_units) && planFeature.price.billing_units !== 1) { + priceParts.push(`billing_units: ${planFeature.price.billing_units}`); + } + + if (planFeature.price.usage_model) { + priceParts.push(`usage_model: '${planFeature.price.usage_model}'`); + } + + if (notNullish(planFeature.price.max_purchase)) { + priceParts.push(`max_purchase: ${planFeature.price.max_purchase}`); + } + + if (priceParts.length > 0) { + parts.push(`price: { ${priceParts.join(', ')} }`); + } + } + + // Proration + if (planFeature.proration) { + const prorationParts: string[] = []; + if (planFeature.proration.on_increase) { + prorationParts.push(`on_increase: '${planFeature.proration.on_increase}'`); + } + if (planFeature.proration.on_decrease) { + prorationParts.push(`on_decrease: '${planFeature.proration.on_decrease}'`); + } + if (prorationParts.length > 0) { + parts.push(`proration: { ${prorationParts.join(', ')} }`); + } + } + + // Rollover + if (planFeature.rollover) { + const rolloverParts: string[] = []; + if (notNullish(planFeature.rollover.max)) { + rolloverParts.push(`max: ${planFeature.rollover.max}`); + } + if (planFeature.rollover.expiry_duration_type) { + rolloverParts.push(`expiry_duration_type: '${planFeature.rollover.expiry_duration_type}'`); + } + if (notNullish(planFeature.rollover.expiry_duration_length)) { + rolloverParts.push(`expiry_duration_length: ${planFeature.rollover.expiry_duration_length}`); + } + if (rolloverParts.length > 0) { + parts.push(`rollover: { ${rolloverParts.join(', ')} }`); + } + } + + return `planFeature({ ${parts.join(', ')} })`; +} diff --git a/atmn/source/core/builders/productBuilder.ts b/atmn/source/core/builders/productBuilder.ts deleted file mode 100644 index 960a13f2..00000000 --- a/atmn/source/core/builders/productBuilder.ts +++ /dev/null @@ -1,209 +0,0 @@ -import {ProductItem, Product, Feature} from '../../compose/index.js'; -import {idToVar, notNullish, nullish} from '../utils.js'; -import {freeTrialBuilder} from './freeTrialBuilder.js'; - -const ItemBuilders = { - priced_feature: pricedFeatureItemBuilder, - feature: featureItemBuilder, - price: priceItemBuilder, -}; - -export function importBuilder() { - return ` -import { - feature, - product, - featureItem, - pricedFeatureItem, - priceItem, -} from 'atmn'; - `; -} - -export function exportBuilder(productIds: string[], featureIds: string[]) { - const snippet = ` -const autumnConfig = { - products: [${productIds.map(id => `${idToVar({id, prefix: 'product'})}`).join(', ')}], - features: [${featureIds.map(id => `${idToVar({id, prefix: 'feature'})}`).join(', ')}] -} - -export default autumnConfig; - `; - return snippet; -} - -export function productBuilder({ - product, - features, -}: { - product: Product; - features: Feature[]; -}) { - const snippet = ` -export const ${idToVar({id: product.id, prefix: 'product'})} = product({ - id: '${product.id}', - name: '${product.name}', - items: [${product.items - .map( - (item: ProductItem) => - `${ItemBuilders[item.type as keyof typeof ItemBuilders]({ - item, - features, - })}`, - ) - .join(' ')} ], - ${product.free_trial ? `${freeTrialBuilder({freeTrial: product.free_trial})}` : ''} -}) -`; - return snippet; -} - -export const getFeatureIdStr = ({ - featureId, - features, -}: { - featureId: string; - features: Feature[]; -}) => { - if (nullish(featureId)) return ''; - - let feature = features.find(f => f.id === featureId); - - if (feature?.archived) return `"${featureId}"`; - return `${idToVar({id: featureId, prefix: 'feature'})}.id`; -}; - -// Item Builders - -const getItemFieldPrefix = () => { - return `\n `; -}; -const getResetUsageStr = ({ - item, - features, -}: { - item: ProductItem; - features: Feature[]; -}) => { - if (!item.feature_id) return ''; - const feature = features.find(f => f.id === item.feature_id)!; - if (feature.type === 'boolean' || feature.type === 'credit_system') return ''; - - const defaultResetUsage = feature.type === 'single_use' ? true : false; - - if ( - notNullish(item.reset_usage_when_enabled) && - item.reset_usage_when_enabled !== defaultResetUsage - ) { - return `${getItemFieldPrefix()}reset_usage_when_enabled: ${ - item.reset_usage_when_enabled - },`; - } - - return ''; -}; - -const getIntervalStr = ({item}: {item: ProductItem}) => { - if (item.interval == null) return ``; - return `${getItemFieldPrefix()}interval: '${item.interval}',`; -}; - -const getEntityFeatureIdStr = ({ - item, - features, -}: { - item: ProductItem; - features: Feature[]; -}) => { - if (nullish(item.entity_feature_id)) return ''; - - const featureIdStr = getFeatureIdStr({ - featureId: item.entity_feature_id, - features, - }); - - return `${getItemFieldPrefix()}entity_feature_id: ${featureIdStr},`; -}; - -const getPriceStr = ({item}: {item: ProductItem}) => { - // 1. If tiers... - if (item.tiers) { - return ` - tiers: [ - ${item.tiers - .map( - tier => - `{ to: ${tier.to == 'inf' ? "'inf'" : tier.to}, amount: ${ - tier.amount - } }`, - ) - .join(',\n\t\t\t')} - ],`; - } - - if (item.price == null) return ''; - return `price: ${item.price},`; - // if (item.price == null) return ''; - // return `${getItemFieldPrefix()}price: ${item.price},`; -}; - -export function pricedFeatureItemBuilder({ - item, - features, -}: { - item: ProductItem; - features: Feature[]; -}) { - const intervalStr = getIntervalStr({item}); - const entityFeatureIdStr = getEntityFeatureIdStr({item, features}); - const resetUsageStr = getResetUsageStr({item, features}); - const priceStr = getPriceStr({item}); - const featureIdStr = getFeatureIdStr({featureId: item.feature_id!, features}); - - const snippet = ` - pricedFeatureItem({ - feature_id: ${featureIdStr}, - ${priceStr}${intervalStr} - included_usage: ${ - item.included_usage == 'inf' ? `"inf"` : item.included_usage - }, - billing_units: ${item.billing_units}, - usage_model: '${ - item.usage_model - }',${resetUsageStr}${entityFeatureIdStr} - }), -`; - return snippet; -} - -export function featureItemBuilder({ - item, - features, -}: { - item: ProductItem; - features: Feature[]; -}) { - const featureIdStr = getFeatureIdStr({featureId: item.feature_id!, features}); - const entityFeatureIdStr = getEntityFeatureIdStr({item, features}); - const intervalStr = getIntervalStr({item}); - const resetUsageStr = getResetUsageStr({item, features}); - const snippet = ` - featureItem({ - feature_id: ${featureIdStr}, - included_usage: ${ - item.included_usage == 'inf' ? `"inf"` : item.included_usage - },${intervalStr}${resetUsageStr}${entityFeatureIdStr} - }), -`; - return snippet; -} - -export function priceItemBuilder({item}: {item: ProductItem}) { - const intervalStr = getIntervalStr({item}); - const snippet = ` - priceItem({ - price: ${item.price},${intervalStr} - }), -`; - return snippet; -} diff --git a/atmn/source/core/config.ts b/atmn/source/core/config.ts index 95d7e450..090664b4 100644 --- a/atmn/source/core/config.ts +++ b/atmn/source/core/config.ts @@ -7,11 +7,14 @@ import {execSync} from 'child_process'; import chalk from 'chalk'; import {confirm, select} from '@inquirer/prompts'; import { - ProductSchema, + PlanSchema, + type Plan, + type FreeTrial, +} from '../compose/models/planModels.js'; +import { FeatureSchema, - type Product, type Feature, -} from '../compose/models/composeModels.js'; +} from '../compose/models/featureModels.js'; import {readFromEnv} from './utils.js'; function checkAtmnInstalled(): boolean { @@ -78,9 +81,9 @@ async function installAtmn(): Promise { } } -function isProduct(value: any): value is Product { +function isPlan(value: any): value is Plan { try { - ProductSchema.parse(value); + PlanSchema.strict().parse(value); return true; } catch (error) { return false; @@ -89,17 +92,17 @@ function isProduct(value: any): value is Product { function isFeature(value: any): value is Feature { try { - FeatureSchema.parse(value); + FeatureSchema.strict().parse(value); return true; } catch { return false; } } -function detectObjectType(value: any): 'product' | 'feature' | 'unknown' { +function detectObjectType(value: any): 'plan' | 'feature' | 'unknown' { if (value && typeof value === 'object') { - if (value.items && Array.isArray(value.items)) { - return 'product'; + if (value.features && Array.isArray(value.features)) { + return 'plan'; } if (value.type) { return 'feature'; @@ -155,15 +158,24 @@ export async function loadAutumnConfigFile() { const jiti = createJiti(import.meta.url); const mod = await jiti.import(fileUrl); - const products: Product[] = []; + const plans: Plan[] = []; const features: Feature[] = []; // Check for old-style default export first const defaultExport = (mod as any).default; - if (defaultExport && defaultExport.products && defaultExport.features) { - // Old format: default export with products and features arrays + if (defaultExport && defaultExport.plans && defaultExport.features) { + // Old format: default export with plans and features arrays + if (Array.isArray(defaultExport.plans)) { + plans.push(...defaultExport.plans); + } + if (Array.isArray(defaultExport.features)) { + features.push(...defaultExport.features); + } + } else if (defaultExport && defaultExport.products && defaultExport.features) { + // Legacy format: default export with products (backwards compatibility) + console.warn(chalk.yellow('⚠️ Using legacy "products" export. Please migrate to "plans" export.')); if (Array.isArray(defaultExport.products)) { - products.push(...defaultExport.products); + plans.push(...defaultExport.products); } if (Array.isArray(defaultExport.features)) { features.push(...defaultExport.features); @@ -173,18 +185,18 @@ export async function loadAutumnConfigFile() { for (const [key, value] of Object.entries(mod as Record)) { if (key === 'default') continue; - if (isProduct(value)) { - products.push(value as Product); + if (isPlan(value)) { + plans.push(value as Plan); } else if (isFeature(value)) { features.push(value as Feature); } else { // Object doesn't match either schema - provide helpful error const detectedType = detectObjectType(value); - if (detectedType === 'product') { - const validationError = getValidationError(ProductSchema, value); - console.error('\n' + chalk.red('❌ Invalid product configuration')); - console.error(chalk.yellow(`Product: "${key}"`)); + if (detectedType === 'plan') { + const validationError = getValidationError(PlanSchema, value); + console.error('\n' + chalk.red('❌ Invalid plan configuration')); + console.error(chalk.yellow(`Plan: "${key}"`)); console.error(chalk.red('Validation errors:') + validationError); process.exit(1); } else if (detectedType === 'feature') { @@ -198,7 +210,7 @@ export async function loadAutumnConfigFile() { console.error(chalk.yellow(`Object: "${key}"`)); console.error( chalk.red('Error:') + - " Object must be either a product (with 'items' field) or feature (with 'type' field)", + " Object must be either a plan (with 'features' field) or feature (with 'type' field)", ); process.exit(1); } @@ -215,7 +227,7 @@ export async function loadAutumnConfigFile() { } return { - products, + plans, features, env: secretKey?.includes('live') ? 'prod' : 'sandbox', }; diff --git a/atmn/source/core/nuke.ts b/atmn/source/core/nuke.ts index e5530ad2..da250a8d 100644 --- a/atmn/source/core/nuke.ts +++ b/atmn/source/core/nuke.ts @@ -51,13 +51,13 @@ async function deleteCustomer(id: string) { }); } -export async function nukeProducts(ids: string[]) { - const s = initSpinner('Deleting products'); +export async function nukePlans(ids: string[]) { + const s = initSpinner('Deleting plans'); for (const id of ids) { - s.text = `Deleting product [${id}] ${ids.indexOf(id) + 1} / ${ids.length}`; + s.text = `Deleting plan [${id}] ${ids.indexOf(id) + 1} / ${ids.length}`; await deleteProduct({id, allVersions: true}); } - s.success('Products deleted successfully!'); + s.success('Plans deleted successfully!'); } export async function nukeFeatures(ids: string[]) { diff --git a/atmn/source/core/pull.ts b/atmn/source/core/pull.ts index 8a05c799..d8d23a8d 100644 --- a/atmn/source/core/pull.ts +++ b/atmn/source/core/pull.ts @@ -1,8 +1,9 @@ import chalk from 'chalk'; -import type {Feature, Product} from '../compose/models/composeModels.js'; +import type {Feature} from '../compose/models/featureModels.js'; +import type {Plan} from '../compose/models/planModels.js'; import {externalRequest} from './api.js'; -export async function getProducts(ids: string[]): Promise { +export async function getPlans(ids: string[]): Promise { return await Promise.all( ids.map(id => externalRequest({ @@ -13,46 +14,46 @@ export async function getProducts(ids: string[]): Promise { ); } -export async function getAllProducts(params?: { +export async function getAllPlans(params?: { archived?: boolean; -}): Promise { - const {list: products} = await externalRequest({ +}): Promise { + const {list: plans} = await externalRequest({ method: 'GET', path: `/products`, queryParams: {include_archived: params?.archived ? true : false}, }); - return [...products]; + return [...plans]; } -export async function getAllProductVariants() { +export async function getAllPlanVariants() { const {list} = await externalRequest({ method: 'GET', path: '/products', }); - const allProducts = []; - allProducts.push( - ...list.flatMap((product: {name: string; version: number; id: string}) => { - if (product.version > 1) { - // Get all versions of this product - return Array.from({length: product.version}, (_, i) => ({ - id: product.id, - name: product.name, + const allPlans = []; + allPlans.push( + ...list.flatMap((plan: {name: string; version: number; id: string}) => { + if (plan.version > 1) { + // Get all versions of this plan + return Array.from({length: plan.version}, (_, i) => ({ + id: plan.id, + name: plan.name, version: i + 1, })); } else { return [ { - id: product.id, - name: product.name, - version: product.version, + id: plan.id, + name: plan.name, + version: plan.version, }, ]; } }), ); - return allProducts; + return allPlans; } export async function getFeatures(params?: {includeArchived?: boolean}) { diff --git a/atmn/source/core/push.ts b/atmn/source/core/push.ts index 0b610ced..c9881b24 100644 --- a/atmn/source/core/push.ts +++ b/atmn/source/core/push.ts @@ -1,11 +1,11 @@ import type {Spinner} from 'yocto-spinner'; -import type {Feature, Product} from '../compose/index.js'; +import type {Feature, Plan} from '../compose/index.js'; import {externalRequest} from './api.js'; -import {getAllProducts, getFeatures} from './pull.js'; +import {getAllPlans, getFeatures} from './pull.js'; export async function checkForDeletables( currentFeatures: Feature[], - currentProducts: Product[], + currentPlans: Plan[], ) { const features = await getFeatures({includeArchived: true}); // Get from AUTUMN @@ -19,21 +19,21 @@ export async function checkForDeletables( ), ); - const products = await getAllProducts(); - const productIds = products.map((product: Product) => product.id); - const currentProductIds = currentProducts.map( - (product: Product) => product.id, + const plans = await getAllPlans(); + const planIds = plans.map((plan: Plan) => plan.id); + const currentPlanIds = currentPlans.map( + (plan: Plan) => plan.id, ); - const productsToDelete = productIds.filter( - (productId: string) => !currentProductIds.includes(productId), + const plansToDelete = planIds.filter( + (planId: string) => !currentPlanIds.includes(planId), ); return { allFeatures: features, curFeatures: features.filter((feature: Feature) => !feature.archived), - curProducts: products, + curPlans: plans, featuresToDelete, - productsToDelete, + plansToDelete, }; } @@ -81,87 +81,75 @@ export async function upsertFeature(feature: Feature, s: Spinner) { } } -export async function checkProductForConfirmation({ - curProducts, - product, +export async function checkPlanForConfirmation({ + curPlans, + plan, }: { - curProducts: Product[]; - product: Product; + curPlans: Plan[]; + plan: Plan; }) { - const curProduct = curProducts.find(p => p.id === product.id); - if (!curProduct) { - // return { needsConfirmation: false, shouldUpdate: true }; + const curPlan = curPlans.find(p => p.id === plan.id); + if (!curPlan) { return { - id: product.id, + id: plan.id, will_version: false, }; } const res1 = await externalRequest({ method: 'GET', - path: `/products/${product.id}/has_customers`, - data: product, + path: `/products/${plan.id}/has_customers`, + data: plan, }); return { - id: product.id, + id: plan.id, will_version: res1.will_version, archived: res1.archived, }; - - // const {will_version} = res1; - - // if (will_version) { - // const shouldUpdate = await confirm({ - // message: `Product ${product.id} has customers on it and updating it will create a new version.\nAre you sure you'd like to continue? `, - // }); - // return { needsConfirmation: true, shouldUpdate }; - // } - - // return { needsConfirmation: false, shouldUpdate: true }; } -export async function upsertProduct({ - curProducts, - product, +export async function upsertPlan({ + curPlans, + plan, spinner, shouldUpdate = true, }: { - curProducts: Product[]; - product: Product; + curPlans: Plan[]; + plan: Plan; spinner: Spinner; shouldUpdate?: boolean; }) { if (!shouldUpdate) { - spinner.text = `Skipping update to product ${product.id}`; + spinner.text = `Skipping update to plan ${plan.id}`; return { - id: product.id, + id: plan.id, action: 'skipped', }; } - const curProduct = curProducts.find(p => p.id === product.id); - if (!curProduct) { + const curPlan = curPlans.find(p => p.id === plan.id); + if (!curPlan) { await externalRequest({ method: 'POST', path: `/products`, - data: product, + data: plan, }); - spinner.text = `Created product [${product.id}]`; + spinner.text = `Created plan [${plan.id}]`; return { - id: product.id, + id: plan.id, action: 'create', }; } else { await externalRequest({ method: 'POST', - path: `/products/${product.id}`, - data: product, + path: `/products/${plan.id}`, + data: plan, }); - spinner.text = `Updated product [${product.id}]`; + spinner.text = `Updated plan [${plan.id}]`; return { - id: product.id, + id: plan.id, action: 'updated', }; } diff --git a/atmn/source/core/requests/prodRequests.ts b/atmn/source/core/requests/prodRequests.ts index 346489ec..574111ba 100644 --- a/atmn/source/core/requests/prodRequests.ts +++ b/atmn/source/core/requests/prodRequests.ts @@ -1,4 +1,4 @@ -import {Product} from '../../compose/index.js'; +import {Plan} from '../../compose/index.js'; import {externalRequest} from '../api.js'; export const getProductDeleteInfo = async ({ @@ -18,7 +18,7 @@ export const updateProduct = async ({ update, }: { productId: string; - update: Partial; + update: Partial; }) => { const response = await externalRequest({ method: 'POST', diff --git a/atmn/source/core/transformers/productV2ToPlan.ts b/atmn/source/core/transformers/productV2ToPlan.ts new file mode 100644 index 00000000..4c8f6980 --- /dev/null +++ b/atmn/source/core/transformers/productV2ToPlan.ts @@ -0,0 +1,130 @@ +import type {Plan, PlanFeature} from '../../compose/models/planModels.js'; + +/** + * Transform Product V2 API response to Plan V1 format for CLI + * + * API Version History: + * - Product V1: Entitlements-based (legacy) + * - Product V2: Items array (current API format with X-API-Version: 2.0.0) + * - Plan V1: Features array (new CLI format) + * + * Transformations: + * - items[] (Product V2) → features[] + price (Plan V1) + * - is_add_on → add_on + * - is_default → default + * - type: "feature" items → PlanFeature objects + * - type: "price" items → plan.price + */ +export function transformProductV2ToPlan(productV2: any): Plan { + // Transform items to features + const features: PlanFeature[] = (productV2.items || []) + .filter((item: any) => item.type === 'feature') // Skip price items + .map((item: any): PlanFeature => { + const feature: any = { + feature_id: item.feature_id, + }; + + // Granted/unlimited + if (item.included_usage !== undefined && item.included_usage !== null) { + if (item.included_usage === 'inf') { + feature.unlimited = true; + } else { + feature.granted = item.included_usage; + } + } + + // Reset configuration + if (item.interval && !item.price) { + // This is a reset interval (not a price interval) + feature.reset = { + interval: item.interval, + }; + if (item.interval_count) { + feature.reset.interval_count = item.interval_count; + } + if (item.reset_usage_when_enabled !== undefined) { + feature.reset.when_enabled = item.reset_usage_when_enabled; + } + } + + // Price configuration + if (item.price || item.tiers) { + feature.price = {}; + + if (item.price) { + feature.price.amount = item.price; + } + + if (item.tiers) { + feature.price.tiers = item.tiers; + } + + if (item.interval && item.price) { + // This is a price interval + feature.price.interval = item.interval; + } + + if (item.interval_count && item.price) { + feature.price.interval_count = item.interval_count; + } + + if (item.billing_units) { + feature.price.billing_units = item.billing_units; + } + + if (item.usage_model) { + feature.price.usage_model = item.usage_model; + } + + if (item.usage_limit) { + feature.price.max_purchase = item.usage_limit; + } + } + + // Config mapping + if (item.config) { + if (item.config.on_increase || item.config.on_decrease) { + feature.proration = {}; + if (item.config.on_increase) feature.proration.on_increase = item.config.on_increase; + if (item.config.on_decrease) feature.proration.on_decrease = item.config.on_decrease; + } + + if (item.config.rollover) { + feature.rollover = { + max: item.config.rollover.max, + expiry_duration_type: item.config.rollover.duration, + }; + if (item.config.rollover.length) { + feature.rollover.expiry_duration_length = item.config.rollover.length; + } + } + } + + return feature as PlanFeature; + }); + + // Extract base price from price items + let basePrice: Plan['price'] | undefined = undefined; + const priceItem = (productV2.items || []).find((item: any) => item.type === 'price'); + if (priceItem && priceItem.price) { + basePrice = { + amount: priceItem.price, + interval: priceItem.interval || 'month', + }; + } + + // Build Plan + const plan: Plan = { + id: productV2.id, + name: productV2.name, + description: productV2.description || null, + group: productV2.group || '', + add_on: productV2.is_add_on || false, + default: productV2.is_default || false, + price: basePrice, + features, + free_trial: productV2.free_trial || null, + }; + + return plan; +} diff --git a/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts b/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts index cbe0dc76..812b4abd 100644 --- a/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts +++ b/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts @@ -3,7 +3,7 @@ // DO NOT EDIT MANUALLY - changes will be overwritten // // To update documentation: -// 1. Edit JSDoc in backend: sirtenzin-autumn/shared/api/core/coreOpenApi.ts +// 1. Edit JSDoc in backend server's shared/api directory // 2. Regenerate OpenAPI spec and SDK // 3. Run: pnpm run gen:autumn-js diff --git a/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts b/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts index 18490493..939ffb56 100644 --- a/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts +++ b/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts @@ -3,7 +3,7 @@ // DO NOT EDIT MANUALLY - changes will be overwritten // // To update documentation: -// 1. Edit JSDoc in backend: sirtenzin-autumn/shared/api/core/coreOpenApi.ts +// 1. Edit JSDoc in backend server's shared/api directory // 2. Regenerate OpenAPI spec and SDK // 3. Run: pnpm run gen:autumn-js diff --git a/package.json b/package.json index ff21e184..57395e58 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "packageManager": "pnpm@10.14.0", "scripts": { "test-cli": "pnpm --filter atmn test-cli", - "gen": "pnpm gen:ajs && pnpm gen:convex", + "gen": "pnpm gen:ajs && pnpm gen:convex && pnpm gen:atmn", "gen:autumn-js": "bun typegen/generate-autumn-js-types.ts", "gen:ajs": "bun typegen/generate-autumn-js-types.ts", "gen:convex": "bun typegen/generate-convex-types.ts", diff --git a/typegen/.gitignore b/typegen/.gitignore new file mode 100644 index 00000000..4c49bd78 --- /dev/null +++ b/typegen/.gitignore @@ -0,0 +1 @@ +.env diff --git a/typegen/genUtils/BuilderGenerator.ts b/typegen/genUtils/BuilderGenerator.ts new file mode 100644 index 00000000..5f787f23 --- /dev/null +++ b/typegen/genUtils/BuilderGenerator.ts @@ -0,0 +1,121 @@ +import { writeFileSync } from "node:fs"; + +/** + * Configuration for generating a builder function + */ +export interface BuilderConfig { + /** Builder function name (e.g., "plan", "feature") */ + builderName: string; + /** Schema name to reference (e.g., "PlanSchema") */ + schemaName: string; + /** Parameter type name (e.g., "Plan", "Feature") */ + paramType: string; + /** Source file to extract JSDoc from (optional) */ + sourceFile?: string; + /** Target file to write builder to */ + targetFile: string; + /** Whether to include runtime validation (.parse()) */ + validationEnabled?: boolean; + /** Custom JSDoc override */ + jsdocOverride?: string; + /** Default values for fields (undefined -> default value) */ + defaults?: Record; +} + +/** + * Generate builder function code with JSDoc + */ +export function generateBuilderFunction(config: BuilderConfig): string { + const { + builderName, + paramType, + schemaName, + jsdocOverride, + validationEnabled, + defaults, + } = config; + + // Determine input and return types + let inputType = paramType; + let inputTypeDeclaration = ""; + + // If we have defaults, create a separate input type + if (defaults && Object.keys(defaults).length > 0) { + const inputTypeName = `${paramType}Input`; + const defaultFields = Object.keys(defaults).map(f => `'${f}'`).join(" | "); + + inputTypeDeclaration = `type ${inputTypeName} = Omit<${paramType}, ${defaultFields}> & Partial>;\n\n`; + inputType = inputTypeName; + } + + // Use custom JSDoc or generate default + const jsdoc = + jsdocOverride || + `/** + * Create a ${paramType.toLowerCase()} definition + * + * @param params - ${paramType} configuration + * @returns ${paramType} object for use in autumn.config.ts + */`; + + // Generate function body + const validationLine = validationEnabled + ? ` ${schemaName}.parse(params);` + : ""; + + // Generate default value assignments + let returnStatement = "params"; + if (defaults && Object.keys(defaults).length > 0) { + const defaultAssignments = Object.entries(defaults) + .map(([field, value]) => { + const valueStr = typeof value === "string" + ? `"${value}"` + : value === null + ? "null" + : value; + return ` ${field}: params.${field} ?? ${valueStr}`; + }) + .join(",\n"); + + returnStatement = `{\n ...params,\n${defaultAssignments}\n }`; + } + + return `${inputTypeDeclaration}${jsdoc} +export const ${builderName} = (params: ${inputType}): ${paramType} => { +${validationLine ? validationLine + "\n" : ""} return ${returnStatement}; +}; +`; +} + +/** + * Generate a complete builder functions file + */ +export function generateBuilderFunctionsFile( + builderConfigs: BuilderConfig[], + outputPath: string, + imports: { typeName: string; from: string }[], +): void { + // Generate file header + let content = `// AUTO-GENERATED - DO NOT EDIT MANUALLY +// Generated from @autumn/shared schemas +// Run \`pnpm gen:atmn\` to regenerate + +`; + + // Generate imports + if (imports.length > 0) { + const typeImports = imports + .map((imp) => `import type { ${imp.typeName} } from "${imp.from}";`) + .join("\n"); + content += `${typeImports}\n\n`; + } + + // Generate each builder function + const builderFunctions = builderConfigs + .map((config) => generateBuilderFunction(config)) + .join("\n"); + + content += builderFunctions; + + writeFileSync(outputPath, content); +} diff --git a/typegen/genUtils/MethodGenerator.ts b/typegen/genUtils/MethodGenerator.ts index 29bd090b..afd1c0a8 100644 --- a/typegen/genUtils/MethodGenerator.ts +++ b/typegen/genUtils/MethodGenerator.ts @@ -244,7 +244,7 @@ export class MethodGenerator { // DO NOT EDIT MANUALLY - changes will be overwritten // // To update documentation: -// 1. Edit JSDoc in backend: sirtenzin-autumn/shared/api/core/coreOpenApi.ts +// 1. Edit JSDoc in backend server's shared/api directory // 2. Regenerate OpenAPI spec and SDK // 3. Run: pnpm run gen:autumn-js diff --git a/typegen/genUtils/TypeGenerator.ts b/typegen/genUtils/TypeGenerator.ts index 62361682..bda018d9 100644 --- a/typegen/genUtils/TypeGenerator.ts +++ b/typegen/genUtils/TypeGenerator.ts @@ -1,6 +1,11 @@ import { writeFileSync, mkdirSync, existsSync } from "fs"; import path from "path"; import { generateCamelZod } from "./auto-schema-generator"; +import { + extractZodSchema, + transformZodSchema, + generateZodSchemaFile, +} from "./ZodSchemaGenerator"; import type { TypeConfig, TypeGenerationConfig } from "../typeConfigs"; /** @@ -24,14 +29,42 @@ export class TypeGenerator { async generateTypes(config: TypeGenerationConfig): Promise { const { configs, outputDir } = config; const startTime = Date.now(); - + console.log(`⚡ Processing ${configs.length} types...`); - - // Generate all types in parallel (no await in the map) - const startGeneration = Date.now(); - const results = await Promise.allSettled( - configs.map(async (config, index) => { - const typeStart = Date.now(); + + // Group configs by target file (for Zod sources that share a file) + const zodConfigs = configs.filter(c => c.sourceType === "zod"); + const interfaceConfigs = configs.filter(c => c.sourceType !== "zod"); + + // Group Zod configs by target file + const zodConfigsByFile = new Map(); + for (const config of zodConfigs) { + const existing = zodConfigsByFile.get(config.targetFile) || []; + existing.push(config); + zodConfigsByFile.set(config.targetFile, existing); + } + + // Generate Zod schemas (grouped by file) + const zodResults = await Promise.allSettled( + Array.from(zodConfigsByFile.entries()).map(async ([targetFile, fileConfigs]) => { + try { + this.generateZodSchemas(fileConfigs); + return fileConfigs.map(c => ({ config: c, success: true as const })); + } catch (error) { + const errorMessage = error instanceof Error ? error.message : String(error); + console.error(`❌ Failed generating ${targetFile}: ${errorMessage}`); + return fileConfigs.map(c => ({ + config: c, + success: false as const, + error: errorMessage + })); + } + }) + ); + + // Generate interface-based types + const interfaceResults = await Promise.allSettled( + interfaceConfigs.map(async (config) => { try { this.generateSingleType(config); return { config, success: true as const }; @@ -42,24 +75,246 @@ export class TypeGenerator { } }) ); - - const endGeneration = Date.now(); - // Extract results from Promise.allSettled - const processedResults = results.map(result => - result.status === 'fulfilled' ? result.value : { - config: configs[results.indexOf(result)], + // Flatten and combine results + const flatZodResults = zodResults.flatMap(r => + r.status === 'fulfilled' ? r.value : [] + ); + const flatInterfaceResults = interfaceResults.map(r => + r.status === 'fulfilled' ? r.value : { + config: interfaceConfigs[interfaceResults.indexOf(r)], success: false as const, - error: result.reason?.message || 'Unknown error' + error: 'Unknown error' } ); + const processedResults = [...flatZodResults, ...flatInterfaceResults]; + + // Append manual type unions if configured + if (config.manualTypeUnions) { + this.appendManualTypeUnions(config.manualTypeUnions); + } + // Generate index file and print summary const duration = Date.now() - startTime; this.printSummary(processedResults, duration); await this.generateIndexFile(configs, outputDir); } + /** + * Append manual type unions to files + */ + private appendManualTypeUnions(unions: Array<{ targetFile: string; typeCode: string }>): void { + for (const union of unions) { + const { targetFile, typeCode } = union; + + // Read existing file + const existingContent = require('fs').readFileSync(targetFile, 'utf-8'); + + // Append the manual type code + const newContent = existingContent + '\n' + typeCode + '\n'; + + writeFileSync(targetFile, newContent); + } + } + + /** + * Generate multiple Zod schemas that write to the same file + */ + private generateZodSchemas(configs: TypeConfig[]): void { + if (configs.length === 0) return; + + // Ensure output directory exists + const targetFile = configs[0]?.targetFile; + if (!targetFile) return; + + const outputDir = path.dirname(targetFile); + if (!existsSync(outputDir)) { + mkdirSync(outputDir, { recursive: true }); + } + + // Create mapping of source schema names to target schema names + const schemaNameMap = new Map(); + configs.forEach(config => { + schemaNameMap.set(config.sourceName, `${config.targetName}Schema`); + }); + + // Extract and transform all schemas + const schemas = configs.map(config => { + const { schemaCode, jsdoc } = extractZodSchema( + config.sourceFile, + config.sourceName + ); + + let transformed = transformZodSchema(schemaCode, { + omitFields: config.omitFields || [], + renameFields: config.renameFields || {}, + extendFields: config.extendFields || {}, + keepCase: config.keepCase !== false, + }); + + // Replace schema references (e.g., UpdatePlanFeatureSchema -> PlanFeatureSchema) + for (const [sourceName, targetName] of schemaNameMap) { + transformed = transformed.replace(new RegExp(sourceName, 'g'), targetName); + } + + // Replace enums with literal unions if requested + if (config.replaceEnumsWithStrings) { + transformed = this.replaceEnumsWithLiterals(transformed); + } + + return { + schemaName: `${config.targetName}Schema`, + typeName: config.targetName, + schemaCode: transformed, + jsdoc, + originalCode: schemaCode, + skipTypeExport: config.skipTypeExport || false, + }; + }); + + // Detect required imports by analyzing all schema code + const allSchemaCode = schemas.map(s => s.originalCode).join('\n'); + const imports = this.detectRequiredImports(allSchemaCode); + + // Build the file content with all schemas + let content = `// AUTO-GENERATED - DO NOT EDIT MANUALLY +// Generated from @autumn/shared schemas +// Run \`pnpm gen:atmn\` to regenerate + +import { z } from "zod/v4"; +${imports} + +`; + + // Add schemas in dependency order (referenced schemas first) + // Sort so that referenced schemas come before schemas that reference them + const sortedSchemas = this.sortSchemasByDependencies(schemas); + + // Add each schema + for (const schema of sortedSchemas) { + if (schema.jsdoc) { + content += `/** + * ${schema.jsdoc.replace(/\*\//g, "* /")} + */ +`; + } + + content += `export const ${schema.schemaName} = ${schema.schemaCode}; + +`; + + // Only export type if not skipped + if (!schema.skipTypeExport) { + content += `export type ${schema.typeName} = z.infer; + +`; + } + } + + writeFileSync(targetFile, content); + } + + /** + * Sort schemas by dependencies (referenced schemas first) + */ + private sortSchemasByDependencies( + schemas: Array<{ schemaName: string; schemaCode: string; jsdoc: string | null; typeName: string; originalCode: string }> + ): Array<{ schemaName: string; schemaCode: string; jsdoc: string | null; typeName: string; originalCode: string }> { + // Build dependency map + const dependencies = new Map>(); + + schemas.forEach(schema => { + const deps = new Set(); + schemas.forEach(other => { + if (schema.schemaName !== other.schemaName && + schema.schemaCode.includes(other.schemaName)) { + deps.add(other.schemaName); + } + }); + dependencies.set(schema.schemaName, deps); + }); + + // Topological sort + const sorted: typeof schemas = []; + const visited = new Set(); + const visiting = new Set(); + + const visit = (schemaName: string) => { + if (visited.has(schemaName)) return; + if (visiting.has(schemaName)) { + // Circular dependency - just add it anyway + return; + } + + visiting.add(schemaName); + const deps = dependencies.get(schemaName) || new Set(); + + for (const dep of deps) { + visit(dep); + } + + visiting.delete(schemaName); + visited.add(schemaName); + + const schema = schemas.find(s => s.schemaName === schemaName); + if (schema) { + sorted.push(schema); + } + }; + + schemas.forEach(schema => visit(schema.schemaName)); + + return sorted; + } + + /** + * Get enum values map for replacing enums with literal unions + */ + private getEnumValuesMap(): Record { + return { + BillingInterval: ['month', 'quarter', 'semi_annual', 'year'], + ResetInterval: ['one_off', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'], + UsageModel: ['prepaid', 'pay_per_use'], + OnIncrease: ['prorate', 'charge_immediately'], + OnDecrease: ['prorate', 'refund_immediately', 'no_action'], + FreeTrialDuration: ['day', 'month', 'year'], + ApiFeatureType: ['static', 'boolean', 'single_use', 'continuous_use', 'credit_system'], + }; + } + + /** + * Replace enum references with literal unions + */ + private replaceEnumsWithLiterals(schemaCode: string): string { + const enumMap = this.getEnumValuesMap(); + let result = schemaCode; + + for (const [enumName, values] of Object.entries(enumMap)) { + const literalUnion = values.map(v => `z.literal("${v}")`).join(', '); + const pattern = new RegExp(`z\\.enum\\(${enumName}\\)`, 'g'); + result = result.replace(pattern, `z.union([${literalUnion}])`); + } + + return result; + } + + /** + * Detect required imports from schema code + */ + private detectRequiredImports(schemaCode: string): string { + const imports: string[] = []; + + if (schemaCode.includes('UsageTierSchema')) { + imports.push(`export const UsageTierSchema = z.object({\n to: z.union([z.number(), z.literal("inf")]),\n amount: z.number(),\n});`); + } + if (schemaCode.includes('idRegex')) { + imports.push(`const idRegex = /^[a-zA-Z0-9_-]+$/;`); + } + + return imports.length > 0 ? '\n' + imports.join('\n\n') + '\n' : ''; + } + /** * Generate a single type based on configuration */ @@ -70,7 +325,7 @@ export class TypeGenerator { mkdirSync(outputDir, { recursive: true }); } - // Generate the camelCase Zod schema + // EXISTING: TypeScript interface → Zod schema (for autumn-js) generateCamelZod({ inputFile: config.sourceFile, typeName: config.sourceName, diff --git a/typegen/genUtils/ZodSchemaGenerator.ts b/typegen/genUtils/ZodSchemaGenerator.ts new file mode 100644 index 00000000..e1f97e4c --- /dev/null +++ b/typegen/genUtils/ZodSchemaGenerator.ts @@ -0,0 +1,455 @@ +import * as ts from "typescript"; +import { writeFileSync } from "node:fs"; + +/** + * Result of extracting a Zod schema from source + */ +export interface ExtractedZodSchema { + /** The Zod schema code (e.g., "z.object({ ... })") */ + schemaCode: string; + /** JSDoc comment attached to the schema */ + jsdoc: string | null; + /** Field descriptions extracted from .meta() calls */ + metaDescriptions: Record; + /** Type name (inferred from schema name, e.g., "UpdatePlanParams" from "UpdatePlanParamsSchema") */ + typeName: string; +} + +/** + * Options for transforming a Zod schema + */ +export interface TransformOptions { + /** Fields to omit from the schema */ + omitFields: string[]; + /** Fields to rename (oldName -> newName) */ + renameFields?: Record; + /** Additional fields to add to the schema */ + extendFields: Record; + /** Whether to keep snake_case (true) or convert to camelCase (false) */ + keepCase: boolean; +} + +/** + * Extract a Zod schema from a TypeScript source file + */ +export function extractZodSchema( + sourceFilePath: string, + schemaName: string, +): ExtractedZodSchema { + const program = ts.createProgram([sourceFilePath], { + target: ts.ScriptTarget.ES2020, + module: ts.ModuleKind.CommonJS, + skipLibCheck: true, + noResolve: true, + }); + + const sourceFile = program.getSourceFile(sourceFilePath); + if (!sourceFile) { + throw new Error(`Could not find source file: ${sourceFilePath}`); + } + + // Find the schema declaration + let schemaDeclaration: ts.VariableDeclaration | null = null; + let jsdoc: string | null = null; + + function visit(node: ts.Node) { + if (ts.isVariableStatement(node)) { + // Extract JSDoc from the variable statement + const jsDocNodes = (node as unknown as { jsDoc: ts.JSDoc[] }).jsDoc; + if (jsDocNodes && jsDocNodes.length > 0) { + const jsDoc = jsDocNodes[0]; + if (jsDoc?.comment) { + if (typeof jsDoc.comment === "string") { + jsdoc = jsDoc.comment.trim(); + } else if (Array.isArray(jsDoc.comment)) { + jsdoc = jsDoc.comment + .map((part: { text: string }) => + typeof part === "string" ? part : part.text, + ) + .join("") + .trim(); + } + } + } + + // Find the declaration + node.declarationList.declarations.forEach((declaration) => { + if ( + ts.isVariableDeclaration(declaration) && + declaration.name && + ts.isIdentifier(declaration.name) && + declaration.name.text === schemaName + ) { + schemaDeclaration = declaration; + } + }); + } + ts.forEachChild(node, visit); + } + + visit(sourceFile); + + if (!schemaDeclaration || !schemaDeclaration.initializer) { + throw new Error(`Schema ${schemaName} not found in ${sourceFilePath}`); + } + + // Extract the schema code + const schemaCode = schemaDeclaration.initializer.getText(sourceFile); + + // Validate that we got a schema + if (!schemaCode || schemaCode.trim().length === 0) { + throw new Error(`Schema ${schemaName} initializer is empty`); + } + + // Extract .meta() descriptions + const metaDescriptions = extractMetaDescriptions(schemaCode); + + // Infer type name (e.g., "UpdatePlanParamsSchema" -> "UpdatePlanParams") + const typeName = schemaName.replace(/Schema$/, ""); + + return { + schemaCode, + jsdoc, + metaDescriptions, + typeName, + }; +} + +/** + * Extract field descriptions from .meta() calls in Zod schema code + * Handles nested fields (e.g., "price.amount", "reset.interval") + */ +export function extractMetaDescriptions( + schemaCode: string, +): Record { + const descriptions: Record = {}; + + // Match top-level fields with .meta() + const metaRegex = + /(\w+):\s*z\.[^,}]+\.meta\(\s*\{\s*description:\s*["']([^"']+)["']/g; + let match: RegExpExecArray | null; + + while ((match = metaRegex.exec(schemaCode)) !== null) { + const fieldName = match[1]; + const description = match[2]; + if (fieldName && description) { + descriptions[fieldName] = description; + } + } + + // Extract nested field descriptions by parsing object structures + // Look for patterns like: fieldName: z.object({ nestedField: z.type().meta({...}) }) + const lines = schemaCode.split('\n'); + let currentPath: string[] = []; + let braceDepth = 0; + + for (const line of lines) { + const trimmed = line.trim(); + + // Track object nesting + if (trimmed.includes('.object({')) { + const fieldMatch = trimmed.match(/(\w+):\s*z/); + if (fieldMatch && fieldMatch[1]) { + currentPath.push(fieldMatch[1]); + } + } + + // Track brace depth + for (const char of trimmed) { + if (char === '{') braceDepth++; + if (char === '}') braceDepth--; + } + + // Extract nested field .meta() + const nestedMatch = trimmed.match(/(\w+):\s*z\.[^,}]+\.meta\(\s*\{\s*description:\s*["']([^"']+)["']/); + if (nestedMatch && nestedMatch[1] && nestedMatch[2] && currentPath.length > 0) { + const fullPath = [...currentPath, nestedMatch[1]].join('.'); + descriptions[fullPath] = nestedMatch[2]; + } + + // Pop path when closing object + if (trimmed.includes('})') && braceDepth < currentPath.length) { + currentPath.pop(); + } + } + + return descriptions; +} + +/** + * Transform a Zod schema with field operations (omit, rename, extend) + */ +export function transformZodSchema( + schemaCode: string, + options: TransformOptions, +): string { + // Extract the object definition from z.object({ ... }) + // We need to properly handle nested braces + // Handle schemas that have newlines (z\n.object( or z.object() + const objectStartMatch = schemaCode.match(/z\s*\.object\s*\(/); + if (!objectStartMatch) { + throw new Error("Could not find z.object( in schema"); + } + const objectStart = objectStartMatch.index ?? 0; + + // Find the matching closing brace + let braceCount = 0; + let inString = false; + let stringChar = ""; + let objectBodyStart = -1; + let objectBodyEnd = -1; + + // Start after the matched "z.object(" (or z\n.object() + const searchStart = objectStart + objectStartMatch[0].length; + + for (let i = searchStart; i < schemaCode.length; i++) { + const char = schemaCode[i]; + + // Handle string boundaries + if ((char === '"' || char === "'" || char === "`") && schemaCode[i - 1] !== "\\") { + if (inString && char === stringChar) { + inString = false; + stringChar = ""; + } else if (!inString) { + inString = true; + stringChar = char; + } + continue; + } + + if (inString) continue; + + if (char === "{") { + if (braceCount === 0) { + objectBodyStart = i + 1; + } + braceCount++; + } else if (char === "}") { + braceCount--; + if (braceCount === 0) { + objectBodyEnd = i; + break; + } + } + } + + if (objectBodyStart === -1 || objectBodyEnd === -1) { + throw new Error("Could not parse Zod object schema - mismatched braces"); + } + + let objectBody = schemaCode.substring(objectBodyStart, objectBodyEnd); + + // Parse fields from the object body + const fields = parseZodObjectFields(objectBody); + + // Apply transformations + const transformedFields = fields + .filter((field) => !options.omitFields.includes(field.name)) + .map((field) => { + let fieldName = field.name; + + // Apply rename + if (options.renameFields && options.renameFields[fieldName]) { + fieldName = options.renameFields[fieldName] ?? fieldName; + } + + // Apply case conversion if needed + if (!options.keepCase) { + fieldName = toCamelCase(fieldName); + } + + // Fix indentation in zodType (replace leading spaces/tabs with proper indent) + let zodType = field.zodType; + // Remove leading whitespace from multi-line types and re-indent + if (zodType.includes("\n")) { + const lines = zodType.split("\n"); + zodType = lines.map((line, i) => { + if (i === 0) return line.trim(); + return " " + line.trim(); + }).join("\n"); + } + + return { ...field, name: fieldName, zodType }; + }); + + // Add extended fields + Object.entries(options.extendFields).forEach(([fieldName, config]) => { + const finalFieldName = options.keepCase + ? fieldName + : toCamelCase(fieldName); + transformedFields.push({ + name: finalFieldName, + zodType: config.zodType, + description: config.description || null, + }); + }); + + // Reconstruct the schema + const fieldStrings = transformedFields.map((field) => { + if (field.description) { + return ` /** ${field.description} */\n ${field.name}: ${field.zodType}`; + } + return ` ${field.name}: ${field.zodType}`; + }); + + return `z.object({\n${fieldStrings.join(",\n")}\n})`; +} + +/** + * Parse Zod object fields from the object body string + */ +function parseZodObjectFields( + objectBody: string, +): Array<{ name: string; zodType: string; description: string | null }> { + const fields: Array<{ + name: string; + zodType: string; + description: string | null; + }> = []; + + // Split by field definitions (looking for pattern: fieldName: zod_type,) + const lines = objectBody.split("\n"); + let currentField: { name: string; zodType: string; lines: string[] } | null = null; + let fieldDepth = 0; // Track depth AFTER seeing the field name + + for (let i = 0; i < lines.length; i++) { + const line = lines[i] ?? ""; + const trimmed = line.trim(); + + // Skip empty lines when not in a field + if (trimmed.length === 0 && !currentField) continue; + + // Check if this is the start of a NEW top-level field + const fieldMatch = trimmed.match(/^(\w+):\s*(.+)/); + + if (fieldMatch && !currentField) { + // Start a new field + currentField = { + name: fieldMatch[1] ?? "", + zodType: "", + lines: [fieldMatch[2] ?? ""], + }; + + // Count depth in the first line + const firstLine = fieldMatch[2] ?? ""; + for (const char of firstLine) { + if (char === "{" || char === "(") fieldDepth++; + if (char === "}" || char === ")") fieldDepth--; + } + } else if (currentField) { + // We're continuing the current field + currentField.lines.push(trimmed); + + // Update depth + for (const char of trimmed) { + if (char === "{" || char === "(") fieldDepth++; + if (char === "}" || char === ")") fieldDepth--; + } + + // Check if field is complete (depth back to 0 and line ends with comma or is the last) + if (fieldDepth === 0) { + // Field is complete - check if this line ends with comma or if next line is a new field + const endsWithComma = trimmed.endsWith(",") || trimmed.endsWith("},") || trimmed.endsWith("),"); + const nextLine = lines[i + 1]?.trim() || ""; + const nextIsField = nextLine.match(/^(\w+):\s*/); + + if (endsWithComma || nextIsField || i === lines.length - 1) { + // Save the field + const zodType = currentField.lines.join("\n").trim().replace(/,\s*$/, ""); + fields.push({ + name: currentField.name, + zodType, + description: null, + }); + currentField = null; + fieldDepth = 0; + } + } + } + } + + // Save last field if exists + if (currentField) { + const zodType = currentField.lines.join("\n").trim().replace(/,\s*$/, ""); + fields.push({ + name: currentField.name, + zodType, + description: null, + }); + } + + return fields; +} + +/** + * Convert snake_case to camelCase + */ +function toCamelCase(str: string): string { + return str.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase()); +} + +/** + * Generate a complete Zod schema file with JSDoc and type exports + */ +export function generateZodSchemaFile( + schemaCode: string, + typeName: string, + outputPath: string, + jsdoc: string | null, + metaDescriptions: Record, +): void { + const schemaName = `${typeName}Schema`; + + // Build the file content + let content = `// AUTO-GENERATED - DO NOT EDIT MANUALLY +// Generated from @autumn/shared schemas +// Run \`pnpm gen:atmn\` to regenerate + +import { z } from "zod/v4"; + +`; + + // Add JSDoc if present + if (jsdoc) { + content += `/** + * ${jsdoc.replace(/\*\//g, "* /")} + */ +`; + } + + // Add the schema + content += `export const ${schemaName} = ${schemaCode}; + +`; + + // Add type export + content += `export type ${typeName} = z.infer; +`; + + writeFileSync(outputPath, content); +} + +/** + * Generate a TypeScript interface with JSDoc from meta descriptions + * This is used for manual type definitions in discriminated unions + */ +export function generateTypeScriptInterfaceWithJSDoc( + typeName: string, + fields: Array<{ + name: string; + type: string; + description?: string; + optional?: boolean; + }>, +): string { + const fieldStrings = fields.map((field) => { + let result = ""; + if (field.description) { + result += ` /** ${field.description} */\n`; + } + result += ` ${field.name}${field.optional ? "?" : ""}: ${field.type};`; + return result; + }); + + return `export type ${typeName} = {\n${fieldStrings.join("\n\n")}\n};`; +} diff --git a/typegen/genUtils/atmnTypeHelpers.ts b/typegen/genUtils/atmnTypeHelpers.ts new file mode 100644 index 00000000..68184b68 --- /dev/null +++ b/typegen/genUtils/atmnTypeHelpers.ts @@ -0,0 +1,649 @@ +/** + * Generic helpers for generating TypeScript types with JSDoc from meta descriptions + * Can be reused for any entity type (Plans, Features, Referrals, etc.) + */ + +/** + * Configuration for a field in a TypeScript type + */ +export interface FieldConfig { + name: string; + type: string; + optional?: boolean; + descriptionKey?: string; // Key to look up in metaDescriptions + defaultDescription?: string; // Fallback if not found in meta + nestedFields?: FieldConfig[]; // For nested objects +} + +/** + * Configuration for a discriminated union variant + */ +export interface DiscriminatedVariantConfig { + name: string; + description?: string; + fields: FieldConfig[]; +} + +/** + * Generate a TypeScript type with per-field JSDoc + */ +export function generateTypeWithJSDoc({ + typeName, + fields, + metaDescriptions, + comment, +}: { + typeName: string; + fields: FieldConfig[]; + metaDescriptions: Record; + comment?: string; +}): string { + const generateFields = ( + fields: FieldConfig[], + indent: string = " ", + ): string => { + return fields + .map((field) => { + const description = field.descriptionKey + ? metaDescriptions[field.descriptionKey] || field.defaultDescription + : field.defaultDescription; + + let result = ""; + + // Add JSDoc if we have a description + if (description) { + result += `${indent}/** ${description} */\n`; + } + + // Handle nested objects + if (field.nestedFields) { + result += `${indent}${field.name}${field.optional ? "?" : ""}: {\n`; + result += generateFields(field.nestedFields, indent + " "); + result += `${indent}}`; + } else { + result += `${indent}${field.name}${field.optional ? "?" : ""}: ${field.type};`; + } + + return result; + }) + .join("\n\n"); + }; + + let result = ""; + if (comment) { + result += `/**\n * ${comment}\n */\n`; + } + result += `export type ${typeName} = {\n`; + result += generateFields(fields); + result += `\n};\n`; + + return result; +} + +/** + * Generate a discriminated union with per-field JSDoc + */ +export function generateDiscriminatedUnion({ + baseTypeName, + unionTypeName, + variants, + metaDescriptions, + typeAliases, + comment, +}: { + baseTypeName?: string; + unionTypeName: string; + variants: DiscriminatedVariantConfig[]; + metaDescriptions: Record; + typeAliases?: Record; // e.g., { ResetInterval: "one_off" | "minute" | ... } + comment?: string; +}): string { + let result = ""; + + // Add type aliases if provided + if (typeAliases) { + result += "// Type aliases for literal unions\n"; + for (const [name, union] of Object.entries(typeAliases)) { + result += `export type ${name} = ${union};\n`; + } + result += "\n"; + } + + // Add base type reference if needed + if (baseTypeName) { + result += `// Base type for ${unionTypeName}\n`; + result += `type ${baseTypeName}Base = z.infer;\n\n`; + } + + // Generate each variant + for (const variant of variants) { + result += generateTypeWithJSDoc({ + typeName: variant.name, + fields: variant.fields, + metaDescriptions, + comment: variant.description, + }); + result += "\n"; + } + + // Generate the union + if (comment) { + result += `/**\n * ${comment}\n */\n`; + } + result += `export type ${unionTypeName} = ${variants.map((v) => v.name).join(" | ")};\n`; + + return result; +} + +/** + * Generate PlanFeature discriminated union (using generic helpers) + */ +export function generatePlanFeatureDiscriminatedUnion( + metaDescriptions: Record, +): string { + const typeAliases = { + ResetInterval: + '"one_off" | "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year"', + BillingInterval: '"month" | "quarter" | "semi_annual" | "year"', + UsageModel: '"prepaid" | "pay_per_use"', + OnIncrease: '"prorate" | "charge_immediately"', + OnDecrease: '"prorate" | "refund_immediately" | "no_action"', + }; + + // Common fields for all variants + const commonFields: FieldConfig[] = [ + { + name: "feature_id", + type: "string", + descriptionKey: "feature_id", + defaultDescription: "Reference to the feature being configured", + }, + { + name: "granted", + type: "number", + optional: true, + descriptionKey: "granted", + defaultDescription: "Amount of usage granted to customers", + }, + { + name: "unlimited", + type: "boolean", + optional: true, + descriptionKey: "unlimited", + defaultDescription: "Whether usage is unlimited", + }, + ]; + + const prorationFields: FieldConfig[] = [ + { + name: "on_increase", + type: "OnIncrease", + descriptionKey: "proration.on_increase", + defaultDescription: "Behavior when quantity increases", + }, + { + name: "on_decrease", + type: "OnDecrease", + descriptionKey: "proration.on_decrease", + defaultDescription: "Behavior when quantity decreases", + }, + ]; + + const rolloverFields: FieldConfig[] = [ + { + name: "max", + type: "number", + descriptionKey: "rollover.max", + defaultDescription: "Maximum amount that can roll over", + }, + { + name: "expiry_duration_type", + type: "ResetInterval", + descriptionKey: "rollover.expiry_duration_type", + defaultDescription: "How long rollover lasts before expiring", + }, + { + name: "expiry_duration_length", + type: "number", + optional: true, + descriptionKey: "rollover.expiry_duration_length", + defaultDescription: "Duration length for rollover expiry", + }, + ]; + + const variants: DiscriminatedVariantConfig[] = [ + // Variant 1: With reset interval + { + name: "PlanFeatureWithReset", + description: "Reset with interval (price cannot have interval)", + fields: [ + ...commonFields, + { + name: "reset", + type: "object", + defaultDescription: "Reset configuration for metered features", + nestedFields: [ + { + name: "interval", + type: "ResetInterval", + descriptionKey: "reset.interval", + defaultDescription: "How often usage resets", + }, + { + name: "interval_count", + type: "number", + optional: true, + descriptionKey: "reset.interval_count", + defaultDescription: "Number of intervals between resets", + }, + { + name: "when_enabled", + type: "boolean", + optional: true, + descriptionKey: "reset.when_enabled", + defaultDescription: + "Whether to reset usage when feature is enabled", + }, + ], + }, + { + name: "price", + type: "object", + optional: true, + defaultDescription: + "Pricing configuration (interval not allowed when using reset.interval)", + nestedFields: [ + { + name: "amount", + type: "number", + optional: true, + descriptionKey: "price.amount", + defaultDescription: "Flat price per unit in cents", + }, + { + name: "tiers", + type: 'Array<{ to: number | "inf"; amount: number }>', + optional: true, + descriptionKey: "price.tiers", + defaultDescription: + "Tiered pricing structure based on usage ranges", + }, + { + name: "interval", + type: "never", + optional: true, + defaultDescription: "Cannot be used with reset.interval", + }, + { + name: "interval_count", + type: "never", + optional: true, + defaultDescription: "Cannot be used with reset.interval", + }, + { + name: "billing_units", + type: "number", + optional: true, + descriptionKey: "price.billing_units", + defaultDescription: "Number of units per billing cycle", + }, + { + name: "usage_model", + type: "UsageModel", + optional: true, + descriptionKey: "price.usage_model", + defaultDescription: "Billing model: 'prepaid' or 'pay_per_use'", + }, + { + name: "max_purchase", + type: "number", + optional: true, + descriptionKey: "price.max_purchase", + defaultDescription: "Maximum purchasable quantity", + }, + ], + }, + { + name: "proration", + type: "object", + optional: true, + defaultDescription: "Proration rules for quantity changes", + nestedFields: prorationFields, + }, + { + name: "rollover", + type: "object", + optional: true, + defaultDescription: "Rollover policy for unused usage", + nestedFields: rolloverFields, + }, + ], + }, + // Variant 2: With price interval + { + name: "PlanFeatureWithPrice", + description: "Price with interval (reset cannot have interval)", + fields: [ + ...commonFields, + { + name: "reset", + type: "object", + optional: true, + defaultDescription: + "Reset configuration (interval not allowed when using price.interval)", + nestedFields: [ + { + name: "interval", + type: "never", + optional: true, + defaultDescription: "Cannot be used with price.interval", + }, + { + name: "interval_count", + type: "never", + optional: true, + defaultDescription: "Cannot be used with price.interval", + }, + { + name: "when_enabled", + type: "boolean", + optional: true, + descriptionKey: "reset.when_enabled", + defaultDescription: + "Whether to reset usage when feature is enabled", + }, + ], + }, + { + name: "price", + type: "object", + defaultDescription: "Pricing configuration for usage-based billing", + nestedFields: [ + { + name: "amount", + type: "number", + optional: true, + descriptionKey: "price.amount", + defaultDescription: "Flat price per unit in cents", + }, + { + name: "tiers", + type: 'Array<{ to: number | "inf"; amount: number }>', + optional: true, + descriptionKey: "price.tiers", + defaultDescription: + "Tiered pricing structure based on usage ranges", + }, + { + name: "interval", + type: "BillingInterval", + descriptionKey: "price.interval", + defaultDescription: + "Billing frequency (cannot be used with reset.interval)", + }, + { + name: "interval_count", + type: "number", + optional: true, + descriptionKey: "price.interval_count", + defaultDescription: "Number of intervals between billing", + }, + { + name: "billing_units", + type: "number", + optional: true, + descriptionKey: "price.billing_units", + defaultDescription: "Number of units per billing cycle", + }, + { + name: "usage_model", + type: "UsageModel", + descriptionKey: "price.usage_model", + defaultDescription: "Billing model: 'prepaid' or 'pay_per_use'", + }, + { + name: "max_purchase", + type: "number", + optional: true, + descriptionKey: "price.max_purchase", + defaultDescription: "Maximum purchasable quantity", + }, + ], + }, + { + name: "proration", + type: "object", + optional: true, + defaultDescription: "Proration rules for quantity changes", + nestedFields: prorationFields, + }, + { + name: "rollover", + type: "object", + optional: true, + defaultDescription: "Rollover policy for unused usage", + nestedFields: rolloverFields, + }, + ], + }, + // Variant 3: Basic (neither has interval) + { + name: "PlanFeatureBasic", + description: "Neither has interval", + fields: [ + ...commonFields, + { + name: "reset", + type: "object", + optional: true, + defaultDescription: "Reset configuration (no interval)", + nestedFields: [ + { + name: "interval", + type: "never", + optional: true, + defaultDescription: "Not allowed in this variant", + }, + { + name: "interval_count", + type: "never", + optional: true, + defaultDescription: "Not allowed in this variant", + }, + { + name: "when_enabled", + type: "boolean", + optional: true, + descriptionKey: "reset.when_enabled", + defaultDescription: + "Whether to reset usage when feature is enabled", + }, + ], + }, + { + name: "price", + type: "object", + optional: true, + defaultDescription: "Pricing configuration (no interval)", + nestedFields: [ + { + name: "amount", + type: "number", + optional: true, + descriptionKey: "price.amount", + defaultDescription: "Flat price per unit in cents", + }, + { + name: "tiers", + type: 'Array<{ to: number | "inf"; amount: number }>', + optional: true, + descriptionKey: "price.tiers", + defaultDescription: + "Tiered pricing structure based on usage ranges", + }, + { + name: "interval", + type: "never", + optional: true, + defaultDescription: "Not allowed in this variant", + }, + { + name: "interval_count", + type: "never", + optional: true, + defaultDescription: "Not allowed in this variant", + }, + { + name: "billing_units", + type: "number", + optional: true, + descriptionKey: "price.billing_units", + defaultDescription: "Number of units per billing cycle", + }, + { + name: "usage_model", + type: "UsageModel", + optional: true, + descriptionKey: "price.usage_model", + defaultDescription: "Billing model: 'prepaid' or 'pay_per_use'", + }, + { + name: "max_purchase", + type: "number", + optional: true, + descriptionKey: "price.max_purchase", + defaultDescription: "Maximum purchasable quantity", + }, + ], + }, + { + name: "proration", + type: "object", + optional: true, + defaultDescription: "Proration rules for quantity changes", + nestedFields: prorationFields, + }, + { + name: "rollover", + type: "object", + optional: true, + defaultDescription: "Rollover policy for unused usage", + nestedFields: rolloverFields, + }, + ], + }, + ]; + + return generateDiscriminatedUnion({ + baseTypeName: "PlanFeature", + unionTypeName: "PlanFeature", + variants, + metaDescriptions, + typeAliases, + comment: + "Plan feature configuration with compile-time mutual exclusivity validation. Use reset.interval OR price.interval, but not both.", + }); +} + +/** + * Generate Plan type with JSDoc from meta descriptions (using generic helpers) + */ +export function generatePlanTypeWithJSDoc( + metaDescriptions: Record, +): string { + let result = ""; + + // Add base type reference + result += "\n// Override Plan type to use PlanFeature discriminated union\n"; + result += "type PlanBase = z.infer;\n"; + result += "export type FreeTrial = z.infer;\n\n"; + + // Generate Plan type with JSDoc + const planFields: FieldConfig[] = [ + { + name: "id", + type: "string", + descriptionKey: "id", + defaultDescription: "Unique identifier for the plan", + }, + { + name: "name", + type: "string", + descriptionKey: "name", + defaultDescription: "Display name for the plan", + }, + { + name: "description", + type: "string | null", + optional: true, + descriptionKey: "description", + defaultDescription: + "Optional description explaining what this plan offers", + }, + { + name: "group", + type: "string", + optional: true, + descriptionKey: "group", + defaultDescription: "Grouping identifier for organizing related plans", + }, + { + name: "add_on", + type: "boolean", + optional: true, + descriptionKey: "add_on", + defaultDescription: + "Whether this plan can be purchased alongside other plans", + }, + { + name: "default", + type: "boolean", + optional: true, + descriptionKey: "default", + defaultDescription: "Whether this is the default plan for new customers", + }, + { + name: "price", + type: "object", + optional: true, + descriptionKey: "price", + defaultDescription: "Base price for the plan", + nestedFields: [ + { + name: "amount", + type: "number", + descriptionKey: "price.amount", + defaultDescription: "Price in your currency (e.g., 50 for $50.00)", + }, + { + name: "interval", + type: "BillingInterval", + descriptionKey: "price.interval", + defaultDescription: "Billing frequency", + }, + ], + }, + { + name: "features", + type: "PlanFeature[]", + optional: true, + descriptionKey: "features", + defaultDescription: "Features included with usage limits and pricing", + }, + { + name: "free_trial", + type: "FreeTrial | null", + optional: true, + descriptionKey: "free_trial", + defaultDescription: "Free trial period before billing begins", + }, + ]; + + result += generateTypeWithJSDoc({ + typeName: "Plan", + fields: planFields, + metaDescriptions, + }); + + return result; +} diff --git a/typegen/genUtils/index.ts b/typegen/genUtils/index.ts index e84e70c8..861550da 100644 --- a/typegen/genUtils/index.ts +++ b/typegen/genUtils/index.ts @@ -10,3 +10,23 @@ export { MethodGenerator } from "./MethodGenerator.js"; export { TypeGenerator } from "./TypeGenerator.js"; export { ConvexValidatorGenerator } from "./ConvexValidatorGenerator.js"; export { TypeGeneratorUtils } from "./utils.js"; +export { + extractZodSchema, + transformZodSchema, + generateZodSchemaFile, + generateTypeScriptInterfaceWithJSDoc, + extractMetaDescriptions, +} from "./ZodSchemaGenerator.js"; +export { + generateBuilderFunction, + generateBuilderFunctionsFile, + type BuilderConfig, +} from "./BuilderGenerator.js"; +export { + generatePlanFeatureDiscriminatedUnion, + generatePlanTypeWithJSDoc, + generateTypeWithJSDoc, + generateDiscriminatedUnion, + type FieldConfig, + type DiscriminatedVariantConfig, +} from "./atmnTypeHelpers.js"; diff --git a/typegen/generate-atmn-types.ts b/typegen/generate-atmn-types.ts new file mode 100644 index 00000000..47a1e9ed --- /dev/null +++ b/typegen/generate-atmn-types.ts @@ -0,0 +1,108 @@ +#!/usr/bin/env tsx + +import path from "node:path"; +import dotenv from "dotenv"; +import { writeFileSync } from "fs"; +import { TypeGenerator, TypeGeneratorUtils, generateBuilderFunctionsFile, extractZodSchema } from "./genUtils/index.js"; +import { getAtmnTypeConfigs } from "./typeConfigs.js"; +import { generatePlanFeatureDiscriminatedUnion, generatePlanTypeWithJSDoc } from "./genUtils/atmnTypeHelpers.js"; + +/** + * Generate snake_case types for atmn CLI from @autumn/shared + * + * This script converts Zod schemas from the server to CLI-friendly types. + * Unlike autumn-js which uses camelCase, atmn keeps snake_case. + * + * Configuration is defined in ./typeConfigs.ts - check getAtmnTypeConfigs() + */ +async function main() { + const startTime = Date.now(); + console.log("🎯 Generating types for atmn CLI...\n"); + + try { + // Load environment variables from .env + dotenv.config({ path: path.join(__dirname, '.env') }); + + const serverPath = process.env.AUTUMN_SERVER_PATH; + if (!serverPath) { + throw new Error( + 'AUTUMN_SERVER_PATH env var not set.\n' + + 'Copy typegen/.env.example to typegen/.env and set the path to your Autumn server shared directory' + ); + } + + // Define paths + const atmnPath = path.resolve(__dirname, "../atmn"); + + // Validate all required paths exist + TypeGeneratorUtils.validatePaths([ + { name: "Autumn server/shared", path: serverPath }, + { name: "atmn", path: atmnPath }, + ]); + + // Get type generation configuration + const typeConfig = getAtmnTypeConfigs(serverPath, atmnPath); + + // Generate parameter types (Plan, Feature, PlanFeature, FreeTrial) + const typeStart = Date.now(); + console.log(`📋 Generating ${typeConfig.configs.length} type schemas...`); + const generator = new TypeGenerator(serverPath, atmnPath); + await generator.generateTypes(typeConfig); + console.log(` ⏱️ Types generated in ${Date.now() - typeStart}ms`); + + // Extract meta descriptions from PlanFeature schema for manual type generation + const planFeatureConfig = typeConfig.configs.find(c => c.targetName === "PlanFeature"); + if (planFeatureConfig) { + const planFeatureSourceFile = path.join(serverPath, "api/products/planFeature/planFeatureOpModels.ts"); + const { metaDescriptions: planFeatureMeta } = extractZodSchema(planFeatureSourceFile, "UpdatePlanFeatureSchema"); + + // Extract from Plan schema for Plan type JSDoc + const planSourceFile = path.join(serverPath, "api/products/planOpModels.ts"); + const { metaDescriptions: planMeta } = extractZodSchema(planSourceFile, "CreatePlanParamsSchema"); + + // Generate manual type unions with JSDoc + const planModelsFile = path.join(atmnPath, "source/compose/models/planModels.ts"); + const planFeatureUnion = generatePlanFeatureDiscriminatedUnion(planFeatureMeta); + const planType = generatePlanTypeWithJSDoc(planMeta); + + // Read existing content and append + const fs = await import("fs"); + const existingContent = fs.readFileSync(planModelsFile, "utf-8"); + const newContent = existingContent + "\n" + planFeatureUnion + "\n" + planType + "\n"; + fs.writeFileSync(planModelsFile, newContent); + + console.log(` 📝 Added discriminated unions with JSDoc`); + } + + // Generate builder functions (plan(), feature(), planFeature()) + if (typeConfig.builders && typeConfig.builders.length > 0) { + const builderStart = Date.now(); + console.log(`\n🔧 Generating ${typeConfig.builders.length} builder functions...`); + + // Collect imports for builders + const imports = [ + { typeName: "Plan, PlanFeature, FreeTrial", from: "../models/planModels.js" }, + { typeName: "Feature", from: "../models/featureModels.js" }, + ]; + + // Generate the builders file + const builderFile = typeConfig.builders[0]?.targetFile; + if (builderFile) { + generateBuilderFunctionsFile(typeConfig.builders, builderFile, imports); + console.log(` ⏱️ Builders generated in ${Date.now() - builderStart}ms`); + } + } + + const totalTime = Date.now() - startTime; + console.log(`\n✅ All type generation completed in ${totalTime}ms!`); + console.log( + `\n📝 Generated files:\n - source/compose/models/planModels.ts\n - source/compose/models/featureModels.ts\n - source/compose/builders/builderFunctions.ts`, + ); + } catch (error) { + console.error("💥 atmn type generation failed:", error); + process.exit(1); + } +} + +// Run immediately +main(); diff --git a/typegen/package.json b/typegen/package.json index 243eba2f..5ad1c736 100644 --- a/typegen/package.json +++ b/typegen/package.json @@ -12,6 +12,7 @@ "license": "ISC", "packageManager": "pnpm@10.14.0", "dependencies": { - "@types/node": "^24.7.1" + "@types/node": "^24.7.1", + "dotenv": "^17.2.3" } } diff --git a/typegen/typeConfigs.ts b/typegen/typeConfigs.ts index 76ee2cd5..4b770404 100644 --- a/typegen/typeConfigs.ts +++ b/typegen/typeConfigs.ts @@ -68,6 +68,38 @@ export interface TypeConfig { omitFields?: string[]; /** Additional fields to extend the schema with (field name -> Zod schema) */ extendFields?: Record; + /** Source type: "interface" (TypeScript interface) or "zod" (Zod schema) */ + sourceType?: "interface" | "zod"; + /** Whether to keep snake_case (true) or convert to camelCase (false). Default: false for autumn-js, true for atmn */ + keepCase?: boolean; + /** Fields to rename (oldName -> newName) */ + renameFields?: Record; + /** Replace all enum references with z.string() */ + replaceEnumsWithStrings?: boolean; + /** Skip exporting the TypeScript type (useful when manually defining discriminated unions) */ + skipTypeExport?: boolean; +} + +/** + * Configuration for a builder function + */ +export interface BuilderConfig { + /** Builder function name (e.g., "plan", "feature") */ + builderName: string; + /** Schema name to reference (e.g., "PlanSchema") */ + schemaName: string; + /** Parameter type name (e.g., "Plan", "Feature") */ + paramType: string; + /** Source file to extract JSDoc from (optional) */ + sourceFile?: string; + /** Target file to write builder to */ + targetFile: string; + /** Whether to include runtime validation (.parse()) */ + validationEnabled?: boolean; + /** Custom JSDoc override */ + jsdocOverride?: string; + /** Default values for fields (undefined -> default value) */ + defaults?: Record; } /** @@ -78,6 +110,13 @@ export interface TypeGenerationConfig { configs: TypeConfig[]; /** Relative path within target package for generated types */ outputDir: string; + /** Builder function configurations (optional) */ + builders?: BuilderConfig[]; + /** Manual type unions to append after generated types */ + manualTypeUnions?: Array<{ + targetFile: string; + typeCode: string; + }>; } /** @@ -302,13 +341,42 @@ export function getAutumnJSMethodConfigs( interfaceDescription: "Methods available in useCustomer hook for managing customer subscriptions and features", methods: [ - { sourceName: "attach", targetName: "attach", exclusions: ["body.customer_id"] }, - { sourceName: "checkout", targetName: "checkout", exclusions: ["body.customer_id"] }, - { sourceName: "check", targetName: "check", isSync: true, exclusions: ["body.customer_id"] }, - { sourceName: "track", targetName: "track", exclusions: ["body.customer_id"] }, - { sourceName: "cancel", targetName: "cancel", exclusions: ["body.customer_id"] }, - { sourceName: "setupPayment", targetName: "setupPayment", exclusions: ["body.customer_id"] }, - { sourceName: "billingPortal", targetName: "openBillingPortal", exclusions: ["body.customer_id"] }, + { + sourceName: "attach", + targetName: "attach", + exclusions: ["body.customer_id"], + }, + { + sourceName: "checkout", + targetName: "checkout", + exclusions: ["body.customer_id"], + }, + { + sourceName: "check", + targetName: "check", + isSync: true, + exclusions: ["body.customer_id"], + }, + { + sourceName: "track", + targetName: "track", + exclusions: ["body.customer_id"], + }, + { + sourceName: "cancel", + targetName: "cancel", + exclusions: ["body.customer_id"], + }, + { + sourceName: "setupPayment", + targetName: "setupPayment", + exclusions: ["body.customer_id"], + }, + { + sourceName: "billingPortal", + targetName: "openBillingPortal", + exclusions: ["body.customer_id"], + }, ], }, // UseEntity methods @@ -322,10 +390,27 @@ export function getAutumnJSMethodConfigs( interfaceDescription: "Methods available in useEntity hook for entity-scoped subscription operations", methods: [ - { sourceName: "attach", targetName: "attach", exclusions: ["body.customer_id"] }, - { sourceName: "cancel", targetName: "cancel", exclusions: ["body.customer_id"] }, - { sourceName: "track", targetName: "track", exclusions: ["body.customer_id"] }, - { sourceName: "check", targetName: "check", isSync: true, exclusions: ["body.customer_id"] }, + { + sourceName: "attach", + targetName: "attach", + exclusions: ["body.customer_id"], + }, + { + sourceName: "cancel", + targetName: "cancel", + exclusions: ["body.customer_id"], + }, + { + sourceName: "track", + targetName: "track", + exclusions: ["body.customer_id"], + }, + { + sourceName: "check", + targetName: "check", + isSync: true, + exclusions: ["body.customer_id"], + }, ], }, ]; @@ -392,12 +477,204 @@ export function getConvexTypeConfigs( /** * Type configurations for atmn CLI generation - * TODO: Implement when ready to generate CLI types + * Generates Plan V2 API types from @autumn/shared schemas */ export function getAtmnTypeConfigs( - _tsSDKPath: string, - _atmnPath: string, -): TypeConfig[] { - // Placeholder for future CLI type generation - return []; + serverPath: string, // Path to @autumn/shared + atmnPath: string, // Path to atmn package +): TypeGenerationConfig { + // Source files from @autumn/shared + const planOpModelsFile = path.join( + serverPath, + "api/products/planOpModels.ts", + ); + const planFeatureOpModelsFile = path.join( + serverPath, + "api/products/planFeature/planFeatureOpModels.ts", + ); + const apiPlanFile = path.join(serverPath, "api/products/apiPlan.ts"); + const apiFeatureFile = path.join(serverPath, "api/features/apiFeature.ts"); + + // Target directories in atmn + const modelsDir = path.join(atmnPath, "source/compose/models"); + const buildersDir = path.join(atmnPath, "source/compose/builders"); + + return { + outputDir: "source/compose/models", + configs: [ + // ================== + // PLAN + // ================== + { + sourceName: "CreatePlanParamsSchema", + targetName: "Plan", + sourceFile: planOpModelsFile, + targetFile: path.join(modelsDir, "planModels.ts"), + sourceType: "zod", + keepCase: true, // Keep snake_case + replaceEnumsWithStrings: true, + skipTypeExport: true, // Override type manually to use PlanFeature union + omitFields: ["version", "id", "name", "group"], + extendFields: { + id: { + zodType: "z.string().nonempty().regex(idRegex)", + description: "Unique identifier for the plan", + }, + name: { + zodType: "z.string().nonempty()", + description: "Display name for the plan", + }, + group: { + zodType: 'z.string().default("")', + description: "Group for organizing plans", + }, + }, + }, + + // ================== + // PLAN FEATURE (features in a plan) + // ================== + { + sourceName: "UpdatePlanFeatureSchema", + targetName: "PlanFeature", + sourceFile: planFeatureOpModelsFile, + targetFile: path.join(modelsDir, "planModels.ts"), + sourceType: "zod", + keepCase: true, + replaceEnumsWithStrings: true, + omitFields: [], + extendFields: {}, + skipTypeExport: true, // Don't export type - we'll add discriminated union manually + }, + + // ================== + // FEATURE (reusable feature definitions) + // ================== + { + sourceName: "ApiFeatureSchema", + targetName: "Feature", + sourceFile: apiFeatureFile, + targetFile: path.join(modelsDir, "featureModels.ts"), + sourceType: "zod", + keepCase: true, + omitFields: ["type", "display"], + extendFields: { + type: { + zodType: "z.string()", + description: "The type of the feature (boolean, single_use, continuous_use, credit_system)", + }, + }, + }, + + // ================== + // FREE TRIAL + // ================== + { + sourceName: "ApiFreeTrialV2Schema", + targetName: "FreeTrial", + sourceFile: apiPlanFile, + targetFile: path.join(modelsDir, "planModels.ts"), + sourceType: "zod", + keepCase: true, + replaceEnumsWithStrings: true, + skipTypeExport: true, // Exported in manual unions + omitFields: [], + extendFields: {}, + }, + ], + + // ================== + // BUILDER FUNCTIONS + // ================== + builders: [ + { + builderName: "plan", + schemaName: "PlanSchema", + paramType: "Plan", + targetFile: path.join(buildersDir, "builderFunctions.ts"), + defaults: { + description: null, + add_on: false, + default: false, + group: "", + }, + jsdocOverride: `/** + * Define a pricing plan in your Autumn configuration + * + * @param p - Plan configuration + * @returns Plan object for use in autumn.config.ts + * + * @example + * export const pro = plan({ + * id: 'pro', + * name: 'Pro Plan', + * description: 'For growing teams', + * features: [ + * planFeature({ feature_id: seats.id, granted: 10 }), + * planFeature({ + * feature_id: messages.id, + * granted: 1000, + * reset: { interval: 'month' } + * }) + * ], + * price: { amount: 50, interval: 'month' } + * }); + */`, + }, + { + builderName: "feature", + schemaName: "FeatureSchema", + paramType: "Feature", + targetFile: path.join(buildersDir, "builderFunctions.ts"), + jsdocOverride: `/** + * Define a feature that can be included in plans + * + * @param f - Feature configuration + * @returns Feature object for use in autumn.config.ts + * + * @example + * export const seats = feature({ + * id: 'seats', + * name: 'Team Seats', + * type: 'continuous_use' + * }); + */`, + }, + { + builderName: "planFeature", + schemaName: "PlanFeatureSchema", + paramType: "PlanFeature", + targetFile: path.join(buildersDir, "builderFunctions.ts"), + jsdocOverride: `/** + * Include a feature in a plan with specific configuration + * + * @param config - Feature configuration for this plan + * @returns PlanFeature for use in plan's features array + * + * @example + * // Simple included usage + * planFeature({ + * feature_id: messages.id, + * granted: 1000, + * reset: { interval: 'month' } + * }) + * + * @example + * // Priced feature with tiers + * planFeature({ + * feature_id: seats.id, + * granted: 5, + * price: { + * tiers: [ + * { to: 10, amount: 10 }, + * { to: 'inf', amount: 8 } + * ], + * interval: 'month', + * usage_model: 'pay_per_use' + * } + * }) + */`, + }, + ], + }; } From ec43223dbe5743b791c40f0bceb891f8726154af Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Thu, 23 Oct 2025 15:34:45 +0100 Subject: [PATCH 11/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20push?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmn/source/core/builders/planBuilder.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/atmn/source/core/builders/planBuilder.ts b/atmn/source/core/builders/planBuilder.ts index e725541f..44e7d574 100644 --- a/atmn/source/core/builders/planBuilder.ts +++ b/atmn/source/core/builders/planBuilder.ts @@ -171,7 +171,7 @@ function planFeatureBuilder({ } } - // Proration + // Proration (only if configured) if (planFeature.proration) { const prorationParts: string[] = []; if (planFeature.proration.on_increase) { @@ -185,7 +185,7 @@ function planFeatureBuilder({ } } - // Rollover + // Rollover (only if configured) if (planFeature.rollover) { const rolloverParts: string[] = []; if (notNullish(planFeature.rollover.max)) { @@ -194,7 +194,7 @@ function planFeatureBuilder({ if (planFeature.rollover.expiry_duration_type) { rolloverParts.push(`expiry_duration_type: '${planFeature.rollover.expiry_duration_type}'`); } - if (notNullish(planFeature.rollover.expiry_duration_length)) { + if (notNullish(planFeature.rollover.expiry_duration_length) && planFeature.rollover.expiry_duration_length !== 1) { rolloverParts.push(`expiry_duration_length: ${planFeature.rollover.expiry_duration_length}`); } if (rolloverParts.length > 0) { From 6a519d76d14d2d5c61d8fe810db4ecf6aa501e00 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Thu, 23 Oct 2025 15:35:02 +0100 Subject: [PATCH 12/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20idk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ts-sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-sdk b/ts-sdk index 8f1459fe..e667b0ed 160000 --- a/ts-sdk +++ b/ts-sdk @@ -1 +1 @@ -Subproject commit 8f1459fe927f69a00463bef8d335f7690edbec44 +Subproject commit e667b0ed2e26e3ffce7c6fedd4e62111230ebab0 From 47d25c871e4ec137c89694d957c162aad7ad854d Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Fri, 24 Oct 2025 11:57:20 +0100 Subject: [PATCH 13/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20stuff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmn/package.json | 2 +- atmn/source/commands/pull.ts | 151 +++++++++++++++++- atmn/source/core/generateSDKTypes.ts | 56 +++++++ .../core/transformers/productV2ToPlan.ts | 130 --------------- pnpm-lock.yaml | 3 + 5 files changed, 206 insertions(+), 136 deletions(-) create mode 100644 atmn/source/core/generateSDKTypes.ts delete mode 100644 atmn/source/core/transformers/productV2ToPlan.ts diff --git a/atmn/package.json b/atmn/package.json index f5843adb..6acac743 100644 --- a/atmn/package.json +++ b/atmn/package.json @@ -1,6 +1,6 @@ { "name": "atmn", - "version": "0.0.24", + "version": "0.0.28", "license": "MIT", "bin": "dist/cli.js", "main": "dist/index.js", diff --git a/atmn/source/commands/pull.ts b/atmn/source/commands/pull.ts index 89a2bbf9..517da60e 100644 --- a/atmn/source/commands/pull.ts +++ b/atmn/source/commands/pull.ts @@ -6,18 +6,15 @@ import {featureBuilder} from '../core/builders/featureBuilder.js'; import {writeConfig} from '../core/config.js'; import {importBuilder, exportBuilder} from '../core/builders/planBuilder.js'; import {snakeCaseToCamelCase} from '../core/utils.js'; -import {transformProductV2ToPlan} from '../core/transformers/productV2ToPlan.js'; +import {generateSDKTypes} from '../core/generateSDKTypes.js'; import {Feature} from '../compose/models/featureModels.js'; import {Plan} from '../compose/models/planModels.js'; export default async function Pull(options?: {archived?: boolean}) { console.log(chalk.green('Pulling plans and features from Autumn...')); - const productsV2 = await getAllPlans({archived: options?.archived ?? false}); + const plans = await getAllPlans({archived: options?.archived ?? false}); const features = await getFeatures({includeArchived: true}); - // Transform Product V2 API response to Plan V1 format - const plans = productsV2.map((productV2: any) => transformProductV2ToPlan(productV2)); - const planSnippets = plans.map((plan: Plan) => planBuilder({plan, features}), ); @@ -42,5 +39,149 @@ ${importBuilder()} writeConfig(formattedConfig); + // Fetch products and features from both sandbox and production for comprehensive SDK types + console.log(chalk.dim('Fetching products and features from all environments for SDK types...')); + const allEnvironmentFeatures = await fetchFeaturesFromAllEnvironments(); + const allEnvironmentPlans = await fetchPlansFromAllEnvironments(); + + // Generate SDK type narrowing for autocomplete + const sdkTypesPath = generateSDKTypes({ + plans: allEnvironmentPlans, // Use combined plans from both environments + features: allEnvironmentFeatures, // Use combined features from both environments + outputDir: process.cwd(), + }); + console.log(chalk.green('Success! Config has been updated.')); + console.log(chalk.dim(`Generated SDK types at: ${sdkTypesPath}`)); +} + +/** + * Fetch features from both sandbox and production environments + * This ensures SDK autocomplete includes all possible feature IDs + */ +async function fetchFeaturesFromAllEnvironments(): Promise { + const {readFromEnv, isProdFlag} = await import('../core/utils.js'); + const {getFeatures} = await import('../core/pull.js'); + + const currentEnvIsProd = isProdFlag(); + const allFeatures: Feature[] = []; + const seenIds = new Set(); + + try { + // Fetch from current environment + const currentFeatures = await getFeatures({includeArchived: true}); + currentFeatures.forEach((f: Feature) => { + if (!seenIds.has(f.id)) { + allFeatures.push(f); + seenIds.add(f.id); + } + }); + + // Try to fetch from other environment if keys exist + const {readFromEnv: readEnvDirect} = await import('fs'); + const envPath = `${process.cwd()}/.env`; + const fs = await import('fs'); + + if (fs.existsSync(envPath)) { + const envContent = fs.readFileSync(envPath, 'utf-8'); + const otherKeyName = currentEnvIsProd ? 'AUTUMN_SECRET_KEY' : 'AUTUMN_PROD_SECRET_KEY'; + const otherKeyMatch = envContent.match(new RegExp(`${otherKeyName}=(.+)`)); + + if (otherKeyMatch && otherKeyMatch[1]) { + // Temporarily switch environment + const originalArgs = [...process.argv]; + if (currentEnvIsProd) { + process.argv = process.argv.filter(a => a !== '--prod' && a !== '-p'); + } else { + process.argv.push('--prod'); + } + + try { + const otherFeatures = await getFeatures({includeArchived: true}); + otherFeatures.forEach((f: Feature) => { + if (!seenIds.has(f.id)) { + allFeatures.push(f); + seenIds.add(f.id); + } + }); + } catch (error) { + // Silently fail if other environment is not accessible + console.log(chalk.dim('Could not fetch from other environment (this is okay)')); + } + + // Restore original args + process.argv = originalArgs; + } + } + } catch (error) { + // Fall back to current environment only + console.log(chalk.dim('Using features from current environment only')); + } + + return allFeatures; +} + +/** + * Fetch plans from both sandbox and production environments + * This ensures SDK autocomplete includes all possible product IDs + */ +async function fetchPlansFromAllEnvironments(): Promise { + const {isProdFlag} = await import('../core/utils.js'); + const {getAllPlans} = await import('../core/pull.js'); + + const currentEnvIsProd = isProdFlag(); + const allPlans: Plan[] = []; + const seenIds = new Set(); + + try { + // Fetch from current environment + const currentPlans = await getAllPlans({archived: true}); + currentPlans.forEach((plan: Plan) => { + if (!seenIds.has(plan.id)) { + allPlans.push(plan); + seenIds.add(plan.id); + } + }); + + // Try to fetch from other environment if keys exist + const envPath = `${process.cwd()}/.env`; + const fs = await import('fs'); + + if (fs.existsSync(envPath)) { + const envContent = fs.readFileSync(envPath, 'utf-8'); + const otherKeyName = currentEnvIsProd ? 'AUTUMN_SECRET_KEY' : 'AUTUMN_PROD_SECRET_KEY'; + const otherKeyMatch = envContent.match(new RegExp(`${otherKeyName}=(.+)`)); + + if (otherKeyMatch && otherKeyMatch[1]) { + // Temporarily switch environment + const originalArgs = [...process.argv]; + if (currentEnvIsProd) { + process.argv = process.argv.filter(a => a !== '--prod' && a !== '-p'); + } else { + process.argv.push('--prod'); + } + + try { + const otherPlans = await getAllPlans({archived: true}); + otherPlans.forEach((plan: Plan) => { + if (!seenIds.has(plan.id)) { + allPlans.push(plan); + seenIds.add(plan.id); + } + }); + } catch (error) { + // Silently fail if other environment is not accessible + console.log(chalk.dim('Could not fetch products from other environment (this is okay)')); + } + + // Restore original args + process.argv = originalArgs; + } + } + } catch (error) { + // Fall back to current environment only + console.log(chalk.dim('Using products from current environment only')); + } + + return allPlans; } diff --git a/atmn/source/core/generateSDKTypes.ts b/atmn/source/core/generateSDKTypes.ts new file mode 100644 index 00000000..c38d3b54 --- /dev/null +++ b/atmn/source/core/generateSDKTypes.ts @@ -0,0 +1,56 @@ +import fs from "fs"; +import path from "path"; +import type { Feature } from "../compose/models/featureModels.js"; +import type { Plan } from "../compose/models/planModels.js"; + +/** + * Generate @useautumn-sdk.d.ts with type narrowing for product and feature IDs + * + * This creates autocomplete in the IDE for known product/feature IDs + * while still allowing any string value. + */ +export function generateSDKTypes({ + plans, + features, + outputDir, +}: { + plans: Plan[]; + features: Feature[]; + outputDir: string; +}) { + // Generate interface members for each ID + const productIdMembers = plans.map((p) => ` ${p.id}: any;`).join("\n"); + const featureIdMembers = features.map((f) => ` ${f.id}: any;`).join("\n"); + + // Filter for continuous_use features only (for entities) + const entityFeatures = features.filter((f) => f.type === "continuous_use"); + const entityFeatureIdMembers = entityFeatures + .map((f) => ` ${f.id}: any;`) + .join("\n"); + + const content = `// AUTO-GENERATED by atmn pull +// DO NOT EDIT MANUALLY - changes will be overwritten on next pull + +import "@useautumn/sdk"; + +// Add your product and feature IDs to the SDK's interface maps +declare module "@useautumn/sdk/custom/autumn-ids" { + export interface KnownProductIdsMap { +${productIdMembers || " // No products found"} + } + + export interface KnownFeatureIdsMap { +${featureIdMembers || " // No features found"} + } + + export interface KnownEntityFeatureIdsMap { +${entityFeatureIdMembers || " // No continuous_use features found"} + } +} +`; + + const outputPath = path.join(outputDir, "@useautumn-sdk.d.ts"); + fs.writeFileSync(outputPath, content); + + return outputPath; +} diff --git a/atmn/source/core/transformers/productV2ToPlan.ts b/atmn/source/core/transformers/productV2ToPlan.ts deleted file mode 100644 index 4c8f6980..00000000 --- a/atmn/source/core/transformers/productV2ToPlan.ts +++ /dev/null @@ -1,130 +0,0 @@ -import type {Plan, PlanFeature} from '../../compose/models/planModels.js'; - -/** - * Transform Product V2 API response to Plan V1 format for CLI - * - * API Version History: - * - Product V1: Entitlements-based (legacy) - * - Product V2: Items array (current API format with X-API-Version: 2.0.0) - * - Plan V1: Features array (new CLI format) - * - * Transformations: - * - items[] (Product V2) → features[] + price (Plan V1) - * - is_add_on → add_on - * - is_default → default - * - type: "feature" items → PlanFeature objects - * - type: "price" items → plan.price - */ -export function transformProductV2ToPlan(productV2: any): Plan { - // Transform items to features - const features: PlanFeature[] = (productV2.items || []) - .filter((item: any) => item.type === 'feature') // Skip price items - .map((item: any): PlanFeature => { - const feature: any = { - feature_id: item.feature_id, - }; - - // Granted/unlimited - if (item.included_usage !== undefined && item.included_usage !== null) { - if (item.included_usage === 'inf') { - feature.unlimited = true; - } else { - feature.granted = item.included_usage; - } - } - - // Reset configuration - if (item.interval && !item.price) { - // This is a reset interval (not a price interval) - feature.reset = { - interval: item.interval, - }; - if (item.interval_count) { - feature.reset.interval_count = item.interval_count; - } - if (item.reset_usage_when_enabled !== undefined) { - feature.reset.when_enabled = item.reset_usage_when_enabled; - } - } - - // Price configuration - if (item.price || item.tiers) { - feature.price = {}; - - if (item.price) { - feature.price.amount = item.price; - } - - if (item.tiers) { - feature.price.tiers = item.tiers; - } - - if (item.interval && item.price) { - // This is a price interval - feature.price.interval = item.interval; - } - - if (item.interval_count && item.price) { - feature.price.interval_count = item.interval_count; - } - - if (item.billing_units) { - feature.price.billing_units = item.billing_units; - } - - if (item.usage_model) { - feature.price.usage_model = item.usage_model; - } - - if (item.usage_limit) { - feature.price.max_purchase = item.usage_limit; - } - } - - // Config mapping - if (item.config) { - if (item.config.on_increase || item.config.on_decrease) { - feature.proration = {}; - if (item.config.on_increase) feature.proration.on_increase = item.config.on_increase; - if (item.config.on_decrease) feature.proration.on_decrease = item.config.on_decrease; - } - - if (item.config.rollover) { - feature.rollover = { - max: item.config.rollover.max, - expiry_duration_type: item.config.rollover.duration, - }; - if (item.config.rollover.length) { - feature.rollover.expiry_duration_length = item.config.rollover.length; - } - } - } - - return feature as PlanFeature; - }); - - // Extract base price from price items - let basePrice: Plan['price'] | undefined = undefined; - const priceItem = (productV2.items || []).find((item: any) => item.type === 'price'); - if (priceItem && priceItem.price) { - basePrice = { - amount: priceItem.price, - interval: priceItem.interval || 'month', - }; - } - - // Build Plan - const plan: Plan = { - id: productV2.id, - name: productV2.name, - description: productV2.description || null, - group: productV2.group || '', - add_on: productV2.is_add_on || false, - default: productV2.is_default || false, - price: basePrice, - features, - free_trial: productV2.free_trial || null, - }; - - return plan; -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c17f6f45..6ab0c821 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -443,6 +443,9 @@ importers: frameworks/quick-test: dependencies: + '@useautumn/sdk': + specifier: workspace:* + version: link:../../ts-sdk atmn: specifier: workspace:* version: link:../../atmn From 13a17e59a66079f0378bb7be5fcc8f9e3997f279 Mon Sep 17 00:00:00 2001 From: John Yeo Date: Thu, 13 Nov 2025 13:01:28 +0000 Subject: [PATCH 14/35] working on v2 autumn --- nextjs/package.json | 4 +- nextjs/sdk.ts | 57 +++++++++----- nextjs/src/app/page.tsx | 171 ++++++++++++---------------------------- 3 files changed, 89 insertions(+), 143 deletions(-) diff --git a/nextjs/package.json b/nextjs/package.json index adf60afa..8ea0561b 100644 --- a/nextjs/package.json +++ b/nextjs/package.json @@ -29,8 +29,8 @@ "lucide-react": "^0.525.0", "next": "15.3.4", "pg": "^8.16.3", - "react": "^19.0.0", - "react-dom": "^19.0.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", "recharts": "2.15.4", "tailwind-merge": "^3.3.1", "zod": "^4.0.0" diff --git a/nextjs/sdk.ts b/nextjs/sdk.ts index 83e10239..6303f906 100644 --- a/nextjs/sdk.ts +++ b/nextjs/sdk.ts @@ -1,31 +1,50 @@ import "dotenv/config"; -// import { Autumn } from "autumn-js"; -// import { Autumn } from "@useautumn/sdk"; -// import { Autumn } from "autumn-js"; import { Autumn } from "@useautumn/sdk"; -import { Knock } from "@knocklabs/node"; const main = async () => { + const autumn = new Autumn({ + baseURL: "http://localhost:8080/v1", + secretKey: process.env.AUTUMN_SECRET_KEY, + }); - const autumn = new Autumn({ - baseURL: "http://localhost:8080/v1", - secretKey: process.env.AUTUMN_SECRET_KEY, - }) + // console.log(`API version:`, autumn.apiVersion); - const knock = new Knock({ - apiKey: process.env.KNOCK_API_KEY, - }) + // const customer = await autumn.customers.get("temp"); + // console.log(`Customer:`, customer); + await autumn.plans.list({ + query: { + customer_id: "customer_id", + }, + }); - await knock.channels.bulk.updateMessageStatus("123", "seen", { - recipient_ids: ["123"], - }) + await autumn.customers.get("customer_id", { + expand: ["subscriptions.plan"], + }); - - await autumn.attach({ - customer_id: "123", - product_id: "pro", - }) + try { + const deleted = await autumn.plans.delete("test-plan"); + console.log(`Deleted plan, response:`, deleted); + } catch (error) { + console.error(`Failed to delete plan: ${error}`); + } + + const created = await autumn.plans.create({ + id: "test-plan", + name: "Test Plan", + description: "Test Description", + price: { + amount: 50, + interval: "month", + }, + features: [ + { + feature_id: "messages", + granted_balance: 40, + }, + ], + }); + console.log(`Created plan, response:`, created); }; main(); diff --git a/nextjs/src/app/page.tsx b/nextjs/src/app/page.tsx index 58192cd3..1775adc2 100644 --- a/nextjs/src/app/page.tsx +++ b/nextjs/src/app/page.tsx @@ -1,128 +1,55 @@ "use client"; import { PricingTable, useCustomer } from "autumn-js/react"; - -import { authClient } from "@/lib/auth-client"; -import { TestBetterAuth } from "@/components/test-better-auth"; -import { CustomerDataViewer } from "@/components/customer-data-viewer"; import TestButtons from "@/components/test-buttons"; export default function Home() { - const { - data: session, - refetch: refetchSession, - isPending, - } = authClient.useSession(); - - const { data: organisation } = authClient.useActiveOrganization(); - const { data: orgs } = authClient.useListOrganizations(); - - const { customer } = useCustomer({ expand: ["invoices"] }); - - - if (isPending) return
Loading...
; - else - return ( -
-
-

Actions & Pricing

- - - - -
- - {/* Right Column - Data Display */} -
-

Data

- - {session && ( -
- - Session - -
-

- User ID:{" "} - {session.user.id} -

-

- Name: {session.user.name} -

-

- Email:{" "} - {session.user.email} -

-

- Session ID:{" "} - {session.session.id} -

- {session.session.activeOrganizationId && ( -

- Active Org ID:{" "} - {session.session.activeOrganizationId} -

- )} -
-
- )} - - {organisation && ( -
- - Active Organization - -
-

- ID: {organisation.id} -

-

- Name: {organisation.name} -

-

- Slug: {organisation.slug} -

-
-
- )} - - {orgs && ( -
- - Organizations ({orgs.length}) - -
- {orgs.map((org) => ( -
-

- ID: {org.id} -

-

- Name: {org.name} -

-
- ))} -
-
- )} - - {customer && } - - {/* {entity && ( -
- - Entity - -
-

- ID: {entity.id} -

-

- Name: {entity.name} -

-
-
- )} */} -
-
- ); + const overrides = [ + { + planId: "pro", + name: "Pro", + + button: { + text: "Heyo", + onClick: async () => { + console.log("Hello World"); + }, + }, + + price: { + display: { + primaryText: "100", + secondaryText: "USD", + }, + }, + + features: [ + { + featureId: "workflows", + display: { + primaryText: "Checking something's up!", + }, + }, + { + featureId: null, + display: { + primaryText: "Testing what's up ya'll", + }, + }, + ], + }, + ]; + + const { data: customer } = useCustomer(); + + console.log(customer); + return ( +
+
+

Actions & Pricing

+ + + +
+
+ ); } From f9a188548cd7198076eadd4325c444b218b39089 Mon Sep 17 00:00:00 2001 From: John Yeo Date: Thu, 13 Nov 2025 13:01:48 +0000 Subject: [PATCH 15/35] v2 api --- .../src/libraries/backend/better-auth.ts | 531 +- autumn-js/src/libraries/backend/next.ts | 182 +- .../libraries/backend/routes/backendRouter.ts | 112 +- .../src/libraries/backend/routes/cusRoutes.ts | 41 + .../src/libraries/backend/routes/genRoutes.ts | 341 +- .../libraries/backend/routes/planRoutes.ts | 26 + .../libraries/backend/routes/productRoutes.ts | 25 - .../src/libraries/backend/utils/withAuth.ts | 166 +- .../react/client/ConvexAutumnClient.tsx | 429 +- .../libraries/react/client/ProductDetails.ts | 58 +- .../react/client/ReactAutumnClient.tsx | 673 +- .../react/client/clientGenMethods.ts | 87 +- .../react/client/clientPlanMethods.ts | 9 + .../react/client/clientProdMethods.ts | 8 - .../react/client/clientReferralMethods.ts | 24 +- .../react/clientTypes/attachTypes.ts | 94 +- .../react/clientTypes/billingPortalTypes.ts | 5 +- .../react/clientTypes/cancelTypes.ts | 20 +- .../libraries/react/clientTypes/checkTypes.ts | 95 +- .../react/clientTypes/checkoutTypes.ts | 94 +- .../react/clientTypes/createCustomerTypes.ts | 60 +- .../react/clientTypes/createEntityTypes.ts | 25 +- .../clientTypes/createReferralCodeTypes.ts | 5 +- .../react/clientTypes/customerDataTypes.ts | 37 +- .../react/clientTypes/entityDataTypes.ts | 10 +- .../src/libraries/react/clientTypes/index.ts | 1 - .../libraries/react/clientTypes/queryTypes.ts | 10 +- .../clientTypes/redeemReferralCodeTypes.ts | 5 +- .../react/clientTypes/setupPaymentTypes.ts | 10 +- .../libraries/react/clientTypes/trackTypes.ts | 116 +- .../checkout-dialog-synced.tsx | 33 +- .../lib/pricing-table-content.tsx | 114 +- .../pricing-table/pricing-table-synced.tsx | 707 +- .../react/hooks/helpers/useAutumnBase.tsx | 368 +- .../react/hooks/types/useCustomerMethods.ts | 84 +- .../react/hooks/types/useEntityMethods.ts | 57 +- .../src/libraries/react/hooks/useCustomer.tsx | 23 +- .../libraries/react/hooks/useCustomerBase.tsx | 117 +- .../src/libraries/react/hooks/useEntity.tsx | 2 +- .../libraries/react/hooks/useEntityBase.tsx | 191 +- .../libraries/react/hooks/usePricingTable.tsx | 18 - .../hooks/usePricingTable/pricingCardTypes.ts | 60 + .../hooks/usePricingTable/usePricingTable.tsx | 17 + .../usePricingTable/usePricingTableBase.tsx | 327 + .../react/hooks/usePricingTableBase.tsx | 226 - .../libraries/react/hooks/useProductsBase.tsx | 18 - autumn-js/src/libraries/react/index.ts | 14 +- pnpm-lock.yaml | 6433 +++++++++++++++-- ts-sdk | 2 +- typegen/genUtils/MethodGenerator.ts | 133 +- typegen/hookDocs.ts | 8 +- typegen/package.json | 4 +- typegen/typeConfigs.ts | 67 +- .../lib/pricing-table-content.tsx | 114 +- ui/registry/pricing-table/pricing-table.tsx | 704 +- 55 files changed, 9178 insertions(+), 3962 deletions(-) create mode 100644 autumn-js/src/libraries/backend/routes/cusRoutes.ts create mode 100644 autumn-js/src/libraries/backend/routes/planRoutes.ts delete mode 100644 autumn-js/src/libraries/backend/routes/productRoutes.ts create mode 100644 autumn-js/src/libraries/react/client/clientPlanMethods.ts delete mode 100644 autumn-js/src/libraries/react/client/clientProdMethods.ts delete mode 100644 autumn-js/src/libraries/react/hooks/usePricingTable.tsx create mode 100644 autumn-js/src/libraries/react/hooks/usePricingTable/pricingCardTypes.ts create mode 100644 autumn-js/src/libraries/react/hooks/usePricingTable/usePricingTable.tsx create mode 100644 autumn-js/src/libraries/react/hooks/usePricingTable/usePricingTableBase.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/usePricingTableBase.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/useProductsBase.tsx diff --git a/autumn-js/src/libraries/backend/better-auth.ts b/autumn-js/src/libraries/backend/better-auth.ts index dd321e76..bae484be 100644 --- a/autumn-js/src/libraries/backend/better-auth.ts +++ b/autumn-js/src/libraries/backend/better-auth.ts @@ -1,37 +1,35 @@ - import { Autumn } from "@sdk"; import type { - AuthContext, - BetterAuthPlugin, - EndpointContext + AuthContext, + BetterAuthPlugin, + EndpointContext, } from "better-auth"; import { getSessionFromCtx } from "better-auth/api"; import { createAuthEndpoint } from "better-auth/plugins"; import { - APIError, - createEndpoint, - type EndpointOptions, type Status + APIError, + createEndpoint, + type EndpointOptions, + type Status, } from "better-call"; import { findRoute } from "rou3"; import { z } from "zod/v4"; import { - AttachParamsSchema, - CheckoutParamsSchema, - EntityCreateParamsSchema, - CancelParamsSchema, - CheckParamsSchema, - BillingPortalParamsSchema, - TrackParamsSchema, - ReferralCreateCodeParamsSchema, - ReferralRedeemCodeParamsSchema, + AttachParamsSchema, + BillingPortalParamsSchema, + CancelParamsSchema, + CheckoutParamsSchema, + CheckParamsSchema, + EntityCreateParamsSchema, + ReferralCreateCodeParamsSchema, + ReferralRedeemCodeParamsSchema, } from "@/clientTypes"; - import { createRouterWithOptions } from "./routes/backendRouter"; import { - getIdentityContext, - getOrganizationContext, - scopeContainsOrg, + getIdentityContext, + getOrganizationContext, + scopeContainsOrg, } from "./utils/betterAuth/middlewares"; import type { AutumnOptions } from "./utils/betterAuth/types"; import { secretKeyCheck } from "./utils/secretKeyCheck"; @@ -39,279 +37,268 @@ import { secretKeyCheck } from "./utils/secretKeyCheck"; const router = createRouterWithOptions(); const betterAuthPathMap: Record = { - // "create-customer": "customers", - // "customers/get": "customers", - checkout: "checkout", - attach: "attach", - check: "check", - track: "track", - cancel: "cancel", - "referrals/redeem-code": "referrals/redeem", - "referrals/create-code": "referrals/code", - "open-billing-portal": "billing_portal", - // "products/list": "products", + // "create-customer": "customers", + // "customers/get": "customers", + checkout: "checkout", + attach: "attach", + check: "check", + track: "track", + cancel: "cancel", + "referrals/redeem-code": "referrals/redeem", + "referrals/create-code": "referrals/code", + "open-billing-portal": "billing_portal", + // "products/list": "products", }; const handleReq = async ({ - ctx, - options, - method, + ctx, + options, + method, }: { - ctx: EndpointContext; - options?: AutumnOptions; - method: string; + ctx: EndpointContext; + options?: AutumnOptions; + method: string; }) => { - const { found, error: resError } = secretKeyCheck(); + const { found, error: resError } = secretKeyCheck(); - if (!found && !options?.secretKey) { - throw new APIError((resError?.statusCode as Status) ?? "BAD_REQUEST", { - message: resError?.message ?? "Unknown error", - code: resError?.code ?? "unknown_error", - }); - } + if (!found && !options?.secretKey) { + throw new APIError((resError?.statusCode as Status) ?? "BAD_REQUEST", { + message: resError?.message ?? "Unknown error", + code: resError?.code ?? "unknown_error", + }); + } - const client = new Autumn({ - baseURL: options?.baseURL, - secretKey: options?.secretKey, - }); + const client = new Autumn({ + baseURL: options?.baseURL, + secretKey: options?.secretKey, + }); - let searchParams: Record = {}; - try { - const req = ctx.request as Request; - const url = new URL(req.url); - searchParams = Object.fromEntries(url.searchParams); - } catch (_) {} + let searchParams: Record = {}; + try { + const req = ctx.request as Request; + const url = new URL(req.url); + searchParams = Object.fromEntries(url.searchParams); + } catch (_) {} - const rest = ctx.path.split("/autumn/")[1]; - const pathname = `/api/autumn/${betterAuthPathMap[rest] || rest}`; + const rest = ctx.path.split("/autumn/")[1]; + const pathname = `/api/autumn/${betterAuthPathMap[rest] || rest}`; - const match = findRoute(router, method, pathname); + const match = findRoute(router, method, pathname); - if (!match) return ctx.json({ error: "Not found" }, { status: 404 }); + if (!match) return ctx.json({ error: "Not found" }, { status: 404 }); - const { data } = match; - const { handler } = data; + const { data } = match; + const { handler } = data; - const body = ctx.body; - const params = ctx.params; - let identify: unknown; + const body = ctx.body; + const params = ctx.params; + let identify: unknown; - // Get organization context (works for both auth and non-auth endpoints) - const orgContext = await getOrganizationContext(ctx, options); - const finalSession = await getSessionFromCtx(ctx as any); + // Get organization context (works for both auth and non-auth endpoints) + const orgContext = await getOrganizationContext(ctx, options); + const finalSession = await getSessionFromCtx(ctx as any); - // Get identity context if needed - let identity = null; - if (options?.identify) { - identity = await getIdentityContext({ - orgContext, - options, - session: finalSession, - }); - } + // Get identity context if needed + let identity = null; + if (options?.identify) { + identity = await getIdentityContext({ + orgContext, + options, + session: finalSession, + }); + } - if (options?.identify) { - identify = () => identity; - } else { - identify = () => { - if (!finalSession) return; + if (options?.identify) { + identify = () => identity; + } else { + identify = () => { + if (!finalSession) return; - if (scopeContainsOrg({ options })) { - if (orgContext.activeOrganization?.id) { - return { - customerId: orgContext.activeOrganization?.id, - customerData: { - email: orgContext.activeOrganizationEmail, - name: orgContext.activeOrganization?.name ?? "", - }, - }; - } else { - // 1. If both, return user - if (options?.customerScope === "user_and_organization") { - return { - customerId: (finalSession as any).user.id, - customerData: { - email: (finalSession as any).user.email, - name: (finalSession as any).user.name, - }, - }; - } else return null; - } - } else { - return { - customerId: (finalSession as any).user.id, - customerData: { - email: (finalSession as any).user.email, - name: (finalSession as any).user.name, - }, - }; - } - }; - } + if (scopeContainsOrg({ options })) { + if (orgContext.activeOrganization?.id) { + return { + customerId: orgContext.activeOrganization?.id, + customerData: { + email: orgContext.activeOrganizationEmail, + name: orgContext.activeOrganization?.name ?? "", + }, + }; + } else { + // 1. If both, return user + if (options?.customerScope === "user_and_organization") { + return { + customerId: (finalSession as any).user.id, + customerData: { + email: (finalSession as any).user.email, + name: (finalSession as any).user.name, + }, + }; + } else return null; + } + } else { + return { + customerId: (finalSession as any).user.id, + customerData: { + email: (finalSession as any).user.email, + name: (finalSession as any).user.name, + }, + }; + } + }; + } - const result = await handler({ - autumn: client, - body: body, - path: pathname, - getCustomer: identify, - pathParams: params, - searchParams, - }); + const result = await handler({ + autumn: client, + body: body, + path: pathname, + getCustomer: identify, + pathParams: params, + searchParams, + }); - if (result.statusCode >= 400) { - throw new APIError(result.statusCode, { - message: result.body.message ?? "Unknown error", - code: result.body.code ?? "unknown_error", - }); - } + if (result.statusCode >= 400) { + throw new APIError(result.statusCode, { + message: result.body.message ?? "Unknown error", + code: result.body.code ?? "unknown_error", + }); + } - return ctx.json(result.body, { status: result.statusCode }); + return ctx.json(result.body, { status: result.statusCode }); }; export const autumn = (options?: AutumnOptions) => { - return { - id: "autumn", - endpoints: { - createCustomer: createEndpoint( - "/autumn/customers", - { - method: "POST", - use: [], - body: z.object({ - errorOnNotFound: z.boolean().optional(), - expand: z.array(z.string()).optional(), - }), - metadata: { - isAction: false, - }, - }, - async (ctx) => await handleReq({ ctx, options, method: "POST" }) - ), - listProducts: createAuthEndpoint( - "/autumn/products", - { - method: "GET", - use: [], - }, - async (ctx) => await handleReq({ ctx, options, method: "GET" }) - ), - checkout: createAuthEndpoint( - "/autumn/checkout", - { - method: "POST", - use: [], - body: CheckoutParamsSchema, - }, - async (ctx) => { - console.log("Body: ", ctx.body); - return await handleReq({ ctx, options, method: "POST" }); - } - ), - attach: createAuthEndpoint( - "/autumn/attach", - { - method: "POST", - use: [], - body: AttachParamsSchema, - }, - async (ctx) => await handleReq({ ctx, options, method: "POST" }) - ), - check: createAuthEndpoint( - "/autumn/check", - { - method: "POST", - use: [], - body: CheckParamsSchema, - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "POST" }); - } - ), - track: createAuthEndpoint( - "/autumn/track", - { - method: "POST", - use: [], - body: TrackParamsSchema, - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "POST" }); - } - ), - cancel: createAuthEndpoint( - "/autumn/cancel", - { - method: "POST", - use: [], - body: CancelParamsSchema, - }, - async (ctx) => await handleReq({ ctx, options, method: "POST" }) - ), - createReferralCode: createAuthEndpoint( - "/autumn/referrals/code", - { - method: "POST", - use: [], - body: ReferralCreateCodeParamsSchema, - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "POST" }); - } - ), - redeemReferralCode: createAuthEndpoint( - "/autumn/referrals/redeem", - { - method: "POST", - use: [], - body: ReferralRedeemCodeParamsSchema, - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "POST" }); - } - ), - billingPortal: createAuthEndpoint( - "/autumn/billing_portal", - { - method: "POST", - use: [], - body: BillingPortalParamsSchema, - metadata: { - isAction: false, - }, - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "POST" }); - } - ), - createEntity: createAuthEndpoint( - "/autumn/entities", - { - method: "POST", - use: [], - body: EntityCreateParamsSchema, - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "POST" }); - } - ), - getEntity: createAuthEndpoint( - "/autumn/entities/:entityId", - { - method: "GET", - use: [], - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "GET" }); - } - ), - deleteEntity: createAuthEndpoint( - "/autumn/entities/:entityId", - { - method: "DELETE", - use: [], - }, - async (ctx) => await handleReq({ ctx, options, method: "DELETE" }) - ), - }, - } satisfies BetterAuthPlugin; + return { + id: "autumn", + endpoints: { + createCustomer: createEndpoint( + "/autumn/customers", + { + method: "POST", + use: [], + body: z.object({ + errorOnNotFound: z.boolean().optional(), + expand: z.array(z.string()).optional(), + }), + metadata: { + isAction: false, + }, + }, + async (ctx) => await handleReq({ ctx, options, method: "POST" }), + ), + listProducts: createAuthEndpoint( + "/autumn/products", + { + method: "GET", + use: [], + }, + async (ctx) => await handleReq({ ctx, options, method: "GET" }), + ), + checkout: createAuthEndpoint( + "/autumn/checkout", + { + method: "POST", + use: [], + body: CheckoutParamsSchema, + }, + async (ctx) => { + console.log("Body: ", ctx.body); + return await handleReq({ ctx, options, method: "POST" }); + }, + ), + attach: createAuthEndpoint( + "/autumn/attach", + { + method: "POST", + use: [], + body: AttachParamsSchema, + }, + async (ctx) => await handleReq({ ctx, options, method: "POST" }), + ), + check: createAuthEndpoint( + "/autumn/check", + { + method: "POST", + use: [], + body: CheckParamsSchema, + }, + async (ctx) => { + return await handleReq({ ctx, options, method: "POST" }); + }, + ), + cancel: createAuthEndpoint( + "/autumn/cancel", + { + method: "POST", + use: [], + body: CancelParamsSchema, + }, + async (ctx) => await handleReq({ ctx, options, method: "POST" }), + ), + createReferralCode: createAuthEndpoint( + "/autumn/referrals/code", + { + method: "POST", + use: [], + body: ReferralCreateCodeParamsSchema, + }, + async (ctx) => { + return await handleReq({ ctx, options, method: "POST" }); + }, + ), + redeemReferralCode: createAuthEndpoint( + "/autumn/referrals/redeem", + { + method: "POST", + use: [], + body: ReferralRedeemCodeParamsSchema, + }, + async (ctx) => { + return await handleReq({ ctx, options, method: "POST" }); + }, + ), + billingPortal: createAuthEndpoint( + "/autumn/billing_portal", + { + method: "POST", + use: [], + body: BillingPortalParamsSchema, + metadata: { + isAction: false, + }, + }, + async (ctx) => { + return await handleReq({ ctx, options, method: "POST" }); + }, + ), + createEntity: createAuthEndpoint( + "/autumn/entities", + { + method: "POST", + use: [], + body: EntityCreateParamsSchema, + }, + async (ctx) => { + return await handleReq({ ctx, options, method: "POST" }); + }, + ), + getEntity: createAuthEndpoint( + "/autumn/entities/:entityId", + { + method: "GET", + use: [], + }, + async (ctx) => { + return await handleReq({ ctx, options, method: "GET" }); + }, + ), + deleteEntity: createAuthEndpoint( + "/autumn/entities/:entityId", + { + method: "DELETE", + use: [], + }, + async (ctx) => await handleReq({ ctx, options, method: "DELETE" }), + ), + }, + } satisfies BetterAuthPlugin; }; diff --git a/autumn-js/src/libraries/backend/next.ts b/autumn-js/src/libraries/backend/next.ts index 3cf69abe..2bcfb2cb 100644 --- a/autumn-js/src/libraries/backend/next.ts +++ b/autumn-js/src/libraries/backend/next.ts @@ -1,100 +1,98 @@ -import { findRoute } from "rou3"; import { Autumn } from "@sdk"; - import { NextResponse } from "next/server"; -import { AuthResult } from "./utils/AuthFunction"; -import { createRouterWithOptions } from "./routes/backendRouter"; +import { findRoute } from "rou3"; import { autumnApiUrl } from "./constants"; +import { createRouterWithOptions } from "./routes/backendRouter"; +import type { AuthResult } from "./utils/AuthFunction"; import { secretKeyCheck } from "./utils/secretKeyCheck"; export function autumnHandler(options: { - identify: (request: any) => AuthResult; - url?: string; - secretKey?: string; + identify: (request: any) => AuthResult; + url?: string; + secretKey?: string; }) { - const router = createRouterWithOptions(); - - async function handler(request: any, response?: any) { - let { found, error: resError } = secretKeyCheck(options.secretKey); - - // Check if this is pages router by looking for NextApiRequest properties - const isPagesRouter = - response && "query" in request && "cookies" in request; - - if (!found) { - if (isPagesRouter) { - return response.status(resError!.statusCode).json(resError); - } else { - return NextResponse.json(resError, { status: resError!.statusCode }); - } - } - - const autumn = new Autumn({ - secretKey: options.secretKey || undefined, - baseURL: options.url || autumnApiUrl, - }); - - if (!found) { - if (isPagesRouter) { - return response.status(500).json(resError); - } else { - return NextResponse.json(resError, { status: 500 }); - } - } - - const method = request.method; - - // Handle both app router (full URL) and pages router (pathname only) - let url: URL; - if (!request.url.includes("http")) { - // Pages router - url = new URL(request.url, "http://localhost:3000"); - } else { - url = new URL(request.url); - } - - const searchParams = Object.fromEntries(url.searchParams); - const pathname = url.pathname; - - const match = findRoute(router, method, pathname); - - if (!match) { - if (isPagesRouter) { - return response.status(404).json({ error: "Not found" }); - } else { - return NextResponse.json({ error: "Not found" }, { status: 404 }); - } - } - - const { data, params: pathParams } = match; - const { handler } = data; - - let body = null; - if (method === "POST" || method === "PUT" || method === "PATCH") { - try { - body = await request.json(); - } catch (error) {} - } - - const result = await handler({ - autumn, - body, - path: url.pathname, - getCustomer: async () => await options.identify(request), - pathParams, - searchParams, - }); - - if (isPagesRouter) { - return response.status(result.statusCode).json(result.body); - } else { - return NextResponse.json(result.body, { status: result.statusCode }); - } - } - - return { - GET: handler, - POST: handler, - }; + const router = createRouterWithOptions(); + + async function handler(request: any, response?: any) { + const { found, error: resError } = secretKeyCheck(options.secretKey); + + // Check if this is pages router by looking for NextApiRequest properties + const isPagesRouter = + response && "query" in request && "cookies" in request; + + if (!found) { + if (isPagesRouter) { + return response.status(resError!.statusCode).json(resError); + } else { + return NextResponse.json(resError, { status: resError!.statusCode }); + } + } + + const autumn = new Autumn({ + secretKey: options.secretKey || undefined, + baseURL: options.url || autumnApiUrl, + }); + + if (!found) { + if (isPagesRouter) { + return response.status(500).json(resError); + } else { + return NextResponse.json(resError, { status: 500 }); + } + } + + const method = request.method; + + // Handle both app router (full URL) and pages router (pathname only) + let url: URL; + if (!request.url.includes("http")) { + // Pages router + url = new URL(request.url, "http://localhost:3000"); + } else { + url = new URL(request.url); + } + + const searchParams = Object.fromEntries(url.searchParams); + const pathname = url.pathname; + + const match = findRoute(router, method, pathname); + + if (!match) { + if (isPagesRouter) { + return response.status(404).json({ error: "Not found" }); + } else { + return NextResponse.json({ error: "Not found" }, { status: 404 }); + } + } + + const { data, params: pathParams } = match; + const { handler } = data; + + let body = null; + if (method === "POST" || method === "PUT" || method === "PATCH") { + try { + body = await request.json(); + } catch (_) {} + } + + const result = await handler({ + autumn, + body, + path: url.pathname, + getCustomer: async () => await options.identify(request), + pathParams, + searchParams, + }); + + if (isPagesRouter) { + return response.status(result.statusCode).json(result.body); + } else { + return NextResponse.json(result.body, { status: result.statusCode }); + } + } + + return { + GET: handler, + POST: handler, + }; } - diff --git a/autumn-js/src/libraries/backend/routes/backendRouter.ts b/autumn-js/src/libraries/backend/routes/backendRouter.ts index b4ce6544..e29f5290 100644 --- a/autumn-js/src/libraries/backend/routes/backendRouter.ts +++ b/autumn-js/src/libraries/backend/routes/backendRouter.ts @@ -1,97 +1,35 @@ -import { withAuth } from "../utils/withAuth"; -import { addGenRoutes } from "./genRoutes"; import { addRoute, createRouter } from "rou3"; -import { - Autumn -} from "../../../sdk"; import { BASE_PATH } from "../constants"; +import { addCustomerRoutes } from "./cusRoutes"; import { addEntityRoutes } from "./entityRoutes"; +import { addGenRoutes } from "./genRoutes"; +import { addPlanRoutes } from "./planRoutes"; import { addReferralRoutes } from "./referralRoutes"; -import { addProductRoutes } from "./productRoutes"; type RouteData = { - handler: any; - requireCustomer?: boolean; + handler: any; + requireCustomer?: boolean; }; -const sanitizeCustomerBody = (body: any) => { - let bodyCopy = { ...body }; - delete bodyCopy.id; - delete bodyCopy.name; - delete bodyCopy.email; - - return bodyCopy; -}; - -const createCustomerHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data = {}, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.CustomerCreateParams; - }) => { - let res = await autumn.customers.create({ - id: customer_id, - ...customer_data, - ...sanitizeCustomerBody(body), - }); - - return res; - }, -}); - -const getPricingTableHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - }: { - autumn: Autumn; - customer_id: string; - }) => { - throw new Error("fetch pricing table is deprecated") - // return await fetchPricingTable({ - // instance: autumn, - // params: { - // customer_id: customer_id || undefined, - // }, - // }); - }, - requireCustomer: false, -}); - export const createRouterWithOptions = () => { - const router = createRouter(); - - addRoute(router, "POST", `${BASE_PATH}/cors`, { - handler: () => { - - return { - body: { - message: "OK", - }, - statusCode: 200, - } - }, - }); - - addRoute(router, "POST", `${BASE_PATH}/customers`, { - handler: createCustomerHandler, - }); - - addRoute(router, "GET", `${BASE_PATH}/components/pricing_table`, { - handler: getPricingTableHandler, - requireCustomer: false, - }); - - addGenRoutes(router); - addEntityRoutes(router); - addReferralRoutes(router); - addProductRoutes(router); - - return router; + const router = createRouter(); + + addRoute(router, "POST", `${BASE_PATH}/cors`, { + handler: () => { + return { + body: { + message: "OK", + }, + statusCode: 200, + }; + }, + }); + + addGenRoutes(router); + addCustomerRoutes(router); + addEntityRoutes(router); + addReferralRoutes(router); + addPlanRoutes(router); + + return router; }; diff --git a/autumn-js/src/libraries/backend/routes/cusRoutes.ts b/autumn-js/src/libraries/backend/routes/cusRoutes.ts new file mode 100644 index 00000000..5cd4b353 --- /dev/null +++ b/autumn-js/src/libraries/backend/routes/cusRoutes.ts @@ -0,0 +1,41 @@ +import type { Autumn } from "@sdk"; +import { addRoute, type RouterContext } from "rou3"; +import { BASE_PATH } from "../constants"; +import { withAuth } from "../utils/withAuth"; + +const sanitizeCustomerBody = (body: any) => { + const bodyCopy = { ...body }; + delete bodyCopy.id; + delete bodyCopy.name; + delete bodyCopy.email; + + return bodyCopy; +}; + +const createCustomerHandler = withAuth({ + fn: async ({ + autumn, + customer_id, + customer_data = {}, + body, + }: { + autumn: Autumn; + customer_id: string; + customer_data?: Autumn.CustomerData; + body: Autumn.CustomerCreateParams; + }) => { + const res = await autumn.customers.create({ + id: customer_id, + ...customer_data, + ...sanitizeCustomerBody(body), + }); + + return res; + }, +}); + +export const addCustomerRoutes = async (router: RouterContext) => { + addRoute(router, "POST", `${BASE_PATH}/customers`, { + handler: createCustomerHandler, + }); +}; diff --git a/autumn-js/src/libraries/backend/routes/genRoutes.ts b/autumn-js/src/libraries/backend/routes/genRoutes.ts index a2ae6e1e..25eb6220 100644 --- a/autumn-js/src/libraries/backend/routes/genRoutes.ts +++ b/autumn-js/src/libraries/backend/routes/genRoutes.ts @@ -1,208 +1,207 @@ // import type { AttachParams, CheckoutParams } from "@sdk/general/attachTypes"; -import { addRoute, type RouterContext } from "rou3"; -import type { QueryParams } from "@/clientTypes"; + import type { - Autumn, - // BillingPortalParams, - // CancelParams, - // CheckParams, - // CustomerData, - // SetupPaymentParams, - // TrackParams, + Autumn, + // BillingPortalParams, + // CancelParams, + // CheckParams, + // CustomerData, + // SetupPaymentParams, + // TrackParams, } from "@sdk"; +import { addRoute, type RouterContext } from "rou3"; +import type { QueryParams } from "@/clientTypes"; import { BASE_PATH } from "../constants"; import { withAuth } from "../utils/withAuth"; const sanitizeBody = (body: any) => { - const bodyCopy = { ...body }; - delete bodyCopy.customer_id; - delete bodyCopy.customer_data; - return bodyCopy; + const bodyCopy = { ...body }; + delete bodyCopy.customer_id; + delete bodyCopy.customer_data; + return bodyCopy; }; const checkoutHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.CheckoutParams; - }) => { - const result = await autumn.checkout({ - ...sanitizeBody(body), - customer_id, - customer_data, - }); + fn: async ({ + autumn, + customer_id, + customer_data, + body, + }: { + autumn: Autumn; + customer_id: string; + customer_data?: Autumn.CustomerData; + body: Autumn.CheckoutParams; + }) => { + const result = await autumn.checkout({ + ...sanitizeBody(body), + customer_id, + customer_data, + }); - return result; - }, + return result; + }, }); const attachHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.AttachParams; - }) => { - console.log("Body: ", body); - console.log("Customer ID: ", customer_id); - return await autumn.attach({ - ...sanitizeBody(body), - customer_id, - customer_data, - }); - }, + fn: async ({ + autumn, + customer_id, + customer_data, + body, + }: { + autumn: Autumn; + customer_id: string; + customer_data?: Autumn.CustomerData; + body: Autumn.AttachParams; + }) => { + console.log("Body: ", body); + console.log("Customer ID: ", customer_id); + return await autumn.attach({ + ...sanitizeBody(body), + customer_id, + customer_data, + }); + }, }); + const setupPaymentHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.SetupPaymentParams; - }) => { - return await autumn.setupPayment({ - ...sanitizeBody(body), - customer_id, - customer_data, - }); - }, + fn: async ({ + autumn, + customer_id, + customer_data, + body, + }: { + autumn: Autumn; + customer_id: string; + customer_data?: Autumn.CustomerData; + body: Autumn.SetupPaymentParams; + }) => { + return await autumn.setupPayment({ + ...sanitizeBody(body), + customer_id, + customer_data, + }); + }, }); const cancelHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: Autumn.CancelParams; - }) => { - return await autumn.cancel({ - ...sanitizeBody(body), - customer_id, - }); - }, + fn: async ({ + autumn, + customer_id, + body, + }: { + autumn: Autumn; + customer_id: string; + body: Autumn.CancelParams; + }) => { + return await autumn.cancel({ + ...sanitizeBody(body), + customer_id, + }); + }, }); const checkHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.CheckParams; - }) => { - + fn: async ({ + autumn, + customer_id, + customer_data, + body, + }: { + autumn: Autumn; + customer_id: string; + customer_data?: Autumn.CustomerData; + body: Autumn.CheckParams; + }) => { + const result = await autumn.check({ + ...sanitizeBody(body), + customer_id, + customer_data, + }); - const result = await autumn.check({ - ...sanitizeBody(body), - customer_id, - customer_data, - }); - - return result; - }, + return result; + }, }); const trackHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.TrackParams; - }) => { - return await autumn.track({ - ...sanitizeBody(body), - customer_id, - customer_data, - }); - }, + fn: async ({ + autumn, + customer_id, + customer_data, + body, + }: { + autumn: Autumn; + customer_id: string; + customer_data?: Autumn.CustomerData; + body: Autumn.TrackParams; + }) => { + return await autumn.track({ + ...sanitizeBody(body), + customer_id, + customer_data, + }); + }, }); const openBillingPortalHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: Autumn.BillingPortalParams; - }) => { - return await autumn.billingPortal({ - customer_id, - return_url: body.return_url, - }); - }, + fn: async ({ + autumn, + customer_id, + body, + }: { + autumn: Autumn; + customer_id: string; + body: Autumn.BillingPortalParams; + }) => { + return await autumn.billingPortal({ + customer_id, + return_url: body.return_url, + }); + }, }); const queryHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: QueryParams; - }) => { - - return await autumn.query({ - ...sanitizeBody(body), - customer_id, - }); - }, + fn: async ({ + autumn, + customer_id, + body, + }: { + autumn: Autumn; + customer_id: string; + body: QueryParams; + }) => { + return await autumn.query({ + ...sanitizeBody(body), + customer_id, + }); + }, }); const addGenRoutes = (router: RouterContext) => { - addRoute(router, "POST", `${BASE_PATH}/checkout`, { - handler: checkoutHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/attach`, { - handler: attachHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/cancel`, { - handler: cancelHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/check`, { - handler: checkHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/track`, { - handler: trackHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/billing_portal`, { - handler: openBillingPortalHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/setup_payment`, { - handler: setupPaymentHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/query`, { - handler: queryHandler, - }); + addRoute(router, "POST", `${BASE_PATH}/checkout`, { + handler: checkoutHandler, + }); + addRoute(router, "POST", `${BASE_PATH}/attach`, { + handler: attachHandler, + }); + addRoute(router, "POST", `${BASE_PATH}/cancel`, { + handler: cancelHandler, + }); + addRoute(router, "POST", `${BASE_PATH}/check`, { + handler: checkHandler, + }); + // addRoute(router, "POST", `${BASE_PATH}/track`, { + // handler: trackHandler, + // }); + addRoute(router, "POST", `${BASE_PATH}/billing_portal`, { + handler: openBillingPortalHandler, + }); + addRoute(router, "POST", `${BASE_PATH}/setup_payment`, { + handler: setupPaymentHandler, + }); + addRoute(router, "POST", `${BASE_PATH}/query`, { + handler: queryHandler, + }); }; export { addGenRoutes }; diff --git a/autumn-js/src/libraries/backend/routes/planRoutes.ts b/autumn-js/src/libraries/backend/routes/planRoutes.ts new file mode 100644 index 00000000..df721cab --- /dev/null +++ b/autumn-js/src/libraries/backend/routes/planRoutes.ts @@ -0,0 +1,26 @@ +import type { Autumn } from "@sdk"; +import { addRoute, type RouterContext } from "rou3"; +import { BASE_PATH } from "../constants"; +import { withAuth } from "../utils/withAuth"; + +const listPlansHandler = withAuth({ + fn: async ({ + autumn, + customer_id, + }: { + autumn: Autumn; + customer_id: string; + }) => { + const result = await autumn.plans.list({ + customer_id, + }); + return result; + }, + requireCustomer: false, +}); + +export const addPlanRoutes = async (router: RouterContext) => { + addRoute(router, "GET", `${BASE_PATH}/plans`, { + handler: listPlansHandler, + }); +}; diff --git a/autumn-js/src/libraries/backend/routes/productRoutes.ts b/autumn-js/src/libraries/backend/routes/productRoutes.ts deleted file mode 100644 index 5dae5cf4..00000000 --- a/autumn-js/src/libraries/backend/routes/productRoutes.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { addRoute, RouterContext } from "rou3"; -import { Autumn } from "@sdk"; -import { withAuth } from "../utils/withAuth"; -import { BASE_PATH } from "../constants"; - -const listProductsHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - }: { - autumn: Autumn; - customer_id: string; - }) => { - // return await autumn.products.list({ - // customer_id, - // }); - }, - requireCustomer: false, -}); - -export const addProductRoutes = async (router: RouterContext) => { - addRoute(router, "GET", `${BASE_PATH}/products`, { - handler: listProductsHandler, - }); -}; diff --git a/autumn-js/src/libraries/backend/utils/withAuth.ts b/autumn-js/src/libraries/backend/utils/withAuth.ts index 8a7929a4..90d97f23 100644 --- a/autumn-js/src/libraries/backend/utils/withAuth.ts +++ b/autumn-js/src/libraries/backend/utils/withAuth.ts @@ -1,88 +1,102 @@ - -import { toBackendError } from "./backendRes"; -import { AuthResult } from "./AuthFunction"; -import { logger } from "../../../utils/logger"; -import { toSnakeCase } from "@utils/toSnakeCase"; import Autumn from "@sdk"; +import { toSnakeCase } from "@utils/toSnakeCase"; +import { logger } from "../../../utils/logger"; +import type { AuthResult } from "./AuthFunction"; +import { toBackendError } from "./backendRes"; // 1. Takes in export const withAuth = ({ - fn, - requireCustomer = true, + fn, + requireCustomer = true, }: { - fn: (args: { - autumn: Autumn; - body: any; - customer_id: string; - customer_data?: Autumn.CustomerData; - pathParams?: Record; - searchParams?: Record; - }) => Promise; - requireCustomer?: boolean; + fn: (args: { + autumn: Autumn; + body: any; + customer_id: string; + customer_data?: Autumn.CustomerData; + pathParams?: Record; + searchParams?: Record; + }) => Promise; + requireCustomer?: boolean; }) => { - return async ({ - autumn, - body, - path, - getCustomer, - pathParams, - searchParams, - }: { - autumn: Autumn; - body: any; - path: string; - getCustomer: () => AuthResult; - pathParams?: Record; - searchParams?: Record; - }) => { - let authResult = await getCustomer(); - let customerId = authResult?.customerId; + return async ({ + autumn, + body, + path, + getCustomer, + pathParams, + searchParams, + }: { + autumn: Autumn; + body: any; + path: string; + getCustomer: () => AuthResult; + pathParams?: Record; + searchParams?: Record; + }) => { + const authResult = await getCustomer(); + const customerId = authResult?.customerId; - if (!customerId && requireCustomer) { - if (body?.errorOnNotFound === false) { - return { - statusCode: 202, - body: null, - }; - } else { - logger.error( - `[Autumn]: customerId returned from identify function is ${customerId}` - ); - return toBackendError({ - path, - message: `customerId returned from identify function is ${customerId}`, - code: "no_customer_id", - statusCode: 401, - }); - } - } + if (!customerId && requireCustomer) { + if (body?.errorOnNotFound === false) { + return { + statusCode: 202, + body: null, + }; + } else { + logger.error( + `[Autumn]: customerId returned from identify function is ${customerId}`, + ); + return toBackendError({ + path, + message: `customerId returned from identify function is ${customerId}`, + code: "no_customer_id", + statusCode: 401, + }); + } + } - let cusData = authResult?.customerData || body?.customer_data; + const cusData = authResult?.customerData || body?.customer_data; - if (body) { - body = toSnakeCase({ - obj: body, - excludeChildrenOf: ["checkoutSessionParams", "properties"], - }); - } + if (body) { + body = toSnakeCase({ + obj: body, + excludeChildrenOf: ["checkoutSessionParams", "properties"], + }); + } - try { - return await fn({ - body, - autumn, - customer_id: customerId!, - customer_data: cusData, - pathParams, - searchParams, - }); + try { + const result = await fn({ + body, + autumn, + customer_id: customerId ?? "", + customer_data: cusData, + pathParams, + searchParams, + }); - } catch (error: any) { - logger.error(`${error.message}`); - return toBackendError({ - path, - message: error.message || "unknown error", - code: "internal_error", - }); - } - }; + return { + statusCode: 200, + body: result, + }; + } catch (error) { + if (error instanceof Autumn.APIError) { + const statusCode = error.status; + const data = error.error; + return toBackendError({ + path, + message: data.message || "unknown error", + code: data.code || "internal_error", + statusCode, + }); + } else { + return toBackendError({ + path, + message: error instanceof Error ? error.message : "unknown error", + code: "internal_error", + statusCode: 500, + }); + } + } + }; }; diff --git a/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx b/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx index c90cbbea..ab1b4679 100644 --- a/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx +++ b/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx @@ -1,234 +1,217 @@ -import { IAutumnClient } from "./ReactAutumnClient"; -import { CustomerCreateParams, CustomerData } from "@/clientTypes"; +import type { Autumn } from "@sdk"; +import type { + CustomerCreateParams, + CustomerData, + ReferralCreateCodeParams, + ReferralRedeemCodeParams, +} from "@/clientTypes"; +import type { IAutumnClient } from "./ReactAutumnClient"; export interface ErrorResponse { - message: string; - code: string; + message: string; + code: string; } export type OmitCustomerType = - | "id" - | "name" - | "email" - | "fingerprint" - | "customer_id"; + | "id" + | "name" + | "email" + | "fingerprint" + | "customer_id"; export interface ConvexAutumnClientConfig { - convexApi: any; // The exported autumn.api() object from Convex - // convexUrl: string; // The Convex deployment URL - customerData?: CustomerData; - headers?: Record; - getBearerToken?: () => Promise; - convex: any; + convexApi: any; // The exported autumn.api() object from Convex + // convexUrl: string; // The Convex deployment URL + customerData?: CustomerData; + headers?: Record; + getBearerToken?: () => Promise; + convex: any; } export class ConvexAutumnClient implements IAutumnClient { - protected readonly convexApi: any; - protected readonly convex: any; - // protected readonly convexClient: ConvexHttpClient; - public readonly customerData?: CustomerData; - public readonly headers?: Record; - public readonly backendUrl?: string = undefined; - public readonly prefix: string = "/api/convex"; - public readonly getBearerToken?: () => Promise; - - // Stub implementations for HTTP-specific methods that the interface requires - async detectCors() { - return { - valid: true, - includeCredentials: false as boolean | undefined, - }; - } - - async shouldIncludeCredentials(): Promise { - return false; - } - - async getHeaders() { - return { "Content-Type": "application/json" }; - } - - async handleFetch() { - throw new Error("HTTP methods not supported in Convex mode"); - } - - async post() { - throw new Error("HTTP methods not supported in Convex mode"); - } - - async get() { - throw new Error("HTTP methods not supported in Convex mode"); - } - - async delete() { - throw new Error("HTTP methods not supported in Convex mode"); - } - - constructor({ - convexApi, - customerData, - headers, - getBearerToken, - convex, - }: ConvexAutumnClientConfig) { - this.convex = convex; - this.convexApi = convexApi; - // this.convexClient = new ConvexHttpClient(convexUrl); - this.getBearerToken = getBearerToken; - this.customerData = customerData; - this.headers = headers; - } - - async createCustomer( - params: CustomerCreateParams & { - errorOnNotFound?: boolean; - } - ) { - return await this.convex.action( - this.convexApi.createCustomer, - params - ); - } - - // Core methods that wrap Convex actions - attach = async (args: any) => { - // Filter out frontend-only parameters - const { dialog, ...backendArgs } = args; - - const result = await this.convex.action( - this.convexApi.attach, - backendArgs - ); - return result; - }; - - checkout = async (args: any) => { - // Filter out frontend-only parameters - const { dialog, ...backendArgs } = args; - - const result = await this.convex.action( - this.convexApi.checkout, - backendArgs - ); - return result; - }; - - cancel = async (args: any) => { - const result = await this.convex.action(this.convexApi.cancel, args); - return result; - }; - - check = async (args: any) => { - const result = await this.convex.action(this.convexApi.check, args); - return result; - }; - - track = async (args: any) => { - const result = await this.convex.action(this.convexApi.track, args); - return result; - }; - - openBillingPortal = async (args: any) => { - const result = await this.convex.action(this.convexApi.billingPortal, { - ...args, - openInNewTab: undefined, - }); - - return result; - }; - - setupPayment = async (args: any) => { - const result = await this.convex.action( - this.convexApi.setupPayment, - args - ); - return result; - }; - - query = async (args: any) => { - const result = await this.convex.action(this.convexApi.query, args); - return result; - }; - - entities = { - create: async (args: any) => { - // Check if args is an array or single entity - if (Array.isArray(args)) { - // Multiple entities - use createEntities method - throw new Error( - "Passing an array of entities to createEntity() is not supported for Convex" - ); - // const entityArgs = { entities: args }; - // const result = await this.convex.action( - // this.convexApi.createEntities, - // entityArgs - // ); - // return result; - } else { - // Single entity - use createEntity method directly (no entities wrapper) - const result = await this.convex.action( - this.convexApi.createEntity, - args - ); - return result; - } - }, - - get: async (entityId: string, args: any) => { - const result = await this.convex.action(this.convexApi.getEntity, { - entityId, - ...args, - }); - - return result; - }, - - delete: async (args: any) => { - // Set auth token for the request - backend will extract identity - // if (this.getBearerToken) { - // this.convexClient.setAuth( - // (await this.getBearerToken()) ?? "" - // ); - // } - const result = await this.convex.action( - this.convexApi.deleteEntity, - args - ); - return result; - }, - }; - - referrals = { - createCode: async (args: any) => { - const result = await this.convex.action( - this.convexApi.createReferralCode, - args - ); - return result; - }, - - redeemCode: async (args: any) => { - // Set auth token for the request - backend will extract identity - // if (this.getBearerToken) { - // this.convexClient.setAuth( - // (await this.getBearerToken()) ?? "" - // ); - // } - const result = await this.convex.action( - this.convexApi.redeemReferralCode, - args - ); - return result; - }, - }; - - products = { - list: async (): Promise => { - const result = await this.convex.action( - this.convexApi.listProducts, - {} - ); - return result; - }, - }; + protected readonly convexApi: any; + protected readonly convex: any; + // protected readonly convexClient: ConvexHttpClient; + public readonly customerData?: CustomerData; + public readonly headers?: Record; + public readonly backendUrl?: string = undefined; + public readonly prefix: string = "/api/convex"; + public readonly getBearerToken?: () => Promise; + + // Stub implementations for HTTP-specific methods that the interface requires + async detectCors() { + return { + valid: true, + includeCredentials: false as boolean | undefined, + }; + } + + async shouldIncludeCredentials(): Promise { + return false; + } + + async getHeaders() { + return { "Content-Type": "application/json" }; + } + + async handleFetch() { + throw new Error("HTTP methods not supported in Convex mode"); + } + + async post() { + throw new Error("HTTP methods not supported in Convex mode"); + } + + async get() { + throw new Error("HTTP methods not supported in Convex mode"); + } + + async delete() { + throw new Error("HTTP methods not supported in Convex mode"); + } + + constructor({ + convexApi, + customerData, + headers, + getBearerToken, + convex, + }: ConvexAutumnClientConfig) { + this.convex = convex; + this.convexApi = convexApi; + // this.convexClient = new ConvexHttpClient(convexUrl); + this.getBearerToken = getBearerToken; + this.customerData = customerData; + this.headers = headers; + } + + async createCustomer( + params: CustomerCreateParams & { + errorOnNotFound?: boolean; + }, + ) { + return await this.convex.action(this.convexApi.createCustomer, params); + } + + // Core methods that wrap Convex actions + attach = async (args: any) => { + // Filter out frontend-only parameters + const { dialog, ...backendArgs } = args; + + const result = await this.convex.action(this.convexApi.attach, backendArgs); + return result; + }; + + checkout = async (args: any) => { + // Filter out frontend-only parameters + const { dialog, ...backendArgs } = args; + + const result = await this.convex.action( + this.convexApi.checkout, + backendArgs, + ); + return result; + }; + + cancel = async (args: any) => { + const result = await this.convex.action(this.convexApi.cancel, args); + return result; + }; + + check = async (args: any) => { + const result = await this.convex.action(this.convexApi.check, args); + return result; + }; + + openBillingPortal = async (args: any) => { + const result = await this.convex.action(this.convexApi.billingPortal, { + ...args, + openInNewTab: undefined, + }); + + return result; + }; + + setupPayment = async (args: any) => { + const result = await this.convex.action(this.convexApi.setupPayment, args); + return result; + }; + + query = async (args: any) => { + const result = await this.convex.action(this.convexApi.query, args); + return result; + }; + + entities = { + create: async (args: any) => { + // Check if args is an array or single entity + if (Array.isArray(args)) { + // Multiple entities - use createEntities method + throw new Error( + "Passing an array of entities to createEntity() is not supported for Convex", + ); + // const entityArgs = { entities: args }; + // const result = await this.convex.action( + // this.convexApi.createEntities, + // entityArgs + // ); + // return result; + } else { + // Single entity - use createEntity method directly (no entities wrapper) + const result = await this.convex.action( + this.convexApi.createEntity, + args, + ); + return result; + } + }, + + get: async (entityId: string, args: any) => { + const result = await this.convex.action(this.convexApi.getEntity, { + entityId, + ...args, + }); + + return result; + }, + + delete: async (args: any) => { + // Set auth token for the request - backend will extract identity + // if (this.getBearerToken) { + // this.convexClient.setAuth( + // (await this.getBearerToken()) ?? "" + // ); + // } + const result = await this.convex.action( + this.convexApi.deleteEntity, + args, + ); + return result; + }, + }; + + referrals = { + createCode: async (args: ReferralCreateCodeParams) => { + const result = await this.convex.action( + this.convexApi.createReferralCode, + args, + ); + return result as Autumn.Referrals.ReferralCreateCodeResponse; + }, + + redeemCode: async (args: ReferralRedeemCodeParams) => { + const result = await this.convex.action( + this.convexApi.redeemReferralCode, + args, + ); + return result as Autumn.Referrals.ReferralRedeemCodeResponse; + }, + }; + + plans = { + list: async (): Promise => { + const result = await this.convex.action(this.convexApi.listProducts, {}); + return result; + }, + }; } diff --git a/autumn-js/src/libraries/react/client/ProductDetails.ts b/autumn-js/src/libraries/react/client/ProductDetails.ts index 58ddc38c..b02adb84 100644 --- a/autumn-js/src/libraries/react/client/ProductDetails.ts +++ b/autumn-js/src/libraries/react/client/ProductDetails.ts @@ -1,32 +1,32 @@ -import { Autumn } from "@sdk"; +// import { Autumn } from "@sdk"; -export interface ProductDetails { - id?: string; - name?: string; - description?: string; - buttonText?: string; - buttonUrl?: string; - recommendText?: string; - everythingFrom?: string; +// export interface ProductDetails { +// id?: string; +// name?: string; +// description?: string; +// buttonText?: string; +// buttonUrl?: string; +// recommendText?: string; +// everythingFrom?: string; - price?: { - primaryText: string; - secondaryText?: string; - }; +// price?: { +// primaryText: string; +// secondaryText?: string; +// }; - items?: { - featureId?: string; - primaryText?: string; - secondaryText?: string; - }[]; -} -export interface ProductWithDisplay extends Autumn.Product { - display?: { - name?: string; - description?: string; - button_text?: string; - recommend_text?: string; - everything_from?: string; - button_url?: string; - }; -} \ No newline at end of file +// items?: { +// featureId?: string; +// primaryText?: string; +// secondaryText?: string; +// }[]; +// } +// export interface ProductWithDisplay extends Autumn.Product { +// display?: { +// name?: string; +// description?: string; +// button_text?: string; +// recommend_text?: string; +// everything_from?: string; +// button_url?: string; +// }; +// } diff --git a/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx b/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx index 3c08adcf..60334411 100644 --- a/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx +++ b/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx @@ -1,356 +1,361 @@ +import type { Autumn } from "@sdk"; +import { handleFetchResult } from "@utils/handleFetchResult"; +import type { + AttachParams, + CancelParams, + CheckoutParams, + CustomerCreateParams, + CustomerData, + QueryParams, + ReferralCreateCodeParams, + ReferralRedeemCodeParams, + SetupPaymentParams, +} from "@/clientTypes"; import { logAuthError } from "@/errorUtils/logAuthError"; import { logFetchError } from "../errorUtils/logFetchError"; import { createCustomerMethod } from "./clientCusMethods"; import { - createEntityMethod, - deleteEntityMethod, - getEntityMethod, + createEntityMethod, + deleteEntityMethod, + getEntityMethod, } from "./clientEntityMethods"; - import { - attachMethod, - cancelMethod, - checkMethod, - checkoutMethod, - openBillingPortalMethod, - queryMethod, - setupPaymentMethod, - trackMethod, + attachMethod, + cancelMethod, + checkMethod, + checkoutMethod, + openBillingPortalMethod, + queryMethod, + setupPaymentMethod, } from "./clientGenMethods"; -import { listProductsMethod } from "./clientProdMethods"; +import { listPlansMethod } from "./clientPlanMethods"; import { createCode, redeemCode } from "./clientReferralMethods"; -import { CustomerData, CustomerCreateParams } from "@/clientTypes"; -import { handleFetchResult } from "@utils/handleFetchResult"; export interface ErrorResponse { - message: string; - code: string; + message: string; + code: string; } export type OmitCustomerType = - | "id" - | "name" - | "email" - | "fingerprint" - | "customer_id"; + | "id" + | "name" + | "email" + | "fingerprint" + | "customer_id"; export interface AutumnClientConfig { - backendUrl?: string; - getBearerToken?: () => Promise; - customerData?: CustomerData; - includeCredentials?: boolean; - betterAuthUrl?: string; - headers?: Record; - pathPrefix?: string; // Optional API path prefix override + backendUrl?: string; + getBearerToken?: () => Promise; + customerData?: CustomerData; + includeCredentials?: boolean; + betterAuthUrl?: string; + headers?: Record; + pathPrefix?: string; // Optional API path prefix override } export interface IAutumnClient { - readonly backendUrl?: string; - readonly prefix: string; - readonly headers?: Record; - readonly customerData?: CustomerData; - - // Core methods - createCustomer( - params: CustomerCreateParams & { - errorOnNotFound?: boolean; - } - ): Promise; - - // HTTP methods (stubbed for Convex) - detectCors(): Promise<{ - valid: boolean; - includeCredentials: boolean | undefined; - }>; - shouldIncludeCredentials(): Promise; - getHeaders(): Promise>; - handleFetch(options: { - path: string; - method: string; - body?: any; - }): Promise; - post(path: string, body: any): Promise; - get(path: string): Promise; - delete(path: string): Promise; - - // Autumn methods - attach(args: any): Promise; - checkout(args: any): Promise; - cancel(args: any): Promise; - check(args: any): Promise; - track(args: any): Promise; - openBillingPortal(args: any): Promise; - setupPayment(args: any): Promise; - query(args: any): Promise; - - entities: { - create(args: any): Promise; - get(entityId: string, args: any): Promise; - delete(args: any): Promise; - }; - - referrals: { - createCode(args: any): Promise; - redeemCode(args: any): Promise; - }; - - products: { - list(): Promise; - }; + readonly backendUrl?: string; + readonly prefix: string; + readonly headers?: Record; + readonly customerData?: CustomerData; + + // HTTP methods (stubbed for Convex) + detectCors(): Promise<{ + valid: boolean; + includeCredentials: boolean | undefined; + }>; + shouldIncludeCredentials(): Promise; + getHeaders(): Promise>; + handleFetch(options: { + path: string; + method: string; + body?: any; + }): Promise; + + post(path: string, body: any): Promise; + get(path: string): Promise; + delete(path: string): Promise; + + // Core methods + createCustomer( + params: CustomerCreateParams & { + errorOnNotFound?: boolean; + }, + ): Promise; + + // Autumn methods + attach(args: AttachParams): Promise; + checkout(args: CheckoutParams): Promise; + cancel(args: CancelParams): Promise; + openBillingPortal(args: any): Promise; + setupPayment(args: SetupPaymentParams): Promise; + query(args: QueryParams): Promise; + check(args: any): any; + + entities: { + create(args: any): Promise; + get(entityId: string, args: any): Promise; + delete(args: any): Promise; + }; + + referrals: { + createCode( + args: ReferralCreateCodeParams, + ): Promise; + redeemCode( + args: ReferralRedeemCodeParams, + ): Promise; + }; + + plans: { + list(): Promise; + }; } - - export class AutumnClient implements IAutumnClient { - public readonly backendUrl?: string; - protected readonly getBearerToken?: () => Promise; - public readonly customerData?: CustomerData; - protected includeCredentials?: boolean; - public readonly prefix: string; - public readonly camelCase: boolean; - public readonly headers?: Record; - public readonly framework?: string; - - constructor({ - backendUrl, - getBearerToken, - customerData, - includeCredentials, - betterAuthUrl, - headers, - pathPrefix, - }: AutumnClientConfig) { - this.backendUrl = backendUrl; - this.getBearerToken = getBearerToken; - this.customerData = customerData; - this.includeCredentials = includeCredentials; - this.prefix = "/api/autumn"; - let camelCase = false; - - if (betterAuthUrl) { - this.prefix = "/api/auth/autumn"; - this.backendUrl = betterAuthUrl; - camelCase = true; - } - - // If an explicit prefix is provided, prefer it over defaults - const providedPrefix = pathPrefix; - if (providedPrefix) { - // Normalize: ensure leading '/', collapse multiple '/', remove trailing '/' - const normalized = `/${providedPrefix}` - .replace(/\/+/g, "/") - .replace(/\/$/, ""); - this.prefix = normalized; - } - - this.headers = headers; - - // Feature-flags for input camelCase: - if (betterAuthUrl) camelCase = true; - this.camelCase = camelCase; - } - - /** - * Detects if the backend supports CORS credentials by making an OPTIONS request - */ - public async detectCors() { - if (this.prefix?.includes("/api/auth")) { - return { valid: true, includeCredentials: true }; - } - - const testEndpoint = `${this.backendUrl}${this.prefix}/cors`; - - // Test 1: With credentials - try { - await fetch(testEndpoint, { - method: "POST", - credentials: "include", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({}), - }); - - return { valid: true, includeCredentials: true }; - } catch (_) { - // Test 2: Without credentials - try { - await fetch(testEndpoint, { - method: "POST", - credentials: "omit", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({}), - }); - - return { valid: true, includeCredentials: false }; - } catch (_) { - return { valid: false, includeCredentials: undefined }; - } - } - } - - /** - * Automatically determines whether to include credentials based on CORS detection - */ - public async shouldIncludeCredentials(): Promise { - // If explicitly set, always use that value - if (this.includeCredentials !== undefined) { - return this.includeCredentials; - } - - try { - const corsResult = await this.detectCors(); - if (corsResult.valid) { - console.warn( - `[Autumn] Detected CORS credentials: ${corsResult.includeCredentials}` - ); - console.warn( - `[Autumn] To disable this warning, you can set includeCredentials={${ - corsResult.includeCredentials ? "true" : "false" - }} in ` - ); - this.includeCredentials = corsResult.includeCredentials; - return corsResult.includeCredentials || false; - } - - console.warn(`[Autumn] CORS detection failed, defaulting to false`); - return false; - } catch (error: any) { - console.error(`[Autumn] Error detecting CORS: ${error.message}`); - return false; - } - } - - async getHeaders() { - let headers: Record = { - "Content-Type": "application/json", - }; - - if (this.getBearerToken) { - try { - const token = await this.getBearerToken(); - headers.Authorization = `Bearer ${token}`; - } catch (_) { - console.error(`Failed to call getToken() in AutumnProvider`); - } - } - - if (this.headers) { - headers = { ...headers, ...this.headers }; - } - - return headers; - } - - async handleFetch>({ - path, - method, - body, - }: { - path: string; - method: string; - body?: any; - }) { - body = - method === "POST" - ? { - ...body, - [this.camelCase ? "customerData" : "customer_data"]: - this.customerData || undefined, - } - : undefined; - - const includeCredentials = await this.shouldIncludeCredentials(); - - - - try { - const response = await fetch(`${this.backendUrl}${path}`, { - method, - body: body ? JSON.stringify(body) : undefined, - headers: await this.getHeaders(), - credentials: includeCredentials ? "include" : "omit", - }); - - const loggedError = await logAuthError(response); - - return await handleFetchResult({ - response, - logger: console, - logError: !loggedError, - }); - } catch (error: unknown) { - logFetchError({ - method, - backendUrl: this.backendUrl || "", - path, - error, - }); - throw error; - // return { - // data: null, - // error: new AutumnError({ - // message: - // error instanceof Error ? error.message : JSON.stringify(error), - // code: "fetch_failed", - // }), - // }; - } - } - - async post( - path: string, - body: T | T[] - ) { - return await this.handleFetch({ - path, - method: "POST", - body, - }); - } - - async get(path: string) { - return await this.handleFetch({ - path, - method: "GET", - }); - } - - async delete(path: string) { - return await this.handleFetch({ - path, - method: "DELETE", - }); - } - - async createCustomer( - params: CustomerCreateParams & { errorOnNotFound?: boolean;} - ) { - return await createCustomerMethod({ - client: this, - params, - }); - } - - attach = attachMethod.bind(this); - checkout = checkoutMethod.bind(this); - cancel = cancelMethod.bind(this); - check = checkMethod.bind(this); - track = trackMethod.bind(this); - openBillingPortal = openBillingPortalMethod.bind(this); - setupPayment = setupPaymentMethod.bind(this); - query = queryMethod.bind(this); - - entities = { - create: createEntityMethod.bind(this), - get: getEntityMethod.bind(this), - delete: deleteEntityMethod.bind(this), - }; - - referrals = { - createCode: createCode.bind(this), - redeemCode: redeemCode.bind(this), - }; - - products = { - list: listProductsMethod.bind(this), - }; + public readonly backendUrl?: string; + protected readonly getBearerToken?: () => Promise; + public readonly customerData?: CustomerData; + protected includeCredentials?: boolean; + public readonly prefix: string; + public readonly camelCase: boolean; + public readonly headers?: Record; + public readonly framework?: string; + + constructor({ + backendUrl, + getBearerToken, + customerData, + includeCredentials, + betterAuthUrl, + headers, + pathPrefix, + }: AutumnClientConfig) { + this.backendUrl = backendUrl; + this.getBearerToken = getBearerToken; + this.customerData = customerData; + this.includeCredentials = includeCredentials; + this.prefix = "/api/autumn"; + let camelCase = false; + + if (betterAuthUrl) { + this.prefix = "/api/auth/autumn"; + this.backendUrl = betterAuthUrl; + camelCase = true; + } + + // If an explicit prefix is provided, prefer it over defaults + const providedPrefix = pathPrefix; + if (providedPrefix) { + // Normalize: ensure leading '/', collapse multiple '/', remove trailing '/' + const normalized = `/${providedPrefix}` + .replace(/\/+/g, "/") + .replace(/\/$/, ""); + this.prefix = normalized; + } + + this.headers = headers; + + // Feature-flags for input camelCase: + if (betterAuthUrl) camelCase = true; + this.camelCase = camelCase; + } + + /** + * Detects if the backend supports CORS credentials by making an OPTIONS request + */ + public async detectCors() { + if (this.prefix?.includes("/api/auth")) { + return { valid: true, includeCredentials: true }; + } + + const testEndpoint = `${this.backendUrl}${this.prefix}/cors`; + + // Test 1: With credentials + try { + await fetch(testEndpoint, { + method: "POST", + credentials: "include", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({}), + }); + + return { valid: true, includeCredentials: true }; + } catch (_) { + // Test 2: Without credentials + try { + await fetch(testEndpoint, { + method: "POST", + credentials: "omit", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({}), + }); + + return { valid: true, includeCredentials: false }; + } catch (_) { + return { valid: false, includeCredentials: undefined }; + } + } + } + + /** + * Automatically determines whether to include credentials based on CORS detection + */ + public async shouldIncludeCredentials(): Promise { + // If explicitly set, always use that value + if (this.includeCredentials !== undefined) { + return this.includeCredentials; + } + + try { + const corsResult = await this.detectCors(); + if (corsResult.valid) { + console.warn( + `[Autumn] Detected CORS credentials: ${corsResult.includeCredentials}`, + ); + console.warn( + `[Autumn] To disable this warning, you can set includeCredentials={${ + corsResult.includeCredentials ? "true" : "false" + }} in `, + ); + this.includeCredentials = corsResult.includeCredentials; + return corsResult.includeCredentials || false; + } + + console.warn(`[Autumn] CORS detection failed, defaulting to false`); + return false; + } catch (error: any) { + console.error(`[Autumn] Error detecting CORS: ${error.message}`); + return false; + } + } + + async getHeaders() { + let headers: Record = { + "Content-Type": "application/json", + }; + + if (this.getBearerToken) { + try { + const token = await this.getBearerToken(); + headers.Authorization = `Bearer ${token}`; + } catch (_) { + console.error(`Failed to call getToken() in AutumnProvider`); + } + } + + if (this.headers) { + headers = { ...headers, ...this.headers }; + } + + return headers; + } + + async handleFetch>({ + path, + method, + body, + }: { + path: string; + method: string; + body?: any; + }) { + body = + method === "POST" + ? { + ...body, + [this.camelCase ? "customerData" : "customer_data"]: + this.customerData || undefined, + } + : undefined; + + const includeCredentials = await this.shouldIncludeCredentials(); + + try { + const response = await fetch(`${this.backendUrl}${path}`, { + method, + body: body ? JSON.stringify(body) : undefined, + headers: await this.getHeaders(), + credentials: includeCredentials ? "include" : "omit", + }); + + const loggedError = await logAuthError(response); + + return await handleFetchResult({ + response, + logger: console, + logError: !loggedError, + }); + } catch (error: unknown) { + logFetchError({ + method, + backendUrl: this.backendUrl || "", + path, + error, + }); + throw error; + // return { + // data: null, + // error: new AutumnError({ + // message: + // error instanceof Error ? error.message : JSON.stringify(error), + // code: "fetch_failed", + // }), + // }; + } + } + + async post(path: string, body: T | T[]) { + return await this.handleFetch({ + path, + method: "POST", + body, + }); + } + + async get(path: string) { + return await this.handleFetch({ + path, + method: "GET", + }); + } + + async delete(path: string) { + return await this.handleFetch({ + path, + method: "DELETE", + }); + } + + async createCustomer( + params: CustomerCreateParams & { errorOnNotFound?: boolean }, + ) { + return await createCustomerMethod({ + client: this, + params, + }); + } + + attach = attachMethod.bind(this); + checkout = checkoutMethod.bind(this); + cancel = cancelMethod.bind(this); + check = checkMethod.bind(this); + openBillingPortal = openBillingPortalMethod.bind(this); + setupPayment = setupPaymentMethod.bind(this); + query = queryMethod.bind(this); + + entities = { + create: createEntityMethod.bind(this), + get: getEntityMethod.bind(this), + delete: deleteEntityMethod.bind(this), + }; + + referrals = { + createCode: createCode.bind(this), + redeemCode: redeemCode.bind(this), + }; + + plans = { + list: listPlansMethod.bind(this), + }; } diff --git a/autumn-js/src/libraries/react/client/clientGenMethods.ts b/autumn-js/src/libraries/react/client/clientGenMethods.ts index d62d003a..4894f297 100644 --- a/autumn-js/src/libraries/react/client/clientGenMethods.ts +++ b/autumn-js/src/libraries/react/client/clientGenMethods.ts @@ -1,75 +1,72 @@ +import type { Autumn } from "@sdk"; import type { - Autumn -} from "@sdk"; + AttachParams, + BillingPortalParams, + CancelParams, + CheckoutParams, + CheckParams, + QueryParams, + SetupPaymentParams, +} from "@/clientTypes"; import type { AutumnClient } from "./ReactAutumnClient"; -import { AttachParams, CheckoutParams, CancelParams, CheckParams, BillingPortalParams, QueryParams, SetupPaymentParams, TrackParams } from "@/clientTypes"; - export async function checkoutMethod( - this: AutumnClient, - params: CheckoutParams + this: AutumnClient, + params: CheckoutParams, ): Promise { - const res = await this.post(`${this.prefix}/checkout`, params); - return res; + const res = await this.post(`${this.prefix}/checkout`, params); + return res; } export async function attachMethod( - this: AutumnClient, - params: AttachParams + this: AutumnClient, + params: AttachParams, ): Promise { - const res = await this.post(`${this.prefix}/attach`, params); - return res; + const res = await this.post(`${this.prefix}/attach`, params); + return res; } export async function setupPaymentMethod( - this: AutumnClient, - params: SetupPaymentParams + this: AutumnClient, + params: SetupPaymentParams, ): Promise { - const res = await this.post(`${this.prefix}/setup_payment`, params); - return res; + const res = await this.post(`${this.prefix}/setup_payment`, params); + return res; } export async function cancelMethod( - this: AutumnClient, - params: CancelParams + this: AutumnClient, + params: CancelParams, ): Promise { - const res = await this.post(`${this.prefix}/cancel`, params); - return res; + const res = await this.post(`${this.prefix}/cancel`, params); + return res; } export async function checkMethod( - this: AutumnClient, - params: CheckParams + this: AutumnClient, + params: CheckParams, ): Promise { - // Remove dialog from params - const noDialogParams = { - ...params, - dialog: undefined, - }; - - const res = await this.post(`${this.prefix}/check`, noDialogParams); - return res; -} + // Remove dialog from params + const noDialogParams = { + ...params, + dialog: undefined, + }; -export async function trackMethod( - this: AutumnClient, - params: TrackParams -): Promise { - const res = await this.post(`${this.prefix}/track`, params); - return res; + const res = await this.post(`${this.prefix}/check`, noDialogParams); + return res; } export async function openBillingPortalMethod( - this: AutumnClient, - params?: BillingPortalParams + this: AutumnClient, + params?: BillingPortalParams, ): Promise { - const res = await this.post(`${this.prefix}/billing_portal`, params || {}); - return res; + const res = await this.post(`${this.prefix}/billing_portal`, params || {}); + return res; } export async function queryMethod( - this: AutumnClient, - params: QueryParams + this: AutumnClient, + params: QueryParams, ): Promise { - const res = await this.post(`${this.prefix}/query`, params); - return res; + const res = await this.post(`${this.prefix}/query`, params); + return res; } diff --git a/autumn-js/src/libraries/react/client/clientPlanMethods.ts b/autumn-js/src/libraries/react/client/clientPlanMethods.ts new file mode 100644 index 00000000..391fecdf --- /dev/null +++ b/autumn-js/src/libraries/react/client/clientPlanMethods.ts @@ -0,0 +1,9 @@ +import type Autumn from "@sdk"; +import type { AutumnClient } from "./ReactAutumnClient"; + +export async function listPlansMethod( + this: AutumnClient, +): Promise { + const res = await this.get(`${this.prefix}/plans`); + return res; +} diff --git a/autumn-js/src/libraries/react/client/clientProdMethods.ts b/autumn-js/src/libraries/react/client/clientProdMethods.ts deleted file mode 100644 index 8d613471..00000000 --- a/autumn-js/src/libraries/react/client/clientProdMethods.ts +++ /dev/null @@ -1,8 +0,0 @@ - -import type { AutumnClient } from "./ReactAutumnClient"; -import Autumn from "@sdk"; - -export async function listProductsMethod(this: AutumnClient): Promise { - const res = await this.get(`${this.prefix}/products`); - return res; -} diff --git a/autumn-js/src/libraries/react/client/clientReferralMethods.ts b/autumn-js/src/libraries/react/client/clientReferralMethods.ts index bd7c3a69..860e3b05 100644 --- a/autumn-js/src/libraries/react/client/clientReferralMethods.ts +++ b/autumn-js/src/libraries/react/client/clientReferralMethods.ts @@ -1,22 +1,22 @@ -import type { AutumnClient } from "./ReactAutumnClient"; +import type { Autumn } from "@sdk"; import type { - ReferralCreateCodeParams, - ReferralRedeemCodeParams, + ReferralCreateCodeParams, + ReferralRedeemCodeParams, } from "@/clientTypes"; -import { Autumn } from "@sdk"; +import type { AutumnClient } from "./ReactAutumnClient"; export async function createCode( - this: AutumnClient, - params: ReferralCreateCodeParams + this: AutumnClient, + params: ReferralCreateCodeParams, ): Promise { - const res = await this.post(`${this.prefix}/referrals/code`, params); - return res; + const res = await this.post(`${this.prefix}/referrals/code`, params); + return res; } export async function redeemCode( - this: AutumnClient, - params: ReferralRedeemCodeParams + this: AutumnClient, + params: ReferralRedeemCodeParams, ): Promise { - const res = await this.post(`${this.prefix}/referrals/redeem`, params); - return res; + const res = await this.post(`${this.prefix}/referrals/redeem`, params); + return res; } diff --git a/autumn-js/src/libraries/react/clientTypes/attachTypes.ts b/autumn-js/src/libraries/react/clientTypes/attachTypes.ts index e0e1f939..5d6d9705 100644 --- a/autumn-js/src/libraries/react/clientTypes/attachTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/attachTypes.ts @@ -5,19 +5,6 @@ import { EntityDataSchema } from "./entityDataTypes"; import type { CustomerData } from "./customerDataTypes"; import type { EntityData } from "./entityDataTypes"; -export const AttachParamsCustomerDataSchema = z.object({ - email: z.string().nullable().optional(), - fingerprint: z.string().nullable().optional(), - metadata: z.record(z.string(), z.unknown()).nullable().optional(), - name: z.string().nullable().optional(), - stripeId: z.string().nullable().optional() -}); - -export const AttachParamsEntityDataSchema = z.object({ - featureId: z.string(), - name: z.string().optional() -}); - export const AttachParamsOptionSchema = z.object({ featureId: z.string(), quantity: z.number(), @@ -27,42 +14,24 @@ export const AttachParamsOptionSchema = z.object({ }); export const AttachParamsSchema = z.object({ - checkoutSessionParams: z.unknown().optional(), - customerData: AttachParamsCustomerDataSchema.optional(), - entityData: AttachParamsEntityDataSchema.optional(), - entityId: z.string().nullable().optional(), - forceCheckout: z.boolean().optional(), - freeTrial: z.boolean().optional(), + checkoutSessionParams: z.unknown().describe("Additional parameters to pass onto Stripe when creating the checkout session").optional(), + customerData: CustomerDataSchema.describe("If auto creating a customer, the properties from this field will be used.").optional(), + entityData: EntityDataSchema.describe("If attaching a product to an entity and auto creating the entity, the properties\nfrom this field will be used. feature_id is required.").optional(), + entityId: z.string().nullable().describe("If attaching a product to an entity, can be used to auto create the entity").optional(), + forceCheckout: z.boolean().describe("Always return a Stripe Checkout URL, even if the customer's card is already on\nfile").optional(), + freeTrial: z.boolean().describe("If the product has a free trial, this field can be used to disable it when\nattaching (by passing in false)").optional(), invoice: z.boolean().optional(), - options: z.array(AttachParamsOptionSchema).nullable().optional(), - productId: z.string().nullable().optional(), - productIds: z.array(z.string()).nullable().optional(), - reward: z.union([z.string(), z.array(z.string())]).optional(), + options: z.array(AttachParamsOptionSchema).nullable().describe("Pass in quantities for prepaid features").optional(), + productId: z.string().nullable().describe("Product ID, set when creating the product in the Autumn dashboard").optional(), + productIds: z.array(z.string()).nullable().describe("Can be used to attach multiple products to the customer at once. For example,\nattaching a main product and an add-on.").optional(), + reward: z.union([z.string(), z.array(z.string())]).describe("An Autumn promo_code or reward_id to apply at checkout").optional(), setupPayment: z.boolean().optional(), - successUrl: z.string().optional(), + successUrl: z.string().describe("URL to redirect to after the purchase is successful").optional(), dialog: z.any().optional().describe("DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead."), openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab"), metadata: z.record(z.string(), z.string()).optional().describe("Additional metadata for the request") }); -export interface AttachParamsCustomerData { - email?: string | null; - - fingerprint?: string | null; - - metadata?: { [key: string]: unknown } | null; - - name?: string | null; - - stripeId?: string | null; -} - -export interface AttachParamsEntityData { - featureId: string; - - name?: string; -} - export interface AttachParamsOption { featureId: string; @@ -76,30 +45,67 @@ export interface AttachParamsOption { } export interface AttachParams { + /** + * Additional parameters to pass onto Stripe when creating the checkout session + */ checkoutSessionParams?: unknown; - customerData?: AttachParamsCustomerData; + /** + * If auto creating a customer, the properties from this field will be used. + */ + customerData?: CustomerData; - entityData?: AttachParamsEntityData; + /** + * If attaching a product to an entity and auto creating the entity, the properties +from this field will be used. feature_id is required. + */ + entityData?: EntityData; + /** + * If attaching a product to an entity, can be used to auto create the entity + */ entityId?: string | null; + /** + * Always return a Stripe Checkout URL, even if the customer's card is already on +file + */ forceCheckout?: boolean; + /** + * If the product has a free trial, this field can be used to disable it when +attaching (by passing in false) + */ freeTrial?: boolean; invoice?: boolean; + /** + * Pass in quantities for prepaid features + */ options?: AttachParamsOption[] | null; + /** + * Product ID, set when creating the product in the Autumn dashboard + */ productId?: string | null; + /** + * Can be used to attach multiple products to the customer at once. For example, +attaching a main product and an add-on. + */ productIds?: string[] | null; + /** + * An Autumn promo_code or reward_id to apply at checkout + */ reward?: string | Array; setupPayment?: boolean; + /** + * URL to redirect to after the purchase is successful + */ successUrl?: string; /** diff --git a/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts b/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts index 739746a9..2f0780ff 100644 --- a/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts @@ -2,11 +2,14 @@ import { z } from "zod"; export const BillingPortalParamsSchema = z.object({ - returnUrl: z.string().optional(), + returnUrl: z.string().describe("Time range for the query (defaults to last_cycle if not provided)").optional(), openInNewTab: z.boolean().optional().describe("Whether to open billing portal in a new tab") }); export interface BillingPortalParams { + /** + * Time range for the query (defaults to last_cycle if not provided) + */ returnUrl?: string; /** diff --git a/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts b/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts index a66c6857..b43f2f86 100644 --- a/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts @@ -2,18 +2,30 @@ import { z } from "zod"; export const CancelParamsSchema = z.object({ - productId: z.string(), - cancelImmediately: z.boolean().optional(), - entityId: z.string().nullable().optional(), - prorate: z.boolean().nullable().optional() + productId: z.string().describe("The ID of the product to cancel"), + cancelImmediately: z.boolean().describe("Whether to cancel the product immediately or at period end").optional(), + entityId: z.string().nullable().describe("The ID of the entity (optional)").optional(), + prorate: z.boolean().nullable().describe("Whether to prorate the cancellation (defaults to true if not specified)").optional() }); export interface CancelParams { + /** + * The ID of the product to cancel + */ productId: string; + /** + * Whether to cancel the product immediately or at period end + */ cancelImmediately?: boolean; + /** + * The ID of the entity (optional) + */ entityId?: string | null; + /** + * Whether to prorate the cancellation (defaults to true if not specified) + */ prorate?: boolean | null; } diff --git a/autumn-js/src/libraries/react/clientTypes/checkTypes.ts b/autumn-js/src/libraries/react/clientTypes/checkTypes.ts index 6dea51ce..16833ae8 100644 --- a/autumn-js/src/libraries/react/clientTypes/checkTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/checkTypes.ts @@ -1,78 +1,55 @@ // Auto-generated Zod schema import { z } from "zod"; -import { CustomerDataSchema } from "./customerDataTypes"; -import { EntityDataSchema } from "./entityDataTypes"; import type { CustomerData } from "./customerDataTypes"; +import { CustomerDataSchema } from "./customerDataTypes"; import type { EntityData } from "./entityDataTypes"; - -export const CheckParamsCustomerDataSchema = z.object({ - email: z.string().nullable().optional(), - fingerprint: z.string().nullable().optional(), - metadata: z.record(z.string(), z.unknown()).nullable().optional(), - name: z.string().nullable().optional(), - stripeId: z.string().nullable().optional() -}); - -export const CheckParamsEntityDataSchema = z.object({ - featureId: z.string(), - name: z.string().optional() -}); +import { EntityDataSchema } from "./entityDataTypes"; export const CheckParamsSchema = z.object({ - customerData: CheckParamsCustomerDataSchema.optional(), - entityData: CheckParamsEntityDataSchema.optional(), - entityId: z.string().optional(), - featureId: z.string().optional(), - productId: z.string().optional(), - requiredBalance: z.number().optional(), - sendEvent: z.boolean().optional(), - withPreview: z.boolean().optional(), - dialog: z.any().optional().describe("Dialog configuration for feature check flow"), - properties: z.record(z.string(), z.any()).optional().describe("Additional properties for the feature check") + customerData: CustomerDataSchema.describe( + "Used to add customer details like name or email when auto-creating a customer.", + ).optional(), + entityData: EntityDataSchema.optional(), + entityId: z.string().optional(), + featureId: z.string().optional(), + productId: z.string().optional(), + properties: z.record(z.string(), z.unknown()).optional(), + requiredBalance: z.number().optional(), + requiredQuantity: z.number().optional(), + sendEvent: z.boolean().optional(), + withPreview: z.boolean().optional(), + dialog: z + .any() + .optional() + .describe("Dialog configuration for feature check flow"), }); -export interface CheckParamsCustomerData { - email?: string | null; - - fingerprint?: string | null; - - metadata?: { [key: string]: unknown } | null; - - name?: string | null; - - stripeId?: string | null; -} - -export interface CheckParamsEntityData { - featureId: string; - - name?: string; -} - export interface CheckParams { - customerData?: CheckParamsCustomerData; + /** + * Used to add customer details like name or email when auto-creating a customer. + */ + customerData?: CustomerData; + + entityData?: EntityData; - entityData?: CheckParamsEntityData; + entityId?: string; - entityId?: string; + featureId?: string; - featureId?: string; + productId?: string; - productId?: string; + properties?: { [key: string]: unknown }; - requiredBalance?: number; + requiredBalance?: number; - sendEvent?: boolean; + requiredQuantity?: number; - withPreview?: boolean; + sendEvent?: boolean; - /** - * Dialog configuration for feature check flow - */ - dialog?: any; + withPreview?: boolean; - /** - * Additional properties for the feature check - */ - properties?: Record; + /** + * Dialog configuration for feature check flow + */ + dialog?: any; } diff --git a/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts b/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts index 42efa0a3..8481c9ea 100644 --- a/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts @@ -5,19 +5,6 @@ import { EntityDataSchema } from "./entityDataTypes"; import type { CustomerData } from "./customerDataTypes"; import type { EntityData } from "./entityDataTypes"; -export const CheckoutParamsCustomerDataSchema = z.object({ - email: z.string().nullable().optional(), - fingerprint: z.string().nullable().optional(), - metadata: z.record(z.string(), z.unknown()).nullable().optional(), - name: z.string().nullable().optional(), - stripeId: z.string().nullable().optional() -}); - -export const CheckoutParamsEntityDataSchema = z.object({ - featureId: z.string(), - name: z.string().optional() -}); - export const CheckoutParamsOptionSchema = z.object({ featureId: z.string(), quantity: z.number(), @@ -27,41 +14,23 @@ export const CheckoutParamsOptionSchema = z.object({ }); export const CheckoutParamsSchema = z.object({ - checkoutSessionParams: z.unknown().optional(), - customerData: CheckoutParamsCustomerDataSchema.optional(), - entityData: CheckoutParamsEntityDataSchema.optional(), - entityId: z.string().nullable().optional(), - forceCheckout: z.boolean().optional(), - freeTrial: z.boolean().optional(), + checkoutSessionParams: z.unknown().describe("Additional parameters to pass onto Stripe when creating the checkout session").optional(), + customerData: CustomerDataSchema.describe("If auto creating a customer, the properties from this field will be used.").optional(), + entityData: EntityDataSchema.describe("If attaching a product to an entity and auto creating the entity, the properties\nfrom this field will be used. feature_id is required.").optional(), + entityId: z.string().nullable().describe("If attaching a product to an entity, can be used to auto create the entity").optional(), + forceCheckout: z.boolean().describe("Always return a Stripe Checkout URL, even if the customer's card is already on\nfile").optional(), + freeTrial: z.boolean().describe("If the product has a free trial, this field can be used to disable it when\nattaching (by passing in false)").optional(), invoice: z.boolean().optional(), - options: z.array(CheckoutParamsOptionSchema).nullable().optional(), - productId: z.string().nullable().optional(), - productIds: z.array(z.string()).nullable().optional(), - reward: z.union([z.string(), z.array(z.string())]).optional(), + options: z.array(CheckoutParamsOptionSchema).nullable().describe("Pass in quantities for prepaid features").optional(), + productId: z.string().nullable().describe("Product ID, set when creating the product in the Autumn dashboard").optional(), + productIds: z.array(z.string()).nullable().describe("Can be used to attach multiple products to the customer at once. For example,\nattaching a main product and an add-on.").optional(), + reward: z.union([z.string(), z.array(z.string())]).describe("An Autumn promo_code or reward_id to apply at checkout").optional(), setupPayment: z.boolean().optional(), - successUrl: z.string().optional(), + successUrl: z.string().describe("URL to redirect to after the purchase is successful").optional(), dialog: z.any().optional().describe("Dialog configuration for checkout flow"), openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab") }); -export interface CheckoutParamsCustomerData { - email?: string | null; - - fingerprint?: string | null; - - metadata?: { [key: string]: unknown } | null; - - name?: string | null; - - stripeId?: string | null; -} - -export interface CheckoutParamsEntityData { - featureId: string; - - name?: string; -} - export interface CheckoutParamsOption { featureId: string; @@ -75,30 +44,67 @@ export interface CheckoutParamsOption { } export interface CheckoutParams { + /** + * Additional parameters to pass onto Stripe when creating the checkout session + */ checkoutSessionParams?: unknown; - customerData?: CheckoutParamsCustomerData; + /** + * If auto creating a customer, the properties from this field will be used. + */ + customerData?: CustomerData; - entityData?: CheckoutParamsEntityData; + /** + * If attaching a product to an entity and auto creating the entity, the properties +from this field will be used. feature_id is required. + */ + entityData?: EntityData; + /** + * If attaching a product to an entity, can be used to auto create the entity + */ entityId?: string | null; + /** + * Always return a Stripe Checkout URL, even if the customer's card is already on +file + */ forceCheckout?: boolean; + /** + * If the product has a free trial, this field can be used to disable it when +attaching (by passing in false) + */ freeTrial?: boolean; invoice?: boolean; + /** + * Pass in quantities for prepaid features + */ options?: CheckoutParamsOption[] | null; + /** + * Product ID, set when creating the product in the Autumn dashboard + */ productId?: string | null; + /** + * Can be used to attach multiple products to the customer at once. For example, +attaching a main product and an add-on. + */ productIds?: string[] | null; + /** + * An Autumn promo_code or reward_id to apply at checkout + */ reward?: string | Array; setupPayment?: boolean; + /** + * URL to redirect to after the purchase is successful + */ successUrl?: string; /** diff --git a/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts b/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts index 4a5fe396..2f0266e6 100644 --- a/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts @@ -3,67 +3,71 @@ import { z } from "zod"; import { EntityDataSchema } from "./entityDataTypes"; import type { EntityData } from "./entityDataTypes"; -export const CustomerCreateParamsEntityDataSchema = z.object({ - featureId: z.string(), - name: z.string().optional() -}); - export const CustomerCreateParamsSchema = z.object({ - expand: z.union([z.unknown(), z.literal('trials_used'), z.literal('rewards'), z.literal('entities'), z.literal('referrals'), z.literal('payment_method'), z.unknown()]).describe("Query param:").optional(), - email: z.string().nullable().describe("Body param:").optional(), - entityData: CustomerCreateParamsEntityDataSchema.describe("Body param:").optional(), - entityId: z.string().describe("Body param:").optional(), - fingerprint: z.string().describe("Body param:").optional(), - metadata: z.record(z.string(), z.unknown()).describe("Body param:").optional(), - name: z.string().nullable().describe("Body param:").optional(), - stripeId: z.string().describe("Body param:").optional(), + expand: z.union([z.unknown(), z.literal('invoices'), z.literal('trials_used'), z.literal('rewards'), z.literal('entities'), z.literal('referrals'), z.literal('payment_method'), z.literal('upcoming_invoice'), z.literal('subscriptions.plan'), z.unknown()]).describe("Query param:").optional(), + disableDefault: z.boolean().describe("Body param:").optional(), + email: z.string().nullable().describe("Body param: Customer's email address").optional(), + entityData: EntityDataSchema.describe("Body param: Data for creating an entity").optional(), + entityId: z.string().describe("Body param: Entity ID to associate with the customer").optional(), + fingerprint: z.string().describe("Body param: Unique identifier (eg, serial number) to detect duplicate customers\nand prevent free trial abuse").optional(), + metadata: z.record(z.string(), z.unknown()).nullable().describe("Body param: Additional metadata for the customer").optional(), + name: z.string().nullable().describe("Body param: Customer's name").optional(), + stripeId: z.string().describe("Body param: Stripe customer ID if you already have one").optional(), errorOnNotFound: z.boolean().optional().describe("Whether to return an error if customer is not found") }); -export interface CustomerCreateParamsEntityData { - featureId: string; - - name?: string; -} - export interface CustomerCreateParams { /** * Query param: */ - expand?: ('invoices' | 'trials_used' | 'rewards' | 'entities' | 'referrals' | 'payment_method' | 'upcoming_invoice')[]; + expand?: (| 'invoices' + | 'trials_used' + | 'rewards' + | 'entities' + | 'referrals' + | 'payment_method' + | 'upcoming_invoice' + | 'subscriptions.plan' + | 'balances.feature')[]; /** * Body param: */ + disableDefault?: boolean; + + /** + * Body param: Customer's email address + */ email?: string | null; /** - * Body param: + * Body param: Data for creating an entity */ - entityData?: CustomerCreateParamsEntityData; + entityData?: EntityData; /** - * Body param: + * Body param: Entity ID to associate with the customer */ entityId?: string; /** - * Body param: + * Body param: Unique identifier (eg, serial number) to detect duplicate customers +and prevent free trial abuse */ fingerprint?: string; /** - * Body param: + * Body param: Additional metadata for the customer */ - metadata?: { [key: string]: unknown }; + metadata?: { [key: string]: unknown } | null; /** - * Body param: + * Body param: Customer's name */ name?: string | null; /** - * Body param: + * Body param: Stripe customer ID if you already have one */ stripeId?: string; diff --git a/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts b/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts index a9cba182..6b0109fc 100644 --- a/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts @@ -1,16 +1,33 @@ // Auto-generated Zod schema import { z } from "zod"; +import { CustomerDataSchema } from "./customerDataTypes"; +import type { CustomerData } from "./customerDataTypes"; export const EntityCreateParamsSchema = z.object({ - id: z.string(), - featureId: z.string(), - name: z.string().nullable().optional() + id: z.string().nullable().describe("The ID of the entity"), + featureId: z.string().describe("The ID of the feature this entity is associated with"), + customerData: CustomerDataSchema.describe("Used to add customer details like name or email when auto-creating a customer.").optional(), + name: z.string().nullable().describe("The name of the entity").optional() }); export interface EntityCreateParams { - id: string; + /** + * The ID of the entity + */ + id: string | null; + /** + * The ID of the feature this entity is associated with + */ featureId: string; + /** + * Used to add customer details like name or email when auto-creating a customer. + */ + customerData?: CustomerData; + + /** + * The name of the entity + */ name?: string | null; } diff --git a/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts b/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts index 1f3e7500..489e6776 100644 --- a/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts @@ -2,9 +2,12 @@ import { z } from "zod"; export const ReferralCreateCodeParamsSchema = z.object({ - programId: z.string() + programId: z.string().describe("ID of your referral program") }); export interface ReferralCreateCodeParams { + /** + * ID of your referral program + */ programId: string; } diff --git a/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts b/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts index 7bd8d891..9dd1560e 100644 --- a/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts @@ -2,21 +2,46 @@ import { z } from "zod"; export const CustomerDataSchema = z.object({ - email: z.string().nullable().optional(), - fingerprint: z.string().nullable().optional(), - metadata: z.record(z.string(), z.unknown()).nullable().optional(), - name: z.string().nullable().optional(), - stripeId: z.string().nullable().optional() -}); + disableDefault: z.boolean().describe("Disable default products from being attached to the customer").optional(), + email: z.string().nullable().describe("Customer's email address").optional(), + fingerprint: z.string().nullable().describe("Unique identifier (eg, serial number) to detect duplicate customers and prevent\nfree trial abuse").optional(), + metadata: z.record(z.string(), z.unknown()).nullable().describe("Additional metadata for the customer").optional(), + name: z.string().nullable().describe("Customer's name").optional(), + stripeId: z.string().nullable().describe("Stripe customer ID if you already have one").optional() +}).describe("Used to add customer details like name or email when auto-creating a customer."); +/** + * Used to add customer details like name or email when auto-creating a customer. + */ export interface CustomerData { + /** + * Disable default products from being attached to the customer + */ + disableDefault?: boolean; + + /** + * Customer's email address + */ email?: string | null; + /** + * Unique identifier (eg, serial number) to detect duplicate customers and prevent +free trial abuse + */ fingerprint?: string | null; + /** + * Additional metadata for the customer + */ metadata?: { [key: string]: unknown } | null; + /** + * Customer's name + */ name?: string | null; + /** + * Stripe customer ID if you already have one + */ stripeId?: string | null; } diff --git a/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts b/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts index 4fd967ec..eb322cf9 100644 --- a/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts @@ -2,12 +2,18 @@ import { z } from "zod"; export const EntityDataSchema = z.object({ - featureId: z.string(), - name: z.string().optional() + featureId: z.string().describe("The feature ID that this entity is associated with"), + name: z.string().describe("Name of the entity").optional() }); export interface EntityData { + /** + * The feature ID that this entity is associated with + */ featureId: string; + /** + * Name of the entity + */ name?: string; } diff --git a/autumn-js/src/libraries/react/clientTypes/index.ts b/autumn-js/src/libraries/react/clientTypes/index.ts index afd88f68..5f5aa5f9 100644 --- a/autumn-js/src/libraries/react/clientTypes/index.ts +++ b/autumn-js/src/libraries/react/clientTypes/index.ts @@ -15,5 +15,4 @@ export * from './billingPortalTypes'; export * from './setupPaymentTypes'; export * from './cancelTypes'; export * from './checkTypes'; -export * from './trackTypes'; export * from './queryTypes'; diff --git a/autumn-js/src/libraries/react/clientTypes/queryTypes.ts b/autumn-js/src/libraries/react/clientTypes/queryTypes.ts index fb80cfdc..d95a934d 100644 --- a/autumn-js/src/libraries/react/clientTypes/queryTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/queryTypes.ts @@ -2,12 +2,18 @@ import { z } from "zod"; export const QueryParamsSchema = z.object({ - featureId: z.union([z.string(), z.array(z.string())]), - range: z.union([z.literal('24h'), z.literal('7d'), z.literal('30d'), z.literal('90d'), z.literal('last_cycle')]).nullable().optional() + featureId: z.union([z.string(), z.array(z.string())]).describe("The feature ID(s) to query"), + range: z.union([z.literal('24h'), z.literal('7d'), z.literal('30d'), z.literal('90d'), z.literal('last_cycle')]).nullable().describe("Time range for the query (defaults to last_cycle if not provided)").optional() }); export interface QueryParams { + /** + * The feature ID(s) to query + */ featureId: string | Array; + /** + * Time range for the query (defaults to last_cycle if not provided) + */ range?: '24h' | '7d' | '30d' | '90d' | 'last_cycle' | null; } diff --git a/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts b/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts index 2abf1459..b65323ed 100644 --- a/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts @@ -2,9 +2,12 @@ import { z } from "zod"; export const ReferralRedeemCodeParamsSchema = z.object({ - code: z.string() + code: z.string().describe("The referral code to redeem") }); export interface ReferralRedeemCodeParams { + /** + * The referral code to redeem + */ code: string; } diff --git a/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts b/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts index e7a76a34..48c43529 100644 --- a/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts @@ -2,14 +2,20 @@ import { z } from "zod"; export const SetupPaymentParamsSchema = z.object({ - checkoutSessionParams: z.record(z.string(), z.unknown()).optional(), - successUrl: z.string().optional(), + checkoutSessionParams: z.record(z.string(), z.unknown()).describe("Additional parameters for the checkout session").optional(), + successUrl: z.string().describe("URL to redirect to after successful payment setup").optional(), openInNewTab: z.boolean().optional().describe("Whether to open payment setup in a new tab") }); export interface SetupPaymentParams { + /** + * Additional parameters for the checkout session + */ checkoutSessionParams?: { [key: string]: unknown }; + /** + * URL to redirect to after successful payment setup + */ successUrl?: string; /** diff --git a/autumn-js/src/libraries/react/clientTypes/trackTypes.ts b/autumn-js/src/libraries/react/clientTypes/trackTypes.ts index f725e904..279784e4 100644 --- a/autumn-js/src/libraries/react/clientTypes/trackTypes.ts +++ b/autumn-js/src/libraries/react/clientTypes/trackTypes.ts @@ -5,68 +5,80 @@ import { EntityDataSchema } from "./entityDataTypes"; import type { CustomerData } from "./customerDataTypes"; import type { EntityData } from "./entityDataTypes"; -export const TrackParamsCustomerDataSchema = z.object({ - email: z.string().nullable().optional(), - fingerprint: z.string().nullable().optional(), - metadata: z.record(z.string(), z.unknown()).nullable().optional(), - name: z.string().nullable().optional(), - stripeId: z.string().nullable().optional() -}); - -export const TrackParamsEntityDataSchema = z.object({ - featureId: z.string(), - name: z.string().optional() -}); - export const TrackParamsSchema = z.object({ - customerData: TrackParamsCustomerDataSchema.nullable().optional(), - entityData: TrackParamsEntityDataSchema.nullable().optional(), - entityId: z.string().nullable().optional(), - eventName: z.string().optional(), - featureId: z.string().optional(), - idempotencyKey: z.string().nullable().optional(), - properties: z.record(z.string(), z.unknown()).nullable().optional(), - setUsage: z.boolean().nullable().optional(), - timestamp: z.number().nullable().optional(), - value: z.number().nullable().optional() + customerData: CustomerDataSchema.describe("Customer data to create or update the customer if they don't exist").optional(), + entityData: EntityDataSchema.describe("Data for creating the entity if it doesn't exist").optional(), + entityId: z.string().describe("The ID of the entity this event is associated with").optional(), + eventName: z.string().describe("The name of the event to track").optional(), + featureId: z.string().describe("The ID of the feature (alternative to event_name for usage events)").optional(), + idempotencyKey: z.string().describe("Idempotency key to prevent duplicate events").optional(), + overageBehavior: z.union([z.literal('cap'), z.literal('reject')]).describe("The behavior when the balance is insufficient").optional(), + properties: z.record(z.string(), z.unknown()).describe("Additional properties for the event").optional(), + setUsage: z.boolean().nullable().describe("Whether to set the usage to this value instead of increment").optional(), + skipEvent: z.boolean().describe("Skip event insertion (for stress tests). Balance is still deducted, but event is\nnot persisted to database.").optional(), + timestamp: z.number().describe("Unix timestamp in milliseconds when the event occurred").optional(), + value: z.number().describe("The value/count of the event").optional() }); -export interface TrackParamsCustomerData { - email?: string | null; - - fingerprint?: string | null; - - metadata?: { [key: string]: unknown } | null; - - name?: string | null; - - stripeId?: string | null; -} - -export interface TrackParamsEntityData { - featureId: string; - - name?: string; -} - export interface TrackParams { - customerData?: TrackParamsCustomerData | null; - - entityData?: TrackParamsEntityData | null; - - entityId?: string | null; - + /** + * Customer data to create or update the customer if they don't exist + */ + customerData?: CustomerData; + + /** + * Data for creating the entity if it doesn't exist + */ + entityData?: EntityData; + + /** + * The ID of the entity this event is associated with + */ + entityId?: string; + + /** + * The name of the event to track + */ eventName?: string; + /** + * The ID of the feature (alternative to event_name for usage events) + */ featureId?: string; - idempotencyKey?: string | null; + /** + * Idempotency key to prevent duplicate events + */ + idempotencyKey?: string; - properties?: { [key: string]: unknown } | null; + /** + * The behavior when the balance is insufficient + */ + overageBehavior?: 'cap' | 'reject'; - setUsage?: boolean | null; + /** + * Additional properties for the event + */ + properties?: { [key: string]: unknown }; - timestamp?: number | null; + /** + * Whether to set the usage to this value instead of increment + */ + setUsage?: boolean | null; - value?: number | null; + /** + * Skip event insertion (for stress tests). Balance is still deducted, but event is +not persisted to database. + */ + skipEvent?: boolean; + + /** + * Unix timestamp in milliseconds when the event occurred + */ + timestamp?: number; + + /** + * The value/count of the event + */ + value?: number; } diff --git a/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx b/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx index 27253d6d..de12c69a 100644 --- a/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx +++ b/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx @@ -1,7 +1,7 @@ "use client"; import * as AccordionPrimitive from "@radix-ui/react-accordion"; // import type { CheckoutParams, CheckoutResult, ProductItem } from "@sdk"; -import { Autumn } from "@sdk"; +import type { Autumn } from "@sdk"; import { ArrowRight, ChevronDown, Loader2 } from "lucide-react"; import type React from "react"; import { useEffect, useState } from "react"; @@ -92,12 +92,14 @@ export default function CheckoutDialog(params: CheckoutDialogProps) { onClick={async () => { setLoading(true); - const options = checkoutResult.options?.map((option: Autumn.CheckoutResponse.Option) => { - return { - featureId: option.feature_id, - quantity: option.quantity, - }; - }); + const options = checkoutResult.options?.map( + (option: Autumn.CheckoutResponse.Option) => { + return { + featureId: option.feature_id, + quantity: option.quantity, + }; + }, + ); await attach({ productId: checkoutResult.product?.id, @@ -150,7 +152,11 @@ function PriceInformation({ ); } -function DueAmounts({ checkoutResult }: { checkoutResult: Autumn.CheckoutResponse }) { +function DueAmounts({ + checkoutResult, +}: { + checkoutResult: Autumn.CheckoutResponse; +}) { const { next_cycle, product } = checkoutResult; const nextCycleAtStr = next_cycle ? new Date(next_cycle.starts_at).toLocaleDateString() @@ -247,7 +253,11 @@ function ProductItems({ ); } -function CheckoutLines({ checkoutResult }: { checkoutResult: Autumn.CheckoutResponse }) { +function CheckoutLines({ + checkoutResult, +}: { + checkoutResult: Autumn.CheckoutResponse; +}) { return ( @@ -267,7 +277,10 @@ function CheckoutLines({ checkoutResult }: { checkoutResult: Autumn.CheckoutResp .filter((line: Autumn.CheckoutResponse.Line) => line.amount !== 0) .map((line, index) => { return ( -
+

{line.description}

{new Intl.NumberFormat("en-US", { diff --git a/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx b/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx index 7d3e91bc..4be19754 100644 --- a/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx +++ b/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx @@ -1,66 +1,74 @@ -import { type ProductWithDisplay } from "@/index"; +import type Autumn from "@sdk"; -export const getPricingTableContent = (product: ProductWithDisplay) => { - const { scenario, properties } = product; - const { is_one_off = false, updateable = false, has_trial = false } = properties || {}; +export const getPricingTableContent = ({ + plan, +}: { + plan: Autumn.Plan | null; +}) => { + if (!plan) { + return { + buttonText:

Get Started

, + }; + } - if (has_trial) { - return { - buttonText:

Start Free Trial

, - }; - } + // TODO 4: hasTrial = plan.free_trial and !trial_used + const hasTrial = plan.free_trial; + const isOneOff = plan.price?.interval === "one_off"; + const scenario = plan.customer_eligibility?.scenario; - switch (scenario) { - case "scheduled": - return { - buttonText:

Plan Scheduled

, - }; + console.log(`Plan: ${plan.id}, Scenario: ${scenario}`); - case "active": - if (updateable) { - return { - buttonText:

Update Plan

, - }; - } + if (hasTrial) { + return { + buttonText:

Start Free Trial

, + }; + } - return { - buttonText:

Current Plan

, - }; + switch (scenario) { + case "scheduled": + return { + buttonText:

Plan Scheduled

, + }; - case "new": - if (is_one_off) { - return { - buttonText:

Purchase

, - }; - } + case "active": + return { + buttonText:

Current Plan

, + }; - return { - buttonText:

Get started

, - }; + case "new": + if (isOneOff) { + return { + buttonText:

Purchase

, + }; + } - case "renew": - return { - buttonText:

Renew

, - }; + return { + buttonText:

Get started

, + }; - case "upgrade": - return { - buttonText:

Upgrade

, - }; + case "renew": + return { + buttonText:

Renew

, + }; - case "downgrade": - return { - buttonText:

Downgrade

, - }; + case "upgrade": + return { + buttonText:

Upgrade

, + }; - case "cancel": - return { - buttonText:

Cancel Plan

, - }; + case "downgrade": + return { + buttonText:

Downgrade

, + }; - default: - return { - buttonText:

Get Started

, - }; - } + case "cancel": + return { + buttonText:

Cancel Plan

, + }; + + default: + return { + buttonText:

Get Started

, + }; + } }; diff --git a/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx b/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx index 6348d0a4..7b5317b3 100644 --- a/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx +++ b/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx @@ -1,408 +1,407 @@ -import React from "react"; - -import { useCustomer, usePricingTable, ProductDetails, ProductWithDisplay } from "@/index"; -import { Autumn } from "@sdk"; -import { createContext, useContext, useState } from "react"; -import { cn } from "@/lib/utils"; -import { Switch } from "@/components/ui/switch"; +import { Loader2 } from "lucide-react"; +import React, { createContext, useContext, useState } from "react"; import { Button } from "@/components/ui/button"; -import CheckoutDialog from "../checkout-dialog/checkout-dialog-synced"; -import { getPricingTableContent } from "./lib/pricing-table-content"; +import { Switch } from "@/components/ui/switch"; +import type { PricingCardData, PricingCardOverride } from "@/index"; +import { CheckoutDialog, useCustomer, usePricingTable } from "@/index"; +import { cn } from "@/lib/utils"; import { loadingStyles, spinnerStyles } from "@/utils/inject-styles"; -import { Loader2 } from "lucide-react"; +import { getPricingTableContent } from "./lib/pricing-table-content"; export default function PricingTable({ - productDetails, + overrides, }: { - productDetails?: ProductDetails[]; + overrides?: PricingCardOverride[]; }) { - const { customer, checkout } = useCustomer({ errorOnNotFound: false }); - - const [isAnnual, setIsAnnual] = useState(false); - const { products, isLoading, error } = usePricingTable({ productDetails }); - - if (isLoading) { - return ( -
- -
- ); - } - - if (error) { - return
Something went wrong...
; - } - - const intervals = Array.from( - new Set( - products?.map((p) => p.properties?.interval_group).filter((i) => !!i) - ) - ); - - const multiInterval = intervals.length > 1; - - const intervalFilter = (product: Autumn.Product) => { - if (!product.properties?.interval_group) { - return true; - } - - if (multiInterval) { - if (isAnnual) { - return product.properties?.interval_group === "year"; - } else { - return product.properties?.interval_group === "month"; - } - } - - return true; - }; - - return ( -
- {products && ( - - {products.filter(intervalFilter).map((product, index) => ( - { - if (product.id && customer) { - await checkout({ - productId: product.id, - dialog: CheckoutDialog, - }); - } else if (product.display?.button_url) { - window.open(product.display?.button_url, "_blank"); - } - }, - }} - /> - ))} - - )} -
- ); + const [isAnnual, setIsAnnual] = useState(false); + + const { data: customer, checkout } = useCustomer({ errorOnNotFound: false }); + const { data, isLoading, error } = usePricingTable({ overrides }); + + if (isLoading) { + return ( +
+ +
+ ); + } + + if (error) { + return
Something went wrong...
; + } + + const intervals = Array.from( + new Set(data?.map((p) => p.plan?.price?.interval).filter((i) => !!i)), + ); + + const multiInterval = intervals.length > 1; + + const intervalFilter = (cardData: PricingCardData) => { + const plan = cardData.plan; + const interval = plan?.price?.interval; + if (!interval) return true; + + if (multiInterval) { + if (isAnnual) { + return interval === "year"; + } else { + return interval === "month"; + } + } + + return true; + }; + + return ( +
+ {data && ( + + {data.filter(intervalFilter).map((cardData, index) => { + const { plan, override } = cardData; + const scenario = plan?.customer_eligibility?.scenario; + const disabled = scenario === "active" || scenario === "scheduled"; + + return ( + { + if (override.button?.onClick) { + await override.button?.onClick?.(); + } else if (cardData.plan?.id && customer) { + await checkout({ + productId: cardData.plan?.id, + dialog: CheckoutDialog, + }); + } else { + console.error("No plan ID or onClick function provided"); + } + }, + }} + /> + ); + })} + + )} +
+ ); } const PricingTableContext = createContext<{ - isAnnualToggle: boolean; - setIsAnnualToggle: (isAnnual: boolean) => void; - products: ProductWithDisplay[]; - showFeatures: boolean; + isAnnualToggle: boolean; + setIsAnnualToggle: (isAnnual: boolean) => void; + showFeatures: boolean; }>({ - isAnnualToggle: false, - setIsAnnualToggle: () => {}, - products: [], - showFeatures: true, + isAnnualToggle: false, + setIsAnnualToggle: () => {}, + showFeatures: true, }); export const usePricingTableContext = (componentName: string) => { - const context = useContext(PricingTableContext); + const context = useContext(PricingTableContext); - if (context === undefined) { - throw new Error(`${componentName} must be used within `); - } + if (context === undefined) { + throw new Error(`${componentName} must be used within `); + } - return context; + return context; }; export const PricingTableContainer = ({ - children, - products, - showFeatures = true, - className, - isAnnualToggle, - setIsAnnualToggle, - multiInterval, + children, + data, + showFeatures = true, + className, + isAnnualToggle, + setIsAnnualToggle, + multiInterval, }: { - children?: React.ReactNode; - products?: ProductWithDisplay[]; - showFeatures?: boolean; - className?: string; - isAnnualToggle: boolean; - setIsAnnualToggle: (isAnnual: boolean) => void; - multiInterval: boolean; + children?: React.ReactNode; + data?: PricingCardData[]; + showFeatures?: boolean; + className?: string; + isAnnualToggle: boolean; + setIsAnnualToggle: (isAnnual: boolean) => void; + multiInterval: boolean; }) => { - if (!products) { - throw new Error("products is required in "); - } - - if (products.length === 0) { - return <>; - } - - const hasRecommended = products?.some((p) => p.display?.recommend_text); - return ( - -
- {multiInterval && ( -
p.display?.recommend_text) && "au-mb-8" - )} - > - -
- )} -
- {children} -
-
-
- ); + if (!data) { + throw new Error("data prop is empty in "); + } + + if (data.length === 0) return; + + const hasRecommended = data?.some((p) => p.override.recommend_text); + + return ( + +
+ {multiInterval && ( +
cardData.override.recommend_text) && + "au-mb-8", + )} + > + +
+ )} +
+ {children} +
+
+
+ ); }; interface PricingCardProps { - productId: string; - showFeatures?: boolean; - className?: string; - onButtonClick?: (event: React.MouseEvent) => void; - buttonProps?: React.ComponentProps<"button">; + data: PricingCardData; + showFeatures?: boolean; + className?: string; + onButtonClick?: (event: React.MouseEvent) => void; + buttonProps?: React.ComponentProps<"button">; } export const PricingCard = ({ - productId, - className, - buttonProps, + data, + className, + buttonProps, }: PricingCardProps) => { - const { products, showFeatures } = usePricingTableContext("PricingCard"); - - const product = products.find((p) => p.id === productId); - - if (!product) { - throw new Error(`Product with id ${productId} not found`); - } - - const { name, display: productDisplay } = product; - - const { buttonText } = getPricingTableContent(product); - - const isRecommended = productDisplay?.recommend_text ? true : false; - const mainPriceDisplay = product.properties?.is_free - ? { - primary_text: "Free", - } - : product.items[0].display; - - const featureItems = product.properties?.is_free - ? product.items - : product.items.slice(1); - - return ( -
- {productDisplay?.recommend_text && ( - - )} -
-
-
-
-

- {productDisplay?.name || name} -

- {productDisplay?.description && ( -
-

- {productDisplay?.description} -

-
- )} -
-
-

-
- {mainPriceDisplay?.primary_text}{" "} - {mainPriceDisplay?.secondary_text && ( - - {mainPriceDisplay?.secondary_text} - - )} -
-

-
-
- {showFeatures && featureItems.length > 0 && ( -
- -
- )} -
-
- - {productDisplay?.button_text || buttonText} - -
-
-
- ); + const { plan, override } = data; + const { showFeatures } = usePricingTableContext("PricingCard"); + const { buttonText } = getPricingTableContent({ plan: plan }); + + const isRecommended = Boolean(override.recommend_text); + const mainPriceDisplay = + plan?.price === null + ? { + primary_text: "Free", + } + : (override.price?.display ?? plan?.price?.display); + + const description = override.description || plan?.description; + + const features = + override.features ?? + plan?.features?.map((feature) => ({ + feature_id: feature.feature_id, + display: feature.display, + })); + + return ( +
+ {override.recommend_text && ( + + )} +
+
+
+
+

+ {override?.name || plan?.name} +

+ {description && ( +
+

{description}

+
+ )} +
+
+

+
+ {mainPriceDisplay?.primary_text}{" "} + {mainPriceDisplay?.secondary_text && ( + + {mainPriceDisplay?.secondary_text} + + )} +
+

+
+
+ {showFeatures && features && features.length > 0 && ( +
+ +
+ )} +
+
+ + {override.button?.text ?? buttonText} + +
+
+
+ ); }; // Pricing Feature List export const PricingFeatureList = ({ - items, - everythingFrom, - className, + features, + everythingFrom, + className, }: { - items: Autumn.Products.ProductItem[]; - everythingFrom?: string; - className?: string; + features: { + feature_id: string | null; + display?: { + primary_text?: string; + secondary_text?: string; + }; + }[]; + everythingFrom?: string; + className?: string; }) => { - return ( -
- {everythingFrom && ( -

- Everything from {everythingFrom}, plus: -

- )} -
- {items.map((item, index) => ( -
- {/* {showIcon && ( + return ( +
+ {everythingFrom && ( +

+ Everything from {everythingFrom}, plus: +

+ )} +
+ {features.map((feature, index) => ( +
+ {/* {showIcon && ( )} */} -
- {item.display?.primary_text} - {item.display?.secondary_text && ( - - {item.display?.secondary_text} - - )} -
-
- ))} -
-
- ); +
+ {feature.display?.primary_text} + {feature.display?.secondary_text && ( + + {feature.display?.secondary_text} + + )} +
+
+ ))} +
+
+ ); }; // Pricing Card Button export interface PricingCardButtonProps extends React.ComponentProps<"button"> { - recommended?: boolean; - buttonUrl?: string; + recommended?: boolean; + buttonUrl?: string; } export const PricingCardButton = React.forwardRef< - HTMLButtonElement, - PricingCardButtonProps + HTMLButtonElement, + PricingCardButtonProps >(({ recommended, children, className, onClick, ...props }, ref) => { - const [loading, setLoading] = useState(false); - - const handleClick = async (e: React.MouseEvent) => { - setLoading(true); - try { - await onClick?.(e); - } catch (error) { - console.error(error); - } finally { - setLoading(false); - } - }; - - return ( - - ); + const [loading, setLoading] = useState(false); + + const handleClick = async (e: React.MouseEvent) => { + setLoading(true); + try { + await onClick?.(e); + } catch (error) { + console.error(error); + } finally { + setLoading(false); + } + }; + + return ( + + ); }); PricingCardButton.displayName = "PricingCardButton"; // Annual Switch export const AnnualSwitch = ({ - isAnnualToggle, - setIsAnnualToggle, + isAnnualToggle, + setIsAnnualToggle, }: { - isAnnualToggle: boolean; - setIsAnnualToggle: (isAnnual: boolean) => void; + isAnnualToggle: boolean; + setIsAnnualToggle: (isAnnual: boolean) => void; }) => { - return ( -
- Monthly - - Annual -
- ); + return ( +
+ Monthly + + Annual +
+ ); }; export const RecommendedBadge = ({ recommended }: { recommended: string }) => { - return ( -
- {recommended} -
- ); + return ( +
+ {recommended} +
+ ); }; diff --git a/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx b/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx index 488eeab7..b6098b95 100644 --- a/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx +++ b/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx @@ -1,188 +1,190 @@ - -import Autumn from "@sdk"; -import { AutumnContextParams } from "@/AutumnContext"; -import { usePricingTableBase } from "../usePricingTableBase"; -import { AttachParams, CheckoutParams, CancelParams, BillingPortalParams, SetupPaymentParams, TrackParams } from "@/clientTypes"; -import { AutumnClient } from "@/client/ReactAutumnClient"; -import { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; - +import type Autumn from "@sdk"; +import type { AutumnContextParams } from "@/AutumnContext"; +import type { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; +import type { AutumnClient } from "@/client/ReactAutumnClient"; +import type { + AttachParams, + BillingPortalParams, + CancelParams, + CheckoutParams, + SetupPaymentParams, +} from "@/clientTypes"; +import { usePricingTableBase } from "../usePricingTable/usePricingTableBase"; export const useAutumnBase = ({ - // AutumnContext, - context, - client, - refetchCustomer, + // AutumnContext, + context, + client, + refetchCustomer, }: { - // AutumnContext: React.Context; - context?: AutumnContextParams; - client: AutumnClient | ConvexAutumnClient; - refetchCustomer?: () => Promise; + // AutumnContext: React.Context; + context?: AutumnContextParams; + client: AutumnClient | ConvexAutumnClient; + refetchCustomer?: () => Promise; }) => { - const { attachDialog, paywallDialog } = context || {}; - - const { refetch: refetchPricingTable } = usePricingTableBase({ client }); - - const attachWithoutDialog = async (params: AttachParams): Promise => { - const result = await client.attach(params); - - if (result.checkout_url && typeof window !== "undefined") { - if (params.openInNewTab) { - window.open(result.checkout_url, "_blank"); - } else { - window.location.href = result.checkout_url; - } - } - - await refetchPricingTable(); - if (refetchCustomer) { - await refetchCustomer(); - } - - attachDialog?.setOpen(false); - - return result; - }; - - const checkout = async (params: CheckoutParams): Promise => { - const data = await client.checkout(params); - const { dialog, ...rest } = params; - - if (params.dialog && params.productIds) { - throw new Error( - "Dialog and productIds are not supported together in checkout()" - ); - } - - - - const hasPrepaid = data.product?.items?.some( - (item: any) => item.usage_model === "prepaid" - ); - - const showDialog = hasPrepaid && params.dialog; - - if (data.url && !showDialog) { - if (params.openInNewTab) { - window.open(data.url, "_blank"); - } else { - window.location.href = data.url; - } - - return data; - } - - if (params.dialog) { - attachDialog?.setProps({ checkoutResult: data, checkoutParams: rest }); - attachDialog?.setComponent(params.dialog); - attachDialog?.setOpen(true); - } - - return data; - }; - - const attachWithDialog = async ( - params: AttachParams - ): Promise => { - let { ...rest } = params; - - const { entityId, entityData } = params; - - const checkRes = await client.check({ - entityData, - withPreview: true, - entityId: entityId ?? undefined, - }); - - let preview = checkRes.preview; - - if (!preview) { - return await attachWithoutDialog(rest); - } else { - attachDialog?.setProps({ preview, attachParams: rest }); - attachDialog?.setOpen(true); - } - - return checkRes; - }; - - const attach = async (params: AttachParams): Promise => { - const { dialog } = params; - - if (dialog && !attachDialog?.open) { - attachDialog?.setComponent(dialog); - return await attachWithDialog(params) as Autumn.AttachResponse; - } - - return await attachWithoutDialog(params); - }; - - const cancel = async (params: CancelParams): Promise => { - const res = await client.cancel(params); - return res; - }; - - - const track = async (params: TrackParams): Promise => { - const res = await client.track(params); - return res; - }; - - const openBillingPortal = async ( - params?: BillingPortalParams - ): Promise => { - let defaultParams = { - openInNewTab: false, - }; - - let finalParams = { - ...defaultParams, - ...params, - }; - - const res = await client.openBillingPortal(finalParams); - - if (res.url && typeof window !== "undefined") { - if (finalParams.openInNewTab) { - window.open(res.url, "_blank"); - } else { - window.open(res.url, "_self"); - } - } - - return res; - }; - - const setupPayment = async ( - params?: SetupPaymentParams - ): Promise => { - let defaultParams = { - openInNewTab: false, - }; - - let finalParams = { - ...defaultParams, - ...(params || {}), - }; - - const res = await client.setupPayment(finalParams); - - if (res.url && typeof window !== "undefined") { - if (finalParams.openInNewTab) { - window.open(res.url, "_blank"); - } else { - window.open(res.url, "_self"); - } - } - - return res; - }; - - return { - attach, - track, - cancel, - openBillingPortal, - setupPayment, - checkout, - }; + const { attachDialog } = context || {}; + const { refetch: refetchPricingTable } = usePricingTableBase({ client }); + + const attachWithoutDialog = async ( + params: AttachParams, + ): Promise => { + const result = await client.attach(params); + + if (result.checkout_url && typeof window !== "undefined") { + if (params.openInNewTab) { + window.open(result.checkout_url, "_blank"); + } else { + window.location.href = result.checkout_url; + } + } + + await refetchPricingTable(); + if (refetchCustomer) { + await refetchCustomer(); + } + + attachDialog?.setOpen(false); + + return result; + }; + + const checkout = async ( + params: CheckoutParams, + ): Promise => { + const data = await client.checkout(params); + const { ...rest } = params; + + if (params.dialog && params.productIds) { + throw new Error( + "Dialog and productIds are not supported together in checkout()", + ); + } + + const hasPrepaid = data.product?.items?.some( + (item: any) => item.usage_model === "prepaid", + ); + + const showDialog = hasPrepaid && params.dialog; + + if (data.url && !showDialog) { + if (params.openInNewTab) { + window.open(data.url, "_blank"); + } else { + window.location.href = data.url; + } + + return data; + } + + if (params.dialog) { + attachDialog?.setProps({ checkoutResult: data, checkoutParams: rest }); + attachDialog?.setComponent(params.dialog); + attachDialog?.setOpen(true); + } + + return data; + }; + + const attachWithDialog = async ( + params: AttachParams, + ): Promise => { + const { ...rest } = params; + + const { entityId, entityData } = params; + + const checkRes = await client.check({ + entityData, + withPreview: true, + entityId: entityId ?? undefined, + }); + + const preview = checkRes.preview; + + if (!preview) { + return await attachWithoutDialog(rest); + } else { + attachDialog?.setProps({ preview, attachParams: rest }); + attachDialog?.setOpen(true); + } + + return checkRes; + }; + + const attach = async ( + params: AttachParams, + ): Promise => { + const { dialog } = params; + + if (dialog && !attachDialog?.open) { + attachDialog?.setComponent(dialog); + return (await attachWithDialog(params)) as Autumn.AttachResponse; + } + + return await attachWithoutDialog(params); + }; + + const cancel = async ( + params: CancelParams, + ): Promise => { + const res = await client.cancel(params); + return res; + }; + + const openBillingPortal = async ( + params?: BillingPortalParams, + ): Promise => { + const defaultParams = { + openInNewTab: false, + }; + + const finalParams = { + ...defaultParams, + ...params, + }; + + const res = await client.openBillingPortal(finalParams); + + if (res.url && typeof window !== "undefined") { + if (finalParams.openInNewTab) { + window.open(res.url, "_blank"); + } else { + window.open(res.url, "_self"); + } + } + + return res; + }; + + const setupPayment = async ( + params?: SetupPaymentParams, + ): Promise => { + const defaultParams = { + openInNewTab: false, + }; + + const finalParams = { + ...defaultParams, + ...(params || {}), + }; + + const res = await client.setupPayment(finalParams); + + if (res.url && typeof window !== "undefined") { + if (finalParams.openInNewTab) { + window.open(res.url, "_blank"); + } else { + window.open(res.url, "_self"); + } + } + + return res; + }; + + return { + attach, + cancel, + openBillingPortal, + setupPayment, + checkout, + }; }; diff --git a/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts b/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts index 812b4abd..ec40273d 100644 --- a/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts +++ b/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts @@ -12,11 +12,11 @@ import type { AttachParams, BillingPortalParams, CancelParams, - CheckoutParams, CheckParams, - QueryParams, + CheckoutParams, + ReferralCreateCodeParams, + ReferralRedeemCodeParams, SetupPaymentParams, - TrackParams, } from "@/clientTypes"; /** @@ -80,50 +80,32 @@ export interface UseCustomerMethods { checkout: (params: CheckoutParams) => Promise; /** - * Check whether a customer has access to a product, feature or remaining usage. - * - * @param params.feature_id - The ID of the feature to check access for - * @param params.product_id - The ID of the product to check - * @param params.entity_id - The ID of the entity (optional) - * @param params.customer_data - Customer data to create or update the customer if they don't exist - * @param params.required_balance - The required balance for the check - * @param params.send_event - Whether to send a usage event if allowed - * @param params.with_preview - Whether to include preview information in the response - * @param params.entity_data - Entity data to create the entity if it doesn't exist - * - * @example - * ```typescript // Check feature access const response = await client.check({ customer_id: "cus_123", feature_id: "api_calls", }); ``` + * Creates a checkout session for a customer to purchase a product with payment collection. + * Use this for new customers or when payment info is needed. + * For customers with existing payment methods, use `attach` instead. * - * @example - * ```ts const response = await client.check({ customer_id: 'customer_id', }); ``` - */ - check: (params: CheckParams) => Autumn.CheckResponse; - - /** - * Track usage events for metered features or record analytics events. - * Use this to increment usage counters for pay-as-you-go features or track customer activity. - * - * @param params.customer_data - Customer data to create or update the customer if they don't exist - * @param params.event_name - The name of the event to track - * @param params.feature_id - The ID of the feature (alternative to event_name for usage events) - * @param params.properties - Additional properties for the event - * @param params.timestamp - Unix timestamp in milliseconds when the event occurred - * @param params.idempotency_key - Idempotency key to prevent duplicate events - * @param params.value - The value/count of the event - * @param params.set_usage - Whether to set the usage to this value instead of increment - * @param params.entity_id - The ID of the entity this event is associated with - * @param params.entity_data - Data for creating the entity if it doesn't exist + * @param params.product_id - Product ID, set when creating the product in the Autumn dashboard + * @param params.entity_id - If attaching a product to an entity, can be used to auto create the entity + * @param params.customer_data - If auto creating a customer, the properties from this field will be used. + * @param params.entity_data - If attaching a product to an entity and auto creating the entity, the properties from this field will be used. feature_id is required. + * @param params.product_ids - Can be used to attach multiple products to the customer at once. For example, attaching a main product and an add-on. + * @param params.options - Pass in quantities for prepaid features + * @param params.free_trial - If the product has a free trial, this field can be used to disable it when attaching (by passing in false) + * @param params.success_url - URL to redirect to after the purchase is successful + * @param params.force_checkout - Always return a Stripe Checkout URL, even if the customer's card is already on file + * @param params.checkout_session_params - Additional parameters to pass onto Stripe when creating the checkout session + * @param params.reward - An Autumn promo_code or reward_id to apply at checkout * * @example - * ```typescript // Track a usage event const response = await client.track({ customer_id: "cus_123", feature_id: "api_calls", value: 1, }); ``` + * ```typescript // Create a checkout session const response = await client.checkout({ customer_id: "cus_123", product_id: "pro_plan", }); ``` * * @see - * {@link https://docs.useautumn.com/api-reference/core/track Usage Tracking} + * {@link https://docs.useautumn.com/api-reference/core/checkout Checkout Sessions} * * @example - * ```ts const response = await client.track({ customer_id: 'x' }); ``` + * ```ts const response = await client.check({ customer_id: 'customer_id', }); ``` */ - track: (params: TrackParams) => Promise; + check: (params: CheckParams) => Autumn.CheckResponse; /** * Cancel a customer's subscription to a product. @@ -142,7 +124,7 @@ export interface UseCustomerMethods { * {@link https://docs.useautumn.com/api-reference/core/cancel Cancel Subscriptions} * * @example - * ```ts const response = await client.cancel({ customer_id: 'customer_id', product_id: 'product_id', }); ``` + * ```ts const response = await client.cancel({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` */ cancel: (params: CancelParams) => Promise; @@ -160,7 +142,7 @@ export interface UseCustomerMethods { * {@link https://docs.useautumn.com/api-reference/core/setup-payment Payment Setup} * * @example - * ```ts const response = await client.setupPayment({ customer_id: 'customer_id', }); ``` + * ```ts const response = await client.setupPayment({ customer_id: 'cus_123', }); ``` */ setupPayment: (params: SetupPaymentParams) => Promise; @@ -177,7 +159,25 @@ export interface UseCustomerMethods { * {@link https://docs.useautumn.com/api-reference/core/billing-portal Billing Portal} * * @example - * ```ts const response = await client.billingPortal({ customer_id: 'customer_id', }); ``` + * ```ts const response = await client.billingPortal({ customer_id: 'cus_123', }); ``` */ openBillingPortal: (params: BillingPortalParams) => Promise; + + /** + * Create a referral code. + * + * + * @example + * ```ts const response = await client.referrals.createCode({ customer_id: 'cus_123', program_id: 'prog_123', }); ``` + */ + createReferralCode: (params: ReferralCreateCodeParams) => Promise; + + /** + * Redeem a referral code. + * + * + * @example + * ```ts const response = await client.referrals.redeemCode({ code: 'REF123ABC', customer_id: 'cus_456', }); ``` + */ + redeemReferralCode: (params: ReferralRedeemCodeParams) => Promise; } diff --git a/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts b/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts index 939ffb56..76e12e42 100644 --- a/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts +++ b/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts @@ -10,13 +10,8 @@ import type { Autumn } from "@sdk"; import type { AttachParams, - BillingPortalParams, CancelParams, - CheckoutParams, CheckParams, - QueryParams, - SetupPaymentParams, - TrackParams, } from "@/clientTypes"; /** @@ -68,50 +63,32 @@ export interface UseEntityMethods { * {@link https://docs.useautumn.com/api-reference/core/cancel Cancel Subscriptions} * * @example - * ```ts const response = await client.cancel({ customer_id: 'customer_id', product_id: 'product_id', }); ``` + * ```ts const response = await client.cancel({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` */ cancel: (params: CancelParams) => Promise; /** - * Track usage events for metered features or record analytics events. - * Use this to increment usage counters for pay-as-you-go features or track customer activity. + * Creates a checkout session for a customer to purchase a product with payment collection. + * Use this for new customers or when payment info is needed. + * For customers with existing payment methods, use `attach` instead. * - * @param params.customer_data - Customer data to create or update the customer if they don't exist - * @param params.event_name - The name of the event to track - * @param params.feature_id - The ID of the feature (alternative to event_name for usage events) - * @param params.properties - Additional properties for the event - * @param params.timestamp - Unix timestamp in milliseconds when the event occurred - * @param params.idempotency_key - Idempotency key to prevent duplicate events - * @param params.value - The value/count of the event - * @param params.set_usage - Whether to set the usage to this value instead of increment - * @param params.entity_id - The ID of the entity this event is associated with - * @param params.entity_data - Data for creating the entity if it doesn't exist + * @param params.product_id - Product ID, set when creating the product in the Autumn dashboard + * @param params.entity_id - If attaching a product to an entity, can be used to auto create the entity + * @param params.customer_data - If auto creating a customer, the properties from this field will be used. + * @param params.entity_data - If attaching a product to an entity and auto creating the entity, the properties from this field will be used. feature_id is required. + * @param params.product_ids - Can be used to attach multiple products to the customer at once. For example, attaching a main product and an add-on. + * @param params.options - Pass in quantities for prepaid features + * @param params.free_trial - If the product has a free trial, this field can be used to disable it when attaching (by passing in false) + * @param params.success_url - URL to redirect to after the purchase is successful + * @param params.force_checkout - Always return a Stripe Checkout URL, even if the customer's card is already on file + * @param params.checkout_session_params - Additional parameters to pass onto Stripe when creating the checkout session + * @param params.reward - An Autumn promo_code or reward_id to apply at checkout * * @example - * ```typescript // Track a usage event const response = await client.track({ customer_id: "cus_123", feature_id: "api_calls", value: 1, }); ``` + * ```typescript // Create a checkout session const response = await client.checkout({ customer_id: "cus_123", product_id: "pro_plan", }); ``` * * @see - * {@link https://docs.useautumn.com/api-reference/core/track Usage Tracking} - * - * @example - * ```ts const response = await client.track({ customer_id: 'x' }); ``` - */ - track: (params: TrackParams) => Promise; - - /** - * Check whether a customer has access to a product, feature or remaining usage. - * - * @param params.feature_id - The ID of the feature to check access for - * @param params.product_id - The ID of the product to check - * @param params.entity_id - The ID of the entity (optional) - * @param params.customer_data - Customer data to create or update the customer if they don't exist - * @param params.required_balance - The required balance for the check - * @param params.send_event - Whether to send a usage event if allowed - * @param params.with_preview - Whether to include preview information in the response - * @param params.entity_data - Entity data to create the entity if it doesn't exist - * - * @example - * ```typescript // Check feature access const response = await client.check({ customer_id: "cus_123", feature_id: "api_calls", }); ``` + * {@link https://docs.useautumn.com/api-reference/core/checkout Checkout Sessions} * * @example * ```ts const response = await client.check({ customer_id: 'customer_id', }); ``` diff --git a/autumn-js/src/libraries/react/hooks/useCustomer.tsx b/autumn-js/src/libraries/react/hooks/useCustomer.tsx index eb64d241..ab50c8d0 100644 --- a/autumn-js/src/libraries/react/hooks/useCustomer.tsx +++ b/autumn-js/src/libraries/react/hooks/useCustomer.tsx @@ -1,21 +1,20 @@ -import { useEffect } from "react"; import { AutumnContext } from "../AutumnContext"; -import { useCustomerBase, UseCustomerParams } from "./useCustomerBase"; +import { type UseCustomerParams, useCustomerBase } from "./useCustomerBase"; /** * React hook for managing customer billing, subscriptions, and feature access. - * + * * Provides access to all Autumn billing functions including product attachment, * subscription management, usage tracking, and feature gating. Automatically * handles customer data fetching and caching. - * + * * @param params - Optional configuration for the hook * @returns Object containing customer data and billing functions - * + * * @example * ```tsx * import { useCustomer } from "autumn-js/react"; - * + * * function MyComponent() { * const { * customer, @@ -32,7 +31,7 @@ import { useCustomerBase, UseCustomerParams } from "./useCustomerBase"; * createEntity, * refetch * } = useCustomer(); - * + * * return ( *
* - ); + const [loading, setLoading] = useState(false); + + const handleClick = async (e: React.MouseEvent) => { + setLoading(true); + try { + await onClick?.(e); + } catch (error) { + console.error(error); + } finally { + setLoading(false); + } + }; + + return ( + + ); }); PricingCardButton.displayName = "PricingCardButton"; // Annual Switch export const AnnualSwitch = ({ - isAnnualToggle, - setIsAnnualToggle, + isAnnualToggle, + setIsAnnualToggle, }: { - isAnnualToggle: boolean; - setIsAnnualToggle: (isAnnual: boolean) => void; + isAnnualToggle: boolean; + setIsAnnualToggle: (isAnnual: boolean) => void; }) => { - return ( -
- Monthly - - Annual -
- ); + return ( +
+ Monthly + + Annual +
+ ); }; export const RecommendedBadge = ({ recommended }: { recommended: string }) => { - return ( -
- {recommended} -
- ); + return ( +
+ {recommended} +
+ ); }; From dd7f1993ecf06e8d7509eb3026e61965187c4b94 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Mon, 5 Jan 2026 12:16:27 +0000 Subject: [PATCH 16/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20sync=20pkg=20versi?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmn/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atmn/package.json b/atmn/package.json index 6acac743..1e6beb4a 100644 --- a/atmn/package.json +++ b/atmn/package.json @@ -1,6 +1,6 @@ { "name": "atmn", - "version": "0.0.28", + "version": "1.0.0-beta.1", "license": "MIT", "bin": "dist/cli.js", "main": "dist/index.js", From 53e657c4bbf98bd09d374251489573bca68f6820 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Mon, 12 Jan 2026 16:28:18 +0000 Subject: [PATCH 17/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20tests,=20new=20sdk?= =?UTF-8?q?,=20etc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmn/.gitignore | 3 +- atmn/package.json | 3 + .../compose/builders/builderFunctions.ts | 21 +- atmn/source/compose/models/featureModels.ts | 75 +- atmn/source/compose/models/planModels.ts | 180 +- atmn/source/core/push.ts | 30 +- atmn/test/api.ts | 30 + atmn/test/env.test.ts | 28 + atmn/test/fixtures/basic-config/package.json | 8 + atmn/test/nuke/basic1.test.ts | 88 + atmn/test/pull/basic1.test.ts | 66 + atmn/test/push/basic1.test.ts | 113 + atmn/test/setup.ts | 60 + atmn/test/workflow/roundtrip.test.ts | 138 + pnpm-lock.yaml | 9369 +++++++---------- typegen/genUtils/TypeGenerator.ts | 2 + typegen/genUtils/atmnTypeHelpers.ts | 64 +- typegen/generate-atmn-types.ts | 18 +- typegen/typeConfigs.ts | 40 +- 19 files changed, 4471 insertions(+), 5865 deletions(-) create mode 100644 atmn/test/api.ts create mode 100644 atmn/test/env.test.ts create mode 100644 atmn/test/fixtures/basic-config/package.json create mode 100644 atmn/test/nuke/basic1.test.ts create mode 100644 atmn/test/pull/basic1.test.ts create mode 100644 atmn/test/push/basic1.test.ts create mode 100644 atmn/test/setup.ts create mode 100644 atmn/test/workflow/roundtrip.test.ts diff --git a/atmn/.gitignore b/atmn/.gitignore index a0d218e3..7d9e0450 100644 --- a/atmn/.gitignore +++ b/atmn/.gitignore @@ -1,3 +1,4 @@ node_modules dist -.env \ No newline at end of file +.env +test/.env.test \ No newline at end of file diff --git a/atmn/package.json b/atmn/package.json index 1e6beb4a..99b36771 100644 --- a/atmn/package.json +++ b/atmn/package.json @@ -12,6 +12,8 @@ "scripts": { "build": "tsup", "dev": "tsup --watch", + "test": "bun test", + "test:watch": "bun test --watch", "test2": "prettier --check . && xo && ava", "test-cli": "node --trace-deprecation -- ./dist/cli.js" }, @@ -41,6 +43,7 @@ "@types/react": "^18.0.32", "@vdemedes/prettier-config": "^2.0.1", "ava": "^5.2.0", + "cli-testing-library": "^3.0.1", "eslint-config-xo-react": "^0.27.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", diff --git a/atmn/source/compose/builders/builderFunctions.ts b/atmn/source/compose/builders/builderFunctions.ts index f33acc82..b8728417 100644 --- a/atmn/source/compose/builders/builderFunctions.ts +++ b/atmn/source/compose/builders/builderFunctions.ts @@ -19,10 +19,10 @@ type PlanInput = Omit & Pa * name: 'Pro Plan', * description: 'For growing teams', * features: [ - * planFeature({ feature_id: seats.id, granted: 10 }), + * planFeature({ feature_id: seats.id, included: 10 }), * planFeature({ * feature_id: messages.id, - * granted: 1000, + * included: 1000, * reset: { interval: 'month' } * }) * ], @@ -46,10 +46,21 @@ export const plan = (params: PlanInput): Plan => { * @returns Feature object for use in autumn.config.ts * * @example + * // Metered consumable feature (like API calls, tokens) + * export const apiCalls = feature({ + * id: 'api_calls', + * name: 'API Calls', + * type: 'metered', + * consumable: true + * }); + * + * @example + * // Metered non-consumable feature (like seats) * export const seats = feature({ * id: 'seats', * name: 'Team Seats', - * type: 'continuous_use' + * type: 'metered', + * consumable: false * }); */ export const feature = (params: Feature): Feature => { @@ -66,7 +77,7 @@ export const feature = (params: Feature): Feature => { * // Simple included usage * planFeature({ * feature_id: messages.id, - * granted: 1000, + * included: 1000, * reset: { interval: 'month' } * }) * @@ -74,7 +85,7 @@ export const feature = (params: Feature): Feature => { * // Priced feature with tiers * planFeature({ * feature_id: seats.id, - * granted: 5, + * included: 5, * price: { * tiers: [ * { to: 10, amount: 10 }, diff --git a/atmn/source/compose/models/featureModels.ts b/atmn/source/compose/models/featureModels.ts index 087e1bf0..b7555e32 100644 --- a/atmn/source/compose/models/featureModels.ts +++ b/atmn/source/compose/models/featureModels.ts @@ -6,33 +6,66 @@ import { z } from "zod/v4"; export const FeatureSchema = z.object({ - id: z.string().meta({ - description: "The unique identifier of the feature", - example: "", - }), - name: z.string().nullish().meta({ - description: "The name of the feature", - example: "", - }), - credit_schema: z + id: z.string(), + name: z.string(), + event_names: z.array(z.string()).optional(), + credit_schema: z .array( z.object({ metered_feature_id: z.string(), credit_cost: z.number(), }), ) - .nullish() - .meta({ - description: "Credit cost schema for credit system features", - example: [{ metered_feature_id: "", credit_cost: 123 }], - }), - archived: z.boolean().nullish().meta({ - description: "Whether or not the feature is archived", - example: false, - }), - /** The type of the feature (boolean, single_use, continuous_use, credit_system) */ - type: z.string() + .optional() }); -export type Feature = z.infer; + + +// Base fields shared by all feature types +type FeatureBase = { + /** Unique identifier for the feature */ + id: string; + /** Display name for the feature */ + name: string; + /** Event names that trigger this feature */ + event_names?: string[]; + /** Credit schema for credit_system features */ + credit_schema?: Array<{ + metered_feature_id: string; + credit_cost: number; + }>; +}; + +/** Boolean feature - no consumable field allowed */ +export type BooleanFeature = FeatureBase & { + type: "boolean"; + consumable?: never; +}; + +/** Metered feature - requires consumable field */ +export type MeteredFeature = FeatureBase & { + type: "metered"; + /** Whether usage is consumed (true) or accumulated (false) */ + consumable: boolean; +}; + +/** Credit system feature - always consumable */ +export type CreditSystemFeature = FeatureBase & { + type: "credit_system"; + /** Credit systems are always consumable */ + consumable?: true; + /** Required: defines how credits map to metered features */ + credit_schema: Array<{ + metered_feature_id: string; + credit_cost: number; + }>; +}; + +/** + * Feature definition with type-safe constraints: + * - Boolean features cannot have consumable + * - Metered features require consumable (true = single_use style, false = continuous_use style) + * - Credit system features are always consumable and require credit_schema + */ +export type Feature = BooleanFeature | MeteredFeature | CreditSystemFeature; diff --git a/atmn/source/compose/models/planModels.ts b/atmn/source/compose/models/planModels.ts index 03913909..f24ab4a5 100644 --- a/atmn/source/compose/models/planModels.ts +++ b/atmn/source/compose/models/planModels.ts @@ -13,166 +13,62 @@ const idRegex = /^[a-zA-Z0-9_-]+$/; export const PlanFeatureSchema = z.object({ - feature_id: z.string().meta({ - description: "Reference to the feature being configured", - example: "seats", - }), - granted: z.number().optional().meta({ - description: "Amount of usage granted to customers", - example: 1000, - }), - unlimited: z.boolean().optional().meta({ - description: "Whether usage is unlimited", - example: false, - }), + feature_id: z.string(), + granted_balance: z.number().optional(), + unlimited: z.boolean().optional(), reset: z .object({ - interval: z.union([z.literal("one_off"), z.literal("minute"), z.literal("hour"), z.literal("day"), z.literal("week"), z.literal("month"), z.literal("quarter"), z.literal("year")]).optional().meta({ - description: "How often usage resets", - example: "month", - }), - interval_count: z.number().optional().meta({ - description: "Number of intervals between resets", - example: 1, - }), - when_enabled: z.boolean().optional().meta({ - description: "Whether to reset usage when feature is enabled", - example: true, - }), + interval: z.union([z.literal("one_off"), z.literal("minute"), z.literal("hour"), z.literal("day"), z.literal("week"), z.literal("month"), z.literal("quarter"), z.literal("year")]), + interval_count: z.number().optional(), + reset_when_enabled: z.boolean().optional(), }) - .optional() - .meta({ - description: "Reset configuration for metered features", - example: { interval: "month" }, - }), + .optional(), price: z .object({ - amount: z.number().optional().meta({ - description: "Flat price per unit in cents", - example: 1000, - }), - tiers: z.array(UsageTierSchema).optional().meta({ - description: "Tiered pricing structure based on usage ranges", - example: [{ to: 10, amount: 1000 }, { to: "inf", amount: 800 }], - }), + amount: z.number().optional(), + tiers: z.array(UsageTierSchema).optional(), - interval: z.union([z.literal("month"), z.literal("quarter"), z.literal("semi_annual"), z.literal("year")]).meta({ - description: "Billing frequency (cannot be used with reset.interval)", - example: "month", - }), - interval_count: z.number().default(1).optional().meta({ - description: "Number of intervals between billing", - example: 1, - }), + interval: z.union([z.literal("month"), z.literal("quarter"), z.literal("semi_annual"), z.literal("year")]), + interval_count: z.number().default(1).optional(), - billing_units: z.number().default(1).optional().meta({ - description: "Number of units per billing cycle", - example: 1, - }), - usage_model: z.union([z.literal("prepaid"), z.literal("pay_per_use")]).meta({ - description: "Billing model: 'prepaid' or 'pay_per_use'", - example: "pay_per_use", - }), - max_purchase: z.number().optional().meta({ - description: "Maximum purchasable quantity", - example: 100, - }), + billing_units: z.number().default(1).optional(), + usage_model: z.union([z.literal("prepaid"), z.literal("pay_per_use")]), + max_purchase: z.number().optional(), }) - .optional() - .meta({ - description: "Pricing configuration for usage-based billing", - example: { interval: "month", usage_model: "pay_per_use" }, - }), + .optional(), proration: z .object({ - on_increase: z.union([z.literal("prorate"), z.literal("charge_immediately")]).meta({ - description: "Behavior when quantity increases", - example: "prorate", - }), - on_decrease: z.union([z.literal("prorate"), z.literal("refund_immediately"), z.literal("no_action")]).meta({ - description: "Behavior when quantity decreases", - example: "no_action", - }), + on_increase: z.union([z.literal("prorate"), z.literal("charge_immediately")]), + on_decrease: z.union([z.literal("prorate"), z.literal("refund_immediately"), z.literal("no_action")]), }) - .optional() - .meta({ - description: "Proration rules for quantity changes", - example: { on_increase: "prorate", on_decrease: "no_action" }, - }), + .optional(), rollover: z .object({ - max: z.number().meta({ - description: "Maximum amount that can roll over", - example: 1000, - }), - expiry_duration_type: z.union([z.literal("one_off"), z.literal("minute"), z.literal("hour"), z.literal("day"), z.literal("week"), z.literal("month"), z.literal("quarter"), z.literal("year")]).meta({ - description: "How long rollover lasts before expiring", - example: "month", - }), - expiry_duration_length: z.number().optional().meta({ - description: "Duration length for rollover expiry", - example: 1, - }), + max: z.number(), + expiry_duration_type: z.union([z.literal("one_off"), z.literal("minute"), z.literal("hour"), z.literal("day"), z.literal("week"), z.literal("month"), z.literal("quarter"), z.literal("year")]), + expiry_duration_length: z.number().optional(), }) .optional() - .meta({ - description: "Rollover policy for unused usage", - example: { max: 1000, expiry_duration_type: "month" }, - }) }); export const FreeTrialSchema = z.object({ - duration_type: z.union([z.literal("day"), z.literal("month"), z.literal("year")]).meta({ - description: "Unit of time: 'day', 'month', or 'year'", - example: "day", - }), - duration_length: z.number().meta({ - description: "Number of duration units", - example: 14, - }), - card_required: z.boolean().meta({ - description: "Whether credit card is required upfront", - example: true, - }) + duration_type: z.union([z.literal("day"), z.literal("month"), z.literal("year")]), + duration_length: z.number(), + card_required: z.boolean() }); export const PlanSchema = z.object({ - description: z.string().nullable().default(null).meta({ - description: "Optional description explaining what this plan offers", - example: "Perfect for growing teams", - }), - add_on: z.boolean().default(false).meta({ - description: "Whether this plan can be purchased alongside other plans", - example: false, - }), - default: z.boolean().default(false).meta({ - description: "Whether this is the default plan for new customers", - example: false, - }), + description: z.string().nullable().default(null), + add_on: z.boolean().default(false), + default: z.boolean().default(false), price: z .object({ - amount: z.number().meta({ - description: "Price in cents (e.g., 5000 for $50.00)", - example: 5000, - }), - interval: z.union([z.literal("month"), z.literal("quarter"), z.literal("semi_annual"), z.literal("year")]).meta({ - description: "Billing frequency", - example: "month", - }), + amount: z.number(), + interval: z.union([z.literal("month"), z.literal("quarter"), z.literal("semi_annual"), z.literal("year")]), }) - .optional() - .meta({ - description: "Base subscription price for the plan", - example: { amount: 5000, interval: "month" }, - }), - features: z.array(PlanFeatureSchema).optional().meta({ - description: "Features included with usage limits and pricing", - example: [], - }), - free_trial: FreeTrialSchema.nullable().optional().meta({ - description: "Free trial period before billing begins", - example: { duration_type: "day", duration_length: 14, card_required: true }, - }), + .optional(), + features: z.array(PlanFeatureSchema).optional(), + free_trial: FreeTrialSchema.nullable().optional(), /** Unique identifier for the plan */ id: z.string().nonempty().regex(idRegex), /** Display name for the plan */ @@ -199,8 +95,8 @@ export type PlanFeatureWithReset = { /** Reference to the feature being configured */ feature_id: string; - /** Amount of usage granted to customers */ - granted?: number; + /** Amount of usage included in this plan */ + included?: number; /** Whether usage is unlimited */ unlimited?: boolean; @@ -266,8 +162,8 @@ export type PlanFeatureWithPrice = { /** Reference to the feature being configured */ feature_id: string; - /** Amount of usage granted to customers */ - granted?: number; + /** Amount of usage included in this plan */ + included?: number; /** Whether usage is unlimited */ unlimited?: boolean; @@ -333,8 +229,8 @@ export type PlanFeatureBasic = { /** Reference to the feature being configured */ feature_id: string; - /** Amount of usage granted to customers */ - granted?: number; + /** Amount of usage included in this plan */ + included?: number; /** Whether usage is unlimited */ unlimited?: boolean; diff --git a/atmn/source/core/push.ts b/atmn/source/core/push.ts index af156912..dfb9c3ad 100644 --- a/atmn/source/core/push.ts +++ b/atmn/source/core/push.ts @@ -108,6 +108,28 @@ export async function checkPlanForConfirmation({ }; } +/** + * Transform plan data for API submission. + * Maps SDK field names to API field names (e.g., 'included' -> 'granted_balance') + */ +function transformPlanForApi(plan: Plan): Record { + const transformed = { ...plan } as Record; + + // Transform features array: 'included' -> 'granted_balance' + if (plan.features && Array.isArray(plan.features)) { + transformed.features = plan.features.map(feature => { + const transformedFeature = { ...feature } as Record; + if ('included' in feature && feature.included !== undefined) { + transformedFeature.granted_balance = feature.included; + delete transformedFeature.included; + } + return transformedFeature; + }); + } + + return transformed; +} + export async function upsertPlan({ curPlans, plan, @@ -128,11 +150,15 @@ export async function upsertPlan({ } const curPlan = curPlans.find(p => p.id === plan.id); + + // Transform SDK field names to API field names + const apiPlan = transformPlanForApi(plan); + if (!curPlan) { await externalRequest({ method: 'POST', path: `/products`, - data: plan, + data: apiPlan, }); spinner.text = `Created plan [${plan.id}]`; return { @@ -141,7 +167,7 @@ export async function upsertPlan({ }; } else { // Prepare the update payload - const updatePayload = { ...plan } as Record; + const updatePayload = { ...apiPlan }; // If local plan has no group but upstream has one, explicitly unset it if (!plan.group && curPlan.group) { diff --git a/atmn/test/api.ts b/atmn/test/api.ts new file mode 100644 index 00000000..b684879f --- /dev/null +++ b/atmn/test/api.ts @@ -0,0 +1,30 @@ +// API helpers for test state verification +// These are lazy-loaded to ensure dotenv has run first + +import type { Feature } from '../source/compose/models/featureModels.js'; +import type { Plan } from '../source/compose/models/planModels.js'; + +// Re-export types for convenience +export type { Feature, Plan }; + +// Lazy import the API functions to ensure env is loaded first +let _getAllPlans: typeof import('../source/core/pull.js').getAllPlans; +let _getFeatures: typeof import('../source/core/pull.js').getFeatures; + +async function loadApiModule() { + if (!_getAllPlans || !_getFeatures) { + const pullModule = await import('../source/core/pull.js'); + _getAllPlans = pullModule.getAllPlans; + _getFeatures = pullModule.getFeatures; + } +} + +export async function getAllPlans(params?: { archived?: boolean }): Promise { + await loadApiModule(); + return _getAllPlans(params); +} + +export async function getFeatures(params?: { includeArchived?: boolean }): Promise { + await loadApiModule(); + return _getFeatures(params); +} diff --git a/atmn/test/env.test.ts b/atmn/test/env.test.ts new file mode 100644 index 00000000..c69564f8 --- /dev/null +++ b/atmn/test/env.test.ts @@ -0,0 +1,28 @@ +import { describe, test, expect, afterEach } from 'bun:test'; +import { render, cleanup, waitFor } from 'cli-testing-library'; +import { CLI_PATH, spawnOpts } from './setup'; + +// Quote the CLI_PATH for shell execution (cli-testing-library uses shell: true) +const QUOTED_CLI_PATH = `"${CLI_PATH}"`; + +describe('env command', () => { + afterEach(async () => { + await cleanup(); + }); + + test('shows environment type', async () => { + const instance = await render('node', [QUOTED_CLI_PATH, 'env'], { + spawnOpts, + }); + + // Wait for process to exit + await waitFor(() => { + const exit = instance.hasExit(); + expect(exit).toBeTruthy(); + }, { timeout: 10000 }); + + // Should show either Sandbox or Production + const stdout = instance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(stdout).toMatch(/Environment:/i); + }); +}); diff --git a/atmn/test/fixtures/basic-config/package.json b/atmn/test/fixtures/basic-config/package.json new file mode 100644 index 00000000..f53cf3d6 --- /dev/null +++ b/atmn/test/fixtures/basic-config/package.json @@ -0,0 +1,8 @@ +{ + "name": "atmn-test-basic-config", + "private": true, + "type": "module", + "dependencies": { + "atmn": "workspace:*" + } +} diff --git a/atmn/test/nuke/basic1.test.ts b/atmn/test/nuke/basic1.test.ts new file mode 100644 index 00000000..a19761b5 --- /dev/null +++ b/atmn/test/nuke/basic1.test.ts @@ -0,0 +1,88 @@ +import { describe, test, expect, afterEach } from 'bun:test'; +import { render, cleanup, waitFor } from 'cli-testing-library'; +import { + CLI_PATH, + FIXTURES_PATH, + spawnOpts, + getAllPlans, + getFeatures, + join, +} from '../setup'; + +// Quote the CLI_PATH for shell execution (cli-testing-library uses shell: true) +const QUOTED_CLI_PATH = `"${CLI_PATH}"`; +const BASIC_CONFIG_PATH = join(FIXTURES_PATH, 'basic-config'); + +describe('nuke command', () => { + afterEach(async () => { + await cleanup(); + }); + + test('prompts for confirmation and nukes sandbox', async () => { + // First push some data so we have something to nuke + const pushInstance = await render('node', [QUOTED_CLI_PATH, 'push', '-y'], { + cwd: BASIC_CONFIG_PATH, + spawnOpts, + }); + await waitFor(() => { + const exit = pushInstance.hasExit(); + expect(exit).toBeTruthy(); + }, { timeout: 30000 }); + await cleanup(); + + // Verify data exists before nuke + const featuresBefore = await getFeatures(); + const plansBefore = await getAllPlans(); + expect(featuresBefore.length).toBeGreaterThan(0); + expect(plansBefore.length).toBeGreaterThan(0); + + // Now nuke + const instance = await render('node', [QUOTED_CLI_PATH, 'nuke'], { + spawnOpts, + }); + + // Wait for first confirmation prompt then answer + await waitFor(() => { + const stdout = instance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(stdout).toMatch(/confirm to continue/i); + }, { timeout: 10000 }); + + // Confirm first prompt (y + Enter) + await instance.userEvent.keyboard('y[Enter]'); + + // Wait for final confirmation prompt then answer + await waitFor(() => { + const stdout = instance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(stdout).toMatch(/final confirmation/i); + }, { timeout: 10000 }); + + // Confirm final prompt (y + Enter) + await instance.userEvent.keyboard('y[Enter]'); + + // Wait for backup prompt then answer + await waitFor(() => { + const stdout = instance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(stdout).toMatch(/backup/i); + }, { timeout: 10000 }); + + // Skip backup (n + Enter) + await instance.userEvent.keyboard('n[Enter]'); + + // Wait for process to exit + await waitFor(() => { + const exit = instance.hasExit(); + expect(exit).toBeTruthy(); + }, { timeout: 30000 }); + + // Check for success in output + const stdout = instance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(stdout).toMatch(/deleted|nuked|success/i); + + // VERIFY ACTUAL STATE: All features and plans should be deleted + const featuresAfter = await getFeatures(); + const plansAfter = await getAllPlans(); + + expect(featuresAfter.length).toBe(0); + expect(plansAfter.length).toBe(0); + }); +}); diff --git a/atmn/test/pull/basic1.test.ts b/atmn/test/pull/basic1.test.ts new file mode 100644 index 00000000..d8eba1cf --- /dev/null +++ b/atmn/test/pull/basic1.test.ts @@ -0,0 +1,66 @@ +import { describe, test, expect, beforeAll, afterAll, afterEach } from 'bun:test'; +import { render, cleanup, waitFor } from 'cli-testing-library'; +import { + CLI_PATH, + FIXTURES_PATH, + spawnOpts, + createTempDir, + cleanupTempDir, + existsSync, + readFileSync, + join +} from '../setup'; + +const BASIC_CONFIG_PATH = join(FIXTURES_PATH, 'basic-config'); + +// Quote the CLI_PATH for shell execution (cli-testing-library uses shell: true) +const QUOTED_CLI_PATH = `"${CLI_PATH}"`; + +describe('pull command', () => { + let tempDir: string; + + beforeAll(() => { + tempDir = createTempDir('atmn-pull-test-'); + }); + + afterAll(() => { + cleanupTempDir(tempDir); + }); + + afterEach(async () => { + await cleanup(); + }); + + test('pulls config from server', async () => { + // First ensure something exists by pushing + const pushInstance = await render('node', [QUOTED_CLI_PATH, 'push', '-y'], { + cwd: BASIC_CONFIG_PATH, + spawnOpts, + }); + await waitFor(() => { + const exit = pushInstance.hasExit(); + expect(exit).toBeTruthy(); + }, { timeout: 30000 }); + await cleanup(); + + // Now pull into temp directory + const pullInstance = await render('node', [QUOTED_CLI_PATH, 'pull'], { + cwd: tempDir, + spawnOpts, + }); + + await waitFor(() => { + const exit = pullInstance.hasExit(); + expect(exit).toBeTruthy(); + }, { timeout: 30000 }); + + // Verify autumn.config.ts was created + const configPath = join(tempDir, 'autumn.config.ts'); + expect(existsSync(configPath)).toBe(true); + + // Verify config contains our feature and plan + const configContent = readFileSync(configPath, 'utf-8'); + expect(configContent).toContain('messages'); + expect(configContent).toContain('pro'); + }); +}); diff --git a/atmn/test/push/basic1.test.ts b/atmn/test/push/basic1.test.ts new file mode 100644 index 00000000..f47738ec --- /dev/null +++ b/atmn/test/push/basic1.test.ts @@ -0,0 +1,113 @@ +import { afterEach, describe, expect, test } from "bun:test"; +import { cleanup, render, waitFor } from "cli-testing-library"; +import { + CLI_PATH, + FIXTURES_PATH, + join, + spawnOpts, + getAllPlans, + getFeatures, + type Plan, + type Feature, +} from "../setup"; + +const BASIC_CONFIG_PATH = join(FIXTURES_PATH, "basic-config"); + +// Quote the CLI_PATH for shell execution (cli-testing-library uses shell: true) +const QUOTED_CLI_PATH = `"${CLI_PATH}"`; + +describe("push command", () => { + afterEach(async () => { + await cleanup(); + }); + + test("pushes features and plans from config", async () => { + const instance = await render("node", [QUOTED_CLI_PATH, "push", "-y"], { + cwd: BASIC_CONFIG_PATH, + spawnOpts, + }); + + // Wait for push to complete + await waitFor( + () => { + const exit = instance.hasExit(); + expect(exit).toBeTruthy(); + expect(exit?.exitCode).toBe(0); + }, + { timeout: 30000 }, + ); + + // Verify actual state via API + const features = await getFeatures(); + const plans = await getAllPlans(); + + expect(features.length).toBeGreaterThan(0); + expect(plans.length).toBeGreaterThan(0); + }); + + test("creates features with correct properties", async () => { + const instance = await render("node", [QUOTED_CLI_PATH, "push", "-y"], { + cwd: BASIC_CONFIG_PATH, + spawnOpts, + }); + + // Wait for process to exit + await waitFor(() => { + const exit = instance.hasExit(); + expect(exit).toBeTruthy(); + }, { timeout: 30000 }); + + // Check stdout contains feature info + const stdout = instance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(stdout).toMatch(/Features pushed:/i); + expect(stdout).toMatch(/messages/i); + + // Verify feature exists in API with correct properties + const features = await getFeatures(); + const messagesFeature = features.find((f: Feature) => f.id === 'messages'); + + expect(messagesFeature).toBeDefined(); + expect(messagesFeature?.name).toBe('Messages'); + expect(messagesFeature?.type).toBe('metered'); + }); + + test("creates plans with correct properties", async () => { + const instance = await render("node", [QUOTED_CLI_PATH, "push", "-y"], { + cwd: BASIC_CONFIG_PATH, + spawnOpts, + }); + + // Wait for process to exit + await waitFor(() => { + const exit = instance.hasExit(); + expect(exit).toBeTruthy(); + }, { timeout: 30000 }); + + // Check stdout contains plan info + const stdout = instance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(stdout).toMatch(/Plans pushed:/i); + expect(stdout).toMatch(/pro/i); + + // Verify plan exists in API with correct properties + const plans = await getAllPlans(); + const proPlan = plans.find((p: Plan) => p.id === 'pro'); + + expect(proPlan).toBeDefined(); + expect(proPlan?.name).toBe('Pro'); + + // Verify plan has the messages feature configured + // Note: API returns 'features' array with 'granted_balance' (SDK uses 'included') + const planFeatures = (proPlan as any)?.features; + expect(planFeatures).toBeDefined(); + expect(planFeatures?.length).toBeGreaterThan(0); + + const messagesFeature = planFeatures?.find( + (f: any) => f.feature_id === 'messages' + ); + expect(messagesFeature).toBeDefined(); + // The reset interval should be set to 'month' as per the fixture + expect(messagesFeature?.reset?.interval).toBe('month'); + // The granted_balance should be 10 (from fixture's included: 10) + expect(messagesFeature?.granted_balance).toBe(10); + }); +}); diff --git a/atmn/test/setup.ts b/atmn/test/setup.ts new file mode 100644 index 00000000..86fd894e --- /dev/null +++ b/atmn/test/setup.ts @@ -0,0 +1,60 @@ +// Shared test setup and utilities +import { resolve, dirname, join } from 'node:path'; +import { existsSync, mkdtempSync, rmSync, readFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { fileURLToPath } from 'node:url'; +import { config } from 'dotenv'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +// Load .env.test from test directory +config({ path: resolve(__dirname, '.env.test') }); + +// Path to the built CLI +export const CLI_PATH = resolve(__dirname, '../dist/cli.js'); + +// Test fixtures base path +export const FIXTURES_PATH = resolve(__dirname, './fixtures'); + +// Get API key from test environment variable +export const AUTUMN_SECRET_KEY = process.env.UNIT_TEST_AUTUMN_SECRET_KEY; + +if (!AUTUMN_SECRET_KEY) { + throw new Error( + 'UNIT_TEST_AUTUMN_SECRET_KEY environment variable is required to run tests.\n' + + 'Set it to your Autumn sandbox API key.' + ); +} + +// Also set AUTUMN_SECRET_KEY in process.env so API functions can use it directly +process.env.AUTUMN_SECRET_KEY = AUTUMN_SECRET_KEY; + +// Environment setup - inject the API key into spawned processes +// Note: shell: false to avoid path escaping issues with spaces +export const spawnOpts = { + env: { + ...process.env, + AUTUMN_SECRET_KEY, + }, + shell: false, +}; + +// Helper to create a temp directory +export function createTempDir(prefix: string = 'atmn-test-'): string { + return mkdtempSync(join(tmpdir(), prefix)); +} + +// Helper to cleanup a temp directory +export function cleanupTempDir(dir: string): void { + if (dir && existsSync(dir)) { + rmSync(dir, { recursive: true, force: true }); + } +} + +// Re-export fs helpers for convenience +export { existsSync, readFileSync, join }; + +// Re-export API functions for state verification in tests +// Using lazy-loaded wrapper to ensure env is loaded first +export { getAllPlans, getFeatures, type Plan, type Feature } from './api.js'; diff --git a/atmn/test/workflow/roundtrip.test.ts b/atmn/test/workflow/roundtrip.test.ts new file mode 100644 index 00000000..d2bf830f --- /dev/null +++ b/atmn/test/workflow/roundtrip.test.ts @@ -0,0 +1,138 @@ +import { describe, test, expect, afterAll, afterEach } from 'bun:test'; +import { render, cleanup, waitFor } from 'cli-testing-library'; +import { + CLI_PATH, + FIXTURES_PATH, + spawnOpts, + createTempDir, + cleanupTempDir, + existsSync, + readFileSync, + join, + getAllPlans, + getFeatures, + type Plan, + type Feature, +} from '../setup'; + +const BASIC_CONFIG_PATH = join(FIXTURES_PATH, 'basic-config'); + +// Quote the CLI_PATH for shell execution (cli-testing-library uses shell: true) +const QUOTED_CLI_PATH = `"${CLI_PATH}"`; + +describe('full workflow', () => { + let pullTempDir: string; + + afterAll(() => { + if (pullTempDir) { + cleanupTempDir(pullTempDir); + } + }); + + afterEach(async () => { + await cleanup(); + }); + + test('nuke -> push -> pull roundtrip', async () => { + // Step 1: Nuke to start fresh + const nukeInstance = await render('node', [QUOTED_CLI_PATH, 'nuke'], { + spawnOpts, + }); + + // Wait for first confirmation prompt then answer + await waitFor(() => { + const stdout = nukeInstance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(stdout).toMatch(/confirm to continue/i); + }, { timeout: 10000 }); + + await nukeInstance.userEvent.keyboard('y[Enter]'); + + // Wait for final confirmation prompt then answer + await waitFor(() => { + const stdout = nukeInstance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(stdout).toMatch(/final confirmation/i); + }, { timeout: 10000 }); + + await nukeInstance.userEvent.keyboard('y[Enter]'); + + // Wait for backup prompt then answer + await waitFor(() => { + const stdout = nukeInstance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(stdout).toMatch(/backup/i); + }, { timeout: 10000 }); + + // Skip backup (n + Enter) + await nukeInstance.userEvent.keyboard('n[Enter]'); + + // Wait for nuke to complete + await waitFor(() => { + const exit = nukeInstance.hasExit(); + expect(exit).toBeTruthy(); + }, { timeout: 30000 }); + await cleanup(); + + // VERIFY STATE: Everything should be deleted after nuke + const featuresAfterNuke = await getFeatures(); + const plansAfterNuke = await getAllPlans(); + expect(featuresAfterNuke.length).toBe(0); + expect(plansAfterNuke.length).toBe(0); + + // Step 2: Push our fixture config + const pushInstance = await render('node', [QUOTED_CLI_PATH, 'push', '-y'], { + cwd: BASIC_CONFIG_PATH, + spawnOpts, + }); + + // Wait for push to complete + await waitFor(() => { + const exit = pushInstance.hasExit(); + expect(exit).toBeTruthy(); + }, { timeout: 30000 }); + + const pushStdout = pushInstance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(pushStdout).toMatch(/Success/i); + await cleanup(); + + // VERIFY STATE: Features and plans should exist after push + const featuresAfterPush = await getFeatures(); + const plansAfterPush = await getAllPlans(); + + expect(featuresAfterPush.length).toBeGreaterThan(0); + expect(plansAfterPush.length).toBeGreaterThan(0); + + // Verify specific feature + const messagesFeature = featuresAfterPush.find((f: Feature) => f.id === 'messages'); + expect(messagesFeature).toBeDefined(); + expect(messagesFeature?.name).toBe('Messages'); + + // Verify specific plan + const proPlan = plansAfterPush.find((p: Plan) => p.id === 'pro'); + expect(proPlan).toBeDefined(); + expect(proPlan?.name).toBe('Pro'); + + // Step 3: Pull into fresh directory + pullTempDir = createTempDir('atmn-roundtrip-'); + + const pullInstance = await render('node', [QUOTED_CLI_PATH, 'pull'], { + cwd: pullTempDir, + spawnOpts, + }); + + // Wait for pull to complete + await waitFor(() => { + const exit = pullInstance.hasExit(); + expect(exit).toBeTruthy(); + }, { timeout: 30000 }); + + // Verify the pulled config file exists + const configPath = join(pullTempDir, 'autumn.config.ts'); + expect(existsSync(configPath)).toBe(true); + + // Verify pulled config contains our feature and plan + const configContent = readFileSync(configPath, 'utf-8'); + expect(configContent).toContain('messages'); + expect(configContent).toContain('pro'); + expect(configContent).toContain('Messages'); // feature name + expect(configContent).toContain('Pro'); // plan name + }); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fcbc4a0c..755cae30 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -79,6 +79,9 @@ importers: ava: specifier: ^5.2.0 version: 5.3.1 + cli-testing-library: + specifier: ^3.0.1 + version: 3.0.1(@jest/expect@29.7.0)(@jest/globals@29.7.0)(vitest@3.2.4(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(msw@2.10.4(@types/node@24.3.0)(typescript@5.9.2))(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) eslint-config-xo-react: specifier: ^0.27.0 version: 0.27.0(eslint-plugin-react-hooks@4.6.2(eslint@8.57.1))(eslint-plugin-react@7.37.5(eslint@8.57.1))(eslint@8.57.1) @@ -104,11 +107,153 @@ importers: specifier: ^0.53.1 version: 0.53.1(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9)) + autumn-js: + dependencies: + better-auth: + specifier: ^1.3.17 + version: 1.3.34(next@15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + better-call: + specifier: ^1.0.12 + version: 1.0.19 + query-string: + specifier: ^9.2.2 + version: 9.2.2 + rou3: + specifier: ^0.6.1 + version: 0.6.3 + swr: + specifier: ^2.3.3 + version: 2.3.6(react@19.2.3) + zod: + specifier: ^4.0.0 + version: 4.1.5 + devDependencies: + '@radix-ui/react-accordion': + specifier: ^1.2.11 + version: 1.2.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-dialog': + specifier: ^1.1.14 + version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-popover': + specifier: ^1.1.14 + version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': + specifier: ^1.2.3 + version: 1.2.4(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-switch': + specifier: ^1.2.5 + version: 1.2.6(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@remix-run/node': + specifier: ^2.16.6 + version: 2.17.0(typescript@5.9.3) + '@supabase/ssr': + specifier: ^0.6.1 + version: 0.6.1(@supabase/supabase-js@2.90.1) + '@tanstack/react-start': + specifier: ^1.120.5 + version: 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@vitejs/plugin-react@5.1.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(rolldown@1.0.0-beta.34)(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2)) + '@types/express': + specifier: ^5.0.1 + version: 5.0.3 + '@types/node': + specifier: ^22.15.32 + version: 22.17.1 + '@types/react': + specifier: ^19 + version: 19.2.7 + autoprefixer: + specifier: ^10.4.21 + version: 10.4.21(postcss@8.5.6) + autumn-js: + specifier: ^0.0.115 + version: 0.0.115(better-auth@1.3.34(next@15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(better-call@1.0.19)(react@19.2.3) + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + concurrently: + specifier: ^9.2.0 + version: 9.2.0 + convex: + specifier: ^1.25.4 + version: 1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) + elysia: + specifier: ^1.3.5 + version: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.3) + esbuild-plugin-path-alias: + specifier: ^1.0.7 + version: 1.0.7(esbuild@0.27.2) + esbuild-postcss: + specifier: ^0.0.4 + version: 0.0.4(esbuild@0.27.2)(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)) + express: + specifier: ^5.1.0 + version: 5.1.0 + fastify: + specifier: ^5.3.3 + version: 5.5.0 + hono: + specifier: ^4.7.9 + version: 4.9.1 + install: + specifier: ^0.13.0 + version: 0.13.0 + lucide-react: + specifier: ^0.523.0 + version: 0.523.0(react@19.2.3) + next: + specifier: ^15.2.3 + version: 15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + nodemon: + specifier: ^3.1.10 + version: 3.1.10 + postcss: + specifier: ^8.5.6 + version: 8.5.6 + postcss-nested: + specifier: ^7.0.2 + version: 7.0.2(postcss@8.5.6) + postcss-prefix-selector: + specifier: ^2.1.1 + version: 2.1.1(postcss@8.5.6) + react-dom: + specifier: ^19.1.0 + version: 19.2.3(react@19.2.3) + stripe: + specifier: ^18.3.0 + version: 18.4.0(@types/node@22.17.1) + tailwind-merge: + specifier: ^2.6.0 + version: 2.6.0 + tailwindcss: + specifier: ^3.4.1 + version: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)) + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3))) + tailwindcss-scoped-preflight: + specifier: ^3.4.12 + version: 3.4.12(postcss@8.5.6)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3))) + tsconfig-paths: + specifier: ^4.2.0 + version: 4.2.0 + tsup: + specifier: ^8.4.0 + version: 8.5.0(@swc/core@1.15.5)(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.3)(yaml@2.8.1) + tsx: + specifier: ^4.19.3 + version: 4.20.4 + typescript: + specifier: ^5.8.3 + version: 5.9.3 + convex: dependencies: convex-helpers: specifier: ^0.1.104 - version: 0.1.104(@standard-schema/spec@1.0.0)(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1))(hono@4.9.1)(react@19.1.1)(typescript@5.5.4)(zod@4.1.5) + version: 0.1.104(@standard-schema/spec@1.0.0)(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1))(react@19.1.1))(hono@4.9.1)(react@19.1.1)(typescript@5.5.4)(zod@4.1.5) react: specifier: ^18.3.1 || ^19.0.0 version: 19.1.1 @@ -122,9 +267,6 @@ importers: '@types/node': specifier: 18.17.0 version: 18.17.0 - '@useautumn/sdk': - specifier: workspace:* - version: link:../ts-sdk autumn-js: specifier: workspace:* version: link:../autumn-js @@ -133,10 +275,10 @@ importers: version: 3.0.0 convex: specifier: 1.29.3 - version: 1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + version: 1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1))(react@19.1.1) convex-test: specifier: 0.0.37 - version: 0.0.37(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)) + version: 0.0.37(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1))(react@19.1.1)) eslint: specifier: 9.29.0 version: 9.29.0(jiti@2.6.1) @@ -174,729 +316,258 @@ importers: specifier: 3.2.4 version: 3.2.4(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@18.17.0)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.10.4(@types/node@18.17.0)(typescript@5.5.4))(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - frameworks/conv: + frameworks/atmn-test: + dependencies: + atmn: + specifier: workspace:* + version: link:../../atmn + + frameworks/convex-quick: dependencies: - '@convex-dev/better-auth': - specifier: ^0.7.17 - version: 0.7.18(@standard-schema/spec@1.0.0)(better-auth@1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@3.25.76))(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1))(hono@4.9.1)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.7.3) '@useautumn/convex': specifier: workspace:* version: link:../../convex autumn-js: specifier: workspace:* version: link:../../autumn-js - better-auth: - specifier: 1.3.7 - version: 1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@3.25.76) convex: - specifier: ^1.26.0 - version: 1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - react: - specifier: ^19.0.0 - version: 19.1.1 - react-dom: - specifier: ^19.0.0 - version: 19.1.1(react@19.1.1) - devDependencies: - '@eslint/js': - specifier: ^9.21.0 - version: 9.29.0 - '@tailwindcss/vite': - specifier: ^4.0.14 - version: 4.1.18(vite@6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@types/node': - specifier: ^22.13.10 - version: 22.17.1 - '@types/react': - specifier: ^19.0.10 - version: 19.2.7 - '@types/react-dom': - specifier: ^19.0.4 - version: 19.1.9(@types/react@19.2.7) - '@vitejs/plugin-react': - specifier: ^4.3.4 - version: 4.7.0(vite@6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - eslint: - specifier: ^9.21.0 - version: 9.39.2(jiti@2.6.1) - eslint-plugin-react-hooks: - specifier: ^5.1.0 - version: 5.2.0(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-react-refresh: - specifier: ^0.4.19 - version: 0.4.26(eslint@9.39.2(jiti@2.6.1)) - globals: - specifier: ^15.15.0 - version: 15.15.0 - npm-run-all: - specifier: ^4.1.5 - version: 4.1.5 - prettier: - specifier: ^3.5.3 - version: 3.6.2 - tailwindcss: - specifier: ^4.0.14 - version: 4.1.12 + specifier: ^1.27.4 + version: 1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) typescript: - specifier: ~5.7.2 - version: 5.7.3 - typescript-eslint: - specifier: ^8.24.1 - version: 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3) - vite: - specifier: ^6.2.0 - version: 6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + specifier: ^5 + version: 5.9.3 + devDependencies: + '@types/bun': + specifier: latest + version: 1.3.5 - frameworks/conv-clerk: + frameworks/convex-workos-authkit: dependencies: - '@clerk/clerk-react': - specifier: ^5.25.0 - version: 5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@convex-dev/eslint-plugin': + specifier: ^1.1.1 + version: 1.1.1(convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@radix-ui/themes': + specifier: ^3.2.1 + version: 3.2.1(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@tanstack/react-query': + specifier: ^5.90.12 + version: 5.90.16(react@19.2.3) '@useautumn/convex': - specifier: workspace:* - version: link:../../convex + specifier: ^0.0.18 + version: 0.0.18(@standard-schema/spec@1.0.0)(autumn-js@0.1.63(better-auth@1.3.34(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(better-call@1.0.19)(convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(react@19.2.3))(convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(hono@4.9.1)(react@19.2.3)(typescript@5.9.3)(zod@4.1.5) + '@workos-inc/authkit-react': + specifier: ^0.13.0 + version: 0.13.0(react@19.2.3) + '@workos-inc/widgets': + specifier: ^1.6.1 + version: 1.6.1(@radix-ui/themes@3.2.1(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@tanstack/react-query@5.90.16(react@19.2.3))(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) autumn-js: - specifier: workspace:* - version: link:../../autumn-js + specifier: ^0.1.52 + version: 0.1.63(better-auth@1.3.34(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(better-call@1.0.19)(convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(react@19.2.3) convex: - specifier: ^1.26.0 - version: 1.29.3(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + specifier: ^1.31.0 + version: 1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) react: - specifier: ^19.0.0 - version: 19.1.1 + specifier: ^19.2.1 + version: 19.2.3 react-dom: - specifier: ^19.0.0 - version: 19.1.1(react@19.1.1) + specifier: ^19.2.1 + version: 19.2.3(react@19.2.3) devDependencies: '@eslint/js': - specifier: ^9.21.0 - version: 9.29.0 + specifier: ^9.39.1 + version: 9.39.2 '@tailwindcss/vite': - specifier: ^4.0.14 - version: 4.1.18(vite@6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + specifier: ^4.1.17 + version: 4.1.18(vite@7.3.0(@types/node@24.10.4)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) '@types/node': - specifier: ^22.13.10 - version: 22.17.1 + specifier: ^24.10.4 + version: 24.10.4 '@types/react': - specifier: ^19.0.10 + specifier: ^19.2.6 version: 19.2.7 '@types/react-dom': - specifier: ^19.0.4 - version: 19.1.9(@types/react@19.2.7) + specifier: ^19.2.3 + version: 19.2.3(@types/react@19.2.7) '@vitejs/plugin-react': - specifier: ^4.3.4 - version: 4.7.0(vite@6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + specifier: ^5.1.1 + version: 5.1.2(vite@7.3.0(@types/node@24.10.4)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) eslint: - specifier: ^9.21.0 + specifier: ^9.39.1 version: 9.39.2(jiti@2.6.1) eslint-plugin-react-hooks: - specifier: ^5.1.0 - version: 5.2.0(eslint@9.39.2(jiti@2.6.1)) + specifier: ^7.0.1 + version: 7.0.1(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-react-refresh: - specifier: ^0.4.19 + specifier: ^0.4.24 version: 0.4.26(eslint@9.39.2(jiti@2.6.1)) globals: - specifier: ^15.15.0 - version: 15.15.0 - npm-run-all: - specifier: ^4.1.5 - version: 4.1.5 + specifier: ^16.5.0 + version: 16.5.0 + npm-run-all2: + specifier: ^8.0.4 + version: 8.0.4 prettier: - specifier: ^3.5.3 + specifier: ^3.6.2 version: 3.6.2 tailwindcss: - specifier: ^4.0.14 - version: 4.1.12 + specifier: ^4.1.17 + version: 4.1.18 typescript: - specifier: ~5.7.2 - version: 5.7.3 + specifier: ~5.9.3 + version: 5.9.3 typescript-eslint: - specifier: ^8.24.1 - version: 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3) + specifier: ^8.47.0 + version: 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) vite: - specifier: ^6.2.0 - version: 6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + specifier: ^7.2.6 + version: 7.3.0(@types/node@24.10.4)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - frameworks/conv-next-clerk: + frameworks/nextjs-test: dependencies: - '@clerk/clerk-react': - specifier: ^5.25.0 - version: 5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@clerk/nextjs': - specifier: ^6.12.6 - version: 6.30.1(next@15.2.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@useautumn/convex': + specifier: ^6.28.1 + version: 6.30.1(next@15.3.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-accordion': + specifier: ^1.2.11 + version: 1.2.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-dialog': + specifier: ^1.1.14 + version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-popover': + specifier: ^1.1.14 + version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': + specifier: ^1.2.3 + version: 1.2.4(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-switch': + specifier: ^1.2.5 + version: 1.2.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@tailwindcss/cli': + specifier: ^4.1.11 + version: 4.1.11 + atmn: specifier: workspace:* - version: link:../../convex + version: link:../../atmn autumn-js: specifier: workspace:* version: link:../../autumn-js - convex: - specifier: ^1.26.0 - version: 1.29.3(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + better-auth: + specifier: ^1.2.12 + version: 1.3.34(next@15.3.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + lucide-react: + specifier: ^0.525.0 + version: 0.525.0(react@19.2.3) next: - specifier: 15.2.3 - version: 15.2.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + specifier: 15.3.4 + version: 15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + pg: + specifier: ^8.16.3 + version: 8.16.3 react: specifier: ^19.0.0 - version: 19.1.1 + version: 19.2.3 react-dom: specifier: ^19.0.0 - version: 19.1.1(react@19.1.1) + version: 19.2.3(react@19.2.3) + recharts: + specifier: 2.15.4 + version: 2.15.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + tailwind-merge: + specifier: ^3.3.1 + version: 3.3.1 + zod: + specifier: ^4.0.0 + version: 4.1.5 devDependencies: '@eslint/eslintrc': specifier: ^3 version: 3.3.1 '@tailwindcss/postcss': - specifier: ^4 + specifier: ^4.0.0 version: 4.1.18 '@types/node': specifier: ^20 version: 20.19.27 + '@types/pg': + specifier: ^8.15.2 + version: 8.15.5 '@types/react': specifier: ^19 version: 19.2.7 '@types/react-dom': specifier: ^19 - version: 19.1.9(@types/react@19.2.7) + version: 19.2.3(@types/react@19.2.7) + autoprefixer: + specifier: ^10.4.21 + version: 10.4.21(postcss@8.5.6) eslint: specifier: ^9 version: 9.39.2(jiti@2.6.1) eslint-config-next: - specifier: 15.2.3 - version: 15.2.3(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) - npm-run-all: - specifier: ^4.1.5 - version: 4.1.5 - prettier: - specifier: ^3.5.3 - version: 3.6.2 + specifier: 15.3.4 + version: 15.3.4(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + postcss-prefix-selector: + specifier: ^2.1.1 + version: 2.1.1(postcss@8.5.6) tailwindcss: - specifier: ^4 - version: 4.1.12 + specifier: ^4.1.10 + version: 4.1.18 + tw-animate-css: + specifier: ^1.3.4 + version: 1.4.0 typescript: specifier: ^5 - version: 5.9.2 + version: 5.9.3 - frameworks/conv-workos: - dependencies: - '@convex-dev/workos': - specifier: ^0.0.1 - version: 0.0.1(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@20.19.27)(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1))(jiti@2.6.1)(react@19.1.1)(typescript@5.9.2) - '@hookform/resolvers': - specifier: ^5.2.1 - version: 5.2.2(react-hook-form@7.68.0(react@19.1.1)) - '@radix-ui/react-avatar': - specifier: ^1.1.10 - version: 1.1.11(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-collapsible': - specifier: ^1.1.12 - version: 1.1.12(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-dialog': - specifier: ^1.1.15 - version: 1.1.15(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-dropdown-menu': - specifier: ^2.1.16 - version: 2.1.16(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-label': - specifier: ^2.1.7 - version: 2.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-popover': - specifier: ^1.1.15 - version: 1.1.15(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-separator': - specifier: ^1.1.7 - version: 1.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': - specifier: ^1.2.3 - version: 1.2.3(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-tooltip': - specifier: ^1.2.8 - version: 1.2.8(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@useautumn/convex': - specifier: workspace:* - version: link:../../convex - '@workos-inc/authkit-nextjs': - specifier: ^2.5.0 - version: 2.12.2(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@workos-inc/node': - specifier: ^7.69.1 - version: 7.77.0(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)) - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - class-variance-authority: - specifier: ^0.7.1 - version: 0.7.1 - clsx: - specifier: ^2.1.1 - version: 2.1.1 - convex: - specifier: ^1.26.2 - version: 1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - country-flag-icons: - specifier: ^1.5.19 - version: 1.6.4 - input-otp: - specifier: ^1.4.2 - version: 1.4.2(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - lucide-react: - specifier: ^0.542.0 - version: 0.542.0(react@19.1.1) - next: - specifier: 15.2.1 - version: 15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - next-intl: - specifier: ^4.3.5 - version: 4.6.1(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(typescript@5.9.2) - next-themes: - specifier: ^0.4.6 - version: 0.4.6(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: - specifier: ^19.1.1 - version: 19.1.1 - react-dom: - specifier: ^19.1.1 - version: 19.1.1(react@19.1.1) - react-hook-form: - specifier: ^7.62.0 - version: 7.68.0(react@19.1.1) - tailwind-merge: - specifier: ^3.3.1 - version: 3.3.1 - zod: - specifier: ^4.1.3 - version: 4.1.5 - devDependencies: - '@eslint/eslintrc': - specifier: ^3.3.1 - version: 3.3.1 - '@tailwindcss/postcss': - specifier: ^4.1.12 - version: 4.1.18 - '@types/node': - specifier: ^20.19.11 - version: 20.19.27 - '@types/react': - specifier: ^19.1.11 - version: 19.2.7 - '@types/react-dom': - specifier: ^19.1.8 - version: 19.1.9(@types/react@19.2.7) - concurrently: - specifier: ^9.2.1 - version: 9.2.1 - eslint: - specifier: ^9.34.0 - version: 9.39.2(jiti@2.6.1) - eslint-config-next: - specifier: 15.2.1 - version: 15.2.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) - tailwindcss: - specifier: ^4.1.12 - version: 4.1.12 - tw-animate-css: - specifier: ^1.3.7 - version: 1.4.0 - typescript: - specifier: ^5.9.2 - version: 5.9.3 - - frameworks/elysia: + frameworks/quick-test: dependencies: - '@elysiajs/cors': - specifier: ^1.3.3 - version: 1.4.0(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2)) - '@elysiajs/node': - specifier: '1' - version: 1.4.2(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2)) - autumn-js: + atmn: specifier: workspace:* - version: link:../../autumn-js - elysia: - specifier: '1' - version: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2) - elysia-clerk: - specifier: ^0.12.0 - version: 0.12.2(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - devDependencies: - tsx: - specifier: '4' - version: 4.20.4 - typescript: - specifier: '5' - version: 5.9.2 - - frameworks/express: - dependencies: - '@clerk/clerk-sdk-node': - specifier: ^4.13.23 - version: 4.13.23(react@19.1.1) - '@clerk/express': - specifier: ^1.7.15 - version: 1.7.58(express@4.22.1)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + version: link:../../atmn autumn-js: specifier: workspace:* version: link:../../autumn-js - better-auth: - specifier: ^1.2.8 - version: 1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.1.5) - better-call: - specifier: ^1.0.9 - version: 1.0.19 - cors: - specifier: ^2.8.5 - version: 2.8.5 - dotenv: - specifier: ^16.4.5 - version: 16.6.1 - express: - specifier: ^4.21.1 - version: 4.22.1 - helmet: - specifier: ^8.0.0 - version: 8.1.0 - morgan: - specifier: ^1.10.0 - version: 1.10.1 - pg: - specifier: ^8.16.0 - version: 8.16.3 - rou3: - specifier: ^0.6.1 - version: 0.6.3 - tsx: - specifier: ^4.19.4 - version: 4.20.4 - devDependencies: - '@types/cors': - specifier: ^2.8.17 - version: 2.8.19 - '@types/express': - specifier: ^4.17.20 - version: 4.17.25 - '@types/jest': - specifier: ^29.5.13 - version: 29.5.14 - '@types/morgan': - specifier: ^1.9.9 - version: 1.9.10 - '@types/node': - specifier: ^22.7.5 - version: 22.17.1 - '@types/pg': - specifier: ^8.15.2 - version: 8.15.5 - '@types/supertest': - specifier: ^6.0.2 - version: 6.0.3 - '@typescript-eslint/eslint-plugin': - specifier: ^7.16.1 - version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2) - '@typescript-eslint/parser': - specifier: ^7.16.1 - version: 7.18.0(eslint@8.57.1)(typescript@5.9.2) - eslint: - specifier: ^8.57.0 - version: 8.57.1 - eslint-config-airbnb-typescript: - specifier: ^18.0.0 - version: 18.0.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2))(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint-plugin-import@2.32.0)(eslint@8.57.1) - eslint-import-resolver-typescript: - specifier: ^3.6.3 - version: 3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1) - eslint-plugin-import: - specifier: ^2.31.0 - version: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) - jest: - specifier: ^29.7.0 - version: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) - nodemon: - specifier: ^3.1.7 - version: 3.1.10 - supertest: - specifier: ^7.0.0 - version: 7.1.4 - ts-jest: - specifier: ^29.2.5 - version: 29.4.6(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)))(typescript@5.9.2) - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2) - typescript: - specifier: ^5.6.3 - version: 5.9.2 - frameworks/fastify: + frameworks/speakeasy-test: dependencies: - '@fastify/cors': - specifier: ^11.0.1 - version: 11.2.0 - '@types/pg': - specifier: ^8.15.2 - version: 8.15.5 - better-auth: - specifier: ^1.2.8 - version: 1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.1.5) dotenv: - specifier: ^16.5.0 - version: 16.6.1 - fastify: - specifier: ^5.3.3 - version: 5.5.0 - pg: - specifier: ^8.16.0 - version: 8.16.3 - tsx: - specifier: ^4.19.4 - version: 4.20.4 - devDependencies: - '@types/node': - specifier: ^22.15.18 - version: 22.17.1 - typescript: - specifier: ^5.8.3 - version: 5.9.2 - - frameworks/hono: - dependencies: - '@clerk/backend': - specifier: ^1.32.1 - version: 1.34.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@hono/clerk-auth': - specifier: ^2.0.0 - version: 2.0.1(@clerk/backend@1.34.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(hono@4.9.1) - '@hono/node-server': - specifier: ^1.14.1 - version: 1.19.7(hono@4.9.1) - '@supabase/supabase-js': - specifier: ^2.53.0 - version: 2.88.0 - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - better-auth: - specifier: ^1.2.8 - version: 1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.1.5) - dotenv: - specifier: ^16.5.0 - version: 16.6.1 - hono: - specifier: ^4.7.9 - version: 4.9.1 - pg: - specifier: ^8.16.0 - version: 8.16.3 - devDependencies: - '@types/node': - specifier: ^20.11.17 - version: 20.19.27 - '@types/pg': - specifier: ^8.15.2 - version: 8.15.5 - tsx: - specifier: ^4.7.1 - version: 4.20.4 - typescript: - specifier: ^5.8.3 - version: 5.9.2 - - frameworks/next14: - dependencies: - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - next: - specifier: 15.4.1 - version: 15.4.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - react: - specifier: 19.1.0 - version: 19.1.0 - react-dom: - specifier: 19.1.0 - version: 19.1.0(react@19.1.0) - devDependencies: - '@eslint/eslintrc': - specifier: ^3 - version: 3.3.1 - '@tailwindcss/postcss': - specifier: ^4 - version: 4.1.18 - '@types/node': - specifier: ^20 - version: 20.19.27 - '@types/react': - specifier: ^19 - version: 19.2.7 - '@types/react-dom': - specifier: ^19 - version: 19.1.9(@types/react@19.2.7) - eslint: - specifier: ^9 - version: 9.39.2(jiti@2.6.1) - eslint-config-next: - specifier: 15.4.1 - version: 15.4.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) - tailwindcss: - specifier: ^4 - version: 4.1.12 + specifier: ^17.2.2 + version: 17.2.3 typescript: specifier: ^5 - version: 5.9.2 - - frameworks/rr7: - dependencies: - '@clerk/react-router': - specifier: ^1.8.9 - version: 1.10.2(react-dom@19.1.1(react@19.1.1))(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - '@react-router/node': - specifier: ^7.5.3 - version: 7.10.1(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2) - '@react-router/serve': - specifier: ^7.5.3 - version: 7.10.1(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2) - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - isbot: - specifier: ^5.1.27 - version: 5.1.29 - react: - specifier: ^19.1.0 - version: 19.1.1 - react-dom: - specifier: ^19.1.0 - version: 19.1.1(react@19.1.1) - react-router: - specifier: ^7.5.3 - version: 7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - devDependencies: - '@react-router/dev': - specifier: ^7.5.3 - version: 7.10.1(@react-router/serve@7.10.1(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2))(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(terser@5.43.1)(tsx@4.20.4)(typescript@5.9.2)(vite@6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(yaml@2.8.1) - '@tailwindcss/vite': - specifier: ^4.1.4 - version: 4.1.18(vite@6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@types/node': - specifier: ^20.19.0 - version: 20.19.27 - '@types/react': - specifier: ^19.1.2 - version: 19.2.7 - '@types/react-dom': - specifier: ^19.1.2 - version: 19.1.9(@types/react@19.2.7) - tailwindcss: - specifier: ^4.1.4 - version: 4.1.12 - typescript: - specifier: ^5.8.3 - version: 5.9.2 - vite: - specifier: ^6.3.3 - version: 6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - vite-tsconfig-paths: - specifier: ^5.1.4 - version: 5.1.4(typescript@5.9.2)(vite@6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - - frameworks/tanstack: - dependencies: - '@tailwindcss/postcss': - specifier: ^4.1.7 - version: 4.1.18 - '@tanstack/react-router': - specifier: ^1.120.5 - version: 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/react-router-devtools': - specifier: ^1.120.5 - version: 1.141.4(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@tanstack/router-core@1.131.7)(csstype@3.2.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(solid-js@1.9.10) - '@tanstack/react-start': - specifier: ^1.120.5 - version: 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rolldown@1.0.0-beta.34)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)) - '@types/pg': - specifier: ^8.15.2 - version: 8.15.5 - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - better-auth: - specifier: ^1.2.8 - version: 1.3.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@4.1.5) - pg: - specifier: ^8.16.0 - version: 8.16.3 - react: - specifier: ^18.3.1 - version: 18.3.1 - react-dom: - specifier: ^18.3.1 - version: 18.3.1(react@18.3.1) - tailwind-merge: - specifier: ^2.6.0 - version: 2.6.0 - vinxi: - specifier: 0.5.3 - version: 0.5.3(@netlify/blobs@9.1.2)(@types/node@22.17.1)(better-sqlite3@12.2.0)(db0@0.3.2(better-sqlite3@12.2.0))(ioredis@5.7.0)(jiti@2.6.1)(lightningcss@1.30.2)(rolldown@1.0.0-beta.34)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + version: 5.9.3 devDependencies: - '@types/node': - specifier: ^22.5.4 - version: 22.17.1 - '@types/react': - specifier: ^18.3.14 - version: 18.3.23 - '@types/react-dom': - specifier: ^18.3.5 - version: 18.3.7(@types/react@18.3.23) - autoprefixer: - specifier: ^10.4.20 - version: 10.4.21(postcss@8.5.6) - postcss: - specifier: ^8.5.3 - version: 8.5.6 - tailwindcss: - specifier: ^3.4.17 - version: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) - typescript: - specifier: ^5.7.2 - version: 5.9.2 - vite-tsconfig-paths: - specifier: ^5.1.4 - version: 5.1.4(typescript@5.9.2)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - - frameworks/test: {} + '@types/bun': + specifier: latest + version: 1.3.5 - frameworks/vite: + frameworks/with-supabase: dependencies: - '@clerk/clerk-react': - specifier: ^5.32.1 - version: 5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-dialog': - specifier: ^1.1.13 - version: 1.1.15(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@radix-ui/react-checkbox': + specifier: ^1.3.1 + version: 1.3.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-dropdown-menu': + specifier: ^2.1.14 + version: 2.1.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@radix-ui/react-label': specifier: ^2.1.6 - version: 2.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + version: 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@radix-ui/react-slot': specifier: ^1.2.2 - version: 1.2.3(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-switch': - specifier: ^1.2.4 - version: 1.2.5(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-tooltip': - specifier: ^1.2.6 - version: 1.2.8(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + version: 1.2.4(@types/react@19.2.7)(react@19.2.3) + '@supabase/ssr': + specifier: latest + version: 0.8.0(@supabase/supabase-js@2.90.1) '@supabase/supabase-js': - specifier: ^2.53.0 - version: 2.88.0 - '@tailwindcss/vite': - specifier: ^4.1.7 - version: 4.1.18(vite@6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - autumn-js: - specifier: workspace:* - version: link:../../autumn-js - better-auth: - specifier: ^1.2.8 - version: 1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.1.5) + specifier: latest + version: 2.90.1 class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -904,75 +575,63 @@ importers: specifier: ^2.1.1 version: 2.1.1 lucide-react: - specifier: ^0.510.0 - version: 0.510.0(react@19.1.1) + specifier: ^0.511.0 + version: 0.511.0(react@19.2.3) + next: + specifier: latest + version: 16.1.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3) next-themes: specifier: ^0.4.6 - version: 0.4.6(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + version: 0.4.6(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react: - specifier: ^19.1.0 - version: 19.1.1 + specifier: ^19.0.0 + version: 19.2.3 react-dom: - specifier: ^19.1.0 - version: 19.1.1(react@19.1.1) - sonner: - specifier: ^2.0.3 - version: 2.0.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + specifier: ^19.0.0 + version: 19.2.3(react@19.2.3) tailwind-merge: specifier: ^3.3.0 version: 3.3.1 - tailwindcss: - specifier: ^4.1.7 - version: 4.1.12 devDependencies: - '@eslint/js': - specifier: ^9.25.0 - version: 9.29.0 + '@eslint/eslintrc': + specifier: ^3 + version: 3.3.1 '@types/node': - specifier: ^22.15.18 - version: 22.17.1 + specifier: ^20 + version: 20.19.27 '@types/react': - specifier: ^19.1.2 + specifier: ^19 version: 19.2.7 '@types/react-dom': - specifier: ^19.1.2 - version: 19.1.9(@types/react@19.2.7) - '@vitejs/plugin-react': - specifier: ^4.4.1 - version: 4.7.0(vite@6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + specifier: ^19 + version: 19.2.3(@types/react@19.2.7) + autoprefixer: + specifier: ^10.4.20 + version: 10.4.21(postcss@8.5.6) eslint: - specifier: ^9.25.0 + specifier: ^9 version: 9.39.2(jiti@2.6.1) - eslint-plugin-react-hooks: - specifier: ^5.2.0 - version: 5.2.0(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-react-refresh: - specifier: ^0.4.19 - version: 0.4.26(eslint@9.39.2(jiti@2.6.1)) - globals: - specifier: ^16.0.0 - version: 16.5.0 - tw-animate-css: - specifier: ^1.2.9 - version: 1.4.0 + eslint-config-next: + specifier: 15.3.1 + version: 15.3.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + postcss: + specifier: ^8 + version: 8.5.6 + tailwindcss: + specifier: ^3.4.1 + version: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.9.3)) + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.9.3))) typescript: - specifier: ~5.8.3 - version: 5.8.3 - typescript-eslint: - specifier: ^8.30.1 - version: 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) - vite: - specifier: ^6.3.5 - version: 6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + specifier: ^5 + version: 5.9.3 nextjs: dependencies: '@clerk/nextjs': specifier: ^6.28.1 version: 6.30.1(next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@knocklabs/node': - specifier: ^1.19.0 - version: 1.19.0 '@radix-ui/react-accordion': specifier: ^1.2.11 version: 1.2.11(@types/react-dom@19.1.7(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -991,15 +650,12 @@ importers: '@tailwindcss/cli': specifier: ^4.1.11 version: 4.1.11 - '@useautumn/sdk': - specifier: workspace:* - version: link:../ts-sdk atmn: specifier: workspace:* version: link:../atmn autumn-js: specifier: workspace:* - version: link:../package + version: link:../autumn-js better-auth: specifier: ^1.2.12 version: 1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.0.17) @@ -1023,213 +679,134 @@ importers: version: 0.525.0(react@19.1.1) next: specifier: 15.3.4 - version: 15.3.4(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + version: 15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) pg: specifier: ^8.16.3 version: 8.16.3 - react: - specifier: ^19.1.0 - version: 19.1.1 - react-dom: - specifier: ^19.1.0 - version: 19.1.1(react@19.1.1) - recharts: - specifier: 2.15.4 - version: 2.15.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - tailwind-merge: - specifier: ^3.3.1 - version: 3.3.1 - zod: - specifier: ^4.0.0 - version: 4.0.17 - devDependencies: - '@eslint/eslintrc': - specifier: ^3 - version: 3.3.1 - '@tailwindcss/postcss': - specifier: ^4.0.0 - version: 4.1.11 - '@types/bun': - specifier: latest - version: 1.3.4 - '@types/node': - specifier: ^20 - version: 20.19.10 - '@types/pg': - specifier: ^8.15.2 - version: 8.15.5 - '@types/react': - specifier: ^19 - version: 19.1.10 - '@types/react-dom': - specifier: ^19 - version: 19.1.7(@types/react@19.1.10) - autoprefixer: - specifier: ^10.4.21 - version: 10.4.21(postcss@8.5.6) - eslint: - specifier: ^9 - version: 9.29.0(jiti@2.6.1) - eslint-config-next: - specifier: 15.3.4 - version: 15.3.4(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) - postcss-prefix-selector: - specifier: ^2.1.1 - version: 2.1.1(postcss@8.5.6) - tailwindcss: - specifier: ^4.1.10 - version: 4.1.12 - tw-animate-css: - specifier: ^1.3.4 - version: 1.3.6 - typescript: - specifier: ^5 - version: 5.9.2 - - package: - dependencies: - better-auth: - specifier: ^1.3.17 - version: 1.3.34(next@15.3.4(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - better-call: - specifier: ^1.0.12 - version: 1.0.13 - query-string: - specifier: ^9.2.2 - version: 9.2.2 - rou3: - specifier: ^0.6.1 - version: 0.6.3 - swr: - specifier: ^2.3.3 - version: 2.3.6(react@19.1.1) - zod: - specifier: ^4.0.0 - version: 4.0.17 - devDependencies: - '@radix-ui/react-accordion': - specifier: ^1.2.11 - version: 1.2.11(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-dialog': - specifier: ^1.1.14 - version: 1.1.14(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-popover': - specifier: ^1.1.14 - version: 1.1.14(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': - specifier: ^1.2.3 - version: 1.2.3(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-switch': - specifier: ^1.2.5 - version: 1.2.5(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@remix-run/node': - specifier: ^2.16.6 - version: 2.17.0(typescript@5.9.2) - '@supabase/ssr': - specifier: ^0.6.1 - version: 0.6.1(@supabase/supabase-js@2.88.0) - '@tanstack/react-start': - specifier: ^1.120.5 - version: 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9)) - '@types/express': - specifier: ^5.0.1 - version: 5.0.3 - '@types/node': - specifier: ^22.15.32 - version: 22.17.1 - '@types/react': - specifier: ^19 - version: 19.1.10 - autoprefixer: - specifier: ^10.4.21 - version: 10.4.21(postcss@8.5.6) - autumn-js: - specifier: ^0.0.115 - version: 0.0.115(better-auth@1.3.34(next@15.3.4(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-call@1.0.13)(react@19.1.1) - class-variance-authority: - specifier: ^0.7.1 - version: 0.7.1 - clsx: - specifier: ^2.1.1 - version: 2.1.1 - concurrently: - specifier: ^9.2.0 - version: 9.2.0 - convex: - specifier: ^1.25.4 - version: 1.25.4(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - elysia: - specifier: ^1.3.5 - version: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2) - esbuild-plugin-path-alias: - specifier: ^1.0.7 - version: 1.0.7(esbuild@0.25.9) - esbuild-postcss: - specifier: ^0.0.4 - version: 0.0.4(esbuild@0.25.9)(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) - express: - specifier: ^5.1.0 - version: 5.1.0 - fastify: - specifier: ^5.3.3 - version: 5.5.0 - hono: - specifier: ^4.7.9 - version: 4.9.1 - install: - specifier: ^0.13.0 - version: 0.13.0 - lucide-react: - specifier: ^0.523.0 - version: 0.523.0(react@19.1.1) - next: - specifier: ^15.2.3 - version: 15.3.4(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - nodemon: - specifier: ^3.1.10 - version: 3.1.10 - postcss: - specifier: ^8.5.6 - version: 8.5.6 - postcss-nested: - specifier: ^7.0.2 - version: 7.0.2(postcss@8.5.6) - postcss-prefix-selector: - specifier: ^2.1.1 - version: 2.1.1(postcss@8.5.6) + react: + specifier: ^19.0.0 + version: 19.1.1 react-dom: - specifier: ^19.1.0 + specifier: ^19.0.0 version: 19.1.1(react@19.1.1) - stripe: - specifier: ^18.3.0 - version: 18.4.0(@types/node@22.17.1) + recharts: + specifier: 2.15.4 + version: 2.15.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) tailwind-merge: - specifier: ^2.6.0 - version: 2.6.0 + specifier: ^3.3.1 + version: 3.3.1 + zod: + specifier: ^4.0.0 + version: 4.0.17 + devDependencies: + '@eslint/eslintrc': + specifier: ^3 + version: 3.3.1 + '@tailwindcss/postcss': + specifier: ^4.0.0 + version: 4.1.11 + '@types/bun': + specifier: latest + version: 1.3.5 + '@types/node': + specifier: ^20 + version: 20.19.10 + '@types/pg': + specifier: ^8.15.2 + version: 8.15.5 + '@types/react': + specifier: ^19 + version: 19.1.10 + '@types/react-dom': + specifier: ^19 + version: 19.1.7(@types/react@19.1.10) + autoprefixer: + specifier: ^10.4.21 + version: 10.4.21(postcss@8.5.6) + eslint: + specifier: ^9 + version: 9.29.0(jiti@2.6.1) + eslint-config-next: + specifier: 15.3.4 + version: 15.3.4(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + postcss-prefix-selector: + specifier: ^2.1.1 + version: 2.1.1(postcss@8.5.6) tailwindcss: - specifier: ^3.4.1 - version: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) - tailwindcss-animate: - specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2))) - tailwindcss-scoped-preflight: - specifier: ^3.4.12 - version: 3.4.12(postcss@8.5.6)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2))) + specifier: ^4.1.10 + version: 4.1.12 + tw-animate-css: + specifier: ^1.3.4 + version: 1.3.6 + typescript: + specifier: ^5 + version: 5.9.2 + + ts-sdk: + devDependencies: + '@arethetypeswrong/cli': + specifier: ^0.17.0 + version: 0.17.4 + '@swc/core': + specifier: ^1.3.102 + version: 1.15.5 + '@swc/jest': + specifier: ^0.2.29 + version: 0.2.39(@swc/core@1.15.5) + '@types/jest': + specifier: ^29.4.0 + version: 29.5.14 + '@types/node': + specifier: ^20.17.6 + version: 20.19.27 + '@typescript-eslint/eslint-plugin': + specifier: 8.31.1 + version: 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/parser': + specifier: 8.31.1 + version: 8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) + eslint: + specifier: ^9.39.1 + version: 9.39.2(jiti@2.6.1) + eslint-plugin-prettier: + specifier: ^5.4.1 + version: 5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@8.10.2(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1))(prettier@3.6.2) + eslint-plugin-unused-imports: + specifier: ^4.1.4 + version: 4.3.0(@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.2(jiti@2.6.1)) + iconv-lite: + specifier: ^0.6.3 + version: 0.6.3 + jest: + specifier: ^29.4.0 + version: 29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)) + prettier: + specifier: ^3.0.0 + version: 3.6.2 + publint: + specifier: ^0.2.12 + version: 0.2.12 + ts-jest: + specifier: ^29.1.0 + version: 29.4.6(@babel/core@7.28.5)(@jest/transform@29.7.0)(@jest/types@30.2.0)(babel-jest@29.7.0(@babel/core@7.28.5))(jest-util@29.7.0)(jest@29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)))(typescript@5.8.3) + ts-node: + specifier: ^10.5.0 + version: 10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3) + tsc-multi: + specifier: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz + version: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz(typescript@5.8.3) tsconfig-paths: specifier: ^4.0.0 version: 4.2.0 - tsup: - specifier: ^8.4.0 - version: 8.5.0(@swc/core@1.15.5)(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.2)(yaml@2.8.1) - tsx: - specifier: ^4.19.3 - version: 4.20.4 + tslib: + specifier: ^2.8.1 + version: 2.8.1 typescript: specifier: 5.8.3 version: 5.8.3 typescript-eslint: specifier: 8.31.1 - version: 8.31.1(eslint@9.34.0(jiti@2.6.1))(typescript@5.8.3) + version: 8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) ui: dependencies: @@ -1280,7 +857,7 @@ importers: version: 15.6.10(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) fumadocs-mdx: specifier: ^11.6.1 - version: 11.7.5(acorn@8.15.0)(fumadocs-core@15.6.10(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1))(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(vite@7.1.5(@types/node@20.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + version: 11.7.5(acorn@8.15.0)(fumadocs-core@15.6.10(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1))(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(vite@7.3.0(@types/node@20.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) fumadocs-ui: specifier: ^15.2.11 version: 15.6.10(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.10)(typescript@5.9.2))) @@ -1375,10 +952,22 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@andrewbranch/untar.js@1.0.3': + resolution: {integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==} + '@antfu/ni@23.3.1': resolution: {integrity: sha512-C90iyzm/jLV7Lomv2UzwWUzRv9WZr1oRsFRKsX5HjQL4EXrbi9H/RtBkjCP+NF+ABZXUKpAa4F1dkoTaea4zHg==} hasBin: true + '@arethetypeswrong/cli@0.17.4': + resolution: {integrity: sha512-AeiKxtf67XD/NdOqXgBOE5TZWH3EOCt+0GkbUpekOzngc+Q/cRZ5azjWyMxISxxfp0EItgm5NoSld9p7BAA5xQ==} + engines: {node: '>=18'} + hasBin: true + + '@arethetypeswrong/core@0.17.4': + resolution: {integrity: sha512-Izvir8iIoU+X4SKtDAa5kpb+9cpifclzsbA8x/AZY0k0gIfXYQ1fa1B6Epfe6vNA2YfDX8VtrZFgvnXB6aPEoQ==} + engines: {node: '>=18'} + '@babel/code-frame@7.26.2': resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} @@ -1399,10 +988,18 @@ packages: resolution: {integrity: sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ==} engines: {node: '>=6.9.0'} + '@babel/core@7.28.5': + resolution: {integrity: sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==} + engines: {node: '>=6.9.0'} + '@babel/generator@7.28.3': resolution: {integrity: sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==} engines: {node: '>=6.9.0'} + '@babel/generator@7.28.5': + resolution: {integrity: sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-annotate-as-pure@7.27.3': resolution: {integrity: sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==} engines: {node: '>=6.9.0'} @@ -1483,16 +1080,15 @@ packages: resolution: {integrity: sha512-PTNtvUQihsAsDHMOP5pfobP8C6CM4JWXmP8DrEIt46c3r2bf87Ua1zoqevsMo9g+tWDwgWrFP5EIxuBx5RudAw==} engines: {node: '>=6.9.0'} + '@babel/helpers@7.28.4': + resolution: {integrity: sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==} + engines: {node: '>=6.9.0'} + '@babel/parser@7.28.0': resolution: {integrity: sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/parser@7.28.3': - resolution: {integrity: sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA==} - engines: {node: '>=6.0.0'} - hasBin: true - '@babel/parser@7.28.5': resolution: {integrity: sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==} engines: {node: '>=6.0.0'} @@ -1627,14 +1223,14 @@ packages: resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.28.0': - resolution: {integrity: sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==} - engines: {node: '>=6.9.0'} - '@babel/traverse@7.28.3': resolution: {integrity: sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ==} engines: {node: '>=6.9.0'} + '@babel/traverse@7.28.5': + resolution: {integrity: sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==} + engines: {node: '>=6.9.0'} + '@babel/types@7.28.0': resolution: {integrity: sha512-jYnje+JyZG5YThjHiF28oT4SIZLnYOcSBb6+SDaFIyzDVSkXQmQQYclJ2R+YxcdmK0AX6x1E5OQNtuh3jHDrUg==} engines: {node: '>=6.9.0'} @@ -1675,6 +1271,9 @@ packages: '@borewit/text-codec@0.1.1': resolution: {integrity: sha512-5L/uBxmjaCIX5h8Z+uu+kA9BQLkc/Wl06UGR5ajNRxu+/XjonB5i8JpgFMrPj3LXTCPA0pv8yxUvbUi+QthGGA==} + '@braidai/lang@1.1.2': + resolution: {integrity: sha512-qBcknbBufNHlui137Hft8xauQMTZDKdophmLFv05r2eNmdIv/MlPuP4TdUknHG68UdWLgVZwgxVe735HzJNIwA==} + '@bundled-es-modules/cookie@2.0.1': resolution: {integrity: sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==} @@ -1684,23 +1283,6 @@ packages: '@bundled-es-modules/tough-cookie@0.1.6': resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==} - '@clerk/backend@0.38.15': - resolution: {integrity: sha512-zmd0jPyb1iALlmyzyRbgujQXrGqw8sf+VpFjm5GkndpBeq5+9+oH7QgMaFEmWi9oxvTd2sZ+EN+QT4+OXPUnGA==} - engines: {node: '>=14'} - - '@clerk/backend@1.34.0': - resolution: {integrity: sha512-9rZ8hQJVpX5KX2bEpiuVXfpjhojQCiqCWADJDdCI0PCeKxn58Ep0JPYiIcczg4VKUc3a7jve9vXylykG2XajLQ==} - engines: {node: '>=18.17.0'} - peerDependencies: - svix: ^1.62.0 - peerDependenciesMeta: - svix: - optional: true - - '@clerk/backend@2.27.1': - resolution: {integrity: sha512-RPFPBuc9y9JREPfzpN5fPcinfz+8QGOt6kEORzgIntTCpciEU8e+xKkfQbVQTNzxzj+e6VZsm8/e3kFdYzCtPg==} - engines: {node: '>=18.17.0'} - '@clerk/backend@2.7.1': resolution: {integrity: sha512-/Ha0cHNgX5tGBqfzMnasXZFMS5R+nNBUnSueZB0F223S+sUhnY3SMzLB5S3kLSFJWjxO2cGkiB0r1NcFLyLZfw==} engines: {node: '>=18.17.0'} @@ -1719,16 +1301,6 @@ packages: react: ^18.0.0 || ^19.0.0 || ^19.0.0-0 react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-0 - '@clerk/clerk-sdk-node@4.13.23': - resolution: {integrity: sha512-D3/O5zLqOtIcoNjA5tza1WK+o3Bs20DcmFc2z8swv7p8p5i5fj5Q1rEZl31bnz+fEQGo2YtTYZyG0zY/HkioQw==} - engines: {node: '>=14'} - - '@clerk/express@1.7.58': - resolution: {integrity: sha512-qz8d9C76S0tvpPKf2wytLrUwC8RAcMmWdROe06FnydEoQVDTZkDTWGGWIhnkHhkzKZEtTvbaKD1Qit47EJG1uw==} - engines: {node: '>=18.17.0'} - peerDependencies: - express: ^4.17.0 || ^5.0.0 - '@clerk/nextjs@6.30.1': resolution: {integrity: sha512-TogyNkqP11DDMGr/CHKTXxvS7WsAUTsSp8P/t8yAVtlVj4VzgAMGafOmeAKxaAAi45GG+NUdeyFL0h0go0XC4w==} engines: {node: '>=18.17.0'} @@ -1737,22 +1309,6 @@ packages: react: ^18.0.0 || ^19.0.0 || ^19.0.0-0 react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-0 - '@clerk/react-router@1.10.2': - resolution: {integrity: sha512-gzs66bWZwUy6M677Pw5J93eysBbiRUolWQjK/8h8nCz2gbdsljs1ImTHWt3UK9xRXbJcKzdUc6IMBXO6KEpPvw==} - engines: {node: '>=20.0.0'} - peerDependencies: - react: ^18.0.0 || ^19.0.0 || ^19.0.0-0 - react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-0 - react-router: ^7.1.2 - - '@clerk/shared@1.4.2': - resolution: {integrity: sha512-R+OkzCtnNU7sn/F6dBfdY5lKs84TN785VZdBBefmyr7zsXcFEqbCcfQzyvgtIS28Ln5SifFEBoAyYR334IXO8w==} - peerDependencies: - react: '>=16' - peerDependenciesMeta: - react: - optional: true - '@clerk/shared@3.19.0': resolution: {integrity: sha512-yZ4ZKNyyQwugtyeVVTFytFLDW3gyQrEa+9DTKwF04nxRE7cBY9gseHjycOWVMBjDtLeqF34zdQPxkM7FtZoTkw==} engines: {node: '>=18.17.0'} @@ -1789,14 +1345,6 @@ packages: react-dom: optional: true - '@clerk/types@3.65.5': - resolution: {integrity: sha512-RGO8v2a52Ybo1jwVj42UWT8VKyxAk/qOxrkA3VNIYBNEajPSmZNa9r9MTgqSgZRyz1XTlQHdVb7UK7q78yAGfA==} - engines: {node: '>=14'} - - '@clerk/types@4.101.7': - resolution: {integrity: sha512-1l1FUziIGozg8YRI1UOklR1PmS6HV7IJB3CAA10MOheZEJkQ2sEnjG8E/DObstIX7Zq/HB0OHViNt6c7nyTeRg==} - engines: {node: '>=18.17.0'} - '@clerk/types@4.75.0': resolution: {integrity: sha512-b5bL+XhV4ZO7Q54YqsxV4LyopaWuV0fzg6acsYD5mM2ibQaVY/SIAQgH40sGBT1D25c2jyvVY2JDKPRPqB1I5g==} engines: {node: '>=18.17.0'} @@ -1805,31 +1353,22 @@ packages: resolution: {integrity: sha512-WEILYgTGkwdB7OUoxHPrdHe/UAUPYvwutJxrwPyHfTejBmRD0RcKmB8VwTqwOxlfQgcKVDfLQ9jLW8m7NeJHIA==} engines: {node: '>=18.17.0'} - '@clerk/types@4.99.0': - resolution: {integrity: sha512-DggZfPGoW5e8jY1mYXRS34nFNnDISiBM00eqt3VHfcZb1+kgGUEBJo6HhULljUArB2Xq8OWeaOOPAhKC55Cp7A==} - engines: {node: '>=18.17.0'} - '@cloudflare/kv-asset-handler@0.4.0': resolution: {integrity: sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==} engines: {node: '>=18.0.0'} + '@colors/colors@1.5.0': + resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} + engines: {node: '>=0.1.90'} + '@colors/colors@1.6.0': resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} - '@convex-dev/better-auth@0.7.18': - resolution: {integrity: sha512-lZwJcRJncmeKZfDQk7PJrJ+8z/S8rmO5rUfPWZd2gOjC+1sbd/JUZiTVPGLxeP5VEGG74TkRTUavK7s+wmKhwg==} - peerDependencies: - better-auth: 1.3.8 - convex: ^1.26.2 - react: ^18.3.1 || ^19.0.0 - react-dom: ^18.3.1 || ^19.0.0 - - '@convex-dev/workos@0.0.1': - resolution: {integrity: sha512-8gZOgmcTitcKXwagdU69XC4Va6wMPFIhSqSOEaXmFXMEPtkMgxPW1dhJzrmm9UQ4iRgZsckjd2O5aQjUH7kHGQ==} + '@convex-dev/eslint-plugin@1.1.1': + resolution: {integrity: sha512-4NsTWNJJLPbti10LZsV1/7UkbaMPFxNz5Ekd3yW5bDkaoU1I0b4TJxk0V+ShbNFTJ2fSqTxm+iGy9XSNCmAoVA==} peerDependencies: - convex: ^1.25.4 - react: ^18.0.0 || ^19.0.0-0 || ^19.0.0 + convex: ^1.31.0 '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} @@ -1838,12 +1377,6 @@ packages: '@dabh/diagnostics@2.0.3': resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} - '@deno/shim-deno-test@0.5.0': - resolution: {integrity: sha512-4nMhecpGlPi0cSzT67L+Tm+GOJqvuk8gqHBziqcUQOarnuIax1z96/gJHCSIz2Z0zhxE6Rzwb3IZXPtFh51j+w==} - - '@deno/shim-deno@0.19.2': - resolution: {integrity: sha512-q3VTHl44ad8T2Tw2SpeAvghdGOjlnLPDNO2cpOxwMrBE/PVas6geWpbpIgrM+czOCH0yejp0yi8OaTuB+NU40Q==} - '@dependents/detective-less@5.0.1': resolution: {integrity: sha512-Y6+WUMsTFWE5jb20IFP4YGa5IrGY/+a/FbOSjDF/wz9gepU2hwCYSXRHP/vPwBvwcY3SVMASt4yXxbXNXigmZQ==} engines: {node: '>=18'} @@ -1856,34 +1389,15 @@ packages: resolution: {integrity: sha512-NKBGBSIKUG584qrS1tyxVpX/AKJKQw5HgjYEnPLC0QsTw79JrGn+qUr8CXFb955Iy7GUdiiUv1rJ6JBGvaKb6w==} engines: {node: '>=18'} - '@elysiajs/cors@1.4.0': - resolution: {integrity: sha512-pb0SCzBfFbFSYA/U40HHO7R+YrcXBJXOWgL20eSViK33ol1e20ru2/KUaZYo5IMUn63yaTJI/bQERuQ+77ND8g==} - peerDependencies: - elysia: '>= 1.4.0' - - '@elysiajs/node@1.4.2': - resolution: {integrity: sha512-zqeBAV4/faCcmIEjCp3g6jRwsbaWsd5HqmlEf3CirD9HkTWQNo4T+GN/qGZi7zgd84D3Kzxsny7ZTMXEfrDSXQ==} - peerDependencies: - elysia: '>= 1.4.0' - '@emnapi/core@1.4.5': resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==} - '@emnapi/runtime@1.4.5': - resolution: {integrity: sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==} - '@emnapi/runtime@1.7.0': resolution: {integrity: sha512-oAYoQnCYaQZKVS53Fq23ceWMRxq5EhQsE0x0RdQ55jT7wagMu5k+fS39v1fiSLrtrLQlXwVINenqhLMtTrV/1Q==} '@emnapi/wasi-threads@1.0.4': resolution: {integrity: sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g==} - '@esbuild/aix-ppc64@0.20.2': - resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [aix] - '@esbuild/aix-ppc64@0.25.4': resolution: {integrity: sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==} engines: {node: '>=18'} @@ -1902,11 +1416,11 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.20.2': - resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] + '@esbuild/aix-ppc64@0.27.2': + resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] '@esbuild/android-arm64@0.25.4': resolution: {integrity: sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==} @@ -1926,10 +1440,10 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm@0.20.2': - resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} - engines: {node: '>=12'} - cpu: [arm] + '@esbuild/android-arm64@0.27.2': + resolution: {integrity: sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==} + engines: {node: '>=18'} + cpu: [arm64] os: [android] '@esbuild/android-arm@0.25.4': @@ -1950,10 +1464,10 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-x64@0.20.2': - resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/android-arm@0.27.2': + resolution: {integrity: sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==} + engines: {node: '>=18'} + cpu: [arm] os: [android] '@esbuild/android-x64@0.25.4': @@ -1974,11 +1488,11 @@ packages: cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.20.2': - resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] + '@esbuild/android-x64@0.27.2': + resolution: {integrity: sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] '@esbuild/darwin-arm64@0.25.4': resolution: {integrity: sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==} @@ -1998,10 +1512,10 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.20.2': - resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/darwin-arm64@0.27.2': + resolution: {integrity: sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==} + engines: {node: '>=18'} + cpu: [arm64] os: [darwin] '@esbuild/darwin-x64@0.25.4': @@ -2022,11 +1536,11 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.20.2': - resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] + '@esbuild/darwin-x64@0.27.2': + resolution: {integrity: sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] '@esbuild/freebsd-arm64@0.25.4': resolution: {integrity: sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==} @@ -2046,10 +1560,10 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.20.2': - resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/freebsd-arm64@0.27.2': + resolution: {integrity: sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==} + engines: {node: '>=18'} + cpu: [arm64] os: [freebsd] '@esbuild/freebsd-x64@0.25.4': @@ -2070,11 +1584,11 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.20.2': - resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] + '@esbuild/freebsd-x64@0.27.2': + resolution: {integrity: sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] '@esbuild/linux-arm64@0.25.4': resolution: {integrity: sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==} @@ -2094,10 +1608,10 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.20.2': - resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} - engines: {node: '>=12'} - cpu: [arm] + '@esbuild/linux-arm64@0.27.2': + resolution: {integrity: sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==} + engines: {node: '>=18'} + cpu: [arm64] os: [linux] '@esbuild/linux-arm@0.25.4': @@ -2118,10 +1632,10 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.20.2': - resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} - engines: {node: '>=12'} - cpu: [ia32] + '@esbuild/linux-arm@0.27.2': + resolution: {integrity: sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==} + engines: {node: '>=18'} + cpu: [arm] os: [linux] '@esbuild/linux-ia32@0.25.4': @@ -2142,10 +1656,10 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.20.2': - resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} - engines: {node: '>=12'} - cpu: [loong64] + '@esbuild/linux-ia32@0.27.2': + resolution: {integrity: sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==} + engines: {node: '>=18'} + cpu: [ia32] os: [linux] '@esbuild/linux-loong64@0.25.4': @@ -2166,10 +1680,10 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.20.2': - resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} - engines: {node: '>=12'} - cpu: [mips64el] + '@esbuild/linux-loong64@0.27.2': + resolution: {integrity: sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==} + engines: {node: '>=18'} + cpu: [loong64] os: [linux] '@esbuild/linux-mips64el@0.25.4': @@ -2190,10 +1704,10 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.20.2': - resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} - engines: {node: '>=12'} - cpu: [ppc64] + '@esbuild/linux-mips64el@0.27.2': + resolution: {integrity: sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==} + engines: {node: '>=18'} + cpu: [mips64el] os: [linux] '@esbuild/linux-ppc64@0.25.4': @@ -2214,10 +1728,10 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.20.2': - resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} - engines: {node: '>=12'} - cpu: [riscv64] + '@esbuild/linux-ppc64@0.27.2': + resolution: {integrity: sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==} + engines: {node: '>=18'} + cpu: [ppc64] os: [linux] '@esbuild/linux-riscv64@0.25.4': @@ -2238,10 +1752,10 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.20.2': - resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} - engines: {node: '>=12'} - cpu: [s390x] + '@esbuild/linux-riscv64@0.27.2': + resolution: {integrity: sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==} + engines: {node: '>=18'} + cpu: [riscv64] os: [linux] '@esbuild/linux-s390x@0.25.4': @@ -2262,10 +1776,10 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.20.2': - resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/linux-s390x@0.27.2': + resolution: {integrity: sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==} + engines: {node: '>=18'} + cpu: [s390x] os: [linux] '@esbuild/linux-x64@0.25.4': @@ -2286,6 +1800,12 @@ packages: cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.27.2': + resolution: {integrity: sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-arm64@0.25.4': resolution: {integrity: sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==} engines: {node: '>=18'} @@ -2304,10 +1824,10 @@ packages: cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.20.2': - resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/netbsd-arm64@0.27.2': + resolution: {integrity: sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==} + engines: {node: '>=18'} + cpu: [arm64] os: [netbsd] '@esbuild/netbsd-x64@0.25.4': @@ -2328,6 +1848,12 @@ packages: cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.27.2': + resolution: {integrity: sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + '@esbuild/openbsd-arm64@0.25.4': resolution: {integrity: sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==} engines: {node: '>=18'} @@ -2346,10 +1872,10 @@ packages: cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.20.2': - resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/openbsd-arm64@0.27.2': + resolution: {integrity: sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==} + engines: {node: '>=18'} + cpu: [arm64] os: [openbsd] '@esbuild/openbsd-x64@0.25.4': @@ -2370,17 +1896,23 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.27.2': + resolution: {integrity: sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/openharmony-arm64@0.25.9': resolution: {integrity: sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.20.2': - resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] + '@esbuild/openharmony-arm64@0.27.2': + resolution: {integrity: sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] '@esbuild/sunos-x64@0.25.4': resolution: {integrity: sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==} @@ -2400,11 +1932,11 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.20.2': - resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] + '@esbuild/sunos-x64@0.27.2': + resolution: {integrity: sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] '@esbuild/win32-arm64@0.25.4': resolution: {integrity: sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==} @@ -2424,10 +1956,10 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.20.2': - resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} - engines: {node: '>=12'} - cpu: [ia32] + '@esbuild/win32-arm64@0.27.2': + resolution: {integrity: sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==} + engines: {node: '>=18'} + cpu: [arm64] os: [win32] '@esbuild/win32-ia32@0.25.4': @@ -2448,10 +1980,10 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.20.2': - resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/win32-ia32@0.27.2': + resolution: {integrity: sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==} + engines: {node: '>=18'} + cpu: [ia32] os: [win32] '@esbuild/win32-x64@0.25.4': @@ -2472,6 +2004,12 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.27.2': + resolution: {integrity: sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.7.0': resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2562,9 +2100,6 @@ packages: '@fastify/busboy@3.1.1': resolution: {integrity: sha512-5DGmA8FTdB2XbDeEwc/5ZXBl6UbBAyBOOLlPuBnZ/N1SwdH9Ii+cOX3tBROlDgcTXxjOYnLMVoKk9+FXAw0CJw==} - '@fastify/cors@11.2.0': - resolution: {integrity: sha512-LbLHBuSAdGdSFZYTLVA3+Ch2t+sA6nq3Ejc6XLAKiQ6ViS2qFnvicpj0htsx03FyYeLs04HfRNBsz/a8SvbcUw==} - '@fastify/error@4.2.0': resolution: {integrity: sha512-RSo3sVDXfHskiBZKBPRgnQTtIqpi/7zhJOEmAxCiBcM7d0uwdGdxLlsCaLzGs8v8NnxIRlfG0N51p5yFaOentQ==} @@ -2595,48 +2130,12 @@ packages: '@floating-ui/utils@0.2.10': resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==} - '@formatjs/ecma402-abstract@2.3.6': - resolution: {integrity: sha512-HJnTFeRM2kVFVr5gr5kH1XP6K0JcJtE7Lzvtr3FS/so5f1kpsqqqxy5JF+FRaO6H2qmcMfAUIox7AJteieRtVw==} - - '@formatjs/fast-memoize@2.2.7': - resolution: {integrity: sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ==} - - '@formatjs/icu-messageformat-parser@2.11.4': - resolution: {integrity: sha512-7kR78cRrPNB4fjGFZg3Rmj5aah8rQj9KPzuLsmcSn4ipLXQvC04keycTI1F7kJYDwIXtT2+7IDEto842CfZBtw==} - - '@formatjs/icu-skeleton-parser@1.8.16': - resolution: {integrity: sha512-H13E9Xl+PxBd8D5/6TVUluSpxGNvFSlN/b3coUp0e0JpuWXXnQDiavIpY3NnvSp4xhEMoXyyBvVfdFX8jglOHQ==} - - '@formatjs/intl-localematcher@0.5.10': - resolution: {integrity: sha512-af3qATX+m4Rnd9+wHcjJ4w2ijq+rAVP3CCinJQvFv1kgSu1W6jypUmvleJxcewdxmutM8dmIRZFxO/IQBZmP2Q==} - '@formatjs/intl-localematcher@0.6.1': resolution: {integrity: sha512-ePEgLgVCqi2BBFnTMWPfIghu6FkbZnnBVhO2sSxvLfrdFw7wCHAHiDoM2h4NRgjbaY7+B7HgOLZGkK187pZTZg==} - '@formatjs/intl-localematcher@0.6.2': - resolution: {integrity: sha512-XOMO2Hupl0wdd172Y06h6kLpBz6Dv+J4okPLl4LPtzbr8f66WbIoy4ev98EBuZ6ZK4h5ydTN6XneT4QVpD7cdA==} - '@hexagon/base64@1.1.28': resolution: {integrity: sha512-lhqDEAvWixy3bZ+UOYbPwUbBkwBq5C1LAJ/xPC8Oi+lL54oyakv/npbA0aU2hgCsx/1NUd4IBvV03+aUBWxerw==} - '@hono/clerk-auth@2.0.1': - resolution: {integrity: sha512-tc59vpU022NgM4AHHI+r0FIext6slHEXsZaRcMNfllTnN2gkcNmSNCrAH04lLmGr9Lfb/RmpATefgW+6/cnuNA==} - engines: {node: '>=16.x.x'} - peerDependencies: - '@clerk/backend': ^1.0.0 - hono: '>=3.*' - - '@hono/node-server@1.19.7': - resolution: {integrity: sha512-vUcD0uauS7EU2caukW8z5lJKtoGMokxNbJtBiwHgpqxEXokaHCBkQUmCHhjFB1VUTWdqj25QoMkMKzgjq+uhrw==} - engines: {node: '>=18.14.1'} - peerDependencies: - hono: ^4 - - '@hookform/resolvers@5.2.2': - resolution: {integrity: sha512-A/IxlMLShx3KjV/HeTcTfaMxdwy690+L/ZADoeaTltLx+CVuzkeVIPuybK3jrRfw7YZnmdKsVVHAlEPIAEUNlA==} - peerDependencies: - react-hook-form: ^7.55.0 - '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -2670,107 +2169,38 @@ packages: resolution: {integrity: sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==} engines: {node: '>=18'} - '@img/sharp-darwin-arm64@0.33.5': - resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [darwin] - - '@img/sharp-darwin-arm64@0.34.3': - resolution: {integrity: sha512-ryFMfvxxpQRsgZJqBd4wsttYQbCxsJksrv9Lw/v798JcQ8+w84mBWuXwl+TT0WJ/WrYOLaYpwQXi3sA9nTIaIg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [darwin] - '@img/sharp-darwin-arm64@0.34.5': resolution: {integrity: sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [darwin] - '@img/sharp-darwin-x64@0.33.5': - resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [darwin] - - '@img/sharp-darwin-x64@0.34.3': - resolution: {integrity: sha512-yHpJYynROAj12TA6qil58hmPmAwxKKC7reUqtGLzsOHfP7/rniNGTL8tjWX6L3CTV4+5P4ypcS7Pp+7OB+8ihA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [darwin] - '@img/sharp-darwin-x64@0.34.5': resolution: {integrity: sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [darwin] - '@img/sharp-libvips-darwin-arm64@1.0.4': - resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} - cpu: [arm64] - os: [darwin] - - '@img/sharp-libvips-darwin-arm64@1.2.0': - resolution: {integrity: sha512-sBZmpwmxqwlqG9ueWFXtockhsxefaV6O84BMOrhtg/YqbTaRdqDE7hxraVE3y6gVM4eExmfzW4a8el9ArLeEiQ==} - cpu: [arm64] - os: [darwin] - '@img/sharp-libvips-darwin-arm64@1.2.4': resolution: {integrity: sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==} cpu: [arm64] os: [darwin] - '@img/sharp-libvips-darwin-x64@1.0.4': - resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} - cpu: [x64] - os: [darwin] - - '@img/sharp-libvips-darwin-x64@1.2.0': - resolution: {integrity: sha512-M64XVuL94OgiNHa5/m2YvEQI5q2cl9d/wk0qFTDVXcYzi43lxuiFTftMR1tOnFQovVXNZJ5TURSDK2pNe9Yzqg==} - cpu: [x64] - os: [darwin] - '@img/sharp-libvips-darwin-x64@1.2.4': resolution: {integrity: sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==} cpu: [x64] os: [darwin] - '@img/sharp-libvips-linux-arm64@1.0.4': - resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} - cpu: [arm64] - os: [linux] - - '@img/sharp-libvips-linux-arm64@1.2.0': - resolution: {integrity: sha512-RXwd0CgG+uPRX5YYrkzKyalt2OJYRiJQ8ED/fi1tq9WQW2jsQIn0tqrlR5l5dr/rjqq6AHAxURhj2DVjyQWSOA==} - cpu: [arm64] - os: [linux] - '@img/sharp-libvips-linux-arm64@1.2.4': resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==} cpu: [arm64] os: [linux] - '@img/sharp-libvips-linux-arm@1.0.5': - resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} - cpu: [arm] - os: [linux] - - '@img/sharp-libvips-linux-arm@1.2.0': - resolution: {integrity: sha512-mWd2uWvDtL/nvIzThLq3fr2nnGfyr/XMXlq8ZJ9WMR6PXijHlC3ksp0IpuhK6bougvQrchUAfzRLnbsen0Cqvw==} - cpu: [arm] - os: [linux] - '@img/sharp-libvips-linux-arm@1.2.4': resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} cpu: [arm] os: [linux] - '@img/sharp-libvips-linux-ppc64@1.2.0': - resolution: {integrity: sha512-Xod/7KaDDHkYu2phxxfeEPXfVXFKx70EAFZ0qyUdOjCcxbjqyJOEUpDe6RIyaunGxT34Anf9ue/wuWOqBW2WcQ==} - cpu: [ppc64] - os: [linux] - '@img/sharp-libvips-linux-ppc64@1.2.4': resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} cpu: [ppc64] @@ -2781,108 +2211,38 @@ packages: cpu: [riscv64] os: [linux] - '@img/sharp-libvips-linux-s390x@1.0.4': - resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} - cpu: [s390x] - os: [linux] - - '@img/sharp-libvips-linux-s390x@1.2.0': - resolution: {integrity: sha512-eMKfzDxLGT8mnmPJTNMcjfO33fLiTDsrMlUVcp6b96ETbnJmd4uvZxVJSKPQfS+odwfVaGifhsB07J1LynFehw==} - cpu: [s390x] - os: [linux] - '@img/sharp-libvips-linux-s390x@1.2.4': resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==} cpu: [s390x] os: [linux] - '@img/sharp-libvips-linux-x64@1.0.4': - resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} - cpu: [x64] - os: [linux] - - '@img/sharp-libvips-linux-x64@1.2.0': - resolution: {integrity: sha512-ZW3FPWIc7K1sH9E3nxIGB3y3dZkpJlMnkk7z5tu1nSkBoCgw2nSRTFHI5pB/3CQaJM0pdzMF3paf9ckKMSE9Tg==} - cpu: [x64] - os: [linux] - '@img/sharp-libvips-linux-x64@1.2.4': resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==} cpu: [x64] os: [linux] - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': - resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} - cpu: [arm64] - os: [linux] - - '@img/sharp-libvips-linuxmusl-arm64@1.2.0': - resolution: {integrity: sha512-UG+LqQJbf5VJ8NWJ5Z3tdIe/HXjuIdo4JeVNADXBFuG7z9zjoegpzzGIyV5zQKi4zaJjnAd2+g2nna8TZvuW9Q==} - cpu: [arm64] - os: [linux] - '@img/sharp-libvips-linuxmusl-arm64@1.2.4': resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==} cpu: [arm64] os: [linux] - '@img/sharp-libvips-linuxmusl-x64@1.0.4': - resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} - cpu: [x64] - os: [linux] - - '@img/sharp-libvips-linuxmusl-x64@1.2.0': - resolution: {integrity: sha512-SRYOLR7CXPgNze8akZwjoGBoN1ThNZoqpOgfnOxmWsklTGVfJiGJoC/Lod7aNMGA1jSsKWM1+HRX43OP6p9+6Q==} - cpu: [x64] - os: [linux] - '@img/sharp-libvips-linuxmusl-x64@1.2.4': resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==} cpu: [x64] os: [linux] - '@img/sharp-linux-arm64@0.33.5': - resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [linux] - - '@img/sharp-linux-arm64@0.34.3': - resolution: {integrity: sha512-QdrKe3EvQrqwkDrtuTIjI0bu6YEJHTgEeqdzI3uWJOH6G1O8Nl1iEeVYRGdj1h5I21CqxSvQp1Yv7xeU3ZewbA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [linux] - '@img/sharp-linux-arm64@0.34.5': resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - '@img/sharp-linux-arm@0.33.5': - resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm] - os: [linux] - - '@img/sharp-linux-arm@0.34.3': - resolution: {integrity: sha512-oBK9l+h6KBN0i3dC8rYntLiVfW8D8wH+NPNT3O/WBHeW0OQWCjfWksLUaPidsrDKpJgXp3G3/hkmhptAW0I3+A==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm] - os: [linux] - '@img/sharp-linux-arm@0.34.5': resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm] os: [linux] - '@img/sharp-linux-ppc64@0.34.3': - resolution: {integrity: sha512-GLtbLQMCNC5nxuImPR2+RgrviwKwVql28FWZIW1zWruy6zLgA5/x2ZXk3mxj58X/tszVF69KK0Is83V8YgWhLA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [ppc64] - os: [linux] - '@img/sharp-linux-ppc64@0.34.5': resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -2895,135 +2255,47 @@ packages: cpu: [riscv64] os: [linux] - '@img/sharp-linux-s390x@0.33.5': - resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [s390x] - os: [linux] - - '@img/sharp-linux-s390x@0.34.3': - resolution: {integrity: sha512-3gahT+A6c4cdc2edhsLHmIOXMb17ltffJlxR0aC2VPZfwKoTGZec6u5GrFgdR7ciJSsHT27BD3TIuGcuRT0KmQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [s390x] - os: [linux] - '@img/sharp-linux-s390x@0.34.5': resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [s390x] os: [linux] - '@img/sharp-linux-x64@0.33.5': - resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [linux] - - '@img/sharp-linux-x64@0.34.3': - resolution: {integrity: sha512-8kYso8d806ypnSq3/Ly0QEw90V5ZoHh10yH0HnrzOCr6DKAPI6QVHvwleqMkVQ0m+fc7EH8ah0BB0QPuWY6zJQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [linux] - '@img/sharp-linux-x64@0.34.5': resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - '@img/sharp-linuxmusl-arm64@0.33.5': - resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [linux] - - '@img/sharp-linuxmusl-arm64@0.34.3': - resolution: {integrity: sha512-vAjbHDlr4izEiXM1OTggpCcPg9tn4YriK5vAjowJsHwdBIdx0fYRsURkxLG2RLm9gyBq66gwtWI8Gx0/ov+JKQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [linux] - '@img/sharp-linuxmusl-arm64@0.34.5': resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - '@img/sharp-linuxmusl-x64@0.33.5': - resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [linux] - - '@img/sharp-linuxmusl-x64@0.34.3': - resolution: {integrity: sha512-gCWUn9547K5bwvOn9l5XGAEjVTTRji4aPTqLzGXHvIr6bIDZKNTA34seMPgM0WmSf+RYBH411VavCejp3PkOeQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [linux] - '@img/sharp-linuxmusl-x64@0.34.5': resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - '@img/sharp-wasm32@0.33.5': - resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [wasm32] - - '@img/sharp-wasm32@0.34.3': - resolution: {integrity: sha512-+CyRcpagHMGteySaWos8IbnXcHgfDn7pO2fiC2slJxvNq9gDipYBN42/RagzctVRKgxATmfqOSulgZv5e1RdMg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [wasm32] - '@img/sharp-wasm32@0.34.5': resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [wasm32] - '@img/sharp-win32-arm64@0.34.3': - resolution: {integrity: sha512-MjnHPnbqMXNC2UgeLJtX4XqoVHHlZNd+nPt1kRPmj63wURegwBhZlApELdtxM2OIZDRv/DFtLcNhVbd1z8GYXQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [win32] - '@img/sharp-win32-arm64@0.34.5': resolution: {integrity: sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [win32] - '@img/sharp-win32-ia32@0.33.5': - resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [ia32] - os: [win32] - - '@img/sharp-win32-ia32@0.34.3': - resolution: {integrity: sha512-xuCdhH44WxuXgOM714hn4amodJMZl3OEvf0GVTm0BEyMeA2to+8HEdRPShH0SLYptJY1uBw+SCFP9WVQi1Q/cw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [ia32] - os: [win32] - '@img/sharp-win32-ia32@0.34.5': resolution: {integrity: sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [ia32] os: [win32] - '@img/sharp-win32-x64@0.33.5': - resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [win32] - - '@img/sharp-win32-x64@0.34.3': - resolution: {integrity: sha512-OWwz05d++TxzLEv4VnsTz5CmZ6mI6S05sfQGEMrNrQcOEERbX46332IvE7pO/EUiw7jUrrS40z/M7kPyjfl04g==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [win32] - '@img/sharp-win32-x64@0.34.5': resolution: {integrity: sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -3280,12 +2552,12 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@knocklabs/node@1.19.0': - resolution: {integrity: sha512-akSKCKJlZGITemTD1lvkHvIf4knL0D3NHaL7h5gOj6Oq0dVceOVYTujHhiSe4H4GB2bKWVjPVEBMs0THWMmFTA==} - '@levischuck/tiny-cbor@0.2.11': resolution: {integrity: sha512-llBRm4dT4Z89aRsm6u2oEZ8tfwL/2l6BwpZ7JcyieouniDECM5AqNgr/y08zalEIvW3RSK4upYyybDcmjXqAow==} + '@loaderkit/resolve@1.0.4': + resolution: {integrity: sha512-rJzYKVcV4dxJv+vW6jlvagF8zvGxHJ2+HTr1e2qOejfmGhAApgJHl8Aog4mMszxceTRiKTTbnpgmTO1bEZHV/A==} + '@mapbox/node-pre-gyp@2.0.0': resolution: {integrity: sha512-llMXd39jtP0HpQLVI37Bf1m2ADlEb35GYSh1SDSLsBhR+5iCxiNGlT31yqbNtVHygHAtMy6dWFERpU2JgufhPg==} engines: {node: '>=18'} @@ -3294,9 +2566,6 @@ packages: '@mdx-js/mdx@3.1.0': resolution: {integrity: sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==} - '@mjackson/node-fetch-server@0.2.0': - resolution: {integrity: sha512-EMlH1e30yzmTpGLQjlFmaDAjyOeZhng1/XCd7DExR8PNAnG/G1tyruZxEoUe11ClnwGhGrtsdnyyUx1frSzjng==} - '@modelcontextprotocol/sdk@1.17.2': resolution: {integrity: sha512-EFLRNXR/ixpXQWu6/3Cu30ndDFIFNaqUXcTqsGebujeMan9FzhAaFFswLRiFj61rgygDRr8WO1N+UijjgRxX9g==} engines: {node: '>=18'} @@ -3347,113 +2616,53 @@ packages: engines: {node: '>=18.14.0'} hasBin: true - '@next/env@15.2.1': - resolution: {integrity: sha512-JmY0qvnPuS2NCWOz2bbby3Pe0VzdAQ7XpEB6uLIHmtXNfAsAO0KLQLkuAoc42Bxbo3/jMC3dcn9cdf+piCcG2Q==} - - '@next/env@15.2.3': - resolution: {integrity: sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw==} - '@next/env@15.3.4': resolution: {integrity: sha512-ZkdYzBseS6UjYzz6ylVKPOK+//zLWvD6Ta+vpoye8cW11AjiQjGYVibF0xuvT4L0iJfAPfZLFidaEzAOywyOAQ==} - '@next/env@15.4.1': - resolution: {integrity: sha512-DXQwFGAE2VH+f2TJsKepRXpODPU+scf5fDbKOME8MMyeyswe4XwgRdiiIYmBfkXU+2ssliLYznajTrOQdnLR5A==} + '@next/env@16.1.1': + resolution: {integrity: sha512-3oxyM97Sr2PqiVyMyrZUtrtM3jqqFxOQJVuKclDsgj/L728iZt/GyslkN4NwarledZATCenbk4Offjk1hQmaAA==} '@next/eslint-plugin-next@15.1.4': resolution: {integrity: sha512-HwlEXwCK3sr6zmVGEvWBjW9tBFs1Oe6hTmTLoFQtpm4As5HCdu8jfSE0XJOp7uhfEGLniIx8yrGxEWwNnY0fmQ==} - '@next/eslint-plugin-next@15.2.1': - resolution: {integrity: sha512-6ppeToFd02z38SllzWxayLxjjNfzvc7Wm07gQOKSLjyASvKcXjNStZrLXMHuaWkhjqxe+cnhb2uzfWXm1VEj/Q==} - - '@next/eslint-plugin-next@15.2.3': - resolution: {integrity: sha512-eNSOIMJtjs+dp4Ms1tB1PPPJUQHP3uZK+OQ7iFY9qXpGO6ojT6imCL+KcUOqE/GXGidWbBZJzYdgAdPHqeCEPA==} + '@next/eslint-plugin-next@15.3.1': + resolution: {integrity: sha512-oEs4dsfM6iyER3jTzMm4kDSbrQJq8wZw5fmT6fg2V3SMo+kgG+cShzLfEV20senZzv8VF+puNLheiGPlBGsv2A==} '@next/eslint-plugin-next@15.3.4': resolution: {integrity: sha512-lBxYdj7TI8phbJcLSAqDt57nIcobEign5NYIKCiy0hXQhrUbTqLqOaSDi568U6vFg4hJfBdZYsG4iP/uKhCqgg==} - '@next/eslint-plugin-next@15.4.1': - resolution: {integrity: sha512-lQnHUxN7mMksK7IxgKDIXNMWFOBmksVrjamMEURXiYfo7zgsc30lnU8u4y/MJktSh+nB80ktTQeQbWdQO6c8Ow==} - - '@next/swc-darwin-arm64@15.2.1': - resolution: {integrity: sha512-aWXT+5KEREoy3K5AKtiKwioeblmOvFFjd+F3dVleLvvLiQ/mD//jOOuUcx5hzcO9ISSw4lrqtUPntTpK32uXXQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - - '@next/swc-darwin-arm64@15.2.3': - resolution: {integrity: sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - '@next/swc-darwin-arm64@15.3.4': resolution: {integrity: sha512-z0qIYTONmPRbwHWvpyrFXJd5F9YWLCsw3Sjrzj2ZvMYy9NPQMPZ1NjOJh4ojr4oQzcGYwgJKfidzehaNa1BpEg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-arm64@15.4.1': - resolution: {integrity: sha512-L+81yMsiHq82VRXS2RVq6OgDwjvA4kDksGU8hfiDHEXP+ncKIUhUsadAVB+MRIp2FErs/5hpXR0u2eluWPAhig==} + '@next/swc-darwin-arm64@16.1.1': + resolution: {integrity: sha512-JS3m42ifsVSJjSTzh27nW+Igfha3NdBOFScr9C80hHGrWx55pTrVL23RJbqir7k7/15SKlrLHhh/MQzqBBYrQA==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@15.2.1': - resolution: {integrity: sha512-E/w8ervu4fcG5SkLhvn1NE/2POuDCDEy5gFbfhmnYXkyONZR68qbUlJlZwuN82o7BrBVAw+tkR8nTIjGiMW1jQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - - '@next/swc-darwin-x64@15.2.3': - resolution: {integrity: sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - '@next/swc-darwin-x64@15.3.4': resolution: {integrity: sha512-Z0FYJM8lritw5Wq+vpHYuCIzIlEMjewG2aRkc3Hi2rcbULknYL/xqfpBL23jQnCSrDUGAo/AEv0Z+s2bff9Zkw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-darwin-x64@15.4.1': - resolution: {integrity: sha512-jfz1RXu6SzL14lFl05/MNkcN35lTLMJWPbqt7Xaj35+ZWAX342aePIJrN6xBdGeKl6jPXJm0Yqo3Xvh3Gpo3Uw==} + '@next/swc-darwin-x64@16.1.1': + resolution: {integrity: sha512-hbyKtrDGUkgkyQi1m1IyD3q4I/3m9ngr+V93z4oKHrPcmxwNL5iMWORvLSGAf2YujL+6HxgVvZuCYZfLfb4bGw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@15.2.1': - resolution: {integrity: sha512-gXDX5lIboebbjhiMT6kFgu4svQyjoSed6dHyjx5uZsjlvTwOAnZpn13w9XDaIMFFHw7K8CpBK7HfDKw0VZvUXQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@next/swc-linux-arm64-gnu@15.2.3': - resolution: {integrity: sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - '@next/swc-linux-arm64-gnu@15.3.4': resolution: {integrity: sha512-l8ZQOCCg7adwmsnFm8m5q9eIPAHdaB2F3cxhufYtVo84pymwKuWfpYTKcUiFcutJdp9xGHC+F1Uq3xnFU1B/7g==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-gnu@15.4.1': - resolution: {integrity: sha512-k0tOFn3dsnkaGfs6iQz8Ms6f1CyQe4GacXF979sL8PNQxjYS1swx9VsOyUQYaPoGV8nAZ7OX8cYaeiXGq9ahPQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@next/swc-linux-arm64-musl@15.2.1': - resolution: {integrity: sha512-3v0pF/adKZkBWfUffmB/ROa+QcNTrnmYG4/SS+r52HPwAK479XcWoES2I+7F7lcbqc7mTeVXrIvb4h6rR/iDKg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@next/swc-linux-arm64-musl@15.2.3': - resolution: {integrity: sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q==} + '@next/swc-linux-arm64-gnu@16.1.1': + resolution: {integrity: sha512-/fvHet+EYckFvRLQ0jPHJCUI5/B56+2DpI1xDSvi80r/3Ez+Eaa2Yq4tJcRTaB1kqj/HrYKn8Yplm9bNoMJpwQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -3464,44 +2673,20 @@ packages: cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@15.4.1': - resolution: {integrity: sha512-4ogGQ/3qDzbbK3IwV88ltihHFbQVq6Qr+uEapzXHXBH1KsVBZOB50sn6BWHPcFjwSoMX2Tj9eH/fZvQnSIgc3g==} + '@next/swc-linux-arm64-musl@16.1.1': + resolution: {integrity: sha512-MFHrgL4TXNQbBPzkKKur4Fb5ICEJa87HM7fczFs2+HWblM7mMLdco3dvyTI+QmLBU9xgns/EeeINSZD6Ar+oLg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-x64-gnu@15.2.1': - resolution: {integrity: sha512-RbsVq2iB6KFJRZ2cHrU67jLVLKeuOIhnQB05ygu5fCNgg8oTewxweJE8XlLV+Ii6Y6u4EHwETdUiRNXIAfpBww==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@next/swc-linux-x64-gnu@15.2.3': - resolution: {integrity: sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - '@next/swc-linux-x64-gnu@15.3.4': resolution: {integrity: sha512-gEbH9rv9o7I12qPyvZNVTyP/PWKqOp8clvnoYZQiX800KkqsaJZuOXkWgMa7ANCCh/oEN2ZQheh3yH8/kWPSEg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-gnu@15.4.1': - resolution: {integrity: sha512-Jj0Rfw3wIgp+eahMz/tOGwlcYYEFjlBPKU7NqoOkTX0LY45i5W0WcDpgiDWSLrN8KFQq/LW7fZq46gxGCiOYlQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@next/swc-linux-x64-musl@15.2.1': - resolution: {integrity: sha512-QHsMLAyAIu6/fWjHmkN/F78EFPKmhQlyX5C8pRIS2RwVA7z+t9cTb0IaYWC3EHLOTjsU7MNQW+n2xGXr11QPpg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@next/swc-linux-x64-musl@15.2.3': - resolution: {integrity: sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg==} + '@next/swc-linux-x64-gnu@16.1.1': + resolution: {integrity: sha512-20bYDfgOQAPUkkKBnyP9PTuHiJGM7HzNBbuqmD0jiFVZ0aOldz+VnJhbxzjcSabYsnNjMPsE0cyzEudpYxsrUQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -3512,56 +2697,32 @@ packages: cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@15.4.1': - resolution: {integrity: sha512-9WlEZfnw1vFqkWsTMzZDgNL7AUI1aiBHi0S2m8jvycPyCq/fbZjtE/nDkhJRYbSjXbtRHYLDBlmP95kpjEmJbw==} + '@next/swc-linux-x64-musl@16.1.1': + resolution: {integrity: sha512-9pRbK3M4asAHQRkwaXwu601oPZHghuSC8IXNENgbBSyImHv/zY4K5udBusgdHkvJ/Tcr96jJwQYOll0qU8+fPA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-win32-arm64-msvc@15.2.1': - resolution: {integrity: sha512-Gk42XZXo1cE89i3hPLa/9KZ8OuupTjkDmhLaMKFohjf9brOeZVEa3BQy1J9s9TWUqPhgAEbwv6B2+ciGfe54Vw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - - '@next/swc-win32-arm64-msvc@15.2.3': - resolution: {integrity: sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - '@next/swc-win32-arm64-msvc@15.3.4': resolution: {integrity: sha512-ay5+qADDN3rwRbRpEhTOreOn1OyJIXS60tg9WMYTWCy3fB6rGoyjLVxc4dR9PYjEdR2iDYsaF5h03NA+XuYPQQ==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-arm64-msvc@15.4.1': - resolution: {integrity: sha512-WodRbZ9g6CQLRZsG3gtrA9w7Qfa9BwDzhFVdlI6sV0OCPq9JrOrJSp9/ioLsezbV8w9RCJ8v55uzJuJ5RgWLZg==} + '@next/swc-win32-arm64-msvc@16.1.1': + resolution: {integrity: sha512-bdfQkggaLgnmYrFkSQfsHfOhk/mCYmjnrbRCGgkMcoOBZ4n+TRRSLmT/CU5SATzlBJ9TpioUyBW/vWFXTqQRiA==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-x64-msvc@15.2.1': - resolution: {integrity: sha512-YjqXCl8QGhVlMR8uBftWk0iTmvtntr41PhG1kvzGp0sUP/5ehTM+cwx25hKE54J0CRnHYjSGjSH3gkHEaHIN9g==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - - '@next/swc-win32-x64-msvc@15.2.3': - resolution: {integrity: sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - '@next/swc-win32-x64-msvc@15.3.4': resolution: {integrity: sha512-4kDt31Bc9DGyYs41FTL1/kNpDeHyha2TC0j5sRRoKCyrhNcfZ/nRQkAUlF27mETwm8QyHqIjHJitfcza2Iykfg==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@next/swc-win32-x64-msvc@15.4.1': - resolution: {integrity: sha512-y+wTBxelk2xiNofmDOVU7O5WxTHcvOoL3srOM0kxTzKDjQ57kPU0tpnPJ/BWrRnsOwXEv0+3QSbGR7hY4n9LkQ==} + '@next/swc-win32-x64-msvc@16.1.1': + resolution: {integrity: sha512-Ncwbw2WJ57Al5OX0k4chM68DKhEPlrXBaSXDCi2kPi5f4d8b3ejr3RRJGfKBLrn2YJL5ezNS7w2TZLHSti8CMw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -3633,9 +2794,6 @@ packages: '@oxc-project/types@0.82.3': resolution: {integrity: sha512-6nCUxBnGX0c6qfZW5MaF6/fmu5dHJDMiMPaioKHKs5mi5+8/FHQ7WGjgQIz1zxpmceMYfdIXkOaLYE+ejbuOtA==} - '@paralleldrive/cuid2@2.3.1': - resolution: {integrity: sha512-XO7cAxhnTZl0Yggq6jOgjiOHhbgcO4NqFqwSmQpjK3b6TEE6Uj/jfSk6wzYyemh3+I0sHirKSetjQwn5cZktFw==} - '@parcel/watcher-android-arm64@2.5.1': resolution: {integrity: sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==} engines: {node: '>= 10.0.0'} @@ -3692,15 +2850,9 @@ packages: '@parcel/watcher-linux-x64-musl@2.5.1': resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [linux] - - '@parcel/watcher-wasm@2.3.0': - resolution: {integrity: sha512-ejBAX8H0ZGsD8lSICDNyMbSEtPMWgDL0WFCt/0z7hyf5v8Imz4rAM8xY379mBsECkq/Wdqa5WEDLqtjZ+6NxfA==} - engines: {node: '>= 10.0.0'} - bundledDependencies: - - napi-wasm + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] '@parcel/watcher-wasm@2.5.1': resolution: {integrity: sha512-RJxlQQLkaMMIuWRozy+z2vEqbaQlCuaCgVZIUCzQLYggY22LZbP5Y1+ia+FD724Ids9e+XIyOLXLrLgQSHIthw==} @@ -3745,18 +2897,6 @@ packages: '@peculiar/asn1-x509@2.4.0': resolution: {integrity: sha512-F7mIZY2Eao2TaoVqigGMLv+NDdpwuBKU1fucHPONfzaBS4JXXCNCmfO0Z3dsy7JzKGqtDcYC1mr9JjaZQZNiuw==} - '@peculiar/json-schema@1.1.12': - resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==} - engines: {node: '>=8.0.0'} - - '@peculiar/webcrypto@1.4.1': - resolution: {integrity: sha512-eK4C6WTNYxoI7JOabMoZICiyqRRtJB220bh0Mbj5RwRycleZf9BPyZoxsTvpP0FpmVS2aS13NKOuh5/tN3sIRw==} - engines: {node: '>=10.12.0'} - - '@peculiar/webcrypto@1.5.0': - resolution: {integrity: sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==} - engines: {node: '>=10.12.0'} - '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -3774,8 +2914,8 @@ packages: '@poppinss/exception@1.2.2': resolution: {integrity: sha512-m7bpKCD4QMlFCjA/nKTs23fuvoVFoA83brRKmObCUNmi/9tVu8Ve3w4YQAnJu4q3Tjf5fr685HYIC/IA2zHRSg==} - '@quansync/fs@1.0.0': - resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} + '@radix-ui/colors@3.0.0': + resolution: {integrity: sha512-FUOsGBkHrYJwCSEtWRCIfQbZG7q1e6DgxCIOe1SUQzDe/7rXXeA47s8yCn6fuTNQAj1Zq4oTFi9Yjp3wzElcxg==} '@radix-ui/number@1.1.1': resolution: {integrity: sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==} @@ -3786,6 +2926,19 @@ packages: '@radix-ui/primitive@1.1.3': resolution: {integrity: sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==} + '@radix-ui/react-accessible-icon@1.1.7': + resolution: {integrity: sha512-XM+E4WXl0OqUJFovy6GjmxxFyx9opfCAIUku4dlKRd5YEPqt4kALOkQOp0Of6reHuUkJuiPBEc5k0o4z4lTC8A==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-accordion@1.2.11': resolution: {integrity: sha512-l3W5D54emV2ues7jjeG1xcyN7S3jnK3zE2zHqgn0CmMsy9lNJwmgcrmaxS+7ipw15FAivzKNzH3d5EcGoFKw0A==} peerDependencies: @@ -3799,6 +2952,32 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-accordion@1.2.12': + resolution: {integrity: sha512-T4nygeh9YE9dLRPhAHSeOZi7HBXo+0kYIPJXayZfvWOWA0+n3dESrZbjfDPUABkUNym6Hd+f2IR113To8D2GPA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-alert-dialog@1.1.15': + resolution: {integrity: sha512-oTVLkEw5GpdRe29BqJ0LSDFWI3qu0vR1M0mUkOQWDIUnY/QIkLpgDMWuKxP94c2NAC2LGcgVhG1ImF3jkZ5wXw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-arrow@1.1.7': resolution: {integrity: sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==} peerDependencies: @@ -3812,8 +2991,34 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-avatar@1.1.11': - resolution: {integrity: sha512-0Qk603AHGV28BOBO34p7IgD5m+V5Sg/YovfayABkoDDBM5d3NCx0Mp4gGrjzLGes1jV5eNOE1r3itqOR33VC6Q==} + '@radix-ui/react-aspect-ratio@1.1.7': + resolution: {integrity: sha512-Yq6lvO9HQyPwev1onK1daHCHqXVLzPhSVjmsNjCa2Zcxy2f7uJD2itDtxknv6FzAKCwD1qQkeVDmX/cev13n/g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-avatar@1.1.10': + resolution: {integrity: sha512-V8piFfWapM5OmNCXTzVQY+E1rDa53zY+MQ4Y7356v4fFz6vqCyUtIz2rUD44ZEdwg78/jKmMJHj07+C/Z/rcog==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-checkbox@1.3.3': + resolution: {integrity: sha512-wBbpv+NQftHDdG86Qc0pIyXk5IR3tM8Vd0nWLKDcX8nNn4nXFOFwsKuqw2okA/1D/mpaAkmuyndrPJTYDNZtFw==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -3873,17 +3078,21 @@ packages: '@types/react': optional: true - '@radix-ui/react-context@1.1.2': - resolution: {integrity: sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==} + '@radix-ui/react-context-menu@2.2.16': + resolution: {integrity: sha512-O8morBEW+HsVG28gYDZPTrT9UUovQUlJue5YO836tiTJhuIWBm/zQHc7j388sHWtdH/xUZurK9olD2+pcqx5ww==} peerDependencies: '@types/react': '*' + '@types/react-dom': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true + '@types/react-dom': + optional: true - '@radix-ui/react-context@1.1.3': - resolution: {integrity: sha512-ieIFACdMpYfMEjF0rEf5KLvfVyIkOz6PDGyNnP+u+4xQ6jny3VCgA4OgXOwNx2aUkxn8zx9fiVcM8CfFYv9Lxw==} + '@radix-ui/react-context@1.1.2': + resolution: {integrity: sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==} peerDependencies: '@types/react': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc @@ -3965,26 +3174,235 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-focus-guards@1.1.2': - resolution: {integrity: sha512-fyjAACV62oPV925xFCrH8DR5xWhg9KYtJT4s3u54jxp+L/hbpTY2kIeEFFbFe+a/HCE94zGQMZLIpVTPVZDhaA==} + '@radix-ui/react-focus-guards@1.1.2': + resolution: {integrity: sha512-fyjAACV62oPV925xFCrH8DR5xWhg9KYtJT4s3u54jxp+L/hbpTY2kIeEFFbFe+a/HCE94zGQMZLIpVTPVZDhaA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-focus-guards@1.1.3': + resolution: {integrity: sha512-0rFg/Rj2Q62NCm62jZw0QX7a3sz6QCQU0LpZdNrJX8byRGaGVTqbrW9jAoIAHyMQqsNpeZ81YgSizOt5WXq0Pw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-focus-scope@1.1.7': + resolution: {integrity: sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-form@0.1.8': + resolution: {integrity: sha512-QM70k4Zwjttifr5a4sZFts9fn8FzHYvQ5PiB19O2HsYibaHSVt9fH9rzB0XZo/YcM+b7t/p7lYCT/F5eOeF5yQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-hover-card@1.1.15': + resolution: {integrity: sha512-qgTkjNT1CfKMoP0rcasmlH2r1DAiYicWsDsufxl940sT2wHNEWWv6FMWIQXWhVdmC1d/HYfbhQx60KYyAtKxjg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-icons@1.3.2': + resolution: {integrity: sha512-fyQIhGDhzfc9pK2kH6Pl9c4BDJGfMkPqkyIgYDthyNYoNg3wVhoJMMh19WS4Up/1KMPFVpNsT2q3WmXn2N1m6g==} + peerDependencies: + react: ^16.x || ^17.x || ^18.x || ^19.0.0 || ^19.0.0-rc + + '@radix-ui/react-id@1.1.1': + resolution: {integrity: sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-label@2.1.7': + resolution: {integrity: sha512-YT1GqPSL8kJn20djelMX7/cTRp/Y9w5IZHvfxQTVHrOqa2yMl7i/UfMqKRU5V7mEyKTrUVgJXhNQPVCG8PBLoQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-menu@2.1.16': + resolution: {integrity: sha512-72F2T+PLlphrqLcAotYPp0uJMr5SjP5SL01wfEspJbru5Zs5vQaSHb4VB3ZMJPimgHHCHG7gMOeOB9H3Hdmtxg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-menubar@1.1.16': + resolution: {integrity: sha512-EB1FktTz5xRRi2Er974AUQZWg2yVBb1yjip38/lgwtCVRd3a+maUoGHN/xs9Yv8SY8QwbSEb+YrxGadVWbEutA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-navigation-menu@1.2.13': + resolution: {integrity: sha512-WG8wWfDiJlSF5hELjwfjSGOXcBR/ZMhBFCGYe8vERpC39CQYZeq1PQ2kaYHdye3V95d06H89KGMsVCIE4LWo3g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-navigation-menu@1.2.14': + resolution: {integrity: sha512-YB9mTFQvCOAQMHU+C/jVl96WmuWeltyUEpRJJky51huhds5W2FQr1J8D/16sQlf0ozxkPK8uF3niQMdUwZPv5w==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-one-time-password-field@0.1.8': + resolution: {integrity: sha512-ycS4rbwURavDPVjCb5iS3aG4lURFDILi6sKI/WITUMZ13gMmn/xGjpLoqBAalhJaDk8I3UbCM5GzKHrnzwHbvg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-password-toggle-field@0.1.3': + resolution: {integrity: sha512-/UuCrDBWravcaMix4TdT+qlNdVwOM1Nck9kWx/vafXsdfj1ChfhOdfi3cy9SGBpWgTXwYCuboT/oYpJy3clqfw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-popover@1.1.14': + resolution: {integrity: sha512-ODz16+1iIbGUfFEfKx2HTPKizg2MN39uIOV8MXeHnmdd3i/N9Wt7vU46wbHsqA0xoaQyXVcs0KIlBdOA2Y95bw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-popover@1.1.15': + resolution: {integrity: sha512-kr0X2+6Yy/vJzLYJUPCZEc8SfQcf+1COFoAqauJm74umQhta9M7lNJHP7QQS3vkvcGLQUbWpMzwrXYwrYztHKA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-popper@1.2.7': + resolution: {integrity: sha512-IUFAccz1JyKcf/RjB552PlWwxjeCJB8/4KxT7EhBHOJM+mN7LdW+B3kacJXILm32xawcMMjb2i0cIZpo+f9kiQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-popper@1.2.8': + resolution: {integrity: sha512-0NJQ4LFFUuWkE7Oxf0htBKS6zLkkjBH+hM1uk7Ng705ReR8m/uelduy1DBo0PyBXPKVnBA6YBlU94MBGXrSBCw==} peerDependencies: '@types/react': '*' + '@types/react-dom': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true + '@types/react-dom': + optional: true - '@radix-ui/react-focus-guards@1.1.3': - resolution: {integrity: sha512-0rFg/Rj2Q62NCm62jZw0QX7a3sz6QCQU0LpZdNrJX8byRGaGVTqbrW9jAoIAHyMQqsNpeZ81YgSizOt5WXq0Pw==} + '@radix-ui/react-portal@1.1.9': + resolution: {integrity: sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==} peerDependencies: '@types/react': '*' + '@types/react-dom': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true + '@types/react-dom': + optional: true - '@radix-ui/react-focus-scope@1.1.7': - resolution: {integrity: sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==} + '@radix-ui/react-presence@1.1.4': + resolution: {integrity: sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -3996,17 +3414,21 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-id@1.1.1': - resolution: {integrity: sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==} + '@radix-ui/react-presence@1.1.5': + resolution: {integrity: sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==} peerDependencies: '@types/react': '*' + '@types/react-dom': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true + '@types/react-dom': + optional: true - '@radix-ui/react-label@2.1.7': - resolution: {integrity: sha512-YT1GqPSL8kJn20djelMX7/cTRp/Y9w5IZHvfxQTVHrOqa2yMl7i/UfMqKRU5V7mEyKTrUVgJXhNQPVCG8PBLoQ==} + '@radix-ui/react-primitive@2.1.3': + resolution: {integrity: sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4018,8 +3440,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-menu@2.1.16': - resolution: {integrity: sha512-72F2T+PLlphrqLcAotYPp0uJMr5SjP5SL01wfEspJbru5Zs5vQaSHb4VB3ZMJPimgHHCHG7gMOeOB9H3Hdmtxg==} + '@radix-ui/react-progress@1.1.7': + resolution: {integrity: sha512-vPdg/tF6YC/ynuBIJlk1mm7Le0VgW6ub6J2UWnTQ7/D23KXcPI1qy+0vBkgKgd38RCMJavBXpB83HPNFMTb0Fg==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4031,8 +3453,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-navigation-menu@1.2.13': - resolution: {integrity: sha512-WG8wWfDiJlSF5hELjwfjSGOXcBR/ZMhBFCGYe8vERpC39CQYZeq1PQ2kaYHdye3V95d06H89KGMsVCIE4LWo3g==} + '@radix-ui/react-radio-group@1.3.8': + resolution: {integrity: sha512-VBKYIYImA5zsxACdisNQ3BjCBfmbGH3kQlnFVqlWU4tXwjy7cGX8ta80BcrO+WJXIn5iBylEH3K6ZTlee//lgQ==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4044,8 +3466,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-popover@1.1.14': - resolution: {integrity: sha512-ODz16+1iIbGUfFEfKx2HTPKizg2MN39uIOV8MXeHnmdd3i/N9Wt7vU46wbHsqA0xoaQyXVcs0KIlBdOA2Y95bw==} + '@radix-ui/react-roving-focus@1.1.10': + resolution: {integrity: sha512-dT9aOXUen9JSsxnMPv/0VqySQf5eDQ6LCk5Sw28kamz8wSOW2bJdlX2Bg5VUIIcV+6XlHpWTIuTPCf/UNIyq8Q==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4057,8 +3479,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-popover@1.1.15': - resolution: {integrity: sha512-kr0X2+6Yy/vJzLYJUPCZEc8SfQcf+1COFoAqauJm74umQhta9M7lNJHP7QQS3vkvcGLQUbWpMzwrXYwrYztHKA==} + '@radix-ui/react-roving-focus@1.1.11': + resolution: {integrity: sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4070,8 +3492,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-popper@1.2.7': - resolution: {integrity: sha512-IUFAccz1JyKcf/RjB552PlWwxjeCJB8/4KxT7EhBHOJM+mN7LdW+B3kacJXILm32xawcMMjb2i0cIZpo+f9kiQ==} + '@radix-ui/react-scroll-area@1.2.10': + resolution: {integrity: sha512-tAXIa1g3sM5CGpVT0uIbUx/U3Gs5N8T52IICuCtObaos1S8fzsrPXG5WObkQN3S6NVl6wKgPhAIiBGbWnvc97A==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4083,8 +3505,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-popper@1.2.8': - resolution: {integrity: sha512-0NJQ4LFFUuWkE7Oxf0htBKS6zLkkjBH+hM1uk7Ng705ReR8m/uelduy1DBo0PyBXPKVnBA6YBlU94MBGXrSBCw==} + '@radix-ui/react-scroll-area@1.2.9': + resolution: {integrity: sha512-YSjEfBXnhUELsO2VzjdtYYD4CfQjvao+lhhrX5XsHD7/cyUNzljF1FHEbgTPN7LH2MClfwRMIsYlqTYpKTTe2A==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4096,8 +3518,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-portal@1.1.9': - resolution: {integrity: sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==} + '@radix-ui/react-select@2.2.6': + resolution: {integrity: sha512-I30RydO+bnn2PQztvo25tswPH+wFBjehVGtmagkU78yMdwTwVf12wnAOF+AeP8S2N8xD+5UPbGhkUfPyvT+mwQ==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4109,8 +3531,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-presence@1.1.4': - resolution: {integrity: sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA==} + '@radix-ui/react-separator@1.1.7': + resolution: {integrity: sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4122,8 +3544,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-presence@1.1.5': - resolution: {integrity: sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==} + '@radix-ui/react-slider@1.3.6': + resolution: {integrity: sha512-JPYb1GuM1bxfjMRlNLE+BcmBC8onfCi60Blk7OBqi2MLTFdS+8401U4uFjnwkOr49BLmXxLC6JHkvAsx5OJvHw==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4135,34 +3557,26 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-primitive@2.1.3': - resolution: {integrity: sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==} + '@radix-ui/react-slot@1.2.3': + resolution: {integrity: sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==} peerDependencies: '@types/react': '*' - '@types/react-dom': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true - '@types/react-dom': - optional: true - '@radix-ui/react-primitive@2.1.4': - resolution: {integrity: sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg==} + '@radix-ui/react-slot@1.2.4': + resolution: {integrity: sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==} peerDependencies: '@types/react': '*' - '@types/react-dom': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true - '@types/react-dom': - optional: true - '@radix-ui/react-roving-focus@1.1.10': - resolution: {integrity: sha512-dT9aOXUen9JSsxnMPv/0VqySQf5eDQ6LCk5Sw28kamz8wSOW2bJdlX2Bg5VUIIcV+6XlHpWTIuTPCf/UNIyq8Q==} + '@radix-ui/react-switch@1.2.5': + resolution: {integrity: sha512-5ijLkak6ZMylXsaImpZ8u4Rlf5grRmoc0p0QeX9VJtlrM4f5m3nCTX8tWga/zOA8PZYIR/t0p2Mnvd7InrJ6yQ==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4174,8 +3588,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-roving-focus@1.1.11': - resolution: {integrity: sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==} + '@radix-ui/react-switch@1.2.6': + resolution: {integrity: sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4187,8 +3601,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-scroll-area@1.2.9': - resolution: {integrity: sha512-YSjEfBXnhUELsO2VzjdtYYD4CfQjvao+lhhrX5XsHD7/cyUNzljF1FHEbgTPN7LH2MClfwRMIsYlqTYpKTTe2A==} + '@radix-ui/react-tabs@1.1.12': + resolution: {integrity: sha512-GTVAlRVrQrSw3cEARM0nAx73ixrWDPNZAruETn3oHCNP6SbZ/hNxdxp+u7VkIEv3/sFoLq1PfcHrl7Pnp0CDpw==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4200,8 +3614,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-separator@1.1.7': - resolution: {integrity: sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA==} + '@radix-ui/react-tabs@1.1.13': + resolution: {integrity: sha512-7xdcatg7/U+7+Udyoj2zodtI9H/IIopqo+YOIcZOq1nJwXWBZ9p8xiu5llXlekDbZkca79a/fozEYQXIA4sW6A==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4213,26 +3627,34 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-slot@1.2.3': - resolution: {integrity: sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==} + '@radix-ui/react-toast@1.2.15': + resolution: {integrity: sha512-3OSz3TacUWy4WtOXV38DggwxoqJK4+eDkNMl5Z/MJZaoUPaP4/9lf81xXMe1I2ReTAptverZUpbPY4wWwWyL5g==} peerDependencies: '@types/react': '*' + '@types/react-dom': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true + '@types/react-dom': + optional: true - '@radix-ui/react-slot@1.2.4': - resolution: {integrity: sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==} + '@radix-ui/react-toggle-group@1.1.11': + resolution: {integrity: sha512-5umnS0T8JQzQT6HbPyO7Hh9dgd82NmS36DQr+X/YJ9ctFNCiiQd6IJAYYZ33LUwm8M+taCz5t2ui29fHZc4Y6Q==} peerDependencies: '@types/react': '*' + '@types/react-dom': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true + '@types/react-dom': + optional: true - '@radix-ui/react-switch@1.2.5': - resolution: {integrity: sha512-5ijLkak6ZMylXsaImpZ8u4Rlf5grRmoc0p0QeX9VJtlrM4f5m3nCTX8tWga/zOA8PZYIR/t0p2Mnvd7InrJ6yQ==} + '@radix-ui/react-toggle@1.1.10': + resolution: {integrity: sha512-lS1odchhFTeZv3xwHH31YPObmJn8gOg7Lq12inrr0+BH/l3Tsq32VfjqH1oh80ARM3mlkfMic15n0kg4sD1poQ==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4244,8 +3666,8 @@ packages: '@types/react-dom': optional: true - '@radix-ui/react-tabs@1.1.12': - resolution: {integrity: sha512-GTVAlRVrQrSw3cEARM0nAx73ixrWDPNZAruETn3oHCNP6SbZ/hNxdxp+u7VkIEv3/sFoLq1PfcHrl7Pnp0CDpw==} + '@radix-ui/react-toolbar@1.1.11': + resolution: {integrity: sha512-4ol06/1bLoFu1nwUqzdD4Y5RZ9oDdKeiHIsntug54Hcr1pgaHiPqHFEaXI1IFP/EsOfROQZ8Mig9VTIRza6Tjg==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -4367,58 +3789,19 @@ packages: '@radix-ui/rect@1.1.1': resolution: {integrity: sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==} - '@react-router/dev@7.10.1': - resolution: {integrity: sha512-kap9O8rTN6b3vxjd+0SGjhm5vqiAZHMmOX1Hc7Y4KXRVVdusn+0+hxs44cDSfbW6Z6fCLw6GXXe0Kr+DJIRezw==} - engines: {node: '>=20.0.0'} - hasBin: true - peerDependencies: - '@react-router/serve': ^7.10.1 - '@vitejs/plugin-rsc': '*' - react-router: ^7.10.1 - typescript: ^5.1.0 - vite: ^5.1.0 || ^6.0.0 || ^7.0.0 - wrangler: ^3.28.2 || ^4.0.0 - peerDependenciesMeta: - '@react-router/serve': - optional: true - '@vitejs/plugin-rsc': - optional: true - typescript: - optional: true - wrangler: - optional: true - - '@react-router/express@7.10.1': - resolution: {integrity: sha512-O7xjg6wWHfrsnPyVWgQG+tCamIE09SqLqtHwa1tAFzKPjcDpCw4S4+/OkJvNXLtBL60H3VhZ1r2OQgXBgGOMpw==} - engines: {node: '>=20.0.0'} + '@radix-ui/themes@3.2.1': + resolution: {integrity: sha512-WJL2YKAGItkunwm3O4cLTFKCGJTfAfF6Hmq7f5bCo1ggqC9qJQ/wfg/25AAN72aoEM1yqXZQ+pslsw48AFR0Xg==} peerDependencies: - express: ^4.17.1 || ^5 - react-router: 7.10.1 - typescript: ^5.1.0 + '@types/react': '*' + '@types/react-dom': '*' + react: 16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: 16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: - typescript: + '@types/react': optional: true - - '@react-router/node@7.10.1': - resolution: {integrity: sha512-RLmjlR1zQu+ve8ibI0lu91pJrXGcmfkvsrQl7z/eTc5V5FZgl0OvQVWL5JDWBlBZyzdLMQQekUOX5WcPhCP1FQ==} - engines: {node: '>=20.0.0'} - peerDependencies: - react-router: 7.10.1 - typescript: ^5.1.0 - peerDependenciesMeta: - typescript: + '@types/react-dom': optional: true - '@react-router/serve@7.10.1': - resolution: {integrity: sha512-qYco7sFpbRgoKJKsCgJmFBQwaLVsLv255K8vbPodnXe13YBEzV/ugIqRCYVz2hghvlPiEKgaHh2On0s/5npn6w==} - engines: {node: '>=20.0.0'} - hasBin: true - peerDependencies: - react-router: 7.10.1 - - '@remix-run/node-fetch-server@0.9.0': - resolution: {integrity: sha512-SoLMv7dbH+njWzXnOY6fI08dFMI5+/dQ+vY3n8RnnbdG7MdJEgiP28Xj/xWlnRnED/aB6SFw56Zop+LbmaaKqA==} - '@remix-run/node@2.17.0': resolution: {integrity: sha512-ISy3N4peKB+Fo8ddh+mU6ki3HzQqLXwJxUrAtqxYxrBDM4Pwc7EvISrcQ4QasB6ORBknJeEZSBu69WDRhGzrjA==} engines: {node: '>=18.0.0'} @@ -4527,15 +3910,12 @@ packages: cpu: [x64] os: [win32] - '@rolldown/pluginutils@1.0.0-beta.27': - resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==} - - '@rolldown/pluginutils@1.0.0-beta.30': - resolution: {integrity: sha512-whXaSoNUFiyDAjkUF8OBpOm77Szdbk5lGNqFe6CbVbJFrhCCPinCbRA3NjawwlNHla1No7xvXXh+CpSxnPfUEw==} - '@rolldown/pluginutils@1.0.0-beta.34': resolution: {integrity: sha512-LyAREkZHP5pMom7c24meKmJCdhf2hEyvam2q0unr3or9ydwDL+DJ8chTF6Av/RFPb3rH8UFBdMzO5MxTZW97oA==} + '@rolldown/pluginutils@1.0.0-beta.53': + resolution: {integrity: sha512-vENRlFU4YbrwVqNDZ7fLvy+JR1CRkyr01jhSiDpE1u6py3OMzQfztQU2jxykW3ALNxO4kSlqIDeYyD0Y9RcQeQ==} + '@rollup/plugin-alias@5.1.1': resolution: {integrity: sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==} engines: {node: '>=14.0.0'} @@ -4814,9 +4194,6 @@ packages: '@rushstack/eslint-patch@1.12.0': resolution: {integrity: sha512-5EwMtOqvJMMa3HbmxLlF74e+3/HhwBTMcvt3nqVJgGCozO6hzIPOBlwm8mGVNR9SN2IJpxSnlxczyDjcn7qIyw==} - '@schummar/icu-type-parser@1.21.5': - resolution: {integrity: sha512-bXHSaW5jRTmke9Vd0h5P7BtWZG9Znqb8gSDxZnxaGSJnGwPLDPfS+3g0BKzeWqzgZPsIVZkM7m2tbo18cm5HBw==} - '@shikijs/core@3.9.2': resolution: {integrity: sha512-3q/mzmw09B2B6PgFNeiaN8pkNOixWS726IHmJEpjDAcneDPMQmUg2cweT9cWXY4XcyQS3i6mOOUgQz9RRUP6HA==} @@ -4857,6 +4234,10 @@ packages: '@sinclair/typebox@0.34.38': resolution: {integrity: sha512-HpkxMmc2XmZKhvaKIZZThlHmx1L0I/V1hWK1NubtlFnr6ZqdiOpV72TKudZUNQjZNsyDBay72qFEhEvb+bcwcA==} + '@sindresorhus/is@4.6.0': + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + '@sindresorhus/is@7.0.2': resolution: {integrity: sha512-d9xRovfKNz1SKieM0qJdO+PQonjnnIfSNWfHYnBSJ9hkjm0ZPw6HlxscDXYstp3z+7V2GOFHc+J0CYrYTjqCJw==} engines: {node: '>=18'} @@ -4884,23 +4265,20 @@ packages: '@standard-schema/spec@1.0.0': resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==} - '@standard-schema/utils@0.3.0': - resolution: {integrity: sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==} - - '@supabase/auth-js@2.88.0': - resolution: {integrity: sha512-r/tlKD1Sv5w5AGmxVdBK17KwVkGOHMjihqw+HeW7Qsyes5ajLeyjL0M7jXZom1+NW4yINacKqOR9gqGmWzW9eA==} + '@supabase/auth-js@2.90.1': + resolution: {integrity: sha512-vxb66dgo6h3yyPbR06735Ps+dK3hj0JwS8w9fdQPVZQmocSTlKUW5MfxSy99mN0XqCCuLMQ3jCEiIIUU23e9ng==} engines: {node: '>=20.0.0'} - '@supabase/functions-js@2.88.0': - resolution: {integrity: sha512-p934lg2x9m0bVBXKl2EAwbyIVif21FD1VGtLNGU4iuPOyB6b0bzyRAFnK95pLj48CMJk0DU+q35TDOGcFAyxwQ==} + '@supabase/functions-js@2.90.1': + resolution: {integrity: sha512-x9mV9dF1Lam9qL3zlpP6mSM5C9iqMPtF5B/tU1Jj/F0ufX5mjDf9ghVBaErVxmrQJRL4+iMKWKY2GnODkpS8tw==} engines: {node: '>=20.0.0'} - '@supabase/postgrest-js@2.88.0': - resolution: {integrity: sha512-8DMGXWQUGM/4e8vtW95dLlNtETTVAyCAr7NyLFACDgVaaPUsDqZvS45LjBNd18fu3n6q/zZwCk4XL2yYWBHTVA==} + '@supabase/postgrest-js@2.90.1': + resolution: {integrity: sha512-jh6vqzaYzoFn3raaC0hcFt9h+Bt+uxNRBSdc7PfToQeRGk7PDPoweHsbdiPWREtDVTGKfu+PyPW9e2jbK+BCgQ==} engines: {node: '>=20.0.0'} - '@supabase/realtime-js@2.88.0': - resolution: {integrity: sha512-4yMVLLq6I2KSzINlBK22vGJJYzJo9FAbfKZl7ZuarvzAClq48skgLWF7dlBCC3B/9wQckKhCfPfvyT0JVz3SXg==} + '@supabase/realtime-js@2.90.1': + resolution: {integrity: sha512-PWbnEMkcQRuor8jhObp4+Snufkq8C6fBp+MchVp2qBPY1NXk/c3Iv3YyiFYVzo0Dzuw4nAlT4+ahuPggy4r32w==} engines: {node: '>=20.0.0'} '@supabase/ssr@0.6.1': @@ -4908,12 +4286,17 @@ packages: peerDependencies: '@supabase/supabase-js': ^2.43.4 - '@supabase/storage-js@2.88.0': - resolution: {integrity: sha512-iM1CFKzTX0XIesHA/szcCqZG54BkXoSzqlVRB/O8s2u2GsXi0oUTko0ruOgDheNcWwOABKt88b0Fs4IVfDq7tg==} + '@supabase/ssr@0.8.0': + resolution: {integrity: sha512-/PKk8kNFSs8QvvJ2vOww1mF5/c5W8y42duYtXvkOSe+yZKRgTTZywYG2l41pjhNomqESZCpZtXuWmYjFRMV+dw==} + peerDependencies: + '@supabase/supabase-js': ^2.76.1 + + '@supabase/storage-js@2.90.1': + resolution: {integrity: sha512-GHY+Ps/K/RBfRj7kwx+iVf2HIdqOS43rM2iDOIDpapyUnGA9CCBFzFV/XvfzznGykd//z2dkGZhlZZprsVFqGg==} engines: {node: '>=20.0.0'} - '@supabase/supabase-js@2.88.0': - resolution: {integrity: sha512-XcvV+0x3ybSG1WBoRH0U0cizT1pyzkXD4lLiPaMLpj+A0jahvcrcrijBT+IQpLXOa2hbNLuHkS7yqJW67r4+nQ==} + '@supabase/supabase-js@2.90.1': + resolution: {integrity: sha512-U8KaKGLUgTIFHtwEW1dgw1gK7XrdpvvYo7nzzqPx721GqPe8WZbAiLh/hmyKLGBYQ/mmQNr20vU9tWSDZpii3w==} engines: {node: '>=20.0.0'} '@swc/core-darwin-arm64@1.15.5': @@ -4991,6 +4374,12 @@ packages: '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@swc/jest@0.2.39': + resolution: {integrity: sha512-eyokjOwYd0Q8RnMHri+8/FS1HIrIUKK/sRrFp8c1dThUOfNeCWbLmBP1P5VsKdvmkd25JaH+OKYwEYiAYg9YAA==} + engines: {npm: '>= 7.0.0'} + peerDependencies: + '@swc/core': '*' + '@swc/types@0.1.25': resolution: {integrity: sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==} @@ -5004,9 +4393,6 @@ packages: '@tailwindcss/node@4.1.18': resolution: {integrity: sha512-DoR7U1P7iYhw16qJ49fgXUlry1t4CpXeErJHnQ44JgTSKMaZUdf17cfn5mHchfJ4KRBZRFA/Coo+MUF5+gOaCQ==} - '@tailwindcss/node@4.1.17': - resolution: {integrity: sha512-csIkHIgLb3JisEFQ0vxr2Y57GUNYh447C8xzwj89U/8fdW8LhProdxvnVH6U8M2Y73QKiTIH+LWbK3V2BBZsAg==} - '@tailwindcss/oxide-android-arm64@4.1.11': resolution: {integrity: sha512-3IfFuATVRUMZZprEIx9OGDjG3Ou3jG4xQzNTvjDoKmU9JdmoCohQJ83MYd0GPnQIu89YoJqvMM0G3uqLRFtetg==} engines: {node: '>= 10'} @@ -5019,12 +4405,6 @@ packages: cpu: [arm64] os: [android] - '@tailwindcss/oxide-android-arm64@4.1.17': - resolution: {integrity: sha512-BMqpkJHgOZ5z78qqiGE6ZIRExyaHyuxjgrJ6eBO5+hfrfGkuya0lYfw8fRHG77gdTjWkNWEEm+qeG2cDMxArLQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [android] - '@tailwindcss/oxide-darwin-arm64@4.1.11': resolution: {integrity: sha512-ESgStEOEsyg8J5YcMb1xl8WFOXfeBmrhAwGsFxxB2CxY9evy63+AtpbDLAyRkJnxLy2WsD1qF13E97uQyP1lfQ==} engines: {node: '>= 10'} @@ -5037,12 +4417,6 @@ packages: cpu: [arm64] os: [darwin] - '@tailwindcss/oxide-darwin-arm64@4.1.17': - resolution: {integrity: sha512-EquyumkQweUBNk1zGEU/wfZo2qkp/nQKRZM8bUYO0J+Lums5+wl2CcG1f9BgAjn/u9pJzdYddHWBiFXJTcxmOg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - '@tailwindcss/oxide-darwin-x64@4.1.11': resolution: {integrity: sha512-EgnK8kRchgmgzG6jE10UQNaH9Mwi2n+yw1jWmof9Vyg2lpKNX2ioe7CJdf9M5f8V9uaQxInenZkOxnTVL3fhAw==} engines: {node: '>= 10'} @@ -5055,12 +4429,6 @@ packages: cpu: [x64] os: [darwin] - '@tailwindcss/oxide-darwin-x64@4.1.17': - resolution: {integrity: sha512-gdhEPLzke2Pog8s12oADwYu0IAw04Y2tlmgVzIN0+046ytcgx8uZmCzEg4VcQh+AHKiS7xaL8kGo/QTiNEGRog==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - '@tailwindcss/oxide-freebsd-x64@4.1.11': resolution: {integrity: sha512-xdqKtbpHs7pQhIKmqVpxStnY1skuNh4CtbcyOHeX1YBE0hArj2romsFGb6yUmzkq/6M24nkxDqU8GYrKrz+UcA==} engines: {node: '>= 10'} @@ -5073,12 +4441,6 @@ packages: cpu: [x64] os: [freebsd] - '@tailwindcss/oxide-freebsd-x64@4.1.17': - resolution: {integrity: sha512-hxGS81KskMxML9DXsaXT1H0DyA+ZBIbyG/sSAjWNe2EDl7TkPOBI42GBV3u38itzGUOmFfCzk1iAjDXds8Oh0g==} - engines: {node: '>= 10'} - cpu: [x64] - os: [freebsd] - '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.11': resolution: {integrity: sha512-ryHQK2eyDYYMwB5wZL46uoxz2zzDZsFBwfjssgB7pzytAeCCa6glsiJGjhTEddq/4OsIjsLNMAiMlHNYnkEEeg==} engines: {node: '>= 10'} @@ -5091,12 +4453,6 @@ packages: cpu: [arm] os: [linux] - '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.17': - resolution: {integrity: sha512-k7jWk5E3ldAdw0cNglhjSgv501u7yrMf8oeZ0cElhxU6Y2o7f8yqelOp3fhf7evjIS6ujTI3U8pKUXV2I4iXHQ==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - '@tailwindcss/oxide-linux-arm64-gnu@4.1.11': resolution: {integrity: sha512-mYwqheq4BXF83j/w75ewkPJmPZIqqP1nhoghS9D57CLjsh3Nfq0m4ftTotRYtGnZd3eCztgbSPJ9QhfC91gDZQ==} engines: {node: '>= 10'} @@ -5109,12 +4465,6 @@ packages: cpu: [arm64] os: [linux] - '@tailwindcss/oxide-linux-arm64-gnu@4.1.17': - resolution: {integrity: sha512-HVDOm/mxK6+TbARwdW17WrgDYEGzmoYayrCgmLEw7FxTPLcp/glBisuyWkFz/jb7ZfiAXAXUACfyItn+nTgsdQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - '@tailwindcss/oxide-linux-arm64-musl@4.1.11': resolution: {integrity: sha512-m/NVRFNGlEHJrNVk3O6I9ggVuNjXHIPoD6bqay/pubtYC9QIdAMpS+cswZQPBLvVvEF6GtSNONbDkZrjWZXYNQ==} engines: {node: '>= 10'} @@ -5127,12 +4477,6 @@ packages: cpu: [arm64] os: [linux] - '@tailwindcss/oxide-linux-arm64-musl@4.1.17': - resolution: {integrity: sha512-HvZLfGr42i5anKtIeQzxdkw/wPqIbpeZqe7vd3V9vI3RQxe3xU1fLjss0TjyhxWcBaipk7NYwSrwTwK1hJARMg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - '@tailwindcss/oxide-linux-x64-gnu@4.1.11': resolution: {integrity: sha512-YW6sblI7xukSD2TdbbaeQVDysIm/UPJtObHJHKxDEcW2exAtY47j52f8jZXkqE1krdnkhCMGqP3dbniu1Te2Fg==} engines: {node: '>= 10'} @@ -5145,12 +4489,6 @@ packages: cpu: [x64] os: [linux] - '@tailwindcss/oxide-linux-x64-gnu@4.1.17': - resolution: {integrity: sha512-M3XZuORCGB7VPOEDH+nzpJ21XPvK5PyjlkSFkFziNHGLc5d6g3di2McAAblmaSUNl8IOmzYwLx9NsE7bplNkwQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - '@tailwindcss/oxide-linux-x64-musl@4.1.11': resolution: {integrity: sha512-e3C/RRhGunWYNC3aSF7exsQkdXzQ/M+aYuZHKnw4U7KQwTJotnWsGOIVih0s2qQzmEzOFIJ3+xt7iq67K/p56Q==} engines: {node: '>= 10'} @@ -5163,12 +4501,6 @@ packages: cpu: [x64] os: [linux] - '@tailwindcss/oxide-linux-x64-musl@4.1.17': - resolution: {integrity: sha512-k7f+pf9eXLEey4pBlw+8dgfJHY4PZ5qOUFDyNf7SI6lHjQ9Zt7+NcscjpwdCEbYi6FI5c2KDTDWyf2iHcCSyyQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - '@tailwindcss/oxide-wasm32-wasi@4.1.11': resolution: {integrity: sha512-Xo1+/GU0JEN/C/dvcammKHzeM6NqKovG+6921MR6oadee5XPBaKOumrJCXvopJ/Qb5TH7LX/UAywbqrP4lax0g==} engines: {node: '>=14.0.0'} @@ -5193,18 +4525,6 @@ packages: - '@emnapi/wasi-threads' - tslib - '@tailwindcss/oxide-wasm32-wasi@4.1.17': - resolution: {integrity: sha512-cEytGqSSoy7zK4JRWiTCx43FsKP/zGr0CsuMawhH67ONlH+T79VteQeJQRO/X7L0juEUA8ZyuYikcRBf0vsxhg==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] - bundledDependencies: - - '@napi-rs/wasm-runtime' - - '@emnapi/core' - - '@emnapi/runtime' - - '@tybys/wasm-util' - - '@emnapi/wasi-threads' - - tslib - '@tailwindcss/oxide-win32-arm64-msvc@4.1.11': resolution: {integrity: sha512-UgKYx5PwEKrac3GPNPf6HVMNhUIGuUh4wlDFR2jYYdkX6pL/rn73zTq/4pzUm8fOjAn5L8zDeHp9iXmUGOXZ+w==} engines: {node: '>= 10'} @@ -5217,12 +4537,6 @@ packages: cpu: [arm64] os: [win32] - '@tailwindcss/oxide-win32-arm64-msvc@4.1.17': - resolution: {integrity: sha512-JU5AHr7gKbZlOGvMdb4722/0aYbU+tN6lv1kONx0JK2cGsh7g148zVWLM0IKR3NeKLv+L90chBVYcJ8uJWbC9A==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - '@tailwindcss/oxide-win32-x64-msvc@4.1.11': resolution: {integrity: sha512-YfHoggn1j0LK7wR82TOucWc5LDCguHnoS879idHekmmiR7g9HUtMw9MI0NHatS28u/Xlkfi9w5RJWgz2Dl+5Qg==} engines: {node: '>= 10'} @@ -5235,12 +4549,6 @@ packages: cpu: [x64] os: [win32] - '@tailwindcss/oxide-win32-x64-msvc@4.1.17': - resolution: {integrity: sha512-SKWM4waLuqx0IH+FMDUw6R66Hu4OuTALFgnleKbqhgGU30DY20NORZMZUKgLRjQXNN2TLzKvh48QXTig4h4bGw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - '@tailwindcss/oxide@4.1.11': resolution: {integrity: sha512-Q69XzrtAhuyfHo+5/HMgr1lAiPP/G40OMFAnws7xcFEYqcypZmdW8eGXaOUIeOl1dzPJBPENXgbjsOyhg2nkrg==} engines: {node: '>= 10'} @@ -5249,10 +4557,6 @@ packages: resolution: {integrity: sha512-EgCR5tTS5bUSKQgzeMClT6iCY3ToqE1y+ZB0AKldj809QXk1Y+3jB0upOYZrn9aGIzPtUsP7sX4QQ4XtjBB95A==} engines: {node: '>= 10'} - '@tailwindcss/oxide@4.1.17': - resolution: {integrity: sha512-F0F7d01fmkQhsTjXezGBLdrl1KresJTcI3DB8EkScCldyKp3Msz4hub4uyYaVnk88BAS1g5DQjjF6F5qczheLA==} - engines: {node: '>= 10'} - '@tailwindcss/postcss@4.1.11': resolution: {integrity: sha512-q/EAIIpF6WpLhKEuQSEVMZNMIY8KhWoAemZ9eylNAih9jxMGAYPPWBn3I9QL/2jZ+e7OEz/tZkX5HwbBR4HohA==} @@ -5277,22 +4581,18 @@ packages: '@tanstack/query-core@5.83.1': resolution: {integrity: sha512-OG69LQgT7jSp+5pPuCfzltq/+7l2xoweggjme9vlbCPa/d7D7zaqv5vN/S82SzSYZ4EDLTxNO1PWrv49RAS64Q==} + '@tanstack/query-core@5.90.16': + resolution: {integrity: sha512-MvtWckSVufs/ja463/K4PyJeqT+HMlJWtw6PrCpywznd2NSgO3m4KwO9RqbFqGg6iDE8vVMFWMeQI4Io3eEYww==} + '@tanstack/react-query@5.85.0': resolution: {integrity: sha512-t1HMfToVMGfwEJRya6GG7gbK0luZJd+9IySFNePL1BforU1F3LqQ3tBC2Rpvr88bOrlU6PXyMLgJD0Yzn4ztUw==} peerDependencies: react: ^18 || ^19 - '@tanstack/react-router-devtools@1.141.4': - resolution: {integrity: sha512-5bLR/gkcKldJaRmrjxICDVHwplwLixkOHx5TOqNbeGRkInSHgskHvUdpkxi8OF96tkQiJnCfz55WfsU3ocZ2jA==} - engines: {node: '>=12'} + '@tanstack/react-query@5.90.16': + resolution: {integrity: sha512-bpMGOmV4OPmif7TNMteU/Ehf/hoC0Kf98PDc0F4BZkFrEapRMEqI/V6YS0lyzwSV6PQpY1y4xxArUIfBW5LVxQ==} peerDependencies: - '@tanstack/react-router': ^1.141.4 - '@tanstack/router-core': ^1.141.4 - react: '>=18.0.0 || >=19.0.0' - react-dom: '>=18.0.0 || >=19.0.0' - peerDependenciesMeta: - '@tanstack/router-core': - optional: true + react: ^18 || ^19 '@tanstack/react-router@1.131.8': resolution: {integrity: sha512-FbfUB8p42N3PmwGN2NpFx+f59pKmhu1B1QOcmyF3IlbC3y6R0jZofx1FbnmWFLz8cUHVmIP52L0s5DUj3Bj6fQ==} @@ -5341,17 +4641,6 @@ packages: resolution: {integrity: sha512-NpFfAG1muv4abrCij6sEtRrVzlU+xYpY30NAgquHNhMMMNIiN7djzsaGV+vCJdR4u5mi13+f0c3f+f9MdekY5A==} engines: {node: '>=12'} - '@tanstack/router-devtools-core@1.141.4': - resolution: {integrity: sha512-G+HAmohJniouOp2Q1/Qr4VheaEfAuZmjQ5edHIgpET9Agcxc0rwtL+G9HcHXOOfaVyz7erix0a1Hbgj9j5uQew==} - engines: {node: '>=12'} - peerDependencies: - '@tanstack/router-core': ^1.141.4 - csstype: ^3.0.10 - solid-js: '>=1.9.5' - peerDependenciesMeta: - csstype: - optional: true - '@tanstack/router-generator@1.131.7': resolution: {integrity: sha512-djwY5O1LdJo300EOZiYog5RsjB1DYzFtgX6a3uOkAmii7LHX9k9mhFXx2KrI4dLHLQsnlKexV9QvU6cSTFmsag==} engines: {node: '>=12'} @@ -5447,9 +4736,6 @@ packages: '@tybys/wasm-util@0.10.0': resolution: {integrity: sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==} - '@types/accepts@1.3.7': - resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==} - '@types/babel__code-frame@7.0.6': resolution: {integrity: sha512-Anitqkl3+KrzcW2k77lRlg/GfLZLWXBuNgbEcIOU6M92yw42vsd3xV/Z/yAHEj8m+KUjL6bWOVOFqX8PFPJ4LA==} @@ -5471,14 +4757,11 @@ packages: '@types/body-parser@1.19.6': resolution: {integrity: sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==} - '@types/braces@3.0.5': - resolution: {integrity: sha512-SQFof9H+LXeWNz8wDe7oN5zu7ket0qwMu5vZubW4GCJ8Kkeh6nBWUz87+KTz/G3Kqsrp0j/W253XJb3KMEeg3w==} - '@types/bun@1.2.22': resolution: {integrity: sha512-5A/KrKos2ZcN0c6ljRSOa1fYIyCKhZfIVYeuyb4snnvomnpFqC0tTsEkdqNxbAgExV384OETQ//WAjl3XbYqQA==} - '@types/bun@1.3.4': - resolution: {integrity: sha512-EEPTKXHP+zKGPkhRLv+HI0UEX8/o+65hqARxLy8Ov5rIxMBPNTjeZww00CIihrIQGEQBYg+0roO5qOnS/7boGA==} + '@types/bun@1.3.5': + resolution: {integrity: sha512-RnygCqNrd3srIPEWBd5LFeUYG7plCoH2Yw9WaZGyNmdTEei+gWaHqydbaIRkIkcbXwhBT94q78QljxN0Sk838w==} '@types/chai@5.2.2': resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} @@ -5486,27 +4769,9 @@ packages: '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} - '@types/content-disposition@0.5.9': - resolution: {integrity: sha512-8uYXI3Gw35MhiVYhG3s295oihrxRyytcRHjSjqnqZVDDy/xcGBRny7+Xj1Wgfhv5QzRtN2hB2dVRBUX9XW3UcQ==} - - '@types/cookie@0.5.4': - resolution: {integrity: sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA==} - '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - '@types/cookiejar@2.1.5': - resolution: {integrity: sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==} - - '@types/cookies@0.7.7': - resolution: {integrity: sha512-h7BcvPUogWbKCzBR2lY4oqaZbO3jXZksexYJVFvkrFeLgbZjQkU4x8pRq6eg2MHXQhY0McQdqmmsxRWlVAHooA==} - - '@types/cookies@0.9.2': - resolution: {integrity: sha512-1AvkDdZM2dbyFybL4fxpuNCaWyv//0AwsuUk2DWeXyM1/5ZKm6W3z6mQi24RZ4l2ucY+bkSHzbDVpySqPGuV8A==} - - '@types/cors@2.8.19': - resolution: {integrity: sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==} - '@types/d3-array@3.2.1': resolution: {integrity: sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==} @@ -5555,18 +4820,9 @@ packages: '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} - '@types/express-serve-static-core@4.19.7': - resolution: {integrity: sha512-FvPtiIf1LfhzsaIXhv/PHan/2FeQBbtBDtfX2QfvPxdUelMDEckK08SM6nqo1MIZY3RUlfA+HV8+hFUSio78qg==} - '@types/express-serve-static-core@5.0.7': resolution: {integrity: sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ==} - '@types/express@4.17.14': - resolution: {integrity: sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==} - - '@types/express@4.17.25': - resolution: {integrity: sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==} - '@types/express@5.0.3': resolution: {integrity: sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==} @@ -5579,9 +4835,6 @@ packages: '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/http-assert@1.5.6': - resolution: {integrity: sha512-TTEwmtjgVbYAzZYWyeHPrrtWnfVkm8tQkP8P21uQifPgMRgjrow3XDEYqucuC8SKZJT7pUnhU/JymvjggxO9vw==} - '@types/http-errors@2.0.5': resolution: {integrity: sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==} @@ -5603,48 +4856,21 @@ packages: '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/keygrip@1.0.6': - resolution: {integrity: sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==} - - '@types/koa-compose@3.2.9': - resolution: {integrity: sha512-BroAZ9FTvPiCy0Pi8tjD1OfJ7bgU1gQf0eR6e1Vm+JJATy9eKOG3hQMFtMciMawiSOVnLMdmUOC46s7HBhSTsA==} - - '@types/koa@2.15.0': - resolution: {integrity: sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g==} - '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} '@types/mdx@2.0.13': resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} - '@types/methods@1.1.4': - resolution: {integrity: sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==} - - '@types/micromatch@4.0.10': - resolution: {integrity: sha512-5jOhFDElqr4DKTrTEbnW8DZ4Hz5LRUEmyrGpCMrD/NphYv3nUnaF08xmSLx1rGGnyEs/kFnhiw6dCgcDqMr5PQ==} - '@types/mime@1.3.5': resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} '@types/minimist@1.2.5': resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/morgan@1.9.10': - resolution: {integrity: sha512-sS4A1zheMvsADRVfT0lYbJ4S9lmsey8Zo2F7cnbYjWHP67Q0AwMYuuzLlkIM2N8gAbb9cubhIVFwcIN2XyYCkA==} - '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node-fetch@2.6.2': - resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} - - '@types/node@16.18.6': - resolution: {integrity: sha512-vmYJF0REqDyyU0gviezF/KHq/fYaUbFhkcNbQCuPGFQj6VTbXuHZoxs/Y7mutWe73C8AC6l9fFu8mSYiBAqkGA==} - - '@types/node@17.0.45': - resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@types/node@18.17.0': resolution: {integrity: sha512-GXZxEtOxYGFchyUzxvKI14iff9KZ2DI+A6a37o6EQevtg6uO9t+aUZKcaC1Te5Ng1OnLM7K9NVVj+FbecD9cJg==} @@ -5657,6 +4883,9 @@ packages: '@types/node@22.17.1': resolution: {integrity: sha512-y3tBaz+rjspDTylNjAX37jEC3TETEFGNJL6uQDxwF9/8GLLIjW1rvVHlynyuUKMnMr1Roq8jOv3vkopBjC4/VA==} + '@types/node@24.10.4': + resolution: {integrity: sha512-vnDVpYPMzs4wunl27jHrfmwojOGKya0xyM3sH+UE5iv5uPS6vX7UIoh6m+vQc5LGBq52HBKPIn/zcSZVzeDEZg==} + '@types/node@24.3.0': resolution: {integrity: sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==} @@ -5698,10 +4927,10 @@ packages: peerDependencies: '@types/react': ^19.0.0 - '@types/react-dom@19.1.9': - resolution: {integrity: sha512-qXRuZaOsAdXKFyOhRBg6Lqqc0yay13vN7KrIg4L7N4aaHN68ma9OK3NE1BoDFgFOTfM7zg+3/8+2n8rLUH3OKQ==} + '@types/react-dom@19.2.3': + resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==} peerDependencies: - '@types/react': ^19.0.0 + '@types/react': ^19.2.0 '@types/react@18.3.23': resolution: {integrity: sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==} @@ -5727,12 +4956,6 @@ packages: '@types/statuses@2.0.6': resolution: {integrity: sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==} - '@types/superagent@8.1.9': - resolution: {integrity: sha512-pTVjI73witn+9ILmoJdajHGW2jkSaOzhiFYF1Rd3EQ94kymLqB9PjD9ISg7WaALC7+dCHT0FGe9T2LktLq/3GQ==} - - '@types/supertest@6.0.3': - resolution: {integrity: sha512-8WzXq62EXFhJ7QsH3Ocb/iKQ/Ty9ZVWnVzoTKc9tyyFRRF3a74Tk2+TLFgaFFw364Ere+npzHKEJ6ga2LzIL7w==} - '@types/tough-cookie@4.0.5': resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} @@ -5776,6 +4999,22 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/eslint-plugin@8.34.1': + resolution: {integrity: sha512-STXcN6ebF6li4PxwNeFnqF8/2BNDvBupf2OPx2yWNzr6mKNGF7q49VM00Pz5FaomJyqvbXpY6PhO+T9w139YEQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.34.1 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/eslint-plugin@8.51.0': + resolution: {integrity: sha512-XtssGWJvypyM2ytBnSnKtHYOGT+4ZwTnBVl36TA4nRO2f4PRNGz5/1OszHzcZCvcBMh+qb7I06uoCmLTRdR9og==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.51.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/parser@7.18.0': resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -5793,14 +5032,34 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/parser@8.34.1': + resolution: {integrity: sha512-4O3idHxhyzjClSMJ0a29AcoK0+YwnEqzI6oz3vlRf3xw0zbzt15MzXwItOlnr5nIth6zlY2RENLsOPvhyrKAQA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/parser@8.51.0': + resolution: {integrity: sha512-3xP4XzzDNQOIqBMWogftkwxhg5oMKApqY0BAflmLZiFYHqyhSOxv/cd/zPQLTcCXr4AkaKb25joocY0BD1WC6A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/project-service@8.34.1': resolution: {integrity: sha512-nuHlOmFZfuRwLJKDGQOVc0xnQrAmuq1Mj/ISou5044y1ajGNp2BNliIqp7F2LPQ5sForz8lempMFCovfeS1XoA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/project-service@8.41.0': - resolution: {integrity: sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==} + '@typescript-eslint/project-service@8.49.0': + resolution: {integrity: sha512-/wJN0/DKkmRUMXjZUXYZpD1NEQzQAAn9QWfGwo+Ai8gnzqH7tvqS7oNVdTjKqOcPyVIdZdyCMoqN66Ia789e7g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/project-service@8.51.0': + resolution: {integrity: sha512-Luv/GafO07Z7HpiI7qeEW5NW8HUtZI/fo/kE0YbtQEFpJRUuR0ajcWfCE5bnMvL7QQFrmT/odMe8QZww8X2nfQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' @@ -5813,6 +5072,18 @@ packages: resolution: {integrity: sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.34.1': + resolution: {integrity: sha512-beu6o6QY4hJAgL1E8RaXNC071G4Kso2MGmJskCFQhRhg8VOH/FDbC8soP8NHN7e/Hdphwp8G8cE6OBzC8o41ZA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/scope-manager@8.49.0': + resolution: {integrity: sha512-npgS3zi+/30KSOkXNs0LQXtsg9ekZ8OISAOLGWA/ZOEn0ZH74Ginfl7foziV8DT+D98WfQ5Kopwqb/PZOaIJGg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/scope-manager@8.51.0': + resolution: {integrity: sha512-JhhJDVwsSx4hiOEQPeajGhCWgBMBwVkxC/Pet53EpBVs7zHHtayKefw1jtPaNRXpI9RA2uocdmpdfE7T+NrizA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/tsconfig-utils@8.34.1': resolution: {integrity: sha512-K4Sjdo4/xF9NEeA2khOb7Y5nY6NSXBnod87uniVYW9kHP+hNlDV8trUSFeynA2uxWam4gIWgWoygPrv9VMWrYg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5825,6 +5096,18 @@ packages: peerDependencies: typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/tsconfig-utils@8.49.0': + resolution: {integrity: sha512-8prixNi1/6nawsRYxet4YOhnbW+W9FK/bQPxsGB1D3ZrDzbJ5FXw5XmzxZv82X3B+ZccuSxo/X8q9nQ+mFecWA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/tsconfig-utils@8.51.0': + resolution: {integrity: sha512-Qi5bSy/vuHeWyir2C8u/uqGMIlIDu8fuiYWv48ZGlZ/k+PRPHtaAu7erpc7p5bzw2WNNSniuxoMSO4Ar6V9OXw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/type-utils@7.18.0': resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -5842,6 +5125,20 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/type-utils@8.34.1': + resolution: {integrity: sha512-Tv7tCCr6e5m8hP4+xFugcrwTOucB8lshffJ6zf1mF1TbU67R+ntCc6DzLNKM+s/uzDyv8gLq7tufaAhIBYeV8g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/type-utils@8.51.0': + resolution: {integrity: sha512-0XVtYzxnobc9K0VU7wRWg1yiUrw4oQzexCG2V2IDxxCxhqBMSMbjB+6o91A+Uc0GWtgjCa3Y8bi7hwI0Tu4n5Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/types@7.18.0': resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} engines: {node: ^18.18.0 || >=20.0.0} @@ -5850,10 +5147,22 @@ packages: resolution: {integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.34.1': + resolution: {integrity: sha512-rjLVbmE7HR18kDsjNIZQHxmv9RZwlgzavryL5Lnj2ujIRTeXlKtILHgRNmQ3j4daw7zd+mQgy+uyt6Zo6I0IGA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.41.0': resolution: {integrity: sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.49.0': + resolution: {integrity: sha512-e9k/fneezorUo6WShlQpMxXh8/8wfyc+biu6tnAqA81oWrEic0k21RHzP9uqqpyBBeBKu4T+Bsjy9/b8u7obXQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/types@8.51.0': + resolution: {integrity: sha512-TizAvWYFM6sSscmEakjY3sPqGwxZRSywSsPEiuZF6d5GmGD9Gvlsv0f6N8FvAAA0CD06l3rIcWNbsN1e5F/9Ag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@7.18.0': resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -5869,8 +5178,20 @@ packages: peerDependencies: typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/typescript-estree@8.41.0': - resolution: {integrity: sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==} + '@typescript-eslint/typescript-estree@8.34.1': + resolution: {integrity: sha512-rjCNqqYPuMUF5ODD+hWBNmOitjBWghkGKJg6hiCHzUvXRy6rK22Jd3rwbP2Xi+R7oYVvIKhokHVhH41BxPV5mA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/typescript-estree@8.49.0': + resolution: {integrity: sha512-jrLdRuAbPfPIdYNppHJ/D0wN+wwNfJ32YTAm10eJVsFmrVpXQnDWBn8niCSMlWjvml8jsce5E/O+86IQtTbJWA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/typescript-estree@8.51.0': + resolution: {integrity: sha512-1qNjGqFRmlq0VW5iVlcyHBbCjPB7y6SxpBkrbhNWMy/65ZoncXCEPJxkRZL8McrseNH6lFhaxCIaX+vBuFnRng==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' @@ -5888,6 +5209,27 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/utils@8.34.1': + resolution: {integrity: sha512-mqOwUdZ3KjtGk7xJJnLbHxTuWVn3GO2WZZuM+Slhkun4+qthLdXx32C8xIXbO1kfCECb3jIs3eoxK3eryk7aoQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/utils@8.49.0': + resolution: {integrity: sha512-N3W7rJw7Rw+z1tRsHZbK395TWSYvufBXumYtEGzypgMUthlg0/hmCImeA8hgO2d2G4pd7ftpxxul2J8OdtdaFA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/utils@8.51.0': + resolution: {integrity: sha512-11rZYxSe0zabiKaCP2QAwRf/dnmgFgvTmeDTtZvUvXG3UuAdg/GU02NExmmIXzz3vLGgMdtrIosI84jITQOxUA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/visitor-keys@7.18.0': resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -5896,8 +5238,16 @@ packages: resolution: {integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.41.0': - resolution: {integrity: sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==} + '@typescript-eslint/visitor-keys@8.34.1': + resolution: {integrity: sha512-xoh5rJ+tgsRKoXnkBPFRLZ7rjKM0AfVbC68UZ/ECXoDbfggb9RbEySN359acY1vS3qZ0jVTVWzbtfapwm5ztxw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/visitor-keys@8.49.0': + resolution: {integrity: sha512-LlKaciDe3GmZFphXIc79THF/YYBugZ7FS1pO581E/edlVVNbZKDy93evqmrfQ9/Y4uN0vVhX4iuchq26mK/iiA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/visitor-keys@8.51.0': + resolution: {integrity: sha512-mM/JRQOzhVN1ykejrvwnBRV3+7yTKK8tVANVN3o1O0t0v7o+jqdVu9crPy5Y9dov15TJk/FTIgoUGHrTOVL3Zg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@uiw/react-textarea-code-editor@3.1.1': @@ -6005,6 +5355,14 @@ packages: cpu: [x64] os: [win32] + '@useautumn/convex@0.0.18': + resolution: {integrity: sha512-ARznSXhMOoTsbRwhA1CovHyN0b0oYSqGD62wBdy8CS13EV6DQCx8f/P2JtZzm9Vl3IjYDynUt9le3+zmy2gZcA==} + deprecated: This package has been unreleased. + peerDependencies: + autumn-js: ^0.1.24 + convex: ^1.25.0 + react: ^18.3.1 || ^19.0.0 + '@vdemedes/prettier-config@2.0.1': resolution: {integrity: sha512-lcHyyLfS2ro282qsXKpxw+canUkOlFIGoanxt3BaNCm5K1NR8k4hGvYbFO54/+QWq12d0y/EYRz68yNQkqWFrw==} @@ -6013,18 +5371,8 @@ packages: engines: {node: '>=18'} hasBin: true - '@vinxi/listhen@1.5.6': - resolution: {integrity: sha512-WSN1z931BtasZJlgPp704zJFnQFRg7yzSjkm3MzAWQYe4uXFXlFr1hc5Ac2zae5/HDOz5x1/zDM5Cb54vTCnWw==} - hasBin: true - - '@vitejs/plugin-react@4.7.0': - resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 - - '@vitejs/plugin-react@5.0.0': - resolution: {integrity: sha512-Jx9JfsTa05bYkS9xo0hkofp2dCmp1blrKjw9JONs5BTHOvJCgLbaPSuZLGSVJW6u2qe0tc4eevY0+gSNNi0YCw==} + '@vitejs/plugin-react@5.1.2': + resolution: {integrity: sha512-EcA07pHJouywpzsoTUqNh5NwGayl2PPVEJKUSinGGSxFGYn+shYbqMGBg6FXDqgXum9Ou/ecb+411ssw8HImJQ==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 @@ -6141,24 +5489,21 @@ packages: resolution: {integrity: sha512-ueFCcIPaMgtuYDS9u0qlUoEvj6GiSsKrwnOLPp9SshqjtcRaR1IEHRjoReq3sXNydsF5i0ZnmuYgXq9dV53t0g==} engines: {node: '>=18.0.0'} - '@workos-inc/authkit-js@0.13.0': - resolution: {integrity: sha512-iA0Dt7D1BmY2/1s4oeA36W/aRt8/b5iyH6rP4AlgnjrcH2lUGkBgDXL76NXc0M7repkDQTMcJJ2NhCSo2rcWmg==} + '@workos-inc/authkit-js@0.14.0': + resolution: {integrity: sha512-Wt6rKoZdZnuAgiEBlvMDKhleU9DAwpyyy1SibacrnOWQgF4rcNlC+NTnHiiXu6OiOjQo6pPxhW42kCL+Gi+fjw==} - '@workos-inc/authkit-nextjs@2.12.2': - resolution: {integrity: sha512-pBKtrDRl3n9koGPfXAlOTLUST8X87jt0esPofG9Z5IL/p48HowSWTXj0GbT8byh1WNaHph8x63kLZ/u9JDj3OQ==} - peerDependencies: - next: ^13.5.9 || ^14.2.26 || ^15.2.3 || ^16 - react: ^18.0 || ^19.0.0 - react-dom: ^18.0 || ^19.0.0 - - '@workos-inc/authkit-react@0.11.0': - resolution: {integrity: sha512-67HFSxP4wXC8ECGyvc1yGMwuD5NGkwT2OPt8DavHoKAlO+hRaAlu9wwzqUx1EJrHht0Dcx+l20Byq8Ab0bEhlg==} + '@workos-inc/authkit-react@0.13.0': + resolution: {integrity: sha512-JhcPI9+I0MGOu7B33Gych76Xi7jKfKKfoZ4Mb6JPY9raeEqJQcnN4jMite2ynmMdmiZljIq7wkyf2WAsEU3SzQ==} peerDependencies: react: '>=17' - '@workos-inc/node@7.77.0': - resolution: {integrity: sha512-6LGBAqih8kkzhHqmxueT9/xX93AJQxQhKekyNs0mqgWsrnqOPDiag1WIFzgxbQTvr564MqtEW502Tatfp1+x0Q==} - engines: {node: '>=16'} + '@workos-inc/widgets@1.6.1': + resolution: {integrity: sha512-r6EOG4du7TkOlBUqtqsjC2EQYELxDR9BrVdAZiYKg8PVDxRuDxPALq/1oUkO+PuBxsbjuu/h0rtxIgVOGzpCHA==} + peerDependencies: + '@radix-ui/themes': ^3.1.0 + '@tanstack/react-query': ^5.0.0 + react: '>=18' + react-dom: '>=18' '@xtuc/ieee754@1.2.0': resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} @@ -6180,10 +5525,6 @@ packages: abstract-logging@2.0.1: resolution: {integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==} - accepts@1.3.8: - resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} - engines: {node: '>= 0.6'} - accepts@2.0.0: resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} engines: {node: '>= 0.6'} @@ -6252,9 +5593,6 @@ packages: ajv@8.17.1: resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} - ansi-align@3.0.1: - resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} - ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -6338,9 +5676,6 @@ packages: resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==} engines: {node: '>=0.10.0'} - array-flatten@1.1.1: - resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} - array-includes@3.1.9: resolution: {integrity: sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==} engines: {node: '>= 0.4'} @@ -6385,9 +5720,6 @@ packages: resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==} engines: {node: '>=12'} - asap@2.0.6: - resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} - asn1js@3.0.6: resolution: {integrity: sha512-UOCGPYbl0tv8+006qks/dTgV9ajs97X2p0FAbyS2iyCRrmLSRolDaHdp+v/CLgnzHc3fVB+CwYiUmei7ndFcgA==} engines: {node: '>=12.0.0'} @@ -6396,10 +5728,6 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - ast-kit@2.2.0: - resolution: {integrity: sha512-m1Q/RaVOnTp9JxPX+F+Zn7IcLYMzM8kZofDImfsKZd8MbR+ikdOzTeztStWqfrqIxZnYWryyI9ePm3NGjnZgGw==} - engines: {node: '>=20.19.0'} - ast-module-types@6.0.1: resolution: {integrity: sha512-WHw67kLXYbZuHTmcdbIrVArCq5wxo6NEuj3hiYAWr8mwJeC+C2mMCIBIWCiDoCye/OF/xelc+teJ1ERoWmnEIA==} engines: {node: '>=18'} @@ -6471,6 +5799,21 @@ packages: react: optional: true + autumn-js@0.1.63: + resolution: {integrity: sha512-iGmnaGEl7JI//LQiK5fV8K+e6sW0sSlbfH/DtxjZKtji14cIli7BPANpy9oXnIntDFuQqs3/XMHPD74J+gnldg==} + peerDependencies: + better-auth: ^1.3.17 + better-call: ^1.0.12 + convex: ^1.25.4 + react: '*' + peerDependenciesMeta: + better-auth: + optional: true + better-call: + optional: true + react: + optional: true + ava@5.3.1: resolution: {integrity: sha512-Scv9a4gMOXB6+ni4toLuhAm9KYWEjsgBglJl+kMGI5+IVDt120CCDZyB5HNU9DjmLI2t4I0GbnxGLmmRfGTJGg==} engines: {node: '>=14.19 <15 || >=16.15 <17 || >=18'} @@ -6542,9 +5885,9 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - basic-auth@2.0.1: - resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} - engines: {node: '>= 0.8'} + baseline-browser-mapping@2.9.11: + resolution: {integrity: sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==} + hasBin: true bcp-47-match@2.0.3: resolution: {integrity: sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==} @@ -6593,9 +5936,6 @@ packages: better-call@1.0.19: resolution: {integrity: sha512-sI3GcA1SCVa3H+CDHl8W8qzhlrckwXOTKhqq3OOPXjgn5aTOMIqGY34zLY/pHA6tRRMjTUC3lz5Mi7EbDA24Kw==} - better-call@1.0.19: - resolution: {integrity: sha512-sI3GcA1SCVa3H+CDHl8W8qzhlrckwXOTKhqq3OOPXjgn5aTOMIqGY34zLY/pHA6tRRMjTUC3lz5Mi7EbDA24Kw==} - better-sqlite3@12.2.0: resolution: {integrity: sha512-eGbYq2CT+tos1fBwLQ/tkBt9J5M3JEHjku4hbvQUePCckkvVf14xWj+1m7dGoK81M/fOjFT7yM9UMeKT/+vFLQ==} engines: {node: 20.x || 22.x || 23.x || 24.x} @@ -6607,9 +5947,6 @@ packages: bindings@1.5.0: resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - birpc@2.9.0: - resolution: {integrity: sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw==} - bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} @@ -6619,10 +5956,6 @@ packages: blueimp-md5@2.19.0: resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} - body-parser@1.20.4: - resolution: {integrity: sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - body-parser@2.2.0: resolution: {integrity: sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==} engines: {node: '>=18'} @@ -6630,9 +5963,8 @@ packages: boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - boxen@7.1.1: - resolution: {integrity: sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==} - engines: {node: '>=14.16'} + bowser@2.12.1: + resolution: {integrity: sha512-z4rE2Gxh7tvshQ4hluIT7XcFrgLIQaw9X3A+kTTRdovCz5PMukm/0QC/BKSYPj3omF5Qfypn9O/c5kgpmvYUCw==} brace-expansion@1.1.12: resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} @@ -6689,8 +6021,8 @@ packages: peerDependencies: '@types/react': ^19 - bun-types@1.3.4: - resolution: {integrity: sha512-5ua817+BZPZOlNaRgGBpZJOSAQ9RQ17pkwPD0yR7CfJg+r8DgIILByFifDTa+IPDDxzf5VNhtNlcKqFzDgJvlQ==} + bun-types@1.3.5: + resolution: {integrity: sha512-inmAYe2PFLs0SUbFOWSVD24sg1jFlMPxOjOSSCYqUgn4Hsc3rDc7dFvfVYjFPNHtov6kgUeulV4SxbuIV/stPw==} bundle-name@4.1.0: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} @@ -6749,10 +6081,6 @@ packages: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} - camelcase-keys@6.2.2: - resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} - engines: {node: '>=8'} - camelcase-keys@7.0.2: resolution: {integrity: sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==} engines: {node: '>=12'} @@ -6790,10 +6118,6 @@ packages: resolution: {integrity: sha512-48af6xm9gQK8rhIcOxWwdGzIervm8BVTin+yRp9HEvU20BtVZ2lBywlIJBzwaDtvo0FvjeL7QdCADoUoqIbV3A==} engines: {node: '>=18'} - chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -6875,6 +6199,9 @@ packages: class-variance-authority@0.7.1: resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} + classnames@2.5.1: + resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} + clean-regexp@1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} @@ -6899,10 +6226,34 @@ packages: resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + cli-highlight@2.1.11: + resolution: {integrity: sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==} + engines: {node: '>=8.0.0', npm: '>=5.0.0'} + hasBin: true + cli-spinners@2.9.2: resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} engines: {node: '>=6'} + cli-table3@0.6.5: + resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} + engines: {node: 10.* || >= 12.*} + + cli-testing-library@3.0.1: + resolution: {integrity: sha512-fkQ8D2hQS53RP3s0yuCMHmTfPUMEqtVtJG0rs13MNE2khnkSaY8MsNxN7rSJZAzOOVsSg2I2F2XjEITJwf5dFg==} + engines: {node: '>=16'} + peerDependencies: + '@jest/expect': ^29.0.0 + '@jest/globals': ^29.0.0 + vitest: ^3.0.0 + peerDependenciesMeta: + '@jest/expect': + optional: true + '@jest/globals': + optional: true + vitest: + optional: true + cli-truncate@3.1.0: resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -6925,6 +6276,9 @@ packages: cliui@5.0.0: resolution: {integrity: sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==} + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -6977,10 +6331,6 @@ packages: color@3.2.1: resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} - color@4.2.3: - resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} - engines: {node: '>=12.5.0'} - colorspace@1.1.4: resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} @@ -7017,31 +6367,16 @@ packages: common-path-prefix@3.0.0: resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} - common-tags@1.8.2: - resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} - engines: {node: '>=4.0.0'} - commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} compatx@0.2.0: resolution: {integrity: sha512-6gLRNt4ygsi5NyMVhceOCFv14CIdDFN7fQjX1U4+47qVE/+kjPoXMK65KWK+dWxmFzMTuKazoQ9sch6pM0p5oA==} - component-emitter@1.3.1: - resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} - compress-commons@6.0.2: resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} engines: {node: '>= 14'} - compressible@2.0.18: - resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} - engines: {node: '>= 0.6'} - - compression@1.8.1: - resolution: {integrity: sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==} - engines: {node: '>= 0.8.0'} - compute-scroll-into-view@3.1.1: resolution: {integrity: sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw==} @@ -7052,8 +6387,8 @@ packages: resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} - concurrently@9.2.1: - resolution: {integrity: sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==} + concurrently@9.2.0: + resolution: {integrity: sha512-IsB/fiXTupmagMW4MNp2lx2cdSN2FfZq78vF90LBB+zZHArbIQZjQtzXCiXnvTxCZSvXanTqFLWBjw2UkLx1SQ==} engines: {node: '>=18'} hasBin: true @@ -7070,10 +6405,6 @@ packages: resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} engines: {node: ^14.18.0 || >=16.10.0} - content-disposition@0.5.4: - resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} - engines: {node: '>= 0.6'} - content-disposition@1.0.0: resolution: {integrity: sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==} engines: {node: '>= 0.6'} @@ -7116,22 +6447,6 @@ packages: peerDependencies: convex: ^1.16.4 - convex@1.25.4: - resolution: {integrity: sha512-LiGZZTmbe5iHWwDOYfSA00w+uDM8kgLC0ohFJW0VgQlKcs8famHCE6yuplk4wwXyj9Lhb1+yMRfrAD2ZEquqHg==} - engines: {node: '>=18.0.0', npm: '>=7.0.0'} - hasBin: true - peerDependencies: - '@auth0/auth0-react': ^2.0.1 - '@clerk/clerk-react': ^4.12.8 || ^5.0.0 - react: ^18.0.0 || ^19.0.0-0 || ^19.0.0 - peerDependenciesMeta: - '@auth0/auth0-react': - optional: true - '@clerk/clerk-react': - optional: true - react: - optional: true - convex@1.29.3: resolution: {integrity: sha512-tg5TXzMjpNk9m50YRtdp6US+t7ckxE4E+7DNKUCjJ2MupQs2RBSPF/z5SNN4GUmQLSfg0eMILDySzdAvjTrhnw==} engines: {node: '>=18.0.0', npm: '>=7.0.0'} @@ -7148,8 +6463,8 @@ packages: react: optional: true - convex@1.27.5: - resolution: {integrity: sha512-6YU/AVPnoNdAaJABKBI9c5IqRSKsow/c4yo/ntaOWtd8Dff2P2zaImA/ougICfPgTuTvjKRbgkxk6lJhODzb4g==} + convex@1.31.2: + resolution: {integrity: sha512-RFuJOwlL2bM5X63egvBI5ZZZH6wESREpAbHsLjODxzDeJuewTLKrEnbvHV/NWp1uJYpgEFJziuGHmZ0tnAmmJg==} engines: {node: '>=18.0.0', npm: '>=7.0.0'} hasBin: true peerDependencies: @@ -7170,17 +6485,10 @@ packages: cookie-es@2.0.0: resolution: {integrity: sha512-RAj4E421UYRgqokKUmotqAwuplYw15qtdXfY+hGzgCJ/MBjCVZcSoHK/kH9kocfjRjcDME7IiDWR/1WX1TM2Pg==} - cookie-signature@1.0.7: - resolution: {integrity: sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==} - cookie-signature@1.2.2: resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} engines: {node: '>=6.6.0'} - cookie@0.5.0: - resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} - engines: {node: '>= 0.6'} - cookie@0.7.2: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} @@ -7189,9 +6497,6 @@ packages: resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} engines: {node: '>=18'} - cookiejar@2.1.4: - resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} - copy-file@11.1.0: resolution: {integrity: sha512-X8XDzyvYaA6msMyAM575CUoygY5b44QzLcGRKsK3MFmXcOvQa518dNPLsKYwkYsn72g3EiW+LE0ytd/FlqWmyw==} engines: {node: '>=18'} @@ -7216,9 +6521,6 @@ packages: typescript: optional: true - country-flag-icons@1.6.4: - resolution: {integrity: sha512-Z3Zi419FI889tlElMsVhCIS5eRkiLDWixr576J5DPiTe5RGxpbRi+enMpHdYVp5iK5WFjr8P/RgyIFAGhFsiFg==} - crc-32@1.2.2: resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} engines: {node: '>=0.8'} @@ -7244,10 +6546,6 @@ packages: resolution: {integrity: sha512-p9nwwR4qyT5W996vBZhdvBCnMhicY5ytZkR4D1Xj0wuTDEiMnjwR57Q3RXYY/s0EpX6Ay3vgIcfaR+ewGHsi+g==} engines: {node: '>=18.0'} - cross-spawn@6.0.6: - resolution: {integrity: sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==} - engines: {node: '>=4.8'} - cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -7255,14 +6553,6 @@ packages: crossws@0.3.5: resolution: {integrity: sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==} - crossws@0.4.1: - resolution: {integrity: sha512-E7WKBcHVhAVrY6JYD5kteNqVq1GSZxqGrdSiwXR9at+XHi43HJoCQKXcCczR5LBnBquFZPsB3o7HklulKoBU5w==} - peerDependencies: - srvx: '>=0.7.1' - peerDependenciesMeta: - srvx: - optional: true - css-select@5.2.2: resolution: {integrity: sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==} @@ -7278,9 +6568,6 @@ packages: engines: {node: '>=4'} hasBin: true - csstype@3.1.1: - resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} - csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} @@ -7362,9 +6649,6 @@ packages: resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} engines: {node: '>=6'} - dax-sh@0.39.2: - resolution: {integrity: sha512-gpuGEkBQM+5y6p4cWaw9+ePy5TNon+fdwFVtTI8leU3UhwhsBfPewRxMXGuQNC+M2b/MDGMlfgpqynkcd0C3FQ==} - db0@0.3.2: resolution: {integrity: sha512-xzWNQ6jk/+NtdfLyXEipbX55dmDSeteLFt/ayF+wZUU5bzKgmrDOxmInUTbyVRp46YwnJdkDA1KhB7WIXFofJw==} peerDependencies: @@ -7388,14 +6672,6 @@ packages: sqlite3: optional: true - debug@2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -7435,9 +6711,6 @@ packages: decimal.js-light@2.5.1: resolution: {integrity: sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==} - decimal.js@10.6.0: - resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} - decode-named-character-reference@1.2.0: resolution: {integrity: sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==} @@ -7468,10 +6741,6 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - deepmerge@4.2.2: - resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} - engines: {node: '>=0.10.0'} - deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} @@ -7525,10 +6794,6 @@ packages: destr@2.0.5: resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} - destroy@1.2.0: - resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - detect-libc@1.0.3: resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} engines: {node: '>=0.10'} @@ -7595,9 +6860,6 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - dezalgo@1.0.4: - resolution: {integrity: sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==} - didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -7652,9 +6914,6 @@ packages: domutils@3.2.2: resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} - dot-case@3.0.4: - resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} - dot-prop@9.0.0: resolution: {integrity: sha512-1gxPBJpI/pcjQhKgIU91II6Wkay+dLcN3M6rf2uwP8hRur3HtQXjVrdAK3sjC0piaEuxzMwjXChcETiJl47lAQ==} engines: {node: '>=18'} @@ -7671,15 +6930,6 @@ packages: resolution: {integrity: sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==} engines: {node: '>=12'} - dts-resolver@2.1.3: - resolution: {integrity: sha512-bihc7jPC90VrosXNzK0LTE2cuLP6jr0Ro8jk+kMugHReJVLIpHz/xadeq3MhuwyO4TD4OA3L1Q8pBBFRc08Tsw==} - engines: {node: '>=20.19.0'} - peerDependencies: - oxc-resolver: '>=11.0.0' - peerDependenciesMeta: - oxc-resolver: - optional: true - dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} @@ -7699,11 +6949,6 @@ packages: electron-to-chromium@1.5.208: resolution: {integrity: sha512-ozZyibehoe7tOhNaf16lKmljVf+3npZcJIEbJRVftVsmAg5TeA1mGS9dVCZzOwr2xT7xK15V0p7+GZqSPgkuPg==} - elysia-clerk@0.12.2: - resolution: {integrity: sha512-pGI/68gLg1QTLfeZATtnsxgzpoc/vyGXwXvvFp7tEVKJp6VdnWJvVgepxH23uwF0xHahluzGFe7IFue8lPOiaQ==} - peerDependencies: - elysia: ^1.2.0 - elysia@1.3.8: resolution: {integrity: sha512-kxYFhegJbUEf5otzmisEvGt3R7d/dPBNVERO2nHo0kFqKBHyj5slArc90mSRKLfi1vamMtPcz67rL6Zeg5F2yg==} peerDependencies: @@ -7731,9 +6976,8 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - empathic@2.0.0: - resolution: {integrity: sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==} - engines: {node: '>=14'} + emojilib@2.4.0: + resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} enabled@2.0.0: resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} @@ -7841,11 +7085,6 @@ packages: esbuild: '*' postcss: ^8.0.0 - esbuild@0.20.2: - resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} - engines: {node: '>=12'} - hasBin: true - esbuild@0.25.4: resolution: {integrity: sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==} engines: {node: '>=18'} @@ -7861,6 +7100,11 @@ packages: engines: {node: '>=18'} hasBin: true + esbuild@0.27.2: + resolution: {integrity: sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -7889,20 +7133,6 @@ packages: engines: {node: '>=6.0'} hasBin: true - eslint-config-airbnb-base@15.0.0: - resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==} - engines: {node: ^10.12.0 || >=12.0.0} - peerDependencies: - eslint: ^7.32.0 || ^8.2.0 - eslint-plugin-import: ^2.25.2 - - eslint-config-airbnb-typescript@18.0.0: - resolution: {integrity: sha512-oc+Lxzgzsu8FQyFVa4QFaVKiitTYiiW3frB9KYW5OWdPrqFc7FzxgB20hP4cHMlr+MBzGcLl3jnCOVOydL9mIg==} - peerDependencies: - '@typescript-eslint/eslint-plugin': ^7.0.0 - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 - eslint-config-next@15.1.4: resolution: {integrity: sha512-u9+7lFmfhKNgGjhQ9tBeyCFsPJyq0SvGioMJBngPC7HXUpR0U+ckEwQR48s7TrRNHra1REm6evGL2ie38agALg==} peerDependencies: @@ -7912,17 +7142,8 @@ packages: typescript: optional: true - eslint-config-next@15.2.1: - resolution: {integrity: sha512-mhsprz7l0no8X+PdDnVHF4dZKu9YBJp2Rf6ztWbXBLJ4h6gxmW//owbbGJMBVUU+PibGJDAqZhW4pt8SC8HSow==} - peerDependencies: - eslint: ^7.23.0 || ^8.0.0 || ^9.0.0 - typescript: '>=3.3.1' - peerDependenciesMeta: - typescript: - optional: true - - eslint-config-next@15.2.3: - resolution: {integrity: sha512-VDQwbajhNMFmrhLWVyUXCqsGPN+zz5G8Ys/QwFubfsxTIrkqdx3N3x3QPW+pERz8bzGPP0IgEm8cNbZcd8PFRQ==} + eslint-config-next@15.3.1: + resolution: {integrity: sha512-GnmyVd9TE/Ihe3RrvcafFhXErErtr2jS0JDeCSp3vWvy86AXwHsRBt0E3MqP/m8ACS1ivcsi5uaqjbhsG18qKw==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 || ^9.0.0 typescript: '>=3.3.1' @@ -7939,15 +7160,6 @@ packages: typescript: optional: true - eslint-config-next@15.4.1: - resolution: {integrity: sha512-XIIN+lq8XuSwXUrcv+0uHMDFGJFPxLAw04/a4muFZYygSvStvVa15nY7kh4Il6yOVJyxdMUyVdQ9ApGedaeupw==} - peerDependencies: - eslint: ^7.23.0 || ^8.0.0 || ^9.0.0 - typescript: '>=3.3.1' - peerDependenciesMeta: - typescript: - optional: true - eslint-config-prettier@8.10.2: resolution: {integrity: sha512-/IGJ6+Dka158JnP5n5YFMOszjDWrXggGz1LaK/guZq9vZTmniaKlHcsscvkAhn9y4U+BU3JuUdYvtAMcv30y4A==} hasBin: true @@ -8097,6 +7309,12 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 + eslint-plugin-react-hooks@7.0.1: + resolution: {integrity: sha512-O0d0m04evaNzEPoSW+59Mezf8Qt0InfgGIBJnpC0h3NH/WjUAR7BIKUfysC6todmtiZ/A0oUVS8Gce0WhBrHsA==} + engines: {node: '>=18'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 + eslint-plugin-react-refresh@0.4.26: resolution: {integrity: sha512-1RETEylht2O6FM/MvgnyvT+8K21wLqDNg4qD51Zj3guhjt433XbnnkVttHMyaVyAFD03QSV4LPS5iE3VQmO7XQ==} peerDependencies: @@ -8114,8 +7332,8 @@ packages: peerDependencies: eslint: '>=8.23.1' - eslint-plugin-unused-imports@4.2.0: - resolution: {integrity: sha512-hLbJ2/wnjKq4kGA9AUaExVFIbNzyxYdVo49QZmKCnhk5pc9wcYRbfgLHvWJ8tnsdcseGhoUAddm9gn/lt+d74w==} + eslint-plugin-unused-imports@4.3.0: + resolution: {integrity: sha512-ZFBmXMGBYfHttdRtOG9nFFpmUvMtbHSjsKrS20vdWdbfiVYsO3yA2SGYy9i9XmZJDfMGBflZGBCm70SEnFQtOA==} peerDependencies: '@typescript-eslint/eslint-plugin': ^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0 eslint: ^9.0.0 || ^8.0.0 @@ -8299,10 +7517,6 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - exit-hook@2.2.1: - resolution: {integrity: sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==} - engines: {node: '>=6'} - exit@0.1.2: resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} engines: {node: '>= 0.8.0'} @@ -8325,10 +7539,6 @@ packages: peerDependencies: express: '>= 4.11' - express@4.22.1: - resolution: {integrity: sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==} - engines: {node: '>= 0.10.0'} - express@5.1.0: resolution: {integrity: sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==} engines: {node: '>= 18'} @@ -8384,18 +7594,12 @@ packages: resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==} engines: {node: '>=6'} - fast-safe-stringify@2.1.1: - resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} - fast-sha256@1.3.0: resolution: {integrity: sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==} fast-uri@3.0.6: resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==} - fastify-plugin@5.1.0: - resolution: {integrity: sha512-FAIDA8eovSt5qcDgcBvDuX/v0Cjz0ohGhENZ/wpc3y+oZCY2afZ9Baqql3g/lC+OHRnciQol4ww7tuthOb9idw==} - fastify@5.5.0: resolution: {integrity: sha512-ZWSWlzj3K/DcULCnCjEiC2zn2FBPdlZsSA/pnPa/dbUfLvxkD/Nqmb0XXMXLrWkeM4uQPUvjdJpwtXmTfriXqw==} @@ -8458,10 +7662,6 @@ packages: resolution: {integrity: sha512-xdMtCAODmPloU9qtmPcdBV9Kd27NtMse+4ayThxqIHUES5Z2S6bGpap5PpdmNM56ub7y3i1eyr+vJJIIgWGKmA==} engines: {node: '>=18'} - finalhandler@1.3.2: - resolution: {integrity: sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==} - engines: {node: '>= 0.8'} - finalhandler@2.1.0: resolution: {integrity: sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==} engines: {node: '>= 0.8'} @@ -8535,10 +7735,6 @@ packages: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} - form-data@3.0.4: - resolution: {integrity: sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ==} - engines: {node: '>= 6'} - form-data@4.0.4: resolution: {integrity: sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==} engines: {node: '>= 6'} @@ -8547,10 +7743,6 @@ packages: resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} engines: {node: '>=12.20.0'} - formidable@3.5.4: - resolution: {integrity: sha512-YikH+7CUTOtP44ZTnUhR7Ic2UASBPOqmaRkRKxRbywPTe5VxF7RRCck4af9wutiZ/QKM5nME9Bie2fFaPz5Gug==} - engines: {node: '>=14.0.0'} - forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -8558,10 +7750,6 @@ packages: fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} - fresh@0.5.2: - resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} - engines: {node: '>= 0.6'} - fresh@2.0.0: resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} engines: {node: '>= 0.8'} @@ -8690,10 +7878,6 @@ packages: get-port-please@3.2.0: resolution: {integrity: sha512-I9QVvBw5U/hw3RmWpYKRumUeaDgxTPd401x364rLmWBJcOQ753eov1eTgzDqRG9bqFIfDc7gfzcQEWrUri3o1A==} - get-port@5.1.1: - resolution: {integrity: sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==} - engines: {node: '>=8'} - get-proto@1.0.1: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} @@ -8795,19 +7979,11 @@ packages: resolution: {integrity: sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==} engines: {node: '>=18'} - globrex@0.1.2: - resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - gonzales-pe@4.3.0: resolution: {integrity: sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==} engines: {node: '>=0.6.0'} hasBin: true - goober@2.1.18: - resolution: {integrity: sha512-2vFqsaDVIT9Gz7N6kAL++pLpp41l3PfDuusHcjnGLfR6+huZkl6ziX+zgVC3ZxpqWhzH6pyDdGrCeDhMIvwaxw==} - peerDependencies: - csstype: ^3.0.10 - gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -8914,9 +8090,14 @@ packages: headers-polyfill@4.0.3: resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} - helmet@8.1.0: - resolution: {integrity: sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==} - engines: {node: '>=18.0.0'} + hermes-estree@0.25.1: + resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==} + + hermes-parser@0.25.1: + resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==} + + highlight.js@10.7.3: + resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} hono@4.9.1: resolution: {integrity: sha512-qfvdJ42t6CQE0N/iSCa8KsW8SQqYD67YB+TYbwPHlnALvX+s7ynh8otR1NEk5jXtUg73gpV/B82OSufDmwtX3w==} @@ -8953,14 +8134,6 @@ packages: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} - http-errors@2.0.1: - resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} - engines: {node: '>= 0.8'} - - http-proxy@1.18.1: - resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} - engines: {node: '>=8.0.0'} - http-shutdown@1.2.2: resolution: {integrity: sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} @@ -8992,10 +8165,6 @@ packages: resolution: {integrity: sha512-1dhVQZXhcHje7798IVM+xoo/1ZdVfzOMIc8/rgVSijRK38EDqOJoGula9N/8ZI5RD8QTxNQtK/Gozpr+qUqRRA==} engines: {node: '>=20.0.0'} - iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} - iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -9094,12 +8263,6 @@ packages: inline-style-parser@0.2.4: resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==} - input-otp@1.4.2: - resolution: {integrity: sha512-l3jWwYNvrEa6NTCt7BECfCm48GvwuZzkoeG3gBL2w4CHeOXW3eKFmf9UNYkNfYc3mxMrthMnxjIE07MT0zLBQA==} - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc - inquirer@12.9.1: resolution: {integrity: sha512-G7uXAb9OiLcd+9jmA/7KKrItvFF00kKk/jb6CtG+Tm2zSPWfzzhyJwDhVCy+mBmE32o2zJnB5JnknIIv2Ft+AA==} engines: {node: '>=18'} @@ -9125,41 +8288,17 @@ packages: resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} engines: {node: '>= 0.10'} - intl-messageformat@10.7.18: - resolution: {integrity: sha512-m3Ofv/X/tV8Y3tHXLohcuVuhWKo7BBq62cqY15etqmLxg2DZ34AGGgQDeR+SCta2+zICb1NX83af0GJmbQ1++g==} - ioredis@5.7.0: resolution: {integrity: sha512-NUcA93i1lukyXU+riqEyPtSEkyFq8tX90uL659J+qpCZ3rEdViB/APC58oAhIh3+bJln2hzdlZbBZsGNrlsR8g==} - engines: {node: '>=12.22.0'} - - ipaddr.js@1.9.1: - resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} - engines: {node: '>= 0.10'} - - ipaddr.js@2.2.0: - resolution: {integrity: sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==} - engines: {node: '>= 10'} - - iron-session@6.3.1: - resolution: {integrity: sha512-3UJ7y2vk/WomAtEySmPgM6qtYF1cZ3tXuWX5GsVX4PJXAcs5y/sV9HuSfpjKS6HkTL/OhZcTDWJNLZ7w+Erx3A==} - engines: {node: '>=12'} - peerDependencies: - express: '>=4' - koa: '>=2' - next: '>=10' - peerDependenciesMeta: - express: - optional: true - koa: - optional: true - next: - optional: true + engines: {node: '>=12.22.0'} - iron-session@8.0.4: - resolution: {integrity: sha512-9ivNnaKOd08osD0lJ3i6If23GFS2LsxyMU8Gf/uBUEgm8/8CC1hrrCHFDpMo3IFbpBgwoo/eairRsaD3c5itxA==} + ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} - iron-webcrypto@0.2.8: - resolution: {integrity: sha512-YPdCvjFMOBjXaYuDj5tiHst5CEk6Xw84Jo8Y2+jzhMceclAnb3+vNPP/CTtb5fO2ZEuXEaO4N+w62Vfko757KA==} + ipaddr.js@2.2.0: + resolution: {integrity: sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==} + engines: {node: '>= 10'} iron-webcrypto@1.2.1: resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==} @@ -9321,10 +8460,6 @@ packages: resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} engines: {node: '>= 0.4'} - is-network-error@1.3.0: - resolution: {integrity: sha512-6oIwpsgRfnDiyEDLMay/GqCl3HoAtH5+RUKW29gYkL0QA+ipzpDLA16yQs7/RHCSu+BwgbJaOUqa4A99qNVQVw==} - engines: {node: '>=16'} - is-node-process@1.2.0: resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==} @@ -9667,9 +8802,6 @@ packages: jose@5.10.0: resolution: {integrity: sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==} - jose@5.6.3: - resolution: {integrity: sha512-1Jh//hEEwMhNYPDDLwXHa2ePWgWiFNNUadVmguAAw2IJ6sj9mNxV5tGXJNqlMkJAybF6Lgw1mISDxTePP/187g==} - jose@6.1.0: resolution: {integrity: sha512-TTQJyoEoKcC1lscpVDCSsVgYzUDg/0Bt3WE//WiTPK6uOCQC2KZS4MpugbMWt/zyjkopgZoXhZuCi00gLudfUA==} @@ -9677,10 +8809,6 @@ packages: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} - js-cookie@3.0.1: - resolution: {integrity: sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==} - engines: {node: '>=12'} - js-cookie@3.0.5: resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} engines: {node: '>=14'} @@ -9707,11 +8835,6 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true - jsesc@3.0.2: - resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} - engines: {node: '>=6'} - hasBin: true - jsesc@3.1.0: resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} engines: {node: '>=6'} @@ -9720,9 +8843,6 @@ packages: json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - json-parse-better-errors@1.0.2: - resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} - json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} @@ -9814,9 +8934,6 @@ packages: resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==} engines: {node: '>= 0.6.3'} - leb@1.0.0: - resolution: {integrity: sha512-Y3c3QZfvKWHX60BVOQPhLCvVGmDYWyJEiINE3drOog6KCyN2AOwvuQQzlS3uJg1J85kzpILXIUwRXULWavir+w==} - leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -9981,10 +9098,6 @@ packages: resolution: {integrity: sha512-I8oW2+QL5KJo8zXNWX046M134WchxsXC7SawLPvRQpogCbkyQIaFxPE89A2HiwR7vAK2Dm2ERBAmyjTYGYEpBg==} hasBin: true - load-json-file@4.0.0: - resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} - engines: {node: '>=4'} - load-json-file@7.0.1: resolution: {integrity: sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -10066,9 +9179,6 @@ packages: loupe@3.2.1: resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} - lower-case@2.0.2: - resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} - lowercase-keys@1.0.1: resolution: {integrity: sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==} engines: {node: '>=0.10.0'} @@ -10096,8 +9206,8 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 - lucide-react@0.510.0: - resolution: {integrity: sha512-p8SQRAMVh7NhsAIETokSqDrc5CHnDLbV29mMnzaXx+Vc/hnqQzwI2r0FMWCcoTXnbw2KEjy48xwpGdEL+ck06Q==} + lucide-react@0.511.0: + resolution: {integrity: sha512-VK5a2ydJ7xm8GvBeKLS9mu1pVK6ucef9780JVUjw6bAjJL/QXnd4Y0p7SPeOUMC27YhzNCZvm5d/QX0Tp3rc0w==} peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -10111,11 +9221,6 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 - lucide-react@0.542.0: - resolution: {integrity: sha512-w3hD8/SQB7+lzU2r4VdFyzzOzKnUjTZIF/MQJGSSvni7Llewni4vuViRppfRAa2guOsY5k4jZyxw/i9DQHv+dw==} - peerDependencies: - react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 - luxon@3.7.1: resolution: {integrity: sha512-RkRWjA926cTvz5rAb1BqyWkKbbjzCGchDUIKMCUvNi17j6f6j8uHGDV82Aqcqtzd+icoYpELmG3ksgGiFNNcNg==} engines: {node: '>=12'} @@ -10158,6 +9263,17 @@ packages: markdown-table@3.0.4: resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==} + marked-terminal@7.3.0: + resolution: {integrity: sha512-t4rBvPsHc57uE/2nJOLmMbZCQ4tgAccAED3ngXQqW6g+TxA488JzJ+FK3lQkzBQOI1mRV/r/Kq+1ZlJ4D0owQw==} + engines: {node: '>=16.0.0'} + peerDependencies: + marked: '>=1 <16' + + marked@9.1.6: + resolution: {integrity: sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==} + engines: {node: '>= 16'} + hasBin: true + matcher@5.0.0: resolution: {integrity: sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -10218,10 +9334,6 @@ packages: mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} - media-typer@0.3.0: - resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} - engines: {node: '>= 0.6'} - media-typer@1.1.0: resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} engines: {node: '>= 0.8'} @@ -10245,9 +9357,6 @@ packages: resolution: {integrity: sha512-Cl0yeeIrko6d94KpUo1M+0X1sB14ikoaqlIGuTH1fW4I+E3+YljL54/hb/BWmVfrV9tTV9zU04+xjw08Fh2WkA==} engines: {node: '>=14.16'} - merge-descriptors@1.0.3: - resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} - merge-descriptors@2.0.0: resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} engines: {node: '>=18'} @@ -10263,10 +9372,6 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - methods@1.1.2: - resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} - engines: {node: '>= 0.6'} - micro-api-client@3.3.0: resolution: {integrity: sha512-y0y6CUB9RLVsy3kfgayU28746QrNMpSm9O/AYGNsBgOkJr/X/Jk0VLGoO8Ude7Bpa8adywzF+MzXNZRFRsNPhg==} @@ -10398,16 +9503,6 @@ packages: resolution: {integrity: sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==} engines: {node: '>= 0.6'} - mime@1.6.0: - resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} - engines: {node: '>=4'} - hasBin: true - - mime@2.6.0: - resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} - engines: {node: '>=4.0.0'} - hasBin: true - mime@3.0.0: resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} engines: {node: '>=10.0.0'} @@ -10485,10 +9580,6 @@ packages: engines: {node: '>=18'} hasBin: true - morgan@1.10.1: - resolution: {integrity: sha512-223dMRJtI/l25dJKWpgij2cMtywuG/WiUKXdvwfbhGKBhy1puASqXwFzmWZ7+K73vUPoR7SS2Qz2cI/g9MKw0A==} - engines: {node: '>= 0.8.0'} - mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -10497,9 +9588,6 @@ packages: resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} engines: {node: '>=10'} - ms@2.0.0: - resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -10548,14 +9636,6 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - negotiator@0.6.3: - resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} - engines: {node: '>= 0.6'} - - negotiator@0.6.4: - resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==} - engines: {node: '>= 0.6'} - negotiator@1.0.0: resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} engines: {node: '>= 0.6'} @@ -10567,67 +9647,12 @@ packages: resolution: {integrity: sha512-Nc3loyVASW59W+8fLDZT1lncpG7llffyZ2o0UQLx/Fr20i7P8oP+lE7+TEcFvXj9IUWU6LjB9P3BH+iFGyp+mg==} engines: {node: ^14.16.0 || >=16.0.0} - next-intl-swc-plugin-extractor@4.6.1: - resolution: {integrity: sha512-+HHNeVERfSvuPDF7LYVn3pxst5Rf7EYdUTw7C7WIrYhcLaKiZ1b9oSRkTQddAN3mifDMCfHqO4kAQ/pcKiBl3A==} - - next-intl@4.6.1: - resolution: {integrity: sha512-KlWgWtKLBPUsTPgxqwyjws1wCMD2QKxLlVjeeGj53DC1JWfKmBShKOrhIP0NznZrRQ0GleeoDUeHSETmyyIFeA==} - peerDependencies: - next: ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0 - typescript: ^5.0.0 - peerDependenciesMeta: - typescript: - optional: true - next-themes@0.4.6: resolution: {integrity: sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==} peerDependencies: react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc - next@15.2.1: - resolution: {integrity: sha512-zxbsdQv3OqWXybK5tMkPCBKyhIz63RstJ+NvlfkaLMc/m5MwXgz2e92k+hSKcyBpyADhMk2C31RIiaDjUZae7g==} - engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} - hasBin: true - peerDependencies: - '@opentelemetry/api': ^1.1.0 - '@playwright/test': ^1.41.2 - babel-plugin-react-compiler: '*' - react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 - react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 - sass: ^1.3.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - '@playwright/test': - optional: true - babel-plugin-react-compiler: - optional: true - sass: - optional: true - - next@15.2.3: - resolution: {integrity: sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w==} - engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} - hasBin: true - peerDependencies: - '@opentelemetry/api': ^1.1.0 - '@playwright/test': ^1.41.2 - babel-plugin-react-compiler: '*' - react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 - react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 - sass: ^1.3.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - '@playwright/test': - optional: true - babel-plugin-react-compiler: - optional: true - sass: - optional: true - next@15.3.4: resolution: {integrity: sha512-mHKd50C+mCjam/gcnwqL1T1vPx/XQNFlXqFIVdgQdVAFY9iIQtY0IfaVflEYzKiqjeA7B0cYYMaCrmAYFjs4rA==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} @@ -10650,9 +9675,9 @@ packages: sass: optional: true - next@15.4.1: - resolution: {integrity: sha512-eNKB1q8C7o9zXF8+jgJs2CzSLIU3T6bQtX6DcTnCq1sIR1CJ0GlSyRs1BubQi3/JgCnr9Vr+rS5mOMI38FFyQw==} - engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} + next@16.1.1: + resolution: {integrity: sha512-QI+T7xrxt1pF6SQ/JYFz95ro/mg/1Znk5vBebsWwbpejj1T0A23hO7GYEaVac9QUOT2BIMiuzm0L99ooq7k0/w==} + engines: {node: '>=20.9.0'} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 @@ -10671,9 +9696,6 @@ packages: sass: optional: true - nice-try@1.0.5: - resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} - nitropack@2.12.4: resolution: {integrity: sha512-MPmPRJWTeH03f/NmpN4q3iI3Woik4uaaWIoX34W3gMJiW06Vm1te/lPzuu5EXpXOK7Q2m3FymGMPXcExqih96Q==} engines: {node: ^16.11.0 || >=17.0.0} @@ -10684,9 +9706,6 @@ packages: xml2js: optional: true - no-case@3.0.4: - resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - node-abi@3.75.0: resolution: {integrity: sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==} engines: {node: '>=10'} @@ -10699,8 +9718,9 @@ packages: engines: {node: '>=10.5.0'} deprecated: Use your platform's native DOMException instead - node-fetch-native@1.0.1: - resolution: {integrity: sha512-VzW+TAk2wE4X9maiKMlT+GsPU4OMmR1U9CrHSmd3DFLn2IcZ9VJ6M6BBugGfYUnPCLSYxXdZy17M0BEJyhUTwg==} + node-emoji@2.2.0: + resolution: {integrity: sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw==} + engines: {node: '>=18'} node-fetch-native@1.6.7: resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==} @@ -10780,18 +9800,31 @@ packages: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} engines: {node: '>=0.10.0'} + npm-bundled@2.0.1: + resolution: {integrity: sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + npm-normalize-package-bin@2.0.0: + resolution: {integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + npm-normalize-package-bin@4.0.0: resolution: {integrity: sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==} engines: {node: ^18.17.0 || >=20.5.0} + npm-packlist@5.1.3: + resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + hasBin: true + npm-run-all2@7.0.2: resolution: {integrity: sha512-7tXR+r9hzRNOPNTvXegM+QzCuMjzUIIq66VDunL6j60O4RrExx32XUhlrS7UK4VcdGw5/Wxzb3kfNcFix9JKDA==} engines: {node: ^18.17.0 || >=20.5.0, npm: '>= 9'} hasBin: true - npm-run-all@4.1.5: - resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==} - engines: {node: '>= 4'} + npm-run-all2@8.0.4: + resolution: {integrity: sha512-wdbB5My48XKp2ZfJUlhnLVihzeuA1hgBnqB2J9ahV77wLS+/YAJAlN8I+X3DIFIPZ3m5L7nplmlbhNiFDmXRDA==} + engines: {node: ^20.5.0 || >=22.0.0, npm: '>= 10'} hasBin: true npm-run-path@4.0.1: @@ -10867,18 +9900,10 @@ packages: resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} engines: {node: '>=14.0.0'} - on-finished@2.3.0: - resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} - engines: {node: '>= 0.8'} - on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} - on-headers@1.1.0: - resolution: {integrity: sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==} - engines: {node: '>= 0.8'} - once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -11015,10 +10040,6 @@ packages: resolution: {integrity: sha512-RmVuCHWsfu0QPNW+mraxh/xjQVw/lhUCUru8Zni3Ctq3AoMhpDTq0OVdKS6iesd6Kqb7viCV3isAL43dciOSog==} engines: {node: '>=14'} - parse-json@4.0.0: - resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} - engines: {node: '>=4'} - parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -11034,12 +10055,21 @@ packages: parse-numeric-range@1.3.0: resolution: {integrity: sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==} + parse5-htmlparser2-tree-adapter@6.0.1: + resolution: {integrity: sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==} + parse5-htmlparser2-tree-adapter@7.1.0: resolution: {integrity: sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==} parse5-parser-stream@7.1.2: resolution: {integrity: sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==} + parse5@5.1.1: + resolution: {integrity: sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==} + + parse5@6.0.1: + resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} + parse5@7.3.0: resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} @@ -11075,10 +10105,6 @@ packages: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} - path-key@2.0.1: - resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} - engines: {node: '>=4'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -11094,9 +10120,6 @@ packages: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} - path-to-regexp@0.1.12: - resolution: {integrity: sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==} - path-to-regexp@6.3.0: resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} @@ -11104,10 +10127,6 @@ packages: resolution: {integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==} engines: {node: '>=16'} - path-type@3.0.0: - resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} - engines: {node: '>=4'} - path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -11177,11 +10196,6 @@ packages: resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} engines: {node: '>=12'} - pidtree@0.3.1: - resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==} - engines: {node: '>=0.10'} - hasBin: true - pidtree@0.6.0: resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} engines: {node: '>=0.10'} @@ -11191,10 +10205,6 @@ packages: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} - pify@3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - pino-abstract-transport@2.0.0: resolution: {integrity: sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==} @@ -11235,9 +10245,6 @@ packages: pkg-types@2.2.0: resolution: {integrity: sha512-2SM/GZGAEkPp3KWORxQZns4M+WSeXbC2HEvmOIJe3Cmiv6ieAJvdVhDldtHqM5J1Y7MrR1XhkBT/rMlhh9FdqQ==} - pkg-types@2.3.0: - resolution: {integrity: sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==} - plimit-lit@1.6.1: resolution: {integrity: sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==} engines: {node: '>=12'} @@ -11254,9 +10261,6 @@ packages: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} - po-parser@2.0.0: - resolution: {integrity: sha512-SZvoKi3PoI/hHa2V9je9CW7Xgxl4dvO74cvaa6tWShIHT51FkPxje6pt0gTJznJrU67ix91nDaQp2hUxkOYhKA==} - possible-typed-array-names@1.1.0: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} @@ -11401,11 +10405,6 @@ packages: engines: {node: '>=14'} hasBin: true - prettier@3.5.3: - resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} - engines: {node: '>=14'} - hasBin: true - prettier@3.6.2: resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} engines: {node: '>=14'} @@ -11502,9 +10501,6 @@ packages: quansync@0.2.10: resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==} - quansync@1.0.0: - resolution: {integrity: sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==} - query-string@9.2.2: resolution: {integrity: sha512-pDSIZJ9sFuOp6VnD+5IkakSVf+rICAuuU88Hcsr6AKL0QtxSIfVuKiVP2oahFI7tk3CRSexwV+Ya6MOoTxzg9g==} engines: {node: '>=18'} @@ -11522,10 +10518,6 @@ packages: quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} - quick-lru@4.0.1: - resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} - engines: {node: '>=8'} - quick-lru@5.1.1: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} @@ -11537,6 +10529,19 @@ packages: quote-unquote@1.0.0: resolution: {integrity: sha512-twwRO/ilhlG/FIgYeKGFqyHhoEhqgnKVkcmqMKi2r524gz3ZbDTcyFt38E9xjJI2vT+KbRNHVbnJ/e0I25Azwg==} + radix-ui@1.4.3: + resolution: {integrity: sha512-aWizCQiyeAenIdUbqEpXgRA1ya65P13NKn/W8rWkcN0OPkRDxdBVLWnIEDsS2RpwCK2nobI7oMUSmexzTDyAmA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + radix3@1.1.2: resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==} @@ -11547,10 +10552,6 @@ packages: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} - raw-body@2.5.3: - resolution: {integrity: sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==} - engines: {node: '>= 0.8'} - raw-body@3.0.0: resolution: {integrity: sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==} engines: {node: '>= 0.8'} @@ -11567,21 +10568,15 @@ packages: peerDependencies: react: ^18.3.1 - react-dom@19.1.0: - resolution: {integrity: sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==} - peerDependencies: - react: ^19.1.0 - react-dom@19.1.1: resolution: {integrity: sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==} peerDependencies: react: ^19.1.1 - react-hook-form@7.68.0: - resolution: {integrity: sha512-oNN3fjrZ/Xo40SWlHf1yCjlMK417JxoSJVUXQjGdvdRCU07NTFei1i1f8ApUAts+IVh14e4EdakeLEA+BEAs/Q==} - engines: {node: '>=18.0.0'} + react-dom@19.2.3: + resolution: {integrity: sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==} peerDependencies: - react: ^16.8.0 || ^17 || ^18 || ^19 + react: ^19.2.3 react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -11601,12 +10596,8 @@ packages: peerDependencies: react: ^19.1.0 - react-refresh@0.14.2: - resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} - engines: {node: '>=0.10.0'} - - react-refresh@0.17.0: - resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} + react-refresh@0.18.0: + resolution: {integrity: sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==} engines: {node: '>=0.10.0'} react-remove-scroll-bar@2.3.8: @@ -11671,14 +10662,14 @@ packages: resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} - react@19.1.0: - resolution: {integrity: sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==} - engines: {node: '>=0.10.0'} - react@19.1.1: resolution: {integrity: sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==} engines: {node: '>=0.10.0'} + react@19.2.3: + resolution: {integrity: sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==} + engines: {node: '>=0.10.0'} + read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} @@ -11702,10 +10693,6 @@ packages: resolution: {integrity: sha512-vaMRR1AC1nrd5CQM0PhlRsO5oc2AAigqr7cCrZ/MW/Rsaflz4RlgzkpL4qoU/z1F6wrbd85iFv1OQj/y5RdGvg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - read-pkg@3.0.0: - resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} - engines: {node: '>=4'} - read-pkg@5.2.0: resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} engines: {node: '>=8'} @@ -11924,22 +10911,6 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rolldown-plugin-dts@0.13.14: - resolution: {integrity: sha512-wjNhHZz9dlN6PTIXyizB6u/mAg1wEFMW9yw7imEVe3CxHSRnNHVyycIX0yDEOVJfDNISLPbkCIPEpFpizy5+PQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - '@typescript/native-preview': '>=7.0.0-dev.20250601.1' - rolldown: ^1.0.0-beta.9 - typescript: ^5.0.0 - vue-tsc: ^2.2.0 || ^3.0.0 - peerDependenciesMeta: - '@typescript/native-preview': - optional: true - typescript: - optional: true - vue-tsc: - optional: true - rolldown@1.0.0-beta.34: resolution: {integrity: sha512-Wwh7EwalMzzX3Yy3VN58VEajeR2Si8+HDNMf706jPLIqU7CxneRW+dQVfznf5O0TWTnJyu4npelwg2bzTXB1Nw==} hasBin: true @@ -12032,6 +11003,9 @@ packages: scheduler@0.26.0: resolution: {integrity: sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==} + scheduler@0.27.0: + resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} + schema-utils@4.3.2: resolution: {integrity: sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==} engines: {node: '>= 10.13.0'} @@ -12063,10 +11037,6 @@ packages: engines: {node: '>=10'} hasBin: true - send@0.19.2: - resolution: {integrity: sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==} - engines: {node: '>= 0.8.0'} - send@1.2.0: resolution: {integrity: sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==} engines: {node: '>= 18'} @@ -12091,10 +11061,6 @@ packages: serve-placeholder@2.0.2: resolution: {integrity: sha512-/TMG8SboeiQbZJWRlfTCqMs2DD3SZgWp0kDQePz9yUuCnDfDh/92gf7/PxGhzXTKBIPASIHxFcZndoNbp6QOLQ==} - serve-static@1.16.3: - resolution: {integrity: sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==} - engines: {node: '>= 0.8.0'} - serve-static@2.2.0: resolution: {integrity: sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==} engines: {node: '>= 18'} @@ -12127,30 +11093,14 @@ packages: resolution: {integrity: sha512-/zxjmHGbaYVFtI6bUridFVV7VFStIv3vU/w1h7xenhz7KRzc9pqHsyFvcExZprG7dlA5kW9knRgv8+Cl/H7w9w==} hasBin: true - sharp@0.33.5: - resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - - sharp@0.34.3: - resolution: {integrity: sha512-eX2IQ6nFohW4DbvHIOLRB3MHFpYqaqvXd3Tp5e/T/dSH83fxaNJQRvDMhASmkNTsNTVF2/OOopzRCt7xokgPfg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - sharp@0.34.5: resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} - shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} - shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} @@ -12204,6 +11154,10 @@ packages: sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + skin-tone@2.0.0: + resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==} + engines: {node: '>=8'} + slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -12227,33 +11181,9 @@ packages: smob@1.5.0: resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==} - snake-case@3.0.4: - resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} - - snakecase-keys@3.2.1: - resolution: {integrity: sha512-CjU5pyRfwOtaOITYv5C8DzpZ8XA/ieRsDpr93HI2r6e3YInC6moZpSQbmUtg8cTk58tq2x3jcG2gv+p1IZGmMA==} - engines: {node: '>=8'} - - snakecase-keys@5.4.4: - resolution: {integrity: sha512-YTywJG93yxwHLgrYLZjlC75moVEX04LZM4FHfihjHe1FCXm+QaLOFfSf535aXOAd0ArVQMWUAe8ZPm4VtWyXaA==} - engines: {node: '>=12'} - - snakecase-keys@8.0.1: - resolution: {integrity: sha512-Sj51kE1zC7zh6TDlNNz0/Jn1n5HiHdoQErxO8jLtnyrkJW/M5PrI7x05uDgY3BO7OUQYKCvmeMurW6BPUdwEOw==} - engines: {node: '>=18'} - - solid-js@1.9.10: - resolution: {integrity: sha512-Coz956cos/EPDlhs6+jsdTxKuJDPT7B5SVIWgABwROyxjY7Xbr8wkzD68Et+NxnV7DLJ3nJdAC2r9InuV/4Jew==} - sonic-boom@4.2.0: resolution: {integrity: sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==} - sonner@2.0.7: - resolution: {integrity: sha512-W6ZN4p58k8aDKA4XPcx2hpIQXBRAgyiWVkYhT7CvK6D3iAu7xjvVyhQHg2/iaKJZ1XVJ4r7XuwGL+WGEK37i9w==} - peerDependencies: - react: ^18.0.0 || ^19.0.0 || ^19.0.0-rc - react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-rc - source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -12303,11 +11233,6 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - srvx@0.9.8: - resolution: {integrity: sha512-RZaxTKJEE/14HYn8COLuUOJAt0U55N9l1Xf6jj+T0GoA01EUH1Xz5JtSUOI+EHn+AEgPCVn7gk6jHJffrr06fQ==} - engines: {node: '>=20.16.0'} - hasBin: true - stable-hash@0.0.5: resolution: {integrity: sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==} @@ -12390,10 +11315,6 @@ packages: resolution: {integrity: sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==} engines: {node: '>= 0.4'} - string.prototype.padend@3.1.6: - resolution: {integrity: sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==} - engines: {node: '>= 0.4'} - string.prototype.repeat@1.0.0: resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} @@ -12450,6 +11371,10 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} + strip-final-newline@4.0.0: + resolution: {integrity: sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==} + engines: {node: '>=18'} + strip-indent@3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -12506,10 +11431,6 @@ packages: engines: {node: '>=16 || 14 >=14.17'} hasBin: true - superagent@10.2.3: - resolution: {integrity: sha512-y/hkYGeXAj7wUMjxRbB21g/l6aAEituGXM9Rwl4o20+SX3e8YOSV6BxFXl+dL3Uk0mjSL3kCbNkwURm8/gEDig==} - engines: {node: '>=14.18.0'} - superstruct@1.0.4: resolution: {integrity: sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==} engines: {node: '>=14.0.0'} @@ -12518,10 +11439,6 @@ packages: resolution: {integrity: sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - supertest@7.1.4: - resolution: {integrity: sha512-tjLPs7dVyqgItVFirHYqe2T+MfWc2VOBQ8QFKKbWTA3PU7liZR8zoSpAi/C1k1ilm9RsXIKYf197oap9wXGVYg==} - engines: {node: '>=14.18.0'} - supports-color@10.1.0: resolution: {integrity: sha512-GBuewsPrhJPftT+fqDa9oI/zc5HNsG9nREqwzoSFDOIqf0NggOZbHQj2TE1P1CDJK8ZogFnlZY9hWoUiur7I/A==} engines: {node: '>=18'} @@ -12542,15 +11459,14 @@ packages: resolution: {integrity: sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==} engines: {node: '>=8'} + supports-hyperlinks@3.2.0: + resolution: {integrity: sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==} + engines: {node: '>=14.18'} + supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - swr@2.2.0: - resolution: {integrity: sha512-AjqHOv2lAhkuUdIiBu9xbuettzAzWXmCEcLONNKJRba87WAefz8Ca9d6ds/SzrPc235n1IxWYdhJ2zF3MNUaoQ==} - peerDependencies: - react: ^16.11.0 || ^17.0.0 || ^18.0.0 - swr@2.3.4: resolution: {integrity: sha512-bYd2lrhc+VarcpkgWclcUi92wYCpOgMws9Sd1hG1ntAu0NEy+14CbotuFjshBU2kt9rYj9TSmDcybpxpeTU1fg==} peerDependencies: @@ -12723,19 +11639,10 @@ packages: resolution: {integrity: sha512-rtwLUQEwT8ZeKQbyFJyomBRYXyE16U5VKuy0ftxLMK/PZb2fkOsg5r9kHdauuVDbsNdIBoC/HCthpidamQFXYA==} engines: {node: '>=0.10.0'} - to-no-case@1.0.2: - resolution: {integrity: sha512-Z3g735FxuZY8rodxV4gH7LxClE4H0hTIyHNIHdk+vpQxjLm0cwnKXq/OFVZ76SOQmto7txVcwSCwkU5kqp+FKg==} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - to-snake-case@1.0.0: - resolution: {integrity: sha512-joRpzBAk1Bhi2eGEYBjukEWHOe/IvclOkiJl3DtA91jV6NwQ3MwXA4FHYeqk8BNp/D8bmi9tcNbRu/SozP0jbQ==} - - to-space-case@1.0.0: - resolution: {integrity: sha512-rLdvwXZ39VOn1IxGL3V6ZstoTbwLRckQmn/U8ZDLuWwIXNpuZDhQ3AiRUlhTbOXFVE9C+dR51wM0CBDhk31VcA==} - toad-cache@3.7.0: resolution: {integrity: sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw==} engines: {node: '>=12'} @@ -12795,6 +11702,12 @@ packages: peerDependencies: typescript: '>=4.8.4' + ts-api-utils@2.4.0: + resolution: {integrity: sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} @@ -12855,16 +11768,6 @@ packages: peerDependencies: typescript: '>=4.3.0' - tsconfck@3.1.6: - resolution: {integrity: sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==} - engines: {node: ^18 || >=20} - hasBin: true - peerDependencies: - typescript: ^5.0.0 - peerDependenciesMeta: - typescript: - optional: true - tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} @@ -12872,31 +11775,6 @@ packages: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} - tsdown@0.12.9: - resolution: {integrity: sha512-MfrXm9PIlT3saovtWKf/gCJJ/NQCdE0SiREkdNC+9Qy6UHhdeDPxnkFaBD7xttVUmgp0yUHtGirpoLB+OVLuLA==} - engines: {node: '>=18.0.0'} - hasBin: true - peerDependencies: - '@arethetypeswrong/core': ^0.18.1 - publint: ^0.3.0 - typescript: ^5.0.0 - unplugin-lightningcss: ^0.4.0 - unplugin-unused: ^0.5.0 - peerDependenciesMeta: - '@arethetypeswrong/core': - optional: true - publint: - optional: true - typescript: - optional: true - unplugin-lightningcss: - optional: true - unplugin-unused: - optional: true - - tslib@2.4.1: - resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} - tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -12980,10 +11858,6 @@ packages: resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} - type-is@1.6.18: - resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} - engines: {node: '>= 0.6'} - type-is@2.0.1: resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==} engines: {node: '>= 0.6'} @@ -13011,6 +11885,20 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' + typescript-eslint@8.34.1: + resolution: {integrity: sha512-XjS+b6Vg9oT1BaIUfkW3M3LvqZE++rbzAMEHuccCfO/YkP43ha6w3jTEMilQxMF92nVOYCcdjv1ZUhAa1D/0ow==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + typescript-eslint@8.51.0: + resolution: {integrity: sha512-jh8ZuM5oEh2PSdyQG9YAEM1TCGuWenLSuSUhf/irbVUNW9O5FhbFVONviN2TgMTBnUmyHv7E56rYnfLZK6TkiA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + typescript@4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} @@ -13021,8 +11909,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - typescript@5.7.3: - resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} + typescript@5.6.1-rc: + resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==} engines: {node: '>=14.17'} hasBin: true @@ -13064,12 +11952,6 @@ packages: resolution: {integrity: sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==} engines: {node: '>=0.10.0'} - unconfig-core@7.4.2: - resolution: {integrity: sha512-VgPCvLWugINbXvMQDf8Jh0mlbvNjNC6eSUziHsBCMpxR05OPrNrvDnyatdMjRgcHaaNsCqz+wjNXxNw1kRLHUg==} - - unconfig@7.4.2: - resolution: {integrity: sha512-nrMlWRQ1xdTjSnSUqvYqJzbTBFugoqHobQj58B2bc8qxHKBBHMNNsWQFP3Cd3/JZK907voM2geYPWqD4VK3MPQ==} - uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} @@ -13079,15 +11961,15 @@ packages: undefsafe@2.0.5: resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} - undici-types@5.28.4: - resolution: {integrity: sha512-3OeMF5Lyowe8VW0skf5qaIE7Or3yS9LS7fvMUI0gg4YxpIBVg0L8BxCmROw2CcYhSkpR68Epz7CGc8MPj94Uww==} - undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} undici-types@7.10.0: resolution: {integrity: sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==} + undici-types@7.16.0: + resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} + undici@6.21.3: resolution: {integrity: sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==} engines: {node: '>=18.17'} @@ -13102,6 +11984,10 @@ packages: unenv@2.0.0-rc.19: resolution: {integrity: sha512-t/OMHBNAkknVCI7bVB9OWjUUAwhVv9vsPIAGnNUxnu3FxPQN11rjh0sksLMzc3g7IlTgvHmOTl4JM7JHpcv5wA==} + unicode-emoji-modifier-base@1.0.0: + resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==} + engines: {node: '>=4'} + unicorn-magic@0.1.0: resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} engines: {node: '>=18'} @@ -13273,10 +12159,11 @@ packages: '@types/react': optional: true - use-intl@4.6.1: - resolution: {integrity: sha512-mUIj6QvJZ7Rk33mLDxRziz1YiBBAnIji8YW4TXXMdYHtaPEbVucrXD3iKQGAqJhbVn0VnjrEtIKYO1B18mfSJw==} + use-debounce@10.0.6: + resolution: {integrity: sha512-C5OtPyhAZgVoteO9heXMTdW7v/IbFI+8bSVKYCJrSmiWWCLsbUxiBSp4t9v0hNBTGY97bT72ydDIDyGSFWfwXg==} + engines: {node: '>= 16.0.0'} peerDependencies: - react: ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0 + react: '*' use-sidecar@1.1.3: resolution: {integrity: sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==} @@ -13299,10 +12186,6 @@ packages: util@0.12.5: resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} - utils-merge@1.0.1: - resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} - engines: {node: '>= 0.4.0'} - uuid@11.1.0: resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==} hasBin: true @@ -13310,21 +12193,17 @@ packages: v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - v8-to-istanbul@9.3.0: - resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} - engines: {node: '>=10.12.0'} - - valibot@1.2.0: - resolution: {integrity: sha512-mm1rxUsmOxzrwnX5arGS+U4T25RdvpPjPN4yR0u9pUBov9+zGVtO84tif1eY4r6zWxVxu3KzIyknJy3rxfRZZg==} - peerDependencies: - typescript: '>=5' - peerDependenciesMeta: - typescript: - optional: true + v8-to-istanbul@9.3.0: + resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} + engines: {node: '>=10.12.0'} validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + validate-npm-package-name@5.0.1: + resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -13341,36 +12220,24 @@ packages: victory-vendor@36.9.2: resolution: {integrity: sha512-PnpQQMuxlwYdocC8fIJqVXvkeViHYzotI+NJrCuav0ZYFoq912ZHBk3mCeuj+5/VpodOjPe1z0Fk2ihgzlXqjQ==} - vinxi@0.5.3: - resolution: {integrity: sha512-4sL2SMrRzdzClapP44oXdGjCE1oq7/DagsbjY5A09EibmoIO4LP8ScRVdh03lfXxKRk7nCWK7n7dqKvm+fp/9w==} - hasBin: true - vite-node@3.2.4: resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true - vite-tsconfig-paths@5.1.4: - resolution: {integrity: sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==} - peerDependencies: - vite: '*' - peerDependenciesMeta: - vite: - optional: true - - vite@6.4.1: - resolution: {integrity: sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + vite@7.1.5: + resolution: {integrity: sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==} + engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: - '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@types/node': ^20.19.0 || >=22.12.0 jiti: '>=1.21.0' - less: '*' + less: ^4.0.0 lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 terser: ^5.16.0 tsx: ^4.8.1 yaml: ^2.4.2 @@ -13398,8 +12265,8 @@ packages: yaml: optional: true - vite@7.1.5: - resolution: {integrity: sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==} + vite@7.3.0: + resolution: {integrity: sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -13494,9 +12361,6 @@ packages: resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} engines: {node: '>= 8'} - webcrypto-core@1.8.1: - resolution: {integrity: sha512-P+x1MvlNCXlKbLSOY4cYrdreqPG5hbzkmawbcXLKN/mf6DZW0SdNNkZ+sjwsqVkI4A4Ko2sPZmkZtCKY58w83A==} - webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -13527,6 +12391,7 @@ packages: whatwg-encoding@3.1.1: resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} engines: {node: '>=18'} + deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation whatwg-mimetype@4.0.0: resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} @@ -13557,20 +12422,11 @@ packages: resolution: {integrity: sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==} engines: {node: '>= 0.4'} - which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true - which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} hasBin: true - which@4.0.0: - resolution: {integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==} - engines: {node: ^16.13.0 || >=18.0.0} - hasBin: true - which@5.0.0: resolution: {integrity: sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==} engines: {node: ^18.17.0 || >=20.5.0} @@ -13581,10 +12437,6 @@ packages: engines: {node: '>=8'} hasBin: true - widest-line@4.0.1: - resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==} - engines: {node: '>=12'} - widest-line@5.0.0: resolution: {integrity: sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA==} engines: {node: '>=18'} @@ -13717,6 +12569,10 @@ packages: yargs@13.3.2: resolution: {integrity: sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==} + yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} @@ -13767,6 +12623,12 @@ packages: peerDependencies: zod: ^3.24.1 + zod-validation-error@4.0.2: + resolution: {integrity: sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + zod: ^3.25.0 || ^4.0.0 + zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} @@ -13793,17 +12655,40 @@ snapshots: '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.30 + '@andrewbranch/untar.js@1.0.3': {} + '@antfu/ni@23.3.1': {} + '@arethetypeswrong/cli@0.17.4': + dependencies: + '@arethetypeswrong/core': 0.17.4 + chalk: 4.1.2 + cli-table3: 0.6.5 + commander: 10.0.1 + marked: 9.1.6 + marked-terminal: 7.3.0(marked@9.1.6) + semver: 7.7.3 + + '@arethetypeswrong/core@0.17.4': + dependencies: + '@andrewbranch/untar.js': 1.0.3 + '@loaderkit/resolve': 1.0.4 + cjs-module-lexer: 1.4.3 + fflate: 0.8.2 + lru-cache: 10.4.3 + semver: 7.7.3 + typescript: 5.6.1-rc + validate-npm-package-name: 5.0.1 + '@babel/code-frame@7.26.2': dependencies: - '@babel/helper-validator-identifier': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 js-tokens: 4.0.0 picocolors: 1.1.1 '@babel/code-frame@7.27.1': dependencies: - '@babel/helper-validator-identifier': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 js-tokens: 4.0.0 picocolors: 1.1.1 @@ -13817,7 +12702,7 @@ snapshots: '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-module-transforms': 7.27.3(@babel/core@7.28.0) '@babel/helpers': 7.28.2 - '@babel/parser': 7.28.3 + '@babel/parser': 7.28.5 '@babel/template': 7.27.2 '@babel/traverse': 7.28.3 '@babel/types': 7.28.2 @@ -13837,10 +12722,30 @@ snapshots: '@babel/helper-compilation-targets': 7.27.2 '@babel/helper-module-transforms': 7.28.3(@babel/core@7.28.3) '@babel/helpers': 7.28.3 - '@babel/parser': 7.28.3 + '@babel/parser': 7.28.5 '@babel/template': 7.27.2 '@babel/traverse': 7.28.3 - '@babel/types': 7.28.2 + '@babel/types': 7.28.5 + convert-source-map: 2.0.0 + debug: 4.4.1(supports-color@5.5.0) + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/core@7.28.5': + dependencies: + '@babel/code-frame': 7.27.1 + '@babel/generator': 7.28.5 + '@babel/helper-compilation-targets': 7.27.2 + '@babel/helper-module-transforms': 7.28.3(@babel/core@7.28.5) + '@babel/helpers': 7.28.4 + '@babel/parser': 7.28.5 + '@babel/template': 7.27.2 + '@babel/traverse': 7.28.5 + '@babel/types': 7.28.5 + '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 debug: 4.4.1(supports-color@5.5.0) gensync: 1.0.0-beta.2 @@ -13851,8 +12756,16 @@ snapshots: '@babel/generator@7.28.3': dependencies: - '@babel/parser': 7.28.3 - '@babel/types': 7.28.2 + '@babel/parser': 7.28.5 + '@babel/types': 7.28.5 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.30 + jsesc: 3.1.0 + + '@babel/generator@7.28.5': + dependencies: + '@babel/parser': 7.28.5 + '@babel/types': 7.28.5 '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.30 jsesc: 3.1.0 @@ -13882,13 +12795,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-create-class-features-plugin@7.27.1(@babel/core@7.28.3)': + '@babel/helper-create-class-features-plugin@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-annotate-as-pure': 7.27.3 '@babel/helper-member-expression-to-functions': 7.27.1 '@babel/helper-optimise-call-expression': 7.27.1 - '@babel/helper-replace-supers': 7.27.1(@babel/core@7.28.3) + '@babel/helper-replace-supers': 7.27.1(@babel/core@7.28.5) '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 '@babel/traverse': 7.28.3 semver: 6.3.1 @@ -13907,7 +12820,7 @@ snapshots: '@babel/helper-module-imports@7.27.1': dependencies: '@babel/traverse': 7.28.3 - '@babel/types': 7.28.2 + '@babel/types': 7.28.5 transitivePeerDependencies: - supports-color @@ -13915,7 +12828,7 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-module-imports': 7.27.1 - '@babel/helper-validator-identifier': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 '@babel/traverse': 7.28.3 transitivePeerDependencies: - supports-color @@ -13924,7 +12837,16 @@ snapshots: dependencies: '@babel/core': 7.28.3 '@babel/helper-module-imports': 7.27.1 - '@babel/helper-validator-identifier': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 + '@babel/traverse': 7.28.3 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.28.3(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-module-imports': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 '@babel/traverse': 7.28.3 transitivePeerDependencies: - supports-color @@ -13944,9 +12866,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.27.1(@babel/core@7.28.3)': + '@babel/helper-replace-supers@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-member-expression-to-functions': 7.27.1 '@babel/helper-optimise-call-expression': 7.27.1 '@babel/traverse': 7.28.3 @@ -13971,18 +12893,19 @@ snapshots: '@babel/helpers@7.28.2': dependencies: '@babel/template': 7.27.2 - '@babel/types': 7.28.2 + '@babel/types': 7.28.5 '@babel/helpers@7.28.3': dependencies: '@babel/template': 7.27.2 - '@babel/types': 7.28.2 + '@babel/types': 7.28.5 - '@babel/parser@7.28.0': + '@babel/helpers@7.28.4': dependencies: - '@babel/types': 7.28.2 + '@babel/template': 7.27.2 + '@babel/types': 7.28.5 - '@babel/parser@7.28.3': + '@babel/parser@7.28.0': dependencies: '@babel/types': 7.28.2 @@ -13990,84 +12913,84 @@ snapshots: dependencies: '@babel/types': 7.28.5 - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.28.3)': + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.28.3)': + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.28.3)': + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.28.3)': + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-import-attributes@7.27.1(@babel/core@7.28.3)': + '@babel/plugin-syntax-import-attributes@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.28.3)': + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.28.3)': + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.28.3)': + '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.28.3)': + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.28.3)': + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.28.3)': + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.28.3)': + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.28.3)': + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.28.3)': + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.28.3)': + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.28.3)': + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 '@babel/plugin-syntax-typescript@7.27.1(@babel/core@7.28.0)': @@ -14075,27 +12998,27 @@ snapshots: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-typescript@7.27.1(@babel/core@7.28.3)': + '@babel/plugin-syntax-typescript@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-modules-commonjs@7.27.1(@babel/core@7.28.3)': + '@babel/plugin-transform-modules-commonjs@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 - '@babel/helper-module-transforms': 7.28.3(@babel/core@7.28.3) + '@babel/core': 7.28.5 + '@babel/helper-module-transforms': 7.28.3(@babel/core@7.28.5) '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-jsx-self@7.27.1(@babel/core@7.28.3)': + '@babel/plugin-transform-react-jsx-self@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-transform-react-jsx-source@7.27.1(@babel/core@7.28.3)': + '@babel/plugin-transform-react-jsx-source@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 '@babel/plugin-transform-typescript@7.28.0(@babel/core@7.28.0)': @@ -14109,25 +13032,25 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/plugin-transform-typescript@7.28.0(@babel/core@7.28.3)': + '@babel/plugin-transform-typescript@7.28.0(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-annotate-as-pure': 7.27.3 - '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.28.3) + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.28.5) '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 - '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.3) + '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.5) transitivePeerDependencies: - supports-color - '@babel/preset-typescript@7.27.1(@babel/core@7.28.3)': + '@babel/preset-typescript@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-validator-option': 7.27.1 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3) + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.5) transitivePeerDependencies: - supports-color @@ -14136,29 +13059,29 @@ snapshots: '@babel/template@7.27.2': dependencies: '@babel/code-frame': 7.27.1 - '@babel/parser': 7.28.3 + '@babel/parser': 7.28.5 '@babel/types': 7.28.2 - '@babel/traverse@7.28.0': + '@babel/traverse@7.28.3': dependencies: '@babel/code-frame': 7.27.1 '@babel/generator': 7.28.3 '@babel/helper-globals': 7.28.0 - '@babel/parser': 7.28.3 + '@babel/parser': 7.28.5 '@babel/template': 7.27.2 - '@babel/types': 7.28.2 + '@babel/types': 7.28.5 debug: 4.4.1(supports-color@5.5.0) transitivePeerDependencies: - supports-color - '@babel/traverse@7.28.3': + '@babel/traverse@7.28.5': dependencies: '@babel/code-frame': 7.27.1 - '@babel/generator': 7.28.3 + '@babel/generator': 7.28.5 '@babel/helper-globals': 7.28.0 - '@babel/parser': 7.28.3 + '@babel/parser': 7.28.5 '@babel/template': 7.27.2 - '@babel/types': 7.28.2 + '@babel/types': 7.28.5 debug: 4.4.1(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -14166,12 +13089,12 @@ snapshots: '@babel/types@7.28.0': dependencies: '@babel/helper-string-parser': 7.27.1 - '@babel/helper-validator-identifier': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 '@babel/types@7.28.2': dependencies: '@babel/helper-string-parser': 7.27.1 - '@babel/helper-validator-identifier': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 '@babel/types@7.28.5': dependencies: @@ -14211,6 +13134,8 @@ snapshots: '@borewit/text-codec@0.1.1': {} + '@braidai/lang@1.1.2': {} + '@bundled-es-modules/cookie@2.0.1': dependencies: cookie: 0.7.2 @@ -14224,45 +13149,20 @@ snapshots: '@types/tough-cookie': 4.0.5 tough-cookie: 4.1.4 - '@clerk/backend@0.38.15(react@19.1.1)': - dependencies: - '@clerk/shared': 1.4.2(react@19.1.1) - '@clerk/types': 3.65.5 - '@peculiar/webcrypto': 1.4.1 - '@types/node': 16.18.6 - cookie: 0.5.0 - deepmerge: 4.2.2 - node-fetch-native: 1.0.1 - snakecase-keys: 5.4.4 - tslib: 2.4.1 - transitivePeerDependencies: - - react - - '@clerk/backend@1.34.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@clerk/backend@2.7.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@clerk/shared': 3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@clerk/types': 4.83.0 cookie: 1.0.2 - snakecase-keys: 8.0.1 - tslib: 2.8.1 - transitivePeerDependencies: - - react - - react-dom - - '@clerk/backend@2.27.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@clerk/shared': 3.40.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/types': 4.101.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - cookie: 1.0.2 standardwebhooks: 1.0.0 tslib: 2.8.1 transitivePeerDependencies: - react - react-dom - '@clerk/backend@2.7.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@clerk/backend@2.7.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/shared': 3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@clerk/shared': 3.23.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@clerk/types': 4.83.0 cookie: 1.0.2 standardwebhooks: 1.0.0 @@ -14279,83 +13179,79 @@ snapshots: react-dom: 19.1.1(react@19.1.1) tslib: 2.8.1 - '@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@clerk/clerk-react@5.45.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/shared': 3.40.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@clerk/shared': 3.23.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/types': 4.83.0 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) tslib: 2.8.1 - '@clerk/clerk-sdk-node@4.13.23(react@19.1.1)': - dependencies: - '@clerk/backend': 0.38.15(react@19.1.1) - '@clerk/shared': 1.4.2(react@19.1.1) - '@clerk/types': 3.65.5 - '@types/cookies': 0.7.7 - '@types/express': 4.17.14 - '@types/node-fetch': 2.6.2 - camelcase-keys: 6.2.2 - snakecase-keys: 3.2.1 - tslib: 2.4.1 - transitivePeerDependencies: - - react + '@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1)': + dependencies: + '@clerk/shared': 3.40.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1) + react: 19.1.1 + react-dom: 19.2.3(react@19.1.1) + tslib: 2.8.1 + optional: true - '@clerk/express@1.7.58(express@4.22.1)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/backend': 2.27.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/shared': 3.40.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/types': 4.101.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - express: 4.22.1 + '@clerk/shared': 3.40.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) tslib: 2.8.1 - transitivePeerDependencies: - - react - - react-dom + optional: true - '@clerk/nextjs@6.30.1(next@15.2.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@clerk/nextjs@6.30.1(next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@clerk/backend': 2.7.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@clerk/clerk-react': 5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@clerk/shared': 3.19.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@clerk/types': 4.75.0 - next: 15.2.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + next: 15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: 19.1.1 react-dom: 19.1.1(react@19.1.1) server-only: 0.0.1 tslib: 2.8.1 - '@clerk/nextjs@6.30.1(next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@clerk/nextjs@6.30.1(next@15.3.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/backend': 2.7.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/clerk-react': 5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/shared': 3.19.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@clerk/backend': 2.7.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/clerk-react': 5.45.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/shared': 3.19.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@clerk/types': 4.75.0 - next: 15.3.4(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + next: 15.3.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) server-only: 0.0.1 tslib: 2.8.1 - '@clerk/react-router@1.10.2(react-dom@19.1.1(react@19.1.1))(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)': + '@clerk/shared@3.19.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: - '@clerk/backend': 2.27.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/clerk-react': 5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/shared': 3.40.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/types': 4.101.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - cookie: 0.7.2 + '@clerk/types': 4.83.0 + dequal: 2.0.3 + glob-to-regexp: 0.4.1 + js-cookie: 3.0.5 + std-env: 3.9.0 + swr: 2.3.4(react@19.1.1) + optionalDependencies: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - react-router: 7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - tslib: 2.8.1 - '@clerk/shared@1.4.2(react@19.1.1)': + '@clerk/shared@3.19.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: + '@clerk/types': 4.83.0 + dequal: 2.0.3 glob-to-regexp: 0.4.1 - js-cookie: 3.0.1 - swr: 2.2.0(react@19.1.1) + js-cookie: 3.0.5 + std-env: 3.9.0 + swr: 2.3.4(react@19.2.3) optionalDependencies: - react: 19.1.1 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - '@clerk/shared@3.19.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@clerk/shared@3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': dependencies: '@clerk/types': 4.83.0 dequal: 2.0.3 @@ -14367,19 +13263,19 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - '@clerk/shared@3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@clerk/shared@3.23.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@clerk/types': 4.83.0 dequal: 2.0.3 glob-to-regexp: 0.4.1 js-cookie: 3.0.5 std-env: 3.9.0 - swr: 2.3.4(react@19.1.1) + swr: 2.3.4(react@19.2.3) optionalDependencies: - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - '@clerk/shared@3.40.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@clerk/shared@3.40.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1)': dependencies: csstype: 3.1.3 dequal: 2.0.3 @@ -14389,18 +13285,21 @@ snapshots: swr: 2.3.4(react@19.1.1) optionalDependencies: react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - - '@clerk/types@3.65.5': - dependencies: - csstype: 3.1.1 + react-dom: 19.2.3(react@19.1.1) + optional: true - '@clerk/types@4.101.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@clerk/shared@3.40.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/shared': 3.40.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - transitivePeerDependencies: - - react - - react-dom + csstype: 3.1.3 + dequal: 2.0.3 + glob-to-regexp: 0.4.1 + js-cookie: 3.0.5 + std-env: 3.9.0 + swr: 2.3.4(react@19.2.3) + optionalDependencies: + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optional: true '@clerk/types@4.75.0': dependencies: @@ -14410,70 +13309,23 @@ snapshots: dependencies: csstype: 3.1.3 - '@clerk/types@4.99.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@clerk/shared': 3.33.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - transitivePeerDependencies: - - react - - react-dom - '@cloudflare/kv-asset-handler@0.4.0': dependencies: mime: 3.0.0 - '@colors/colors@1.6.0': {} + '@colors/colors@1.5.0': + optional: true - '@convex-dev/better-auth@0.7.18(@standard-schema/spec@1.0.0)(better-auth@1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@3.25.76))(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1))(hono@4.9.1)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.7.3)': - dependencies: - better-auth: 1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@3.25.76) - common-tags: 1.8.2 - convex: 1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - convex-helpers: 0.1.104(@standard-schema/spec@1.0.0)(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1))(hono@4.9.1)(react@19.1.1)(typescript@5.7.3)(zod@3.25.76) - is-network-error: 1.3.0 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - type-fest: 4.41.0 - zod: 3.25.76 - transitivePeerDependencies: - - '@standard-schema/spec' - - hono - - typescript + '@colors/colors@1.6.0': {} - '@convex-dev/workos@0.0.1(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@20.19.27)(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1))(jiti@2.6.1)(react@19.1.1)(typescript@5.9.2)': + '@convex-dev/eslint-plugin@1.1.1(convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@workos-inc/authkit-react': 0.11.0(react@19.1.1) - convex: 1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - react: 19.1.1 - tsdown: 0.12.9(typescript@5.9.2) - vitest: 3.2.4(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@20.19.27)(jiti@2.6.1) + '@typescript-eslint/utils': 8.49.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + convex: 1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) transitivePeerDependencies: - - '@arethetypeswrong/core' - - '@edge-runtime/vm' - - '@types/debug' - - '@types/node' - - '@typescript/native-preview' - - '@vitest/browser' - - '@vitest/ui' - - happy-dom - - jiti - - jsdom - - less - - lightningcss - - msw - - oxc-resolver - - publint - - sass - - sass-embedded - - stylus - - sugarss + - eslint - supports-color - - terser - - tsx - typescript - - unplugin-lightningcss - - unplugin-unused - - vue-tsc - - yaml '@cspotcode/source-map-support@0.8.1': dependencies: @@ -14485,13 +13337,6 @@ snapshots: enabled: 2.0.0 kuler: 2.0.0 - '@deno/shim-deno-test@0.5.0': {} - - '@deno/shim-deno@0.19.2': - dependencies: - '@deno/shim-deno-test': 0.5.0 - which: 4.0.0 - '@dependents/detective-less@5.0.1': dependencies: gonzales-pe: 4.3.0 @@ -14503,27 +13348,12 @@ snapshots: dependencies: '@edge-runtime/primitives': 6.0.0 - '@elysiajs/cors@1.4.0(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2))': - dependencies: - elysia: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2) - - '@elysiajs/node@1.4.2(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2))': - dependencies: - crossws: 0.4.1(srvx@0.9.8) - elysia: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2) - srvx: 0.9.8 - '@emnapi/core@1.4.5': dependencies: '@emnapi/wasi-threads': 1.0.4 tslib: 2.8.1 optional: true - '@emnapi/runtime@1.4.5': - dependencies: - tslib: 2.8.1 - optional: true - '@emnapi/runtime@1.7.0': dependencies: tslib: 2.8.1 @@ -14534,9 +13364,6 @@ snapshots: tslib: 2.8.1 optional: true - '@esbuild/aix-ppc64@0.20.2': - optional: true - '@esbuild/aix-ppc64@0.25.4': optional: true @@ -14546,7 +13373,7 @@ snapshots: '@esbuild/aix-ppc64@0.25.9': optional: true - '@esbuild/android-arm64@0.20.2': + '@esbuild/aix-ppc64@0.27.2': optional: true '@esbuild/android-arm64@0.25.4': @@ -14558,7 +13385,7 @@ snapshots: '@esbuild/android-arm64@0.25.9': optional: true - '@esbuild/android-arm@0.20.2': + '@esbuild/android-arm64@0.27.2': optional: true '@esbuild/android-arm@0.25.4': @@ -14570,7 +13397,7 @@ snapshots: '@esbuild/android-arm@0.25.9': optional: true - '@esbuild/android-x64@0.20.2': + '@esbuild/android-arm@0.27.2': optional: true '@esbuild/android-x64@0.25.4': @@ -14582,7 +13409,7 @@ snapshots: '@esbuild/android-x64@0.25.9': optional: true - '@esbuild/darwin-arm64@0.20.2': + '@esbuild/android-x64@0.27.2': optional: true '@esbuild/darwin-arm64@0.25.4': @@ -14594,7 +13421,7 @@ snapshots: '@esbuild/darwin-arm64@0.25.9': optional: true - '@esbuild/darwin-x64@0.20.2': + '@esbuild/darwin-arm64@0.27.2': optional: true '@esbuild/darwin-x64@0.25.4': @@ -14606,7 +13433,7 @@ snapshots: '@esbuild/darwin-x64@0.25.9': optional: true - '@esbuild/freebsd-arm64@0.20.2': + '@esbuild/darwin-x64@0.27.2': optional: true '@esbuild/freebsd-arm64@0.25.4': @@ -14618,7 +13445,7 @@ snapshots: '@esbuild/freebsd-arm64@0.25.9': optional: true - '@esbuild/freebsd-x64@0.20.2': + '@esbuild/freebsd-arm64@0.27.2': optional: true '@esbuild/freebsd-x64@0.25.4': @@ -14630,7 +13457,7 @@ snapshots: '@esbuild/freebsd-x64@0.25.9': optional: true - '@esbuild/linux-arm64@0.20.2': + '@esbuild/freebsd-x64@0.27.2': optional: true '@esbuild/linux-arm64@0.25.4': @@ -14642,7 +13469,7 @@ snapshots: '@esbuild/linux-arm64@0.25.9': optional: true - '@esbuild/linux-arm@0.20.2': + '@esbuild/linux-arm64@0.27.2': optional: true '@esbuild/linux-arm@0.25.4': @@ -14654,7 +13481,7 @@ snapshots: '@esbuild/linux-arm@0.25.9': optional: true - '@esbuild/linux-ia32@0.20.2': + '@esbuild/linux-arm@0.27.2': optional: true '@esbuild/linux-ia32@0.25.4': @@ -14666,7 +13493,7 @@ snapshots: '@esbuild/linux-ia32@0.25.9': optional: true - '@esbuild/linux-loong64@0.20.2': + '@esbuild/linux-ia32@0.27.2': optional: true '@esbuild/linux-loong64@0.25.4': @@ -14678,7 +13505,7 @@ snapshots: '@esbuild/linux-loong64@0.25.9': optional: true - '@esbuild/linux-mips64el@0.20.2': + '@esbuild/linux-loong64@0.27.2': optional: true '@esbuild/linux-mips64el@0.25.4': @@ -14690,7 +13517,7 @@ snapshots: '@esbuild/linux-mips64el@0.25.9': optional: true - '@esbuild/linux-ppc64@0.20.2': + '@esbuild/linux-mips64el@0.27.2': optional: true '@esbuild/linux-ppc64@0.25.4': @@ -14702,7 +13529,7 @@ snapshots: '@esbuild/linux-ppc64@0.25.9': optional: true - '@esbuild/linux-riscv64@0.20.2': + '@esbuild/linux-ppc64@0.27.2': optional: true '@esbuild/linux-riscv64@0.25.4': @@ -14714,7 +13541,7 @@ snapshots: '@esbuild/linux-riscv64@0.25.9': optional: true - '@esbuild/linux-s390x@0.20.2': + '@esbuild/linux-riscv64@0.27.2': optional: true '@esbuild/linux-s390x@0.25.4': @@ -14726,7 +13553,7 @@ snapshots: '@esbuild/linux-s390x@0.25.9': optional: true - '@esbuild/linux-x64@0.20.2': + '@esbuild/linux-s390x@0.27.2': optional: true '@esbuild/linux-x64@0.25.4': @@ -14738,6 +13565,9 @@ snapshots: '@esbuild/linux-x64@0.25.9': optional: true + '@esbuild/linux-x64@0.27.2': + optional: true + '@esbuild/netbsd-arm64@0.25.4': optional: true @@ -14747,7 +13577,7 @@ snapshots: '@esbuild/netbsd-arm64@0.25.9': optional: true - '@esbuild/netbsd-x64@0.20.2': + '@esbuild/netbsd-arm64@0.27.2': optional: true '@esbuild/netbsd-x64@0.25.4': @@ -14759,6 +13589,9 @@ snapshots: '@esbuild/netbsd-x64@0.25.9': optional: true + '@esbuild/netbsd-x64@0.27.2': + optional: true + '@esbuild/openbsd-arm64@0.25.4': optional: true @@ -14768,7 +13601,7 @@ snapshots: '@esbuild/openbsd-arm64@0.25.9': optional: true - '@esbuild/openbsd-x64@0.20.2': + '@esbuild/openbsd-arm64@0.27.2': optional: true '@esbuild/openbsd-x64@0.25.4': @@ -14780,10 +13613,13 @@ snapshots: '@esbuild/openbsd-x64@0.25.9': optional: true + '@esbuild/openbsd-x64@0.27.2': + optional: true + '@esbuild/openharmony-arm64@0.25.9': optional: true - '@esbuild/sunos-x64@0.20.2': + '@esbuild/openharmony-arm64@0.27.2': optional: true '@esbuild/sunos-x64@0.25.4': @@ -14795,7 +13631,7 @@ snapshots: '@esbuild/sunos-x64@0.25.9': optional: true - '@esbuild/win32-arm64@0.20.2': + '@esbuild/sunos-x64@0.27.2': optional: true '@esbuild/win32-arm64@0.25.4': @@ -14807,7 +13643,7 @@ snapshots: '@esbuild/win32-arm64@0.25.9': optional: true - '@esbuild/win32-ia32@0.20.2': + '@esbuild/win32-arm64@0.27.2': optional: true '@esbuild/win32-ia32@0.25.4': @@ -14819,7 +13655,7 @@ snapshots: '@esbuild/win32-ia32@0.25.9': optional: true - '@esbuild/win32-x64@0.20.2': + '@esbuild/win32-ia32@0.27.2': optional: true '@esbuild/win32-x64@0.25.4': @@ -14831,6 +13667,9 @@ snapshots: '@esbuild/win32-x64@0.25.9': optional: true + '@esbuild/win32-x64@0.27.2': + optional: true + '@eslint-community/eslint-utils@4.7.0(eslint@8.57.1)': dependencies: eslint: 8.57.1 @@ -14846,6 +13685,11 @@ snapshots: eslint: 9.39.2(jiti@2.6.1) eslint-visitor-keys: 3.4.3 + '@eslint-community/eslint-utils@4.9.0(eslint@9.29.0(jiti@2.6.1))': + dependencies: + eslint: 9.29.0(jiti@2.6.1) + eslint-visitor-keys: 3.4.3 + '@eslint-community/eslint-utils@4.9.0(eslint@9.39.2(jiti@2.6.1))': dependencies: eslint: 9.39.2(jiti@2.6.1) @@ -14957,11 +13801,6 @@ snapshots: '@fastify/busboy@3.1.1': {} - '@fastify/cors@11.2.0': - dependencies: - fastify-plugin: 5.1.0 - toad-cache: 3.7.0 - '@fastify/error@4.2.0': {} '@fastify/fast-json-stringify-compiler@5.0.3': @@ -15000,58 +13839,20 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - '@floating-ui/utils@0.2.10': {} - - '@formatjs/ecma402-abstract@2.3.6': - dependencies: - '@formatjs/fast-memoize': 2.2.7 - '@formatjs/intl-localematcher': 0.6.2 - decimal.js: 10.6.0 - tslib: 2.8.1 - - '@formatjs/fast-memoize@2.2.7': - dependencies: - tslib: 2.8.1 - - '@formatjs/icu-messageformat-parser@2.11.4': - dependencies: - '@formatjs/ecma402-abstract': 2.3.6 - '@formatjs/icu-skeleton-parser': 1.8.16 - tslib: 2.8.1 - - '@formatjs/icu-skeleton-parser@1.8.16': + '@floating-ui/react-dom@2.1.5(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@formatjs/ecma402-abstract': 2.3.6 - tslib: 2.8.1 + '@floating-ui/dom': 1.7.3 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - '@formatjs/intl-localematcher@0.5.10': - dependencies: - tslib: 2.8.1 + '@floating-ui/utils@0.2.10': {} '@formatjs/intl-localematcher@0.6.1': dependencies: tslib: 2.8.1 - '@formatjs/intl-localematcher@0.6.2': - dependencies: - tslib: 2.8.1 - '@hexagon/base64@1.1.28': {} - '@hono/clerk-auth@2.0.1(@clerk/backend@1.34.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(hono@4.9.1)': - dependencies: - '@clerk/backend': 1.34.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - hono: 4.9.1 - - '@hono/node-server@1.19.7(hono@4.9.1)': - dependencies: - hono: 4.9.1 - - '@hookform/resolvers@5.2.2(react-hook-form@7.68.0(react@19.1.1))': - dependencies: - '@standard-schema/utils': 0.3.0 - react-hook-form: 7.68.0(react@19.1.1) - '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.6': @@ -15078,152 +13879,56 @@ snapshots: '@img/colour@1.0.0': optional: true - '@img/sharp-darwin-arm64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.0.4 - optional: true - - '@img/sharp-darwin-arm64@0.34.3': - optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.2.0 - optional: true - '@img/sharp-darwin-arm64@0.34.5': optionalDependencies: '@img/sharp-libvips-darwin-arm64': 1.2.4 optional: true - '@img/sharp-darwin-x64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.0.4 - optional: true - - '@img/sharp-darwin-x64@0.34.3': - optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.2.0 - optional: true - '@img/sharp-darwin-x64@0.34.5': optionalDependencies: '@img/sharp-libvips-darwin-x64': 1.2.4 optional: true - '@img/sharp-libvips-darwin-arm64@1.0.4': - optional: true - - '@img/sharp-libvips-darwin-arm64@1.2.0': - optional: true - '@img/sharp-libvips-darwin-arm64@1.2.4': optional: true - '@img/sharp-libvips-darwin-x64@1.0.4': - optional: true - - '@img/sharp-libvips-darwin-x64@1.2.0': - optional: true - '@img/sharp-libvips-darwin-x64@1.2.4': optional: true - '@img/sharp-libvips-linux-arm64@1.0.4': - optional: true - - '@img/sharp-libvips-linux-arm64@1.2.0': - optional: true - '@img/sharp-libvips-linux-arm64@1.2.4': optional: true - '@img/sharp-libvips-linux-arm@1.0.5': - optional: true - - '@img/sharp-libvips-linux-arm@1.2.0': - optional: true - '@img/sharp-libvips-linux-arm@1.2.4': optional: true - '@img/sharp-libvips-linux-ppc64@1.2.0': - optional: true - '@img/sharp-libvips-linux-ppc64@1.2.4': optional: true '@img/sharp-libvips-linux-riscv64@1.2.4': optional: true - '@img/sharp-libvips-linux-s390x@1.0.4': - optional: true - - '@img/sharp-libvips-linux-s390x@1.2.0': - optional: true - '@img/sharp-libvips-linux-s390x@1.2.4': optional: true - '@img/sharp-libvips-linux-x64@1.0.4': - optional: true - - '@img/sharp-libvips-linux-x64@1.2.0': - optional: true - '@img/sharp-libvips-linux-x64@1.2.4': optional: true - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': - optional: true - - '@img/sharp-libvips-linuxmusl-arm64@1.2.0': - optional: true - '@img/sharp-libvips-linuxmusl-arm64@1.2.4': optional: true - '@img/sharp-libvips-linuxmusl-x64@1.0.4': - optional: true - - '@img/sharp-libvips-linuxmusl-x64@1.2.0': - optional: true - '@img/sharp-libvips-linuxmusl-x64@1.2.4': optional: true - '@img/sharp-linux-arm64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.0.4 - optional: true - - '@img/sharp-linux-arm64@0.34.3': - optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.2.0 - optional: true - '@img/sharp-linux-arm64@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-arm64': 1.2.4 optional: true - '@img/sharp-linux-arm@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.0.5 - optional: true - - '@img/sharp-linux-arm@0.34.3': - optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.2.0 - optional: true - '@img/sharp-linux-arm@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-arm': 1.2.4 optional: true - '@img/sharp-linux-ppc64@0.34.3': - optionalDependencies: - '@img/sharp-libvips-linux-ppc64': 1.2.0 - optional: true - '@img/sharp-linux-ppc64@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-ppc64': 1.2.4 @@ -15234,102 +13939,37 @@ snapshots: '@img/sharp-libvips-linux-riscv64': 1.2.4 optional: true - '@img/sharp-linux-s390x@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.0.4 - optional: true - - '@img/sharp-linux-s390x@0.34.3': - optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.2.0 - optional: true - '@img/sharp-linux-s390x@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-s390x': 1.2.4 optional: true - '@img/sharp-linux-x64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.0.4 - optional: true - - '@img/sharp-linux-x64@0.34.3': - optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.2.0 - optional: true - '@img/sharp-linux-x64@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-x64': 1.2.4 optional: true - '@img/sharp-linuxmusl-arm64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 - optional: true - - '@img/sharp-linuxmusl-arm64@0.34.3': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.2.0 - optional: true - '@img/sharp-linuxmusl-arm64@0.34.5': optionalDependencies: '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 optional: true - '@img/sharp-linuxmusl-x64@0.33.5': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.0.4 - optional: true - - '@img/sharp-linuxmusl-x64@0.34.3': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.2.0 - optional: true - '@img/sharp-linuxmusl-x64@0.34.5': optionalDependencies: '@img/sharp-libvips-linuxmusl-x64': 1.2.4 optional: true - '@img/sharp-wasm32@0.33.5': - dependencies: - '@emnapi/runtime': 1.7.0 - optional: true - - '@img/sharp-wasm32@0.34.3': - dependencies: - '@emnapi/runtime': 1.4.5 - optional: true - '@img/sharp-wasm32@0.34.5': dependencies: '@emnapi/runtime': 1.7.0 optional: true - '@img/sharp-win32-arm64@0.34.3': - optional: true - '@img/sharp-win32-arm64@0.34.5': optional: true - '@img/sharp-win32-ia32@0.33.5': - optional: true - - '@img/sharp-win32-ia32@0.34.3': - optional: true - '@img/sharp-win32-ia32@0.34.5': optional: true - '@img/sharp-win32-x64@0.33.5': - optional: true - - '@img/sharp-win32-x64@0.34.3': - optional: true - '@img/sharp-win32-x64@0.34.5': optional: true @@ -15534,27 +14174,27 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 24.10.4 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 24.10.4 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + jest-config: 29.7.0(@types/node@24.10.4)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -15583,7 +14223,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 24.10.4 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -15601,7 +14241,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.17.1 + '@types/node': 24.10.4 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -15617,7 +14257,7 @@ snapshots: '@jest/pattern@30.0.1': dependencies: - '@types/node': 22.17.1 + '@types/node': 24.10.4 jest-regex-util: 30.0.1 '@jest/reporters@29.7.0': @@ -15628,7 +14268,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.30 - '@types/node': 22.17.1 + '@types/node': 24.10.4 chalk: 4.1.2 collect-v8-coverage: 1.0.3 exit: 0.1.2 @@ -15679,7 +14319,7 @@ snapshots: '@jest/transform@29.7.0': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.30 babel-plugin-istanbul: 6.1.1 @@ -15702,7 +14342,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.17.1 + '@types/node': 24.10.4 '@types/yargs': 17.0.35 chalk: 4.1.2 @@ -15712,8 +14352,8 @@ snapshots: '@jest/schemas': 30.0.5 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.17.1 - '@types/yargs': 17.0.33 + '@types/node': 24.10.4 + '@types/yargs': 17.0.35 chalk: 4.1.2 '@jridgewell/gen-mapping@0.3.13': @@ -15745,12 +14385,12 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@knocklabs/node@1.19.0': - dependencies: - jose: 6.1.0 - '@levischuck/tiny-cbor@0.2.11': {} + '@loaderkit/resolve@1.0.4': + dependencies: + '@braidai/lang': 1.1.2 + '@mapbox/node-pre-gyp@2.0.0': dependencies: consola: 3.4.2 @@ -15794,8 +14434,6 @@ snapshots: - acorn - supports-color - '@mjackson/node-fetch-server@0.2.0': {} - '@modelcontextprotocol/sdk@1.17.2': dependencies: ajv: 6.12.6 @@ -15886,7 +14524,7 @@ snapshots: '@netlify/zip-it-and-ship-it@12.2.1(rollup@4.47.1)': dependencies: - '@babel/parser': 7.28.3 + '@babel/parser': 7.28.5 '@babel/types': 7.28.0 '@netlify/binary-info': 1.0.0 '@netlify/serverless-functions-api': 2.1.3 @@ -15924,23 +14562,15 @@ snapshots: - rollup - supports-color - '@next/env@15.2.1': {} - - '@next/env@15.2.3': {} - '@next/env@15.3.4': {} - '@next/env@15.4.1': {} + '@next/env@16.1.1': {} '@next/eslint-plugin-next@15.1.4': dependencies: fast-glob: 3.3.1 - '@next/eslint-plugin-next@15.2.1': - dependencies: - fast-glob: 3.3.1 - - '@next/eslint-plugin-next@15.2.3': + '@next/eslint-plugin-next@15.3.1': dependencies: fast-glob: 3.3.1 @@ -15948,104 +14578,52 @@ snapshots: dependencies: fast-glob: 3.3.1 - '@next/eslint-plugin-next@15.4.1': - dependencies: - fast-glob: 3.3.1 - - '@next/swc-darwin-arm64@15.2.1': - optional: true - - '@next/swc-darwin-arm64@15.2.3': - optional: true - '@next/swc-darwin-arm64@15.3.4': optional: true - '@next/swc-darwin-arm64@15.4.1': - optional: true - - '@next/swc-darwin-x64@15.2.1': - optional: true - - '@next/swc-darwin-x64@15.2.3': + '@next/swc-darwin-arm64@16.1.1': optional: true '@next/swc-darwin-x64@15.3.4': optional: true - '@next/swc-darwin-x64@15.4.1': - optional: true - - '@next/swc-linux-arm64-gnu@15.2.1': - optional: true - - '@next/swc-linux-arm64-gnu@15.2.3': + '@next/swc-darwin-x64@16.1.1': optional: true '@next/swc-linux-arm64-gnu@15.3.4': optional: true - '@next/swc-linux-arm64-gnu@15.4.1': - optional: true - - '@next/swc-linux-arm64-musl@15.2.1': - optional: true - - '@next/swc-linux-arm64-musl@15.2.3': + '@next/swc-linux-arm64-gnu@16.1.1': optional: true '@next/swc-linux-arm64-musl@15.3.4': optional: true - '@next/swc-linux-arm64-musl@15.4.1': - optional: true - - '@next/swc-linux-x64-gnu@15.2.1': - optional: true - - '@next/swc-linux-x64-gnu@15.2.3': + '@next/swc-linux-arm64-musl@16.1.1': optional: true '@next/swc-linux-x64-gnu@15.3.4': optional: true - '@next/swc-linux-x64-gnu@15.4.1': - optional: true - - '@next/swc-linux-x64-musl@15.2.1': - optional: true - - '@next/swc-linux-x64-musl@15.2.3': + '@next/swc-linux-x64-gnu@16.1.1': optional: true '@next/swc-linux-x64-musl@15.3.4': optional: true - '@next/swc-linux-x64-musl@15.4.1': - optional: true - - '@next/swc-win32-arm64-msvc@15.2.1': - optional: true - - '@next/swc-win32-arm64-msvc@15.2.3': + '@next/swc-linux-x64-musl@16.1.1': optional: true '@next/swc-win32-arm64-msvc@15.3.4': optional: true - '@next/swc-win32-arm64-msvc@15.4.1': - optional: true - - '@next/swc-win32-x64-msvc@15.2.1': - optional: true - - '@next/swc-win32-x64-msvc@15.2.3': + '@next/swc-win32-arm64-msvc@16.1.1': optional: true '@next/swc-win32-x64-msvc@15.3.4': optional: true - '@next/swc-win32-x64-msvc@15.4.1': + '@next/swc-win32-x64-msvc@16.1.1': optional: true '@noble/ciphers@0.6.0': {} @@ -16098,13 +14676,11 @@ snapshots: '@orama/orama@3.1.11': {} - '@oxc-project/runtime@0.82.3': {} - - '@oxc-project/types@0.82.3': {} + '@oxc-project/runtime@0.82.3': + optional: true - '@paralleldrive/cuid2@2.3.1': - dependencies: - '@noble/hashes': 1.8.0 + '@oxc-project/types@0.82.3': + optional: true '@parcel/watcher-android-arm64@2.5.1': optional: true @@ -16136,11 +14712,6 @@ snapshots: '@parcel/watcher-linux-x64-musl@2.5.1': optional: true - '@parcel/watcher-wasm@2.3.0': - dependencies: - is-glob: 4.0.3 - micromatch: 4.0.8 - '@parcel/watcher-wasm@2.5.1': dependencies: is-glob: 4.0.3 @@ -16209,29 +14780,11 @@ snapshots: pvtsutils: 1.3.6 tslib: 2.8.1 - '@peculiar/json-schema@1.1.12': - dependencies: - tslib: 2.8.1 - - '@peculiar/webcrypto@1.4.1': - dependencies: - '@peculiar/asn1-schema': 2.4.0 - '@peculiar/json-schema': 1.1.12 - pvtsutils: 1.3.6 - tslib: 2.8.1 - webcrypto-core: 1.8.1 - - '@peculiar/webcrypto@1.5.0': - dependencies: - '@peculiar/asn1-schema': 2.4.0 - '@peculiar/json-schema': 1.1.12 - pvtsutils: 1.3.6 - tslib: 2.8.1 - webcrypto-core: 1.8.1 - '@pkgjs/parseargs@0.11.0': optional: true + '@pkgr/core@0.2.9': {} + '@poppinss/colors@4.1.5': dependencies: kleur: 4.1.5 @@ -16244,9 +14797,7 @@ snapshots: '@poppinss/exception@1.2.2': {} - '@quansync/fs@1.0.0': - dependencies: - quansync: 1.0.0 + '@radix-ui/colors@3.0.0': {} '@radix-ui/number@1.1.1': {} @@ -16254,6 +14805,15 @@ snapshots: '@radix-ui/primitive@1.1.3': {} + '@radix-ui/react-accessible-icon@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + '@radix-ui/react-accordion@1.2.11(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.2 @@ -16285,25 +14845,73 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.7(@types/react@19.1.10) + '@types/react': 19.1.10 + '@types/react-dom': 19.1.7(@types/react@19.1.10) + + '@radix-ui/react-accordion@1.2.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-collapsible': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-accordion@1.2.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@18.3.23)(react@18.3.1) + '@radix-ui/react-context': 1.1.2(@types/react@18.3.23)(react@18.3.1) + '@radix-ui/react-direction': 1.1.1(@types/react@18.3.23)(react@18.3.1) + '@radix-ui/react-id': 1.1.1(@types/react@18.3.23)(react@18.3.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@18.3.23)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.23 + '@types/react-dom': 18.3.7(@types/react@18.3.23) + + '@radix-ui/react-accordion@1.2.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) - '@radix-ui/react-accordion@1.2.11(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-alert-dialog@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-collapsible': 1.1.11(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-direction': 1.1.1(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.12)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-dialog': 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: - '@types/react': 19.1.12 - '@types/react-dom': 19.1.9(@types/react@19.1.12) + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-arrow@1.1.7(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -16323,36 +14931,52 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) - '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-aspect-ratio@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) - '@radix-ui/react-avatar@1.1.11(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-avatar@1.1.10(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-context': 1.1.3(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.4(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-is-hydrated': 0.1.0(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-is-hydrated': 0.1.0(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-checkbox@1.3.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-collapsible@1.1.11(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -16386,21 +15010,21 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-collapsible@1.1.11(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-collapsible@1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.12)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-presence': 1.1.4(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: - '@types/react': 19.1.12 - '@types/react-dom': 19.1.9(@types/react@19.1.12) + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-collapsible@1.1.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -16418,21 +15042,21 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-collapsible@1.1.12(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-collapsible@1.1.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-collection@1.1.7(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -16458,29 +15082,17 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-collection@1.1.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.1.10)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) - - '@radix-ui/react-collection@1.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-collection@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-compose-refs@1.1.2(@types/react@18.3.23)(react@18.3.1)': dependencies: @@ -16494,12 +15106,26 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-compose-refs@1.1.2(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-compose-refs@1.1.2(@types/react@19.2.7)(react@19.2.3)': dependencies: - react: 19.1.1 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 + '@radix-ui/react-context-menu@2.2.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-menu': 2.1.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + '@radix-ui/react-context@1.1.2(@types/react@18.3.23)(react@18.3.1)': dependencies: react: 18.3.1 @@ -16512,15 +15138,9 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-context@1.1.2(@types/react@19.2.7)(react@19.1.1)': - dependencies: - react: 19.1.1 - optionalDependencies: - '@types/react': 19.2.7 - - '@radix-ui/react-context@1.1.3(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-context@1.1.2(@types/react@19.2.7)(react@19.2.3)': dependencies: - react: 19.1.1 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 @@ -16590,27 +15210,27 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-dialog@1.1.15(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-dialog@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) aria-hidden: 1.2.6 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - react-remove-scroll: 2.7.1(@types/react@19.2.7)(react@19.1.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-remove-scroll: 2.7.1(@types/react@19.2.7)(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-direction@1.1.1(@types/react@18.3.23)(react@18.3.1)': dependencies: @@ -16624,9 +15244,9 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-direction@1.1.1(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-direction@1.1.1(@types/react@19.2.7)(react@19.2.3)': dependencies: - react: 19.1.1 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 @@ -16669,33 +15289,33 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-dismissable-layer@1.1.11(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-dismissable-layer@1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) - '@radix-ui/react-dropdown-menu@2.1.16(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-dropdown-menu@2.1.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-menu': 2.1.16(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-menu': 2.1.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-focus-guards@1.1.2(@types/react@18.3.23)(react@18.3.1)': dependencies: @@ -16715,9 +15335,9 @@ snapshots: optionalDependencies: '@types/react': 18.3.23 - '@radix-ui/react-focus-guards@1.1.3(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-focus-guards@1.1.3(@types/react@19.2.7)(react@19.2.3)': dependencies: - react: 19.1.1 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 @@ -16743,27 +15363,51 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.10)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.1.10)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) - '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-form@0.1.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-label': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-hover-card@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-icons@1.3.2(react@19.2.3)': + dependencies: + react: 19.2.3 '@radix-ui/react-id@1.1.1(@types/react@18.3.23)(react@18.3.1)': dependencies: @@ -16779,10 +15423,10 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-id@1.1.1(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-id@1.1.1(@types/react@19.2.7)(react@19.2.3)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 @@ -16795,40 +15439,58 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-label@2.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-label@2.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) - '@radix-ui/react-menu@2.1.16(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-menu@2.1.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.1.1) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) aria-hidden: 1.2.6 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - react-remove-scroll: 2.7.1(@types/react@19.2.7)(react@19.1.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-remove-scroll: 2.7.1(@types/react@19.2.7)(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-menubar@1.1.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-menu': 2.1.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-navigation-menu@1.2.13(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -16852,6 +15514,64 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) + '@radix-ui/react-navigation-menu@1.2.14(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-one-time-password-field@0.1.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/number': 1.1.1 + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-is-hydrated': 0.1.0(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-password-toggle-field@0.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-is-hydrated': 0.1.0(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + '@radix-ui/react-popover@1.1.14(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.2 @@ -16921,28 +15641,28 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-popover@1.1.15(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) aria-hidden: 1.2.6 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - react-remove-scroll: 2.7.1(@types/react@19.2.7)(react@19.1.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-remove-scroll: 2.7.1(@types/react@19.2.7)(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-popper@1.2.7(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -16998,23 +15718,23 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-popper@1.2.8(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@floating-ui/react-dom': 2.1.5(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-arrow': 1.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-rect': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.7)(react@19.1.1) + '@radix-ui/react-popper@1.2.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@floating-ui/react-dom': 2.1.5(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-arrow': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-rect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.7)(react@19.2.3) '@radix-ui/rect': 1.1.1 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-portal@1.1.9(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -17036,25 +15756,15 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-portal@1.1.9(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.10))(@types/react@19.1.10)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.10)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - optionalDependencies: - '@types/react': 19.1.10 - '@types/react-dom': 19.1.9(@types/react@19.1.10) - - '@radix-ui/react-portal@1.1.9(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-portal@1.1.9(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-presence@1.1.4(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -17076,15 +15786,15 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-presence@1.1.4(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-presence@1.1.4(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.12)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: - '@types/react': 19.1.12 - '@types/react-dom': 19.1.9(@types/react@19.1.12) + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-presence@1.1.5(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -17096,15 +15806,15 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-presence@1.1.5(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-presence@1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-primitive@2.1.3(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -17124,32 +15834,42 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-slot': 1.2.3(@types/react@19.1.12)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: - '@types/react': 19.1.12 - '@types/react-dom': 19.1.9(@types/react@19.1.12) + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) - '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-progress@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) - '@radix-ui/react-primitive@2.1.4(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-radio-group@1.3.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-slot': 1.2.4(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-roving-focus@1.1.10(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -17168,22 +15888,39 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-roving-focus@1.1.11(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-roving-focus@1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-scroll-area@1.2.10(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/number': 1.1.1 + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-scroll-area@1.2.9(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -17202,6 +15939,35 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) + '@radix-ui/react-select@2.2.6(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/number': 1.1.1 + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + aria-hidden: 1.2.6 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-remove-scroll: 2.7.1(@types/react@19.2.7)(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + '@radix-ui/react-separator@1.1.7(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/react-primitive': 2.1.3(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -17211,14 +15977,33 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-separator@1.1.7(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-separator@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-slider@1.3.6(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/number': 1.1.1 + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-slot@1.2.3(@types/react@18.3.23)(react@18.3.1)': dependencies: @@ -17234,26 +16019,26 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-slot@1.2.3(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-slot@1.2.3(@types/react@19.2.7)(react@19.2.3)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 - '@radix-ui/react-slot@1.2.4(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-slot@1.2.4(@types/react@18.3.23)(react@18.3.1)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@18.3.23)(react@18.3.1) + react: 18.3.1 optionalDependencies: - '@types/react': 19.2.7 + '@types/react': 18.3.23 - '@radix-ui/react-slot@1.2.4(@types/react@19.1.12)(react@19.1.1)': + '@radix-ui/react-slot@1.2.4(@types/react@19.2.7)(react@19.2.3)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 optionalDependencies: - '@types/react': 19.1.12 + '@types/react': 19.2.7 '@radix-ui/react-switch@1.2.5(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -17285,35 +16070,35 @@ snapshots: '@types/react': 19.1.10 '@types/react-dom': 19.1.7(@types/react@19.1.10) - '@radix-ui/react-switch@1.2.5(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-switch@1.2.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.1.12))(@types/react@19.1.12)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.12)(react@19.1.1) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.12)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: - '@types/react': 19.1.12 - '@types/react-dom': 19.1.9(@types/react@19.1.12) + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) - '@radix-ui/react-switch@1.2.5(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-switch@1.2.6(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-tabs@1.1.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -17331,25 +16116,102 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-tooltip@1.2.8(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-tabs@1.1.13(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-toast@1.2.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-toggle-group@1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toggle': 1.1.10(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-toggle@1.1.10(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-toolbar@1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-separator': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toggle-group': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + + '@radix-ui/react-tooltip@1.2.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) + '@types/react-dom': 19.2.3(@types/react@19.2.7) '@radix-ui/react-use-callback-ref@1.1.1(@types/react@18.3.23)(react@18.3.1)': dependencies: @@ -17363,9 +16225,9 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.2.7)(react@19.2.3)': dependencies: - react: 19.1.1 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 @@ -17385,11 +16247,11 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.2.7)(react@19.2.3)': dependencies: - '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.2.7)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 @@ -17407,10 +16269,10 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.2.7)(react@19.2.3)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 @@ -17428,17 +16290,17 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.2.7)(react@19.2.3)': dependencies: - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 - '@radix-ui/react-use-is-hydrated@0.1.0(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-use-is-hydrated@0.1.0(@types/react@19.2.7)(react@19.2.3)': dependencies: - react: 19.1.1 - use-sync-external-store: 1.5.0(react@19.1.1) + react: 19.2.3 + use-sync-external-store: 1.5.0(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 @@ -17454,9 +16316,9 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.2.7)(react@19.2.3)': dependencies: - react: 19.1.1 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 @@ -17472,9 +16334,9 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-use-previous@1.1.1(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-use-previous@1.1.1(@types/react@19.2.7)(react@19.2.3)': dependencies: - react: 19.1.1 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 @@ -17492,10 +16354,10 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-use-rect@1.1.1(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-use-rect@1.1.1(@types/react@19.2.7)(react@19.2.3)': dependencies: '@radix-ui/rect': 1.1.1 - react: 19.1.1 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 @@ -17513,10 +16375,10 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - '@radix-ui/react-use-size@1.1.1(@types/react@19.2.7)(react@19.1.1)': + '@radix-ui/react-use-size@1.1.1(@types/react@19.2.7)(react@19.2.3)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + react: 19.2.3 optionalDependencies: '@types/react': 19.2.7 @@ -17529,102 +16391,32 @@ snapshots: '@types/react': 18.3.23 '@types/react-dom': 18.3.7(@types/react@18.3.23) - '@radix-ui/react-visually-hidden@1.2.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-visually-hidden@1.2.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.1.9(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 - '@types/react-dom': 19.1.9(@types/react@19.2.7) - - '@radix-ui/rect@1.1.1': {} - - '@react-router/dev@7.10.1(@react-router/serve@7.10.1(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2))(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(terser@5.43.1)(tsx@4.20.4)(typescript@5.9.2)(vite@6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(yaml@2.8.1)': - dependencies: - '@babel/core': 7.28.3 - '@babel/generator': 7.28.3 - '@babel/parser': 7.28.3 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) - '@babel/preset-typescript': 7.27.1(@babel/core@7.28.3) - '@babel/traverse': 7.28.3 - '@babel/types': 7.28.2 - '@react-router/node': 7.10.1(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2) - '@remix-run/node-fetch-server': 0.9.0 - arg: 5.0.2 - babel-dead-code-elimination: 1.0.10 - chokidar: 4.0.3 - dedent: 1.7.1 - es-module-lexer: 1.7.0 - exit-hook: 2.2.1 - isbot: 5.1.29 - jsesc: 3.0.2 - lodash: 4.17.21 - p-map: 7.0.3 - pathe: 1.1.2 - picocolors: 1.1.1 - pkg-types: 2.3.0 - prettier: 3.6.2 - react-refresh: 0.14.2 - react-router: 7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - semver: 7.7.3 - tinyglobby: 0.2.15 - valibot: 1.2.0(typescript@5.9.2) - vite: 6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - vite-node: 3.2.4(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - optionalDependencies: - '@react-router/serve': 7.10.1(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2) - typescript: 5.9.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - jiti - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - - '@react-router/express@7.10.1(express@4.22.1)(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2)': - dependencies: - '@react-router/node': 7.10.1(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2) - express: 4.22.1 - react-router: 7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - optionalDependencies: - typescript: 5.9.2 - - '@react-router/node@7.10.1(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2)': - dependencies: - '@mjackson/node-fetch-server': 0.2.0 - react-router: 7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - optionalDependencies: - typescript: 5.9.2 + '@types/react-dom': 19.2.3(@types/react@19.2.7) - '@react-router/serve@7.10.1(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2)': - dependencies: - '@mjackson/node-fetch-server': 0.2.0 - '@react-router/express': 7.10.1(express@4.22.1)(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2) - '@react-router/node': 7.10.1(react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.9.2) - compression: 1.8.1 - express: 4.22.1 - get-port: 5.1.1 - morgan: 1.10.1 - react-router: 7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - source-map-support: 0.5.21 - transitivePeerDependencies: - - supports-color - - typescript + '@radix-ui/rect@1.1.1': {} - '@remix-run/node-fetch-server@0.9.0': {} + '@radix-ui/themes@3.2.1(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + '@radix-ui/colors': 3.0.0 + classnames: 2.5.1 + radix-ui: 1.4.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-remove-scroll-bar: 2.3.8(@types/react@19.2.7)(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) - '@remix-run/node@2.17.0(typescript@5.9.2)': + '@remix-run/node@2.17.0(typescript@5.9.3)': dependencies: - '@remix-run/server-runtime': 2.17.0(typescript@5.8.3) + '@remix-run/server-runtime': 2.17.0(typescript@5.9.3) '@remix-run/web-fetch': 4.4.2 '@web3-storage/multipart-parser': 1.0.0 cookie-signature: 1.2.2 @@ -17632,11 +16424,11 @@ snapshots: stream-slice: 0.1.2 undici: 6.21.3 optionalDependencies: - typescript: 5.8.3 + typescript: 5.9.3 '@remix-run/router@1.23.0': {} - '@remix-run/server-runtime@2.17.0(typescript@5.8.3)': + '@remix-run/server-runtime@2.17.0(typescript@5.9.3)': dependencies: '@remix-run/router': 1.23.0 '@types/cookie': 0.6.0 @@ -17646,7 +16438,7 @@ snapshots: source-map: 0.7.6 turbo-stream: 2.4.1 optionalDependencies: - typescript: 5.8.3 + typescript: 5.9.3 '@remix-run/web-blob@3.1.0': dependencies: @@ -17720,11 +16512,10 @@ snapshots: '@rolldown/binding-win32-x64-msvc@1.0.0-beta.34': optional: true - '@rolldown/pluginutils@1.0.0-beta.27': {} - - '@rolldown/pluginutils@1.0.0-beta.30': {} + '@rolldown/pluginutils@1.0.0-beta.34': + optional: true - '@rolldown/pluginutils@1.0.0-beta.34': {} + '@rolldown/pluginutils@1.0.0-beta.53': {} '@rollup/plugin-alias@5.1.1(rollup@4.47.1)': optionalDependencies: @@ -17737,7 +16528,7 @@ snapshots: estree-walker: 2.0.2 fdir: 6.5.0(picomatch@4.0.3) is-reference: 1.2.1 - magic-string: 0.30.17 + magic-string: 0.30.21 picomatch: 4.0.3 optionalDependencies: rollup: 4.47.1 @@ -17746,7 +16537,7 @@ snapshots: dependencies: '@rollup/pluginutils': 5.2.0(rollup@4.47.1) estree-walker: 2.0.2 - magic-string: 0.30.17 + magic-string: 0.30.21 optionalDependencies: rollup: 4.47.1 @@ -17769,7 +16560,7 @@ snapshots: '@rollup/plugin-replace@6.0.2(rollup@4.47.1)': dependencies: '@rollup/pluginutils': 5.2.0(rollup@4.47.1) - magic-string: 0.30.17 + magic-string: 0.30.21 optionalDependencies: rollup: 4.47.1 @@ -17913,8 +16704,6 @@ snapshots: '@rushstack/eslint-patch@1.12.0': {} - '@schummar/icu-type-parser@1.21.5': {} - '@shikijs/core@3.9.2': dependencies: '@shikijs/types': 3.9.2 @@ -17978,6 +16767,8 @@ snapshots: '@sinclair/typebox@0.34.38': {} + '@sindresorhus/is@4.6.0': {} + '@sindresorhus/is@7.0.2': {} '@sindresorhus/merge-streams@2.3.0': {} @@ -17998,21 +16789,19 @@ snapshots: '@standard-schema/spec@1.0.0': {} - '@standard-schema/utils@0.3.0': {} - - '@supabase/auth-js@2.88.0': + '@supabase/auth-js@2.90.1': dependencies: tslib: 2.8.1 - '@supabase/functions-js@2.88.0': + '@supabase/functions-js@2.90.1': dependencies: tslib: 2.8.1 - '@supabase/postgrest-js@2.88.0': + '@supabase/postgrest-js@2.90.1': dependencies: tslib: 2.8.1 - '@supabase/realtime-js@2.88.0': + '@supabase/realtime-js@2.90.1': dependencies: '@types/phoenix': 1.6.6 '@types/ws': 8.18.1 @@ -18022,23 +16811,28 @@ snapshots: - bufferutil - utf-8-validate - '@supabase/ssr@0.6.1(@supabase/supabase-js@2.88.0)': + '@supabase/ssr@0.6.1(@supabase/supabase-js@2.90.1)': dependencies: - '@supabase/supabase-js': 2.88.0 + '@supabase/supabase-js': 2.90.1 cookie: 1.0.2 - '@supabase/storage-js@2.88.0': + '@supabase/ssr@0.8.0(@supabase/supabase-js@2.90.1)': + dependencies: + '@supabase/supabase-js': 2.90.1 + cookie: 1.0.2 + + '@supabase/storage-js@2.90.1': dependencies: iceberg-js: 0.8.1 tslib: 2.8.1 - '@supabase/supabase-js@2.88.0': + '@supabase/supabase-js@2.90.1': dependencies: - '@supabase/auth-js': 2.88.0 - '@supabase/functions-js': 2.88.0 - '@supabase/postgrest-js': 2.88.0 - '@supabase/realtime-js': 2.88.0 - '@supabase/storage-js': 2.88.0 + '@supabase/auth-js': 2.90.1 + '@supabase/functions-js': 2.90.1 + '@supabase/postgrest-js': 2.90.1 + '@supabase/realtime-js': 2.90.1 + '@supabase/storage-js': 2.90.1 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -18095,6 +16889,13 @@ snapshots: dependencies: tslib: 2.8.1 + '@swc/jest@0.2.39(@swc/core@1.15.5)': + dependencies: + '@jest/create-cache-key-function': 30.2.0 + '@swc/core': 1.15.5 + '@swc/counter': 0.1.3 + jsonc-parser: 3.3.1 + '@swc/types@0.1.25': dependencies: '@swc/counter': 0.1.3 @@ -18129,124 +16930,78 @@ snapshots: source-map-js: 1.2.1 tailwindcss: 4.1.18 - '@tailwindcss/node@4.1.17': - dependencies: - '@jridgewell/remapping': 2.3.5 - enhanced-resolve: 5.18.3 - jiti: 2.6.1 - lightningcss: 1.30.2 - magic-string: 0.30.21 - source-map-js: 1.2.1 - tailwindcss: 4.1.17 - '@tailwindcss/oxide-android-arm64@4.1.11': optional: true '@tailwindcss/oxide-android-arm64@4.1.18': optional: true - '@tailwindcss/oxide-android-arm64@4.1.17': - optional: true - '@tailwindcss/oxide-darwin-arm64@4.1.11': optional: true '@tailwindcss/oxide-darwin-arm64@4.1.18': optional: true - '@tailwindcss/oxide-darwin-arm64@4.1.17': - optional: true - '@tailwindcss/oxide-darwin-x64@4.1.11': optional: true '@tailwindcss/oxide-darwin-x64@4.1.18': optional: true - '@tailwindcss/oxide-darwin-x64@4.1.17': - optional: true - '@tailwindcss/oxide-freebsd-x64@4.1.11': optional: true '@tailwindcss/oxide-freebsd-x64@4.1.18': optional: true - '@tailwindcss/oxide-freebsd-x64@4.1.17': - optional: true - '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.11': optional: true '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.18': optional: true - '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.17': - optional: true - '@tailwindcss/oxide-linux-arm64-gnu@4.1.11': optional: true '@tailwindcss/oxide-linux-arm64-gnu@4.1.18': optional: true - '@tailwindcss/oxide-linux-arm64-gnu@4.1.17': - optional: true - '@tailwindcss/oxide-linux-arm64-musl@4.1.11': optional: true '@tailwindcss/oxide-linux-arm64-musl@4.1.18': optional: true - '@tailwindcss/oxide-linux-arm64-musl@4.1.17': - optional: true - '@tailwindcss/oxide-linux-x64-gnu@4.1.11': optional: true '@tailwindcss/oxide-linux-x64-gnu@4.1.18': optional: true - '@tailwindcss/oxide-linux-x64-gnu@4.1.17': - optional: true - '@tailwindcss/oxide-linux-x64-musl@4.1.11': optional: true '@tailwindcss/oxide-linux-x64-musl@4.1.18': optional: true - '@tailwindcss/oxide-linux-x64-musl@4.1.17': - optional: true - '@tailwindcss/oxide-wasm32-wasi@4.1.11': optional: true '@tailwindcss/oxide-wasm32-wasi@4.1.18': optional: true - '@tailwindcss/oxide-wasm32-wasi@4.1.17': - optional: true - '@tailwindcss/oxide-win32-arm64-msvc@4.1.11': optional: true '@tailwindcss/oxide-win32-arm64-msvc@4.1.18': optional: true - '@tailwindcss/oxide-win32-arm64-msvc@4.1.17': - optional: true - '@tailwindcss/oxide-win32-x64-msvc@4.1.11': optional: true '@tailwindcss/oxide-win32-x64-msvc@4.1.18': optional: true - '@tailwindcss/oxide-win32-x64-msvc@4.1.17': - optional: true - '@tailwindcss/oxide@4.1.11': dependencies: detect-libc: 2.0.4 @@ -18280,21 +17035,6 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.1.18 '@tailwindcss/oxide-win32-x64-msvc': 4.1.18 - '@tailwindcss/oxide@4.1.17': - optionalDependencies: - '@tailwindcss/oxide-android-arm64': 4.1.17 - '@tailwindcss/oxide-darwin-arm64': 4.1.17 - '@tailwindcss/oxide-darwin-x64': 4.1.17 - '@tailwindcss/oxide-freebsd-x64': 4.1.17 - '@tailwindcss/oxide-linux-arm-gnueabihf': 4.1.17 - '@tailwindcss/oxide-linux-arm64-gnu': 4.1.17 - '@tailwindcss/oxide-linux-arm64-musl': 4.1.17 - '@tailwindcss/oxide-linux-x64-gnu': 4.1.17 - '@tailwindcss/oxide-linux-x64-musl': 4.1.17 - '@tailwindcss/oxide-wasm32-wasi': 4.1.17 - '@tailwindcss/oxide-win32-arm64-msvc': 4.1.17 - '@tailwindcss/oxide-win32-x64-msvc': 4.1.17 - '@tailwindcss/postcss@4.1.11': dependencies: '@alloc/quick-lru': 5.2.0 @@ -18311,30 +17051,23 @@ snapshots: postcss: 8.5.6 tailwindcss: 4.1.18 - '@tailwindcss/vite@4.1.18(vite@6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': - dependencies: - '@tailwindcss/node': 4.1.18 - '@tailwindcss/oxide': 4.1.18 - tailwindcss: 4.1.18 - vite: 6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - - '@tailwindcss/vite@4.1.18(vite@6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': + '@tailwindcss/vite@4.1.18(vite@7.3.0(@types/node@24.10.4)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': dependencies: '@tailwindcss/node': 4.1.18 '@tailwindcss/oxide': 4.1.18 tailwindcss: 4.1.18 - vite: 6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + vite: 7.3.0(@types/node@24.10.4)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - '@tanstack/directive-functions-plugin@1.131.2(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': + '@tanstack/directive-functions-plugin@1.131.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': dependencies: '@babel/code-frame': 7.27.1 - '@babel/core': 7.28.3 - '@babel/traverse': 7.28.3 - '@babel/types': 7.28.2 + '@babel/core': 7.28.5 + '@babel/traverse': 7.28.5 + '@babel/types': 7.28.5 '@tanstack/router-utils': 1.131.2 babel-dead-code-elimination: 1.0.10 tiny-invariant: 1.3.3 - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + vite: 7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) transitivePeerDependencies: - supports-color @@ -18342,117 +17075,46 @@ snapshots: '@tanstack/query-core@5.83.1': {} + '@tanstack/query-core@5.90.16': {} + '@tanstack/react-query@5.85.0(react@18.3.1)': dependencies: '@tanstack/query-core': 5.83.1 react: 18.3.1 - '@tanstack/react-router-devtools@1.141.4(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@tanstack/router-core@1.131.7)(csstype@3.2.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(solid-js@1.9.10)': - dependencies: - '@tanstack/react-router': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/router-devtools-core': 1.141.4(@tanstack/router-core@1.131.7)(csstype@3.2.3)(solid-js@1.9.10) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - optionalDependencies: - '@tanstack/router-core': 1.131.7 - transitivePeerDependencies: - - csstype - - jiti - - less - - lightningcss - - sass - - sass-embedded - - solid-js - - '@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@tanstack/react-query@5.90.16(react@19.2.3)': dependencies: - '@tanstack/history': 1.131.2 - '@tanstack/react-store': 0.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/router-core': 1.131.7 - isbot: 5.1.29 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - tiny-invariant: 1.3.3 - tiny-warning: 1.0.3 + '@tanstack/query-core': 5.90.16 + react: 19.2.3 - '@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@tanstack/react-router@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@tanstack/history': 1.131.2 - '@tanstack/react-store': 0.7.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@tanstack/react-store': 0.7.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@tanstack/router-core': 1.131.7 isbot: 5.1.29 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - tiny-invariant: 1.3.3 - tiny-warning: 1.0.3 - - '@tanstack/react-start-client@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@tanstack/react-router': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/router-core': 1.131.7 - '@tanstack/start-client-core': 1.131.7 - cookie-es: 1.2.2 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - '@tanstack/react-start-client@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@tanstack/react-start-client@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@tanstack/react-router': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@tanstack/react-router': 1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@tanstack/router-core': 1.131.7 '@tanstack/start-client-core': 1.131.7 cookie-es: 1.2.2 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - '@tanstack/react-start-plugin@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5))': - dependencies: - '@tanstack/start-plugin-core': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)) - '@vitejs/plugin-react': 5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - pathe: 2.0.3 - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - zod: 3.25.76 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@rsbuild/core' - - '@tanstack/react-router' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/kv' - - aws4fetch - - better-sqlite3 - - drizzle-orm - - encoding - - idb-keyval - - mysql2 - - rolldown - - sqlite3 - - supports-color - - uploadthing - - vite-plugin-solid - - webpack - - xml2js - - '@tanstack/react-start-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9))': + '@tanstack/react-start-plugin@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@vitejs/plugin-react@5.1.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2))': dependencies: - '@tanstack/start-plugin-core': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-sqlite3@12.2.0)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9)) - '@vitejs/plugin-react': 5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + '@tanstack/start-plugin-core': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2)) + '@vitejs/plugin-react': 5.1.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) pathe: 2.0.3 - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + vite: 7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) zod: 3.25.76 transitivePeerDependencies: - '@azure/app-configuration' @@ -18486,84 +17148,29 @@ snapshots: - webpack - xml2js - '@tanstack/react-start-server@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@tanstack/history': 1.131.2 - '@tanstack/react-router': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/router-core': 1.131.7 - '@tanstack/start-client-core': 1.131.7 - '@tanstack/start-server-core': 1.131.7 - h3: 1.13.0 - isbot: 5.1.29 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - '@tanstack/react-start-server@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@tanstack/react-start-server@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@tanstack/history': 1.131.2 - '@tanstack/react-router': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@tanstack/react-router': 1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@tanstack/router-core': 1.131.7 '@tanstack/start-client-core': 1.131.7 '@tanstack/start-server-core': 1.131.7 h3: 1.13.0 isbot: 5.1.29 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - - '@tanstack/react-start@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rolldown@1.0.0-beta.34)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5))': - dependencies: - '@tanstack/react-start-client': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/react-start-plugin': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@vitejs/plugin-react@5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)) - '@tanstack/react-start-server': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/start-server-functions-client': 1.131.7(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@tanstack/start-server-functions-server': 1.131.2(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@vitejs/plugin-react': 5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@rsbuild/core' - - '@tanstack/react-router' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/kv' - - aws4fetch - - better-sqlite3 - - drizzle-orm - - encoding - - idb-keyval - - mysql2 - - rolldown - - sqlite3 - - supports-color - - uploadthing - - vite-plugin-solid - - webpack - - xml2js - - '@tanstack/react-start@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9))': - dependencies: - '@tanstack/react-start-client': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@tanstack/react-start-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(@vitejs/plugin-react@5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9)) - '@tanstack/react-start-server': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@tanstack/start-server-functions-client': 1.131.7(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@tanstack/start-server-functions-server': 1.131.2(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@vitejs/plugin-react': 5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + + '@tanstack/react-start@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@vitejs/plugin-react@5.1.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(rolldown@1.0.0-beta.34)(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2))': + dependencies: + '@tanstack/react-start-client': 1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@tanstack/react-start-plugin': 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@vitejs/plugin-react@5.1.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2)) + '@tanstack/react-start-server': 1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@tanstack/start-server-functions-client': 1.131.7(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + '@tanstack/start-server-functions-server': 1.131.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + '@vitejs/plugin-react': 5.1.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + vite: 7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -18596,19 +17203,12 @@ snapshots: - webpack - xml2js - '@tanstack/react-store@0.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@tanstack/store': 0.7.2 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - use-sync-external-store: 1.5.0(react@18.3.1) - - '@tanstack/react-store@0.7.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + '@tanstack/react-store@0.7.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@tanstack/store': 0.7.2 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - use-sync-external-store: 1.5.0(react@19.1.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + use-sync-external-store: 1.5.0(react@19.2.3) '@tanstack/router-core@1.131.7': dependencies: @@ -18620,17 +17220,6 @@ snapshots: tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - '@tanstack/router-devtools-core@1.141.4(@tanstack/router-core@1.131.7)(csstype@3.2.3)(solid-js@1.9.10)': - dependencies: - '@tanstack/router-core': 1.131.7 - clsx: 2.1.1 - goober: 2.1.18(csstype@3.2.3) - solid-js: 1.9.10 - tiny-invariant: 1.3.3 - vite: 7.2.2(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - optionalDependencies: - csstype: 3.2.3 - '@tanstack/router-generator@1.131.7': dependencies: '@tanstack/router-core': 1.131.7 @@ -18644,37 +17233,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@tanstack/router-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5))': - dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.3) - '@babel/template': 7.27.2 - '@babel/traverse': 7.28.3 - '@babel/types': 7.28.2 - '@tanstack/router-core': 1.131.7 - '@tanstack/router-generator': 1.131.7 - '@tanstack/router-utils': 1.131.2 - '@tanstack/virtual-file-routes': 1.131.2 - babel-dead-code-elimination: 1.0.10 - chokidar: 3.6.0 - unplugin: 2.3.5 - zod: 3.25.76 - optionalDependencies: - '@tanstack/react-router': 1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - webpack: 5.101.1(@swc/core@1.15.5) - transitivePeerDependencies: - - supports-color - - '@tanstack/router-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9))': + '@tanstack/router-plugin@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2))': dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.3) + '@babel/core': 7.28.5 + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.5) '@babel/template': 7.27.2 - '@babel/traverse': 7.28.3 - '@babel/types': 7.28.2 + '@babel/traverse': 7.28.5 + '@babel/types': 7.28.5 '@tanstack/router-core': 1.131.7 '@tanstack/router-generator': 1.131.7 '@tanstack/router-utils': 1.131.2 @@ -18684,112 +17250,57 @@ snapshots: unplugin: 2.3.5 zod: 3.25.76 optionalDependencies: - '@tanstack/react-router': 1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - webpack: 5.101.1(@swc/core@1.15.5)(esbuild@0.25.9) + '@tanstack/react-router': 1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + vite: 7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + webpack: 5.101.1(@swc/core@1.15.5)(esbuild@0.27.2) transitivePeerDependencies: - supports-color '@tanstack/router-utils@1.131.2': dependencies: - '@babel/core': 7.28.3 - '@babel/generator': 7.28.3 - '@babel/parser': 7.28.3 - '@babel/preset-typescript': 7.27.1(@babel/core@7.28.3) + '@babel/core': 7.28.5 + '@babel/generator': 7.28.5 + '@babel/parser': 7.28.5 + '@babel/preset-typescript': 7.27.1(@babel/core@7.28.5) ansis: 4.1.0 diff: 8.0.2 transitivePeerDependencies: - supports-color - '@tanstack/server-functions-plugin@1.131.2(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': + '@tanstack/server-functions-plugin@1.131.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': dependencies: '@babel/code-frame': 7.27.1 - '@babel/core': 7.28.3 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.3) + '@babel/core': 7.28.5 + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.5) '@babel/template': 7.27.2 - '@babel/traverse': 7.28.0 - '@babel/types': 7.28.2 - '@tanstack/directive-functions-plugin': 1.131.2(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - babel-dead-code-elimination: 1.0.10 - tiny-invariant: 1.3.3 - transitivePeerDependencies: - - supports-color - - vite - - '@tanstack/start-client-core@1.131.7': - dependencies: - '@tanstack/router-core': 1.131.7 - '@tanstack/start-storage-context': 1.131.7 - cookie-es: 1.2.2 - tiny-invariant: 1.3.3 - tiny-warning: 1.0.3 - - '@tanstack/start-plugin-core@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5))': - dependencies: - '@babel/code-frame': 7.26.2 - '@babel/core': 7.28.3 - '@babel/types': 7.28.2 - '@tanstack/router-core': 1.131.7 - '@tanstack/router-generator': 1.131.7 - '@tanstack/router-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)) - '@tanstack/router-utils': 1.131.2 - '@tanstack/server-functions-plugin': 1.131.2(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - '@tanstack/start-server-core': 1.131.7 - '@types/babel__code-frame': 7.0.6 - '@types/babel__core': 7.20.5 + '@babel/traverse': 7.28.5 + '@babel/types': 7.28.5 + '@tanstack/directive-functions-plugin': 1.131.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) babel-dead-code-elimination: 1.0.10 - cheerio: 1.1.2 - h3: 1.13.0 - nitropack: 2.12.4(@netlify/blobs@9.1.2)(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34) - pathe: 2.0.3 - ufo: 1.6.1 - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - vitefu: 1.1.1(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) - xmlbuilder2: 3.1.1 - zod: 3.25.76 + tiny-invariant: 1.3.3 transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@rsbuild/core' - - '@tanstack/react-router' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/kv' - - aws4fetch - - better-sqlite3 - - drizzle-orm - - encoding - - idb-keyval - - mysql2 - - rolldown - - sqlite3 - supports-color - - uploadthing - - vite-plugin-solid - - webpack - - xml2js + - vite + + '@tanstack/start-client-core@1.131.7': + dependencies: + '@tanstack/router-core': 1.131.7 + '@tanstack/start-storage-context': 1.131.7 + cookie-es: 1.2.2 + tiny-invariant: 1.3.3 + tiny-warning: 1.0.3 - '@tanstack/start-plugin-core@1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-sqlite3@12.2.0)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9))': + '@tanstack/start-plugin-core@1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34)(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2))': dependencies: '@babel/code-frame': 7.26.2 - '@babel/core': 7.28.3 - '@babel/types': 7.28.2 + '@babel/core': 7.28.5 + '@babel/types': 7.28.5 '@tanstack/router-core': 1.131.7 '@tanstack/router-generator': 1.131.7 - '@tanstack/router-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9)) + '@tanstack/router-plugin': 1.131.8(@tanstack/react-router@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2)) '@tanstack/router-utils': 1.131.2 - '@tanstack/server-functions-plugin': 1.131.2(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + '@tanstack/server-functions-plugin': 1.131.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) '@tanstack/start-server-core': 1.131.7 '@types/babel__code-frame': 7.0.6 '@types/babel__core': 7.20.5 @@ -18799,8 +17310,8 @@ snapshots: nitropack: 2.12.4(@netlify/blobs@9.1.2)(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34) pathe: 2.0.3 ufo: 1.6.1 - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - vitefu: 1.1.1(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + vite: 7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + vitefu: 1.1.1(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) xmlbuilder2: 3.1.1 zod: 3.25.76 transitivePeerDependencies: @@ -18847,9 +17358,9 @@ snapshots: tiny-warning: 1.0.3 unctx: 2.4.1 - '@tanstack/start-server-functions-client@1.131.7(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': + '@tanstack/start-server-functions-client@1.131.7(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': dependencies: - '@tanstack/server-functions-plugin': 1.131.2(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + '@tanstack/server-functions-plugin': 1.131.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) '@tanstack/start-server-functions-fetcher': 1.131.7 transitivePeerDependencies: - supports-color @@ -18860,9 +17371,9 @@ snapshots: '@tanstack/router-core': 1.131.7 '@tanstack/start-client-core': 1.131.7 - '@tanstack/start-server-functions-server@1.131.2(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': + '@tanstack/start-server-functions-server@1.131.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': dependencies: - '@tanstack/server-functions-plugin': 1.131.2(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) + '@tanstack/server-functions-plugin': 1.131.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) tiny-invariant: 1.3.3 transitivePeerDependencies: - supports-color @@ -18906,32 +17417,28 @@ snapshots: tslib: 2.8.1 optional: true - '@types/accepts@1.3.7': - dependencies: - '@types/node': 22.17.1 - '@types/babel__code-frame@7.0.6': {} '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.28.3 - '@babel/types': 7.28.2 + '@babel/parser': 7.28.5 + '@babel/types': 7.28.5 '@types/babel__generator': 7.27.0 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.28.0 '@types/babel__generator@7.27.0': dependencies: - '@babel/types': 7.28.2 + '@babel/types': 7.28.5 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.28.3 - '@babel/types': 7.28.2 + '@babel/parser': 7.28.5 + '@babel/types': 7.28.5 '@types/babel__traverse@7.28.0': dependencies: - '@babel/types': 7.28.2 + '@babel/types': 7.28.5 '@types/better-sqlite3@7.6.13': dependencies: @@ -18940,9 +17447,7 @@ snapshots: '@types/body-parser@1.19.6': dependencies: '@types/connect': 3.4.38 - '@types/node': 22.17.1 - - '@types/braces@3.0.5': {} + '@types/node': 24.10.4 '@types/bun@1.2.22(@types/react@18.3.23)': dependencies: @@ -18950,9 +17455,9 @@ snapshots: transitivePeerDependencies: - '@types/react' - '@types/bun@1.3.4': + '@types/bun@1.3.5': dependencies: - bun-types: 1.3.4 + bun-types: 1.3.5 '@types/chai@5.2.2': dependencies: @@ -18960,34 +17465,10 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.17.1 - - '@types/content-disposition@0.5.9': {} - - '@types/cookie@0.5.4': {} + '@types/node': 24.10.4 '@types/cookie@0.6.0': {} - '@types/cookiejar@2.1.5': {} - - '@types/cookies@0.7.7': - dependencies: - '@types/connect': 3.4.38 - '@types/express': 4.17.25 - '@types/keygrip': 1.0.6 - '@types/node': 22.17.1 - - '@types/cookies@0.9.2': - dependencies: - '@types/connect': 3.4.38 - '@types/express': 5.0.3 - '@types/keygrip': 1.0.6 - '@types/node': 22.17.1 - - '@types/cors@2.8.19': - dependencies: - '@types/node': 22.17.1 - '@types/d3-array@3.2.1': {} '@types/d3-color@3.1.3': {} @@ -19039,34 +17520,13 @@ snapshots: '@types/estree@1.0.8': {} - '@types/express-serve-static-core@4.19.7': - dependencies: - '@types/node': 22.17.1 - '@types/qs': 6.14.0 - '@types/range-parser': 1.2.7 - '@types/send': 0.17.5 - '@types/express-serve-static-core@5.0.7': dependencies: - '@types/node': 22.17.1 + '@types/node': 24.10.4 '@types/qs': 6.14.0 '@types/range-parser': 1.2.7 '@types/send': 0.17.5 - '@types/express@4.17.14': - dependencies: - '@types/body-parser': 1.19.6 - '@types/express-serve-static-core': 4.19.7 - '@types/qs': 6.14.0 - '@types/serve-static': 1.15.8 - - '@types/express@4.17.25': - dependencies: - '@types/body-parser': 1.19.6 - '@types/express-serve-static-core': 4.19.7 - '@types/qs': 6.14.0 - '@types/serve-static': 1.15.8 - '@types/express@5.0.3': dependencies: '@types/body-parser': 1.19.6 @@ -19075,7 +17535,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.17.1 + '@types/node': 24.10.4 '@types/hast@2.3.10': dependencies: @@ -19085,8 +17545,6 @@ snapshots: dependencies: '@types/unist': 3.0.3 - '@types/http-assert@1.5.6': {} - '@types/http-errors@2.0.5': {} '@types/istanbul-lib-coverage@2.0.6': {} @@ -19108,54 +17566,18 @@ snapshots: '@types/json5@0.0.29': {} - '@types/keygrip@1.0.6': {} - - '@types/koa-compose@3.2.9': - dependencies: - '@types/koa': 2.15.0 - - '@types/koa@2.15.0': - dependencies: - '@types/accepts': 1.3.7 - '@types/content-disposition': 0.5.9 - '@types/cookies': 0.9.2 - '@types/http-assert': 1.5.6 - '@types/http-errors': 2.0.5 - '@types/keygrip': 1.0.6 - '@types/koa-compose': 3.2.9 - '@types/node': 22.17.1 - '@types/mdast@4.0.4': dependencies: '@types/unist': 3.0.3 '@types/mdx@2.0.13': {} - '@types/methods@1.1.4': {} - - '@types/micromatch@4.0.10': - dependencies: - '@types/braces': 3.0.5 - '@types/mime@1.3.5': {} '@types/minimist@1.2.5': {} - '@types/morgan@1.9.10': - dependencies: - '@types/node': 22.17.1 - '@types/ms@2.1.0': {} - '@types/node-fetch@2.6.2': - dependencies: - '@types/node': 22.17.1 - form-data: 3.0.4 - - '@types/node@16.18.6': {} - - '@types/node@17.0.45': {} - '@types/node@18.17.0': {} '@types/node@20.19.10': @@ -19170,6 +17592,10 @@ snapshots: dependencies: undici-types: 6.21.0 + '@types/node@24.10.4': + dependencies: + undici-types: 7.16.0 + '@types/node@24.3.0': dependencies: undici-types: 7.10.0 @@ -19180,7 +17606,7 @@ snapshots: '@types/pg@8.15.5': dependencies: - '@types/node': 22.17.1 + '@types/node': 24.10.4 pg-protocol: 1.10.3 pg-types: 2.2.0 @@ -19206,12 +17632,7 @@ snapshots: dependencies: '@types/react': 19.1.10 - '@types/react-dom@19.1.9(@types/react@19.1.10)': - dependencies: - '@types/react': 19.1.10 - optional: true - - '@types/react-dom@19.1.9(@types/react@19.2.7)': + '@types/react-dom@19.2.3(@types/react@19.2.7)': dependencies: '@types/react': 19.2.7 @@ -19233,30 +17654,18 @@ snapshots: '@types/send@0.17.5': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.17.1 + '@types/node': 24.10.4 '@types/serve-static@1.15.8': dependencies: '@types/http-errors': 2.0.5 - '@types/node': 22.17.1 + '@types/node': 24.10.4 '@types/send': 0.17.5 '@types/stack-utils@2.0.3': {} '@types/statuses@2.0.6': {} - '@types/superagent@8.1.9': - dependencies: - '@types/cookiejar': 2.1.5 - '@types/methods': 1.1.4 - '@types/node': 22.17.1 - form-data: 4.0.4 - - '@types/supertest@6.0.3': - dependencies: - '@types/methods': 1.1.4 - '@types/superagent': 8.1.9 - '@types/tough-cookie@4.0.5': {} '@types/triple-beam@1.3.5': {} @@ -19267,7 +17676,7 @@ snapshots: '@types/ws@8.18.1': dependencies: - '@types/node': 22.17.1 + '@types/node': 24.10.4 '@types/yargs-parser@21.0.3': {} @@ -19277,18 +17686,18 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.17.1 + '@types/node': 24.10.4 optional: true - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2)': + '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.9.2) + '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.9.2) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.9.2) + '@typescript-eslint/type-utils': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/utils': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) '@typescript-eslint/visitor-keys': 7.18.0 - eslint: 8.57.1 + eslint: 9.29.0(jiti@2.6.1) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -19298,37 +17707,54 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': + '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/parser': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) - '@typescript-eslint/utils': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/type-utils': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/visitor-keys': 7.18.0 - eslint: 9.29.0(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.4.3(typescript@5.9.2) + ts-api-utils: 1.4.3(typescript@5.9.3) optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/type-utils': 8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/utils': 8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.31.1 + eslint: 9.29.0(jiti@2.6.1) + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 2.4.0(typescript@5.9.2) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2)': + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) - '@typescript-eslint/utils': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) - '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/parser': 8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/type-utils': 8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 eslint: 9.39.2(jiti@2.6.1) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.8.3) + ts-api-utils: 2.4.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -19350,67 +17776,78 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3) + '@typescript-eslint/parser': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.34.1 - '@typescript-eslint/type-utils': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3) - '@typescript-eslint/utils': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3) + '@typescript-eslint/type-utils': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.34.1 eslint: 9.39.2(jiti@2.6.1) graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.7.3) - typescript: 5.7.3 + ts-api-utils: 2.1.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.51.0(@typescript-eslint/parser@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) - '@typescript-eslint/scope-manager': 8.34.1 - '@typescript-eslint/type-utils': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) - '@typescript-eslint/utils': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.34.1 + '@typescript-eslint/parser': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.51.0 + '@typescript-eslint/type-utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.51.0 eslint: 9.39.2(jiti@2.6.1) - graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 + ts-api-utils: 2.4.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2)': + '@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': dependencies: '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) '@typescript-eslint/visitor-keys': 7.18.0 debug: 4.4.1(supports-color@5.5.0) - eslint: 8.57.1 + eslint: 9.29.0(jiti@2.6.1) optionalDependencies: typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': + '@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.3) '@typescript-eslint/visitor-keys': 7.18.0 debug: 4.4.1(supports-color@5.5.0) - eslint: 9.29.0(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': + dependencies: + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.31.1 + debug: 4.4.1(supports-color@5.5.0) + eslint: 9.29.0(jiti@2.6.1) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2)': + '@typescript-eslint/parser@8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3)': dependencies: '@typescript-eslint/scope-manager': 8.31.1 '@typescript-eslint/types': 8.31.1 @@ -19418,8 +17855,7 @@ snapshots: '@typescript-eslint/visitor-keys': 8.31.1 debug: 4.4.1(supports-color@5.5.0) eslint: 9.39.2(jiti@2.6.1) - optionalDependencies: - typescript: 5.9.2 + typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -19435,27 +17871,27 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3)': + '@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@typescript-eslint/scope-manager': 8.34.1 '@typescript-eslint/types': 8.34.1 - '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.7.3) + '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.34.1 debug: 4.4.1(supports-color@5.5.0) eslint: 9.39.2(jiti@2.6.1) - typescript: 5.7.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3)': + '@typescript-eslint/parser@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/scope-manager': 8.34.1 - '@typescript-eslint/types': 8.34.1 - '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.34.1 + '@typescript-eslint/scope-manager': 8.51.0 + '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.51.0 debug: 4.4.1(supports-color@5.5.0) eslint: 9.39.2(jiti@2.6.1) - typescript: 5.8.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -19468,30 +17904,30 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.34.1(typescript@5.7.3)': + '@typescript-eslint/project-service@8.34.1(typescript@5.9.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.7.3) + '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.9.3) '@typescript-eslint/types': 8.41.0 debug: 4.4.1(supports-color@5.5.0) - typescript: 5.7.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.34.1(typescript@5.8.3)': + '@typescript-eslint/project-service@8.49.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.8.3) - '@typescript-eslint/types': 8.41.0 + '@typescript-eslint/tsconfig-utils': 8.49.0(typescript@5.9.3) + '@typescript-eslint/types': 8.49.0 debug: 4.4.1(supports-color@5.5.0) - typescript: 5.8.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.41.0(typescript@5.9.2)': + '@typescript-eslint/project-service@8.51.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.9.2) - '@typescript-eslint/types': 8.41.0 + '@typescript-eslint/tsconfig-utils': 8.51.0(typescript@5.9.3) + '@typescript-eslint/types': 8.51.0 debug: 4.4.1(supports-color@5.5.0) - typescript: 5.9.2 + typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -19510,67 +17946,83 @@ snapshots: '@typescript-eslint/types': 8.34.1 '@typescript-eslint/visitor-keys': 8.34.1 - '@typescript-eslint/tsconfig-utils@8.34.1(typescript@5.5.4)': + '@typescript-eslint/scope-manager@8.49.0': dependencies: - typescript: 5.5.4 + '@typescript-eslint/types': 8.49.0 + '@typescript-eslint/visitor-keys': 8.49.0 + + '@typescript-eslint/scope-manager@8.51.0': + dependencies: + '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/visitor-keys': 8.51.0 - '@typescript-eslint/tsconfig-utils@8.34.1(typescript@5.7.3)': + '@typescript-eslint/tsconfig-utils@8.34.1(typescript@5.5.4)': dependencies: - typescript: 5.7.3 + typescript: 5.5.4 - '@typescript-eslint/tsconfig-utils@8.34.1(typescript@5.8.3)': + '@typescript-eslint/tsconfig-utils@8.34.1(typescript@5.9.3)': dependencies: - typescript: 5.8.3 + typescript: 5.9.3 '@typescript-eslint/tsconfig-utils@8.41.0(typescript@5.5.4)': dependencies: typescript: 5.5.4 - '@typescript-eslint/tsconfig-utils@8.41.0(typescript@5.7.3)': + '@typescript-eslint/tsconfig-utils@8.41.0(typescript@5.9.3)': dependencies: - typescript: 5.7.3 + typescript: 5.9.3 - '@typescript-eslint/tsconfig-utils@8.41.0(typescript@5.8.3)': + '@typescript-eslint/tsconfig-utils@8.49.0(typescript@5.9.3)': dependencies: - typescript: 5.8.3 + typescript: 5.9.3 - '@typescript-eslint/tsconfig-utils@8.41.0(typescript@5.9.2)': + '@typescript-eslint/tsconfig-utils@8.51.0(typescript@5.9.3)': dependencies: - typescript: 5.9.2 + typescript: 5.9.3 - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.9.2)': + '@typescript-eslint/type-utils@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': dependencies: '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.9.2) + '@typescript-eslint/utils': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) debug: 4.4.1(supports-color@5.5.0) - eslint: 8.57.1 + eslint: 9.29.0(jiti@2.6.1) ts-api-utils: 1.4.3(typescript@5.9.2) optionalDependencies: typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': + '@typescript-eslint/type-utils@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) - '@typescript-eslint/utils': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.3) + '@typescript-eslint/utils': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) debug: 4.4.1(supports-color@5.5.0) - eslint: 9.29.0(jiti@2.6.1) - ts-api-utils: 1.4.3(typescript@5.9.2) + eslint: 9.39.2(jiti@2.6.1) + ts-api-utils: 1.4.3(typescript@5.9.3) optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/type-utils@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': + dependencies: + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.9.2) + '@typescript-eslint/utils': 8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + debug: 4.4.1(supports-color@5.5.0) + eslint: 9.29.0(jiti@2.6.1) + ts-api-utils: 2.4.0(typescript@5.9.2) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2)': + '@typescript-eslint/type-utils@8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3)': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) - '@typescript-eslint/utils': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) debug: 4.4.1(supports-color@5.5.0) eslint: 9.39.2(jiti@2.6.1) - ts-api-utils: 1.4.3(typescript@5.9.2) - optionalDependencies: - typescript: 5.9.2 + ts-api-utils: 2.4.0(typescript@5.8.3) + typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -19585,25 +18037,26 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3)': + '@typescript-eslint/type-utils@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.7.3) - '@typescript-eslint/utils': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3) + '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.9.3) + '@typescript-eslint/utils': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) debug: 4.4.1(supports-color@5.5.0) eslint: 9.39.2(jiti@2.6.1) - ts-api-utils: 2.1.0(typescript@5.7.3) - typescript: 5.7.3 + ts-api-utils: 2.1.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.8.3) - '@typescript-eslint/utils': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) + '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) debug: 4.4.1(supports-color@5.5.0) eslint: 9.39.2(jiti@2.6.1) - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 + ts-api-utils: 2.4.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -19611,8 +18064,14 @@ snapshots: '@typescript-eslint/types@8.31.1': {} + '@typescript-eslint/types@8.34.1': {} + '@typescript-eslint/types@8.41.0': {} + '@typescript-eslint/types@8.49.0': {} + + '@typescript-eslint/types@8.51.0': {} + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.9.2)': dependencies: '@typescript-eslint/types': 7.18.0 @@ -19623,6 +18082,21 @@ snapshots: minimatch: 9.0.5 semver: 7.7.3 ts-api-utils: 1.4.3(typescript@5.9.2) + optionalDependencies: + typescript: 5.9.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.9.3)': + dependencies: + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 + debug: 4.4.1(supports-color@5.5.0) + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.3 + ts-api-utils: 1.4.3(typescript@5.9.3) optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: @@ -19636,12 +18110,26 @@ snapshots: fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.7.2 - ts-api-utils: 2.1.0(typescript@5.8.3) + semver: 7.7.3 + ts-api-utils: 2.4.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.31.1(typescript@5.9.2)': + dependencies: + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 + debug: 4.4.1(supports-color@5.5.0) + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.3 + ts-api-utils: 2.4.0(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/typescript-estree@8.34.1(typescript@5.5.4)': dependencies: '@typescript-eslint/project-service': 8.34.1(typescript@5.5.4) @@ -19658,10 +18146,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.34.1(typescript@5.7.3)': + '@typescript-eslint/typescript-estree@8.34.1(typescript@5.9.3)': dependencies: - '@typescript-eslint/project-service': 8.34.1(typescript@5.7.3) - '@typescript-eslint/tsconfig-utils': 8.34.1(typescript@5.7.3) + '@typescript-eslint/project-service': 8.34.1(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.34.1(typescript@5.9.3) '@typescript-eslint/types': 8.34.1 '@typescript-eslint/visitor-keys': 8.34.1 debug: 4.4.1(supports-color@5.5.0) @@ -19669,72 +18157,82 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.7.2 - ts-api-utils: 2.1.0(typescript@5.7.3) - typescript: 5.7.3 + ts-api-utils: 2.1.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.34.1(typescript@5.8.3)': + '@typescript-eslint/typescript-estree@8.49.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/project-service': 8.34.1(typescript@5.8.3) - '@typescript-eslint/tsconfig-utils': 8.34.1(typescript@5.8.3) - '@typescript-eslint/types': 8.34.1 - '@typescript-eslint/visitor-keys': 8.34.1 + '@typescript-eslint/project-service': 8.49.0(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.49.0(typescript@5.9.3) + '@typescript-eslint/types': 8.49.0 + '@typescript-eslint/visitor-keys': 8.49.0 debug: 4.4.1(supports-color@5.5.0) - fast-glob: 3.3.3 - is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.7.2 - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 + semver: 7.7.3 + tinyglobby: 0.2.15 + ts-api-utils: 2.1.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.41.0(typescript@5.9.2)': + '@typescript-eslint/typescript-estree@8.51.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/project-service': 8.41.0(typescript@5.9.2) - '@typescript-eslint/tsconfig-utils': 8.41.0(typescript@5.9.2) - '@typescript-eslint/types': 8.41.0 - '@typescript-eslint/visitor-keys': 8.41.0 + '@typescript-eslint/project-service': 8.51.0(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.51.0(typescript@5.9.3) + '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/visitor-keys': 8.51.0 debug: 4.4.1(supports-color@5.5.0) - fast-glob: 3.3.3 - is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.7.3 - ts-api-utils: 2.1.0(typescript@5.9.2) - typescript: 5.9.2 + tinyglobby: 0.2.15 + ts-api-utils: 2.4.0(typescript@5.9.3) + typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.9.2)': + '@typescript-eslint/utils@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.29.0(jiti@2.6.1)) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) - eslint: 8.57.1 + eslint: 9.29.0(jiti@2.6.1) transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': + '@typescript-eslint/utils@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.6.1)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) - eslint: 9.29.0(jiti@2.6.1) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.3) + eslint: 9.39.2(jiti@2.6.1) transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2)': + '@typescript-eslint/utils@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.39.2(jiti@2.6.1)) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.9.2) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.29.0(jiti@2.6.1)) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.9.2) + eslint: 9.29.0(jiti@2.6.1) + typescript: 5.9.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3)': + dependencies: + '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) eslint: 9.39.2(jiti@2.6.1) + typescript: 5.8.3 transitivePeerDependencies: - supports-color @@ -19749,25 +18247,36 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3)': + '@typescript-eslint/utils@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/eslint-utils': 4.7.0(eslint@9.39.2(jiti@2.6.1)) '@typescript-eslint/scope-manager': 8.34.1 '@typescript-eslint/types': 8.34.1 - '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.7.3) + '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) - typescript: 5.7.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3)': + '@typescript-eslint/utils@8.49.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.39.2(jiti@2.6.1)) - '@typescript-eslint/scope-manager': 8.34.1 - '@typescript-eslint/types': 8.34.1 - '@typescript-eslint/typescript-estree': 8.34.1(typescript@5.8.3) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) + '@typescript-eslint/scope-manager': 8.49.0 + '@typescript-eslint/types': 8.49.0 + '@typescript-eslint/typescript-estree': 8.49.0(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) - typescript: 5.8.3 + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)': + dependencies: + '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@2.6.1)) + '@typescript-eslint/scope-manager': 8.51.0 + '@typescript-eslint/types': 8.51.0 + '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) + eslint: 9.39.2(jiti@2.6.1) + typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -19781,9 +18290,19 @@ snapshots: '@typescript-eslint/types': 8.31.1 eslint-visitor-keys: 4.2.1 - '@typescript-eslint/visitor-keys@8.41.0': + '@typescript-eslint/visitor-keys@8.34.1': dependencies: - '@typescript-eslint/types': 8.41.0 + '@typescript-eslint/types': 8.34.1 + eslint-visitor-keys: 4.2.1 + + '@typescript-eslint/visitor-keys@8.49.0': + dependencies: + '@typescript-eslint/types': 8.49.0 + eslint-visitor-keys: 4.2.1 + + '@typescript-eslint/visitor-keys@8.51.0': + dependencies: + '@typescript-eslint/types': 8.51.0 eslint-visitor-keys: 4.2.1 '@uiw/react-textarea-code-editor@3.1.1(@babel/runtime@7.28.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': @@ -19855,6 +18374,18 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true + '@useautumn/convex@0.0.18(@standard-schema/spec@1.0.0)(autumn-js@0.1.63(better-auth@1.3.34(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(better-call@1.0.19)(convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(react@19.2.3))(convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(hono@4.9.1)(react@19.2.3)(typescript@5.9.3)(zod@4.1.5)': + dependencies: + autumn-js: 0.1.63(better-auth@1.3.34(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(better-call@1.0.19)(convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(react@19.2.3) + convex: 1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) + convex-helpers: 0.1.104(@standard-schema/spec@1.0.0)(convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(hono@4.9.1)(react@19.2.3)(typescript@5.9.3)(zod@4.1.5) + react: 19.2.3 + transitivePeerDependencies: + - '@standard-schema/spec' + - hono + - typescript + - zod + '@vdemedes/prettier-config@2.0.1': {} '@vercel/nft@0.29.4(rollup@4.47.1)': @@ -19876,47 +18407,27 @@ snapshots: - rollup - supports-color - '@vinxi/listhen@1.5.6': - dependencies: - '@parcel/watcher': 2.5.1 - '@parcel/watcher-wasm': 2.3.0 - citty: 0.1.6 - clipboardy: 4.0.0 - consola: 3.4.2 - defu: 6.1.4 - get-port-please: 3.2.0 - h3: 1.15.4 - http-shutdown: 1.2.2 - jiti: 1.21.7 - mlly: 1.7.4 - node-forge: 1.3.1 - pathe: 1.1.2 - std-env: 3.9.0 - ufo: 1.6.1 - untun: 0.1.3 - uqr: 0.1.2 - - '@vitejs/plugin-react@4.7.0(vite@6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': + '@vitejs/plugin-react@5.1.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.28.3) - '@rolldown/pluginutils': 1.0.0-beta.27 + '@babel/core': 7.28.5 + '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.28.5) + '@rolldown/pluginutils': 1.0.0-beta.53 '@types/babel__core': 7.20.5 - react-refresh: 0.17.0 - vite: 6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + react-refresh: 0.18.0 + vite: 7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) transitivePeerDependencies: - supports-color - '@vitejs/plugin-react@5.0.0(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': + '@vitejs/plugin-react@5.1.2(vite@7.3.0(@types/node@24.10.4)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.28.3) - '@rolldown/pluginutils': 1.0.0-beta.30 + '@babel/core': 7.28.5 + '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.28.5) + '@rolldown/pluginutils': 1.0.0-beta.53 '@types/babel__core': 7.20.5 - react-refresh: 0.17.0 - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + react-refresh: 0.18.0 + vite: 7.3.0(@types/node@24.10.4)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) transitivePeerDependencies: - supports-color @@ -19937,13 +18448,15 @@ snapshots: msw: 2.10.4(@types/node@18.17.0)(typescript@5.5.4) vite: 7.1.5(@types/node@18.17.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - '@vitest/mocker@3.2.4(vite@7.1.5(@types/node@20.19.27)(jiti@2.6.1))': + '@vitest/mocker@3.2.4(msw@2.10.4(@types/node@24.3.0)(typescript@5.9.2))(vite@7.1.5(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 7.1.5(@types/node@20.19.27)(jiti@2.6.1) + msw: 2.10.4(@types/node@24.3.0)(typescript@5.9.2) + vite: 7.1.5(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + optional: true '@vitest/pretty-format@3.2.4': dependencies: @@ -19973,7 +18486,7 @@ snapshots: '@vue/compiler-core@3.5.18': dependencies: - '@babel/parser': 7.28.3 + '@babel/parser': 7.28.5 '@vue/shared': 3.5.18 entities: 4.5.0 estree-walker: 2.0.2 @@ -19986,13 +18499,13 @@ snapshots: '@vue/compiler-sfc@3.5.18': dependencies: - '@babel/parser': 7.28.3 + '@babel/parser': 7.28.5 '@vue/compiler-core': 3.5.18 '@vue/compiler-dom': 3.5.18 '@vue/compiler-ssr': 3.5.18 '@vue/shared': 3.5.18 estree-walker: 2.0.2 - magic-string: 0.30.17 + magic-string: 0.30.21 postcss: 8.5.6 source-map-js: 1.2.1 @@ -20109,36 +18622,30 @@ snapshots: '@whatwg-node/promise-helpers': 1.3.2 tslib: 2.8.1 - '@workos-inc/authkit-js@0.13.0': {} - - '@workos-inc/authkit-nextjs@2.12.2(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': - dependencies: - '@workos-inc/node': 7.77.0(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)) - iron-session: 8.0.4 - jose: 5.10.0 - next: 15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - path-to-regexp: 6.3.0 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - transitivePeerDependencies: - - express - - koa + '@workos-inc/authkit-js@0.14.0': {} - '@workos-inc/authkit-react@0.11.0(react@19.1.1)': + '@workos-inc/authkit-react@0.13.0(react@19.2.3)': dependencies: - '@workos-inc/authkit-js': 0.13.0 - react: 19.1.1 + '@workos-inc/authkit-js': 0.14.0 + react: 19.2.3 - '@workos-inc/node@7.77.0(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))': + '@workos-inc/widgets@1.6.1(@radix-ui/themes@3.2.1(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@tanstack/react-query@5.90.16(react@19.2.3))(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - iron-session: 6.3.1(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)) - jose: 5.6.3 - leb: 1.0.0 - qs: 6.14.0 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-form': 0.1.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-icons': 1.3.2(react@19.2.3) + '@radix-ui/react-popover': 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/themes': 3.2.1(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@tanstack/react-query': 5.90.16(react@19.2.3) + bowser: 2.12.1 + clsx: 2.1.1 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + use-debounce: 10.0.6(react@19.2.3) transitivePeerDependencies: - - express - - koa - - next + - '@types/react' + - '@types/react-dom' '@xtuc/ieee754@1.2.0': {} @@ -20155,11 +18662,6 @@ snapshots: abstract-logging@2.0.1: {} - accepts@1.3.8: - dependencies: - mime-types: 2.1.35 - negotiator: 0.6.3 - accepts@2.0.0: dependencies: mime-types: 3.0.1 @@ -20222,10 +18724,6 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - ansi-align@3.0.1: - dependencies: - string-width: 4.2.3 - ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 @@ -20304,8 +18802,6 @@ snapshots: array-find-index@1.0.2: {} - array-flatten@1.1.1: {} - array-includes@3.1.9: dependencies: call-bind: 1.0.8 @@ -20376,8 +18872,6 @@ snapshots: arrify@3.0.0: {} - asap@2.0.6: {} - asn1js@3.0.6: dependencies: pvtsutils: 1.3.6 @@ -20386,11 +18880,6 @@ snapshots: assertion-error@2.0.1: {} - ast-kit@2.2.0: - dependencies: - '@babel/parser': 7.28.5 - pathe: 2.0.3 - ast-module-types@6.0.1: {} ast-types-flow@0.0.8: {} @@ -20425,7 +18914,7 @@ snapshots: autumn-js@0.0.111(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(better-auth@1.3.34(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(better-call@1.0.19)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@radix-ui/react-accordion': 1.2.11(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-accordion': 1.2.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-popover': 1.1.15(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) axios: 1.11.0 chalk: 5.5.0 @@ -20449,15 +18938,27 @@ snapshots: - react-dom - utf-8-validate - autumn-js@0.0.115(better-auth@1.3.34(next@15.3.4(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(better-call@1.0.13)(react@19.1.1): + autumn-js@0.0.115(better-auth@1.3.34(next@15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(better-call@1.0.19)(react@19.2.3): dependencies: rou3: 0.6.3 - swr: 2.3.6(react@19.1.1) + swr: 2.3.6(react@19.2.3) zod: 3.25.76 optionalDependencies: - better-auth: 1.3.34(next@15.3.4(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - better-call: 1.0.13 - react: 19.1.1 + better-auth: 1.3.34(next@15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + better-call: 1.0.19 + react: 19.2.3 + + autumn-js@0.1.63(better-auth@1.3.34(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(better-call@1.0.19)(convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(react@19.2.3): + dependencies: + convex: 1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) + query-string: 9.2.2 + rou3: 0.6.3 + swr: 2.3.6(react@19.2.3) + zod: 4.1.5 + optionalDependencies: + better-auth: 1.3.34(next@15.3.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + better-call: 1.0.19 + react: 19.2.3 ava@5.3.1: dependencies: @@ -20532,20 +19033,20 @@ snapshots: babel-dead-code-elimination@1.0.10: dependencies: - '@babel/core': 7.28.3 - '@babel/parser': 7.28.3 - '@babel/traverse': 7.28.3 - '@babel/types': 7.28.2 + '@babel/core': 7.28.5 + '@babel/parser': 7.28.5 + '@babel/traverse': 7.28.5 + '@babel/types': 7.28.5 transitivePeerDependencies: - supports-color - babel-jest@29.7.0(@babel/core@7.28.3): + babel-jest@29.7.0(@babel/core@7.28.5): dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@jest/transform': 29.7.0 '@types/babel__core': 7.20.5 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3(@babel/core@7.28.3) + babel-preset-jest: 29.6.3(@babel/core@7.28.5) chalk: 4.1.2 graceful-fs: 4.2.11 slash: 3.0.0 @@ -20565,34 +19066,34 @@ snapshots: babel-plugin-jest-hoist@29.6.3: dependencies: '@babel/template': 7.27.2 - '@babel/types': 7.28.2 + '@babel/types': 7.28.5 '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.28.0 - babel-preset-current-node-syntax@1.2.0(@babel/core@7.28.3): - dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.28.3) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.28.3) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.28.3) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.28.3) - '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.3) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.28.3) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.28.3) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.28.3) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.28.3) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.28.3) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.28.3) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.28.3) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.28.3) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.28.3) - - babel-preset-jest@29.6.3(@babel/core@7.28.3): - dependencies: - '@babel/core': 7.28.3 + babel-preset-current-node-syntax@1.2.0(@babel/core@7.28.5): + dependencies: + '@babel/core': 7.28.5 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.28.5) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.28.5) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.28.5) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.28.5) + '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.5) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.28.5) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.28.5) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.28.5) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.28.5) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.28.5) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.28.5) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.28.5) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.28.5) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.28.5) + + babel-preset-jest@29.6.3(@babel/core@7.28.5): + dependencies: + '@babel/core': 7.28.5 babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.2.0(@babel/core@7.28.3) + babel-preset-current-node-syntax: 1.2.0(@babel/core@7.28.5) bail@2.0.2: {} @@ -20603,9 +19104,7 @@ snapshots: base64-js@1.5.1: {} - basic-auth@2.0.1: - dependencies: - safe-buffer: 5.1.2 + baseline-browser-mapping@2.9.11: {} bcp-47-match@2.0.3: {} @@ -20631,7 +19130,7 @@ snapshots: react-dom: 18.3.1(react@18.3.1) optional: true - better-auth@1.3.34(next@15.3.4(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + better-auth@1.3.34(next@15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: '@better-auth/core': 1.3.34(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.18)(better-call@1.0.19)(jose@6.1.0)(kysely@0.28.5)(nanostores@1.0.1) '@better-auth/telemetry': 1.3.34(better-call@1.0.19)(jose@6.1.0)(kysely@0.28.5)(nanostores@1.0.1) @@ -20648,45 +19147,30 @@ snapshots: nanostores: 1.0.1 zod: 4.1.5 optionalDependencies: - next: 15.3.4(@babel/core@7.28.3)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + next: 15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - better-auth@1.3.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@4.1.5): + better-auth@1.3.34(next@15.3.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: - '@better-auth/utils': 0.2.6 + '@better-auth/core': 1.3.34(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.18)(better-call@1.0.19)(jose@6.1.0)(kysely@0.28.5)(nanostores@1.0.1) + '@better-auth/telemetry': 1.3.34(better-call@1.0.19)(jose@6.1.0)(kysely@0.28.5)(nanostores@1.0.1) + '@better-auth/utils': 0.3.0 '@better-fetch/fetch': 1.1.18 - '@noble/ciphers': 0.6.0 - '@noble/hashes': 1.8.0 + '@noble/ciphers': 2.0.1 + '@noble/hashes': 2.0.1 '@simplewebauthn/browser': 13.1.2 '@simplewebauthn/server': 13.1.2 better-call: 1.0.19 defu: 6.1.4 - jose: 5.10.0 + jose: 6.1.0 kysely: 0.28.5 - nanostores: 0.11.4 + nanostores: 1.0.1 zod: 4.1.5 optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - better-auth@1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@3.25.76): - dependencies: - '@better-auth/utils': 0.2.6 - '@better-fetch/fetch': 1.1.18 - '@noble/ciphers': 0.6.0 - '@noble/hashes': 1.8.0 - '@simplewebauthn/browser': 13.1.2 - '@simplewebauthn/server': 13.1.2 - better-call: 1.0.19 - defu: 6.1.4 - jose: 5.10.0 - kysely: 0.28.5 - nanostores: 0.11.4 - zod: 3.25.76 - optionalDependencies: - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + next: 15.3.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) better-auth@1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.0.17): dependencies: @@ -20706,32 +19190,6 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - better-auth@1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.1.5): - dependencies: - '@better-auth/utils': 0.2.6 - '@better-fetch/fetch': 1.1.18 - '@noble/ciphers': 0.6.0 - '@noble/hashes': 1.8.0 - '@simplewebauthn/browser': 13.1.2 - '@simplewebauthn/server': 13.1.2 - better-call: 1.0.19 - defu: 6.1.4 - jose: 5.10.0 - kysely: 0.28.5 - nanostores: 0.11.4 - zod: 4.1.5 - optionalDependencies: - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - - better-call@1.0.19: - dependencies: - '@better-auth/utils': 0.3.0 - '@better-fetch/fetch': 1.1.18 - rou3: 0.5.1 - set-cookie-parser: 2.7.1 - uncrypto: 0.1.3 - better-call@1.0.19: dependencies: '@better-auth/utils': 0.3.0 @@ -20751,8 +19209,6 @@ snapshots: dependencies: file-uri-to-path: 1.0.0 - birpc@2.9.0: {} - bl@4.1.0: dependencies: buffer: 5.7.1 @@ -20767,23 +19223,6 @@ snapshots: blueimp-md5@2.19.0: {} - body-parser@1.20.4: - dependencies: - bytes: 3.1.2 - content-type: 1.0.5 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.1 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.14.0 - raw-body: 2.5.3 - type-is: 1.6.18 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - body-parser@2.2.0: dependencies: bytes: 3.1.2 @@ -20800,16 +19239,7 @@ snapshots: boolbase@1.0.0: {} - boxen@7.1.1: - dependencies: - ansi-align: 3.0.1 - camelcase: 7.0.1 - chalk: 5.5.0 - cli-boxes: 3.0.0 - string-width: 5.1.2 - type-fest: 2.19.0 - widest-line: 4.0.1 - wrap-ansi: 8.1.0 + bowser@2.12.1: {} brace-expansion@1.1.12: dependencies: @@ -20870,12 +19300,12 @@ snapshots: bun-types@1.2.22(@types/react@18.3.23): dependencies: - '@types/node': 22.17.1 + '@types/node': 24.10.4 '@types/react': 18.3.23 - bun-types@1.3.4: + bun-types@1.3.5: dependencies: - '@types/node': 22.17.1 + '@types/node': 24.10.4 bundle-name@4.1.0: dependencies: @@ -20900,7 +19330,7 @@ snapshots: dotenv: 17.2.3 exsolve: 1.0.7 giget: 2.0.0 - jiti: 2.5.1 + jiti: 2.6.1 ohash: 2.0.11 pathe: 2.0.3 perfect-debounce: 1.0.0 @@ -20936,12 +19366,6 @@ snapshots: camelcase-css@2.0.1: {} - camelcase-keys@6.2.2: - dependencies: - camelcase: 5.3.1 - map-obj: 4.3.0 - quick-lru: 4.0.1 - camelcase-keys@7.0.2: dependencies: camelcase: 6.3.0 @@ -20980,12 +19404,6 @@ snapshots: loupe: 3.2.1 pathval: 2.0.1 - chalk@2.4.2: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -21075,6 +19493,8 @@ snapshots: dependencies: clsx: 2.1.1 + classnames@2.5.1: {} + clean-regexp@1.0.0: dependencies: escape-string-regexp: 1.0.5 @@ -21093,7 +19513,37 @@ snapshots: dependencies: restore-cursor: 4.0.0 - cli-spinners@2.9.2: {} + cli-highlight@2.1.11: + dependencies: + chalk: 4.1.2 + highlight.js: 10.7.3 + mz: 2.7.0 + parse5: 5.1.1 + parse5-htmlparser2-tree-adapter: 6.0.1 + yargs: 16.2.0 + + cli-spinners@2.9.2: {} + + cli-table3@0.6.5: + dependencies: + string-width: 4.2.3 + optionalDependencies: + '@colors/colors': 1.5.0 + + cli-testing-library@3.0.1(@jest/expect@29.7.0)(@jest/globals@29.7.0)(vitest@3.2.4(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(msw@2.10.4(@types/node@24.3.0)(typescript@5.9.2))(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)): + dependencies: + '@babel/code-frame': 7.27.1 + '@babel/runtime': 7.28.2 + picocolors: 1.1.1 + redent: 4.0.0 + slice-ansi: 7.1.0 + strip-ansi: 7.1.0 + strip-final-newline: 4.0.0 + tree-kill: 1.2.2 + optionalDependencies: + '@jest/expect': 29.7.0 + '@jest/globals': 29.7.0 + vitest: 3.2.4(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(msw@2.10.4(@types/node@24.3.0)(typescript@5.9.2))(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) cli-truncate@3.1.0: dependencies: @@ -21121,6 +19571,12 @@ snapshots: strip-ansi: 5.2.0 wrap-ansi: 5.1.0 + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -21167,12 +19623,6 @@ snapshots: color-convert: 1.9.3 color-string: 1.9.1 - color@4.2.3: - dependencies: - color-convert: 2.0.1 - color-string: 1.9.1 - optional: true - colorspace@1.1.4: dependencies: color: 3.2.1 @@ -21198,14 +19648,10 @@ snapshots: common-path-prefix@3.0.0: {} - common-tags@1.8.2: {} - commondir@1.0.1: {} compatx@0.2.0: {} - component-emitter@1.3.1: {} - compress-commons@6.0.2: dependencies: crc-32: 1.2.2 @@ -21214,22 +19660,6 @@ snapshots: normalize-path: 3.0.0 readable-stream: 4.7.0 - compressible@2.0.18: - dependencies: - mime-db: 1.54.0 - - compression@1.8.1: - dependencies: - bytes: 3.1.2 - compressible: 2.0.18 - debug: 2.6.9 - negotiator: 0.6.4 - on-headers: 1.1.0 - safe-buffer: 5.2.1 - vary: 1.1.2 - transitivePeerDependencies: - - supports-color - compute-scroll-into-view@3.1.1: {} concat-map@0.0.1: {} @@ -21245,9 +19675,10 @@ snapshots: semver: 7.7.2 well-known-symbols: 2.0.0 - concurrently@9.2.1: + concurrently@9.2.0: dependencies: chalk: 4.1.2 + lodash: 4.17.21 rxjs: 7.8.2 shell-quote: 1.8.3 supports-color: 8.1.1 @@ -21262,10 +19693,6 @@ snapshots: consola@3.4.2: {} - content-disposition@0.5.4: - dependencies: - safe-buffer: 5.2.1 - content-disposition@1.0.0: dependencies: safe-buffer: 5.2.1 @@ -21276,9 +19703,9 @@ snapshots: convert-to-spaces@2.0.1: {} - convex-helpers@0.1.104(@standard-schema/spec@1.0.0)(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1))(hono@4.9.1)(react@19.1.1)(typescript@5.5.4)(zod@4.1.5): + convex-helpers@0.1.104(@standard-schema/spec@1.0.0)(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1))(react@19.1.1))(hono@4.9.1)(react@19.1.1)(typescript@5.5.4)(zod@4.1.5): dependencies: - convex: 1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + convex: 1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1))(react@19.1.1) optionalDependencies: '@standard-schema/spec': 1.0.0 hono: 4.9.1 @@ -21286,69 +19713,46 @@ snapshots: typescript: 5.5.4 zod: 4.1.5 - convex-helpers@0.1.104(@standard-schema/spec@1.0.0)(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1))(hono@4.9.1)(react@19.1.1)(typescript@5.7.3)(zod@3.25.76): + convex-helpers@0.1.104(@standard-schema/spec@1.0.0)(convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(hono@4.9.1)(react@19.2.3)(typescript@5.9.3)(zod@4.1.5): dependencies: - convex: 1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) + convex: 1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) optionalDependencies: '@standard-schema/spec': 1.0.0 hono: 4.9.1 - react: 19.1.1 - typescript: 5.7.3 - zod: 3.25.76 - - convex-test@0.0.37(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)): - dependencies: - convex: 1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) - - convex@1.25.4(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1): - dependencies: - esbuild: 0.25.4 - jwt-decode: 4.0.0 - prettier: 3.5.3 - optionalDependencies: - '@clerk/clerk-react': 5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 + react: 19.2.3 + typescript: 5.9.3 + zod: 4.1.5 - convex@1.29.3(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1): + convex-test@0.0.37(convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1))(react@19.1.1)): dependencies: - esbuild: 0.25.4 - prettier: 3.6.2 - optionalDependencies: - '@clerk/clerk-react': 5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 + convex: 1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1))(react@19.1.1) - convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1): + convex@1.29.3(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1))(react@19.1.1): dependencies: esbuild: 0.25.4 prettier: 3.6.2 optionalDependencies: - '@clerk/clerk-react': 5.59.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@clerk/clerk-react': 5.59.0(react-dom@19.2.3(react@19.1.1))(react@19.1.1) react: 19.1.1 - convex@1.27.5(@clerk/clerk-react@5.54.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1): + convex@1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3): dependencies: esbuild: 0.25.4 prettier: 3.6.2 optionalDependencies: - '@clerk/clerk-react': 5.54.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - react: 19.1.1 + '@clerk/clerk-react': 5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 cookie-es@1.2.2: {} cookie-es@2.0.0: {} - cookie-signature@1.0.7: {} - cookie-signature@1.2.2: {} - cookie@0.5.0: {} - cookie@0.7.2: {} cookie@1.0.2: {} - cookiejar@2.1.4: {} - copy-file@11.1.0: dependencies: graceful-fs: 4.2.11 @@ -21378,8 +19782,6 @@ snapshots: optionalDependencies: typescript: 5.9.2 - country-flag-icons@1.6.4: {} - crc-32@1.2.2: {} crc32-stream@6.0.0: @@ -21387,13 +19789,13 @@ snapshots: crc-32: 1.2.2 readable-stream: 4.7.0 - create-jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)): + create-jest@29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + jest-config: 29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -21410,14 +19812,6 @@ snapshots: croner@9.1.0: {} - cross-spawn@6.0.6: - dependencies: - nice-try: 1.0.5 - path-key: 2.0.1 - semver: 5.7.2 - shebang-command: 1.2.0 - which: 1.3.1 - cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -21428,10 +19822,6 @@ snapshots: dependencies: uncrypto: 0.1.3 - crossws@0.4.1(srvx@0.9.8): - optionalDependencies: - srvx: 0.9.8 - css-select@5.2.2: dependencies: boolbase: 1.0.0 @@ -21446,8 +19836,6 @@ snapshots: cssesc@3.0.0: {} - csstype@3.1.1: {} - csstype@3.1.3: {} csstype@3.2.3: {} @@ -21522,19 +19910,10 @@ snapshots: dependencies: time-zone: 1.0.0 - dax-sh@0.39.2: - dependencies: - '@deno/shim-deno': 0.19.2 - undici-types: 5.28.4 - db0@0.3.2(better-sqlite3@12.2.0): optionalDependencies: better-sqlite3: 12.2.0 - debug@2.6.9: - dependencies: - ms: 2.0.0 - debug@3.2.7: dependencies: ms: 2.1.3 @@ -21562,8 +19941,6 @@ snapshots: decimal.js-light@2.5.1: {} - decimal.js@10.6.0: {} - decode-named-character-reference@1.2.0: dependencies: character-entities: 2.0.2 @@ -21582,8 +19959,6 @@ snapshots: deep-is@0.1.4: {} - deepmerge@4.2.2: {} - deepmerge@4.3.1: {} default-browser-id@5.0.0: {} @@ -21625,8 +20000,6 @@ snapshots: destr@2.0.5: {} - destroy@1.2.0: {} - detect-libc@1.0.3: {} detect-libc@2.0.4: {} @@ -21673,7 +20046,7 @@ snapshots: detective-typescript@14.0.0(typescript@5.9.3): dependencies: - '@typescript-eslint/typescript-estree': 8.41.0(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) ast-module-types: 6.0.1 node-source-walk: 7.0.1 typescript: 5.9.3 @@ -21697,11 +20070,6 @@ snapshots: dependencies: dequal: 2.0.3 - dezalgo@1.0.4: - dependencies: - asap: 2.0.6 - wrappy: 1.0.2 - didyoumean@1.2.2: {} diff-sequences@29.6.3: {} @@ -21731,7 +20099,7 @@ snapshots: dom-helpers@5.2.1: dependencies: '@babel/runtime': 7.28.2 - csstype: 3.1.3 + csstype: 3.2.3 dom-serializer@2.0.0: dependencies: @@ -21751,11 +20119,6 @@ snapshots: domelementtype: 2.3.0 domhandler: 5.0.3 - dot-case@3.0.4: - dependencies: - no-case: 3.0.4 - tslib: 2.8.1 - dot-prop@9.0.0: dependencies: type-fest: 4.41.0 @@ -21766,8 +20129,6 @@ snapshots: dotenv@17.2.3: {} - dts-resolver@2.1.3: {} - dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.2 @@ -21784,16 +20145,7 @@ snapshots: electron-to-chromium@1.5.208: {} - elysia-clerk@0.12.2(elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2))(react-dom@19.1.1(react@19.1.1))(react@19.1.1): - dependencies: - '@clerk/backend': 2.27.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - '@clerk/shared': 3.40.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - elysia: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2) - transitivePeerDependencies: - - react - - react-dom - - elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.2): + elysia@1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.3): dependencies: cookie: 1.0.2 exact-mirror: 0.1.5(@sinclair/typebox@0.34.38) @@ -21816,7 +20168,7 @@ snapshots: emoji-regex@9.2.2: {} - empathic@2.0.0: {} + emojilib@2.4.0: {} enabled@2.0.0: {} @@ -21981,44 +20333,18 @@ snapshots: esast-util-from-estree: 2.0.0 vfile-message: 4.0.3 - esbuild-plugin-path-alias@1.0.7(esbuild@0.25.9): + esbuild-plugin-path-alias@1.0.7(esbuild@0.27.2): dependencies: - esbuild: 0.25.9 + esbuild: 0.27.2 - esbuild-postcss@0.0.4(esbuild@0.25.9)(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)): + esbuild-postcss@0.0.4(esbuild@0.27.2)(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)): dependencies: - esbuild: 0.25.9 + esbuild: 0.27.2 postcss: 8.5.6 - postcss-load-config: 3.1.4(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + postcss-load-config: 3.1.4(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)) transitivePeerDependencies: - ts-node - esbuild@0.20.2: - optionalDependencies: - '@esbuild/aix-ppc64': 0.20.2 - '@esbuild/android-arm': 0.20.2 - '@esbuild/android-arm64': 0.20.2 - '@esbuild/android-x64': 0.20.2 - '@esbuild/darwin-arm64': 0.20.2 - '@esbuild/darwin-x64': 0.20.2 - '@esbuild/freebsd-arm64': 0.20.2 - '@esbuild/freebsd-x64': 0.20.2 - '@esbuild/linux-arm': 0.20.2 - '@esbuild/linux-arm64': 0.20.2 - '@esbuild/linux-ia32': 0.20.2 - '@esbuild/linux-loong64': 0.20.2 - '@esbuild/linux-mips64el': 0.20.2 - '@esbuild/linux-ppc64': 0.20.2 - '@esbuild/linux-riscv64': 0.20.2 - '@esbuild/linux-s390x': 0.20.2 - '@esbuild/linux-x64': 0.20.2 - '@esbuild/netbsd-x64': 0.20.2 - '@esbuild/openbsd-x64': 0.20.2 - '@esbuild/sunos-x64': 0.20.2 - '@esbuild/win32-arm64': 0.20.2 - '@esbuild/win32-ia32': 0.20.2 - '@esbuild/win32-x64': 0.20.2 - esbuild@0.25.4: optionalDependencies: '@esbuild/aix-ppc64': 0.25.4 @@ -22104,6 +20430,35 @@ snapshots: '@esbuild/win32-ia32': 0.25.9 '@esbuild/win32-x64': 0.25.9 + esbuild@0.27.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.27.2 + '@esbuild/android-arm': 0.27.2 + '@esbuild/android-arm64': 0.27.2 + '@esbuild/android-x64': 0.27.2 + '@esbuild/darwin-arm64': 0.27.2 + '@esbuild/darwin-x64': 0.27.2 + '@esbuild/freebsd-arm64': 0.27.2 + '@esbuild/freebsd-x64': 0.27.2 + '@esbuild/linux-arm': 0.27.2 + '@esbuild/linux-arm64': 0.27.2 + '@esbuild/linux-ia32': 0.27.2 + '@esbuild/linux-loong64': 0.27.2 + '@esbuild/linux-mips64el': 0.27.2 + '@esbuild/linux-ppc64': 0.27.2 + '@esbuild/linux-riscv64': 0.27.2 + '@esbuild/linux-s390x': 0.27.2 + '@esbuild/linux-x64': 0.27.2 + '@esbuild/netbsd-arm64': 0.27.2 + '@esbuild/netbsd-x64': 0.27.2 + '@esbuild/openbsd-arm64': 0.27.2 + '@esbuild/openbsd-x64': 0.27.2 + '@esbuild/openharmony-arm64': 0.27.2 + '@esbuild/sunos-x64': 0.27.2 + '@esbuild/win32-arm64': 0.27.2 + '@esbuild/win32-ia32': 0.27.2 + '@esbuild/win32-x64': 0.27.2 + escalade@3.2.0: {} escape-html@1.0.3: {} @@ -22124,34 +20479,16 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.32.0)(eslint@8.57.1): - dependencies: - confusing-browser-globals: 1.0.11 - eslint: 8.57.1 - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) - object.assign: 4.1.7 - object.entries: 1.1.9 - semver: 6.3.1 - - eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2))(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint-plugin-import@2.32.0)(eslint@8.57.1): - dependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2) - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.9.2) - eslint: 8.57.1 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.32.0)(eslint@8.57.1) - transitivePeerDependencies: - - eslint-plugin-import - eslint-config-next@15.1.4(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2): dependencies: '@next/eslint-plugin-next': 15.1.4 '@rushstack/eslint-patch': 1.12.0 - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) - '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.6.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.6.1)) eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.6.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.29.0(jiti@2.6.1)) @@ -22162,16 +20499,16 @@ snapshots: - eslint-plugin-import-x - supports-color - eslint-config-next@15.2.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2): + eslint-config-next@15.3.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@next/eslint-plugin-next': 15.2.1 + '@next/eslint-plugin-next': 15.3.1 '@rushstack/eslint-patch': 1.12.0 - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) - '@typescript-eslint/parser': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/eslint-plugin': 8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-react: 7.37.5(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.39.2(jiti@2.6.1)) @@ -22182,26 +20519,6 @@ snapshots: - eslint-plugin-import-x - supports-color - eslint-config-next@15.2.3(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2): - dependencies: - '@next/eslint-plugin-next': 15.2.3 - '@rushstack/eslint-patch': 1.12.0 - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) - '@typescript-eslint/parser': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) - eslint: 9.39.2(jiti@2.6.1) - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-react: 7.37.5(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-react-hooks: 5.2.0(eslint@9.39.2(jiti@2.6.1)) - optionalDependencies: - typescript: 5.9.2 - transitivePeerDependencies: - - eslint-import-resolver-webpack - - eslint-plugin-import-x - - supports-color - eslint-config-next@15.3.4(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2): dependencies: '@next/eslint-plugin-next': 15.3.4 @@ -22210,8 +20527,8 @@ snapshots: '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.6.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.6.1)) eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.6.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.29.0(jiti@2.6.1)) @@ -22222,21 +20539,21 @@ snapshots: - eslint-plugin-import-x - supports-color - eslint-config-next@15.4.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2): + eslint-config-next@15.3.4(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@next/eslint-plugin-next': 15.4.1 + '@next/eslint-plugin-next': 15.3.4 '@rushstack/eslint-patch': 1.12.0 - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) - '@typescript-eslint/parser': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@2.6.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-react: 7.37.5(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.39.2(jiti@2.6.1)) optionalDependencies: - typescript: 5.9.2 + typescript: 5.9.3 transitivePeerDependencies: - eslint-import-resolver-webpack - eslint-plugin-import-x @@ -22246,9 +20563,9 @@ snapshots: dependencies: eslint: 8.57.1 - eslint-config-prettier@8.10.2(eslint@9.34.0(jiti@2.6.1)): + eslint-config-prettier@8.10.2(eslint@9.39.2(jiti@2.6.1)): dependencies: - eslint: 9.34.0(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) optional: true eslint-config-xo-react@0.27.0(eslint-plugin-react-hooks@4.6.2(eslint@8.57.1))(eslint-plugin-react@7.37.5(eslint@8.57.1))(eslint@8.57.1): @@ -22281,7 +20598,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.6.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@5.5.0) @@ -22292,11 +20609,11 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)) transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@2.6.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@5.5.0) @@ -22307,22 +20624,7 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) - transitivePeerDependencies: - - supports-color - - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1): - dependencies: - '@nolyfill/is-core-module': 1.0.39 - debug: 4.4.1(supports-color@5.5.0) - eslint: 8.57.1 - get-tsconfig: 4.10.1 - is-bun-module: 2.0.0 - stable-hash: 0.0.5 - tinyglobby: 0.2.15 - unrs-resolver: 1.11.1 - optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) transitivePeerDependencies: - supports-color @@ -22343,36 +20645,47 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1): + eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.9.2) - eslint: 8.57.1 + '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + eslint: 9.29.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.6.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/parser': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + eslint: 9.39.2(jiti@2.6.1) + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@2.6.1)) + transitivePeerDependencies: + - supports-color + + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.6.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/parser': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@2.6.1)) transitivePeerDependencies: - supports-color @@ -22410,7 +20723,7 @@ snapshots: eslint: 8.57.1 ignore: 5.3.2 - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22419,9 +20732,38 @@ snapshots: array.prototype.flatmap: 1.3.3 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.57.1 + eslint: 9.29.0(jiti@2.6.1) + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)) + hasown: 2.0.2 + is-core-module: 2.16.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.1 + semver: 6.3.1 + string.prototype.trimend: 1.0.9 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + + eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)): + dependencies: + '@rtsao/scc': 1.1.0 + array-includes: 3.1.9 + array.prototype.findlastindex: 1.2.6 + array.prototype.flat: 1.3.3 + array.prototype.flatmap: 1.3.3 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 9.39.2(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22433,13 +20775,13 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.9.2) + '@typescript-eslint/parser': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22450,7 +20792,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.29.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22462,13 +20804,13 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22479,7 +20821,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.39.2(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22491,7 +20833,7 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.2) + '@typescript-eslint/parser': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -22589,15 +20931,19 @@ snapshots: optionalDependencies: eslint-config-prettier: 8.10.2(eslint@8.57.1) - eslint-plugin-prettier@5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@8.10.2(eslint@9.34.0(jiti@2.6.1)))(eslint@9.34.0(jiti@2.6.1))(prettier@3.6.2): + eslint-plugin-prettier@5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@8.10.2(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1))(prettier@3.6.2): dependencies: - eslint: 9.34.0(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) prettier: 3.6.2 prettier-linter-helpers: 1.0.0 synckit: 0.11.11 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 8.10.2(eslint@9.34.0(jiti@2.6.1)) + eslint-config-prettier: 8.10.2(eslint@9.39.2(jiti@2.6.1)) + + eslint-plugin-react-hooks@4.6.2(eslint@8.57.1): + dependencies: + eslint: 8.57.1 eslint-plugin-react-hooks@5.2.0(eslint@9.29.0(jiti@2.6.1)): dependencies: @@ -22607,6 +20953,17 @@ snapshots: dependencies: eslint: 9.39.2(jiti@2.6.1) + eslint-plugin-react-hooks@7.0.1(eslint@9.39.2(jiti@2.6.1)): + dependencies: + '@babel/core': 7.28.3 + '@babel/parser': 7.28.5 + eslint: 9.39.2(jiti@2.6.1) + hermes-parser: 0.25.1 + zod: 4.1.5 + zod-validation-error: 4.0.2(zod@4.1.5) + transitivePeerDependencies: + - supports-color + eslint-plugin-react-refresh@0.4.26(eslint@9.39.2(jiti@2.6.1)): dependencies: eslint: 9.39.2(jiti@2.6.1) @@ -22695,11 +21052,11 @@ snapshots: semver: 7.7.2 strip-indent: 3.0.0 - eslint-plugin-unused-imports@4.2.0(@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.34.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.6.1)): + eslint-plugin-unused-imports@4.3.0(@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.2(jiti@2.6.1)): dependencies: - eslint: 9.34.0(jiti@2.6.1) + eslint: 9.39.2(jiti@2.6.1) optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.34.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.34.0(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) eslint-rule-docs@1.1.235: {} @@ -22989,8 +21346,6 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - exit-hook@2.2.1: {} - exit@0.1.2: {} expand-template@2.0.3: {} @@ -23009,42 +21364,6 @@ snapshots: dependencies: express: 5.1.0 - express@4.22.1: - dependencies: - accepts: 1.3.8 - array-flatten: 1.1.1 - body-parser: 1.20.4 - content-disposition: 0.5.4 - content-type: 1.0.5 - cookie: 0.7.2 - cookie-signature: 1.0.7 - debug: 2.6.9 - depd: 2.0.0 - encodeurl: 2.0.0 - escape-html: 1.0.3 - etag: 1.8.1 - finalhandler: 1.3.2 - fresh: 0.5.2 - http-errors: 2.0.0 - merge-descriptors: 1.0.3 - methods: 1.1.2 - on-finished: 2.4.1 - parseurl: 1.3.3 - path-to-regexp: 0.1.12 - proxy-addr: 2.0.7 - qs: 6.14.0 - range-parser: 1.2.1 - safe-buffer: 5.2.1 - send: 0.19.2 - serve-static: 1.16.3 - setprototypeof: 1.2.0 - statuses: 2.0.2 - type-is: 1.6.18 - utils-merge: 1.0.1 - vary: 1.1.2 - transitivePeerDependencies: - - supports-color - express@5.1.0: dependencies: accepts: 2.0.0 @@ -23136,14 +21455,10 @@ snapshots: fast-redact@3.5.0: {} - fast-safe-stringify@2.1.1: {} - fast-sha256@1.3.0: {} fast-uri@3.0.6: {} - fastify-plugin@5.1.0: {} - fastify@5.5.0: dependencies: '@fastify/ajv-compiler': 4.0.2 @@ -23159,7 +21474,7 @@ snapshots: process-warning: 5.0.0 rfdc: 1.4.1 secure-json-parse: 4.0.0 - semver: 7.7.2 + semver: 7.7.3 toad-cache: 3.7.0 fastq@1.19.1: @@ -23219,18 +21534,6 @@ snapshots: filter-obj@6.1.0: {} - finalhandler@1.3.2: - dependencies: - debug: 2.6.9 - encodeurl: 2.0.0 - escape-html: 1.0.3 - on-finished: 2.4.1 - parseurl: 1.3.3 - statuses: 2.0.2 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - finalhandler@2.1.0: dependencies: debug: 4.4.1(supports-color@5.5.0) @@ -23314,14 +21617,6 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - form-data@3.0.4: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - es-set-tostringtag: 2.1.0 - hasown: 2.0.2 - mime-types: 2.1.35 - form-data@4.0.4: dependencies: asynckit: 0.4.0 @@ -23334,18 +21629,10 @@ snapshots: dependencies: fetch-blob: 3.2.0 - formidable@3.5.4: - dependencies: - '@paralleldrive/cuid2': 2.3.1 - dezalgo: 1.0.4 - once: 1.4.0 - forwarded@0.2.0: {} fraction.js@4.3.7: {} - fresh@0.5.2: {} - fresh@2.0.0: {} fs-constants@1.0.0: {} @@ -23389,7 +21676,7 @@ snapshots: transitivePeerDependencies: - supports-color - fumadocs-mdx@11.7.5(acorn@8.15.0)(fumadocs-core@15.6.10(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1))(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(vite@7.1.5(@types/node@20.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)): + fumadocs-mdx@11.7.5(acorn@8.15.0)(fumadocs-core@15.6.10(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1))(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(vite@7.3.0(@types/node@20.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)): dependencies: '@mdx-js/mdx': 3.1.0(acorn@8.15.0) '@standard-schema/spec': 1.0.0 @@ -23407,14 +21694,14 @@ snapshots: optionalDependencies: next: 15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 - vite: 7.1.5(@types/node@20.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + vite: 7.3.0(@types/node@20.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) transitivePeerDependencies: - acorn - supports-color fumadocs-ui@15.6.10(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.10)(typescript@5.9.2))): dependencies: - '@radix-ui/react-accordion': 1.2.11(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-accordion': 1.2.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-dialog': 1.1.15(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-direction': 1.1.1(@types/react@18.3.23)(react@18.3.1) @@ -23422,7 +21709,7 @@ snapshots: '@radix-ui/react-popover': 1.1.15(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-presence': 1.1.4(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-scroll-area': 1.2.9(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-slot': 1.2.3(@types/react@18.3.23)(react@18.3.1) + '@radix-ui/react-slot': 1.2.4(@types/react@18.3.23)(react@18.3.1) '@radix-ui/react-tabs': 1.1.12(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) class-variance-authority: 0.7.1 fumadocs-core: 15.6.10(@types/react@18.3.23)(next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react-router@7.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) @@ -23491,8 +21778,6 @@ snapshots: get-port-please@3.2.0: {} - get-port@5.1.1: {} - get-proto@1.0.1: dependencies: dunder-proto: 1.0.1 @@ -23612,16 +21897,10 @@ snapshots: slash: 5.1.0 unicorn-magic: 0.3.0 - globrex@0.1.2: {} - gonzales-pe@4.3.0: dependencies: minimist: 1.2.8 - goober@2.1.18(csstype@3.2.3): - dependencies: - csstype: 3.2.3 - gopd@1.2.0: {} graceful-fs@4.2.11: {} @@ -23825,7 +22104,13 @@ snapshots: headers-polyfill@4.0.3: {} - helmet@8.1.0: {} + hermes-estree@0.25.1: {} + + hermes-parser@0.25.1: + dependencies: + hermes-estree: 0.25.1 + + highlight.js@10.7.3: {} hono@4.9.1: {} @@ -23852,34 +22137,18 @@ snapshots: htmlparser2@10.0.0: dependencies: domelementtype: 2.3.0 - domhandler: 5.0.3 - domutils: 3.2.2 - entities: 6.0.1 - - http-errors@2.0.0: - dependencies: - depd: 2.0.0 - inherits: 2.0.4 - setprototypeof: 1.2.0 - statuses: 2.0.1 - toidentifier: 1.0.1 + domhandler: 5.0.3 + domutils: 3.2.2 + entities: 6.0.1 - http-errors@2.0.1: + http-errors@2.0.0: dependencies: depd: 2.0.0 inherits: 2.0.4 setprototypeof: 1.2.0 - statuses: 2.0.2 + statuses: 2.0.1 toidentifier: 1.0.1 - http-proxy@1.18.1: - dependencies: - eventemitter3: 4.0.7 - follow-redirects: 1.15.11 - requires-port: 1.0.0 - transitivePeerDependencies: - - debug - http-shutdown@1.2.2: {} https-proxy-agent@6.2.1: @@ -23906,10 +22175,6 @@ snapshots: iceberg-js@0.8.1: {} - iconv-lite@0.4.24: - dependencies: - safer-buffer: 2.1.2 - iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 @@ -24000,11 +22265,6 @@ snapshots: inline-style-parser@0.2.4: {} - input-otp@1.4.2(react-dom@19.1.1(react@19.1.1))(react@19.1.1): - dependencies: - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - inquirer@12.9.1(@types/node@24.3.0): dependencies: '@inquirer/core': 10.1.15(@types/node@24.3.0) @@ -24029,13 +22289,6 @@ snapshots: interpret@1.4.0: {} - intl-messageformat@10.7.18: - dependencies: - '@formatjs/ecma402-abstract': 2.3.6 - '@formatjs/fast-memoize': 2.2.7 - '@formatjs/icu-messageformat-parser': 2.11.4 - tslib: 2.8.1 - ioredis@5.7.0: dependencies: '@ioredis/commands': 1.3.0 @@ -24054,29 +22307,6 @@ snapshots: ipaddr.js@2.2.0: {} - iron-session@6.3.1(express@5.1.0)(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)): - dependencies: - '@peculiar/webcrypto': 1.5.0 - '@types/cookie': 0.5.4 - '@types/express': 4.17.25 - '@types/koa': 2.15.0 - '@types/node': 17.0.45 - cookie: 0.5.0 - iron-webcrypto: 0.2.8 - optionalDependencies: - express: 5.1.0 - next: 15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - - iron-session@8.0.4: - dependencies: - cookie: 0.7.2 - iron-webcrypto: 1.2.1 - uncrypto: 0.1.3 - - iron-webcrypto@0.2.8: - dependencies: - buffer: 6.0.3 - iron-webcrypto@1.2.1: {} irregular-plurals@3.5.0: {} @@ -24218,8 +22448,6 @@ snapshots: is-negative-zero@2.0.3: {} - is-network-error@1.3.0: {} - is-node-process@1.2.0: {} is-number-object@1.1.1: @@ -24350,8 +22578,8 @@ snapshots: istanbul-lib-instrument@5.2.1: dependencies: - '@babel/core': 7.28.3 - '@babel/parser': 7.28.3 + '@babel/core': 7.28.5 + '@babel/parser': 7.28.5 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 6.3.1 @@ -24360,8 +22588,8 @@ snapshots: istanbul-lib-instrument@6.0.3: dependencies: - '@babel/core': 7.28.3 - '@babel/parser': 7.28.3 + '@babel/core': 7.28.5 + '@babel/parser': 7.28.5 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 7.7.3 @@ -24414,7 +22642,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 24.10.4 chalk: 4.1.2 co: 4.6.0 dedent: 1.7.1 @@ -24434,16 +22662,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)): + jest-cli@29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + create-jest: 29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + jest-config: 29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -24453,12 +22681,12 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)): + jest-config@29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)): dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.28.3) + babel-jest: 29.7.0(@babel/core@7.28.5) chalk: 4.1.2 ci-info: 3.9.0 deepmerge: 4.3.1 @@ -24478,8 +22706,39 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.17.1 - ts-node: 10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2) + '@types/node': 20.19.27 + ts-node: 10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-config@29.7.0(@types/node@24.10.4)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)): + dependencies: + '@babel/core': 7.28.5 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.28.5) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 24.10.4 + ts-node: 10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -24508,7 +22767,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 24.10.4 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -24518,7 +22777,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.17.1 + '@types/node': 24.10.4 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -24557,7 +22816,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 24.10.4 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -24594,7 +22853,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 24.10.4 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -24622,7 +22881,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 24.10.4 chalk: 4.1.2 cjs-module-lexer: 1.4.3 collect-v8-coverage: 1.0.3 @@ -24642,15 +22901,15 @@ snapshots: jest-snapshot@29.7.0: dependencies: - '@babel/core': 7.28.3 - '@babel/generator': 7.28.3 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.3) - '@babel/types': 7.28.2 + '@babel/core': 7.28.5 + '@babel/generator': 7.28.5 + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.5) + '@babel/types': 7.28.5 '@jest/expect-utils': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-preset-current-node-syntax: 1.2.0(@babel/core@7.28.3) + babel-preset-current-node-syntax: 1.2.0(@babel/core@7.28.5) chalk: 4.1.2 expect: 29.7.0 graceful-fs: 4.2.11 @@ -24668,7 +22927,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 24.10.4 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -24687,7 +22946,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.17.1 + '@types/node': 24.10.4 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -24696,23 +22955,23 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.17.1 + '@types/node': 24.10.4 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.17.1 + '@types/node': 24.10.4 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)): + jest@29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + jest-cli: 29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -24727,14 +22986,10 @@ snapshots: jose@5.10.0: {} - jose@5.6.3: {} - jose@6.1.0: {} joycon@3.1.1: {} - js-cookie@3.0.1: {} - js-cookie@3.0.5: {} js-string-escape@1.0.1: {} @@ -24754,14 +23009,10 @@ snapshots: dependencies: argparse: 2.0.1 - jsesc@3.0.2: {} - jsesc@3.1.0: {} json-buffer@3.0.1: {} - json-parse-better-errors@1.0.2: {} - json-parse-even-better-errors@2.3.1: {} json-parse-even-better-errors@4.0.0: {} @@ -24835,8 +23086,6 @@ snapshots: dependencies: readable-stream: 2.3.8 - leb@1.0.0: {} - leven@3.1.0: {} levn@0.4.1: @@ -24966,7 +23215,7 @@ snapshots: get-port-please: 3.2.0 h3: 1.15.4 http-shutdown: 1.2.2 - jiti: 2.5.1 + jiti: 2.6.1 mlly: 1.7.4 node-forge: 1.3.1 pathe: 1.1.2 @@ -24975,13 +23224,6 @@ snapshots: untun: 0.1.3 uqr: 0.1.2 - load-json-file@4.0.0: - dependencies: - graceful-fs: 4.2.11 - parse-json: 4.0.0 - pify: 3.0.0 - strip-bom: 3.0.0 - load-json-file@7.0.1: {} load-tsconfig@0.2.5: {} @@ -25056,10 +23298,6 @@ snapshots: loupe@3.2.1: {} - lower-case@2.0.2: - dependencies: - tslib: 2.8.1 - lowercase-keys@1.0.1: {} lru-cache@10.4.3: {} @@ -25080,21 +23318,21 @@ snapshots: dependencies: react: 18.3.1 - lucide-react@0.510.0(react@19.1.1): + lucide-react@0.511.0(react@19.2.3): dependencies: - react: 19.1.1 + react: 19.2.3 - lucide-react@0.523.0(react@19.1.1): + lucide-react@0.523.0(react@19.2.3): dependencies: - react: 19.1.1 + react: 19.2.3 lucide-react@0.525.0(react@19.1.1): dependencies: react: 19.1.1 - lucide-react@0.542.0(react@19.1.1): + lucide-react@0.525.0(react@19.2.3): dependencies: - react: 19.1.1 + react: 19.2.3 luxon@3.7.1: {} @@ -25108,8 +23346,8 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.28.3 - '@babel/types': 7.28.2 + '@babel/parser': 7.28.5 + '@babel/types': 7.28.5 source-map-js: 1.2.1 make-dir@4.0.0: @@ -25134,6 +23372,19 @@ snapshots: markdown-table@3.0.4: {} + marked-terminal@7.3.0(marked@9.1.6): + dependencies: + ansi-escapes: 7.0.0 + ansi-regex: 6.1.0 + chalk: 5.5.0 + cli-highlight: 2.1.11 + cli-table3: 0.6.5 + marked: 9.1.6 + node-emoji: 2.2.0 + supports-hyperlinks: 3.2.0 + + marked@9.1.6: {} + matcher@5.0.0: dependencies: escape-string-regexp: 5.0.0 @@ -25307,8 +23558,6 @@ snapshots: dependencies: '@types/mdast': 4.0.4 - media-typer@0.3.0: {} - media-typer@1.1.0: {} mem@9.0.2: @@ -25350,8 +23599,6 @@ snapshots: type-fest: 3.13.1 yargs-parser: 21.1.1 - merge-descriptors@1.0.3: {} - merge-descriptors@2.0.0: {} merge-options@3.0.4: @@ -25362,8 +23609,6 @@ snapshots: merge2@1.4.1: {} - methods@1.1.2: {} - micro-api-client@3.3.0: {} micro-spelling-correcter@1.1.1: {} @@ -25649,10 +23894,6 @@ snapshots: dependencies: mime-db: 1.54.0 - mime@1.6.0: {} - - mime@2.6.0: {} - mime@3.0.0: {} mime@4.0.7: {} @@ -25713,22 +23954,10 @@ snapshots: ast-module-types: 6.0.1 node-source-walk: 7.0.1 - morgan@1.10.1: - dependencies: - basic-auth: 2.0.1 - debug: 2.6.9 - depd: 2.0.0 - on-finished: 2.3.0 - on-headers: 1.1.0 - transitivePeerDependencies: - - supports-color - mri@1.2.0: {} mrmime@1.0.1: {} - ms@2.0.0: {} - ms@2.1.3: {} msw@2.10.4(@types/node@18.17.0)(typescript@5.5.4): @@ -25782,6 +24011,32 @@ snapshots: transitivePeerDependencies: - '@types/node' + msw@2.10.4(@types/node@24.3.0)(typescript@5.9.2): + dependencies: + '@bundled-es-modules/cookie': 2.0.1 + '@bundled-es-modules/statuses': 1.0.1 + '@bundled-es-modules/tough-cookie': 0.1.6 + '@inquirer/confirm': 5.1.14(@types/node@24.3.0) + '@mswjs/interceptors': 0.39.6 + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/until': 2.1.0 + '@types/cookie': 0.6.0 + '@types/statuses': 2.0.6 + graphql: 16.11.0 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 + picocolors: 1.1.1 + strict-event-emitter: 0.5.1 + type-fest: 4.41.0 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.9.2 + transitivePeerDependencies: + - '@types/node' + optional: true + mute-stream@2.0.0: {} mylas@2.1.13: {} @@ -25804,10 +24059,6 @@ snapshots: natural-compare@1.4.0: {} - negotiator@0.6.3: {} - - negotiator@0.6.4: {} - negotiator@1.0.0: {} neo-async@2.6.2: {} @@ -25821,95 +24072,77 @@ snapshots: p-wait-for: 5.0.2 qs: 6.14.0 - next-intl-swc-plugin-extractor@4.6.1: {} - - next-intl@4.6.1(next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1)(typescript@5.9.2): - dependencies: - '@formatjs/intl-localematcher': 0.5.10 - '@parcel/watcher': 2.5.1 - '@swc/core': 1.15.5 - negotiator: 1.0.0 - next: 15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - next-intl-swc-plugin-extractor: 4.6.1 - po-parser: 2.0.0 - react: 19.1.1 - use-intl: 4.6.1(react@19.1.1) - optionalDependencies: - typescript: 5.9.2 - transitivePeerDependencies: - - '@swc/helpers' - next-themes@0.4.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - next-themes@0.4.6(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + next-themes@0.4.6(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - next@15.2.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@next/env': 15.2.1 + '@next/env': 15.3.4 '@swc/counter': 0.1.3 '@swc/helpers': 0.5.15 busboy: 1.6.0 caniuse-lite: 1.0.30001736 postcss: 8.4.31 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - styled-jsx: 5.1.6(@babel/core@7.28.3)(react@19.1.1) - optionalDependencies: - '@next/swc-darwin-arm64': 15.2.1 - '@next/swc-darwin-x64': 15.2.1 - '@next/swc-linux-arm64-gnu': 15.2.1 - '@next/swc-linux-arm64-musl': 15.2.1 - '@next/swc-linux-x64-gnu': 15.2.1 - '@next/swc-linux-x64-musl': 15.2.1 - '@next/swc-win32-arm64-msvc': 15.2.1 - '@next/swc-win32-x64-msvc': 15.2.1 - sharp: 0.33.5 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + styled-jsx: 5.1.6(@babel/core@7.28.0)(react@18.3.1) + optionalDependencies: + '@next/swc-darwin-arm64': 15.3.4 + '@next/swc-darwin-x64': 15.3.4 + '@next/swc-linux-arm64-gnu': 15.3.4 + '@next/swc-linux-arm64-musl': 15.3.4 + '@next/swc-linux-x64-gnu': 15.3.4 + '@next/swc-linux-x64-musl': 15.3.4 + '@next/swc-win32-arm64-msvc': 15.3.4 + '@next/swc-win32-x64-msvc': 15.3.4 + sharp: 0.34.5 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros - next@15.2.3(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + next@15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: - '@next/env': 15.2.3 + '@next/env': 15.3.4 '@swc/counter': 0.1.3 '@swc/helpers': 0.5.15 busboy: 1.6.0 caniuse-lite: 1.0.30001736 postcss: 8.4.31 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - styled-jsx: 5.1.6(@babel/core@7.28.3)(react@19.1.1) - optionalDependencies: - '@next/swc-darwin-arm64': 15.2.3 - '@next/swc-darwin-x64': 15.2.3 - '@next/swc-linux-arm64-gnu': 15.2.3 - '@next/swc-linux-arm64-musl': 15.2.3 - '@next/swc-linux-x64-gnu': 15.2.3 - '@next/swc-linux-x64-musl': 15.2.3 - '@next/swc-win32-arm64-msvc': 15.2.3 - '@next/swc-win32-x64-msvc': 15.2.3 - sharp: 0.33.5 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + styled-jsx: 5.1.6(@babel/core@7.28.5)(react@19.2.3) + optionalDependencies: + '@next/swc-darwin-arm64': 15.3.4 + '@next/swc-darwin-x64': 15.3.4 + '@next/swc-linux-arm64-gnu': 15.3.4 + '@next/swc-linux-arm64-musl': 15.3.4 + '@next/swc-linux-x64-gnu': 15.3.4 + '@next/swc-linux-x64-musl': 15.3.4 + '@next/swc-win32-arm64-msvc': 15.3.4 + '@next/swc-win32-x64-msvc': 15.3.4 + sharp: 0.34.5 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros - next@15.3.4(@babel/core@7.28.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: '@next/env': 15.3.4 '@swc/counter': 0.1.3 '@swc/helpers': 0.5.15 busboy: 1.6.0 - caniuse-lite: 1.0.30001734 + caniuse-lite: 1.0.30001736 postcss: 8.4.31 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.6(@babel/core@7.28.0)(react@18.3.1) + react: 19.1.1 + react-dom: 19.1.1(react@19.1.1) + styled-jsx: 5.1.6(react@19.1.1) optionalDependencies: '@next/swc-darwin-arm64': 15.3.4 '@next/swc-darwin-x64': 15.3.4 @@ -25919,22 +24152,22 @@ snapshots: '@next/swc-linux-x64-musl': 15.3.4 '@next/swc-win32-arm64-msvc': 15.3.4 '@next/swc-win32-x64-msvc': 15.3.4 - sharp: 0.34.3 + sharp: 0.34.5 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros - next@15.3.4(react-dom@19.1.1(react@19.1.1))(react@19.1.1): + next@15.3.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: '@next/env': 15.3.4 '@swc/counter': 0.1.3 '@swc/helpers': 0.5.15 busboy: 1.6.0 - caniuse-lite: 1.0.30001734 + caniuse-lite: 1.0.30001736 postcss: 8.4.31 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - styled-jsx: 5.1.6(@babel/core@7.28.3)(react@19.1.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + styled-jsx: 5.1.6(@babel/core@7.28.5)(react@19.2.3) optionalDependencies: '@next/swc-darwin-arm64': 15.3.4 '@next/swc-darwin-x64': 15.3.4 @@ -25944,36 +24177,35 @@ snapshots: '@next/swc-linux-x64-musl': 15.3.4 '@next/swc-win32-arm64-msvc': 15.3.4 '@next/swc-win32-x64-msvc': 15.3.4 - sharp: 0.34.3 + sharp: 0.34.5 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros - next@15.4.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + next@16.1.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: - '@next/env': 15.4.1 + '@next/env': 16.1.1 '@swc/helpers': 0.5.15 + baseline-browser-mapping: 2.9.11 caniuse-lite: 1.0.30001736 postcss: 8.4.31 - react: 19.1.0 - react-dom: 19.1.0(react@19.1.0) - styled-jsx: 5.1.6(react@19.1.0) - optionalDependencies: - '@next/swc-darwin-arm64': 15.4.1 - '@next/swc-darwin-x64': 15.4.1 - '@next/swc-linux-arm64-gnu': 15.4.1 - '@next/swc-linux-arm64-musl': 15.4.1 - '@next/swc-linux-x64-gnu': 15.4.1 - '@next/swc-linux-x64-musl': 15.4.1 - '@next/swc-win32-arm64-msvc': 15.4.1 - '@next/swc-win32-x64-msvc': 15.4.1 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + styled-jsx: 5.1.6(@babel/core@7.28.5)(react@19.2.3) + optionalDependencies: + '@next/swc-darwin-arm64': 16.1.1 + '@next/swc-darwin-x64': 16.1.1 + '@next/swc-linux-arm64-gnu': 16.1.1 + '@next/swc-linux-arm64-musl': 16.1.1 + '@next/swc-linux-x64-gnu': 16.1.1 + '@next/swc-linux-x64-musl': 16.1.1 + '@next/swc-win32-arm64-msvc': 16.1.1 + '@next/swc-win32-x64-msvc': 16.1.1 sharp: 0.34.5 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros - nice-try@1.0.5: {} - nitropack@2.12.4(@netlify/blobs@9.1.2)(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34): dependencies: '@cloudflare/kv-asset-handler': 0.4.0 @@ -26010,11 +24242,11 @@ snapshots: hookable: 5.5.3 httpxy: 0.1.7 ioredis: 5.7.0 - jiti: 2.5.1 + jiti: 2.6.1 klona: 2.0.6 knitwork: 1.2.0 listhen: 1.9.0 - magic-string: 0.30.17 + magic-string: 0.30.21 magicast: 0.3.5 mime: 4.0.7 mlly: 1.7.4 @@ -26074,11 +24306,6 @@ snapshots: - supports-color - uploadthing - no-case@3.0.4: - dependencies: - lower-case: 2.0.2 - tslib: 2.8.1 - node-abi@3.75.0: dependencies: semver: 7.7.2 @@ -26087,7 +24314,12 @@ snapshots: node-domexception@1.0.0: {} - node-fetch-native@1.0.1: {} + node-emoji@2.2.0: + dependencies: + '@sindresorhus/is': 4.6.0 + char-regex: 1.0.2 + emojilib: 2.4.0 + skin-tone: 2.0.0 node-fetch-native@1.6.7: {} @@ -26113,7 +24345,7 @@ snapshots: node-source-walk@7.0.1: dependencies: - '@babel/parser': 7.28.3 + '@babel/parser': 7.28.5 nodemon@3.1.10: dependencies: @@ -26122,7 +24354,7 @@ snapshots: ignore-by-default: 1.0.1 minimatch: 3.1.2 pstree.remy: 1.1.8 - semver: 7.7.2 + semver: 7.7.3 simple-update-notifier: 2.0.0 supports-color: 5.5.0 touch: 3.1.1 @@ -26169,8 +24401,21 @@ snapshots: normalize-range@0.1.2: {} + npm-bundled@2.0.1: + dependencies: + npm-normalize-package-bin: 2.0.0 + + npm-normalize-package-bin@2.0.0: {} + npm-normalize-package-bin@4.0.0: {} + npm-packlist@5.1.3: + dependencies: + glob: 8.1.0 + ignore-walk: 5.0.1 + npm-bundled: 2.0.1 + npm-normalize-package-bin: 2.0.0 + npm-run-all2@7.0.2: dependencies: ansi-styles: 6.2.1 @@ -26182,17 +24427,16 @@ snapshots: shell-quote: 1.8.3 which: 5.0.0 - npm-run-all@4.1.5: + npm-run-all2@8.0.4: dependencies: - ansi-styles: 3.2.1 - chalk: 2.4.2 - cross-spawn: 6.0.6 + ansi-styles: 6.2.1 + cross-spawn: 7.0.6 memorystream: 0.3.1 - minimatch: 3.1.2 - pidtree: 0.3.1 - read-pkg: 3.0.0 + picomatch: 4.0.3 + pidtree: 0.6.0 + read-package-json-fast: 4.0.0 shell-quote: 1.8.3 - string.prototype.padend: 3.1.6 + which: 5.0.0 npm-run-path@4.0.1: dependencies: @@ -26274,16 +24518,10 @@ snapshots: on-exit-leak-free@2.1.2: {} - on-finished@2.3.0: - dependencies: - ee-first: 1.1.1 - on-finished@2.4.1: dependencies: ee-first: 1.1.1 - on-headers@1.1.0: {} - once@1.4.0: dependencies: wrappy: 1.0.2 @@ -26440,11 +24678,6 @@ snapshots: parse-gitignore@2.0.0: {} - parse-json@4.0.0: - dependencies: - error-ex: 1.3.2 - json-parse-better-errors: 1.0.2 - parse-json@5.2.0: dependencies: '@babel/code-frame': 7.27.1 @@ -26462,6 +24695,10 @@ snapshots: parse-numeric-range@1.3.0: {} + parse5-htmlparser2-tree-adapter@6.0.1: + dependencies: + parse5: 6.0.1 + parse5-htmlparser2-tree-adapter@7.1.0: dependencies: domhandler: 5.0.3 @@ -26471,6 +24708,10 @@ snapshots: dependencies: parse5: 7.3.0 + parse5@5.1.1: {} + + parse5@6.0.1: {} + parse5@7.3.0: dependencies: entities: 6.0.1 @@ -26494,8 +24735,6 @@ snapshots: path-is-absolute@1.0.1: {} - path-key@2.0.1: {} - path-key@3.1.1: {} path-key@4.0.0: {} @@ -26507,16 +24746,10 @@ snapshots: lru-cache: 10.4.3 minipass: 7.1.2 - path-to-regexp@0.1.12: {} - path-to-regexp@6.3.0: {} path-to-regexp@8.2.0: {} - path-type@3.0.0: - dependencies: - pify: 3.0.0 - path-type@4.0.0: {} path-type@6.0.0: {} @@ -26572,14 +24805,10 @@ snapshots: picomatch@4.0.3: {} - pidtree@0.3.1: {} - pidtree@0.6.0: {} pify@2.3.0: {} - pify@3.0.0: {} - pino-abstract-transport@2.0.0: dependencies: split2: 4.2.0 @@ -26633,12 +24862,6 @@ snapshots: exsolve: 1.0.7 pathe: 2.0.3 - pkg-types@2.3.0: - dependencies: - confbox: 0.2.2 - exsolve: 1.0.7 - pathe: 2.0.3 - plimit-lit@1.6.1: dependencies: queue-lit: 1.5.2 @@ -26653,8 +24876,6 @@ snapshots: pluralize@8.0.0: {} - po-parser@2.0.0: {} - possible-typed-array-names@1.1.0: {} postcss-import@15.1.0(postcss@8.5.6): @@ -26669,13 +24890,13 @@ snapshots: camelcase-css: 2.0.1 postcss: 8.5.6 - postcss-load-config@3.1.4(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)): + postcss-load-config@3.1.4(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)): dependencies: lilconfig: 2.1.0 yaml: 1.10.2 optionalDependencies: postcss: 8.5.6 - ts-node: 10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2) + ts-node: 10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3) postcss-load-config@4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.10)(typescript@5.9.2)): dependencies: @@ -26685,28 +24906,27 @@ snapshots: postcss: 8.5.6 ts-node: 10.9.2(@swc/core@1.15.5)(@types/node@20.19.10)(typescript@5.9.2) - postcss-load-config@4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)): + postcss-load-config@4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.9.3)): dependencies: lilconfig: 3.1.3 yaml: 2.8.1 optionalDependencies: postcss: 8.5.6 - ts-node: 10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2) + ts-node: 10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.9.3) - postcss-load-config@6.0.1(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(yaml@2.8.1): + postcss-load-config@4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)): dependencies: lilconfig: 3.1.3 + yaml: 2.8.1 optionalDependencies: - jiti: 2.5.1 postcss: 8.5.6 - tsx: 4.20.4 - yaml: 2.8.1 + ts-node: 10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3) - postcss-load-config@6.0.1(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.4)(yaml@2.8.1): + postcss-load-config@6.0.1(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(yaml@2.8.1): dependencies: lilconfig: 3.1.3 optionalDependencies: - jiti: 2.6.1 + jiti: 2.5.1 postcss: 8.5.6 tsx: 4.20.4 yaml: 2.8.1 @@ -26820,8 +25040,6 @@ snapshots: prettier@3.2.5: {} - prettier@3.5.3: {} - prettier@3.6.2: {} pretty-bytes@6.1.1: {} @@ -26905,8 +25123,6 @@ snapshots: quansync@0.2.10: {} - quansync@1.0.0: {} - query-string@9.2.2: dependencies: decode-uri-component: 0.4.1 @@ -26921,14 +25137,75 @@ snapshots: quick-format-unescaped@4.0.4: {} - quick-lru@4.0.1: {} - quick-lru@5.1.1: {} quick-lru@6.1.2: {} quote-unquote@1.0.0: {} + radix-ui@1.4.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3): + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-accessible-icon': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-accordion': 1.2.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-alert-dialog': 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-arrow': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-aspect-ratio': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-avatar': 1.1.10(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-checkbox': 1.3.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-context-menu': 2.2.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-dialog': 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-dropdown-menu': 2.1.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-form': 0.1.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-hover-card': 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-label': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-menu': 2.1.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-menubar': 1.1.16(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-navigation-menu': 1.2.14(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-one-time-password-field': 0.1.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-password-toggle-field': 0.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-popover': 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-progress': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-radio-group': 1.3.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-scroll-area': 1.2.10(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-select': 2.2.6(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-separator': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slider': 1.3.6(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-switch': 1.2.6(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-tabs': 1.1.13(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toast': 1.2.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toggle': 1.1.10(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toggle-group': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toolbar': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-tooltip': 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-is-hydrated': 0.1.0(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + optionalDependencies: + '@types/react': 19.2.7 + '@types/react-dom': 19.2.3(@types/react@19.2.7) + radix3@1.1.2: {} randombytes@2.1.0: @@ -26937,13 +25214,6 @@ snapshots: range-parser@1.2.1: {} - raw-body@2.5.3: - dependencies: - bytes: 3.1.2 - http-errors: 2.0.1 - iconv-lite: 0.4.24 - unpipe: 1.0.0 - raw-body@3.0.0: dependencies: bytes: 3.1.2 @@ -26969,19 +25239,21 @@ snapshots: react: 18.3.1 scheduler: 0.23.2 - react-dom@19.1.0(react@19.1.0): - dependencies: - react: 19.1.0 - scheduler: 0.26.0 - react-dom@19.1.1(react@19.1.1): dependencies: react: 19.1.1 scheduler: 0.26.0 - react-hook-form@7.68.0(react@19.1.1): + react-dom@19.2.3(react@19.1.1): dependencies: react: 19.1.1 + scheduler: 0.27.0 + optional: true + + react-dom@19.2.3(react@19.2.3): + dependencies: + react: 19.2.3 + scheduler: 0.27.0 react-is@16.13.1: {} @@ -26997,9 +25269,7 @@ snapshots: react: 18.3.1 scheduler: 0.26.0 - react-refresh@0.14.2: {} - - react-refresh@0.17.0: {} + react-refresh@0.18.0: {} react-remove-scroll-bar@2.3.8(@types/react@18.3.23)(react@18.3.1): dependencies: @@ -27017,10 +25287,10 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - react-remove-scroll-bar@2.3.8(@types/react@19.2.7)(react@19.1.1): + react-remove-scroll-bar@2.3.8(@types/react@19.2.7)(react@19.2.3): dependencies: - react: 19.1.1 - react-style-singleton: 2.2.3(@types/react@19.2.7)(react@19.1.1) + react: 19.2.3 + react-style-singleton: 2.2.3(@types/react@19.2.7)(react@19.2.3) tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.7 @@ -27047,14 +25317,14 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - react-remove-scroll@2.7.1(@types/react@19.2.7)(react@19.1.1): + react-remove-scroll@2.7.1(@types/react@19.2.7)(react@19.2.3): dependencies: - react: 19.1.1 - react-remove-scroll-bar: 2.3.8(@types/react@19.2.7)(react@19.1.1) - react-style-singleton: 2.2.3(@types/react@19.2.7)(react@19.1.1) + react: 19.2.3 + react-remove-scroll-bar: 2.3.8(@types/react@19.2.7)(react@19.2.3) + react-style-singleton: 2.2.3(@types/react@19.2.7)(react@19.2.3) tslib: 2.8.1 - use-callback-ref: 1.3.3(@types/react@19.2.7)(react@19.1.1) - use-sidecar: 1.1.3(@types/react@19.2.7)(react@19.1.1) + use-callback-ref: 1.3.3(@types/react@19.2.7)(react@19.2.3) + use-sidecar: 1.1.3(@types/react@19.2.7)(react@19.2.3) optionalDependencies: '@types/react': 19.2.7 @@ -27067,14 +25337,6 @@ snapshots: react-dom: 18.3.1(react@18.3.1) optional: true - react-router@7.8.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1): - dependencies: - cookie: 1.0.2 - react: 19.1.1 - set-cookie-parser: 2.7.1 - optionalDependencies: - react-dom: 19.1.1(react@19.1.1) - react-simple-code-editor@0.14.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: react: 18.3.1 @@ -27088,6 +25350,14 @@ snapshots: react-dom: 19.1.1(react@19.1.1) react-transition-group: 4.4.5(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + react-smooth@4.0.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3): + dependencies: + fast-equals: 5.2.2 + prop-types: 15.8.1 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-transition-group: 4.4.5(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react-style-singleton@2.2.3(@types/react@18.3.23)(react@18.3.1): dependencies: get-nonce: 1.0.1 @@ -27104,10 +25374,10 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - react-style-singleton@2.2.3(@types/react@19.2.7)(react@19.1.1): + react-style-singleton@2.2.3(@types/react@19.2.7)(react@19.2.3): dependencies: get-nonce: 1.0.1 - react: 19.1.1 + react: 19.2.3 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.7 @@ -27121,14 +25391,23 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - react@18.3.1: + react-transition-group@4.4.5(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: + '@babel/runtime': 7.28.2 + dom-helpers: 5.2.1 loose-envify: 1.4.0 + prop-types: 15.8.1 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - react@19.1.0: {} + react@18.3.1: + dependencies: + loose-envify: 1.4.0 react@19.1.1: {} + react@19.2.3: {} + read-cache@1.0.0: dependencies: pify: 2.3.0 @@ -27162,12 +25441,6 @@ snapshots: read-pkg: 7.1.0 type-fest: 2.19.0 - read-pkg@3.0.0: - dependencies: - load-json-file: 4.0.0 - normalize-package-data: 2.5.0 - path-type: 3.0.0 - read-pkg@5.2.0: dependencies: '@types/normalize-package-data': 2.4.4 @@ -27258,6 +25531,19 @@ snapshots: tiny-invariant: 1.3.3 victory-vendor: 36.9.2 + recharts@2.15.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3): + dependencies: + clsx: 2.1.1 + eventemitter3: 4.0.7 + lodash: 4.17.21 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-is: 18.3.1 + react-smooth: 4.0.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + recharts-scale: 0.4.5 + tiny-invariant: 1.3.3 + victory-vendor: 36.9.2 + recma-build-jsx@1.0.0: dependencies: '@types/estree': 1.0.8 @@ -27491,23 +25777,6 @@ snapshots: dependencies: glob: 7.2.3 - rolldown-plugin-dts@0.13.14(rolldown@1.0.0-beta.34)(typescript@5.9.3): - dependencies: - '@babel/generator': 7.28.3 - '@babel/parser': 7.28.3 - '@babel/types': 7.28.2 - ast-kit: 2.2.0 - birpc: 2.9.0 - debug: 4.4.1(supports-color@5.5.0) - dts-resolver: 2.1.3 - get-tsconfig: 4.10.1 - rolldown: 1.0.0-beta.34 - optionalDependencies: - typescript: 5.9.3 - transitivePeerDependencies: - - oxc-resolver - - supports-color - rolldown@1.0.0-beta.34: dependencies: '@oxc-project/runtime': 0.82.3 @@ -27529,6 +25798,7 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.34 '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.34 '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.34 + optional: true rollup-plugin-visualizer@6.0.3(rolldown@1.0.0-beta.34)(rollup@4.47.1): dependencies: @@ -27663,6 +25933,8 @@ snapshots: scheduler@0.26.0: {} + scheduler@0.27.0: {} + schema-utils@4.3.2: dependencies: '@types/json-schema': 7.0.15 @@ -27686,24 +25958,6 @@ snapshots: semver@7.7.3: {} - send@0.19.2: - dependencies: - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - encodeurl: 2.0.0 - escape-html: 1.0.3 - etag: 1.8.1 - fresh: 0.5.2 - http-errors: 2.0.1 - mime: 1.6.0 - ms: 2.1.3 - on-finished: 2.4.1 - range-parser: 1.2.1 - statuses: 2.0.2 - transitivePeerDependencies: - - supports-color - send@1.2.0: dependencies: debug: 4.4.1(supports-color@5.5.0) @@ -27738,15 +25992,6 @@ snapshots: dependencies: defu: 6.1.4 - serve-static@1.16.3: - dependencies: - encodeurl: 2.0.0 - escape-html: 1.0.3 - parseurl: 1.3.3 - send: 0.19.2 - transitivePeerDependencies: - - supports-color - serve-static@2.2.0: dependencies: encodeurl: 2.0.0 @@ -27818,63 +26063,6 @@ snapshots: - supports-color - typescript - sharp@0.33.5: - dependencies: - color: 4.2.3 - detect-libc: 2.1.2 - semver: 7.7.3 - optionalDependencies: - '@img/sharp-darwin-arm64': 0.33.5 - '@img/sharp-darwin-x64': 0.33.5 - '@img/sharp-libvips-darwin-arm64': 1.0.4 - '@img/sharp-libvips-darwin-x64': 1.0.4 - '@img/sharp-libvips-linux-arm': 1.0.5 - '@img/sharp-libvips-linux-arm64': 1.0.4 - '@img/sharp-libvips-linux-s390x': 1.0.4 - '@img/sharp-libvips-linux-x64': 1.0.4 - '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 - '@img/sharp-libvips-linuxmusl-x64': 1.0.4 - '@img/sharp-linux-arm': 0.33.5 - '@img/sharp-linux-arm64': 0.33.5 - '@img/sharp-linux-s390x': 0.33.5 - '@img/sharp-linux-x64': 0.33.5 - '@img/sharp-linuxmusl-arm64': 0.33.5 - '@img/sharp-linuxmusl-x64': 0.33.5 - '@img/sharp-wasm32': 0.33.5 - '@img/sharp-win32-ia32': 0.33.5 - '@img/sharp-win32-x64': 0.33.5 - optional: true - - sharp@0.34.3: - dependencies: - color: 4.2.3 - detect-libc: 2.0.4 - semver: 7.7.3 - optionalDependencies: - '@img/sharp-darwin-arm64': 0.34.3 - '@img/sharp-darwin-x64': 0.34.3 - '@img/sharp-libvips-darwin-arm64': 1.2.0 - '@img/sharp-libvips-darwin-x64': 1.2.0 - '@img/sharp-libvips-linux-arm': 1.2.0 - '@img/sharp-libvips-linux-arm64': 1.2.0 - '@img/sharp-libvips-linux-ppc64': 1.2.0 - '@img/sharp-libvips-linux-s390x': 1.2.0 - '@img/sharp-libvips-linux-x64': 1.2.0 - '@img/sharp-libvips-linuxmusl-arm64': 1.2.0 - '@img/sharp-libvips-linuxmusl-x64': 1.2.0 - '@img/sharp-linux-arm': 0.34.3 - '@img/sharp-linux-arm64': 0.34.3 - '@img/sharp-linux-ppc64': 0.34.3 - '@img/sharp-linux-s390x': 0.34.3 - '@img/sharp-linux-x64': 0.34.3 - '@img/sharp-linuxmusl-arm64': 0.34.3 - '@img/sharp-linuxmusl-x64': 0.34.3 - '@img/sharp-wasm32': 0.34.3 - '@img/sharp-win32-arm64': 0.34.3 - '@img/sharp-win32-ia32': 0.34.3 - '@img/sharp-win32-x64': 0.34.3 - optional: true - sharp@0.34.5: dependencies: '@img/colour': 1.0.0 @@ -27907,16 +26095,10 @@ snapshots: '@img/sharp-win32-x64': 0.34.5 optional: true - shebang-command@1.2.0: - dependencies: - shebang-regex: 1.0.0 - shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 - shebang-regex@1.0.0: {} - shebang-regex@3.0.0: {} shell-quote@1.8.3: {} @@ -27980,10 +26162,14 @@ snapshots: simple-update-notifier@2.0.0: dependencies: - semver: 7.7.2 + semver: 7.7.3 sisteransi@1.0.5: {} + skin-tone@2.0.0: + dependencies: + unicode-emoji-modifier-base: 1.0.0 + slash@3.0.0: {} slash@4.0.0: {} @@ -28002,43 +26188,10 @@ snapshots: smob@1.5.0: {} - snake-case@3.0.4: - dependencies: - dot-case: 3.0.4 - tslib: 2.8.1 - - snakecase-keys@3.2.1: - dependencies: - map-obj: 4.3.0 - to-snake-case: 1.0.0 - - snakecase-keys@5.4.4: - dependencies: - map-obj: 4.3.0 - snake-case: 3.0.4 - type-fest: 2.19.0 - - snakecase-keys@8.0.1: - dependencies: - map-obj: 4.3.0 - snake-case: 3.0.4 - type-fest: 4.41.0 - - solid-js@1.9.10: - dependencies: - csstype: 3.2.3 - seroval: 1.3.2 - seroval-plugins: 1.3.2(seroval@1.3.2) - sonic-boom@4.2.0: dependencies: atomic-sleep: 1.0.0 - sonner@2.0.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1): - dependencies: - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - source-map-js@1.2.1: {} source-map-support@0.5.13: @@ -28081,8 +26234,6 @@ snapshots: sprintf-js@1.0.3: {} - srvx@0.9.8: {} - stable-hash@0.0.5: {} stack-trace@0.0.10: {} @@ -28183,13 +26334,6 @@ snapshots: set-function-name: 2.0.2 side-channel: 1.1.0 - string.prototype.padend@3.1.6: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-abstract: 1.24.0 - es-object-atoms: 1.1.1 - string.prototype.repeat@1.0.0: dependencies: define-properties: 1.2.1 @@ -28257,6 +26401,8 @@ snapshots: strip-final-newline@3.0.0: {} + strip-final-newline@4.0.0: {} + strip-indent@3.0.0: dependencies: min-indent: 1.0.1 @@ -28298,17 +26444,17 @@ snapshots: optionalDependencies: '@babel/core': 7.28.0 - styled-jsx@5.1.6(@babel/core@7.28.3)(react@19.1.1): + styled-jsx@5.1.6(@babel/core@7.28.5)(react@19.2.3): dependencies: client-only: 0.0.1 - react: 19.1.1 + react: 19.2.3 optionalDependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 - styled-jsx@5.1.6(react@19.1.0): + styled-jsx@5.1.6(react@19.1.1): dependencies: client-only: 0.0.1 - react: 19.1.0 + react: 19.1.1 sucrase@3.35.0: dependencies: @@ -28320,20 +26466,6 @@ snapshots: pirates: 4.0.7 ts-interface-checker: 0.1.13 - superagent@10.2.3: - dependencies: - component-emitter: 1.3.1 - cookiejar: 2.1.4 - debug: 4.4.1(supports-color@5.5.0) - fast-safe-stringify: 2.1.1 - form-data: 4.0.4 - formidable: 3.5.4 - methods: 1.1.2 - mime: 2.6.0 - qs: 6.14.0 - transitivePeerDependencies: - - supports-color - superstruct@1.0.4: {} supertap@3.0.1: @@ -28343,13 +26475,6 @@ snapshots: serialize-error: 7.0.1 strip-ansi: 7.1.0 - supertest@7.1.4: - dependencies: - methods: 1.1.2 - superagent: 10.2.3 - transitivePeerDependencies: - - supports-color - supports-color@10.1.0: {} supports-color@5.5.0: @@ -28369,18 +26494,24 @@ snapshots: has-flag: 4.0.0 supports-color: 7.2.0 + supports-hyperlinks@3.2.0: + dependencies: + has-flag: 4.0.0 + supports-color: 7.2.0 + supports-preserve-symlinks-flag@1.0.0: {} - swr@2.2.0(react@19.1.1): + swr@2.3.4(react@19.1.1): dependencies: + dequal: 2.0.3 react: 19.1.1 use-sync-external-store: 1.5.0(react@19.1.1) - swr@2.3.4(react@19.1.1): + swr@2.3.4(react@19.2.3): dependencies: dequal: 2.0.3 - react: 19.1.1 - use-sync-external-store: 1.5.0(react@19.1.1) + react: 19.2.3 + use-sync-external-store: 1.5.0(react@19.2.3) swr@2.3.6(react@18.3.1): dependencies: @@ -28388,11 +26519,11 @@ snapshots: react: 18.3.1 use-sync-external-store: 1.5.0(react@18.3.1) - swr@2.3.6(react@19.1.1): + swr@2.3.6(react@19.2.3): dependencies: dequal: 2.0.3 - react: 19.1.1 - use-sync-external-store: 1.5.0(react@19.1.1) + react: 19.2.3 + use-sync-external-store: 1.5.0(react@19.2.3) synckit@0.11.11: dependencies: @@ -28408,14 +26539,18 @@ snapshots: dependencies: tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.10)(typescript@5.9.2)) - tailwindcss-animate@1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2))): + tailwindcss-animate@1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.9.3))): dependencies: - tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.9.3)) - tailwindcss-scoped-preflight@3.4.12(postcss@8.5.6)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2))): + tailwindcss-animate@1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3))): + dependencies: + tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)) + + tailwindcss-scoped-preflight@3.4.12(postcss@8.5.6)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3))): dependencies: postcss: 8.5.6 - tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + tailwindcss: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)) tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.10)(typescript@5.9.2)): dependencies: @@ -28444,7 +26579,34 @@ snapshots: transitivePeerDependencies: - ts-node - tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)): + tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.9.3)): + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.6.0 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.3 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.7 + lilconfig: 3.1.3 + micromatch: 4.0.8 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.1.1 + postcss: 8.5.6 + postcss-import: 15.1.0(postcss@8.5.6) + postcss-js: 4.0.1(postcss@8.5.6) + postcss-load-config: 4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.9.3)) + postcss-nested: 6.2.0(postcss@8.5.6) + postcss-selector-parser: 6.1.2 + resolve: 1.22.10 + sucrase: 3.35.0 + transitivePeerDependencies: + - ts-node + + tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -28463,7 +26625,7 @@ snapshots: postcss: 8.5.6 postcss-import: 15.1.0(postcss@8.5.6) postcss-js: 4.0.1(postcss@8.5.6) - postcss-load-config: 4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + postcss-load-config: 4.0.2(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)) postcss-nested: 6.2.0(postcss@8.5.6) postcss-selector-parser: 6.1.2 resolve: 1.22.10 @@ -28525,16 +26687,17 @@ snapshots: '@swc/core': 1.15.5 esbuild: 0.25.9 - terser-webpack-plugin@5.3.14(@swc/core@1.15.5)(webpack@5.101.1(@swc/core@1.15.5)): + terser-webpack-plugin@5.3.14(@swc/core@1.15.5)(esbuild@0.27.2)(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 schema-utils: 4.3.2 serialize-javascript: 6.0.2 terser: 5.43.1 - webpack: 5.101.1(@swc/core@1.15.5) + webpack: 5.101.1(@swc/core@1.15.5)(esbuild@0.27.2) optionalDependencies: '@swc/core': 1.15.5 + esbuild: 0.27.2 optional: true terser@5.43.1: @@ -28611,20 +26774,10 @@ snapshots: is-absolute: 1.0.0 is-negated-glob: 1.0.0 - to-no-case@1.0.2: {} - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 - to-snake-case@1.0.0: - dependencies: - to-space-case: 1.0.0 - - to-space-case@1.0.0: - dependencies: - to-no-case: 1.0.2 - toad-cache@3.7.0: {} toidentifier@1.0.1: {} @@ -28674,87 +26827,112 @@ snapshots: dependencies: typescript: 5.5.4 - ts-api-utils@2.1.0(typescript@5.7.3): + ts-api-utils@2.1.0(typescript@5.9.3): dependencies: - typescript: 5.7.3 + typescript: 5.9.3 - ts-api-utils@2.1.0(typescript@5.8.3): + ts-api-utils@2.4.0(typescript@5.8.3): dependencies: typescript: 5.8.3 - ts-api-utils@2.1.0(typescript@5.9.3): + ts-api-utils@2.4.0(typescript@5.9.2): + dependencies: + typescript: 5.9.2 + + ts-api-utils@2.4.0(typescript@5.9.3): dependencies: typescript: 5.9.3 ts-interface-checker@0.1.13: {} - ts-jest@29.4.6(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)))(typescript@5.9.2): + ts-jest@29.4.6(@babel/core@7.28.5)(@jest/transform@29.7.0)(@jest/types@30.2.0)(babel-jest@29.7.0(@babel/core@7.28.5))(jest-util@29.7.0)(jest@29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)))(typescript@5.8.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 handlebars: 4.7.8 - jest: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2)) + jest: 29.7.0(@types/node@20.19.27)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3)) json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.7.3 type-fest: 4.41.0 - typescript: 5.9.2 + typescript: 5.8.3 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@jest/transform': 29.7.0 '@jest/types': 30.2.0 - babel-jest: 29.7.0(@babel/core@7.28.3) + babel-jest: 29.7.0(@babel/core@7.28.5) jest-util: 29.7.0 - ts-jest@29.4.1(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@30.2.0)(babel-jest@29.7.0(@babel/core@7.28.3))(jest-util@29.7.0)(jest@29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.1)(@types/node@22.17.1)(typescript@5.9.3)))(typescript@5.9.3): + ts-morph@18.0.0: dependencies: - bs-logger: 0.2.6 - fast-json-stable-stringify: 2.1.0 - handlebars: 4.7.8 - jest: 29.7.0(@types/node@22.17.1)(ts-node@10.9.2(@swc/core@1.15.1)(@types/node@22.17.1)(typescript@5.9.3)) - json5: 2.2.3 - lodash.memoize: 4.1.2 + '@ts-morph/common': 0.19.0 + code-block-writer: 12.0.0 + + ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.10)(typescript@5.9.2): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.19.10 + acorn: 8.15.0 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 make-error: 1.3.6 - semver: 7.7.2 - type-fest: 4.41.0 - typescript: 5.9.3 - yargs-parser: 21.1.1 + typescript: 5.9.2 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 optionalDependencies: - '@babel/core': 7.28.3 - '@jest/transform': 29.7.0 - '@jest/types': 30.2.0 - babel-jest: 29.7.0(@babel/core@7.28.3) - jest-util: 29.7.0 + '@swc/core': 1.15.5 + optional: true - ts-morph@18.0.0: + ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.8.3): dependencies: - '@ts-morph/common': 0.19.0 - code-block-writer: 12.0.0 + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.19.27 + acorn: 8.15.0 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.8.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.15.5 - ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.10)(typescript@5.9.2): + ts-node@10.9.2(@swc/core@1.15.5)(@types/node@20.19.27)(typescript@5.9.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.19.10 + '@types/node': 20.19.27 acorn: 8.15.0 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.9.2 + typescript: 5.9.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: '@swc/core': 1.15.5 optional: true - ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.2): + ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -28773,6 +26951,7 @@ snapshots: yn: 3.1.1 optionalDependencies: '@swc/core': 1.15.5 + optional: true ts-node@10.9.2(@swc/core@1.15.5)(@types/node@24.3.0)(typescript@5.9.2): dependencies: @@ -28804,9 +26983,21 @@ snapshots: normalize-path: 3.0.0 plimit-lit: 1.6.1 - tsconfck@3.1.6(typescript@5.9.2): - optionalDependencies: - typescript: 5.9.2 + tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz(typescript@5.8.3): + dependencies: + debug: 4.4.1(supports-color@5.5.0) + fast-glob: 3.3.3 + get-stdin: 8.0.0 + p-all: 3.0.0 + picocolors: 1.1.1 + signal-exit: 3.0.7 + string-to-stream: 3.0.1 + superstruct: 1.0.4 + tslib: 2.8.1 + typescript: 5.8.3 + yargs: 17.7.2 + transitivePeerDependencies: + - supports-color tsconfig-paths@3.15.0: dependencies: @@ -28821,31 +27012,6 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tsdown@0.12.9(typescript@5.9.3): - dependencies: - ansis: 4.1.0 - cac: 6.7.14 - chokidar: 4.0.3 - debug: 4.4.1(supports-color@5.5.0) - diff: 8.0.2 - empathic: 2.0.0 - hookable: 5.5.3 - rolldown: 1.0.0-beta.34 - rolldown-plugin-dts: 0.13.14(rolldown@1.0.0-beta.34)(typescript@5.9.2) - semver: 7.7.3 - tinyexec: 1.0.1 - tinyglobby: 0.2.15 - unconfig: 7.4.2 - optionalDependencies: - typescript: 5.9.3 - transitivePeerDependencies: - - '@typescript/native-preview' - - oxc-resolver - - supports-color - - vue-tsc - - tslib@2.4.1: {} - tslib@2.8.1: {} tsup@8.5.0(@swc/core@1.15.5)(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.2)(yaml@2.8.1): @@ -28877,7 +27043,7 @@ snapshots: - tsx - yaml - tsup@8.5.0(@swc/core@1.15.5)(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.2)(yaml@2.8.1): + tsup@8.5.0(@swc/core@1.15.5)(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.3)(yaml@2.8.1): dependencies: bundle-require: 5.1.0(esbuild@0.25.9) cac: 6.7.14 @@ -28899,36 +27065,7 @@ snapshots: optionalDependencies: '@swc/core': 1.15.5 postcss: 8.5.6 - typescript: 5.9.2 - transitivePeerDependencies: - - jiti - - supports-color - - tsx - - yaml - - tsup@8.5.0(@swc/core@1.15.1)(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.8.3)(yaml@2.8.1): - dependencies: - bundle-require: 5.1.0(esbuild@0.25.9) - cac: 6.7.14 - chokidar: 4.0.3 - consola: 3.4.2 - debug: 4.4.1(supports-color@5.5.0) - esbuild: 0.25.9 - fix-dts-default-cjs-exports: 1.0.1 - joycon: 3.1.1 - picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.4)(yaml@2.8.1) - resolve-from: 5.0.0 - rollup: 4.46.2 - source-map: 0.8.0-beta.0 - sucrase: 3.35.0 - tinyexec: 0.3.2 - tinyglobby: 0.2.14 - tree-kill: 1.2.2 - optionalDependencies: - '@swc/core': 1.15.1 - postcss: 8.5.6 - typescript: 5.8.3 + typescript: 5.9.3 transitivePeerDependencies: - jiti - supports-color @@ -28976,11 +27113,6 @@ snapshots: type-fest@4.41.0: {} - type-is@1.6.18: - dependencies: - media-typer: 0.3.0 - mime-types: 2.1.35 - type-is@2.0.1: dependencies: content-type: 1.0.5 @@ -29020,6 +27152,16 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 + typescript-eslint@8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/parser': 8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) + eslint: 9.39.2(jiti@2.6.1) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + typescript-eslint@8.34.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.5.4): dependencies: '@typescript-eslint/eslint-plugin': 8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.5.4))(eslint@9.29.0(jiti@2.6.1))(typescript@5.5.4) @@ -29030,23 +27172,14 @@ snapshots: transitivePeerDependencies: - supports-color - typescript-eslint@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3): - dependencies: - '@typescript-eslint/eslint-plugin': 8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3) - '@typescript-eslint/parser': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3) - '@typescript-eslint/utils': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.7.3) - eslint: 9.39.2(jiti@2.6.1) - typescript: 5.7.3 - transitivePeerDependencies: - - supports-color - - typescript-eslint@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3): + typescript-eslint@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) - '@typescript-eslint/parser': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) - '@typescript-eslint/utils': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) + '@typescript-eslint/eslint-plugin': 8.51.0(@typescript-eslint/parser@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/parser': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.51.0(typescript@5.9.3) + '@typescript-eslint/utils': 8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) - typescript: 5.8.3 + typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -29054,7 +27187,7 @@ snapshots: typescript@5.5.4: {} - typescript@5.7.3: {} + typescript@5.6.1-rc: {} typescript@5.8.3: {} @@ -29080,36 +27213,23 @@ snapshots: unc-path-regex@0.1.2: {} - unconfig-core@7.4.2: - dependencies: - '@quansync/fs': 1.0.0 - quansync: 1.0.0 - - unconfig@7.4.2: - dependencies: - '@quansync/fs': 1.0.0 - defu: 6.1.4 - jiti: 2.6.1 - quansync: 1.0.0 - unconfig-core: 7.4.2 - uncrypto@0.1.3: {} unctx@2.4.1: dependencies: acorn: 8.15.0 estree-walker: 3.0.3 - magic-string: 0.30.17 + magic-string: 0.30.21 unplugin: 2.3.5 undefsafe@2.0.5: {} - undici-types@5.28.4: {} - undici-types@6.21.0: {} undici-types@7.10.0: {} + undici-types@7.16.0: {} + undici@6.21.3: {} undici@7.13.0: {} @@ -29130,6 +27250,8 @@ snapshots: pathe: 2.0.3 ufo: 1.6.1 + unicode-emoji-modifier-base@1.0.0: {} + unicorn-magic@0.1.0: {} unicorn-magic@0.3.0: {} @@ -29150,7 +27272,7 @@ snapshots: escape-string-regexp: 5.0.0 estree-walker: 3.0.3 local-pkg: 1.1.1 - magic-string: 0.30.17 + magic-string: 0.30.21 mlly: 1.7.4 pathe: 2.0.3 picomatch: 4.0.3 @@ -29269,14 +27391,14 @@ snapshots: dependencies: citty: 0.1.6 defu: 6.1.4 - jiti: 2.5.1 + jiti: 2.6.1 knitwork: 1.2.0 scule: 1.3.0 unwasm@0.3.9: dependencies: knitwork: 1.2.0 - magic-string: 0.30.17 + magic-string: 0.30.21 mlly: 1.7.4 pathe: 1.1.2 pkg-types: 1.3.1 @@ -29325,19 +27447,16 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - use-callback-ref@1.3.3(@types/react@19.2.7)(react@19.1.1): + use-callback-ref@1.3.3(@types/react@19.2.7)(react@19.2.3): dependencies: - react: 19.1.1 + react: 19.2.3 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.7 - use-intl@4.6.1(react@19.1.1): + use-debounce@10.0.6(react@19.2.3): dependencies: - '@formatjs/fast-memoize': 2.2.7 - '@schummar/icu-type-parser': 1.21.5 - intl-messageformat: 10.7.18 - react: 19.1.1 + react: 19.2.3 use-sidecar@1.1.3(@types/react@18.3.23)(react@18.3.1): dependencies: @@ -29355,10 +27474,10 @@ snapshots: optionalDependencies: '@types/react': 19.1.10 - use-sidecar@1.1.3(@types/react@19.2.7)(react@19.1.1): + use-sidecar@1.1.3(@types/react@19.2.7)(react@19.2.3): dependencies: detect-node-es: 1.1.0 - react: 19.1.1 + react: 19.2.3 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.7 @@ -29371,6 +27490,10 @@ snapshots: dependencies: react: 19.1.1 + use-sync-external-store@1.5.0(react@19.2.3): + dependencies: + react: 19.2.3 + util-deprecate@1.0.2: {} util@0.12.5: @@ -29381,8 +27504,6 @@ snapshots: is-typed-array: 1.1.15 which-typed-array: 1.1.19 - utils-merge@1.0.1: {} - uuid@11.1.0: {} v8-compile-cache-lib@3.0.1: {} @@ -29393,15 +27514,13 @@ snapshots: '@types/istanbul-lib-coverage': 2.0.6 convert-source-map: 2.0.0 - valibot@1.2.0(typescript@5.9.2): - optionalDependencies: - typescript: 5.9.2 - validate-npm-package-license@3.0.4: dependencies: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 + validate-npm-package-name@5.0.1: {} + vary@1.1.2: {} vfile-location@5.0.3: @@ -29436,91 +27555,13 @@ snapshots: d3-time: 3.1.0 d3-timer: 3.0.1 - vinxi@0.5.3(@netlify/blobs@9.1.2)(@types/node@22.17.1)(better-sqlite3@12.2.0)(db0@0.3.2(better-sqlite3@12.2.0))(ioredis@5.7.0)(jiti@2.6.1)(lightningcss@1.30.2)(rolldown@1.0.0-beta.34)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): - dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.3) - '@types/micromatch': 4.0.10 - '@vinxi/listhen': 1.5.6 - boxen: 7.1.1 - chokidar: 3.6.0 - citty: 0.1.6 - consola: 3.4.2 - crossws: 0.3.5 - dax-sh: 0.39.2 - defu: 6.1.4 - es-module-lexer: 1.7.0 - esbuild: 0.20.2 - fast-glob: 3.3.3 - get-port-please: 3.2.0 - h3: 1.13.0 - hookable: 5.5.3 - http-proxy: 1.18.1 - micromatch: 4.0.8 - nitropack: 2.12.4(@netlify/blobs@9.1.2)(better-sqlite3@12.2.0)(rolldown@1.0.0-beta.34) - node-fetch-native: 1.6.7 - path-to-regexp: 6.3.0 - pathe: 1.1.2 - radix3: 1.1.2 - resolve: 1.22.10 - serve-placeholder: 2.0.2 - serve-static: 1.16.3 - ufo: 1.6.1 - unctx: 2.4.1 - unenv: 1.10.0 - unstorage: 1.16.1(@netlify/blobs@9.1.2)(db0@0.3.2(better-sqlite3@12.2.0))(ioredis@5.7.0) - vite: 6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - zod: 3.25.76 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@types/node' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/kv' - - aws4fetch - - better-sqlite3 - - db0 - - debug - - drizzle-orm - - encoding - - idb-keyval - - ioredis - - jiti - - less - - lightningcss - - mysql2 - - rolldown - - sass - - sass-embedded - - sqlite3 - - stylus - - sugarss - - supports-color - - terser - - tsx - - uploadthing - - xml2js - - yaml - vite-node@3.2.4(@types/node@18.17.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: cac: 6.7.14 debug: 4.4.1(supports-color@5.5.0) es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 6.4.1(@types/node@18.17.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + vite: 7.3.0(@types/node@18.17.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) transitivePeerDependencies: - '@types/node' - jiti @@ -29535,13 +27576,13 @@ snapshots: - tsx - yaml - vite-node@3.2.4(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): + vite-node@3.2.4(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: cac: 6.7.14 debug: 4.4.1(supports-color@5.5.0) es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + vite: 7.3.0(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) transitivePeerDependencies: - '@types/node' - jiti @@ -29555,30 +27596,9 @@ snapshots: - terser - tsx - yaml + optional: true - vite-tsconfig-paths@5.1.4(typescript@5.9.2)(vite@6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)): - dependencies: - debug: 4.4.1(supports-color@5.5.0) - globrex: 0.1.2 - tsconfck: 3.1.6(typescript@5.9.2) - optionalDependencies: - vite: 6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - transitivePeerDependencies: - - supports-color - - typescript - - vite-tsconfig-paths@5.1.4(typescript@5.9.2)(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)): - dependencies: - debug: 4.4.1(supports-color@5.5.0) - globrex: 0.1.2 - tsconfck: 3.1.6(typescript@5.9.2) - optionalDependencies: - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) - transitivePeerDependencies: - - supports-color - - typescript - - vite@6.4.1(@types/node@18.17.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): + vite@7.1.5(@types/node@18.17.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) @@ -29595,7 +27615,7 @@ snapshots: tsx: 4.20.4 yaml: 2.8.1 - vite@6.4.1(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): + vite@7.1.5(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) @@ -29604,24 +27624,25 @@ snapshots: rollup: 4.47.1 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 20.19.27 + '@types/node': 24.3.0 fsevents: 2.3.3 - jiti: 2.6.1 + jiti: 2.5.1 lightningcss: 1.30.2 terser: 5.43.1 tsx: 4.20.4 yaml: 2.8.1 + optional: true - vite@6.4.1(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): + vite@7.3.0(@types/node@18.17.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: - esbuild: 0.25.9 + esbuild: 0.27.2 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 rollup: 4.47.1 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 22.17.1 + '@types/node': 18.17.0 fsevents: 2.3.3 jiti: 2.6.1 lightningcss: 1.30.2 @@ -29629,74 +27650,79 @@ snapshots: tsx: 4.20.4 yaml: 2.8.1 - vite@7.1.5(@types/node@18.17.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): + vite@7.3.0(@types/node@20.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: - esbuild: 0.25.9 + esbuild: 0.27.2 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 rollup: 4.47.1 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 18.17.0 + '@types/node': 20.19.10 fsevents: 2.3.3 jiti: 2.6.1 lightningcss: 1.30.2 terser: 5.43.1 tsx: 4.20.4 yaml: 2.8.1 + optional: true - vite@7.1.5(@types/node@20.19.10)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): + vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: - esbuild: 0.25.9 + esbuild: 0.27.2 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 rollup: 4.47.1 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 20.19.10 + '@types/node': 22.17.1 fsevents: 2.3.3 jiti: 2.6.1 lightningcss: 1.30.2 terser: 5.43.1 tsx: 4.20.4 yaml: 2.8.1 - optional: true - vite@7.1.5(@types/node@20.19.27)(jiti@2.6.1): + vite@7.3.0(@types/node@24.10.4)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: - esbuild: 0.25.9 + esbuild: 0.27.2 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 rollup: 4.47.1 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 20.19.27 + '@types/node': 24.10.4 fsevents: 2.3.3 jiti: 2.6.1 + lightningcss: 1.30.2 + terser: 5.43.1 + tsx: 4.20.4 + yaml: 2.8.1 - vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): + vite@7.3.0(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: - esbuild: 0.25.9 + esbuild: 0.27.2 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 rollup: 4.47.1 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 22.17.1 + '@types/node': 24.3.0 fsevents: 2.3.3 - jiti: 2.6.1 + jiti: 2.5.1 lightningcss: 1.30.2 terser: 5.43.1 tsx: 4.20.4 yaml: 2.8.1 + optional: true - vitefu@1.1.1(vite@7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)): + vitefu@1.1.1(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)): optionalDependencies: - vite: 7.1.5(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + vite: 7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) vitest@3.2.4(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@18.17.0)(jiti@2.6.1)(lightningcss@1.30.2)(msw@2.10.4(@types/node@18.17.0)(typescript@5.5.4))(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: @@ -29741,11 +27767,11 @@ snapshots: - tsx - yaml - vitest@3.2.4(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@20.19.27)(jiti@2.6.1): + vitest@3.2.4(@edge-runtime/vm@5.0.0)(@types/debug@4.1.12)(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(msw@2.10.4(@types/node@24.3.0)(typescript@5.9.2))(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.1.5(@types/node@20.19.27)(jiti@2.6.1)) + '@vitest/mocker': 3.2.4(msw@2.10.4(@types/node@24.3.0)(typescript@5.9.2))(vite@7.1.5(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -29763,13 +27789,13 @@ snapshots: tinyglobby: 0.2.14 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.1.5(@types/node@20.19.27)(jiti@2.6.1) - vite-node: 3.2.4(@types/node@20.19.27)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + vite: 7.1.5(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) + vite-node: 3.2.4(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@edge-runtime/vm': 5.0.0 '@types/debug': 4.1.12 - '@types/node': 20.19.27 + '@types/node': 24.3.0 transitivePeerDependencies: - jiti - less @@ -29783,6 +27809,7 @@ snapshots: - terser - tsx - yaml + optional: true walker@1.0.8: dependencies: @@ -29807,14 +27834,6 @@ snapshots: web-streams-polyfill@3.3.3: {} - webcrypto-core@1.8.1: - dependencies: - '@peculiar/asn1-schema': 2.4.0 - '@peculiar/json-schema': 1.1.12 - asn1js: 3.0.6 - pvtsutils: 1.3.6 - tslib: 2.8.1 - webidl-conversions@3.0.1: {} webidl-conversions@4.0.2: {} @@ -29823,7 +27842,7 @@ snapshots: webpack-virtual-modules@0.6.2: {} - webpack@5.101.1(@swc/core@1.15.5): + webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.8 @@ -29847,16 +27866,15 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.2 tapable: 2.2.2 - terser-webpack-plugin: 5.3.14(@swc/core@1.15.5)(webpack@5.101.1(@swc/core@1.15.5)) + terser-webpack-plugin: 5.3.14(@swc/core@1.15.5)(esbuild@0.25.9)(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9)) watchpack: 2.4.4 webpack-sources: 3.3.3 transitivePeerDependencies: - '@swc/core' - esbuild - uglify-js - optional: true - webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9): + webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.8 @@ -29880,13 +27898,14 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.2 tapable: 2.2.2 - terser-webpack-plugin: 5.3.14(@swc/core@1.15.5)(esbuild@0.25.9)(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9)) + terser-webpack-plugin: 5.3.14(@swc/core@1.15.5)(esbuild@0.27.2)(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2)) watchpack: 2.4.4 webpack-sources: 3.3.3 transitivePeerDependencies: - '@swc/core' - esbuild - uglify-js + optional: true well-known-symbols@2.0.0: {} @@ -29950,18 +27969,10 @@ snapshots: gopd: 1.2.0 has-tostringtag: 1.0.2 - which@1.3.1: - dependencies: - isexe: 2.0.0 - which@2.0.2: dependencies: isexe: 2.0.0 - which@4.0.0: - dependencies: - isexe: 3.1.1 - which@5.0.0: dependencies: isexe: 3.1.1 @@ -29971,10 +27982,6 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 - widest-line@4.0.1: - dependencies: - string-width: 5.1.2 - widest-line@5.0.0: dependencies: string-width: 7.2.0 @@ -30143,6 +28150,16 @@ snapshots: y18n: 4.0.3 yargs-parser: 13.1.2 + yargs@16.2.0: + dependencies: + cliui: 7.0.4 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + yargs@17.7.2: dependencies: cliui: 8.0.1 @@ -30197,6 +28214,10 @@ snapshots: dependencies: zod: 3.25.76 + zod-validation-error@4.0.2(zod@4.1.5): + dependencies: + zod: 4.1.5 + zod@3.25.76: {} zod@4.0.17: {} diff --git a/typegen/genUtils/TypeGenerator.ts b/typegen/genUtils/TypeGenerator.ts index bda018d9..2f9908af 100644 --- a/typegen/genUtils/TypeGenerator.ts +++ b/typegen/genUtils/TypeGenerator.ts @@ -275,11 +275,13 @@ ${imports} return { BillingInterval: ['month', 'quarter', 'semi_annual', 'year'], ResetInterval: ['one_off', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'], + RolloverExpiryDurationType: ['one_off', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'], UsageModel: ['prepaid', 'pay_per_use'], OnIncrease: ['prorate', 'charge_immediately'], OnDecrease: ['prorate', 'refund_immediately', 'no_action'], FreeTrialDuration: ['day', 'month', 'year'], ApiFeatureType: ['static', 'boolean', 'single_use', 'continuous_use', 'credit_system'], + FeatureType: ['boolean', 'metered', 'credit_system'], }; } diff --git a/typegen/genUtils/atmnTypeHelpers.ts b/typegen/genUtils/atmnTypeHelpers.ts index 68184b68..50210ff8 100644 --- a/typegen/genUtils/atmnTypeHelpers.ts +++ b/typegen/genUtils/atmnTypeHelpers.ts @@ -159,11 +159,11 @@ export function generatePlanFeatureDiscriminatedUnion( defaultDescription: "Reference to the feature being configured", }, { - name: "granted", + name: "included", type: "number", optional: true, - descriptionKey: "granted", - defaultDescription: "Amount of usage granted to customers", + descriptionKey: "included", + defaultDescription: "Amount of usage included in this plan", }, { name: "unlimited", @@ -647,3 +647,61 @@ export function generatePlanTypeWithJSDoc( return result; } + +/** + * Generate Feature discriminated union type + * - boolean features cannot have consumable: true + * - metered features require consumable field + * - credit_system features are always consumable + */ +export function generateFeatureDiscriminatedUnion(): string { + return ` +// Base fields shared by all feature types +type FeatureBase = { + /** Unique identifier for the feature */ + id: string; + /** Display name for the feature */ + name: string; + /** Event names that trigger this feature */ + event_names?: string[]; + /** Credit schema for credit_system features */ + credit_schema?: Array<{ + metered_feature_id: string; + credit_cost: number; + }>; +}; + +/** Boolean feature - no consumable field allowed */ +export type BooleanFeature = FeatureBase & { + type: "boolean"; + consumable?: never; +}; + +/** Metered feature - requires consumable field */ +export type MeteredFeature = FeatureBase & { + type: "metered"; + /** Whether usage is consumed (true) or accumulated (false) */ + consumable: boolean; +}; + +/** Credit system feature - always consumable */ +export type CreditSystemFeature = FeatureBase & { + type: "credit_system"; + /** Credit systems are always consumable */ + consumable?: true; + /** Required: defines how credits map to metered features */ + credit_schema: Array<{ + metered_feature_id: string; + credit_cost: number; + }>; +}; + +/** + * Feature definition with type-safe constraints: + * - Boolean features cannot have consumable + * - Metered features require consumable (true = single_use style, false = continuous_use style) + * - Credit system features are always consumable and require credit_schema + */ +export type Feature = BooleanFeature | MeteredFeature | CreditSystemFeature; +`; +} diff --git a/typegen/generate-atmn-types.ts b/typegen/generate-atmn-types.ts index 47a1e9ed..de827fbc 100644 --- a/typegen/generate-atmn-types.ts +++ b/typegen/generate-atmn-types.ts @@ -5,7 +5,7 @@ import dotenv from "dotenv"; import { writeFileSync } from "fs"; import { TypeGenerator, TypeGeneratorUtils, generateBuilderFunctionsFile, extractZodSchema } from "./genUtils/index.js"; import { getAtmnTypeConfigs } from "./typeConfigs.js"; -import { generatePlanFeatureDiscriminatedUnion, generatePlanTypeWithJSDoc } from "./genUtils/atmnTypeHelpers.js"; +import { generatePlanFeatureDiscriminatedUnion, generatePlanTypeWithJSDoc, generateFeatureDiscriminatedUnion } from "./genUtils/atmnTypeHelpers.js"; /** * Generate snake_case types for atmn CLI from @autumn/shared @@ -71,7 +71,21 @@ async function main() { const newContent = existingContent + "\n" + planFeatureUnion + "\n" + planType + "\n"; fs.writeFileSync(planModelsFile, newContent); - console.log(` 📝 Added discriminated unions with JSDoc`); + console.log(` 📝 Added Plan discriminated unions with JSDoc`); + } + + // Add Feature discriminated union + const featureConfig = typeConfig.configs.find(c => c.targetName === "Feature"); + if (featureConfig) { + const featureModelsFile = path.join(atmnPath, "source/compose/models/featureModels.ts"); + const featureUnion = generateFeatureDiscriminatedUnion(); + + const fs = await import("fs"); + const existingContent = fs.readFileSync(featureModelsFile, "utf-8"); + const newContent = existingContent + "\n" + featureUnion + "\n"; + fs.writeFileSync(featureModelsFile, newContent); + + console.log(` 📝 Added Feature discriminated unions with JSDoc`); } // Generate builder functions (plan(), feature(), planFeature()) diff --git a/typegen/typeConfigs.ts b/typegen/typeConfigs.ts index 9692eb8f..aee2c39a 100644 --- a/typegen/typeConfigs.ts +++ b/typegen/typeConfigs.ts @@ -515,7 +515,7 @@ export function getAtmnTypeConfigs( "api/products/planFeature/planFeatureOpModels.ts", ); const apiPlanFile = path.join(serverPath, "api/products/apiPlan.ts"); - const apiFeatureFile = path.join(serverPath, "api/features/apiFeature.ts"); + const apiFeatureFile = path.join(serverPath, "api/features/apiFeatureV1.ts"); // Target directories in atmn const modelsDir = path.join(atmnPath, "source/compose/models"); @@ -566,6 +566,9 @@ export function getAtmnTypeConfigs( replaceEnumsWithStrings: true, omitFields: [], extendFields: {}, + renameFields: { + granted_balance: "included", + }, skipTypeExport: true, // Don't export type - we'll add discriminated union manually }, @@ -573,20 +576,16 @@ export function getAtmnTypeConfigs( // FEATURE (reusable feature definitions) // ================== { - sourceName: "ApiFeatureSchema", + sourceName: "ApiFeatureV1Schema", targetName: "Feature", sourceFile: apiFeatureFile, targetFile: path.join(modelsDir, "featureModels.ts"), sourceType: "zod", keepCase: true, - omitFields: ["type", "display"], - extendFields: { - type: { - zodType: "z.string()", - description: - "The type of the feature (boolean, single_use, continuous_use, credit_system)", - }, - }, + replaceEnumsWithStrings: true, + omitFields: ["display", "archived", "consumable", "type"], + extendFields: {}, + skipTypeExport: true, // We'll add discriminated union manually }, // ================== @@ -633,10 +632,10 @@ export function getAtmnTypeConfigs( * name: 'Pro Plan', * description: 'For growing teams', * features: [ - * planFeature({ feature_id: seats.id, granted: 10 }), + * planFeature({ feature_id: seats.id, included: 10 }), * planFeature({ * feature_id: messages.id, - * granted: 1000, + * included: 1000, * reset: { interval: 'month' } * }) * ], @@ -656,10 +655,21 @@ export function getAtmnTypeConfigs( * @returns Feature object for use in autumn.config.ts * * @example + * // Metered consumable feature (like API calls, tokens) + * export const apiCalls = feature({ + * id: 'api_calls', + * name: 'API Calls', + * type: 'metered', + * consumable: true + * }); + * + * @example + * // Metered non-consumable feature (like seats) * export const seats = feature({ * id: 'seats', * name: 'Team Seats', - * type: 'continuous_use' + * type: 'metered', + * consumable: false * }); */`, }, @@ -678,7 +688,7 @@ export function getAtmnTypeConfigs( * // Simple included usage * planFeature({ * feature_id: messages.id, - * granted: 1000, + * included: 1000, * reset: { interval: 'month' } * }) * @@ -686,7 +696,7 @@ export function getAtmnTypeConfigs( * // Priced feature with tiers * planFeature({ * feature_id: seats.id, - * granted: 5, + * included: 5, * price: { * tiers: [ * { to: 10, amount: 10 }, From 0a3296821a40b1e9ff0e37bdf0f3363bf22e3045 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Tue, 13 Jan 2026 09:47:03 +0000 Subject: [PATCH 18/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20atmn=20v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmn/package.json | 6 +- atmn/readme.md | 4 +- atmn/source/cli.ts | 17 +- atmn/source/commands/nuke.ts | 78 +-- .../compose/builders/builderFunctions.ts | 6 +- atmn/source/compose/models/planModels.ts | 175 +------ atmn/source/constants.ts | 4 +- atmn/source/core/builders/featureBuilder.ts | 48 +- atmn/source/core/builders/planBuilder.ts | 97 ++-- atmn/source/core/pull.ts | 16 +- atmn/source/core/push.ts | 72 ++- atmn/source/core/requests/orgRequests.ts | 8 + atmn/test/env.test.ts | 13 +- atmn/test/nuke/basic1.test.ts | 18 +- atmn/test/workflow/roundtrip.test.ts | 18 +- typegen/genUtils/TypeGenerator.ts | 3 +- typegen/genUtils/atmnTypeHelpers.ts | 462 +++++------------- typegen/genUtils/index.ts | 2 +- typegen/generate-atmn-types.ts | 4 +- typegen/typeConfigs.ts | 6 +- 20 files changed, 426 insertions(+), 631 deletions(-) diff --git a/atmn/package.json b/atmn/package.json index 99b36771..b32f901f 100644 --- a/atmn/package.json +++ b/atmn/package.json @@ -1,8 +1,10 @@ { "name": "atmn", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "license": "MIT", - "bin": "dist/cli.js", + "bin": { + "atmn": "dist/cli.js" + }, "main": "dist/index.js", "types": "dist/index.d.ts", "type": "module", diff --git a/atmn/readme.md b/atmn/readme.md index 608a16f8..b4ad834a 100644 --- a/atmn/readme.md +++ b/atmn/readme.md @@ -69,7 +69,7 @@ export const pro = plan({ name: 'Pro', description: 'Professional plan for growing teams', add_on: false, - default: false, + auto_enable: false, price: { amount: 50, interval: 'month', @@ -89,7 +89,7 @@ export const pro = plan({ price: { amount: 10, interval: 'month', - usage_model: 'pay_per_use', + billing_method: 'pay_per_use', billing_units: 1, }, }), diff --git a/atmn/source/cli.ts b/atmn/source/cli.ts index 8e19dbb8..21fb31ca 100644 --- a/atmn/source/cli.ts +++ b/atmn/source/cli.ts @@ -9,7 +9,8 @@ import Pull from './commands/pull.js'; import Push from './commands/push.js'; import {DEFAULT_CONFIG, FRONTEND_URL} from './constants.js'; import {loadAutumnConfigFile, writeConfig} from './core/config.js'; -import {isSandboxKey, readFromEnv} from './core/utils.js'; +import {getOrgMe} from './core/requests/orgRequests.js'; +import {readFromEnv} from './core/utils.js'; declare const VERSION: string; @@ -24,10 +25,18 @@ program.option('-l, --local', 'Use local autumn environment'); program .command('env') - .description('Check the environment of your API key') + .description('Check the environment and organization info') .action(async () => { - const env = await isSandboxKey(readFromEnv() ?? ''); - console.log(chalk.green(`Environment: ${env ? 'Sandbox' : 'Production'}`)); + // Ensure API key is present + readFromEnv(); + + // Fetch organization info from API + const orgInfo = await getOrgMe(); + + const envDisplay = orgInfo.env === 'sandbox' ? 'Sandbox' : 'Production'; + console.log(chalk.green(`Organization: ${orgInfo.name}`)); + console.log(chalk.green(`Slug: ${orgInfo.slug}`)); + console.log(chalk.green(`Environment: ${envDisplay}`)); }); program diff --git a/atmn/source/commands/nuke.ts b/atmn/source/commands/nuke.ts index f8f0e274..081da3e8 100644 --- a/atmn/source/commands/nuke.ts +++ b/atmn/source/commands/nuke.ts @@ -1,56 +1,56 @@ -import fs from 'node:fs'; -import {confirm} from '@inquirer/prompts'; -import chalk from 'chalk'; -import {nukeCustomers, nukeFeatures, nukePlans} from '../core/nuke.js'; -import {getAllPlans, getCustomers, getFeatures} from '../core/pull.js'; -import {initSpinner, isSandboxKey, readFromEnv} from '../core/utils.js'; -import {getOrg} from '../core/requests/orgRequests.js'; -import {Feature} from '../compose/models/featureModels.js'; +import fs from "node:fs"; +import { confirm } from "@inquirer/prompts"; +import chalk from "chalk"; +import type { Feature } from "../compose/models/featureModels.js"; +import { nukeCustomers, nukeFeatures, nukePlans } from "../core/nuke.js"; +import { getAllPlans, getCustomers, getFeatures } from "../core/pull.js"; +import { getOrg } from "../core/requests/orgRequests.js"; +import { initSpinner, isSandboxKey, readFromEnv } from "../core/utils.js"; async function promptAndConfirmNuke(orgName: string): Promise { - console.log('\n' + chalk.bgRed.white.bold(' DANGER: SANDBOX NUKE ')); + console.log("\n" + chalk.bgRed.white.bold(" DANGER: SANDBOX NUKE ")); console.log( chalk.red( `This is irreversible. You are about to permanently delete all data from the organization ` + - chalk.redBright.bold(orgName) + - `\n\n` + - `Items to be deleted:` + - `\n • ` + - chalk.yellowBright('customers') + - `\n • ` + - chalk.yellowBright('features') + - `\n • ` + - chalk.yellowBright('plans') + - `\n`, + chalk.redBright.bold(orgName) + + `\n\n` + + `Items to be deleted:` + + `\n • ` + + chalk.yellowBright("customers") + + `\n • ` + + chalk.yellowBright("features") + + `\n • ` + + chalk.yellowBright("plans") + + `\n`, ), ); + const backupConfirm = await confirm({ + message: `Would you like to backup your ${chalk.magentaBright.bold("autumn.config.ts")} file before proceeding? (Recommended)`, + default: true, + }); + const shouldProceed = await confirm({ - message: `Confirm to continue. This will delete ${chalk.redBright.bold('all')} your ${chalk.redBright.bold('plans')}, ${chalk.redBright.bold('features')} and ${chalk.redBright.bold('customers')} from your sandbox environment. You will confirm twice.`, + message: `Confirm to continue. This will delete ${chalk.redBright.bold("all")} your ${chalk.redBright.bold("plans")}, ${chalk.redBright.bold("features")} and ${chalk.redBright.bold("customers")} from your sandbox environment. You will confirm twice.`, default: false, }); if (!shouldProceed) { - console.log(chalk.red('Aborting...')); + console.log(chalk.red("Aborting...")); process.exit(1); } const finalConfirm = await confirm({ message: - 'Final confirmation: Are you absolutely sure? This action is irreversible.', + "Final confirmation: Are you absolutely sure? This action is irreversible.", default: false, }); if (!finalConfirm) { - console.log(chalk.red('Aborting...')); + console.log(chalk.red("Aborting...")); process.exit(1); } - const backupConfirm = await confirm({ - message: `Would you like to backup your ${chalk.magentaBright.bold('autumn.config.ts')} file before proceeding? (Recommended)`, - default: true, - }); - return backupConfirm; } @@ -63,25 +63,25 @@ export default async function Nuke() { const backupConfirm = await promptAndConfirmNuke(org.name); if (backupConfirm) { - fs.copyFileSync('autumn.config.ts', 'autumn.config.ts.backup'); - console.log(chalk.green('Backup created successfully!')); + fs.copyFileSync("autumn.config.ts", "autumn.config.ts.backup"); + console.log(chalk.green("Backup created successfully!")); } - console.log(chalk.red('Nuking sandbox...')); + console.log(chalk.red("Nuking sandbox...")); const s = initSpinner( - `Preparing ${chalk.yellowBright('customers')}, ${chalk.yellowBright('features')} and ${chalk.yellowBright('plans')} for deletion...`, + `Preparing ${chalk.yellowBright("customers")}, ${chalk.yellowBright("features")} and ${chalk.yellowBright("plans")} for deletion...`, ); - const plans = await getAllPlans({archived: true}); + const plans = await getAllPlans({ archived: true }); const features = await getFeatures(); const customers = await getCustomers(); s.success( - `Loaded all ${chalk.yellowBright('customers')}, ${chalk.yellowBright('features')} and ${chalk.yellowBright('plans')} for deletion`, + `Loaded all ${chalk.yellowBright("customers")}, ${chalk.yellowBright("features")} and ${chalk.yellowBright("plans")} for deletion`, ); features.sort((a: Feature, b: Feature) => { - if (a.type === 'credit_system') { + if (a.type === "credit_system") { return -1; } return 1; @@ -89,15 +89,15 @@ export default async function Nuke() { try { await nukeCustomers(customers); - await nukePlans(plans.map((plan: {id: string}) => plan.id)); - await nukeFeatures(features.map((feature: {id: string}) => feature.id)); + await nukePlans(plans.map((plan: { id: string }) => plan.id)); + await nukeFeatures(features.map((feature: { id: string }) => feature.id)); } catch (e: unknown) { - console.error(chalk.red('Failed to nuke sandbox:')); + console.error(chalk.red("Failed to nuke sandbox:")); console.error(e); process.exit(1); } - console.log(chalk.green('Sandbox nuked successfully!')); + console.log(chalk.green("Sandbox nuked successfully!")); } else { console.log(chalk.red`You can't nuke a prod environment!`); process.exit(1); diff --git a/atmn/source/compose/builders/builderFunctions.ts b/atmn/source/compose/builders/builderFunctions.ts index b8728417..a3928cd1 100644 --- a/atmn/source/compose/builders/builderFunctions.ts +++ b/atmn/source/compose/builders/builderFunctions.ts @@ -5,7 +5,7 @@ import type { Plan, PlanFeature, FreeTrial } from "../models/planModels.js"; import type { Feature } from "../models/featureModels.js"; -type PlanInput = Omit & Partial>; +type PlanInput = Omit & Partial>; /** * Define a pricing plan in your Autumn configuration @@ -34,7 +34,7 @@ export const plan = (params: PlanInput): Plan => { ...params, description: params.description ?? null, add_on: params.add_on ?? false, - default: params.default ?? false, + auto_enable: params.auto_enable ?? false, group: params.group ?? "" }; }; @@ -92,7 +92,7 @@ export const feature = (params: Feature): Feature => { * { to: 'inf', amount: 8 } * ], * interval: 'month', - * usage_model: 'pay_per_use' + * billing_method: 'pay_per_use' * } * }) */ diff --git a/atmn/source/compose/models/planModels.ts b/atmn/source/compose/models/planModels.ts index f24ab4a5..bec027aa 100644 --- a/atmn/source/compose/models/planModels.ts +++ b/atmn/source/compose/models/planModels.ts @@ -81,7 +81,7 @@ export const PlanSchema = z.object({ // Type aliases for literal unions export type ResetInterval = "one_off" | "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year"; export type BillingInterval = "month" | "quarter" | "semi_annual" | "year"; -export type UsageModel = "prepaid" | "pay_per_use"; +export type BillingMethod = "prepaid" | "pay_per_use"; export type OnIncrease = "prorate" | "charge_immediately"; export type OnDecrease = "prorate" | "refund_immediately" | "no_action"; @@ -89,9 +89,9 @@ export type OnDecrease = "prorate" | "refund_immediately" | "no_action"; type PlanFeatureBase = z.infer; /** - * Reset with interval (price cannot have interval) + * Plan feature configuration with flattened reset fields. Use interval/interval_count at top level. */ -export type PlanFeatureWithReset = { +export type PlanFeature = { /** Reference to the feature being configured */ feature_id: string; @@ -101,152 +101,16 @@ export type PlanFeatureWithReset = { /** Whether usage is unlimited */ unlimited?: boolean; - /** Reset configuration for metered features */ - reset: { - /** How often usage resets */ - interval: ResetInterval; + /** How often usage resets (e.g., 'month', 'day') */ + interval?: ResetInterval; - /** Number of intervals between resets */ - interval_count?: number; + /** Number of intervals between resets (default: 1) */ + interval_count?: number; - /** Whether to reset usage when feature is enabled */ - when_enabled?: boolean; } - - /** Pricing configuration (interval not allowed when using reset.interval) */ - price?: { - /** Flat price per unit in cents */ - amount?: number; - - /** Tiered pricing structure based on usage ranges */ - tiers?: Array<{ to: number | "inf"; amount: number }>; - - /** Cannot be used with reset.interval */ - interval?: never; - - /** Cannot be used with reset.interval */ - interval_count?: never; - - /** Number of units per billing cycle */ - billing_units?: number; - - /** Billing model: 'prepaid' or 'pay_per_use' */ - usage_model?: UsageModel; - - /** Maximum purchasable quantity */ - max_purchase?: number; } - - /** Proration rules for quantity changes */ - proration?: { - /** Behavior when quantity increases */ - on_increase: OnIncrease; - - /** Behavior when quantity decreases */ - on_decrease: OnDecrease; } - - /** Rollover policy for unused usage */ - rollover?: { - /** Maximum amount that can roll over */ - max: number; - - /** How long rollover lasts before expiring */ - expiry_duration_type: ResetInterval; - - /** Duration length for rollover expiry */ - expiry_duration_length?: number; } -}; - -/** - * Price with interval (reset cannot have interval) - */ -export type PlanFeatureWithPrice = { - /** Reference to the feature being configured */ - feature_id: string; - - /** Amount of usage included in this plan */ - included?: number; - - /** Whether usage is unlimited */ - unlimited?: boolean; - - /** Reset configuration (interval not allowed when using price.interval) */ - reset?: { - /** Cannot be used with price.interval */ - interval?: never; - - /** Cannot be used with price.interval */ - interval_count?: never; - - /** Whether to reset usage when feature is enabled */ - when_enabled?: boolean; } + /** Whether to carry over existing usage when feature is enabled (default: true) */ + carry_over_usage?: boolean; /** Pricing configuration for usage-based billing */ - price: { - /** Flat price per unit in cents */ - amount?: number; - - /** Tiered pricing structure based on usage ranges */ - tiers?: Array<{ to: number | "inf"; amount: number }>; - - /** Billing frequency (cannot be used with reset.interval) */ - interval: BillingInterval; - - /** Number of intervals between billing */ - interval_count?: number; - - /** Number of units per billing cycle */ - billing_units?: number; - - /** Billing model: 'prepaid' or 'pay_per_use' */ - usage_model: UsageModel; - - /** Maximum purchasable quantity */ - max_purchase?: number; } - - /** Proration rules for quantity changes */ - proration?: { - /** Behavior when quantity increases */ - on_increase: OnIncrease; - - /** Behavior when quantity decreases */ - on_decrease: OnDecrease; } - - /** Rollover policy for unused usage */ - rollover?: { - /** Maximum amount that can roll over */ - max: number; - - /** How long rollover lasts before expiring */ - expiry_duration_type: ResetInterval; - - /** Duration length for rollover expiry */ - expiry_duration_length?: number; } -}; - -/** - * Neither has interval - */ -export type PlanFeatureBasic = { - /** Reference to the feature being configured */ - feature_id: string; - - /** Amount of usage included in this plan */ - included?: number; - - /** Whether usage is unlimited */ - unlimited?: boolean; - - /** Reset configuration (no interval) */ - reset?: { - /** Not allowed in this variant */ - interval?: never; - - /** Not allowed in this variant */ - interval_count?: never; - - /** Whether to reset usage when feature is enabled */ - when_enabled?: boolean; } - - /** Pricing configuration (no interval) */ price?: { /** Flat price per unit in cents */ amount?: number; @@ -254,17 +118,11 @@ export type PlanFeatureBasic = { /** Tiered pricing structure based on usage ranges */ tiers?: Array<{ to: number | "inf"; amount: number }>; - /** Not allowed in this variant */ - interval?: never; - - /** Not allowed in this variant */ - interval_count?: never; - /** Number of units per billing cycle */ billing_units?: number; - /** Billing model: 'prepaid' or 'pay_per_use' */ - usage_model?: UsageModel; + /** Billing method: 'prepaid' or 'pay_per_use' */ + billing_method?: BillingMethod; /** Maximum purchasable quantity */ max_purchase?: number; } @@ -289,11 +147,6 @@ export type PlanFeatureBasic = { expiry_duration_length?: number; } }; -/** - * Plan feature configuration with compile-time mutual exclusivity validation. Use reset.interval OR price.interval, but not both. - */ -export type PlanFeature = PlanFeatureWithReset | PlanFeatureWithPrice | PlanFeatureBasic; - // Override Plan type to use PlanFeature discriminated union type PlanBase = z.infer; @@ -315,8 +168,8 @@ export type Plan = { /** Whether this plan can be purchased alongside other plans */ add_on?: boolean; - /** Whether this is the default plan for new customers */ - default?: boolean; + /** Whether to automatically enable this plan for new customers */ + auto_enable?: boolean; /** Base price for the plan */ price?: { @@ -324,7 +177,7 @@ export type Plan = { amount: number; /** Billing frequency */ - interval: BillingInterval; } + interval: BillingInterval | ResetInterval; } /** Features included with usage limits and pricing */ features?: PlanFeature[]; diff --git a/atmn/source/constants.ts b/atmn/source/constants.ts index ba1200d0..7ba4b7e8 100644 --- a/atmn/source/constants.ts +++ b/atmn/source/constants.ts @@ -26,7 +26,7 @@ export const pro = plan({ name: 'Pro', description: 'Professional plan for growing teams', add_on: false, - default: false, + auto_enable: false, price: { amount: 50, interval: 'month', @@ -46,7 +46,7 @@ export const pro = plan({ price: { amount: 10, interval: 'month', - usage_model: 'pay_per_use', + billing_method: 'pay_per_use', billing_units: 1, }, }), diff --git a/atmn/source/core/builders/featureBuilder.ts b/atmn/source/core/builders/featureBuilder.ts index e45aab14..4628e562 100644 --- a/atmn/source/core/builders/featureBuilder.ts +++ b/atmn/source/core/builders/featureBuilder.ts @@ -1,7 +1,19 @@ -import {Feature} from '../../compose/index.js'; import {idToVar, notNullish} from '../utils.js'; -const creditSchemaBuilder = (feature: Feature) => { +// API feature type (what comes from the server) +type ApiFeatureType = 'boolean' | 'single_use' | 'continuous_use' | 'credit_system' | 'static'; + +type ApiFeature = { + id: string; + name?: string | null; + type: ApiFeatureType; + credit_schema?: Array<{ + metered_feature_id: string; + credit_cost: number; + }>; +}; + +const creditSchemaBuilder = (feature: ApiFeature) => { if (feature.type === 'credit_system' && feature.credit_schema) { let creditSchema = feature.credit_schema || []; return ` @@ -19,14 +31,42 @@ const creditSchemaBuilder = (feature: Feature) => { return ''; }; -export function featureBuilder(feature: Feature) { +/** + * Maps API feature type to SDK type and consumable field + * - API 'boolean' -> SDK type: 'boolean' (no consumable) + * - API 'single_use' -> SDK type: 'metered', consumable: true + * - API 'continuous_use' -> SDK type: 'metered', consumable: false + * - API 'credit_system' -> SDK type: 'credit_system' (no consumable needed) + */ +function getTypeAndConsumable(apiType: ApiFeatureType): {type: string; consumable?: boolean} { + switch (apiType) { + case 'single_use': + return {type: 'metered', consumable: true}; + case 'continuous_use': + return {type: 'metered', consumable: false}; + case 'boolean': + return {type: 'boolean'}; + case 'credit_system': + return {type: 'credit_system'}; + case 'static': + return {type: 'boolean'}; // static maps to boolean in SDK + default: + return {type: apiType}; + } +} + +export function featureBuilder(feature: ApiFeature) { const nameStr = notNullish(feature.name) ? `\n name: '${feature.name}',` : ''; const creditSchemaStr = creditSchemaBuilder(feature); + const {type, consumable} = getTypeAndConsumable(feature.type); + + // Build consumable string only for metered features + const consumableStr = consumable !== undefined ? `\n consumable: ${consumable},` : ''; const snippet = ` export const ${idToVar({id: feature.id, prefix: 'feature'})} = feature({ id: '${feature.id}',${nameStr} - type: '${feature.type}',${creditSchemaStr} + type: '${type}',${consumableStr}${creditSchemaStr} })`; return snippet; } diff --git a/atmn/source/core/builders/planBuilder.ts b/atmn/source/core/builders/planBuilder.ts index 44e7d574..9794df14 100644 --- a/atmn/source/core/builders/planBuilder.ts +++ b/atmn/source/core/builders/planBuilder.ts @@ -1,4 +1,4 @@ -import {Plan, PlanFeature, Feature} from '../../compose/index.js'; +import {Plan, Feature} from '../../compose/index.js'; import {idToVar, notNullish, nullish} from '../utils.js'; export function importBuilder() { @@ -30,8 +30,9 @@ export function planBuilder({ plan: Plan; features: Feature[]; }) { + // Plan from API has nested reset structure, cast to ApiPlanFeature for builder const planFeaturesStr = plan.features - ?.map((pf: PlanFeature) => planFeatureBuilder({planFeature: pf, features})) + ?.map((pf: any) => planFeatureBuilder({planFeature: pf as ApiPlanFeature, features})) .join(',\n ') || ''; const priceStr = plan.price @@ -50,8 +51,8 @@ export function planBuilder({ ? `\n add_on: true,` : ''; - const defaultStr = plan.default === true - ? `\n default: true,` + const autoEnableStr = plan.default === true + ? `\n auto_enable: true,` : ''; const freeTrialStr = plan.free_trial && plan.free_trial !== null @@ -61,7 +62,7 @@ export function planBuilder({ const snippet = ` export const ${idToVar({id: plan.id, prefix: 'plan'})} = plan({ id: '${plan.id}', - name: '${plan.name}',${descriptionStr}${groupStr}${addOnStr}${defaultStr}${priceStr} + name: '${plan.name}',${descriptionStr}${groupStr}${addOnStr}${autoEnableStr}${priceStr} features: [ ${planFeaturesStr} ],${freeTrialStr} @@ -85,13 +86,42 @@ export const getFeatureIdStr = ({ return `${idToVar({id: featureId, prefix: 'feature'})}.id`; }; -// Plan Feature Builder +// API PlanFeature type (what comes from server - has nested reset object) +type ApiPlanFeature = { + feature_id: string; + granted_balance?: number; + unlimited?: boolean; + reset?: { + interval?: string; + interval_count?: number; + reset_when_enabled?: boolean; + }; + price?: { + amount?: number; + tiers?: Array<{ to: number | 'inf'; amount: number }>; + interval?: string; + interval_count?: number; + billing_units?: number; + usage_model?: string; + max_purchase?: number; + }; + proration?: { + on_increase?: string; + on_decrease?: string; + }; + rollover?: { + max?: number; + expiry_duration_type?: string; + expiry_duration_length?: number; + }; +}; +// Plan Feature Builder - transforms API response to SDK format (flattened) function planFeatureBuilder({ planFeature, features, }: { - planFeature: PlanFeature; + planFeature: ApiPlanFeature; features: Feature[]; }) { const featureIdStr = getFeatureIdStr({ @@ -101,9 +131,9 @@ function planFeatureBuilder({ let parts: string[] = [`feature_id: ${featureIdStr}`]; - // Granted usage (only if has a value) - if (notNullish(planFeature.granted) && planFeature.granted > 0) { - parts.push(`granted: ${planFeature.granted}`); + // Included usage (API: granted_balance -> SDK: included) + if (notNullish(planFeature.granted_balance) && planFeature.granted_balance > 0) { + parts.push(`included: ${planFeature.granted_balance}`); } // Unlimited (only if true) @@ -111,27 +141,25 @@ function planFeatureBuilder({ parts.push(`unlimited: true`); } - // Reset configuration (only if has meaningful fields) - if (planFeature.reset) { - const resetParts: string[] = []; - if (planFeature.reset.interval) { - resetParts.push(`interval: '${planFeature.reset.interval}'`); - } - if (notNullish(planFeature.reset.interval_count) && planFeature.reset.interval_count !== 1) { - resetParts.push(`interval_count: ${planFeature.reset.interval_count}`); - } - if (planFeature.reset.when_enabled === true) { - resetParts.push(`when_enabled: true`); - } - if (planFeature.reset.when_enabled === false) { - resetParts.push(`when_enabled: false`); - } - if (resetParts.length > 0) { - parts.push(`reset: { ${resetParts.join(', ')} }`); - } + // Flattened reset fields (API: reset.interval -> SDK: interval at top level) + if (planFeature.reset?.interval) { + parts.push(`interval: '${planFeature.reset.interval}'`); + } + if (notNullish(planFeature.reset?.interval_count) && planFeature.reset!.interval_count !== 1) { + parts.push(`interval_count: ${planFeature.reset!.interval_count}`); + } + // API: reset_when_enabled (true = reset on enable) -> SDK: carry_over_usage (true = keep existing) + // They are inverted: reset_when_enabled=false means carry_over_usage=true (default) + // Only output if explicitly false (meaning carry_over_usage=true, which is non-default behavior) + if (planFeature.reset?.reset_when_enabled === false) { + parts.push(`carry_over_usage: true`); + } else if (planFeature.reset?.reset_when_enabled === true) { + // reset_when_enabled=true is the default, so carry_over_usage=false + // Only output if we want to be explicit + parts.push(`carry_over_usage: false`); } - // Price configuration (only if has meaningful fields) + // Price configuration (NO interval/interval_count - they don't exist in SDK price) if (planFeature.price) { const priceParts: string[] = []; @@ -146,20 +174,15 @@ function planFeatureBuilder({ priceParts.push(`tiers: [${tiersStr}]`); } - if (planFeature.price.interval) { - priceParts.push(`interval: '${planFeature.price.interval}'`); - } - - if (notNullish(planFeature.price.interval_count) && planFeature.price.interval_count !== 1) { - priceParts.push(`interval_count: ${planFeature.price.interval_count}`); - } + // Note: price.interval and price.interval_count are NOT in SDK - they come from top-level interval if (notNullish(planFeature.price.billing_units) && planFeature.price.billing_units !== 1) { priceParts.push(`billing_units: ${planFeature.price.billing_units}`); } + // API: usage_model -> SDK: billing_method if (planFeature.price.usage_model) { - priceParts.push(`usage_model: '${planFeature.price.usage_model}'`); + priceParts.push(`billing_method: '${planFeature.price.usage_model}'`); } if (notNullish(planFeature.price.max_purchase)) { diff --git a/atmn/source/core/pull.ts b/atmn/source/core/pull.ts index d8d23a8d..387981be 100644 --- a/atmn/source/core/pull.ts +++ b/atmn/source/core/pull.ts @@ -1,5 +1,4 @@ import chalk from 'chalk'; -import type {Feature} from '../compose/models/featureModels.js'; import type {Plan} from '../compose/models/planModels.js'; import {externalRequest} from './api.js'; @@ -56,14 +55,25 @@ export async function getAllPlanVariants() { return allPlans; } -export async function getFeatures(params?: {includeArchived?: boolean}) { +// API feature type (what comes from the server) +export type ApiFeature = { + id: string; + name?: string | null; + type: 'boolean' | 'single_use' | 'continuous_use' | 'credit_system' | 'static'; + credit_schema?: Array<{ + metered_feature_id: string; + credit_cost: number; + }>; +}; + +export async function getFeatures(params?: {includeArchived?: boolean}): Promise { const {list} = await externalRequest({ method: 'GET', path: '/features', queryParams: {include_archived: params?.includeArchived ? true : false}, }); - return list.map((feature: Feature) => feature as Feature); + return list as ApiFeature[]; } const MAX_RECURSION_LIMIT = 500; diff --git a/atmn/source/core/push.ts b/atmn/source/core/push.ts index dfb9c3ad..9819f208 100644 --- a/atmn/source/core/push.ts +++ b/atmn/source/core/push.ts @@ -110,19 +110,83 @@ export async function checkPlanForConfirmation({ /** * Transform plan data for API submission. - * Maps SDK field names to API field names (e.g., 'included' -> 'granted_balance') + * Maps SDK field names to API field names: + * - 'auto_enable' -> 'default' + * - 'included' -> 'granted_balance' + * - 'billing_method' -> 'usage_model' + * - Flattened interval/interval_count/carry_over_usage -> nested reset object */ function transformPlanForApi(plan: Plan): Record { const transformed = { ...plan } as Record; - // Transform features array: 'included' -> 'granted_balance' + // 'auto_enable' -> 'default' + if ('auto_enable' in plan) { + transformed.default = plan.auto_enable; + delete transformed.auto_enable; + } + + // Transform features array if (plan.features && Array.isArray(plan.features)) { transformed.features = plan.features.map(feature => { const transformedFeature = { ...feature } as Record; + + // 'included' -> 'granted_balance' if ('included' in feature && feature.included !== undefined) { transformedFeature.granted_balance = feature.included; delete transformedFeature.included; } + + // Transform flattened reset fields to nested reset object + // SDK: interval, interval_count, carry_over_usage -> API: reset.interval, reset.interval_count, reset.reset_when_enabled + const featureAny = feature as Record; + if ('interval' in featureAny || 'interval_count' in featureAny || 'carry_over_usage' in featureAny) { + const reset: Record = {}; + + if ('interval' in featureAny && featureAny.interval !== undefined) { + reset.interval = featureAny.interval; + delete transformedFeature.interval; + } + + if ('interval_count' in featureAny && featureAny.interval_count !== undefined) { + reset.interval_count = featureAny.interval_count; + delete transformedFeature.interval_count; + } + + // SDK: carry_over_usage (true = keep existing) -> API: reset_when_enabled (true = reset on enable) + // They are inverted + if ('carry_over_usage' in featureAny && featureAny.carry_over_usage !== undefined) { + reset.reset_when_enabled = !featureAny.carry_over_usage; + delete transformedFeature.carry_over_usage; + } + + if (Object.keys(reset).length > 0) { + transformedFeature.reset = reset; + } + } + + // Transform nested price object: 'billing_method' -> 'usage_model' + // Also add interval/interval_count to price from reset if price exists + if ('price' in feature && feature.price && typeof feature.price === 'object') { + const price = feature.price as Record; + const transformedPrice = { ...price }; + + if ('billing_method' in price) { + transformedPrice.usage_model = price.billing_method; + delete transformedPrice.billing_method; + } + + // If we have a reset interval and a price, copy interval to price for API + const resetObj = transformedFeature.reset as Record | undefined; + if (resetObj?.interval) { + transformedPrice.interval = resetObj.interval; + if (resetObj.interval_count) { + transformedPrice.interval_count = resetObj.interval_count; + } + } + + transformedFeature.price = transformedPrice; + } + return transformedFeature; }); } @@ -179,8 +243,8 @@ export async function upsertPlan({ updatePayload['add_on'] = false; } - // If local plan has undefined is_default but upstream is true, explicitly set to false - if (plan.default === undefined && curPlan.default === true) { + // If local plan has undefined auto_enable but upstream default is true, explicitly set to false + if (plan.auto_enable === undefined && curPlan.default === true) { updatePayload['default'] = false; } diff --git a/atmn/source/core/requests/orgRequests.ts b/atmn/source/core/requests/orgRequests.ts index 83f4957a..c05f920d 100644 --- a/atmn/source/core/requests/orgRequests.ts +++ b/atmn/source/core/requests/orgRequests.ts @@ -7,3 +7,11 @@ export const getOrg = async () => { }); return response; }; + +export const getOrgMe = async (): Promise<{ name: string; slug: string; env: string }> => { + const response = await externalRequest({ + method: "GET", + path: "/organization/me", + }); + return response; +}; diff --git a/atmn/test/env.test.ts b/atmn/test/env.test.ts index c69564f8..7355380c 100644 --- a/atmn/test/env.test.ts +++ b/atmn/test/env.test.ts @@ -10,7 +10,7 @@ describe('env command', () => { await cleanup(); }); - test('shows environment type', async () => { + test('shows organization info and environment', async () => { const instance = await render('node', [QUOTED_CLI_PATH, 'env'], { spawnOpts, }); @@ -19,10 +19,19 @@ describe('env command', () => { await waitFor(() => { const exit = instance.hasExit(); expect(exit).toBeTruthy(); + expect(exit?.exitCode).toBe(0); }, { timeout: 10000 }); - // Should show either Sandbox or Production const stdout = instance.stdoutArr.map(s => s.contents.toString()).join(''); + + // Should show organization name + expect(stdout).toMatch(/Organization:/i); + + // Should show organization slug + expect(stdout).toMatch(/Slug:/i); + + // Should show environment (Sandbox or Production) expect(stdout).toMatch(/Environment:/i); + expect(stdout).toMatch(/Sandbox|Production/i); }); }); diff --git a/atmn/test/nuke/basic1.test.ts b/atmn/test/nuke/basic1.test.ts index a19761b5..eb8cef56 100644 --- a/atmn/test/nuke/basic1.test.ts +++ b/atmn/test/nuke/basic1.test.ts @@ -41,6 +41,15 @@ describe('nuke command', () => { spawnOpts, }); + // Wait for backup prompt (comes first now) then answer + await waitFor(() => { + const stdout = instance.stdoutArr.map(s => s.contents.toString()).join(''); + expect(stdout).toMatch(/backup/i); + }, { timeout: 10000 }); + + // Skip backup (n + Enter) + await instance.userEvent.keyboard('n[Enter]'); + // Wait for first confirmation prompt then answer await waitFor(() => { const stdout = instance.stdoutArr.map(s => s.contents.toString()).join(''); @@ -59,15 +68,6 @@ describe('nuke command', () => { // Confirm final prompt (y + Enter) await instance.userEvent.keyboard('y[Enter]'); - // Wait for backup prompt then answer - await waitFor(() => { - const stdout = instance.stdoutArr.map(s => s.contents.toString()).join(''); - expect(stdout).toMatch(/backup/i); - }, { timeout: 10000 }); - - // Skip backup (n + Enter) - await instance.userEvent.keyboard('n[Enter]'); - // Wait for process to exit await waitFor(() => { const exit = instance.hasExit(); diff --git a/atmn/test/workflow/roundtrip.test.ts b/atmn/test/workflow/roundtrip.test.ts index d2bf830f..974c3000 100644 --- a/atmn/test/workflow/roundtrip.test.ts +++ b/atmn/test/workflow/roundtrip.test.ts @@ -39,30 +39,30 @@ describe('full workflow', () => { spawnOpts, }); - // Wait for first confirmation prompt then answer + // Wait for backup prompt (comes first now) then answer await waitFor(() => { const stdout = nukeInstance.stdoutArr.map(s => s.contents.toString()).join(''); - expect(stdout).toMatch(/confirm to continue/i); + expect(stdout).toMatch(/backup/i); }, { timeout: 10000 }); - await nukeInstance.userEvent.keyboard('y[Enter]'); + // Skip backup (n + Enter) + await nukeInstance.userEvent.keyboard('n[Enter]'); - // Wait for final confirmation prompt then answer + // Wait for first confirmation prompt then answer await waitFor(() => { const stdout = nukeInstance.stdoutArr.map(s => s.contents.toString()).join(''); - expect(stdout).toMatch(/final confirmation/i); + expect(stdout).toMatch(/confirm to continue/i); }, { timeout: 10000 }); await nukeInstance.userEvent.keyboard('y[Enter]'); - // Wait for backup prompt then answer + // Wait for final confirmation prompt then answer await waitFor(() => { const stdout = nukeInstance.stdoutArr.map(s => s.contents.toString()).join(''); - expect(stdout).toMatch(/backup/i); + expect(stdout).toMatch(/final confirmation/i); }, { timeout: 10000 }); - // Skip backup (n + Enter) - await nukeInstance.userEvent.keyboard('n[Enter]'); + await nukeInstance.userEvent.keyboard('y[Enter]'); // Wait for nuke to complete await waitFor(() => { diff --git a/typegen/genUtils/TypeGenerator.ts b/typegen/genUtils/TypeGenerator.ts index 2f9908af..e4c531d3 100644 --- a/typegen/genUtils/TypeGenerator.ts +++ b/typegen/genUtils/TypeGenerator.ts @@ -276,7 +276,8 @@ ${imports} BillingInterval: ['month', 'quarter', 'semi_annual', 'year'], ResetInterval: ['one_off', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'], RolloverExpiryDurationType: ['one_off', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'], - UsageModel: ['prepaid', 'pay_per_use'], + UsageModel: ['prepaid', 'pay_per_use'], // Legacy - maps to BillingMethod in SDK + BillingMethod: ['prepaid', 'pay_per_use'], OnIncrease: ['prorate', 'charge_immediately'], OnDecrease: ['prorate', 'refund_immediately', 'no_action'], FreeTrialDuration: ['day', 'month', 'year'], diff --git a/typegen/genUtils/atmnTypeHelpers.ts b/typegen/genUtils/atmnTypeHelpers.ts index 50210ff8..e7537c4b 100644 --- a/typegen/genUtils/atmnTypeHelpers.ts +++ b/typegen/genUtils/atmnTypeHelpers.ts @@ -136,44 +136,25 @@ export function generateDiscriminatedUnion({ } /** - * Generate PlanFeature discriminated union (using generic helpers) + * Generate simplified PlanFeature type (no discriminated union needed) + * + * SDK structure (flattened): + * - interval, interval_count at top level (from reset.interval, reset.interval_count) + * - carry_over_usage at top level (inverted from reset.reset_when_enabled) + * - price has NO interval/interval_count fields */ -export function generatePlanFeatureDiscriminatedUnion( +export function generatePlanFeatureType( metaDescriptions: Record, ): string { const typeAliases = { ResetInterval: '"one_off" | "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year"', BillingInterval: '"month" | "quarter" | "semi_annual" | "year"', - UsageModel: '"prepaid" | "pay_per_use"', + BillingMethod: '"prepaid" | "pay_per_use"', OnIncrease: '"prorate" | "charge_immediately"', OnDecrease: '"prorate" | "refund_immediately" | "no_action"', }; - // Common fields for all variants - const commonFields: FieldConfig[] = [ - { - name: "feature_id", - type: "string", - descriptionKey: "feature_id", - defaultDescription: "Reference to the feature being configured", - }, - { - name: "included", - type: "number", - optional: true, - descriptionKey: "included", - defaultDescription: "Amount of usage included in this plan", - }, - { - name: "unlimited", - type: "boolean", - optional: true, - descriptionKey: "unlimited", - defaultDescription: "Whether usage is unlimited", - }, - ]; - const prorationFields: FieldConfig[] = [ { name: "on_increase", @@ -211,338 +192,131 @@ export function generatePlanFeatureDiscriminatedUnion( }, ]; - const variants: DiscriminatedVariantConfig[] = [ - // Variant 1: With reset interval + const planFeatureFields: FieldConfig[] = [ { - name: "PlanFeatureWithReset", - description: "Reset with interval (price cannot have interval)", - fields: [ - ...commonFields, - { - name: "reset", - type: "object", - defaultDescription: "Reset configuration for metered features", - nestedFields: [ - { - name: "interval", - type: "ResetInterval", - descriptionKey: "reset.interval", - defaultDescription: "How often usage resets", - }, - { - name: "interval_count", - type: "number", - optional: true, - descriptionKey: "reset.interval_count", - defaultDescription: "Number of intervals between resets", - }, - { - name: "when_enabled", - type: "boolean", - optional: true, - descriptionKey: "reset.when_enabled", - defaultDescription: - "Whether to reset usage when feature is enabled", - }, - ], - }, - { - name: "price", - type: "object", - optional: true, - defaultDescription: - "Pricing configuration (interval not allowed when using reset.interval)", - nestedFields: [ - { - name: "amount", - type: "number", - optional: true, - descriptionKey: "price.amount", - defaultDescription: "Flat price per unit in cents", - }, - { - name: "tiers", - type: 'Array<{ to: number | "inf"; amount: number }>', - optional: true, - descriptionKey: "price.tiers", - defaultDescription: - "Tiered pricing structure based on usage ranges", - }, - { - name: "interval", - type: "never", - optional: true, - defaultDescription: "Cannot be used with reset.interval", - }, - { - name: "interval_count", - type: "never", - optional: true, - defaultDescription: "Cannot be used with reset.interval", - }, - { - name: "billing_units", - type: "number", - optional: true, - descriptionKey: "price.billing_units", - defaultDescription: "Number of units per billing cycle", - }, - { - name: "usage_model", - type: "UsageModel", - optional: true, - descriptionKey: "price.usage_model", - defaultDescription: "Billing model: 'prepaid' or 'pay_per_use'", - }, - { - name: "max_purchase", - type: "number", - optional: true, - descriptionKey: "price.max_purchase", - defaultDescription: "Maximum purchasable quantity", - }, - ], - }, - { - name: "proration", - type: "object", - optional: true, - defaultDescription: "Proration rules for quantity changes", - nestedFields: prorationFields, - }, - { - name: "rollover", - type: "object", - optional: true, - defaultDescription: "Rollover policy for unused usage", - nestedFields: rolloverFields, - }, - ], + name: "feature_id", + type: "string", + descriptionKey: "feature_id", + defaultDescription: "Reference to the feature being configured", }, - // Variant 2: With price interval { - name: "PlanFeatureWithPrice", - description: "Price with interval (reset cannot have interval)", - fields: [ - ...commonFields, - { - name: "reset", - type: "object", - optional: true, - defaultDescription: - "Reset configuration (interval not allowed when using price.interval)", - nestedFields: [ - { - name: "interval", - type: "never", - optional: true, - defaultDescription: "Cannot be used with price.interval", - }, - { - name: "interval_count", - type: "never", - optional: true, - defaultDescription: "Cannot be used with price.interval", - }, - { - name: "when_enabled", - type: "boolean", - optional: true, - descriptionKey: "reset.when_enabled", - defaultDescription: - "Whether to reset usage when feature is enabled", - }, - ], - }, - { - name: "price", - type: "object", - defaultDescription: "Pricing configuration for usage-based billing", - nestedFields: [ - { - name: "amount", - type: "number", - optional: true, - descriptionKey: "price.amount", - defaultDescription: "Flat price per unit in cents", - }, - { - name: "tiers", - type: 'Array<{ to: number | "inf"; amount: number }>', - optional: true, - descriptionKey: "price.tiers", - defaultDescription: - "Tiered pricing structure based on usage ranges", - }, - { - name: "interval", - type: "BillingInterval", - descriptionKey: "price.interval", - defaultDescription: - "Billing frequency (cannot be used with reset.interval)", - }, - { - name: "interval_count", - type: "number", - optional: true, - descriptionKey: "price.interval_count", - defaultDescription: "Number of intervals between billing", - }, - { - name: "billing_units", - type: "number", - optional: true, - descriptionKey: "price.billing_units", - defaultDescription: "Number of units per billing cycle", - }, - { - name: "usage_model", - type: "UsageModel", - descriptionKey: "price.usage_model", - defaultDescription: "Billing model: 'prepaid' or 'pay_per_use'", - }, - { - name: "max_purchase", - type: "number", - optional: true, - descriptionKey: "price.max_purchase", - defaultDescription: "Maximum purchasable quantity", - }, - ], - }, - { - name: "proration", - type: "object", - optional: true, - defaultDescription: "Proration rules for quantity changes", - nestedFields: prorationFields, - }, + name: "included", + type: "number", + optional: true, + descriptionKey: "included", + defaultDescription: "Amount of usage included in this plan", + }, + { + name: "unlimited", + type: "boolean", + optional: true, + descriptionKey: "unlimited", + defaultDescription: "Whether usage is unlimited", + }, + // Flattened reset fields + { + name: "interval", + type: "ResetInterval", + optional: true, + descriptionKey: "interval", + defaultDescription: "How often usage resets (e.g., 'month', 'day')", + }, + { + name: "interval_count", + type: "number", + optional: true, + descriptionKey: "interval_count", + defaultDescription: "Number of intervals between resets (default: 1)", + }, + { + name: "carry_over_usage", + type: "boolean", + optional: true, + descriptionKey: "carry_over_usage", + defaultDescription: "Whether to carry over existing usage when feature is enabled (default: true)", + }, + // Price object (no interval/interval_count) + { + name: "price", + type: "object", + optional: true, + defaultDescription: "Pricing configuration for usage-based billing", + nestedFields: [ { - name: "rollover", - type: "object", + name: "amount", + type: "number", optional: true, - defaultDescription: "Rollover policy for unused usage", - nestedFields: rolloverFields, + descriptionKey: "price.amount", + defaultDescription: "Flat price per unit in cents", }, - ], - }, - // Variant 3: Basic (neither has interval) - { - name: "PlanFeatureBasic", - description: "Neither has interval", - fields: [ - ...commonFields, { - name: "reset", - type: "object", + name: "tiers", + type: 'Array<{ to: number | "inf"; amount: number }>', optional: true, - defaultDescription: "Reset configuration (no interval)", - nestedFields: [ - { - name: "interval", - type: "never", - optional: true, - defaultDescription: "Not allowed in this variant", - }, - { - name: "interval_count", - type: "never", - optional: true, - defaultDescription: "Not allowed in this variant", - }, - { - name: "when_enabled", - type: "boolean", - optional: true, - descriptionKey: "reset.when_enabled", - defaultDescription: - "Whether to reset usage when feature is enabled", - }, - ], + descriptionKey: "price.tiers", + defaultDescription: "Tiered pricing structure based on usage ranges", }, { - name: "price", - type: "object", + name: "billing_units", + type: "number", optional: true, - defaultDescription: "Pricing configuration (no interval)", - nestedFields: [ - { - name: "amount", - type: "number", - optional: true, - descriptionKey: "price.amount", - defaultDescription: "Flat price per unit in cents", - }, - { - name: "tiers", - type: 'Array<{ to: number | "inf"; amount: number }>', - optional: true, - descriptionKey: "price.tiers", - defaultDescription: - "Tiered pricing structure based on usage ranges", - }, - { - name: "interval", - type: "never", - optional: true, - defaultDescription: "Not allowed in this variant", - }, - { - name: "interval_count", - type: "never", - optional: true, - defaultDescription: "Not allowed in this variant", - }, - { - name: "billing_units", - type: "number", - optional: true, - descriptionKey: "price.billing_units", - defaultDescription: "Number of units per billing cycle", - }, - { - name: "usage_model", - type: "UsageModel", - optional: true, - descriptionKey: "price.usage_model", - defaultDescription: "Billing model: 'prepaid' or 'pay_per_use'", - }, - { - name: "max_purchase", - type: "number", - optional: true, - descriptionKey: "price.max_purchase", - defaultDescription: "Maximum purchasable quantity", - }, - ], + descriptionKey: "price.billing_units", + defaultDescription: "Number of units per billing cycle", }, { - name: "proration", - type: "object", + name: "billing_method", + type: "BillingMethod", optional: true, - defaultDescription: "Proration rules for quantity changes", - nestedFields: prorationFields, + descriptionKey: "price.billing_method", + defaultDescription: "Billing method: 'prepaid' or 'pay_per_use'", }, { - name: "rollover", - type: "object", + name: "max_purchase", + type: "number", optional: true, - defaultDescription: "Rollover policy for unused usage", - nestedFields: rolloverFields, + descriptionKey: "price.max_purchase", + defaultDescription: "Maximum purchasable quantity", }, ], }, + { + name: "proration", + type: "object", + optional: true, + defaultDescription: "Proration rules for quantity changes", + nestedFields: prorationFields, + }, + { + name: "rollover", + type: "object", + optional: true, + defaultDescription: "Rollover policy for unused usage", + nestedFields: rolloverFields, + }, ]; - return generateDiscriminatedUnion({ - baseTypeName: "PlanFeature", - unionTypeName: "PlanFeature", - variants, + let result = ""; + + // Add type aliases + result += "// Type aliases for literal unions\n"; + for (const [name, union] of Object.entries(typeAliases)) { + result += `export type ${name} = ${union};\n`; + } + result += "\n"; + + // Add base type reference + result += "// Base type for PlanFeature\n"; + result += "type PlanFeatureBase = z.infer;\n\n"; + + // Generate the single PlanFeature type + result += generateTypeWithJSDoc({ + typeName: "PlanFeature", + fields: planFeatureFields, metaDescriptions, - typeAliases, - comment: - "Plan feature configuration with compile-time mutual exclusivity validation. Use reset.interval OR price.interval, but not both.", + comment: "Plan feature configuration with flattened reset fields. Use interval/interval_count at top level.", }); + + return result; } /** @@ -596,11 +370,11 @@ export function generatePlanTypeWithJSDoc( "Whether this plan can be purchased alongside other plans", }, { - name: "default", + name: "auto_enable", type: "boolean", optional: true, - descriptionKey: "default", - defaultDescription: "Whether this is the default plan for new customers", + descriptionKey: "auto_enable", + defaultDescription: "Whether to automatically enable this plan for new customers", }, { name: "price", @@ -615,12 +389,12 @@ export function generatePlanTypeWithJSDoc( descriptionKey: "price.amount", defaultDescription: "Price in your currency (e.g., 50 for $50.00)", }, - { - name: "interval", - type: "BillingInterval", - descriptionKey: "price.interval", - defaultDescription: "Billing frequency", - }, + { + name: "interval", + type: "BillingInterval | ResetInterval", + descriptionKey: "price.interval", + defaultDescription: "Billing frequency", + }, ], }, { diff --git a/typegen/genUtils/index.ts b/typegen/genUtils/index.ts index 861550da..e21b6423 100644 --- a/typegen/genUtils/index.ts +++ b/typegen/genUtils/index.ts @@ -23,7 +23,7 @@ export { type BuilderConfig, } from "./BuilderGenerator.js"; export { - generatePlanFeatureDiscriminatedUnion, + generatePlanFeatureType, generatePlanTypeWithJSDoc, generateTypeWithJSDoc, generateDiscriminatedUnion, diff --git a/typegen/generate-atmn-types.ts b/typegen/generate-atmn-types.ts index de827fbc..0305247d 100644 --- a/typegen/generate-atmn-types.ts +++ b/typegen/generate-atmn-types.ts @@ -5,7 +5,7 @@ import dotenv from "dotenv"; import { writeFileSync } from "fs"; import { TypeGenerator, TypeGeneratorUtils, generateBuilderFunctionsFile, extractZodSchema } from "./genUtils/index.js"; import { getAtmnTypeConfigs } from "./typeConfigs.js"; -import { generatePlanFeatureDiscriminatedUnion, generatePlanTypeWithJSDoc, generateFeatureDiscriminatedUnion } from "./genUtils/atmnTypeHelpers.js"; +import { generatePlanFeatureType, generatePlanTypeWithJSDoc, generateFeatureDiscriminatedUnion } from "./genUtils/atmnTypeHelpers.js"; /** * Generate snake_case types for atmn CLI from @autumn/shared @@ -62,7 +62,7 @@ async function main() { // Generate manual type unions with JSDoc const planModelsFile = path.join(atmnPath, "source/compose/models/planModels.ts"); - const planFeatureUnion = generatePlanFeatureDiscriminatedUnion(planFeatureMeta); + const planFeatureUnion = generatePlanFeatureType(planFeatureMeta); const planType = generatePlanTypeWithJSDoc(planMeta); // Read existing content and append diff --git a/typegen/typeConfigs.ts b/typegen/typeConfigs.ts index aee2c39a..89f7cefe 100644 --- a/typegen/typeConfigs.ts +++ b/typegen/typeConfigs.ts @@ -568,6 +568,8 @@ export function getAtmnTypeConfigs( extendFields: {}, renameFields: { granted_balance: "included", + // Note: usage_model -> billing_method is handled in atmnTypeHelpers.ts + // for the discriminated union types, and in push.ts for API transformation }, skipTypeExport: true, // Don't export type - we'll add discriminated union manually }, @@ -617,7 +619,7 @@ export function getAtmnTypeConfigs( defaults: { description: null, add_on: false, - default: false, + auto_enable: false, group: "", }, jsdocOverride: `/** @@ -703,7 +705,7 @@ export function getAtmnTypeConfigs( * { to: 'inf', amount: 8 } * ], * interval: 'month', - * usage_model: 'pay_per_use' + * billing_method: 'pay_per_use' * } * }) */`, From e9bdf4915fb53c8a154752c72c59d9cc85abc202 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Wed, 14 Jan 2026 09:54:20 +0000 Subject: [PATCH 19/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20oauht=20proto=20v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmn/AGENTS.md | 87 +++++++++ atmn/source/cli.ts | 2 +- atmn/source/commands/auth.ts | 81 --------- atmn/source/commands/init.ts | 2 +- atmn/source/core/utils.ts | 26 +-- atmn/src/commands/auth/command.ts | 70 +++++++ atmn/src/commands/auth/constants.ts | 21 +++ atmn/src/commands/auth/oauth.ts | 239 ++++++++++++++++++++++++ atmn/src/views/html/oauth-callback.ts | 251 ++++++++++++++++++++++++++ atmn/tsconfig.json | 2 +- 10 files changed, 685 insertions(+), 96 deletions(-) create mode 100644 atmn/AGENTS.md delete mode 100644 atmn/source/commands/auth.ts create mode 100644 atmn/src/commands/auth/command.ts create mode 100644 atmn/src/commands/auth/constants.ts create mode 100644 atmn/src/commands/auth/oauth.ts create mode 100644 atmn/src/views/html/oauth-callback.ts diff --git a/atmn/AGENTS.md b/atmn/AGENTS.md new file mode 100644 index 00000000..274b7bc9 --- /dev/null +++ b/atmn/AGENTS.md @@ -0,0 +1,87 @@ +# ATMN CLI - Code Conventions + +## Directory Structure + +The CLI has two source directories: + +- **`source/`** - Legacy code (commands, core logic, compose builders) +- **`src/`** - New code following improved architecture + +New features should be added to `src/`. Existing features in `source/` will be migrated incrementally. + +``` +atmn/ +├── source/ # Legacy code +│ ├── cli.ts # Main entry point +│ ├── constants.ts # BACKEND_URL, FRONTEND_URL, DEFAULT_CONFIG +│ ├── index.ts # Package exports +│ ├── commands/ # CLI commands (pull, push, nuke, init) +│ ├── core/ # Business logic, API requests, utilities +│ └── compose/ # DSL builders for plans/features +│ +├── src/ # New architecture +│ ├── commands/ # Command modules (each command in its own folder) +│ │ └── auth/ # Auth command +│ │ ├── command.ts # Main command export +│ │ ├── oauth.ts # OAuth flow logic +│ │ └── constants.ts # Command-specific constants +│ └── views/ # UI templates +│ └── html/ # HTML templates for browser callbacks +│ └── oauth-callback.ts +│ +├── test/ # Tests +└── dist/ # Build output +``` + +## Architecture Conventions + +### Commands (`src/commands//`) + +Each command should have its own folder with: +- `command.ts` - The main command function (default export) +- `constants.ts` - Command-specific constants +- Additional files for supporting logic (e.g., `oauth.ts` for auth) + +### Views (`src/views/`) + +UI templates organized by type: +- `html/` - HTML templates (for browser callbacks, etc.) +- `react/` - React/Ink components (future) + +### Shared Utilities + +Currently in `source/core/utils.ts`. These will be migrated to `src/utils/` as needed: +- `env.ts` - Environment variable helpers (`readFromEnv`, `storeToEnv`) +- `spinner.ts` - CLI spinner (`initSpinner`) +- `string.ts` - String utilities + +## Import Conventions + +- Use `.js` extensions in imports (required for ESM) +- Import shared constants from `source/constants.js` (until migrated) +- Import utilities from `source/core/utils.js` (until migrated) + +## OAuth Flow + +The auth command uses OAuth 2.1 PKCE: +1. Local HTTP server starts on port `31448` (or next available up to `31452`) +2. Browser opens to backend authorize URL with PKCE challenge +3. User authenticates and selects organization +4. Callback received with authorization code +5. Code exchanged for access token +6. Access token used to create API keys via `/cli/api-keys` endpoint +7. Keys saved to `.env` file + +Key constants: +- `CLI_CLIENT_ID`: `qncNuaPFAEBwzCypjFopNCGPHQDqkchp` +- `OAUTH_PORTS`: `31448-31452` (5 ports, tries each in sequence if previous is in use) + +## Build + +```bash +npm run build # Build with tsup +npm run dev # Watch mode +npm run test # Run tests +``` + +Entry points are in `source/` but tsup follows imports to include `src/` files. diff --git a/atmn/source/cli.ts b/atmn/source/cli.ts index 21fb31ca..3114bfe1 100644 --- a/atmn/source/cli.ts +++ b/atmn/source/cli.ts @@ -2,7 +2,7 @@ import chalk from 'chalk'; import {program} from 'commander'; import open from 'open'; -import AuthCommand from './commands/auth.js'; +import AuthCommand from '../src/commands/auth/command.js'; import Init from './commands/init.js'; import Nuke from './commands/nuke.js'; import Pull from './commands/pull.js'; diff --git a/atmn/source/commands/auth.ts b/atmn/source/commands/auth.ts deleted file mode 100644 index a094f37d..00000000 --- a/atmn/source/commands/auth.ts +++ /dev/null @@ -1,81 +0,0 @@ -import open from 'open'; -import chalk from 'chalk'; -import {input, password, confirm} from '@inquirer/prompts'; -import {storeToEnv, readFromEnv} from '../core/utils.js'; - -import {getOTP} from '../core/auth.js'; -import {updateCLIStripeKeys} from '../core/api.js'; -import {FRONTEND_URL} from '../constants.js'; - -const passwordTheme = { - style: { - answer: (text: string) => { - return chalk.magenta('*'.repeat(text.length)); - }, - }, -}; -const inputTheme = { - style: { - answer: (text: string) => { - return chalk.magenta(text); - }, - }, -}; - -export default async function AuthCommand() { - if (readFromEnv({bypass: true})) { - let shouldReauth = await confirm({ - message: - 'You are already authenticated. Would you like to re-authenticate?', - theme: inputTheme, - }); - if (!shouldReauth) return; - } - open(`${FRONTEND_URL}/dev/cli`); - - const otp = await input({ - message: 'Enter OTP:', - theme: inputTheme, - }); - - const keyInfo = await getOTP(otp); - - if (!keyInfo.stripe_connected) { - let connectStripe = await confirm({ - message: - "It seems like your organization doesn't have any Stripe keys connected. Would you like to connect your Stripe test secret key now?", - theme: inputTheme, - }); - if (connectStripe) { - // Ask for stripe Keys - let stripeTestKey = await password({ - message: 'Enter Stripe Test Secret Key:', - mask: '*', - theme: passwordTheme, - }); - await updateCLIStripeKeys({ - stripeSecretKey: stripeTestKey, - autumnSecretKey: keyInfo.sandboxKey, - }); - console.log( - chalk.green( - 'Stripe test secret key has been saved to your .env file. To connect your Stripe live secret key, please visit the Autumn dashboard here: https://app.useautumn.com/dev?tab=stripe', - ), - ); - } else { - console.log( - chalk.yellow( - "Okay, no worries. Go to the Autumn dashboard when you're ready!", - ), - ); - } - } - - await storeToEnv(keyInfo.prodKey, keyInfo.sandboxKey); - - console.log( - chalk.green( - 'Success! Sandbox and production keys have been saved to your .env file.\n`atmn` uses the AUTUMN_SECRET_KEY to authenticate with the Autumn API.', - ), - ); -} diff --git a/atmn/source/commands/init.ts b/atmn/source/commands/init.ts index c9a64581..aa2b92b7 100644 --- a/atmn/source/commands/init.ts +++ b/atmn/source/commands/init.ts @@ -1,6 +1,6 @@ import chalk from "chalk"; import { readFromEnv } from "../core/utils.js"; -import AuthCommand from "./auth.js"; +import AuthCommand from "../../src/commands/auth/command.js"; import Pull from "./pull.js"; export default async function Init() { diff --git a/atmn/source/core/utils.ts b/atmn/source/core/utils.ts index d35f6854..9199161c 100644 --- a/atmn/source/core/utils.ts +++ b/atmn/source/core/utils.ts @@ -57,24 +57,26 @@ async function upsertEnvVar( ) { const content = fs.readFileSync(filePath, "utf-8"); const lines = content.split("\n"); - let found = false; + let foundIndex = -1; + // Find the first occurrence of the variable for (let i = 0; i < lines.length; i++) { if (lines[i]?.startsWith(`${varName}=`)) { - const shouldOverwrite = await confirm({ - message: `${varName} already exists in .env. Overwrite?`, - default: false, - }); - if (shouldOverwrite) { - lines[i] = `${varName}=${newValue}`; - found = true; - break; - } + foundIndex = i; + break; } } - // If variable wasn't found, add it to the end - if (!found) { + if (foundIndex !== -1) { + const shouldOverwrite = await confirm({ + message: `${varName} already exists in .env. Overwrite?`, + default: false, + }); + if (shouldOverwrite) { + lines[foundIndex] = `${varName}=${newValue}`; + } + } else { + // Variable wasn't found, add it to the end lines.push(`${varName}=${newValue}`); } diff --git a/atmn/src/commands/auth/command.ts b/atmn/src/commands/auth/command.ts new file mode 100644 index 00000000..92626ab7 --- /dev/null +++ b/atmn/src/commands/auth/command.ts @@ -0,0 +1,70 @@ +import chalk from "chalk"; +import { confirm } from "@inquirer/prompts"; +import { storeToEnv, readFromEnv, initSpinner } from "../../../source/core/utils.js"; +import { startOAuthFlow, getApiKeysWithToken } from "./oauth.js"; +import { CLI_CLIENT_ID } from "./constants.js"; + +const inputTheme = { + style: { + answer: (text: string) => { + return chalk.magenta(text); + }, + }, +}; + +export default async function AuthCommand() { + if (readFromEnv({ bypass: true })) { + const shouldReauth = await confirm({ + message: + "You are already authenticated. Would you like to re-authenticate?", + theme: inputTheme, + }); + if (!shouldReauth) return; + } + + console.log(chalk.cyan("\nOpening browser for authentication...")); + console.log( + chalk.gray( + "Please sign in and select the organization you want to use.\n", + ), + ); + + const spinner = initSpinner("Waiting for authorization..."); + + try { + // Start OAuth flow - opens browser and waits for callback + const { tokens } = await startOAuthFlow(CLI_CLIENT_ID); + + spinner.text = "Creating API keys..."; + + // Use the access token to create API keys + const { sandboxKey, prodKey } = await getApiKeysWithToken( + tokens.access_token, + ); + + spinner.stop(); + + // Store keys to .env + await storeToEnv(prodKey, sandboxKey); + + console.log( + chalk.green( + "\nSuccess! Sandbox and production keys have been saved to your .env file.", + ), + ); + console.log( + chalk.gray( + "`atmn` uses the AUTUMN_SECRET_KEY to authenticate with the Autumn API.\n", + ), + ); + process.exit(0); + } catch (error) { + spinner.stop(); + if (error instanceof Error) { + console.error(chalk.red(`\nAuthentication failed: ${error.message}`)); + } else { + console.error(chalk.red("\nAuthentication failed. Please try again.")); + } + process.exit(1); + } +} diff --git a/atmn/src/commands/auth/constants.ts b/atmn/src/commands/auth/constants.ts new file mode 100644 index 00000000..826d7bb1 --- /dev/null +++ b/atmn/src/commands/auth/constants.ts @@ -0,0 +1,21 @@ +// OAuth constants for CLI authentication + +/** The OAuth client ID for the CLI (public client) */ +export const CLI_CLIENT_ID = "qncNuaPFAEBwzCypjFopNCGPHQDqkchp"; + +/** Base port for the local OAuth callback server */ +export const OAUTH_PORT_BASE = 31448; + +/** Number of ports to try if the base port is in use */ +export const OAUTH_PORT_RANGE = 5; + +/** All valid OAuth ports (31448-31452) */ +export const OAUTH_PORTS = Array.from( + { length: OAUTH_PORT_RANGE }, + (_, i) => OAUTH_PORT_BASE + i, +); + +/** Get OAuth redirect URI for a specific port */ +export function getOAuthRedirectUri(port: number): string { + return `http://localhost:${port}/`; +} diff --git a/atmn/src/commands/auth/oauth.ts b/atmn/src/commands/auth/oauth.ts new file mode 100644 index 00000000..a859e624 --- /dev/null +++ b/atmn/src/commands/auth/oauth.ts @@ -0,0 +1,239 @@ +import * as http from "node:http"; +import * as crypto from "node:crypto"; +import open from "open"; +import { BACKEND_URL } from "../../../source/constants.js"; +import { OAUTH_PORTS, getOAuthRedirectUri } from "./constants.js"; +import { getSuccessHtml, getErrorHtml } from "../../views/html/oauth-callback.js"; + +// Generate PKCE code verifier (43-128 chars, URL safe) +function generateCodeVerifier(): string { + const array = crypto.randomBytes(32); + return array + .toString("base64") + .replace(/\+/g, "-") + .replace(/\//g, "_") + .replace(/=/g, ""); +} + +// Generate PKCE code challenge from verifier (S256 method) +async function generateCodeChallenge(verifier: string): Promise { + const hash = crypto.createHash("sha256").update(verifier).digest(); + return hash + .toString("base64") + .replace(/\+/g, "-") + .replace(/\//g, "_") + .replace(/=/g, ""); +} + +export interface OAuthTokens { + access_token: string; + token_type: string; + expires_in?: number; + refresh_token?: string; + scope?: string; + id_token?: string; +} + +// Exchange authorization code for tokens +async function exchangeCodeForTokens( + code: string, + codeVerifier: string, + clientId: string, + redirectUri: string, +): Promise { + const params = new URLSearchParams({ + grant_type: "authorization_code", + code, + redirect_uri: redirectUri, + client_id: clientId, + code_verifier: codeVerifier, + }); + + const response = await fetch(`${BACKEND_URL}/api/auth/oauth2/token`, { + method: "POST", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + body: params.toString(), + }); + + if (!response.ok) { + const error = await response.json().catch(() => ({})); + throw new Error( + error.error_description || error.error || "Token exchange failed", + ); + } + + return response.json(); +} + +export interface OAuthResult { + tokens: OAuthTokens; + orgId?: string; +} + +/** Try to start a server on the given port, returns true if successful */ +function tryListenOnPort(server: http.Server, port: number): Promise { + return new Promise((resolve) => { + const onError = (err: NodeJS.ErrnoException) => { + if (err.code === "EADDRINUSE") { + resolve(false); + } else { + resolve(false); + } + }; + + server.once("error", onError); + server.listen(port, () => { + server.removeListener("error", onError); + resolve(true); + }); + }); +} + +// Symbol to indicate port was in use (not an error) +const PORT_IN_USE = Symbol("PORT_IN_USE"); + +/** Start OAuth flow and wait for callback */ +export async function startOAuthFlow(clientId: string): Promise { + const codeVerifier = generateCodeVerifier(); + const codeChallenge = await generateCodeChallenge(codeVerifier); + + // Try each port in sequence until one works + for (const port of OAUTH_PORTS) { + const result = await tryOAuthFlowOnPort( + clientId, + codeVerifier, + codeChallenge, + port, + ); + + if (result === PORT_IN_USE) { + // Try next port + continue; + } + + // Success or error (not port-in-use) + return result; + } + + // All ports failed + throw new Error( + `All OAuth ports (${OAUTH_PORTS[0]}-${OAUTH_PORTS[OAUTH_PORTS.length - 1]}) are in use. ` + + `Please close any other applications using these ports.`, + ); +} + +/** Try to run OAuth flow on a specific port */ +async function tryOAuthFlowOnPort( + clientId: string, + codeVerifier: string, + codeChallenge: string, + port: number, +): Promise { + const redirectUri = getOAuthRedirectUri(port); + + return new Promise((resolve, reject) => { + let timeoutId: ReturnType; + + // Create local server to receive callback + const server = http.createServer(async (req, res) => { + const url = new URL(req.url || "/", `http://localhost:${port}`); + + if (url.pathname === "/") { + const code = url.searchParams.get("code"); + const error = url.searchParams.get("error"); + const errorDescription = url.searchParams.get("error_description"); + + if (error) { + res.writeHead(200, { "Content-Type": "text/html" }); + res.end(getErrorHtml(errorDescription || error)); + clearTimeout(timeoutId); + server.close(); + reject(new Error(errorDescription || error)); + return; + } + + if (code) { + res.writeHead(200, { "Content-Type": "text/html" }); + res.end(getSuccessHtml()); + + clearTimeout(timeoutId); + server.close(); + + try { + const tokens = await exchangeCodeForTokens( + code, + codeVerifier, + clientId, + redirectUri, + ); + resolve({ tokens }); + } catch (err) { + reject(err); + } + return; + } + + res.writeHead(400, { "Content-Type": "text/plain" }); + res.end("Missing authorization code"); + } else { + res.writeHead(404, { "Content-Type": "text/plain" }); + res.end("Not found"); + } + }); + + // Try to listen on the port + tryListenOnPort(server, port).then((success) => { + if (!success) { + resolve(PORT_IN_USE); + return; + } + + // Server started, open browser + const params = new URLSearchParams({ + client_id: clientId, + response_type: "code", + redirect_uri: redirectUri, + scope: "openid profile email", + code_challenge: codeChallenge, + code_challenge_method: "S256", + prompt: "consent", + }); + + const authUrl = `${BACKEND_URL}/api/auth/oauth2/authorize?${params.toString()}`; + open(authUrl); + + // Timeout after 5 minutes + timeoutId = setTimeout(() => { + server.close(); + reject(new Error("Authorization timed out. Please try again.")); + }, 5 * 60 * 1000); + }); + }); +} + +/** Get or create API keys using the OAuth access token */ +export async function getApiKeysWithToken( + accessToken: string, +): Promise<{ sandboxKey: string; prodKey: string; orgId: string }> { + const response = await fetch(`${BACKEND_URL}/cli/api-keys`, { + method: "POST", + headers: { + Authorization: `Bearer ${accessToken}`, + "Content-Type": "application/json", + }, + }); + + if (!response.ok) { + const error = await response.json().catch(() => ({ error: "Unknown error" })); + throw new Error(error.error || "Failed to create API keys"); + } + + const data = await response.json(); + return { + sandboxKey: data.sandbox_key, + prodKey: data.prod_key, + orgId: data.org_id, + }; +} diff --git a/atmn/src/views/html/oauth-callback.ts b/atmn/src/views/html/oauth-callback.ts new file mode 100644 index 00000000..d67e9ff7 --- /dev/null +++ b/atmn/src/views/html/oauth-callback.ts @@ -0,0 +1,251 @@ +// HTML templates for OAuth callback pages + +/** Shared styles matching Autumn's theme with dark mode support */ +export const BASE_STYLES = ` + @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap'); + + * { + box-sizing: border-box; + margin: 0; + padding: 0; + } + + body { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; + min-height: 100vh; + display: flex; + align-items: center; + justify-content: center; + background: #fafaf9; + color: #121212; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + @media (prefers-color-scheme: dark) { + body { + background: #161616; + color: #ddd; + } + } + + .container { + text-align: center; + padding: 3rem 2rem; + max-width: 400px; + } + + .icon-container { + width: 64px; + height: 64px; + border-radius: 16px; + display: flex; + align-items: center; + justify-content: center; + margin: 0 auto 1.5rem; + } + + .icon-success { + background: linear-gradient(135deg, #f3e8ff 0%, #ede1ff 100%); + border: 2px solid #c4b5fd; + box-shadow: 0 2px 4px rgba(136, 56, 255, 0.15); + } + + @media (prefers-color-scheme: dark) { + .icon-success { + background: linear-gradient(135deg, #2d1f4e 0%, #3d2a5e 100%); + border: 2px solid #6b46c1; + } + } + + .icon-error { + background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); + border: 2px solid #fca5a5; + box-shadow: 0 2px 4px rgba(220, 38, 38, 0.15); + } + + @media (prefers-color-scheme: dark) { + .icon-error { + background: linear-gradient(135deg, #4a1a1a 0%, #5c2020 100%); + border: 2px solid #dc2626; + } + } + + .icon-success svg { + color: #8838ff; + } + + @media (prefers-color-scheme: dark) { + .icon-success svg { + color: #a855f7; + } + } + + .icon-error svg { + color: #dc2626; + } + + @media (prefers-color-scheme: dark) { + .icon-error svg { + color: #f87171; + } + } + + h1 { + font-size: 20px; + font-weight: 600; + margin-bottom: 0.5rem; + letter-spacing: -0.02em; + } + + .success h1 { + color: #121212; + } + + @media (prefers-color-scheme: dark) { + .success h1 { + color: #ddd; + } + } + + .error h1 { + color: #dc2626; + } + + @media (prefers-color-scheme: dark) { + .error h1 { + color: #f87171; + } + } + + .description { + font-size: 14px; + font-weight: 450; + color: #666; + line-height: 1.5; + margin-bottom: 1.5rem; + } + + @media (prefers-color-scheme: dark) { + .description { + color: #999; + } + } + + .hint { + font-size: 13px; + font-weight: 450; + color: #888; + padding: 0.75rem 1rem; + background: #f5f5f4; + border-radius: 8px; + border: 1px solid #e5e5e5; + } + + @media (prefers-color-scheme: dark) { + .hint { + color: #888; + background: #1d1d1d; + border: 1px solid #2c2c2c; + } + } + + .footer { + position: fixed; + bottom: 1.5rem; + left: 50%; + transform: translateX(-50%); + } + + .footer-card { + display: flex; + align-items: center; + gap: 8px; + font-size: 12px; + font-weight: 500; + color: #888; + padding: 0.5rem 0.75rem; + background: #f5f5f4; + border-radius: 6px; + border: 1px solid #e5e5e5; + } + + @media (prefers-color-scheme: dark) { + .footer-card { + color: #777; + background: #1d1d1d; + border: 1px solid #2c2c2c; + } + } +`; + +/** Generate success HTML page for OAuth callback */ +export function getSuccessHtml(): string { + return ` + + + + + Authorization Successful - Autumn + + + +
+
+ + + +
+

Authorization Successful

+

Your CLI has been authenticated successfully.

+

You can close this window and return to your terminal.

+
+ + +`; +} + +/** Generate error HTML page for OAuth callback */ +export function getErrorHtml(errorMessage: string): string { + // Escape HTML to prevent XSS + const safeMessage = errorMessage + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); + + return ` + + + + + Authorization Failed - Autumn + + + +
+
+ + + + +
+

Authorization Failed

+

${safeMessage}

+

Please close this window and try again in your terminal.

+
+ + +`; +} diff --git a/atmn/tsconfig.json b/atmn/tsconfig.json index 58adfc88..f4bfd40a 100644 --- a/atmn/tsconfig.json +++ b/atmn/tsconfig.json @@ -6,5 +6,5 @@ "noUnusedLocals": false, "noUnusedParameters": false }, - "include": ["source"] + "include": ["source", "src"] } From 2b4fb1bc38b2717a2a0729ce505fd90e7cf51d03 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Wed, 14 Jan 2026 14:01:50 +0000 Subject: [PATCH 20/35] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20move=20to=20ar?= =?UTF-8?q?tic=20for=20oauth?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmn/package.json | 1 + atmn/src/commands/auth/oauth.ts | 279 ++++++++++---------------------- pnpm-lock.yaml | 69 ++++++-- 3 files changed, 148 insertions(+), 201 deletions(-) diff --git a/atmn/package.json b/atmn/package.json index b32f901f..4ccd55c3 100644 --- a/atmn/package.json +++ b/atmn/package.json @@ -27,6 +27,7 @@ "dependencies": { "@inquirer/prompts": "^7.6.0", "@types/prettier": "^3.0.0", + "arctic": "^3.7.0", "axios": "^1.10.0", "chalk": "^5.2.0", "commander": "^14.0.0", diff --git a/atmn/src/commands/auth/oauth.ts b/atmn/src/commands/auth/oauth.ts index a859e624..1079b73d 100644 --- a/atmn/src/commands/auth/oauth.ts +++ b/atmn/src/commands/auth/oauth.ts @@ -1,216 +1,120 @@ import * as http from "node:http"; -import * as crypto from "node:crypto"; +import * as arctic from "arctic"; import open from "open"; import { BACKEND_URL } from "../../../source/constants.js"; import { OAUTH_PORTS, getOAuthRedirectUri } from "./constants.js"; import { getSuccessHtml, getErrorHtml } from "../../views/html/oauth-callback.js"; -// Generate PKCE code verifier (43-128 chars, URL safe) -function generateCodeVerifier(): string { - const array = crypto.randomBytes(32); - return array - .toString("base64") - .replace(/\+/g, "-") - .replace(/\//g, "_") - .replace(/=/g, ""); -} - -// Generate PKCE code challenge from verifier (S256 method) -async function generateCodeChallenge(verifier: string): Promise { - const hash = crypto.createHash("sha256").update(verifier).digest(); - return hash - .toString("base64") - .replace(/\+/g, "-") - .replace(/\//g, "_") - .replace(/=/g, ""); -} +const AUTHORIZATION_ENDPOINT = `${BACKEND_URL}/api/auth/oauth2/authorize`; +const TOKEN_ENDPOINT = `${BACKEND_URL}/api/auth/oauth2/token`; -export interface OAuthTokens { - access_token: string; - token_type: string; - expires_in?: number; - refresh_token?: string; - scope?: string; - id_token?: string; +export interface OAuthResult { + tokens: { + access_token: string; + token_type: string; + expires_in?: number; + refresh_token?: string; + }; } -// Exchange authorization code for tokens -async function exchangeCodeForTokens( - code: string, - codeVerifier: string, - clientId: string, - redirectUri: string, -): Promise { - const params = new URLSearchParams({ - grant_type: "authorization_code", - code, - redirect_uri: redirectUri, - client_id: clientId, - code_verifier: codeVerifier, - }); +type CallbackResult = { html: string; result?: OAuthResult; error?: Error }; - const response = await fetch(`${BACKEND_URL}/api/auth/oauth2/token`, { - method: "POST", - headers: { - "Content-Type": "application/x-www-form-urlencoded", - }, - body: params.toString(), - }); - - if (!response.ok) { - const error = await response.json().catch(() => ({})); - throw new Error( - error.error_description || error.error || "Token exchange failed", - ); - } - - return response.json(); -} +/** Start a one-shot HTTP server, returns null if port in use */ +async function startCallbackServer( + port: number, + onCallback: (url: URL) => Promise, + onListening: () => void, +): Promise { + return new Promise((resolve, reject) => { + const server = http.createServer(async (req, res) => { + const url = new URL(req.url || "/", `http://localhost:${port}`); + if (url.pathname !== "/") { + res.writeHead(404).end("Not found"); + return; + } -export interface OAuthResult { - tokens: OAuthTokens; - orgId?: string; -} + const { html, result, error } = await onCallback(url); + res.writeHead(200, { "Content-Type": "text/html" }).end(html); + clearTimeout(timeoutId); + server.close(); + error ? reject(error) : resolve(result!); + }); -/** Try to start a server on the given port, returns true if successful */ -function tryListenOnPort(server: http.Server, port: number): Promise { - return new Promise((resolve) => { - const onError = (err: NodeJS.ErrnoException) => { - if (err.code === "EADDRINUSE") { - resolve(false); - } else { - resolve(false); - } - }; + const timeoutId = setTimeout(() => { + server.close(); + reject(new Error("Authorization timed out. Please try again.")); + }, 5 * 60 * 1000); - server.once("error", onError); - server.listen(port, () => { - server.removeListener("error", onError); - resolve(true); + server.once("error", (err: NodeJS.ErrnoException) => { + err.code === "EADDRINUSE" ? resolve(null) : reject(err); }); + + server.listen(port, onListening); }); } -// Symbol to indicate port was in use (not an error) -const PORT_IN_USE = Symbol("PORT_IN_USE"); - /** Start OAuth flow and wait for callback */ export async function startOAuthFlow(clientId: string): Promise { - const codeVerifier = generateCodeVerifier(); - const codeChallenge = await generateCodeChallenge(codeVerifier); + const codeVerifier = arctic.generateCodeVerifier(); + const state = arctic.generateState(); - // Try each port in sequence until one works for (const port of OAUTH_PORTS) { - const result = await tryOAuthFlowOnPort( - clientId, + const redirectUri = getOAuthRedirectUri(port); + const client = new arctic.OAuth2Client(clientId, null, redirectUri); + + const authUrl = client.createAuthorizationURLWithPKCE( + AUTHORIZATION_ENDPOINT, + state, + arctic.CodeChallengeMethod.S256, codeVerifier, - codeChallenge, - port, + ["openid", "profile", "email"], ); + authUrl.searchParams.set("prompt", "consent"); - if (result === PORT_IN_USE) { - // Try next port - continue; - } - - // Success or error (not port-in-use) - return result; - } - - // All ports failed - throw new Error( - `All OAuth ports (${OAUTH_PORTS[0]}-${OAUTH_PORTS[OAUTH_PORTS.length - 1]}) are in use. ` + - `Please close any other applications using these ports.`, - ); -} - -/** Try to run OAuth flow on a specific port */ -async function tryOAuthFlowOnPort( - clientId: string, - codeVerifier: string, - codeChallenge: string, - port: number, -): Promise { - const redirectUri = getOAuthRedirectUri(port); - - return new Promise((resolve, reject) => { - let timeoutId: ReturnType; - - // Create local server to receive callback - const server = http.createServer(async (req, res) => { - const url = new URL(req.url || "/", `http://localhost:${port}`); - - if (url.pathname === "/") { - const code = url.searchParams.get("code"); + const result = await startCallbackServer( + port, + async (url) => { const error = url.searchParams.get("error"); - const errorDescription = url.searchParams.get("error_description"); - + const errorDesc = url.searchParams.get("error_description"); if (error) { - res.writeHead(200, { "Content-Type": "text/html" }); - res.end(getErrorHtml(errorDescription || error)); - clearTimeout(timeoutId); - server.close(); - reject(new Error(errorDescription || error)); - return; + return { html: getErrorHtml(errorDesc || error), error: new Error(errorDesc || error) }; } - if (code) { - res.writeHead(200, { "Content-Type": "text/html" }); - res.end(getSuccessHtml()); - - clearTimeout(timeoutId); - server.close(); - - try { - const tokens = await exchangeCodeForTokens( - code, - codeVerifier, - clientId, - redirectUri, - ); - resolve({ tokens }); - } catch (err) { - reject(err); - } - return; + if (url.searchParams.get("state") !== state) { + return { html: getErrorHtml("Invalid state"), error: new Error("Invalid state - possible CSRF") }; } - res.writeHead(400, { "Content-Type": "text/plain" }); - res.end("Missing authorization code"); - } else { - res.writeHead(404, { "Content-Type": "text/plain" }); - res.end("Not found"); - } - }); + const code = url.searchParams.get("code"); + if (!code) { + return { html: getErrorHtml("Missing code"), error: new Error("Missing authorization code") }; + } - // Try to listen on the port - tryListenOnPort(server, port).then((success) => { - if (!success) { - resolve(PORT_IN_USE); - return; - } + try { + const tokens = await client.validateAuthorizationCode(TOKEN_ENDPOINT, code, codeVerifier); + return { + html: getSuccessHtml(), + result: { + tokens: { + access_token: tokens.accessToken(), + token_type: "Bearer", + expires_in: tokens.accessTokenExpiresInSeconds(), + refresh_token: tokens.hasRefreshToken() ? tokens.refreshToken() : undefined, + }, + }, + }; + } catch (err) { + const msg = err instanceof arctic.OAuth2RequestError ? `OAuth error: ${err.code}` : "Token exchange failed"; + return { html: getErrorHtml(msg), error: new Error(msg) }; + } + }, + () => open(authUrl.toString()), // Open browser once server is listening + ); - // Server started, open browser - const params = new URLSearchParams({ - client_id: clientId, - response_type: "code", - redirect_uri: redirectUri, - scope: "openid profile email", - code_challenge: codeChallenge, - code_challenge_method: "S256", - prompt: "consent", - }); - - const authUrl = `${BACKEND_URL}/api/auth/oauth2/authorize?${params.toString()}`; - open(authUrl); - - // Timeout after 5 minutes - timeoutId = setTimeout(() => { - server.close(); - reject(new Error("Authorization timed out. Please try again.")); - }, 5 * 60 * 1000); - }); - }); + if (result) return result; + // Port was in use, try next + } + + throw new Error(`All OAuth ports (${OAUTH_PORTS[0]}-${OAUTH_PORTS[OAUTH_PORTS.length - 1]}) are in use.`); } /** Get or create API keys using the OAuth access token */ @@ -219,21 +123,14 @@ export async function getApiKeysWithToken( ): Promise<{ sandboxKey: string; prodKey: string; orgId: string }> { const response = await fetch(`${BACKEND_URL}/cli/api-keys`, { method: "POST", - headers: { - Authorization: `Bearer ${accessToken}`, - "Content-Type": "application/json", - }, + headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json" }, }); if (!response.ok) { - const error = await response.json().catch(() => ({ error: "Unknown error" })); + const error = await response.json().catch(() => ({})); throw new Error(error.error || "Failed to create API keys"); } const data = await response.json(); - return { - sandboxKey: data.sandbox_key, - prodKey: data.prod_key, - orgId: data.org_id, - }; + return { sandboxKey: data.sandbox_key, prodKey: data.prod_key, orgId: data.org_id }; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 755cae30..edfc589b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,6 +30,9 @@ importers: '@types/prettier': specifier: ^3.0.0 version: 3.0.0 + arctic: + specifier: ^3.7.0 + version: 3.7.0 axios: specifier: ^1.10.0 version: 1.11.0 @@ -339,7 +342,7 @@ importers: devDependencies: '@types/bun': specifier: latest - version: 1.3.5 + version: 1.3.6 frameworks/convex-workos-authkit: dependencies: @@ -546,7 +549,7 @@ importers: devDependencies: '@types/bun': specifier: latest - version: 1.3.5 + version: 1.3.6 frameworks/with-supabase: dependencies: @@ -707,7 +710,7 @@ importers: version: 4.1.11 '@types/bun': specifier: latest - version: 1.3.5 + version: 1.3.6 '@types/node': specifier: ^20 version: 20.19.10 @@ -2787,6 +2790,24 @@ packages: resolution: {integrity: sha512-Szki0cgFiXE5F9RLx2lUyEtJllnuCSQ4B8RLDwIjXkVit6qZjoDAxH+xhJs29MjKLDz0tbPLdKFa6QrQ/qoGGA==} engines: {node: '>= 20.0.0'} + '@oslojs/asn1@1.0.0': + resolution: {integrity: sha512-zw/wn0sj0j0QKbIXfIlnEcTviaCzYOY3V5rAyjR6YtOByFtJiT574+8p9Wlach0lZH9fddD4yb9laEAIl4vXQA==} + + '@oslojs/binary@1.0.0': + resolution: {integrity: sha512-9RCU6OwXU6p67H4NODbuxv2S3eenuQ4/WFLrsq+K/k682xrznH5EVWA7N4VFk9VYVcbFtKqur5YQQZc0ySGhsQ==} + + '@oslojs/crypto@1.0.1': + resolution: {integrity: sha512-7n08G8nWjAr/Yu3vu9zzrd0L9XnrJfpMioQcvCMxBIiF5orECHe5/3J0jmXRVvgfqMm/+4oxlQ+Sq39COYLcNQ==} + + '@oslojs/encoding@0.4.1': + resolution: {integrity: sha512-hkjo6MuIK/kQR5CrGNdAPZhS01ZCXuWDRJ187zh6qqF2+yMHZpD9fAYpX8q2bOO6Ryhl3XpCT6kUX76N8hhm4Q==} + + '@oslojs/encoding@1.1.0': + resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} + + '@oslojs/jwt@0.2.0': + resolution: {integrity: sha512-bLE7BtHrURedCn4Mco3ma9L4Y1GR2SMBuIvjWr7rmQ4/W/4Jy70TIAgZ+0nIlk0xHz1vNP8x8DCns45Sb2XRbg==} + '@oxc-project/runtime@0.82.3': resolution: {integrity: sha512-LNh5GlJvYHAnMurO+EyA8jJwN1rki7l3PSHuosDh2I7h00T6/u9rCkUjg/SvPmT1CZzvhuW0y+gf7jcqUy/Usg==} engines: {node: '>=6.9.0'} @@ -4760,8 +4781,8 @@ packages: '@types/bun@1.2.22': resolution: {integrity: sha512-5A/KrKos2ZcN0c6ljRSOa1fYIyCKhZfIVYeuyb4snnvomnpFqC0tTsEkdqNxbAgExV384OETQ//WAjl3XbYqQA==} - '@types/bun@1.3.5': - resolution: {integrity: sha512-RnygCqNrd3srIPEWBd5LFeUYG7plCoH2Yw9WaZGyNmdTEei+gWaHqydbaIRkIkcbXwhBT94q78QljxN0Sk838w==} + '@types/bun@1.3.6': + resolution: {integrity: sha512-uWCv6FO/8LcpREhenN1d1b6fcspAB+cefwD7uti8C8VffIv0Um08TKMn98FynpTiU38+y2dUO55T11NgDt8VAA==} '@types/chai@5.2.2': resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} @@ -5648,6 +5669,9 @@ packages: resolution: {integrity: sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==} engines: {node: '>= 14'} + arctic@3.7.0: + resolution: {integrity: sha512-ZMQ+f6VazDgUJOd+qNV+H7GohNSYal1mVjm5kEaZfE2Ifb7Ss70w+Q7xpJC87qZDkMZIXYf0pTIYZA0OPasSbw==} + arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} @@ -6021,8 +6045,8 @@ packages: peerDependencies: '@types/react': ^19 - bun-types@1.3.5: - resolution: {integrity: sha512-inmAYe2PFLs0SUbFOWSVD24sg1jFlMPxOjOSSCYqUgn4Hsc3rDc7dFvfVYjFPNHtov6kgUeulV4SxbuIV/stPw==} + bun-types@1.3.6: + resolution: {integrity: sha512-OlFwHcnNV99r//9v5IIOgQ9Uk37gZqrNMCcqEaExdkVq3Avwqok1bJFmvGMCkCE0FqzdY8VMOZpfpR3lwI+CsQ==} bundle-name@4.1.0: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} @@ -14676,6 +14700,25 @@ snapshots: '@orama/orama@3.1.11': {} + '@oslojs/asn1@1.0.0': + dependencies: + '@oslojs/binary': 1.0.0 + + '@oslojs/binary@1.0.0': {} + + '@oslojs/crypto@1.0.1': + dependencies: + '@oslojs/asn1': 1.0.0 + '@oslojs/binary': 1.0.0 + + '@oslojs/encoding@0.4.1': {} + + '@oslojs/encoding@1.1.0': {} + + '@oslojs/jwt@0.2.0': + dependencies: + '@oslojs/encoding': 0.4.1 + '@oxc-project/runtime@0.82.3': optional: true @@ -17455,9 +17498,9 @@ snapshots: transitivePeerDependencies: - '@types/react' - '@types/bun@1.3.5': + '@types/bun@1.3.6': dependencies: - bun-types: 1.3.5 + bun-types: 1.3.6 '@types/chai@5.2.2': dependencies: @@ -18779,6 +18822,12 @@ snapshots: tar-stream: 3.1.7 zip-stream: 6.0.1 + arctic@3.7.0: + dependencies: + '@oslojs/crypto': 1.0.1 + '@oslojs/encoding': 1.1.0 + '@oslojs/jwt': 0.2.0 + arg@4.1.3: {} arg@5.0.2: {} @@ -19303,7 +19352,7 @@ snapshots: '@types/node': 24.10.4 '@types/react': 18.3.23 - bun-types@1.3.5: + bun-types@1.3.6: dependencies: '@types/node': 24.10.4 From 2556e6bf5dbb31fa5cf8d85b6c2614f03c41a56e Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Thu, 15 Jan 2026 17:15:15 +0000 Subject: [PATCH 21/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20old=20cli=20stuff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmn/source/cli.ts | 8 ++ atmn/source/commands/nuke.ts | 1 + atmn/source/commands/pull.ts | 122 ++++++++++++++--------- atmn/source/commands/push.ts | 1 + atmn/source/compose/models/index.ts | 6 +- atmn/source/core/builders/planBuilder.ts | 112 +++++++++++++-------- atmn/source/core/generateSDKTypes.ts | 1 + atmn/source/core/push.ts | 47 +++++---- 8 files changed, 185 insertions(+), 113 deletions(-) diff --git a/atmn/source/cli.ts b/atmn/source/cli.ts index 3114bfe1..6b648033 100644 --- a/atmn/source/cli.ts +++ b/atmn/source/cli.ts @@ -3,6 +3,7 @@ import chalk from 'chalk'; import {program} from 'commander'; import open from 'open'; import AuthCommand from '../src/commands/auth/command.js'; +import {testTemplateCommand} from '../src/commands/test-template.js'; import Init from './commands/init.js'; import Nuke from './commands/nuke.js'; import Pull from './commands/pull.js'; @@ -98,6 +99,13 @@ program console.log(computedVersion); }); +program + .command('test-template') + .description('Test template selector UI (prototype)') + .action(() => { + testTemplateCommand(); + }); + /** * This is a hack to silence the DeprecationWarning about url.parse() */ diff --git a/atmn/source/commands/nuke.ts b/atmn/source/commands/nuke.ts index 081da3e8..0f684e51 100644 --- a/atmn/source/commands/nuke.ts +++ b/atmn/source/commands/nuke.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import fs from "node:fs"; import { confirm } from "@inquirer/prompts"; import chalk from "chalk"; diff --git a/atmn/source/commands/pull.ts b/atmn/source/commands/pull.ts index 517da60e..ae16ae90 100644 --- a/atmn/source/commands/pull.ts +++ b/atmn/source/commands/pull.ts @@ -1,22 +1,24 @@ -import chalk from 'chalk'; -import prettier from 'prettier'; -import {getAllPlans, getFeatures} from '../core/pull.js'; -import {planBuilder} from '../core/builders/planBuilder.js'; -import {featureBuilder} from '../core/builders/featureBuilder.js'; -import {writeConfig} from '../core/config.js'; -import {importBuilder, exportBuilder} from '../core/builders/planBuilder.js'; -import {snakeCaseToCamelCase} from '../core/utils.js'; -import {generateSDKTypes} from '../core/generateSDKTypes.js'; -import {Feature} from '../compose/models/featureModels.js'; -import {Plan} from '../compose/models/planModels.js'; - -export default async function Pull(options?: {archived?: boolean}) { - console.log(chalk.green('Pulling plans and features from Autumn...')); - const plans = await getAllPlans({archived: options?.archived ?? false}); - const features = await getFeatures({includeArchived: true}); +// @ts-nocheck +import chalk from "chalk"; +import prettier from "prettier"; +import type { Feature } from "../compose/models/featureModels.js"; +import type { Plan } from "../compose/models/planModels.js"; +import { featureBuilder } from "../core/builders/featureBuilder.js"; +import { + importBuilder, + planBuilder +} from "../core/builders/planBuilder.js"; +import { writeConfig } from "../core/config.js"; +import { generateSDKTypes } from "../core/generateSDKTypes.js"; +import { getAllPlans, getFeatures } from "../core/pull.js"; + +export default async function Pull(options?: { archived?: boolean }) { + console.log(chalk.green("Pulling plans and features from Autumn...")); + const plans = await getAllPlans({ archived: options?.archived ?? false }); + const features = await getFeatures({ includeArchived: true }); const planSnippets = plans.map((plan: Plan) => - planBuilder({plan, features}), + planBuilder({ plan, features }), ); const featureSnippets = features @@ -26,13 +28,13 @@ export default async function Pull(options?: {archived?: boolean}) { const autumnConfig = ` ${importBuilder()} -// Features${featureSnippets.join('\n')} +// Features${featureSnippets.join("\n")} -// Plans${planSnippets.join('\n')} +// Plans${planSnippets.join("\n")} `; const formattedConfig = await prettier.format(autumnConfig, { - parser: 'typescript', + parser: "typescript", useTabs: true, singleQuote: false, }); @@ -40,18 +42,22 @@ ${importBuilder()} writeConfig(formattedConfig); // Fetch products and features from both sandbox and production for comprehensive SDK types - console.log(chalk.dim('Fetching products and features from all environments for SDK types...')); + console.log( + chalk.dim( + "Fetching products and features from all environments for SDK types...", + ), + ); const allEnvironmentFeatures = await fetchFeaturesFromAllEnvironments(); const allEnvironmentPlans = await fetchPlansFromAllEnvironments(); // Generate SDK type narrowing for autocomplete const sdkTypesPath = generateSDKTypes({ - plans: allEnvironmentPlans, // Use combined plans from both environments - features: allEnvironmentFeatures, // Use combined features from both environments + plans: allEnvironmentPlans, // Use combined plans from both environments + features: allEnvironmentFeatures, // Use combined features from both environments outputDir: process.cwd(), }); - console.log(chalk.green('Success! Config has been updated.')); + console.log(chalk.green("Success! Config has been updated.")); console.log(chalk.dim(`Generated SDK types at: ${sdkTypesPath}`)); } @@ -60,8 +66,8 @@ ${importBuilder()} * This ensures SDK autocomplete includes all possible feature IDs */ async function fetchFeaturesFromAllEnvironments(): Promise { - const {readFromEnv, isProdFlag} = await import('../core/utils.js'); - const {getFeatures} = await import('../core/pull.js'); + const { readFromEnv, isProdFlag } = await import("../core/utils.js"); + const { getFeatures } = await import("../core/pull.js"); const currentEnvIsProd = isProdFlag(); const allFeatures: Feature[] = []; @@ -69,7 +75,7 @@ async function fetchFeaturesFromAllEnvironments(): Promise { try { // Fetch from current environment - const currentFeatures = await getFeatures({includeArchived: true}); + const currentFeatures = await getFeatures({ includeArchived: true }); currentFeatures.forEach((f: Feature) => { if (!seenIds.has(f.id)) { allFeatures.push(f); @@ -78,26 +84,32 @@ async function fetchFeaturesFromAllEnvironments(): Promise { }); // Try to fetch from other environment if keys exist - const {readFromEnv: readEnvDirect} = await import('fs'); + const { readFromEnv: readEnvDirect } = await import("fs"); const envPath = `${process.cwd()}/.env`; - const fs = await import('fs'); + const fs = await import("fs"); if (fs.existsSync(envPath)) { - const envContent = fs.readFileSync(envPath, 'utf-8'); - const otherKeyName = currentEnvIsProd ? 'AUTUMN_SECRET_KEY' : 'AUTUMN_PROD_SECRET_KEY'; - const otherKeyMatch = envContent.match(new RegExp(`${otherKeyName}=(.+)`)); + const envContent = fs.readFileSync(envPath, "utf-8"); + const otherKeyName = currentEnvIsProd + ? "AUTUMN_SECRET_KEY" + : "AUTUMN_PROD_SECRET_KEY"; + const otherKeyMatch = envContent.match( + new RegExp(`${otherKeyName}=(.+)`), + ); if (otherKeyMatch && otherKeyMatch[1]) { // Temporarily switch environment const originalArgs = [...process.argv]; if (currentEnvIsProd) { - process.argv = process.argv.filter(a => a !== '--prod' && a !== '-p'); + process.argv = process.argv.filter( + (a) => a !== "--prod" && a !== "-p", + ); } else { - process.argv.push('--prod'); + process.argv.push("--prod"); } try { - const otherFeatures = await getFeatures({includeArchived: true}); + const otherFeatures = await getFeatures({ includeArchived: true }); otherFeatures.forEach((f: Feature) => { if (!seenIds.has(f.id)) { allFeatures.push(f); @@ -106,7 +118,9 @@ async function fetchFeaturesFromAllEnvironments(): Promise { }); } catch (error) { // Silently fail if other environment is not accessible - console.log(chalk.dim('Could not fetch from other environment (this is okay)')); + console.log( + chalk.dim("Could not fetch from other environment (this is okay)"), + ); } // Restore original args @@ -115,7 +129,7 @@ async function fetchFeaturesFromAllEnvironments(): Promise { } } catch (error) { // Fall back to current environment only - console.log(chalk.dim('Using features from current environment only')); + console.log(chalk.dim("Using features from current environment only")); } return allFeatures; @@ -126,8 +140,8 @@ async function fetchFeaturesFromAllEnvironments(): Promise { * This ensures SDK autocomplete includes all possible product IDs */ async function fetchPlansFromAllEnvironments(): Promise { - const {isProdFlag} = await import('../core/utils.js'); - const {getAllPlans} = await import('../core/pull.js'); + const { isProdFlag } = await import("../core/utils.js"); + const { getAllPlans } = await import("../core/pull.js"); const currentEnvIsProd = isProdFlag(); const allPlans: Plan[] = []; @@ -135,7 +149,7 @@ async function fetchPlansFromAllEnvironments(): Promise { try { // Fetch from current environment - const currentPlans = await getAllPlans({archived: true}); + const currentPlans = await getAllPlans({ archived: true }); currentPlans.forEach((plan: Plan) => { if (!seenIds.has(plan.id)) { allPlans.push(plan); @@ -145,24 +159,30 @@ async function fetchPlansFromAllEnvironments(): Promise { // Try to fetch from other environment if keys exist const envPath = `${process.cwd()}/.env`; - const fs = await import('fs'); + const fs = await import("fs"); if (fs.existsSync(envPath)) { - const envContent = fs.readFileSync(envPath, 'utf-8'); - const otherKeyName = currentEnvIsProd ? 'AUTUMN_SECRET_KEY' : 'AUTUMN_PROD_SECRET_KEY'; - const otherKeyMatch = envContent.match(new RegExp(`${otherKeyName}=(.+)`)); + const envContent = fs.readFileSync(envPath, "utf-8"); + const otherKeyName = currentEnvIsProd + ? "AUTUMN_SECRET_KEY" + : "AUTUMN_PROD_SECRET_KEY"; + const otherKeyMatch = envContent.match( + new RegExp(`${otherKeyName}=(.+)`), + ); if (otherKeyMatch && otherKeyMatch[1]) { // Temporarily switch environment const originalArgs = [...process.argv]; if (currentEnvIsProd) { - process.argv = process.argv.filter(a => a !== '--prod' && a !== '-p'); + process.argv = process.argv.filter( + (a) => a !== "--prod" && a !== "-p", + ); } else { - process.argv.push('--prod'); + process.argv.push("--prod"); } try { - const otherPlans = await getAllPlans({archived: true}); + const otherPlans = await getAllPlans({ archived: true }); otherPlans.forEach((plan: Plan) => { if (!seenIds.has(plan.id)) { allPlans.push(plan); @@ -171,7 +191,11 @@ async function fetchPlansFromAllEnvironments(): Promise { }); } catch (error) { // Silently fail if other environment is not accessible - console.log(chalk.dim('Could not fetch products from other environment (this is okay)')); + console.log( + chalk.dim( + "Could not fetch products from other environment (this is okay)", + ), + ); } // Restore original args @@ -180,7 +204,7 @@ async function fetchPlansFromAllEnvironments(): Promise { } } catch (error) { // Fall back to current environment only - console.log(chalk.dim('Using products from current environment only')); + console.log(chalk.dim("Using products from current environment only")); } return allPlans; diff --git a/atmn/source/commands/push.ts b/atmn/source/commands/push.ts index 38eb2f6b..3c12fe34 100644 --- a/atmn/source/commands/push.ts +++ b/atmn/source/commands/push.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { confirm } from "@inquirer/prompts"; import chalk from "chalk"; import yoctoSpinner from "yocto-spinner"; diff --git a/atmn/source/compose/models/index.ts b/atmn/source/compose/models/index.ts index ea6de68f..f3289775 100644 --- a/atmn/source/compose/models/index.ts +++ b/atmn/source/compose/models/index.ts @@ -2,7 +2,5 @@ // This file is generated by typegen pipeline // DO NOT EDIT MANUALLY - changes will be overwritten -export * from './planModels'; -export * from './planModels'; -export * from './featureModels'; -export * from './planModels'; +export * from './planModels.js'; +export * from './featureModels.js'; diff --git a/atmn/source/core/builders/planBuilder.ts b/atmn/source/core/builders/planBuilder.ts index 9794df14..76a157f8 100644 --- a/atmn/source/core/builders/planBuilder.ts +++ b/atmn/source/core/builders/planBuilder.ts @@ -1,5 +1,6 @@ -import {Plan, Feature} from '../../compose/index.js'; -import {idToVar, notNullish, nullish} from '../utils.js'; +// @ts-nocheck +import type { Feature, Plan } from "../../compose/index.js"; +import { idToVar, notNullish, nullish } from "../utils.js"; export function importBuilder() { return ` @@ -14,8 +15,8 @@ import { export function exportBuilder(planIds: string[], featureIds: string[]) { const snippet = ` const autumnConfig = { - plans: [${planIds.map(id => `${idToVar({id, prefix: 'plan'})}`).join(', ')}], - features: [${featureIds.map(id => `${idToVar({id, prefix: 'feature'})}`).join(', ')}] + plans: [${planIds.map((id) => `${idToVar({ id, prefix: "plan" })}`).join(", ")}], + features: [${featureIds.map((id) => `${idToVar({ id, prefix: "feature" })}`).join(", ")}] } export default autumnConfig; @@ -31,36 +32,38 @@ export function planBuilder({ features: Feature[]; }) { // Plan from API has nested reset structure, cast to ApiPlanFeature for builder - const planFeaturesStr = plan.features - ?.map((pf: any) => planFeatureBuilder({planFeature: pf as ApiPlanFeature, features})) - .join(',\n ') || ''; + const planFeaturesStr = + plan.features + ?.map((pf: any) => + planFeatureBuilder({ planFeature: pf as ApiPlanFeature, features }), + ) + .join(",\n ") || ""; const priceStr = plan.price ? `\n price: {\n amount: ${plan.price.amount},\n interval: '${plan.price.interval}',\n },` - : ''; + : ""; - const descriptionStr = plan.description && plan.description !== null - ? `\n description: '${plan.description.replace(/'/g, "\\'")}',` - : ''; + const descriptionStr = + plan.description && plan.description !== null + ? `\n description: '${plan.description.replace(/'/g, "\\'")}',` + : ""; - const groupStr = plan.group && plan.group !== '' && plan.group !== null - ? `\n group: '${plan.group}',` - : ''; + const groupStr = + plan.group && plan.group !== "" && plan.group !== null + ? `\n group: '${plan.group}',` + : ""; - const addOnStr = plan.add_on === true - ? `\n add_on: true,` - : ''; + const addOnStr = plan.add_on === true ? `\n add_on: true,` : ""; - const autoEnableStr = plan.default === true - ? `\n auto_enable: true,` - : ''; + const autoEnableStr = plan.default === true ? `\n auto_enable: true,` : ""; - const freeTrialStr = plan.free_trial && plan.free_trial !== null - ? `\n free_trial: {\n duration_type: '${plan.free_trial.duration_type}',\n duration_length: ${plan.free_trial.duration_length},\n card_required: ${plan.free_trial.card_required},\n },` - : ''; + const freeTrialStr = + plan.free_trial && plan.free_trial !== null + ? `\n free_trial: {\n duration_type: '${plan.free_trial.duration_type}',\n duration_length: ${plan.free_trial.duration_length},\n card_required: ${plan.free_trial.card_required},\n },` + : ""; const snippet = ` -export const ${idToVar({id: plan.id, prefix: 'plan'})} = plan({ +export const ${idToVar({ id: plan.id, prefix: "plan" })} = plan({ id: '${plan.id}', name: '${plan.name}',${descriptionStr}${groupStr}${addOnStr}${autoEnableStr}${priceStr} features: [ @@ -78,12 +81,12 @@ export const getFeatureIdStr = ({ featureId: string; features: Feature[]; }) => { - if (nullish(featureId)) return ''; + if (nullish(featureId)) return ""; - let feature = features.find(f => f.id === featureId); + const feature = features.find((f) => f.id === featureId); if (feature?.archived) return `"${featureId}"`; - return `${idToVar({id: featureId, prefix: 'feature'})}.id`; + return `${idToVar({ id: featureId, prefix: "feature" })}.id`; }; // API PlanFeature type (what comes from server - has nested reset object) @@ -98,7 +101,7 @@ type ApiPlanFeature = { }; price?: { amount?: number; - tiers?: Array<{ to: number | 'inf'; amount: number }>; + tiers?: Array<{ to: number | "inf"; amount: number }>; interval?: string; interval_count?: number; billing_units?: number; @@ -129,10 +132,13 @@ function planFeatureBuilder({ features, }); - let parts: string[] = [`feature_id: ${featureIdStr}`]; + const parts: string[] = [`feature_id: ${featureIdStr}`]; // Included usage (API: granted_balance -> SDK: included) - if (notNullish(planFeature.granted_balance) && planFeature.granted_balance > 0) { + if ( + notNullish(planFeature.granted_balance) && + planFeature.granted_balance > 0 + ) { parts.push(`included: ${planFeature.granted_balance}`); } @@ -145,7 +151,10 @@ function planFeatureBuilder({ if (planFeature.reset?.interval) { parts.push(`interval: '${planFeature.reset.interval}'`); } - if (notNullish(planFeature.reset?.interval_count) && planFeature.reset!.interval_count !== 1) { + if ( + notNullish(planFeature.reset?.interval_count) && + planFeature.reset!.interval_count !== 1 + ) { parts.push(`interval_count: ${planFeature.reset!.interval_count}`); } // API: reset_when_enabled (true = reset on enable) -> SDK: carry_over_usage (true = keep existing) @@ -169,14 +178,20 @@ function planFeatureBuilder({ if (planFeature.price.tiers && planFeature.price.tiers.length > 0) { const tiersStr = planFeature.price.tiers - .map(tier => `{ to: ${tier.to === 'inf' ? "'inf'" : tier.to}, amount: ${tier.amount} }`) - .join(', '); + .map( + (tier) => + `{ to: ${tier.to === "inf" ? "'inf'" : tier.to}, amount: ${tier.amount} }`, + ) + .join(", "); priceParts.push(`tiers: [${tiersStr}]`); } // Note: price.interval and price.interval_count are NOT in SDK - they come from top-level interval - if (notNullish(planFeature.price.billing_units) && planFeature.price.billing_units !== 1) { + if ( + notNullish(planFeature.price.billing_units) && + planFeature.price.billing_units !== 1 + ) { priceParts.push(`billing_units: ${planFeature.price.billing_units}`); } @@ -190,7 +205,7 @@ function planFeatureBuilder({ } if (priceParts.length > 0) { - parts.push(`price: { ${priceParts.join(', ')} }`); + parts.push(`price: { ${priceParts.join(", ")} }`); } } @@ -198,13 +213,17 @@ function planFeatureBuilder({ if (planFeature.proration) { const prorationParts: string[] = []; if (planFeature.proration.on_increase) { - prorationParts.push(`on_increase: '${planFeature.proration.on_increase}'`); + prorationParts.push( + `on_increase: '${planFeature.proration.on_increase}'`, + ); } if (planFeature.proration.on_decrease) { - prorationParts.push(`on_decrease: '${planFeature.proration.on_decrease}'`); + prorationParts.push( + `on_decrease: '${planFeature.proration.on_decrease}'`, + ); } if (prorationParts.length > 0) { - parts.push(`proration: { ${prorationParts.join(', ')} }`); + parts.push(`proration: { ${prorationParts.join(", ")} }`); } } @@ -215,15 +234,22 @@ function planFeatureBuilder({ rolloverParts.push(`max: ${planFeature.rollover.max}`); } if (planFeature.rollover.expiry_duration_type) { - rolloverParts.push(`expiry_duration_type: '${planFeature.rollover.expiry_duration_type}'`); + rolloverParts.push( + `expiry_duration_type: '${planFeature.rollover.expiry_duration_type}'`, + ); } - if (notNullish(planFeature.rollover.expiry_duration_length) && planFeature.rollover.expiry_duration_length !== 1) { - rolloverParts.push(`expiry_duration_length: ${planFeature.rollover.expiry_duration_length}`); + if ( + notNullish(planFeature.rollover.expiry_duration_length) && + planFeature.rollover.expiry_duration_length !== 1 + ) { + rolloverParts.push( + `expiry_duration_length: ${planFeature.rollover.expiry_duration_length}`, + ); } if (rolloverParts.length > 0) { - parts.push(`rollover: { ${rolloverParts.join(', ')} }`); + parts.push(`rollover: { ${rolloverParts.join(", ")} }`); } } - return `planFeature({ ${parts.join(', ')} })`; + return `planFeature({ ${parts.join(", ")} })`; } diff --git a/atmn/source/core/generateSDKTypes.ts b/atmn/source/core/generateSDKTypes.ts index c38d3b54..7d3cf4cb 100644 --- a/atmn/source/core/generateSDKTypes.ts +++ b/atmn/source/core/generateSDKTypes.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import fs from "fs"; import path from "path"; import type { Feature } from "../compose/models/featureModels.js"; diff --git a/atmn/source/core/push.ts b/atmn/source/core/push.ts index 9819f208..29ae11b9 100644 --- a/atmn/source/core/push.ts +++ b/atmn/source/core/push.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import type { Spinner } from 'yocto-spinner'; import type { Feature, Plan } from '../compose/index.js'; import { externalRequest } from './api.js'; @@ -129,52 +130,52 @@ function transformPlanForApi(plan: Plan): Record { if (plan.features && Array.isArray(plan.features)) { transformed.features = plan.features.map(feature => { const transformedFeature = { ...feature } as Record; - + // 'included' -> 'granted_balance' if ('included' in feature && feature.included !== undefined) { transformedFeature.granted_balance = feature.included; delete transformedFeature.included; } - + // Transform flattened reset fields to nested reset object // SDK: interval, interval_count, carry_over_usage -> API: reset.interval, reset.interval_count, reset.reset_when_enabled const featureAny = feature as Record; if ('interval' in featureAny || 'interval_count' in featureAny || 'carry_over_usage' in featureAny) { const reset: Record = {}; - + if ('interval' in featureAny && featureAny.interval !== undefined) { reset.interval = featureAny.interval; delete transformedFeature.interval; } - + if ('interval_count' in featureAny && featureAny.interval_count !== undefined) { reset.interval_count = featureAny.interval_count; delete transformedFeature.interval_count; } - + // SDK: carry_over_usage (true = keep existing) -> API: reset_when_enabled (true = reset on enable) // They are inverted if ('carry_over_usage' in featureAny && featureAny.carry_over_usage !== undefined) { reset.reset_when_enabled = !featureAny.carry_over_usage; delete transformedFeature.carry_over_usage; } - + if (Object.keys(reset).length > 0) { transformedFeature.reset = reset; } } - + // Transform nested price object: 'billing_method' -> 'usage_model' // Also add interval/interval_count to price from reset if price exists if ('price' in feature && feature.price && typeof feature.price === 'object') { const price = feature.price as Record; const transformedPrice = { ...price }; - + if ('billing_method' in price) { transformedPrice.usage_model = price.billing_method; delete transformedPrice.billing_method; } - + // If we have a reset interval and a price, copy interval to price for API const resetObj = transformedFeature.reset as Record | undefined; if (resetObj?.interval) { @@ -183,10 +184,10 @@ function transformPlanForApi(plan: Plan): Record { transformedPrice.interval_count = resetObj.interval_count; } } - + transformedFeature.price = transformedPrice; } - + return transformedFeature; }); } @@ -214,10 +215,10 @@ export async function upsertPlan({ } const curPlan = curPlans.find(p => p.id === plan.id); - + // Transform SDK field names to API field names const apiPlan = transformPlanForApi(plan); - + if (!curPlan) { await externalRequest({ method: 'POST', @@ -233,17 +234,29 @@ export async function upsertPlan({ // Prepare the update payload const updatePayload = { ...apiPlan }; - // If local plan has no group but upstream has one, explicitly unset it - if (!plan.group && curPlan.group) { + // Handle swapNullish for group field: + // - If local is undefined AND upstream has a group → send null (user wants to unset) + // - If local is null AND upstream has a group → send null (user wants to unset) + // - If local has a value AND upstream is different → send the new value (already in apiPlan) + // - If local is undefined AND upstream is undefined → do nothing + if (plan.group === undefined && curPlan.group !== undefined && curPlan.group !== null) { + updatePayload['group'] = null; + } else if (plan.group === null && curPlan.group !== undefined && curPlan.group !== null) { updatePayload['group'] = null; } - // If local plan has undefined is_add_on but upstream is true, explicitly set to false + // Handle swapFalse for add_on field: + // - If local is undefined AND upstream is true → send false (user wants to unset) + // - If local is true or false → send that value (already in apiPlan) + // - If local is undefined AND upstream is false/undefined → do nothing if (plan.add_on === undefined && curPlan.add_on === true) { updatePayload['add_on'] = false; } - // If local plan has undefined auto_enable but upstream default is true, explicitly set to false + // Handle swapFalse for auto_enable (maps to 'default' in API): + // - If local is undefined AND upstream is true → send false (user wants to unset) + // - If local is true or false → send that value (already in apiPlan as 'default') + // - If local is undefined AND upstream is false/undefined → do nothing if (plan.auto_enable === undefined && curPlan.default === true) { updatePayload['default'] = false; } From 9e78161a7fdd6dbedbd21442fe2f7b623c32e823 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Thu, 15 Jan 2026 17:15:31 +0000 Subject: [PATCH 22/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20everything=20in=20?= =?UTF-8?q?init=20flow=20is=20completed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmn/src/cli.tsx | 219 ++++++++++++ atmn/src/commands/auth/constants.ts | 2 +- atmn/src/commands/auth/oauth.ts | 84 ++++- atmn/src/commands/nuke/backup.ts | 73 ++++ atmn/src/commands/nuke/deletions.ts | 108 ++++++ atmn/src/commands/nuke/types.ts | 43 +++ atmn/src/commands/nuke/validation.ts | 72 ++++ atmn/src/commands/pull/index.ts | 2 + atmn/src/commands/pull/mergeEnvironments.ts | 46 +++ atmn/src/commands/pull/pull.ts | 93 +++++ atmn/src/commands/pull/pullFromEnvironment.ts | 25 ++ atmn/src/commands/pull/sdkTypes.ts | 73 ++++ atmn/src/commands/pull/types.ts | 36 ++ atmn/src/commands/pull/writeConfig.ts | 38 ++ atmn/src/commands/test-template.tsx | 7 + atmn/src/constants.ts | 4 + atmn/src/lib/animation/explosion.ts | 102 ++++++ atmn/src/lib/api/client.ts | 86 +++++ atmn/src/lib/api/endpoints/customers.ts | 75 ++++ atmn/src/lib/api/endpoints/features.ts | 43 +++ atmn/src/lib/api/endpoints/index.ts | 8 + atmn/src/lib/api/endpoints/organization.ts | 45 +++ atmn/src/lib/api/endpoints/plans.ts | 51 +++ atmn/src/lib/api/types/feature.ts | 14 + atmn/src/lib/api/types/index.ts | 7 + atmn/src/lib/api/types/organization.ts | 12 + atmn/src/lib/api/types/plan.ts | 14 + atmn/src/lib/api/types/planFeature.ts | 14 + atmn/src/lib/constants/templates.ts | 129 +++++++ .../lib/constants/templates/aksiom.config.ts | 92 +++++ .../templates/blacktriangle.config.ts | 86 +++++ atmn/src/lib/constants/templates/index.ts | 28 ++ .../lib/constants/templates/ratgpt.config.ts | 88 +++++ atmn/src/lib/env/detect.ts | 53 +++ atmn/src/lib/env/dotenv.ts | 103 ++++++ atmn/src/lib/env/index.ts | 16 + atmn/src/lib/env/keys.ts | 72 ++++ atmn/src/lib/hooks/index.ts | 3 + atmn/src/lib/hooks/useConfigCounts.ts | 33 ++ atmn/src/lib/hooks/useNuke.ts | 187 ++++++++++ atmn/src/lib/hooks/useNukeData.ts | 49 +++ atmn/src/lib/hooks/useOrganization.ts | 25 ++ atmn/src/lib/hooks/usePull.ts | 115 ++++++ atmn/src/lib/providers/QueryProvider.tsx | 23 ++ atmn/src/lib/providers/index.ts | 1 + atmn/src/lib/transforms/apiToSdk/README.md | 162 +++++++++ .../transforms/apiToSdk/Transformer.test.ts | 198 +++++++++++ .../lib/transforms/apiToSdk/Transformer.ts | 212 +++++++++++ atmn/src/lib/transforms/apiToSdk/feature.ts | 69 ++++ atmn/src/lib/transforms/apiToSdk/helpers.ts | 52 +++ atmn/src/lib/transforms/apiToSdk/index.ts | 8 + atmn/src/lib/transforms/apiToSdk/plan.ts | 50 +++ .../lib/transforms/apiToSdk/planFeature.ts | 61 ++++ atmn/src/lib/transforms/index.ts | 2 + .../lib/transforms/sdkToCode/configFile.ts | 38 ++ atmn/src/lib/transforms/sdkToCode/feature.ts | 41 +++ atmn/src/lib/transforms/sdkToCode/helpers.ts | 101 ++++++ atmn/src/lib/transforms/sdkToCode/imports.ts | 6 + atmn/src/lib/transforms/sdkToCode/index.ts | 13 + atmn/src/lib/transforms/sdkToCode/plan.ts | 66 ++++ .../lib/transforms/sdkToCode/planFeature.ts | 89 +++++ atmn/src/lib/writeEmptyConfig.ts | 15 + atmn/src/prompts/customer.ts | 296 ++++++++++++++++ atmn/src/prompts/payments.ts | 247 +++++++++++++ atmn/src/prompts/pricing.ts | 137 +++++++ atmn/src/prompts/usage.ts | 124 +++++++ atmn/src/views/App.tsx | 13 + atmn/src/views/react/InitFlow.tsx.old | 295 +++++++++++++++ .../src/views/react/components/SelectMenu.tsx | 24 ++ .../src/views/react/components/StatusLine.tsx | 29 ++ .../src/views/react/components/StepHeader.tsx | 24 ++ atmn/src/views/react/components/index.ts | 3 + atmn/src/views/react/init/InitFlow.tsx | 76 ++++ atmn/src/views/react/init/steps/AgentStep.tsx | 335 ++++++++++++++++++ atmn/src/views/react/init/steps/AuthStep.tsx | 128 +++++++ .../src/views/react/init/steps/ConfigStep.tsx | 294 +++++++++++++++ .../views/react/init/steps/HandoffStep.tsx | 202 +++++++++++ .../src/views/react/init/steps/StripeStep.tsx | 157 ++++++++ atmn/src/views/react/nuke/InlineNukeFlow.tsx | 236 ++++++++++++ atmn/src/views/react/nuke/NukeAnimation.tsx | 91 +++++ atmn/src/views/react/nuke/NukeView.tsx | 263 ++++++++++++++ .../react/nuke/components/BackupPrompt.tsx | 63 ++++ .../react/nuke/components/ConfirmScreen.tsx | 83 +++++ .../nuke/components/DeletionProgress.tsx | 98 +++++ .../react/nuke/components/FinalSummary.tsx | 43 +++ .../react/nuke/components/SuccessScreen.tsx | 52 +++ .../react/nuke/components/WarningScreen.tsx | 76 ++++ atmn/src/views/react/pull/Pull.tsx | 134 +++++++ atmn/src/views/react/pull/README.md | 138 ++++++++ atmn/src/views/react/pull/components/Card.tsx | 31 ++ .../react/pull/components/FeatureRow.tsx | 19 + .../views/react/pull/components/FileRow.tsx | 27 ++ .../views/react/pull/components/KeyValue.tsx | 18 + .../react/pull/components/LoadingText.tsx | 18 + .../views/react/pull/components/PlanRow.tsx | 23 ++ atmn/src/views/react/pull/components/index.ts | 6 + .../views/react/template/TemplateSelector.tsx | 151 ++++++++ atmn/src/views/react/test-agent.tsx | 20 ++ 98 files changed, 7639 insertions(+), 17 deletions(-) create mode 100644 atmn/src/cli.tsx create mode 100644 atmn/src/commands/nuke/backup.ts create mode 100644 atmn/src/commands/nuke/deletions.ts create mode 100644 atmn/src/commands/nuke/types.ts create mode 100644 atmn/src/commands/nuke/validation.ts create mode 100644 atmn/src/commands/pull/index.ts create mode 100644 atmn/src/commands/pull/mergeEnvironments.ts create mode 100644 atmn/src/commands/pull/pull.ts create mode 100644 atmn/src/commands/pull/pullFromEnvironment.ts create mode 100644 atmn/src/commands/pull/sdkTypes.ts create mode 100644 atmn/src/commands/pull/types.ts create mode 100644 atmn/src/commands/pull/writeConfig.ts create mode 100644 atmn/src/commands/test-template.tsx create mode 100644 atmn/src/constants.ts create mode 100644 atmn/src/lib/animation/explosion.ts create mode 100644 atmn/src/lib/api/client.ts create mode 100644 atmn/src/lib/api/endpoints/customers.ts create mode 100644 atmn/src/lib/api/endpoints/features.ts create mode 100644 atmn/src/lib/api/endpoints/index.ts create mode 100644 atmn/src/lib/api/endpoints/organization.ts create mode 100644 atmn/src/lib/api/endpoints/plans.ts create mode 100644 atmn/src/lib/api/types/feature.ts create mode 100644 atmn/src/lib/api/types/index.ts create mode 100644 atmn/src/lib/api/types/organization.ts create mode 100644 atmn/src/lib/api/types/plan.ts create mode 100644 atmn/src/lib/api/types/planFeature.ts create mode 100644 atmn/src/lib/constants/templates.ts create mode 100644 atmn/src/lib/constants/templates/aksiom.config.ts create mode 100644 atmn/src/lib/constants/templates/blacktriangle.config.ts create mode 100644 atmn/src/lib/constants/templates/index.ts create mode 100644 atmn/src/lib/constants/templates/ratgpt.config.ts create mode 100644 atmn/src/lib/env/detect.ts create mode 100644 atmn/src/lib/env/dotenv.ts create mode 100644 atmn/src/lib/env/index.ts create mode 100644 atmn/src/lib/env/keys.ts create mode 100644 atmn/src/lib/hooks/index.ts create mode 100644 atmn/src/lib/hooks/useConfigCounts.ts create mode 100644 atmn/src/lib/hooks/useNuke.ts create mode 100644 atmn/src/lib/hooks/useNukeData.ts create mode 100644 atmn/src/lib/hooks/useOrganization.ts create mode 100644 atmn/src/lib/hooks/usePull.ts create mode 100644 atmn/src/lib/providers/QueryProvider.tsx create mode 100644 atmn/src/lib/providers/index.ts create mode 100644 atmn/src/lib/transforms/apiToSdk/README.md create mode 100644 atmn/src/lib/transforms/apiToSdk/Transformer.test.ts create mode 100644 atmn/src/lib/transforms/apiToSdk/Transformer.ts create mode 100644 atmn/src/lib/transforms/apiToSdk/feature.ts create mode 100644 atmn/src/lib/transforms/apiToSdk/helpers.ts create mode 100644 atmn/src/lib/transforms/apiToSdk/index.ts create mode 100644 atmn/src/lib/transforms/apiToSdk/plan.ts create mode 100644 atmn/src/lib/transforms/apiToSdk/planFeature.ts create mode 100644 atmn/src/lib/transforms/index.ts create mode 100644 atmn/src/lib/transforms/sdkToCode/configFile.ts create mode 100644 atmn/src/lib/transforms/sdkToCode/feature.ts create mode 100644 atmn/src/lib/transforms/sdkToCode/helpers.ts create mode 100644 atmn/src/lib/transforms/sdkToCode/imports.ts create mode 100644 atmn/src/lib/transforms/sdkToCode/index.ts create mode 100644 atmn/src/lib/transforms/sdkToCode/plan.ts create mode 100644 atmn/src/lib/transforms/sdkToCode/planFeature.ts create mode 100644 atmn/src/lib/writeEmptyConfig.ts create mode 100644 atmn/src/prompts/customer.ts create mode 100644 atmn/src/prompts/payments.ts create mode 100644 atmn/src/prompts/pricing.ts create mode 100644 atmn/src/prompts/usage.ts create mode 100644 atmn/src/views/App.tsx create mode 100644 atmn/src/views/react/InitFlow.tsx.old create mode 100644 atmn/src/views/react/components/SelectMenu.tsx create mode 100644 atmn/src/views/react/components/StatusLine.tsx create mode 100644 atmn/src/views/react/components/StepHeader.tsx create mode 100644 atmn/src/views/react/components/index.ts create mode 100644 atmn/src/views/react/init/InitFlow.tsx create mode 100644 atmn/src/views/react/init/steps/AgentStep.tsx create mode 100644 atmn/src/views/react/init/steps/AuthStep.tsx create mode 100644 atmn/src/views/react/init/steps/ConfigStep.tsx create mode 100644 atmn/src/views/react/init/steps/HandoffStep.tsx create mode 100644 atmn/src/views/react/init/steps/StripeStep.tsx create mode 100644 atmn/src/views/react/nuke/InlineNukeFlow.tsx create mode 100644 atmn/src/views/react/nuke/NukeAnimation.tsx create mode 100644 atmn/src/views/react/nuke/NukeView.tsx create mode 100644 atmn/src/views/react/nuke/components/BackupPrompt.tsx create mode 100644 atmn/src/views/react/nuke/components/ConfirmScreen.tsx create mode 100644 atmn/src/views/react/nuke/components/DeletionProgress.tsx create mode 100644 atmn/src/views/react/nuke/components/FinalSummary.tsx create mode 100644 atmn/src/views/react/nuke/components/SuccessScreen.tsx create mode 100644 atmn/src/views/react/nuke/components/WarningScreen.tsx create mode 100644 atmn/src/views/react/pull/Pull.tsx create mode 100644 atmn/src/views/react/pull/README.md create mode 100644 atmn/src/views/react/pull/components/Card.tsx create mode 100644 atmn/src/views/react/pull/components/FeatureRow.tsx create mode 100644 atmn/src/views/react/pull/components/FileRow.tsx create mode 100644 atmn/src/views/react/pull/components/KeyValue.tsx create mode 100644 atmn/src/views/react/pull/components/LoadingText.tsx create mode 100644 atmn/src/views/react/pull/components/PlanRow.tsx create mode 100644 atmn/src/views/react/pull/components/index.ts create mode 100644 atmn/src/views/react/template/TemplateSelector.tsx create mode 100644 atmn/src/views/react/test-agent.tsx diff --git a/atmn/src/cli.tsx b/atmn/src/cli.tsx new file mode 100644 index 00000000..d2ee1f80 --- /dev/null +++ b/atmn/src/cli.tsx @@ -0,0 +1,219 @@ +#!/usr/bin/env node +import chalk from "chalk"; +import clipboard from "clipboardy"; +import { program } from "commander"; +import { render } from "ink"; +import open from "open"; +import React from "react"; +import Init from "../source/commands/init.js"; +import Nuke from "../source/commands/nuke.js"; +import Push from "../source/commands/push.js"; +import { DEFAULT_CONFIG, FRONTEND_URL } from "../source/constants.js"; +import { loadAutumnConfigFile, writeConfig } from "../source/core/config.js"; +import { getOrgMe } from "../source/core/requests/orgRequests.js"; +import { readFromEnv } from "../source/core/utils.js"; +// Import existing commands from source/ (legacy - will migrate incrementally) +import AuthCommand from "./commands/auth/command.js"; +import { pull as newPull } from "./commands/pull/pull.js"; // New pull implementation +import { QueryProvider } from "./lib/providers/index.js"; +import { pricingPrompt } from "./prompts/pricing.js"; +// Import Ink views +import App from "./views/App.js"; +import { InitFlow } from "./views/react/init/InitFlow.js"; +import { PullView } from "./views/react/pull/Pull.js"; + +declare const VERSION: string; + +// Guard against missing define in watch/incremental rebuilds +const computedVersion = + typeof VERSION !== "undefined" && VERSION ? VERSION : "dev"; + +program.version(computedVersion); + +program.option("-p, --prod", "Push to production"); +program.option("-l, --local", "Use local autumn environment"); + +// Demo command to test Ink rendering and TTY detection +program + .command("demo") + .description("Demo command to test Ink rendering") + .action(() => { + if (process.stdout.isTTY) { + // Interactive mode - render Ink UI + render(); + } else { + // Non-TTY (agent mode) - plain text output + console.log("atmn - Autumn CLI"); + console.log("Running in non-interactive mode (agent/CI)"); + } + }); + +// === Existing commands (unchanged from source/cli.ts) === + +program + .command("env") + .description("Check the environment and organization info") + .action(async () => { + // Ensure API key is present + readFromEnv(); + + // Fetch organization info from API + const orgInfo = await getOrgMe(); + + const envDisplay = orgInfo.env === "sandbox" ? "Sandbox" : "Production"; + console.log(chalk.green(`Organization: ${orgInfo.name}`)); + console.log(chalk.green(`Slug: ${orgInfo.slug}`)); + console.log(chalk.green(`Environment: ${envDisplay}`)); + }); + +program + .command("nuke") + .description("Permanently nuke your sandbox.") + .action(async () => { + if (process.stdout.isTTY) { + // Interactive mode - use new beautiful Ink UI + const { NukeView } = await import("./views/react/nuke/NukeView.js"); + render( + + + , + ); + } else { + // Non-TTY mode - use legacy command + await Nuke(); + } + }); + +program + .command("push") + .description("Push changes to Autumn") + .option("-p, --prod", "Push to production") + .option("-y, --yes", "Confirm all deletions") + .action(async (options) => { + const config = await loadAutumnConfigFile(); + await Push({ config, yes: options.yes, prod: options.prod }); + }); + +program + .command("pull") + .description("Pull changes from Autumn") + .option("-p, --prod", "Pull from live/production") + .action(async (options) => { + // Import AppEnv here to avoid circular dependencies + const { AppEnv } = await import("./lib/env/index.js"); + const environment = options.prod ? AppEnv.Live : AppEnv.Sandbox; + + if (process.stdout.isTTY) { + // Interactive mode - use beautiful Ink UI + render( + + { + process.exit(0); + }} + /> + , + ); + } else { + // Non-TTY (CI/agent mode) - use plain text + console.log(`Pulling plans and features from Autumn (${environment})...`); + + try { + const result = await newPull({ + generateSdkTypes: true, + cwd: process.cwd(), + environment, + }); + + console.log( + chalk.green( + `✓ Pulled ${result.features.length} features, ${result.plans.length} plans from ${environment}`, + ), + ); + if (result.sdkTypesPath) { + console.log( + chalk.green(`✓ Generated SDK types at: ${result.sdkTypesPath}`), + ); + } + } catch (error) { + console.error(chalk.red("Error pulling from Autumn:"), error); + process.exit(1); + } + } + }); + +program + .command("init") + .description("Initialize an Autumn project.") + .action(async () => { + if (process.stdout.isTTY) { + // Interactive mode - use new Ink-based init flow + render( + + + , + ); + } else { + // Non-TTY (agent/CI mode) - use legacy init + writeConfig(DEFAULT_CONFIG); + await Init(); + } + }); + +program + .command("login") + .description("Authenticate with Autumn") + .option("-p, --prod", "Authenticate with production") + .action(async () => { + await AuthCommand(); + }); + +program + .command("dashboard") + .description("Open the Autumn dashboard in your browser") + .action(() => { + open(`${FRONTEND_URL}`); + }); + +program + .command("version") + .alias("v") + .description("Show the version of Autumn") + .action(() => { + console.log(computedVersion); + }); + +program + .command("pricing-builder") + .description("Get the pricing design agent prompt") + .action(async () => { + if (process.stdout.isTTY) { + await clipboard.write(pricingPrompt); + console.log( + chalk.green( + "Prompt copied to clipboard! You can paste it into your preferred agent now.", + ), + ); + } else { + console.log(pricingPrompt); + } + }); + +/** + * This is a hack to silence the DeprecationWarning about url.parse() + */ +// biome-ignore lint/suspicious/noExplicitAny: expected +const originalEmit = process.emitWarning as any; +// biome-ignore lint/suspicious/noExplicitAny: expected +(process as any).emitWarning = (warning: any, ...args: any[]) => { + const msg = typeof warning === "string" ? warning : warning.message; + + if (msg.includes("url.parse()")) { + return; + } + + return originalEmit(warning, ...args); +}; + +program.parse(); diff --git a/atmn/src/commands/auth/constants.ts b/atmn/src/commands/auth/constants.ts index 826d7bb1..98f247be 100644 --- a/atmn/src/commands/auth/constants.ts +++ b/atmn/src/commands/auth/constants.ts @@ -1,7 +1,7 @@ // OAuth constants for CLI authentication /** The OAuth client ID for the CLI (public client) */ -export const CLI_CLIENT_ID = "qncNuaPFAEBwzCypjFopNCGPHQDqkchp"; +export const CLI_CLIENT_ID = "khicXGthBbGMIWmpgodOTDcCCJHJMDpN"; /** Base port for the local OAuth callback server */ export const OAUTH_PORT_BASE = 31448; diff --git a/atmn/src/commands/auth/oauth.ts b/atmn/src/commands/auth/oauth.ts index 1079b73d..2c8da2f3 100644 --- a/atmn/src/commands/auth/oauth.ts +++ b/atmn/src/commands/auth/oauth.ts @@ -2,8 +2,11 @@ import * as http from "node:http"; import * as arctic from "arctic"; import open from "open"; import { BACKEND_URL } from "../../../source/constants.js"; -import { OAUTH_PORTS, getOAuthRedirectUri } from "./constants.js"; -import { getSuccessHtml, getErrorHtml } from "../../views/html/oauth-callback.js"; +import { + getErrorHtml, + getSuccessHtml, +} from "../../views/html/oauth-callback.js"; +import { getOAuthRedirectUri, OAUTH_PORTS } from "./constants.js"; const AUTHORIZATION_ENDPOINT = `${BACKEND_URL}/api/auth/oauth2/authorize`; const TOKEN_ENDPOINT = `${BACKEND_URL}/api/auth/oauth2/token`; @@ -40,10 +43,13 @@ async function startCallbackServer( error ? reject(error) : resolve(result!); }); - const timeoutId = setTimeout(() => { - server.close(); - reject(new Error("Authorization timed out. Please try again.")); - }, 5 * 60 * 1000); + const timeoutId = setTimeout( + () => { + server.close(); + reject(new Error("Authorization timed out. Please try again.")); + }, + 5 * 60 * 1000, + ); server.once("error", (err: NodeJS.ErrnoException) => { err.code === "EADDRINUSE" ? resolve(null) : reject(err); @@ -67,7 +73,26 @@ export async function startOAuthFlow(clientId: string): Promise { state, arctic.CodeChallengeMethod.S256, codeVerifier, - ["openid", "profile", "email"], + [ + "organisation:read", + "customers:create", + "customers:read", + "customers:list", + "customers:update", + "customers:delete", + "features:create", + "features:read", + "features:list", + "features:update", + "features:delete", + "plans:create", + "plans:read", + "plans:list", + "plans:update", + "plans:delete", + "apiKeys:create", + "apiKeys:read", + ], ); authUrl.searchParams.set("prompt", "consent"); @@ -77,20 +102,33 @@ export async function startOAuthFlow(clientId: string): Promise { const error = url.searchParams.get("error"); const errorDesc = url.searchParams.get("error_description"); if (error) { - return { html: getErrorHtml(errorDesc || error), error: new Error(errorDesc || error) }; + return { + html: getErrorHtml(errorDesc || error), + error: new Error(errorDesc || error), + }; } if (url.searchParams.get("state") !== state) { - return { html: getErrorHtml("Invalid state"), error: new Error("Invalid state - possible CSRF") }; + return { + html: getErrorHtml("Invalid state"), + error: new Error("Invalid state - possible CSRF"), + }; } const code = url.searchParams.get("code"); if (!code) { - return { html: getErrorHtml("Missing code"), error: new Error("Missing authorization code") }; + return { + html: getErrorHtml("Missing code"), + error: new Error("Missing authorization code"), + }; } try { - const tokens = await client.validateAuthorizationCode(TOKEN_ENDPOINT, code, codeVerifier); + const tokens = await client.validateAuthorizationCode( + TOKEN_ENDPOINT, + code, + codeVerifier, + ); return { html: getSuccessHtml(), result: { @@ -98,12 +136,17 @@ export async function startOAuthFlow(clientId: string): Promise { access_token: tokens.accessToken(), token_type: "Bearer", expires_in: tokens.accessTokenExpiresInSeconds(), - refresh_token: tokens.hasRefreshToken() ? tokens.refreshToken() : undefined, + refresh_token: tokens.hasRefreshToken() + ? tokens.refreshToken() + : undefined, }, }, }; } catch (err) { - const msg = err instanceof arctic.OAuth2RequestError ? `OAuth error: ${err.code}` : "Token exchange failed"; + const msg = + err instanceof arctic.OAuth2RequestError + ? `OAuth error: ${err.code}` + : "Token exchange failed"; return { html: getErrorHtml(msg), error: new Error(msg) }; } }, @@ -114,7 +157,9 @@ export async function startOAuthFlow(clientId: string): Promise { // Port was in use, try next } - throw new Error(`All OAuth ports (${OAUTH_PORTS[0]}-${OAUTH_PORTS[OAUTH_PORTS.length - 1]}) are in use.`); + throw new Error( + `All OAuth ports (${OAUTH_PORTS[0]}-${OAUTH_PORTS[OAUTH_PORTS.length - 1]}) are in use.`, + ); } /** Get or create API keys using the OAuth access token */ @@ -123,7 +168,10 @@ export async function getApiKeysWithToken( ): Promise<{ sandboxKey: string; prodKey: string; orgId: string }> { const response = await fetch(`${BACKEND_URL}/cli/api-keys`, { method: "POST", - headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json" }, + headers: { + Authorization: `Bearer ${accessToken}`, + "Content-Type": "application/json", + }, }); if (!response.ok) { @@ -132,5 +180,9 @@ export async function getApiKeysWithToken( } const data = await response.json(); - return { sandboxKey: data.sandbox_key, prodKey: data.prod_key, orgId: data.org_id }; + return { + sandboxKey: data.sandbox_key, + prodKey: data.prod_key, + orgId: data.org_id, + }; } diff --git a/atmn/src/commands/nuke/backup.ts b/atmn/src/commands/nuke/backup.ts new file mode 100644 index 00000000..7c7e01a8 --- /dev/null +++ b/atmn/src/commands/nuke/backup.ts @@ -0,0 +1,73 @@ +/** + * Backup utilities for nuke command + */ + +import fs from "node:fs"; +import path from "node:path"; + +export interface BackupResult { + created: boolean; + path?: string; + error?: string; +} + +/** + * Create backup of autumn.config.ts + * @param cwd - Working directory (defaults to process.cwd()) + * @returns BackupResult with path or error + */ +export function createConfigBackup(cwd: string = process.cwd()): BackupResult { + const configPath = path.join(cwd, "autumn.config.ts"); + const backupPath = path.join(cwd, "autumn.config.ts.backup"); + + try { + // Check if config exists + if (!fs.existsSync(configPath)) { + return { + created: false, + error: "autumn.config.ts not found", + }; + } + + // Check if backup already exists + if (fs.existsSync(backupPath)) { + // Create timestamped backup instead + const timestamp = new Date() + .toISOString() + .replace(/[:.]/g, "-") + .slice(0, 19); + const timestampedBackupPath = path.join( + cwd, + `autumn.config.ts.backup.${timestamp}` + ); + + fs.copyFileSync(configPath, timestampedBackupPath); + + return { + created: true, + path: timestampedBackupPath, + }; + } + + // Create backup + fs.copyFileSync(configPath, backupPath); + + return { + created: true, + path: backupPath, + }; + } catch (error) { + return { + created: false, + error: error instanceof Error ? error.message : "Unknown error", + }; + } +} + +/** + * Check if config file exists + */ +export function configExists(cwd: string = process.cwd()): boolean { + const configPath = path.join(cwd, "autumn.config.ts"); + return fs.existsSync(configPath); +} diff --git a/atmn/src/commands/nuke/deletions.ts b/atmn/src/commands/nuke/deletions.ts new file mode 100644 index 00000000..cb51f9f6 --- /dev/null +++ b/atmn/src/commands/nuke/deletions.ts @@ -0,0 +1,108 @@ +/** + * Batch deletion logic for nuke command + */ + +import type { DeletionProgress } from "./types.js"; + +/** + * Delete customers in batches with progress callbacks + */ +export async function deleteCustomersBatch( + customers: { id: string }[], + deleteCustomerFn: (id: string) => Promise, + onProgress?: (progress: DeletionProgress) => void +): Promise { + const concurrency = Math.max( + 1, + Math.min( + customers.length, + Number(process.env['ATMN_DELETE_CONCURRENCY'] ?? 5) || 5 + ) + ); + + let completed = 0; + const startTime = Date.now(); + + for (let i = 0; i < customers.length; i += concurrency) { + const batch = customers.slice(i, i + concurrency); + + await Promise.all( + batch.map(async (customer) => { + await deleteCustomerFn(customer.id); + completed++; + + if (onProgress) { + const elapsed = (Date.now() - startTime) / 1000; + const rate = elapsed > 0 ? completed / elapsed : 0; + + onProgress({ + phase: "customers", + current: completed, + total: customers.length, + rate, + }); + } + }) + ); + } +} + +/** + * Delete plans sequentially with progress callbacks + */ +export async function deletePlansSequential( + plans: { id: string }[], + deletePlanFn: (id: string, allVersions: boolean) => Promise, + onProgress?: (progress: DeletionProgress) => void +): Promise { + const startTime = Date.now(); + + for (let i = 0; i < plans.length; i++) { + await deletePlanFn(plans[i]!.id, true); // allVersions = true + + if (onProgress) { + const elapsed = (Date.now() - startTime) / 1000; + const rate = elapsed > 0 ? (i + 1) / elapsed : 0; + + onProgress({ + phase: "plans", + current: i + 1, + total: plans.length, + rate, + }); + } + } +} + +/** + * Delete features sequentially with progress callbacks + * Sorts credit_system features first (dependencies) + */ +export async function deleteFeaturesSequential( + features: { id: string; type: string }[], + deleteFeatureFn: (id: string) => Promise, + onProgress?: (progress: DeletionProgress) => void +): Promise { + // Sort: credit_system features first (they are dependencies) + const sorted = [...features].sort((a, b) => + a.type === "credit_system" ? -1 : 1 + ); + + const startTime = Date.now(); + + for (let i = 0; i < sorted.length; i++) { + await deleteFeatureFn(sorted[i]!.id); + + if (onProgress) { + const elapsed = (Date.now() - startTime) / 1000; + const rate = elapsed > 0 ? (i + 1) / elapsed : 0; + + onProgress({ + phase: "features", + current: i + 1, + total: sorted.length, + rate, + }); + } + } +} diff --git a/atmn/src/commands/nuke/types.ts b/atmn/src/commands/nuke/types.ts new file mode 100644 index 00000000..fe6c3a8e --- /dev/null +++ b/atmn/src/commands/nuke/types.ts @@ -0,0 +1,43 @@ +/** + * Types for nuke command + */ + +export interface NukeOptions { + /** Working directory */ + cwd?: string; + /** Skip confirmations (DANGEROUS - for testing only) */ + skipConfirmations?: boolean; + /** Max customers to delete */ + maxCustomers?: number; +} + +export interface NukeStats { + customersDeleted: number; + plansDeleted: number; + featuresDeleted: number; + duration: number; // milliseconds + backupCreated: boolean; + backupPath?: string; +} + +export interface NukeResult { + success: boolean; + stats: NukeStats; + error?: string; +} + +export interface DeletionProgress { + phase: "customers" | "plans" | "features"; + current: number; + total: number; + rate?: number; // items per second +} + +export interface NukePhaseStats { + phase: "customers" | "plans" | "features"; + current: number; + total: number; + rate: number; // items per second + duration?: number; // seconds (when complete) + completed: boolean; +} diff --git a/atmn/src/commands/nuke/validation.ts b/atmn/src/commands/nuke/validation.ts new file mode 100644 index 00000000..1cdefdff --- /dev/null +++ b/atmn/src/commands/nuke/validation.ts @@ -0,0 +1,72 @@ +/** + * Nuke command validation + * Ensures safety checks before deletion + */ + +import { AppEnv, getEnvironmentFromKey } from "../../lib/env/detect.js"; + +export class NukeValidationError extends Error { + constructor(message: string) { + super(message); + this.name = "NukeValidationError"; + } +} + +/** + * Validate that the key is sandbox-only + * Throws error if production key detected + */ +export function validateSandboxOnly(key: string): void { + const env = getEnvironmentFromKey(key); + + if (env !== AppEnv.Sandbox) { + throw new NukeValidationError( + "🚨 NUKE BLOCKED: Cannot nuke production!\n\n" + + "This command only works in sandbox environment.\n" + + `Current environment: ${env}\n\n` + + "To nuke your sandbox:\n" + + "1. Use your sandbox key (AUTUMN_SECRET_KEY)\n" + + "2. Make sure it starts with 'ask_test_'\n\n" + + "Aborting for your safety." + ); + } +} + +/** + * Validate customer count is within limits + */ +export function validateCustomerLimit( + customerCount: number, + maxCustomers: number = 50 +): void { + if (customerCount > maxCustomers) { + throw new NukeValidationError( + `❌ Too Many Customers\n\n` + + `You have ${customerCount} customers in your sandbox.\n` + + `Maximum allowed for nuke: ${maxCustomers}\n\n` + + `Why this limit?\n` + + `• Prevents accidental mass deletion\n` + + `• Ensures reasonable deletion time\n` + + `• Encourages cleanup via dashboard\n\n` + + `Options:\n` + + `1. Delete some customers via dashboard\n` + + `2. Increase limit: ATMN_NUKE_MAX_CUSTOMERS=${customerCount}\n` + + `3. Contact support for bulk deletion\n\n` + + `Aborting.` + ); + } +} + +/** + * Get max customers from environment or use default + */ +export function getMaxCustomers(): number { + const envValue = process.env['ATMN_NUKE_MAX_CUSTOMERS']; + if (envValue) { + const parsed = parseInt(envValue, 10); + if (!isNaN(parsed) && parsed > 0) { + return parsed; + } + } + return 50; // Default limit +} diff --git a/atmn/src/commands/pull/index.ts b/atmn/src/commands/pull/index.ts new file mode 100644 index 00000000..d7932bcb --- /dev/null +++ b/atmn/src/commands/pull/index.ts @@ -0,0 +1,2 @@ +export { pull } from "./pull.js"; +export type { PullOptions, PullResult, EnvironmentData } from "./types.js"; diff --git a/atmn/src/commands/pull/mergeEnvironments.ts b/atmn/src/commands/pull/mergeEnvironments.ts new file mode 100644 index 00000000..0f38ecf1 --- /dev/null +++ b/atmn/src/commands/pull/mergeEnvironments.ts @@ -0,0 +1,46 @@ +import type { Feature, Plan } from "../../../source/compose/models/index.js"; +import type { EnvironmentData } from "./types.js"; + +/** + * Merge sandbox and production data for SDK types generation + * Deduplicates by ID, preferring sandbox definitions + */ +export function mergeEnvironments( + sandbox: EnvironmentData, + production: EnvironmentData, +): EnvironmentData { + // Merge features (dedupe by ID) + const featureMap = new Map(); + + // Add sandbox features first + for (const feature of sandbox.features) { + featureMap.set(feature.id, feature); + } + + // Add production features that don't exist in sandbox + for (const feature of production.features) { + if (!featureMap.has(feature.id)) { + featureMap.set(feature.id, feature); + } + } + + // Merge plans (dedupe by ID) + const planMap = new Map(); + + // Add sandbox plans first + for (const plan of sandbox.plans) { + planMap.set(plan.id, plan); + } + + // Add production plans that don't exist in sandbox + for (const plan of production.plans) { + if (!planMap.has(plan.id)) { + planMap.set(plan.id, plan); + } + } + + return { + features: Array.from(featureMap.values()), + plans: Array.from(planMap.values()), + }; +} diff --git a/atmn/src/commands/pull/pull.ts b/atmn/src/commands/pull/pull.ts new file mode 100644 index 00000000..fceea5d2 --- /dev/null +++ b/atmn/src/commands/pull/pull.ts @@ -0,0 +1,93 @@ +import { AppEnv, getKey, hasKey } from "../../lib/env/index.js"; +import { pullFromEnvironment } from "./pullFromEnvironment.js"; +import { mergeEnvironments } from "./mergeEnvironments.js"; +import { writeConfig } from "./writeConfig.js"; +import { generateSdkTypes } from "./sdkTypes.js"; +import type { PullOptions, PullResult } from "./types.js"; + +/** + * Pull command - fetch config from Autumn API and generate local files + * + * Flow: + * 1. Get key for specified environment (defaults to sandbox) + * 2. Fetch & transform from specified environment + * 3. Write autumn.config.ts + * 4. If generateSdkTypes: + * a. Try get live key (optional) + * b. If live key exists, fetch & transform from live + * c. Merge sandbox + live (dedupe by ID) + * d. Generate @useautumn-sdk.d.ts + */ +export async function pull(options: PullOptions = {}): Promise { + const { + generateSdkTypes: shouldGenerateSdkTypes = false, + cwd = process.cwd(), + environment = AppEnv.Sandbox + } = options; + + // 1. Get key for specified environment + const primaryKey = getKey(environment, cwd); + + // 2. Fetch & transform from specified environment + const primaryData = await pullFromEnvironment(primaryKey); + + // 3. Write autumn.config.ts (using primary environment data) + const configPath = await writeConfig( + primaryData.features, + primaryData.plans, + cwd, + ); + + const result: PullResult = { + features: primaryData.features, + plans: primaryData.plans, + configPath, + }; + + // 4. Generate SDK types if requested + if (shouldGenerateSdkTypes) { + let mergedData = primaryData; + + // If pulling from sandbox, try to merge with live for SDK types + if (environment === AppEnv.Sandbox && hasKey(AppEnv.Live, cwd)) { + try { + const liveKey = getKey(AppEnv.Live, cwd); + const liveData = await pullFromEnvironment(liveKey); + + // Merge sandbox and live + mergedData = mergeEnvironments(primaryData, liveData); + } catch (error) { + console.warn( + "Failed to fetch live data, using sandbox only:", + error, + ); + } + } + // If pulling from live, try to merge with sandbox for SDK types + else if (environment === AppEnv.Live && hasKey(AppEnv.Sandbox, cwd)) { + try { + const sandboxKey = getKey(AppEnv.Sandbox, cwd); + const sandboxData = await pullFromEnvironment(sandboxKey); + + // Merge live and sandbox + mergedData = mergeEnvironments(sandboxData, primaryData); + } catch (error) { + console.warn( + "Failed to fetch sandbox data, using live only:", + error, + ); + } + } + + // Generate SDK types + const sdkTypesPath = await generateSdkTypes({ + features: mergedData.features, + plans: mergedData.plans, + outputDir: cwd, + }); + + result.sdkTypesPath = sdkTypesPath; + } + + return result; +} diff --git a/atmn/src/commands/pull/pullFromEnvironment.ts b/atmn/src/commands/pull/pullFromEnvironment.ts new file mode 100644 index 00000000..568cc1e2 --- /dev/null +++ b/atmn/src/commands/pull/pullFromEnvironment.ts @@ -0,0 +1,25 @@ +import { fetchFeatures, fetchPlans } from "../../lib/api/endpoints/index.js"; +import { + transformApiFeature, + transformApiPlan, +} from "../../lib/transforms/index.js"; +import type { EnvironmentData } from "./types.js"; + +/** + * Fetch and transform data from a single environment + */ +export async function pullFromEnvironment( + secretKey: string, +): Promise { + // Fetch features and plans in parallel + const [apiFeatures, apiPlans] = await Promise.all([ + fetchFeatures({ secretKey }), + fetchPlans({ secretKey, includeArchived: true }), + ]); + + // Transform to SDK types + const features = apiFeatures.map(transformApiFeature); + const plans = apiPlans.map(transformApiPlan); + + return { features, plans }; +} diff --git a/atmn/src/commands/pull/sdkTypes.ts b/atmn/src/commands/pull/sdkTypes.ts new file mode 100644 index 00000000..3172b9d3 --- /dev/null +++ b/atmn/src/commands/pull/sdkTypes.ts @@ -0,0 +1,73 @@ +import { writeFileSync } from "node:fs"; +import { resolve } from "node:path"; +import prettier from "prettier"; +import type { Feature, Plan } from "../../../source/compose/models/index.js"; +import { featureIdToVarName, planIdToVarName } from "../../lib/transforms/index.js"; + +/** + * Generate SDK types file (@useautumn-sdk.d.ts) + */ +export async function generateSdkTypes(options: { + features: Feature[]; + plans: Plan[]; + outputDir: string; +}): Promise { + const { features, plans, outputDir } = options; + const outputPath = resolve(outputDir, "@useautumn-sdk.d.ts"); + + // Generate type definitions + const sections: string[] = []; + + // Header + sections.push(`// AUTO-GENERATED by atmn pull`); + sections.push(`// DO NOT EDIT MANUALLY`); + sections.push(``); + sections.push(`declare module '@useautumn/sdk' {`); + sections.push(``); + + // Feature types + if (features.length > 0) { + sections.push(` // Features`); + for (const feature of features) { + const varName = featureIdToVarName(feature.id); + sections.push(` export const ${varName}: Feature;`); + } + sections.push(``); + } + + // Plan types + if (plans.length > 0) { + sections.push(` // Plans`); + for (const plan of plans) { + const varName = planIdToVarName(plan.id); + sections.push(` export const ${varName}: Plan;`); + } + sections.push(``); + } + + // Base types (reference autumn.config.ts) + sections.push(` // Base types`); + sections.push(` export type Feature = import('./autumn.config').Feature;`); + sections.push(` export type Plan = import('./autumn.config').Plan;`); + sections.push(`}`); + + const code = sections.join("\n"); + + // Format with prettier + let formattedCode: string; + try { + formattedCode = await prettier.format(code, { + parser: "typescript", + useTabs: false, + singleQuote: true, + }); + } catch (error) { + console.warn("Failed to format SDK types file:", error); + formattedCode = code; + } + + // Write file + writeFileSync(outputPath, formattedCode, "utf-8"); + + return outputPath; +} diff --git a/atmn/src/commands/pull/types.ts b/atmn/src/commands/pull/types.ts new file mode 100644 index 00000000..86385f53 --- /dev/null +++ b/atmn/src/commands/pull/types.ts @@ -0,0 +1,36 @@ +import type { Feature, Plan } from "../../../source/compose/models/index.js"; +import type { AppEnv } from "../../lib/env/index.js"; + +/** + * Options for pull command + */ +export interface PullOptions { + /** Whether to generate SDK types (.d.ts) */ + generateSdkTypes?: boolean; + /** Working directory (defaults to process.cwd()) */ + cwd?: string; + /** Environment to pull from (defaults to AppEnv.Sandbox) */ + environment?: AppEnv; +} + +/** + * Result of pull operation + */ +export interface PullResult { + /** Features pulled from sandbox */ + features: Feature[]; + /** Plans pulled from sandbox */ + plans: Plan[]; + /** Path to generated config file */ + configPath: string; + /** Path to generated SDK types file (if generateSdkTypes was true) */ + sdkTypesPath?: string; +} + +/** + * Data fetched and transformed from an environment + */ +export interface EnvironmentData { + features: Feature[]; + plans: Plan[]; +} diff --git a/atmn/src/commands/pull/writeConfig.ts b/atmn/src/commands/pull/writeConfig.ts new file mode 100644 index 00000000..d1214af8 --- /dev/null +++ b/atmn/src/commands/pull/writeConfig.ts @@ -0,0 +1,38 @@ +import { writeFileSync } from "node:fs"; +import { resolve } from "node:path"; +import prettier from "prettier"; +import { buildConfigFile } from "../../lib/transforms/index.js"; +import type { Feature, Plan } from "../../../source/compose/models/index.js"; + +/** + * Write autumn.config.ts file with formatting + */ +export async function writeConfig( + features: Feature[], + plans: Plan[], + cwd: string = process.cwd(), +): Promise { + const configPath = resolve(cwd, "autumn.config.ts"); + + // Generate code + const code = buildConfigFile(features, plans); + + // Format with prettier + let formattedCode: string; + try { + formattedCode = await prettier.format(code, { + parser: "typescript", + useTabs: true, + singleQuote: true, + }); + } catch (error) { + // If formatting fails, use unformatted code + console.warn("Failed to format config file:", error); + formattedCode = code; + } + + // Write file + writeFileSync(configPath, formattedCode, "utf-8"); + + return configPath; +} diff --git a/atmn/src/commands/test-template.tsx b/atmn/src/commands/test-template.tsx new file mode 100644 index 00000000..afd13fe5 --- /dev/null +++ b/atmn/src/commands/test-template.tsx @@ -0,0 +1,7 @@ +import React from 'react'; +import { render } from 'ink'; +import { TemplateSelector } from '../views/react/template/TemplateSelector.js'; + +export function testTemplateCommand() { + render(); +} diff --git a/atmn/src/constants.ts b/atmn/src/constants.ts new file mode 100644 index 00000000..73c6e5f1 --- /dev/null +++ b/atmn/src/constants.ts @@ -0,0 +1,4 @@ +export const FRONTEND_URL = "http://localhost:3000"; +export const BACKEND_URL = "http://localhost:8080"; +// export const FRONTEND_URL = 'http://app.useautumn.com'; +// export const BACKEND_URL = 'https://api.useautumn.com'; diff --git a/atmn/src/lib/animation/explosion.ts b/atmn/src/lib/animation/explosion.ts new file mode 100644 index 00000000..b64318fb --- /dev/null +++ b/atmn/src/lib/animation/explosion.ts @@ -0,0 +1,102 @@ +/** + * Explosion animation utility + * Reverse-engineered from LazyGit's nuke animation + */ + +export interface ExplodeOptions { + width: number; + height: number; + maxFrames?: number; +} + +const EXPLOSION_CHARS = ['*', '.', '@', '#', '&', '+', '%']; + +/** + * Generate an explosion frame + * @param width - Width of the explosion area + * @param height - Height of the explosion area + * @param frame - Current frame number (0 to max) + * @param maxFrames - Total number of frames + * @returns String representing the explosion frame + */ +export function getExplodeFrame( + width: number, + height: number, + frame: number, + maxFrames: number, +): string { + const lines: string[] = []; + + // Calculate the center of explosion + const centerX = Math.floor(width / 2); + const centerY = Math.floor(height / 2); + + // Calculate the max radius (hypotenuse of the view) + const maxRadius = Math.hypot(centerX, centerY); + + // Calculate frame as a proportion of max, apply square root for non-linear effect + const progress = Math.sqrt(frame / maxFrames); + + // Calculate radius of explosion according to frame + const radius = progress * maxRadius * 2; + + // Calculate inner radius for shockwave effect + const innerRadius = progress > 0.5 ? (progress - 0.5) * 2 * maxRadius : 0; + + // Make probability threshold more aggressive near the end to ensure all chars disappear + // Use exponential curve: progress^4 makes it much harder for chars to appear as we approach 1.0 + // At 90% progress, threshold = 0.656, at 95% = 0.814, at 99% = 0.961 + const threshold = Math.pow(progress, 4); + + for (let y = 0; y < height; y++) { + let line = ''; + for (let x = 0; x < width; x++) { + // Calculate distance from center, scale y by 2 to compensate for character aspect ratio + const distance = Math.hypot(x - centerX, (y - centerY) * 2); + + // If distance is within explosion ring, draw explosion char + if (distance <= radius && distance >= innerRadius) { + // Make placement random and less likely as explosion progresses + // Add extra multiplier for final 15% to guarantee fadeout + const fadeMultiplier = progress > 0.85 ? 1 + (progress - 0.85) * 10 : 1; + const effectiveThreshold = Math.min(threshold * fadeMultiplier, 1.0); + + if (Math.random() > effectiveThreshold) { + // Pick a random explosion char + const char = EXPLOSION_CHARS[Math.floor(Math.random() * EXPLOSION_CHARS.length)]; + line += char; + } else { + line += ' '; + } + } else { + // Empty space + line += ' '; + } + } + lines.push(line); + } + + return lines.join('\n'); +} + +/** + * Get color for current frame (cycles through colors as animation progresses) + */ +export function getExplosionColor(frame: number, maxFrames: number): string { + const colors = ['white', 'yellow', 'red', 'blue', 'blackBright']; + const index = Math.floor((frame * colors.length) / maxFrames) % colors.length; + return colors[index] as string; +} + +/** + * Generate all frames for the explosion animation + */ +export function* generateExplosionFrames(options: ExplodeOptions) { + const { width, height, maxFrames = 25 } = options; + + for (let frame = 0; frame < maxFrames; frame++) { + const image = getExplodeFrame(width, height, frame, maxFrames); + const color = getExplosionColor(frame, maxFrames); + yield { image, color, frame, progress: frame / maxFrames }; + } +} diff --git a/atmn/src/lib/api/client.ts b/atmn/src/lib/api/client.ts new file mode 100644 index 00000000..258a1fc9 --- /dev/null +++ b/atmn/src/lib/api/client.ts @@ -0,0 +1,86 @@ +import { BACKEND_URL } from "../../constants.js"; + +/** + * Low-level API client for making authenticated requests + */ + +export interface RequestOptions { + method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; + path: string; + secretKey: string; + body?: unknown; + queryParams?: Record; +} + +export interface ApiError extends Error { + status?: number; + response?: unknown; +} + +/** + * Make an authenticated API request + */ +export async function request( + options: RequestOptions, +): Promise { + const { method, path, secretKey, body, queryParams } = options; + + // Build URL with query params + const url = new URL(path, BACKEND_URL); + if (queryParams) { + for (const [key, value] of Object.entries(queryParams)) { + url.searchParams.set(key, String(value)); + } + } + + // Build request + const headers: Record = { + Authorization: `Bearer ${secretKey}`, + "Content-Type": "application/json", + "X-API-Version": "2.0.0", + }; + + const requestInit: RequestInit = { + method, + headers, + }; + + if (body && (method === "POST" || method === "PUT" || method === "PATCH")) { + requestInit.body = JSON.stringify(body); + } + + // Make request + try { + const response = await fetch(url.toString(), requestInit); + + // Parse response + let data: unknown; + const contentType = response.headers.get("content-type"); + if (contentType?.includes("application/json")) { + data = await response.json(); + } else { + data = await response.text(); + } + + // Check for errors + if (!response.ok) { + const error = new Error( + `API request failed: ${response.status} ${response.statusText}`, + ) as ApiError; + error.status = response.status; + error.response = data; + throw error; + } + + return data as T; + } catch (error) { + if (error instanceof Error && "status" in error) { + throw error; // Re-throw API errors + } + // Wrap network errors + const apiError = new Error( + `Network request failed: ${error instanceof Error ? error.message : String(error)}`, + ) as ApiError; + throw apiError; + } +} diff --git a/atmn/src/lib/api/endpoints/customers.ts b/atmn/src/lib/api/endpoints/customers.ts new file mode 100644 index 00000000..5037a880 --- /dev/null +++ b/atmn/src/lib/api/endpoints/customers.ts @@ -0,0 +1,75 @@ +import { request } from "../client.js"; + +/** + * Customer API endpoints + */ + +/** + * Customer response with X-API-Version: 2.0.0 (flat structure) + * Matches BaseApiCustomerSchema from server + */ +export interface ApiCustomer { + autumn_id?: string; + id: string; + name: string | null; + email: string | null; + created_at: number; + fingerprint: string | null; + stripe_id: string | null; + env: string; + metadata: Record; + subscriptions: unknown[]; + scheduled_subscriptions: unknown[]; + balances: Record; +} + +export interface FetchCustomersOptions { + secretKey: string; + limit?: number; + offset?: number; +} + +export interface FetchCustomersResponse { + list: ApiCustomer[]; + total: number; + limit: number; + offset: number; + has_more: boolean; +} + +/** + * Fetch all customers using V1 endpoint (GET with query params) + */ +export async function fetchCustomers( + options: FetchCustomersOptions +): Promise { + const { secretKey, limit = 100, offset = 0 } = options; + + const response = await request({ + method: "GET", + path: "/v1/customers", + secretKey, + queryParams: { + limit, + offset, + }, + }); + + return response.list; +} + +/** + * Delete a single customer + */ +export async function deleteCustomer(options: { + secretKey: string; + customerId: string; +}): Promise { + const { secretKey, customerId } = options; + + await request({ + method: "DELETE", + path: `/v1/customers/${customerId}`, + secretKey, + }); +} diff --git a/atmn/src/lib/api/endpoints/features.ts b/atmn/src/lib/api/endpoints/features.ts new file mode 100644 index 00000000..b13b0a65 --- /dev/null +++ b/atmn/src/lib/api/endpoints/features.ts @@ -0,0 +1,43 @@ +import { request } from "../client.js"; +import type { ApiFeature } from "../types/index.js"; + +/** + * Fetch features from API + */ +export interface FetchFeaturesOptions { + secretKey: string; +} + +export interface FetchFeaturesResponse { + list: ApiFeature[]; +} + +export async function fetchFeatures( + options: FetchFeaturesOptions, +): Promise { + const { secretKey } = options; + + const response = await request({ + method: "GET", + path: "/v1/features", + secretKey, + }); + + return response.list; +} + +/** + * Delete a single feature + */ +export async function deleteFeature(options: { + secretKey: string; + featureId: string; +}): Promise { + const { secretKey, featureId } = options; + + await request({ + method: "DELETE", + path: `/v1/features/${featureId}`, + secretKey, + }); +} diff --git a/atmn/src/lib/api/endpoints/index.ts b/atmn/src/lib/api/endpoints/index.ts new file mode 100644 index 00000000..9a500bb9 --- /dev/null +++ b/atmn/src/lib/api/endpoints/index.ts @@ -0,0 +1,8 @@ +export { fetchPlans, type FetchPlansOptions } from "./plans.js"; +export { fetchFeatures, type FetchFeaturesOptions } from "./features.js"; +export { + fetchOrganization, + fetchOrganizationMe, + type FetchOrganizationOptions, + type OrganizationMeInfo, +} from "./organization.js"; diff --git a/atmn/src/lib/api/endpoints/organization.ts b/atmn/src/lib/api/endpoints/organization.ts new file mode 100644 index 00000000..0998ddd4 --- /dev/null +++ b/atmn/src/lib/api/endpoints/organization.ts @@ -0,0 +1,45 @@ +import { request } from "../client.js"; +import type { ApiOrganization } from "../types/index.js"; + +/** + * Fetch organization details from API + */ +export interface FetchOrganizationOptions { + secretKey: string; +} + +export async function fetchOrganization( + options: FetchOrganizationOptions, +): Promise { + const { secretKey } = options; + + return request({ + method: "GET", + path: "/v1/organization", + secretKey, + }); +} + +/** + * Organization info response from /me endpoint + */ +export interface OrganizationMeInfo { + name: string; + slug: string; + env: string; +} + +/** + * Fetch current organization info (name, slug, env) + */ +export async function fetchOrganizationMe( + options: FetchOrganizationOptions, +): Promise { + const { secretKey } = options; + + return request({ + method: "GET", + path: "/v1/organization/me", + secretKey, + }); +} diff --git a/atmn/src/lib/api/endpoints/plans.ts b/atmn/src/lib/api/endpoints/plans.ts new file mode 100644 index 00000000..47d13dad --- /dev/null +++ b/atmn/src/lib/api/endpoints/plans.ts @@ -0,0 +1,51 @@ +import { request } from "../client.js"; +import type { ApiPlan } from "../types/index.js"; + +/** + * Fetch plans from API + */ +export interface FetchPlansOptions { + secretKey: string; + includeArchived?: boolean; +} + +export interface FetchPlansResponse { + list: ApiPlan[]; +} + +export async function fetchPlans( + options: FetchPlansOptions, +): Promise { + const { secretKey, includeArchived = true } = options; + + const response = await request({ + method: "GET", + path: "/v1/products", + secretKey, + queryParams: { + include_archived: includeArchived, + }, + }); + + return response.list; +} + +/** + * Delete a single plan + */ +export async function deletePlan(options: { + secretKey: string; + planId: string; + allVersions?: boolean; +}): Promise { + const { secretKey, planId, allVersions = true } = options; + + await request({ + method: "DELETE", + path: `/v1/products/${planId}`, + secretKey, + queryParams: { + all_versions: allVersions, + }, + }); +} diff --git a/atmn/src/lib/api/types/feature.ts b/atmn/src/lib/api/types/feature.ts new file mode 100644 index 00000000..4bcd1d53 --- /dev/null +++ b/atmn/src/lib/api/types/feature.ts @@ -0,0 +1,14 @@ +// AUTO-GENERATED - DO NOT EDIT MANUALLY +// Generated from @autumn/shared API schemas +// Run typegen to regenerate + +import type { ApiFeatureV1 } from "../../../../../../../sirtenzin-autumn/shared/api/features/apiFeatureV1.js"; + +/** + * ApiFeature - Raw API response type + * Source: apiFeatureV1.ts + * + * This type matches the exact structure returned by the Autumn API. + * Use transform functions in src/lib/transforms/apiToSdk to convert to SDK types. + */ +export type ApiFeature = ApiFeatureV1; diff --git a/atmn/src/lib/api/types/index.ts b/atmn/src/lib/api/types/index.ts new file mode 100644 index 00000000..819b6421 --- /dev/null +++ b/atmn/src/lib/api/types/index.ts @@ -0,0 +1,7 @@ +// AUTO-GENERATED - DO NOT EDIT MANUALLY +// Re-exports for API types + +export type { ApiPlan } from "./plan.js"; +export type { ApiPlanFeature } from "./planFeature.js"; +export type { ApiFeature } from "./feature.js"; +export type { ApiOrganization } from "./organization.js"; diff --git a/atmn/src/lib/api/types/organization.ts b/atmn/src/lib/api/types/organization.ts new file mode 100644 index 00000000..28ecced6 --- /dev/null +++ b/atmn/src/lib/api/types/organization.ts @@ -0,0 +1,12 @@ +// Manual type - not auto-generated + +/** + * Organization API response type + */ +export interface ApiOrganization { + id: string; + name: string; + slug: string; + stripe_connection?: string; + created_at: number; +} diff --git a/atmn/src/lib/api/types/plan.ts b/atmn/src/lib/api/types/plan.ts new file mode 100644 index 00000000..a88ae6ed --- /dev/null +++ b/atmn/src/lib/api/types/plan.ts @@ -0,0 +1,14 @@ +// AUTO-GENERATED - DO NOT EDIT MANUALLY +// Generated from @autumn/shared API schemas +// Run typegen to regenerate + +import type { ApiPlan } from "../../../../../../../sirtenzin-autumn/shared/api/products/apiPlan.js"; + +/** + * ApiPlan - Raw API response type + * Source: apiPlan.ts + * + * This type matches the exact structure returned by the Autumn API. + * Use transform functions in src/lib/transforms/apiToSdk to convert to SDK types. + */ +export type { ApiPlan }; diff --git a/atmn/src/lib/api/types/planFeature.ts b/atmn/src/lib/api/types/planFeature.ts new file mode 100644 index 00000000..2c83a26d --- /dev/null +++ b/atmn/src/lib/api/types/planFeature.ts @@ -0,0 +1,14 @@ +// AUTO-GENERATED - DO NOT EDIT MANUALLY +// Generated from @autumn/shared API schemas +// Run typegen to regenerate + +import type { ApiPlanFeature } from "../../../../../../../sirtenzin-autumn/shared/api/products/planFeature/apiPlanFeature.js"; + +/** + * ApiPlanFeature - Raw API response type + * Source: apiPlanFeature.ts + * + * This type matches the exact structure returned by the Autumn API. + * Use transform functions in src/lib/transforms/apiToSdk to convert to SDK types. + */ +export type { ApiPlanFeature }; diff --git a/atmn/src/lib/constants/templates.ts b/atmn/src/lib/constants/templates.ts new file mode 100644 index 00000000..a83b2df0 --- /dev/null +++ b/atmn/src/lib/constants/templates.ts @@ -0,0 +1,129 @@ +/** + * Template data for the template selector + * Each template has 3 pricing plans with features + */ + +export interface PlanData { + name: string; + features: string[]; + price: string; + badge?: string; +} + +export const templateData: Record = { + Blacktriangle: [ + { + name: "Hobby", + features: [ + "100 GB bandwidth", + "Serverless functions", + "Edge network", + "Community support", + ], + price: "$0/month", + }, + { + name: "Pro", + badge: "most popular", + features: [ + "1 TB bandwidth", + "Advanced analytics", + "Team collaboration", + "Preview deployments", + "Priority support", + "Custom domains", + "DDoS protection", + ], + price: "$20/month", + }, + { + name: "Enterprise", + features: [ + "Unlimited bandwidth", + "SLA guarantee", + "Dedicated support", + "SSO & SAML", + "Custom contracts", + ], + price: "Custom", + }, + ], + RatGPT: [ + { + name: "Free", + features: [ + "50 messages/day", + "Basic AI model", + "Web access", + "Standard speed", + ], + price: "$0/month", + }, + { + name: "Plus", + badge: "most popular", + features: [ + "Unlimited messages", + "Advanced AI models", + "Priority access", + "Plugins & tools", + "Image generation", + "Voice mode", + "File uploads", + ], + price: "$20/month", + }, + { + name: "Team", + features: [ + "All Plus features", + "Admin console", + "Team workspace", + "Usage analytics", + "Priority support", + ], + price: "$25/user/mo", + }, + ], + Aksiom: [ + { + name: "Starter", + features: [ + "1 GB ingest/mo", + "7 day retention", + "Basic dashboards", + "Email alerts", + ], + price: "$0/month", + }, + { + name: "Pro", + badge: "most popular", + features: [ + "50 GB ingest/mo", + "30 day retention", + "Advanced queries", + "Team access", + "Slack alerts", + "API access", + "Custom dashboards", + ], + price: "$25/month", + }, + { + name: "Enterprise", + features: [ + "Unlimited ingest", + "90 day retention", + "SSO & RBAC", + "Dedicated support", + "SLA guarantee", + ], + price: "Custom", + }, + ], +}; + +export const templates = ["Blacktriangle", "RatGPT", "Aksiom"] as const; + +export type TemplateName = (typeof templates)[number]; diff --git a/atmn/src/lib/constants/templates/aksiom.config.ts b/atmn/src/lib/constants/templates/aksiom.config.ts new file mode 100644 index 00000000..783c7840 --- /dev/null +++ b/atmn/src/lib/constants/templates/aksiom.config.ts @@ -0,0 +1,92 @@ +/** + * Aksiom - Axiom-style pricing (observability/logging) + * Starter (free) / Pro ($25/mo) / Enterprise (custom) + */ + +import type { Feature, Plan } from "../../../../source/compose/models/index.js"; + +export const features: Feature[] = [ + { + id: "ingest", + name: "Data Ingest", + type: "metered", + consumable: true, + }, + { + id: "retention_days", + name: "Data Retention", + type: "metered", + consumable: false, + }, + { + id: "dashboards", + name: "Custom Dashboards", + type: "boolean", + }, + { + id: "advanced_queries", + name: "Advanced Queries", + type: "boolean", + }, + { + id: "team_access", + name: "Team Access", + type: "boolean", + }, + { + id: "api_access", + name: "API Access", + type: "boolean", + }, + { + id: "sso_rbac", + name: "SSO & RBAC", + type: "boolean", + }, + { + id: "sla", + name: "SLA Guarantee", + type: "boolean", + }, +]; + +export const plans: Plan[] = [ + { + id: "starter", + name: "Starter", + description: "For small projects and experimentation", + features: [ + { feature_id: "ingest", included: 1 }, // 1 GB/mo + { feature_id: "retention_days", included: 7 }, + ], + }, + { + id: "pro", + name: "Pro", + description: "For growing teams and production workloads", + price: { amount: 25, interval: "month" }, + features: [ + { feature_id: "ingest", included: 50 }, // 50 GB/mo + { feature_id: "retention_days", included: 30 }, + { feature_id: "dashboards" }, + { feature_id: "advanced_queries" }, + { feature_id: "team_access" }, + { feature_id: "api_access" }, + ], + }, + { + id: "enterprise", + name: "Enterprise", + description: "For large organizations with compliance needs", + features: [ + { feature_id: "ingest", unlimited: true }, + { feature_id: "retention_days", included: 90 }, + { feature_id: "dashboards" }, + { feature_id: "advanced_queries" }, + { feature_id: "team_access" }, + { feature_id: "api_access" }, + { feature_id: "sso_rbac" }, + { feature_id: "sla" }, + ], + }, +]; diff --git a/atmn/src/lib/constants/templates/blacktriangle.config.ts b/atmn/src/lib/constants/templates/blacktriangle.config.ts new file mode 100644 index 00000000..7f72f253 --- /dev/null +++ b/atmn/src/lib/constants/templates/blacktriangle.config.ts @@ -0,0 +1,86 @@ +/** + * Blacktriangle - Vercel-style pricing + * Hobby (free) / Pro ($20/mo) / Enterprise (custom) + */ + +import type { Feature, Plan } from "../../../../source/compose/models/index.js"; + +export const features: Feature[] = [ + { + id: "bandwidth", + name: "Bandwidth", + type: "metered", + consumable: true, + }, + { + id: "serverless_functions", + name: "Serverless Functions", + type: "boolean", + }, + { + id: "edge_network", + name: "Edge Network", + type: "boolean", + }, + { + id: "advanced_analytics", + name: "Advanced Analytics", + type: "boolean", + }, + { + id: "team_collaboration", + name: "Team Collaboration", + type: "boolean", + }, + { + id: "priority_support", + name: "Priority Support", + type: "boolean", + }, + { + id: "sso", + name: "SSO & SAML", + type: "boolean", + }, +]; + +export const plans: Plan[] = [ + { + id: "hobby", + name: "Hobby", + description: "For personal projects and experimentation", + features: [ + { feature_id: "bandwidth", included: 100 }, // 100 GB + { feature_id: "serverless_functions" }, + { feature_id: "edge_network" }, + ], + }, + { + id: "pro", + name: "Pro", + description: "For professional developers and small teams", + price: { amount: 20, interval: "month" }, + features: [ + { feature_id: "bandwidth", included: 1000 }, // 1 TB + { feature_id: "serverless_functions" }, + { feature_id: "edge_network" }, + { feature_id: "advanced_analytics" }, + { feature_id: "team_collaboration" }, + { feature_id: "priority_support" }, + ], + }, + { + id: "enterprise", + name: "Enterprise", + description: "For large organizations with custom needs", + features: [ + { feature_id: "bandwidth", unlimited: true }, + { feature_id: "serverless_functions" }, + { feature_id: "edge_network" }, + { feature_id: "advanced_analytics" }, + { feature_id: "team_collaboration" }, + { feature_id: "priority_support" }, + { feature_id: "sso" }, + ], + }, +]; diff --git a/atmn/src/lib/constants/templates/index.ts b/atmn/src/lib/constants/templates/index.ts new file mode 100644 index 00000000..e0314413 --- /dev/null +++ b/atmn/src/lib/constants/templates/index.ts @@ -0,0 +1,28 @@ +/** + * Template configurations index + */ + +import type { Feature, Plan } from "../../../../source/compose/models/index.js"; +import * as blacktriangle from "./blacktriangle.config.js"; +import * as ratgpt from "./ratgpt.config.js"; +import * as aksiom from "./aksiom.config.js"; + +export interface TemplateConfig { + features: Feature[]; + plans: Plan[]; +} + +export const templateConfigs: Record = { + Blacktriangle: { + features: blacktriangle.features, + plans: blacktriangle.plans, + }, + RatGPT: { + features: ratgpt.features, + plans: ratgpt.plans, + }, + Aksiom: { + features: aksiom.features, + plans: aksiom.plans, + }, +}; diff --git a/atmn/src/lib/constants/templates/ratgpt.config.ts b/atmn/src/lib/constants/templates/ratgpt.config.ts new file mode 100644 index 00000000..f0e5bc9b --- /dev/null +++ b/atmn/src/lib/constants/templates/ratgpt.config.ts @@ -0,0 +1,88 @@ +/** + * RatGPT - ChatGPT-style pricing + * Free / Plus ($20/mo) / Team ($25/user/mo) + */ + +import type { Feature, Plan } from "../../../../source/compose/models/index.js"; + +export const features: Feature[] = [ + { + id: "messages", + name: "Messages", + type: "metered", + consumable: true, + }, + { + id: "advanced_models", + name: "Advanced AI Models", + type: "boolean", + }, + { + id: "image_generation", + name: "Image Generation", + type: "boolean", + }, + { + id: "voice_mode", + name: "Voice Mode", + type: "boolean", + }, + { + id: "file_uploads", + name: "File Uploads", + type: "boolean", + }, + { + id: "team_seats", + name: "Team Seats", + type: "metered", + consumable: false, // Seats are not consumed, they accumulate + }, + { + id: "admin_console", + name: "Admin Console", + type: "boolean", + }, +]; + +export const plans: Plan[] = [ + { + id: "free", + name: "Free", + description: "Get started with basic AI capabilities", + features: [ + { feature_id: "messages", included: 50, interval: "day" }, + ], + }, + { + id: "plus", + name: "Plus", + description: "Enhanced AI with unlimited access", + price: { amount: 20, interval: "month" }, + features: [ + { feature_id: "messages", unlimited: true }, + { feature_id: "advanced_models" }, + { feature_id: "image_generation" }, + { feature_id: "voice_mode" }, + { feature_id: "file_uploads" }, + ], + }, + { + id: "team", + name: "Team", + description: "Collaborate with your entire team", + price: { amount: 25, interval: "month" }, + features: [ + { feature_id: "messages", unlimited: true }, + { feature_id: "advanced_models" }, + { feature_id: "image_generation" }, + { feature_id: "voice_mode" }, + { feature_id: "file_uploads" }, + { + feature_id: "team_seats", + price: { amount: 25 }, + }, + { feature_id: "admin_console" }, + ], + }, +]; diff --git a/atmn/src/lib/env/detect.ts b/atmn/src/lib/env/detect.ts new file mode 100644 index 00000000..fecd5f9e --- /dev/null +++ b/atmn/src/lib/env/detect.ts @@ -0,0 +1,53 @@ +/** + * Environment detection and key validation utilities + */ + +/** + * Application environment enum + * Matches the canonical AppEnv enum from shared/models + */ +export enum AppEnv { + Sandbox = "sandbox", + Live = "live", +} + +/** + * Detect environment from API key format + * Sandbox keys contain '_test_', live keys contain '_live_' + */ +export function getEnvironmentFromKey(key: string): AppEnv { + if (key.includes("_test_")) { + return AppEnv.Sandbox; + } + if (key.includes("_live_")) { + return AppEnv.Live; + } + throw new Error( + `Invalid API key format: must contain '_test_' (sandbox) or '_live_' (live)`, + ); +} + +/** + * Check if key is a sandbox key + */ +export function isSandboxKey(key: string): boolean { + return key.includes("_test_"); +} + +/** + * Check if key is a live/production key + */ +export function isLiveKey(key: string): boolean { + return key.includes("_live_"); +} + +/** + * Validate key format (basic check) + */ +export function isValidKey(key: string): boolean { + return ( + typeof key === "string" && + key.length > 0 && + (isSandboxKey(key) || isLiveKey(key)) + ); +} diff --git a/atmn/src/lib/env/dotenv.ts b/atmn/src/lib/env/dotenv.ts new file mode 100644 index 00000000..36b1d819 --- /dev/null +++ b/atmn/src/lib/env/dotenv.ts @@ -0,0 +1,103 @@ +import { readFileSync, writeFileSync, existsSync } from "node:fs"; +import { resolve } from "node:path"; + +/** + * Low-level .env file reading/writing utilities + */ + +export interface DotenvEntry { + key: string; + value: string; +} + +/** + * Parse .env file content into key-value pairs + */ +export function parseDotenv(content: string): Map { + const entries = new Map(); + + for (const line of content.split("\n")) { + const trimmed = line.trim(); + + // Skip comments and empty lines + if (!trimmed || trimmed.startsWith("#")) { + continue; + } + + // Parse KEY=VALUE + const match = trimmed.match(/^([^=]+)=(.*)$/); + if (match) { + const [, key, value] = match; + if (key && value !== undefined) { + // Remove quotes if present + const cleanValue = value.replace(/^["']|["']$/g, ""); + entries.set(key.trim(), cleanValue); + } + } + } + + return entries; +} + +/** + * Read a .env file and return parsed entries + */ +export function readDotenvFile(filePath: string): Map { + if (!existsSync(filePath)) { + return new Map(); + } + + try { + const content = readFileSync(filePath, "utf-8"); + return parseDotenv(content); + } catch (error) { + return new Map(); + } +} + +/** + * Write entries to a .env file + */ +export function writeDotenvFile( + filePath: string, + entries: Map, +): void { + const lines = Array.from(entries.entries()) + .map(([key, value]) => { + // Quote values that contain spaces + const quotedValue = value.includes(" ") ? `"${value}"` : value; + return `${key}=${quotedValue}`; + }) + .join("\n"); + + writeFileSync(filePath, lines + "\n", "utf-8"); +} + +/** + * Get value from .env file (checks .env.local first, then .env) + */ +export function getDotenvValue(key: string, cwd = process.cwd()): string | undefined { + const localPath = resolve(cwd, ".env.local"); + const localEntries = readDotenvFile(localPath); + if (localEntries.has(key)) { + return localEntries.get(key); + } + + const envPath = resolve(cwd, ".env"); + const envEntries = readDotenvFile(envPath); + return envEntries.get(key); +} + +/** + * Set value in .env file (always writes to .env, not .env.local) + */ +export function setDotenvValue( + key: string, + value: string, + cwd = process.cwd(), +): void { + const envPath = resolve(cwd, ".env"); + const entries = readDotenvFile(envPath); + entries.set(key, value); + writeDotenvFile(envPath, entries); +} diff --git a/atmn/src/lib/env/index.ts b/atmn/src/lib/env/index.ts new file mode 100644 index 00000000..bedfc7ac --- /dev/null +++ b/atmn/src/lib/env/index.ts @@ -0,0 +1,16 @@ +export { readApiKeys, getKey, hasKey, getAnyKey } from "./keys.js"; +export { + AppEnv, + getEnvironmentFromKey, + isSandboxKey, + isLiveKey, + isValidKey, +} from "./detect.js"; +export { + parseDotenv, + readDotenvFile, + writeDotenvFile, + getDotenvValue, + setDotenvValue, + type DotenvEntry, +} from "./dotenv.js"; diff --git a/atmn/src/lib/env/keys.ts b/atmn/src/lib/env/keys.ts new file mode 100644 index 00000000..558bbddc --- /dev/null +++ b/atmn/src/lib/env/keys.ts @@ -0,0 +1,72 @@ +import { AppEnv, isValidKey } from "./detect.js"; +import { getDotenvValue } from "./dotenv.js"; + +/** + * API key management utilities + */ + +export interface ApiKeys { + [AppEnv.Sandbox]?: string; + [AppEnv.Live]?: string; +} + +/** + * Read API keys from .env files + * Returns keys organized by environment + * + * Standard naming convention: + * - AUTUMN_SECRET_KEY: sandbox key (am_sk_test_* prefix) + * - AUTUMN_PROD_SECRET_KEY: production/live key (am_sk_live_* prefix) + */ +export function readApiKeys(cwd?: string): ApiKeys { + const keys: ApiKeys = {}; + + // Read standard environment variables + const autumnSecretKey = getDotenvValue("AUTUMN_SECRET_KEY", cwd); + const autumnProdSecretKey = getDotenvValue("AUTUMN_PROD_SECRET_KEY", cwd); + + // AUTUMN_SECRET_KEY is always sandbox (ask_* prefix) + if (autumnSecretKey && isValidKey(autumnSecretKey)) { + keys[AppEnv.Sandbox] = autumnSecretKey; + } + + // AUTUMN_PROD_SECRET_KEY is always production/live (apks_* prefix) + if (autumnProdSecretKey && isValidKey(autumnProdSecretKey)) { + keys[AppEnv.Live] = autumnProdSecretKey; + } + + return keys; +} + +/** + * Get API key for specific environment + * Throws if key is not found + */ +export function getKey(env: AppEnv, cwd?: string): string { + const keys = readApiKeys(cwd); + const key = keys[env]; + + if (!key) { + throw new Error( + `No ${env} API key found. Run 'atmn auth' to authenticate.`, + ); + } + + return key; +} + +/** + * Check if API key exists for environment + */ +export function hasKey(env: AppEnv, cwd?: string): boolean { + const keys = readApiKeys(cwd); + return !!keys[env]; +} + +/** + * Get any available key (prefers sandbox) + */ +export function getAnyKey(cwd?: string): string | undefined { + const keys = readApiKeys(cwd); + return keys[AppEnv.Sandbox] || keys[AppEnv.Live]; +} diff --git a/atmn/src/lib/hooks/index.ts b/atmn/src/lib/hooks/index.ts new file mode 100644 index 00000000..5b730976 --- /dev/null +++ b/atmn/src/lib/hooks/index.ts @@ -0,0 +1,3 @@ +export { useOrganization, type OrganizationInfo } from "./useOrganization.js"; +export { usePull, type GeneratedFile } from "./usePull.js"; +export { useConfigCounts } from "./useConfigCounts.js"; diff --git a/atmn/src/lib/hooks/useConfigCounts.ts b/atmn/src/lib/hooks/useConfigCounts.ts new file mode 100644 index 00000000..da0860bf --- /dev/null +++ b/atmn/src/lib/hooks/useConfigCounts.ts @@ -0,0 +1,33 @@ +import { useQuery } from "@tanstack/react-query"; +import { + fetchFeatures, + fetchPlans, +} from "../api/endpoints/index.js"; +import { AppEnv, getKey } from "../env/index.js"; + +interface ConfigCounts { + plansCount: number; + featuresCount: number; +} + +/** + * Hook to fetch configuration counts (plans and features) + * Uses TanStack Query for caching and state management + */ +export function useConfigCounts() { + return useQuery({ + queryKey: ["configCounts"], + queryFn: async () => { + const sandboxKey = getKey(AppEnv.Sandbox); + const [features, plans] = await Promise.all([ + fetchFeatures({ secretKey: sandboxKey }), + fetchPlans({ secretKey: sandboxKey }), + ]); + + return { + featuresCount: features.length, + plansCount: plans.length, + }; + }, + }); +} diff --git a/atmn/src/lib/hooks/useNuke.ts b/atmn/src/lib/hooks/useNuke.ts new file mode 100644 index 00000000..83188670 --- /dev/null +++ b/atmn/src/lib/hooks/useNuke.ts @@ -0,0 +1,187 @@ +/** + * useNuke hook - Manages nuke operation with TanStack Query + */ + +import { useMutation } from "@tanstack/react-query"; +import { useState } from "react"; +import { + deleteCustomersBatch, + deleteFeaturesSequential, + deletePlansSequential, +} from "../../commands/nuke/deletions.js"; +import type { + DeletionProgress, + NukePhaseStats, +} from "../../commands/nuke/types.js"; +import { getKey } from "../env/index.js"; +import { AppEnv } from "../env/detect.js"; +import { + deleteCustomer, + fetchCustomers, + type ApiCustomer, +} from "../api/endpoints/customers.js"; +import { deletePlan, fetchPlans } from "../api/endpoints/plans.js"; +import { deleteFeature, fetchFeatures } from "../api/endpoints/features.js"; + +export interface UseNukeOptions { + onComplete?: () => void; + onError?: (error: Error) => void; +} + +export interface UseNukeReturn { + /** Start the nuke operation */ + nuke: () => void; + /** Current phase statistics */ + phases: NukePhaseStats[]; + /** Currently active phase */ + activePhase: "customers" | "plans" | "features" | null; + /** Total elapsed time in seconds */ + totalElapsed: number; + /** Whether nuke is currently running */ + isNuking: boolean; + /** Error if any */ + error: Error | null; +} + +/** + * Hook to manage nuke operation with progress tracking + */ +export function useNuke(options?: UseNukeOptions): UseNukeReturn { + const [phases, setPhases] = useState([ + { phase: "customers", current: 0, total: 0, rate: 0, completed: false }, + { phase: "plans", current: 0, total: 0, rate: 0, completed: false }, + { phase: "features", current: 0, total: 0, rate: 0, completed: false }, + ]); + const [activePhase, setActivePhase] = useState< + "customers" | "plans" | "features" | null + >(null); + const [startTime, setStartTime] = useState(0); + const [currentElapsed, setCurrentElapsed] = useState(0); + + // Update elapsed time periodically + const updateElapsed = () => { + if (startTime > 0) { + setCurrentElapsed((Date.now() - startTime) / 1000); + } + }; + + const updatePhase = (progress: DeletionProgress) => { + setPhases((prev) => + prev.map((p) => + p.phase === progress.phase + ? { + ...p, + current: progress.current, + total: progress.total, + rate: progress.rate || 0, + } + : p + ) + ); + updateElapsed(); + }; + + const completePhase = ( + phase: "customers" | "plans" | "features", + duration: number + ) => { + setPhases((prev) => + prev.map((p) => (p.phase === phase ? { ...p, completed: true, duration } : p)) + ); + updateElapsed(); + }; + + const nukeMutation = useMutation({ + mutationFn: async () => { + const secretKey = getKey(AppEnv.Sandbox); + setStartTime(Date.now()); + + // Phase 1: Customers + const customersPhaseStart = Date.now(); + setActivePhase("customers"); + + const customers = await fetchCustomers({ secretKey }); + setPhases((prev) => + prev.map((p) => + p.phase === "customers" ? { ...p, total: customers.length } : p + ) + ); + + await deleteCustomersBatch( + customers.map((c: ApiCustomer) => ({ id: c.id })), + async (id: string) => { + await deleteCustomer({ secretKey, customerId: id }); + }, + updatePhase + ); + + completePhase("customers", (Date.now() - customersPhaseStart) / 1000); + + // Phase 2: Plans + const plansPhaseStart = Date.now(); + setActivePhase("plans"); + + const plans = await fetchPlans({ secretKey, includeArchived: true }); + setPhases((prev) => + prev.map((p) => (p.phase === "plans" ? { ...p, total: plans.length } : p)) + ); + + await deletePlansSequential( + plans.map((p) => ({ id: p.id })), + async (id: string, allVersions: boolean) => { + await deletePlan({ secretKey, planId: id, allVersions }); + }, + updatePhase + ); + + completePhase("plans", (Date.now() - plansPhaseStart) / 1000); + + // Wait a bit for DB to propagate plan deletions + // This prevents race conditions where features are still referenced + await new Promise(resolve => setTimeout(resolve, 1000)); + + // Phase 3: Features + const featuresPhaseStart = Date.now(); + setActivePhase("features"); + + const features = await fetchFeatures({ secretKey }); + setPhases((prev) => + prev.map((p) => + p.phase === "features" ? { ...p, total: features.length } : p + ) + ); + + await deleteFeaturesSequential( + features.map((f) => ({ id: f.id, type: f.type })), + async (id: string) => { + await deleteFeature({ secretKey, featureId: id }); + }, + updatePhase + ); + + completePhase("features", (Date.now() - featuresPhaseStart) / 1000); + + // Done! + setActivePhase(null); + }, + onSuccess: () => { + if (options?.onComplete) { + options.onComplete(); + } + }, + onError: (error: Error) => { + if (options?.onError) { + options.onError(error); + } + }, + }); + + return { + nuke: () => nukeMutation.mutate(), + phases, + activePhase, + totalElapsed: currentElapsed, + isNuking: nukeMutation.isPending, + error: nukeMutation.error, + }; +} diff --git a/atmn/src/lib/hooks/useNukeData.ts b/atmn/src/lib/hooks/useNukeData.ts new file mode 100644 index 00000000..61ed5a5a --- /dev/null +++ b/atmn/src/lib/hooks/useNukeData.ts @@ -0,0 +1,49 @@ +/** + * useNukeData hook - Fetch data needed for nuke UI + */ + +import { useQuery } from "@tanstack/react-query"; +import { getKey } from "../env/index.js"; +import { AppEnv } from "../env/detect.js"; +import { fetchCustomers } from "../api/endpoints/customers.js"; +import { fetchPlans } from "../api/endpoints/plans.js"; +import { fetchFeatures } from "../api/endpoints/features.js"; +import { getOrgMe } from "../../../source/core/requests/orgRequests.js"; + +export interface NukeData { + orgName: string; + orgSlug: string; + customersCount: number; + plansCount: number; + featuresCount: number; +} + +/** + * Fetch organization info and counts for nuke UI + */ +export function useNukeData() { + return useQuery({ + queryKey: ["nuke-data"], + queryFn: async (): Promise => { + const secretKey = getKey(AppEnv.Sandbox); + + // Fetch all data in parallel + const [org, customers, plans, features] = await Promise.all([ + getOrgMe(), + fetchCustomers({ secretKey }), + fetchPlans({ secretKey, includeArchived: true }), + fetchFeatures({ secretKey }), + ]); + + return { + orgName: org.name, + orgSlug: org.slug, + customersCount: customers.length, + plansCount: plans.length, + featuresCount: features.length, + }; + }, + staleTime: 0, // Always fetch fresh data + retry: 1, + }); +} diff --git a/atmn/src/lib/hooks/useOrganization.ts b/atmn/src/lib/hooks/useOrganization.ts new file mode 100644 index 00000000..02459a9f --- /dev/null +++ b/atmn/src/lib/hooks/useOrganization.ts @@ -0,0 +1,25 @@ +import { useQuery } from "@tanstack/react-query"; +import { fetchOrganizationMe } from "../api/endpoints/index.js"; +import { AppEnv, getKey } from "../env/index.js"; + +export interface OrganizationInfo { + name: string; + slug: string; + environment: "Sandbox" | "Live"; +} + +export function useOrganization(cwd?: string) { + return useQuery({ + queryKey: ["organization", cwd], + queryFn: async (): Promise => { + const sandboxKey = getKey(AppEnv.Sandbox, cwd); + const orgData = await fetchOrganizationMe({ secretKey: sandboxKey }); + + return { + name: orgData.name, + slug: orgData.slug, + environment: orgData.env === AppEnv.Sandbox ? "Sandbox" : "Live", + }; + }, + }); +} diff --git a/atmn/src/lib/hooks/usePull.ts b/atmn/src/lib/hooks/usePull.ts new file mode 100644 index 00000000..9fbda137 --- /dev/null +++ b/atmn/src/lib/hooks/usePull.ts @@ -0,0 +1,115 @@ +import { readFileSync } from "node:fs"; +import { useMutation } from "@tanstack/react-query"; +import { useEffect } from "react"; +import type { Feature, Plan } from "../../../source/compose/models/index.js"; +import { AppEnv } from "../env/index.js"; +import { pull } from "../../commands/pull/pull.js"; +import { useOrganization } from "./useOrganization.js"; + +export interface GeneratedFile { + name: string; + path: string; + lines: number; +} + +interface PullParams { + cwd: string; + generateSdkTypes?: boolean; + environment?: AppEnv; +} + +interface PullData { + features: Feature[]; + plans: Plan[]; + files: GeneratedFile[]; +} + +function countLines(filePath: string): number { + try { + const content = readFileSync(filePath, "utf-8"); + return content.split("\n").length; + } catch { + return 0; + } +} + +export function usePull(options?: { + cwd?: string; + environment?: AppEnv; + onComplete?: () => void; +}) { + const effectiveCwd = options?.cwd ?? process.cwd(); + const environment = options?.environment ?? AppEnv.Sandbox; + const onComplete = options?.onComplete; + + // Get org info using TanStack Query (this IS a query) + const orgQuery = useOrganization(effectiveCwd); + + // Use mutation for the pull operation + const pullMutation = useMutation({ + mutationFn: async (params: PullParams): Promise => { + const result = await pull({ + generateSdkTypes: params.generateSdkTypes ?? true, + cwd: params.cwd, + environment: params.environment ?? AppEnv.Sandbox, + }); + + const files: GeneratedFile[] = []; + + if (result.configPath) { + files.push({ + name: "autumn.config.ts", + path: result.configPath, + lines: countLines(result.configPath), + }); + } + + if (result.sdkTypesPath) { + files.push({ + name: "@useautumn-sdk.d.ts", + path: result.sdkTypesPath, + lines: countLines(result.sdkTypesPath), + }); + } + + return { + features: result.features, + plans: result.plans, + files, + }; + }, + onSuccess: () => { + // Call onComplete callback after successful pull + if (onComplete) { + // Add a small delay to let the UI show the success state + setTimeout(() => { + onComplete(); + }, 1000); + } + }, + }); + + // Auto-trigger pull when org info is ready + useEffect(() => { + if (orgQuery.isSuccess && !pullMutation.isPending && !pullMutation.isSuccess) { + pullMutation.mutate({ + cwd: effectiveCwd, + generateSdkTypes: true, + environment, + }); + } + }, [orgQuery.isSuccess, pullMutation, effectiveCwd, environment]); + + const error = orgQuery.error || pullMutation.error; + + return { + orgInfo: orgQuery.data, + features: pullMutation.data?.features ?? [], + plans: pullMutation.data?.plans ?? [], + files: pullMutation.data?.files ?? [], + isOrgLoading: orgQuery.isLoading, + isPullLoading: pullMutation.isPending, + isSuccess: pullMutation.isSuccess, + error: error ? (error instanceof Error ? error.message : String(error)) : null, + }; +} diff --git a/atmn/src/lib/providers/QueryProvider.tsx b/atmn/src/lib/providers/QueryProvider.tsx new file mode 100644 index 00000000..022d98ed --- /dev/null +++ b/atmn/src/lib/providers/QueryProvider.tsx @@ -0,0 +1,23 @@ +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import React from "react"; + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + retry: false, + refetchOnWindowFocus: false, + }, + }, +}); + +interface QueryProviderProps { + children: React.ReactNode; +} + +export function QueryProvider({ children }: QueryProviderProps) { + return ( + + {children} + + ); +} diff --git a/atmn/src/lib/providers/index.ts b/atmn/src/lib/providers/index.ts new file mode 100644 index 00000000..e105c7df --- /dev/null +++ b/atmn/src/lib/providers/index.ts @@ -0,0 +1 @@ +export { QueryProvider } from "./QueryProvider.js"; diff --git a/atmn/src/lib/transforms/apiToSdk/README.md b/atmn/src/lib/transforms/apiToSdk/README.md new file mode 100644 index 00000000..3aa54a05 --- /dev/null +++ b/atmn/src/lib/transforms/apiToSdk/README.md @@ -0,0 +1,162 @@ +# API → SDK Transform Layer + +This directory contains transforms that convert Autumn API responses to SDK configuration types. + +## Declarative Transformer System + +Instead of writing repetitive imperative transform functions, we use a **declarative configuration system** that dramatically reduces code and improves maintainability. + +### Quick Example + +**Instead of this (79 lines):** +```typescript +export function transformApiFeature(apiFeature: any): Feature { + const base = { + id: apiFeature.id, + name: apiFeature.name, + event_names: apiFeature.event_names, + credit_schema: apiFeature.credit_schema, + }; + + if (apiFeature.type === "boolean") { + return { ...base, type: "boolean" as const }; + } + + if (apiFeature.type === "single_use") { + return { + ...base, + type: "metered" as const, + consumable: true, + }; + } + // ... 50+ more lines +} +``` + +**We write this (40 lines):** +```typescript +export const featureTransformer = createTransformer({ + discriminator: 'type', + cases: { + 'boolean': { + copy: ['id', 'name', 'event_names', 'credit_schema'], + compute: { type: () => 'boolean' as const }, + }, + 'single_use': { + copy: ['id', 'name', 'event_names', 'credit_schema'], + compute: { + type: () => 'metered' as const, + consumable: () => true, + }, + }, + // ... more cases + }, +}); + +export function transformApiFeature(apiFeature: any): Feature { + return featureTransformer.transform(apiFeature); +} +``` + +## Transformer API + +```typescript +createTransformer({ + // Copy fields as-is + copy: ['id', 'name', 'description'], + + // Rename fields + rename: { + 'default': 'auto_enable', + 'granted_balance': 'included', + }, + + // Flatten nested fields + flatten: { + 'reset.interval': 'interval', + 'reset.interval_count': 'interval_count', + }, + + // Compute new values + compute: { + carry_over_usage: (api) => !api.reset?.reset_when_enabled, + type: () => 'metered' as const, + }, + + // Default values for missing fields + defaults: { + credit_schema: [], + enabled: true, + }, + + // Transform nested arrays + transformArrays: { + features: { + from: 'features', + transform: planFeatureTransformer.config + } + }, +}) +``` + +### Discriminated Unions + +For types that switch behavior based on a field (like `type`): + +```typescript +createTransformer({ + discriminator: 'type', // Field to switch on + cases: { + 'boolean': { /* config for boolean */ }, + 'metered': { /* config for metered */ }, + 'credit_system': { /* config for credit */ }, + }, + default: { /* fallback config */ }, +}) +``` + +## Benefits + +1. **Self-documenting** - Config clearly shows what transforms happen +2. **DRY** - No repetitive field copying boilerplate +3. **Type-safe** - Generic input/output types +4. **Testable** - Test engine once, not each transform +5. **Composable** - Reuse configs across transforms +6. **58% less code** - 213 lines → 90 lines + reusable engine + +## Files + +- `Transformer.ts` - Core declarative transformer engine +- `feature.ts` - Feature transforms (API → SDK) +- `plan.ts` - Plan transforms (API → SDK) +- `planFeature.ts` - Plan feature transforms (API → SDK) +- `helpers.ts` - Helper functions (invert, map enums, etc.) +- `Transformer.test.ts` - Comprehensive test suite + +## Transform Mappings + +### Feature +- `type: "single_use"` → `type: "metered", consumable: true` +- `type: "continuous_use"` → `type: "metered", consumable: false` +- `type: "credit_system"` → `type: "credit_system", consumable: true` +- `type: "boolean"` → `type: "boolean"` (no consumable field) + +### Plan +- `default` → `auto_enable` +- Copy: `id`, `name`, `description`, `group`, `add_on`, `free_trial` +- Transform: `price`, `features[]` + +### Plan Feature +- `granted_balance` → `included` +- `reset.interval` → `interval` (flatten) +- `reset.interval_count` → `interval_count` (flatten) +- `reset.reset_when_enabled` → `carry_over_usage` (flatten + invert) +- `price.usage_model` → `price.billing_method` (rename) + +## Testing + +```bash +bun test src/lib/transforms/apiToSdk/Transformer.test.ts +``` + +All transforms are thoroughly tested to ensure correct behavior. diff --git a/atmn/src/lib/transforms/apiToSdk/Transformer.test.ts b/atmn/src/lib/transforms/apiToSdk/Transformer.test.ts new file mode 100644 index 00000000..996fa8be --- /dev/null +++ b/atmn/src/lib/transforms/apiToSdk/Transformer.test.ts @@ -0,0 +1,198 @@ +import { describe, test, expect } from "bun:test"; +import { createTransformer } from "./Transformer.js"; +import { transformApiFeature } from "./feature.js"; +import { transformApiPlan } from "./plan.js"; + +describe("Transformer", () => { + describe("Feature transforms", () => { + test("boolean feature", () => { + const apiFeature = { + id: "enabled", + name: "Feature Enabled", + type: "boolean", + event_names: [], + }; + + const result = transformApiFeature(apiFeature); + + expect(result.type).toBe("boolean"); + expect(result.id).toBe("enabled"); + expect(result.name).toBe("Feature Enabled"); + }); + + test("single_use → metered with consumable=true", () => { + const apiFeature = { + id: "api_calls", + name: "API Calls", + type: "single_use", + event_names: ["api.call"], + }; + + const result = transformApiFeature(apiFeature); + + expect(result.type).toBe("metered"); + expect(result.consumable).toBe(true); + expect(result.id).toBe("api_calls"); + }); + + test("continuous_use → metered with consumable=false", () => { + const apiFeature = { + id: "seats", + name: "Seats", + type: "continuous_use", + event_names: [], + }; + + const result = transformApiFeature(apiFeature); + + expect(result.type).toBe("metered"); + expect(result.consumable).toBe(false); + }); + + test("credit_system", () => { + const apiFeature = { + id: "credits", + name: "Credits", + type: "credit_system", + credit_schema: [ + { metered_feature_id: "api_calls", credit_cost: 10 } + ], + }; + + const result = transformApiFeature(apiFeature); + + expect(result.type).toBe("credit_system"); + expect(result.consumable).toBe(true); + expect(result.credit_schema).toHaveLength(1); + }); + }); + + describe("Plan transforms", () => { + test("basic plan with default → auto_enable rename", () => { + const apiPlan: any = { + id: "pro", + name: "Pro Plan", + description: "Professional tier", + default: true, + features: [], + }; + + const result = transformApiPlan(apiPlan); + + expect(result.auto_enable).toBe(true); + expect('default' in result).toBe(false); + expect(result.id).toBe("pro"); + }); + + test("plan with price", () => { + const apiPlan: any = { + id: "premium", + name: "Premium", + price: { + amount: 9900, + interval: "month" as const, + }, + features: [], + }; + + const result = transformApiPlan(apiPlan); + + expect(result.price).toEqual({ + amount: 9900, + interval: "month", + }); + }); + }); + + describe("Transformer core", () => { + test("copy fields", () => { + const transformer = createTransformer({ + copy: ['id', 'name'], + }); + + const result = transformer.transform({ + id: "test", + name: "Test", + extra: "ignored", + }); + + expect(result).toEqual({ id: "test", name: "Test" }); + }); + + test("rename fields", () => { + const transformer = createTransformer({ + rename: { old_name: 'new_name' }, + }); + + const result = transformer.transform({ old_name: "value" }); + + expect(result).toEqual({ new_name: "value" }); + }); + + test("flatten nested fields", () => { + const transformer = createTransformer({ + flatten: { + 'parent.child': 'flat', + 'deeply.nested.value': 'value', + }, + }); + + const result = transformer.transform({ + parent: { child: "test" }, + deeply: { nested: { value: 42 } }, + }); + + expect(result).toEqual({ + flat: "test", + value: 42, + }); + }); + + test("compute fields", () => { + const transformer = createTransformer({ + compute: { + doubled: (api: any) => api.value * 2, + inverted: (api: any) => !api.flag, + }, + }); + + const result = transformer.transform({ value: 5, flag: true }); + + expect(result).toEqual({ + doubled: 10, + inverted: false, + }); + }); + + test("discriminated union", () => { + const transformer = createTransformer({ + discriminator: 'type', + cases: { + 'A': { copy: ['id'], compute: { value: () => 'A' } }, + 'B': { copy: ['id'], compute: { value: () => 'B' } }, + }, + }); + + const resultA = transformer.transform({ id: "1", type: "A" }); + const resultB = transformer.transform({ id: "2", type: "B" }); + + expect(resultA).toEqual({ id: "1", value: "A" }); + expect(resultB).toEqual({ id: "2", value: "B" }); + }); + + test("defaults", () => { + const transformer = createTransformer({ + copy: ['name'], + defaults: { count: 0, enabled: true }, + }); + + const result = transformer.transform({ name: "test" }); + + expect(result).toEqual({ + name: "test", + count: 0, + enabled: true, + }); + }); + }); +}); diff --git a/atmn/src/lib/transforms/apiToSdk/Transformer.ts b/atmn/src/lib/transforms/apiToSdk/Transformer.ts new file mode 100644 index 00000000..98468717 --- /dev/null +++ b/atmn/src/lib/transforms/apiToSdk/Transformer.ts @@ -0,0 +1,212 @@ +/** + * Declarative transformer system for API → SDK transformations + * + * Instead of writing repetitive transform functions, define transformations as config: + * - copy: fields that pass through unchanged + * - rename: { apiField: 'sdkField' } + * - flatten: { 'nested.field': 'flatField' } + * - compute: { sdkField: (api) => api.field * 2 } + * - discriminate: conditional transforms based on a field value + */ + +type TransformFn = (input: TInput) => TOutput; + +export interface FieldMapping { + /** Fields to copy as-is from API to SDK */ + copy?: string[]; + + /** Rename fields: { apiFieldName: 'sdkFieldName' } */ + rename?: Record; + + /** Flatten nested fields: { 'parent.child': 'flatName' } */ + flatten?: Record; + + /** Remove fields from output */ + remove?: string[]; + + /** Computed fields: { sdkField: (api) => computed value } */ + compute?: Record any>; + + /** Default values for undefined/null fields: { sdkField: defaultValue } */ + defaults?: Record; + + /** Transform nested arrays: { sdkField: { from: 'apiField', transform: TransformConfig } } */ + transformArrays?: Record; + + /** Fields that swap null to undefined when coming from API: ['field1', 'field2'] */ + swapNullish?: string[]; + + /** Fields that swap false to undefined when coming from API (only true or undefined): ['field1', 'field2'] */ + swapFalse?: string[]; +} + +export interface DiscriminatedTransform { + /** Field to discriminate on (e.g., 'type') */ + discriminator: string; + + /** Map of discriminator value → transform config */ + cases: Record; + + /** Fallback transform if no case matches */ + default?: FieldMapping; +} + +/** + * Generic transformer that applies field mappings declaratively + */ +export class Transformer { + constructor( + private config: FieldMapping | DiscriminatedTransform, + ) {} + + transform(input: TInput): TOutput { + // Handle discriminated union + if ('discriminator' in this.config) { + return this.transformDiscriminated(input); + } + + // Handle simple field mapping + return this.transformFields(input, this.config); + } + + private transformDiscriminated(input: any): TOutput { + const config = this.config as DiscriminatedTransform; + const discriminatorValue = this.getNestedValue(input, config.discriminator); + + const caseConfig = config.cases[discriminatorValue] || config.default; + if (!caseConfig) { + throw new Error( + `No transform case found for ${config.discriminator}="${discriminatorValue}"`, + ); + } + + return this.transformFields(input, caseConfig); + } + + private transformFields(input: any, mapping: FieldMapping): TOutput { + const output: any = {}; + + // Track which fields should swap null to undefined + const swapNullishSet = new Set(mapping.swapNullish || []); + // Track which fields should swap false to undefined + const swapFalseSet = new Set(mapping.swapFalse || []); + + // 1. Copy fields + if (mapping.copy) { + for (const field of mapping.copy) { + const value = this.getNestedValue(input, field); + if (value !== undefined) { + // If field is in swapNullish and value is null, convert to undefined + if (swapNullishSet.has(field) && value === null) { + // Don't set the field (undefined) + continue; + } + // If field is in swapFalse and value is false, convert to undefined + if (swapFalseSet.has(field) && value === false) { + // Don't set the field (undefined) + continue; + } + output[field] = value; + } + } + } + + // 2. Rename fields + if (mapping.rename) { + for (const [apiField, sdkField] of Object.entries(mapping.rename)) { + const value = this.getNestedValue(input, apiField); + if (value !== undefined) { + // If apiField is in swapNullish and value is null, convert to undefined + if (swapNullishSet.has(apiField) && value === null) { + // Don't set the field (undefined) + continue; + } + // If apiField is in swapFalse and value is false, convert to undefined + if (swapFalseSet.has(apiField) && value === false) { + // Don't set the field (undefined) + continue; + } + output[sdkField] = value; + } + } + } + + // 3. Flatten nested fields + if (mapping.flatten) { + for (const [nestedPath, flatName] of Object.entries(mapping.flatten)) { + const value = this.getNestedValue(input, nestedPath); + if (value !== undefined) { + // If nestedPath is in swapNullish and value is null, convert to undefined + if (swapNullishSet.has(nestedPath) && value === null) { + // Don't set the field (undefined) + continue; + } + // If nestedPath is in swapFalse and value is false, convert to undefined + if (swapFalseSet.has(nestedPath) && value === false) { + // Don't set the field (undefined) + continue; + } + output[flatName] = value; + } + } + } + + // 4. Compute fields + if (mapping.compute) { + for (const [sdkField, computeFn] of Object.entries(mapping.compute)) { + const value = computeFn(input); + if (value !== undefined) { + output[sdkField] = value; + } + } + } + + // 5. Transform arrays + if (mapping.transformArrays) { + for (const [sdkField, config] of Object.entries(mapping.transformArrays)) { + const apiArray = this.getNestedValue(input, config.from); + if (Array.isArray(apiArray)) { + const transformer = new Transformer(config.transform); + output[sdkField] = apiArray.map(item => transformer.transform(item)); + } + } + } + + // 6. Apply defaults + if (mapping.defaults) { + for (const [field, defaultValue] of Object.entries(mapping.defaults)) { + if (output[field] === undefined || output[field] === null) { + output[field] = defaultValue; + } + } + } + + return output as TOutput; + } + + /** + * Get nested value using dot notation (e.g., 'reset.interval') + */ + private getNestedValue(obj: any, path: string): any { + const parts = path.split('.'); + let value = obj; + + for (const part of parts) { + if (value === null || value === undefined) { + return undefined; + } + value = value[part]; + } + + return value; + } +} + +/** + * Helper to create a transformer with type safety + */ +export function createTransformer( + config: FieldMapping | DiscriminatedTransform, +): Transformer { + return new Transformer(config); +} diff --git a/atmn/src/lib/transforms/apiToSdk/feature.ts b/atmn/src/lib/transforms/apiToSdk/feature.ts new file mode 100644 index 00000000..5e21d63d --- /dev/null +++ b/atmn/src/lib/transforms/apiToSdk/feature.ts @@ -0,0 +1,69 @@ +import type { Feature } from "../../../../source/compose/models/featureModels.js"; +import type { ApiFeature } from "../../api/types/index.js"; +import { createTransformer } from "./Transformer.js"; + +/** + * Declarative feature transformer - replaces 79 lines with 40 lines of config + */ +export const featureTransformer = createTransformer({ + discriminator: 'type', + cases: { + // Boolean features: just copy base fields, no consumable + 'boolean': { + copy: ['id', 'name', 'event_names', 'credit_schema'], + compute: { + type: () => 'boolean' as const, + }, + }, + + // Credit system features: always consumable + 'credit_system': { + copy: ['id', 'name', 'event_names', 'credit_schema'], + compute: { + type: () => 'credit_system' as const, + consumable: () => true, + credit_schema: (api) => api.credit_schema || [], + }, + }, + + // Backend bug: API returns "single_use" instead of "metered" with consumable=true + 'single_use': { + copy: ['id', 'name', 'event_names', 'credit_schema'], + compute: { + type: () => 'metered' as const, + consumable: () => true, + }, + }, + + // Backend bug: API returns "continuous_use" instead of "metered" with consumable=false + 'continuous_use': { + copy: ['id', 'name', 'event_names', 'credit_schema'], + compute: { + type: () => 'metered' as const, + consumable: () => false, + }, + }, + + // If API ever returns "metered" properly + 'metered': { + copy: ['id', 'name', 'event_names', 'credit_schema'], + compute: { + type: () => 'metered' as const, + consumable: (api) => api.consumable ?? true, + }, + }, + }, + + // Fallback for unknown types + default: { + copy: ['id', 'name', 'event_names', 'credit_schema'], + compute: { + type: () => 'metered' as const, + consumable: () => true, + }, + }, +}); + +export function transformApiFeature(apiFeature: any): Feature { + return featureTransformer.transform(apiFeature); +} diff --git a/atmn/src/lib/transforms/apiToSdk/helpers.ts b/atmn/src/lib/transforms/apiToSdk/helpers.ts new file mode 100644 index 00000000..e166d621 --- /dev/null +++ b/atmn/src/lib/transforms/apiToSdk/helpers.ts @@ -0,0 +1,52 @@ +/** + * Helper functions for API → SDK transformations + */ + +/** + * Map API feature type to SDK type + * API uses "metered" but SDK distinguishes between metered consumable and non-consumable + */ +export function mapFeatureType( + apiType: string, + consumable: boolean, +): "boolean" | "metered" | "credit_system" { + if (apiType === "boolean") { + return "boolean"; + } + if (apiType === "credit_system") { + return "credit_system"; + } + // For metered, the SDK doesn't actually use different type values + // The consumable field is what matters + return "metered"; +} + +/** + * Invert reset_when_enabled to carry_over_usage + * API: reset_when_enabled = true means reset usage when enabled + * SDK: carry_over_usage = true means DON'T reset (i.e., carry over) + * So they're opposites + */ +export function invertResetWhenEnabled( + resetWhenEnabled: boolean | undefined, +): boolean | undefined { + if (resetWhenEnabled === undefined) { + return undefined; + } + return !resetWhenEnabled; +} + +/** + * Map API usage_model to SDK billing_method + */ +export function mapUsageModel( + usageModel: string, +): "prepaid" | "pay_per_use" | undefined { + if (usageModel === "prepaid") { + return "prepaid"; + } + if (usageModel === "pay_per_use") { + return "pay_per_use"; + } + return undefined; +} diff --git a/atmn/src/lib/transforms/apiToSdk/index.ts b/atmn/src/lib/transforms/apiToSdk/index.ts new file mode 100644 index 00000000..3be97e80 --- /dev/null +++ b/atmn/src/lib/transforms/apiToSdk/index.ts @@ -0,0 +1,8 @@ +export { transformApiFeature } from "./feature.js"; +export { transformApiPlan } from "./plan.js"; +export { transformApiPlanFeature } from "./planFeature.js"; +export { + mapFeatureType, + invertResetWhenEnabled, + mapUsageModel, +} from "./helpers.js"; diff --git a/atmn/src/lib/transforms/apiToSdk/plan.ts b/atmn/src/lib/transforms/apiToSdk/plan.ts new file mode 100644 index 00000000..dbcc30aa --- /dev/null +++ b/atmn/src/lib/transforms/apiToSdk/plan.ts @@ -0,0 +1,50 @@ +import type { Plan } from "../../../../source/compose/models/planModels.js"; +import type { ApiPlan } from "../../api/types/index.js"; +import { createTransformer } from "./Transformer.js"; +import { transformApiPlanFeature } from "./planFeature.js"; + +/** + * Declarative plan transformer - replaces 57 lines with ~20 lines of config + */ +export const planTransformer = createTransformer({ + copy: [ + 'id', + 'name', + 'description', + 'group', + 'add_on', + 'free_trial', + ], + + // Rename: default → auto_enable + rename: { + 'default': 'auto_enable', + }, + + // Swap null to undefined for these fields (API → SDK direction) + // When pulling from API: null becomes undefined (cleaner, won't show in generated code) + swapNullish: ['group'], + + // Swap false to undefined for these fields (API → SDK direction) + // When pulling from API: false becomes undefined (only true or undefined in SDK) + // API 'default' field maps to SDK 'auto_enable', API 'add_on' stays as 'add_on' + swapFalse: ['default', 'add_on'], + + // Copy nested price object as-is + compute: { + price: (api) => api.price ? { + amount: api.price.amount, + interval: api.price.interval, + } : undefined, + + // Transform features array (only if non-empty) + features: (api) => + api.features && api.features.length > 0 + ? api.features.map(transformApiPlanFeature) + : undefined, + }, +}); + +export function transformApiPlan(apiPlan: ApiPlan): Plan { + return planTransformer.transform(apiPlan); +} diff --git a/atmn/src/lib/transforms/apiToSdk/planFeature.ts b/atmn/src/lib/transforms/apiToSdk/planFeature.ts new file mode 100644 index 00000000..4942aba7 --- /dev/null +++ b/atmn/src/lib/transforms/apiToSdk/planFeature.ts @@ -0,0 +1,61 @@ +import type { PlanFeature } from "../../../../source/compose/models/planModels.js"; +import type { ApiPlanFeature } from "../../api/types/index.js"; +import { invertResetWhenEnabled, mapUsageModel } from "./helpers.js"; +import { createTransformer } from "./Transformer.js"; + +/** + * Declarative plan feature transformer - replaces 77 lines with ~30 lines of config + */ +export const planFeatureTransformer = createTransformer< + ApiPlanFeature, + PlanFeature +>({ + copy: ["feature_id", "unlimited", "proration"], + + // Rename: granted_balance → included + rename: { + granted_balance: "included", + }, + + // Flatten: reset.* → top-level fields + flatten: { + "reset.interval": "interval", + "reset.interval_count": "interval_count", + }, + + // Computed fields + compute: { + // Invert: reset.reset_when_enabled → carry_over_usage + carry_over_usage: (api) => + api.reset?.reset_when_enabled !== undefined + ? invertResetWhenEnabled(api.reset.reset_when_enabled) + : undefined, + + // Transform price object + price: (api) => + api.price + ? { + ...api.price, + max_purchase: api.price.max_purchase ?? undefined, + billing_method: api.price.usage_model + ? mapUsageModel(api.price.usage_model) + : undefined, + } + : undefined, + + // Transform rollover object + rollover: (api) => + api.rollover + ? { + ...api.rollover, + max: api.rollover.max ?? 0, + } + : undefined, + }, +}); + +export function transformApiPlanFeature( + apiPlanFeature: ApiPlanFeature, +): PlanFeature { + return planFeatureTransformer.transform(apiPlanFeature); +} diff --git a/atmn/src/lib/transforms/index.ts b/atmn/src/lib/transforms/index.ts new file mode 100644 index 00000000..5defbac3 --- /dev/null +++ b/atmn/src/lib/transforms/index.ts @@ -0,0 +1,2 @@ +export * from "./apiToSdk/index.js"; +export * from "./sdkToCode/index.js"; diff --git a/atmn/src/lib/transforms/sdkToCode/configFile.ts b/atmn/src/lib/transforms/sdkToCode/configFile.ts new file mode 100644 index 00000000..027f9c95 --- /dev/null +++ b/atmn/src/lib/transforms/sdkToCode/configFile.ts @@ -0,0 +1,38 @@ +import type { + Feature, + Plan, +} from "../../../../source/compose/models/index.js"; +import { buildImports } from "./imports.js"; +import { buildFeatureCode } from "./feature.js"; +import { buildPlanCode } from "./plan.js"; + +/** + * Generate complete autumn.config.ts file content + */ +export function buildConfigFile(features: Feature[], plans: Plan[]): string { + const sections: string[] = []; + + // Add imports + sections.push(buildImports()); + sections.push(""); + + // Add features + if (features.length > 0) { + sections.push("// Features"); + for (const feature of features) { + sections.push(buildFeatureCode(feature)); + sections.push(""); + } + } + + // Add plans + if (plans.length > 0) { + sections.push("// Plans"); + for (const plan of plans) { + sections.push(buildPlanCode(plan, features)); + sections.push(""); + } + } + + return sections.join("\n"); +} diff --git a/atmn/src/lib/transforms/sdkToCode/feature.ts b/atmn/src/lib/transforms/sdkToCode/feature.ts new file mode 100644 index 00000000..35d6c51d --- /dev/null +++ b/atmn/src/lib/transforms/sdkToCode/feature.ts @@ -0,0 +1,41 @@ +import type { Feature } from "../../../../source/compose/models/featureModels.js"; +import { featureIdToVarName, formatValue } from "./helpers.js"; + +/** + * Generate TypeScript code for a feature definition + * + * Rules: + * - Boolean features: No consumable field + * - Metered features: MUST output consumable: true or false explicitly + * - Credit system features: Don't output consumable (implied true) + */ +export function buildFeatureCode(feature: Feature): string { + const varName = featureIdToVarName(feature.id); + const lines: string[] = []; + + lines.push(`export const ${varName} = feature({`); + lines.push(`\tid: '${feature.id}',`); + lines.push(`\tname: '${feature.name}',`); + lines.push(`\ttype: '${feature.type}',`); + + // Metered features MUST have explicit consumable field + // consumable: true = single_use (usage is consumed) + // consumable: false = continuous_use (usage accumulates, like seats) + if (feature.type === "metered") { + lines.push(`\tconsumable: ${feature.consumable},`); + } + + // Add event_names if present + if (feature.event_names && feature.event_names.length > 0) { + lines.push(`\tevent_names: ${formatValue(feature.event_names)},`); + } + + // Add credit_schema for credit_system features + if (feature.type === "credit_system" && feature.credit_schema) { + lines.push(`\tcredit_schema: ${formatValue(feature.credit_schema)},`); + } + + lines.push(`});`); + + return lines.join("\n"); +} diff --git a/atmn/src/lib/transforms/sdkToCode/helpers.ts b/atmn/src/lib/transforms/sdkToCode/helpers.ts new file mode 100644 index 00000000..fdf939c0 --- /dev/null +++ b/atmn/src/lib/transforms/sdkToCode/helpers.ts @@ -0,0 +1,101 @@ +/** + * Helper functions for SDK → Code generation + */ + +/** + * Convert ID to valid variable name + * Examples: "pro-plan" → "pro_plan", "api_calls" → "api_calls", "123" → "123" + */ +function sanitizeId(id: string): string { + return id + .replace(/[^a-zA-Z0-9_]/g, "_") // Replace invalid chars with underscore + .replace(/_+/g, "_") // Collapse multiple underscores + .replace(/^_/, "") // Remove leading underscore + .replace(/_$/, ""); // Remove trailing underscore +} + +/** + * Convert ID to valid variable name with context-specific prefix + * Generic version - kept for backwards compatibility + */ +export function idToVarName(id: string, prefix = "item_"): string { + const sanitized = sanitizeId(id); + + // JavaScript identifiers can't start with a number + if (/^[0-9]/.test(sanitized)) { + return prefix + sanitized; + } + + return sanitized; +} + +/** + * Convert plan ID to valid variable name + * Examples: "pro-plan" → "pro_plan", "123" → "plan_123" + */ +export function planIdToVarName(id: string): string { + return idToVarName(id, "plan_"); +} + +/** + * Convert feature ID to valid variable name + * Examples: "api-calls" → "api_calls", "123" → "feature_123" + */ +export function featureIdToVarName(id: string): string { + return idToVarName(id, "feature_"); +} + +/** + * Escape string for TypeScript string literal + */ +export function escapeString(str: string): string { + return str + .replace(/\\/g, "\\\\") + .replace(/'/g, "\\'") + .replace(/"/g, '\\"') + .replace(/\n/g, "\\n") + .replace(/\r/g, "\\r") + .replace(/\t/g, "\\t"); +} + +/** + * Indent code by given number of tabs + */ +export function indentCode(code: string, tabs: number): string { + const indent = "\t".repeat(tabs); + return code + .split("\n") + .map((line) => (line.trim() ? indent + line : line)) + .join("\n"); +} + +/** + * Format a value for TypeScript code + */ +export function formatValue(value: unknown): string { + if (value === null) { + return "null"; + } + if (value === undefined) { + return "undefined"; + } + if (typeof value === "string") { + return `'${escapeString(value)}'`; + } + if (typeof value === "number") { + return String(value); + } + if (typeof value === "boolean") { + return String(value); + } + if (Array.isArray(value)) { + return `[${value.map(formatValue).join(", ")}]`; + } + if (typeof value === "object") { + const entries = Object.entries(value) + .map(([k, v]) => `${k}: ${formatValue(v)}`) + .join(", "); + return `{ ${entries} }`; + } + return String(value); +} diff --git a/atmn/src/lib/transforms/sdkToCode/imports.ts b/atmn/src/lib/transforms/sdkToCode/imports.ts new file mode 100644 index 00000000..ee3a8e8a --- /dev/null +++ b/atmn/src/lib/transforms/sdkToCode/imports.ts @@ -0,0 +1,6 @@ +/** + * Generate imports for config file + */ +export function buildImports(): string { + return `import { feature, plan, planFeature } from 'atmn';`; +} diff --git a/atmn/src/lib/transforms/sdkToCode/index.ts b/atmn/src/lib/transforms/sdkToCode/index.ts new file mode 100644 index 00000000..00f51ed3 --- /dev/null +++ b/atmn/src/lib/transforms/sdkToCode/index.ts @@ -0,0 +1,13 @@ +export { buildFeatureCode } from "./feature.js"; +export { buildPlanCode } from "./plan.js"; +export { buildPlanFeatureCode } from "./planFeature.js"; +export { buildImports } from "./imports.js"; +export { buildConfigFile } from "./configFile.js"; +export { + idToVarName, + planIdToVarName, + featureIdToVarName, + escapeString, + indentCode, + formatValue +} from "./helpers.js"; diff --git a/atmn/src/lib/transforms/sdkToCode/plan.ts b/atmn/src/lib/transforms/sdkToCode/plan.ts new file mode 100644 index 00000000..3f9cbcf0 --- /dev/null +++ b/atmn/src/lib/transforms/sdkToCode/plan.ts @@ -0,0 +1,66 @@ +import type { + Feature, + Plan, +} from "../../../../source/compose/models/index.js"; +import { planIdToVarName, formatValue } from "./helpers.js"; +import { buildPlanFeatureCode } from "./planFeature.js"; + +/** + * Generate TypeScript code for a plan definition + */ +export function buildPlanCode(plan: Plan, features: Feature[]): string { + const varName = planIdToVarName(plan.id); + const lines: string[] = []; + + lines.push(`export const ${varName} = plan({`); + lines.push(`\tid: '${plan.id}',`); + lines.push(`\tname: '${plan.name}',`); + + // Add description + if (plan.description !== undefined && plan.description !== null) { + lines.push(`\tdescription: '${plan.description}',`); + } + + // Add group (only if it has a non-empty string value) + // undefined and null both mean "no group" and should be omitted from generated code + if (plan.group !== undefined && plan.group !== null && plan.group !== "") { + lines.push(`\tgroup: '${plan.group}',`); + } + + // Add add_on (only if true - false becomes undefined via swapFalse) + if (plan.add_on !== undefined) { + lines.push(`\tadd_on: ${plan.add_on},`); + } + + // Add auto_enable (only if true - false becomes undefined via swapFalse) + if (plan.auto_enable !== undefined) { + lines.push(`\tauto_enable: ${plan.auto_enable},`); + } + + // Add price + if (plan.price) { + lines.push(`\tprice: {`); + lines.push(`\t\tamount: ${plan.price.amount},`); + lines.push(`\t\tinterval: '${plan.price.interval}',`); + lines.push(`\t},`); + } + + // Add features + if (plan.features && plan.features.length > 0) { + lines.push(`\tfeatures: [`); + for (const planFeature of plan.features) { + const featureCode = buildPlanFeatureCode(planFeature, features); + lines.push(featureCode); + } + lines.push(`\t],`); + } + + // Add free_trial + if (plan.free_trial) { + lines.push(`\tfree_trial: ${formatValue(plan.free_trial)},`); + } + + lines.push(`});`); + + return lines.join("\n"); +} diff --git a/atmn/src/lib/transforms/sdkToCode/planFeature.ts b/atmn/src/lib/transforms/sdkToCode/planFeature.ts new file mode 100644 index 00000000..57858218 --- /dev/null +++ b/atmn/src/lib/transforms/sdkToCode/planFeature.ts @@ -0,0 +1,89 @@ +import type { + Feature, + PlanFeature, +} from "../../../../source/compose/models/index.js"; +import { idToVarName, formatValue } from "./helpers.js"; + +/** + * Generate TypeScript code for a plan feature configuration + */ +export function buildPlanFeatureCode( + planFeature: PlanFeature, + features: Feature[], +): string { + // Find the feature to get its variable name + const feature = features.find((f) => f.id === planFeature.feature_id); + const featureVarName = feature ? idToVarName(feature.id) : null; + const featureIdCode = featureVarName + ? `${featureVarName}.id` + : `'${planFeature.feature_id}'`; + + const lines: string[] = []; + lines.push(`\t\tplanFeature({`); + lines.push(`\t\t\tfeature_id: ${featureIdCode},`); + + // Add included (granted_balance) + if (planFeature.included !== undefined) { + lines.push(`\t\t\tincluded: ${planFeature.included},`); + } + + // Add unlimited + if (planFeature.unlimited !== undefined) { + lines.push(`\t\t\tunlimited: ${planFeature.unlimited},`); + } + + // Add reset fields (flattened) + if (planFeature.interval) { + lines.push(`\t\t\tinterval: '${planFeature.interval}',`); + } + if (planFeature.interval_count !== undefined) { + lines.push(`\t\t\tinterval_count: ${planFeature.interval_count},`); + } + if (planFeature.carry_over_usage !== undefined) { + lines.push(`\t\t\tcarry_over_usage: ${planFeature.carry_over_usage},`); + } + + // Add price + if (planFeature.price) { + lines.push(`\t\t\tprice: {`); + + if (planFeature.price.amount !== undefined) { + lines.push(`\t\t\t\tamount: ${planFeature.price.amount},`); + } + + if (planFeature.price.tiers) { + const tiersCode = formatValue(planFeature.price.tiers); + lines.push(`\t\t\t\ttiers: ${tiersCode},`); + } + + if (planFeature.price.billing_units !== undefined) { + lines.push(`\t\t\t\tbilling_units: ${planFeature.price.billing_units},`); + } + + if (planFeature.price.billing_method) { + lines.push( + `\t\t\t\tbilling_method: '${planFeature.price.billing_method}',`, + ); + } + + if (planFeature.price.max_purchase !== undefined) { + lines.push(`\t\t\t\tmax_purchase: ${planFeature.price.max_purchase},`); + } + + lines.push(`\t\t\t},`); + } + + // Add proration + if (planFeature.proration) { + lines.push(`\t\t\tproration: ${formatValue(planFeature.proration)},`); + } + + // Add rollover + if (planFeature.rollover) { + lines.push(`\t\t\trollover: ${formatValue(planFeature.rollover)},`); + } + + lines.push(`\t\t}),`); + + return lines.join("\n"); +} diff --git a/atmn/src/lib/writeEmptyConfig.ts b/atmn/src/lib/writeEmptyConfig.ts new file mode 100644 index 00000000..3d617d37 --- /dev/null +++ b/atmn/src/lib/writeEmptyConfig.ts @@ -0,0 +1,15 @@ +import fs from "node:fs"; +import path from "node:path"; + +/** + * Writes an empty/skeleton autumn.config.ts file to the current working directory + */ +export function writeEmptyConfig(): void { + const content = `import { plan, feature, planFeature } from 'atmn' +// export const message = feature({ "id": "msg", "name": "Messages", "type": "metered", "consumable": true }) +// export const free = plan({ "id": "free", "name": "Free Tier", features: [...] }) +`; + + const configPath = path.join(process.cwd(), "autumn.config.ts"); + fs.writeFileSync(configPath, content, "utf-8"); +} diff --git a/atmn/src/prompts/customer.ts b/atmn/src/prompts/customer.ts new file mode 100644 index 00000000..6591a257 --- /dev/null +++ b/atmn/src/prompts/customer.ts @@ -0,0 +1,296 @@ +export const customerPrompt = `## Set up Autumn billing integration + +Autumn is a billing and entitlements layer over Stripe, which we are adding into this codebase. Your task is to create an Autumn customer by following these steps, and add it to a place in this app where it will be automatically created. + +### Step 1: Analyze my codebase + +Before making changes, detect: +- Language (TypeScript/JavaScript, Python, or other) +- If TS/JS: Framework (Next.js, React Router, Tanstack Start, Hono, Express, Fastify, or other) +- If TS/JS: Is there a React frontend? (Check for React in package.json) + +Also ask me: + +**1. Should Autumn customers be individual users, or organizations?** +- Users (B2C): Each user has their own plan and limits +- Organizations (B2B): Plans and limits are shared across an org + +**2. Have you created an AUTUMN_SECRET_KEY and added it to .env?** +Please prompt them to create one here: https://app.useautumn.com/dev?tab=api_keys and add it to .env as AUTUMN_SECRET_KEY + + + +Tell me what you detected, which path you'll follow and what you'll be adding autumn to. + +--- + +## Path A: React + Node.js (fullstack TypeScript) + +Use this path if there's a React frontend with a Node.js backend. + +### A1. Install the SDK + +**Use the package manager already installed** -- eg user may be using bun, or pnpm. +\`\`\`bash +npm install autumn-js +\`\`\` + +### A2. Mount the handler (server-side) + +This creates endpoints at \`/api/autumn/*\` that the React hooks will call. The \`identify\` function should return either the user ID or org ID from your auth provider, depending on how you're using Autumn. + +**Next.js (App Router):** +\`\`\`typescript +// app/api/autumn/[...all]/route.ts +import { autumnHandler } from "autumn-js/next"; + +export const { GET, POST } = autumnHandler({ + identify: async (request) => { + // Get user/org from your auth provider + const session = await auth.api.getSession({ headers: request.headers }); + return { + customerId: session?.user.id, // or session?.org.id for B2B + customerData: { + name: session?.user.name, + email: session?.user.email, + }, + }; + }, +}); +\`\`\` + +**React Router:** +\`\`\`typescript +// app/routes/api.autumn.tsx +import { autumnHandler } from "autumn-js/react-router"; + +export const { loader, action } = autumnHandler({ + identify: async (args) => { + const session = await auth.api.getSession({ headers: args.request.headers }); + return { + customerId: session?.user.id, // or session?.org.id for B2B + customerData: { name: session?.user.name, email: session?.user.email }, + }; + }, +}); + +// routes.ts - add this route +route("api/autumn/*", "routes/api.autumn.tsx") +\`\`\` + +**Tanstack Start:** +\`\`\`typescript +// routes/api/autumn.$.ts +import { autumnHandler } from "autumn-js/tanstack"; + +const handler = autumnHandler({ + identify: async ({ request }) => { + const session = await auth.api.getSession({ headers: request.headers }); + return { + customerId: session?.user.id, // or session?.org.id for B2B + customerData: { name: session?.user.name, email: session?.user.email }, + }; + }, +}); + +export const Route = createFileRoute("/api/autumn/$")({ + server: { handlers: handler }, +}); +\`\`\` + +**Hono:** +\`\`\`typescript +import { autumnHandler } from "autumn-js/hono"; + +app.use("/api/autumn/*", autumnHandler({ + identify: async (c) => { + const session = await auth.api.getSession({ headers: c.req.raw.headers }); + return { + customerId: session?.user.id, // or session?.org.id for B2B + customerData: { name: session?.user.name, email: session?.user.email }, + }; + }, +})); +\`\`\` + +**Express:** +\`\`\`typescript +import { autumnHandler } from "autumn-js/express"; + +app.use(express.json()); // Must be before autumnHandler +app.use("/api/autumn", autumnHandler({ + identify: async (req) => { + const session = await auth.api.getSession({ headers: fromNodeHeaders(req.headers) }); + return { + customerId: session?.user.id, // or session?.org.id for B2B + customerData: { name: session?.user.name, email: session?.user.email }, + }; + }, +})); +\`\`\` + +**Fastify:** +\`\`\`typescript +import { autumnHandler } from "autumn-js/fastify"; + +fastify.route({ + method: ["GET", "POST"], + url: "/api/autumn/*", + handler: autumnHandler({ + identify: async (request) => { + const session = await auth.api.getSession({ headers: request.headers as any }); + return { + customerId: session?.user.id, // or session?.org.id for B2B + customerData: { name: session?.user.name, email: session?.user.email }, + }; + }, + }), +}); +\`\`\` + +**Other frameworks (generic handler):** +\`\`\`typescript +import { autumnHandler } from "autumn-js/backend"; + +// Mount this handler onto the /api/autumn/* path in your backend +const handleRequest = async (request) => { + // Your authentication logic here + const customerId = "user_or_org_id_from_auth"; + + let body = null; + if (request.method !== "GET") { + body = await request.json(); + } + + const { statusCode, response } = await autumnHandler({ + customerId, + customerData: { name: "", email: "" }, + request: { + url: request.url, + method: request.method, + body: body, + }, + }); + + return new Response(JSON.stringify(response), { + status: statusCode, + headers: { "Content-Type": "application/json" }, + }); +}; +\`\`\` + +### A3. Add the provider (client-side) + +Wrap your app with AutumnProvider: +\`\`\`tsx +import { AutumnProvider } from "autumn-js/react"; + +export default function RootLayout({ children }) { + return ( + + {children} + + ); +} +\`\`\` + +If your backend is on a different URL (e.g., Vite + separate server), pass \`backendUrl\`: +\`\`\`tsx + +\`\`\` + +### A4. Create a test customer + +Add this hook to any component to verify the integration: +\`\`\`tsx +import { useCustomer } from "autumn-js/react"; + +const { customer } = useCustomer(); +console.log("Autumn customer:", customer); +\`\`\` + +This automatically creates an Autumn customer for new users/orgs. + +--- + +## Path B: Backend only (Node.js, Python, or other) + +Use this path if there's no React frontend, or you prefer server-side only. + +### B1. Install the SDK +\`\`\`bash +# Node.js +npm install autumn-js + +# Python +pip install autumn-py +\`\`\` + +### B2. Initialize the client + +**TypeScript/JavaScript:** +\`\`\`typescript +import { Autumn } from "autumn-js"; + +const autumn = new Autumn({ + secretKey: process.env.AUTUMN_SECRET_KEY, +}); +\`\`\` + +**Python:** +\`\`\`python +from autumn import Autumn + +autumn = Autumn('am_sk_test_xxx') +\`\`\` + +### B3. Create a test customer + +This will GET or CREATE a new customer. Add it when a user signs in or loads the app. Pass in ID from auth provider. +The response returns customer state, used to display billing information client-side. Please console.log the Autumn customer client-side. + +**TypeScript:** +\`\`\`typescript +const { data, error } = await autumn.customers.create({ + id: "user_or_org_id_from_auth", + name: "Test User", + email: "test@example.com", +}); +\`\`\` + +**Python:** +\`\`\`python +customer = await autumn.customers.create( + id="user_or_org_id_from_auth", + name="Test User", + email="test@example.com", +) +\`\`\` + +**cURL:** +\`\`\`bash +curl -X POST https://api.useautumn.com/customers \\ + -H "Authorization: Bearer am_sk_test_xxx" \\ + -H "Content-Type: application/json" \\ + -d '{"id": "user_or_org_id_from_auth", "name": "Test User", "email": "test@example.com"}' +\`\`\` + +When calling these functions from the client, the SDK exports types for all response objects. Use these for type-safe code. + +\`\`\`tsx +import type { Customer } from "autumn-js"; +\`\`\` + +--- + +## Verify + +After setup, tell me: +1. What stack you detected +2. Which path you followed +3. What files you created/modified +4. That the Autumn customer is logged in browser, and to check in the Autumn dashboard + +**Note:** Your Autumn configuration is in \`autumn.config.ts\` in your project root. + +Docs: https://docs.useautumn.com/llms.txt`; diff --git a/atmn/src/prompts/payments.ts b/atmn/src/prompts/payments.ts new file mode 100644 index 00000000..3c769721 --- /dev/null +++ b/atmn/src/prompts/payments.ts @@ -0,0 +1,247 @@ +export const paymentsPrompt = `## Add Autumn payment flow + +Autumn handles Stripe checkout and plan changes. Your task is to add the payment flow to this codebase for ALL plans in the Autumn configuration. + +### Step 1: Detect my integration type + +Check if this codebase already has Autumn set up: +- If there's an \`AutumnProvider\` and \`autumnHandler\` mounted → **Path A: React** +- If there's just an \`Autumn\` client initialized → **Path B: Backend SDK** + +Before implementing: +1. Tell me which path you'll follow before proceeding. +2. Tell me that I will be building pricing cards to handle billing flows, and ask for any guidance or any input + +--- + +## Path A: React + +### Checkout Flow + +Use \`checkout\` from \`useCustomer\`. It returns either a Stripe URL (new customer) or checkout preview data (returning customer with card on file). + +\`\`\`tsx +import { useCustomer } from "autumn-js/react"; + +const { checkout } = useCustomer(); + +const data = await checkout({ productId: "pro" }); + +if (!data.url) { + // Returning customer → show confirmation dialog with result data + // data contains: { product, current_product, lines, total (IN MAJOR CURRENCY), currency, next_cycle } +} +\`\`\` + +After user confirms in your dialog, call \`attach\` to enable plan (and charge card as needed) + +\`\`\`tsx +const { attach } = useCustomer(); + +await attach({ productId: "pro" }); +\`\`\` + +### Getting Billing State + +Use \`usePricingTable\` to get products with their billing scenario and display state. + +\`\`\`tsx +import { usePricingTable } from "autumn-js/react"; + +function PricingPage() { + const { products } = usePricingTable(); + // Each product has: scenario, properties + // scenario: "scheduled" | "active" | "new" | "renew" | "upgrade" | "downgrade" | "cancel" +} +\`\`\` + +### Canceling +Only use this if there is no free plan in the user's Autumn config. If there is a free plan, then you can cancel by attaching the free plan. + +\`\`\`tsx +const { cancel } = useCustomer(); +await cancel({ productId: "pro" }); +\`\`\` + +--- + +## Path B: Backend SDK + +### Checkout Flow + +Payments are a 2-step process: +1. **checkout** - Returns Stripe checkout URL (new customer) or preview data (returning customer) +2. **attach** - Confirms purchase when no URL was returned + +**TypeScript:** +\`\`\`typescript +import { Autumn } from "autumn-js"; +import type { CheckoutResult, AttachResult } from "autumn-js"; + +const autumn = new Autumn({ secretKey: process.env.AUTUMN_SECRET_KEY }); + +// Step 1: Get checkout info +const { data } = await autumn.checkout({ + customer_id: "user_or_org_id_from_auth", + product_id: "pro", +}) as { data: CheckoutResult }; + +if (data.url) { + // New customer → redirect to Stripe + return redirect(data.url); +} else { + // Returning customer → return preview data for confirmation UI + // data contains: { product, current_product, lines, total (IN MAJOR CURRENCY), currency, next_cycle } + return data; +} + +// Step 2: After user confirms (only if no URL) +const { data: attachData } = await autumn.attach({ + customer_id: "user_or_org_id_from_auth", + product_id: "pro", +}) as { data: AttachResult }; +\`\`\` + +**Python:** +\`\`\`python +from autumn import Autumn + +autumn = Autumn('am_sk_test_xxx') + +# Step 1: Get checkout info +response = await autumn.checkout( + customer_id="user_or_org_id_from_auth", + product_id="pro", +) + +if response.url: + # New customer → redirect to Stripe + return redirect(response.url) +else: + # Returning customer → return preview data for confirmation UI + return response + +# Step 2: After user confirms +attach_response = await autumn.attach( + customer_id="user_or_org_id_from_auth", + product_id="pro", +) +\`\`\` + +For prepaid pricing options, see: https://docs.useautumn.com/examples/prepaid/llms.txt + +### Getting Billing State + +Use \`products.list\` with a \`customer_id\` to get products with their billing scenario. **Don't build custom billing state logic.** + +**TypeScript:** +\`\`\`typescript +const { data } = await autumn.products.list({ + customer_id: "user_or_org_id_from_auth", +}); + +data.list.forEach((product) => { + const { scenario } = product; + // "scheduled" | "active" | "new" | "renew" | "upgrade" | "downgrade" | "cancel" +}); +\`\`\` + +**Python:** +\`\`\`python +response = await autumn.products.list(customer_id="user_or_org_id_from_auth") + +for product in response.list: + scenario = product.scenario +\`\`\` + +**curl:** +\`\`\`bash +curl https://api.useautumn.com/v1/products?customer_id=user_or_org_id_from_auth \\ + -H "Authorization: Bearer $AUTUMN_SECRET_KEY" +\`\`\` + +### Canceling + +\`\`\`typescript +await autumn.cancel({ customer_id: "...", product_id: "pro" }); +\`\`\` + +Or attach a free product ID to downgrade. + +--- + +## Common Patterns + +### Pricing Button Text + +\`\`\`typescript +const SCENARIO_TEXT: Record = { + scheduled: "Plan Scheduled", + active: "Current Plan", + renew: "Renew", + upgrade: "Upgrade", + new: "Enable", + downgrade: "Downgrade", + cancel: "Cancel Plan", +}; + +export const getPricingButtonText = (product: Product): string => { + const { scenario, properties } = product; + const { is_one_off, updateable, has_trial } = properties ?? {}; + + if (has_trial) return "Start Trial"; + if (scenario === "active" && updateable) return "Update"; + if (scenario === "new" && is_one_off) return "Purchase"; + + return SCENARIO_TEXT[scenario ?? ""] ?? "Enable Plan"; +}; +\`\`\` + +### Confirmation Dialog Text + +\`\`\`typescript +import type { CheckoutResult, Product } from "autumn-js"; + +export const getConfirmationTexts = (result: CheckoutResult): { title: string; message: string } => { + const { product, current_product, next_cycle } = result; + const scenario = product.scenario; + const productName = product.name; + const currentProductName = current_product?.name; + const nextCycleDate = next_cycle?.starts_at + ? new Date(next_cycle.starts_at).toLocaleDateString() + : undefined; + + const isRecurring = !product.properties?.is_one_off; + + const CONFIRMATION_TEXT: Record = { + scheduled: { title: "Already Scheduled", message: "You already have this product scheduled." }, + active: { title: "Already Active", message: "You are already subscribed to this product." }, + renew: { title: "Renew", message: \`Renew your subscription to \${productName}.\` }, + upgrade: { title: \`Upgrade to \${productName}\`, message: \`Upgrade to \${productName}. Your card will be charged immediately.\` }, + downgrade: { title: \`Downgrade to \${productName}\`, message: \`\${currentProductName} will be cancelled. \${productName} begins \${nextCycleDate}.\` }, + cancel: { title: "Cancel", message: \`Your subscription to \${currentProductName} will end \${nextCycleDate}.\` }, + }; + + if (scenario === "new") { + return isRecurring + ? { title: \`Subscribe to \${productName}\`, message: \`Subscribe to \${productName}. Charged immediately.\` } + : { title: \`Purchase \${productName}\`, message: \`Purchase \${productName}. Charged immediately.\` }; + } + + return CONFIRMATION_TEXT[scenario ?? ""] ?? { title: "Change Subscription", message: "You are about to change your subscription." }; +}; +\`\`\` + +--- + +## Notes + +- **NB: the result is \`data.url\`, NOT \`data.checkout_url\`** +- This handles all upgrades, downgrades, renewals, uncancellations automatically +- Product IDs come from the Autumn configuration +- Pass \`successUrl\` to \`checkout\` to redirect users after payment +- For prepaid pricing examples, see: https://docs.useautumn.com/examples/prepaid + +**Note:** Your Autumn configuration is in \`autumn.config.ts\` in your project root. + +Docs: https://docs.useautumn.com/llms.txt`; diff --git a/atmn/src/prompts/pricing.ts b/atmn/src/prompts/pricing.ts new file mode 100644 index 00000000..55d70d21 --- /dev/null +++ b/atmn/src/prompts/pricing.ts @@ -0,0 +1,137 @@ +export const pricingPrompt = `## Design your Autumn pricing model + +This guide helps you design your pricing model for Autumn. Autumn uses a configuration file (\`autumn.config.ts\`) to define your features and products (plans). + +### Step 1: Understand your pricing needs + +Before building, consider: +1. What features do you want to offer? (API calls, seats, storage, etc.) +2. What plans do you want? (Free, Pro, Enterprise tiers?) +3. How should usage be measured and limited? + +--- + +## Feature Types + +Autumn supports these feature types: + +- **single_use**: Consumable resources (API calls, tokens, messages, credits, generations) +- **continuous_use**: Non-consumable resources (seats, workspaces, projects, team members) +- **boolean**: On/off features (advanced analytics, priority support, SSO) +- **credit_system**: A unified credit pool that maps to multiple single_use features + +--- + +## Item Types + +Products contain an array of items. There are distinct item patterns: + +### 1. Flat Fee (standalone price, no feature) +\`\`\`typescript +{ feature_id: null, price: 13, interval: "month" } +\`\`\` +Customer pays $13/month as a base subscription fee. + +### 2. Free Feature Allocation (feature grant, no price) +\`\`\`typescript +{ feature_id: "credits", included_usage: 10000 } +\`\`\` +Customer gets 10,000 credits included. + +### 3. Metered/Usage-Based Pricing +\`\`\`typescript +{ feature_id: "credits", included_usage: 10000, price: 0.01, usage_model: "pay_per_use", interval: "month" } +\`\`\` +Customer can use 10,000 credits per month, then pays $0.01 per credit after that. + +### 4. Prepaid Credit Purchase (one-time purchase of usage) +\`\`\`typescript +{ feature_id: "credits", price: 10, usage_model: "prepaid", billing_units: 10000 } +\`\`\` +Customer pays $10 once to receive 10,000 credits. + +### 5. Per-Unit Pricing Structure +For any "per-X" pricing (like "$Y per seat", "$Y per project", "$Y per website"), use this pattern: +\`\`\`typescript +// Base subscription fee +{ feature_id: null, price: 10, interval: "month" } +// Unit allocation +{ feature_id: "seats", included_usage: 1, price: 10, usage_model: "pay_per_use", billing_units: 1 } +\`\`\` +This creates: $10/month base price that includes 1 unit, then $10 per additional unit purchased. + +**Always** use this two-item pattern for any per-unit pricing - never use pure per-unit without a base fee. + +--- + +## Guidelines + +### Naming Conventions +- Product and Feature IDs should be lowercase with underscores (e.g., \`pro_plan\`, \`chat_messages\`) + +### Default Plans +- **Never** set \`is_default: true\` for plans with prices. Default plans must be free. + +### Enterprise Plans +- Ignore "Enterprise" plans with custom pricing in the config. Custom plans can be created per-customer in the Autumn dashboard. + +### Annual Plans +- For annual variants, create a separate plan with annual price interval. Name it \` - Annual\`. + +### Currency +- Currency can be changed in the Autumn dashboard under Developer > Stripe. + +--- + +## Example Configuration + +\`\`\`typescript +import { feature, plan, planFeature } from "atmn"; + +// Features +export const messages = feature({ + id: "messages", + name: "Messages", + type: "single_use", +}); + +export const seats = feature({ + id: "seats", + name: "Team Seats", + type: "continuous_use", +}); + +// Plans +export const free = plan({ + id: "free", + name: "Free", + is_default: true, + items: [ + { feature_id: "messages", included_usage: 100 }, + { feature_id: "seats", included_usage: 1 }, + ], +}); + +export const pro = plan({ + id: "pro", + name: "Pro", + items: [ + { feature_id: null, price: 29, interval: "month" }, + { feature_id: "messages", included_usage: 10000, price: 0.01, usage_model: "pay_per_use" }, + { feature_id: "seats", included_usage: 5, price: 10, usage_model: "pay_per_use", billing_units: 1 }, + ], +}); +\`\`\` + +--- + +## Next Steps + +Once you've designed your pricing: +1. Update \`autumn.config.ts\` with your features and plans +2. Run \`atmn push\` to sync your configuration to Autumn +3. Test in sandbox mode before going live + +For more help: https://discord.gg/atmn (we're very responsive) + +Docs: https://docs.useautumn.com/llms.txt`; diff --git a/atmn/src/prompts/usage.ts b/atmn/src/prompts/usage.ts new file mode 100644 index 00000000..7683e606 --- /dev/null +++ b/atmn/src/prompts/usage.ts @@ -0,0 +1,124 @@ +export const usagePrompt = `## Add Autumn gating and usage tracking + +Autumn tracks feature usage and enforces limits. Add usage tracking to this codebase. + +### Step 1: Detect my integration type + +Check if this codebase already has Autumn set up: +- If there's an \`AutumnProvider\` and \`autumnHandler\` mounted → **React hooks available** (can use for UX) +- Backend SDK should **always** be used to enforce limits server-side + +Tell me what you detected before proceeding. + +--- + +## Frontend checks (React hooks) + +Use frontend checks for **UX only** - showing/hiding features, prompting upgrades. These should NOT be trusted for security. + +### Check feature access +\`\`\`tsx +import { useCustomer } from "autumn-js/react"; + +export function SendChatMessage() { + const { check, refetch } = useCustomer(); + + const handleSendMessage = async () => { + const { data } = check({ featureId: "messages" }); + + if (!data?.allowed) { + alert("You're out of messages"); + } else { + //send chatbot message + //then, refresh customer usage data + await refetch(); + } + }; +} +\`\`\` + +--- + +## Backend checks (required for security) + +**Always check on the backend** before executing any protected action. Frontend checks can be bypassed. + +### TypeScript +\`\`\`typescript +import { Autumn } from "autumn-js"; + +const autumn = new Autumn({ + secretKey: process.env.AUTUMN_SECRET_KEY, +}); + +// Check before executing the action +const { data } = await autumn.check({ + customer_id: "user_or_org_id_from_auth", + feature_id: "api_calls", +}); + +if (!data.allowed) { + return { error: "Usage limit reached" }; +} + +// Safe to proceed - do the actual work here +const result = await doTheActualWork(); + +// Track usage after success +await autumn.track({ + customer_id: "user_or_org_id_from_auth", + feature_id: "api_calls", + value: 1, +}); + +return result; +\`\`\` + +### Python +\`\`\`python +from autumn import Autumn + +autumn = Autumn('am_sk_test_xxx') + +# Check before executing the action +response = await autumn.check( + customer_id="user_or_org_id_from_auth", + feature_id="api_calls" +) + +if not response.allowed: + raise HTTPException(status_code=403, detail="Usage limit reached") + +# Safe to proceed - do the actual work here +result = await do_the_actual_work() + +# Track usage after success +await autumn.track( + customer_id="user_or_org_id_from_auth", + feature_id="api_calls", + value=1 +) + +return result +\`\`\` + +--- + +## Notes + +- **Frontend checks** = UX (show/hide UI, display limits) - can be bypassed by users +- **Backend checks** = Security (enforce limits) - required before any protected action +- Pattern: check → do work → track (only track after successful completion) +- Feature IDs come from the Autumn configuration +- Current usage and total limit can be taken from from Customer object and displayed -- see the Customer types from the Autumn SDK +\`\`\`tsx +import type { Customer } from "autumn-js"; + +//Balance is: customer.features..balance +\`\`\` + +For credit systems, see: https://docs.useautumn.com/examples/credits/llms.txt + +**Note:** Your Autumn configuration is in \`autumn.config.ts\` in your project root. + +Docs: https://docs.useautumn.com/llms.txt`; diff --git a/atmn/src/views/App.tsx b/atmn/src/views/App.tsx new file mode 100644 index 00000000..a27f1396 --- /dev/null +++ b/atmn/src/views/App.tsx @@ -0,0 +1,13 @@ +import React from "react"; +import { Box, Text } from "ink"; + +export default function App() { + return ( + + + atmn + + Autumn CLI - Interactive Mode + + ); +} diff --git a/atmn/src/views/react/InitFlow.tsx.old b/atmn/src/views/react/InitFlow.tsx.old new file mode 100644 index 00000000..a6b2cc3b --- /dev/null +++ b/atmn/src/views/react/InitFlow.tsx.old @@ -0,0 +1,295 @@ +import { Box, Text, useApp } from "ink"; +import open from "open"; +import React, { useCallback, useEffect, useState, useRef } from "react"; +import { FRONTEND_URL } from "../../../source/constants.js"; +import { externalRequest } from "../../../source/core/api.js"; +import { getOrgMe } from "../../../source/core/requests/orgRequests.js"; +import { readFromEnv, storeToEnv } from "../../../source/core/utils.js"; +import { CLI_CLIENT_ID } from "../../commands/auth/constants.js"; +import { + getApiKeysWithToken, + startOAuthFlow, +} from "../../commands/auth/oauth.js"; +import { StatusLine } from "./components/StatusLine.js"; +import { StepHeader } from "./components/StepHeader.js"; + +const TOTAL_STEPS = 5; + +interface OrgInfo { + name: string; + slug: string; + env: string; + email?: string; + stripe_connection?: string; +} + +type AuthState = + | "checking" + | "not_authenticated" + | "authenticating" + | "authenticated" + | "error"; +type StripeState = + | "pending" + | "checking" + | "not_connected" + | "connecting" + | "connected" + | "error"; + +export function InitFlow() { + const { exit } = useApp(); + + // Step 1: Auth + const [authState, setAuthState] = useState("checking"); + const [orgInfo, setOrgInfo] = useState(null); + const [authError, setAuthError] = useState(null); + + // Step 2: Stripe + const [stripeState, setStripeState] = useState("pending"); + const [stripeError, setStripeError] = useState(null); + const pollIntervalRef = useRef(null); + + const startAuth = useCallback(async () => { + setAuthState("authenticating"); + + try { + const { tokens } = await startOAuthFlow(CLI_CLIENT_ID); + const { sandboxKey, prodKey } = await getApiKeysWithToken( + tokens.access_token, + ); + + await storeToEnv(prodKey, sandboxKey); + + // Fetch org info with new key + const info = await getOrgMe(); + setOrgInfo(info); + setAuthState("authenticated"); + } catch (error) { + setAuthError( + error instanceof Error ? error.message : "Authentication failed", + ); + setAuthState("error"); + } + }, []); + + const connectStripe = useCallback(async () => { + setStripeState("connecting"); + + // Open dashboard to Stripe connect page + const stripeConnectUrl = `${FRONTEND_URL}/dev?tab=stripe`; + await open(stripeConnectUrl); + + // Poll for Stripe connection + const maxAttempts = 60; // 5 minutes with 5 second intervals + let attempts = 0; + + const pollInterval = setInterval(async () => { + attempts++; + + try { + const orgDetails = (await externalRequest({ + method: "GET", + path: "/organization", + throwOnError: true, + })) as { stripe_connection?: string }; + + if (orgDetails.stripe_connection && orgDetails.stripe_connection !== "none") { + if (pollIntervalRef.current) { + clearInterval(pollIntervalRef.current); + pollIntervalRef.current = null; + } + setStripeState("connected"); + } else if (attempts >= maxAttempts) { + if (pollIntervalRef.current) { + clearInterval(pollIntervalRef.current); + pollIntervalRef.current = null; + } + setStripeError("Timed out waiting for Stripe connection"); + setStripeState("error"); + } + } catch { + // Continue polling on error + } + }, 5000); + + pollIntervalRef.current = pollInterval; + }, []); + + const checkStripe = useCallback(async () => { + setStripeState("checking"); + + try { + // Fetch org details to check Stripe connection + const orgDetails = (await externalRequest({ + method: "GET", + path: "/organization", + throwOnError: true, + })) as { stripe_connection?: string }; + + if (orgDetails.stripe_connection && orgDetails.stripe_connection !== "none") { + setStripeState("connected"); + } else { + setStripeState("not_connected"); + // Auto-open Stripe connect page + await connectStripe(); + } + } catch (error) { + setStripeError( + error instanceof Error + ? error.message + : "Failed to check Stripe status", + ); + setStripeState("error"); + } + }, [connectStripe]); + + const checkAuth = useCallback(async () => { + setAuthState("checking"); + + try { + const apiKey = readFromEnv({ bypass: true }); + + if (!apiKey) { + setAuthState("not_authenticated"); + // Auto-start OAuth flow + await startAuth(); + return; + } + + // Verify the key works by fetching org info + const info = await getOrgMe(); + setOrgInfo(info); + setAuthState("authenticated"); + } catch { + // Key exists but is invalid + setAuthState("not_authenticated"); + await startAuth(); + } + }, [startAuth]); + + // Step 1: Check authentication on mount + useEffect(() => { + checkAuth(); + }, [checkAuth]); + + // Step 2: Check Stripe when auth completes + useEffect(() => { + if (authState === "authenticated" && orgInfo) { + checkStripe(); + } + }, [authState, orgInfo, checkStripe]); + + // Cleanup: clear poll interval on unmount + useEffect(() => { + return () => { + if (pollIntervalRef.current) { + clearInterval(pollIntervalRef.current); + pollIntervalRef.current = null; + } + }; + }, []); + + return ( + + {/* Welcome message */} + + + Welcome to{" "} + + Autumn + + ! Let's set up your billing. + + + + {/* Step 1: Authentication */} + + + + {authState === "checking" && ( + + )} + + {authState === "not_authenticated" && ( + + )} + + {authState === "authenticating" && ( + + )} + + {authState === "authenticated" && orgInfo && ( + + )} + + {authState === "error" && ( + + )} + + + {/* Step 2: Stripe Connection (only show after auth) */} + {authState === "authenticated" && ( + + + + {stripeState === "checking" && ( + + )} + + {stripeState === "not_connected" && ( + + )} + + {stripeState === "connecting" && ( + + + + {" "} + Complete the setup in your browser, then return here. + + + )} + + {stripeState === "connected" && ( + + )} + + {stripeState === "error" && ( + + )} + + )} + + {/* Exit on error */} + {(authState === "error" || stripeState === "error") && ( + + Press Ctrl+C to exit and try again. + + )} + + ); +} diff --git a/atmn/src/views/react/components/SelectMenu.tsx b/atmn/src/views/react/components/SelectMenu.tsx new file mode 100644 index 00000000..24a361ac --- /dev/null +++ b/atmn/src/views/react/components/SelectMenu.tsx @@ -0,0 +1,24 @@ +import React from "react"; +import SelectInput from "ink-select-input"; + +/** + * Wrapper around ink-select-input for consistent styling + */ + +export interface SelectMenuItem { + label: string; + value: V; + disabled?: boolean; +} + +export interface SelectMenuProps { + items: SelectMenuItem[]; + onSelect: (item: SelectMenuItem) => void; +} + +export function SelectMenu({ + items, + onSelect, +}: SelectMenuProps) { + return ; +} diff --git a/atmn/src/views/react/components/StatusLine.tsx b/atmn/src/views/react/components/StatusLine.tsx new file mode 100644 index 00000000..d337e799 --- /dev/null +++ b/atmn/src/views/react/components/StatusLine.tsx @@ -0,0 +1,29 @@ +import React from "react"; +import { Text } from "ink"; +import Spinner from "ink-spinner"; + +interface StatusLineProps { + status: "pending" | "loading" | "success" | "error"; + message: string; + detail?: string; +} + +export function StatusLine({ status, message, detail }: StatusLineProps) { + const icon = { + pending: , + loading: ( + + + + ), + success: , + error: , + }[status]; + + return ( + + {icon} {message} + {detail && ({detail})} + + ); +} diff --git a/atmn/src/views/react/components/StepHeader.tsx b/atmn/src/views/react/components/StepHeader.tsx new file mode 100644 index 00000000..08c92cfe --- /dev/null +++ b/atmn/src/views/react/components/StepHeader.tsx @@ -0,0 +1,24 @@ +import { Box, Text } from "ink"; +import React from "react"; + +interface StepHeaderProps { + step: number; + totalSteps: number; + title: string; +} + +export function StepHeader({ step, totalSteps, title }: StepHeaderProps) { + return ( + + + + Step {step}/{totalSteps}: + {" "} + {title} + + + {"─".repeat(`Step ${step}/${totalSteps}:`.length)} + + + ); +} diff --git a/atmn/src/views/react/components/index.ts b/atmn/src/views/react/components/index.ts new file mode 100644 index 00000000..f2cb2989 --- /dev/null +++ b/atmn/src/views/react/components/index.ts @@ -0,0 +1,3 @@ +export { StepHeader } from "./StepHeader.js"; +export { StatusLine } from "./StatusLine.js"; +export { SelectMenu, type SelectMenuItem, type SelectMenuProps } from "./SelectMenu.js"; diff --git a/atmn/src/views/react/init/InitFlow.tsx b/atmn/src/views/react/init/InitFlow.tsx new file mode 100644 index 00000000..cfc1e50c --- /dev/null +++ b/atmn/src/views/react/init/InitFlow.tsx @@ -0,0 +1,76 @@ +import { Box, Text } from "ink"; +import React, { useState } from "react"; + +import { AuthStep } from "./steps/AuthStep.js"; +import { ConfigStep } from "./steps/ConfigStep.js"; +import { HandoffStep } from "./steps/HandoffStep.js"; + +const TOTAL_STEPS = 3; + +type Step = "auth" | "config" | "handoff"; + +interface OrgInfo { + name: string; + slug: string; +} + +export function InitFlow() { + const [currentStep, setCurrentStep] = useState("auth"); + const [orgInfo, setOrgInfo] = useState(null); + const [hasPricing, setHasPricing] = useState(false); + + const handleAuthComplete = (info: OrgInfo) => { + setOrgInfo(info); + setCurrentStep("config"); + }; + + const handleConfigComplete = (configHasPricing: boolean) => { + setHasPricing(configHasPricing); + setCurrentStep("handoff"); + }; + + const handleHandoffComplete = () => { + // HandoffStep handles exit via useApp() + }; + + return ( + + {/* Welcome message */} + + + Welcome to{" "} + + Autumn + + ! Let's set up your billing. + + + + {/* Step 1: Authentication */} + + + {/* Step 2: Configuration (only show after auth) */} + {(currentStep === "config" || currentStep === "handoff") && ( + + )} + + {/* Step 3: Handoff */} + {currentStep === "handoff" && ( + + )} + + ); +} diff --git a/atmn/src/views/react/init/steps/AgentStep.tsx b/atmn/src/views/react/init/steps/AgentStep.tsx new file mode 100644 index 00000000..25186e8b --- /dev/null +++ b/atmn/src/views/react/init/steps/AgentStep.tsx @@ -0,0 +1,335 @@ +import { MultiSelect } from "@inkjs/ui"; +import clipboard from "clipboardy"; +import { Box, Text } from "ink"; +import React, { useState } from "react"; +import { StatusLine, StepHeader } from "../../components/index.js"; +import { exec } from "node:child_process"; +import { promisify } from "node:util"; +import fs from "node:fs/promises"; +import path from "node:path"; + +const execAsync = promisify(exec); + +interface AgentStepProps { + step: number; + totalSteps: number; + onComplete: () => void; +} + +type AgentState = + | "selecting" + | "mcp-agents" + | "installing" + | "creating" + | "complete" + | "error"; + +/** + * Agent setup step - allows user to configure agent files + */ +export function AgentStep({ step, totalSteps, onComplete }: AgentStepProps) { + const [state, setState] = useState("selecting"); + const [selectedOptions, setSelectedOptions] = useState([]); + const [selectedAgents, setSelectedAgents] = useState([]); + const [error, setError] = useState(null); + + const options = [ + { + label: "MCP Server Config (for Claude Code, OpenCode, etc.)", + value: "mcp", + }, + { + label: "CLAUDE.md", + value: "claude-md", + }, + { + label: "AGENTS.md", + value: "agents-md", + }, + { + label: ".cursorrules", + value: "cursor-rules", + }, + ]; + + const agentOptions = [ + { + label: "Claude Code (auto-install via command)", + value: "claude-code", + }, + { + label: "OpenCode, Codex and others (copy URL to clipboard)", + value: "other", + }, + ]; + + const handleSubmit = (values: string[]) => { + setSelectedOptions(values); + + // If MCP is selected, go to agent selection + if (values.includes("mcp")) { + setState("mcp-agents"); + } else { + // Otherwise, create the other files + setState("creating"); + createFiles(values); + } + }; + + const handleAgentSubmit = (agents: string[]) => { + setSelectedAgents(agents); + setState("installing"); + + // Install MCP for selected agents + installMCP(agents); + }; + + const installMCP = async (agents: string[]) => { + try { + const mcpUrl = "https://docs.useautumn.com/mcp"; + + // Handle each selected agent + for (const agent of agents) { + if (agent === "claude-code") { + // Execute command to install MCP for Claude Code + try { + await execAsync(`claude mcp add --transport http autumn ${mcpUrl}`); + } catch (err) { + // If it fails, it might already exist - check the error message + const errorMessage = err instanceof Error ? err.message : String(err); + if (!errorMessage.includes("already exists")) { + // If it's not an "already exists" error, throw it + throw err; + } + // Otherwise, silently continue (already installed is fine) + } + } else if (agent === "other") { + // Copy URL to clipboard + await clipboard.write(mcpUrl); + } + } + + // Now create the other selected files + const nonMcpOptions = selectedOptions.filter((opt) => opt !== "mcp"); + if (nonMcpOptions.length > 0) { + setState("creating"); + await createFiles(nonMcpOptions); + } else { + setState("complete"); + setTimeout(() => { + onComplete(); + }, 1000); + } + } catch (err) { + setError(err instanceof Error ? err.message : "Failed to install MCP"); + setState("error"); + } + }; + + const createFiles = async (options: string[]) => { + try { + const cwd = process.cwd(); + + // Lorem ipsum content for markdown files + const markdownContent = ` + +# Autumn Billing Integration + +## Overview + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + +## Usage + +Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + +## Features + +- Lorem ipsum dolor sit amet +- Consectetur adipiscing elit +- Sed do eiusmod tempor incididunt + +## Resources + +- [Autumn Documentation](https://docs.useautumn.com) +- [API Reference](https://docs.useautumn.com/api) +`; + + // Lorem ipsum content for .cursorrules + const cursorRulesContent = ` + +# Autumn Billing Rules + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. +Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +`; + + // Helper function to append or create file + const appendOrCreate = async (filePath: string, content: string) => { + try { + // Try to read existing file + await fs.access(filePath); + // File exists, append content + await fs.appendFile(filePath, content, "utf-8"); + } catch { + // File doesn't exist, create it + await fs.writeFile(filePath, content.trimStart(), "utf-8"); + } + }; + + // Create/append files based on selected options + for (const option of options) { + if (option === "claude-md") { + await appendOrCreate(path.join(cwd, "CLAUDE.md"), markdownContent); + } else if (option === "agents-md") { + await appendOrCreate(path.join(cwd, "AGENTS.md"), markdownContent); + } else if (option === "cursor-rules") { + await appendOrCreate(path.join(cwd, ".cursorrules"), cursorRulesContent); + } + } + + setState("complete"); + setTimeout(() => { + onComplete(); + }, 1000); + } catch (err) { + setError(err instanceof Error ? err.message : "Failed to create files"); + setState("error"); + } + }; + + const handleChange = (values: string[]) => { + setSelectedOptions(values); + }; + + const handleAgentChange = (values: string[]) => { + setSelectedAgents(values); + }; + + if (state === "selecting") { + return ( + + + + Select agent configuration files to create/update: + (Space to select, Enter to confirm) + + + + + + ); + } + + if (state === "mcp-agents") { + return ( + + + + Which agent(s) are you using? + (Space to select, Enter to confirm) + + + + + + ); + } + + if (state === "installing") { + const installMessages: string[] = []; + + if (selectedAgents.includes("claude-code")) { + installMessages.push("Installing MCP for Claude Code..."); + } + + if ( + selectedAgents.includes("opencode") || + selectedAgents.includes("other") + ) { + installMessages.push("Copied MCP URL to clipboard!"); + } + + return ( + + + + {installMessages.map((msg) => ( + + ))} + + + ); + } + + if (state === "creating") { + return ( + + + o !== "mcp").length} file${selectedOptions.filter((o) => o !== "mcp").length !== 1 ? "s" : ""}...`} + /> + + ); + } + + if (state === "complete") { + const createdFiles: string[] = []; + + if (selectedAgents.length > 0) { + createdFiles.push("MCP server config"); + } + if (selectedOptions.includes("claude-md")) { + createdFiles.push("CLAUDE.md"); + } + if (selectedOptions.includes("agents-md")) { + createdFiles.push("AGENTS.md"); + } + if (selectedOptions.includes("cursor-rules")) { + createdFiles.push(".cursorrules"); + } + + return ( + + + 0 + ? `Created ${createdFiles.join(", ")}` + : "Setup complete" + } + /> + + ); + } + + if (state === "error") { + return ( + + + + + ); + } + + return null; +} diff --git a/atmn/src/views/react/init/steps/AuthStep.tsx b/atmn/src/views/react/init/steps/AuthStep.tsx new file mode 100644 index 00000000..fb083316 --- /dev/null +++ b/atmn/src/views/react/init/steps/AuthStep.tsx @@ -0,0 +1,128 @@ +import { Box } from "ink"; +import React, { useCallback, useEffect, useRef, useState } from "react"; +import { getOrgMe } from "../../../../../source/core/requests/orgRequests.js"; +import { readFromEnv, storeToEnv } from "../../../../../source/core/utils.js"; +import { CLI_CLIENT_ID } from "../../../../commands/auth/constants.js"; +import { + getApiKeysWithToken, + startOAuthFlow, +} from "../../../../commands/auth/oauth.js"; +import { StatusLine, StepHeader } from "../../components/index.js"; + +interface OrgInfo { + name: string; + slug: string; +} + +type AuthState = + | "checking" + | "not_authenticated" + | "authenticating" + | "authenticated" + | "error"; + +interface AuthStepProps { + step: number; + totalSteps: number; + onComplete: (orgInfo: OrgInfo) => void; +} + +export function AuthStep({ step, totalSteps, onComplete }: AuthStepProps) { + const [authState, setAuthState] = useState("checking"); + const [orgInfo, setOrgInfo] = useState(null); + const [authError, setAuthError] = useState(null); + const hasCheckedAuth = useRef(false); + const isCompleted = useRef(false); + + const startAuth = useCallback(async () => { + setAuthState("authenticating"); + + try { + const { tokens } = await startOAuthFlow(CLI_CLIENT_ID); + const { sandboxKey, prodKey } = await getApiKeysWithToken( + tokens.access_token, + ); + + await storeToEnv(prodKey, sandboxKey); + + // Fetch org info with new key + const info = await getOrgMe(); + setOrgInfo(info); + setAuthState("authenticated"); + + if (!isCompleted.current) { + isCompleted.current = true; + onComplete(info); + } + } catch (error) { + setAuthError( + error instanceof Error ? error.message : "Authentication failed", + ); + setAuthState("error"); + } + }, [onComplete]); + + const checkAuth = useCallback(async () => { + setAuthState("checking"); + + try { + const apiKey = readFromEnv({ bypass: true }); + + if (!apiKey) { + setAuthState("not_authenticated"); + await startAuth(); + return; + } + + // Verify the key works by fetching org info + const info = await getOrgMe(); + setOrgInfo(info); + setAuthState("authenticated"); + + if (!isCompleted.current) { + isCompleted.current = true; + onComplete(info); + } + } catch { + // Key exists but is invalid + setAuthState("not_authenticated"); + await startAuth(); + } + }, [startAuth, onComplete]); + + useEffect(() => { + // Only run the auth check once on mount + if (!hasCheckedAuth.current) { + hasCheckedAuth.current = true; + checkAuth(); + } + }, [checkAuth]); + + return ( + + + {authState === "checking" && ( + + )} + {authState === "not_authenticated" && ( + + )} + {authState === "authenticating" && ( + + )} + {authState === "authenticated" && orgInfo && ( + + )} + {authState === "error" && ( + + )} + + ); +} diff --git a/atmn/src/views/react/init/steps/ConfigStep.tsx b/atmn/src/views/react/init/steps/ConfigStep.tsx new file mode 100644 index 00000000..c7b5e1b0 --- /dev/null +++ b/atmn/src/views/react/init/steps/ConfigStep.tsx @@ -0,0 +1,294 @@ +import fs from "node:fs"; +import path from "node:path"; +import { Box, Text } from "ink"; +import React, { useCallback, useState } from "react"; +import { templateConfigs } from "../../../../lib/constants/templates/index.js"; +import { useConfigCounts } from "../../../../lib/hooks/index.js"; +import { buildConfigFile } from "../../../../lib/transforms/sdkToCode/configFile.js"; +import { writeEmptyConfig } from "../../../../lib/writeEmptyConfig.js"; +import { + SelectMenu, + type SelectMenuItem, + StatusLine, + StepHeader, +} from "../../components/index.js"; +import { InlineNukeFlow } from "../../nuke/InlineNukeFlow.js"; +import { PullView } from "../../pull/Pull.js"; +import { TemplateSelector } from "../../template/TemplateSelector.js"; + +type ConfigState = + | "choosing" + | "pulling" + | "nuking" + | "post_nuke_choice" + | "template" + | "complete" + | "error"; + +interface ConfigStepProps { + step: number; + totalSteps: number; + onComplete: (hasPricing: boolean) => void; +} + +export function ConfigStep({ step, totalSteps, onComplete }: ConfigStepProps) { + const [configState, setConfigState] = useState("choosing"); + const [error, setError] = useState(null); + const [completionAction, setCompletionAction] = useState< + "pull" | "nuke" | "template" | "blank" | null + >(null); + + // Fetch configuration counts using TanStack Query + const { + data: configCounts, + isLoading, + error: fetchError, + } = useConfigCounts(); + + const plansCount = configCounts?.plansCount ?? 0; + const featuresCount = configCounts?.featuresCount ?? 0; + const hasExistingConfig = plansCount > 0 || featuresCount > 0; + + const handlePullExisting = useCallback(() => { + setConfigState("pulling"); + }, []); + + const handleNuke = useCallback(() => { + setConfigState("nuking"); + }, []); + + const handleTemplate = useCallback(() => { + setConfigState("template"); + }, []); + + const handleBlank = useCallback(() => { + try { + writeEmptyConfig(); + setCompletionAction("blank"); + setConfigState("complete"); + setTimeout(() => { + onComplete(false); // No pricing + }, 1000); + } catch (err) { + setError(err instanceof Error ? err.message : "Failed to write config"); + setConfigState("error"); + } + }, [onComplete]); + + const handleTemplateSelect = useCallback( + (template: string) => { + const config = templateConfigs[template]; + if (!config) { + setError(`Unknown template: ${template}`); + setConfigState("error"); + return; + } + + try { + // Generate the config file content + const configContent = buildConfigFile(config.features, config.plans); + + // Write to autumn.config.ts + const configPath = path.join(process.cwd(), "autumn.config.ts"); + fs.writeFileSync(configPath, configContent, "utf-8"); + + setCompletionAction("template"); + setConfigState("complete"); + setTimeout(() => { + onComplete(true); // Has pricing from template + }, 1000); + } catch (err) { + setError(err instanceof Error ? err.message : "Failed to write config"); + setConfigState("error"); + } + }, + [onComplete], + ); + + const handleTemplateCancel = useCallback(() => { + // If we came from post-nuke choice, go back there; otherwise go back to main choosing + if (completionAction === "nuke") { + setConfigState("post_nuke_choice"); + } else { + setConfigState("choosing"); + } + }, [completionAction]); + + const handleSelectOption = useCallback( + (item: SelectMenuItem) => { + if (item.value === "pull") { + handlePullExisting(); + } else if (item.value === "nuke") { + handleNuke(); + } else if (item.value === "template") { + handleTemplate(); + } else if (item.value === "blank") { + handleBlank(); + } + }, + [handlePullExisting, handleNuke, handleTemplate, handleBlank], + ); + + const handlePostNukeSelect = useCallback( + (item: SelectMenuItem) => { + if (item.value === "template") { + setCompletionAction("nuke"); // Track that we came from nuke + handleTemplate(); + } else if (item.value === "blank") { + handleBlank(); + } + }, + [handleTemplate, handleBlank], + ); + + // Menu items based on whether config exists + const menuItems: SelectMenuItem[] = hasExistingConfig + ? [ + { + label: `Pull existing (${plansCount} plan${plansCount !== 1 ? "s" : ""}, ${featuresCount} feature${featuresCount !== 1 ? "s" : ""})`, + value: "pull", + }, + { + label: "Nuke and start fresh", + value: "nuke", + }, + ] + : [ + { + label: "Use a template", + value: "template", + }, + { + label: "Start from scratch", + value: "blank", + }, + ]; + + // Post-nuke menu items + const postNukeMenuItems: SelectMenuItem[] = [ + { + label: "Use a template", + value: "template", + }, + { + label: "Start from scratch", + value: "blank", + }, + ]; + + // Handle loading state from query + if (isLoading) { + return ( + + + + + ); + } + + // Handle error state from query + if (fetchError) { + return ( + + + + + ); + } + + return ( + + + {configState === "choosing" && ( + + + {hasExistingConfig + ? "Found existing pricing in your sandbox:" + : "Your sandbox is empty. How do you want to start?"} + + + + + + )} + {configState === "pulling" && ( + { + setCompletionAction("pull"); + setConfigState("complete"); + setTimeout(() => { + onComplete(true); // Has pricing from pull + }, 1000); + }} + /> + )} + {configState === "nuking" && ( + { + setCompletionAction("nuke"); + setConfigState("post_nuke_choice"); + }} + onCancel={() => { + setConfigState("choosing"); + }} + /> + )} + {configState === "post_nuke_choice" && ( + + + + Now, how do you want to set up your pricing? + + + + + + )} + {configState === "template" && ( + { + handleTemplateSelect(template); + }} + onCancel={handleTemplateCancel} + /> + )} + {configState === "complete" && ( + + + + )} + {configState === "error" && ( + + )} + + ); +} diff --git a/atmn/src/views/react/init/steps/HandoffStep.tsx b/atmn/src/views/react/init/steps/HandoffStep.tsx new file mode 100644 index 00000000..0e80ce02 --- /dev/null +++ b/atmn/src/views/react/init/steps/HandoffStep.tsx @@ -0,0 +1,202 @@ +import fs from "node:fs/promises"; +import path from "node:path"; +import { Select } from "@inkjs/ui"; +import { Box, Text, useApp } from "ink"; +import React, { useState } from "react"; +import { customerPrompt } from "../../../../prompts/customer.js"; +import { paymentsPrompt } from "../../../../prompts/payments.js"; +import { pricingPrompt } from "../../../../prompts/pricing.js"; +import { usagePrompt } from "../../../../prompts/usage.js"; +import { StatusLine, StepHeader } from "../../components/index.js"; + +interface HandoffStepProps { + step: number; + totalSteps: number; + hasPricing: boolean; + onComplete: () => void; +} + +type HandoffState = "ai_choice" | "creating" | "complete" | "manual_exit"; + +const GUIDES_DIR = "autumn-guides"; + +export function HandoffStep({ + step, + totalSteps, + hasPricing, + onComplete, +}: HandoffStepProps) { + const { exit } = useApp(); + const [state, setState] = useState("ai_choice"); + const [error, setError] = useState(null); + const [filesCreated, setFilesCreated] = useState([]); + + const aiChoiceOptions = [ + { label: "Yes, set me up with AI guides", value: "yes" }, + { label: "No thanks, I'll figure it out", value: "no" }, + ]; + + const handleAiChoice = async (value: string) => { + if (value === "no") { + setState("manual_exit"); + setTimeout(() => { + exit(); + }, 100); + return; + } + + // AI-assisted path + setState("creating"); + + try { + const cwd = process.cwd(); + const guidesPath = path.join(cwd, GUIDES_DIR); + + // Create the guides directory + await fs.mkdir(guidesPath, { recursive: true }); + + const created: string[] = []; + + // Always write customer, payments, usage guides + await fs.writeFile( + path.join(guidesPath, "1_Customer_Creation.md"), + customerPrompt, + "utf-8", + ); + created.push("1_Customer_Creation.md"); + + await fs.writeFile( + path.join(guidesPath, "2_Accepting_Payments.md"), + paymentsPrompt, + "utf-8", + ); + created.push("2_Accepting_Payments.md"); + + await fs.writeFile( + path.join(guidesPath, "3_Tracking_Usage.md"), + usagePrompt, + "utf-8", + ); + created.push("3_Tracking_Usage.md"); + + // Only write pricing guide if user doesn't have pricing yet + if (!hasPricing) { + await fs.writeFile( + path.join(guidesPath, "0_Designing_Pricing.md"), + pricingPrompt, + "utf-8", + ); + created.unshift("0_Designing_Pricing.md"); + } + + setFilesCreated(created); + setState("complete"); + + setTimeout(() => { + exit(); + }, 100); + } catch (err) { + setError(err instanceof Error ? err.message : "Failed to create guides"); + setState("complete"); + } + }; + + if (state === "ai_choice") { + return ( + + + + Want us to generate guides for your AI coding assistant? + + setQuantityInput(e.target.value)} + /> +

+ {billingUnits > 1 && `x ${billingUnits} `} + {item.feature?.name} +

+
+ + +
+ + +
+

+ {item.display?.primary_text} {item.display?.secondary_text} +

+
+ ); +}; + +export const PriceItem = ({ + children, + className, + ...props +}: { + children: React.ReactNode; + className?: string; +} & React.HTMLAttributes): React.JSX.Element => { + return ( +
+ {children} +
+ ); +}; + +export const PricingDialogButton = ({ + children, + size, + onClick, + disabled, + className, +}: { + children: React.ReactNode; + size?: "sm" | "lg" | "default" | "icon"; + onClick: () => void; + disabled?: boolean; + className?: string; +}): React.JSX.Element => { + return ( + + ); +}; diff --git a/package/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx b/package/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx new file mode 100644 index 00000000..4b73d413 --- /dev/null +++ b/package/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx @@ -0,0 +1,144 @@ +import { type CheckoutResult } from "@sdk"; + +import type React from "react"; + +export const getCheckoutContent = (checkoutResult: CheckoutResult): { title: React.JSX.Element; message: React.JSX.Element } => { + const { product, current_product, next_cycle } = checkoutResult; + const { is_one_off, is_free, has_trial, updateable } = product.properties; + const scenario = product.scenario; + + const nextCycleAtStr = next_cycle + ? new Date(next_cycle.starts_at).toLocaleDateString() + : undefined; + + const productName = product.name; + + if (is_one_off) { + return { + title:

Purchase {productName}

, + message: ( +

+ By clicking confirm, you will purchase {productName} and your card + will be charged immediately. +

+ ), + }; + } + + if (scenario == "active" && updateable) { + if (updateable) { + return { + title:

Update Plan

, + message: ( +

+ Update your prepaid quantity. You'll be charged or credited the + prorated difference based on your current billing cycle. +

+ ), + }; + } + } + + if (has_trial) { + return { + title:

Start trial for {productName}

, + message: ( +

+ By clicking confirm, you will start a free trial of {productName}{" "} + which ends on {nextCycleAtStr}. +

+ ), + }; + } + + switch (scenario) { + case "scheduled": + return { + title:

{productName} product already scheduled

, + message: ( +

+ You are currently on product {current_product.name} and are + scheduled to start {productName} on {nextCycleAtStr}. +

+ ), + }; + + case "active": + return { + title:

Product already active

, + message:

You are already subscribed to this product.

, + }; + + case "new": + if (is_free) { + return { + title:

Enable {productName}

, + message: ( +

+ By clicking confirm, {productName} will be enabled immediately. +

+ ), + }; + } + + return { + title:

Subscribe to {productName}

, + message: ( +

+ By clicking confirm, you will be subscribed to {productName} and + your card will be charged immediately. +

+ ), + }; + case "renew": + return { + title:

Renew

, + message: ( +

+ By clicking confirm, you will renew your subscription to{" "} + {productName}. +

+ ), + }; + + case "upgrade": + return { + title:

Upgrade to {productName}

, + message: ( +

+ By clicking confirm, you will upgrade to {productName} and your + payment method will be charged immediately. +

+ ), + }; + + case "downgrade": + return { + title:

Downgrade to {productName}

, + message: ( +

+ By clicking confirm, your current subscription to{" "} + {current_product.name} will be cancelled and a new subscription to{" "} + {productName} will begin on {nextCycleAtStr}. +

+ ), + }; + + case "cancel": + return { + title:

Cancel

, + message: ( +

+ By clicking confirm, your subscription to {current_product.name}{" "} + will end on {nextCycleAtStr}. +

+ ), + }; + + default: + return { + title:

Change Subscription

, + message:

You are about to change your subscription.

, + }; + } +}; diff --git a/package/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx b/package/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx new file mode 100644 index 00000000..e6721288 --- /dev/null +++ b/package/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx @@ -0,0 +1,63 @@ +import { type CheckFeaturePreview } from "@sdk"; + +export const getPaywallContent = (preview?: CheckFeaturePreview) => { + if (!preview) { + return { + title: "Feature Unavailable", + message: "This feature is not available for your account.", + }; + } + + const { scenario, products, feature_name } = preview; + + if (products.length == 0) { + switch (scenario) { + case "usage_limit": + return { + title: `Feature Unavailable`, + message: `You have reached the usage limit for ${feature_name}. Please contact us to increase your limit.`, + }; + default: + return { + title: "Feature Unavailable", + message: + "This feature is not available for your account. Please contact us to enable it.", + }; + } + } + + const nextProduct = products[0]; + + const isAddOn = nextProduct && nextProduct.is_add_on; + + const title = nextProduct.free_trial + ? `Start trial for ${nextProduct.name}` + : nextProduct.is_add_on + ? `Purchase ${nextProduct.name}` + : `Upgrade to ${nextProduct.name}`; + + let message = ""; + if (isAddOn) { + message = `Please purchase the ${nextProduct.name} add-on to continue using ${feature_name}.`; + } else { + message = `Please upgrade to the ${nextProduct.name} plan to continue using ${feature_name}.`; + } + + switch (scenario) { + case "usage_limit": + return { + title: title, + message: `You have reached the usage limit for ${feature_name}. ${message}`, + }; + case "feature_flag": + return { + title: title, + message: `This feature is not available for your account. ${message}`, + }; + default: + return { + title: "Feature Unavailable", + message: "This feature is not available for your account.", + }; + } +}; diff --git a/package/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx b/package/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx new file mode 100644 index 00000000..830edb74 --- /dev/null +++ b/package/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx @@ -0,0 +1,57 @@ +"use client"; + +import { + Dialog, + DialogContent, + DialogFooter, + DialogTitle, +} from "@/components/ui/dialog"; + +import { Button } from "@/components/ui/button"; +import { usePaywall } from "@/index"; +import { getPaywallContent } from "./lib/paywall-content"; +import { cn } from "@/lib/utils"; +import { JSX } from "react"; + +export interface PaywallDialogProps { + open: boolean; + setOpen: (open: boolean) => void; + featureId: string; + entityId?: string; +} + +export default function PaywallDialog(params?: PaywallDialogProps): JSX.Element { + const { data: preview } = usePaywall({ + featureId: params?.featureId, + entityId: params?.entityId, + }); + + if (!params || !preview) { + return <>; + } + + const { open, setOpen } = params; + const { title, message } = getPaywallContent(preview); + + return ( + + + + {title} + +
{message}
+ + + +
+
+ ); +} diff --git a/package/src/libraries/react/components/ui/accordion.tsx b/package/src/libraries/react/components/ui/accordion.tsx new file mode 100644 index 00000000..fc30ee12 --- /dev/null +++ b/package/src/libraries/react/components/ui/accordion.tsx @@ -0,0 +1,61 @@ +import * as React from "react" +import * as AccordionPrimitive from "@radix-ui/react-accordion" +import { ChevronDown } from "lucide-react" + +import { cn } from "@/lib/utils" + +const Accordion: typeof AccordionPrimitive.Root = AccordionPrimitive.Root + +type AccordionItemRef = React.ElementRef +type AccordionItemProps = React.ComponentPropsWithoutRef + +const AccordionItem: React.ForwardRefExoticComponent< + AccordionItemProps & React.RefAttributes +> = React.forwardRef(({ className, ...props }, ref) => ( + +)) +AccordionItem.displayName = "AccordionItem" + +type AccordionTriggerRef = React.ElementRef +type AccordionTriggerProps = React.ComponentPropsWithoutRef + +const AccordionTrigger: React.ForwardRefExoticComponent< + AccordionTriggerProps & React.RefAttributes +> = React.forwardRef(({ className, children, ...props }, ref) => ( + + svg]:au-rotate-180", + className + )} + {...props} + > + {children} + + + +)) +AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName + +type AccordionContentRef = React.ElementRef +type AccordionContentProps = React.ComponentPropsWithoutRef + +const AccordionContent: React.ForwardRefExoticComponent< + AccordionContentProps & React.RefAttributes +> = React.forwardRef(({ className, children, ...props }, ref) => ( + +
{children}
+
+)) +AccordionContent.displayName = AccordionPrimitive.Content.displayName + +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } diff --git a/package/src/libraries/react/components/ui/button.tsx b/package/src/libraries/react/components/ui/button.tsx new file mode 100644 index 00000000..111241f8 --- /dev/null +++ b/package/src/libraries/react/components/ui/button.tsx @@ -0,0 +1,59 @@ +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { cva, type VariantProps } from "class-variance-authority"; + +import { cn } from "@/lib/utils"; + +const buttonVariants: any = cva( + "au-inline-flex au-items-center au-justify-center au-gap-2 au-whitespace-nowrap au-rounded-md au-text-sm au-font-medium au-transition-colors focus-visible:au-outline-none focus-visible:au-ring-1 focus-visible:au-ring-ring disabled:au-pointer-events-none disabled:au-opacity-50 [&_svg]:au-pointer-events-none [&_svg]:au-size-4 [&_svg]:au-shrink-0", + { + variants: { + variant: { + default: + "au-bg-primary au-text-primary-foreground au-shadow hover:au-bg-primary/90", + destructive: + "au-bg-destructive au-text-destructive-foreground au-shadow-sm hover:au-bg-destructive/90", + outline: + "au-border au-border-input au-bg-background au-shadow-sm hover:au-bg-accent hover:au-text-accent-foreground", + secondary: + "au-bg-secondary au-text-secondary-foreground au-shadow-sm hover:au-bg-secondary/80", + ghost: "hover:au-bg-accent hover:au-text-accent-foreground", + link: "au-text-primary au-underline-offset-4 hover:au-underline", + }, + size: { + default: "au-h-9 au-px-4 au-py-2", + sm: "au-h-8 au-rounded-md au-px-3 au-text-xs", + lg: "au-h-10 au-rounded-md au-px-8", + icon: "au-h-9 au-w-9", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +); + +export interface ButtonProps + extends React.ButtonHTMLAttributes { + asChild?: boolean; + variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null; + size?: "default" | "sm" | "lg" | "icon" | null; +} + +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + // console.log("Button className", className); + const Comp = asChild ? Slot : "button"; + return ( + + ); + } +); +Button.displayName = "Button"; + +export { Button, buttonVariants }; diff --git a/package/src/libraries/react/components/ui/dialog.tsx b/package/src/libraries/react/components/ui/dialog.tsx new file mode 100644 index 00000000..823cfed3 --- /dev/null +++ b/package/src/libraries/react/components/ui/dialog.tsx @@ -0,0 +1,139 @@ +"use client"; + +import * as React from "react"; +import * as DialogPrimitive from "@radix-ui/react-dialog"; +import { X } from "lucide-react"; + +import { cn } from "@/lib/utils"; + +const Dialog: typeof DialogPrimitive.Root = DialogPrimitive.Root; + +const DialogTrigger: typeof DialogPrimitive.Trigger = DialogPrimitive.Trigger; + +const DialogPortal = ({ + children, + ...props +}: React.ComponentProps): React.JSX.Element => { + return ( + +
{children}
+
+ ); +}; + +const DialogClose: typeof DialogPrimitive.Close = DialogPrimitive.Close; + +type DialogOverlayRef = React.ElementRef; +type DialogOverlayProps = React.ComponentPropsWithoutRef; + +const DialogOverlay: React.ForwardRefExoticComponent< + DialogOverlayProps & React.RefAttributes +> = React.forwardRef(({ className, ...props }, ref) => ( + +)); +DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; + +type DialogContentRef = React.ElementRef; +type DialogContentProps = React.ComponentPropsWithoutRef; + +const DialogContent: React.ForwardRefExoticComponent< + DialogContentProps & React.RefAttributes +> = React.forwardRef(({ className, children, ...props }, ref) => ( + + + + {children} + + + Close + + + +)); +DialogContent.displayName = DialogPrimitive.Content.displayName; + +const DialogHeader = ({ + className, + ...props +}: React.HTMLAttributes): React.JSX.Element => ( +
+); +DialogHeader.displayName = "DialogHeader"; + +const DialogFooter = ({ + className, + ...props +}: React.HTMLAttributes): React.JSX.Element => ( +
+); +DialogFooter.displayName = "DialogFooter"; + +type DialogTitleRef = React.ElementRef; +type DialogTitleProps = React.ComponentPropsWithoutRef; + +const DialogTitle: React.ForwardRefExoticComponent< + DialogTitleProps & React.RefAttributes +> = React.forwardRef(({ className, ...props }, ref) => ( + +)); +DialogTitle.displayName = DialogPrimitive.Title.displayName; + +type DialogDescriptionRef = React.ElementRef; +type DialogDescriptionProps = React.ComponentPropsWithoutRef; + +const DialogDescription: React.ForwardRefExoticComponent< + DialogDescriptionProps & React.RefAttributes +> = React.forwardRef(({ className, ...props }, ref) => ( + +)); +DialogDescription.displayName = DialogPrimitive.Description.displayName; + +export { + Dialog, + DialogPortal, + DialogOverlay, + DialogTrigger, + DialogClose, + DialogContent, + DialogHeader, + DialogFooter, + DialogTitle, + DialogDescription, +}; diff --git a/package/src/libraries/react/components/ui/input.tsx b/package/src/libraries/react/components/ui/input.tsx new file mode 100644 index 00000000..f59cc9b9 --- /dev/null +++ b/package/src/libraries/react/components/ui/input.tsx @@ -0,0 +1,22 @@ +import * as React from "react"; + +import { cn } from "@/lib/utils"; + +const Input = React.forwardRef>( + ({ className, type, onClick, ...props }, ref) => { + return ( + + ); + } +); +Input.displayName = "Input"; + +export { Input }; diff --git a/package/src/libraries/react/components/ui/popover.tsx b/package/src/libraries/react/components/ui/popover.tsx new file mode 100644 index 00000000..f9604a1c --- /dev/null +++ b/package/src/libraries/react/components/ui/popover.tsx @@ -0,0 +1,31 @@ +import * as React from "react"; +import * as PopoverPrimitive from "@radix-ui/react-popover"; + +import { cn } from "@/lib/utils"; + +const Popover: typeof PopoverPrimitive.Root = PopoverPrimitive.Root; + +const PopoverTrigger: typeof PopoverPrimitive.Trigger = PopoverPrimitive.Trigger; + +const PopoverAnchor: typeof PopoverPrimitive.Anchor = PopoverPrimitive.Anchor; + +type PopoverContentRef = React.ElementRef; +type PopoverContentProps = React.ComponentPropsWithoutRef; + +const PopoverContent: React.ForwardRefExoticComponent< + PopoverContentProps & React.RefAttributes +> = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => ( + +)); +PopoverContent.displayName = PopoverPrimitive.Content.displayName; + +export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }; diff --git a/package/src/libraries/react/components/ui/switch.tsx b/package/src/libraries/react/components/ui/switch.tsx new file mode 100644 index 00000000..00c03351 --- /dev/null +++ b/package/src/libraries/react/components/ui/switch.tsx @@ -0,0 +1,31 @@ +"use client"; + +import * as React from "react"; +import * as SwitchPrimitives from "@radix-ui/react-switch"; + +import { cn } from "@/lib/utils"; + +type SwitchRef = React.ElementRef; +type SwitchProps = React.ComponentPropsWithoutRef; + +const Switch: React.ForwardRefExoticComponent< + SwitchProps & React.RefAttributes +> = React.forwardRef(({ className, ...props }, ref) => ( + + + +)); +Switch.displayName = SwitchPrimitives.Root.displayName; + +export { Switch }; diff --git a/package/src/libraries/react/errorUtils/logAuthError.ts b/package/src/libraries/react/errorUtils/logAuthError.ts new file mode 100644 index 00000000..f7ffcb7f --- /dev/null +++ b/package/src/libraries/react/errorUtils/logAuthError.ts @@ -0,0 +1,17 @@ +export const logAuthError = async (response: Response) => { + if (response.status === 401) { + let clonedResponse = response.clone(); + let data = await clonedResponse.json(); + + if (data.message.includes("Missing authorization header")) { + console.error(`[Autumn] Missing authorization header. + +Use the getBearerToken prop in to set the authorization header. +https://docs.useautumn.com/quickstart/quickstart#5-set-up-autumnprovider`); + + return true; + } + } + + return false; +}; diff --git a/package/src/libraries/react/errorUtils/logFetchError.ts b/package/src/libraries/react/errorUtils/logFetchError.ts new file mode 100644 index 00000000..0c2c591e --- /dev/null +++ b/package/src/libraries/react/errorUtils/logFetchError.ts @@ -0,0 +1,18 @@ + +export const logFetchError = ({ + method, + backendUrl, + path, + error, +}: { + method: string; + backendUrl: string; + path: string; + error: any; +}) => { + + console.error(`[Autumn] Fetch failed: ${method} ${backendUrl}${path} + +1. Check that backendUrl in is correctly set. +2. Check that autumnHandler is correctly registered on your backend.`); +}; diff --git a/package/src/libraries/react/hooks/helpers/useAutumnBase.tsx b/package/src/libraries/react/hooks/helpers/useAutumnBase.tsx new file mode 100644 index 00000000..e2882d8f --- /dev/null +++ b/package/src/libraries/react/hooks/helpers/useAutumnBase.tsx @@ -0,0 +1,260 @@ +import { + BillingPortalResult, + CancelResult, + CheckResult, + SetupPaymentResult, + TrackResult, +} from "@sdk"; +import { AutumnContextParams } from "@/AutumnContext"; +import { + CancelParams, + CheckParams, + OpenBillingPortalParams, + SetupPaymentParams, + TrackParams, +} from "@/client/types/clientGenTypes"; +import { AutumnPromise } from "@sdk"; +import { usePricingTableBase } from "../usePricingTableBase"; +import { AttachResult } from "@sdk/general/attachTypes"; +import { AttachParams, CheckoutParams } from "@/client/types/clientAttachTypes"; +import { AutumnClient } from "@/client/ReactAutumnClient"; +import { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; + +export const useAutumnBase = ({ + // AutumnContext, + context, + client, + refetchCustomer, +}: { + // AutumnContext: React.Context; + context?: AutumnContextParams; + client: AutumnClient | ConvexAutumnClient; + refetchCustomer?: () => Promise; +}) => { + const { attachDialog, paywallDialog } = context || {}; + + const { refetch: refetchPricingTable } = usePricingTableBase({ client }); + + const attachWithoutDialog = async (params: AttachParams) => { + const result = await client.attach(params); + + if (result.error) { + return result; + } + + let data = result.data; + + if (data?.checkout_url && typeof window !== "undefined") { + if (params.openInNewTab) { + window.open(data.checkout_url, "_blank"); + } else { + window.location.href = data.checkout_url; + } + } + + await refetchPricingTable(); + if (refetchCustomer) { + await refetchCustomer(); + } + + attachDialog?.setOpen(false); + + return result; + }; + + const checkout = async (params: CheckoutParams) => { + const { data, error } = await client.checkout(params); + const { dialog, ...rest } = params; + + if (params.dialog && params.productIds) { + throw new Error( + "Dialog and productIds are not supported together in checkout()" + ); + } + + if (error) { + return { data, error }; + } + + const hasPrepaid = data.product.items.some( + (item: any) => item.usage_model === "prepaid" + ); + + const showDialog = hasPrepaid && params.dialog; + + if (data.url && !showDialog) { + if (params.openInNewTab) { + window.open(data.url, "_blank"); + } else { + window.location.href = data.url; + } + + return { data, error }; + } + + if (params.dialog) { + attachDialog?.setProps({ checkoutResult: data, checkoutParams: rest }); + attachDialog?.setComponent(params.dialog); + attachDialog?.setOpen(true); + } + + return { data, error }; + }; + + const attachWithDialog = async ( + params: AttachParams + ): AutumnPromise => { + let { ...rest } = params; + + const { productId, entityId, entityData } = params; + + const checkRes = await client.check({ + productId, + entityId, + entityData, + withPreview: true, + }); + + if (checkRes.error) { + return checkRes; + } + + let preview = checkRes.data.preview; + + if (!preview) { + return await attachWithoutDialog(rest); + } else { + attachDialog?.setProps({ preview, attachParams: rest }); + attachDialog?.setOpen(true); + } + + return checkRes; + }; + + const attach = async (params: AttachParams) => { + const { dialog } = params; + + if (dialog && !attachDialog?.open) { + attachDialog?.setComponent(dialog); + return await attachWithDialog(params); + } + + return await attachWithoutDialog(params); + }; + + const cancel = async (params: CancelParams): AutumnPromise => { + const res = await client.cancel(params); + + if (res.error) { + return res; + } + + return res; + }; + + // const check = async (params: CheckParams): AutumnPromise => { + // let { dialog, withPreview } = params; + + // if (dialog) { + // paywallDialog?.setComponent(dialog); + // } + + // const res = await client.check({ + // ...params, + // withPreview: withPreview || dialog ? true : false, + // }); + + // if (res.error) { + // return res; + // } + + // let data = res.data; + + // if (data && data.preview && dialog) { + // let preview = data.preview; + // paywallDialog?.setProps({ preview }); + // paywallDialog?.setOpen(true); + // } + + // return res; + // }; + + const track = async (params: TrackParams): AutumnPromise => { + const res = await client.track(params); + + if (res.error) { + return res; + } + + return res; + }; + + const openBillingPortal = async ( + params?: OpenBillingPortalParams + ): AutumnPromise => { + let defaultParams = { + openInNewTab: false, + }; + + let finalParams = { + ...defaultParams, + ...params, + }; + + const res = await client.openBillingPortal(finalParams); + + if (res.error) { + return res; + } + + let data = res.data; + + if (data?.url && typeof window !== "undefined") { + if (finalParams.openInNewTab) { + window.open(data.url, "_blank"); + } else { + window.open(data.url, "_self"); + } + + return res; + } else { + return res; + } + }; + + const setupPayment = async ( + params?: SetupPaymentParams + ): AutumnPromise => { + let defaultParams = { + openInNewTab: false, + }; + + let finalParams = { + ...defaultParams, + ...(params || {}), + }; + + const res = await client.setupPayment(finalParams); + + if (res.data?.url && typeof window !== "undefined") { + if (finalParams.openInNewTab) { + window.open(res.data.url, "_blank"); + } else { + window.open(res.data.url, "_self"); + } + + return res; + } else { + return res; + } + }; + + return { + attach, + track, + cancel, + openBillingPortal, + setupPayment, + checkout, + }; +}; diff --git a/package/src/libraries/react/hooks/helpers/useDialog.tsx b/package/src/libraries/react/hooks/helpers/useDialog.tsx new file mode 100644 index 00000000..db688e73 --- /dev/null +++ b/package/src/libraries/react/hooks/helpers/useDialog.tsx @@ -0,0 +1,16 @@ +import { useState, useEffect } from "react"; + +export const useDialog = (component?: any) => { + const [dialogProps, setDialogProps] = useState(null); + const [dialogOpen, setDialogOpen] = useState(false); + + useEffect(() => { + if (!dialogOpen) { + setTimeout(() => { + setDialogProps(null); + }, 200); + } + }, [dialogOpen]); + + return [dialogProps, setDialogProps, dialogOpen, setDialogOpen]; +}; diff --git a/package/src/libraries/react/hooks/useAggregateEvents.tsx b/package/src/libraries/react/hooks/useAggregateEvents.tsx new file mode 100644 index 00000000..3287633c --- /dev/null +++ b/package/src/libraries/react/hooks/useAggregateEvents.tsx @@ -0,0 +1,71 @@ +import { AutumnError, type AutumnErrorWithStatus } from "@sdk"; +import useSWR, { type SWRConfiguration } from "swr"; +import { AutumnContext, useAutumnContext } from "@/AutumnContext"; +import type { + EventAggregationParams, + EventAggregationResponse, +} from "@/client/types/clientAnalyticsTypes"; + +export const useAggregateEvents = ( + params: EventAggregationParams & { swrConfig?: SWRConfiguration }, +) => { + const context = useAutumnContext({ + AutumnContext, + name: "useAggregateEvents", + }); + + const client = context.client; + + const fetcher = async () => { + const res = await client.events.aggregate(params); + if (res.error) { + const err: AutumnErrorWithStatus = new AutumnError({ + message: res.error.message, + code: res.error.code, + }); + err.statusCode = res.statusCode; + throw err; + } + return res.data; + }; + + const startDate = params.customRange?.start + ? new Date(params.customRange.start).toISOString().slice(0, 13) + : undefined; + + const endDate = params.customRange?.end + ? new Date(params.customRange.end).toISOString().slice(0, 13) + : undefined; + + const { data, error, mutate } = useSWR( + [ + "eventAggregate", + params.featureId, + params.groupBy, + params.range, + startDate, + endDate, + params.binSize, + ], + fetcher, + { + dedupingInterval: 2000, + revalidateOnFocus: false, + revalidateOnReconnect: false, + shouldRetryOnError: (error) => + (error as AutumnErrorWithStatus).statusCode === 429, + errorRetryCount: 3, + refreshInterval: 0, + ...params.swrConfig, + }, + ); + + return { + list: data?.list, + total: data?.total, + + isLoading: !error && !data, + error, + refetch: mutate, + }; +}; diff --git a/package/src/libraries/react/hooks/useCustomer.tsx b/package/src/libraries/react/hooks/useCustomer.tsx new file mode 100644 index 00000000..efbda753 --- /dev/null +++ b/package/src/libraries/react/hooks/useCustomer.tsx @@ -0,0 +1,86 @@ +import type { CustomerExpandOption } from "@sdk"; +import { AutumnContext } from "../AutumnContext"; +import { + useCustomerBase, + type UseCustomerParams, + type UseCustomerResult, +} from "./useCustomerBase"; + +/** + * React hook for managing customer billing, subscriptions, and feature access. + * + * Provides access to all Autumn billing functions including product attachment, + * subscription management, usage tracking, and feature gating. Automatically + * handles customer data fetching and caching. + * + * @param params - Optional configuration for the hook + * @returns Object containing customer data and billing functions + * + * @example + * ```tsx + * import { useCustomer } from "autumn-js/react"; + * + * function MyComponent() { + * const { + * customer, + * isLoading, + * attach, + * cancel, + * check, + * track, + * checkout, + * openBillingPortal, + * setupPayment, + * createReferralCode, + * redeemReferralCode, + * createEntity, + * refetch + * } = useCustomer(); + * + * return ( + *
+ * + * + *
+ * ); + * } + * ``` + * + * @example + * ```tsx + * // With expanded fields - customer.entities will be typed + * const { customer } = useCustomer({ expand: ['entities', 'invoices'] }); + * customer?.entities; // Entity[] - fully typed! + * customer?.invoices; // CustomerInvoice[] - fully typed! + * ``` + * + * @returns {Object} Hook result object + * @returns {Customer | null} returns.customer - Current customer data with subscription info + * @returns {boolean} returns.isLoading - Whether customer data is loading + * @returns {AutumnError | null} returns.error - Any error from customer data fetching + * @returns {Function} returns.attach - Attach product to customer with billing + * @returns {Function} returns.cancel - Cancel customer subscription/product + * @returns {Function} returns.check - Check feature access and show paywalls + * @returns {Function} returns.track - Track feature usage events + * @returns {Function} returns.checkout - Initiate product checkout flow + * @returns {Function} returns.openBillingPortal - Open Stripe billing portal + * @returns {Function} returns.setupPayment - Setup payment method + * @returns {Function} returns.createReferralCode - Create referral codes + * @returns {Function} returns.redeemReferralCode - Redeem referral codes + * @returns {Function} returns.createEntity - Create entities for granular tracking + * @returns {Function} returns.refetch - Manually refetch customer data + */ +export const useCustomer = < + const T extends readonly CustomerExpandOption[] = readonly [], +>( + params?: UseCustomerParams, +): UseCustomerResult => { + return useCustomerBase({ + params, + AutumnContext: AutumnContext, + }); +}; diff --git a/package/src/libraries/react/hooks/useEntity.tsx b/package/src/libraries/react/hooks/useEntity.tsx new file mode 100644 index 00000000..790b7a57 --- /dev/null +++ b/package/src/libraries/react/hooks/useEntity.tsx @@ -0,0 +1,10 @@ +import { AutumnContext } from "../AutumnContext"; +import { GetEntityParams } from "../client/types/clientEntTypes"; +import { useEntityBase } from "./useEntityBase"; + +export const useEntity = ( + entityId: string | null, + params?: GetEntityParams +) => { + return useEntityBase({ AutumnContext, entityId, params }); +}; diff --git a/package/src/libraries/react/hooks/useListEvents.tsx b/package/src/libraries/react/hooks/useListEvents.tsx new file mode 100644 index 00000000..2fb2b1ef --- /dev/null +++ b/package/src/libraries/react/hooks/useListEvents.tsx @@ -0,0 +1,105 @@ +import { + AutumnError, + type AutumnErrorWithStatus, + type EventsListResponse, +} from "@sdk"; +import { useCallback, useState } from "react"; +import useSWR, { type SWRConfiguration } from "swr"; +import { AutumnContext, useAutumnContext } from "@/AutumnContext"; +import type { EventsListParams } from "@/client/types/clientAnalyticsTypes"; + +export const useListEvents = ( + params: EventsListParams & { swrConfig?: SWRConfiguration }, +) => { + const context = useAutumnContext({ + AutumnContext, + name: "useListEvents", + }); + + const client = context.client; + const limit = params.limit ?? 100; + const [page, setPage] = useState(0); + + const startDate = params.customRange?.start + ? new Date(params.customRange.start).toISOString().slice(0, 13) + : undefined; + + const endDate = params.customRange?.end + ? new Date(params.customRange.end).toISOString().slice(0, 13) + : undefined; + + const offset = page * limit; + + const fetcher = async () => { + const res = await client.events.list({ + ...params, + offset, + limit, + }); + + if (res.error) { + const err: AutumnErrorWithStatus = new AutumnError({ + message: res.error.message, + code: res.error.code, + }); + err.statusCode = res.statusCode; + throw err; + } + return res.data; + }; + + const { data, error, mutate, isLoading } = useSWR< + EventsListResponse, + AutumnError + >( + ["eventList", params.featureId, startDate, endDate, offset, limit], + fetcher, + { + dedupingInterval: 2000, + revalidateOnFocus: false, + revalidateOnReconnect: false, + shouldRetryOnError: (error) => + (error as AutumnErrorWithStatus).statusCode === 429, + errorRetryCount: 3, + refreshInterval: 0, + ...params.swrConfig, + }, + ); + + const hasMore = data?.has_more ?? false; + const hasPrevious = page > 0; + + const nextPage = useCallback(() => { + if (hasMore) { + setPage((p) => p + 1); + } + }, [hasMore]); + + const prevPage = useCallback(() => { + if (hasPrevious) { + setPage((p) => p - 1); + } + }, [hasPrevious]); + + const goToPage = useCallback((pageNum: number) => { + setPage(Math.max(0, pageNum)); + }, []); + + const resetPagination = useCallback(() => { + setPage(0); + }, []); + + return { + list: data?.list, + hasMore, + hasPrevious, + page, + isLoading, + error, + refetch: mutate, + nextPage, + prevPage, + goToPage, + resetPagination, + }; +}; diff --git a/package/src/libraries/react/hooks/usePaywall.tsx b/package/src/libraries/react/hooks/usePaywall.tsx new file mode 100644 index 00000000..87fbde5b --- /dev/null +++ b/package/src/libraries/react/hooks/usePaywall.tsx @@ -0,0 +1,45 @@ +import { AutumnContext, useAutumnContext } from "@/AutumnContext"; +import { AutumnClient } from "@/client/ReactAutumnClient"; +import { CheckFeaturePreview } from "@sdk"; +import useSWR from "swr"; + +export const usePaywall = ({ + featureId, + entityId, +}: { + featureId?: string; + entityId?: string; +}) => { + const context = useAutumnContext({ + AutumnContext, + name: "usePaywall", + }); + + const enabled = !!featureId && !!context; + + const fetcher = async () => { + if (!featureId) { + return { preview: undefined }; + } + + const { data, error } = await context.client.check({ + featureId, + withPreview: true, + }); + if (error) throw error; + return data; + }; + + const queryKey = [`check`, featureId, entityId]; + + const { data, error, isLoading } = useSWR(queryKey, fetcher, { + refreshInterval: 0, + enabled, + }); + + return { + data: data?.preview as CheckFeaturePreview | undefined, + error, + isLoading, + }; +}; diff --git a/package/src/libraries/react/hooks/usePricingTable.tsx b/package/src/libraries/react/hooks/usePricingTable.tsx new file mode 100644 index 00000000..f3bcac40 --- /dev/null +++ b/package/src/libraries/react/hooks/usePricingTable.tsx @@ -0,0 +1,17 @@ + import { usePricingTableBase } from "./usePricingTableBase"; +import { ProductDetails } from "../client/types/clientPricingTableTypes"; +import { AutumnContext, useAutumnContext } from "@/AutumnContext"; + +export const usePricingTable = (params?: { + productDetails?: ProductDetails[]; +}) => { + const context = useAutumnContext({ + AutumnContext, + name: "usePricingTable", + }); + + return usePricingTableBase({ + client: context.client, + params, + }); +}; diff --git a/package/src/libraries/react/hooks/useProductsBase.tsx b/package/src/libraries/react/hooks/useProductsBase.tsx new file mode 100644 index 00000000..b0457f6c --- /dev/null +++ b/package/src/libraries/react/hooks/useProductsBase.tsx @@ -0,0 +1,20 @@ +import { AutumnClient } from "@/client/ReactAutumnClient"; +import { AutumnContext, useAutumnContext } from "../AutumnContext"; +import useSWR from "swr"; + +export const useProductsBase = ({ client }: { client: AutumnClient }) => { + const fetcher = async () => { + const { data, error } = await client.products.list(); + if (error) throw error; + return data?.list || []; + }; + + const queryKey = [`products`]; + + const { data, error, isLoading } = useSWR(queryKey, fetcher, { + refreshInterval: 0, + shouldRetryOnError: false, + }); + + return { products: data, error, isLoading }; +}; diff --git a/package/src/libraries/react/index.ts b/package/src/libraries/react/index.ts new file mode 100644 index 00000000..39b65855 --- /dev/null +++ b/package/src/libraries/react/index.ts @@ -0,0 +1,23 @@ +// Import CSS for tsup injectStyle +import "../../styles/global.css"; + +export type { PricingTableProduct } from "@sdk/components/componentTypes"; +export type { ProductDetails } from "./client/types/clientPricingTableTypes"; +export { useAggregateEvents } from "./hooks/useAggregateEvents"; + +/** @deprecated Use useAggregateEvents or useListEvents instead */ +export { useAnalytics } from "./hooks/useAnalytics"; +export { useCustomer } from "./hooks/useCustomer"; +export { useEntity } from "./hooks/useEntity"; +export { useListEvents } from "./hooks/useListEvents"; +export { usePaywall } from "./hooks/usePaywall"; +export { usePricingTable } from "./hooks/usePricingTable"; +export { ReactAutumnProvider as AutumnProvider } from "./ReactAutumnProvider"; + +/** @deprecated */ +export const useAutumn = () => {}; + +// Auto-synced components +export { default as CheckoutDialog } from "./components/checkout-dialog/checkout-dialog-synced"; +export { default as PaywallDialog } from "./components/paywall-dialog/paywall-dialog-synced"; +export { default as PricingTable } from "./components/pricing-table/pricing-table-synced"; diff --git a/package/src/libraries/react/lib/utils.ts b/package/src/libraries/react/lib/utils.ts new file mode 100644 index 00000000..018e9e72 --- /dev/null +++ b/package/src/libraries/react/lib/utils.ts @@ -0,0 +1,11 @@ +import { clsx, type ClassValue } from "clsx"; +import { extendTailwindMerge } from "tailwind-merge"; + +// Create a custom twMerge that understands the "au-" prefix +const twMerge = extendTailwindMerge({ + prefix: "au-", +}); + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)); +} diff --git a/package/src/libraries/react/utils/compareParams.ts b/package/src/libraries/react/utils/compareParams.ts new file mode 100644 index 00000000..0e05396a --- /dev/null +++ b/package/src/libraries/react/utils/compareParams.ts @@ -0,0 +1,23 @@ +export const compareParams = (a: any, b: any): boolean => { + // Handle primitive types and null + if (a === b) return true; + if (a === null || b === null) return false; + if (typeof a !== "object" || typeof b !== "object") return false; + + // Handle arrays + if (Array.isArray(a) && Array.isArray(b)) { + if (a.length !== b.length) return false; + return a.every((item, index) => compareParams(item, b[index])); + } + + // Handle objects + const keysA = Object.keys(a); + const keysB = Object.keys(b); + + if (keysA.length !== keysB.length) return false; + + return keysA.every((key) => { + if (!Object.prototype.hasOwnProperty.call(b, key)) return false; + return compareParams(a[key], b[key]); + }); +}; diff --git a/package/src/libraries/react/utils/errorUtils.ts b/package/src/libraries/react/utils/errorUtils.ts new file mode 100644 index 00000000..127da372 --- /dev/null +++ b/package/src/libraries/react/utils/errorUtils.ts @@ -0,0 +1,44 @@ +export interface ClientErrorResponse { + message: string; + code: string; +} + +export class AutumnClientError extends Error { + code: string; + + constructor(public error: ClientErrorResponse) { + super(error.message); + this.code = error.code; + } + + toString() { + return `${this.message} (${this.code})`; + } + + toJSON() { + return { message: this.message, code: this.code }; + } +} + +export const toClientError = ( + error: any +): { + data: null; + error: AutumnClientError; +} => { + let msg = "Unknown error"; + let code = "unknown"; + + if (error?.message) { + msg = error.message; + } + + if (error?.code) { + code = error.code; + } + + return { + data: null, + error: new AutumnClientError({ message: msg, code }), + }; +}; diff --git a/package/src/libraries/react/utils/inject-styles.ts b/package/src/libraries/react/utils/inject-styles.ts new file mode 100644 index 00000000..ba454cee --- /dev/null +++ b/package/src/libraries/react/utils/inject-styles.ts @@ -0,0 +1,32 @@ +// Critical loading styles applied inline +export const loadingStyles: React.CSSProperties = { + width: "100%", + height: "100%", + display: "flex", + justifyContent: "center", + alignItems: "center", + minHeight: "300px", +}; + +export const spinnerStyles: React.CSSProperties = { + width: "1.5rem", + height: "1.5rem", + color: "rgb(161 161 170)", + animation: "spin 1s linear infinite", +}; + +// Inject keyframes immediately +if (typeof document !== "undefined") { + const styleId = "au-spinner-keyframes"; + if (!document.getElementById(styleId)) { + const style = document.createElement("style"); + style.id = styleId; + style.textContent = ` + @keyframes spin { + from { transform: rotate(0deg); } + to { transform: rotate(360deg); } + } + `; + document.head.appendChild(style); + } +} diff --git a/package/src/next/client/AutumnClientProvider.tsx b/package/src/next/client/AutumnClientProvider.tsx new file mode 100644 index 00000000..c671b043 --- /dev/null +++ b/package/src/next/client/AutumnClientProvider.tsx @@ -0,0 +1,136 @@ +// import { Entity } from "src/sdk/customers/entities/entTypes"; +// import { CustomerData } from "src/sdk"; +// import { AutumnContext } from "./AutumnContext"; +// import { useEffect, useState } from "react"; +// import { Customer, PricingTableProduct } from "src/sdk"; +// import { useCustomer } from "./hooks/useCustomer"; + +// export interface AutumnProviderProps { +// children?: React.ReactNode; +// encryptedCustomerId?: string; +// customerData?: CustomerData; +// } + +// const useDialog = (component?: any) => { +// const [dialogFound, setDialogFound] = useState(false); +// const [dialogProps, setDialogProps] = useState(null); +// const [dialogOpen, setDialogOpen] = useState(false); + +// // useEffect(() => { +// // if (dialogProps) { +// // setDialogOpen(true); +// // } +// // }, [dialogProps]); + +// useEffect(() => { +// if (!dialogOpen) { +// setTimeout(() => { +// setDialogProps(null); +// }, 200); +// } +// }, [dialogOpen]); + +// const loadDialog = async () => { +// if (component) { +// setDialogFound(true); +// } else { +// setDialogFound(false); +// } +// }; + +// useEffect(() => { +// loadDialog(); +// }, []); + +// return [dialogFound, dialogProps, setDialogProps, dialogOpen, setDialogOpen]; +// }; + +// export const AutumnClientProvider = ({ +// children, +// encryptedCustomerId, +// customerData, +// }: AutumnProviderProps) => { +// let [customer, setCustomer] = useState(null); + +// useCustomer(); + +// let [pricingTableProducts, setPricingTableProducts] = useState< +// PricingTableProduct[] | null +// >(null); + +// const [components, setComponents] = useState<{ +// paywallDialog?: any; +// productChangeDialog?: any; +// }>({}); + +// const [entity, setEntity] = useState(null); + +// const [ +// prodChangeDialogFound, +// prodChangeDialogProps, +// setProdChangeDialogProps, +// prodChangeDialogOpen, +// setProdChangeDialogOpen, +// ] = useDialog(components?.productChangeDialog); + +// const [ +// paywallFound, +// paywallProps, +// setPaywallProps, +// paywallOpen, +// setPaywallOpen, +// ] = useDialog(components?.paywallDialog); + +// return ( +// { +// setComponents({ +// ...components, +// productChangeDialog: component, +// }); +// }, +// }, +// paywallDialog: { +// found: paywallFound, +// setProps: setPaywallProps, +// setOpen: setPaywallOpen, +// setComponent: (component: any) => { +// setComponents({ +// ...components, +// paywallDialog: component, +// }); +// }, +// }, +// pricingTableProducts, +// setPricingTableProducts, +// entity, +// setEntity, +// }} +// > +// {components?.productChangeDialog && ( +// +// )} +// {components?.paywallDialog && ( +// +// )} +// {children} +// +// ); +// }; diff --git a/package/src/next/client/clientUtils.ts b/package/src/next/client/clientUtils.ts new file mode 100644 index 00000000..7d30974a --- /dev/null +++ b/package/src/next/client/clientUtils.ts @@ -0,0 +1,78 @@ +import { getPricingTableAction } from "../server/componentActions"; +import { AutumnClientError, PricingTableProduct } from "./types"; + +export const toClientErrorResponse = (error: any) => { + let msg = "Unknown error"; + let code = "unknown"; + + if (error?.message) { + msg = error.message; + } + if (error?.code) { + code = error.code; + } + + console.error("Autumn Error: ", msg); + return { + data: null, + error: new AutumnClientError({ message: msg, code: code }), + }; +}; + +export const toClientError = (error: any, log = true) => { + let msg = "Unknown error"; + let code = "unknown"; + if (error?.message) { + msg = error.message; + } + if (error?.code) { + code = error.code; + } + if (log) { + console.error("Autumn Error: ", msg); + } + return new AutumnClientError({ message: msg, code }); +}; + +export const fetchPricingTableData = async ({ + setIsLoading, + setError, + setProducts, + encryptedCustomerId, +}: { + setIsLoading?: (isLoading: boolean) => void; + setError?: (error: any) => void; + setProducts: (products: PricingTableProduct[]) => void; + encryptedCustomerId?: string; +}) => { + let returnData: PricingTableProduct[] | null = null; + try { + if (setIsLoading) { + setIsLoading(true); + } + const res = await getPricingTableAction({ + encryptedCustomerId, + }); + + if (res.error) { + if (setError) { + setError(res.error); + } + return res; + } + + let products = res.data.list; + + setProducts(products); + returnData = products; + } catch (error) { + if (setError) { + setError(error); + } + } finally { + if (setIsLoading) { + setIsLoading(false); + } + } + return returnData; +}; diff --git a/package/src/next/client/hooks/useAutumn.tsx b/package/src/next/client/hooks/useAutumn.tsx new file mode 100644 index 00000000..b5d05b26 --- /dev/null +++ b/package/src/next/client/hooks/useAutumn.tsx @@ -0,0 +1,13 @@ +import { + AutumnContext, + useAutumnContext, +} from "../../../libraries/react/AutumnContext"; +import { useAutumnBase } from "../../../libraries/react/hooks/helpers/useAutumnBase"; + +export const useAutumn = () => { + const context = useAutumnContext({ + AutumnContext, + name: "useAutumn", + }); + return useAutumnBase({ context, client: context.client }); +}; diff --git a/package/src/next/client/hooks/useEntity.tsx b/package/src/next/client/hooks/useEntity.tsx new file mode 100644 index 00000000..49951fbb --- /dev/null +++ b/package/src/next/client/hooks/useEntity.tsx @@ -0,0 +1,7 @@ +import { GetEntityParams } from "../../../sdk/customers/entities/entTypes"; +import { useEntityBase } from "../../../libraries/react/hooks/useEntityBase"; +import { AutumnContext } from "../../../libraries/react/AutumnContext"; + +export const useEntity = (entityId: string | null, params?: GetEntityParams) => { + return useEntityBase({ AutumnContext, entityId, params }); +}; diff --git a/package/src/next/client/hooks/usePricingTable.tsx b/package/src/next/client/hooks/usePricingTable.tsx new file mode 100644 index 00000000..ecd76563 --- /dev/null +++ b/package/src/next/client/hooks/usePricingTable.tsx @@ -0,0 +1,15 @@ +import { usePricingTableBase } from "../../../libraries/react/hooks/usePricingTableBase"; +import { AutumnContext, useAutumnContext } from "../../../libraries/react/AutumnContext"; +import { ProductDetails } from "../../../libraries/react/client/types/clientPricingTableTypes"; + +export const usePricingTable = (params?: { + productDetails?: ProductDetails[]; +}) => { + const context = useAutumnContext({ + AutumnContext, + name: "usePricingTable", + }); + + return usePricingTableBase({ client: context.client, params }); +}; + diff --git a/package/src/next/enums.ts b/package/src/next/enums.ts new file mode 100644 index 00000000..99f95e62 --- /dev/null +++ b/package/src/next/enums.ts @@ -0,0 +1,3 @@ +export enum AuthProvider { + Clerk = "clerk", +} diff --git a/package/src/next/index.ts b/package/src/next/index.ts new file mode 100644 index 00000000..20fe4800 --- /dev/null +++ b/package/src/next/index.ts @@ -0,0 +1,25 @@ +// export * from "./client/hooks/useAutumn"; +// export * from "./client/NextAutumnProvider"; +// export * from "./client/hooks/useCustomer"; +// export * from "./client/hooks/usePricingTable"; +// export * from "./client/hooks/useEntity"; +// export * from "./client/hooks/useAutumn"; +// export * from "./AutumnProvider"; + +// export { AutumnContext } from "../libraries/react/AutumnContext"; + +// export * from "./client/hooks/useCustomer"; +// export * from "./client/hooks/useCustomer"; + +// export * from "./client/hooks/usePricingTable"; +// export * from "./client/hooks/useEntity"; + +// export * from "./client/AutumnContext"; +// export * from "./client/AutumnProvider"; +// export * from "./client/AutumnContext"; + +// // export * from "./server/cusActions"; +// // export * from "./server/genActions"; +// export * from "./server/auth/withAuth"; + +export * from "../libraries/backend/next"; diff --git a/package/src/next/server/auth/authPlugin.ts b/package/src/next/server/auth/authPlugin.ts new file mode 100644 index 00000000..0b7ee480 --- /dev/null +++ b/package/src/next/server/auth/authPlugin.ts @@ -0,0 +1,18 @@ +export interface AuthPluginOptions { + provider: "better-auth" | "supabase" | "clerk"; + instance?: any; + useOrg?: boolean; + useUser?: boolean; +} + +declare global { + var __autumnAuth: AuthPluginOptions; +} + +export const setupAuthPlugin = (options: AuthPluginOptions) => { + global.__autumnAuth = options; +}; + +export const getAuthPlugin = () => { + return global.__autumnAuth; +}; diff --git a/package/src/next/server/auth/clerk-wrapper.ts b/package/src/next/server/auth/clerk-wrapper.ts new file mode 100644 index 00000000..43223981 --- /dev/null +++ b/package/src/next/server/auth/clerk-wrapper.ts @@ -0,0 +1,22 @@ +// Create a separate file that manages the import +// clerks-wrapper.ts +let clerkModule: any = null; + +export async function getClerkModule() { + if (!clerkModule) { + try { + clerkModule = await import( + /* webpackIgnore: true */ + // @ts-ignore + "@clerk/backend" + ); + } catch (e) { + throw { + message: + "Failed to import @clerk/backend. Please ensure you have the @clerk/backend package installed.", + code: "failed_to_import_clerk_backend", + }; + } + } + return clerkModule; +} diff --git a/package/src/next/server/auth/get-next-headers.ts b/package/src/next/server/auth/get-next-headers.ts new file mode 100644 index 00000000..3cb3d57f --- /dev/null +++ b/package/src/next/server/auth/get-next-headers.ts @@ -0,0 +1,16 @@ +export async function getNextHeadersAndCookies() { + try { + // @ts-ignore + let headerModule = await import("next/headers"); + return { + headers: headerModule.headers, + cookies: headerModule.cookies, + }; + } catch (e) { + throw { + message: + "Failed to import next/headers. Please ensure Next.js is installed correctly.", + code: "failed_to_import_next_headers", + }; + } +} diff --git a/package/src/next/server/auth/handleAuthProvider.ts b/package/src/next/server/auth/handleAuthProvider.ts new file mode 100644 index 00000000..52b8c061 --- /dev/null +++ b/package/src/next/server/auth/handleAuthProvider.ts @@ -0,0 +1,206 @@ +import { AuthPluginOptions } from "./authPlugin"; +import { createSupabaseClient } from "./supabase-wrapper"; +import { getClerkModule } from "./clerk-wrapper"; +import { getNextHeadersAndCookies } from "./get-next-headers"; + +export const handleBetterAuth = async (options: AuthPluginOptions) => { + let betterAuth: any = options.instance; + if (!betterAuth) { + throw { + message: "BetterAuth instance is required", + code: "auth_instance_required", + }; + } + + const { headers } = await getNextHeadersAndCookies(); + + if (options.useOrg) { + try { + let org = await betterAuth.api.getFullOrganization({ + headers: await headers(), + }); + + let session = await betterAuth.api.getSession({ + headers: await headers(), + }); + + if (org) { + return { + customerId: org.id, + customerData: { + name: org.name, + email: session?.user?.email, + }, + }; + } + } catch (error) { + throw { + message: "Failed to get/create organization", + code: "failed_to_create_organization", + }; + } + } + + if (options.useUser) { + try { + let session = await betterAuth.api.getSession({ + headers: await headers(), + }); + + if (session) { + return { + customerId: session.user.id, + customerData: { + name: session.user.name, + email: session.user.email, + }, + }; + } + } catch (error) { + throw { + message: "Failed to get/create user", + code: "failed_to_create_user", + }; + } + } + + return null; +}; + +export const handleClerk = async ({ + options, + withCustomerData, +}: { + options: AuthPluginOptions; + withCustomerData: boolean; +}) => { + const { verifyToken, createClerkClient } = await getClerkModule(); + const { cookies } = await getNextHeadersAndCookies(); + const cookieStore = await cookies(); + let sessionToken = cookieStore.get("__session")?.value; + + if (!sessionToken) { + console.warn("(Autumn) No clerk session token found"); + return null; + } + + const clerk = createClerkClient({ + secretKey: process.env.CLERK_SECRET_KEY, + }); + + const authData = await verifyToken(sessionToken, { + secretKey: process.env.CLERK_SECRET_KEY, + }); + + let orgId = authData.org_id; + let userId = authData.sub; + + if (options.useOrg) { + try { + if (orgId && withCustomerData) { + let org = await clerk.organizations.getOrganization({ + organizationId: orgId, + }); + + let email = null; + if (userId) { + let user = await clerk.users.getUser(userId); + email = user.primaryEmailAddress?.emailAddress; + } + + return { + customerId: orgId, + customerData: { + name: org.name, + email: email, + }, + }; + } else { + if (authData.orgId) { + return { + customerId: authData.orgId, + }; + } + } + } catch (error) { + throw { + message: `Failed to get/create clerk organization: ${error}`, + code: "failed_to_create_clerk_organization", + }; + } + } + + if (options.useUser && userId) { + try { + let user = await clerk.users.getUser(userId); + return { + customerId: userId, + customerData: { + name: user.fullName, + email: user.primaryEmailAddress?.emailAddress, + }, + }; + } catch (error) { + throw { + message: `Failed to get/create clerk user: ${error}`, + code: "failed_to_create_clerk_user", + }; + } + } + + return null; +}; + +export const handleSupabase = async (options: AuthPluginOptions) => { + let supabase; + + supabase = await createSupabaseClient(); + + if (options.useOrg) { + console.warn("Supabase does not support organizations"); + } + + if (options.useUser) { + const { + data: { user }, + } = await supabase.auth.getUser(); + + if (!user) { + return null; + } + + return { + customerId: user?.id, + customerData: { + name: user?.user_metadata?.name, + email: user?.email, + }, + }; + } + + return null; +}; + +export const handleAuthProvider = ({ + authPlugin, + withCustomerData, +}: { + authPlugin: AuthPluginOptions; + withCustomerData: boolean; +}) => { + let authProvider = authPlugin.provider; + + switch (authProvider) { + case "better-auth": + return handleBetterAuth(authPlugin); + case "clerk": + return handleClerk({ options: authPlugin, withCustomerData }); + case "supabase": + return handleSupabase(authPlugin); + default: + throw { + message: `Unsupported auth provider: ${authProvider}`, + code: "unsupported_auth_provider", + }; + } +}; diff --git a/package/src/next/server/auth/supabase-wrapper.ts b/package/src/next/server/auth/supabase-wrapper.ts new file mode 100644 index 00000000..beae70c6 --- /dev/null +++ b/package/src/next/server/auth/supabase-wrapper.ts @@ -0,0 +1,47 @@ +import { getNextHeadersAndCookies } from "./get-next-headers"; + +export async function createSupabaseClient() { + let createServerClient: any; + + // 1. Try to import the createServerClient function + try { + let module = await import(/* webpackIgnore: true */ "@supabase/ssr"); + createServerClient = module.createServerClient; + } catch (error) { + throw { + message: `Failed to import @supabase/ssr. Please ensure you have the @supabase/ssr package installed.`, + code: "failed_to_import_supabase_ssr", + }; + } + + const { cookies } = await getNextHeadersAndCookies(); + + // 2. Try to create the client + try { + const cookieStore = await cookies(); + + return createServerClient( + process.env.NEXT_PUBLIC_SUPABASE_URL!, + process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!, + { + cookies: { + getAll() { + return cookieStore.getAll(); + }, + setAll(cookiesToSet: any) { + cookiesToSet.forEach(({ name, value, options }: any) => + cookieStore.set(name, value, options) + ); + }, + }, + } + ); + } catch (error: any) { + throw { + message: `Failed to create supabase client. Error: ${ + error.message || error + }`, + code: "failed_to_create_supabase_client", + }; + } +} diff --git a/package/src/next/server/auth/withNextAuth.ts b/package/src/next/server/auth/withNextAuth.ts new file mode 100644 index 00000000..6bc3d519 --- /dev/null +++ b/package/src/next/server/auth/withNextAuth.ts @@ -0,0 +1,62 @@ +import { CustomerData } from "@sdk"; +import { decryptData } from "../../../utils/encryptUtils"; +import { handleAuthProvider } from "./handleAuthProvider"; +import { getAuthPlugin } from "./authPlugin"; + +const noCustomerIdError = () => { + return { + data: null, + error: { + message: "Customer ID is required", + code: "no_customer_id", + }, + }; +}; + +export const withAuth = < + T extends { + customerId?: string; + customerData?: CustomerData; + authProvider?: string; + }, +>({ + fn, + withCustomerData = false, + requireCustomer = true, +}: { + fn: (args: T) => Promise; + withCustomerData?: boolean; + requireCustomer?: boolean; +}) => { + return async ( + args: Omit & { encryptedCustomerId?: string }, + request?: Request + ) => { + let customerId = null; + let customerData = args.customerData || undefined; + + const authConfig = getAuthPlugin(); + + if (authConfig?.provider) { + let result = await handleAuthProvider({ + authPlugin: authConfig, + withCustomerData: withCustomerData, + }); + + customerId = result?.customerId; + customerData = result?.customerData || undefined; + } else { + let encryptedCustomerId = args.encryptedCustomerId; + + customerId = encryptedCustomerId + ? decryptData(encryptedCustomerId) + : null; + } + + if (!customerId && requireCustomer) { + return noCustomerIdError(); + } + + return fn({ ...args, customerId, customerData } as T); + }; +}; diff --git a/package/src/next/server/componentActions.ts b/package/src/next/server/componentActions.ts new file mode 100644 index 00000000..f404e58c --- /dev/null +++ b/package/src/next/server/componentActions.ts @@ -0,0 +1,20 @@ +import { withAuth } from "./auth/withNextAuth"; +import { createAutumnClient } from "./cusActions"; +import { fetchPricingTable } from "../../sdk"; +import { toServerResponse } from "./utils"; + +export const getPricingTableAction = withAuth({ + fn: async ({ customerId }) => { + let autumn = createAutumnClient(); + + const res = await fetchPricingTable({ + instance: autumn, + params: { + customer_id: customerId, + }, + }); + + return toServerResponse(res); + }, + requireCustomer: false, +}); diff --git a/package/src/next/server/cusActions.ts b/package/src/next/server/cusActions.ts new file mode 100644 index 00000000..932673a2 --- /dev/null +++ b/package/src/next/server/cusActions.ts @@ -0,0 +1,89 @@ +import { Autumn, CreateCustomerParams, CustomerData } from "../../sdk"; +import { withAuth } from "./auth/withNextAuth"; +import { toServerResponse } from "./utils"; +import { + CreateEntityParams, + GetEntityParams, +} from "../../libraries/react/client/types/clientEntTypes"; +import { toSnakeCase } from "@utils/toSnakeCase"; + +export const createAutumnClient = (publishableKey?: string) => { + return new Autumn({ + publishableKey, + }); +}; + +export const createCusAction = withAuth({ + fn: async ({ + customerId, + customerData, + ...params + }: { + customerId: string; + customerData?: CustomerData; + params?: CreateCustomerParams; + }) => { + const autumn = createAutumnClient(); + + const result = await autumn.customers.create({ + id: customerId, + ...customerData, + ...params, + }); + + return toServerResponse(result); + }, + withCustomerData: true, +}); + +export const getEntityAction = withAuth({ + fn: async ({ + customerId, + entityId, + ...params + }: { + customerId: string; + entityId: string; + params?: GetEntityParams; + }) => { + const autumn = createAutumnClient(); + + let snakeParams = toSnakeCase({ obj: params }); + const result = await autumn.entities.get( + customerId, + entityId, + snakeParams as any + ); + + return toServerResponse(result); + }, +}); + +export const createEntityAction = withAuth({ + fn: async ({ + customerId, + entity, + }: { + customerId: string; + entity: CreateEntityParams | CreateEntityParams[]; + }) => { + const autumn = createAutumnClient(); + let snakeEntity = toSnakeCase({ obj: entity }) as any; + const result = await autumn.entities.create(customerId, snakeEntity); + return toServerResponse(result); + }, +}); + +export const deleteEntityAction = withAuth({ + fn: async ({ + customerId, + entityId, + }: { + customerId: string; + entityId: string; + }) => { + const autumn = createAutumnClient(); + const result = await autumn.entities.delete(customerId, entityId); + return toServerResponse(result); + }, +}); diff --git a/package/src/next/server/genActions.ts b/package/src/next/server/genActions.ts new file mode 100644 index 00000000..0360fb55 --- /dev/null +++ b/package/src/next/server/genActions.ts @@ -0,0 +1,113 @@ +import { BillingPortalParams, CustomerData, EntityData } from "../../sdk"; +import { createAutumnClient } from "../server/cusActions"; +import { withAuth } from "./auth/withNextAuth"; +import { toServerResponse } from "./utils"; +import { + CancelParams, + CheckParams, + TrackParams, +} from "../../libraries/react/client/types/clientGenTypes"; +import { toSnakeCase } from "@utils/toSnakeCase"; +import { AttachParams } from "@/client/types/clientAttachTypes"; + +export const attachAction = withAuth({ + fn: async ( + params: AttachParams & { customerId: string; customerData?: CustomerData } + ) => { + const autumn = createAutumnClient(); + + let res = await autumn.attach({ + customer_id: params.customerId, + customer_data: params.customerData, + ...(toSnakeCase({ obj: params }) as any), + }); + + return toServerResponse(res); + }, + + withCustomerData: true, +}); + +export const cancelAction = withAuth({ + fn: async (params: CancelParams & { customerId: string }) => { + const autumn = createAutumnClient(); + let res = await autumn.cancel(toSnakeCase({ obj: params }) as any); + + return toServerResponse(res); + }, +}); + +export const checkAction = withAuth({ + fn: async ( + params: CheckParams & { customerId: string; customerData?: CustomerData } + ) => { + const autumn = createAutumnClient(); + + let res = await autumn.check({ + customer_id: params.customerId, + customer_data: params.customerData, + ...(toSnakeCase({ obj: params }) as any), + }); + + return toServerResponse(res); + }, + withCustomerData: true, +}); + +export const trackAction = withAuth({ + fn: async ( + params: TrackParams & { customerId: string; customerData?: CustomerData } + ) => { + const autumn = createAutumnClient(); + let res = await autumn.track({ + customer_id: params.customerId, + customer_data: params.customerData, + ...(toSnakeCase({ obj: params }) as any), + }); + + return toServerResponse(res); + }, + withCustomerData: true, +}); + +export const getBillingPortalAction = withAuth({ + fn: async ({ + customerId, + params, + }: { + customerId: string; + params?: BillingPortalParams; + }) => { + const autumn = createAutumnClient(); + let result = await autumn.customers.billingPortal(customerId, params); + return toServerResponse(result); + }, +}); + +export const generateReferralCodeAction = withAuth({ + fn: async ({ + customerId, + programId, + }: { + customerId: string; + programId: string; + }) => { + const autumn = createAutumnClient(); + let result = await autumn.referrals.createCode({ + customer_id: customerId, + program_id: programId, + }); + return toServerResponse(result); + }, +}); + +export const redeemReferralCodeAction = withAuth({ + fn: async ({ code, customerId }: { code: string; customerId: string }) => { + const autumn = createAutumnClient(); + let result = await autumn.referrals.redeemCode({ + code, + customer_id: customerId, + }); + return toServerResponse(result); + }, +}); diff --git a/package/src/next/server/utils.ts b/package/src/next/server/utils.ts new file mode 100644 index 00000000..0234bd1e --- /dev/null +++ b/package/src/next/server/utils.ts @@ -0,0 +1,18 @@ +import { Result } from "@sdk/response"; +import { AutumnError, ErrorResponse } from "../../sdk"; + +export const toServerResponse = ( + result: Result +): Result => { + if (result.error) { + return { + data: null, + error: result.error.toJSON(), + }; + } + + return { + data: result.data, + error: null, + }; +}; diff --git a/package/src/sdk/balances/balancesMethods.ts b/package/src/sdk/balances/balancesMethods.ts new file mode 100644 index 00000000..bf49d723 --- /dev/null +++ b/package/src/sdk/balances/balancesMethods.ts @@ -0,0 +1,21 @@ +import type { AutumnPromise } from "@sdk/response"; +import { staticWrapper } from "@sdk/utils"; +import type { Autumn } from "../client"; +import type { CreateBalanceParams, CreateBalanceResponse } from "./balancesTypes"; + +export const balanceMethods = (instance?: Autumn) => { + return { + create: (params: CreateBalanceParams) => + staticWrapper(handleCreateBalance, instance, { params }), + }; +}; + +const handleCreateBalance = async ({ + instance, + params, +}: { + instance: Autumn; + params: CreateBalanceParams; +}): AutumnPromise => { + return instance.post("/balances", params); +}; diff --git a/package/src/sdk/balances/balancesTypes.ts b/package/src/sdk/balances/balancesTypes.ts new file mode 100644 index 00000000..33dfdd60 --- /dev/null +++ b/package/src/sdk/balances/balancesTypes.ts @@ -0,0 +1,45 @@ +import { z } from "zod/v4"; + +export const ResetInterval = [ + "one_off", + "minute", + "hour", + "day", + "week", + "month", + "quarter", + "semi_annual", + "year", +] as const; + +export const CreateBalanceParamsSchema = z.object({ + feature_id: z.string().describe("The feature ID to create the balance for"), + customer_id: z.string().describe("The customer ID to assign the balance to"), + entity_id: z + .string() + .optional() + .describe("Entity ID for entity-scoped balances"), + + granted_balance: z + .number() + .optional() + .describe("The initial balance amount to grant"), + unlimited: z.boolean().optional().describe("Whether the balance is unlimited"), + reset: z + .object({ + interval: z.enum(ResetInterval), + interval_count: z.number().optional(), + }) + .optional() + .describe("Reset configuration for the balance"), + expires_at: z + .number() + .optional() + .describe("Unix timestamp (milliseconds) when the balance expires"), +}); + +export type CreateBalanceParams = z.infer; + +export type CreateBalanceResponse = { + message: string; +}; diff --git a/package/src/sdk/client.ts b/package/src/sdk/client.ts index 80df97c2..1c3f1728 100644 --- a/package/src/sdk/client.ts +++ b/package/src/sdk/client.ts @@ -32,6 +32,7 @@ import { logger } from "../utils/logger"; import { featureMethods } from "./features/featureMethods"; import { eventMethods } from "./events/eventMethods"; import { QueryParams } from "./events/eventTypes"; +import { balanceMethods } from "./balances/balancesMethods"; const LATEST_API_VERSION = "1.2"; @@ -113,6 +114,7 @@ export class Autumn { static referrals = referralMethods(); static features = featureMethods(); static events = eventMethods(); + static balances = balanceMethods(); customers = customerMethods(this); products = productMethods(this); @@ -120,6 +122,7 @@ export class Autumn { referrals = referralMethods(this); features = featureMethods(this); events = eventMethods(this); + balances = balanceMethods(this); /** diff --git a/package/src/sdk/components/componentMethods.ts b/package/src/sdk/components/componentMethods.ts new file mode 100644 index 00000000..28561eae --- /dev/null +++ b/package/src/sdk/components/componentMethods.ts @@ -0,0 +1,30 @@ +import { Autumn } from "../client"; +import { AutumnPromise } from "../response"; +import { GetPricingTableParams, PricingTableProduct } from "./componentTypes"; + +export const fetchPricingTable = async ({ + instance, + params, +}: { + instance: Autumn; + params?: GetPricingTableParams; +}): AutumnPromise => { + let path = "/components/pricing_table"; + + if (params) { + const queryParams = new URLSearchParams(); + for (const [key, value] of Object.entries(params)) { + if (key === "products") { + continue; + } + if (value !== undefined) { + queryParams.append(key, String(value)); + } + } + const queryString = queryParams.toString(); + if (queryString) { + path += `?${queryString}`; + } + } + return await instance.get(path); +}; diff --git a/package/src/sdk/components/componentTypes.ts b/package/src/sdk/components/componentTypes.ts new file mode 100644 index 00000000..f646a7b6 --- /dev/null +++ b/package/src/sdk/components/componentTypes.ts @@ -0,0 +1,27 @@ +import { ProductScenario } from "@sdk/general/checkTypes"; +import { ProductItem } from "../products/prodTypes"; + +export interface GetPricingTableParams { + customer_id?: string; +} + +export interface PricingTableProduct { + id: string; + name: string; + description?: string; + button_text?: string; + recommend_text?: string; + everything_from?: string; + + price: { + primary_text: string; + secondary_text?: string; + } & ProductItem; + + items: ({ + primary_text: string; + secondary_text?: string; + } & ProductItem)[]; + + scenario: ProductScenario; +} diff --git a/package/src/sdk/customers/cusEnums.ts b/package/src/sdk/customers/cusEnums.ts new file mode 100644 index 00000000..1c0bbfc5 --- /dev/null +++ b/package/src/sdk/customers/cusEnums.ts @@ -0,0 +1,26 @@ +import { z } from "zod/v4"; + +export enum ProductStatus { + Active = "active", + Expired = "expired", + Trialing = "trialing", + Scheduled = "scheduled", + PastDue = "past_due", +} + +export const CustomerExpandEnum = z.enum([ + "invoices", + "rewards", + "trials_used", + "entities", + "referrals", + "payment_method", +]); + +export type CustomerExpandOption = + | "invoices" + | "rewards" + | "trials_used" + | "entities" + | "referrals" + | "payment_method"; diff --git a/package/src/sdk/customers/cusExpandTypes.ts b/package/src/sdk/customers/cusExpandTypes.ts new file mode 100644 index 00000000..9dde9d06 --- /dev/null +++ b/package/src/sdk/customers/cusExpandTypes.ts @@ -0,0 +1,14 @@ +import type Stripe from "stripe"; + +export interface CustomerReferral { + program_id: string; + customer: { + id: string; + name: string | null; + email: string | null; + }; + reward_applied: boolean; + created_at: number; +} + +export type CustomerPaymentMethod = Stripe.PaymentMethod; diff --git a/package/src/sdk/customers/cusUtils.ts b/package/src/sdk/customers/cusUtils.ts new file mode 100644 index 00000000..9bfa678d --- /dev/null +++ b/package/src/sdk/customers/cusUtils.ts @@ -0,0 +1,11 @@ +import { AutumnError } from "../error"; +import { CreateCustomerParams } from "./cusTypes"; + +export const validateCreateCustomer = (params: CreateCustomerParams) => { + if (!params.email && !params.id) { + throw new AutumnError({ + message: "Email or id is required", + code: "invalid_params", + }); + } +}; diff --git a/package/src/sdk/customers/entities/entEnums.ts b/package/src/sdk/customers/entities/entEnums.ts new file mode 100644 index 00000000..f9f8a604 --- /dev/null +++ b/package/src/sdk/customers/entities/entEnums.ts @@ -0,0 +1 @@ +export type EntityExpandOption = "invoices"; diff --git a/package/src/sdk/customers/entities/entMethods.ts b/package/src/sdk/customers/entities/entMethods.ts new file mode 100644 index 00000000..bcbd7510 --- /dev/null +++ b/package/src/sdk/customers/entities/entMethods.ts @@ -0,0 +1,92 @@ +import { Autumn } from "../../client"; +import { + CreateEntityParams, + CreateEntityResult, + DeleteEntityResult, + Entity, + GetEntityParams, + TransferProductParams, + TransferProductResult, +} from "./entTypes"; +import { staticWrapper } from "../../utils"; +import { AutumnPromise } from "../../response"; + +export const entityMethods = (instance?: Autumn) => { + return { + get: (customer_id: string, entity_id: string, params?: GetEntityParams) => + staticWrapper(getEntity, instance, { + customer_id, + entity_id, + params, + }), + create: ( + customer_id: string, + params?: CreateEntityParams | CreateEntityParams[] + ) => staticWrapper(createEntity, instance, { customer_id, params }), + transfer: (customer_id: string, params: TransferProductParams) => + staticWrapper(transferProduct, instance, { customer_id, params }), + delete: (customer_id: string, entity_id: string) => + staticWrapper(deleteEntity, instance, { customer_id, entity_id }), + }; +}; + +export const getExpandStr = (expand?: string[]) => { + if (!expand) { + return ""; + } + return `expand=${expand.join(",")}`; +}; + +export const getEntity = async ({ + instance, + customer_id, + entity_id, + params, +}: { + instance: Autumn; + customer_id: string; + entity_id: string; + params?: GetEntityParams; +}): AutumnPromise => { + return instance.get( + `/customers/${customer_id}/entities/${entity_id}?${getExpandStr( + params?.expand + )}` + ); +}; + +export const createEntity = async ({ + instance, + customer_id, + params, +}: { + instance: Autumn; + customer_id: string; + params?: CreateEntityParams | CreateEntityParams[]; +}): AutumnPromise => { + return instance.post(`/customers/${customer_id}/entities`, params); +}; + +export const deleteEntity = async ({ + instance, + customer_id, + entity_id, +}: { + instance: Autumn; + customer_id: string; + entity_id: string; +}): AutumnPromise => { + return instance.delete(`/customers/${customer_id}/entities/${entity_id}`); +}; + +export const transferProduct = async ({ + instance, + customer_id, + params, +}: { + instance: Autumn; + customer_id: string; + params: TransferProductParams; +}): AutumnPromise => { + return instance.post(`/customers/${customer_id}/transfer`, params); +}; \ No newline at end of file diff --git a/package/src/sdk/customers/entities/entTypes.ts b/package/src/sdk/customers/entities/entTypes.ts new file mode 100644 index 00000000..b4212dc9 --- /dev/null +++ b/package/src/sdk/customers/entities/entTypes.ts @@ -0,0 +1,57 @@ +import type { + CustomerData, + CustomerFeature, + CustomerInvoice, + CustomerProduct, +} from "../cusTypes"; +import type { EntityExpandOption } from "./entEnums"; +import { z } from "zod/v4"; + +export interface CreateEntityParams { + id: string; + name: string; + feature_id: string; + customer_data?: CustomerData; +} + +export interface CreateEntityResult { + success: boolean; +} + +export interface DeleteEntityResult { + success: boolean; +} + +export interface GetEntityParams { + expand?: EntityExpandOption[]; +} + +export interface Entity { + id: string; + name: string; + customer_id: string; + created_at: number; + env: string; + products: CustomerProduct[]; + features: Record; + invoices?: CustomerInvoice[]; +} + +export const EntityDataSchema = z.object({ + name: z.string().optional(), + feature_id: z.string(), +}); + +export type EntityData = z.infer; + +export const TransferProductParamsSchema = z.object({ + from_entity_id: z.string(), + to_entity_id: z.string(), + product_id: z.string(), +}); + +export type TransferProductParams = z.infer; + +export type TransferProductResult = { + success: boolean; +}; \ No newline at end of file diff --git a/package/src/sdk/error.ts b/package/src/sdk/error.ts new file mode 100644 index 00000000..3c9ed161 --- /dev/null +++ b/package/src/sdk/error.ts @@ -0,0 +1,35 @@ +export interface ErrorResponse { + message: string; + code: string; +} + +export class AutumnError extends Error { + public readonly message: string; + public readonly code: string; + + constructor(response: ErrorResponse) { + super(response.message); + this.message = response.message; + this.code = response.code; + } + + static fromError(error: any) { + return new AutumnError({ + message: error.message || "Unknown error", + code: error.code || "unknown_error", + }); + } + + toString() { + return `${this.message} (code: ${this.code})`; + } + + toJSON() { + return { + message: this.message, + code: this.code, + }; + } +} + +export type AutumnErrorWithStatus = AutumnError & { statusCode?: number }; diff --git a/package/src/sdk/features/featureMethods.ts b/package/src/sdk/features/featureMethods.ts new file mode 100644 index 00000000..5187146b --- /dev/null +++ b/package/src/sdk/features/featureMethods.ts @@ -0,0 +1,47 @@ +import { Autumn } from "../client"; + +import { AutumnPromise } from "../response"; +import { staticWrapper } from "../utils"; +import { Feature } from "./featureTypes"; + +export const featureMethods = (instance?: Autumn) => { + return { + list: () => staticWrapper(listFeatures, instance, {}), + get: (id: string) => staticWrapper(getFeature, instance, { id }), + }; +}; + +export const listFeatures = async ({ + instance, + params, +}: { + instance: Autumn; + params?: {}; +}): AutumnPromise<{ + list: Feature[]; +}> => { + let path = "/features"; + if (params) { + const queryParams = new URLSearchParams(); + for (const [key, value] of Object.entries(params)) { + if (value !== undefined) { + queryParams.append(key, String(value)); + } + } + const queryString = queryParams.toString(); + if (queryString) { + path += `?${queryString}`; + } + } + return instance.get(path); +}; + +export const getFeature = async ({ + instance, + id, +}: { + instance: Autumn; + id: string; +}): AutumnPromise => { + return instance.get(`/features/${id}`); +}; diff --git a/package/src/sdk/features/featureTypes.ts b/package/src/sdk/features/featureTypes.ts new file mode 100644 index 00000000..8f07a7fd --- /dev/null +++ b/package/src/sdk/features/featureTypes.ts @@ -0,0 +1,32 @@ +import { z } from "zod/v4"; + +export enum FeatureType { + Boolean = "boolean", + SingleUse = "single_use", + ContinuousUse = "continuous_use", + CreditSystem = "credit_system", +} + +export const FeatureSchema = z.object({ + id: z.string(), + name: z.string(), + type: z.enum(FeatureType), + display: z + .object({ + singular: z.string(), + plural: z.string(), + }) + .nullish(), + + credit_schema: z + .array( + z.object({ + metered_feature_id: z.string(), + credit_cost: z.number(), + }) + ) + .nullish(), + archived: z.boolean(), +}); + +export type Feature = z.infer; diff --git a/package/src/sdk/general/checkTypes.ts b/package/src/sdk/general/checkTypes.ts new file mode 100644 index 00000000..f16c7e1d --- /dev/null +++ b/package/src/sdk/general/checkTypes.ts @@ -0,0 +1,90 @@ +import { CoreCusFeatureSchema } from "@sdk/customers/cusTypes"; +import type { UsageModelType } from "../products/prodEnums"; +import type { Product } from "../products/prodTypes"; +import { z } from "zod/v4"; + +export type CheckFeatureScenario = "usage_limit" | "feature_flag"; + +export const CheckFeatureResultSchema = z + .object({ + allowed: z.boolean(), + feature_id: z.string(), + customer_id: z.string(), + entity_id: z.string().optional(), + required_balance: z.number(), + }) + .extend(CoreCusFeatureSchema.shape); + +export type CheckFeatureResult = z.infer; +// export interface CheckFeatureResult extends CoreCustomerFeature { +// allowed: boolean; +// feature_id: string; +// customer_id: string; +// entity_id?: string; +// required_balance: number; +// preview?: CheckFeaturePreview; +// } + +export interface CheckFeaturePreview { + scenario: CheckFeatureScenario; + title: string; + message: string; + feature_id: string; + feature_name: string; + products: Product[]; +} + +export type ProductScenario = + | "scheduled" + | "active" + | "new" + | "renew" + | "upgrade" + | "downgrade" + | "cancel"; + +export interface CheckProductResult { + allowed: boolean; + customer_id: string; + product_id: string; + entity_id?: string; + status?: string; + preview?: CheckProductPreview; +} + +export interface CheckProductPreview { + scenario: ProductScenario; + product_id: string; + product_name: string; + recurring: boolean; + error_on_attach?: boolean; + next_cycle_at?: number; + current_product_name?: string; + + items?: { + price: string; + description: string; + usage_model?: UsageModelType; + }[]; + + options?: { + feature_id: string; + feature_name: string; + billing_units: number; + price?: number; + tiers?: { + to: number | string; + amount: number; + }[]; + }[]; + + due_today?: { + price: number; + currency: string; + }; + + due_next_cycle?: { + price: number; + currency: string; + }; +} diff --git a/package/src/sdk/general/genEnums.ts b/package/src/sdk/general/genEnums.ts new file mode 100644 index 00000000..57b14243 --- /dev/null +++ b/package/src/sdk/general/genEnums.ts @@ -0,0 +1,4 @@ +export enum AppEnv { + Sandbox = "sandbox", + Live = "live", +} diff --git a/package/src/sdk/index.ts b/package/src/sdk/index.ts index 5a1c07a6..14ae772e 100644 --- a/package/src/sdk/index.ts +++ b/package/src/sdk/index.ts @@ -46,5 +46,7 @@ export { CreateReferralCodeParamsSchema, RedeemReferralCodeParamsSchema, } from "./referrals/referralTypes"; +export * from "./balances/balancesTypes"; +export { CreateBalanceParamsSchema } from "./balances/balancesTypes"; export type { AutumnPromise } from "./response"; export { toContainerResult } from "./response"; diff --git a/package/src/sdk/products/prodEnums.ts b/package/src/sdk/products/prodEnums.ts new file mode 100644 index 00000000..40c34440 --- /dev/null +++ b/package/src/sdk/products/prodEnums.ts @@ -0,0 +1,35 @@ +export const Infinite = "inf"; + +export enum FreeTrialDuration { + Day = "day", +} + +export enum UsageModel { + Prepaid = "prepaid", + PayPerUse = "pay_per_use", +} + +export type UsageModelType = "prepaid" | "pay_per_use"; + +export enum ProductItemInterval { + Minute = "minute", + Hour = "hour", + Day = "day", + Week = "week", + Month = "month", + Quarter = "quarter", + SemiAnnual = "semi_annual", + Year = "year", + Multiple = "multiple", +} + +export type ProductItemIntervalType = + | "minute" + | "hour" + | "day" + | "week" + | "month" + | "quarter" + | "semi_annual" + | "year" + | "multiple"; diff --git a/package/src/sdk/products/prodMethods.ts b/package/src/sdk/products/prodMethods.ts new file mode 100644 index 00000000..a32066cf --- /dev/null +++ b/package/src/sdk/products/prodMethods.ts @@ -0,0 +1,82 @@ +import { Autumn } from "../client"; + +import { AutumnPromise } from "../response"; +import { buildPathWithQuery, staticWrapper } from "../utils"; +import { + CreateProductParams, + DeleteProductParams, + ListProductsParams, + Product, +} from "./prodTypes"; + +export const productMethods = (instance?: Autumn) => { + return { + get: (id: string) => staticWrapper(getProduct, instance, { id }), + create: (params?: CreateProductParams) => + staticWrapper(createProduct, instance, { params }), + list: (params?: ListProductsParams) => + staticWrapper(listProducts, instance, { params }), + delete: (id: string) => staticWrapper(deleteProduct, instance, { id }), + }; +}; + +export const listProducts = async ({ + instance, + params, +}: { + instance: Autumn; + params?: ListProductsParams; +}): AutumnPromise<{ + list: Product[]; +}> => { + let path = "/products_beta"; + if (params) { + const queryParams = new URLSearchParams(); + for (const [key, value] of Object.entries(params)) { + if (value !== undefined) { + queryParams.append(key, String(value)); + } + } + const queryString = queryParams.toString(); + if (queryString) { + path += `?${queryString}`; + } + } + return instance.get(path); +}; + +export const getProduct = async ({ + instance, + id, +}: { + instance: Autumn; + id: string; +}): AutumnPromise => { + return instance.get(`/products/${id}`); +}; + +export const createProduct = async ({ + instance, + params, +}: { + instance: Autumn; + params?: CreateProductParams; +}): AutumnPromise => { + return instance.post("/products", params); +}; + +export const deleteProduct = async ({ + instance, + id, + params, +}: { + instance: Autumn; + id: string; + params?: DeleteProductParams; +}): AutumnPromise<{ + success: boolean; +}> => { + // Build query params + const path = buildPathWithQuery(`/products/${id}`, params); + return instance.delete(path); +}; diff --git a/package/src/sdk/products/prodTypes.ts b/package/src/sdk/products/prodTypes.ts new file mode 100644 index 00000000..df497c55 --- /dev/null +++ b/package/src/sdk/products/prodTypes.ts @@ -0,0 +1,124 @@ +import type { ProductScenario } from "@sdk/general/checkTypes"; +import type { AppEnv } from "../general/genEnums"; +import type { + FreeTrialDuration, + Infinite, + ProductItemIntervalType, + UsageModel, +} from "./prodEnums"; + +export interface PriceTier { + to: number; + amount: number | "inf"; +} + +// export const ProductItemSchema = z.object({ +// type: z.enum(["feature", "priced_feature", "price"]), +// feature_id: z.string().optional(), +// included_usage: z.number().optional(), +// interval: z.enum(["month", "year"]).optional(), +// usage_model: z.enum(["usage", "quantity"]).optional(), +// price: z.number().optional(), +// billing_units: z.number().optional(), +// entity_feature_id: z.string().optional(), +// reset_usage_when_enabled: z.boolean().optional(), + +// quantity: z.number().optional(), +// next_cycle_quantity: z.number().optional(), + +// display: z +// .object({ +// primary_text: z.string().optional(), +// secondary_text: z.string().optional(), +// }) +// .optional(), +// }); + +export interface Feature { + id: string; + name: string; + type: "boolean" | "continuous_use" | "single_use" | "credit_system"; +} + +export interface ProductItem { + type?: "feature" | "priced_feature" | "price"; + feature_id?: string; + included_usage?: number | typeof Infinite; + interval?: ProductItemIntervalType; + + feature?: Feature; + + // Price config + usage_model?: UsageModel; + price?: number; + billing_units?: number; + entity_feature_id?: string; + reset_usage_when_enabled?: boolean; + + quantity?: number; + next_cycle_quantity?: number; + + display?: { + primary_text?: string; + secondary_text?: string; + }; +} + +export interface FreeTrial { + duration: FreeTrialDuration; + length: number; + unique_fingerprint: boolean; + trial_available?: boolean; +} + +export interface Product { + id: string; + created_at: number; + name: string; + env: AppEnv; + + is_add_on: boolean; + is_default: boolean; + group: string; + version: number; + + items: ProductItem[]; + free_trial: FreeTrial | null; + + scenario?: ProductScenario; + base_variant_id: string | null; + + properties: { + is_free: boolean; + is_one_off: boolean; + interval_group: string; + has_trial: boolean; + updateable: boolean; + }; + + display?: { + name?: string; + description?: string; + button_text?: string; + recommend_text?: string; + everything_from?: string; + button_url?: string; + }; +} + +export interface CreateProductParams { + id: string; + name?: string; + is_add_on?: boolean; + is_default?: boolean; + items?: ProductItem[]; + free_trial?: FreeTrial; +} + +export interface ListProductsParams { + customer_id?: string; +} + +export interface DeleteProductParams { + all_versions?: boolean; +} diff --git a/package/src/sdk/referrals/referralMethods.ts b/package/src/sdk/referrals/referralMethods.ts new file mode 100644 index 00000000..0c0ba053 --- /dev/null +++ b/package/src/sdk/referrals/referralMethods.ts @@ -0,0 +1,38 @@ +import { AutumnPromise } from "@sdk/response"; +import { Autumn } from "../client"; +import { staticWrapper } from "../utils"; +import { + CreateReferralCodeParams, + CreateReferralCodeResult, + RedeemReferralCodeParams, + RedeemReferralCodeResult, +} from "./referralTypes"; + +export const referralMethods = (instance?: Autumn) => { + return { + createCode: (params: CreateReferralCodeParams) => + staticWrapper(createReferralCode, instance, { params }), + redeemCode: (params: RedeemReferralCodeParams) => + staticWrapper(redeemReferralCode, instance, { params }), + }; +}; + +export const createReferralCode = async ({ + instance, + params, +}: { + instance: Autumn; + params: CreateReferralCodeParams; +}): AutumnPromise => { + return instance.post("/referrals/code", params); +}; + +export const redeemReferralCode = async ({ + instance, + params, +}: { + instance: Autumn; + params: RedeemReferralCodeParams; +}): AutumnPromise => { + return instance.post("/referrals/redeem", params); +}; diff --git a/package/src/sdk/referrals/referralTypes.ts b/package/src/sdk/referrals/referralTypes.ts new file mode 100644 index 00000000..b7d4e687 --- /dev/null +++ b/package/src/sdk/referrals/referralTypes.ts @@ -0,0 +1,36 @@ +import { z } from "zod/v4"; + +export const CreateReferralCodeParamsSchema = z.object({ + customer_id: z.string(), + program_id: z.string(), +}); + +export type CreateReferralCodeParams = z.infer< + typeof CreateReferralCodeParamsSchema +>; + +export interface CreateReferralCodeResult { + code: string; + customer_id: string; + created_at: number; +} + +export const RedeemReferralCodeParamsSchema = z.object({ + code: z.string(), + customer_id: z.string(), +}); + +export type RedeemReferralCodeParams = z.infer< + typeof RedeemReferralCodeParamsSchema +>; + +export interface RedeemReferralCodeResult { + id: string; + customer_id: string; + reward_id: string; + referrer: { + id: string; + name: string | null; + email: string | null; + }; +} diff --git a/package/src/sdk/response.ts b/package/src/sdk/response.ts new file mode 100644 index 00000000..f3fd5968 --- /dev/null +++ b/package/src/sdk/response.ts @@ -0,0 +1,69 @@ +import { AutumnError } from "./error"; + +export type Success = { + data: T; + error: null; + statusCode?: number; +}; + +type Failure = { + data: null; + error: E; + statusCode?: number; +}; + +export const toContainerResult = async ({ + response, + logger, + logError = true, +}: { + response: Response; + logger: Console; + logError?: boolean; +}): Promise> => { + if (response.status < 200 || response.status >= 300) { + let error: any; + try { + error = await response.json(); + if (logError) { + logger.error(`[Autumn] ${error.message}`); + } + } catch (error) { + // biome-ignore lint/complexity/noUselessCatch: idk + throw error; + // return { + // data: null, + // error: new AutumnError({ + // message: "Failed to parse JSON response from Autumn", + // code: "internal_error", + // }), + // statusCode: response.status, + // }; + } + + return { + data: null, + error: new AutumnError({ + message: error.message, + code: error.code, + }), + statusCode: response.status, + }; + } + + try { + const data = await response.json(); + + return { + data: data, + error: null, + statusCode: response?.status, + }; + } catch (error) { + // biome-ignore lint/complexity/noUselessCatch: idk + throw error; + } +}; + +export type Result = Success | Failure; +export type AutumnPromise = Promise>; diff --git a/package/src/sdk/types.ts b/package/src/sdk/types.ts new file mode 100644 index 00000000..abbddb4e --- /dev/null +++ b/package/src/sdk/types.ts @@ -0,0 +1,15 @@ +// import { +// CusProductResponseSchema, +// CustomerResponseSchema, +// } from "@autumn/shared"; +// import { z } from "zod"; + +// export type Customer = z.infer; +// export type CustomerProduct = z.infer; + +// export interface CustomerCreateParams { +// id?: string; +// email?: string; +// name?: string; +// fingerprint?: string; +// } diff --git a/package/src/sdk/utils.ts b/package/src/sdk/utils.ts new file mode 100644 index 00000000..19c2b239 --- /dev/null +++ b/package/src/sdk/utils.ts @@ -0,0 +1,28 @@ +import { Autumn } from "./client"; +import queryString from "query-string"; + +export const staticWrapper = , TReturn>( + callback: (params: { instance: Autumn } & TArgs) => Promise, + instance: Autumn | undefined, + args: TArgs +): Promise => { + if (!instance) { + instance = new Autumn(); + } + + return callback({ instance, ...args }); +}; + +export const buildQueryString = (params?: Record): string => { + if (!params) return ""; + + return queryString.stringify(params, { + skipNull: true, + skipEmptyString: true + }); +}; + +export const buildPathWithQuery = (basePath: string, params?: Record): string => { + const query = buildQueryString(params); + return query ? `${basePath}?${query}` : basePath; +}; diff --git a/package/src/styles/global.css b/package/src/styles/global.css new file mode 100644 index 00000000..f20a662b --- /dev/null +++ b/package/src/styles/global.css @@ -0,0 +1,84 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + + + +:root { + --au-background: 0 0% 100%; + --au-foreground: 240 10% 3.9%; + --au-card: 0 0% 100%; + --au-card-foreground: 240 10% 3.9%; + --au-popover: 0 0% 100%; + --au-popover-foreground: 240 10% 3.9%; + --au-primary: 240 5.9% 10%; + --au-primary-foreground: 0 0% 98%; + --au-secondary: 240 4.8% 95.9%; + --au-secondary-foreground: 240 5.9% 10%; + --au-muted: 240 4.8% 95.9%; + --au-muted-foreground: 240 3.8% 46.1%; + --au-accent: 240 4.8% 95.9%; + --au-accent-foreground: 240 5.9% 10%; + --au-destructive: 0 84.2% 60.2%; + --au-destructive-foreground: 0 0% 98%; + --au-border: 240 5.9% 90%; + --au-input: 240 5.9% 90%; + --au-ring: 240 10% 3.9%; + --au-chart-1: 12 76% 61%; + --au-chart-2: 173 58% 39%; + --au-chart-3: 197 37% 24%; + --au-chart-4: 43 74% 66%; + --au-chart-5: 27 87% 67%; + --au-radius: 0.5rem; + --au-sidebar-background: 0 0% 98%; + --au-sidebar-foreground: 240 5.3% 26.1%; + --au-sidebar-primary: 240 5.9% 10%; + --au-sidebar-primary-foreground: 0 0% 98%; + --au-sidebar-accent: 240 4.8% 95.9%; + --au-sidebar-accent-foreground: 240 5.9% 10%; + --au-sidebar-border: 220 13% 91%; + --au-sidebar-ring: 217.2 91.2% 59.8%; +} +.dark { + --au-background: 240 10% 3.9%; + --au-foreground: 0 0% 98%; + --au-card: 240 10% 3.9%; + --au-card-foreground: 0 0% 98%; + --au-popover: 240 10% 3.9%; + --au-popover-foreground: 0 0% 98%; + --au-primary: 0 0% 98%; + --au-primary-foreground: 240 5.9% 10%; + --au-secondary: 240 3.7% 15.9%; + --au-secondary-foreground: 0 0% 98%; + --au-muted: 240 3.7% 15.9%; + --au-muted-foreground: 240 5% 64.9%; + --au-accent: 240 3.7% 15.9%; + --au-accent-foreground: 0 0% 98%; + --au-destructive: 0 62.8% 30.6%; + --au-destructive-foreground: 0 0% 98%; + --au-border: 240 3.7% 15.9%; + --au-input: 240 3.7% 15.9%; + --au-ring: 240 4.9% 83.9%; + --au-chart-1: 220 70% 50%; + --au-chart-2: 160 60% 45%; + --au-chart-3: 30 80% 55%; + --au-chart-4: 280 65% 60%; + --au-chart-5: 340 75% 55%; + --au-sidebar-background: 240 5.9% 10%; + --au-sidebar-foreground: 240 4.8% 95.9%; + --au-sidebar-primary: 224.3 76.3% 48%; + --au-sidebar-primary-foreground: 0 0% 100%; + --au-sidebar-accent: 240 3.7% 15.9%; + --au-sidebar-accent-foreground: 240 4.8% 95.9%; + --au-sidebar-border: 240 3.7% 15.9%; + --au-sidebar-ring: 217.2 91.2% 59.8%; +} + +@layer base { + * { + border-color: hsl(var(--au-border)); + } + body { + @apply au-bg-background au-text-foreground; + } +} diff --git a/package/src/styles/global_old.css b/package/src/styles/global_old.css new file mode 100644 index 00000000..2bb26f31 --- /dev/null +++ b/package/src/styles/global_old.css @@ -0,0 +1,73 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --au-background: 0 0% 100%; + --au-foreground: 240 10% 3.9%; + --au-card: 0 0% 100%; + --au-card-foreground: 240 10% 3.9%; + --au-popover: 0 0% 100%; + --au-popover-foreground: 240 10% 3.9%; + --au-primary: 240 5.9% 10%; + --au-primary-foreground: 0 0% 98%; + --au-secondary: 240 4.8% 95.9%; + --au-secondary-foreground: 240 5.9% 10%; + --au-muted: 240 4.8% 95.9%; + --au-muted-foreground: 240 3.8% 46.1%; + --au-accent: 240 4.8% 95.9%; + --au-accent-foreground: 240 5.9% 10%; + --au-destructive: 0 84.2% 60.2%; + --au-destructive-foreground: 0 0% 98%; + --au-border: 240 5.9% 90%; + --au-input: 240 5.9% 90%; + --au-ring: 240 10% 3.9%; + --au-chart-1: 12 76% 61%; + --au-chart-2: 173 58% 39%; + --au-chart-3: 197 37% 24%; + --au-chart-4: 43 74% 66%; + --au-chart-5: 27 87% 67%; + --au-radius: 0.5rem; + --au-sidebar-background: 0 0% 98%; + --au-sidebar-foreground: 240 5.3% 26.1%; + --au-sidebar-primary: 240 5.9% 10%; + --au-sidebar-primary-foreground: 0 0% 98%; + --au-sidebar-accent: 240 4.8% 95.9%; + --au-sidebar-accent-foreground: 240 5.9% 10%; + --au-sidebar-border: 220 13% 91%; + --au-sidebar-ring: 217.2 91.2% 59.8%; +} +.dark { + --au-background: 240 10% 3.9%; + --au-foreground: 0 0% 98%; + --au-card: 240 10% 3.9%; + --au-card-foreground: 0 0% 98%; + --au-popover: 240 10% 3.9%; + --au-popover-foreground: 0 0% 98%; + --au-primary: 0 0% 98%; + --au-primary-foreground: 240 5.9% 10%; + --au-secondary: 240 3.7% 15.9%; + --au-secondary-foreground: 0 0% 98%; + --au-muted: 240 3.7% 15.9%; + --au-muted-foreground: 240 5% 64.9%; + --au-accent: 240 3.7% 15.9%; + --au-accent-foreground: 0 0% 98%; + --au-destructive: 0 62.8% 30.6%; + --au-destructive-foreground: 0 0% 98%; + --au-border: 240 3.7% 15.9%; + --au-input: 240 3.7% 15.9%; + --au-ring: 240 4.9% 83.9%; + --au-chart-1: 220 70% 50%; + --au-chart-2: 160 60% 45%; + --au-chart-3: 30 80% 55%; + --au-chart-4: 280 65% 60%; + --au-chart-5: 340 75% 55%; + --au-sidebar-background: 240 5.9% 10%; + --au-sidebar-foreground: 240 4.8% 95.9%; + --au-sidebar-primary: 224.3 76.3% 48%; + --au-sidebar-primary-foreground: 0 0% 100%; + --au-sidebar-accent: 240 3.7% 15.9%; + --au-sidebar-accent-foreground: 240 4.8% 95.9%; + --au-sidebar-border: 240 3.7% 15.9%; + --au-sidebar-ring: 217.2 91.2% 59.8%; +} diff --git a/package/src/utils/encryptUtils.tsx b/package/src/utils/encryptUtils.tsx new file mode 100644 index 00000000..4bdafcc2 --- /dev/null +++ b/package/src/utils/encryptUtils.tsx @@ -0,0 +1,60 @@ +import crypto from "crypto"; +import { AutumnError } from "../sdk"; + +const getKey = () => { + if (!process.env.AUTUMN_SECRET_KEY) { + throw new AutumnError({ + message: + "Autumn secret key not found in process.env.AUTUMN_SECRET_KEY. Please set it in your .env file.", + code: "secret_key_not_found", + }); + } + + return crypto + .createHash("sha512") + .update(process.env.AUTUMN_SECRET_KEY!) + .digest("hex") + .substring(0, 32); +}; + +export function encryptData(data: string) { + let key: string; + try { + key = getKey(); + } catch (error: any) { + throw new AutumnError({ + message: `Failed to encrypt customer ID. ${error.message}`, + code: "encrypt_customer_id_failed", + }); + } + + const iv = crypto.randomBytes(16); + const cipher = crypto.createCipheriv("aes-256-cbc", key, iv); + + const encrypted = Buffer.concat([ + cipher.update(data, "utf8"), + cipher.final(), + ]); + + // Combine IV and encrypted data + const result = Buffer.concat([iv, encrypted]); + return result.toString("base64"); +} + +export function decryptData(encryptedData: string) { + const buffer = Buffer.from(encryptedData, "base64"); + + // Extract IV and encrypted data + const iv = buffer.slice(0, 16); + const encrypted = buffer.slice(16); + + const key = getKey(); + const decipher = crypto.createDecipheriv("aes-256-cbc", key, iv); + + const decrypted = Buffer.concat([ + decipher.update(encrypted), + decipher.final(), + ]); + + return decrypted.toString("utf8"); +} diff --git a/package/src/utils/entityUtils.tsx b/package/src/utils/entityUtils.tsx new file mode 100644 index 00000000..52244d24 --- /dev/null +++ b/package/src/utils/entityUtils.tsx @@ -0,0 +1,6 @@ +export const getEntityExpandStr = (expand?: string[]) => { + if (!expand) { + return ""; + } + return `expand=${expand.join(",")}`; +}; diff --git a/package/src/utils/logger.ts b/package/src/utils/logger.ts new file mode 100644 index 00000000..3143c61f --- /dev/null +++ b/package/src/utils/logger.ts @@ -0,0 +1,39 @@ +// Alternative: Use pino without worker thread transport +const getTime = () => { + const timeString = new Date().toISOString(); + return `[${timeString.split("T")[1].split(".")[0]}]`; +}; + +const greaterThanLevel = (level: string) => { + return levels.indexOf(level) >= levels.indexOf(logger.level); +}; + +const levels = ["debug", "info", "warn", "error", "fatal"]; + +export const logger = { + ...console, + level: "info", + debug: (...args: any[]) => { + if (greaterThanLevel("debug")) { + console.log(getTime(), "DEBUG", ...args); + } + }, + log: (...args: any[]) => { + console.log(getTime(), "INFO", ...args); + }, + info: (...args: any[]) => { + if (greaterThanLevel("info")) { + console.log(getTime(), "INFO", ...args); + } + }, + warn: (...args: any[]) => { + if (greaterThanLevel("warn")) { + console.log(getTime(), "WARN", ...args); + } + }, + error: (...args: any[]) => { + if (greaterThanLevel("error")) { + console.log(getTime(), "ERROR", ...args); + } + }, +}; diff --git a/package/src/utils/toSnakeCase.ts b/package/src/utils/toSnakeCase.ts new file mode 100644 index 00000000..1b9c6308 --- /dev/null +++ b/package/src/utils/toSnakeCase.ts @@ -0,0 +1,49 @@ +function stringToSnakeCase(str: string): string { + return str + .replace(/([a-z])([A-Z])/g, "$1_$2") + .replace(/[-\s]+/g, "_") + .toLowerCase(); +} + +export const toSnakeCase = ({ + obj, + excludeKeys, + excludeChildrenOf, +}: { + obj: T; + excludeKeys?: string[]; + excludeChildrenOf?: string[]; +}): T => { + if (Array.isArray(obj)) { + return obj.map((item) => + toSnakeCase({ obj: item as unknown as T, excludeKeys, excludeChildrenOf }) + ) as T; + } else if (obj !== null && typeof obj === "object") { + return Object.fromEntries( + Object.entries(obj).map(([key, value]) => { + const snakeKey = stringToSnakeCase(key); + + // If this key is in excludeKeys, leave key and value untouched + if (excludeKeys?.includes(key)) { + return [key, value]; + } + + // If this key is in excludeChildrenOf, convert key but do not recurse into value + if (excludeChildrenOf?.includes(key)) { + return [snakeKey, value]; + } + + // Otherwise, convert key and recursively process value + return [ + snakeKey, + toSnakeCase({ + obj: value as unknown as T, + excludeKeys, + excludeChildrenOf, + }), + ]; + }) + ) as T; + } + return obj as T; +}; diff --git a/package/tailwind.config.ts b/package/tailwind.config.ts new file mode 100644 index 00000000..d3ea6be5 --- /dev/null +++ b/package/tailwind.config.ts @@ -0,0 +1,136 @@ +import type { Config } from "tailwindcss"; +import tailwindAnimate from "tailwindcss-animate"; +import { + scopedPreflightStyles, + isolateInsideOfContainer, +} from "tailwindcss-scoped-preflight"; + +export default { + prefix: "au-", + corePlugins: { + preflight: false, // This removes @tailwind base completely + }, + darkMode: ["class"], + content: ["./src/**/*.{html,js,ts,tsx}"], + theme: { + extend: { + colors: { + background: "hsl(var(--au-background))", + foreground: "hsl(var(--au-foreground))", + card: { + DEFAULT: "hsl(var(--au-card))", + foreground: "hsl(var(--au-card-foreground))", + }, + popover: { + DEFAULT: "hsl(var(--au-popover))", + foreground: "hsl(var(--au-popover-foreground))", + }, + primary: { + DEFAULT: "hsl(var(--au-primary))", + foreground: "hsl(var(--au-primary-foreground))", + }, + secondary: { + DEFAULT: "hsl(var(--au-secondary))", + foreground: "hsl(var(--au-secondary-foreground))", + }, + muted: { + DEFAULT: "hsl(var(--au-muted))", + foreground: "hsl(var(--au-muted-foreground))", + }, + accent: { + DEFAULT: "hsl(var(--au-accent))", + foreground: "hsl(var(--au-accent-foreground))", + }, + destructive: { + DEFAULT: "hsl(var(--au-destructive))", + foreground: "hsl(var(--au-destructive-foreground))", + }, + border: "hsl(var(--au-border))", + input: "hsl(var(--au-input))", + ring: "hsl(var(--au-ring))", + chart: { + "1": "hsl(var(--au-chart-1))", + "2": "hsl(var(--au-chart-2))", + "3": "hsl(var(--au-chart-3))", + "4": "hsl(var(--au-chart-4))", + "5": "hsl(var(--au-chart-5))", + }, + }, + borderRadius: { + lg: "var(--au-radius)", + md: "calc(var(--au-radius) - 2px)", + sm: "calc(var(--au-radius) - 4px)", + }, + keyframes: { + shine: { + "0%": { + backgroundPosition: "0% 50%", + }, + "100%": { + backgroundPosition: "200% 50%", + }, + }, + bounceFast: { + "0%, 100%": { + transform: "translateY(0)", + }, + "20%": { + transform: "translateY(-8px)", + }, + "40%": { + transform: "translateY(-4px)", + }, + "60%": { + transform: "translateY(-8px)", + }, + "80%": { + transform: "translateY(-4px)", + }, + }, + bounceClick: { + "0%": { + transform: "scale(1)", + }, + "20%": { + transform: "scale(0.96)", + }, + "50%": { + transform: "scale(1.04)", + }, + "100%": { + transform: "scale(1)", + }, + }, + "accordion-down": { + from: { + height: "0", + }, + to: { + height: "var(--radix-accordion-content-height)", + }, + }, + "accordion-up": { + from: { + height: "var(--radix-accordion-content-height)", + }, + to: { + height: "0", + }, + }, + }, + animation: { + shine: "shine 3s ease-in-out infinite", + "bounce-fast": "bounceFast 0.6s cubic-bezier(0.4,0,0.6,1) infinite", + "bounce-click": "bounceClick 0.3s cubic-bezier(0.4,0,0.6,1)", + "accordion-down": "accordion-down 0.2s ease-out", + "accordion-up": "accordion-up 0.2s ease-out", + }, + }, + }, + plugins: [ + tailwindAnimate, + scopedPreflightStyles({ + isolationStrategy: isolateInsideOfContainer(".au-root"), + }), + ], +} satisfies Config; diff --git a/package/tsconfig.json b/package/tsconfig.json new file mode 100644 index 00000000..eefb57a4 --- /dev/null +++ b/package/tsconfig.json @@ -0,0 +1,58 @@ +{ + "compilerOptions": { + "strict": true, + "noImplicitAny": true, + "esModuleInterop": true, + "strictNullChecks": true, + "target": "ES2022", + "moduleResolution": "NodeNext", + "module": "NodeNext", + "declaration": true, + "isolatedModules": true, + "noEmit": true, + "outDir": "dist", + "jsx": "react-jsx", + "lib": [ + "DOM", + "DOM.Iterable", + "ESNext" + ], + "skipLibCheck": true, + "paths": { + "@/*": [ + "./src/libraries/react/*" + ], + "@/components/*": [ + "./src/libraries/react/components/*" + ], + "@/lib/*": [ + "./src/libraries/react/lib/*" + ], + "@/hooks/*": [ + "./src/libraries/react/hooks/*" + ], + "@sdk": [ + "./src/sdk/index" + ], + "@sdk/*": [ + "./src/sdk/*" + ], + "@styles": [ + "./src/styles/*" + ], + "@compose": [ + "./src/compose/*" + ], + "@utils/*": [ + "./src/utils/*" + ] + } + }, + "include": [ + "./src" + ], + "exclude": [ + "node_modules", + "./src/archives" + ] +} \ No newline at end of file diff --git a/package/tsup.config.ts b/package/tsup.config.ts new file mode 100644 index 00000000..5432cbae --- /dev/null +++ b/package/tsup.config.ts @@ -0,0 +1,213 @@ +import alias from "esbuild-plugin-path-alias"; +import * as path from "path"; +import { defineConfig, type Options } from "tsup"; + +// Path aliases that match tsconfig.json +const pathAliases = { + "@": path.resolve("./src/libraries/react"), + "@sdk": path.resolve("./src/sdk"), + "@styles": path.resolve("./src/styles"), +}; + +const reactConfigs: Options[] = [ + // Backend + { + entry: ["src/libraries/backend/**/*.{ts,tsx}"], + format: ["cjs", "esm"], + dts: true, + clean: false, // Don't clean on subsequent builds + outDir: "./dist/libraries/backend", + external: [ + "react", + "react/jsx-runtime", + "react-dom", + "better-auth", + "better-call", + "jotai", + ], + bundle: true, + skipNodeModulesBundle: true, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + options.define = { + ...options.define, + }; + }, + }, + + // React - Index file with CSS import (CommonJS) + { + entry: ["src/libraries/react/index.ts"], + format: ["cjs", "esm"], + dts: true, + clean: false, + outDir: "./dist/libraries/react", + external: ["react", "react/jsx-runtime", "react-dom"], + bundle: true, + banner: { + js: '"use client";', + }, + injectStyle: true, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + options.define = { + ...options.define, + __dirname: "import.meta.dirname", + __filename: "import.meta.filename", + }; + }, + }, + + // React - Other files without CSS import + { + entry: [ + "src/libraries/react/**/*.{ts,tsx}", + "!src/libraries/react/index.ts", + ], + format: ["cjs", "esm"], + dts: true, + clean: false, + outDir: "./dist/libraries/react", + external: ["react", "react/jsx-runtime", "react-dom"], + bundle: true, + banner: { + js: '"use client";\n', + }, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + options.define = { + ...options.define, + __dirname: "import.meta.dirname", + __filename: "import.meta.filename", + }; + }, + }, +]; + +export default defineConfig([ + { + format: ["cjs", "esm"], + entry: ["./src/sdk/index.ts"], + skipNodeModulesBundle: true, + dts: true, + shims: true, + clean: false, + outDir: "./dist/sdk", + + treeshake: true, + target: "es2020", + + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + options.define = { + ...options.define, + __dirname: "import.meta.dirname", + __filename: "import.meta.filename", + }; + }, + }, + + // GLOBAL + { + entry: ["src/utils/*.{ts,tsx}"], + format: ["cjs", "esm"], + dts: true, + clean: true, + bundle: true, + outDir: "./dist/utils", // Fixed wildcard path to specific directory + external: ["react", "react/jsx-runtime", "react-dom"], + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + options.define = { + ...options.define, + __dirname: "import.meta.dirname", + __filename: "import.meta.filename", + }; + }, + }, + + // SDK + { + entry: ["src/next/*.{ts,tsx}"], + format: ["cjs", "esm"], + dts: true, + clean: false, // Don't clean on subsequent builds + outDir: "./dist/next", + external: ["react", "react/jsx-runtime", "react-dom"], + bundle: false, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + options.define = { + ...options.define, + __dirname: "import.meta.dirname", + __filename: "import.meta.filename", + }; + }, + }, + ...reactConfigs, + + // React client components + { + entry: ["src/next/client/**/*.ts", "src/next/client/**/*.tsx"], + format: ["cjs", "esm"], + dts: true, + clean: true, + outDir: "./dist/next/client", + external: ["react", "react/jsx-runtime", "react-dom"], + bundle: false, + banner: { + js: '"use client";\n', + }, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + options.platform = "browser"; + options.format = "esm"; + }, + }, + + // Styles - Properly process CSS with PostCSS and Tailwind + { + entry: ["src/styles/global.css"], + format: ["esm", "cjs"], + outDir: "./dist/styles", + clean: false, + bundle: true, + }, + + // React server components + { + entry: ["src/next/server/**/*.{ts,tsx}"], + format: ["cjs", "esm"], + dts: true, + clean: true, + outDir: "./dist/next/server", + external: [ + "react", + "react/jsx-runtime", + "react-dom", + "@clerk/backend", + "better-auth", + "@supabase/ssr", + ], + bundle: false, + banner: { + js: '"use server";', + }, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + options.banner = { + js: '"use server";', + }; + options.platform = "node"; + options.format = "esm"; + }, + }, +]); diff --git a/package/tsup.dev.config.ts b/package/tsup.dev.config.ts new file mode 100644 index 00000000..9fc34fba --- /dev/null +++ b/package/tsup.dev.config.ts @@ -0,0 +1,198 @@ +import { defineConfig, Options } from "tsup"; +import * as path from "path"; +import alias from "esbuild-plugin-path-alias"; + +// Path aliases that match tsconfig.json +const pathAliases = { + "@": path.resolve("./src/libraries/react"), + "@sdk": path.resolve("./src/sdk"), + "@styles": path.resolve("./src/styles"), +}; + +const reactConfigs: Options[] = [ + // Backend + { + entry: ["src/libraries/backend/**/*.{ts,tsx}"], + format: ["cjs", "esm"], + dts: true, + clean: false, // Don't clean on subsequent builds + outDir: "./dist/libraries/backend", + external: ["react", "react/jsx-runtime", "react-dom"], + bundle: true, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + }, + }, + + // React - Index file with CSS import (CommonJS) + { + entry: ["src/libraries/react/index.ts"], + format: ["cjs"], + dts: false, + clean: false, + outDir: "./dist/libraries/react", + external: ["react", "react/jsx-runtime", "react-dom"], + bundle: true, + banner: { + // js: '"use client";\nrequire("../../styles/global.css");', + js: '"use client";', + }, + injectStyle: true, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + }, + }, + + // React - Index file with CSS import (ESM) + { + entry: ["src/libraries/react/index.ts"], + format: ["esm"], + dts: false, // Only generate types once + clean: false, + outDir: "./dist/libraries/react", + external: ["react", "react/jsx-runtime", "react-dom"], + bundle: true, + banner: { + // js: '"use client";\nimport "../../styles/global.css";', + js: '"use client";', + }, + injectStyle: true, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + }, + }, + + // React - Other files without CSS import + { + entry: [ + "src/libraries/react/**/*.{ts,tsx}", + "!src/libraries/react/index.ts", + ], + format: ["cjs", "esm"], + dts: false, + clean: false, + outDir: "./dist/libraries/react", + external: ["react", "react/jsx-runtime", "react-dom"], + bundle: true, + banner: { + js: '"use client";\n', + }, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + }, + }, +]; + +export default defineConfig([ + { + format: ["cjs", "esm"], + entry: ["./src/sdk/index.ts"], + skipNodeModulesBundle: true, + dts: false, + shims: true, + clean: false, + outDir: "./dist/sdk", + + treeshake: true, + target: "es2020", + + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + }, + }, + + // GLOBAL + { + entry: ["src/utils/*.{ts,tsx}"], + format: ["cjs", "esm"], + dts: false, + clean: true, + bundle: true, + outDir: "./dist/utils", // Fixed wildcard path to specific directory + external: ["react", "react/jsx-runtime", "react-dom"], + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + }, + }, + + // SDK + { + entry: ["src/next/*.{ts,tsx}"], + format: ["cjs", "esm"], + dts: false, + clean: false, // Don't clean on subsequent builds + outDir: "./dist/next", + external: ["react", "react/jsx-runtime", "react-dom"], + bundle: false, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + }, + }, + ...reactConfigs, + + // React client components + { + entry: ["src/next/client/**/*.ts", "src/next/client/**/*.tsx"], + format: ["cjs", "esm"], + dts: false, + clean: true, + outDir: "./dist/next/client", + external: ["react", "react/jsx-runtime", "react-dom"], + bundle: false, + banner: { + js: '"use client";\n', + }, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + options.platform = "browser"; + options.format = "esm"; + }, + }, + + // Styles - Properly process CSS with PostCSS and Tailwind + { + entry: ["src/styles/global.css"], + format: ["esm", "cjs"], + outDir: "./dist/styles", + clean: false, + bundle: true, + }, + + // React server components + { + entry: ["src/next/server/**/*.{ts,tsx}"], + format: ["cjs", "esm"], + dts: false, + clean: true, + outDir: "./dist/next/server", + external: [ + "react", + "react/jsx-runtime", + "react-dom", + "@clerk/backend", + "better-auth", + "@supabase/ssr", + ], + bundle: false, + banner: { + js: '"use server";', + }, + esbuildOptions(options) { + options.plugins = options.plugins || []; + options.plugins.push(alias(pathAliases)); + options.banner = { + js: '"use server";', + }; + options.platform = "node"; + options.format = "esm"; + }, + }, +]); From f546e271e2107d1288012bb0603a310114573e57 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Mon, 19 Jan 2026 14:44:09 +0000 Subject: [PATCH 32/35] =?UTF-8?q?fix:=20=F0=9F=90=9B=20autumn-js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autumn-js/.npmignore | 10 - autumn-js/LICENSE.md | 7 - autumn-js/README.md | 12 - autumn-js/components.json | 21 - autumn-js/package.json | 201 --- autumn-js/postcss.config.js | 6 - autumn-js/publish.sh | 29 - autumn-js/scripts/css-transform-plugin.js | 28 - autumn-js/scripts/post-build.js | 168 --- autumn-js/scripts/sync-registry.ts | 216 --- autumn-js/src/generated/css-content.ts | 1219 ----------------- .../src/libraries/backend/better-auth.ts | 304 ---- autumn-js/src/libraries/backend/constants.ts | 3 - autumn-js/src/libraries/backend/elysia.ts | 107 -- autumn-js/src/libraries/backend/express.ts | 81 -- autumn-js/src/libraries/backend/fastify.ts | 68 - autumn-js/src/libraries/backend/hono.ts | 66 - autumn-js/src/libraries/backend/index.ts | 85 -- autumn-js/src/libraries/backend/next.ts | 98 -- .../src/libraries/backend/react-router.ts | 102 -- .../backend/routes/analyticsRoutes.ts | 57 - .../libraries/backend/routes/backendRouter.ts | 35 - .../src/libraries/backend/routes/basePath.ts | 1 - .../src/libraries/backend/routes/cusRoutes.ts | 41 - .../libraries/backend/routes/entityRoutes.ts | 93 -- .../src/libraries/backend/routes/genRoutes.ts | 207 --- .../libraries/backend/routes/planRoutes.ts | 26 - .../backend/routes/referralRoutes.ts | 58 - .../src/libraries/backend/schemas/zod.ts | 65 - autumn-js/src/libraries/backend/supabase.ts | 97 -- autumn-js/src/libraries/backend/tanstack.ts | 85 -- .../libraries/backend/utils/AuthFunction.ts | 7 - .../src/libraries/backend/utils/backendRes.ts | 30 - .../backend/utils/betterAuth/middlewares.ts | 132 -- .../backend/utils/betterAuth/types.ts | 18 - .../libraries/backend/utils/secretKeyCheck.ts | 14 - .../src/libraries/backend/utils/withAuth.ts | 102 -- .../src/libraries/react/AutumnContext.tsx | 67 - .../libraries/react/BaseAutumnProvider.tsx | 103 -- .../libraries/react/ReactAutumnProvider.tsx | 70 - .../react/client/ConvexAutumnClient.tsx | 217 --- .../libraries/react/client/ProductDetails.ts | 32 - .../react/client/ReactAutumnClient.tsx | 361 ----- .../react/client/clientAnalyticsMethods.ts | 25 - .../react/client/clientCompMethods.ts | 9 - .../react/client/clientCusMethods.ts | 14 - .../react/client/clientEntityMethods.ts | 36 - .../react/client/clientGenMethods.ts | 72 - .../react/client/clientPlanMethods.ts | 9 - .../react/client/clientReferralMethods.ts | 22 - .../client/types/clientAnalyticsTypes.ts | 137 -- .../react/clientTypes/attachTypes.ts | 125 -- .../react/clientTypes/billingPortalTypes.ts | 19 - .../react/clientTypes/cancelTypes.ts | 31 - .../libraries/react/clientTypes/checkTypes.ts | 55 - .../react/clientTypes/checkoutTypes.ts | 119 -- .../react/clientTypes/createCustomerTypes.ts | 78 -- .../react/clientTypes/createEntityTypes.ts | 33 - .../clientTypes/createReferralCodeTypes.ts | 13 - .../react/clientTypes/customerDataTypes.ts | 47 - .../react/clientTypes/entityDataTypes.ts | 19 - .../react/clientTypes/getEntityTypes.ts | 13 - .../src/libraries/react/clientTypes/index.ts | 18 - .../libraries/react/clientTypes/queryTypes.ts | 19 - .../clientTypes/redeemReferralCodeTypes.ts | 13 - .../react/clientTypes/setupPaymentTypes.ts | 25 - .../libraries/react/clientTypes/trackTypes.ts | 84 -- .../checkout-dialog-synced.tsx | 487 ------- .../checkout-dialog/lib/checkout-content.tsx | 149 -- .../paywall-dialog/lib/paywall-content.tsx | 63 - .../paywall-dialog/paywall-dialog-synced.tsx | 57 - .../lib/pricing-table-content.tsx | 74 - .../pricing-table/pricing-table-synced.tsx | 407 ------ .../react/components/ui/accordion.tsx | 61 - .../libraries/react/components/ui/button.tsx | 59 - .../libraries/react/components/ui/dialog.tsx | 139 -- .../libraries/react/components/ui/input.tsx | 22 - .../libraries/react/components/ui/popover.tsx | 31 - .../libraries/react/components/ui/switch.tsx | 31 - .../react/errorUtils/logAuthError.ts | 17 - .../react/errorUtils/logFetchError.ts | 18 - .../react/hooks/helpers/handleCheck.ts | 224 --- .../react/hooks/helpers/useAutumnBase.tsx | 190 --- .../react/hooks/helpers/useDialog.tsx | 16 - .../react/hooks/types/useCustomerMethods.ts | 183 --- .../react/hooks/types/useEntityMethods.ts | 97 -- .../react/hooks/useAggregateEvents.tsx | 71 - .../libraries/react/hooks/useAnalytics.tsx | 47 - .../src/libraries/react/hooks/useCustomer.tsx | 86 -- .../libraries/react/hooks/useCustomerBase.tsx | 139 -- .../src/libraries/react/hooks/useEntity.tsx | 26 - .../libraries/react/hooks/useEntityBase.tsx | 116 -- .../libraries/react/hooks/useListEvents.tsx | 105 -- .../src/libraries/react/hooks/usePaywall.tsx | 42 - .../hooks/usePricingTable/pricingCardTypes.ts | 60 - .../hooks/usePricingTable/usePricingTable.tsx | 17 - .../usePricingTable/usePricingTableBase.tsx | 327 ----- autumn-js/src/libraries/react/index.ts | 27 - autumn-js/src/libraries/react/lib/utils.ts | 11 - .../libraries/react/utils/compareParams.ts | 23 - .../src/libraries/react/utils/errorUtils.ts | 44 - .../libraries/react/utils/inject-styles.ts | 32 - autumn-js/src/sdk/index.ts | 3 - autumn-js/src/styles/global.css | 84 -- autumn-js/src/styles/global_old.css | 73 - autumn-js/src/utils/ErrorResponse.ts | 35 - autumn-js/src/utils/entityUtils.tsx | 6 - autumn-js/src/utils/handleFetchResult.ts | 47 - autumn-js/src/utils/logger.ts | 39 - autumn-js/src/utils/toSnakeCase.ts | 49 - autumn-js/tailwind.config.ts | 136 -- autumn-js/tsconfig.json | 58 - autumn-js/tsup.config.ts | 213 --- autumn-js/tsup.dev.config.ts | 136 -- 114 files changed, 10161 deletions(-) delete mode 100644 autumn-js/.npmignore delete mode 100644 autumn-js/LICENSE.md delete mode 100644 autumn-js/README.md delete mode 100644 autumn-js/components.json delete mode 100644 autumn-js/package.json delete mode 100644 autumn-js/postcss.config.js delete mode 100755 autumn-js/publish.sh delete mode 100644 autumn-js/scripts/css-transform-plugin.js delete mode 100644 autumn-js/scripts/post-build.js delete mode 100644 autumn-js/scripts/sync-registry.ts delete mode 100644 autumn-js/src/generated/css-content.ts delete mode 100644 autumn-js/src/libraries/backend/better-auth.ts delete mode 100644 autumn-js/src/libraries/backend/constants.ts delete mode 100644 autumn-js/src/libraries/backend/elysia.ts delete mode 100644 autumn-js/src/libraries/backend/express.ts delete mode 100644 autumn-js/src/libraries/backend/fastify.ts delete mode 100644 autumn-js/src/libraries/backend/hono.ts delete mode 100644 autumn-js/src/libraries/backend/index.ts delete mode 100644 autumn-js/src/libraries/backend/next.ts delete mode 100644 autumn-js/src/libraries/backend/react-router.ts delete mode 100644 autumn-js/src/libraries/backend/routes/analyticsRoutes.ts delete mode 100644 autumn-js/src/libraries/backend/routes/backendRouter.ts delete mode 100644 autumn-js/src/libraries/backend/routes/basePath.ts delete mode 100644 autumn-js/src/libraries/backend/routes/cusRoutes.ts delete mode 100644 autumn-js/src/libraries/backend/routes/entityRoutes.ts delete mode 100644 autumn-js/src/libraries/backend/routes/genRoutes.ts delete mode 100644 autumn-js/src/libraries/backend/routes/planRoutes.ts delete mode 100644 autumn-js/src/libraries/backend/routes/referralRoutes.ts delete mode 100644 autumn-js/src/libraries/backend/schemas/zod.ts delete mode 100644 autumn-js/src/libraries/backend/supabase.ts delete mode 100644 autumn-js/src/libraries/backend/tanstack.ts delete mode 100644 autumn-js/src/libraries/backend/utils/AuthFunction.ts delete mode 100644 autumn-js/src/libraries/backend/utils/backendRes.ts delete mode 100644 autumn-js/src/libraries/backend/utils/betterAuth/middlewares.ts delete mode 100644 autumn-js/src/libraries/backend/utils/betterAuth/types.ts delete mode 100644 autumn-js/src/libraries/backend/utils/secretKeyCheck.ts delete mode 100644 autumn-js/src/libraries/backend/utils/withAuth.ts delete mode 100644 autumn-js/src/libraries/react/AutumnContext.tsx delete mode 100644 autumn-js/src/libraries/react/BaseAutumnProvider.tsx delete mode 100644 autumn-js/src/libraries/react/ReactAutumnProvider.tsx delete mode 100644 autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx delete mode 100644 autumn-js/src/libraries/react/client/ProductDetails.ts delete mode 100644 autumn-js/src/libraries/react/client/ReactAutumnClient.tsx delete mode 100644 autumn-js/src/libraries/react/client/clientAnalyticsMethods.ts delete mode 100644 autumn-js/src/libraries/react/client/clientCompMethods.ts delete mode 100644 autumn-js/src/libraries/react/client/clientCusMethods.ts delete mode 100644 autumn-js/src/libraries/react/client/clientEntityMethods.ts delete mode 100644 autumn-js/src/libraries/react/client/clientGenMethods.ts delete mode 100644 autumn-js/src/libraries/react/client/clientPlanMethods.ts delete mode 100644 autumn-js/src/libraries/react/client/clientReferralMethods.ts delete mode 100644 autumn-js/src/libraries/react/client/types/clientAnalyticsTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/attachTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/cancelTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/checkTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/getEntityTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/index.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/queryTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts delete mode 100644 autumn-js/src/libraries/react/clientTypes/trackTypes.ts delete mode 100644 autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx delete mode 100644 autumn-js/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx delete mode 100644 autumn-js/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx delete mode 100644 autumn-js/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx delete mode 100644 autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx delete mode 100644 autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx delete mode 100644 autumn-js/src/libraries/react/components/ui/accordion.tsx delete mode 100644 autumn-js/src/libraries/react/components/ui/button.tsx delete mode 100644 autumn-js/src/libraries/react/components/ui/dialog.tsx delete mode 100644 autumn-js/src/libraries/react/components/ui/input.tsx delete mode 100644 autumn-js/src/libraries/react/components/ui/popover.tsx delete mode 100644 autumn-js/src/libraries/react/components/ui/switch.tsx delete mode 100644 autumn-js/src/libraries/react/errorUtils/logAuthError.ts delete mode 100644 autumn-js/src/libraries/react/errorUtils/logFetchError.ts delete mode 100644 autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts delete mode 100644 autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/helpers/useDialog.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts delete mode 100644 autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts delete mode 100644 autumn-js/src/libraries/react/hooks/useAggregateEvents.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/useAnalytics.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/useCustomer.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/useCustomerBase.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/useEntity.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/useEntityBase.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/useListEvents.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/usePaywall.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/usePricingTable/pricingCardTypes.ts delete mode 100644 autumn-js/src/libraries/react/hooks/usePricingTable/usePricingTable.tsx delete mode 100644 autumn-js/src/libraries/react/hooks/usePricingTable/usePricingTableBase.tsx delete mode 100644 autumn-js/src/libraries/react/index.ts delete mode 100644 autumn-js/src/libraries/react/lib/utils.ts delete mode 100644 autumn-js/src/libraries/react/utils/compareParams.ts delete mode 100644 autumn-js/src/libraries/react/utils/errorUtils.ts delete mode 100644 autumn-js/src/libraries/react/utils/inject-styles.ts delete mode 100644 autumn-js/src/sdk/index.ts delete mode 100644 autumn-js/src/styles/global.css delete mode 100644 autumn-js/src/styles/global_old.css delete mode 100644 autumn-js/src/utils/ErrorResponse.ts delete mode 100644 autumn-js/src/utils/entityUtils.tsx delete mode 100644 autumn-js/src/utils/handleFetchResult.ts delete mode 100644 autumn-js/src/utils/logger.ts delete mode 100644 autumn-js/src/utils/toSnakeCase.ts delete mode 100644 autumn-js/tailwind.config.ts delete mode 100644 autumn-js/tsconfig.json delete mode 100644 autumn-js/tsup.config.ts delete mode 100644 autumn-js/tsup.dev.config.ts diff --git a/autumn-js/.npmignore b/autumn-js/.npmignore deleted file mode 100644 index 679ac613..00000000 --- a/autumn-js/.npmignore +++ /dev/null @@ -1,10 +0,0 @@ -/src -/node_modules - -.DS_Store - -.gitignore - -tsconfig.json - -bun.lock \ No newline at end of file diff --git a/autumn-js/LICENSE.md b/autumn-js/LICENSE.md deleted file mode 100644 index 081345c6..00000000 --- a/autumn-js/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -The MIT License (MIT) Copyright (c) 2025 - present, Recase Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/autumn-js/README.md b/autumn-js/README.md deleted file mode 100644 index b4d7b64e..00000000 --- a/autumn-js/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Autumn JS Library - -`autumn-js` is a JavaScript/TypeScript library for interacting with the Autumn pricing and billing platform. This package provides both a server-side SDK for the Autumn API and a React package for client-side implementation. - -## Installation - -```bash -npm install autumn-js -``` - -## Docs -To learn how to use `autumn-js`, visit our documentation [here](https://docs.useautumn.com) \ No newline at end of file diff --git a/autumn-js/components.json b/autumn-js/components.json deleted file mode 100644 index fc1605df..00000000 --- a/autumn-js/components.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://ui.shadcn.com/schema.json", - "style": "new-york", - "rsc": false, - "tsx": true, - "tailwind": { - "config": "tailwind.config.ts", - "css": "src/styles/global.css", - "baseColor": "neutral", - "cssVariables": true, - "prefix": "au-" - }, - "aliases": { - "components": "@/components", - "utils": "@/lib/utils", - "ui": "@/components/ui", - "lib": "@/lib", - "hooks": "@/hooks" - }, - "iconLibrary": "lucide" -} \ No newline at end of file diff --git a/autumn-js/package.json b/autumn-js/package.json deleted file mode 100644 index 808f276c..00000000 --- a/autumn-js/package.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "name": "autumn-js", - "description": "Autumn JS Library", - "version": "0.1.67", - "repository": "github:useautumn/autumn-js", - "homepage": "https://docs.useautumn.com", - "main": "./dist/sdk/index.js", - "files": [ - "dist", - "README.md", - "LICENSE.md", - "tsup.config.ts" - ], - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "build": "rm -rf dist && tsup && node scripts/post-build.js", - "build:backend": "tsup \"src/libraries/backend/**/*.ts\" --format cjs,esm --clean=false --outDir=\"./dist/libraries/backend\"", - "build:cli": "tsup src/cli/index.ts --format cjs --outDir dist/cli", - "publish-beta": "pnpm publish --tag beta", - "dev": "concurrently \"tsx scripts/sync-registry.ts watch\" \"nodemon --watch src --ext ts,tsx,css --exec \\\"tsup --config tsup.dev.config.ts && node scripts/post-build.js\\\"\"", - "cli": "tsx src/cli/index.ts", - "test-cli": "node ./dist/cli/cli.mjs", - "dev2": "nodemon --watch src --ext ts,tsx,css --exec \"tsup --config tsup.dev.config.ts\"", - "sync-registry": "tsx scripts/sync-registry.ts sync", - "watch-registry": "tsx scripts/sync-registry.ts watch" - }, - "module": "./dist/sdk/index.mjs", - "types": "./dist/sdk/index.d.ts", - "exports": { - ".": { - "types": "./dist/sdk/index.d.ts", - "require": "./dist/sdk/index.js", - "import": "./dist/sdk/index.mjs" - }, - "./next": { - "types": "./dist/libraries/backend/next.d.ts", - "require": "./dist/libraries/backend/next.js", - "import": "./dist/libraries/backend/next.mjs" - }, - "./hono": { - "types": "./dist/libraries/backend/hono.d.ts", - "require": "./dist/libraries/backend/hono.js", - "import": "./dist/libraries/backend/hono.mjs" - }, - "./express": { - "types": "./dist/libraries/backend/express.d.ts", - "require": "./dist/libraries/backend/express.js", - "import": "./dist/libraries/backend/express.mjs" - }, - "./fastify": { - "types": "./dist/libraries/backend/fastify.d.ts", - "require": "./dist/libraries/backend/fastify.js", - "import": "./dist/libraries/backend/fastify.mjs" - }, - "./tanstack": { - "types": "./dist/libraries/backend/tanstack.d.ts", - "require": "./dist/libraries/backend/tanstack.js", - "import": "./dist/libraries/backend/tanstack.mjs" - }, - "./react": { - "types": "./dist/libraries/react/index.d.ts", - "require": "./dist/libraries/react/index.js", - "import": "./dist/libraries/react/index.mjs" - }, - "./supabase": { - "types": "./dist/libraries/backend/supabase.d.ts", - "require": "./dist/libraries/backend/supabase.js", - "import": "./dist/libraries/backend/supabase.mjs" - }, - "./react-router": { - "types": "./dist/libraries/backend/react-router.d.ts", - "require": "./dist/libraries/backend/react-router.js", - "import": "./dist/libraries/backend/react-router.mjs" - }, - "./better-auth": { - "types": "./dist/libraries/backend/better-auth.d.ts", - "require": "./dist/libraries/backend/better-auth.js", - "import": "./dist/libraries/backend/better-auth.mjs" - }, - "./convex": { - "types": "./dist/libraries/backend/convex.d.ts", - "require": "./dist/libraries/backend/convex.js", - "import": "./dist/libraries/backend/convex.mjs" - }, - "./elysia": { - "types": "./dist/libraries/backend/elysia.d.ts", - "require": "./dist/libraries/backend/elysia.js", - "import": "./dist/libraries/backend/elysia.mjs" - }, - "./backend": { - "types": "./dist/libraries/backend/index.d.ts", - "require": "./dist/libraries/backend/index.js", - "import": "./dist/libraries/backend/index.mjs" - } - }, - "keywords": [ - "pricing", - "autumn", - "js-sdk" - ], - "author": "John Yeo", - "license": "MIT", - "devDependencies": { - "@radix-ui/react-accordion": "^1.2.11", - "@radix-ui/react-dialog": "^1.1.14", - "@radix-ui/react-popover": "^1.1.14", - "@radix-ui/react-slot": "^1.2.3", - "@radix-ui/react-switch": "^1.2.5", - "@remix-run/node": "^2.16.6", - "@supabase/ssr": "^0.6.1", - "@tanstack/react-start": "^1.120.5", - "@types/express": "^5.0.1", - "@types/node": "^22.15.32", - "@types/react": "^19", - "autoprefixer": "^10.4.21", - "autumn-js": "^0.0.115", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "concurrently": "^9.2.0", - "convex": "^1.25.4", - "elysia": "^1.3.5", - "esbuild-plugin-path-alias": "^1.0.7", - "esbuild-postcss": "^0.0.4", - "express": "^5.1.0", - "fastify": "^5.3.3", - "hono": "^4.7.9", - "install": "^0.13.0", - "lucide-react": "^0.523.0", - "next": "^15.2.3", - "nodemon": "^3.1.10", - "postcss": "^8.5.6", - "postcss-nested": "^7.0.2", - "postcss-prefix-selector": "^2.1.1", - "react-dom": "^19.1.0", - "stripe": "^18.3.0", - "tailwind-merge": "^2.6.0", - "tailwindcss": "^3.4.1", - "tailwindcss-animate": "^1.0.7", - "tailwindcss-scoped-preflight": "^3.4.12", - "tsconfig-paths": "^4.2.0", - "tsup": "^8.4.0", - "tsx": "^4.19.3", - "typescript": "^5.8.3" - }, - "peerDependencies": { - "better-auth": "^1.3.17", - "better-call": "^1.0.12", - "convex": "^1.25.4" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "better-auth": { - "optional": true - }, - "better-call": { - "optional": true - }, - "convex": { - "optional": true - } - }, - "dependencies": { - "query-string": "^9.2.2", - "rou3": "^0.6.1", - "swr": "^2.3.3", - "zod": "^4.0.0" - }, - "typesVersions": { - "*": { - "backend": [ - "./dist/libraries/backend/index.d.ts" - ], - "next": [ - "./dist/libraries/backend/next.d.ts" - ], - "hono": [ - "./dist/libraries/backend/hono.d.ts" - ], - "express": [ - "./dist/libraries/backend/express.d.ts" - ], - "fastify": [ - "./dist/libraries/backend/fastify.d.ts" - ], - "tanstack": [ - "./dist/libraries/backend/tanstack.d.ts" - ], - "react": [ - "./dist/libraries/react/index.d.ts" - ], - "elysia": [ - "./dist/libraries/backend/elysia.d.ts" - ], - "supabase": [ - "./dist/libraries/backend/supabase.d.ts" - ] - } - } -} diff --git a/autumn-js/postcss.config.js b/autumn-js/postcss.config.js deleted file mode 100644 index e2dc4780..00000000 --- a/autumn-js/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - } -} \ No newline at end of file diff --git a/autumn-js/publish.sh b/autumn-js/publish.sh deleted file mode 100755 index 01a2c69e..00000000 --- a/autumn-js/publish.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -npm login -npm run build - -if [ "$1" = "--tag" ] && [ "$2" = "beta" ]; then - npm publish --tag beta -elif [ "$1" = "--major" ] && [ "$2" = "beta" ]; then - npm version premajor --preid=beta - npm publish --tag beta -elif [ "$1" = "--minor" ] && [ "$2" = "beta" ]; then - npm version preminor --preid=beta - npm publish --tag beta -elif [ "$1" = "--major" ]; then - npm version major - npm publish -elif [ "$1" = "--minor" ]; then - npm version minor - npm publish -elif [ "$1" = "--patch" ] && [ "$2" = "beta" ]; then - npm version prepatch --preid=beta - npm publish --tag beta -elif [ "$1" = "--patch" ]; then - npm version patch - npm publish -else - npm version patch - npm publish -fi \ No newline at end of file diff --git a/autumn-js/scripts/css-transform-plugin.js b/autumn-js/scripts/css-transform-plugin.js deleted file mode 100644 index 28272a3d..00000000 --- a/autumn-js/scripts/css-transform-plugin.js +++ /dev/null @@ -1,28 +0,0 @@ -import fs from 'fs'; -import path from 'path'; - -// esbuild plugin to transform CSS before injection -export function cssTransformPlugin() { - return { - name: 'css-transform', - setup(build) { - // Process CSS files before they get injected - build.onLoad({ filter: /\.css$/ }, async (args) => { - const cssContent = await fs.promises.readFile(args.path, 'utf8'); - - // Apply the same transformation as post-build.js - const transformedCss = cssContent.replace( - /(\*,\n::before,\n::after)/g, - '.au-root *,\n.au-root ::before,\n.au-root ::after' - ); - - console.log(`🎨 Transformed CSS: ${path.basename(args.path)}`); - - return { - contents: transformedCss, - loader: 'css' - }; - }); - } - }; -} \ No newline at end of file diff --git a/autumn-js/scripts/post-build.js b/autumn-js/scripts/post-build.js deleted file mode 100644 index fa42d1a6..00000000 --- a/autumn-js/scripts/post-build.js +++ /dev/null @@ -1,168 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -// Post-build processing: replace CSS selectors with .au-root prefix -function processCssFiles() { - const cssFiles = [ - path.join(__dirname, '../dist/styles/global.css'), - path.join(__dirname, '../dist/libraries/react/index.css') - ]; - - cssFiles.forEach(cssFilePath => { - if (fs.existsSync(cssFilePath)) { - console.log('📄 Processing CSS file:', cssFilePath); - - const builtCss = fs.readFileSync(cssFilePath, 'utf8'); - let updatedCss = builtCss.replace( - /(\*,\n::before,\n::after)/g, - '.au-root *,\n.au-root ::before,\n.au-root ::after' - ); - - // Also handle standalone * selectors (for custom base styles) - updatedCss = updatedCss.replace( - /^(\* \{[^}]*\})$/gm, - (match) => match.replace('* {', '.au-root * {') - ); - - // Handle body selector - updatedCss = updatedCss.replace( - /^(body \{[^}]*\})$/gm, - (match) => match.replace('body {', '.au-root body {') - ); - - // Handle ::backdrop selector - updatedCss = updatedCss.replace( - /^(::backdrop \{[^}]*\})$/gm, - (match) => match.replace('::backdrop {', '.au-root ::backdrop {') - ); - - // Handle :root selector - scope to .au-root as the root container - updatedCss = updatedCss.replace( - /^(:root \{[^}]*\})$/gm, - (match) => match.replace(':root {', '.au-root {') - ); - - // Handle .dark selector - support both .au-root.dark and .dark .au-root patterns - updatedCss = updatedCss.replace( - /^(\.dark \{[^}]*\})$/gm, - (match) => { - const content = match.replace('.dark {', '').replace(/^\s*\}$/, ''); - return `.au-root.dark {\n${content}\n}\n.dark .au-root {\n${content}\n}`; - } - ); - - fs.writeFileSync(cssFilePath, updatedCss); - console.log('✅ CSS selectors updated with .au-root prefix'); - } else { - console.log('⚠️ CSS file not found:', cssFilePath); - } - }); -} - -// Process injected CSS in JS files -function processInjectedCss() { - const reactDir = path.join(__dirname, '../dist/libraries/react'); - const files = fs.readdirSync(reactDir).filter(file => - file.endsWith('.js') || file.endsWith('.mjs') || file.endsWith('.cjs') - ); - - files.forEach(file => { - const filePath = path.join(reactDir, file); - const content = fs.readFileSync(filePath, 'utf8'); - - // Check if this file has styleInject and CSS content - if (content.includes('styleInject')) { - let updated = false; - let updatedContent = content; - - // Pattern 1: *,\n::before,\n::after (with newlines) - if (updatedContent.includes('*,\\n::before,\\n::after')) { - console.log('📄 Processing injected CSS pattern 1 in:', file); - updatedContent = updatedContent.replace( - /(\*,\\n::before,\\n::after)/g, - '.au-root *,\\n.au-root ::before,\\n.au-root ::after' - ); - updated = true; - } - - // Pattern 2: *,::before,::after (without newlines) - if (updatedContent.includes('*,::before,::after')) { - console.log('📄 Processing injected CSS pattern 2 in:', file); - updatedContent = updatedContent.replace( - /(\*,::before,::after)/g, - '.au-root *,.au-root ::before,.au-root ::after' - ); - updated = true; - } - - // Pattern 3: standalone * selector (for custom base styles) - // Check for both escaped and unescaped versions - if (updatedContent.includes('\\* {') || updatedContent.includes('* {')) { - console.log('📄 Processing standalone * selector in:', file); - // Handle escaped version - updatedContent = updatedContent.replace( - /(\\\* \{[^}]*\})/g, - (match) => match.replace('\\* {', '.au-root * {') - ); - // Handle unescaped version in JS strings - updatedContent = updatedContent.replace( - /(\* \{[^}]*\})/g, - (match) => match.replace('* {', '.au-root * {') - ); - updated = true; - } - - // Pattern 4: body selector - if (updatedContent.includes('body {')) { - console.log('📄 Processing body selector in:', file); - updatedContent = updatedContent.replace( - /(body \{[^}]*\})/g, - (match) => match.replace('body {', '.au-root body {') - ); - updated = true; - } - - // Pattern 5: ::backdrop selector - if (updatedContent.includes('::backdrop {')) { - console.log('📄 Processing ::backdrop selector in:', file); - updatedContent = updatedContent.replace( - /(::backdrop \{[^}]*\})/g, - (match) => match.replace('::backdrop {', '.au-root ::backdrop {') - ); - updated = true; - } - - // Pattern 6: :root selector - scope to .au-root as the root container - if (updatedContent.includes(':root {')) { - console.log('📄 Processing :root selector in:', file); - updatedContent = updatedContent.replace( - /(:root \{[^}]*\})/g, - (match) => match.replace(':root {', '.au-root {') - ); - updated = true; - } - - // Pattern 7: .dark selector - support both patterns - if (updatedContent.includes('.dark {')) { - console.log('📄 Processing .dark selector in:', file); - updatedContent = updatedContent.replace( - /(\.dark \{[^}]*\})/g, - (match) => { - const content = match.replace('.dark {', '').replace(/\}$/, ''); - return `.au-root.dark {${content}}.dark .au-root {${content}}`; - } - ); - updated = true; - } - - if (updated) { - fs.writeFileSync(filePath, updatedContent); - console.log('✅ Injected CSS selectors updated with .au-root prefix'); - } - } - }); -} - -// Run the processing -processCssFiles(); -processInjectedCss(); \ No newline at end of file diff --git a/autumn-js/scripts/sync-registry.ts b/autumn-js/scripts/sync-registry.ts deleted file mode 100644 index 1bfd6950..00000000 --- a/autumn-js/scripts/sync-registry.ts +++ /dev/null @@ -1,216 +0,0 @@ -#!/usr/bin/env tsx - -import fs from "fs/promises"; -import path from "path"; -import { watch } from "fs"; - -const UI_REGISTRY_PATH = "../ui/registry"; -const SYNCED_COMPONENTS_PATH = "./src/libraries/react/components"; - -interface ComponentConfig { - syncedName: string; - registryName: string; - dependencies?: string[]; -} - -const COMPONENTS: ComponentConfig[] = [ - { - syncedName: "checkout-dialog", - registryName: "checkout-dialog", - dependencies: ["checkout-content"], - }, - { - syncedName: "paywall-dialog", - registryName: "paywall-dialog", - dependencies: ["paywall-content"], - }, - { - syncedName: "pricing-table", - registryName: "pricing-table", - dependencies: ["pricing-table-content"], - }, -]; - -/** - * Remove 'au-' prefixes from Tailwind classes - */ -function removeAuPrefixes(content: string): string { - // Replace all occurrences of 'au-' with empty string in className attributes - return content.replace(/au-/g, ""); -} - -/** - * Transform imports from synced format to registry format - */ -function transformImportsToRegistry(content: string): string { - // Transform path aliases back to autumn-js imports - content = content.replace(/from ["']@\/index["']/g, 'from "autumn-js/react"'); - content = content.replace(/from ["']@sdk["']/g, 'from "autumn-js"'); - - // Transform relative lib imports to registry format (but NOT utils) - content = content.replace( - /from ["'].\/lib\/(?!utils)([^"']+)["']/g, - 'from "@/registry/$COMPONENT_NAME/lib/$1"' - ); - - // Transform synced component imports back to registry format - content = content.replace( - /from ["']..\/([^\/]+)\/\1-synced["']/g, - 'from "@/registry/$1/$1"' - ); - - // Remove loading styles import and replace with CSS classes - if (content.includes('from "@/utils/inject-styles"')) { - // Remove the import line - content = content.replace( - /import\s+{[^}]*loadingStyles[^}]*}\s+from\s+["']@\/utils\/inject-styles["'];?\s*\n/g, - "" - ); - - // Replace inline styles with CSS classes - content = content.replace( - /style={loadingStyles}/g, - 'className="w-full h-full flex justify-center items-center min-h-[300px]"' - ); - content = content.replace( - /style={spinnerStyles}/g, - 'className="w-6 h-6 text-zinc-400 animate-spin"' - ); - } - - // Keep @/lib/utils and @/components/ui imports as-is - - return content; -} - -/** - * Sync a single component from synced version to registry - */ -async function syncComponentToRegistry(config: ComponentConfig): Promise { - const syncedDir = path.join(SYNCED_COMPONENTS_PATH, config.syncedName); - const registryDir = path.join(UI_REGISTRY_PATH, config.registryName); - - try { - // Read the synced component file - const syncedFilePath = path.join( - syncedDir, - `${config.syncedName}-synced.tsx` - ); - const syncedContent = await fs.readFile(syncedFilePath, "utf-8"); - - // Transform content: remove au- prefixes and transform imports - let transformedContent = removeAuPrefixes(syncedContent); - transformedContent = transformImportsToRegistry(transformedContent); - - // Replace the placeholder with actual component name - transformedContent = transformedContent.replace( - /\$COMPONENT_NAME/g, - config.registryName - ); - - // Determine target path (handle subdirectory structure) - let targetFilePath = path.join(registryDir, `${config.registryName}.tsx`); - - // Check if registry uses subdirectory structure - const subDirPath = path.join( - registryDir, - config.registryName, - `${config.registryName}.tsx` - ); - try { - await fs.access(subDirPath); - targetFilePath = subDirPath; - } catch { - // Use direct path - } - - // Write the transformed content - await fs.writeFile(targetFilePath, transformedContent); - - // Sync lib dependencies if they exist - if (config.dependencies) { - const syncedLibDir = path.join(syncedDir, "lib"); - const registryLibDir = path.join(registryDir, "lib"); - - try { - for (const dep of config.dependencies) { - const syncedDepPath = path.join(syncedLibDir, `${dep}.tsx`); - const syncedDepContent = await fs.readFile(syncedDepPath, "utf-8"); - - // Transform the dependency content - let transformedDepContent = removeAuPrefixes(syncedDepContent); - transformedDepContent = transformImportsToRegistry( - transformedDepContent - ); - transformedDepContent = transformedDepContent.replace( - /\$COMPONENT_NAME/g, - config.registryName - ); - - await fs.writeFile( - path.join(registryLibDir, `${dep}.tsx`), - transformedDepContent - ); - } - } catch (error) { - console.warn(`No lib directory found for synced ${config.syncedName}`); - } - } - - console.log( - `✅ Synced ${config.syncedName} -> registry/${config.registryName}` - ); - } catch (error) { - console.error(`❌ Failed to sync ${config.syncedName}:`, error); - } -} - -/** - * Sync all components to registry - */ -async function syncAllToRegistry(): Promise { - console.log("🔄 Syncing components to registry..."); - - for (const component of COMPONENTS) { - await syncComponentToRegistry(component); - } - - console.log("🎉 Registry sync complete!"); -} - -/** - * Watch synced components for changes - */ -function watchSyncedComponents(): void { - console.log("👀 Watching synced components for changes..."); - - // Watch each component directory - COMPONENTS.forEach((config) => { - const componentDir = path.join(SYNCED_COMPONENTS_PATH, config.syncedName); - - watch(componentDir, { recursive: true }, (_: any, filename: any) => { - if (filename && filename.endsWith(".tsx")) { - console.log(`📝 Detected change in ${config.syncedName}: ${filename}`); - syncComponentToRegistry(config).catch(console.error); - } - }); - }); -} - -// CLI interface -const command = process.argv[2]; - -switch (command) { - case "sync": - syncAllToRegistry().catch(console.error); - break; - case "watch": - syncAllToRegistry() - .then(() => watchSyncedComponents()) - .catch(console.error); - break; - default: - console.log("Usage: tsx sync-registry.ts [sync|watch]"); - console.log(" sync - Sync synced components to registry"); - console.log(" watch - Sync and watch synced components for changes"); -} diff --git a/autumn-js/src/generated/css-content.ts b/autumn-js/src/generated/css-content.ts deleted file mode 100644 index 88ec2987..00000000 --- a/autumn-js/src/generated/css-content.ts +++ /dev/null @@ -1,1219 +0,0 @@ -// Auto-generated CSS content - do not edit manually -export const CSS_CONTENT = `/* src/styles/global.css */ -*:where(.au-root, .au-root *), -:where(.au-root, .au-root *)::before, -:where(.au-root, .au-root *)::after { - box-sizing: border-box; - border-width: 0; - border-style: solid; - border-color: #e5e7eb; -} -:where(.au-root, .au-root *)::before, -:where(.au-root, .au-root *)::after { - --tw-content: ""; -} -.au-root { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - font-family: - ui-sans-serif, - system-ui, - sans-serif, - "Apple Color Emoji", - "Segoe UI Emoji", - "Segoe UI Symbol", - "Noto Color Emoji"; - font-feature-settings: normal; - font-variation-settings: normal; - -webkit-tap-highlight-color: transparent; -} -.au-root { - margin: 0; - line-height: inherit; -} -hr:where(.au-root, .au-root *) { - height: 0; - color: inherit; - border-top-width: 1px; -} -abbr:where([title]):where(.au-root, .au-root *) { - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; -} -h1:where(.au-root, .au-root *), -h2:where(.au-root, .au-root *), -h3:where(.au-root, .au-root *), -h4:where(.au-root, .au-root *), -h5:where(.au-root, .au-root *), -h6:where(.au-root, .au-root *) { - font-size: inherit; - font-weight: inherit; -} -a:where(.au-root, .au-root *) { - color: inherit; - text-decoration: inherit; -} -b:where(.au-root, .au-root *), -strong:where(.au-root, .au-root *) { - font-weight: bolder; -} -code:where(.au-root, .au-root *), -kbd:where(.au-root, .au-root *), -samp:where(.au-root, .au-root *), -pre:where(.au-root, .au-root *) { - font-family: - ui-monospace, - SFMono-Regular, - Menlo, - Monaco, - Consolas, - "Liberation Mono", - "Courier New", - monospace; - font-feature-settings: normal; - font-variation-settings: normal; - font-size: 1em; -} -small:where(.au-root, .au-root *) { - font-size: 80%; -} -sub:where(.au-root, .au-root *), -sup:where(.au-root, .au-root *) { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} -sub:where(.au-root, .au-root *) { - bottom: -0.25em; -} -sup:where(.au-root, .au-root *) { - top: -0.5em; -} -table:where(.au-root, .au-root *) { - text-indent: 0; - border-color: inherit; - border-collapse: collapse; -} -button:where(.au-root, .au-root *), -input:where(.au-root, .au-root *), -optgroup:where(.au-root, .au-root *), -select:where(.au-root, .au-root *), -textarea:where(.au-root, .au-root *) { - font-family: inherit; - font-feature-settings: inherit; - font-variation-settings: inherit; - font-size: 100%; - font-weight: inherit; - line-height: inherit; - color: inherit; - margin: 0; - padding: 0; -} -button:where(.au-root, .au-root *), -select:where(.au-root, .au-root *) { - text-transform: none; -} -button:where(.au-root, .au-root *), -[type=button]:where(.au-root, .au-root *), -[type=reset]:where(.au-root, .au-root *), -[type=submit]:where(.au-root, .au-root *) { - -webkit-appearance: button; - background-color: transparent; - background-image: none; -} -:-moz-focusring:where(.au-root, .au-root *) { - outline: auto; -} -:-moz-ui-invalid:where(.au-root, .au-root *) { - box-shadow: none; -} -progress:where(.au-root, .au-root *) { - vertical-align: baseline; -} -:where(.au-root, .au-root *) ::-webkit-inner-spin-button, -:where(.au-root, .au-root *) ::-webkit-outer-spin-button { - height: auto; -} -[type=search]:where(.au-root, .au-root *) { - -webkit-appearance: textfield; - outline-offset: -2px; -} -:where(.au-root, .au-root *) ::-webkit-search-decoration { - -webkit-appearance: none; -} -:where(.au-root, .au-root *) ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; -} -summary:where(.au-root, .au-root *) { - display: list-item; -} -blockquote:where(.au-root, .au-root *), -dl:where(.au-root, .au-root *), -dd:where(.au-root, .au-root *), -h1:where(.au-root, .au-root *), -h2:where(.au-root, .au-root *), -h3:where(.au-root, .au-root *), -h4:where(.au-root, .au-root *), -h5:where(.au-root, .au-root *), -h6:where(.au-root, .au-root *), -hr:where(.au-root, .au-root *), -figure:where(.au-root, .au-root *), -p:where(.au-root, .au-root *), -pre:where(.au-root, .au-root *) { - margin: 0; -} -fieldset:where(.au-root, .au-root *) { - margin: 0; - padding: 0; -} -legend:where(.au-root, .au-root *) { - padding: 0; -} -ol:where(.au-root, .au-root *), -ul:where(.au-root, .au-root *), -menu:where(.au-root, .au-root *) { - list-style: none; - margin: 0; - padding: 0; -} -dialog:where(.au-root, .au-root *) { - padding: 0; -} -textarea:where(.au-root, .au-root *) { - resize: vertical; -} -:where(.au-root, .au-root *) input::-moz-placeholder, -:where(.au-root, .au-root *) textarea::-moz-placeholder { - opacity: 1; - color: #9ca3af; -} -:where(.au-root, .au-root *) input::placeholder, -:where(.au-root, .au-root *) textarea::placeholder { - opacity: 1; - color: #9ca3af; -} -button:where(.au-root, .au-root *), -[role=button]:where(.au-root, .au-root *) { - cursor: pointer; -} -:disabled:where(.au-root, .au-root *) { - cursor: default; -} -img:where(.au-root, .au-root *), -svg:where(.au-root, .au-root *), -video:where(.au-root, .au-root *), -canvas:where(.au-root, .au-root *), -audio:where(.au-root, .au-root *), -iframe:where(.au-root, .au-root *), -embed:where(.au-root, .au-root *), -object:where(.au-root, .au-root *) { - display: block; - vertical-align: middle; -} -img:where(.au-root, .au-root *), -video:where(.au-root, .au-root *) { - max-width: 100%; - height: auto; -} -[hidden]:where(.au-root, .au-root *) { - display: none; -} -.au-root *, -.au-root ::before, -.au-root ::after { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} -::backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} -.au-sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} -.au-pointer-events-none { - pointer-events: none; -} -.au-fixed { - position: fixed; -} -.au-absolute { - position: absolute; -} -.au-relative { - position: relative; -} -.au-inset-0 { - inset: 0px; -} -.au-left-\\[50\\%\\] { - left: 50%; -} -.au-right-4 { - right: 1rem; -} -.au-right-\\[-1px\\] { - right: -1px; -} -.au-top-4 { - top: 1rem; -} -.au-top-\\[-1px\\] { - top: -1px; -} -.au-top-\\[50\\%\\] { - top: 50%; -} -.au-z-50 { - z-index: 50; -} -.au-my-2 { - margin-top: 0.5rem; - margin-bottom: 0.5rem; -} -.au-mb-1 { - margin-bottom: 0.25rem; -} -.au-mb-2 { - margin-bottom: 0.5rem; -} -.au-mb-4 { - margin-bottom: 1rem; -} -.au-mb-6 { - margin-bottom: 1.5rem; -} -.au-mb-8 { - margin-bottom: 2rem; -} -.au-mr-2 { - margin-right: 0.5rem; -} -.au-mt-0 { - margin-top: 0px; -} -.au-mt-0\\.5 { - margin-top: 0.125rem; -} -.au-mt-1 { - margin-top: 0.25rem; -} -.au-mt-2 { - margin-top: 0.5rem; -} -.au-mt-4 { - margin-top: 1rem; -} -.au-line-clamp-2 { - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; -} -.au-block { - display: block; -} -.au-flex { - display: flex; -} -.au-inline-flex { - display: inline-flex; -} -.au-grid { - display: grid; -} -.\\!au-h-3 { - height: 0.75rem !important; -} -.au-h-10 { - height: 2.5rem; -} -.au-h-16 { - height: 4rem; -} -.au-h-4 { - height: 1rem; -} -.au-h-5 { - height: 1.25rem; -} -.au-h-6 { - height: 1.5rem; -} -.au-h-8 { - height: 2rem; -} -.au-h-9 { - height: 2.25rem; -} -.au-h-full { - height: 100%; -} -.au-min-h-\\[300px\\] { - min-height: 300px; -} -.au-w-4 { - width: 1rem; -} -.au-w-6 { - width: 1.5rem; -} -.au-w-8 { - width: 2rem; -} -.au-w-9 { - width: 2.25rem; -} -.au-w-full { - width: 100%; -} -.au-min-w-16 { - min-width: 4rem; -} -.au-min-w-20 { - min-width: 5rem; -} -.au-max-w-lg { - max-width: 32rem; -} -.au-max-w-xl { - max-width: 36rem; -} -.au-flex-1 { - flex: 1 1 0%; -} -.au-flex-shrink-0 { - flex-shrink: 0; -} -.au-shrink-0 { - flex-shrink: 0; -} -.au-flex-grow { - flex-grow: 1; -} -.au-translate-x-\\[-50\\%\\] { - --tw-translate-x: -50%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} -.au-translate-y-\\[-50\\%\\] { - --tw-translate-y: -50%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} -.au-translate-y-\\[130\\%\\] { - --tw-translate-y: 130%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} -@keyframes au-spin { - to { - transform: rotate(360deg); - } -} -.au-animate-spin { - animation: au-spin 1s linear infinite; -} -.au-cursor-pointer { - cursor: pointer; -} -.au-grid-cols-1 { - grid-template-columns: repeat(1, minmax(0, 1fr)); -} -.au-flex-row { - flex-direction: row; -} -.au-flex-col { - flex-direction: column; -} -.au-flex-col-reverse { - flex-direction: column-reverse; -} -.au-items-start { - align-items: flex-start; -} -.au-items-center { - align-items: center; -} -.au-justify-center { - justify-content: center; -} -.au-justify-between { - justify-content: space-between; -} -.au-gap-0 { - gap: 0px; -} -.au-gap-1 { - gap: 0.25rem; -} -.au-gap-2 { - gap: 0.5rem; -} -.au-gap-4 { - gap: 1rem; -} -.au-gap-x-4 { - -moz-column-gap: 1rem; - column-gap: 1rem; -} -.au-space-x-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(0.5rem * var(--tw-space-x-reverse)); - margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); -} -.au-space-y-1 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); -} -.au-space-y-1\\.5 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.375rem * var(--tw-space-y-reverse)); -} -.au-space-y-3 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); -} -.au-overflow-hidden { - overflow: hidden; -} -.au-truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.au-whitespace-nowrap { - white-space: nowrap; -} -.au-rounded-full { - border-radius: 9999px; -} -.au-rounded-lg { - border-radius: var(--au-radius); -} -.au-rounded-md { - border-radius: calc(var(--au-radius) - 2px); -} -.au-rounded-sm { - border-radius: calc(var(--au-radius) - 4px); -} -.au-rounded-bl-lg { - border-bottom-left-radius: var(--au-radius); -} -.au-border { - border-width: 1px; -} -.au-border-2 { - border-width: 2px; -} -.au-border-y { - border-top-width: 1px; - border-bottom-width: 1px; -} -.au-border-t { - border-top-width: 1px; -} -.au-border-input { - border-color: hsl(var(--au-input)); -} -.au-border-transparent { - border-color: transparent; -} -.au-bg-background { - background-color: hsl(var(--au-background)); -} -.au-bg-black\\/80 { - background-color: rgb(0 0 0 / 0.8); -} -.au-bg-destructive { - background-color: hsl(var(--au-destructive)); -} -.au-bg-primary { - background-color: hsl(var(--au-primary)); -} -.au-bg-secondary { - background-color: hsl(var(--au-secondary)); -} -.au-bg-secondary\\/40 { - background-color: hsl(var(--au-secondary) / 0.4); -} -.au-p-0 { - padding: 0px; -} -.au-p-6 { - padding: 1.5rem; -} -.\\!au-py-10 { - padding-top: 2.5rem !important; - padding-bottom: 2.5rem !important; -} -.au-px-3 { - padding-left: 0.75rem; - padding-right: 0.75rem; -} -.au-px-4 { - padding-left: 1rem; - padding-right: 1rem; -} -.au-px-6 { - padding-left: 1.5rem; - padding-right: 1.5rem; -} -.au-px-8 { - padding-left: 2rem; - padding-right: 2rem; -} -.au-py-2 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} -.au-py-3 { - padding-top: 0.75rem; - padding-bottom: 0.75rem; -} -.au-py-6 { - padding-top: 1.5rem; - padding-bottom: 1.5rem; -} -.au-pb-0 { - padding-bottom: 0px; -} -.au-pb-0\\.5 { - padding-bottom: 0.125rem; -} -.au-pb-4 { - padding-bottom: 1rem; -} -.au-pl-6 { - padding-left: 1.5rem; -} -.au-pr-3 { - padding-right: 0.75rem; -} -.au-pt-4 { - padding-top: 1rem; -} -.au-text-center { - text-align: center; -} -.au-text-2xl { - font-size: 1.5rem; - line-height: 2rem; -} -.au-text-lg { - font-size: 1.125rem; - line-height: 1.75rem; -} -.au-text-sm { - font-size: 0.875rem; - line-height: 1.25rem; -} -.au-text-xl { - font-size: 1.25rem; - line-height: 1.75rem; -} -.au-text-xs { - font-size: 0.75rem; - line-height: 1rem; -} -.au-font-bold { - font-weight: 700; -} -.au-font-medium { - font-weight: 500; -} -.au-font-normal { - font-weight: 400; -} -.au-font-semibold { - font-weight: 600; -} -.au-leading-none { - line-height: 1; -} -.au-tracking-tight { - letter-spacing: -0.025em; -} -.au-text-destructive-foreground { - color: hsl(var(--au-destructive-foreground)); -} -.au-text-foreground { - color: hsl(var(--au-foreground)); -} -.au-text-muted-foreground { - color: hsl(var(--au-muted-foreground)); -} -.au-text-primary { - color: hsl(var(--au-primary)); -} -.au-text-primary-foreground { - color: hsl(var(--au-primary-foreground)); -} -.au-text-secondary-foreground { - color: hsl(var(--au-secondary-foreground)); -} -.au-text-zinc-400 { - --tw-text-opacity: 1; - color: rgb(161 161 170 / var(--tw-text-opacity)); -} -.au-underline-offset-4 { - text-underline-offset: 4px; -} -.au-opacity-70 { - opacity: 0.7; -} -.au-shadow { - --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.au-shadow-inner { - --tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); - --tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.au-shadow-lg { - --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.au-shadow-sm { - --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); - --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.au-shadow-stone-400 { - --tw-shadow-color: #a8a29e; - --tw-shadow: var(--tw-shadow-colored); -} -.au-ring-0 { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: - var(--tw-ring-offset-shadow), - var(--tw-ring-shadow), - var(--tw-shadow, 0 0 #0000); -} -.au-ring-offset-background { - --tw-ring-offset-color: hsl(var(--au-background)); -} -.au-transition { - transition-property: - color, - background-color, - border-color, - text-decoration-color, - fill, - stroke, - opacity, - box-shadow, - transform, - filter, - -webkit-backdrop-filter; - transition-property: - color, - background-color, - border-color, - text-decoration-color, - fill, - stroke, - opacity, - box-shadow, - transform, - filter, - backdrop-filter; - transition-property: - color, - background-color, - border-color, - text-decoration-color, - fill, - stroke, - opacity, - box-shadow, - transform, - filter, - backdrop-filter, - -webkit-backdrop-filter; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} -.au-transition-all { - transition-property: all; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} -.au-transition-colors { - transition-property: - color, - background-color, - border-color, - text-decoration-color, - fill, - stroke; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} -.au-transition-opacity { - transition-property: opacity; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} -.au-transition-transform { - transition-property: transform; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} -.au-duration-200 { - transition-duration: 200ms; -} -.au-duration-300 { - transition-duration: 300ms; -} -@keyframes enter { - from { - opacity: var(--tw-enter-opacity, 1); - transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0)); - } -} -@keyframes exit { - to { - opacity: var(--tw-exit-opacity, 1); - transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0)); - } -} -.au-duration-200 { - animation-duration: 200ms; -} -.au-duration-300 { - animation-duration: 300ms; -} -:root { - --au-background: 0 0% 100%; - --au-foreground: 240 10% 3.9%; - --au-card: 0 0% 100%; - --au-card-foreground: 240 10% 3.9%; - --au-popover: 0 0% 100%; - --au-popover-foreground: 240 10% 3.9%; - --au-primary: 240 5.9% 10%; - --au-primary-foreground: 0 0% 98%; - --au-secondary: 240 4.8% 95.9%; - --au-secondary-foreground: 240 5.9% 10%; - --au-muted: 240 4.8% 95.9%; - --au-muted-foreground: 240 3.8% 46.1%; - --au-accent: 240 4.8% 95.9%; - --au-accent-foreground: 240 5.9% 10%; - --au-destructive: 0 84.2% 60.2%; - --au-destructive-foreground: 0 0% 98%; - --au-border: 240 5.9% 90%; - --au-input: 240 5.9% 90%; - --au-ring: 240 10% 3.9%; - --au-chart-1: 12 76% 61%; - --au-chart-2: 173 58% 39%; - --au-chart-3: 197 37% 24%; - --au-chart-4: 43 74% 66%; - --au-chart-5: 27 87% 67%; - --au-radius: 0.5rem; - --au-sidebar-background: 0 0% 98%; - --au-sidebar-foreground: 240 5.3% 26.1%; - --au-sidebar-primary: 240 5.9% 10%; - --au-sidebar-primary-foreground: 0 0% 98%; - --au-sidebar-accent: 240 4.8% 95.9%; - --au-sidebar-accent-foreground: 240 5.9% 10%; - --au-sidebar-border: 220 13% 91%; - --au-sidebar-ring: 217.2 91.2% 59.8%; -} -.dark { - --au-background: 240 10% 3.9%; - --au-foreground: 0 0% 98%; - --au-card: 240 10% 3.9%; - --au-card-foreground: 0 0% 98%; - --au-popover: 240 10% 3.9%; - --au-popover-foreground: 0 0% 98%; - --au-primary: 0 0% 98%; - --au-primary-foreground: 240 5.9% 10%; - --au-secondary: 240 3.7% 15.9%; - --au-secondary-foreground: 0 0% 98%; - --au-muted: 240 3.7% 15.9%; - --au-muted-foreground: 240 5% 64.9%; - --au-accent: 240 3.7% 15.9%; - --au-accent-foreground: 0 0% 98%; - --au-destructive: 0 62.8% 30.6%; - --au-destructive-foreground: 0 0% 98%; - --au-border: 240 3.7% 15.9%; - --au-input: 240 3.7% 15.9%; - --au-ring: 240 4.9% 83.9%; - --au-chart-1: 220 70% 50%; - --au-chart-2: 160 60% 45%; - --au-chart-3: 30 80% 55%; - --au-chart-4: 280 65% 60%; - --au-chart-5: 340 75% 55%; - --au-sidebar-background: 240 5.9% 10%; - --au-sidebar-foreground: 240 4.8% 95.9%; - --au-sidebar-primary: 224.3 76.3% 48%; - --au-sidebar-primary-foreground: 0 0% 100%; - --au-sidebar-accent: 240 3.7% 15.9%; - --au-sidebar-accent-foreground: 240 4.8% 95.9%; - --au-sidebar-border: 240 3.7% 15.9%; - --au-sidebar-ring: 217.2 91.2% 59.8%; -} -.hover\\:au-bg-accent:hover { - background-color: hsl(var(--au-accent)); -} -.hover\\:au-bg-destructive\\/90:hover { - background-color: hsl(var(--au-destructive) / 0.9); -} -.hover\\:au-bg-primary\\/90:hover { - background-color: hsl(var(--au-primary) / 0.9); -} -.hover\\:au-bg-secondary\\/80:hover { - background-color: hsl(var(--au-secondary) / 0.8); -} -.hover\\:au-text-accent-foreground:hover { - color: hsl(var(--au-accent-foreground)); -} -.hover\\:au-underline:hover { - text-decoration-line: underline; -} -.hover\\:au-opacity-100:hover { - opacity: 1; -} -.hover\\:au-brightness-90:hover { - --tw-brightness: brightness(.9); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); -} -.focus\\:au-outline-none:focus { - outline: 2px solid transparent; - outline-offset: 2px; -} -.focus\\:au-ring-2:focus { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: - var(--tw-ring-offset-shadow), - var(--tw-ring-shadow), - var(--tw-shadow, 0 0 #0000); -} -.focus\\:au-ring-ring:focus { - --tw-ring-color: hsl(var(--au-ring)); -} -.focus\\:au-ring-offset-2:focus { - --tw-ring-offset-width: 2px; -} -.focus-visible\\:au-outline-none:focus-visible { - outline: 2px solid transparent; - outline-offset: 2px; -} -.focus-visible\\:au-ring-1:focus-visible { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: - var(--tw-ring-offset-shadow), - var(--tw-ring-shadow), - var(--tw-shadow, 0 0 #0000); -} -.focus-visible\\:au-ring-2:focus-visible { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: - var(--tw-ring-offset-shadow), - var(--tw-ring-shadow), - var(--tw-shadow, 0 0 #0000); -} -.focus-visible\\:au-ring-ring:focus-visible { - --tw-ring-color: hsl(var(--au-ring)); -} -.focus-visible\\:au-ring-offset-2:focus-visible { - --tw-ring-offset-width: 2px; -} -.focus-visible\\:au-ring-offset-background:focus-visible { - --tw-ring-offset-color: hsl(var(--au-background)); -} -.disabled\\:au-pointer-events-none:disabled { - pointer-events: none; -} -.disabled\\:au-opacity-50:disabled { - opacity: 0.5; -} -.au-group:hover .group-hover\\:au-mt-0 { - margin-top: 0px; -} -.au-group:hover .group-hover\\:au-translate-y-0 { - --tw-translate-y: 0px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} -.au-group:hover .group-hover\\:au-translate-y-\\[-130\\%\\] { - --tw-translate-y: -130%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} -.data-\\[state\\=checked\\]\\:au-translate-x-4[data-state=checked] { - --tw-translate-x: 1rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} -.data-\\[state\\=unchecked\\]\\:au-translate-x-0[data-state=unchecked] { - --tw-translate-x: 0px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} -.data-\\[state\\=checked\\]\\:au-bg-primary[data-state=checked] { - background-color: hsl(var(--au-primary)); -} -.data-\\[state\\=open\\]\\:au-bg-accent[data-state=open] { - background-color: hsl(var(--au-accent)); -} -.data-\\[state\\=unchecked\\]\\:au-bg-input[data-state=unchecked] { - background-color: hsl(var(--au-input)); -} -.data-\\[state\\=open\\]\\:au-text-muted-foreground[data-state=open] { - color: hsl(var(--au-muted-foreground)); -} -.data-\\[state\\=open\\]\\:au-animate-in[data-state=open] { - animation-name: enter; - animation-duration: 150ms; - --tw-enter-opacity: initial; - --tw-enter-scale: initial; - --tw-enter-rotate: initial; - --tw-enter-translate-x: initial; - --tw-enter-translate-y: initial; -} -.data-\\[state\\=closed\\]\\:au-animate-out[data-state=closed] { - animation-name: exit; - animation-duration: 150ms; - --tw-exit-opacity: initial; - --tw-exit-scale: initial; - --tw-exit-rotate: initial; - --tw-exit-translate-x: initial; - --tw-exit-translate-y: initial; -} -.data-\\[state\\=closed\\]\\:au-fade-out-0[data-state=closed] { - --tw-exit-opacity: 0; -} -.data-\\[state\\=open\\]\\:au-fade-in-0[data-state=open] { - --tw-enter-opacity: 0; -} -.data-\\[state\\=closed\\]\\:au-zoom-out-95[data-state=closed] { - --tw-exit-scale: .95; -} -.data-\\[state\\=open\\]\\:au-zoom-in-95[data-state=open] { - --tw-enter-scale: .95; -} -.data-\\[state\\=closed\\]\\:au-slide-out-to-left-1\\/2[data-state=closed] { - --tw-exit-translate-x: -50%; -} -.data-\\[state\\=closed\\]\\:au-slide-out-to-top-\\[48\\%\\][data-state=closed] { - --tw-exit-translate-y: -48%; -} -.data-\\[state\\=open\\]\\:au-slide-in-from-left-1\\/2[data-state=open] { - --tw-enter-translate-x: -50%; -} -.data-\\[state\\=open\\]\\:au-slide-in-from-top-\\[48\\%\\][data-state=open] { - --tw-enter-translate-y: -48%; -} -:is(.au-dark .dark\\:au-shadow-zinc-800\\/80) { - --tw-shadow-color: rgb(39 39 42 / 0.8); - --tw-shadow: var(--tw-shadow-colored); -} -@media (min-width: 640px) { - .sm\\:au-h-7 { - height: 1.75rem; - } - .sm\\:au-grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - .sm\\:au-flex-row { - flex-direction: row; - } - .sm\\:au-items-center { - align-items: center; - } - .sm\\:au-justify-end { - justify-content: flex-end; - } - .sm\\:au-gap-2 { - gap: 0.5rem; - } - .sm\\:au-space-x-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(0.5rem * var(--tw-space-x-reverse)); - margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); - } - .sm\\:au-rounded-lg { - border-radius: var(--au-radius); - } - .sm\\:au-pb-0 { - padding-bottom: 0px; - } - .sm\\:au-text-left { - text-align: left; - } -} -@media (min-width: 1024px) { - .lg\\:au-right-4 { - right: 1rem; - } - .lg\\:au-top-4 { - top: 1rem; - } - .lg\\:au-h-\\[calc\\(100\\%\\+48px\\)\\] { - height: calc(100% + 48px); - } - .lg\\:au--translate-y-12 { - --tw-translate-y: -3rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - .lg\\:au--translate-y-6 { - --tw-translate-y: -1.5rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - .lg\\:au-translate-y-6 { - --tw-translate-y: 1.5rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - .lg\\:au-grid-cols-\\[repeat\\(auto-fit\\,minmax\\(200px\\,1fr\\)\\)\\] { - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); - } - .lg\\:au-rounded-full { - border-radius: 9999px; - } - .lg\\:au-py-0 { - padding-top: 0px; - padding-bottom: 0px; - } - .lg\\:au-py-0\\.5 { - padding-top: 0.125rem; - padding-bottom: 0.125rem; - } - .lg\\:au-shadow-lg { - --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); - } -} -.\\[\\&_svg\\]\\:au-pointer-events-none svg { - pointer-events: none; -} -.\\[\\&_svg\\]\\:au-size-4 svg { - width: 1rem; - height: 1rem; -} -.\\[\\&_svg\\]\\:au-shrink-0 svg { - flex-shrink: 0; -} -`; diff --git a/autumn-js/src/libraries/backend/better-auth.ts b/autumn-js/src/libraries/backend/better-auth.ts deleted file mode 100644 index bae484be..00000000 --- a/autumn-js/src/libraries/backend/better-auth.ts +++ /dev/null @@ -1,304 +0,0 @@ -import { Autumn } from "@sdk"; -import type { - AuthContext, - BetterAuthPlugin, - EndpointContext, -} from "better-auth"; -import { getSessionFromCtx } from "better-auth/api"; -import { createAuthEndpoint } from "better-auth/plugins"; -import { - APIError, - createEndpoint, - type EndpointOptions, - type Status, -} from "better-call"; -import { findRoute } from "rou3"; -import { z } from "zod/v4"; -import { - AttachParamsSchema, - BillingPortalParamsSchema, - CancelParamsSchema, - CheckoutParamsSchema, - CheckParamsSchema, - EntityCreateParamsSchema, - ReferralCreateCodeParamsSchema, - ReferralRedeemCodeParamsSchema, -} from "@/clientTypes"; - -import { createRouterWithOptions } from "./routes/backendRouter"; -import { - getIdentityContext, - getOrganizationContext, - scopeContainsOrg, -} from "./utils/betterAuth/middlewares"; -import type { AutumnOptions } from "./utils/betterAuth/types"; -import { secretKeyCheck } from "./utils/secretKeyCheck"; - -const router = createRouterWithOptions(); - -const betterAuthPathMap: Record = { - // "create-customer": "customers", - // "customers/get": "customers", - checkout: "checkout", - attach: "attach", - check: "check", - track: "track", - cancel: "cancel", - "referrals/redeem-code": "referrals/redeem", - "referrals/create-code": "referrals/code", - "open-billing-portal": "billing_portal", - // "products/list": "products", -}; - -const handleReq = async ({ - ctx, - options, - method, -}: { - ctx: EndpointContext; - options?: AutumnOptions; - method: string; -}) => { - const { found, error: resError } = secretKeyCheck(); - - if (!found && !options?.secretKey) { - throw new APIError((resError?.statusCode as Status) ?? "BAD_REQUEST", { - message: resError?.message ?? "Unknown error", - code: resError?.code ?? "unknown_error", - }); - } - - const client = new Autumn({ - baseURL: options?.baseURL, - secretKey: options?.secretKey, - }); - - let searchParams: Record = {}; - try { - const req = ctx.request as Request; - const url = new URL(req.url); - searchParams = Object.fromEntries(url.searchParams); - } catch (_) {} - - const rest = ctx.path.split("/autumn/")[1]; - const pathname = `/api/autumn/${betterAuthPathMap[rest] || rest}`; - - const match = findRoute(router, method, pathname); - - if (!match) return ctx.json({ error: "Not found" }, { status: 404 }); - - const { data } = match; - const { handler } = data; - - const body = ctx.body; - const params = ctx.params; - let identify: unknown; - - // Get organization context (works for both auth and non-auth endpoints) - const orgContext = await getOrganizationContext(ctx, options); - const finalSession = await getSessionFromCtx(ctx as any); - - // Get identity context if needed - let identity = null; - if (options?.identify) { - identity = await getIdentityContext({ - orgContext, - options, - session: finalSession, - }); - } - - if (options?.identify) { - identify = () => identity; - } else { - identify = () => { - if (!finalSession) return; - - if (scopeContainsOrg({ options })) { - if (orgContext.activeOrganization?.id) { - return { - customerId: orgContext.activeOrganization?.id, - customerData: { - email: orgContext.activeOrganizationEmail, - name: orgContext.activeOrganization?.name ?? "", - }, - }; - } else { - // 1. If both, return user - if (options?.customerScope === "user_and_organization") { - return { - customerId: (finalSession as any).user.id, - customerData: { - email: (finalSession as any).user.email, - name: (finalSession as any).user.name, - }, - }; - } else return null; - } - } else { - return { - customerId: (finalSession as any).user.id, - customerData: { - email: (finalSession as any).user.email, - name: (finalSession as any).user.name, - }, - }; - } - }; - } - - const result = await handler({ - autumn: client, - body: body, - path: pathname, - getCustomer: identify, - pathParams: params, - searchParams, - }); - - if (result.statusCode >= 400) { - throw new APIError(result.statusCode, { - message: result.body.message ?? "Unknown error", - code: result.body.code ?? "unknown_error", - }); - } - - return ctx.json(result.body, { status: result.statusCode }); -}; - -export const autumn = (options?: AutumnOptions) => { - return { - id: "autumn", - endpoints: { - createCustomer: createEndpoint( - "/autumn/customers", - { - method: "POST", - use: [], - body: z.object({ - errorOnNotFound: z.boolean().optional(), - expand: z.array(z.string()).optional(), - }), - metadata: { - isAction: false, - }, - }, - async (ctx) => await handleReq({ ctx, options, method: "POST" }), - ), - listProducts: createAuthEndpoint( - "/autumn/products", - { - method: "GET", - use: [], - }, - async (ctx) => await handleReq({ ctx, options, method: "GET" }), - ), - checkout: createAuthEndpoint( - "/autumn/checkout", - { - method: "POST", - use: [], - body: CheckoutParamsSchema, - }, - async (ctx) => { - console.log("Body: ", ctx.body); - return await handleReq({ ctx, options, method: "POST" }); - }, - ), - attach: createAuthEndpoint( - "/autumn/attach", - { - method: "POST", - use: [], - body: AttachParamsSchema, - }, - async (ctx) => await handleReq({ ctx, options, method: "POST" }), - ), - check: createAuthEndpoint( - "/autumn/check", - { - method: "POST", - use: [], - body: CheckParamsSchema, - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "POST" }); - }, - ), - cancel: createAuthEndpoint( - "/autumn/cancel", - { - method: "POST", - use: [], - body: CancelParamsSchema, - }, - async (ctx) => await handleReq({ ctx, options, method: "POST" }), - ), - createReferralCode: createAuthEndpoint( - "/autumn/referrals/code", - { - method: "POST", - use: [], - body: ReferralCreateCodeParamsSchema, - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "POST" }); - }, - ), - redeemReferralCode: createAuthEndpoint( - "/autumn/referrals/redeem", - { - method: "POST", - use: [], - body: ReferralRedeemCodeParamsSchema, - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "POST" }); - }, - ), - billingPortal: createAuthEndpoint( - "/autumn/billing_portal", - { - method: "POST", - use: [], - body: BillingPortalParamsSchema, - metadata: { - isAction: false, - }, - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "POST" }); - }, - ), - createEntity: createAuthEndpoint( - "/autumn/entities", - { - method: "POST", - use: [], - body: EntityCreateParamsSchema, - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "POST" }); - }, - ), - getEntity: createAuthEndpoint( - "/autumn/entities/:entityId", - { - method: "GET", - use: [], - }, - async (ctx) => { - return await handleReq({ ctx, options, method: "GET" }); - }, - ), - deleteEntity: createAuthEndpoint( - "/autumn/entities/:entityId", - { - method: "DELETE", - use: [], - }, - async (ctx) => await handleReq({ ctx, options, method: "DELETE" }), - ), - }, - } satisfies BetterAuthPlugin; -}; diff --git a/autumn-js/src/libraries/backend/constants.ts b/autumn-js/src/libraries/backend/constants.ts deleted file mode 100644 index be0f3cea..00000000 --- a/autumn-js/src/libraries/backend/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -// export const autumnApiUrl = "http://localhost:8080/v1"; -export const autumnApiUrl = "https://api.useautumn.com/v1"; -export const BASE_PATH = "/api/autumn"; diff --git a/autumn-js/src/libraries/backend/elysia.ts b/autumn-js/src/libraries/backend/elysia.ts deleted file mode 100644 index 75369c7f..00000000 --- a/autumn-js/src/libraries/backend/elysia.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { findRoute } from "rou3"; -import { Autumn } from "@sdk"; -import { createRouterWithOptions } from "./routes/backendRouter"; -import { AuthResult } from "./utils/AuthFunction"; -import { autumnApiUrl } from "./constants"; -import { secretKeyCheck } from "./utils/secretKeyCheck"; -import type { Elysia } from "elysia"; -import { toSnakeCase } from "@utils/toSnakeCase"; - -export function autumnHandler(options: { - identify: (context: any) => AuthResult | Promise; - apiVersion?: string; - secretKey?: string; - baseURL?: string; -}) { - const { found, error: resError } = secretKeyCheck(options.secretKey); - if (!found && !options.secretKey) { - throw new Error(resError?.message || "Secret key check failed"); - } - - const router = createRouterWithOptions(); - - return function plugin(app: Elysia) { - // Handle GET/DELETE requests (no body parsing) - app.get("/api/autumn/*", async (context: any) => { - return handleRequest(context); - }); - - app.delete("/api/autumn/*", async (context: any) => { - return handleRequest(context); - }); - - // Handle POST/PUT/PATCH requests (with body parsing) - app.post("/api/autumn/*", async (context: any) => { - return handleRequest(context); - }); - - app.put("/api/autumn/*", async (context: any) => { - return handleRequest(context); - }); - - app.patch("/api/autumn/*", async (context: any) => { - return handleRequest(context); - }); - - async function handleRequest(context: any) { - let { found, error: resError } = secretKeyCheck(options.secretKey); - if (!found) { - context.set.status = resError!.statusCode; - return resError; - } - - const autumn = new Autumn({ - baseURL: options.baseURL || autumnApiUrl, - apiVersion: options.apiVersion, - secretKey: options.secretKey, - }); - - const request = context.request; - const url = new URL(request.url); - const path = url.pathname; - const searchParams = Object.fromEntries(url.searchParams); - const method = request.method; - - const match = findRoute(router, method, path); - - if (!match) { - context.set.status = 404; - return { error: "Not found" }; - } - - const { data, params: pathParams } = match; - const { handler } = data; - - let body = null; - if (["POST", "PUT", "PATCH"].includes(method)) { - try { - body = context.body; - } catch (error) { - body = null; - } - } - - try { - const result = await handler({ - autumn, - body: toSnakeCase({ obj: body }), - path, - getCustomer: async () => await options.identify(context), - pathParams, - searchParams, - }); - - context.set.status = result.statusCode; - return result.body; - } catch (error: any) { - context.set.status = 500; - return { - error: "Internal server error", - message: error?.message || "Unknown error", - }; - } - } - - return app; - }; -} diff --git a/autumn-js/src/libraries/backend/express.ts b/autumn-js/src/libraries/backend/express.ts deleted file mode 100644 index 6198fd21..00000000 --- a/autumn-js/src/libraries/backend/express.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { findRoute } from "rou3"; -import { Autumn } from "@sdk"; -import { createRouterWithOptions } from "./routes/backendRouter"; -import { AuthResult } from "./utils/AuthFunction"; -import { autumnApiUrl } from "./constants"; -import { secretKeyCheck } from "./utils/secretKeyCheck"; - -// Define middleware types -export type AutumnRequestHandler = (req: any, res: any, next: any) => void; - -export type AutumnHandlerOptions = { - identify: (req: any, res: any) => AuthResult; - version?: string; - secretKey?: string; - baseURL?: string; - autumn?: (req: any) => Autumn | Autumn; -}; - -export const autumnHandler = ( - options?: AutumnHandlerOptions -): AutumnRequestHandler => { - const router = createRouterWithOptions(); - - let { found, error: resError } = secretKeyCheck(options?.secretKey); - - return async (req: any, res: any, next: any) => { - if (!found && !options?.secretKey) { - return res.status(resError!.statusCode).json(resError); - } - - let autumn = - typeof options?.autumn === "function" - ? options.autumn(req) - : options?.autumn || - new Autumn({ - baseURL: options?.baseURL || autumnApiUrl, - apiVersion: options?.version, - }); - - let path = req.path; - const searchParams = Object.fromEntries(new URLSearchParams(req.query)); - - if (!path.startsWith("/api/autumn")) { - path = "/api/autumn" + path; - } - - const match = findRoute(router, req.method, path); - - if (match) { - const { data, params: pathParams } = match; - const { handler } = data; - - let body = null; - if (req.method === "POST") { - try { - body = req.body; - } catch (error) {} - } - - try { - let result = await handler({ - autumn, - body, - path: req.path, - getCustomer: async () => { - return await options?.identify(req, res); - }, - pathParams, - searchParams, - }); - - return res.status(result.statusCode).json(result.body); - } catch (error) { - console.error("Error handling Autumn request:", error); - return res.status(500).json({ error: "Internal server error" }); - } - } - - next(); - }; -}; diff --git a/autumn-js/src/libraries/backend/fastify.ts b/autumn-js/src/libraries/backend/fastify.ts deleted file mode 100644 index 78737f74..00000000 --- a/autumn-js/src/libraries/backend/fastify.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { findRoute } from "rou3"; -import { Autumn } from "@sdk"; -import { createRouterWithOptions } from "./routes/backendRouter"; -import { AuthResult } from "./utils/AuthFunction"; -import { autumnApiUrl } from "./constants"; -import { secretKeyCheck } from "./utils/secretKeyCheck"; - -export function autumnHandler(options: { - identify: (request: any) => AuthResult; - version?: string; - secretKey?: string; - baseURL?: string; -}) { - const autumn = new Autumn({ - baseURL: autumnApiUrl, - apiVersion: options.version, - }); - - const router = createRouterWithOptions(); - - let { found, error: resError } = secretKeyCheck(options?.secretKey); - - return async function (request: any, reply: any) { - try { - if (!found && !options.secretKey) { - return reply.code(resError!.statusCode).send(resError); - } - - const url = new URL(request.url, `http://${request.headers.host}`); - const path = url.pathname; - - const searchParams = Object.fromEntries( - new URLSearchParams(request.query) - ); - - const match = findRoute(router, request.method, path); - - if (!match) { - return reply.code(404).send({ error: "Not found" }); - } - - const { data, params: pathParams } = match; - const { handler } = data; - - let body = null; - if (["POST", "PUT", "PATCH"].includes(request.method)) { - body = request.body; - } - - const result = await handler({ - autumn, - body, - path, - pathParams, - searchParams, - getCustomer: async () => { - return await options.identify(request); - }, - }); - - // Send response - return reply.code(result.statusCode).send(result.body); - } catch (error) { - console.error("Error handling Autumn request:", error); - return reply.code(500).send({ error: "Internal server error" }); - } - }; -} diff --git a/autumn-js/src/libraries/backend/hono.ts b/autumn-js/src/libraries/backend/hono.ts deleted file mode 100644 index 4269e815..00000000 --- a/autumn-js/src/libraries/backend/hono.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { Context, Next } from "hono"; -import { findRoute } from "rou3"; -import { Autumn } from "../../sdk"; -import { autumnApiUrl } from "./constants"; -import { createRouterWithOptions } from "./routes/backendRouter"; -import type { AuthResult } from "./utils/AuthFunction"; -import { secretKeyCheck } from "./utils/secretKeyCheck"; - -export const autumnHandler = (options: { - identify: (c: ContextType) => AuthResult; - url?: string; - version?: string; - secretKey?: string; -}) => { - const autumn = new Autumn({ - url: options.url || autumnApiUrl, - version: options.version, - secretKey: options.secretKey, - }); - - const router = createRouterWithOptions(); - - const { found, error: resError } = secretKeyCheck(options?.secretKey); - return async (c: Context, next: Next) => { - if (!found && !options.secretKey) { - return c.json(resError!, 500); - } - - const request = new URL(c.req.url); - const path = request.pathname; - - const searchParams = Object.fromEntries(request.searchParams); - const match = findRoute(router, c.req.method, path); - - if (match) { - const { data, params: pathParams } = match; - const { handler } = data; - - let body = null; - if ( - c.req.method === "POST" || - c.req.method === "PUT" || - c.req.method === "PATCH" - ) { - try { - body = await c.req.json(); - } catch (error) {} - } - - const result = await handler({ - autumn, - body, - path: c.req.path, - getCustomer: async () => { - return await options.identify(c as ContextType); - }, - pathParams, - searchParams, - }); - - return c.json(result.body, result.statusCode); - } - - await next(); - }; -}; diff --git a/autumn-js/src/libraries/backend/index.ts b/autumn-js/src/libraries/backend/index.ts deleted file mode 100644 index 927d27e1..00000000 --- a/autumn-js/src/libraries/backend/index.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Autumn } from "@sdk"; -import { createRouterWithOptions } from "./routes/backendRouter"; -import { secretKeyCheck } from "./utils/secretKeyCheck"; -import { findRoute } from "rou3"; - -// Re-export Autumn type to ensure users import from the same module path -export { Autumn }; - -export async function autumnHandler(options: { - request: { - url: string; - method: string; - body: any; - }; - - // Customer data... - customerId?: string; - customerData?: { - name?: string; - email?: string; - }; - - clientOptions?: { - secretKey?: string; - baseURL?: string; - }; -}) { - const router = createRouterWithOptions(); - - let { found, error: resError } = secretKeyCheck( - options?.clientOptions?.secretKey - ); - - if (!found) { - return { - statusCode: 500, - response: resError, - }; - } - - const autumn = new Autumn({ - secretKey: options.clientOptions?.secretKey, - baseURL: options.clientOptions?.baseURL, - }); - - const { method, url: requestUrl, body } = options.request; - - let url: URL; - if (!requestUrl.includes("http")) { - url = new URL(requestUrl, "http://localhost:3000"); - } else { - url = new URL(requestUrl); - } - const match = findRoute(router, method, url.pathname); - const searchParams = Object.fromEntries(url.searchParams); - - if (!match) { - return { - statusCode: 404, - response: { error: "Not found" }, - }; - } - - const { data, params: pathParams } = match; - const { handler } = data; - - const result = await handler({ - autumn, - body, - path: url.pathname, - getCustomer: async () => { - return { - customerId: options.customerId, - customerData: options.customerData, - }; - }, - pathParams, - searchParams, - }); - - return { - statusCode: result.statusCode, - response: result.body, - }; -} diff --git a/autumn-js/src/libraries/backend/next.ts b/autumn-js/src/libraries/backend/next.ts deleted file mode 100644 index 2bcfb2cb..00000000 --- a/autumn-js/src/libraries/backend/next.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Autumn } from "@sdk"; -import { NextResponse } from "next/server"; -import { findRoute } from "rou3"; -import { autumnApiUrl } from "./constants"; -import { createRouterWithOptions } from "./routes/backendRouter"; -import type { AuthResult } from "./utils/AuthFunction"; -import { secretKeyCheck } from "./utils/secretKeyCheck"; - -export function autumnHandler(options: { - identify: (request: any) => AuthResult; - url?: string; - secretKey?: string; -}) { - const router = createRouterWithOptions(); - - async function handler(request: any, response?: any) { - const { found, error: resError } = secretKeyCheck(options.secretKey); - - // Check if this is pages router by looking for NextApiRequest properties - const isPagesRouter = - response && "query" in request && "cookies" in request; - - if (!found) { - if (isPagesRouter) { - return response.status(resError!.statusCode).json(resError); - } else { - return NextResponse.json(resError, { status: resError!.statusCode }); - } - } - - const autumn = new Autumn({ - secretKey: options.secretKey || undefined, - baseURL: options.url || autumnApiUrl, - }); - - if (!found) { - if (isPagesRouter) { - return response.status(500).json(resError); - } else { - return NextResponse.json(resError, { status: 500 }); - } - } - - const method = request.method; - - // Handle both app router (full URL) and pages router (pathname only) - let url: URL; - if (!request.url.includes("http")) { - // Pages router - url = new URL(request.url, "http://localhost:3000"); - } else { - url = new URL(request.url); - } - - const searchParams = Object.fromEntries(url.searchParams); - const pathname = url.pathname; - - const match = findRoute(router, method, pathname); - - if (!match) { - if (isPagesRouter) { - return response.status(404).json({ error: "Not found" }); - } else { - return NextResponse.json({ error: "Not found" }, { status: 404 }); - } - } - - const { data, params: pathParams } = match; - const { handler } = data; - - let body = null; - if (method === "POST" || method === "PUT" || method === "PATCH") { - try { - body = await request.json(); - } catch (_) {} - } - - const result = await handler({ - autumn, - body, - path: url.pathname, - getCustomer: async () => await options.identify(request), - pathParams, - searchParams, - }); - - if (isPagesRouter) { - return response.status(result.statusCode).json(result.body); - } else { - return NextResponse.json(result.body, { status: result.statusCode }); - } - } - - return { - GET: handler, - POST: handler, - }; -} diff --git a/autumn-js/src/libraries/backend/react-router.ts b/autumn-js/src/libraries/backend/react-router.ts deleted file mode 100644 index 1e71167d..00000000 --- a/autumn-js/src/libraries/backend/react-router.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { findRoute } from "rou3"; -import { Autumn } from "@sdk"; -import { AuthResult } from "./utils/AuthFunction"; -import { createRouterWithOptions } from "./routes/backendRouter"; -import { autumnApiUrl } from "./constants"; -import { secretKeyCheck } from "./utils/secretKeyCheck"; - -export function autumnHandler(options: { - identify: (args: any) => AuthResult; - secretKey?: string; - version?: string; -}) { - const autumn = new Autumn({ - secretKey: options.secretKey || undefined, - baseURL: autumnApiUrl, - }); - - const router = createRouterWithOptions(); - - let { found, error: resError } = secretKeyCheck(options?.secretKey); - async function handleRequest(args: any) { - if (!found && !options.secretKey) { - throw new Response(JSON.stringify(resError!), { - status: resError!.statusCode, - }); - } - - const method = args.request.method; - const url = new URL(args.request.url); - const searchParams = Object.fromEntries(url.searchParams); - const pathname = url.pathname; - - const match = findRoute(router, method, pathname); - - if (!match) { - throw new Response("Not found", { status: 404 }); - } - - const { data, params: pathParams } = match; - const { handler } = data; - - let body = null; - if (method === "POST" || method === "PUT" || method === "PATCH") { - try { - body = await args.request.json(); - } catch (error) { - // Body parsing failed, leave as null - } - } - - const result = await handler({ - autumn, - body, - path: url.pathname, - getCustomer: async () => await options.identify(args), - pathParams: { ...pathParams, ...args.params }, - searchParams, - }); - - return new Response(JSON.stringify(result.body), { - status: result.statusCode, - headers: { - "Content-Type": "application/json", - }, - }); - } - - async function loader(args: any) { - if (args.request.method !== "GET") { - throw new Response("Method not allowed", { status: 405 }); - } - - const response = await handleRequest(args); - const data = await response.json(); - - if (!response.ok) { - throw new Response(JSON.stringify(data), { status: response.status }); - } - - return data; - } - - async function action(args: any) { - if (args.request.method === "GET") { - throw new Response("Method not allowed", { status: 405 }); - } - - const response = await handleRequest(args); - const data = await response.json(); - - if (!response.ok) { - throw new Response(JSON.stringify(data), { status: response.status }); - } - - return data; - } - - return { - loader, - action, - }; -} diff --git a/autumn-js/src/libraries/backend/routes/analyticsRoutes.ts b/autumn-js/src/libraries/backend/routes/analyticsRoutes.ts deleted file mode 100644 index 6b69d5a8..00000000 --- a/autumn-js/src/libraries/backend/routes/analyticsRoutes.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { Autumn, EventsListParams, QueryParams } from "@sdk"; -import { addRoute, type RouterContext } from "rou3"; -import { BASE_PATH } from "../constants"; -import { withAuth } from "../utils/withAuth"; -import type { RouterOptions } from "./backendRouter"; - -const sanitizeBody = (body: any) => { - const bodyCopy = { ...body }; - delete bodyCopy.customer_id; - delete bodyCopy.customer_data; - return bodyCopy; -}; - -const listEventsHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: EventsListParams; - }) => { - return await autumn.events.list({ - ...sanitizeBody(body), - customer_id, - }); - }, - suppressLogs: options?.suppressLogs, -}); - -const aggregateEventsHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: QueryParams; - }) => { - return await autumn.events.aggregate({ - ...sanitizeBody(body), - customer_id, - }); - }, - suppressLogs: options?.suppressLogs, -}); - -export const addAnalyticsRoutes = (router: RouterContext, options?: RouterOptions) => { - addRoute(router, "POST", `${BASE_PATH}/events/list`, { - handler: listEventsHandler(options), - }); - addRoute(router, "POST", `${BASE_PATH}/events/aggregate`, { - handler: aggregateEventsHandler(options), - }); -}; diff --git a/autumn-js/src/libraries/backend/routes/backendRouter.ts b/autumn-js/src/libraries/backend/routes/backendRouter.ts deleted file mode 100644 index e29f5290..00000000 --- a/autumn-js/src/libraries/backend/routes/backendRouter.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { addRoute, createRouter } from "rou3"; -import { BASE_PATH } from "../constants"; -import { addCustomerRoutes } from "./cusRoutes"; -import { addEntityRoutes } from "./entityRoutes"; -import { addGenRoutes } from "./genRoutes"; -import { addPlanRoutes } from "./planRoutes"; -import { addReferralRoutes } from "./referralRoutes"; - -type RouteData = { - handler: any; - requireCustomer?: boolean; -}; - -export const createRouterWithOptions = () => { - const router = createRouter(); - - addRoute(router, "POST", `${BASE_PATH}/cors`, { - handler: () => { - return { - body: { - message: "OK", - }, - statusCode: 200, - }; - }, - }); - - addGenRoutes(router); - addCustomerRoutes(router); - addEntityRoutes(router); - addReferralRoutes(router); - addPlanRoutes(router); - - return router; -}; diff --git a/autumn-js/src/libraries/backend/routes/basePath.ts b/autumn-js/src/libraries/backend/routes/basePath.ts deleted file mode 100644 index cba99eae..00000000 --- a/autumn-js/src/libraries/backend/routes/basePath.ts +++ /dev/null @@ -1 +0,0 @@ -// export const BASE_PATH = ""; diff --git a/autumn-js/src/libraries/backend/routes/cusRoutes.ts b/autumn-js/src/libraries/backend/routes/cusRoutes.ts deleted file mode 100644 index 5cd4b353..00000000 --- a/autumn-js/src/libraries/backend/routes/cusRoutes.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { Autumn } from "@sdk"; -import { addRoute, type RouterContext } from "rou3"; -import { BASE_PATH } from "../constants"; -import { withAuth } from "../utils/withAuth"; - -const sanitizeCustomerBody = (body: any) => { - const bodyCopy = { ...body }; - delete bodyCopy.id; - delete bodyCopy.name; - delete bodyCopy.email; - - return bodyCopy; -}; - -const createCustomerHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data = {}, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.CustomerCreateParams; - }) => { - const res = await autumn.customers.create({ - id: customer_id, - ...customer_data, - ...sanitizeCustomerBody(body), - }); - - return res; - }, -}); - -export const addCustomerRoutes = async (router: RouterContext) => { - addRoute(router, "POST", `${BASE_PATH}/customers`, { - handler: createCustomerHandler, - }); -}; diff --git a/autumn-js/src/libraries/backend/routes/entityRoutes.ts b/autumn-js/src/libraries/backend/routes/entityRoutes.ts deleted file mode 100644 index 846831bf..00000000 --- a/autumn-js/src/libraries/backend/routes/entityRoutes.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { RouterContext } from "rou3"; -import { addRoute } from "rou3"; -import { - Autumn, - CreateEntityParams, - GetEntityParams, -} from "../../../sdk"; -import { withAuth } from "../utils/withAuth"; -import type { RouterOptions } from "./backendRouter"; - -const createEntityHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: Autumn.EntityCreateParams; - }) => { - return await autumn.entities.create(customer_id, body); - }, - suppressLogs: options?.suppressLogs, -}); - -const getEntityHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - pathParams, - searchParams, - }: { - autumn: Autumn; - customer_id: string; - pathParams?: Record; - searchParams?: Record; - }) => { - if (!pathParams?.entityId) { - return { - statusCode: 400, - body: { - error: "no_entity_id", - message: "Entity ID is required", - }, - }; - } - - return await autumn.entities.get(pathParams.entityId, { - customer_id: customer_id, - expand: searchParams?.expand ? searchParams?.expand.split(",") as "invoices"[] : undefined, - }); - }, - suppressLogs: options?.suppressLogs, -}); - -const deleteEntityHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - pathParams, - }: { - autumn: Autumn; - customer_id: string; - pathParams?: Record; - }) => { - if (!pathParams?.entityId) { - return { - statusCode: 400, - body: { - error: "no_entity_id", - message: "Entity ID is required", - }, - }; - } - - return await autumn.entities.delete(pathParams.entityId, { - customer_id: customer_id, - }); - }, - suppressLogs: options?.suppressLogs, -}); - -export const addEntityRoutes = async (router: RouterContext, options?: RouterOptions) => { - addRoute(router, "POST", "/api/autumn/entities", { - handler: createEntityHandler(options), - }); - addRoute(router, "GET", "/api/autumn/entities/:entityId", { - handler: getEntityHandler(options), - }); - addRoute(router, "DELETE", "/api/autumn/entities/:entityId", { - handler: deleteEntityHandler(options), - }); -}; diff --git a/autumn-js/src/libraries/backend/routes/genRoutes.ts b/autumn-js/src/libraries/backend/routes/genRoutes.ts deleted file mode 100644 index 25eb6220..00000000 --- a/autumn-js/src/libraries/backend/routes/genRoutes.ts +++ /dev/null @@ -1,207 +0,0 @@ -// import type { AttachParams, CheckoutParams } from "@sdk/general/attachTypes"; - -import type { - Autumn, - // BillingPortalParams, - // CancelParams, - // CheckParams, - // CustomerData, - // SetupPaymentParams, - // TrackParams, -} from "@sdk"; -import { addRoute, type RouterContext } from "rou3"; -import type { QueryParams } from "@/clientTypes"; -import { BASE_PATH } from "../constants"; -import { withAuth } from "../utils/withAuth"; - -const sanitizeBody = (body: any) => { - const bodyCopy = { ...body }; - delete bodyCopy.customer_id; - delete bodyCopy.customer_data; - return bodyCopy; -}; - -const checkoutHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.CheckoutParams; - }) => { - const result = await autumn.checkout({ - ...sanitizeBody(body), - customer_id, - customer_data, - }); - - return result; - }, -}); -const attachHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.AttachParams; - }) => { - console.log("Body: ", body); - console.log("Customer ID: ", customer_id); - return await autumn.attach({ - ...sanitizeBody(body), - customer_id, - customer_data, - }); - }, -}); - -const setupPaymentHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.SetupPaymentParams; - }) => { - return await autumn.setupPayment({ - ...sanitizeBody(body), - customer_id, - customer_data, - }); - }, -}); - -const cancelHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: Autumn.CancelParams; - }) => { - return await autumn.cancel({ - ...sanitizeBody(body), - customer_id, - }); - }, -}); - -const checkHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.CheckParams; - }) => { - const result = await autumn.check({ - ...sanitizeBody(body), - customer_id, - customer_data, - }); - - return result; - }, -}); - -const trackHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: Autumn.CustomerData; - body: Autumn.TrackParams; - }) => { - return await autumn.track({ - ...sanitizeBody(body), - customer_id, - customer_data, - }); - }, -}); - -const openBillingPortalHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: Autumn.BillingPortalParams; - }) => { - return await autumn.billingPortal({ - customer_id, - return_url: body.return_url, - }); - }, -}); - -const queryHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: QueryParams; - }) => { - return await autumn.query({ - ...sanitizeBody(body), - customer_id, - }); - }, -}); - -const addGenRoutes = (router: RouterContext) => { - addRoute(router, "POST", `${BASE_PATH}/checkout`, { - handler: checkoutHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/attach`, { - handler: attachHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/cancel`, { - handler: cancelHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/check`, { - handler: checkHandler, - }); - // addRoute(router, "POST", `${BASE_PATH}/track`, { - // handler: trackHandler, - // }); - addRoute(router, "POST", `${BASE_PATH}/billing_portal`, { - handler: openBillingPortalHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/setup_payment`, { - handler: setupPaymentHandler, - }); - addRoute(router, "POST", `${BASE_PATH}/query`, { - handler: queryHandler, - }); -}; - -export { addGenRoutes }; diff --git a/autumn-js/src/libraries/backend/routes/planRoutes.ts b/autumn-js/src/libraries/backend/routes/planRoutes.ts deleted file mode 100644 index df721cab..00000000 --- a/autumn-js/src/libraries/backend/routes/planRoutes.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { Autumn } from "@sdk"; -import { addRoute, type RouterContext } from "rou3"; -import { BASE_PATH } from "../constants"; -import { withAuth } from "../utils/withAuth"; - -const listPlansHandler = withAuth({ - fn: async ({ - autumn, - customer_id, - }: { - autumn: Autumn; - customer_id: string; - }) => { - const result = await autumn.plans.list({ - customer_id, - }); - return result; - }, - requireCustomer: false, -}); - -export const addPlanRoutes = async (router: RouterContext) => { - addRoute(router, "GET", `${BASE_PATH}/plans`, { - handler: listPlansHandler, - }); -}; diff --git a/autumn-js/src/libraries/backend/routes/referralRoutes.ts b/autumn-js/src/libraries/backend/routes/referralRoutes.ts deleted file mode 100644 index b4057b41..00000000 --- a/autumn-js/src/libraries/backend/routes/referralRoutes.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { addRoute, RouterContext } from "rou3"; -import { - Autumn, - // CreateReferralCodeParams, - // RedeemReferralCodeParams, -} from "@sdk"; -import { withAuth } from "../utils/withAuth"; -import { BASE_PATH } from "../constants"; -import type { RouterOptions } from "./backendRouter"; - -const createReferralCodeHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - // body, - }: { - autumn: Autumn; - customer_id: string; - // body: CreateReferralCodeParams; - }) => { - - // const res = await autumn.referrals.createCode({ - // ...body, - // customer_id, - // }); - - // return res; - }, - suppressLogs: options?.suppressLogs, -}); - -const redeemReferralCodeHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - // body, - }: { - autumn: Autumn; - customer_id: string; - // body: RedeemReferralCodeParams; - }) => { - // return await autumn.referrals.redeemCode({ - // ...body, - // customer_id, - // }); - }, - suppressLogs: options?.suppressLogs, -}); - -export const addReferralRoutes = async (router: RouterContext, options?: RouterOptions) => { - addRoute(router, "POST", `${BASE_PATH}/referrals/code`, { - handler: createReferralCodeHandler(options), - }); - - addRoute(router, "POST", `${BASE_PATH}/referrals/redeem`, { - handler: redeemReferralCodeHandler(options), - }); -}; diff --git a/autumn-js/src/libraries/backend/schemas/zod.ts b/autumn-js/src/libraries/backend/schemas/zod.ts deleted file mode 100644 index 9a1ea729..00000000 --- a/autumn-js/src/libraries/backend/schemas/zod.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { z } from "zod/v4" - -export const entityDataParamsSchema = z.object({ - name: z.string().optional(), - featureId: z.string() -}) - -export const attachFeatureOptionsSchema = z.object({ - featureId: z.string(), - quantity: z.number() -}) - -export const attachParamsSchema = z.object({ - productId: z.string().optional(), - entityId: z.string().optional(), - options: z.array(attachFeatureOptionsSchema).optional(), - productIds: z.array(z.string()).optional(), - freeTrial: z.boolean().optional(), - successUrl: z.string().optional(), - metadata: z.record(z.string(), z.string()).optional(), - forceCheckout: z.boolean().optional(), - entityData: entityDataParamsSchema.optional(), - openInNewTab: z.boolean().optional(), - reward: z.string().optional(), - checkoutSessionParams: z.record(z.string(), z.any()).optional(), - newBillingSubscription: z.boolean().optional() -}) - -export const cancelParamsSchema = z.object({ - productId: z.string(), - entityId: z.string().optional(), - cancelImmediately: z.boolean().optional() -}) - -export const checkParamsSchema = z.object({ - featureId: z.string().optional(), - productId: z.string().optional(), - entityId: z.string().optional(), - requiredBalance: z.number().optional(), - sendEvent: z.boolean().optional(), - withPreview: z.boolean().optional(), - entityData: entityDataParamsSchema.optional() -}) - -export const trackParamsSchema = z.object({ - featureId: z.string().optional(), - eventName: z.string().optional(), - entityId: z.string().optional(), - value: z.number().optional(), - idempotencyKey: z.string().optional(), - entityData: entityDataParamsSchema.optional() -}) - -export const openBillingPortalParamsSchema = z.object({ - returnUrl: z.string().optional(), - openInNewTab: z.boolean().optional() -}) - -export const createReferralCodeParamsSchema = z.object({ - programId: z.string() -}) - -export const redeemReferralCodeParamsSchema = z.object({ - code: z.string() -}) \ No newline at end of file diff --git a/autumn-js/src/libraries/backend/supabase.ts b/autumn-js/src/libraries/backend/supabase.ts deleted file mode 100644 index 1ff81a0c..00000000 --- a/autumn-js/src/libraries/backend/supabase.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { findRoute } from "rou3"; -import { Autumn } from "@sdk"; -import { AuthResult } from "./utils/AuthFunction"; -import { createRouterWithOptions } from "./routes/backendRouter"; -import { autumnApiUrl } from "./constants"; -import { secretKeyCheck } from "./utils/secretKeyCheck"; - -export function autumnHandler(options: { - corsHeaders: Record; - identify: (request: Request) => AuthResult; - secretKey?: string; -}) { - // @ts-ignore - const secretKey = Deno.env.get("AUTUMN_SECRET_KEY"); - - if (!secretKey) { - throw new Error( - `AUTUMN_SECRET_KEY not found. Please add it to your secrets in supabase: https://supabase.com/dashboard/project//functions/secrets` - ); - } - - const autumn = new Autumn({ - baseURL: autumnApiUrl, - secretKey, - }); - - const router = createRouterWithOptions(); - - const { found, error: resError } = secretKeyCheck(options?.secretKey); - return async function handler(request: Request): Promise { - if (!found && !options.secretKey) { - return new Response(JSON.stringify(resError!), { - status: resError!.statusCode, - }); - } - - const method = request.method; - const url = new URL(request.url); - const searchParams = Object.fromEntries(url.searchParams); - let pathname = url.pathname; - - if (!pathname.includes("/api/autumn")) { - return new Response(JSON.stringify({ error: "Not found" }), { - status: 404, - headers: { - ...options.corsHeaders, - "Content-Type": "application/json", - }, - }); - } - - // Extract the part starting from "/api/autumn" - const autumnIndex = pathname.indexOf("/api/autumn"); - pathname = pathname.substring(autumnIndex); - - const match = findRoute(router, method, pathname); - - if (!match) { - return new Response(JSON.stringify({ error: "Not found" }), { - status: 404, - headers: { - ...options.corsHeaders, - "Content-Type": "application/json", - }, - }); - } - - const { data, params: pathParams } = match; - const { handler: routeHandler } = data; - - let body = null; - if (method === "POST" || method === "PUT" || method === "PATCH") { - try { - body = await request.json(); - } catch (error) { - // Silently fail if body is not valid JSON - } - } - - const result = await routeHandler({ - autumn, - body, - path: url.pathname, - getCustomer: async () => await options.identify(request), - pathParams, - searchParams, - }); - - return new Response(JSON.stringify(result.body), { - status: result.statusCode, - headers: { - ...options.corsHeaders, - "Content-Type": "application/json", - }, - }); - }; -} diff --git a/autumn-js/src/libraries/backend/tanstack.ts b/autumn-js/src/libraries/backend/tanstack.ts deleted file mode 100644 index bce6a319..00000000 --- a/autumn-js/src/libraries/backend/tanstack.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { findRoute } from "rou3"; -import { Autumn } from "@sdk"; -import { autumnApiUrl } from "./constants"; -import { createRouterWithOptions } from "./routes/backendRouter"; -import { AuthResult } from "./utils/AuthFunction"; -import { json } from "@tanstack/react-start"; -import { secretKeyCheck } from "./utils/secretKeyCheck"; - -// Create a factory function for your Autumn handler -export const autumnHandler = (options: { - identify: (ctx: { request: any }) => AuthResult; - apiVersion?: string; - secretKey?: string; -}) => { - const autumn = new Autumn({ - baseURL: autumnApiUrl, - apiVersion: options.apiVersion, - }); - - const router = createRouterWithOptions(); - - let { found, error: resError } = secretKeyCheck(options?.secretKey); - - // Generic handler function that works with any HTTP method - const handleRequest = async (ctx: { request: Request; params: any }) => { - const { request } = ctx; - - if (!found && !options.secretKey) { - return new Response(JSON.stringify(resError!), { - status: resError!.statusCode, - }); - } - - const url = new URL(request.url); - const searchParams = Object.fromEntries(url.searchParams); - const pathname = url.pathname; - - const method = request.method; - const match = findRoute(router, method, pathname); - - if (!match) { - return new Response(JSON.stringify({ error: "Not found" }), { - status: 404, - headers: { "Content-Type": "application/json" }, - }); - } - - const { data, params: pathParams } = match; - const { handler } = data; - - let body = null; - if (method === "POST" || method === "PUT" || method === "PATCH") { - try { - body = await request.json(); - } catch (error) { - // Handle JSON parsing errors - } - } - - try { - const result = await handler({ - autumn, - body, - path: pathname, - getCustomer: async () => await options.identify(ctx), - pathParams, - searchParams, - }); - - return json(result.body, { status: result.statusCode }); - } catch (error: any) { - console.error("Autumn handler error:", error.message); - return json({ error: error.message }, { status: 500 }); - } - }; - - // Return handlers for supported HTTP methods - return { - GET: handleRequest, - POST: handleRequest, - PUT: handleRequest, - PATCH: handleRequest, - DELETE: handleRequest, - }; -}; diff --git a/autumn-js/src/libraries/backend/utils/AuthFunction.ts b/autumn-js/src/libraries/backend/utils/AuthFunction.ts deleted file mode 100644 index 16289d3b..00000000 --- a/autumn-js/src/libraries/backend/utils/AuthFunction.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type AuthResult = Promise<{ - customerId?: string; - customerData?: { - name?: string; - email?: string; - }; -} | null>; diff --git a/autumn-js/src/libraries/backend/utils/backendRes.ts b/autumn-js/src/libraries/backend/utils/backendRes.ts deleted file mode 100644 index 94e7e155..00000000 --- a/autumn-js/src/libraries/backend/utils/backendRes.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ErrorResponse } from "@utils/ErrorResponse"; - -// export const toBackendRes = ({ res }: { res: Result }) => { -// let statusCode = res.statusCode ? res.statusCode : res.error ? 500 : 200; - -// return { -// body: res.data ? res.data : res.error, -// statusCode, -// }; -// }; - -export const toBackendError = ({ - path, - message, - code, - statusCode = 500, -}: { - path: string; - message: string; - code?: string; - statusCode?: number; -}) => { - return { - statusCode, - body: new ErrorResponse({ - message: message || "Internal server error", - code: code || "internal_server_error", - }), - }; -}; diff --git a/autumn-js/src/libraries/backend/utils/betterAuth/middlewares.ts b/autumn-js/src/libraries/backend/utils/betterAuth/middlewares.ts deleted file mode 100644 index cc4d64a8..00000000 --- a/autumn-js/src/libraries/backend/utils/betterAuth/middlewares.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { getSessionFromCtx } from "better-auth/api"; -import type { Organization } from "better-auth/plugins"; -import type { AutumnOptions } from "./types"; - -export const scopeContainsOrg = ({ options }: { options?: AutumnOptions }) => { - return ( - options?.customerScope === "organization" || - options?.customerScope === "user_and_organization" - ); -}; - -export async function getOrganizationContext( - ctx: any, - options?: AutumnOptions -) { - if (!scopeContainsOrg({ options }) && !options?.identify) { - return { - activeOrganizationId: null, - activeOrganization: null, - activeOrganizationEmail: null, - }; - } - - try { - const session = await getSessionFromCtx(ctx as any); - const orgId = session?.session.activeOrganizationId; - - if (orgId && session) { - // Check if user is a member of the organization - const [member, organization] = await Promise.all([ - ctx.context.adapter.findOne({ - model: "member", - where: [ - { field: "userId", value: session.user.id }, - { field: "organizationId", value: orgId }, - ], - }), - ctx.context.adapter.findOne({ - model: "organization", - where: [{ field: "id", value: orgId }], - }), - ]); - - // console.log("[org context] member: ", member); - - if (!member) { - return { - activeOrganizationId: null, - activeOrganization: null, - activeOrganizationEmail: null, - }; - } - - const creatorRole = ctx.context.orgOptions?.creatorRole || "owner"; - let ownerUserId = - (member as any).role === creatorRole ? (member as any).userId : null; - let owner = null; - if ((member as any).role !== creatorRole) { - const ownerMembers = await ctx.context.adapter.findMany({ - model: "member", - where: [ - { field: "organizationId", value: orgId }, - { field: "role", value: creatorRole }, - ], - }); - ownerUserId = - ownerMembers.length > 0 ? (ownerMembers[0] as any).userId : null; - } - - if (ownerUserId) { - const ownerUser = await ctx.context.adapter.findOne({ - model: "user", - where: [{ field: "id", value: ownerUserId }], - }); - owner = ownerUser; - } - - // console.log("[org context] organization: ", organization); - // console.log("[org context] ownerEmail: ", (owner as any)?.email); - - return { - activeOrganizationId: orgId, - activeOrganization: organization, - activeOrganizationEmail: (owner as any)?.email, - }; - } - - return { - activeOrganizationId: null, - activeOrganization: null, - activeOrganizationEmail: null, - }; - } catch (error) { - // If there's any error (like no session), just return null values - console.log("[org context error]", error); - return { - activeOrganizationId: null, - activeOrganization: null, - activeOrganizationEmail: null, - }; - } -} - -export async function getIdentityContext({ - orgContext, - options, - session, -}: { - orgContext: any; - options?: AutumnOptions; - session?: any; -}) { - if (!options?.identify) return null; - - const orgData = orgContext.activeOrganization?.id - ? ({ - ...orgContext.activeOrganization, - ownerEmail: orgContext.activeOrganizationEmail as string | null, - } as Organization & { ownerEmail: string | null }) - : null; - - try { - const identity = await options.identify({ - session, - organization: orgData, - }); - return identity; - } catch (error) { - console.log("[identity context error]", error); - return null; - } -} diff --git a/autumn-js/src/libraries/backend/utils/betterAuth/types.ts b/autumn-js/src/libraries/backend/utils/betterAuth/types.ts deleted file mode 100644 index 3b2bd350..00000000 --- a/autumn-js/src/libraries/backend/utils/betterAuth/types.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { Organization } from "better-auth/plugins"; -import { AuthResult } from "../AuthFunction"; -import { getSessionFromCtx } from "better-auth/api"; - -// Get return type of getSessionFromCtx -export type Session = ReturnType; - -export type AutumnOptions = { - baseURL?: string; - secretKey?: string; - // enableOrganizations?: boolean; - customerScope?: "user" | "organization" | "user_and_organization"; - identify?: (options: { - session: Session; - organization?: (Organization & { ownerEmail: string | null }) | null; - }) => AuthResult; - suppressLogs?: boolean; -}; diff --git a/autumn-js/src/libraries/backend/utils/secretKeyCheck.ts b/autumn-js/src/libraries/backend/utils/secretKeyCheck.ts deleted file mode 100644 index d4c56b17..00000000 --- a/autumn-js/src/libraries/backend/utils/secretKeyCheck.ts +++ /dev/null @@ -1,14 +0,0 @@ -export const secretKeyCheck = (secretKey?: string) => { - if (!secretKey && !process.env.AUTUMN_SECRET_KEY) { - return { - found: false, - error: { - statusCode: 500, - message: `Autumn secret key not found in ENV variables or passed into autumnHandler`, - code: "no_secret_key", - }, - }; - } - - return { found: true, error: null }; -}; diff --git a/autumn-js/src/libraries/backend/utils/withAuth.ts b/autumn-js/src/libraries/backend/utils/withAuth.ts deleted file mode 100644 index 90d97f23..00000000 --- a/autumn-js/src/libraries/backend/utils/withAuth.ts +++ /dev/null @@ -1,102 +0,0 @@ -import Autumn from "@sdk"; -import { toSnakeCase } from "@utils/toSnakeCase"; -import { logger } from "../../../utils/logger"; -import type { AuthResult } from "./AuthFunction"; -import { toBackendError } from "./backendRes"; - -// 1. Takes in -export const withAuth = ({ - fn, - requireCustomer = true, -}: { - fn: (args: { - autumn: Autumn; - body: any; - customer_id: string; - customer_data?: Autumn.CustomerData; - pathParams?: Record; - searchParams?: Record; - }) => Promise; - requireCustomer?: boolean; -}) => { - return async ({ - autumn, - body, - path, - getCustomer, - pathParams, - searchParams, - }: { - autumn: Autumn; - body: any; - path: string; - getCustomer: () => AuthResult; - pathParams?: Record; - searchParams?: Record; - }) => { - const authResult = await getCustomer(); - const customerId = authResult?.customerId; - - if (!customerId && requireCustomer) { - if (body?.errorOnNotFound === false) { - return { - statusCode: 202, - body: null, - }; - } else { - logger.error( - `[Autumn]: customerId returned from identify function is ${customerId}`, - ); - return toBackendError({ - path, - message: `customerId returned from identify function is ${customerId}`, - code: "no_customer_id", - statusCode: 401, - }); - } - } - - const cusData = authResult?.customerData || body?.customer_data; - - if (body) { - body = toSnakeCase({ - obj: body, - excludeChildrenOf: ["checkoutSessionParams", "properties"], - }); - } - - try { - const result = await fn({ - body, - autumn, - customer_id: customerId ?? "", - customer_data: cusData, - pathParams, - searchParams, - }); - - return { - statusCode: 200, - body: result, - }; - } catch (error) { - if (error instanceof Autumn.APIError) { - const statusCode = error.status; - const data = error.error; - return toBackendError({ - path, - message: data.message || "unknown error", - code: data.code || "internal_error", - statusCode, - }); - } else { - return toBackendError({ - path, - message: error instanceof Error ? error.message : "unknown error", - code: "internal_error", - statusCode: 500, - }); - } - } - }; -}; diff --git a/autumn-js/src/libraries/react/AutumnContext.tsx b/autumn-js/src/libraries/react/AutumnContext.tsx deleted file mode 100644 index fc150689..00000000 --- a/autumn-js/src/libraries/react/AutumnContext.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { createContext, useContext } from "react"; -import { AutumnClient } from "./client/ReactAutumnClient"; - -export interface AutumnDialogContext { - props: any; - setProps: (props: any) => void; - open: boolean; - setOpen: (open: boolean) => void; - setComponent: (component: any) => void; -} - -export interface AutumnContextParams { - initialized: boolean; - disableDialogs: boolean; - - client: AutumnClient; - - // Internal - paywallDialog: AutumnDialogContext; - attachDialog: AutumnDialogContext; - paywallRef: React.RefObject; -} - -export type AutumnContextType = React.Context; - -export const AutumnContext = createContext({ - initialized: false, - disableDialogs: false, - - client: new AutumnClient({ backendUrl: "" }), - - paywallDialog: { - props: null, - setProps: () => {}, - open: false, - setOpen: () => {}, - setComponent: () => {}, - }, - - attachDialog: { - props: null, - setProps: () => {}, - open: false, - setOpen: () => {}, - setComponent: () => {}, - }, - - paywallRef: { current: null }, -}); - -export const useAutumnContext = ({ - AutumnContext, - name, - errorIfNotInitialized = true, -}: { - AutumnContext: React.Context; - name: string; - errorIfNotInitialized?: boolean; -}) => { - const context = useContext(AutumnContext); - - if (!context.initialized && errorIfNotInitialized) { - throw new Error(`${name} must be used within `); - } - - return context; -}; diff --git a/autumn-js/src/libraries/react/BaseAutumnProvider.tsx b/autumn-js/src/libraries/react/BaseAutumnProvider.tsx deleted file mode 100644 index 2d513bec..00000000 --- a/autumn-js/src/libraries/react/BaseAutumnProvider.tsx +++ /dev/null @@ -1,103 +0,0 @@ -"use client"; - -import type React from "react"; -import { useRef, useState } from "react"; -import type { IAutumnClient } from "./client/ReactAutumnClient"; -import { useDialog } from "./hooks/helpers/useDialog"; -import { useCustomerBase } from "./hooks/useCustomerBase"; - -export function BaseAutumnProvider({ - client, - children, - AutumnContext, -}: { - client: IAutumnClient; - children: React.ReactNode; - AutumnContext: any; -}): React.JSX.Element { - const [components, setComponents] = useState<{ - paywallDialog?: any; - productChangeDialog?: any; - }>({}); - - const [paywallProps, setPaywallProps, paywallOpen, setPaywallOpen] = - useDialog(components.paywallDialog); - - const [ - productChangeProps, - setProductChangeProps, - productChangeOpen, - setProductChangeOpen, - ] = useDialog(components.productChangeDialog); - - // Always call useCustomerBase, but pass the client as any to avoid type issues - // The hook will work with both HTTP and Convex clients - useCustomerBase({ - client: client as any, - params: { errorOnNotFound: false }, - }); - - const paywallRef = useRef(null); - - const [refresh, setRefresh] = useState(0); - - return ( - { - setComponents({ - ...components, - paywallDialog: component, - }); - }, - }, - - attachDialog: { - props: productChangeProps, - setProps: setProductChangeProps, - open: productChangeOpen, - setOpen: setProductChangeOpen, - setComponent: (component: any) => { - setComponents({ - ...components, - productChangeDialog: component, - }); - }, - }, - paywallRef, - refresh, - setRefresh, - }} - > - {paywallRef.current && ( - - )} - {components.paywallDialog && ( - - )} - {components.productChangeDialog && ( - - )} - {children} - - ); -} diff --git a/autumn-js/src/libraries/react/ReactAutumnProvider.tsx b/autumn-js/src/libraries/react/ReactAutumnProvider.tsx deleted file mode 100644 index 534741ae..00000000 --- a/autumn-js/src/libraries/react/ReactAutumnProvider.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { BaseAutumnProvider } from "./BaseAutumnProvider"; -import { AutumnClient } from "./client/ReactAutumnClient"; -import { AutumnContext } from "./AutumnContext"; -import { IAutumnClient } from "./client/ReactAutumnClient"; -import { ConvexAutumnClient } from "./client/ConvexAutumnClient"; -import React from "react"; - -const getBackendUrl = (backendUrl?: string) => { - if (backendUrl) { - return backendUrl; - } - - if (backendUrl && !backendUrl.startsWith("http")) { - console.warn(`backendUrl is not a valid URL: ${backendUrl}`); - } - - return ""; -}; - -export const ReactAutumnProvider = ({ - children, - getBearerToken, - convex, - backendUrl, - customerData, - includeCredentials, - betterAuthUrl, - headers, - convexApi, - pathPrefix, - suppressLogs, -}: { - children: React.ReactNode; - getBearerToken?: () => Promise; - convex?: any; - backendUrl?: string; - customerData?: CustomerData; - includeCredentials?: boolean; - betterAuthUrl?: string; - headers?: Record; - convexApi?: any; // The exported autumn.api() object from Convex - pathPrefix?: string; // Optional path prefix to override default "/api/autumn" - suppressLogs?: boolean; // Suppress error logging to browser console -}): React.JSX.Element => { - let client: IAutumnClient = convexApi - ? new ConvexAutumnClient({ - convex, - convexApi, - customerData, - headers, - getBearerToken, - suppressLogs, - }) - : new AutumnClient({ - backendUrl: getBackendUrl(backendUrl), - getBearerToken, - customerData, - includeCredentials, - betterAuthUrl, - headers, - pathPrefix: pathPrefix, - suppressLogs, - }); - - return ( - - {children} - - ); -}; diff --git a/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx b/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx deleted file mode 100644 index ab1b4679..00000000 --- a/autumn-js/src/libraries/react/client/ConvexAutumnClient.tsx +++ /dev/null @@ -1,217 +0,0 @@ -import type { Autumn } from "@sdk"; -import type { - CustomerCreateParams, - CustomerData, - ReferralCreateCodeParams, - ReferralRedeemCodeParams, -} from "@/clientTypes"; -import type { IAutumnClient } from "./ReactAutumnClient"; - -export interface ErrorResponse { - message: string; - code: string; -} - -export type OmitCustomerType = - | "id" - | "name" - | "email" - | "fingerprint" - | "customer_id"; - -export interface ConvexAutumnClientConfig { - convexApi: any; // The exported autumn.api() object from Convex - // convexUrl: string; // The Convex deployment URL - customerData?: CustomerData; - headers?: Record; - getBearerToken?: () => Promise; - convex: any; -} - -export class ConvexAutumnClient implements IAutumnClient { - protected readonly convexApi: any; - protected readonly convex: any; - // protected readonly convexClient: ConvexHttpClient; - public readonly customerData?: CustomerData; - public readonly headers?: Record; - public readonly backendUrl?: string = undefined; - public readonly prefix: string = "/api/convex"; - public readonly getBearerToken?: () => Promise; - - // Stub implementations for HTTP-specific methods that the interface requires - async detectCors() { - return { - valid: true, - includeCredentials: false as boolean | undefined, - }; - } - - async shouldIncludeCredentials(): Promise { - return false; - } - - async getHeaders() { - return { "Content-Type": "application/json" }; - } - - async handleFetch() { - throw new Error("HTTP methods not supported in Convex mode"); - } - - async post() { - throw new Error("HTTP methods not supported in Convex mode"); - } - - async get() { - throw new Error("HTTP methods not supported in Convex mode"); - } - - async delete() { - throw new Error("HTTP methods not supported in Convex mode"); - } - - constructor({ - convexApi, - customerData, - headers, - getBearerToken, - convex, - }: ConvexAutumnClientConfig) { - this.convex = convex; - this.convexApi = convexApi; - // this.convexClient = new ConvexHttpClient(convexUrl); - this.getBearerToken = getBearerToken; - this.customerData = customerData; - this.headers = headers; - } - - async createCustomer( - params: CustomerCreateParams & { - errorOnNotFound?: boolean; - }, - ) { - return await this.convex.action(this.convexApi.createCustomer, params); - } - - // Core methods that wrap Convex actions - attach = async (args: any) => { - // Filter out frontend-only parameters - const { dialog, ...backendArgs } = args; - - const result = await this.convex.action(this.convexApi.attach, backendArgs); - return result; - }; - - checkout = async (args: any) => { - // Filter out frontend-only parameters - const { dialog, ...backendArgs } = args; - - const result = await this.convex.action( - this.convexApi.checkout, - backendArgs, - ); - return result; - }; - - cancel = async (args: any) => { - const result = await this.convex.action(this.convexApi.cancel, args); - return result; - }; - - check = async (args: any) => { - const result = await this.convex.action(this.convexApi.check, args); - return result; - }; - - openBillingPortal = async (args: any) => { - const result = await this.convex.action(this.convexApi.billingPortal, { - ...args, - openInNewTab: undefined, - }); - - return result; - }; - - setupPayment = async (args: any) => { - const result = await this.convex.action(this.convexApi.setupPayment, args); - return result; - }; - - query = async (args: any) => { - const result = await this.convex.action(this.convexApi.query, args); - return result; - }; - - entities = { - create: async (args: any) => { - // Check if args is an array or single entity - if (Array.isArray(args)) { - // Multiple entities - use createEntities method - throw new Error( - "Passing an array of entities to createEntity() is not supported for Convex", - ); - // const entityArgs = { entities: args }; - // const result = await this.convex.action( - // this.convexApi.createEntities, - // entityArgs - // ); - // return result; - } else { - // Single entity - use createEntity method directly (no entities wrapper) - const result = await this.convex.action( - this.convexApi.createEntity, - args, - ); - return result; - } - }, - - get: async (entityId: string, args: any) => { - const result = await this.convex.action(this.convexApi.getEntity, { - entityId, - ...args, - }); - - return result; - }, - - delete: async (args: any) => { - // Set auth token for the request - backend will extract identity - // if (this.getBearerToken) { - // this.convexClient.setAuth( - // (await this.getBearerToken()) ?? "" - // ); - // } - const result = await this.convex.action( - this.convexApi.deleteEntity, - args, - ); - return result; - }, - }; - - referrals = { - createCode: async (args: ReferralCreateCodeParams) => { - const result = await this.convex.action( - this.convexApi.createReferralCode, - args, - ); - return result as Autumn.Referrals.ReferralCreateCodeResponse; - }, - - redeemCode: async (args: ReferralRedeemCodeParams) => { - const result = await this.convex.action( - this.convexApi.redeemReferralCode, - args, - ); - return result as Autumn.Referrals.ReferralRedeemCodeResponse; - }, - }; - - plans = { - list: async (): Promise => { - const result = await this.convex.action(this.convexApi.listProducts, {}); - return result; - }, - }; -} diff --git a/autumn-js/src/libraries/react/client/ProductDetails.ts b/autumn-js/src/libraries/react/client/ProductDetails.ts deleted file mode 100644 index b02adb84..00000000 --- a/autumn-js/src/libraries/react/client/ProductDetails.ts +++ /dev/null @@ -1,32 +0,0 @@ -// import { Autumn } from "@sdk"; - -// export interface ProductDetails { -// id?: string; -// name?: string; -// description?: string; -// buttonText?: string; -// buttonUrl?: string; -// recommendText?: string; -// everythingFrom?: string; - -// price?: { -// primaryText: string; -// secondaryText?: string; -// }; - -// items?: { -// featureId?: string; -// primaryText?: string; -// secondaryText?: string; -// }[]; -// } -// export interface ProductWithDisplay extends Autumn.Product { -// display?: { -// name?: string; -// description?: string; -// button_text?: string; -// recommend_text?: string; -// everything_from?: string; -// button_url?: string; -// }; -// } diff --git a/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx b/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx deleted file mode 100644 index 60334411..00000000 --- a/autumn-js/src/libraries/react/client/ReactAutumnClient.tsx +++ /dev/null @@ -1,361 +0,0 @@ -import type { Autumn } from "@sdk"; -import { handleFetchResult } from "@utils/handleFetchResult"; -import type { - AttachParams, - CancelParams, - CheckoutParams, - CustomerCreateParams, - CustomerData, - QueryParams, - ReferralCreateCodeParams, - ReferralRedeemCodeParams, - SetupPaymentParams, -} from "@/clientTypes"; -import { logAuthError } from "@/errorUtils/logAuthError"; -import { logFetchError } from "../errorUtils/logFetchError"; -import { createCustomerMethod } from "./clientCusMethods"; -import { - createEntityMethod, - deleteEntityMethod, - getEntityMethod, -} from "./clientEntityMethods"; -import { - attachMethod, - cancelMethod, - checkMethod, - checkoutMethod, - openBillingPortalMethod, - queryMethod, - setupPaymentMethod, -} from "./clientGenMethods"; -import { listPlansMethod } from "./clientPlanMethods"; -import { createCode, redeemCode } from "./clientReferralMethods"; - -export interface ErrorResponse { - message: string; - code: string; -} - -export type OmitCustomerType = - | "id" - | "name" - | "email" - | "fingerprint" - | "customer_id"; - -export interface AutumnClientConfig { - backendUrl?: string; - getBearerToken?: () => Promise; - customerData?: CustomerData; - includeCredentials?: boolean; - betterAuthUrl?: string; - headers?: Record; - pathPrefix?: string; // Optional API path prefix override -} - -export interface IAutumnClient { - readonly backendUrl?: string; - readonly prefix: string; - readonly headers?: Record; - readonly customerData?: CustomerData; - - // HTTP methods (stubbed for Convex) - detectCors(): Promise<{ - valid: boolean; - includeCredentials: boolean | undefined; - }>; - shouldIncludeCredentials(): Promise; - getHeaders(): Promise>; - handleFetch(options: { - path: string; - method: string; - body?: any; - }): Promise; - - post(path: string, body: any): Promise; - get(path: string): Promise; - delete(path: string): Promise; - - // Core methods - createCustomer( - params: CustomerCreateParams & { - errorOnNotFound?: boolean; - }, - ): Promise; - - // Autumn methods - attach(args: AttachParams): Promise; - checkout(args: CheckoutParams): Promise; - cancel(args: CancelParams): Promise; - openBillingPortal(args: any): Promise; - setupPayment(args: SetupPaymentParams): Promise; - query(args: QueryParams): Promise; - check(args: any): any; - - entities: { - create(args: any): Promise; - get(entityId: string, args: any): Promise; - delete(args: any): Promise; - }; - - referrals: { - createCode( - args: ReferralCreateCodeParams, - ): Promise; - redeemCode( - args: ReferralRedeemCodeParams, - ): Promise; - }; - - plans: { - list(): Promise; - }; -} - -export class AutumnClient implements IAutumnClient { - public readonly backendUrl?: string; - protected readonly getBearerToken?: () => Promise; - public readonly customerData?: CustomerData; - protected includeCredentials?: boolean; - public readonly prefix: string; - public readonly camelCase: boolean; - public readonly headers?: Record; - public readonly framework?: string; - - constructor({ - backendUrl, - getBearerToken, - customerData, - includeCredentials, - betterAuthUrl, - headers, - pathPrefix, - }: AutumnClientConfig) { - this.backendUrl = backendUrl; - this.getBearerToken = getBearerToken; - this.customerData = customerData; - this.includeCredentials = includeCredentials; - this.prefix = "/api/autumn"; - let camelCase = false; - - if (betterAuthUrl) { - this.prefix = "/api/auth/autumn"; - this.backendUrl = betterAuthUrl; - camelCase = true; - } - - // If an explicit prefix is provided, prefer it over defaults - const providedPrefix = pathPrefix; - if (providedPrefix) { - // Normalize: ensure leading '/', collapse multiple '/', remove trailing '/' - const normalized = `/${providedPrefix}` - .replace(/\/+/g, "/") - .replace(/\/$/, ""); - this.prefix = normalized; - } - - this.headers = headers; - - // Feature-flags for input camelCase: - if (betterAuthUrl) camelCase = true; - this.camelCase = camelCase; - } - - /** - * Detects if the backend supports CORS credentials by making an OPTIONS request - */ - public async detectCors() { - if (this.prefix?.includes("/api/auth")) { - return { valid: true, includeCredentials: true }; - } - - const testEndpoint = `${this.backendUrl}${this.prefix}/cors`; - - // Test 1: With credentials - try { - await fetch(testEndpoint, { - method: "POST", - credentials: "include", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({}), - }); - - return { valid: true, includeCredentials: true }; - } catch (_) { - // Test 2: Without credentials - try { - await fetch(testEndpoint, { - method: "POST", - credentials: "omit", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({}), - }); - - return { valid: true, includeCredentials: false }; - } catch (_) { - return { valid: false, includeCredentials: undefined }; - } - } - } - - /** - * Automatically determines whether to include credentials based on CORS detection - */ - public async shouldIncludeCredentials(): Promise { - // If explicitly set, always use that value - if (this.includeCredentials !== undefined) { - return this.includeCredentials; - } - - try { - const corsResult = await this.detectCors(); - if (corsResult.valid) { - console.warn( - `[Autumn] Detected CORS credentials: ${corsResult.includeCredentials}`, - ); - console.warn( - `[Autumn] To disable this warning, you can set includeCredentials={${ - corsResult.includeCredentials ? "true" : "false" - }} in `, - ); - this.includeCredentials = corsResult.includeCredentials; - return corsResult.includeCredentials || false; - } - - console.warn(`[Autumn] CORS detection failed, defaulting to false`); - return false; - } catch (error: any) { - console.error(`[Autumn] Error detecting CORS: ${error.message}`); - return false; - } - } - - async getHeaders() { - let headers: Record = { - "Content-Type": "application/json", - }; - - if (this.getBearerToken) { - try { - const token = await this.getBearerToken(); - headers.Authorization = `Bearer ${token}`; - } catch (_) { - console.error(`Failed to call getToken() in AutumnProvider`); - } - } - - if (this.headers) { - headers = { ...headers, ...this.headers }; - } - - return headers; - } - - async handleFetch>({ - path, - method, - body, - }: { - path: string; - method: string; - body?: any; - }) { - body = - method === "POST" - ? { - ...body, - [this.camelCase ? "customerData" : "customer_data"]: - this.customerData || undefined, - } - : undefined; - - const includeCredentials = await this.shouldIncludeCredentials(); - - try { - const response = await fetch(`${this.backendUrl}${path}`, { - method, - body: body ? JSON.stringify(body) : undefined, - headers: await this.getHeaders(), - credentials: includeCredentials ? "include" : "omit", - }); - - const loggedError = await logAuthError(response); - - return await handleFetchResult({ - response, - logger: console, - logError: !loggedError, - }); - } catch (error: unknown) { - logFetchError({ - method, - backendUrl: this.backendUrl || "", - path, - error, - }); - throw error; - // return { - // data: null, - // error: new AutumnError({ - // message: - // error instanceof Error ? error.message : JSON.stringify(error), - // code: "fetch_failed", - // }), - // }; - } - } - - async post(path: string, body: T | T[]) { - return await this.handleFetch({ - path, - method: "POST", - body, - }); - } - - async get(path: string) { - return await this.handleFetch({ - path, - method: "GET", - }); - } - - async delete(path: string) { - return await this.handleFetch({ - path, - method: "DELETE", - }); - } - - async createCustomer( - params: CustomerCreateParams & { errorOnNotFound?: boolean }, - ) { - return await createCustomerMethod({ - client: this, - params, - }); - } - - attach = attachMethod.bind(this); - checkout = checkoutMethod.bind(this); - cancel = cancelMethod.bind(this); - check = checkMethod.bind(this); - openBillingPortal = openBillingPortalMethod.bind(this); - setupPayment = setupPaymentMethod.bind(this); - query = queryMethod.bind(this); - - entities = { - create: createEntityMethod.bind(this), - get: getEntityMethod.bind(this), - delete: deleteEntityMethod.bind(this), - }; - - referrals = { - createCode: createCode.bind(this), - redeemCode: redeemCode.bind(this), - }; - - plans = { - list: listPlansMethod.bind(this), - }; -} diff --git a/autumn-js/src/libraries/react/client/clientAnalyticsMethods.ts b/autumn-js/src/libraries/react/client/clientAnalyticsMethods.ts deleted file mode 100644 index 74526b08..00000000 --- a/autumn-js/src/libraries/react/client/clientAnalyticsMethods.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { AutumnPromise } from "../../../sdk"; -import type { EventsListResponse } from "../../../sdk/events/eventTypes"; -import type { AutumnClient } from "./ReactAutumnClient"; -import type { - EventAggregationParams, - EventAggregationResponse, - EventsListParams, -} from "./types/clientAnalyticsTypes"; - -export async function eventListMethod( - this: AutumnClient, - params: EventsListParams, -): AutumnPromise { - const res = await this.post(`${this.prefix}/events/list`, params); - - return res; -} - -export async function eventAggregateMethod( - this: AutumnClient, - params: EventAggregationParams, -): AutumnPromise { - const res = await this.post(`${this.prefix}/events/aggregate`, params); - return res; -} diff --git a/autumn-js/src/libraries/react/client/clientCompMethods.ts b/autumn-js/src/libraries/react/client/clientCompMethods.ts deleted file mode 100644 index 8aaafce5..00000000 --- a/autumn-js/src/libraries/react/client/clientCompMethods.ts +++ /dev/null @@ -1,9 +0,0 @@ -// import { AutumnClient } from "./ReactAutumnClient"; -// import { AutumnPromise, PricingTableProduct } from "../../../sdk"; - -// export async function getPricingTableMethod(this: AutumnClient): AutumnPromise<{ -// list: PricingTableProduct[]; -// }> { -// const res = await this.get(`${this.prefix}/components/pricing_table`); -// return res; -// } diff --git a/autumn-js/src/libraries/react/client/clientCusMethods.ts b/autumn-js/src/libraries/react/client/clientCusMethods.ts deleted file mode 100644 index 31e9d46a..00000000 --- a/autumn-js/src/libraries/react/client/clientCusMethods.ts +++ /dev/null @@ -1,14 +0,0 @@ -import Autumn from "@sdk"; -import { AutumnClient, OmitCustomerType } from "./ReactAutumnClient"; - - -export const createCustomerMethod = async ({ - client, - params, -}: { - client: AutumnClient; - params: Omit; -}): Promise => { - let result = await client.post(`${client.prefix}/customers`, params); - return result; -}; diff --git a/autumn-js/src/libraries/react/client/clientEntityMethods.ts b/autumn-js/src/libraries/react/client/clientEntityMethods.ts deleted file mode 100644 index 3a6d91f5..00000000 --- a/autumn-js/src/libraries/react/client/clientEntityMethods.ts +++ /dev/null @@ -1,36 +0,0 @@ - -import Autumn from "@sdk"; -import { getEntityExpandStr } from "../../../utils/entityUtils"; -import type { AutumnClient } from "./ReactAutumnClient"; -// import type { -// CreateEntityParams, -// GetEntityParams, -// } from "./types/clientEntTypes"; -import { EntityCreateParams, EntityGetParams } from "@/clientTypes"; - -export async function createEntityMethod( - this: AutumnClient, - params: EntityCreateParams -): Promise { - const res = await this.post(`${this.prefix}/entities`, params); - return res; -} - -export async function getEntityMethod( - this: AutumnClient, - entityId: string, - params?: EntityGetParams -): Promise { - const expand = getEntityExpandStr(params?.expand as Array); - const res = await this.get(`${this.prefix}/entities/${entityId}?${expand}`); - - return res; -} - -export async function deleteEntityMethod( - this: AutumnClient, - entityId: string -): Promise { - const res = await this.delete(`${this.prefix}/entities/${entityId}`); - return res; -} diff --git a/autumn-js/src/libraries/react/client/clientGenMethods.ts b/autumn-js/src/libraries/react/client/clientGenMethods.ts deleted file mode 100644 index 4894f297..00000000 --- a/autumn-js/src/libraries/react/client/clientGenMethods.ts +++ /dev/null @@ -1,72 +0,0 @@ -import type { Autumn } from "@sdk"; -import type { - AttachParams, - BillingPortalParams, - CancelParams, - CheckoutParams, - CheckParams, - QueryParams, - SetupPaymentParams, -} from "@/clientTypes"; -import type { AutumnClient } from "./ReactAutumnClient"; - -export async function checkoutMethod( - this: AutumnClient, - params: CheckoutParams, -): Promise { - const res = await this.post(`${this.prefix}/checkout`, params); - return res; -} - -export async function attachMethod( - this: AutumnClient, - params: AttachParams, -): Promise { - const res = await this.post(`${this.prefix}/attach`, params); - return res; -} -export async function setupPaymentMethod( - this: AutumnClient, - params: SetupPaymentParams, -): Promise { - const res = await this.post(`${this.prefix}/setup_payment`, params); - return res; -} - -export async function cancelMethod( - this: AutumnClient, - params: CancelParams, -): Promise { - const res = await this.post(`${this.prefix}/cancel`, params); - return res; -} - -export async function checkMethod( - this: AutumnClient, - params: CheckParams, -): Promise { - // Remove dialog from params - const noDialogParams = { - ...params, - dialog: undefined, - }; - - const res = await this.post(`${this.prefix}/check`, noDialogParams); - return res; -} - -export async function openBillingPortalMethod( - this: AutumnClient, - params?: BillingPortalParams, -): Promise { - const res = await this.post(`${this.prefix}/billing_portal`, params || {}); - return res; -} - -export async function queryMethod( - this: AutumnClient, - params: QueryParams, -): Promise { - const res = await this.post(`${this.prefix}/query`, params); - return res; -} diff --git a/autumn-js/src/libraries/react/client/clientPlanMethods.ts b/autumn-js/src/libraries/react/client/clientPlanMethods.ts deleted file mode 100644 index 391fecdf..00000000 --- a/autumn-js/src/libraries/react/client/clientPlanMethods.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type Autumn from "@sdk"; -import type { AutumnClient } from "./ReactAutumnClient"; - -export async function listPlansMethod( - this: AutumnClient, -): Promise { - const res = await this.get(`${this.prefix}/plans`); - return res; -} diff --git a/autumn-js/src/libraries/react/client/clientReferralMethods.ts b/autumn-js/src/libraries/react/client/clientReferralMethods.ts deleted file mode 100644 index 860e3b05..00000000 --- a/autumn-js/src/libraries/react/client/clientReferralMethods.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { Autumn } from "@sdk"; -import type { - ReferralCreateCodeParams, - ReferralRedeemCodeParams, -} from "@/clientTypes"; -import type { AutumnClient } from "./ReactAutumnClient"; - -export async function createCode( - this: AutumnClient, - params: ReferralCreateCodeParams, -): Promise { - const res = await this.post(`${this.prefix}/referrals/code`, params); - return res; -} - -export async function redeemCode( - this: AutumnClient, - params: ReferralRedeemCodeParams, -): Promise { - const res = await this.post(`${this.prefix}/referrals/redeem`, params); - return res; -} diff --git a/autumn-js/src/libraries/react/client/types/clientAnalyticsTypes.ts b/autumn-js/src/libraries/react/client/types/clientAnalyticsTypes.ts deleted file mode 100644 index 2b8eb900..00000000 --- a/autumn-js/src/libraries/react/client/types/clientAnalyticsTypes.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { z } from "zod/v4"; - -export const PagePaginationDefaults = { - Limit: 100, - MaxLimit: 1000, -}; - -export const PagePaginationQuerySchema = z.object({ - offset: z.coerce - .number() - .int() - .min(0) - .default(0) - .optional() - .describe("Number of items to skip"), - limit: z.coerce - .number() - .int() - .min(1) - .max(PagePaginationDefaults.MaxLimit) - .optional() - .describe( - `Number of items to return. Default ${PagePaginationDefaults.Limit}, max ${PagePaginationDefaults.MaxLimit}.`, - ), -}); - -// Event List Types -export const EventsListParamsSchema = PagePaginationQuerySchema.extend({ - featureId: z - .string() - .min(1) - .or(z.array(z.string().min(1))) - .describe("Filter by specific feature ID(s)"), - customRange: z - .object({ - start: z.coerce - .number() - .optional() - .describe("Filter events after this timestamp (epoch milliseconds)"), - end: z.coerce - .number() - .optional() - .describe("Filter events before this timestamp (epoch milliseconds)"), - }) - .optional() - .describe("Filter events by time range"), -}); - -export type EventsListParams = z.infer; - -// Event Aggregation Types -export const RangeEnumSchema = z.enum([ - "24h", - "7d", - "30d", - "90d", - "last_cycle", - "1bc", - "3bc", -]); - -export type RangeEnum = z.infer; - -export const BinSizeEnumSchema = z.enum(["day", "hour"]).default("day"); - -export type BinSizeEnum = z.infer; - -export const EventAggregationParamsSchema = z.object({ - featureId: z - .string() - .min(1) - .or(z.array(z.string().min(1))) - .describe("Feature ID(s) to aggregate"), - groupBy: z - .string() - .startsWith("properties.") - .optional() - .describe("Group results by a property field (e.g., 'properties.region')"), - range: RangeEnumSchema.optional().describe( - "Predefined time range. One of: 24h, 7d, 30d, 90d, last_cycle, 1bc, 3bc", - ), - binSize: BinSizeEnumSchema.describe( - "Bin size for aggregation: 'day' or 'hour'", - ).optional(), - customRange: z - .object({ - start: z.number().describe("Start timestamp (epoch milliseconds)"), - end: z.number().describe("End timestamp (epoch milliseconds)"), - }) - .optional() - .describe("Custom time range (mutually exclusive with range)"), -}); - -export type EventAggregationParams = z.infer< - typeof EventAggregationParamsSchema ->; - -export type FlatAggregatedRow = { - period: number; - [featureName: string]: number; -}; - -export type GroupedAggregatedRow = { - period: number; -} & { - [featureName: string]: Record; -}; - -export type AggregatedEventRow = FlatAggregatedRow | GroupedAggregatedRow; - -export const EventAggregationTotalSchema = z.record( - z.string(), - z.object({ - count: z.number(), - sum: z.number(), - }), -); - -export type EventAggregationTotal = z.infer; - -export type EventAggregationResponse = { - list: AggregatedEventRow[]; - total: EventAggregationTotal; -}; - -// export const EventListResponseSchema = z.object({ -// list: z -// .array(EventListItemSchema) -// .describe("Array of events for current page"), -// has_more: z.boolean().describe("Whether more results exist after this page"), -// next_cursor: z -// .string() -// .nullable() -// .describe("Opaque cursor for next page. Null if no more results."), -// }); - -// export type EventListResponse = z.infer; diff --git a/autumn-js/src/libraries/react/clientTypes/attachTypes.ts b/autumn-js/src/libraries/react/clientTypes/attachTypes.ts deleted file mode 100644 index 5d6d9705..00000000 --- a/autumn-js/src/libraries/react/clientTypes/attachTypes.ts +++ /dev/null @@ -1,125 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; -import { CustomerDataSchema } from "./customerDataTypes"; -import { EntityDataSchema } from "./entityDataTypes"; -import type { CustomerData } from "./customerDataTypes"; -import type { EntityData } from "./entityDataTypes"; - -export const AttachParamsOptionSchema = z.object({ - featureId: z.string(), - quantity: z.number(), - adjustableQuantity: z.boolean().nullable().optional(), - internalFeatureId: z.string().nullable().optional(), - upcomingQuantity: z.number().nullable().optional() -}); - -export const AttachParamsSchema = z.object({ - checkoutSessionParams: z.unknown().describe("Additional parameters to pass onto Stripe when creating the checkout session").optional(), - customerData: CustomerDataSchema.describe("If auto creating a customer, the properties from this field will be used.").optional(), - entityData: EntityDataSchema.describe("If attaching a product to an entity and auto creating the entity, the properties\nfrom this field will be used. feature_id is required.").optional(), - entityId: z.string().nullable().describe("If attaching a product to an entity, can be used to auto create the entity").optional(), - forceCheckout: z.boolean().describe("Always return a Stripe Checkout URL, even if the customer's card is already on\nfile").optional(), - freeTrial: z.boolean().describe("If the product has a free trial, this field can be used to disable it when\nattaching (by passing in false)").optional(), - invoice: z.boolean().optional(), - options: z.array(AttachParamsOptionSchema).nullable().describe("Pass in quantities for prepaid features").optional(), - productId: z.string().nullable().describe("Product ID, set when creating the product in the Autumn dashboard").optional(), - productIds: z.array(z.string()).nullable().describe("Can be used to attach multiple products to the customer at once. For example,\nattaching a main product and an add-on.").optional(), - reward: z.union([z.string(), z.array(z.string())]).describe("An Autumn promo_code or reward_id to apply at checkout").optional(), - setupPayment: z.boolean().optional(), - successUrl: z.string().describe("URL to redirect to after the purchase is successful").optional(), - dialog: z.any().optional().describe("DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead."), - openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab"), - metadata: z.record(z.string(), z.string()).optional().describe("Additional metadata for the request") -}); - -export interface AttachParamsOption { - featureId: string; - - quantity: number; - - adjustableQuantity?: boolean | null; - - internalFeatureId?: string | null; - - upcomingQuantity?: number | null; -} - -export interface AttachParams { - /** - * Additional parameters to pass onto Stripe when creating the checkout session - */ - checkoutSessionParams?: unknown; - - /** - * If auto creating a customer, the properties from this field will be used. - */ - customerData?: CustomerData; - - /** - * If attaching a product to an entity and auto creating the entity, the properties -from this field will be used. feature_id is required. - */ - entityData?: EntityData; - - /** - * If attaching a product to an entity, can be used to auto create the entity - */ - entityId?: string | null; - - /** - * Always return a Stripe Checkout URL, even if the customer's card is already on -file - */ - forceCheckout?: boolean; - - /** - * If the product has a free trial, this field can be used to disable it when -attaching (by passing in false) - */ - freeTrial?: boolean; - - invoice?: boolean; - - /** - * Pass in quantities for prepaid features - */ - options?: AttachParamsOption[] | null; - - /** - * Product ID, set when creating the product in the Autumn dashboard - */ - productId?: string | null; - - /** - * Can be used to attach multiple products to the customer at once. For example, -attaching a main product and an add-on. - */ - productIds?: string[] | null; - - /** - * An Autumn promo_code or reward_id to apply at checkout - */ - reward?: string | Array; - - setupPayment?: boolean; - - /** - * URL to redirect to after the purchase is successful - */ - successUrl?: string; - - /** - * DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead. - */ - dialog?: any; - - /** - * Whether to open checkout in a new tab - */ - openInNewTab?: boolean; - - /** - * Additional metadata for the request - */ - metadata?: Record; -} diff --git a/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts b/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts deleted file mode 100644 index 2f0780ff..00000000 --- a/autumn-js/src/libraries/react/clientTypes/billingPortalTypes.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; - -export const BillingPortalParamsSchema = z.object({ - returnUrl: z.string().describe("Time range for the query (defaults to last_cycle if not provided)").optional(), - openInNewTab: z.boolean().optional().describe("Whether to open billing portal in a new tab") -}); - -export interface BillingPortalParams { - /** - * Time range for the query (defaults to last_cycle if not provided) - */ - returnUrl?: string; - - /** - * Whether to open billing portal in a new tab - */ - openInNewTab?: boolean; -} diff --git a/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts b/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts deleted file mode 100644 index b43f2f86..00000000 --- a/autumn-js/src/libraries/react/clientTypes/cancelTypes.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; - -export const CancelParamsSchema = z.object({ - productId: z.string().describe("The ID of the product to cancel"), - cancelImmediately: z.boolean().describe("Whether to cancel the product immediately or at period end").optional(), - entityId: z.string().nullable().describe("The ID of the entity (optional)").optional(), - prorate: z.boolean().nullable().describe("Whether to prorate the cancellation (defaults to true if not specified)").optional() -}); - -export interface CancelParams { - /** - * The ID of the product to cancel - */ - productId: string; - - /** - * Whether to cancel the product immediately or at period end - */ - cancelImmediately?: boolean; - - /** - * The ID of the entity (optional) - */ - entityId?: string | null; - - /** - * Whether to prorate the cancellation (defaults to true if not specified) - */ - prorate?: boolean | null; -} diff --git a/autumn-js/src/libraries/react/clientTypes/checkTypes.ts b/autumn-js/src/libraries/react/clientTypes/checkTypes.ts deleted file mode 100644 index 16833ae8..00000000 --- a/autumn-js/src/libraries/react/clientTypes/checkTypes.ts +++ /dev/null @@ -1,55 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; -import type { CustomerData } from "./customerDataTypes"; -import { CustomerDataSchema } from "./customerDataTypes"; -import type { EntityData } from "./entityDataTypes"; -import { EntityDataSchema } from "./entityDataTypes"; - -export const CheckParamsSchema = z.object({ - customerData: CustomerDataSchema.describe( - "Used to add customer details like name or email when auto-creating a customer.", - ).optional(), - entityData: EntityDataSchema.optional(), - entityId: z.string().optional(), - featureId: z.string().optional(), - productId: z.string().optional(), - properties: z.record(z.string(), z.unknown()).optional(), - requiredBalance: z.number().optional(), - requiredQuantity: z.number().optional(), - sendEvent: z.boolean().optional(), - withPreview: z.boolean().optional(), - dialog: z - .any() - .optional() - .describe("Dialog configuration for feature check flow"), -}); - -export interface CheckParams { - /** - * Used to add customer details like name or email when auto-creating a customer. - */ - customerData?: CustomerData; - - entityData?: EntityData; - - entityId?: string; - - featureId?: string; - - productId?: string; - - properties?: { [key: string]: unknown }; - - requiredBalance?: number; - - requiredQuantity?: number; - - sendEvent?: boolean; - - withPreview?: boolean; - - /** - * Dialog configuration for feature check flow - */ - dialog?: any; -} diff --git a/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts b/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts deleted file mode 100644 index 8481c9ea..00000000 --- a/autumn-js/src/libraries/react/clientTypes/checkoutTypes.ts +++ /dev/null @@ -1,119 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; -import { CustomerDataSchema } from "./customerDataTypes"; -import { EntityDataSchema } from "./entityDataTypes"; -import type { CustomerData } from "./customerDataTypes"; -import type { EntityData } from "./entityDataTypes"; - -export const CheckoutParamsOptionSchema = z.object({ - featureId: z.string(), - quantity: z.number(), - adjustableQuantity: z.boolean().nullable().optional(), - internalFeatureId: z.string().nullable().optional(), - upcomingQuantity: z.number().nullable().optional() -}); - -export const CheckoutParamsSchema = z.object({ - checkoutSessionParams: z.unknown().describe("Additional parameters to pass onto Stripe when creating the checkout session").optional(), - customerData: CustomerDataSchema.describe("If auto creating a customer, the properties from this field will be used.").optional(), - entityData: EntityDataSchema.describe("If attaching a product to an entity and auto creating the entity, the properties\nfrom this field will be used. feature_id is required.").optional(), - entityId: z.string().nullable().describe("If attaching a product to an entity, can be used to auto create the entity").optional(), - forceCheckout: z.boolean().describe("Always return a Stripe Checkout URL, even if the customer's card is already on\nfile").optional(), - freeTrial: z.boolean().describe("If the product has a free trial, this field can be used to disable it when\nattaching (by passing in false)").optional(), - invoice: z.boolean().optional(), - options: z.array(CheckoutParamsOptionSchema).nullable().describe("Pass in quantities for prepaid features").optional(), - productId: z.string().nullable().describe("Product ID, set when creating the product in the Autumn dashboard").optional(), - productIds: z.array(z.string()).nullable().describe("Can be used to attach multiple products to the customer at once. For example,\nattaching a main product and an add-on.").optional(), - reward: z.union([z.string(), z.array(z.string())]).describe("An Autumn promo_code or reward_id to apply at checkout").optional(), - setupPayment: z.boolean().optional(), - successUrl: z.string().describe("URL to redirect to after the purchase is successful").optional(), - dialog: z.any().optional().describe("Dialog configuration for checkout flow"), - openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab") -}); - -export interface CheckoutParamsOption { - featureId: string; - - quantity: number; - - adjustableQuantity?: boolean | null; - - internalFeatureId?: string | null; - - upcomingQuantity?: number | null; -} - -export interface CheckoutParams { - /** - * Additional parameters to pass onto Stripe when creating the checkout session - */ - checkoutSessionParams?: unknown; - - /** - * If auto creating a customer, the properties from this field will be used. - */ - customerData?: CustomerData; - - /** - * If attaching a product to an entity and auto creating the entity, the properties -from this field will be used. feature_id is required. - */ - entityData?: EntityData; - - /** - * If attaching a product to an entity, can be used to auto create the entity - */ - entityId?: string | null; - - /** - * Always return a Stripe Checkout URL, even if the customer's card is already on -file - */ - forceCheckout?: boolean; - - /** - * If the product has a free trial, this field can be used to disable it when -attaching (by passing in false) - */ - freeTrial?: boolean; - - invoice?: boolean; - - /** - * Pass in quantities for prepaid features - */ - options?: CheckoutParamsOption[] | null; - - /** - * Product ID, set when creating the product in the Autumn dashboard - */ - productId?: string | null; - - /** - * Can be used to attach multiple products to the customer at once. For example, -attaching a main product and an add-on. - */ - productIds?: string[] | null; - - /** - * An Autumn promo_code or reward_id to apply at checkout - */ - reward?: string | Array; - - setupPayment?: boolean; - - /** - * URL to redirect to after the purchase is successful - */ - successUrl?: string; - - /** - * Dialog configuration for checkout flow - */ - dialog?: any; - - /** - * Whether to open checkout in a new tab - */ - openInNewTab?: boolean; -} diff --git a/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts b/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts deleted file mode 100644 index 2f0266e6..00000000 --- a/autumn-js/src/libraries/react/clientTypes/createCustomerTypes.ts +++ /dev/null @@ -1,78 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; -import { EntityDataSchema } from "./entityDataTypes"; -import type { EntityData } from "./entityDataTypes"; - -export const CustomerCreateParamsSchema = z.object({ - expand: z.union([z.unknown(), z.literal('invoices'), z.literal('trials_used'), z.literal('rewards'), z.literal('entities'), z.literal('referrals'), z.literal('payment_method'), z.literal('upcoming_invoice'), z.literal('subscriptions.plan'), z.unknown()]).describe("Query param:").optional(), - disableDefault: z.boolean().describe("Body param:").optional(), - email: z.string().nullable().describe("Body param: Customer's email address").optional(), - entityData: EntityDataSchema.describe("Body param: Data for creating an entity").optional(), - entityId: z.string().describe("Body param: Entity ID to associate with the customer").optional(), - fingerprint: z.string().describe("Body param: Unique identifier (eg, serial number) to detect duplicate customers\nand prevent free trial abuse").optional(), - metadata: z.record(z.string(), z.unknown()).nullable().describe("Body param: Additional metadata for the customer").optional(), - name: z.string().nullable().describe("Body param: Customer's name").optional(), - stripeId: z.string().describe("Body param: Stripe customer ID if you already have one").optional(), - errorOnNotFound: z.boolean().optional().describe("Whether to return an error if customer is not found") -}); - -export interface CustomerCreateParams { - /** - * Query param: - */ - expand?: (| 'invoices' - | 'trials_used' - | 'rewards' - | 'entities' - | 'referrals' - | 'payment_method' - | 'upcoming_invoice' - | 'subscriptions.plan' - | 'balances.feature')[]; - - /** - * Body param: - */ - disableDefault?: boolean; - - /** - * Body param: Customer's email address - */ - email?: string | null; - - /** - * Body param: Data for creating an entity - */ - entityData?: EntityData; - - /** - * Body param: Entity ID to associate with the customer - */ - entityId?: string; - - /** - * Body param: Unique identifier (eg, serial number) to detect duplicate customers -and prevent free trial abuse - */ - fingerprint?: string; - - /** - * Body param: Additional metadata for the customer - */ - metadata?: { [key: string]: unknown } | null; - - /** - * Body param: Customer's name - */ - name?: string | null; - - /** - * Body param: Stripe customer ID if you already have one - */ - stripeId?: string; - - /** - * Whether to return an error if customer is not found - */ - errorOnNotFound?: boolean; -} diff --git a/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts b/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts deleted file mode 100644 index 6b0109fc..00000000 --- a/autumn-js/src/libraries/react/clientTypes/createEntityTypes.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; -import { CustomerDataSchema } from "./customerDataTypes"; -import type { CustomerData } from "./customerDataTypes"; - -export const EntityCreateParamsSchema = z.object({ - id: z.string().nullable().describe("The ID of the entity"), - featureId: z.string().describe("The ID of the feature this entity is associated with"), - customerData: CustomerDataSchema.describe("Used to add customer details like name or email when auto-creating a customer.").optional(), - name: z.string().nullable().describe("The name of the entity").optional() -}); - -export interface EntityCreateParams { - /** - * The ID of the entity - */ - id: string | null; - - /** - * The ID of the feature this entity is associated with - */ - featureId: string; - - /** - * Used to add customer details like name or email when auto-creating a customer. - */ - customerData?: CustomerData; - - /** - * The name of the entity - */ - name?: string | null; -} diff --git a/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts b/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts deleted file mode 100644 index 489e6776..00000000 --- a/autumn-js/src/libraries/react/clientTypes/createReferralCodeTypes.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; - -export const ReferralCreateCodeParamsSchema = z.object({ - programId: z.string().describe("ID of your referral program") -}); - -export interface ReferralCreateCodeParams { - /** - * ID of your referral program - */ - programId: string; -} diff --git a/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts b/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts deleted file mode 100644 index 9dd1560e..00000000 --- a/autumn-js/src/libraries/react/clientTypes/customerDataTypes.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; - -export const CustomerDataSchema = z.object({ - disableDefault: z.boolean().describe("Disable default products from being attached to the customer").optional(), - email: z.string().nullable().describe("Customer's email address").optional(), - fingerprint: z.string().nullable().describe("Unique identifier (eg, serial number) to detect duplicate customers and prevent\nfree trial abuse").optional(), - metadata: z.record(z.string(), z.unknown()).nullable().describe("Additional metadata for the customer").optional(), - name: z.string().nullable().describe("Customer's name").optional(), - stripeId: z.string().nullable().describe("Stripe customer ID if you already have one").optional() -}).describe("Used to add customer details like name or email when auto-creating a customer."); - -/** - * Used to add customer details like name or email when auto-creating a customer. - */ -export interface CustomerData { - /** - * Disable default products from being attached to the customer - */ - disableDefault?: boolean; - - /** - * Customer's email address - */ - email?: string | null; - - /** - * Unique identifier (eg, serial number) to detect duplicate customers and prevent -free trial abuse - */ - fingerprint?: string | null; - - /** - * Additional metadata for the customer - */ - metadata?: { [key: string]: unknown } | null; - - /** - * Customer's name - */ - name?: string | null; - - /** - * Stripe customer ID if you already have one - */ - stripeId?: string | null; -} diff --git a/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts b/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts deleted file mode 100644 index eb322cf9..00000000 --- a/autumn-js/src/libraries/react/clientTypes/entityDataTypes.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; - -export const EntityDataSchema = z.object({ - featureId: z.string().describe("The feature ID that this entity is associated with"), - name: z.string().describe("Name of the entity").optional() -}); - -export interface EntityData { - /** - * The feature ID that this entity is associated with - */ - featureId: string; - - /** - * Name of the entity - */ - name?: string; -} diff --git a/autumn-js/src/libraries/react/clientTypes/getEntityTypes.ts b/autumn-js/src/libraries/react/clientTypes/getEntityTypes.ts deleted file mode 100644 index 51df2328..00000000 --- a/autumn-js/src/libraries/react/clientTypes/getEntityTypes.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; - -export const EntityGetParamsSchema = z.object({ - expand: z.array(z.unknown()).describe("Query param:").optional() -}); - -export interface EntityGetParams { - /** - * Query param: - */ - expand?: 'invoices'[]; -} diff --git a/autumn-js/src/libraries/react/clientTypes/index.ts b/autumn-js/src/libraries/react/clientTypes/index.ts deleted file mode 100644 index 5f5aa5f9..00000000 --- a/autumn-js/src/libraries/react/clientTypes/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Auto-generated exports for all camelCase types -// This file is generated by typegen pipeline -// DO NOT EDIT MANUALLY - changes will be overwritten - -export * from './customerDataTypes'; -export * from './entityDataTypes'; -export * from './createCustomerTypes'; -export * from './createEntityTypes'; -export * from './getEntityTypes'; -export * from './createReferralCodeTypes'; -export * from './redeemReferralCodeTypes'; -export * from './attachTypes'; -export * from './checkoutTypes'; -export * from './billingPortalTypes'; -export * from './setupPaymentTypes'; -export * from './cancelTypes'; -export * from './checkTypes'; -export * from './queryTypes'; diff --git a/autumn-js/src/libraries/react/clientTypes/queryTypes.ts b/autumn-js/src/libraries/react/clientTypes/queryTypes.ts deleted file mode 100644 index d95a934d..00000000 --- a/autumn-js/src/libraries/react/clientTypes/queryTypes.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; - -export const QueryParamsSchema = z.object({ - featureId: z.union([z.string(), z.array(z.string())]).describe("The feature ID(s) to query"), - range: z.union([z.literal('24h'), z.literal('7d'), z.literal('30d'), z.literal('90d'), z.literal('last_cycle')]).nullable().describe("Time range for the query (defaults to last_cycle if not provided)").optional() -}); - -export interface QueryParams { - /** - * The feature ID(s) to query - */ - featureId: string | Array; - - /** - * Time range for the query (defaults to last_cycle if not provided) - */ - range?: '24h' | '7d' | '30d' | '90d' | 'last_cycle' | null; -} diff --git a/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts b/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts deleted file mode 100644 index b65323ed..00000000 --- a/autumn-js/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; - -export const ReferralRedeemCodeParamsSchema = z.object({ - code: z.string().describe("The referral code to redeem") -}); - -export interface ReferralRedeemCodeParams { - /** - * The referral code to redeem - */ - code: string; -} diff --git a/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts b/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts deleted file mode 100644 index 48c43529..00000000 --- a/autumn-js/src/libraries/react/clientTypes/setupPaymentTypes.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; - -export const SetupPaymentParamsSchema = z.object({ - checkoutSessionParams: z.record(z.string(), z.unknown()).describe("Additional parameters for the checkout session").optional(), - successUrl: z.string().describe("URL to redirect to after successful payment setup").optional(), - openInNewTab: z.boolean().optional().describe("Whether to open payment setup in a new tab") -}); - -export interface SetupPaymentParams { - /** - * Additional parameters for the checkout session - */ - checkoutSessionParams?: { [key: string]: unknown }; - - /** - * URL to redirect to after successful payment setup - */ - successUrl?: string; - - /** - * Whether to open payment setup in a new tab - */ - openInNewTab?: boolean; -} diff --git a/autumn-js/src/libraries/react/clientTypes/trackTypes.ts b/autumn-js/src/libraries/react/clientTypes/trackTypes.ts deleted file mode 100644 index 279784e4..00000000 --- a/autumn-js/src/libraries/react/clientTypes/trackTypes.ts +++ /dev/null @@ -1,84 +0,0 @@ -// Auto-generated Zod schema -import { z } from "zod"; -import { CustomerDataSchema } from "./customerDataTypes"; -import { EntityDataSchema } from "./entityDataTypes"; -import type { CustomerData } from "./customerDataTypes"; -import type { EntityData } from "./entityDataTypes"; - -export const TrackParamsSchema = z.object({ - customerData: CustomerDataSchema.describe("Customer data to create or update the customer if they don't exist").optional(), - entityData: EntityDataSchema.describe("Data for creating the entity if it doesn't exist").optional(), - entityId: z.string().describe("The ID of the entity this event is associated with").optional(), - eventName: z.string().describe("The name of the event to track").optional(), - featureId: z.string().describe("The ID of the feature (alternative to event_name for usage events)").optional(), - idempotencyKey: z.string().describe("Idempotency key to prevent duplicate events").optional(), - overageBehavior: z.union([z.literal('cap'), z.literal('reject')]).describe("The behavior when the balance is insufficient").optional(), - properties: z.record(z.string(), z.unknown()).describe("Additional properties for the event").optional(), - setUsage: z.boolean().nullable().describe("Whether to set the usage to this value instead of increment").optional(), - skipEvent: z.boolean().describe("Skip event insertion (for stress tests). Balance is still deducted, but event is\nnot persisted to database.").optional(), - timestamp: z.number().describe("Unix timestamp in milliseconds when the event occurred").optional(), - value: z.number().describe("The value/count of the event").optional() -}); - -export interface TrackParams { - /** - * Customer data to create or update the customer if they don't exist - */ - customerData?: CustomerData; - - /** - * Data for creating the entity if it doesn't exist - */ - entityData?: EntityData; - - /** - * The ID of the entity this event is associated with - */ - entityId?: string; - - /** - * The name of the event to track - */ - eventName?: string; - - /** - * The ID of the feature (alternative to event_name for usage events) - */ - featureId?: string; - - /** - * Idempotency key to prevent duplicate events - */ - idempotencyKey?: string; - - /** - * The behavior when the balance is insufficient - */ - overageBehavior?: 'cap' | 'reject'; - - /** - * Additional properties for the event - */ - properties?: { [key: string]: unknown }; - - /** - * Whether to set the usage to this value instead of increment - */ - setUsage?: boolean | null; - - /** - * Skip event insertion (for stress tests). Balance is still deducted, but event is -not persisted to database. - */ - skipEvent?: boolean; - - /** - * Unix timestamp in milliseconds when the event occurred - */ - timestamp?: number; - - /** - * The value/count of the event - */ - value?: number; -} diff --git a/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx b/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx deleted file mode 100644 index 81076f04..00000000 --- a/autumn-js/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx +++ /dev/null @@ -1,487 +0,0 @@ -"use client"; -import * as AccordionPrimitive from "@radix-ui/react-accordion"; -// import type { CheckoutParams, CheckoutResult, ProductItem } from "@sdk"; -import type { Autumn } from "@sdk"; -import { ArrowRight, ChevronDown, Loader2 } from "lucide-react"; -import type React from "react"; -import { useEffect, useState } from "react"; -import { - Accordion, - AccordionContent, - AccordionItem, -} from "@/components/ui/accordion"; -import { Button } from "@/components/ui/button"; -import { - Dialog, - DialogContent, - DialogFooter, - DialogTitle, -} from "@/components/ui/dialog"; -import { Input } from "@/components/ui/input"; -import { - Popover, - PopoverContent, - PopoverTrigger, -} from "@/components/ui/popover"; -import { useCustomer } from "@/index"; -import { cn } from "@/lib/utils"; -import { getCheckoutContent } from "./lib/checkout-content"; - -export interface CheckoutDialogProps { - open: boolean; - setOpen: (open: boolean) => void; - checkoutResult: Autumn.CheckoutResponse; - checkoutParams?: Autumn.CheckoutParams; -} - -const formatCurrency = ({ - amount, - currency, -}: { - amount: number; - currency: string; -}) => { - return new Intl.NumberFormat("en-US", { - style: "currency", - currency: currency, - }).format(amount); -}; - -export default function CheckoutDialog(params: CheckoutDialogProps): React.JSX.Element { - const { attach } = useCustomer(); - const [checkoutResult, setCheckoutResult] = useState< - Autumn.CheckoutResponse | undefined - >(params?.checkoutResult); - - useEffect(() => { - if (params.checkoutResult) { - setCheckoutResult(params.checkoutResult); - } - }, [params.checkoutResult]); - - const [loading, setLoading] = useState(false); - - if (!checkoutResult) { - return <>; - } - - const { open, setOpen } = params; - const { title, message } = getCheckoutContent(checkoutResult); - - const isFree = checkoutResult?.product?.properties?.is_free; - const isPaid = isFree === false; - - return ( - - - {title} -
- {message} -
- - {isPaid && checkoutResult && ( - - )} - - - - -
-
- ); -} - -function PriceInformation({ - checkoutResult, - setCheckoutResult, -}: { - checkoutResult: Autumn.CheckoutResponse; - setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; -}) { - return ( -
- - -
- {checkoutResult?.has_prorations && checkoutResult.lines.length > 0 && ( - - )} - -
-
- ); -} - -function DueAmounts({ - checkoutResult, -}: { - checkoutResult: Autumn.CheckoutResponse; -}) { - const { next_cycle, product } = checkoutResult; - const nextCycleAtStr = next_cycle - ? new Date(next_cycle.starts_at).toLocaleDateString() - : undefined; - - const hasUsagePrice = product?.items.some( - (item) => item.usage_model === "pay_per_use", - ); - - const showNextCycle = next_cycle && next_cycle.total !== checkoutResult.total; - - return ( -
-
-
-

Total due today

-
- -

- {formatCurrency({ - amount: checkoutResult?.total ?? 0, - currency: checkoutResult?.currency ?? "usd", - })} -

-
- {showNextCycle && ( -
-
-

Due next cycle ({nextCycleAtStr})

-
-

- {formatCurrency({ - amount: next_cycle.total ?? 0, - currency: checkoutResult?.currency ?? "usd", - })} - {hasUsagePrice && + usage prices} -

-
- )} -
- ); -} - -function ProductItems({ - checkoutResult, - setCheckoutResult, -}: { - checkoutResult: Autumn.CheckoutResponse; - setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; -}) { - const isUpdateQuantity = - checkoutResult?.product?.scenario === "active" && - checkoutResult.product?.properties?.updateable; - - const isOneOff = checkoutResult?.product?.properties?.is_one_off; - - return ( -
-

Price

- {checkoutResult?.product?.items - .filter((item: Autumn.ProductItem) => item.type !== "feature") - .map((item, index) => { - if (item.usage_model == "prepaid") { - return ( - - ); - } - - if (isUpdateQuantity) { - return null; - } - - return ( -
-

- {item.feature - ? item.feature.name - : isOneOff - ? "Price" - : "Subscription"} -

-

- {item.display?.primary_text} {item.display?.secondary_text} -

-
- ); - })} -
- ); -} - -function CheckoutLines({ - checkoutResult, -}: { - checkoutResult: Autumn.CheckoutResponse; -}) { - return ( - - - -
-

- View details -

- -
-
- - {checkoutResult?.lines - .filter((line: Autumn.CheckoutResponse.Line) => line.amount !== 0) - .map((line, index) => { - return ( -
-

{line.description}

-

- {new Intl.NumberFormat("en-US", { - style: "currency", - currency: checkoutResult?.currency ?? "usd", - }).format(line.amount)} -

-
- ); - })} -
-
-
- ); -} - -function CustomAccordionTrigger({ - className, - children, - ...props -}: React.ComponentProps) { - return ( - - - {children} - - - ); -} - -const PrepaidItem = ({ - item, - checkoutResult, - setCheckoutResult, -}: { - item: Autumn.ProductItem; - checkoutResult: Autumn.CheckoutResponse; - setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; -}) => { - let { quantity = 0, billing_units: billingUnits = 1 } = item; - quantity = quantity ?? 0; - billingUnits = billingUnits ?? 1; - - const [quantityInput, setQuantityInput] = useState( - (quantity / billingUnits).toString(), - ); - const { checkout } = useCustomer(); - const [loading, setLoading] = useState(false); - const [open, setOpen] = useState(false); - const scenario = checkoutResult.product?.scenario; - - const handleSave = async () => { - setLoading(true); - try { - const newOptions = (checkoutResult.options ?? []) - .filter((option) => option.feature_id !== item.feature_id) - .map((option) => { - return { - featureId: option.feature_id, - quantity: option.quantity, - }; - }); - - newOptions.push({ - featureId: item.feature_id!, - quantity: Number(quantityInput) * billingUnits, - }); - - const data = await checkout({ - productId: checkoutResult.product?.id, - options: newOptions, - dialog: CheckoutDialog, - }); - - setCheckoutResult(data!); - } catch (error) { - console.error(error); - } finally { - setLoading(false); - setOpen(false); - } - }; - - const disableSelection = scenario === "renew"; - - return ( -
-
-

- {item.feature?.name} -

- - - Qty: {quantity} - {!disableSelection && } - - -
-

{item.feature?.name}

-

- {item.display?.primary_text} {item.display?.secondary_text} -

-
- -
-
- setQuantityInput(e.target.value)} - /> -

- {billingUnits > 1 && `x ${billingUnits} `} - {item.feature?.name} -

-
- - -
-
-
-
-

- {item.display?.primary_text} {item.display?.secondary_text} -

-
- ); -}; - -export const PriceItem = ({ - children, - className, - ...props -}: { - children: React.ReactNode; - className?: string; -} & React.HTMLAttributes): React.JSX.Element => { - return ( -
- {children} -
- ); -}; - -export const PricingDialogButton = ({ - children, - size, - onClick, - disabled, - className, -}: { - children: React.ReactNode; - size?: "sm" | "lg" | "default" | "icon"; - onClick: () => void; - disabled?: boolean; - className?: string; -}): React.JSX.Element => { - return ( - - ); -}; diff --git a/autumn-js/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx b/autumn-js/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx deleted file mode 100644 index 2247326b..00000000 --- a/autumn-js/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx +++ /dev/null @@ -1,149 +0,0 @@ -import { Autumn } from "@sdk"; - -import type React from "react"; - -export const getCheckoutContent = (checkoutResult: CheckoutResult): { title: React.JSX.Element; message: React.JSX.Element } => { - const { product, current_product, next_cycle } = checkoutResult; - const { is_one_off, is_free, has_trial, updateable } = product?.properties || { - is_one_off: false, - is_free: false, - has_trial: false, - updateable: false, - }; - const scenario = product?.scenario; - - const nextCycleAtStr = next_cycle - ? new Date(next_cycle.starts_at).toLocaleDateString() - : undefined; - - const productName = product?.name || ""; - - if (is_one_off) { - return { - title:

Purchase {productName}

, - message: ( -

- By clicking confirm, you will purchase {productName} and your card - will be charged immediately. -

- ), - }; - } - - if (scenario == "active" && updateable) { - if (updateable) { - return { - title:

Update Plan

, - message: ( -

- Update your prepaid quantity. You'll be charged or credited the - prorated difference based on your current billing cycle. -

- ), - }; - } - } - - if (has_trial) { - return { - title:

Start trial for {productName}

, - message: ( -

- By clicking confirm, you will start a free trial of {productName}{" "} - which ends on {nextCycleAtStr}. -

- ), - }; - } - - switch (scenario) { - case "scheduled": - return { - title:

{productName} product already scheduled

, - message: ( -

- You are currently on product {current_product?.name || ""} and are - scheduled to start {productName} on {nextCycleAtStr}. -

- ), - }; - - case "active": - return { - title:

Product already active

, - message:

You are already subscribed to this product.

, - }; - - case "new": - if (is_free) { - return { - title:

Enable {productName}

, - message: ( -

- By clicking confirm, {productName} will be enabled immediately. -

- ), - }; - } - - return { - title:

Subscribe to {productName}

, - message: ( -

- By clicking confirm, you will be subscribed to {productName} and - your card will be charged immediately. -

- ), - }; - case "renew": - return { - title:

Renew

, - message: ( -

- By clicking confirm, you will renew your subscription to{" "} - {productName}. -

- ), - }; - - case "upgrade": - return { - title:

Upgrade to {productName}

, - message: ( -

- By clicking confirm, you will upgrade to {productName} and your - payment method will be charged immediately. -

- ), - }; - - case "downgrade": - return { - title:

Downgrade to {productName}

, - message: ( -

- By clicking confirm, your current subscription to{" "} - {current_product?.name || ""} will be cancelled and a new subscription to{" "} - {productName} will begin on {nextCycleAtStr}. -

- ), - }; - - case "cancel": - return { - title:

Cancel

, - message: ( -

- By clicking confirm, your subscription to {current_product?.name || ""}{" "} - will end on {nextCycleAtStr}. -

- ), - }; - - default: - return { - title:

Change Subscription

, - message:

You are about to change your subscription.

, - }; - } -}; diff --git a/autumn-js/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx b/autumn-js/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx deleted file mode 100644 index 452eb442..00000000 --- a/autumn-js/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { Autumn } from "@sdk"; - -export const getPaywallContent = (preview?: Autumn.CheckResponse.Preview) => { - if (!preview) { - return { - title: "Feature Unavailable", - message: "This feature is not available for your account.", - }; - } - - const { scenario, products, feature_name } = preview; - - if (products.length == 0) { - switch (scenario) { - case "usage_limit": - return { - title: `Feature Unavailable`, - message: `You have reached the usage limit for ${feature_name}. Please contact us to increase your limit.`, - }; - default: - return { - title: "Feature Unavailable", - message: - "This feature is not available for your account. Please contact us to enable it.", - }; - } - } - - const nextProduct = products[0]; - - const isAddOn = nextProduct && nextProduct.is_add_on; - - const title = nextProduct.free_trial - ? `Start trial for ${nextProduct.name}` - : nextProduct.is_add_on - ? `Purchase ${nextProduct.name}` - : `Upgrade to ${nextProduct.name}`; - - let message = ""; - if (isAddOn) { - message = `Please purchase the ${nextProduct.name} add-on to continue using ${feature_name}.`; - } else { - message = `Please upgrade to the ${nextProduct.name} plan to continue using ${feature_name}.`; - } - - switch (scenario) { - case "usage_limit": - return { - title: title, - message: `You have reached the usage limit for ${feature_name}. ${message}`, - }; - case "feature_flag": - return { - title: title, - message: `This feature is not available for your account. ${message}`, - }; - default: - return { - title: "Feature Unavailable", - message: "This feature is not available for your account.", - }; - } -}; diff --git a/autumn-js/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx b/autumn-js/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx deleted file mode 100644 index 830edb74..00000000 --- a/autumn-js/src/libraries/react/components/paywall-dialog/paywall-dialog-synced.tsx +++ /dev/null @@ -1,57 +0,0 @@ -"use client"; - -import { - Dialog, - DialogContent, - DialogFooter, - DialogTitle, -} from "@/components/ui/dialog"; - -import { Button } from "@/components/ui/button"; -import { usePaywall } from "@/index"; -import { getPaywallContent } from "./lib/paywall-content"; -import { cn } from "@/lib/utils"; -import { JSX } from "react"; - -export interface PaywallDialogProps { - open: boolean; - setOpen: (open: boolean) => void; - featureId: string; - entityId?: string; -} - -export default function PaywallDialog(params?: PaywallDialogProps): JSX.Element { - const { data: preview } = usePaywall({ - featureId: params?.featureId, - entityId: params?.entityId, - }); - - if (!params || !preview) { - return <>; - } - - const { open, setOpen } = params; - const { title, message } = getPaywallContent(preview); - - return ( - - - - {title} - -
{message}
- - - -
-
- ); -} diff --git a/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx b/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx deleted file mode 100644 index 4be19754..00000000 --- a/autumn-js/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import type Autumn from "@sdk"; - -export const getPricingTableContent = ({ - plan, -}: { - plan: Autumn.Plan | null; -}) => { - if (!plan) { - return { - buttonText:

Get Started

, - }; - } - - // TODO 4: hasTrial = plan.free_trial and !trial_used - const hasTrial = plan.free_trial; - const isOneOff = plan.price?.interval === "one_off"; - const scenario = plan.customer_eligibility?.scenario; - - console.log(`Plan: ${plan.id}, Scenario: ${scenario}`); - - if (hasTrial) { - return { - buttonText:

Start Free Trial

, - }; - } - - switch (scenario) { - case "scheduled": - return { - buttonText:

Plan Scheduled

, - }; - - case "active": - return { - buttonText:

Current Plan

, - }; - - case "new": - if (isOneOff) { - return { - buttonText:

Purchase

, - }; - } - - return { - buttonText:

Get started

, - }; - - case "renew": - return { - buttonText:

Renew

, - }; - - case "upgrade": - return { - buttonText:

Upgrade

, - }; - - case "downgrade": - return { - buttonText:

Downgrade

, - }; - - case "cancel": - return { - buttonText:

Cancel Plan

, - }; - - default: - return { - buttonText:

Get Started

, - }; - } -}; diff --git a/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx b/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx deleted file mode 100644 index 7b5317b3..00000000 --- a/autumn-js/src/libraries/react/components/pricing-table/pricing-table-synced.tsx +++ /dev/null @@ -1,407 +0,0 @@ -import { Loader2 } from "lucide-react"; -import React, { createContext, useContext, useState } from "react"; -import { Button } from "@/components/ui/button"; -import { Switch } from "@/components/ui/switch"; -import type { PricingCardData, PricingCardOverride } from "@/index"; -import { CheckoutDialog, useCustomer, usePricingTable } from "@/index"; -import { cn } from "@/lib/utils"; -import { loadingStyles, spinnerStyles } from "@/utils/inject-styles"; -import { getPricingTableContent } from "./lib/pricing-table-content"; - -export default function PricingTable({ - overrides, -}: { - overrides?: PricingCardOverride[]; -}) { - const [isAnnual, setIsAnnual] = useState(false); - - const { data: customer, checkout } = useCustomer({ errorOnNotFound: false }); - const { data, isLoading, error } = usePricingTable({ overrides }); - - if (isLoading) { - return ( -
- -
- ); - } - - if (error) { - return
Something went wrong...
; - } - - const intervals = Array.from( - new Set(data?.map((p) => p.plan?.price?.interval).filter((i) => !!i)), - ); - - const multiInterval = intervals.length > 1; - - const intervalFilter = (cardData: PricingCardData) => { - const plan = cardData.plan; - const interval = plan?.price?.interval; - if (!interval) return true; - - if (multiInterval) { - if (isAnnual) { - return interval === "year"; - } else { - return interval === "month"; - } - } - - return true; - }; - - return ( -
- {data && ( - - {data.filter(intervalFilter).map((cardData, index) => { - const { plan, override } = cardData; - const scenario = plan?.customer_eligibility?.scenario; - const disabled = scenario === "active" || scenario === "scheduled"; - - return ( - { - if (override.button?.onClick) { - await override.button?.onClick?.(); - } else if (cardData.plan?.id && customer) { - await checkout({ - productId: cardData.plan?.id, - dialog: CheckoutDialog, - }); - } else { - console.error("No plan ID or onClick function provided"); - } - }, - }} - /> - ); - })} - - )} -
- ); -} - -const PricingTableContext = createContext<{ - isAnnualToggle: boolean; - setIsAnnualToggle: (isAnnual: boolean) => void; - showFeatures: boolean; -}>({ - isAnnualToggle: false, - setIsAnnualToggle: () => {}, - showFeatures: true, -}); - -export const usePricingTableContext = (componentName: string) => { - const context = useContext(PricingTableContext); - - if (context === undefined) { - throw new Error(`${componentName} must be used within `); - } - - return context; -}; - -export const PricingTableContainer = ({ - children, - data, - showFeatures = true, - className, - isAnnualToggle, - setIsAnnualToggle, - multiInterval, -}: { - children?: React.ReactNode; - data?: PricingCardData[]; - showFeatures?: boolean; - className?: string; - isAnnualToggle: boolean; - setIsAnnualToggle: (isAnnual: boolean) => void; - multiInterval: boolean; -}) => { - if (!data) { - throw new Error("data prop is empty in "); - } - - if (data.length === 0) return; - - const hasRecommended = data?.some((p) => p.override.recommend_text); - - return ( - -
- {multiInterval && ( -
cardData.override.recommend_text) && - "au-mb-8", - )} - > - -
- )} -
- {children} -
-
-
- ); -}; - -interface PricingCardProps { - data: PricingCardData; - showFeatures?: boolean; - className?: string; - onButtonClick?: (event: React.MouseEvent) => void; - buttonProps?: React.ComponentProps<"button">; -} - -export const PricingCard = ({ - data, - className, - buttonProps, -}: PricingCardProps) => { - const { plan, override } = data; - const { showFeatures } = usePricingTableContext("PricingCard"); - const { buttonText } = getPricingTableContent({ plan: plan }); - - const isRecommended = Boolean(override.recommend_text); - const mainPriceDisplay = - plan?.price === null - ? { - primary_text: "Free", - } - : (override.price?.display ?? plan?.price?.display); - - const description = override.description || plan?.description; - - const features = - override.features ?? - plan?.features?.map((feature) => ({ - feature_id: feature.feature_id, - display: feature.display, - })); - - return ( -
- {override.recommend_text && ( - - )} -
-
-
-
-

- {override?.name || plan?.name} -

- {description && ( -
-

{description}

-
- )} -
-
-

-
- {mainPriceDisplay?.primary_text}{" "} - {mainPriceDisplay?.secondary_text && ( - - {mainPriceDisplay?.secondary_text} - - )} -
-

-
-
- {showFeatures && features && features.length > 0 && ( -
- -
- )} -
-
- - {override.button?.text ?? buttonText} - -
-
-
- ); -}; - -// Pricing Feature List -export const PricingFeatureList = ({ - features, - everythingFrom, - className, -}: { - features: { - feature_id: string | null; - display?: { - primary_text?: string; - secondary_text?: string; - }; - }[]; - everythingFrom?: string; - className?: string; -}) => { - return ( -
- {everythingFrom && ( -

- Everything from {everythingFrom}, plus: -

- )} -
- {features.map((feature, index) => ( -
- {/* {showIcon && ( - - )} */} -
- {feature.display?.primary_text} - {feature.display?.secondary_text && ( - - {feature.display?.secondary_text} - - )} -
-
- ))} -
-
- ); -}; - -// Pricing Card Button -export interface PricingCardButtonProps extends React.ComponentProps<"button"> { - recommended?: boolean; - buttonUrl?: string; -} - -export const PricingCardButton = React.forwardRef< - HTMLButtonElement, - PricingCardButtonProps ->(({ recommended, children, className, onClick, ...props }, ref) => { - const [loading, setLoading] = useState(false); - - const handleClick = async (e: React.MouseEvent) => { - setLoading(true); - try { - await onClick?.(e); - } catch (error) { - console.error(error); - } finally { - setLoading(false); - } - }; - - return ( - - ); -}); -PricingCardButton.displayName = "PricingCardButton"; - -// Annual Switch -export const AnnualSwitch = ({ - isAnnualToggle, - setIsAnnualToggle, -}: { - isAnnualToggle: boolean; - setIsAnnualToggle: (isAnnual: boolean) => void; -}) => { - return ( -
- Monthly - - Annual -
- ); -}; - -export const RecommendedBadge = ({ recommended }: { recommended: string }) => { - return ( -
- {recommended} -
- ); -}; diff --git a/autumn-js/src/libraries/react/components/ui/accordion.tsx b/autumn-js/src/libraries/react/components/ui/accordion.tsx deleted file mode 100644 index fc30ee12..00000000 --- a/autumn-js/src/libraries/react/components/ui/accordion.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import * as React from "react" -import * as AccordionPrimitive from "@radix-ui/react-accordion" -import { ChevronDown } from "lucide-react" - -import { cn } from "@/lib/utils" - -const Accordion: typeof AccordionPrimitive.Root = AccordionPrimitive.Root - -type AccordionItemRef = React.ElementRef -type AccordionItemProps = React.ComponentPropsWithoutRef - -const AccordionItem: React.ForwardRefExoticComponent< - AccordionItemProps & React.RefAttributes -> = React.forwardRef(({ className, ...props }, ref) => ( - -)) -AccordionItem.displayName = "AccordionItem" - -type AccordionTriggerRef = React.ElementRef -type AccordionTriggerProps = React.ComponentPropsWithoutRef - -const AccordionTrigger: React.ForwardRefExoticComponent< - AccordionTriggerProps & React.RefAttributes -> = React.forwardRef(({ className, children, ...props }, ref) => ( - - svg]:au-rotate-180", - className - )} - {...props} - > - {children} - - - -)) -AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName - -type AccordionContentRef = React.ElementRef -type AccordionContentProps = React.ComponentPropsWithoutRef - -const AccordionContent: React.ForwardRefExoticComponent< - AccordionContentProps & React.RefAttributes -> = React.forwardRef(({ className, children, ...props }, ref) => ( - -
{children}
-
-)) -AccordionContent.displayName = AccordionPrimitive.Content.displayName - -export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } diff --git a/autumn-js/src/libraries/react/components/ui/button.tsx b/autumn-js/src/libraries/react/components/ui/button.tsx deleted file mode 100644 index 111241f8..00000000 --- a/autumn-js/src/libraries/react/components/ui/button.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import * as React from "react"; -import { Slot } from "@radix-ui/react-slot"; -import { cva, type VariantProps } from "class-variance-authority"; - -import { cn } from "@/lib/utils"; - -const buttonVariants: any = cva( - "au-inline-flex au-items-center au-justify-center au-gap-2 au-whitespace-nowrap au-rounded-md au-text-sm au-font-medium au-transition-colors focus-visible:au-outline-none focus-visible:au-ring-1 focus-visible:au-ring-ring disabled:au-pointer-events-none disabled:au-opacity-50 [&_svg]:au-pointer-events-none [&_svg]:au-size-4 [&_svg]:au-shrink-0", - { - variants: { - variant: { - default: - "au-bg-primary au-text-primary-foreground au-shadow hover:au-bg-primary/90", - destructive: - "au-bg-destructive au-text-destructive-foreground au-shadow-sm hover:au-bg-destructive/90", - outline: - "au-border au-border-input au-bg-background au-shadow-sm hover:au-bg-accent hover:au-text-accent-foreground", - secondary: - "au-bg-secondary au-text-secondary-foreground au-shadow-sm hover:au-bg-secondary/80", - ghost: "hover:au-bg-accent hover:au-text-accent-foreground", - link: "au-text-primary au-underline-offset-4 hover:au-underline", - }, - size: { - default: "au-h-9 au-px-4 au-py-2", - sm: "au-h-8 au-rounded-md au-px-3 au-text-xs", - lg: "au-h-10 au-rounded-md au-px-8", - icon: "au-h-9 au-w-9", - }, - }, - defaultVariants: { - variant: "default", - size: "default", - }, - } -); - -export interface ButtonProps - extends React.ButtonHTMLAttributes { - asChild?: boolean; - variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null; - size?: "default" | "sm" | "lg" | "icon" | null; -} - -const Button = React.forwardRef( - ({ className, variant, size, asChild = false, ...props }, ref) => { - // console.log("Button className", className); - const Comp = asChild ? Slot : "button"; - return ( - - ); - } -); -Button.displayName = "Button"; - -export { Button, buttonVariants }; diff --git a/autumn-js/src/libraries/react/components/ui/dialog.tsx b/autumn-js/src/libraries/react/components/ui/dialog.tsx deleted file mode 100644 index 823cfed3..00000000 --- a/autumn-js/src/libraries/react/components/ui/dialog.tsx +++ /dev/null @@ -1,139 +0,0 @@ -"use client"; - -import * as React from "react"; -import * as DialogPrimitive from "@radix-ui/react-dialog"; -import { X } from "lucide-react"; - -import { cn } from "@/lib/utils"; - -const Dialog: typeof DialogPrimitive.Root = DialogPrimitive.Root; - -const DialogTrigger: typeof DialogPrimitive.Trigger = DialogPrimitive.Trigger; - -const DialogPortal = ({ - children, - ...props -}: React.ComponentProps): React.JSX.Element => { - return ( - -
{children}
-
- ); -}; - -const DialogClose: typeof DialogPrimitive.Close = DialogPrimitive.Close; - -type DialogOverlayRef = React.ElementRef; -type DialogOverlayProps = React.ComponentPropsWithoutRef; - -const DialogOverlay: React.ForwardRefExoticComponent< - DialogOverlayProps & React.RefAttributes -> = React.forwardRef(({ className, ...props }, ref) => ( - -)); -DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; - -type DialogContentRef = React.ElementRef; -type DialogContentProps = React.ComponentPropsWithoutRef; - -const DialogContent: React.ForwardRefExoticComponent< - DialogContentProps & React.RefAttributes -> = React.forwardRef(({ className, children, ...props }, ref) => ( - - - - {children} - - - Close - - - -)); -DialogContent.displayName = DialogPrimitive.Content.displayName; - -const DialogHeader = ({ - className, - ...props -}: React.HTMLAttributes): React.JSX.Element => ( -
-); -DialogHeader.displayName = "DialogHeader"; - -const DialogFooter = ({ - className, - ...props -}: React.HTMLAttributes): React.JSX.Element => ( -
-); -DialogFooter.displayName = "DialogFooter"; - -type DialogTitleRef = React.ElementRef; -type DialogTitleProps = React.ComponentPropsWithoutRef; - -const DialogTitle: React.ForwardRefExoticComponent< - DialogTitleProps & React.RefAttributes -> = React.forwardRef(({ className, ...props }, ref) => ( - -)); -DialogTitle.displayName = DialogPrimitive.Title.displayName; - -type DialogDescriptionRef = React.ElementRef; -type DialogDescriptionProps = React.ComponentPropsWithoutRef; - -const DialogDescription: React.ForwardRefExoticComponent< - DialogDescriptionProps & React.RefAttributes -> = React.forwardRef(({ className, ...props }, ref) => ( - -)); -DialogDescription.displayName = DialogPrimitive.Description.displayName; - -export { - Dialog, - DialogPortal, - DialogOverlay, - DialogTrigger, - DialogClose, - DialogContent, - DialogHeader, - DialogFooter, - DialogTitle, - DialogDescription, -}; diff --git a/autumn-js/src/libraries/react/components/ui/input.tsx b/autumn-js/src/libraries/react/components/ui/input.tsx deleted file mode 100644 index f59cc9b9..00000000 --- a/autumn-js/src/libraries/react/components/ui/input.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import * as React from "react"; - -import { cn } from "@/lib/utils"; - -const Input = React.forwardRef>( - ({ className, type, onClick, ...props }, ref) => { - return ( - - ); - } -); -Input.displayName = "Input"; - -export { Input }; diff --git a/autumn-js/src/libraries/react/components/ui/popover.tsx b/autumn-js/src/libraries/react/components/ui/popover.tsx deleted file mode 100644 index f9604a1c..00000000 --- a/autumn-js/src/libraries/react/components/ui/popover.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import * as React from "react"; -import * as PopoverPrimitive from "@radix-ui/react-popover"; - -import { cn } from "@/lib/utils"; - -const Popover: typeof PopoverPrimitive.Root = PopoverPrimitive.Root; - -const PopoverTrigger: typeof PopoverPrimitive.Trigger = PopoverPrimitive.Trigger; - -const PopoverAnchor: typeof PopoverPrimitive.Anchor = PopoverPrimitive.Anchor; - -type PopoverContentRef = React.ElementRef; -type PopoverContentProps = React.ComponentPropsWithoutRef; - -const PopoverContent: React.ForwardRefExoticComponent< - PopoverContentProps & React.RefAttributes -> = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => ( - -)); -PopoverContent.displayName = PopoverPrimitive.Content.displayName; - -export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }; diff --git a/autumn-js/src/libraries/react/components/ui/switch.tsx b/autumn-js/src/libraries/react/components/ui/switch.tsx deleted file mode 100644 index 00c03351..00000000 --- a/autumn-js/src/libraries/react/components/ui/switch.tsx +++ /dev/null @@ -1,31 +0,0 @@ -"use client"; - -import * as React from "react"; -import * as SwitchPrimitives from "@radix-ui/react-switch"; - -import { cn } from "@/lib/utils"; - -type SwitchRef = React.ElementRef; -type SwitchProps = React.ComponentPropsWithoutRef; - -const Switch: React.ForwardRefExoticComponent< - SwitchProps & React.RefAttributes -> = React.forwardRef(({ className, ...props }, ref) => ( - - - -)); -Switch.displayName = SwitchPrimitives.Root.displayName; - -export { Switch }; diff --git a/autumn-js/src/libraries/react/errorUtils/logAuthError.ts b/autumn-js/src/libraries/react/errorUtils/logAuthError.ts deleted file mode 100644 index f7ffcb7f..00000000 --- a/autumn-js/src/libraries/react/errorUtils/logAuthError.ts +++ /dev/null @@ -1,17 +0,0 @@ -export const logAuthError = async (response: Response) => { - if (response.status === 401) { - let clonedResponse = response.clone(); - let data = await clonedResponse.json(); - - if (data.message.includes("Missing authorization header")) { - console.error(`[Autumn] Missing authorization header. - -Use the getBearerToken prop in to set the authorization header. -https://docs.useautumn.com/quickstart/quickstart#5-set-up-autumnprovider`); - - return true; - } - } - - return false; -}; diff --git a/autumn-js/src/libraries/react/errorUtils/logFetchError.ts b/autumn-js/src/libraries/react/errorUtils/logFetchError.ts deleted file mode 100644 index 0c2c591e..00000000 --- a/autumn-js/src/libraries/react/errorUtils/logFetchError.ts +++ /dev/null @@ -1,18 +0,0 @@ - -export const logFetchError = ({ - method, - backendUrl, - path, - error, -}: { - method: string; - backendUrl: string; - path: string; - error: any; -}) => { - - console.error(`[Autumn] Fetch failed: ${method} ${backendUrl}${path} - -1. Check that backendUrl in is correctly set. -2. Check that autumnHandler is correctly registered on your backend.`); -}; diff --git a/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts b/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts deleted file mode 100644 index 7eefb8e4..00000000 --- a/autumn-js/src/libraries/react/hooks/helpers/handleCheck.ts +++ /dev/null @@ -1,224 +0,0 @@ -import type Autumn from "@sdk"; -import type { AutumnContextParams } from "@/AutumnContext"; -import type { CheckParams } from "@/clientTypes"; -// import { -// CheckFeatureResult, -// CheckFeatureResultSchema, -// CheckProductResult, -// CheckResult, -// Customer, -// CustomerFeature, -// Entity -// } from "@sdk"; - -export interface AllowedParams { - featureId?: string; - productId?: string; - requiredBalance?: number; -} - -const getCusFeature = ({ - customer, - featureId, - requiredBalance = 1, -}: { - customer: Autumn.Customer | Autumn.Entity; - featureId: string; - requiredBalance?: number; -}) => { - // 1. If there's a cusFeature and balance > requiredBalance, use it... - const cusFeature = customer.features?.[featureId]; - if ( - cusFeature && - typeof cusFeature.balance === "number" && - cusFeature.balance >= requiredBalance - ) { - return { - cusFeature, - requiredBalance: requiredBalance, - }; - } - - // 1. If credit system exists, use it - const creditSchema = Object.values(customer.features ?? {}).find( - (f: Autumn.CustomerFeature) => - f.credit_schema && - f.credit_schema.some((c) => c.feature_id === featureId), - ); - - // 2. If there's a credit schema, use it... - if (creditSchema) { - const schemaItem = creditSchema.credit_schema?.find( - (c) => c.feature_id === featureId, - )!; - - return { - cusFeature: creditSchema, - requiredBalance: schemaItem.credit_amount * requiredBalance, - }; - } - - // 2. If no credit system exists, use the feature - return { - cusFeature: customer.features?.[featureId], - requiredBalance: requiredBalance, - }; -}; - -const getFeatureAllowed = ({ - cusFeature, - requiredBalance, -}: { - cusFeature: Autumn.CustomerFeature | undefined; - requiredBalance: number; -}) => { - if (!cusFeature) return false; - if (cusFeature.type === "static") return true; - if (cusFeature.unlimited || cusFeature.overage_allowed) return true; - if (cusFeature.usage_limit) { - const extraUsage = - (cusFeature.usage_limit || 0) - (cusFeature.included_usage || 0); - return (cusFeature.balance || 0) + extraUsage >= requiredBalance; - } - return (cusFeature.balance || 0) >= requiredBalance; -}; - -const handleFeatureCheck = ({ - customer, - isEntity, - params, -}: { - customer: Autumn.Customer | Autumn.Entity; - isEntity?: boolean; - params: AllowedParams; -}) => { - // 1. Get feature to use... - const { cusFeature, requiredBalance } = getCusFeature({ - customer, - featureId: params.featureId!, - ...(params.requiredBalance - ? { requiredBalance: params.requiredBalance } - : {}), - }); - - const allowed = getFeatureAllowed({ - cusFeature, - requiredBalance: requiredBalance ?? 1, - }); - - const result = { - allowed, - feature_id: cusFeature?.id ?? params.featureId!, - customer_id: isEntity - ? (customer as Autumn.Entity).customer_id - : customer.id, - required_balance: requiredBalance, - code: "", - ...cusFeature, - } as Autumn.CheckResponse; - - if (isEntity) { - result.entity_id = (customer as Autumn.Entity).id; - } - - try { - return result; - } catch (error) { - return result; - } -}; - -// const handleProductCheck = ({ -// customer, -// isEntity, -// params, -// }: { -// customer: Autumn.Customer | Autumn.Entity; -// isEntity?: boolean; -// params: AllowedParams; -// }) => { -// let product = customer.products.find((p) => p.id == params.productId); -// let allowed = product?.status === "active"; - -// let result = { -// allowed, -// customer_id: isEntity ? (customer as Autumn.Entity).customer_id : customer.id, -// product_id: params.productId!, -// } as CheckProductResult; -// if (product) { -// result.status = product.status; -// } - -// if (isEntity) { -// result.entity_id = (customer as Autumn.Entity).id; -// } - -// return result; -// }; - -export const openDialog = ({ - result, - params, - context, -}: { - result: Autumn.CheckResponse | null; - params: CheckParams; - context: AutumnContextParams; -}) => { - const open = result?.allowed === false && params.dialog && context; - - if (!open) return; - - const isInRenderCycle = (() => { - const stack = new Error().stack || ""; - return ( - stack.includes("renderWithHooks") || - stack.includes("updateFunctionComponent") || - stack.includes("beginWork") || - stack.includes("performUnitOfWork") || - stack.includes("workLoop") || - stack.includes("Component.render") || - stack.includes("FunctionComponent") - ); - })(); - - if (isInRenderCycle) { - context.paywallRef.current = { - component: params.dialog, - open: true, - props: params, - }; - } else { - context.paywallDialog.setComponent(params.dialog); - context.paywallDialog.setProps(params); - context.paywallDialog.setOpen(true); - } -}; - -export const handleCheck = ({ - customer, - isEntity, - params, - context, -}: { - customer: Autumn.Customer | Autumn.Entity | null; - isEntity?: boolean; - params: CheckParams; - context?: AutumnContextParams; -}): Autumn.CheckResponse => { - if (!customer) { - return { - allowed: false, - feature_id: "", - customer_id: "", - required_balance: 0, - code: "", - } as Autumn.CheckResponse; - } - - if (!params.featureId && !params.productId) { - throw new Error("allowed() requires either featureId or productId"); - } - - return handleFeatureCheck({ customer, params, isEntity }); -}; diff --git a/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx b/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx deleted file mode 100644 index b6098b95..00000000 --- a/autumn-js/src/libraries/react/hooks/helpers/useAutumnBase.tsx +++ /dev/null @@ -1,190 +0,0 @@ -import type Autumn from "@sdk"; -import type { AutumnContextParams } from "@/AutumnContext"; -import type { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; -import type { AutumnClient } from "@/client/ReactAutumnClient"; -import type { - AttachParams, - BillingPortalParams, - CancelParams, - CheckoutParams, - SetupPaymentParams, -} from "@/clientTypes"; -import { usePricingTableBase } from "../usePricingTable/usePricingTableBase"; - -export const useAutumnBase = ({ - // AutumnContext, - context, - client, - refetchCustomer, -}: { - // AutumnContext: React.Context; - context?: AutumnContextParams; - client: AutumnClient | ConvexAutumnClient; - refetchCustomer?: () => Promise; -}) => { - const { attachDialog } = context || {}; - const { refetch: refetchPricingTable } = usePricingTableBase({ client }); - - const attachWithoutDialog = async ( - params: AttachParams, - ): Promise => { - const result = await client.attach(params); - - if (result.checkout_url && typeof window !== "undefined") { - if (params.openInNewTab) { - window.open(result.checkout_url, "_blank"); - } else { - window.location.href = result.checkout_url; - } - } - - await refetchPricingTable(); - if (refetchCustomer) { - await refetchCustomer(); - } - - attachDialog?.setOpen(false); - - return result; - }; - - const checkout = async ( - params: CheckoutParams, - ): Promise => { - const data = await client.checkout(params); - const { ...rest } = params; - - if (params.dialog && params.productIds) { - throw new Error( - "Dialog and productIds are not supported together in checkout()", - ); - } - - const hasPrepaid = data.product?.items?.some( - (item: any) => item.usage_model === "prepaid", - ); - - const showDialog = hasPrepaid && params.dialog; - - if (data.url && !showDialog) { - if (params.openInNewTab) { - window.open(data.url, "_blank"); - } else { - window.location.href = data.url; - } - - return data; - } - - if (params.dialog) { - attachDialog?.setProps({ checkoutResult: data, checkoutParams: rest }); - attachDialog?.setComponent(params.dialog); - attachDialog?.setOpen(true); - } - - return data; - }; - - const attachWithDialog = async ( - params: AttachParams, - ): Promise => { - const { ...rest } = params; - - const { entityId, entityData } = params; - - const checkRes = await client.check({ - entityData, - withPreview: true, - entityId: entityId ?? undefined, - }); - - const preview = checkRes.preview; - - if (!preview) { - return await attachWithoutDialog(rest); - } else { - attachDialog?.setProps({ preview, attachParams: rest }); - attachDialog?.setOpen(true); - } - - return checkRes; - }; - - const attach = async ( - params: AttachParams, - ): Promise => { - const { dialog } = params; - - if (dialog && !attachDialog?.open) { - attachDialog?.setComponent(dialog); - return (await attachWithDialog(params)) as Autumn.AttachResponse; - } - - return await attachWithoutDialog(params); - }; - - const cancel = async ( - params: CancelParams, - ): Promise => { - const res = await client.cancel(params); - return res; - }; - - const openBillingPortal = async ( - params?: BillingPortalParams, - ): Promise => { - const defaultParams = { - openInNewTab: false, - }; - - const finalParams = { - ...defaultParams, - ...params, - }; - - const res = await client.openBillingPortal(finalParams); - - if (res.url && typeof window !== "undefined") { - if (finalParams.openInNewTab) { - window.open(res.url, "_blank"); - } else { - window.open(res.url, "_self"); - } - } - - return res; - }; - - const setupPayment = async ( - params?: SetupPaymentParams, - ): Promise => { - const defaultParams = { - openInNewTab: false, - }; - - const finalParams = { - ...defaultParams, - ...(params || {}), - }; - - const res = await client.setupPayment(finalParams); - - if (res.url && typeof window !== "undefined") { - if (finalParams.openInNewTab) { - window.open(res.url, "_blank"); - } else { - window.open(res.url, "_self"); - } - } - - return res; - }; - - return { - attach, - cancel, - openBillingPortal, - setupPayment, - checkout, - }; -}; diff --git a/autumn-js/src/libraries/react/hooks/helpers/useDialog.tsx b/autumn-js/src/libraries/react/hooks/helpers/useDialog.tsx deleted file mode 100644 index db688e73..00000000 --- a/autumn-js/src/libraries/react/hooks/helpers/useDialog.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { useState, useEffect } from "react"; - -export const useDialog = (component?: any) => { - const [dialogProps, setDialogProps] = useState(null); - const [dialogOpen, setDialogOpen] = useState(false); - - useEffect(() => { - if (!dialogOpen) { - setTimeout(() => { - setDialogProps(null); - }, 200); - } - }, [dialogOpen]); - - return [dialogProps, setDialogProps, dialogOpen, setDialogOpen]; -}; diff --git a/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts b/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts deleted file mode 100644 index ec40273d..00000000 --- a/autumn-js/src/libraries/react/hooks/types/useCustomerMethods.ts +++ /dev/null @@ -1,183 +0,0 @@ -// Auto-generated method signatures with JSDoc -// This file is generated by typegen pipeline from ts-sdk/src/client.ts -// DO NOT EDIT MANUALLY - changes will be overwritten -// -// To update documentation: -// 1. Edit JSDoc in backend server's shared/api directory -// 2. Regenerate OpenAPI spec and SDK -// 3. Run: pnpm run gen:autumn-js - -import type { Autumn } from "@sdk"; -import type { - AttachParams, - BillingPortalParams, - CancelParams, - CheckParams, - CheckoutParams, - ReferralCreateCodeParams, - ReferralRedeemCodeParams, - SetupPaymentParams, -} from "@/clientTypes"; - -/** - * Methods available in useCustomer hook for managing customer subscriptions and features - */ -export interface UseCustomerMethods { - /** - * Enables a product for a customer and processes payment if their payment method is already on file. - * Use this when the customer already has a payment method saved. - * For new customers without payment info, use `checkout` instead. - * - * @param params.product_id - Product ID, set when creating the product in the Autumn dashboard - * @param params.entity_id - If attaching a product to an entity, can be used to auto create the entity - * @param params.customer_data - If auto creating a customer, the properties from this field will be used. - * @param params.entity_data - If attaching a product to an entity and auto creating the entity, the properties from this field will be used. feature_id is required. - * @param params.product_ids - Can be used to attach multiple products to the customer at once. For example, attaching a main product and an add-on. - * @param params.options - Pass in quantities for prepaid features - * @param params.free_trial - If the product has a free trial, this field can be used to disable it when attaching (by passing in false) - * @param params.success_url - URL to redirect to after the purchase is successful - * @param params.force_checkout - Always return a Stripe Checkout URL, even if the customer's card is already on file - * @param params.checkout_session_params - Additional parameters to pass onto Stripe when creating the checkout session - * @param params.reward - An Autumn promo_code or reward_id to apply at checkout - * - * @example - * ```typescript // Attach a product to a customer const response = await client.attach({ customer_id: "cus_123", product_id: "pro_plan", }); ``` - * - * @see - * {@link https://docs.useautumn.com/api-reference/core/attach Product Attachments} - * - * @example - * ```ts const response = await client.attach({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` - */ - attach: (params: AttachParams) => Promise; - - /** - * Creates a checkout session for a customer to purchase a product with payment collection. - * Use this for new customers or when payment info is needed. - * For customers with existing payment methods, use `attach` instead. - * - * @param params.product_id - Product ID, set when creating the product in the Autumn dashboard - * @param params.entity_id - If attaching a product to an entity, can be used to auto create the entity - * @param params.customer_data - If auto creating a customer, the properties from this field will be used. - * @param params.entity_data - If attaching a product to an entity and auto creating the entity, the properties from this field will be used. feature_id is required. - * @param params.product_ids - Can be used to attach multiple products to the customer at once. For example, attaching a main product and an add-on. - * @param params.options - Pass in quantities for prepaid features - * @param params.free_trial - If the product has a free trial, this field can be used to disable it when attaching (by passing in false) - * @param params.success_url - URL to redirect to after the purchase is successful - * @param params.force_checkout - Always return a Stripe Checkout URL, even if the customer's card is already on file - * @param params.checkout_session_params - Additional parameters to pass onto Stripe when creating the checkout session - * @param params.reward - An Autumn promo_code or reward_id to apply at checkout - * - * @example - * ```typescript // Create a checkout session const response = await client.checkout({ customer_id: "cus_123", product_id: "pro_plan", }); ``` - * - * @see - * {@link https://docs.useautumn.com/api-reference/core/checkout Checkout Sessions} - * - * @example - * ```ts const response = await client.checkout({ customer_id: 'customer_id', }); ``` - */ - checkout: (params: CheckoutParams) => Promise; - - /** - * Creates a checkout session for a customer to purchase a product with payment collection. - * Use this for new customers or when payment info is needed. - * For customers with existing payment methods, use `attach` instead. - * - * @param params.product_id - Product ID, set when creating the product in the Autumn dashboard - * @param params.entity_id - If attaching a product to an entity, can be used to auto create the entity - * @param params.customer_data - If auto creating a customer, the properties from this field will be used. - * @param params.entity_data - If attaching a product to an entity and auto creating the entity, the properties from this field will be used. feature_id is required. - * @param params.product_ids - Can be used to attach multiple products to the customer at once. For example, attaching a main product and an add-on. - * @param params.options - Pass in quantities for prepaid features - * @param params.free_trial - If the product has a free trial, this field can be used to disable it when attaching (by passing in false) - * @param params.success_url - URL to redirect to after the purchase is successful - * @param params.force_checkout - Always return a Stripe Checkout URL, even if the customer's card is already on file - * @param params.checkout_session_params - Additional parameters to pass onto Stripe when creating the checkout session - * @param params.reward - An Autumn promo_code or reward_id to apply at checkout - * - * @example - * ```typescript // Create a checkout session const response = await client.checkout({ customer_id: "cus_123", product_id: "pro_plan", }); ``` - * - * @see - * {@link https://docs.useautumn.com/api-reference/core/checkout Checkout Sessions} - * - * @example - * ```ts const response = await client.check({ customer_id: 'customer_id', }); ``` - */ - check: (params: CheckParams) => Autumn.CheckResponse; - - /** - * Cancel a customer's subscription to a product. - * Use this when a customer wants to stop their subscription. - * Supports immediate or end-of-period cancellation. - * - * @param params.product_id - The ID of the product to cancel - * @param params.entity_id - The ID of the entity (optional) - * @param params.cancel_immediately - Whether to cancel the product immediately or at period end - * @param params.prorate - Whether to prorate the cancellation (defaults to true if not specified) - * - * @example - * ```typescript // Cancel a subscription const response = await client.cancel({ customer_id: "cus_123", product_id: "pro_plan", }); ``` - * - * @see - * {@link https://docs.useautumn.com/api-reference/core/cancel Cancel Subscriptions} - * - * @example - * ```ts const response = await client.cancel({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` - */ - cancel: (params: CancelParams) => Promise; - - /** - * Creates a session for a customer to add or update their payment method. - * Use this to collect payment information without immediately charging the customer. - * - * @param params.success_url - URL to redirect to after successful payment setup - * @param params.checkout_session_params - Additional parameters for the checkout session - * - * @example - * ```typescript // Setup payment method const response = await client.setupPayment({ customer_id: "cus_123", success_url: "https://example.com/success", }); ``` - * - * @see - * {@link https://docs.useautumn.com/api-reference/core/setup-payment Payment Setup} - * - * @example - * ```ts const response = await client.setupPayment({ customer_id: 'cus_123', }); ``` - */ - setupPayment: (params: SetupPaymentParams) => Promise; - - /** - * Creates a billing portal session where customers can manage their subscription and payment methods. - * Use this to give customers self-service access to view invoices, update payment info, and manage subscriptions. - * - * @param params.return_url - Time range for the query (defaults to last_cycle if not provided) - * - * @example - * ```typescript // Open billing portal const response = await client.billingPortal({ customer_id: "cus_123", return_url: "https://example.com/account", }); ``` - * - * @see - * {@link https://docs.useautumn.com/api-reference/core/billing-portal Billing Portal} - * - * @example - * ```ts const response = await client.billingPortal({ customer_id: 'cus_123', }); ``` - */ - openBillingPortal: (params: BillingPortalParams) => Promise; - - /** - * Create a referral code. - * - * - * @example - * ```ts const response = await client.referrals.createCode({ customer_id: 'cus_123', program_id: 'prog_123', }); ``` - */ - createReferralCode: (params: ReferralCreateCodeParams) => Promise; - - /** - * Redeem a referral code. - * - * - * @example - * ```ts const response = await client.referrals.redeemCode({ code: 'REF123ABC', customer_id: 'cus_456', }); ``` - */ - redeemReferralCode: (params: ReferralRedeemCodeParams) => Promise; -} diff --git a/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts b/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts deleted file mode 100644 index 76e12e42..00000000 --- a/autumn-js/src/libraries/react/hooks/types/useEntityMethods.ts +++ /dev/null @@ -1,97 +0,0 @@ -// Auto-generated method signatures with JSDoc -// This file is generated by typegen pipeline from ts-sdk/src/client.ts -// DO NOT EDIT MANUALLY - changes will be overwritten -// -// To update documentation: -// 1. Edit JSDoc in backend server's shared/api directory -// 2. Regenerate OpenAPI spec and SDK -// 3. Run: pnpm run gen:autumn-js - -import type { Autumn } from "@sdk"; -import type { - AttachParams, - CancelParams, - CheckParams, -} from "@/clientTypes"; - -/** - * Methods available in useEntity hook for entity-scoped subscription operations - */ -export interface UseEntityMethods { - /** - * Enables a product for a customer and processes payment if their payment method is already on file. - * Use this when the customer already has a payment method saved. - * For new customers without payment info, use `checkout` instead. - * - * @param params.product_id - Product ID, set when creating the product in the Autumn dashboard - * @param params.entity_id - If attaching a product to an entity, can be used to auto create the entity - * @param params.customer_data - If auto creating a customer, the properties from this field will be used. - * @param params.entity_data - If attaching a product to an entity and auto creating the entity, the properties from this field will be used. feature_id is required. - * @param params.product_ids - Can be used to attach multiple products to the customer at once. For example, attaching a main product and an add-on. - * @param params.options - Pass in quantities for prepaid features - * @param params.free_trial - If the product has a free trial, this field can be used to disable it when attaching (by passing in false) - * @param params.success_url - URL to redirect to after the purchase is successful - * @param params.force_checkout - Always return a Stripe Checkout URL, even if the customer's card is already on file - * @param params.checkout_session_params - Additional parameters to pass onto Stripe when creating the checkout session - * @param params.reward - An Autumn promo_code or reward_id to apply at checkout - * - * @example - * ```typescript // Attach a product to a customer const response = await client.attach({ customer_id: "cus_123", product_id: "pro_plan", }); ``` - * - * @see - * {@link https://docs.useautumn.com/api-reference/core/attach Product Attachments} - * - * @example - * ```ts const response = await client.attach({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` - */ - attach: (params: AttachParams) => Promise; - - /** - * Cancel a customer's subscription to a product. - * Use this when a customer wants to stop their subscription. - * Supports immediate or end-of-period cancellation. - * - * @param params.product_id - The ID of the product to cancel - * @param params.entity_id - The ID of the entity (optional) - * @param params.cancel_immediately - Whether to cancel the product immediately or at period end - * @param params.prorate - Whether to prorate the cancellation (defaults to true if not specified) - * - * @example - * ```typescript // Cancel a subscription const response = await client.cancel({ customer_id: "cus_123", product_id: "pro_plan", }); ``` - * - * @see - * {@link https://docs.useautumn.com/api-reference/core/cancel Cancel Subscriptions} - * - * @example - * ```ts const response = await client.cancel({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` - */ - cancel: (params: CancelParams) => Promise; - - /** - * Creates a checkout session for a customer to purchase a product with payment collection. - * Use this for new customers or when payment info is needed. - * For customers with existing payment methods, use `attach` instead. - * - * @param params.product_id - Product ID, set when creating the product in the Autumn dashboard - * @param params.entity_id - If attaching a product to an entity, can be used to auto create the entity - * @param params.customer_data - If auto creating a customer, the properties from this field will be used. - * @param params.entity_data - If attaching a product to an entity and auto creating the entity, the properties from this field will be used. feature_id is required. - * @param params.product_ids - Can be used to attach multiple products to the customer at once. For example, attaching a main product and an add-on. - * @param params.options - Pass in quantities for prepaid features - * @param params.free_trial - If the product has a free trial, this field can be used to disable it when attaching (by passing in false) - * @param params.success_url - URL to redirect to after the purchase is successful - * @param params.force_checkout - Always return a Stripe Checkout URL, even if the customer's card is already on file - * @param params.checkout_session_params - Additional parameters to pass onto Stripe when creating the checkout session - * @param params.reward - An Autumn promo_code or reward_id to apply at checkout - * - * @example - * ```typescript // Create a checkout session const response = await client.checkout({ customer_id: "cus_123", product_id: "pro_plan", }); ``` - * - * @see - * {@link https://docs.useautumn.com/api-reference/core/checkout Checkout Sessions} - * - * @example - * ```ts const response = await client.check({ customer_id: 'customer_id', }); ``` - */ - check: (params: CheckParams) => Autumn.CheckResponse; -} diff --git a/autumn-js/src/libraries/react/hooks/useAggregateEvents.tsx b/autumn-js/src/libraries/react/hooks/useAggregateEvents.tsx deleted file mode 100644 index 3287633c..00000000 --- a/autumn-js/src/libraries/react/hooks/useAggregateEvents.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import { AutumnError, type AutumnErrorWithStatus } from "@sdk"; -import useSWR, { type SWRConfiguration } from "swr"; -import { AutumnContext, useAutumnContext } from "@/AutumnContext"; -import type { - EventAggregationParams, - EventAggregationResponse, -} from "@/client/types/clientAnalyticsTypes"; - -export const useAggregateEvents = ( - params: EventAggregationParams & { swrConfig?: SWRConfiguration }, -) => { - const context = useAutumnContext({ - AutumnContext, - name: "useAggregateEvents", - }); - - const client = context.client; - - const fetcher = async () => { - const res = await client.events.aggregate(params); - if (res.error) { - const err: AutumnErrorWithStatus = new AutumnError({ - message: res.error.message, - code: res.error.code, - }); - err.statusCode = res.statusCode; - throw err; - } - return res.data; - }; - - const startDate = params.customRange?.start - ? new Date(params.customRange.start).toISOString().slice(0, 13) - : undefined; - - const endDate = params.customRange?.end - ? new Date(params.customRange.end).toISOString().slice(0, 13) - : undefined; - - const { data, error, mutate } = useSWR( - [ - "eventAggregate", - params.featureId, - params.groupBy, - params.range, - startDate, - endDate, - params.binSize, - ], - fetcher, - { - dedupingInterval: 2000, - revalidateOnFocus: false, - revalidateOnReconnect: false, - shouldRetryOnError: (error) => - (error as AutumnErrorWithStatus).statusCode === 429, - errorRetryCount: 3, - refreshInterval: 0, - ...params.swrConfig, - }, - ); - - return { - list: data?.list, - total: data?.total, - - isLoading: !error && !data, - error, - refetch: mutate, - }; -}; diff --git a/autumn-js/src/libraries/react/hooks/useAnalytics.tsx b/autumn-js/src/libraries/react/hooks/useAnalytics.tsx deleted file mode 100644 index 30f4ffc2..00000000 --- a/autumn-js/src/libraries/react/hooks/useAnalytics.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { AutumnContext, useAutumnContext } from "@/AutumnContext"; -import { QueryParams } from "@/clientTypes"; -import Autumn from "@sdk"; -import useSWR from "swr"; - -/** - * Query usage analytics data from your React components. - * - * The `useAnalytics` hook provides access to usage analytics and reporting data. It's the client-side equivalent of the `/query` endpoint, allowing you to fetch and display usage data directly in your React components. - * - * @param params.featureId - Feature ID(s) to query usage data for - * @param params.range - Time range for analytics query. Defaults to '30d' (optional) - * - * @returns data - Array of usage data points with period timestamps and feature usage counts - * @returns isLoading - Whether analytics data is being fetched - * @returns error - Any error that occurred while fetching - * @returns refetch - Manually refetch analytics data - * - * @see {@link https://docs.useautumn.com/api-reference/hooks/useAnalytics} - */ -export const useAnalytics = (params: QueryParams) => { - const context = useAutumnContext({ - AutumnContext, - name: "useAnalytics", - }); - - const client = context.client; - - const fetcher = async () => { - const data = await client.query(params); - - return data?.list || []; - }; - - const { data, error, mutate } = useSWR( - ["analytics", params.featureId, params.range], - fetcher, - { refreshInterval: 0 } - ); - - return { - data: data, - isLoading: !error && !data, - error, - refetch: mutate, - }; -}; diff --git a/autumn-js/src/libraries/react/hooks/useCustomer.tsx b/autumn-js/src/libraries/react/hooks/useCustomer.tsx deleted file mode 100644 index efbda753..00000000 --- a/autumn-js/src/libraries/react/hooks/useCustomer.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import type { CustomerExpandOption } from "@sdk"; -import { AutumnContext } from "../AutumnContext"; -import { - useCustomerBase, - type UseCustomerParams, - type UseCustomerResult, -} from "./useCustomerBase"; - -/** - * React hook for managing customer billing, subscriptions, and feature access. - * - * Provides access to all Autumn billing functions including product attachment, - * subscription management, usage tracking, and feature gating. Automatically - * handles customer data fetching and caching. - * - * @param params - Optional configuration for the hook - * @returns Object containing customer data and billing functions - * - * @example - * ```tsx - * import { useCustomer } from "autumn-js/react"; - * - * function MyComponent() { - * const { - * customer, - * isLoading, - * attach, - * cancel, - * check, - * track, - * checkout, - * openBillingPortal, - * setupPayment, - * createReferralCode, - * redeemReferralCode, - * createEntity, - * refetch - * } = useCustomer(); - * - * return ( - *
- * - * - *
- * ); - * } - * ``` - * - * @example - * ```tsx - * // With expanded fields - customer.entities will be typed - * const { customer } = useCustomer({ expand: ['entities', 'invoices'] }); - * customer?.entities; // Entity[] - fully typed! - * customer?.invoices; // CustomerInvoice[] - fully typed! - * ``` - * - * @returns {Object} Hook result object - * @returns {Customer | null} returns.customer - Current customer data with subscription info - * @returns {boolean} returns.isLoading - Whether customer data is loading - * @returns {AutumnError | null} returns.error - Any error from customer data fetching - * @returns {Function} returns.attach - Attach product to customer with billing - * @returns {Function} returns.cancel - Cancel customer subscription/product - * @returns {Function} returns.check - Check feature access and show paywalls - * @returns {Function} returns.track - Track feature usage events - * @returns {Function} returns.checkout - Initiate product checkout flow - * @returns {Function} returns.openBillingPortal - Open Stripe billing portal - * @returns {Function} returns.setupPayment - Setup payment method - * @returns {Function} returns.createReferralCode - Create referral codes - * @returns {Function} returns.redeemReferralCode - Redeem referral codes - * @returns {Function} returns.createEntity - Create entities for granular tracking - * @returns {Function} returns.refetch - Manually refetch customer data - */ -export const useCustomer = < - const T extends readonly CustomerExpandOption[] = readonly [], ->( - params?: UseCustomerParams, -): UseCustomerResult => { - return useCustomerBase({ - params, - AutumnContext: AutumnContext, - }); -}; diff --git a/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx b/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx deleted file mode 100644 index 16e3c790..00000000 --- a/autumn-js/src/libraries/react/hooks/useCustomerBase.tsx +++ /dev/null @@ -1,139 +0,0 @@ -/** biome-ignore-all lint/style/noNonNullAssertion: no other choice */ -import type { Autumn, AutumnError } from "@sdk"; - -import useSWR, { type SWRConfiguration } from "swr"; -import { - type AutumnContextParams, - type AutumnContextType, - useAutumnContext, -} from "@/AutumnContext"; -import type { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; -import type { AutumnClient } from "@/client/ReactAutumnClient"; -import type { CheckParams, CustomerCreateParams } from "@/clientTypes"; -import { handleCheck, openDialog } from "./helpers/handleCheck"; -import { useAutumnBase } from "./helpers/useAutumnBase"; - -import type { UseCustomerMethods } from "./types/useCustomerMethods"; - -export interface UseCustomerResult extends UseCustomerMethods { - /** The current customer data including subscription and feature information */ - data: Autumn.Customer | null; - - /** Whether customer data is currently being loaded */ - isLoading: boolean; - - /** Any error that occurred while fetching customer data */ - error: AutumnError | null; - - /** Refetches the customer data from the server */ - refetch: () => Promise; - - // All hook methods (attach, checkout, check, etc.) are inherited from UseCustomerMethods -} - -export interface UseCustomerParams { - errorOnNotFound?: boolean; - expand?: Autumn.Customers.CustomerGetParams["expand"]; - swrConfig?: SWRConfiguration; -} - -/** - * Access a customer's state and use it to display information in your React app. - * - * The `useCustomer` hook provides access to customer data and related operations. You can use it from your frontend to retrieve customer information, manage loading states, and create entities. - * - * @param params.expand - Additional data to include (invoices, rewards, trials_used, entities, referrals, payment_method) (optional) - * @param params.errorOnNotFound - Whether to throw error if customer not found (optional) - * @param params.swrConfig - SWR configuration options (optional) - * - * @returns data - Customer object with subscription and feature data - * @returns isLoading - Whether customer data is being fetched - * @returns error - Any error that occurred while fetching - * @returns refetch - Refetch customer data - * @returns ...methods - All subscription methods (attach, checkout, cancel, track, setupPayment, openBillingPortal, createReferralCode, redeemReferralCode) - * @returns createEntity - Create entities for granular feature tracking - * - * @see {@link https://docs.useautumn.com/api-reference/hooks/useCustomer} - */ -export const useCustomerBase = ({ - params, - AutumnContext, - client, -}: { - params?: UseCustomerParams; - AutumnContext?: AutumnContextType; - client?: AutumnClient | ConvexAutumnClient; -}): UseCustomerResult => { - let context: AutumnContextParams | undefined; - - if (AutumnContext) { - // biome-ignore lint/correctness/useHookAtTopLevel: needed - context = useAutumnContext({ - AutumnContext, - name: "useCustomer", - }); - } - - if (!client) { - client = context?.client; - } - - const baseUrl = client?.backendUrl || ""; - const queryKey = ["customer", baseUrl, params?.expand]; - - const fetchCustomer = async () => { - return await client?.createCustomer({ - errorOnNotFound: params?.errorOnNotFound, - expand: params?.expand?.join(",") as CustomerCreateParams["expand"], - }); - }; - - const { - data: customer, - error, - isLoading, - mutate, - } = useSWR(queryKey, fetchCustomer, { - // Default to 5 minutes - fallbackData: null, - swrConfig: { - shouldRetryOnError: false, - refreshInterval: 0, - ...params?.swrConfig, - }, - }); - - const autumnFunctions = useAutumnBase({ - context, - client: client!, - refetchCustomer: mutate, - }); - - return { - data: error ? null : customer, - isLoading, - error, - refetch: mutate as () => Promise, - - ...autumnFunctions, - createReferralCode: client!.referrals.createCode, - redeemReferralCode: client!.referrals.redeemCode, - - check: (params: CheckParams) => { - const res = handleCheck({ - customer, - params, - isEntity: false, - context, - }); - - openDialog({ - result: res, - params, - context: context!, - }); - - return res; - }, - }; -}; diff --git a/autumn-js/src/libraries/react/hooks/useEntity.tsx b/autumn-js/src/libraries/react/hooks/useEntity.tsx deleted file mode 100644 index de024de9..00000000 --- a/autumn-js/src/libraries/react/hooks/useEntity.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { AutumnContext } from "../AutumnContext"; -import { EntityGetParams } from "@/clientTypes"; -import { useEntityBase } from "./useEntityBase"; - -/** - * Access an entity's state and use it to display information in your React app. - * - * The `useEntity` hook provides access to entity data and related operations. You can use it from your frontend to retrieve entity information and manage loading states. - * - * @param entityId - The ID of the entity to retrieve - * @param params.expand - Additional data to include in entity response (optional) - * - * @returns data - Entity object with subscription and feature data - * @returns isLoading - Whether entity data is being fetched - * @returns error - Any error that occurred while fetching - * @returns refetch - Refetch entity data - * @returns ...methods - Entity-scoped methods (attach, cancel, track, check) - * - * @see {@link https://docs.useautumn.com/api-reference/hooks/useEntity} - */ -export const useEntity = ( - entityId: string | null, - params?: EntityGetParams -) => { - return useEntityBase({ AutumnContext, entityId, params }); -}; diff --git a/autumn-js/src/libraries/react/hooks/useEntityBase.tsx b/autumn-js/src/libraries/react/hooks/useEntityBase.tsx deleted file mode 100644 index 16e4a88e..00000000 --- a/autumn-js/src/libraries/react/hooks/useEntityBase.tsx +++ /dev/null @@ -1,116 +0,0 @@ -import type { Autumn, AutumnError } from "@sdk"; -import { useContext } from "react"; -import useSWR from "swr"; -import type { - AttachParams, - CancelParams, - CheckParams, - EntityGetParams, -} from "@/clientTypes"; -import { type AutumnContextParams, useAutumnContext } from "../AutumnContext"; -import { handleCheck, openDialog } from "./helpers/handleCheck"; -import { useAutumnBase } from "./helpers/useAutumnBase"; -import type { UseEntityMethods } from "./types/useEntityMethods"; - -export interface UseEntityResult extends UseEntityMethods { - /** The entity object containing all entity data */ - data: Autumn.Entity | null; - - /** Whether entity data is currently being loaded */ - isLoading: boolean; - - /** Any error that occurred while fetching entity data */ - error: AutumnError | null; - - /** Refetches the entity data from the server */ - refetch: () => Promise; - - // All hook methods (attach, cancel, track, check) are inherited from UseEntityMethods -} - -export const useEntityBase = ({ - entityId, - params, - AutumnContext, -}: { - entityId: string | null; - params?: EntityGetParams; - AutumnContext: React.Context; -}): UseEntityResult => { - const { client } = useContext(AutumnContext); - const queryKey = ["entity", entityId, params?.expand]; - - const context = useAutumnContext({ - AutumnContext, - name: "useEntity", - }); - - const fetchEntity = async () => { - if (!entityId) { - return null; - } - - return await client.entities.get(entityId, params); - }; - - const { data, error, isLoading, mutate } = useSWR(queryKey, fetchEntity, { - fallbackData: null, - shouldRetryOnError: false, - onErrorRetry: (error: any, key: any, config: any) => { - if (error.code === "entity_not_found") { - return false; - } - - return true; - }, - }); - - const { attach: attachAutumn, cancel: cancelAutumn } = useAutumnBase({ - context, - client, - }); - - const check = (params: CheckParams) => { - const result = handleCheck({ customer: data, params, isEntity: true }); - - openDialog({ - result: result, - params, - context: context, - }); - - return result; - }; - - const attach = (params: AttachParams) => - attachAutumn({ ...params, entityId: entityId || undefined }); - const cancel = (params: CancelParams) => - cancelAutumn({ ...params, entityId: entityId || undefined }); - - const refetch = async () => { - const result = await mutate(); - return result ?? null; - }; - - if (!entityId) { - return { - data: null, - isLoading: false, - error: null, - refetch, - check, - attach, - cancel, - }; - } - - return { - data: error ? null : data, - isLoading, - error, - refetch, - check, - attach, - cancel, - }; -}; diff --git a/autumn-js/src/libraries/react/hooks/useListEvents.tsx b/autumn-js/src/libraries/react/hooks/useListEvents.tsx deleted file mode 100644 index 2fb2b1ef..00000000 --- a/autumn-js/src/libraries/react/hooks/useListEvents.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import { - AutumnError, - type AutumnErrorWithStatus, - type EventsListResponse, -} from "@sdk"; -import { useCallback, useState } from "react"; -import useSWR, { type SWRConfiguration } from "swr"; -import { AutumnContext, useAutumnContext } from "@/AutumnContext"; -import type { EventsListParams } from "@/client/types/clientAnalyticsTypes"; - -export const useListEvents = ( - params: EventsListParams & { swrConfig?: SWRConfiguration }, -) => { - const context = useAutumnContext({ - AutumnContext, - name: "useListEvents", - }); - - const client = context.client; - const limit = params.limit ?? 100; - const [page, setPage] = useState(0); - - const startDate = params.customRange?.start - ? new Date(params.customRange.start).toISOString().slice(0, 13) - : undefined; - - const endDate = params.customRange?.end - ? new Date(params.customRange.end).toISOString().slice(0, 13) - : undefined; - - const offset = page * limit; - - const fetcher = async () => { - const res = await client.events.list({ - ...params, - offset, - limit, - }); - - if (res.error) { - const err: AutumnErrorWithStatus = new AutumnError({ - message: res.error.message, - code: res.error.code, - }); - err.statusCode = res.statusCode; - throw err; - } - return res.data; - }; - - const { data, error, mutate, isLoading } = useSWR< - EventsListResponse, - AutumnError - >( - ["eventList", params.featureId, startDate, endDate, offset, limit], - fetcher, - { - dedupingInterval: 2000, - revalidateOnFocus: false, - revalidateOnReconnect: false, - shouldRetryOnError: (error) => - (error as AutumnErrorWithStatus).statusCode === 429, - errorRetryCount: 3, - refreshInterval: 0, - ...params.swrConfig, - }, - ); - - const hasMore = data?.has_more ?? false; - const hasPrevious = page > 0; - - const nextPage = useCallback(() => { - if (hasMore) { - setPage((p) => p + 1); - } - }, [hasMore]); - - const prevPage = useCallback(() => { - if (hasPrevious) { - setPage((p) => p - 1); - } - }, [hasPrevious]); - - const goToPage = useCallback((pageNum: number) => { - setPage(Math.max(0, pageNum)); - }, []); - - const resetPagination = useCallback(() => { - setPage(0); - }, []); - - return { - list: data?.list, - hasMore, - hasPrevious, - page, - isLoading, - error, - refetch: mutate, - nextPage, - prevPage, - goToPage, - resetPagination, - }; -}; diff --git a/autumn-js/src/libraries/react/hooks/usePaywall.tsx b/autumn-js/src/libraries/react/hooks/usePaywall.tsx deleted file mode 100644 index 72b2fb89..00000000 --- a/autumn-js/src/libraries/react/hooks/usePaywall.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { AutumnContext, useAutumnContext } from "@/AutumnContext"; -import Autumn from "@sdk"; -import useSWR from "swr"; - -export const usePaywall = ({ - featureId, - entityId, -}: { - featureId?: string; - entityId?: string; -}) => { - const context = useAutumnContext({ - AutumnContext, - name: "usePaywall", - }); - - const enabled = !!featureId && !!context; - - const fetcher = async () => { - if (!featureId) { - return { preview: undefined }; - } - - return await context.client.check({ - featureId, - withPreview: true, - }); - }; - - const queryKey = [`check`, featureId, entityId]; - - const { data, error, isLoading } = useSWR(queryKey, fetcher, { - refreshInterval: 0, - enabled, - }); - - return { - data: data?.preview as Autumn.CheckResponse.Preview | undefined, - error, - isLoading, - }; -}; diff --git a/autumn-js/src/libraries/react/hooks/usePricingTable/pricingCardTypes.ts b/autumn-js/src/libraries/react/hooks/usePricingTable/pricingCardTypes.ts deleted file mode 100644 index 777dd287..00000000 --- a/autumn-js/src/libraries/react/hooks/usePricingTable/pricingCardTypes.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type Autumn from "@sdk"; - -export interface PricingCardOverride { - planId?: string; - - name?: string; - description?: string; - recommendText?: string; - everythingFrom?: string; - - button?: { - text?: string; - onClick?: () => Promise | void; - }; - - price?: { - display?: { - primaryText?: string; - secondaryText?: string; - }; - }; - - features?: { - featureId: string | null; - display?: { - primaryText?: string; - secondaryText?: string; - }; - }[]; -} - -export interface PricingCardData { - plan: Autumn.Plan | null; - override: { - name?: string; - description?: string; - recommend_text?: string; - everything_from?: string; - - button?: { - text?: string; - onClick?: () => Promise | void; - }; - - price?: { - display?: { - primary_text?: string; - secondary_text?: string; - }; - }; - - features?: { - feature_id: string | null; - display?: { - primary_text?: string; - secondary_text?: string; - }; - }[]; - }; -} diff --git a/autumn-js/src/libraries/react/hooks/usePricingTable/usePricingTable.tsx b/autumn-js/src/libraries/react/hooks/usePricingTable/usePricingTable.tsx deleted file mode 100644 index 030f5560..00000000 --- a/autumn-js/src/libraries/react/hooks/usePricingTable/usePricingTable.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { AutumnContext, useAutumnContext } from "@/AutumnContext"; -import type { PricingCardOverride } from "./pricingCardTypes"; -import { usePricingTableBase } from "./usePricingTableBase"; - -export const usePricingTable = (params?: { - overrides?: PricingCardOverride[]; -}) => { - const context = useAutumnContext({ - AutumnContext, - name: "usePricingTable", - }); - - return usePricingTableBase({ - client: context.client, - params, - }); -}; diff --git a/autumn-js/src/libraries/react/hooks/usePricingTable/usePricingTableBase.tsx b/autumn-js/src/libraries/react/hooks/usePricingTable/usePricingTableBase.tsx deleted file mode 100644 index 7cad5d94..00000000 --- a/autumn-js/src/libraries/react/hooks/usePricingTable/usePricingTableBase.tsx +++ /dev/null @@ -1,327 +0,0 @@ -import type Autumn from "@sdk"; -import useSWR, { type SWRConfiguration } from "swr"; -import type { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; -import type { AutumnClient } from "@/client/ReactAutumnClient"; - -// const mergeProductDetails = ( -// products: Autumn.Plan[] | undefined, -// productDetails?: ProductDetails[] -// ): ProductWithDisplay[] | null => { -// if (!products) { -// return null; -// } - -// if (!productDetails) { -// return products.map((product) => { -// if (product.base_variant_id) { -// let baseProduct = products.find( -// (p) => p.id === product.base_variant_id -// ); -// if (baseProduct) { -// return { -// ...product, -// name: baseProduct.name, -// }; -// } -// } - -// return product; -// }); -// } - -// let fetchedProducts = structuredClone(products); - -// let mergedProducts: ProductWithDisplay[] = []; - -// for (const overrideDetails of productDetails) { -// if (!overrideDetails.id) { -// let properties: any = {}; -// let overrideItems = overrideDetails.items?.map((item) => ({ -// display: { -// primary_text: item.primaryText, -// secondary_text: item.secondaryText, -// }, -// })); - -// let overridePrice = overrideDetails.price; -// if (overrideDetails.price) { -// properties.is_free = false; -// overrideItems = [ -// { -// display: { -// primary_text: overridePrice?.primaryText, -// secondary_text: overridePrice?.secondaryText, -// }, -// }, -// ...(overrideItems || []), -// ]; -// } - -// if (!overrideItems || overrideItems.length === 0) { -// overrideItems = [ -// { -// display: { -// primary_text: "", -// }, -// }, -// ] as any; -// } - -// mergedProducts.push({ -// display: { -// name: overrideDetails.name, -// description: overrideDetails.description, -// button_text: overrideDetails.buttonText, -// recommend_text: overrideDetails.recommendText, -// everything_from: overrideDetails.everythingFrom, -// button_url: overrideDetails.buttonUrl, -// }, -// items: overrideItems, -// properties, -// } as unknown as Autumn.Plan); -// continue; -// } - -// let fetchedProduct = fetchedProducts.find( -// (p) => p.id === overrideDetails.id -// ); - -// if (!fetchedProduct) { -// continue; -// } - -// let displayName = fetchedProduct.name; -// let baseVariantId = fetchedProduct.base_variant_id; -// if (baseVariantId) { -// let baseProduct = fetchedProducts.find((p) => p.id === baseVariantId); -// if (baseProduct) { -// displayName = baseProduct.name; -// } -// } -// displayName = overrideDetails.name || displayName; - -// const originalIsFree = fetchedProduct.properties?.is_free; -// let overrideProperties = fetchedProduct.properties || {}; -// let overrideItems = overrideDetails.items; -// let overridePrice = overrideDetails.price; -// let mergedItems: Autumn.Plan.Feature[] = []; - -// if (overridePrice) { -// // overrideProperties.is_free = false; - -// if (originalIsFree || overrideItems !== undefined) { -// mergedItems.push({ -// display: { -// primary_text: overridePrice.primaryText, -// secondary_text: overridePrice.secondaryText, -// }, -// }); -// } else { -// fetchedProduct.items[0].display = { -// primary_text: overridePrice.primaryText, -// secondary_text: overridePrice.secondaryText, -// }; -// } -// } else { -// if (overrideItems && !originalIsFree) { -// mergedItems.push(fetchedProduct.items[0]); -// } -// } - -// if (overrideItems) { -// for (const overrideItem of overrideItems) { -// if (!overrideItem.featureId) { -// mergedItems.push({ -// display: { -// primary_text: overrideItem.primaryText || "", -// secondary_text: overrideItem.secondaryText, -// }, -// }); -// } else { -// let fetchedItem = fetchedProduct.items.find( -// (i) => i.feature_id === overrideItem.featureId -// ); -// if (!fetchedItem) { -// console.error( -// `Feature with id ${overrideItem.featureId} not found for product ${fetchedProduct.id}` -// ); -// continue; -// } -// mergedItems.push({ -// ...fetchedItem, -// display: { -// primary_text: -// overrideItem.primaryText || fetchedItem.display?.primary_text || "", -// secondary_text: -// overrideItem.secondaryText || -// fetchedItem.display?.secondary_text, -// }, -// }); -// } -// } -// } else { -// mergedItems = fetchedProduct.items; -// } - -// const mergedProduct: Autumn.Product & { display: { -// name?: string; -// description?: string; -// button_text?: string; -// recommend_text?: string; -// everything_from?: string; -// button_url?: string; -// } } = { -// ...fetchedProduct, -// items: mergedItems, -// properties: overrideProperties as Autumn.Product["properties"], -// display: { -// name: displayName, -// description: overrideDetails.description, -// button_text: overrideDetails.buttonText, -// recommend_text: overrideDetails.recommendText, -// everything_from: overrideDetails.everythingFrom, -// button_url: overrideDetails.buttonUrl, -// }, -// }; - -// mergedProducts.push(mergedProduct); -// } -// return mergedProducts; -// }; - -const defaultSWRConfig: SWRConfiguration = { - refreshInterval: 0, - shouldRetryOnError: false, -}; - -import type { PricingCardData, PricingCardOverride } from "./pricingCardTypes"; - -const getCardData = ({ - plans, - override, -}: { - plans: Autumn.Plan[]; - override: PricingCardOverride; -}): PricingCardData => { - // 1. Override doesn't contain plan ID - const plan = plans.find((p) => p.id === override.planId); - - const parseDisplay = (d?: { - primaryText?: string; - secondaryText?: string; - }) => { - if (!d) return undefined; - return { - primary_text: d.primaryText, - secondary_text: d.secondaryText, - }; - }; - - if (!override?.planId || !plan) { - return { - plan: null, - override: { - name: override.name, - description: override.description, - recommend_text: override.recommendText, - everything_from: override.everythingFrom, - button: { - text: override.button?.text, - onClick: override.button?.onClick, - }, - price: { - display: parseDisplay(override.price?.display), - }, - features: override.features?.map((feature) => ({ - feature_id: feature.featureId, - display: parseDisplay(feature.display), - })), - }, - }; - } - - // 2. Override plan data - const overrideFeatures = override.features - ? override.features.map((f) => { - // 1. If feature ID is null, just - const planFeature = plan?.features?.find( - (p) => p.feature_id === f.featureId, - ); - - if (!f.featureId || !planFeature) { - return { - feature_id: null, - display: parseDisplay(f.display), - }; - } - - return { - feature_id: f.featureId, - display: f.display - ? parseDisplay(f.display) - : (planFeature.display ?? undefined), - }; - }) - : undefined; - - const overridePlanData = { - name: override.name, - description: override.description, - recommend_text: override.recommendText, - everything_from: override.everythingFrom, - button: { - text: override.button?.text, - onClick: override.button?.onClick, - }, - price: { - display: parseDisplay(override.price?.display), - }, - - features: overrideFeatures, - }; - - return { - plan, - override: overridePlanData, - }; -}; - -export const usePricingTableBase = ({ - client, - params, -}: { - client: AutumnClient | ConvexAutumnClient; - params?: { - overrides?: PricingCardOverride[]; - }; -}): { - data: PricingCardData[]; - isLoading: boolean; - error: Error | null; - refetch: () => void; -} => { - const fetcher = async () => { - const data = await client.plans.list(); - - return data?.list || []; - }; - - const { data, error, mutate } = useSWR( - ["pricing-table", client.backendUrl], - fetcher, - { ...defaultSWRConfig }, - ); - - const plans = data || []; - - const pricingCardData = params?.overrides - ? params.overrides.map((override) => getCardData({ plans, override })) - : plans.map((plan) => ({ plan, override: {} })); - - return { - data: pricingCardData, - isLoading: !error && !data, - error, - refetch: mutate, - }; -}; diff --git a/autumn-js/src/libraries/react/index.ts b/autumn-js/src/libraries/react/index.ts deleted file mode 100644 index 3587fc3c..00000000 --- a/autumn-js/src/libraries/react/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Import CSS for tsup injectStyle -import "../../styles/global.css"; - -export type { PricingTableProduct } from "@sdk/components/componentTypes"; -export type { ProductDetails } from "./client/types/clientPricingTableTypes"; -export { useAggregateEvents } from "./hooks/useAggregateEvents"; - -/** @deprecated Use useAggregateEvents or useListEvents instead */ -export { useAnalytics } from "./hooks/useAnalytics"; -export { useCustomer } from "./hooks/useCustomer"; -export { useEntity } from "./hooks/useEntity"; -export { useListEvents } from "./hooks/useListEvents"; -export { usePaywall } from "./hooks/usePaywall"; -export { usePricingTable } from "./hooks/usePricingTable"; -export { ReactAutumnProvider as AutumnProvider } from "./ReactAutumnProvider"; - -/** @deprecated */ -export const useAutumn = () => {}; - -// Auto-synced components -export { default as CheckoutDialog } from "./components/checkout-dialog/checkout-dialog-synced"; -export { default as PaywallDialog } from "./components/paywall-dialog/paywall-dialog-synced"; -export { default as PricingTable } from "./components/pricing-table/pricing-table-synced"; -export type { - PricingCardData, - PricingCardOverride, -} from "./hooks/usePricingTable/pricingCardTypes"; diff --git a/autumn-js/src/libraries/react/lib/utils.ts b/autumn-js/src/libraries/react/lib/utils.ts deleted file mode 100644 index 018e9e72..00000000 --- a/autumn-js/src/libraries/react/lib/utils.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { clsx, type ClassValue } from "clsx"; -import { extendTailwindMerge } from "tailwind-merge"; - -// Create a custom twMerge that understands the "au-" prefix -const twMerge = extendTailwindMerge({ - prefix: "au-", -}); - -export function cn(...inputs: ClassValue[]) { - return twMerge(clsx(inputs)); -} diff --git a/autumn-js/src/libraries/react/utils/compareParams.ts b/autumn-js/src/libraries/react/utils/compareParams.ts deleted file mode 100644 index 0e05396a..00000000 --- a/autumn-js/src/libraries/react/utils/compareParams.ts +++ /dev/null @@ -1,23 +0,0 @@ -export const compareParams = (a: any, b: any): boolean => { - // Handle primitive types and null - if (a === b) return true; - if (a === null || b === null) return false; - if (typeof a !== "object" || typeof b !== "object") return false; - - // Handle arrays - if (Array.isArray(a) && Array.isArray(b)) { - if (a.length !== b.length) return false; - return a.every((item, index) => compareParams(item, b[index])); - } - - // Handle objects - const keysA = Object.keys(a); - const keysB = Object.keys(b); - - if (keysA.length !== keysB.length) return false; - - return keysA.every((key) => { - if (!Object.prototype.hasOwnProperty.call(b, key)) return false; - return compareParams(a[key], b[key]); - }); -}; diff --git a/autumn-js/src/libraries/react/utils/errorUtils.ts b/autumn-js/src/libraries/react/utils/errorUtils.ts deleted file mode 100644 index 127da372..00000000 --- a/autumn-js/src/libraries/react/utils/errorUtils.ts +++ /dev/null @@ -1,44 +0,0 @@ -export interface ClientErrorResponse { - message: string; - code: string; -} - -export class AutumnClientError extends Error { - code: string; - - constructor(public error: ClientErrorResponse) { - super(error.message); - this.code = error.code; - } - - toString() { - return `${this.message} (${this.code})`; - } - - toJSON() { - return { message: this.message, code: this.code }; - } -} - -export const toClientError = ( - error: any -): { - data: null; - error: AutumnClientError; -} => { - let msg = "Unknown error"; - let code = "unknown"; - - if (error?.message) { - msg = error.message; - } - - if (error?.code) { - code = error.code; - } - - return { - data: null, - error: new AutumnClientError({ message: msg, code }), - }; -}; diff --git a/autumn-js/src/libraries/react/utils/inject-styles.ts b/autumn-js/src/libraries/react/utils/inject-styles.ts deleted file mode 100644 index ba454cee..00000000 --- a/autumn-js/src/libraries/react/utils/inject-styles.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Critical loading styles applied inline -export const loadingStyles: React.CSSProperties = { - width: "100%", - height: "100%", - display: "flex", - justifyContent: "center", - alignItems: "center", - minHeight: "300px", -}; - -export const spinnerStyles: React.CSSProperties = { - width: "1.5rem", - height: "1.5rem", - color: "rgb(161 161 170)", - animation: "spin 1s linear infinite", -}; - -// Inject keyframes immediately -if (typeof document !== "undefined") { - const styleId = "au-spinner-keyframes"; - if (!document.getElementById(styleId)) { - const style = document.createElement("style"); - style.id = styleId; - style.textContent = ` - @keyframes spin { - from { transform: rotate(0deg); } - to { transform: rotate(360deg); } - } - `; - document.head.appendChild(style); - } -} diff --git a/autumn-js/src/sdk/index.ts b/autumn-js/src/sdk/index.ts deleted file mode 100644 index 99b60817..00000000 --- a/autumn-js/src/sdk/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// autumn-js/src/sdk/index.ts -export * from '@useautumn/sdk'; -export { default } from '@useautumn/sdk'; \ No newline at end of file diff --git a/autumn-js/src/styles/global.css b/autumn-js/src/styles/global.css deleted file mode 100644 index f20a662b..00000000 --- a/autumn-js/src/styles/global.css +++ /dev/null @@ -1,84 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - - - -:root { - --au-background: 0 0% 100%; - --au-foreground: 240 10% 3.9%; - --au-card: 0 0% 100%; - --au-card-foreground: 240 10% 3.9%; - --au-popover: 0 0% 100%; - --au-popover-foreground: 240 10% 3.9%; - --au-primary: 240 5.9% 10%; - --au-primary-foreground: 0 0% 98%; - --au-secondary: 240 4.8% 95.9%; - --au-secondary-foreground: 240 5.9% 10%; - --au-muted: 240 4.8% 95.9%; - --au-muted-foreground: 240 3.8% 46.1%; - --au-accent: 240 4.8% 95.9%; - --au-accent-foreground: 240 5.9% 10%; - --au-destructive: 0 84.2% 60.2%; - --au-destructive-foreground: 0 0% 98%; - --au-border: 240 5.9% 90%; - --au-input: 240 5.9% 90%; - --au-ring: 240 10% 3.9%; - --au-chart-1: 12 76% 61%; - --au-chart-2: 173 58% 39%; - --au-chart-3: 197 37% 24%; - --au-chart-4: 43 74% 66%; - --au-chart-5: 27 87% 67%; - --au-radius: 0.5rem; - --au-sidebar-background: 0 0% 98%; - --au-sidebar-foreground: 240 5.3% 26.1%; - --au-sidebar-primary: 240 5.9% 10%; - --au-sidebar-primary-foreground: 0 0% 98%; - --au-sidebar-accent: 240 4.8% 95.9%; - --au-sidebar-accent-foreground: 240 5.9% 10%; - --au-sidebar-border: 220 13% 91%; - --au-sidebar-ring: 217.2 91.2% 59.8%; -} -.dark { - --au-background: 240 10% 3.9%; - --au-foreground: 0 0% 98%; - --au-card: 240 10% 3.9%; - --au-card-foreground: 0 0% 98%; - --au-popover: 240 10% 3.9%; - --au-popover-foreground: 0 0% 98%; - --au-primary: 0 0% 98%; - --au-primary-foreground: 240 5.9% 10%; - --au-secondary: 240 3.7% 15.9%; - --au-secondary-foreground: 0 0% 98%; - --au-muted: 240 3.7% 15.9%; - --au-muted-foreground: 240 5% 64.9%; - --au-accent: 240 3.7% 15.9%; - --au-accent-foreground: 0 0% 98%; - --au-destructive: 0 62.8% 30.6%; - --au-destructive-foreground: 0 0% 98%; - --au-border: 240 3.7% 15.9%; - --au-input: 240 3.7% 15.9%; - --au-ring: 240 4.9% 83.9%; - --au-chart-1: 220 70% 50%; - --au-chart-2: 160 60% 45%; - --au-chart-3: 30 80% 55%; - --au-chart-4: 280 65% 60%; - --au-chart-5: 340 75% 55%; - --au-sidebar-background: 240 5.9% 10%; - --au-sidebar-foreground: 240 4.8% 95.9%; - --au-sidebar-primary: 224.3 76.3% 48%; - --au-sidebar-primary-foreground: 0 0% 100%; - --au-sidebar-accent: 240 3.7% 15.9%; - --au-sidebar-accent-foreground: 240 4.8% 95.9%; - --au-sidebar-border: 240 3.7% 15.9%; - --au-sidebar-ring: 217.2 91.2% 59.8%; -} - -@layer base { - * { - border-color: hsl(var(--au-border)); - } - body { - @apply au-bg-background au-text-foreground; - } -} diff --git a/autumn-js/src/styles/global_old.css b/autumn-js/src/styles/global_old.css deleted file mode 100644 index 2bb26f31..00000000 --- a/autumn-js/src/styles/global_old.css +++ /dev/null @@ -1,73 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -:root { - --au-background: 0 0% 100%; - --au-foreground: 240 10% 3.9%; - --au-card: 0 0% 100%; - --au-card-foreground: 240 10% 3.9%; - --au-popover: 0 0% 100%; - --au-popover-foreground: 240 10% 3.9%; - --au-primary: 240 5.9% 10%; - --au-primary-foreground: 0 0% 98%; - --au-secondary: 240 4.8% 95.9%; - --au-secondary-foreground: 240 5.9% 10%; - --au-muted: 240 4.8% 95.9%; - --au-muted-foreground: 240 3.8% 46.1%; - --au-accent: 240 4.8% 95.9%; - --au-accent-foreground: 240 5.9% 10%; - --au-destructive: 0 84.2% 60.2%; - --au-destructive-foreground: 0 0% 98%; - --au-border: 240 5.9% 90%; - --au-input: 240 5.9% 90%; - --au-ring: 240 10% 3.9%; - --au-chart-1: 12 76% 61%; - --au-chart-2: 173 58% 39%; - --au-chart-3: 197 37% 24%; - --au-chart-4: 43 74% 66%; - --au-chart-5: 27 87% 67%; - --au-radius: 0.5rem; - --au-sidebar-background: 0 0% 98%; - --au-sidebar-foreground: 240 5.3% 26.1%; - --au-sidebar-primary: 240 5.9% 10%; - --au-sidebar-primary-foreground: 0 0% 98%; - --au-sidebar-accent: 240 4.8% 95.9%; - --au-sidebar-accent-foreground: 240 5.9% 10%; - --au-sidebar-border: 220 13% 91%; - --au-sidebar-ring: 217.2 91.2% 59.8%; -} -.dark { - --au-background: 240 10% 3.9%; - --au-foreground: 0 0% 98%; - --au-card: 240 10% 3.9%; - --au-card-foreground: 0 0% 98%; - --au-popover: 240 10% 3.9%; - --au-popover-foreground: 0 0% 98%; - --au-primary: 0 0% 98%; - --au-primary-foreground: 240 5.9% 10%; - --au-secondary: 240 3.7% 15.9%; - --au-secondary-foreground: 0 0% 98%; - --au-muted: 240 3.7% 15.9%; - --au-muted-foreground: 240 5% 64.9%; - --au-accent: 240 3.7% 15.9%; - --au-accent-foreground: 0 0% 98%; - --au-destructive: 0 62.8% 30.6%; - --au-destructive-foreground: 0 0% 98%; - --au-border: 240 3.7% 15.9%; - --au-input: 240 3.7% 15.9%; - --au-ring: 240 4.9% 83.9%; - --au-chart-1: 220 70% 50%; - --au-chart-2: 160 60% 45%; - --au-chart-3: 30 80% 55%; - --au-chart-4: 280 65% 60%; - --au-chart-5: 340 75% 55%; - --au-sidebar-background: 240 5.9% 10%; - --au-sidebar-foreground: 240 4.8% 95.9%; - --au-sidebar-primary: 224.3 76.3% 48%; - --au-sidebar-primary-foreground: 0 0% 100%; - --au-sidebar-accent: 240 3.7% 15.9%; - --au-sidebar-accent-foreground: 240 4.8% 95.9%; - --au-sidebar-border: 240 3.7% 15.9%; - --au-sidebar-ring: 217.2 91.2% 59.8%; -} diff --git a/autumn-js/src/utils/ErrorResponse.ts b/autumn-js/src/utils/ErrorResponse.ts deleted file mode 100644 index 3c9ed161..00000000 --- a/autumn-js/src/utils/ErrorResponse.ts +++ /dev/null @@ -1,35 +0,0 @@ -export interface ErrorResponse { - message: string; - code: string; -} - -export class AutumnError extends Error { - public readonly message: string; - public readonly code: string; - - constructor(response: ErrorResponse) { - super(response.message); - this.message = response.message; - this.code = response.code; - } - - static fromError(error: any) { - return new AutumnError({ - message: error.message || "Unknown error", - code: error.code || "unknown_error", - }); - } - - toString() { - return `${this.message} (code: ${this.code})`; - } - - toJSON() { - return { - message: this.message, - code: this.code, - }; - } -} - -export type AutumnErrorWithStatus = AutumnError & { statusCode?: number }; diff --git a/autumn-js/src/utils/entityUtils.tsx b/autumn-js/src/utils/entityUtils.tsx deleted file mode 100644 index 52244d24..00000000 --- a/autumn-js/src/utils/entityUtils.tsx +++ /dev/null @@ -1,6 +0,0 @@ -export const getEntityExpandStr = (expand?: string[]) => { - if (!expand) { - return ""; - } - return `expand=${expand.join(",")}`; -}; diff --git a/autumn-js/src/utils/handleFetchResult.ts b/autumn-js/src/utils/handleFetchResult.ts deleted file mode 100644 index 63706e68..00000000 --- a/autumn-js/src/utils/handleFetchResult.ts +++ /dev/null @@ -1,47 +0,0 @@ -export const handleFetchResult = async ({ - response, - logger, - logError = true, -}: { - response: Response; - logger: Console; - logError?: boolean; -}): Promise => { - if (response.status < 200 || response.status >= 300) { - let error: any; - try { - error = await response.json(); - if (logError) { - logger.error(`[Autumn] ${error.message}`); - } - - throw error; - } catch (error) { - // biome-ignore lint/complexity/noUselessCatch: idk - throw error; - } - - // return { - // data: null, - // error: new AutumnError({ - // message: error.message, - // code: error.code, - // }), - // statusCode: response.status, - // }; - } - - try { - const data = await response.json(); - - return data; - // return { - // data: data, - // error: null, - // statusCode: response?.status, - // }; - } catch (error) { - // biome-ignore lint/complexity/noUselessCatch: idk - throw error; - } -}; \ No newline at end of file diff --git a/autumn-js/src/utils/logger.ts b/autumn-js/src/utils/logger.ts deleted file mode 100644 index 3143c61f..00000000 --- a/autumn-js/src/utils/logger.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Alternative: Use pino without worker thread transport -const getTime = () => { - const timeString = new Date().toISOString(); - return `[${timeString.split("T")[1].split(".")[0]}]`; -}; - -const greaterThanLevel = (level: string) => { - return levels.indexOf(level) >= levels.indexOf(logger.level); -}; - -const levels = ["debug", "info", "warn", "error", "fatal"]; - -export const logger = { - ...console, - level: "info", - debug: (...args: any[]) => { - if (greaterThanLevel("debug")) { - console.log(getTime(), "DEBUG", ...args); - } - }, - log: (...args: any[]) => { - console.log(getTime(), "INFO", ...args); - }, - info: (...args: any[]) => { - if (greaterThanLevel("info")) { - console.log(getTime(), "INFO", ...args); - } - }, - warn: (...args: any[]) => { - if (greaterThanLevel("warn")) { - console.log(getTime(), "WARN", ...args); - } - }, - error: (...args: any[]) => { - if (greaterThanLevel("error")) { - console.log(getTime(), "ERROR", ...args); - } - }, -}; diff --git a/autumn-js/src/utils/toSnakeCase.ts b/autumn-js/src/utils/toSnakeCase.ts deleted file mode 100644 index 1b9c6308..00000000 --- a/autumn-js/src/utils/toSnakeCase.ts +++ /dev/null @@ -1,49 +0,0 @@ -function stringToSnakeCase(str: string): string { - return str - .replace(/([a-z])([A-Z])/g, "$1_$2") - .replace(/[-\s]+/g, "_") - .toLowerCase(); -} - -export const toSnakeCase = ({ - obj, - excludeKeys, - excludeChildrenOf, -}: { - obj: T; - excludeKeys?: string[]; - excludeChildrenOf?: string[]; -}): T => { - if (Array.isArray(obj)) { - return obj.map((item) => - toSnakeCase({ obj: item as unknown as T, excludeKeys, excludeChildrenOf }) - ) as T; - } else if (obj !== null && typeof obj === "object") { - return Object.fromEntries( - Object.entries(obj).map(([key, value]) => { - const snakeKey = stringToSnakeCase(key); - - // If this key is in excludeKeys, leave key and value untouched - if (excludeKeys?.includes(key)) { - return [key, value]; - } - - // If this key is in excludeChildrenOf, convert key but do not recurse into value - if (excludeChildrenOf?.includes(key)) { - return [snakeKey, value]; - } - - // Otherwise, convert key and recursively process value - return [ - snakeKey, - toSnakeCase({ - obj: value as unknown as T, - excludeKeys, - excludeChildrenOf, - }), - ]; - }) - ) as T; - } - return obj as T; -}; diff --git a/autumn-js/tailwind.config.ts b/autumn-js/tailwind.config.ts deleted file mode 100644 index d3ea6be5..00000000 --- a/autumn-js/tailwind.config.ts +++ /dev/null @@ -1,136 +0,0 @@ -import type { Config } from "tailwindcss"; -import tailwindAnimate from "tailwindcss-animate"; -import { - scopedPreflightStyles, - isolateInsideOfContainer, -} from "tailwindcss-scoped-preflight"; - -export default { - prefix: "au-", - corePlugins: { - preflight: false, // This removes @tailwind base completely - }, - darkMode: ["class"], - content: ["./src/**/*.{html,js,ts,tsx}"], - theme: { - extend: { - colors: { - background: "hsl(var(--au-background))", - foreground: "hsl(var(--au-foreground))", - card: { - DEFAULT: "hsl(var(--au-card))", - foreground: "hsl(var(--au-card-foreground))", - }, - popover: { - DEFAULT: "hsl(var(--au-popover))", - foreground: "hsl(var(--au-popover-foreground))", - }, - primary: { - DEFAULT: "hsl(var(--au-primary))", - foreground: "hsl(var(--au-primary-foreground))", - }, - secondary: { - DEFAULT: "hsl(var(--au-secondary))", - foreground: "hsl(var(--au-secondary-foreground))", - }, - muted: { - DEFAULT: "hsl(var(--au-muted))", - foreground: "hsl(var(--au-muted-foreground))", - }, - accent: { - DEFAULT: "hsl(var(--au-accent))", - foreground: "hsl(var(--au-accent-foreground))", - }, - destructive: { - DEFAULT: "hsl(var(--au-destructive))", - foreground: "hsl(var(--au-destructive-foreground))", - }, - border: "hsl(var(--au-border))", - input: "hsl(var(--au-input))", - ring: "hsl(var(--au-ring))", - chart: { - "1": "hsl(var(--au-chart-1))", - "2": "hsl(var(--au-chart-2))", - "3": "hsl(var(--au-chart-3))", - "4": "hsl(var(--au-chart-4))", - "5": "hsl(var(--au-chart-5))", - }, - }, - borderRadius: { - lg: "var(--au-radius)", - md: "calc(var(--au-radius) - 2px)", - sm: "calc(var(--au-radius) - 4px)", - }, - keyframes: { - shine: { - "0%": { - backgroundPosition: "0% 50%", - }, - "100%": { - backgroundPosition: "200% 50%", - }, - }, - bounceFast: { - "0%, 100%": { - transform: "translateY(0)", - }, - "20%": { - transform: "translateY(-8px)", - }, - "40%": { - transform: "translateY(-4px)", - }, - "60%": { - transform: "translateY(-8px)", - }, - "80%": { - transform: "translateY(-4px)", - }, - }, - bounceClick: { - "0%": { - transform: "scale(1)", - }, - "20%": { - transform: "scale(0.96)", - }, - "50%": { - transform: "scale(1.04)", - }, - "100%": { - transform: "scale(1)", - }, - }, - "accordion-down": { - from: { - height: "0", - }, - to: { - height: "var(--radix-accordion-content-height)", - }, - }, - "accordion-up": { - from: { - height: "var(--radix-accordion-content-height)", - }, - to: { - height: "0", - }, - }, - }, - animation: { - shine: "shine 3s ease-in-out infinite", - "bounce-fast": "bounceFast 0.6s cubic-bezier(0.4,0,0.6,1) infinite", - "bounce-click": "bounceClick 0.3s cubic-bezier(0.4,0,0.6,1)", - "accordion-down": "accordion-down 0.2s ease-out", - "accordion-up": "accordion-up 0.2s ease-out", - }, - }, - }, - plugins: [ - tailwindAnimate, - scopedPreflightStyles({ - isolationStrategy: isolateInsideOfContainer(".au-root"), - }), - ], -} satisfies Config; diff --git a/autumn-js/tsconfig.json b/autumn-js/tsconfig.json deleted file mode 100644 index eefb57a4..00000000 --- a/autumn-js/tsconfig.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "noImplicitAny": true, - "esModuleInterop": true, - "strictNullChecks": true, - "target": "ES2022", - "moduleResolution": "NodeNext", - "module": "NodeNext", - "declaration": true, - "isolatedModules": true, - "noEmit": true, - "outDir": "dist", - "jsx": "react-jsx", - "lib": [ - "DOM", - "DOM.Iterable", - "ESNext" - ], - "skipLibCheck": true, - "paths": { - "@/*": [ - "./src/libraries/react/*" - ], - "@/components/*": [ - "./src/libraries/react/components/*" - ], - "@/lib/*": [ - "./src/libraries/react/lib/*" - ], - "@/hooks/*": [ - "./src/libraries/react/hooks/*" - ], - "@sdk": [ - "./src/sdk/index" - ], - "@sdk/*": [ - "./src/sdk/*" - ], - "@styles": [ - "./src/styles/*" - ], - "@compose": [ - "./src/compose/*" - ], - "@utils/*": [ - "./src/utils/*" - ] - } - }, - "include": [ - "./src" - ], - "exclude": [ - "node_modules", - "./src/archives" - ] -} \ No newline at end of file diff --git a/autumn-js/tsup.config.ts b/autumn-js/tsup.config.ts deleted file mode 100644 index 5432cbae..00000000 --- a/autumn-js/tsup.config.ts +++ /dev/null @@ -1,213 +0,0 @@ -import alias from "esbuild-plugin-path-alias"; -import * as path from "path"; -import { defineConfig, type Options } from "tsup"; - -// Path aliases that match tsconfig.json -const pathAliases = { - "@": path.resolve("./src/libraries/react"), - "@sdk": path.resolve("./src/sdk"), - "@styles": path.resolve("./src/styles"), -}; - -const reactConfigs: Options[] = [ - // Backend - { - entry: ["src/libraries/backend/**/*.{ts,tsx}"], - format: ["cjs", "esm"], - dts: true, - clean: false, // Don't clean on subsequent builds - outDir: "./dist/libraries/backend", - external: [ - "react", - "react/jsx-runtime", - "react-dom", - "better-auth", - "better-call", - "jotai", - ], - bundle: true, - skipNodeModulesBundle: true, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.define = { - ...options.define, - }; - }, - }, - - // React - Index file with CSS import (CommonJS) - { - entry: ["src/libraries/react/index.ts"], - format: ["cjs", "esm"], - dts: true, - clean: false, - outDir: "./dist/libraries/react", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: true, - banner: { - js: '"use client";', - }, - injectStyle: true, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.define = { - ...options.define, - __dirname: "import.meta.dirname", - __filename: "import.meta.filename", - }; - }, - }, - - // React - Other files without CSS import - { - entry: [ - "src/libraries/react/**/*.{ts,tsx}", - "!src/libraries/react/index.ts", - ], - format: ["cjs", "esm"], - dts: true, - clean: false, - outDir: "./dist/libraries/react", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: true, - banner: { - js: '"use client";\n', - }, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.define = { - ...options.define, - __dirname: "import.meta.dirname", - __filename: "import.meta.filename", - }; - }, - }, -]; - -export default defineConfig([ - { - format: ["cjs", "esm"], - entry: ["./src/sdk/index.ts"], - skipNodeModulesBundle: true, - dts: true, - shims: true, - clean: false, - outDir: "./dist/sdk", - - treeshake: true, - target: "es2020", - - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.define = { - ...options.define, - __dirname: "import.meta.dirname", - __filename: "import.meta.filename", - }; - }, - }, - - // GLOBAL - { - entry: ["src/utils/*.{ts,tsx}"], - format: ["cjs", "esm"], - dts: true, - clean: true, - bundle: true, - outDir: "./dist/utils", // Fixed wildcard path to specific directory - external: ["react", "react/jsx-runtime", "react-dom"], - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.define = { - ...options.define, - __dirname: "import.meta.dirname", - __filename: "import.meta.filename", - }; - }, - }, - - // SDK - { - entry: ["src/next/*.{ts,tsx}"], - format: ["cjs", "esm"], - dts: true, - clean: false, // Don't clean on subsequent builds - outDir: "./dist/next", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: false, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.define = { - ...options.define, - __dirname: "import.meta.dirname", - __filename: "import.meta.filename", - }; - }, - }, - ...reactConfigs, - - // React client components - { - entry: ["src/next/client/**/*.ts", "src/next/client/**/*.tsx"], - format: ["cjs", "esm"], - dts: true, - clean: true, - outDir: "./dist/next/client", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: false, - banner: { - js: '"use client";\n', - }, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.platform = "browser"; - options.format = "esm"; - }, - }, - - // Styles - Properly process CSS with PostCSS and Tailwind - { - entry: ["src/styles/global.css"], - format: ["esm", "cjs"], - outDir: "./dist/styles", - clean: false, - bundle: true, - }, - - // React server components - { - entry: ["src/next/server/**/*.{ts,tsx}"], - format: ["cjs", "esm"], - dts: true, - clean: true, - outDir: "./dist/next/server", - external: [ - "react", - "react/jsx-runtime", - "react-dom", - "@clerk/backend", - "better-auth", - "@supabase/ssr", - ], - bundle: false, - banner: { - js: '"use server";', - }, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.banner = { - js: '"use server";', - }; - options.platform = "node"; - options.format = "esm"; - }, - }, -]); diff --git a/autumn-js/tsup.dev.config.ts b/autumn-js/tsup.dev.config.ts deleted file mode 100644 index 20cbf70f..00000000 --- a/autumn-js/tsup.dev.config.ts +++ /dev/null @@ -1,136 +0,0 @@ -import { defineConfig, Options } from "tsup"; -import * as path from "path"; -import alias from "esbuild-plugin-path-alias"; - -// Path aliases that match tsconfig.json -const pathAliases = { - "@": path.resolve("./src/libraries/react"), - "@sdk": path.resolve("./src/sdk"), - "@styles": path.resolve("./src/styles"), -}; - -const reactConfigs: Options[] = [ - // Backend - { - entry: ["src/libraries/backend/**/*.{ts,tsx}"], - format: ["cjs", "esm"], - dts: true, - clean: false, // Don't clean on subsequent builds - outDir: "./dist/libraries/backend", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: true, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - }, - }, - - // React - Index file with CSS import (CommonJS) - { - entry: ["src/libraries/react/index.ts"], - format: ["cjs"], - dts: false, - clean: false, - outDir: "./dist/libraries/react", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: true, - banner: { - // js: '"use client";\nrequire("../../styles/global.css");', - js: '"use client";', - }, - injectStyle: true, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - }, - }, - - // React - Index file with CSS import (ESM) - { - entry: ["src/libraries/react/index.ts"], - format: ["esm"], - dts: false, // Only generate types once - clean: false, - outDir: "./dist/libraries/react", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: true, - banner: { - // js: '"use client";\nimport "../../styles/global.css";', - js: '"use client";', - }, - injectStyle: true, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - }, - }, - - // React - Other files without CSS import - { - entry: [ - "src/libraries/react/**/*.{ts,tsx}", - "!src/libraries/react/index.ts", - ], - format: ["cjs", "esm"], - dts: false, - clean: false, - outDir: "./dist/libraries/react", - external: ["react", "react/jsx-runtime", "react-dom"], - bundle: true, - banner: { - js: '"use client";\n', - }, - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - }, - }, -]; - -export default defineConfig([ - { - format: ["cjs", "esm"], - entry: ["./src/sdk/index.ts"], - skipNodeModulesBundle: true, - dts: false, - shims: true, - clean: false, - outDir: "./dist/sdk", - splitting: false, - - treeshake: true, - target: "es2020", - - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - options.mainFields = ["module", "main"]; - }, - }, - - // GLOBAL - { - entry: ["src/utils/*.{ts,tsx}"], - format: ["cjs", "esm"], - dts: false, - clean: true, - bundle: true, - outDir: "./dist/utils", // Fixed wildcard path to specific directory - external: ["react", "react/jsx-runtime", "react-dom"], - esbuildOptions(options) { - options.plugins = options.plugins || []; - options.plugins.push(alias(pathAliases)); - }, - }, - - ...reactConfigs, - - // Styles - Properly process CSS with PostCSS and Tailwind - { - entry: ["src/styles/global.css"], - format: ["esm", "cjs"], - outDir: "./dist/styles", - clean: false, - bundle: true, - }, -]); From 4cb8fed7ee3b5ba113361201c390200a3c8208db Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Tue, 20 Jan 2026 11:52:43 +0000 Subject: [PATCH 33/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20dev=20on=20atmn=20?= =?UTF-8?q?auth?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmn/bun.lock | 11 +++++++++++ atmn/package.json | 2 +- atmn/src/commands/auth/constants.ts | 3 ++- atmn/src/constants.ts | 4 ++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/atmn/bun.lock b/atmn/bun.lock index 4b3df9e2..fc50daa7 100644 --- a/atmn/bun.lock +++ b/atmn/bun.lock @@ -20,8 +20,11 @@ "ink-big-text": "^2.0.0", "ink-chart": "^0.1.1", "ink-confirm-input": "^2.0.0", + "ink-scroll-list": "^0.4.1", + "ink-scroll-view": "^0.3.5", "ink-select-input": "^6.2.0", "ink-spinner": "^5.0.0", + "ink-table": "^3.1.0", "ink-text-input": "^6.0.0", "inquirer": "^12.7.0", "jiti": "^2.4.2", @@ -793,10 +796,16 @@ "ink-confirm-input": ["ink-confirm-input@2.0.0", "", { "dependencies": { "ink-text-input": "^3.2.1", "prop-types": "^15.5.10", "yn": "^3.1.1" }, "peerDependencies": { "ink": ">=2", "react": ">=16" } }, "sha512-YCd7a9XW0DIIbOhF3XiLo3WF86mOart9qI1qN56wT5IDJxU+j8BanEZh5/QXoazyIPSv1iXlHPIlRB5cbZIMIA=="], + "ink-scroll-list": ["ink-scroll-list@0.4.1", "", { "dependencies": { "ink-scroll-view": "^0.3.5" }, "peerDependencies": { "ink": ">=6", "react": ">=19" } }, "sha512-2GcjnBXRe0sTSMC03SCKX6IkNAsYYgcpvAN+ggAiaqeg+s+qA9Ls0iVTOmB+Ize/9AVts8xloG4aRcrOy/7Xxg=="], + + "ink-scroll-view": ["ink-scroll-view@0.3.5", "", { "peerDependencies": { "ink": ">=6", "react": ">=19" } }, "sha512-NDCKQz0DDvcLQEboXf25oGQ4g2VpoO3NojMC/eG+eaqEz9PDiGJyg7Y+HTa4QaCjogvME6A+IwGyV+yTLCGdaw=="], + "ink-select-input": ["ink-select-input@6.2.0", "", { "dependencies": { "figures": "^6.1.0", "to-rotated": "^1.0.0" }, "peerDependencies": { "ink": ">=5.0.0", "react": ">=18.0.0" } }, "sha512-304fZXxkpYxJ9si5lxRCaX01GNlmPBgOZumXXRnPYbHW/iI31cgQynqk2tRypGLOF1cMIwPUzL2LSm6q4I5rQQ=="], "ink-spinner": ["ink-spinner@5.0.0", "", { "dependencies": { "cli-spinners": "^2.7.0" }, "peerDependencies": { "ink": ">=4.0.0", "react": ">=18.0.0" } }, "sha512-EYEasbEjkqLGyPOUc8hBJZNuC5GvXGMLu0w5gdTNskPc7Izc5vO3tdQEYnzvshucyGCBXc86ig0ujXPMWaQCdA=="], + "ink-table": ["ink-table@3.1.0", "", { "dependencies": { "object-hash": "^2.0.3" }, "peerDependencies": { "ink": ">=3.0.0", "react": ">=16.8.0" } }, "sha512-qxVb4DIaEaJryvF9uZGydnmP9Hkmas3DCKVpEcBYC0E4eJd3qNgNe+PZKuzgCERFe9LfAS1TNWxCr9+AU4v3YA=="], + "ink-testing-library": ["ink-testing-library@3.0.0", "", { "peerDependencies": { "@types/react": ">=18.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-ItyyoOmcm6yftb7c5mZI2HU22BWzue8PBbO3DStmY8B9xaqfKr7QJONiWOXcwVsOk/6HuVQ0v7N5xhPaR3jycA=="], "ink-text-input": ["ink-text-input@6.0.0", "", { "dependencies": { "chalk": "^5.3.0", "type-fest": "^4.18.2" }, "peerDependencies": { "ink": ">=5", "react": ">=18" } }, "sha512-Fw64n7Yha5deb1rHY137zHTAbSTNelUKuB5Kkk2HACXEtwIHBCf9OH2tP/LQ9fRYTl1F0dZgbW0zPnZk6FA9Lw=="], @@ -1055,6 +1064,8 @@ "object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="], + "object-hash": ["object-hash@2.2.0", "", {}, "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw=="], + "object-inspect": ["object-inspect@1.13.4", "", {}, "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="], "object-keys": ["object-keys@1.1.1", "", {}, "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="], diff --git a/atmn/package.json b/atmn/package.json index 90818ecf..3c5090db 100644 --- a/atmn/package.json +++ b/atmn/package.json @@ -1,6 +1,6 @@ { "name": "atmn", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "license": "MIT", "bin": { "atmn": "dist/src/cli.js" diff --git a/atmn/src/commands/auth/constants.ts b/atmn/src/commands/auth/constants.ts index 98f247be..2fe5feda 100644 --- a/atmn/src/commands/auth/constants.ts +++ b/atmn/src/commands/auth/constants.ts @@ -1,7 +1,8 @@ // OAuth constants for CLI authentication /** The OAuth client ID for the CLI (public client) */ -export const CLI_CLIENT_ID = "khicXGthBbGMIWmpgodOTDcCCJHJMDpN"; +// export const CLI_CLIENT_ID = "khicXGthBbGMIWmpgodOTDcCCJHJMDpN"; +export const CLI_CLIENT_ID = "NiKwaSyAfaeEEKEvFaUYihTXdTPtIRCk" /** Base port for the local OAuth callback server */ export const OAUTH_PORT_BASE = 31448; diff --git a/atmn/src/constants.ts b/atmn/src/constants.ts index 3b090ded..33dd249b 100644 --- a/atmn/src/constants.ts +++ b/atmn/src/constants.ts @@ -1,6 +1,6 @@ // Production URLs (default) -export const FRONTEND_URL = "https://app.useautumn.com"; -export const BACKEND_URL = "https://api.useautumn.com"; +export const FRONTEND_URL = "https://dev.useautumn.com"; +export const BACKEND_URL = "https://api-dev.useautumn.com"; // Local URLs (used when --local/-l flag is passed) export const LOCAL_FRONTEND_URL = "http://localhost:3000"; From c47580852da0a19f00f2e61be32eacb93f4cd805 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Tue, 20 Jan 2026 11:53:16 +0000 Subject: [PATCH 34/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20idk=20whats=20goin?= =?UTF-8?q?g=20on=20but=20fixed=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nextjs/src/instrumentation.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 nextjs/src/instrumentation.ts diff --git a/nextjs/src/instrumentation.ts b/nextjs/src/instrumentation.ts new file mode 100644 index 00000000..d7bc5ffc --- /dev/null +++ b/nextjs/src/instrumentation.ts @@ -0,0 +1,19 @@ +// Polyfill localStorage for Node.js 22+ which has a broken built-in localStorage +// that requires --localstorage-file flag. This prevents "localStorage.getItem is not a function" errors. +export async function register() { + if (typeof window === "undefined") { + // Only run on server + const storage = new Map(); + + (globalThis as any).localStorage = { + getItem: (key: string) => storage.get(key) ?? null, + setItem: (key: string, value: string) => storage.set(key, String(value)), + removeItem: (key: string) => storage.delete(key), + clear: () => storage.clear(), + key: (index: number) => Array.from(storage.keys())[index] ?? null, + get length() { + return storage.size; + }, + }; + } +} From 9d1e6da9a010211239e895eb19fdc1a6d8205e38 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Tue, 20 Jan 2026 11:53:29 +0000 Subject: [PATCH 35/35] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20next-gen=20autumn?= =?UTF-8?q?=20sdk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/package.json | 4 +- package/src/libraries/backend/better-auth.ts | 4 +- package/src/libraries/backend/convex.ts | 23 +- .../backend/routes/analyticsRoutes.ts | 73 ++-- .../src/libraries/backend/routes/genRoutes.ts | 291 +++++++------- .../react/client/ConvexAutumnClient.tsx | 22 +- .../react/client/ReactAutumnClient.tsx | 27 +- .../react/client/clientAnalyticsMethods.ts | 9 +- .../react/client/clientCompMethods.ts | 5 +- .../react/client/clientCusMethods.ts | 7 +- .../react/client/clientEntityMethods.ts | 7 +- .../react/client/clientGenMethods.ts | 35 +- .../react/client/clientProdMethods.ts | 6 +- .../react/client/clientReferralMethods.ts | 13 +- .../react/client/types/clientGenTypes.ts | 12 +- .../react/clientTypes/attachTypes.ts | 361 +++++++++++++++++ .../react/clientTypes/billingPortalTypes.ts | 26 ++ .../react/clientTypes/cancelTypes.ts | 31 ++ .../libraries/react/clientTypes/checkTypes.ts | 63 +++ .../react/clientTypes/checkoutTypes.ts | 361 +++++++++++++++++ .../react/clientTypes/createCustomerTypes.ts | 76 ++++ .../react/clientTypes/createEntityTypes.ts | 33 ++ .../clientTypes/createReferralCodeTypes.ts | 13 + .../react/clientTypes/customerDataTypes.ts | 34 ++ .../react/clientTypes/entityDataTypes.ts | 19 + .../react/clientTypes/getEntityTypes.ts | 13 + .../src/libraries/react/clientTypes/index.ts | 18 + .../libraries/react/clientTypes/queryTypes.ts | 19 + .../clientTypes/redeemReferralCodeTypes.ts | 13 + .../react/clientTypes/setupPaymentTypes.ts | 34 ++ .../checkout-dialog-synced.tsx | 48 ++- .../checkout-dialog/lib/checkout-content.tsx | 18 +- .../paywall-dialog/lib/paywall-content.tsx | 5 +- .../lib/pricing-table-content.tsx | 28 +- .../pricing-table/pricing-table-synced.tsx | 48 ++- .../react/hooks/helpers/handleCheck.ts | 149 ++++--- .../react/hooks/helpers/useAutumnBase.tsx | 28 +- .../react/hooks/types/useCustomerMethods.ts | 150 +++++++ .../react/hooks/types/useEntityMethods.ts | 75 ++++ .../react/hooks/useAggregateEvents.tsx | 10 +- .../libraries/react/hooks/useAnalytics.tsx | 23 +- .../src/libraries/react/hooks/useCustomer.tsx | 2 +- .../libraries/react/hooks/useCustomerBase.tsx | 63 +-- .../src/libraries/react/hooks/useEntity.tsx | 16 + .../libraries/react/hooks/useEntityBase.tsx | 5 +- .../libraries/react/hooks/useListEvents.tsx | 9 +- .../src/libraries/react/hooks/usePaywall.tsx | 4 +- .../react/hooks/usePricingTableBase.tsx | 108 +++--- package/src/libraries/react/index.ts | 2 +- package/src/libraries/react/types/index.ts | 186 +++++++++ package/src/libraries/react/utils/error.ts | 35 ++ package/src/libraries/react/utils/response.ts | 61 +++ package/src/next/client/NextAutumnClient.tsx | 313 +++++++-------- package/src/next/client/hooks/useCustomer.tsx | 20 +- package/src/next/client/types.ts | 4 +- package/src/next/server/auth/withNextAuth.ts | 2 +- package/src/next/server/utils.ts | 6 +- package/src/sdk/balances/balancesMethods.ts | 9 +- package/src/sdk/components/componentTypes.ts | 4 +- package/src/sdk/customers/cusTypes.ts | 2 +- package/src/sdk/events/eventMethods.ts | 4 +- package/src/sdk/events/eventTypes.ts | 4 +- package/src/sdk/general/attachTypes.ts | 4 +- package/src/sdk/general/checkTypes.ts | 4 +- package/src/sdk/products/prodTypes.ts | 2 +- package/src/sdk/referrals/referralMethods.ts | 6 +- package/tsconfig.json | 6 - package/tsup.config.ts | 25 +- package/tsup.dev.config.ts | 16 +- pnpm-lock.yaml | 365 +++++++++--------- pnpm-workspace.yaml | 1 + typegen/genUtils/MethodGenerator.ts | 4 +- typegen/genUtils/auto-schema-generator.ts | 150 ++++--- typegen/genUtils/utils.ts | 2 + typegen/generate-autumn-js-types.ts | 4 +- .../checkout-dialog/checkout-dialog.tsx | 70 ++-- .../checkout-dialog/lib/checkout-content.tsx | 21 +- .../paywall-dialog/lib/paywall-content.tsx | 7 +- .../lib/pricing-table-content.tsx | 125 +++--- ui/registry/pricing-table/pricing-table.tsx | 153 +++++--- 80 files changed, 2974 insertions(+), 1084 deletions(-) create mode 100644 package/src/libraries/react/clientTypes/attachTypes.ts create mode 100644 package/src/libraries/react/clientTypes/billingPortalTypes.ts create mode 100644 package/src/libraries/react/clientTypes/cancelTypes.ts create mode 100644 package/src/libraries/react/clientTypes/checkTypes.ts create mode 100644 package/src/libraries/react/clientTypes/checkoutTypes.ts create mode 100644 package/src/libraries/react/clientTypes/createCustomerTypes.ts create mode 100644 package/src/libraries/react/clientTypes/createEntityTypes.ts create mode 100644 package/src/libraries/react/clientTypes/createReferralCodeTypes.ts create mode 100644 package/src/libraries/react/clientTypes/customerDataTypes.ts create mode 100644 package/src/libraries/react/clientTypes/entityDataTypes.ts create mode 100644 package/src/libraries/react/clientTypes/getEntityTypes.ts create mode 100644 package/src/libraries/react/clientTypes/index.ts create mode 100644 package/src/libraries/react/clientTypes/queryTypes.ts create mode 100644 package/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts create mode 100644 package/src/libraries/react/clientTypes/setupPaymentTypes.ts create mode 100644 package/src/libraries/react/hooks/types/useCustomerMethods.ts create mode 100644 package/src/libraries/react/hooks/types/useEntityMethods.ts create mode 100644 package/src/libraries/react/types/index.ts create mode 100644 package/src/libraries/react/utils/error.ts create mode 100644 package/src/libraries/react/utils/response.ts diff --git a/package/package.json b/package/package.json index 6f88f087..a47f6d8b 100644 --- a/package/package.json +++ b/package/package.json @@ -1,7 +1,7 @@ { "name": "autumn-js", "description": "Autumn JS Library", - "version": "0.1.69", + "version": "1.0.0-beta.1", "repository": "github:useautumn/autumn-js", "homepage": "https://docs.useautumn.com", "main": "./dist/sdk/index.js", @@ -143,6 +143,7 @@ "typescript": "^5.8.3" }, "peerDependencies": { + "@useautumn/sdk": "^1.0.0-beta.1", "better-auth": "^1.3.17", "better-call": "^1.0.12", "convex": "^1.25.4" @@ -162,6 +163,7 @@ } }, "dependencies": { + "@useautumn/sdk": "workspace:*", "query-string": "^9.2.2", "rou3": "^0.6.1", "swr": "^2.3.3", diff --git a/package/src/libraries/backend/better-auth.ts b/package/src/libraries/backend/better-auth.ts index bc4ce9bf..fe51256b 100644 --- a/package/src/libraries/backend/better-auth.ts +++ b/package/src/libraries/backend/better-auth.ts @@ -1,4 +1,3 @@ -import { CustomerExpandEnum } from "@sdk"; import type { AuthContext, BetterAuthPlugin, @@ -35,6 +34,7 @@ import { RedeemReferralCodeParamsSchema, } from "@/client/types/clientReferralTypes"; import { Autumn } from "../../sdk/client"; +import { CustomerExpandEnum } from "../../sdk/customers/cusEnums"; import { createRouterWithOptions } from "./routes/backendRouter"; import { getIdentityContext, @@ -91,7 +91,7 @@ const handleReq = async ({ const req = ctx.request as Request; const url = new URL(req.url); searchParams = Object.fromEntries(url.searchParams); - } catch (_) {} + } catch (_) { } const rest = ctx.path.split("/autumn/")[1]; const pathname = `/api/autumn/${betterAuthPathMap[rest] || rest}`; diff --git a/package/src/libraries/backend/convex.ts b/package/src/libraries/backend/convex.ts index 7a57b90c..e988ec51 100644 --- a/package/src/libraries/backend/convex.ts +++ b/package/src/libraries/backend/convex.ts @@ -1,9 +1,8 @@ -import { AuthResult } from "./utils/AuthFunction"; +import { findRoute } from "rou3"; +import { Autumn } from "../../sdk"; import { createRouterWithOptions } from "./routes/backendRouter"; - +import type { AuthResult } from "./utils/AuthFunction"; import { secretKeyCheck } from "./utils/secretKeyCheck"; -import { Autumn } from "@sdk"; -import { findRoute } from "rou3"; export function autumnHandler(options: { httpAction: any; @@ -34,7 +33,7 @@ export function autumnHandler(options: { }); } - let { found, error: resError } = secretKeyCheck(options.secretKey); + const { found, error: resError } = secretKeyCheck(options.secretKey); if (!found && !options.secretKey) { return Response.json(resError, { status: resError!.statusCode }); @@ -62,7 +61,7 @@ export function autumnHandler(options: { if (method === "POST" || method === "PUT" || method === "PATCH") { try { body = await request.json(); - } catch (error) {} + } catch (error) { } } const result = await handler({ @@ -86,7 +85,6 @@ export function autumnHandler(options: { }); } - export function convexHandler(options: { identity: Awaited; url?: string; @@ -97,12 +95,15 @@ export function convexHandler(options: { // CORS headers, can be customized or made configurable if needed const corsHeaders = { - "Access-Control-Allow-Origin": options.corsOrigin ?? process.env.CLIENT_ORIGIN ?? "http://localhost:3000", + "Access-Control-Allow-Origin": + options.corsOrigin ?? + process.env.CLIENT_ORIGIN ?? + "http://localhost:3000", "Access-Control-Allow-Methods": "POST, GET, PATCH, DELETE, OPTIONS", "Access-Control-Allow-Headers": "*", "Access-Control-Allow-Credentials": "true", "Access-Control-Max-Age": "86400", - "Vary": "Origin", + Vary: "Origin", }; return async (ctx: any, request: Request) => { @@ -115,7 +116,7 @@ export function convexHandler(options: { }); } - let { found, error: resError } = secretKeyCheck(options.secretKey); + const { found, error: resError } = secretKeyCheck(options.secretKey); if (!found && !options.secretKey) { return new Response(JSON.stringify(resError), { @@ -155,7 +156,7 @@ export function convexHandler(options: { if (method === "POST" || method === "PUT" || method === "PATCH") { try { body = await request.json(); - } catch (error) {} + } catch (error) { } } try { diff --git a/package/src/libraries/backend/routes/analyticsRoutes.ts b/package/src/libraries/backend/routes/analyticsRoutes.ts index 6b69d5a8..7df86645 100644 --- a/package/src/libraries/backend/routes/analyticsRoutes.ts +++ b/package/src/libraries/backend/routes/analyticsRoutes.ts @@ -1,5 +1,5 @@ -import type { Autumn, EventsListParams, QueryParams } from "@sdk"; import { addRoute, type RouterContext } from "rou3"; +import type { Autumn, EventsListParams, QueryParams } from "../../../sdk"; import { BASE_PATH } from "../constants"; import { withAuth } from "../utils/withAuth"; import type { RouterOptions } from "./backendRouter"; @@ -11,43 +11,48 @@ const sanitizeBody = (body: any) => { return bodyCopy; }; -const listEventsHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: EventsListParams; - }) => { - return await autumn.events.list({ - ...sanitizeBody(body), +const listEventsHandler = (options?: RouterOptions) => + withAuth({ + fn: async ({ + autumn, customer_id, - }); - }, - suppressLogs: options?.suppressLogs, -}); + body, + }: { + autumn: Autumn; + customer_id: string; + body: EventsListParams; + }) => { + return await autumn.events.list({ + ...sanitizeBody(body), + customer_id, + }); + }, + suppressLogs: options?.suppressLogs, + }); -const aggregateEventsHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: QueryParams; - }) => { - return await autumn.events.aggregate({ - ...sanitizeBody(body), +const aggregateEventsHandler = (options?: RouterOptions) => + withAuth({ + fn: async ({ + autumn, customer_id, - }); - }, - suppressLogs: options?.suppressLogs, -}); + body, + }: { + autumn: Autumn; + customer_id: string; + body: QueryParams; + }) => { + return await autumn.events.aggregate({ + ...sanitizeBody(body), + customer_id, + }); + }, + suppressLogs: options?.suppressLogs, + }); -export const addAnalyticsRoutes = (router: RouterContext, options?: RouterOptions) => { +export const addAnalyticsRoutes = ( + router: RouterContext, + options?: RouterOptions, +) => { addRoute(router, "POST", `${BASE_PATH}/events/list`, { handler: listEventsHandler(options), }); diff --git a/package/src/libraries/backend/routes/genRoutes.ts b/package/src/libraries/backend/routes/genRoutes.ts index 882edfbc..3e8e8970 100644 --- a/package/src/libraries/backend/routes/genRoutes.ts +++ b/package/src/libraries/backend/routes/genRoutes.ts @@ -1,10 +1,11 @@ -import type { AttachParams, CheckoutParams } from "@sdk/general/attachTypes"; import { addRoute, type RouterContext } from "rou3"; import type { QueryParams } from "@/client/types/clientGenTypes"; import type { + AttachParams, Autumn, BillingPortalParams, CancelParams, + CheckoutParams, CheckParams, CustomerData, SetupPaymentParams, @@ -21,167 +22,175 @@ const sanitizeBody = (body: any) => { return bodyCopy; }; -const checkoutHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: CustomerData; - body: CheckoutParams; - }) => { - const result = await autumn.checkout({ - ...sanitizeBody(body), +const checkoutHandler = (options?: RouterOptions) => + withAuth({ + fn: async ({ + autumn, customer_id, customer_data, - }); + body, + }: { + autumn: Autumn; + customer_id: string; + customer_data?: CustomerData; + body: CheckoutParams; + }) => { + const result = await autumn.checkout({ + ...sanitizeBody(body), + customer_id, + customer_data, + }); - return result; - }, - suppressLogs: options?.suppressLogs, -}); + return result; + }, + suppressLogs: options?.suppressLogs, + }); -const attachHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: CustomerData; - body: AttachParams; - }) => { - console.log("Body: ", body); - console.log("Customer ID: ", customer_id); - return await autumn.attach({ - ...sanitizeBody(body), +const attachHandler = (options?: RouterOptions) => + withAuth({ + fn: async ({ + autumn, customer_id, customer_data, - }); - }, - suppressLogs: options?.suppressLogs, -}); + body, + }: { + autumn: Autumn; + customer_id: string; + customer_data?: CustomerData; + body: AttachParams; + }) => { + console.log("Body: ", body); + console.log("Customer ID: ", customer_id); + return await autumn.attach({ + ...sanitizeBody(body), + customer_id, + customer_data, + }); + }, + suppressLogs: options?.suppressLogs, + }); -const setupPaymentHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: CustomerData; - body: SetupPaymentParams; - }) => { - return await autumn.setupPayment({ - ...sanitizeBody(body), +const setupPaymentHandler = (options?: RouterOptions) => + withAuth({ + fn: async ({ + autumn, customer_id, customer_data, - }); - }, - suppressLogs: options?.suppressLogs, -}); + body, + }: { + autumn: Autumn; + customer_id: string; + customer_data?: CustomerData; + body: SetupPaymentParams; + }) => { + return await autumn.setupPayment({ + ...sanitizeBody(body), + customer_id, + customer_data, + }); + }, + suppressLogs: options?.suppressLogs, + }); -const cancelHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: CancelParams; - }) => { - return await autumn.cancel({ - ...sanitizeBody(body), +const cancelHandler = (options?: RouterOptions) => + withAuth({ + fn: async ({ + autumn, customer_id, - }); - }, - suppressLogs: options?.suppressLogs, -}); + body, + }: { + autumn: Autumn; + customer_id: string; + body: CancelParams; + }) => { + return await autumn.cancel({ + ...sanitizeBody(body), + customer_id, + }); + }, + suppressLogs: options?.suppressLogs, + }); -const checkHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: CustomerData; - body: CheckParams; - }) => { - const result = await autumn.check({ - ...sanitizeBody(body), +const checkHandler = (options?: RouterOptions) => + withAuth({ + fn: async ({ + autumn, customer_id, customer_data, - }); + body, + }: { + autumn: Autumn; + customer_id: string; + customer_data?: CustomerData; + body: CheckParams; + }) => { + const result = await autumn.check({ + ...sanitizeBody(body), + customer_id, + customer_data, + }); - return result; - }, - suppressLogs: options?.suppressLogs, -}); + return result; + }, + suppressLogs: options?.suppressLogs, + }); -const trackHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - customer_data, - body, - }: { - autumn: Autumn; - customer_id: string; - customer_data?: CustomerData; - body: TrackParams; - }) => { - return await autumn.track({ - ...sanitizeBody(body), +const trackHandler = (options?: RouterOptions) => + withAuth({ + fn: async ({ + autumn, customer_id, customer_data, - }); - }, - suppressLogs: options?.suppressLogs, -}); + body, + }: { + autumn: Autumn; + customer_id: string; + customer_data?: CustomerData; + body: TrackParams; + }) => { + return await autumn.track({ + ...sanitizeBody(body), + customer_id, + customer_data, + }); + }, + suppressLogs: options?.suppressLogs, + }); -const openBillingPortalHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: BillingPortalParams; - }) => { - return await autumn.customers.billingPortal(customer_id, body); - }, - suppressLogs: options?.suppressLogs, -}); +const openBillingPortalHandler = (options?: RouterOptions) => + withAuth({ + fn: async ({ + autumn, + customer_id, + body, + }: { + autumn: Autumn; + customer_id: string; + body: BillingPortalParams; + }) => { + return await autumn.customers.billingPortal(customer_id, body); + }, + suppressLogs: options?.suppressLogs, + }); -const queryHandler = (options?: RouterOptions) => withAuth({ - fn: async ({ - autumn, - customer_id, - body, - }: { - autumn: Autumn; - customer_id: string; - body: QueryParams; - }) => { - return await autumn.query({ - ...sanitizeBody(body), +const queryHandler = (options?: RouterOptions) => + withAuth({ + fn: async ({ + autumn, customer_id, - }); - }, - suppressLogs: options?.suppressLogs, -}); + body, + }: { + autumn: Autumn; + customer_id: string; + body: QueryParams; + }) => { + return await autumn.query({ + ...sanitizeBody(body), + customer_id, + }); + }, + suppressLogs: options?.suppressLogs, + }); const addGenRoutes = (router: RouterContext, options?: RouterOptions) => { addRoute(router, "POST", `${BASE_PATH}/checkout`, { diff --git a/package/src/libraries/react/client/ConvexAutumnClient.tsx b/package/src/libraries/react/client/ConvexAutumnClient.tsx index 907e7723..62c03f9c 100644 --- a/package/src/libraries/react/client/ConvexAutumnClient.tsx +++ b/package/src/libraries/react/client/ConvexAutumnClient.tsx @@ -1,15 +1,11 @@ -import { - AutumnError, - type AutumnPromise, - type CreateCustomerParams, - type CustomerData, - type Product, -} from "../../../sdk"; -import type { EventsListResponse } from "../../../sdk/events/eventTypes"; +import { AutumnError } from "@/utils/error"; +import type { AutumnPromise } from "@/utils/response"; +import type { CustomerData, Plan } from "@useautumn/sdk/resources/shared"; +import type { CustomerCreateParams } from "@useautumn/sdk/resources/customers"; +import type { EventListResponse, EventAggregateResponse } from "@useautumn/sdk/resources/events"; import type { IAutumnClient } from "./ReactAutumnClient"; import type { EventAggregationParams, - EventAggregationResponse, EventsListParams, } from "./types/clientAnalyticsTypes"; @@ -96,7 +92,7 @@ export class ConvexAutumnClient implements IAutumnClient { } async createCustomer( - params: Omit & { + params: Omit & { errorOnNotFound?: boolean; }, ) { @@ -389,7 +385,7 @@ export class ConvexAutumnClient implements IAutumnClient { }; products = { - list: async (): AutumnPromise<{ list: Product[] }> => { + list: async (): AutumnPromise<{ list: Plan[] }> => { try { const result = await this.convex.action( this.convexApi.listProducts, @@ -411,7 +407,7 @@ export class ConvexAutumnClient implements IAutumnClient { events = { list: async ( params: EventsListParams, - ): AutumnPromise => { + ): AutumnPromise => { try { const result = await this.convex.action( this.convexApi.listEvents, @@ -431,7 +427,7 @@ export class ConvexAutumnClient implements IAutumnClient { aggregate: async ( params: EventAggregationParams, - ): AutumnPromise => { + ): AutumnPromise => { try { const result = await this.convex.action( this.convexApi.aggregateEvents, diff --git a/package/src/libraries/react/client/ReactAutumnClient.tsx b/package/src/libraries/react/client/ReactAutumnClient.tsx index 17cd9bbf..14f33dc7 100644 --- a/package/src/libraries/react/client/ReactAutumnClient.tsx +++ b/package/src/libraries/react/client/ReactAutumnClient.tsx @@ -1,13 +1,10 @@ import { logAuthError } from "@/errorUtils/logAuthError"; -import { - AutumnError, - type AutumnPromise, - type CreateCustomerParams, - type CustomerData, - type Product, - toContainerResult, -} from "../../../sdk"; -import type { EventsListResponse } from "../../../sdk/events/eventTypes"; +import { AutumnError } from "@/utils/error"; +import { toContainerResult } from "@/utils/response"; +import type { AutumnPromise } from "@/utils/response"; +import type { CustomerData, Plan } from "@useautumn/sdk/resources/shared"; +import type { CustomerCreateParams } from "@useautumn/sdk/resources/customers"; +import type { EventListResponse } from "@useautumn/sdk/resources/events"; import { logFetchError } from "../errorUtils/logFetchError"; import { eventAggregateMethod, @@ -33,9 +30,9 @@ import { listProductsMethod } from "./clientProdMethods"; import { createCode, redeemCode } from "./clientReferralMethods"; import type { EventAggregationParams, - EventAggregationResponse, EventsListParams, } from "./types/clientAnalyticsTypes"; +import type { EventAggregateResponse } from "@useautumn/sdk/resources/events"; export interface ErrorResponse { message: string; @@ -69,7 +66,7 @@ export interface IAutumnClient { // Core methods createCustomer( - params: Omit & { + params: Omit & { errorOnNotFound?: boolean; }, ): Promise; @@ -112,14 +109,14 @@ export interface IAutumnClient { }; products: { - list(): AutumnPromise<{ list: Product[] }>; + list(): AutumnPromise<{ list: Plan[] }>; }; events: { - list(params: EventsListParams): AutumnPromise; + list(params: EventsListParams): AutumnPromise; aggregate( params: EventAggregationParams, - ): AutumnPromise; + ): AutumnPromise; }; } @@ -350,7 +347,7 @@ export class AutumnClient implements IAutumnClient { } async createCustomer( - params: Omit & { + params: Omit & { errorOnNotFound?: boolean; }, ) { diff --git a/package/src/libraries/react/client/clientAnalyticsMethods.ts b/package/src/libraries/react/client/clientAnalyticsMethods.ts index 74526b08..719fc324 100644 --- a/package/src/libraries/react/client/clientAnalyticsMethods.ts +++ b/package/src/libraries/react/client/clientAnalyticsMethods.ts @@ -1,16 +1,15 @@ -import type { AutumnPromise } from "../../../sdk"; -import type { EventsListResponse } from "../../../sdk/events/eventTypes"; +import type { AutumnPromise } from "@/utils/response"; +import type { EventListResponse, EventAggregateResponse } from "@useautumn/sdk/resources/events"; import type { AutumnClient } from "./ReactAutumnClient"; import type { EventAggregationParams, - EventAggregationResponse, EventsListParams, } from "./types/clientAnalyticsTypes"; export async function eventListMethod( this: AutumnClient, params: EventsListParams, -): AutumnPromise { +): AutumnPromise { const res = await this.post(`${this.prefix}/events/list`, params); return res; @@ -19,7 +18,7 @@ export async function eventListMethod( export async function eventAggregateMethod( this: AutumnClient, params: EventAggregationParams, -): AutumnPromise { +): AutumnPromise { const res = await this.post(`${this.prefix}/events/aggregate`, params); return res; } diff --git a/package/src/libraries/react/client/clientCompMethods.ts b/package/src/libraries/react/client/clientCompMethods.ts index 81858f3f..f13be17e 100644 --- a/package/src/libraries/react/client/clientCompMethods.ts +++ b/package/src/libraries/react/client/clientCompMethods.ts @@ -1,8 +1,9 @@ import { AutumnClient } from "./ReactAutumnClient"; -import { AutumnPromise, PricingTableProduct } from "../../../sdk"; +import type { AutumnPromise } from "@/utils/response"; +import type { Plan } from "@useautumn/sdk/resources/shared"; export async function getPricingTableMethod(this: AutumnClient): AutumnPromise<{ - list: PricingTableProduct[]; + list: Plan[]; }> { const res = await this.get(`${this.prefix}/components/pricing_table`); return res; diff --git a/package/src/libraries/react/client/clientCusMethods.ts b/package/src/libraries/react/client/clientCusMethods.ts index 58f1ddab..8e1100d3 100644 --- a/package/src/libraries/react/client/clientCusMethods.ts +++ b/package/src/libraries/react/client/clientCusMethods.ts @@ -1,13 +1,14 @@ import { AutumnClient, OmitCustomerType } from "./ReactAutumnClient"; -import { CreateCustomerParams, Customer } from "../../../sdk"; -import { AutumnPromise } from "../../../sdk/response"; +import type { AutumnPromise } from "@/utils/response"; +import type { Customer } from "@useautumn/sdk/resources/shared"; +import type { CustomerCreateParams } from "@useautumn/sdk/resources/customers"; export const createCustomerMethod = async ({ client, params, }: { client: AutumnClient; - params: Omit; + params: Omit; }): AutumnPromise => { let result = await client.post(`${client.prefix}/customers`, params); return result; diff --git a/package/src/libraries/react/client/clientEntityMethods.ts b/package/src/libraries/react/client/clientEntityMethods.ts index c746696d..76c9c1a6 100644 --- a/package/src/libraries/react/client/clientEntityMethods.ts +++ b/package/src/libraries/react/client/clientEntityMethods.ts @@ -1,5 +1,6 @@ -import { toSnakeCase } from "@utils/toSnakeCase"; -import type { AutumnPromise, DeleteEntityResult, Entity } from "../../../sdk"; +import type { AutumnPromise } from "@/utils/response"; +import type { Entity } from "@useautumn/sdk/resources/shared"; +import type { EntityDeleteResponse } from "@useautumn/sdk/resources/entities"; import { getEntityExpandStr } from "../../../utils/entityUtils"; import type { AutumnClient } from "./ReactAutumnClient"; import type { @@ -29,7 +30,7 @@ export async function getEntityMethod( export async function deleteEntityMethod( this: AutumnClient, entityId: string -): AutumnPromise { +): AutumnPromise { const res = await this.delete(`${this.prefix}/entities/${entityId}`); return res; } diff --git a/package/src/libraries/react/client/clientGenMethods.ts b/package/src/libraries/react/client/clientGenMethods.ts index d53742de..d1d69db0 100644 --- a/package/src/libraries/react/client/clientGenMethods.ts +++ b/package/src/libraries/react/client/clientGenMethods.ts @@ -1,13 +1,14 @@ +import type { AutumnPromise } from "@/utils/response"; import type { - AutumnPromise, - BillingPortalResult, - CancelResult, - CheckResult, - QueryResult, - SetupPaymentResult, - TrackResult, -} from "@sdk"; -import type { AttachResult, CheckoutResult } from "@sdk/general/attachTypes"; + AttachResponse, + BillingPortalResponse, + CancelResponse, + CheckResponse, + CheckoutResponse, + QueryResponse, + SetupPaymentResponse, + TrackResponse, +} from "@useautumn/sdk/resources/top-level"; import type { AutumnClient } from "./ReactAutumnClient"; import type { AttachParams, CheckoutParams } from "./types/clientAttachTypes"; @@ -23,7 +24,7 @@ import type { export async function checkoutMethod( this: AutumnClient, params: CheckoutParams, -): AutumnPromise { +): AutumnPromise { const finalParams = { ...params, successUrl: params.successUrl ?? this.defaultReturnUrl, @@ -35,7 +36,7 @@ export async function checkoutMethod( export async function attachMethod( this: AutumnClient, params: AttachParams, -): AutumnPromise { +): AutumnPromise { const finalParams = { ...params, successUrl: params.successUrl ?? this.defaultReturnUrl, @@ -46,7 +47,7 @@ export async function attachMethod( export async function setupPaymentMethod( this: AutumnClient, params: SetupPaymentParams = {}, -): AutumnPromise { +): AutumnPromise { const finalParams = { ...params, successUrl: params.successUrl ?? this.defaultReturnUrl, @@ -58,7 +59,7 @@ export async function setupPaymentMethod( export async function cancelMethod( this: AutumnClient, params: CancelParams, -): AutumnPromise { +): AutumnPromise { const res = await this.post(`${this.prefix}/cancel`, params); return res; } @@ -66,7 +67,7 @@ export async function cancelMethod( export async function checkMethod( this: AutumnClient, params: CheckParams, -): AutumnPromise { +): AutumnPromise { // Remove dialog from params const noDialogParams = { ...params, @@ -80,7 +81,7 @@ export async function checkMethod( export async function trackMethod( this: AutumnClient, params: TrackParams, -): AutumnPromise { +): AutumnPromise { const res = await this.post(`${this.prefix}/track`, params); return res; } @@ -88,7 +89,7 @@ export async function trackMethod( export async function openBillingPortalMethod( this: AutumnClient, params?: OpenBillingPortalParams, -): AutumnPromise { +): AutumnPromise { const finalParams = { ...(params || {}), returnUrl: params?.returnUrl ?? this.defaultReturnUrl, @@ -100,7 +101,7 @@ export async function openBillingPortalMethod( export async function queryMethod( this: AutumnClient, params: QueryParams, -): AutumnPromise { +): AutumnPromise { const res = await this.post(`${this.prefix}/query`, params); return res; } diff --git a/package/src/libraries/react/client/clientProdMethods.ts b/package/src/libraries/react/client/clientProdMethods.ts index 68e1cde9..24fbe4ba 100644 --- a/package/src/libraries/react/client/clientProdMethods.ts +++ b/package/src/libraries/react/client/clientProdMethods.ts @@ -1,9 +1,9 @@ -import type { AutumnPromise } from "@sdk/response"; -import type { Product } from "@sdk/products/prodTypes"; +import type { AutumnPromise } from "@/utils/response"; +import type { Plan } from "@useautumn/sdk/resources/shared"; import type { AutumnClient } from "./ReactAutumnClient"; export async function listProductsMethod(this: AutumnClient): AutumnPromise<{ - list: Product[]; + list: Plan[]; }> { const res = await this.get(`${this.prefix}/products`); return res; diff --git a/package/src/libraries/react/client/clientReferralMethods.ts b/package/src/libraries/react/client/clientReferralMethods.ts index 73af7f55..6a5fbcb3 100644 --- a/package/src/libraries/react/client/clientReferralMethods.ts +++ b/package/src/libraries/react/client/clientReferralMethods.ts @@ -1,9 +1,8 @@ -import { toSnakeCase } from "@utils/toSnakeCase"; +import type { AutumnPromise } from "@/utils/response"; import type { - AutumnPromise, - CreateReferralCodeResult, - RedeemReferralCodeResult, -} from "../../../sdk"; + ReferralCreateCodeResponse, + ReferralRedeemCodeResponse, +} from "@useautumn/sdk/resources/referrals"; import type { AutumnClient } from "./ReactAutumnClient"; import type { CreateReferralCodeParams, @@ -13,7 +12,7 @@ import type { export async function createCode( this: AutumnClient, params: CreateReferralCodeParams -): AutumnPromise { +): AutumnPromise { const res = await this.post(`${this.prefix}/referrals/code`, params); return res; } @@ -21,7 +20,7 @@ export async function createCode( export async function redeemCode( this: AutumnClient, params: RedeemReferralCodeParams -): AutumnPromise { +): AutumnPromise { const res = await this.post(`${this.prefix}/referrals/redeem`, params); return res; } diff --git a/package/src/libraries/react/client/types/clientGenTypes.ts b/package/src/libraries/react/client/types/clientGenTypes.ts index 041e7e4f..9f88b6d1 100644 --- a/package/src/libraries/react/client/types/clientGenTypes.ts +++ b/package/src/libraries/react/client/types/clientGenTypes.ts @@ -1,6 +1,16 @@ -import { QueryRangeEnum } from "@sdk"; import { z } from "zod/v4"; +// Query range options for event queries +export const QueryRangeEnum = z.enum([ + "24h", + "7d", + "30d", + "90d", + "last_cycle", + "1bc", + "3bc", +]); + export const CancelParamsSchema = z.object({ productId: z.string(), entityId: z.string().optional(), diff --git a/package/src/libraries/react/clientTypes/attachTypes.ts b/package/src/libraries/react/clientTypes/attachTypes.ts new file mode 100644 index 00000000..399fba7b --- /dev/null +++ b/package/src/libraries/react/clientTypes/attachTypes.ts @@ -0,0 +1,361 @@ +// Auto-generated Zod schema +import { z } from "zod"; +import { CustomerDataSchema } from "./customerDataTypes"; +import { EntityDataSchema } from "./entityDataTypes"; +import type { CustomerData } from "./customerDataTypes"; +import type { EntityData } from "./entityDataTypes"; + +export const AttachParamsUnionMember0Schema = z.object({ + length: z.union([z.string(), z.number()]), + cardRequired: z.boolean().optional(), + duration: z.union([z.literal('day'), z.literal('month'), z.literal('year')]).optional(), + uniqueFingerprint: z.boolean().optional() +}); + +export const AttachParamsItemSchema = z.object({ + interval: z.union([z.literal('minute'), z.literal('hour'), z.literal('day'), z.literal('week'), z.literal('month'), z.literal('quarter'), z.literal('semi_annual'), z.literal('year')]).nullable().describe("The reset or billing interval of the product item. If null, feature will have no\nreset date, and if there's a price, it will be billed one-off."), + billingUnits: z.number().nullable().describe("The billing units of the product item (eg $1 for 30 credits).").optional(), + config: z.unknown().nullable().optional(), + createdAt: z.number().nullable().optional(), + display: z.unknown().nullable().optional(), + entitlementId: z.string().nullable().optional(), + entityFeatureId: z.string().nullable().describe("The feature ID of the entity (like seats) to track sub-balances for.").optional(), + feature: z.unknown().nullable().optional(), + featureId: z.string().nullable().describe("The feature ID of the product item. Should be null for fixed price items.").optional(), + featureType: z.union([z.literal('single_use'), z.literal('continuous_use'), z.literal('boolean'), z.literal('static')]).nullable().optional(), + includedUsage: z.union([z.number(), z.literal('inf')]).nullable().describe("The amount of usage included for this feature (per interval).").optional(), + intervalCount: z.number().nullable().describe("Interval count of the feature.").optional(), + price: z.number().nullable().describe("The price of the product item. Should be null if tiered pricing is set.").optional(), + priceConfig: z.unknown().optional(), + priceId: z.string().nullable().optional(), + resetUsageWhenEnabled: z.boolean().nullable().describe("Whether the usage should be reset when the product is enabled.").optional(), + tiers: z.array(z.unknown()).nullable().describe("Tiered pricing for the product item. Not applicable for fixed price items.").optional(), + type: z.union([z.literal('feature'), z.literal('priced_feature'), z.literal('price')]).nullable().describe("The type of the product item.").optional(), + usageLimit: z.number().nullable().optional(), + usageModel: z.union([z.literal('prepaid'), z.literal('pay_per_use')]).nullable().describe("Whether the feature should be prepaid upfront or billed for how much they use\nend of billing period.").optional() +}); + +export const AttachParamsItemConfigSchema = z.object({ + onDecrease: z.union([z.unknown(), z.literal('prorate_immediately'), z.literal('prorate_next_cycle'), z.literal('none'), z.literal('no_prorations')]).nullable().optional(), + onIncrease: z.union([z.unknown(), z.literal('prorate_immediately'), z.literal('prorate_next_cycle'), z.literal('bill_next_cycle')]).nullable().optional(), + rollover: z.unknown().nullable().optional() +}); + +export const AttachParamsItemConfigRolloverSchema = z.object({ + length: z.number(), + max: z.number().nullable(), + duration: z.union([z.literal('month'), z.literal('forever')]).optional() +}); + +export const AttachParamsItemDisplaySchema = z.object({ + primaryText: z.string(), + secondaryText: z.string().nullable().optional() +}); + +export const AttachParamsItemFeatureSchema = z.object({ + id: z.string().describe("The ID of the feature, used to refer to it in other API calls like /track or\n/check."), + type: z.union([z.literal('static'), z.literal('boolean'), z.literal('single_use'), z.literal('continuous_use'), z.literal('credit_system')]).describe("The type of the feature"), + archived: z.boolean().nullable().describe("Whether or not the feature is archived.").optional(), + creditSchema: z.array(z.unknown()).nullable().describe("Credit cost schema for credit system features.").optional(), + display: z.unknown().nullable().describe("Singular and plural display names for the feature.").optional(), + name: z.string().nullable().describe("The name of the feature.").optional() +}); + +export const AttachParamsItemFeatureCreditSchemaSchema = z.object({ + creditCost: z.number().describe("The credit cost of the metered feature."), + meteredFeatureId: z.string().describe("The ID of the metered feature (should be a single_use feature).") +}); + +export const AttachParamsItemFeatureDisplaySchema = z.object({ + plural: z.string().describe("The plural display name for the feature."), + singular: z.string().describe("The singular display name for the feature.") +}); + +export const AttachParamsItemTierSchema = z.object({ + amount: z.number().describe("The price of the product item for this tier."), + to: z.union([z.number(), z.literal('inf')]).describe("The maximum amount of usage for this tier.") +}); + +export const AttachParamsOptionSchema = z.object({ + featureId: z.string(), + quantity: z.number(), + adjustableQuantity: z.boolean().nullable().optional(), + internalFeatureId: z.string().nullable().optional(), + upcomingQuantity: z.number().nullable().optional() +}); + +export const AttachParamsSchema = z.object({ + billingCycleAnchor: z.number().optional(), + checkoutSessionParams: z.unknown().optional(), + customerData: CustomerDataSchema.nullable().describe("Customer details to set when creating a customer").optional(), + enableProductImmediately: z.boolean().optional(), + entityData: EntityDataSchema.optional(), + entityId: z.string().nullable().optional(), + finalizeInvoice: z.boolean().optional(), + forceCheckout: z.boolean().optional(), + freeTrial: z.union([z.unknown(), z.boolean()]).optional(), + invoice: z.boolean().optional(), + invoiceOnly: z.boolean().optional(), + isCustom: z.boolean().optional(), + items: z.array(AttachParamsItemSchema).optional(), + metadata: z.unknown().optional(), + newBillingSubscription: z.boolean().optional(), + options: z.array(AttachParamsOptionSchema).nullable().optional(), + productId: z.string().nullable().optional(), + productIds: z.array(z.string()).nullable().optional(), + reward: z.union([z.string(), z.array(z.string())]).optional(), + setupPayment: z.boolean().optional(), + successUrl: z.string().optional(), + version: z.number().optional(), + dialog: z.any().optional().describe("DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead."), + openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab") +}); + +export interface AttachParamsUnionMember0 { + length: string | number; + + cardRequired?: boolean; + + duration?: 'day' | 'month' | 'year'; + + uniqueFingerprint?: boolean; +} + +export interface AttachParamsItem { + /** + * The reset or billing interval of the product item. If null, feature will have no +reset date, and if there's a price, it will be billed one-off. + */ + interval: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year' | null; + + /** + * The billing units of the product item (eg $1 for 30 credits). + */ + billingUnits?: number | null; + + config?: AttachParamsItemConfig | null; + + createdAt?: number | null; + + display?: AttachParamsItemDisplay | null; + + entitlementId?: string | null; + + /** + * The feature ID of the entity (like seats) to track sub-balances for. + */ + entityFeatureId?: string | null; + + feature?: AttachParamsItemFeature | null; + + /** + * The feature ID of the product item. Should be null for fixed price items. + */ + featureId?: string | null; + + featureType?: 'single_use' | 'continuous_use' | 'boolean' | 'static' | null; + + /** + * The amount of usage included for this feature (per interval). + */ + includedUsage?: number | 'inf' | null; + + /** + * Interval count of the feature. + */ + intervalCount?: number | null; + + /** + * The price of the product item. Should be null if tiered pricing is set. + */ + price?: number | null; + + priceConfig?: unknown; + + priceId?: string | null; + + /** + * Whether the usage should be reset when the product is enabled. + */ + resetUsageWhenEnabled?: boolean | null; + + /** + * Tiered pricing for the product item. Not applicable for fixed price items. + */ + tiers?: AttachParamsItemTier[] | null; + + /** + * The type of the product item. + */ + type?: 'feature' | 'priced_feature' | 'price' | null; + + usageLimit?: number | null; + + /** + * Whether the feature should be prepaid upfront or billed for how much they use +end of billing period. + */ + usageModel?: 'prepaid' | 'pay_per_use' | null; +} + +export interface AttachParamsItemConfig { + onDecrease?: | 'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations' | null; + + onIncrease?: | 'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle' | null; + + rollover?: AttachParamsItemConfigRollover | null; +} + +export interface AttachParamsItemConfigRollover { + length: number; + + max: number | null; + + duration?: 'month' | 'forever'; +} + +export interface AttachParamsItemDisplay { + primaryText: string; + + secondaryText?: string | null; +} + +export interface AttachParamsItemFeature { + /** + * The ID of the feature, used to refer to it in other API calls like /track or +/check. + */ + id: string; + + /** + * The type of the feature + */ + type: 'static' | 'boolean' | 'single_use' | 'continuous_use' | 'credit_system'; + + /** + * Whether or not the feature is archived. + */ + archived?: boolean | null; + + /** + * Credit cost schema for credit system features. + */ + creditSchema?: AttachParamsItemFeatureCreditSchema[] | null; + + /** + * Singular and plural display names for the feature. + */ + display?: AttachParamsItemFeatureDisplay | null; + + /** + * The name of the feature. + */ + name?: string | null; +} + +export interface AttachParamsItemFeatureCreditSchema { + /** + * The credit cost of the metered feature. + */ + creditCost: number; + + /** + * The ID of the metered feature (should be a single_use feature). + */ + meteredFeatureId: string; +} + +export interface AttachParamsItemFeatureDisplay { + /** + * The plural display name for the feature. + */ + plural: string; + + /** + * The singular display name for the feature. + */ + singular: string; +} + +export interface AttachParamsItemTier { + /** + * The price of the product item for this tier. + */ + amount: number; + + /** + * The maximum amount of usage for this tier. + */ + to: number | 'inf'; +} + +export interface AttachParamsOption { + featureId: string; + + quantity: number; + + adjustableQuantity?: boolean | null; + + internalFeatureId?: string | null; + + upcomingQuantity?: number | null; +} + +export interface AttachParams { + billingCycleAnchor?: number; + + checkoutSessionParams?: unknown; + + /** + * Customer details to set when creating a customer + */ + customerData?: CustomerData | null; + + enableProductImmediately?: boolean; + + entityData?: EntityData; + + entityId?: string | null; + + finalizeInvoice?: boolean; + + forceCheckout?: boolean; + + freeTrial?: AttachParamsUnionMember0 | boolean; + + invoice?: boolean; + + invoiceOnly?: boolean; + + isCustom?: boolean; + + items?: AttachParamsItem[]; + + metadata?: unknown; + + newBillingSubscription?: boolean; + + options?: AttachParamsOption[] | null; + + productId?: string | null; + + productIds?: string[] | null; + + reward?: string | string[]; + + setupPayment?: boolean; + + successUrl?: string; + + version?: number; + + /** + * DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead. + */ + dialog?: any; + + /** + * Whether to open checkout in a new tab + */ + openInNewTab?: boolean; +} diff --git a/package/src/libraries/react/clientTypes/billingPortalTypes.ts b/package/src/libraries/react/clientTypes/billingPortalTypes.ts new file mode 100644 index 00000000..1f6d745a --- /dev/null +++ b/package/src/libraries/react/clientTypes/billingPortalTypes.ts @@ -0,0 +1,26 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const BillingPortalParamsSchema = z.object({ + configurationId: z.string().describe("Stripe billing portal configuration ID. Create configurations in your Stripe\ndashboard.").optional(), + returnUrl: z.string().describe("URL to redirect to when back button is clicked in the billing portal").optional(), + openInNewTab: z.boolean().optional().describe("Whether to open billing portal in a new tab") +}); + +export interface BillingPortalParams { + /** + * Stripe billing portal configuration ID. Create configurations in your Stripe +dashboard. + */ + configurationId?: string; + + /** + * URL to redirect to when back button is clicked in the billing portal + */ + returnUrl?: string; + + /** + * Whether to open billing portal in a new tab + */ + openInNewTab?: boolean; +} diff --git a/package/src/libraries/react/clientTypes/cancelTypes.ts b/package/src/libraries/react/clientTypes/cancelTypes.ts new file mode 100644 index 00000000..b43f2f86 --- /dev/null +++ b/package/src/libraries/react/clientTypes/cancelTypes.ts @@ -0,0 +1,31 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const CancelParamsSchema = z.object({ + productId: z.string().describe("The ID of the product to cancel"), + cancelImmediately: z.boolean().describe("Whether to cancel the product immediately or at period end").optional(), + entityId: z.string().nullable().describe("The ID of the entity (optional)").optional(), + prorate: z.boolean().nullable().describe("Whether to prorate the cancellation (defaults to true if not specified)").optional() +}); + +export interface CancelParams { + /** + * The ID of the product to cancel + */ + productId: string; + + /** + * Whether to cancel the product immediately or at period end + */ + cancelImmediately?: boolean; + + /** + * The ID of the entity (optional) + */ + entityId?: string | null; + + /** + * Whether to prorate the cancellation (defaults to true if not specified) + */ + prorate?: boolean | null; +} diff --git a/package/src/libraries/react/clientTypes/checkTypes.ts b/package/src/libraries/react/clientTypes/checkTypes.ts new file mode 100644 index 00000000..87b940ca --- /dev/null +++ b/package/src/libraries/react/clientTypes/checkTypes.ts @@ -0,0 +1,63 @@ +// Auto-generated Zod schema +import { z } from "zod"; +import { CustomerDataSchema } from "./customerDataTypes"; +import { EntityDataSchema } from "./entityDataTypes"; +import type { CustomerData } from "./customerDataTypes"; +import type { EntityData } from "./entityDataTypes"; + +export const CheckParamsSchema = z.object({ + featureId: z.string().describe("ID of the feature to check access to. Required if product_id is not provided."), + customerData: CustomerDataSchema.describe("Properties used if customer is automatically created. Will also update if the\nname or email is not already set.").optional(), + entityData: EntityDataSchema.optional(), + entityId: z.string().describe("If using entity balances (eg, seats), the entity ID to check access for.").optional(), + properties: z.record(z.string(), z.unknown()).optional(), + requiredBalance: z.number().describe("If you know the amount of the feature the end user is consuming in advance. If\ntheir balance is below this quantity, allowed will be false.").optional(), + sendEvent: z.boolean().describe("If true, a usage event will be recorded together with checking access. The\nrequired_balance field will be used as the usage value.").optional(), + withPreview: z.boolean().describe("If true, the response will include a preview object, which can be used to\ndisplay information such as a paywall or upgrade confirmation.").optional(), + dialog: z.any().optional().describe("Dialog configuration for feature check flow") +}); + +export interface CheckParams { + /** + * ID of the feature to check access to. Required if product_id is not provided. + */ + featureId: string; + + /** + * Properties used if customer is automatically created. Will also update if the +name or email is not already set. + */ + customerData?: CustomerData; + + entityData?: EntityData; + + /** + * If using entity balances (eg, seats), the entity ID to check access for. + */ + entityId?: string; + + properties?: { [key: string]: unknown }; + + /** + * If you know the amount of the feature the end user is consuming in advance. If +their balance is below this quantity, allowed will be false. + */ + requiredBalance?: number; + + /** + * If true, a usage event will be recorded together with checking access. The +required_balance field will be used as the usage value. + */ + sendEvent?: boolean; + + /** + * If true, the response will include a preview object, which can be used to +display information such as a paywall or upgrade confirmation. + */ + withPreview?: boolean; + + /** + * Dialog configuration for feature check flow + */ + dialog?: any; +} diff --git a/package/src/libraries/react/clientTypes/checkoutTypes.ts b/package/src/libraries/react/clientTypes/checkoutTypes.ts new file mode 100644 index 00000000..2e0d5f24 --- /dev/null +++ b/package/src/libraries/react/clientTypes/checkoutTypes.ts @@ -0,0 +1,361 @@ +// Auto-generated Zod schema +import { z } from "zod"; +import { CustomerDataSchema } from "./customerDataTypes"; +import { EntityDataSchema } from "./entityDataTypes"; +import type { CustomerData } from "./customerDataTypes"; +import type { EntityData } from "./entityDataTypes"; + +export const CheckoutParamsUnionMember0Schema = z.object({ + length: z.union([z.string(), z.number()]), + cardRequired: z.boolean().optional(), + duration: z.union([z.literal('day'), z.literal('month'), z.literal('year')]).optional(), + uniqueFingerprint: z.boolean().optional() +}); + +export const CheckoutParamsItemSchema = z.object({ + interval: z.union([z.literal('minute'), z.literal('hour'), z.literal('day'), z.literal('week'), z.literal('month'), z.literal('quarter'), z.literal('semi_annual'), z.literal('year')]).nullable().describe("The reset or billing interval of the product item. If null, feature will have no\nreset date, and if there's a price, it will be billed one-off."), + billingUnits: z.number().nullable().describe("The billing units of the product item (eg $1 for 30 credits).").optional(), + config: z.unknown().nullable().optional(), + createdAt: z.number().nullable().optional(), + display: z.unknown().nullable().optional(), + entitlementId: z.string().nullable().optional(), + entityFeatureId: z.string().nullable().describe("The feature ID of the entity (like seats) to track sub-balances for.").optional(), + feature: z.unknown().nullable().optional(), + featureId: z.string().nullable().describe("The feature ID of the product item. Should be null for fixed price items.").optional(), + featureType: z.union([z.literal('single_use'), z.literal('continuous_use'), z.literal('boolean'), z.literal('static')]).nullable().optional(), + includedUsage: z.union([z.number(), z.literal('inf')]).nullable().describe("The amount of usage included for this feature (per interval).").optional(), + intervalCount: z.number().nullable().describe("Interval count of the feature.").optional(), + price: z.number().nullable().describe("The price of the product item. Should be null if tiered pricing is set.").optional(), + priceConfig: z.unknown().optional(), + priceId: z.string().nullable().optional(), + resetUsageWhenEnabled: z.boolean().nullable().describe("Whether the usage should be reset when the product is enabled.").optional(), + tiers: z.array(z.unknown()).nullable().describe("Tiered pricing for the product item. Not applicable for fixed price items.").optional(), + type: z.union([z.literal('feature'), z.literal('priced_feature'), z.literal('price')]).nullable().describe("The type of the product item.").optional(), + usageLimit: z.number().nullable().optional(), + usageModel: z.union([z.literal('prepaid'), z.literal('pay_per_use')]).nullable().describe("Whether the feature should be prepaid upfront or billed for how much they use\nend of billing period.").optional() +}); + +export const CheckoutParamsItemConfigSchema = z.object({ + onDecrease: z.union([z.unknown(), z.literal('prorate_immediately'), z.literal('prorate_next_cycle'), z.literal('none'), z.literal('no_prorations')]).nullable().optional(), + onIncrease: z.union([z.unknown(), z.literal('prorate_immediately'), z.literal('prorate_next_cycle'), z.literal('bill_next_cycle')]).nullable().optional(), + rollover: z.unknown().nullable().optional() +}); + +export const CheckoutParamsItemConfigRolloverSchema = z.object({ + length: z.number(), + max: z.number().nullable(), + duration: z.union([z.literal('month'), z.literal('forever')]).optional() +}); + +export const CheckoutParamsItemDisplaySchema = z.object({ + primaryText: z.string(), + secondaryText: z.string().nullable().optional() +}); + +export const CheckoutParamsItemFeatureSchema = z.object({ + id: z.string().describe("The ID of the feature, used to refer to it in other API calls like /track or\n/check."), + type: z.union([z.literal('static'), z.literal('boolean'), z.literal('single_use'), z.literal('continuous_use'), z.literal('credit_system')]).describe("The type of the feature"), + archived: z.boolean().nullable().describe("Whether or not the feature is archived.").optional(), + creditSchema: z.array(z.unknown()).nullable().describe("Credit cost schema for credit system features.").optional(), + display: z.unknown().nullable().describe("Singular and plural display names for the feature.").optional(), + name: z.string().nullable().describe("The name of the feature.").optional() +}); + +export const CheckoutParamsItemFeatureCreditSchemaSchema = z.object({ + creditCost: z.number().describe("The credit cost of the metered feature."), + meteredFeatureId: z.string().describe("The ID of the metered feature (should be a single_use feature).") +}); + +export const CheckoutParamsItemFeatureDisplaySchema = z.object({ + plural: z.string().describe("The plural display name for the feature."), + singular: z.string().describe("The singular display name for the feature.") +}); + +export const CheckoutParamsItemTierSchema = z.object({ + amount: z.number().describe("The price of the product item for this tier."), + to: z.union([z.number(), z.literal('inf')]).describe("The maximum amount of usage for this tier.") +}); + +export const CheckoutParamsOptionSchema = z.object({ + featureId: z.string(), + quantity: z.number(), + adjustableQuantity: z.boolean().nullable().optional(), + internalFeatureId: z.string().nullable().optional(), + upcomingQuantity: z.number().nullable().optional() +}); + +export const CheckoutParamsSchema = z.object({ + billingCycleAnchor: z.number().optional(), + checkoutSessionParams: z.unknown().optional(), + customerData: CustomerDataSchema.nullable().describe("Customer details to set when creating a customer").optional(), + enableProductImmediately: z.boolean().optional(), + entityData: EntityDataSchema.optional(), + entityId: z.string().nullable().optional(), + finalizeInvoice: z.boolean().optional(), + forceCheckout: z.boolean().optional(), + freeTrial: z.union([z.unknown(), z.boolean()]).optional(), + invoice: z.boolean().optional(), + invoiceOnly: z.boolean().optional(), + isCustom: z.boolean().optional(), + items: z.array(CheckoutParamsItemSchema).optional(), + metadata: z.unknown().optional(), + newBillingSubscription: z.boolean().optional(), + options: z.array(CheckoutParamsOptionSchema).nullable().optional(), + productId: z.string().nullable().optional(), + productIds: z.array(z.string()).nullable().optional(), + reward: z.union([z.string(), z.array(z.string())]).optional(), + setupPayment: z.boolean().optional(), + successUrl: z.string().optional(), + version: z.number().optional(), + dialog: z.any().optional().describe("Dialog configuration for checkout flow"), + openInNewTab: z.boolean().optional().describe("Whether to open checkout in a new tab") +}); + +export interface CheckoutParamsUnionMember0 { + length: string | number; + + cardRequired?: boolean; + + duration?: 'day' | 'month' | 'year'; + + uniqueFingerprint?: boolean; +} + +export interface CheckoutParamsItem { + /** + * The reset or billing interval of the product item. If null, feature will have no +reset date, and if there's a price, it will be billed one-off. + */ + interval: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year' | null; + + /** + * The billing units of the product item (eg $1 for 30 credits). + */ + billingUnits?: number | null; + + config?: CheckoutParamsItemConfig | null; + + createdAt?: number | null; + + display?: CheckoutParamsItemDisplay | null; + + entitlementId?: string | null; + + /** + * The feature ID of the entity (like seats) to track sub-balances for. + */ + entityFeatureId?: string | null; + + feature?: CheckoutParamsItemFeature | null; + + /** + * The feature ID of the product item. Should be null for fixed price items. + */ + featureId?: string | null; + + featureType?: 'single_use' | 'continuous_use' | 'boolean' | 'static' | null; + + /** + * The amount of usage included for this feature (per interval). + */ + includedUsage?: number | 'inf' | null; + + /** + * Interval count of the feature. + */ + intervalCount?: number | null; + + /** + * The price of the product item. Should be null if tiered pricing is set. + */ + price?: number | null; + + priceConfig?: unknown; + + priceId?: string | null; + + /** + * Whether the usage should be reset when the product is enabled. + */ + resetUsageWhenEnabled?: boolean | null; + + /** + * Tiered pricing for the product item. Not applicable for fixed price items. + */ + tiers?: CheckoutParamsItemTier[] | null; + + /** + * The type of the product item. + */ + type?: 'feature' | 'priced_feature' | 'price' | null; + + usageLimit?: number | null; + + /** + * Whether the feature should be prepaid upfront or billed for how much they use +end of billing period. + */ + usageModel?: 'prepaid' | 'pay_per_use' | null; +} + +export interface CheckoutParamsItemConfig { + onDecrease?: | 'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations' | null; + + onIncrease?: | 'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle' | null; + + rollover?: CheckoutParamsItemConfigRollover | null; +} + +export interface CheckoutParamsItemConfigRollover { + length: number; + + max: number | null; + + duration?: 'month' | 'forever'; +} + +export interface CheckoutParamsItemDisplay { + primaryText: string; + + secondaryText?: string | null; +} + +export interface CheckoutParamsItemFeature { + /** + * The ID of the feature, used to refer to it in other API calls like /track or +/check. + */ + id: string; + + /** + * The type of the feature + */ + type: 'static' | 'boolean' | 'single_use' | 'continuous_use' | 'credit_system'; + + /** + * Whether or not the feature is archived. + */ + archived?: boolean | null; + + /** + * Credit cost schema for credit system features. + */ + creditSchema?: CheckoutParamsItemFeatureCreditSchema[] | null; + + /** + * Singular and plural display names for the feature. + */ + display?: CheckoutParamsItemFeatureDisplay | null; + + /** + * The name of the feature. + */ + name?: string | null; +} + +export interface CheckoutParamsItemFeatureCreditSchema { + /** + * The credit cost of the metered feature. + */ + creditCost: number; + + /** + * The ID of the metered feature (should be a single_use feature). + */ + meteredFeatureId: string; +} + +export interface CheckoutParamsItemFeatureDisplay { + /** + * The plural display name for the feature. + */ + plural: string; + + /** + * The singular display name for the feature. + */ + singular: string; +} + +export interface CheckoutParamsItemTier { + /** + * The price of the product item for this tier. + */ + amount: number; + + /** + * The maximum amount of usage for this tier. + */ + to: number | 'inf'; +} + +export interface CheckoutParamsOption { + featureId: string; + + quantity: number; + + adjustableQuantity?: boolean | null; + + internalFeatureId?: string | null; + + upcomingQuantity?: number | null; +} + +export interface CheckoutParams { + billingCycleAnchor?: number; + + checkoutSessionParams?: unknown; + + /** + * Customer details to set when creating a customer + */ + customerData?: CustomerData | null; + + enableProductImmediately?: boolean; + + entityData?: EntityData; + + entityId?: string | null; + + finalizeInvoice?: boolean; + + forceCheckout?: boolean; + + freeTrial?: CheckoutParamsUnionMember0 | boolean; + + invoice?: boolean; + + invoiceOnly?: boolean; + + isCustom?: boolean; + + items?: CheckoutParamsItem[]; + + metadata?: unknown; + + newBillingSubscription?: boolean; + + options?: CheckoutParamsOption[] | null; + + productId?: string | null; + + productIds?: string[] | null; + + reward?: string | string[]; + + setupPayment?: boolean; + + successUrl?: string; + + version?: number; + + /** + * Dialog configuration for checkout flow + */ + dialog?: any; + + /** + * Whether to open checkout in a new tab + */ + openInNewTab?: boolean; +} diff --git a/package/src/libraries/react/clientTypes/createCustomerTypes.ts b/package/src/libraries/react/clientTypes/createCustomerTypes.ts new file mode 100644 index 00000000..56d8a6b9 --- /dev/null +++ b/package/src/libraries/react/clientTypes/createCustomerTypes.ts @@ -0,0 +1,76 @@ +// Auto-generated Zod schema +import { z } from "zod"; +import { EntityDataSchema } from "./entityDataTypes"; +import type { EntityData } from "./entityDataTypes"; + +export const CustomerCreateParamsSchema = z.object({ + expand: z.union([z.unknown(), z.literal('invoices'), z.literal('trials_used'), z.literal('rewards'), z.literal('entities'), z.literal('referrals'), z.literal('payment_method'), z.literal('upcoming_invoice'), z.literal('subscriptions.plan'), z.literal('scheduled_subscriptions.plan'), z.unknown()]).describe("Query param").optional(), + withAutumnId: z.boolean().describe("Query param").optional(), + disableDefault: z.boolean().describe("Body param").optional(), + email: z.string().nullable().describe("Body param: Customer's email address").optional(), + entityData: EntityDataSchema.describe("Body param").optional(), + entityId: z.string().describe("Body param").optional(), + fingerprint: z.string().describe("Body param: Unique identifier (eg, serial number) to detect duplicate customers\nand prevent free trial abuse").optional(), + metadata: z.record(z.string(), z.unknown()).nullable().describe("Body param: Additional metadata for the customer").optional(), + name: z.string().nullable().describe("Body param: Customer's name").optional(), + stripeId: z.string().describe("Body param: Stripe customer ID if you already have one").optional(), + errorOnNotFound: z.boolean().optional().describe("Whether to return an error if customer is not found") +}); + +export interface CustomerCreateParams { + /** + * Query param + */ + expand?: (| 'invoices' | 'trials_used' | 'rewards' | 'entities' | 'referrals' | 'payment_method' | 'upcoming_invoice' | 'subscriptions.plan' | 'scheduled_subscriptions.plan' | 'balances.feature')[]; + + /** + * Query param + */ + withAutumnId?: boolean; + + /** + * Body param + */ + disableDefault?: boolean; + + /** + * Body param: Customer's email address + */ + email?: string | null; + + /** + * Body param + */ + entityData?: EntityData; + + /** + * Body param + */ + entityId?: string; + + /** + * Body param: Unique identifier (eg, serial number) to detect duplicate customers +and prevent free trial abuse + */ + fingerprint?: string; + + /** + * Body param: Additional metadata for the customer + */ + metadata?: { [key: string]: unknown } | null; + + /** + * Body param: Customer's name + */ + name?: string | null; + + /** + * Body param: Stripe customer ID if you already have one + */ + stripeId?: string; + + /** + * Whether to return an error if customer is not found + */ + errorOnNotFound?: boolean; +} diff --git a/package/src/libraries/react/clientTypes/createEntityTypes.ts b/package/src/libraries/react/clientTypes/createEntityTypes.ts new file mode 100644 index 00000000..f0596cd6 --- /dev/null +++ b/package/src/libraries/react/clientTypes/createEntityTypes.ts @@ -0,0 +1,33 @@ +// Auto-generated Zod schema +import { z } from "zod"; +import { CustomerDataSchema } from "./customerDataTypes"; +import type { CustomerData } from "./customerDataTypes"; + +export const EntityCreateParamsSchema = z.object({ + id: z.string().nullable().describe("The ID of the entity"), + featureId: z.string().describe("The ID of the feature this entity is associated with"), + customerData: CustomerDataSchema.describe("Customer details to set when creating a customer").optional(), + name: z.string().nullable().describe("The name of the entity").optional() +}); + +export interface EntityCreateParams { + /** + * The ID of the entity + */ + id: string | null; + + /** + * The ID of the feature this entity is associated with + */ + featureId: string; + + /** + * Customer details to set when creating a customer + */ + customerData?: CustomerData; + + /** + * The name of the entity + */ + name?: string | null; +} diff --git a/package/src/libraries/react/clientTypes/createReferralCodeTypes.ts b/package/src/libraries/react/clientTypes/createReferralCodeTypes.ts new file mode 100644 index 00000000..489e6776 --- /dev/null +++ b/package/src/libraries/react/clientTypes/createReferralCodeTypes.ts @@ -0,0 +1,13 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const ReferralCreateCodeParamsSchema = z.object({ + programId: z.string().describe("ID of your referral program") +}); + +export interface ReferralCreateCodeParams { + /** + * ID of your referral program + */ + programId: string; +} diff --git a/package/src/libraries/react/clientTypes/customerDataTypes.ts b/package/src/libraries/react/clientTypes/customerDataTypes.ts new file mode 100644 index 00000000..9d38daad --- /dev/null +++ b/package/src/libraries/react/clientTypes/customerDataTypes.ts @@ -0,0 +1,34 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const CustomerDataSchema = z.object({ + disableDefault: z.boolean().optional(), + email: z.string().nullable().describe("Customer's email address").optional(), + fingerprint: z.string().nullable().optional(), + metadata: z.record(z.string(), z.unknown()).nullable().optional(), + name: z.string().nullable().describe("Customer's name").optional(), + stripeId: z.string().nullable().optional() +}).describe("Customer details to set when creating a customer"); + +/** + * Customer details to set when creating a customer + */ +export interface CustomerData { + disableDefault?: boolean; + + /** + * Customer's email address + */ + email?: string | null; + + fingerprint?: string | null; + + metadata?: { [key: string]: unknown } | null; + + /** + * Customer's name + */ + name?: string | null; + + stripeId?: string | null; +} diff --git a/package/src/libraries/react/clientTypes/entityDataTypes.ts b/package/src/libraries/react/clientTypes/entityDataTypes.ts new file mode 100644 index 00000000..eb322cf9 --- /dev/null +++ b/package/src/libraries/react/clientTypes/entityDataTypes.ts @@ -0,0 +1,19 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const EntityDataSchema = z.object({ + featureId: z.string().describe("The feature ID that this entity is associated with"), + name: z.string().describe("Name of the entity").optional() +}); + +export interface EntityData { + /** + * The feature ID that this entity is associated with + */ + featureId: string; + + /** + * Name of the entity + */ + name?: string; +} diff --git a/package/src/libraries/react/clientTypes/getEntityTypes.ts b/package/src/libraries/react/clientTypes/getEntityTypes.ts new file mode 100644 index 00000000..352a296b --- /dev/null +++ b/package/src/libraries/react/clientTypes/getEntityTypes.ts @@ -0,0 +1,13 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const EntityGetParamsSchema = z.object({ + expand: z.array(z.unknown()).describe("Query param").optional() +}); + +export interface EntityGetParams { + /** + * Query param + */ + expand?: 'invoices'[]; +} diff --git a/package/src/libraries/react/clientTypes/index.ts b/package/src/libraries/react/clientTypes/index.ts new file mode 100644 index 00000000..8e294991 --- /dev/null +++ b/package/src/libraries/react/clientTypes/index.ts @@ -0,0 +1,18 @@ +// Auto-generated exports for all camelCase types +// This file is generated by typegen pipeline +// DO NOT EDIT MANUALLY - changes will be overwritten + +export * from './customerDataTypes.js'; +export * from './entityDataTypes.js'; +export * from './createCustomerTypes.js'; +export * from './createEntityTypes.js'; +export * from './getEntityTypes.js'; +export * from './createReferralCodeTypes.js'; +export * from './redeemReferralCodeTypes.js'; +export * from './attachTypes.js'; +export * from './checkoutTypes.js'; +export * from './billingPortalTypes.js'; +export * from './setupPaymentTypes.js'; +export * from './cancelTypes.js'; +export * from './checkTypes.js'; +export * from './queryTypes.js'; diff --git a/package/src/libraries/react/clientTypes/queryTypes.ts b/package/src/libraries/react/clientTypes/queryTypes.ts new file mode 100644 index 00000000..a7450fea --- /dev/null +++ b/package/src/libraries/react/clientTypes/queryTypes.ts @@ -0,0 +1,19 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const QueryParamsSchema = z.object({ + featureId: z.union([z.string(), z.array(z.string())]).describe("The feature ID(s) to query"), + range: z.union([z.literal('24h'), z.literal('7d'), z.literal('30d'), z.literal('90d'), z.literal('last_cycle')]).nullable().describe("Time range for the query (defaults to last_cycle if not provided)").optional() +}); + +export interface QueryParams { + /** + * The feature ID(s) to query + */ + featureId: string | string[]; + + /** + * Time range for the query (defaults to last_cycle if not provided) + */ + range?: '24h' | '7d' | '30d' | '90d' | 'last_cycle' | null; +} diff --git a/package/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts b/package/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts new file mode 100644 index 00000000..b65323ed --- /dev/null +++ b/package/src/libraries/react/clientTypes/redeemReferralCodeTypes.ts @@ -0,0 +1,13 @@ +// Auto-generated Zod schema +import { z } from "zod"; + +export const ReferralRedeemCodeParamsSchema = z.object({ + code: z.string().describe("The referral code to redeem") +}); + +export interface ReferralRedeemCodeParams { + /** + * The referral code to redeem + */ + code: string; +} diff --git a/package/src/libraries/react/clientTypes/setupPaymentTypes.ts b/package/src/libraries/react/clientTypes/setupPaymentTypes.ts new file mode 100644 index 00000000..627c0639 --- /dev/null +++ b/package/src/libraries/react/clientTypes/setupPaymentTypes.ts @@ -0,0 +1,34 @@ +// Auto-generated Zod schema +import { z } from "zod"; +import { CustomerDataSchema } from "./customerDataTypes"; +import type { CustomerData } from "./customerDataTypes"; + +export const SetupPaymentParamsSchema = z.object({ + checkoutSessionParams: z.record(z.string(), z.unknown()).describe("Additional parameters for the checkout session").optional(), + customerData: CustomerDataSchema.describe("Customer details to set when creating a customer").optional(), + successUrl: z.string().describe("URL to redirect to after successful payment setup. Must start with either\nhttp:// or https://").optional(), + openInNewTab: z.boolean().optional().describe("Whether to open payment setup in a new tab") +}); + +export interface SetupPaymentParams { + /** + * Additional parameters for the checkout session + */ + checkoutSessionParams?: { [key: string]: unknown }; + + /** + * Customer details to set when creating a customer + */ + customerData?: CustomerData; + + /** + * URL to redirect to after successful payment setup. Must start with either +http:// or https:// + */ + successUrl?: string; + + /** + * Whether to open payment setup in a new tab + */ + openInNewTab?: boolean; +} diff --git a/package/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx b/package/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx index a7f3d5e7..c976223c 100644 --- a/package/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx +++ b/package/src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx @@ -1,7 +1,12 @@ "use client"; import * as AccordionPrimitive from "@radix-ui/react-accordion"; -import type { CheckoutParams, CheckoutResult, ProductItem } from "@sdk"; +import type { CheckoutParams } from "@useautumn/sdk/resources"; +import type { CheckoutResponse } from "@/types"; import { ArrowRight, ChevronDown, Loader2 } from "lucide-react"; + +// CheckoutResult is now CheckoutResponse, ProductItem extracted from CheckoutResponse.Product +type CheckoutResult = CheckoutResponse; +type ProductItem = NonNullable["items"][number]; import type React from "react"; import { useEffect, useState } from "react"; import { @@ -67,7 +72,7 @@ export default function CheckoutDialog(params: CheckoutDialogProps): React.JSX.E const { open, setOpen } = params; const { title, message } = getCheckoutContent(checkoutResult); - const isFree = checkoutResult?.product.properties?.is_free; + const isFree = checkoutResult?.product?.properties?.is_free; const isPaid = isFree === false; return ( @@ -91,7 +96,7 @@ export default function CheckoutDialog(params: CheckoutDialogProps): React.JSX.E onClick={async () => { setLoading(true); - const options = checkoutResult.options.map((option) => { + const options = (checkoutResult.options ?? []).map((option) => { return { featureId: option.feature_id, quantity: option.quantity, @@ -99,8 +104,10 @@ export default function CheckoutDialog(params: CheckoutDialogProps): React.JSX.E }); await attach({ - productId: checkoutResult.product.id, - ...(params.checkoutParams || {}), + productId: checkoutResult.product!.id, + // Type cast needed: CheckoutParams from @sdk uses snake_case, + // but local AttachParams uses camelCase. The client handles conversion. + ...(params.checkoutParams as unknown as Record ?? {}), options, }); setOpen(false); @@ -155,7 +162,7 @@ function DueAmounts({ checkoutResult }: { checkoutResult: CheckoutResult }) { ? new Date(next_cycle.starts_at).toLocaleDateString() : undefined; - const hasUsagePrice = product.items.some( + const hasUsagePrice = product?.items.some( (item) => item.usage_model === "pay_per_use", ); @@ -170,12 +177,12 @@ function DueAmounts({ checkoutResult }: { checkoutResult: CheckoutResult }) {

{formatCurrency({ - amount: checkoutResult?.total, - currency: checkoutResult?.currency, + amount: checkoutResult?.total ?? 0, + currency: checkoutResult?.currency ?? "USD", })}

- {showNextCycle && ( + {showNextCycle && next_cycle && (

Due next cycle ({nextCycleAtStr})

@@ -183,7 +190,7 @@ function DueAmounts({ checkoutResult }: { checkoutResult: CheckoutResult }) {

{formatCurrency({ amount: next_cycle.total, - currency: checkoutResult?.currency, + currency: checkoutResult?.currency ?? "USD", })} {hasUsagePrice && + usage prices}

@@ -201,15 +208,15 @@ function ProductItems({ setCheckoutResult: (checkoutResult: CheckoutResult) => void; }) { const isUpdateQuantity = - checkoutResult?.product.scenario === "active" && - checkoutResult.product.properties.updateable; + checkoutResult?.product?.scenario === "active" && + checkoutResult.product?.properties?.updateable; - const isOneOff = checkoutResult?.product.properties.is_one_off; + const isOneOff = checkoutResult?.product?.properties?.is_one_off; return (

Price

- {checkoutResult?.product.items + {checkoutResult?.product?.items .filter((item) => item.type !== "feature") .map((item, index) => { if (item.usage_model == "prepaid") { @@ -271,7 +278,7 @@ function CheckoutLines({ checkoutResult }: { checkoutResult: CheckoutResult }) {

{new Intl.NumberFormat("en-US", { style: "currency", - currency: checkoutResult?.currency, + currency: checkoutResult?.currency ?? "USD", }).format(line.amount)}

@@ -313,19 +320,20 @@ const PrepaidItem = ({ checkoutResult: CheckoutResult; setCheckoutResult: (checkoutResult: CheckoutResult) => void; }) => { - const { quantity = 0, billing_units: billingUnits = 1 } = item; + const quantity = item.quantity ?? 0; + const billingUnits = item.billing_units ?? 1; const [quantityInput, setQuantityInput] = useState( (quantity / billingUnits).toString(), ); const { checkout } = useCustomer(); const [loading, setLoading] = useState(false); const [open, setOpen] = useState(false); - const scenario = checkoutResult.product.scenario; + const scenario = checkoutResult.product?.scenario; const handleSave = async () => { setLoading(true); try { - const newOptions = checkoutResult.options + const newOptions = (checkoutResult.options ?? []) .filter((option) => option.feature_id !== item.feature_id) .map((option) => { return { @@ -340,7 +348,7 @@ const PrepaidItem = ({ }); const { data, error } = await checkout({ - productId: checkoutResult.product.id, + productId: checkoutResult.product!.id, options: newOptions, dialog: CheckoutDialog, }); @@ -399,7 +407,7 @@ const PrepaidItem = ({ onChange={(e) => setQuantityInput(e.target.value)} />

- {billingUnits > 1 && `x ${billingUnits} `} + {(billingUnits ?? 1) > 1 && `x ${billingUnits} `} {item.feature?.name}

diff --git a/package/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx b/package/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx index 4b73d413..cf76ca5e 100644 --- a/package/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx +++ b/package/src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx @@ -1,17 +1,21 @@ -import { type CheckoutResult } from "@sdk"; +import { type CheckoutResponse } from "@/types"; import type React from "react"; +// CheckoutResult is now CheckoutResponse +type CheckoutResult = CheckoutResponse; + export const getCheckoutContent = (checkoutResult: CheckoutResult): { title: React.JSX.Element; message: React.JSX.Element } => { const { product, current_product, next_cycle } = checkoutResult; - const { is_one_off, is_free, has_trial, updateable } = product.properties; - const scenario = product.scenario; + // product can be null/undefined in CheckoutResponse, but is expected to exist when this function is called + const { is_one_off, is_free, has_trial, updateable } = product?.properties ?? {}; + const scenario = product?.scenario; const nextCycleAtStr = next_cycle ? new Date(next_cycle.starts_at).toLocaleDateString() : undefined; - const productName = product.name; + const productName = product?.name; if (is_one_off) { return { @@ -57,7 +61,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult): { title: Rea title:

{productName} product already scheduled

, message: (

- You are currently on product {current_product.name} and are + You are currently on product {current_product?.name} and are scheduled to start {productName} on {nextCycleAtStr}.

), @@ -118,7 +122,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult): { title: Rea message: (

By clicking confirm, your current subscription to{" "} - {current_product.name} will be cancelled and a new subscription to{" "} + {current_product?.name} will be cancelled and a new subscription to{" "} {productName} will begin on {nextCycleAtStr}.

), @@ -129,7 +133,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult): { title: Rea title:

Cancel

, message: (

- By clicking confirm, your subscription to {current_product.name}{" "} + By clicking confirm, your subscription to {current_product?.name}{" "} will end on {nextCycleAtStr}.

), diff --git a/package/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx b/package/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx index e6721288..1199e946 100644 --- a/package/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx +++ b/package/src/libraries/react/components/paywall-dialog/lib/paywall-content.tsx @@ -1,4 +1,7 @@ -import { type CheckFeaturePreview } from "@sdk"; +import { type CheckPreview } from "@/types"; + +// CheckFeaturePreview is now CheckResponse.Preview (aliased as CheckPreview) +type CheckFeaturePreview = CheckPreview; export const getPaywallContent = (preview?: CheckFeaturePreview) => { if (!preview) { diff --git a/package/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx b/package/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx index 8e4d927d..f5070d3e 100644 --- a/package/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx +++ b/package/src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx @@ -1,10 +1,30 @@ -import { type Product } from "@sdk"; +import { type Plan } from "@/types"; import type React from "react"; -export const getPricingTableContent = (product: Product): { buttonText: React.JSX.Element } => { - const { scenario, free_trial, properties } = product; - const { is_one_off, updateable, has_trial } = properties; +// Extended Plan type with display properties added by usePricingTable hook +type PricingTablePlan = Plan & { + display?: { + name?: string; + description?: string; + button_text?: string; + recommend_text?: string; + everything_from?: string; + button_url?: string; + }; + properties?: { + is_free?: boolean; + is_one_off?: boolean; + has_trial?: boolean; + interval_group?: string; + updateable?: boolean; + }; +}; + +export const getPricingTableContent = (product: PricingTablePlan): { buttonText: React.JSX.Element } => { + const { customer_eligibility, free_trial, properties } = product; + const scenario = customer_eligibility?.scenario; + const { is_one_off, updateable, has_trial } = properties ?? {}; if (has_trial) { return { diff --git a/package/src/libraries/react/components/pricing-table/pricing-table-synced.tsx b/package/src/libraries/react/components/pricing-table/pricing-table-synced.tsx index 0856e374..f5088bd8 100644 --- a/package/src/libraries/react/components/pricing-table/pricing-table-synced.tsx +++ b/package/src/libraries/react/components/pricing-table/pricing-table-synced.tsx @@ -8,10 +8,29 @@ import { Button } from "@/components/ui/button"; import CheckoutDialog from "../checkout-dialog/checkout-dialog-synced"; import { getPricingTableContent } from "./lib/pricing-table-content"; import type { CheckoutParams } from "@/client/types/clientAttachTypes"; -import type { Product, ProductItem } from "@sdk"; -import { loadingStyles, spinnerStyles } from "@/utils/inject-styles"; +import type { Plan, PlanFeature } from "@/types"; +import { loadingStyles } from "@/utils/inject-styles"; import { Loader2 } from "lucide-react"; +// Extended Plan type with display properties added by usePricingTable hook +type PricingTablePlan = Plan & { + display?: { + name?: string; + description?: string; + button_text?: string; + recommend_text?: string; + everything_from?: string; + button_url?: string; + }; + properties?: { + is_free?: boolean; + is_one_off?: boolean; + has_trial?: boolean; + interval_group?: string; + updateable?: boolean; + }; +}; + export default function PricingTable({ productDetails, checkoutParams, @@ -22,12 +41,13 @@ export default function PricingTable({ const { customer, checkout } = useCustomer({ errorOnNotFound: false }); const [isAnnual, setIsAnnual] = useState(false); - const { products, isLoading, error } = usePricingTable({ productDetails }); + const { plans, isLoading, error } = usePricingTable({ productDetails }); + const products = plans as PricingTablePlan[] | null; if (isLoading) { return (
- +
); } @@ -44,7 +64,7 @@ export default function PricingTable({ const multiInterval = intervals.length > 1; - const intervalFilter = (product: Product) => { + const intervalFilter = (product: PricingTablePlan) => { if (!product.properties?.interval_group) { return true; } @@ -75,9 +95,9 @@ export default function PricingTable({ productId={product.id} buttonProps={{ disabled: - (product.scenario === "active" && - !product.properties.updateable) || - product.scenario === "scheduled", + (product.customer_eligibility?.scenario === "active" && + !product.properties?.updateable) || + product.customer_eligibility?.scenario === "scheduled", onClick: async () => { if (product.id && customer) { @@ -102,7 +122,7 @@ export default function PricingTable({ const PricingTableContext = createContext<{ isAnnualToggle: boolean; setIsAnnualToggle: (isAnnual: boolean) => void; - products: Product[]; + products: PricingTablePlan[]; showFeatures: boolean; }>({ isAnnualToggle: false, @@ -131,7 +151,7 @@ export const PricingTableContainer = ({ multiInterval, }: { children?: React.ReactNode; - products?: Product[]; + products?: PricingTablePlan[]; showFeatures?: boolean; className?: string; isAnnualToggle: boolean; @@ -212,11 +232,11 @@ export const PricingCard = ({ ? { primary_text: "Free", } - : product.items[0].display; + : product.features[0]?.display; const featureItems = product.properties?.is_free - ? product.items - : product.items.slice(1); + ? product.features + : product.features.slice(1); return (
{ diff --git a/package/src/libraries/react/hooks/helpers/handleCheck.ts b/package/src/libraries/react/hooks/helpers/handleCheck.ts index 4c6553b7..f49adf51 100644 --- a/package/src/libraries/react/hooks/helpers/handleCheck.ts +++ b/package/src/libraries/react/hooks/helpers/handleCheck.ts @@ -1,16 +1,7 @@ import { AutumnContextParams } from "@/AutumnContext"; import { CheckParams } from "@/client/types/clientGenTypes"; -import { - AutumnError, - CheckFeatureResult, - CheckFeatureResultSchema, - CheckProductResult, - CheckResult, - Customer, - CustomerFeature, - Entity, -} from "@sdk"; -import { Result } from "@sdk/response"; +import type { Customer, Entity, CheckResponse, CustomerBalances } from "@/types"; +import type { Result } from "../../../../sdk/response"; export interface AllowedParams { featureId?: string; @@ -18,7 +9,7 @@ export interface AllowedParams { requiredBalance?: number; } -const getCusFeature = ({ +const getCustomerBalance = ({ customer, featureId, requiredBalance = 1, @@ -27,60 +18,68 @@ const getCusFeature = ({ featureId: string; requiredBalance?: number; }) => { - // 1. If there's a cusFeature and balance > requiredBalance, use it... - let cusFeature = customer.features[featureId]; + // V2: Access balances instead of features + const balances = customer.balances; + if (!balances) { + return { + balance: undefined, + requiredBalance: requiredBalance, + }; + } + + // 1. If there's a balance and current_balance >= requiredBalance, use it... + let balance = balances[featureId]; if ( - cusFeature && - typeof cusFeature.balance === "number" && - cusFeature.balance >= requiredBalance + balance && + typeof balance.current_balance === "number" && + balance.current_balance >= requiredBalance ) { return { - cusFeature, + balance, requiredBalance: requiredBalance, }; } - // 1. If credit system exists, use it - let creditSchema = Object.values(customer.features).find( - (f: CustomerFeature) => - f.credit_schema && f.credit_schema.some((c) => c.feature_id === featureId) + // Check for credit system - look for features with credit_schema + let creditSystemBalance = Object.values(balances).find( + (b: CustomerBalances) => + b.feature?.credit_schema && b.feature.credit_schema.some((c) => c.metered_feature_id === featureId) ); // 2. If there's a credit schema, use it... - if (creditSchema) { - let schemaItem = creditSchema.credit_schema?.find( - (c) => c.feature_id === featureId - )!; + if (creditSystemBalance && creditSystemBalance.feature?.credit_schema) { + let schemaItem = creditSystemBalance.feature.credit_schema.find( + (c) => c.metered_feature_id === featureId + ); - return { - cusFeature: creditSchema, - requiredBalance: schemaItem.credit_amount * requiredBalance, - }; + if (schemaItem) { + return { + balance: creditSystemBalance, + requiredBalance: schemaItem.credit_cost * requiredBalance, + }; + } } - // 2. If no credit system exists, use the feature + // 3. If no credit system exists, use the feature balance return { - cusFeature: customer.features[featureId], + balance: balances[featureId], requiredBalance: requiredBalance, }; }; const getFeatureAllowed = ({ - cusFeature, + balance, requiredBalance, }: { - cusFeature: CustomerFeature | undefined; + balance: CustomerBalances | undefined; requiredBalance: number; }) => { - if (!cusFeature) return false; - if (cusFeature.type == "static") return true; - if (cusFeature.unlimited || cusFeature.overage_allowed) return true; - if (cusFeature.usage_limit) { - let extraUsage = - (cusFeature.usage_limit || 0) - (cusFeature.included_usage || 0); - return (cusFeature.balance || 0) + extraUsage >= requiredBalance; - } - return (cusFeature.balance || 0) >= requiredBalance; + if (!balance) return false; + // V2: Check feature type from balance.feature + if (balance.feature?.type === "boolean") return true; + if (balance.unlimited || balance.overage_allowed) return true; + // V2: Use current_balance instead of balance + return (balance.current_balance || 0) >= requiredBalance; }; const handleFeatureCheck = ({ @@ -91,9 +90,9 @@ const handleFeatureCheck = ({ customer: Customer | Entity; isEntity?: boolean; params: AllowedParams; -}) => { - // 1. Get feature to use... - let { cusFeature, requiredBalance } = getCusFeature({ +}): CheckResponse => { + // 1. Get balance to use (V2 uses balances instead of features) + let { balance, requiredBalance } = getCustomerBalance({ customer, featureId: params.featureId!, ...(params.requiredBalance @@ -102,30 +101,25 @@ const handleFeatureCheck = ({ }); let allowed = getFeatureAllowed({ - cusFeature, + balance, requiredBalance: requiredBalance ?? 1, }); - let result = { + let result: CheckResponse = { allowed, - feature_id: cusFeature?.id ?? params.featureId!, - customer_id: isEntity ? (customer as Entity).customer_id : customer.id, + customer_id: isEntity ? (customer as Entity).customer_id || "" : customer.id || "", + balance: balance || null, required_balance: requiredBalance, - ...cusFeature, - } as CheckFeatureResult; + }; if (isEntity) { result.entity_id = (customer as Entity).id; } - try { - return CheckFeatureResultSchema.parse(result); - } catch (error) { - return result; - } + return result; }; -const handleProductCheck = ({ +const handlePlanCheck = ({ customer, isEntity, params, @@ -133,18 +127,16 @@ const handleProductCheck = ({ customer: Customer | Entity; isEntity?: boolean; params: AllowedParams; -}) => { - let product = customer.products.find((p) => p.id == params.productId); - let allowed = product?.status === "active" || product?.status === "trialing"; +}): CheckResponse => { + // V2: Use subscriptions instead of products + let subscription = customer.subscriptions?.find((s) => s.plan_id === params.productId); + let allowed = subscription?.status === "active"; - let result = { + let result: CheckResponse = { allowed, - customer_id: isEntity ? (customer as Entity).customer_id : customer.id, - product_id: params.productId!, - } as CheckProductResult; - if (product) { - result.status = product.status; - } + customer_id: isEntity ? (customer as Entity).customer_id || "" : customer.id || "", + balance: null, + }; if (isEntity) { result.entity_id = (customer as Entity).id; @@ -158,7 +150,7 @@ export const openDialog = ({ params, context, }: { - result: CheckResult | null; + result: CheckResponse | null; params: CheckParams; context: AutumnContextParams; }) => { @@ -203,17 +195,16 @@ export const handleCheck = ({ params: CheckParams; context?: AutumnContextParams; }): { - data: CheckResult; + data: CheckResponse; error: null; } => { if (!customer) { return { data: { allowed: false, - feature_id: "", customer_id: "", - required_balance: 0, - } as CheckResult, + balance: null, + } as CheckResponse, error: null, }; } @@ -222,16 +213,16 @@ export const handleCheck = ({ throw new Error("allowed() requires either featureId or productId"); } - let result; + let result: CheckResponse; - if (params.featureId) + if (params.featureId) { result = handleFeatureCheck({ customer, params, isEntity }); - - if (params.productId) - result = handleProductCheck({ customer, params, isEntity }); + } else { + result = handlePlanCheck({ customer, params, isEntity }); + } return { - data: result as CheckResult, + data: result, error: null, }; }; diff --git a/package/src/libraries/react/hooks/helpers/useAutumnBase.tsx b/package/src/libraries/react/hooks/helpers/useAutumnBase.tsx index e2882d8f..cd671998 100644 --- a/package/src/libraries/react/hooks/helpers/useAutumnBase.tsx +++ b/package/src/libraries/react/hooks/helpers/useAutumnBase.tsx @@ -1,10 +1,11 @@ -import { - BillingPortalResult, - CancelResult, - CheckResult, - SetupPaymentResult, - TrackResult, -} from "@sdk"; +import type { + BillingPortalResponse, + CancelResponse, + CheckResponse, + SetupPaymentResponse, + TrackResponse, + AttachResponse, +} from "@/types"; import { AutumnContextParams } from "@/AutumnContext"; import { CancelParams, @@ -13,9 +14,8 @@ import { SetupPaymentParams, TrackParams, } from "@/client/types/clientGenTypes"; -import { AutumnPromise } from "@sdk"; +import type { AutumnPromise } from "../../../../sdk/response"; import { usePricingTableBase } from "../usePricingTableBase"; -import { AttachResult } from "@sdk/general/attachTypes"; import { AttachParams, CheckoutParams } from "@/client/types/clientAttachTypes"; import { AutumnClient } from "@/client/ReactAutumnClient"; import { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; @@ -103,7 +103,7 @@ export const useAutumnBase = ({ const attachWithDialog = async ( params: AttachParams - ): AutumnPromise => { + ): AutumnPromise => { let { ...rest } = params; const { productId, entityId, entityData } = params; @@ -142,7 +142,7 @@ export const useAutumnBase = ({ return await attachWithoutDialog(params); }; - const cancel = async (params: CancelParams): AutumnPromise => { + const cancel = async (params: CancelParams): AutumnPromise => { const res = await client.cancel(params); if (res.error) { @@ -179,7 +179,7 @@ export const useAutumnBase = ({ // return res; // }; - const track = async (params: TrackParams): AutumnPromise => { + const track = async (params: TrackParams): AutumnPromise => { const res = await client.track(params); if (res.error) { @@ -191,7 +191,7 @@ export const useAutumnBase = ({ const openBillingPortal = async ( params?: OpenBillingPortalParams - ): AutumnPromise => { + ): AutumnPromise => { let defaultParams = { openInNewTab: false, }; @@ -224,7 +224,7 @@ export const useAutumnBase = ({ const setupPayment = async ( params?: SetupPaymentParams - ): AutumnPromise => { + ): AutumnPromise => { let defaultParams = { openInNewTab: false, }; diff --git a/package/src/libraries/react/hooks/types/useCustomerMethods.ts b/package/src/libraries/react/hooks/types/useCustomerMethods.ts new file mode 100644 index 00000000..347b9e08 --- /dev/null +++ b/package/src/libraries/react/hooks/types/useCustomerMethods.ts @@ -0,0 +1,150 @@ +// Auto-generated method signatures with JSDoc +// This file is generated by typegen pipeline from @useautumn/sdk +// DO NOT EDIT MANUALLY - changes will be overwritten +// +// To update documentation: +// 1. Edit JSDoc in backend server's shared/api directory +// 2. Regenerate OpenAPI spec and SDK +// 3. Run: pnpm run gen:autumn-js + +import type { Autumn } from "@useautumn/sdk"; +import type { + AttachParams, + BillingPortalParams, + CancelParams, + CheckParams, + CheckoutParams, + ReferralCreateCodeParams, + ReferralRedeemCodeParams, + SetupPaymentParams, +} from "@/clientTypes"; + +/** + * Methods available in useCustomer hook for managing customer subscriptions and features + */ +export interface UseCustomerMethods { + /** + * Enables a product for a customer and processes payment if their payment method is already on file. + * Use this when the customer already has a payment method saved. + * For new customers without payment info, use `checkout` instead. + * + * + * @example + * ```typescript // Attach a product to a customer const response = await client.attach({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/attach Product Attachments} + * + * @example + * ```ts const response = await client.attach({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` + */ + attach: (params: AttachParams) => Promise; + + /** + * Creates a checkout session for a customer to purchase a product with payment collection. + * Use this for new customers or when payment info is needed. + * For customers with existing payment methods, use `attach` instead. + * + * + * @example + * ```typescript // Create a checkout session const response = await client.checkout({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/checkout Checkout Sessions} + * + * @example + * ```ts const response = await client.checkout({ customer_id: 'customer_id', }); ``` + */ + checkout: (params: CheckoutParams) => Promise; + + /** + * Creates a checkout session for a customer to purchase a product with payment collection. + * Use this for new customers or when payment info is needed. + * For customers with existing payment methods, use `attach` instead. + * + * + * @example + * ```typescript // Create a checkout session const response = await client.checkout({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/checkout Checkout Sessions} + * + * @example + * ```ts const response = await client.check({ customer_id: 'customer_id', feature_id: 'feature_id', }); ``` + */ + check: (params: CheckParams) => Autumn.CheckResponse; + + /** + * Cancel a customer's subscription to a product. + * Use this when a customer wants to stop their subscription. + * Supports immediate or end-of-period cancellation. + * + * @param params.product_id - The ID of the product to cancel + * @param params.entity_id - The ID of the entity (optional) + * @param params.cancel_immediately - Whether to cancel the product immediately or at period end + * @param params.prorate - Whether to prorate the cancellation (defaults to true if not specified) + * + * @example + * ```typescript // Cancel a subscription const response = await client.cancel({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/cancel Cancel Subscriptions} + * + * @example + * ```ts const response = await client.cancel({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` + */ + cancel: (params: CancelParams) => Promise; + + /** + * Creates a session for a customer to add or update their payment method. + * Use this to collect payment information without immediately charging the customer. + * + * @param params.success_url - URL to redirect to after successful payment setup. Must start with either http:// or https:// + * @param params.checkout_session_params - Additional parameters for the checkout session + * + * @example + * ```typescript // Setup payment method const response = await client.setupPayment({ customer_id: "cus_123", success_url: "https://example.com/success", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/setup-payment Payment Setup} + * + * @example + * ```ts const response = await client.setupPayment({ customer_id: 'customer_id', }); ``` + */ + setupPayment: (params: SetupPaymentParams) => Promise; + + /** + * Creates a billing portal session where customers can manage their subscription and payment methods. + * Use this to give customers self-service access to view invoices, update payment info, and manage subscriptions. + * + * @param params.return_url - URL to redirect to when back button is clicked in the billing portal. + * + * @example + * ```typescript // Open billing portal const response = await client.billingPortal({ customer_id: "cus_123", return_url: "https://example.com/account", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/billing-portal Billing Portal} + * + * @example + * ```ts const response = await client.billingPortal('customer_id'); ``` + */ + openBillingPortal: (params: BillingPortalParams) => Promise; + + /** + * Create a referral code. + * + * + * @example + * ```ts const response = await client.referrals.createCode({ customer_id: 'cus_123', program_id: 'prog_123', }); ``` + */ + createReferralCode: (params: ReferralCreateCodeParams) => Promise; + + /** + * Redeem a referral code. + * + * + * @example + * ```ts const response = await client.referrals.redeemCode({ code: 'REF123ABC', customer_id: 'cus_456', }); ``` + */ + redeemReferralCode: (params: ReferralRedeemCodeParams) => Promise; +} diff --git a/package/src/libraries/react/hooks/types/useEntityMethods.ts b/package/src/libraries/react/hooks/types/useEntityMethods.ts new file mode 100644 index 00000000..587b95bb --- /dev/null +++ b/package/src/libraries/react/hooks/types/useEntityMethods.ts @@ -0,0 +1,75 @@ +// Auto-generated method signatures with JSDoc +// This file is generated by typegen pipeline from @useautumn/sdk +// DO NOT EDIT MANUALLY - changes will be overwritten +// +// To update documentation: +// 1. Edit JSDoc in backend server's shared/api directory +// 2. Regenerate OpenAPI spec and SDK +// 3. Run: pnpm run gen:autumn-js + +import type { Autumn } from "@useautumn/sdk"; +import type { + AttachParams, + CancelParams, + CheckParams, +} from "@/clientTypes"; + +/** + * Methods available in useEntity hook for entity-scoped subscription operations + */ +export interface UseEntityMethods { + /** + * Enables a product for a customer and processes payment if their payment method is already on file. + * Use this when the customer already has a payment method saved. + * For new customers without payment info, use `checkout` instead. + * + * + * @example + * ```typescript // Attach a product to a customer const response = await client.attach({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/attach Product Attachments} + * + * @example + * ```ts const response = await client.attach({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` + */ + attach: (params: AttachParams) => Promise; + + /** + * Cancel a customer's subscription to a product. + * Use this when a customer wants to stop their subscription. + * Supports immediate or end-of-period cancellation. + * + * @param params.product_id - The ID of the product to cancel + * @param params.entity_id - The ID of the entity (optional) + * @param params.cancel_immediately - Whether to cancel the product immediately or at period end + * @param params.prorate - Whether to prorate the cancellation (defaults to true if not specified) + * + * @example + * ```typescript // Cancel a subscription const response = await client.cancel({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/cancel Cancel Subscriptions} + * + * @example + * ```ts const response = await client.cancel({ customer_id: 'cus_123', product_id: 'pro_plan', }); ``` + */ + cancel: (params: CancelParams) => Promise; + + /** + * Creates a checkout session for a customer to purchase a product with payment collection. + * Use this for new customers or when payment info is needed. + * For customers with existing payment methods, use `attach` instead. + * + * + * @example + * ```typescript // Create a checkout session const response = await client.checkout({ customer_id: "cus_123", product_id: "pro_plan", }); ``` + * + * @see + * {@link https://docs.useautumn.com/api-reference/core/checkout Checkout Sessions} + * + * @example + * ```ts const response = await client.check({ customer_id: 'customer_id', feature_id: 'feature_id', }); ``` + */ + check: (params: CheckParams) => Autumn.CheckResponse; +} diff --git a/package/src/libraries/react/hooks/useAggregateEvents.tsx b/package/src/libraries/react/hooks/useAggregateEvents.tsx index 3287633c..8b9b8f33 100644 --- a/package/src/libraries/react/hooks/useAggregateEvents.tsx +++ b/package/src/libraries/react/hooks/useAggregateEvents.tsx @@ -1,10 +1,8 @@ -import { AutumnError, type AutumnErrorWithStatus } from "@sdk"; +import { AutumnError, type AutumnErrorWithStatus } from "../../../sdk/error"; +import type { EventAggregateResponse } from "@/types"; import useSWR, { type SWRConfiguration } from "swr"; import { AutumnContext, useAutumnContext } from "@/AutumnContext"; -import type { - EventAggregationParams, - EventAggregationResponse, -} from "@/client/types/clientAnalyticsTypes"; +import type { EventAggregationParams } from "@/client/types/clientAnalyticsTypes"; export const useAggregateEvents = ( params: EventAggregationParams & { swrConfig?: SWRConfiguration }, @@ -37,7 +35,7 @@ export const useAggregateEvents = ( ? new Date(params.customRange.end).toISOString().slice(0, 13) : undefined; - const { data, error, mutate } = useSWR( + const { data, error, mutate } = useSWR( [ "eventAggregate", params.featureId, diff --git a/package/src/libraries/react/hooks/useAnalytics.tsx b/package/src/libraries/react/hooks/useAnalytics.tsx index 87c9be23..ccc8c31c 100644 --- a/package/src/libraries/react/hooks/useAnalytics.tsx +++ b/package/src/libraries/react/hooks/useAnalytics.tsx @@ -1,14 +1,23 @@ -import { - AutumnError, - type AutumnErrorWithStatus, - type QueryResult, -} from "@sdk"; +import { AutumnError, type AutumnErrorWithStatus } from "@/utils/error"; +import type { QueryResponse } from "@useautumn/sdk/resources/top-level"; import useSWR from "swr"; import { AutumnContext, useAutumnContext } from "@/AutumnContext"; import type { QueryParams } from "@/client/types/clientGenTypes"; /** - * @deprecated Use useAggregateEvents or useListEvents instead + * Query usage analytics data from your React components. + * + * The `useAnalytics` hook provides access to usage analytics and reporting data. It's the client-side equivalent of the `/query` endpoint, allowing you to fetch and display usage data directly in your React components. + * + * @param params.featureId - Feature ID(s) to query usage data for + * @param params.range - Time range for analytics query. Defaults to '30d' (optional) + * + * @returns data - Array of usage data points with period timestamps and feature usage counts + * @returns isLoading - Whether analytics data is being fetched + * @returns error - Any error that occurred while fetching + * @returns refetch - Manually refetch analytics data + * + * @see {@link https://docs.useautumn.com/api-reference/hooks/useAnalytics} */ export const useAnalytics = (params: QueryParams) => { const context = useAutumnContext({ @@ -31,7 +40,7 @@ export const useAnalytics = (params: QueryParams) => { return res.data; }; - const { data, error, mutate } = useSWR( + const { data, error, mutate } = useSWR( ["analytics", params.featureId, params.range], fetcher, { diff --git a/package/src/libraries/react/hooks/useCustomer.tsx b/package/src/libraries/react/hooks/useCustomer.tsx index efbda753..c1f1d48c 100644 --- a/package/src/libraries/react/hooks/useCustomer.tsx +++ b/package/src/libraries/react/hooks/useCustomer.tsx @@ -1,4 +1,4 @@ -import type { CustomerExpandOption } from "@sdk"; +import type { CustomerExpandOption } from "@/types"; import { AutumnContext } from "../AutumnContext"; import { useCustomerBase, diff --git a/package/src/libraries/react/hooks/useCustomerBase.tsx b/package/src/libraries/react/hooks/useCustomerBase.tsx index a5ee5305..5b59235a 100644 --- a/package/src/libraries/react/hooks/useCustomerBase.tsx +++ b/package/src/libraries/react/hooks/useCustomerBase.tsx @@ -1,21 +1,20 @@ import type { - AutumnError, - AutumnPromise, - BillingPortalResult, - CancelResult, - CheckResult, - CreateReferralCodeResult, Customer, - CustomerExpandOption, Entity, + AttachResponse, + BillingPortalResponse, + CancelResponse, + CheckResponse, + CheckoutResponse, + SetupPaymentResponse, + TrackResponse, + ReferralCreateCodeResponse, + ReferralRedeemCodeResponse, + CustomerExpandOption, ExpandedCustomer, - RedeemReferralCodeResult, - SetupPaymentResult, - TrackResult, -} from "@sdk"; - -import type { AttachResult, CheckoutResult } from "@sdk/general/attachTypes"; -import type { Success } from "@sdk/response"; +} from "@/types"; +import type { AutumnPromise, Success } from "../../../sdk/response"; +import type { AutumnError } from "../../../sdk/error"; import type React from "react"; import useSWR, { type SWRConfiguration } from "swr"; import { type AutumnContextParams, useAutumnContext } from "@/AutumnContext"; @@ -55,19 +54,19 @@ export interface UseCustomerResult< * Attaches a product to the current customer, enabling access and handling billing. * Activates a product and applies all product items with automatic payment handling. */ - attach: (params: AttachParams) => AutumnPromise; + attach: (params: AttachParams) => AutumnPromise; /** * Tracks usage events for metered features. * Records feature usage and updates customer balances server-side. */ - track: (params: TrackParams) => AutumnPromise; + track: (params: TrackParams) => AutumnPromise; /** * Cancels a customer's subscription or product attachment. * Can cancel immediately or at the end of the billing cycle. */ - cancel: (params: CancelParams) => AutumnPromise; + cancel: (params: CancelParams) => AutumnPromise; /** * Sets up a payment method for the customer. @@ -75,7 +74,7 @@ export interface UseCustomerResult< */ setupPayment: ( params?: SetupPaymentParams, - ) => AutumnPromise; + ) => AutumnPromise; /** * Opens the Stripe billing portal for the customer. @@ -83,13 +82,13 @@ export interface UseCustomerResult< */ openBillingPortal: ( params?: OpenBillingPortalParams, - ) => AutumnPromise; + ) => AutumnPromise; /** * Initiates a checkout flow for product purchase. * Handles payment collection and redirects to Stripe checkout when needed. */ - checkout: (params: CheckoutParams) => AutumnPromise; + checkout: (params: CheckoutParams) => AutumnPromise; /** Refetches the customer data from the server */ refetch: () => Promise | null>; @@ -108,7 +107,7 @@ export interface UseCustomerResult< */ createReferralCode: ( params: CreateReferralCodeParams, - ) => AutumnPromise; + ) => AutumnPromise; /** * Redeems a referral code for the customer. @@ -116,13 +115,13 @@ export interface UseCustomerResult< */ redeemReferralCode: ( params: RedeemReferralCodeParams, - ) => AutumnPromise; + ) => AutumnPromise; /** * Checks if a customer has access to a feature and shows paywalls if needed. * Client-side feature gating with optional dialog display for upgrades. */ - check: (params: CheckParams) => Success; + check: (params: CheckParams) => Success; } export interface UseCustomerParams< @@ -133,6 +132,24 @@ export interface UseCustomerParams< swrConfig?: SWRConfiguration; } +/** + * Access a customer's state and use it to display information in your React app. + * + * The `useCustomer` hook provides access to customer data and related operations. You can use it from your frontend to retrieve customer information, manage loading states, and create entities. + * + * @param params.expand - Additional data to include (invoices, rewards, trials_used, entities, referrals, payment_method) (optional) + * @param params.errorOnNotFound - Whether to throw error if customer not found (optional) + * @param params.swrConfig - SWR configuration options (optional) + * + * @returns data - Customer object with subscription and feature data + * @returns isLoading - Whether customer data is being fetched + * @returns error - Any error that occurred while fetching + * @returns refetch - Refetch customer data + * @returns ...methods - All subscription methods (attach, checkout, cancel, track, setupPayment, openBillingPortal, createReferralCode, redeemReferralCode) + * @returns createEntity - Create entities for granular feature tracking + * + * @see {@link https://docs.useautumn.com/api-reference/hooks/useCustomer} + */ export const useCustomerBase = < const T extends readonly CustomerExpandOption[] = readonly [], >({ diff --git a/package/src/libraries/react/hooks/useEntity.tsx b/package/src/libraries/react/hooks/useEntity.tsx index 790b7a57..c32fd376 100644 --- a/package/src/libraries/react/hooks/useEntity.tsx +++ b/package/src/libraries/react/hooks/useEntity.tsx @@ -2,6 +2,22 @@ import { AutumnContext } from "../AutumnContext"; import { GetEntityParams } from "../client/types/clientEntTypes"; import { useEntityBase } from "./useEntityBase"; +/** + * Access an entity's state and use it to display information in your React app. + * + * The `useEntity` hook provides access to entity data and related operations. You can use it from your frontend to retrieve entity information and manage loading states. + * + * @param entityId - The ID of the entity to retrieve + * @param params.expand - Additional data to include in entity response (optional) + * + * @returns data - Entity object with subscription and feature data + * @returns isLoading - Whether entity data is being fetched + * @returns error - Any error that occurred while fetching + * @returns refetch - Refetch entity data + * @returns ...methods - Entity-scoped methods (attach, cancel, track, check) + * + * @see {@link https://docs.useautumn.com/api-reference/hooks/useEntity} + */ export const useEntity = ( entityId: string | null, params?: GetEntityParams diff --git a/package/src/libraries/react/hooks/useEntityBase.tsx b/package/src/libraries/react/hooks/useEntityBase.tsx index ec0d4bd4..5b506409 100644 --- a/package/src/libraries/react/hooks/useEntityBase.tsx +++ b/package/src/libraries/react/hooks/useEntityBase.tsx @@ -10,7 +10,8 @@ import { TrackParams, } from "@/client/types/clientGenTypes"; import { AttachParams } from "@/client/types/clientAttachTypes"; -import { AutumnError, CheckResult, Entity } from "@sdk"; +import type { Entity, CheckResponse } from "@/types"; +import type { AutumnError } from "../../../sdk/error"; export const useEntityBase = ({ entityId, @@ -25,7 +26,7 @@ export const useEntityBase = ({ isLoading: boolean; error: AutumnError | undefined | null; refetch: () => void; - check: (params: CheckParams) => { data: CheckResult, error: null } | { data: null, error: AutumnError }; + check: (params: CheckParams) => { data: CheckResponse, error: null } | { data: null, error: AutumnError }; attach: (params: AttachParams) => void; cancel: (params: CancelParams) => void; track: (params: TrackParams) => void; diff --git a/package/src/libraries/react/hooks/useListEvents.tsx b/package/src/libraries/react/hooks/useListEvents.tsx index 2fb2b1ef..ce931e30 100644 --- a/package/src/libraries/react/hooks/useListEvents.tsx +++ b/package/src/libraries/react/hooks/useListEvents.tsx @@ -1,8 +1,5 @@ -import { - AutumnError, - type AutumnErrorWithStatus, - type EventsListResponse, -} from "@sdk"; +import { AutumnError, type AutumnErrorWithStatus } from "../../../sdk/error"; +import type { EventListResponse } from "@/types"; import { useCallback, useState } from "react"; import useSWR, { type SWRConfiguration } from "swr"; import { AutumnContext, useAutumnContext } from "@/AutumnContext"; @@ -49,7 +46,7 @@ export const useListEvents = ( }; const { data, error, mutate, isLoading } = useSWR< - EventsListResponse, + EventListResponse, AutumnError >( ["eventList", params.featureId, startDate, endDate, offset, limit], diff --git a/package/src/libraries/react/hooks/usePaywall.tsx b/package/src/libraries/react/hooks/usePaywall.tsx index 87fbde5b..acc2be4d 100644 --- a/package/src/libraries/react/hooks/usePaywall.tsx +++ b/package/src/libraries/react/hooks/usePaywall.tsx @@ -1,6 +1,6 @@ import { AutumnContext, useAutumnContext } from "@/AutumnContext"; import { AutumnClient } from "@/client/ReactAutumnClient"; -import { CheckFeaturePreview } from "@sdk"; +import type { CheckPreview } from "@/types"; import useSWR from "swr"; export const usePaywall = ({ @@ -38,7 +38,7 @@ export const usePaywall = ({ }); return { - data: data?.preview as CheckFeaturePreview | undefined, + data: data?.preview as CheckPreview | undefined, error, isLoading, }; diff --git a/package/src/libraries/react/hooks/usePricingTableBase.tsx b/package/src/libraries/react/hooks/usePricingTableBase.tsx index c3915ce4..228b3513 100644 --- a/package/src/libraries/react/hooks/usePricingTableBase.tsx +++ b/package/src/libraries/react/hooks/usePricingTableBase.tsx @@ -1,39 +1,40 @@ import useSWR, { SWRConfiguration } from "swr"; -import { AutumnError, Product } from "@sdk"; +import type { Plan } from "@/types"; +import { AutumnError } from "../../../sdk/error"; import { ProductDetails } from "../client/types/clientPricingTableTypes"; import { AutumnContextParams, useAutumnContext } from "../AutumnContext"; import { AutumnClient } from "@/client/ReactAutumnClient"; import { ConvexAutumnClient } from "@/client/ConvexAutumnClient"; -const mergeProductDetails = ( - products: Product[] | undefined, +const mergePlanDetails = ( + plans: Plan[] | undefined, productDetails?: ProductDetails[] -): Product[] | null => { - if (!products) { +): Plan[] | null => { + if (!plans) { return null; } if (!productDetails) { - return products.map((product) => { - if (product.base_variant_id) { - let baseProduct = products.find( - (p) => p.id === product.base_variant_id + return plans.map((plan) => { + if (plan.base_variant_id) { + let basePlan = plans.find( + (p) => p.id === plan.base_variant_id ); - if (baseProduct) { + if (basePlan) { return { - ...product, - name: baseProduct.name, + ...plan, + name: basePlan.name, }; } } - return product; + return plan; }); } - let fetchedProducts = structuredClone(products); + let fetchedPlans = structuredClone(plans); - let mergedProducts: Product[] = []; + let mergedPlans: Plan[] = []; for (const overrideDetails of productDetails) { if (!overrideDetails.id) { @@ -69,7 +70,7 @@ const mergeProductDetails = ( ] as any; } - mergedProducts.push({ + mergedPlans.push({ display: { name: overrideDetails.name, description: overrideDetails.description, @@ -78,96 +79,96 @@ const mergeProductDetails = ( everything_from: overrideDetails.everythingFrom, button_url: overrideDetails.buttonUrl, }, - items: overrideItems, + features: overrideItems, properties, - } as unknown as Product); + } as unknown as Plan); continue; } - let fetchedProduct = fetchedProducts.find( + let fetchedPlan = fetchedPlans.find( (p) => p.id === overrideDetails.id ); - if (!fetchedProduct) { + if (!fetchedPlan) { continue; } - let displayName = fetchedProduct.name; - let baseVariantId = fetchedProduct.base_variant_id; + let displayName = fetchedPlan.name; + let baseVariantId = fetchedPlan.base_variant_id; if (baseVariantId) { - let baseProduct = fetchedProducts.find((p) => p.id === baseVariantId); - if (baseProduct) { - displayName = baseProduct.name; + let basePlan = fetchedPlans.find((p) => p.id === baseVariantId); + if (basePlan) { + displayName = basePlan.name; } } displayName = overrideDetails.name || displayName; - const originalIsFree = fetchedProduct.properties?.is_free; - let overrideProperties = fetchedProduct.properties || {}; + const originalIsFree = (fetchedPlan as any).properties?.is_free; + let overrideProperties = (fetchedPlan as any).properties || {}; let overrideItems = overrideDetails.items; let overridePrice = overrideDetails.price; - let mergedItems = []; + let mergedFeatures: any[] = []; if (overridePrice) { overrideProperties.is_free = false; if (originalIsFree || overrideItems !== undefined) { - mergedItems.push({ + mergedFeatures.push({ display: { primary_text: overridePrice.primaryText, secondary_text: overridePrice.secondaryText, }, }); } else { - fetchedProduct.items[0].display = { + fetchedPlan.features[0].display = { primary_text: overridePrice.primaryText, secondary_text: overridePrice.secondaryText, }; } } else { if (overrideItems && !originalIsFree) { - mergedItems.push(fetchedProduct.items[0]); + mergedFeatures.push(fetchedPlan.features[0]); } } if (overrideItems) { for (const overrideItem of overrideItems) { if (!overrideItem.featureId) { - mergedItems.push({ + mergedFeatures.push({ display: { primary_text: overrideItem.primaryText, secondary_text: overrideItem.secondaryText, }, }); } else { - let fetchedItem = fetchedProduct.items.find( - (i) => i.feature_id === overrideItem.featureId + let fetchedFeature = fetchedPlan.features.find( + (f) => f.feature_id === overrideItem.featureId ); - if (!fetchedItem) { + if (!fetchedFeature) { console.error( - `Feature with id ${overrideItem.featureId} not found for product ${fetchedProduct.id}` + `Feature with id ${overrideItem.featureId} not found for plan ${fetchedPlan.id}` ); continue; } - mergedItems.push({ - ...fetchedItem, + mergedFeatures.push({ + ...fetchedFeature, display: { primary_text: - overrideItem.primaryText || fetchedItem.display?.primary_text, + overrideItem.primaryText || fetchedFeature.display?.primary_text, secondary_text: overrideItem.secondaryText || - fetchedItem.display?.secondary_text, + fetchedFeature.display?.secondary_text, }, }); } } } else { - mergedItems = fetchedProduct.items; + mergedFeatures = fetchedPlan.features; } - const mergedProduct: Product = { - ...fetchedProduct, - items: mergedItems, + const mergedPlan: Plan = { + ...fetchedPlan, + features: mergedFeatures, properties: overrideProperties, display: { name: displayName, @@ -177,11 +178,11 @@ const mergeProductDetails = ( everything_from: overrideDetails.everythingFrom, button_url: overrideDetails.buttonUrl, }, - }; + } as unknown as Plan; - mergedProducts.push(mergedProduct); + mergedPlans.push(mergedPlan); } - return mergedProducts; + return mergedPlans; }; const defaultSWRConfig: SWRConfiguration = { @@ -196,29 +197,30 @@ export const usePricingTableBase = ({ params?: { productDetails?: ProductDetails[]; }; -}): { products: Product[] | null; isLoading: boolean; error: AutumnError | undefined; refetch: () => void } => { +}): { plans: Plan[] | null; isLoading: boolean; error: AutumnError | undefined; refetch: () => void } => { const fetcher = async () => { try { + // Note: client.products.list() returns Plan[] in V2 (the endpoint returns plans) const { data, error } = await client.products.list(); if (error) throw error; - return data?.list || []; + return (data?.list || []) as Plan[]; } catch (error) { throw new AutumnError({ - message: "Failed to fetch pricing table products", - code: "failed_to_fetch_pricing_table_products", + message: "Failed to fetch pricing table plans", + code: "failed_to_fetch_pricing_table_plans", }); } }; - const { data, error, mutate } = useSWR( + const { data, error, mutate } = useSWR( ["pricing-table", client.backendUrl], fetcher, { ...defaultSWRConfig } ); return { - products: mergeProductDetails(data || [], params?.productDetails), + plans: mergePlanDetails(data || [], params?.productDetails), isLoading: !error && !data, error, refetch: mutate, diff --git a/package/src/libraries/react/index.ts b/package/src/libraries/react/index.ts index 39b65855..be22fbf7 100644 --- a/package/src/libraries/react/index.ts +++ b/package/src/libraries/react/index.ts @@ -1,7 +1,7 @@ // Import CSS for tsup injectStyle import "../../styles/global.css"; -export type { PricingTableProduct } from "@sdk/components/componentTypes"; +export type { Plan as PricingTableProduct } from "@useautumn/sdk/resources/shared"; export type { ProductDetails } from "./client/types/clientPricingTableTypes"; export { useAggregateEvents } from "./hooks/useAggregateEvents"; diff --git a/package/src/libraries/react/types/index.ts b/package/src/libraries/react/types/index.ts new file mode 100644 index 00000000..9a741285 --- /dev/null +++ b/package/src/libraries/react/types/index.ts @@ -0,0 +1,186 @@ +/** + * Re-exports from ts-sdk (Stainless-generated types from OpenAPI) + * This file serves as the single source of truth for all types in autumn-js/react + */ + +// ============================================================================ +// Core Response Types (V2 Schema) +// ============================================================================ +export type { + Customer, + CustomerData, + Entity, + EntityData, + Plan, + PlanFeature, +} from "@useautumn/sdk/resources/shared"; + +// ============================================================================ +// Operation Response Types +// ============================================================================ +export type { + AttachResponse, + BillingPortalResponse, + CancelResponse, + CheckResponse, + CheckoutResponse, + QueryResponse, + SetupPaymentResponse, + TrackResponse, +} from "@useautumn/sdk/resources/top-level"; + +// ============================================================================ +// Operation Parameter Types +// ============================================================================ +export type { + AttachParams, + BillingPortalParams, + CancelParams, + CheckParams, + CheckoutParams, + QueryParams, + SetupPaymentParams, + TrackParams, +} from "@useautumn/sdk/resources/top-level"; + +// ============================================================================ +// Customer Operations +// ============================================================================ +export type { + CustomerCreateParams, + CustomerUpdateParams, + CustomerListParams, + CustomerGetParams, + CustomerListResponse, + CustomerDeleteResponse, +} from "@useautumn/sdk/resources/customers"; + +// ============================================================================ +// Entity Operations +// ============================================================================ +export type { + EntityCreateParams, + EntityDeleteParams, + EntityGetParams, + EntityDeleteResponse, +} from "@useautumn/sdk/resources/entities"; + +// ============================================================================ +// Plan Operations +// ============================================================================ +export type { + PlanCreateParams, + PlanUpdateParams, + PlanListParams, + PlanDeleteParams, + PlanListResponse, + PlanDeleteResponse, +} from "@useautumn/sdk/resources/plans"; + +// ============================================================================ +// Event Operations +// ============================================================================ +export type { + EventListParams, + EventAggregateParams, + EventListResponse, + EventAggregateResponse, +} from "@useautumn/sdk/resources/events"; + +// ============================================================================ +// Referral Operations +// ============================================================================ +export type { + ReferralCreateCodeParams, + ReferralRedeemCodeParams, + ReferralCreateCodeResponse, + ReferralRedeemCodeResponse, +} from "@useautumn/sdk/resources/referrals"; + +// ============================================================================ +// Balance Operations +// ============================================================================ +export type { + BalanceCreateParams, + BalanceUpdateParams, + BalanceCreateResponse, + BalanceUpdateResponse, +} from "@useautumn/sdk/resources/balances"; + +// ============================================================================ +// Type Aliases for Backwards Compatibility / Convenience +// ============================================================================ + +// Subscription is nested under Customer +export type Subscription = Customer.Subscription; +export type ScheduledSubscription = Customer.ScheduledSubscription; +export type CustomerBalances = Customer.Balances; + +// Entity subscriptions/balances +export type EntitySubscription = Entity.Subscription; +export type EntityBalances = Entity.Balances; + +// Check response types +export type CheckPreview = CheckResponse.Preview; +export type CheckBalance = CheckResponse.Balance; + +// Import Customer and Entity for the aliases above +import type { Customer, Entity } from "@useautumn/sdk/resources/shared"; +import type { CheckResponse } from "@useautumn/sdk/resources/top-level"; + +// ============================================================================ +// Expand Options +// ============================================================================ +export type CustomerExpandOption = + | "invoices" + | "entities" + | "referrals" + | "rewards" + | "trials_used" + | "payment_method"; + +export type EntityExpandOption = + | "invoices" + | "subscriptions" + | "balances"; + +// ============================================================================ +// Utility Types +// ============================================================================ + +/** + * Utility type that creates a Customer with additional expanded fields + * based on the expand array passed to the API. + */ +export type ExpandedCustomer< + T extends readonly CustomerExpandOption[] = readonly [], +> = Customer & { + [K in T[number]]: K extends "invoices" + ? Customer.Invoice[] + : K extends "entities" + ? Customer.Entity[] + : K extends "referrals" + ? Customer.Referral[] + : K extends "rewards" + ? Customer.Rewards | null + : K extends "trials_used" + ? Customer.TrialsUsed[] + : K extends "payment_method" + ? unknown + : never; +}; + +/** + * Utility type for Entity with expanded fields + */ +export type ExpandedEntity< + T extends readonly EntityExpandOption[] = readonly [], +> = Entity & { + [K in T[number]]: K extends "invoices" + ? Entity.Invoice[] + : K extends "subscriptions" + ? Entity.Subscription[] + : K extends "balances" + ? { [key: string]: Entity.Balances } + : never; +}; diff --git a/package/src/libraries/react/utils/error.ts b/package/src/libraries/react/utils/error.ts new file mode 100644 index 00000000..3c9ed161 --- /dev/null +++ b/package/src/libraries/react/utils/error.ts @@ -0,0 +1,35 @@ +export interface ErrorResponse { + message: string; + code: string; +} + +export class AutumnError extends Error { + public readonly message: string; + public readonly code: string; + + constructor(response: ErrorResponse) { + super(response.message); + this.message = response.message; + this.code = response.code; + } + + static fromError(error: any) { + return new AutumnError({ + message: error.message || "Unknown error", + code: error.code || "unknown_error", + }); + } + + toString() { + return `${this.message} (code: ${this.code})`; + } + + toJSON() { + return { + message: this.message, + code: this.code, + }; + } +} + +export type AutumnErrorWithStatus = AutumnError & { statusCode?: number }; diff --git a/package/src/libraries/react/utils/response.ts b/package/src/libraries/react/utils/response.ts new file mode 100644 index 00000000..514daf8a --- /dev/null +++ b/package/src/libraries/react/utils/response.ts @@ -0,0 +1,61 @@ +import { AutumnError } from "./error"; + +export type Success = { + data: T; + error: null; + statusCode?: number; +}; + +type Failure = { + data: null; + error: E; + statusCode?: number; +}; + +export const toContainerResult = async ({ + response, + logger, + logError = true, +}: { + response: Response; + logger: Console; + logError?: boolean; +}): Promise> => { + if (response.status < 200 || response.status >= 300) { + let error: any; + try { + error = await response.json(); + if (logError) { + logger.error(`[Autumn] ${error.message}`); + } + } catch (error) { + // biome-ignore lint/complexity/noUselessCatch: idk + throw error; + } + + return { + data: null, + error: new AutumnError({ + message: error.message, + code: error.code, + }), + statusCode: response.status, + }; + } + + try { + const data = await response.json(); + + return { + data: data, + error: null, + statusCode: response?.status, + }; + } catch (error) { + // biome-ignore lint/complexity/noUselessCatch: idk + throw error; + } +}; + +export type Result = Success | Failure; +export type AutumnPromise = Promise>; diff --git a/package/src/next/client/NextAutumnClient.tsx b/package/src/next/client/NextAutumnClient.tsx index c3a99744..efcc3c04 100644 --- a/package/src/next/client/NextAutumnClient.tsx +++ b/package/src/next/client/NextAutumnClient.tsx @@ -1,167 +1,178 @@ -import { - CustomerData, - CreateCustomerParams, - AutumnPromise, - TrackResult, - CheckResult, - CancelResult, - Entity, - DeleteEntityResult, - RedeemReferralCodeParams, -} from "@sdk"; +// import { +// CustomerData, +// CreateCustomerParams, +// AutumnPromise, +// TrackResult, +// CheckResult, +// CancelResult, +// Entity, +// DeleteEntityResult, +// RedeemReferralCodeParams, +// } from "../../../../ts-sdk/src/resources/index"; + +import type { + CancelResponse, + CheckResponse, + CustomerCreateParams, + CustomerData, + Entity, + EntityDeleteResponse, + ReferralRedeemCodeParams, + TrackResponse, +} from "@useautumn/sdk/resources"; +import type { AutumnPromise } from "@/utils/response"; import { AutumnClient } from "../../libraries/react/client/ReactAutumnClient"; - -import { - createCusAction, - createEntityAction, - deleteEntityAction, - getEntityAction, -} from "../server/cusActions"; +import type { + CreateEntityParams, + GetEntityParams, +} from "../../libraries/react/client/types/clientEntTypes"; +import type { + CancelParams, + CheckParams, + OpenBillingPortalParams, + TrackParams, +} from "../../libraries/react/client/types/clientGenTypes"; +import type { CreateReferralCodeParams } from "../../libraries/react/client/types/clientReferralTypes"; import { getPricingTableAction } from "../server/componentActions"; - import { - CancelParams, - TrackParams, - OpenBillingPortalParams, - CheckParams, -} from "../../libraries/react/client/types/clientGenTypes"; -import { AttachParams } from "@/client/types/clientAttachTypes"; + createCusAction, + createEntityAction, + deleteEntityAction, + getEntityAction, +} from "../server/cusActions"; import { - attachAction, - cancelAction, - checkAction, - getBillingPortalAction, - trackAction, + cancelAction, + checkAction, + getBillingPortalAction, + trackAction, } from "../server/genActions"; -import { - CreateEntityParams, - GetEntityParams, -} from "../../libraries/react/client/types/clientEntTypes"; -import { CreateReferralCodeParams } from "../../libraries/react/client/types/clientReferralTypes"; -import { AttachResult, CheckoutResult } from "@sdk/general/attachTypes"; export interface ErrorResponse { - message: string; - code: string; + message: string; + code: string; } export type OmitCustomerType = - | "id" - | "name" - | "email" - | "fingerprint" - | "customer_id"; + | "id" + | "name" + | "email" + | "fingerprint" + | "customer_id"; export interface NextAutumnClientConfig { - encryptedCustomerId?: string; - customerData?: CustomerData; - defaultReturnUrl?: string; + encryptedCustomerId?: string; + customerData?: CustomerData; + defaultReturnUrl?: string; } export class NextAutumnClient extends AutumnClient { - private readonly encryptedCustomerId?: string; - - constructor({ encryptedCustomerId, customerData, defaultReturnUrl }: NextAutumnClientConfig) { - super({ - customerData, - defaultReturnUrl, - }); - this.encryptedCustomerId = encryptedCustomerId; - } - - // Override createCustomer to use Next.js server actions instead of HTTP requests - async createCustomer( - params: Omit & { - errorOnNotFound?: boolean; - } - ) { - const res = await createCusAction({ - encryptedCustomerId: this.encryptedCustomerId, - customerData: this.customerData, - ...params, - }); - - return res; - } - - // Pricing table - async getPricingTable() { - return await getPricingTableAction({ - encryptedCustomerId: this.encryptedCustomerId, - }); - } - - // Entities - attach = async (params: AttachParams): AutumnPromise => { - const res = await attachAction({ - encryptedCustomerId: this.encryptedCustomerId, - customerData: this.customerData, - ...params, - }); - return res; - }; - - cancel = async (params: CancelParams): AutumnPromise => { - return await cancelAction({ - encryptedCustomerId: this.encryptedCustomerId, - ...params, - }); - }; - - check = async (params: CheckParams): AutumnPromise => { - return await checkAction({ - encryptedCustomerId: this.encryptedCustomerId, - ...params, - }); - }; - - track = async (params: TrackParams): AutumnPromise => { - return await trackAction({ - encryptedCustomerId: this.encryptedCustomerId, - ...params, - }); - }; - - openBillingPortal = async (params?: OpenBillingPortalParams | undefined) => { - return await getBillingPortalAction({ - encryptedCustomerId: this.encryptedCustomerId, - ...(params || {}), - }); - }; - - entities = { - create: async ( - params: CreateEntityParams | CreateEntityParams[] - ): AutumnPromise => { - return await createEntityAction({ - encryptedCustomerId: this.encryptedCustomerId, - entity: params, - }); - }, - get: async ( - entityId: string, - params?: GetEntityParams - ): AutumnPromise => { - return await getEntityAction({ - encryptedCustomerId: this.encryptedCustomerId, - entityId, - ...params, - }); - }, - delete: async (entityId: string): AutumnPromise => { - return await deleteEntityAction({ - encryptedCustomerId: this.encryptedCustomerId, - entityId, - }); - }, - }; - - referrals: any = { - createCode: async (params: CreateReferralCodeParams) => { - throw new Error("Not implemented"); - }, - redeemCode: async (params: RedeemReferralCodeParams) => { - throw new Error("Not implemented"); - }, - }; + private readonly encryptedCustomerId?: string; + + constructor({ + encryptedCustomerId, + customerData, + defaultReturnUrl, + }: NextAutumnClientConfig) { + super({ + customerData, + defaultReturnUrl, + }); + this.encryptedCustomerId = encryptedCustomerId; + } + + // Override createCustomer to use Next.js server actions instead of HTTP requests + async createCustomer( + params: Omit & { + errorOnNotFound?: boolean; + }, + ) { + const res = await createCusAction({ + encryptedCustomerId: this.encryptedCustomerId, + customerData: this.customerData, + ...params, + }); + + return res; + } + + // Pricing table + async getPricingTable() { + return await getPricingTableAction({ + encryptedCustomerId: this.encryptedCustomerId, + }); + } + + // Entities + // attach = async (params: AttachParams): AutumnPromise => { + // const res = await attachAction({ + // encryptedCustomerId: this.encryptedCustomerId, + // customerData: this.customerData, + // ...params, + // }); + // return res; + // }; + + cancel = async (params: CancelParams): AutumnPromise => { + return await cancelAction({ + encryptedCustomerId: this.encryptedCustomerId, + ...params, + }); + }; + + check = async (params: CheckParams): AutumnPromise => { + return await checkAction({ + encryptedCustomerId: this.encryptedCustomerId, + ...params, + }); + }; + + track = async (params: TrackParams): AutumnPromise => { + return await trackAction({ + encryptedCustomerId: this.encryptedCustomerId, + ...params, + }); + }; + + openBillingPortal = async (params?: OpenBillingPortalParams | undefined) => { + return await getBillingPortalAction({ + encryptedCustomerId: this.encryptedCustomerId, + ...(params || {}), + }); + }; + + entities = { + create: async ( + params: CreateEntityParams | CreateEntityParams[], + ): AutumnPromise => { + return await createEntityAction({ + encryptedCustomerId: this.encryptedCustomerId, + entity: params, + }); + }, + get: async ( + entityId: string, + params?: GetEntityParams, + ): AutumnPromise => { + return await getEntityAction({ + encryptedCustomerId: this.encryptedCustomerId, + entityId, + ...params, + }); + }, + delete: async (entityId: string): AutumnPromise => { + return await deleteEntityAction({ + encryptedCustomerId: this.encryptedCustomerId, + entityId, + }); + }, + }; + + referrals: any = { + createCode: async (params: CreateReferralCodeParams) => { + throw new Error("Not implemented"); + }, + redeemCode: async (params: ReferralRedeemCodeParams) => { + throw new Error("Not implemented"); + }, + }; } diff --git a/package/src/next/client/hooks/useCustomer.tsx b/package/src/next/client/hooks/useCustomer.tsx index 85fc3641..4b00d2ee 100644 --- a/package/src/next/client/hooks/useCustomer.tsx +++ b/package/src/next/client/hooks/useCustomer.tsx @@ -1,18 +1,18 @@ -import type { CustomerExpandOption } from "@sdk"; import { AutumnContext } from "../../../libraries/react/AutumnContext"; import { - type UseCustomerParams, - type UseCustomerResult, - useCustomerBase, + type UseCustomerParams, + type UseCustomerResult, + useCustomerBase, } from "../../../libraries/react/hooks/useCustomerBase"; +import type { CustomerExpandOption } from "../../../libraries/react/types"; export const useCustomer = < - const T extends readonly CustomerExpandOption[] = readonly [], + const T extends readonly CustomerExpandOption[] = readonly [], >( - params?: UseCustomerParams, + params?: UseCustomerParams, ): UseCustomerResult => { - return useCustomerBase({ - params, - AutumnContext: AutumnContext, - }); + return useCustomerBase({ + params, + AutumnContext: AutumnContext, + }); }; diff --git a/package/src/next/client/types.ts b/package/src/next/client/types.ts index db356fa0..e6818a06 100644 --- a/package/src/next/client/types.ts +++ b/package/src/next/client/types.ts @@ -1,5 +1,5 @@ -import { Customer, CustomerData } from "@sdk"; -import { Entity } from "@sdk/customers/entities/entTypes"; +import type { Customer, CustomerData } from "@useautumn/sdk/resources"; +import type { Entity } from "../../sdk"; export interface ProductDetails { id: string; diff --git a/package/src/next/server/auth/withNextAuth.ts b/package/src/next/server/auth/withNextAuth.ts index 6bc3d519..9247c14f 100644 --- a/package/src/next/server/auth/withNextAuth.ts +++ b/package/src/next/server/auth/withNextAuth.ts @@ -1,4 +1,4 @@ -import { CustomerData } from "@sdk"; +import { CustomerData } from "@useautumn/sdk/resources"; import { decryptData } from "../../../utils/encryptUtils"; import { handleAuthProvider } from "./handleAuthProvider"; import { getAuthPlugin } from "./authPlugin"; diff --git a/package/src/next/server/utils.ts b/package/src/next/server/utils.ts index 0234bd1e..80653c7e 100644 --- a/package/src/next/server/utils.ts +++ b/package/src/next/server/utils.ts @@ -1,8 +1,8 @@ -import { Result } from "@sdk/response"; -import { AutumnError, ErrorResponse } from "../../sdk"; +import type { Result } from "@/utils/response"; +import type { AutumnError, ErrorResponse } from "../../sdk"; export const toServerResponse = ( - result: Result + result: Result, ): Result => { if (result.error) { return { diff --git a/package/src/sdk/balances/balancesMethods.ts b/package/src/sdk/balances/balancesMethods.ts index bf49d723..fbc6e230 100644 --- a/package/src/sdk/balances/balancesMethods.ts +++ b/package/src/sdk/balances/balancesMethods.ts @@ -1,7 +1,10 @@ -import type { AutumnPromise } from "@sdk/response"; -import { staticWrapper } from "@sdk/utils"; import type { Autumn } from "../client"; -import type { CreateBalanceParams, CreateBalanceResponse } from "./balancesTypes"; +import type { AutumnPromise } from "../response"; +import { staticWrapper } from "../utils"; +import type { + CreateBalanceParams, + CreateBalanceResponse, +} from "./balancesTypes"; export const balanceMethods = (instance?: Autumn) => { return { diff --git a/package/src/sdk/components/componentTypes.ts b/package/src/sdk/components/componentTypes.ts index f646a7b6..bbd33a9e 100644 --- a/package/src/sdk/components/componentTypes.ts +++ b/package/src/sdk/components/componentTypes.ts @@ -1,5 +1,5 @@ -import { ProductScenario } from "@sdk/general/checkTypes"; -import { ProductItem } from "../products/prodTypes"; +import type { ProductScenario } from "../general/checkTypes"; +import type { ProductItem } from "../products/prodTypes"; export interface GetPricingTableParams { customer_id?: string; diff --git a/package/src/sdk/customers/cusTypes.ts b/package/src/sdk/customers/cusTypes.ts index 2e966585..d1364cf2 100644 --- a/package/src/sdk/customers/cusTypes.ts +++ b/package/src/sdk/customers/cusTypes.ts @@ -1,7 +1,7 @@ -import type { ProductItem } from "@sdk/products/prodTypes"; import { z } from "zod/v4"; import type { AppEnv } from "../general/genEnums"; import { ProductItemInterval } from "../products/prodEnums"; +import type { ProductItem } from "../products/prodTypes"; import { CustomerExpandEnum, type CustomerExpandOption, diff --git a/package/src/sdk/events/eventMethods.ts b/package/src/sdk/events/eventMethods.ts index ca8b4f73..7744d8ff 100644 --- a/package/src/sdk/events/eventMethods.ts +++ b/package/src/sdk/events/eventMethods.ts @@ -1,6 +1,6 @@ -import type { AutumnPromise } from "@sdk/response"; -import { staticWrapper } from "@sdk/utils"; import type { Autumn } from "../client"; +import type { AutumnPromise } from "../response"; +import { staticWrapper } from "../utils"; import type { EventsListParams, EventsListResponse, diff --git a/package/src/sdk/events/eventTypes.ts b/package/src/sdk/events/eventTypes.ts index d763b02c..70907007 100644 --- a/package/src/sdk/events/eventTypes.ts +++ b/package/src/sdk/events/eventTypes.ts @@ -1,8 +1,8 @@ +import { z } from "zod/v4"; import { createPagePaginatedResponseSchema, PagePaginationQuerySchema, -} from "@sdk/general/pageTypes"; -import { z } from "zod/v4"; +} from "../general/pageTypes"; export const QueryRangeEnum = z.enum([ "24h", diff --git a/package/src/sdk/general/attachTypes.ts b/package/src/sdk/general/attachTypes.ts index 55031c26..50f574b9 100644 --- a/package/src/sdk/general/attachTypes.ts +++ b/package/src/sdk/general/attachTypes.ts @@ -1,6 +1,6 @@ -import { CustomerDataSchema } from "@sdk/customers/cusTypes"; -import type { Product, ProductItem } from "@sdk/products/prodTypes"; import { z } from "zod/v4"; +import { CustomerDataSchema } from "../customers/cusTypes"; +import type { Product, ProductItem } from "../products/prodTypes"; // Attach export const AttachFeatureOptionsSchema = z.object({ feature_id: z.string(), diff --git a/package/src/sdk/general/checkTypes.ts b/package/src/sdk/general/checkTypes.ts index f16c7e1d..e1864751 100644 --- a/package/src/sdk/general/checkTypes.ts +++ b/package/src/sdk/general/checkTypes.ts @@ -1,7 +1,7 @@ -import { CoreCusFeatureSchema } from "@sdk/customers/cusTypes"; +import { z } from "zod/v4"; +import { CoreCusFeatureSchema } from "../../sdk"; import type { UsageModelType } from "../products/prodEnums"; import type { Product } from "../products/prodTypes"; -import { z } from "zod/v4"; export type CheckFeatureScenario = "usage_limit" | "feature_flag"; diff --git a/package/src/sdk/products/prodTypes.ts b/package/src/sdk/products/prodTypes.ts index df497c55..a900546f 100644 --- a/package/src/sdk/products/prodTypes.ts +++ b/package/src/sdk/products/prodTypes.ts @@ -1,4 +1,4 @@ -import type { ProductScenario } from "@sdk/general/checkTypes"; +import type { ProductScenario } from "../general/checkTypes"; import type { AppEnv } from "../general/genEnums"; import type { FreeTrialDuration, diff --git a/package/src/sdk/referrals/referralMethods.ts b/package/src/sdk/referrals/referralMethods.ts index 0c0ba053..bc4b61c8 100644 --- a/package/src/sdk/referrals/referralMethods.ts +++ b/package/src/sdk/referrals/referralMethods.ts @@ -1,7 +1,7 @@ -import { AutumnPromise } from "@sdk/response"; -import { Autumn } from "../client"; +import type { Autumn } from "../client"; +import type { AutumnPromise } from "../response"; import { staticWrapper } from "../utils"; -import { +import type { CreateReferralCodeParams, CreateReferralCodeResult, RedeemReferralCodeParams, diff --git a/package/tsconfig.json b/package/tsconfig.json index eefb57a4..28c8a696 100644 --- a/package/tsconfig.json +++ b/package/tsconfig.json @@ -31,12 +31,6 @@ "@/hooks/*": [ "./src/libraries/react/hooks/*" ], - "@sdk": [ - "./src/sdk/index" - ], - "@sdk/*": [ - "./src/sdk/*" - ], "@styles": [ "./src/styles/*" ], diff --git a/package/tsup.config.ts b/package/tsup.config.ts index 5432cbae..bbd2a280 100644 --- a/package/tsup.config.ts +++ b/package/tsup.config.ts @@ -2,10 +2,18 @@ import alias from "esbuild-plugin-path-alias"; import * as path from "path"; import { defineConfig, type Options } from "tsup"; +// External patterns for node_modules imports in ts-sdk/src/internal/types.ts +// These are type-only imports that shouldn't be resolved by Rollup +const nodeModulesExternal = [ + /node_modules\/node-fetch/, + /node_modules\/undici/, + /node_modules\/undici-types/, + /node_modules\/@types\/node-fetch/, +]; + // Path aliases that match tsconfig.json const pathAliases = { "@": path.resolve("./src/libraries/react"), - "@sdk": path.resolve("./src/sdk"), "@styles": path.resolve("./src/styles"), }; @@ -24,6 +32,8 @@ const reactConfigs: Options[] = [ "better-auth", "better-call", "jotai", + "@useautumn/sdk", + ...nodeModulesExternal, ], bundle: true, skipNodeModulesBundle: true, @@ -43,7 +53,7 @@ const reactConfigs: Options[] = [ dts: true, clean: false, outDir: "./dist/libraries/react", - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk", ...nodeModulesExternal], bundle: true, banner: { js: '"use client";', @@ -70,7 +80,7 @@ const reactConfigs: Options[] = [ dts: true, clean: false, outDir: "./dist/libraries/react", - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk", ...nodeModulesExternal], bundle: true, banner: { js: '"use client";\n', @@ -96,6 +106,7 @@ export default defineConfig([ shims: true, clean: false, outDir: "./dist/sdk", + external: ["@useautumn/sdk", ...nodeModulesExternal], treeshake: true, target: "es2020", @@ -119,7 +130,7 @@ export default defineConfig([ clean: true, bundle: true, outDir: "./dist/utils", // Fixed wildcard path to specific directory - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk", ...nodeModulesExternal], esbuildOptions(options) { options.plugins = options.plugins || []; options.plugins.push(alias(pathAliases)); @@ -138,7 +149,7 @@ export default defineConfig([ dts: true, clean: false, // Don't clean on subsequent builds outDir: "./dist/next", - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk", ...nodeModulesExternal], bundle: false, esbuildOptions(options) { options.plugins = options.plugins || []; @@ -159,7 +170,7 @@ export default defineConfig([ dts: true, clean: true, outDir: "./dist/next/client", - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk", ...nodeModulesExternal], bundle: false, banner: { js: '"use client";\n', @@ -195,6 +206,8 @@ export default defineConfig([ "@clerk/backend", "better-auth", "@supabase/ssr", + "@useautumn/sdk", + ...nodeModulesExternal, ], bundle: false, banner: { diff --git a/package/tsup.dev.config.ts b/package/tsup.dev.config.ts index 9fc34fba..ccd7760f 100644 --- a/package/tsup.dev.config.ts +++ b/package/tsup.dev.config.ts @@ -5,7 +5,6 @@ import alias from "esbuild-plugin-path-alias"; // Path aliases that match tsconfig.json const pathAliases = { "@": path.resolve("./src/libraries/react"), - "@sdk": path.resolve("./src/sdk"), "@styles": path.resolve("./src/styles"), }; @@ -17,7 +16,7 @@ const reactConfigs: Options[] = [ dts: true, clean: false, // Don't clean on subsequent builds outDir: "./dist/libraries/backend", - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk"], bundle: true, esbuildOptions(options) { options.plugins = options.plugins || []; @@ -32,7 +31,7 @@ const reactConfigs: Options[] = [ dts: false, clean: false, outDir: "./dist/libraries/react", - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk"], bundle: true, banner: { // js: '"use client";\nrequire("../../styles/global.css");', @@ -52,7 +51,7 @@ const reactConfigs: Options[] = [ dts: false, // Only generate types once clean: false, outDir: "./dist/libraries/react", - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk"], bundle: true, banner: { // js: '"use client";\nimport "../../styles/global.css";', @@ -75,7 +74,7 @@ const reactConfigs: Options[] = [ dts: false, clean: false, outDir: "./dist/libraries/react", - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk"], bundle: true, banner: { js: '"use client";\n', @@ -114,7 +113,7 @@ export default defineConfig([ clean: true, bundle: true, outDir: "./dist/utils", // Fixed wildcard path to specific directory - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk"], esbuildOptions(options) { options.plugins = options.plugins || []; options.plugins.push(alias(pathAliases)); @@ -128,7 +127,7 @@ export default defineConfig([ dts: false, clean: false, // Don't clean on subsequent builds outDir: "./dist/next", - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk"], bundle: false, esbuildOptions(options) { options.plugins = options.plugins || []; @@ -144,7 +143,7 @@ export default defineConfig([ dts: false, clean: true, outDir: "./dist/next/client", - external: ["react", "react/jsx-runtime", "react-dom"], + external: ["react", "react/jsx-runtime", "react-dom", "@useautumn/sdk"], bundle: false, banner: { js: '"use client";\n', @@ -180,6 +179,7 @@ export default defineConfig([ "@clerk/backend", "better-auth", "@supabase/ssr", + "@useautumn/sdk", ], bundle: false, banner: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8266607c..1bd4c658 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -167,148 +167,6 @@ importers: specifier: workspace:* version: link:.. - autumn-js: - dependencies: - better-auth: - specifier: ^1.3.17 - version: 1.3.34(next@15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - better-call: - specifier: ^1.0.12 - version: 1.0.19 - query-string: - specifier: ^9.2.2 - version: 9.2.2 - rou3: - specifier: ^0.6.1 - version: 0.6.3 - swr: - specifier: ^2.3.3 - version: 2.3.6(react@19.2.3) - zod: - specifier: ^4.0.0 - version: 4.1.5 - devDependencies: - '@radix-ui/react-accordion': - specifier: ^1.2.11 - version: 1.2.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - '@radix-ui/react-dialog': - specifier: ^1.1.14 - version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - '@radix-ui/react-popover': - specifier: ^1.1.14 - version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - '@radix-ui/react-slot': - specifier: ^1.2.3 - version: 1.2.4(@types/react@19.2.7)(react@19.2.3) - '@radix-ui/react-switch': - specifier: ^1.2.5 - version: 1.2.6(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - '@remix-run/node': - specifier: ^2.16.6 - version: 2.17.0(typescript@5.9.3) - '@supabase/ssr': - specifier: ^0.6.1 - version: 0.6.1(@supabase/supabase-js@2.90.1) - '@tanstack/react-start': - specifier: ^1.120.5 - version: 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@vitejs/plugin-react@5.1.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(rolldown@1.0.0-beta.34)(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2)) - '@types/express': - specifier: ^5.0.1 - version: 5.0.3 - '@types/node': - specifier: ^22.15.32 - version: 22.17.1 - '@types/react': - specifier: ^19 - version: 19.2.7 - autoprefixer: - specifier: ^10.4.21 - version: 10.4.21(postcss@8.5.6) - autumn-js: - specifier: ^0.0.115 - version: 0.0.115(better-auth@1.3.34(next@15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(better-call@1.0.19)(react@19.2.3) - class-variance-authority: - specifier: ^0.7.1 - version: 0.7.1 - clsx: - specifier: ^2.1.1 - version: 2.1.1 - concurrently: - specifier: ^9.2.0 - version: 9.2.0 - convex: - specifier: ^1.25.4 - version: 1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) - elysia: - specifier: ^1.3.5 - version: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.3) - esbuild-plugin-path-alias: - specifier: ^1.0.7 - version: 1.0.7(esbuild@0.27.2) - esbuild-postcss: - specifier: ^0.0.4 - version: 0.0.4(esbuild@0.27.2)(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)) - express: - specifier: ^5.1.0 - version: 5.1.0 - fastify: - specifier: ^5.3.3 - version: 5.5.0 - hono: - specifier: ^4.7.9 - version: 4.9.1 - install: - specifier: ^0.13.0 - version: 0.13.0 - lucide-react: - specifier: ^0.523.0 - version: 0.523.0(react@19.2.3) - next: - specifier: ^15.2.3 - version: 15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - nodemon: - specifier: ^3.1.10 - version: 3.1.10 - postcss: - specifier: ^8.5.6 - version: 8.5.6 - postcss-nested: - specifier: ^7.0.2 - version: 7.0.2(postcss@8.5.6) - postcss-prefix-selector: - specifier: ^2.1.1 - version: 2.1.1(postcss@8.5.6) - react-dom: - specifier: ^19.1.0 - version: 19.2.3(react@19.2.3) - stripe: - specifier: ^18.3.0 - version: 18.4.0(@types/node@22.17.1) - tailwind-merge: - specifier: ^2.6.0 - version: 2.6.0 - tailwindcss: - specifier: ^3.4.1 - version: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)) - tailwindcss-animate: - specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3))) - tailwindcss-scoped-preflight: - specifier: ^3.4.12 - version: 3.4.12(postcss@8.5.6)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3))) - tsconfig-paths: - specifier: ^4.2.0 - version: 4.2.0 - tsup: - specifier: ^8.4.0 - version: 8.5.0(@swc/core@1.15.5)(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.3)(yaml@2.8.1) - tsx: - specifier: ^4.19.3 - version: 4.20.4 - typescript: - specifier: ^5.8.3 - version: 5.9.3 - convex: dependencies: convex-helpers: @@ -329,7 +187,7 @@ importers: version: 18.17.0 autumn-js: specifier: workspace:* - version: link:../autumn-js + version: link:../package chokidar-cli: specifier: 3.0.0 version: 3.0.0 @@ -389,7 +247,7 @@ importers: version: link:../../convex autumn-js: specifier: workspace:* - version: link:../../autumn-js + version: link:../../package convex: specifier: ^1.27.4 version: 1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) @@ -511,7 +369,7 @@ importers: version: link:../../atmn autumn-js: specifier: workspace:* - version: link:../../autumn-js + version: link:../../package better-auth: specifier: ^1.2.12 version: 1.3.34(next@15.3.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) @@ -593,7 +451,7 @@ importers: version: link:../../atmn autumn-js: specifier: workspace:* - version: link:../../autumn-js + version: link:../../package frameworks/speakeasy-test: dependencies: @@ -715,7 +573,7 @@ importers: version: link:../atmn autumn-js: specifier: workspace:* - version: link:../autumn-js + version: link:../package better-auth: specifier: ^1.2.12 version: 1.3.7(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(zod@4.0.17) @@ -802,6 +660,151 @@ importers: specifier: ^5 version: 5.9.2 + package: + dependencies: + '@useautumn/sdk': + specifier: workspace:* + version: link:../ts-sdk + better-auth: + specifier: ^1.3.17 + version: 1.3.34(next@15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + better-call: + specifier: ^1.0.12 + version: 1.0.19 + query-string: + specifier: ^9.2.2 + version: 9.2.2 + rou3: + specifier: ^0.6.1 + version: 0.6.3 + swr: + specifier: ^2.3.3 + version: 2.3.6(react@19.2.3) + zod: + specifier: ^4.0.0 + version: 4.1.5 + devDependencies: + '@radix-ui/react-accordion': + specifier: ^1.2.11 + version: 1.2.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-dialog': + specifier: ^1.1.14 + version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-popover': + specifier: ^1.1.14 + version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': + specifier: ^1.2.3 + version: 1.2.4(@types/react@19.2.7)(react@19.2.3) + '@radix-ui/react-switch': + specifier: ^1.2.5 + version: 1.2.6(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@remix-run/node': + specifier: ^2.16.6 + version: 2.17.0(typescript@5.9.3) + '@supabase/ssr': + specifier: ^0.6.1 + version: 0.6.1(@supabase/supabase-js@2.90.1) + '@tanstack/react-start': + specifier: ^1.120.5 + version: 1.131.8(@netlify/blobs@9.1.2)(@tanstack/react-router@1.131.8(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(@vitejs/plugin-react@5.1.2(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1)))(better-sqlite3@12.2.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(rolldown@1.0.0-beta.34)(vite@7.3.0(@types/node@22.17.1)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.43.1)(tsx@4.20.4)(yaml@2.8.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.27.2)) + '@types/express': + specifier: ^5.0.1 + version: 5.0.3 + '@types/node': + specifier: ^22.15.32 + version: 22.17.1 + '@types/react': + specifier: ^19 + version: 19.2.7 + autoprefixer: + specifier: ^10.4.21 + version: 10.4.21(postcss@8.5.6) + autumn-js: + specifier: ^0.0.115 + version: 0.0.115(better-auth@1.3.34(next@15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(better-call@1.0.19)(react@19.2.3) + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + concurrently: + specifier: ^9.2.0 + version: 9.2.0 + convex: + specifier: ^1.25.4 + version: 1.31.2(@clerk/clerk-react@5.59.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) + elysia: + specifier: ^1.3.5 + version: 1.3.8(exact-mirror@0.1.5(@sinclair/typebox@0.34.38))(file-type@21.0.0)(typescript@5.9.3) + esbuild-plugin-path-alias: + specifier: ^1.0.7 + version: 1.0.7(esbuild@0.27.2) + esbuild-postcss: + specifier: ^0.0.4 + version: 0.0.4(esbuild@0.27.2)(postcss@8.5.6)(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)) + express: + specifier: ^5.1.0 + version: 5.1.0 + fastify: + specifier: ^5.3.3 + version: 5.5.0 + hono: + specifier: ^4.7.9 + version: 4.9.1 + install: + specifier: ^0.13.0 + version: 0.13.0 + lucide-react: + specifier: ^0.523.0 + version: 0.523.0(react@19.2.3) + next: + specifier: ^15.2.3 + version: 15.3.4(@babel/core@7.28.5)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + nodemon: + specifier: ^3.1.10 + version: 3.1.11 + postcss: + specifier: ^8.5.6 + version: 8.5.6 + postcss-nested: + specifier: ^7.0.2 + version: 7.0.2(postcss@8.5.6) + postcss-prefix-selector: + specifier: ^2.1.1 + version: 2.1.1(postcss@8.5.6) + react-dom: + specifier: ^19.1.0 + version: 19.2.3(react@19.2.3) + stripe: + specifier: ^18.3.0 + version: 18.4.0(@types/node@22.17.1) + tailwind-merge: + specifier: ^2.6.0 + version: 2.6.0 + tailwindcss: + specifier: ^3.4.1 + version: 3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3)) + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3))) + tailwindcss-scoped-preflight: + specifier: ^3.4.12 + version: 3.4.12(postcss@8.5.6)(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.15.5)(@types/node@22.17.1)(typescript@5.9.3))) + tsconfig-paths: + specifier: ^4.2.0 + version: 4.2.0 + tsup: + specifier: ^8.4.0 + version: 8.5.0(@swc/core@1.15.5)(jiti@2.6.1)(postcss@8.5.6)(tsx@4.20.4)(typescript@5.9.3)(yaml@2.8.1) + tsx: + specifier: ^4.19.3 + version: 4.20.4 + typescript: + specifier: ^5.8.3 + version: 5.9.3 + ts-sdk: devDependencies: '@arethetypeswrong/cli': @@ -10044,11 +10047,6 @@ packages: resolution: {integrity: sha512-3VW/8JpPqPvnJvseXowjZcirPisssnBuDikk6JIZ8jQzF7KJQX52iPFX4RYYxLycYH7IbMRSPUOga/esVjy5Yg==} engines: {node: '>=18'} - nodemon@3.1.10: - resolution: {integrity: sha512-WDjw3pJ0/0jMFmyNDp3gvY2YizjLmmOUQo6DEBY+JgdvW/yQ9mEeSw6H5ythl5Ny2ytb7f9C2nIbjSxMNzbJXw==} - engines: {node: '>=10'} - hasBin: true - nodemon@3.1.11: resolution: {integrity: sha512-is96t8F/1//UHAjNPHpbsNY46ELPpftGUoSVNXwUfMk/qdjSylYrWSu1XavVTBOn526kFiOR733ATgNBCQyH0g==} engines: {node: '>=10'} @@ -20920,7 +20918,7 @@ snapshots: '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.6.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.29.0(jiti@2.6.1)) eslint-plugin-react: 7.37.5(eslint@9.29.0(jiti@2.6.1)) @@ -20940,7 +20938,7 @@ snapshots: '@typescript-eslint/parser': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@2.6.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.2(jiti@2.6.1)) eslint-plugin-react: 7.37.5(eslint@9.39.2(jiti@2.6.1)) @@ -21031,7 +21029,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.6.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@5.5.0) @@ -21046,7 +21044,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@2.6.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@5.5.0) @@ -21061,6 +21059,36 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.6.1)): + dependencies: + '@nolyfill/is-core-module': 1.0.39 + debug: 4.4.1(supports-color@5.5.0) + eslint: 9.29.0(jiti@2.6.1) + get-tsconfig: 4.10.1 + is-bun-module: 2.0.0 + stable-hash: 0.0.5 + tinyglobby: 0.2.15 + unrs-resolver: 1.11.1 + optionalDependencies: + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)) + transitivePeerDependencies: + - supports-color + + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@2.6.1)): + dependencies: + '@nolyfill/is-core-module': 1.0.39 + debug: 4.4.1(supports-color@5.5.0) + eslint: 9.39.2(jiti@2.6.1) + get-tsconfig: 4.10.1 + is-bun-module: 2.0.0 + stable-hash: 0.0.5 + tinyglobby: 0.2.15 + unrs-resolver: 1.11.1 + optionalDependencies: + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.18.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) + transitivePeerDependencies: + - supports-color + eslint-import-resolver-webpack@0.13.10(eslint-plugin-import@2.32.0(eslint@8.57.1))(webpack@5.101.1(@swc/core@1.15.5)(esbuild@0.25.9)): dependencies: debug: 3.2.7 @@ -21100,25 +21128,25 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2) eslint: 9.29.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.29.0(jiti@2.6.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.2(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@2.6.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) transitivePeerDependencies: - supports-color @@ -21225,7 +21253,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.29.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.29.0(jiti@2.6.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.31.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -21254,7 +21282,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.39.2(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@2.6.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.34.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -24934,19 +24962,6 @@ snapshots: dependencies: '@babel/parser': 7.28.5 - nodemon@3.1.10: - dependencies: - chokidar: 3.6.0 - debug: 4.4.1(supports-color@5.5.0) - ignore-by-default: 1.0.1 - minimatch: 3.1.2 - pstree.remy: 1.1.8 - semver: 7.7.3 - simple-update-notifier: 2.0.0 - supports-color: 5.5.0 - touch: 3.1.1 - undefsafe: 2.0.5 - nodemon@3.1.11: dependencies: chokidar: 3.6.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index aa185875..8caaa9e1 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,6 @@ packages: - autumn-js + - package - frameworks/* - nextjs - compose diff --git a/typegen/genUtils/MethodGenerator.ts b/typegen/genUtils/MethodGenerator.ts index a0d5dbde..2c86cb81 100644 --- a/typegen/genUtils/MethodGenerator.ts +++ b/typegen/genUtils/MethodGenerator.ts @@ -280,7 +280,7 @@ export class MethodGenerator { const importList = sortedParamTypes.map((type) => ` ${type},`).join("\n"); return `// Auto-generated method signatures with JSDoc -// This file is generated by typegen pipeline from ts-sdk/src/client.ts +// This file is generated by typegen pipeline from @useautumn/sdk // DO NOT EDIT MANUALLY - changes will be overwritten // // To update documentation: @@ -288,7 +288,7 @@ export class MethodGenerator { // 2. Regenerate OpenAPI spec and SDK // 3. Run: pnpm run gen:autumn-js -import type { Autumn } from "@sdk"; +import type { Autumn } from "@useautumn/sdk"; import type { ${importList} } from "@/clientTypes"; diff --git a/typegen/genUtils/auto-schema-generator.ts b/typegen/genUtils/auto-schema-generator.ts index 1c29e1e3..e6cb727f 100644 --- a/typegen/genUtils/auto-schema-generator.ts +++ b/typegen/genUtils/auto-schema-generator.ts @@ -149,6 +149,7 @@ export function generateCleanZodSchema( omitFields, extendFields, interfaceDescription, + interfaceName, // rootParent is the same for top-level interface ); // Generate nested interfaces @@ -159,10 +160,11 @@ export function generateCleanZodSchema( sourceFile, camelCase, nested.name, - [], + nestedInterfaces.map((n) => n.name), // pass all nested types for reference [], {}, null, + interfaceName, // rootParent is the original interface name ); }) .join("\n\n"); @@ -203,6 +205,36 @@ function findNestedInterfaces( ): { name: string; interface: ts.InterfaceDeclaration }[] { const results: { name: string; interface: ts.InterfaceDeclaration }[] = []; + // Recursively process a namespace to find all interfaces at any depth + function processNamespace( + moduleBlock: ts.ModuleBlock, + namePrefix: string, + ) { + moduleBlock.statements.forEach((statement) => { + // Find interfaces at this level + if (ts.isInterfaceDeclaration(statement)) { + const nestedName = `${namePrefix}${statement.name.text}`; + results.push({ + name: nestedName, + interface: statement, + }); + } + // Recursively process sub-namespaces + if ( + ts.isModuleDeclaration(statement) && + statement.name && + ts.isIdentifier(statement.name) && + statement.body && + ts.isModuleBlock(statement.body) + ) { + processNamespace( + statement.body, + `${namePrefix}${statement.name.text}`, + ); + } + }); + } + function visit(node: ts.Node) { // Look for namespace declarations that match our parent interface name if ( @@ -213,16 +245,8 @@ function findNestedInterfaces( node.body && ts.isModuleBlock(node.body) ) { - // Find interfaces within this namespace - node.body.statements.forEach((statement) => { - if (ts.isInterfaceDeclaration(statement)) { - const nestedName = `${parentInterfaceName}${statement.name.text}`; - results.push({ - name: nestedName, - interface: statement, - }); - } - }); + // Process this namespace and all sub-namespaces + processNamespace(node.body, parentInterfaceName); } ts.forEachChild(node, visit); } @@ -241,6 +265,7 @@ function generateSchemaCode( extendFields: Record = {}, ): string { const properties: string[] = []; + const existingProperties = new Set(); interfaceDecl.members.forEach((member) => { if (ts.isPropertySignature(member)) { @@ -284,6 +309,7 @@ function generateSchemaCode( ? `${finalPropertyName}: ${zodProperty}.optional()` : `${finalPropertyName}: ${zodProperty}`; properties.push(zodProperty); + existingProperties.add(finalPropertyName); } } }); @@ -292,6 +318,12 @@ function generateSchemaCode( Object.entries(extendFields).forEach(([fieldName, config]) => { const finalFieldName = camelCase ? toCamelCase(fieldName) : fieldName; + // Skip if already exists in source interface + if (existingProperties.has(finalFieldName)) { + console.warn(`Skipping duplicate field '${finalFieldName}' from extendFields`); + return; + } + const zodProperty = config.description ? `${config.zodType}.describe("${escapeDescription(config.description)}")` : config.zodType; @@ -610,6 +642,7 @@ function escapeDescription(description: string): string { /** * Generate an explicit TypeScript interface with JSDoc comments + * @param rootParent - The root parent interface name for namespace resolution (e.g., "AttachParams") */ function generateExplicitInterface( interfaceDecl: ts.InterfaceDeclaration, @@ -620,8 +653,10 @@ function generateExplicitInterface( omitFields: string[] = [], extendFields: Record = {}, interfaceDescription: string | null = null, + rootParent?: string, ): string { const properties: string[] = []; + const existingProperties = new Set(); // Track property names to avoid duplicates const finalInterfaceName = camelCase ? toCamelCase(interfaceName) : interfaceName; @@ -646,7 +681,7 @@ function generateExplicitInterface( const tsType = convertZodToTypeScript( typeNode, sourceFile, - interfaceName, + rootParent || interfaceName, availableNestedTypes, ); @@ -661,14 +696,20 @@ function generateExplicitInterface( propertyString += ` ${finalPropertyName}${isOptional ? "?" : ""}: ${tsType};`; properties.push(propertyString); + existingProperties.add(finalPropertyName); // Track this property } } }); - // Add extended fields + // Add extended fields (skip duplicates) Object.entries(extendFields).forEach(([fieldName, config]) => { const finalFieldName = camelCase ? toCamelCase(fieldName) : fieldName; + // Skip if already exists in source interface + if (existingProperties.has(finalFieldName)) { + return; + } + let propertyString = ""; if (config.description) { propertyString += ` /**\n * ${config.description.replace(/\*\//g, "* /")}\n */\n`; @@ -693,27 +734,17 @@ function generateExplicitInterface( /** * Convert a TypeScript type node to TypeScript type string for interface generation + * @param rootParent - The root parent interface name (e.g., "AttachParams") for namespace resolution */ function convertZodToTypeScript( typeNode: ts.TypeNode, sourceFile: ts.SourceFile, - parentInterface?: string, + rootParent?: string, availableNestedTypes?: string[], ): string { const typeText = typeNode.getText(sourceFile).trim(); - // Handle nested interface references (e.g., AttachParams.Option) - if (parentInterface && typeText.includes(`${parentInterface}.`)) { - const nestedTypeName = typeText.replace( - `${parentInterface}.`, - `${parentInterface}`, - ); - if (availableNestedTypes?.includes(nestedTypeName)) { - return nestedTypeName; - } - } - - // Handle external type references (CustomerData, EntityData, etc.) + // Handle external type references (CustomerData, EntityData, etc.) - check first if (typeText === "CustomerData" || typeText === "Shared.CustomerData") { return "CustomerData"; } @@ -721,13 +752,18 @@ function convertZodToTypeScript( return "EntityData"; } - // Handle arrays + // Handle Record types - check before array/union handling + if (typeText.startsWith("Record<")) { + return typeText; // Keep Record as is + } + + // Handle arrays BEFORE nested reference check (Array contains < which we don't want to treat as namespace) if (typeText.startsWith("Array<") && typeText.endsWith(">")) { const innerType = typeText.slice(6, -1); const innerTsType = convertZodToTypeScript( { getText: () => innerType } as ts.TypeNode, sourceFile, - parentInterface, + rootParent, availableNestedTypes, ); // Wrap union types in parentheses before appending [] @@ -742,7 +778,7 @@ function convertZodToTypeScript( const innerTsType = convertZodToTypeScript( { getText: () => innerType } as unknown as ts.TypeNode, sourceFile, - parentInterface, + rootParent, availableNestedTypes, ); // Wrap union types in parentheses before appending [] @@ -752,21 +788,49 @@ function convertZodToTypeScript( return `${innerTsType}[]`; } - // Handle Record types - if (typeText.startsWith("Record<")) { - return typeText; // Keep Record as is - } - - // Handle nullable types - if (typeText.includes(" | null")) { - const baseType = typeText.replace(" | null", "").trim(); - const baseTsType = convertZodToTypeScript( - { getText: () => baseType } as ts.TypeNode, - sourceFile, - parentInterface, - availableNestedTypes, + // Handle union types by splitting on ' | ' and processing each part + if (typeText.includes(" | ")) { + const types = typeText.split(" | ").map((t) => t.trim()); + const convertedTypes = types.map((type) => { + // Create a mock TypeNode for recursive call + const mockNode = { getText: () => type } as ts.TypeNode; + return convertZodToTypeScript( + mockNode, + sourceFile, + rootParent, + availableNestedTypes, + ); + }); + return convertedTypes.join(" | "); + } + + // Handle nested namespace references like ParentInterface.NestedType -> ParentInterfaceNestedType + // Only process if there's a dot AND we have available types to resolve against + if (typeText.includes(".") && availableNestedTypes && availableNestedTypes.length > 0) { + // Convert ParentInterface.NestedType.SubType to ParentInterfaceNestedTypeSubType + // e.g., AttachParams.Item -> AttachParamsItem + // e.g., Item.Config -> AttachParamsItemConfig + // e.g., Config.Rollover -> AttachParamsItemConfigRollover + const cleanedType = typeText.replace(/\./g, ""); + + // Search for a matching available type that ends with the cleaned type + // This handles deeply nested types like Config.Rollover -> AttachParamsItemConfigRollover + const matchingType = availableNestedTypes.find( + (t) => t.endsWith(cleanedType) ); - return `${baseTsType} | null`; + if (matchingType) { + return matchingType; + } + + // Fallback: if it starts with root parent, just remove dots + if (rootParent && typeText.startsWith(`${rootParent}.`)) { + return cleanedType; + } + + // Fallback: prefix with root parent + if (rootParent) { + return `${rootParent}${cleanedType}`; + } } // Return the type as is for basic types and others diff --git a/typegen/genUtils/utils.ts b/typegen/genUtils/utils.ts index 8f71989a..b78cea8d 100644 --- a/typegen/genUtils/utils.ts +++ b/typegen/genUtils/utils.ts @@ -4,6 +4,8 @@ import path from "path"; /** * Utility functions for type generation */ + +// biome-ignore lint/complexity/noStaticOnlyClass: sybau export class TypeGeneratorUtils { /** * Convert snake_case to camelCase diff --git a/typegen/generate-autumn-js-types.ts b/typegen/generate-autumn-js-types.ts index f5b78d8b..22c231f7 100755 --- a/typegen/generate-autumn-js-types.ts +++ b/typegen/generate-autumn-js-types.ts @@ -29,12 +29,12 @@ async function main() { try { // Define paths relative to this script const tsSDKPath = path.resolve(__dirname, "../ts-sdk"); - const autumnJSPath = path.resolve(__dirname, "../autumn-js"); + const autumnJSPath = path.resolve(__dirname, "../package"); // Validate all required paths exist TypeGeneratorUtils.validatePaths([ { name: "@ts-sdk", path: tsSDKPath }, - { name: "autumn-js", path: autumnJSPath }, + { name: "package", path: autumnJSPath }, ]); // Generate parameter types diff --git a/ui/registry/checkout-dialog/checkout-dialog.tsx b/ui/registry/checkout-dialog/checkout-dialog.tsx index 5ceb7e66..20eba6d2 100644 --- a/ui/registry/checkout-dialog/checkout-dialog.tsx +++ b/ui/registry/checkout-dialog/checkout-dialog.tsx @@ -1,8 +1,12 @@ "use client"; import * as AccordionPrimitive from "@radix-ui/react-accordion"; -// import type { CheckoutParams, CheckoutResult, ProductItem } from "autumn-js"; -import { Autumn } from "autumn-js"; +import type { CheckoutParams } from "autumn-js"; +import type { CheckoutResponse } from "@/types"; import { ArrowRight, ChevronDown, Loader2 } from "lucide-react"; + +// CheckoutResult is now CheckoutResponse, ProductItem extracted from CheckoutResponse.Product +type CheckoutResult = CheckoutResponse; +type ProductItem = NonNullable["items"][number]; import type React from "react"; import { useEffect, useState } from "react"; import { @@ -30,8 +34,8 @@ import { getCheckoutContent } from "@/registry/checkout-dialog/lib/checkout-cont export interface CheckoutDialogProps { open: boolean; setOpen: (open: boolean) => void; - checkoutResult: Autumn.CheckoutResponse; - checkoutParams?: Autumn.CheckoutParams; + checkoutResult: CheckoutResult; + checkoutParams?: CheckoutParams; } const formatCurrency = ({ @@ -50,7 +54,7 @@ const formatCurrency = ({ export default function CheckoutDialog(params: CheckoutDialogProps): React.JSX.Element { const { attach } = useCustomer(); const [checkoutResult, setCheckoutResult] = useState< - Autumn.CheckoutResponse | undefined + CheckoutResult | undefined >(params?.checkoutResult); useEffect(() => { @@ -92,7 +96,7 @@ export default function CheckoutDialog(params: CheckoutDialogProps): React.JSX.E onClick={async () => { setLoading(true); - const options = checkoutResult.options?.map((option: Autumn.CheckoutResponse.Option) => { + const options = (checkoutResult.options ?? []).map((option) => { return { featureId: option.feature_id, quantity: option.quantity, @@ -100,8 +104,10 @@ export default function CheckoutDialog(params: CheckoutDialogProps): React.JSX.E }); await attach({ - productId: checkoutResult.product?.id, - ...(params.checkoutParams || {}), + productId: checkoutResult.product!.id, + // Type cast needed: CheckoutParams from @sdk uses snake_case, + // but local AttachParams uses camelCase. The client handles conversion. + ...(params.checkoutParams as unknown as Record ?? {}), options, }); setOpen(false); @@ -130,8 +136,8 @@ function PriceInformation({ checkoutResult, setCheckoutResult, }: { - checkoutResult: Autumn.CheckoutResponse; - setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; + checkoutResult: CheckoutResult; + setCheckoutResult: (checkoutResult: CheckoutResult) => void; }) { return (
@@ -150,7 +156,7 @@ function PriceInformation({ ); } -function DueAmounts({ checkoutResult }: { checkoutResult: Autumn.CheckoutResponse }) { +function DueAmounts({ checkoutResult }: { checkoutResult: CheckoutResult }) { const { next_cycle, product } = checkoutResult; const nextCycleAtStr = next_cycle ? new Date(next_cycle.starts_at).toLocaleDateString() @@ -172,19 +178,19 @@ function DueAmounts({ checkoutResult }: { checkoutResult: Autumn.CheckoutRespons

{formatCurrency({ amount: checkoutResult?.total ?? 0, - currency: checkoutResult?.currency ?? "usd", + currency: checkoutResult?.currency ?? "USD", })}

- {showNextCycle && ( + {showNextCycle && next_cycle && (

Due next cycle ({nextCycleAtStr})

{formatCurrency({ - amount: next_cycle.total ?? 0, - currency: checkoutResult?.currency ?? "usd", + amount: next_cycle.total, + currency: checkoutResult?.currency ?? "USD", })} {hasUsagePrice && + usage prices}

@@ -198,8 +204,8 @@ function ProductItems({ checkoutResult, setCheckoutResult, }: { - checkoutResult: Autumn.CheckoutResponse; - setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; + checkoutResult: CheckoutResult; + setCheckoutResult: (checkoutResult: CheckoutResult) => void; }) { const isUpdateQuantity = checkoutResult?.product?.scenario === "active" && @@ -211,7 +217,7 @@ function ProductItems({

Price

{checkoutResult?.product?.items - .filter((item: Autumn.ProductItem) => item.type !== "feature") + .filter((item) => item.type !== "feature") .map((item, index) => { if (item.usage_model == "prepaid") { return ( @@ -247,7 +253,7 @@ function ProductItems({ ); } -function CheckoutLines({ checkoutResult }: { checkoutResult: Autumn.CheckoutResponse }) { +function CheckoutLines({ checkoutResult }: { checkoutResult: CheckoutResult }) { return ( @@ -264,7 +270,7 @@ function CheckoutLines({ checkoutResult }: { checkoutResult: Autumn.CheckoutResp {checkoutResult?.lines - .filter((line: Autumn.CheckoutResponse.Line) => line.amount !== 0) + .filter((line) => line.amount !== 0) .map((line, index) => { return (
@@ -272,7 +278,7 @@ function CheckoutLines({ checkoutResult }: { checkoutResult: Autumn.CheckoutResp

{new Intl.NumberFormat("en-US", { style: "currency", - currency: checkoutResult?.currency ?? "usd", + currency: checkoutResult?.currency ?? "USD", }).format(line.amount)}

@@ -310,14 +316,12 @@ const PrepaidItem = ({ checkoutResult, setCheckoutResult, }: { - item: Autumn.ProductItem; - checkoutResult: Autumn.CheckoutResponse; - setCheckoutResult: (checkoutResult: Autumn.CheckoutResponse) => void; + item: ProductItem; + checkoutResult: CheckoutResult; + setCheckoutResult: (checkoutResult: CheckoutResult) => void; }) => { - let { quantity = 0, billing_units: billingUnits = 1 } = item; - quantity = quantity ?? 0; - billingUnits = billingUnits ?? 1; - + const quantity = item.quantity ?? 0; + const billingUnits = item.billing_units ?? 1; const [quantityInput, setQuantityInput] = useState( (quantity / billingUnits).toString(), ); @@ -343,12 +347,16 @@ const PrepaidItem = ({ quantity: Number(quantityInput) * billingUnits, }); - const data = await checkout({ - productId: checkoutResult.product?.id, + const { data, error } = await checkout({ + productId: checkoutResult.product!.id, options: newOptions, dialog: CheckoutDialog, }); + if (error) { + console.error(error); + return; + } setCheckoutResult(data!); } catch (error) { console.error(error); @@ -399,7 +407,7 @@ const PrepaidItem = ({ onChange={(e) => setQuantityInput(e.target.value)} />

- {billingUnits > 1 && `x ${billingUnits} `} + {(billingUnits ?? 1) > 1 && `x ${billingUnits} `} {item.feature?.name}

diff --git a/ui/registry/checkout-dialog/lib/checkout-content.tsx b/ui/registry/checkout-dialog/lib/checkout-content.tsx index 2948c2ec..cf76ca5e 100644 --- a/ui/registry/checkout-dialog/lib/checkout-content.tsx +++ b/ui/registry/checkout-dialog/lib/checkout-content.tsx @@ -1,22 +1,21 @@ -import { Autumn } from "autumn-js"; +import { type CheckoutResponse } from "@/types"; import type React from "react"; +// CheckoutResult is now CheckoutResponse +type CheckoutResult = CheckoutResponse; + export const getCheckoutContent = (checkoutResult: CheckoutResult): { title: React.JSX.Element; message: React.JSX.Element } => { const { product, current_product, next_cycle } = checkoutResult; - const { is_one_off, is_free, has_trial, updateable } = product?.properties || { - is_one_off: false, - is_free: false, - has_trial: false, - updateable: false, - }; + // product can be null/undefined in CheckoutResponse, but is expected to exist when this function is called + const { is_one_off, is_free, has_trial, updateable } = product?.properties ?? {}; const scenario = product?.scenario; const nextCycleAtStr = next_cycle ? new Date(next_cycle.starts_at).toLocaleDateString() : undefined; - const productName = product?.name || ""; + const productName = product?.name; if (is_one_off) { return { @@ -62,7 +61,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult): { title: Rea title:

{productName} product already scheduled

, message: (

- You are currently on product {current_product?.name || ""} and are + You are currently on product {current_product?.name} and are scheduled to start {productName} on {nextCycleAtStr}.

), @@ -123,7 +122,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult): { title: Rea message: (

By clicking confirm, your current subscription to{" "} - {current_product?.name || ""} will be cancelled and a new subscription to{" "} + {current_product?.name} will be cancelled and a new subscription to{" "} {productName} will begin on {nextCycleAtStr}.

), @@ -134,7 +133,7 @@ export const getCheckoutContent = (checkoutResult: CheckoutResult): { title: Rea title:

Cancel

, message: (

- By clicking confirm, your subscription to {current_product?.name || ""}{" "} + By clicking confirm, your subscription to {current_product?.name}{" "} will end on {nextCycleAtStr}.

), diff --git a/ui/registry/paywall-dialog/lib/paywall-content.tsx b/ui/registry/paywall-dialog/lib/paywall-content.tsx index ac29a179..1199e946 100644 --- a/ui/registry/paywall-dialog/lib/paywall-content.tsx +++ b/ui/registry/paywall-dialog/lib/paywall-content.tsx @@ -1,6 +1,9 @@ -import { Autumn } from "autumn-js"; +import { type CheckPreview } from "@/types"; -export const getPaywallContent = (preview?: Autumn.CheckResponse.Preview) => { +// CheckFeaturePreview is now CheckResponse.Preview (aliased as CheckPreview) +type CheckFeaturePreview = CheckPreview; + +export const getPaywallContent = (preview?: CheckFeaturePreview) => { if (!preview) { return { title: "Feature Unavailable", diff --git a/ui/registry/pricing-table/lib/pricing-table-content.tsx b/ui/registry/pricing-table/lib/pricing-table-content.tsx index 8e8cf606..f5070d3e 100644 --- a/ui/registry/pricing-table/lib/pricing-table-content.tsx +++ b/ui/registry/pricing-table/lib/pricing-table-content.tsx @@ -1,69 +1,88 @@ -import type Autumn from "autumn-js"; +import { type Plan } from "@/types"; import type React from "react"; -export const getPricingTableContent = (product: Product): { buttonText: React.JSX.Element } => { - const { scenario, free_trial, properties } = product; - const { is_one_off, updateable, has_trial } = properties; +// Extended Plan type with display properties added by usePricingTable hook +type PricingTablePlan = Plan & { + display?: { + name?: string; + description?: string; + button_text?: string; + recommend_text?: string; + everything_from?: string; + button_url?: string; + }; + properties?: { + is_free?: boolean; + is_one_off?: boolean; + has_trial?: boolean; + interval_group?: string; + updateable?: boolean; + }; +}; - // TODO 4: hasTrial = plan.free_trial and !trial_used - const hasTrial = plan.free_trial; - const isOneOff = plan.price?.interval === "one_off"; - const scenario = plan.customer_eligibility?.scenario; +export const getPricingTableContent = (product: PricingTablePlan): { buttonText: React.JSX.Element } => { + const { customer_eligibility, free_trial, properties } = product; + const scenario = customer_eligibility?.scenario; + const { is_one_off, updateable, has_trial } = properties ?? {}; - console.log(`Plan: ${plan.id}, Scenario: ${scenario}`); + if (has_trial) { + return { + buttonText:

Start Free Trial

, + }; + } - if (hasTrial) { - return { - buttonText:

Start Free Trial

, - }; - } + switch (scenario) { + case "scheduled": + return { + buttonText:

Plan Scheduled

, + }; - switch (scenario) { - case "scheduled": - return { - buttonText:

Plan Scheduled

, - }; + case "active": + if (updateable) { + return { + buttonText:

Update Plan

, + }; + } - case "active": - return { - buttonText:

Current Plan

, - }; + return { + buttonText:

Current Plan

, + }; - case "new": - if (isOneOff) { - return { - buttonText:

Purchase

, - }; - } + case "new": + if (is_one_off) { + return { + buttonText:

Purchase

, + }; + } - return { - buttonText:

Get started

, - }; + return { + buttonText:

Get started

, + }; - case "renew": - return { - buttonText:

Renew

, - }; + case "renew": + return { + buttonText:

Renew

, + }; - case "upgrade": - return { - buttonText:

Upgrade

, - }; + case "upgrade": + return { + buttonText:

Upgrade

, + }; - case "downgrade": - return { - buttonText:

Downgrade

, - }; + case "downgrade": + return { + buttonText:

Downgrade

, + }; - case "cancel": - return { - buttonText:

Cancel Plan

, - }; + case "cancel": + return { + buttonText:

Cancel Plan

, + }; - default: - return { - buttonText:

Get Started

, - }; - } + default: + return { + buttonText:

Get Started

, + }; + } }; diff --git a/ui/registry/pricing-table/pricing-table.tsx b/ui/registry/pricing-table/pricing-table.tsx index a289350f..10925cc4 100644 --- a/ui/registry/pricing-table/pricing-table.tsx +++ b/ui/registry/pricing-table/pricing-table.tsx @@ -1,26 +1,52 @@ -import { Loader2 } from "lucide-react"; -import React, { createContext, useContext, useState } from "react"; -import { Button } from "@/components/ui/button"; -import { Switch } from "@/components/ui/switch"; -import type { PricingCardData, PricingCardOverride } from "autumn-js/react"; -import { CheckoutDialog, useCustomer, usePricingTable } from "autumn-js/react"; +import React from "react"; + +import { useCustomer, usePricingTable, ProductDetails } from "autumn-js/react"; +import { createContext, useContext, useState } from "react"; import { cn } from "@/lib/utils"; +import { Switch } from "@/components/ui/switch"; +import { Button } from "@/components/ui/button"; +import CheckoutDialog from "@/registry/checkout-dialog/checkout-dialog"; import { getPricingTableContent } from "@/registry/pricing-table/lib/pricing-table-content"; +import type { CheckoutParams } from "@/client/types/clientAttachTypes"; +import type { Plan, PlanFeature } from "@/types"; +import { Loader2 } from "lucide-react"; + +// Extended Plan type with display properties added by usePricingTable hook +type PricingTablePlan = Plan & { + display?: { + name?: string; + description?: string; + button_text?: string; + recommend_text?: string; + everything_from?: string; + button_url?: string; + }; + properties?: { + is_free?: boolean; + is_one_off?: boolean; + has_trial?: boolean; + interval_group?: string; + updateable?: boolean; + }; +}; export default function PricingTable({ - overrides, + productDetails, + checkoutParams, }: { productDetails?: ProductDetails[]; + checkoutParams?: CheckoutParams; }) : React.JSX.Element { const { customer, checkout } = useCustomer({ errorOnNotFound: false }); const [isAnnual, setIsAnnual] = useState(false); - const { products, isLoading, error } = usePricingTable({ productDetails }); + const { plans, isLoading, error } = usePricingTable({ productDetails }); + const products = plans as PricingTablePlan[] | null; if (isLoading) { return (
- +
); } @@ -37,7 +63,7 @@ export default function PricingTable({ const multiInterval = intervals.length > 1; - const intervalFilter = (product: Product) => { + const intervalFilter = (product: PricingTablePlan) => { if (!product.properties?.interval_group) { return true; } @@ -68,16 +94,17 @@ export default function PricingTable({ productId={product.id} buttonProps={{ disabled: - (product.scenario === "active" && - !product.properties.updateable) || - product.scenario === "scheduled", + (product.customer_eligibility?.scenario === "active" && + !product.properties?.updateable) || + product.customer_eligibility?.scenario === "scheduled", onClick: async () => { if (product.id && customer) { await checkout({ + ...checkoutParams, productId: product.id, dialog: CheckoutDialog, - }); + } satisfies CheckoutParams); } else if (product.display?.button_url) { window.open(product.display?.button_url, "_blank"); } @@ -92,36 +119,38 @@ export default function PricingTable({ } const PricingTableContext = createContext<{ - isAnnualToggle: boolean; - setIsAnnualToggle: (isAnnual: boolean) => void; - showFeatures: boolean; + isAnnualToggle: boolean; + setIsAnnualToggle: (isAnnual: boolean) => void; + products: PricingTablePlan[]; + showFeatures: boolean; }>({ - isAnnualToggle: false, - setIsAnnualToggle: () => {}, - showFeatures: true, + isAnnualToggle: false, + setIsAnnualToggle: () => {}, + products: [], + showFeatures: true, }); export const usePricingTableContext = (componentName: string) => { - const context = useContext(PricingTableContext); + const context = useContext(PricingTableContext); - if (context === undefined) { - throw new Error(`${componentName} must be used within `); - } + if (context === undefined) { + throw new Error(`${componentName} must be used within `); + } - return context; + return context; }; export const PricingTableContainer = ({ - children, - data, - showFeatures = true, - className, - isAnnualToggle, - setIsAnnualToggle, - multiInterval, + children, + products, + showFeatures = true, + className, + isAnnualToggle, + setIsAnnualToggle, + multiInterval, }: { children?: React.ReactNode; - products?: Product[]; + products?: PricingTablePlan[]; showFeatures?: boolean; className?: string; isAnnualToggle: boolean; @@ -173,11 +202,11 @@ export const PricingTableContainer = ({ }; interface PricingCardProps { - data: PricingCardData; - showFeatures?: boolean; - className?: string; - onButtonClick?: (event: React.MouseEvent) => void; - buttonProps?: React.ComponentProps<"button">; + productId: string; + showFeatures?: boolean; + className?: string; + onButtonClick?: (event: React.MouseEvent) => void; + buttonProps?: React.ComponentProps<"button">; } export const PricingCard = ({ @@ -202,11 +231,11 @@ export const PricingCard = ({ ? { primary_text: "Free", } - : product.items[0].display; + : product.features[0]?.display; const featureItems = product.properties?.is_free - ? product.items - : product.items.slice(1); + ? product.features + : product.features.slice(1); return (
{ @@ -303,25 +332,25 @@ export const PricingFeatureList = ({ {/* {showIcon && ( )} */} -
- {feature.display?.primary_text} - {feature.display?.secondary_text && ( - - {feature.display?.secondary_text} - - )} -
-
- ))} -
-
- ); +
+ {item.display?.primary_text} + {item.display?.secondary_text && ( + + {item.display?.secondary_text} + + )} +
+
+ ))} +
+
+ ); }; // Pricing Card Button export interface PricingCardButtonProps extends React.ComponentProps<"button"> { - recommended?: boolean; - buttonUrl?: string; + recommended?: boolean; + buttonUrl?: string; } export const PricingCardButton = React.forwardRef< @@ -374,8 +403,8 @@ PricingCardButton.displayName = "PricingCardButton"; // Annual Switch export const AnnualSwitch = ({ - isAnnualToggle, - setIsAnnualToggle, + isAnnualToggle, + setIsAnnualToggle, }: { isAnnualToggle: boolean; setIsAnnualToggle: (isAnnual: boolean) => void;