Remove Cloudflare mailer implementation, update dependencies and updated code to reflect stricter EsLint settings
Deleted CloudflareMailer class and its implementation from the mailers package. Updated dependencies across various packages, converting certain imports to use `type` only, and bumped versions for packages like `react-query`, `lucide-react`, and others.
This commit is contained in:
@@ -56,11 +56,11 @@
|
|||||||
"@marsidev/react-turnstile": "^0.7.2",
|
"@marsidev/react-turnstile": "^0.7.2",
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
"@supabase/supabase-js": "^2.45.0",
|
"@supabase/supabase-js": "^2.45.0",
|
||||||
"@tanstack/react-query": "5.51.15",
|
"@tanstack/react-query": "5.51.16",
|
||||||
"@tanstack/react-query-next-experimental": "^5.51.15",
|
"@tanstack/react-query-next-experimental": "^5.51.16",
|
||||||
"@tanstack/react-table": "^8.19.3",
|
"@tanstack/react-table": "^8.19.3",
|
||||||
"date-fns": "^3.6.0",
|
"date-fns": "^3.6.0",
|
||||||
"lucide-react": "^0.417.0",
|
"lucide-react": "^0.418.0",
|
||||||
"next": "14.2.5",
|
"next": "14.2.5",
|
||||||
"next-sitemap": "^4.2.3",
|
"next-sitemap": "^4.2.3",
|
||||||
"next-themes": "0.3.0",
|
"next-themes": "0.3.0",
|
||||||
|
|||||||
@@ -34,11 +34,11 @@
|
|||||||
"prettier": "@kit/prettier-config",
|
"prettier": "@kit/prettier-config",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@manypkg/cli": "^0.21.4",
|
"@manypkg/cli": "^0.21.4",
|
||||||
"@turbo/gen": "^2.0.9",
|
"@turbo/gen": "^2.0.11",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"pnpm": "^9.6.0",
|
"pnpm": "^9.6.0",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"turbo": "2.0.9",
|
"turbo": "2.0.11",
|
||||||
"typescript": "^5.5.4"
|
"typescript": "^5.5.4"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
"@supabase/supabase-js": "^2.45.0",
|
"@supabase/supabase-js": "^2.45.0",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"date-fns": "^3.6.0",
|
"date-fns": "^3.6.0",
|
||||||
"lucide-react": "^0.417.0",
|
"lucide-react": "^0.418.0",
|
||||||
"next": "14.2.5",
|
"next": "14.2.5",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-hook-form": "^7.52.1",
|
"react-hook-form": "^7.52.1",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { PlusSquare } from 'lucide-react';
|
import { PlusSquare } from 'lucide-react';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { LineItemSchema } from '@kit/billing';
|
import type { LineItemSchema } from '@kit/billing';
|
||||||
import { formatCurrency } from '@kit/shared/utils';
|
import { formatCurrency } from '@kit/shared/utils';
|
||||||
import { If } from '@kit/ui/if';
|
import { If } from '@kit/ui/if';
|
||||||
import { Trans } from '@kit/ui/trans';
|
import { Trans } from '@kit/ui/trans';
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { z } from 'zod';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
BillingConfig,
|
BillingConfig,
|
||||||
LineItemSchema,
|
type LineItemSchema,
|
||||||
getPlanIntervals,
|
getPlanIntervals,
|
||||||
getPrimaryLineItem,
|
getPrimaryLineItem,
|
||||||
getProductPlanPair,
|
getProductPlanPair,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { z } from 'zod';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
BillingConfig,
|
BillingConfig,
|
||||||
LineItemSchema,
|
type LineItemSchema,
|
||||||
getPlanIntervals,
|
getPlanIntervals,
|
||||||
getPrimaryLineItem,
|
getPrimaryLineItem,
|
||||||
} from '@kit/billing';
|
} from '@kit/billing';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { z } from 'zod';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
BillingConfig,
|
BillingConfig,
|
||||||
BillingProviderSchema,
|
type BillingProviderSchema,
|
||||||
BillingWebhookHandlerService,
|
BillingWebhookHandlerService,
|
||||||
} from '@kit/billing';
|
} from '@kit/billing';
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
import 'server-only';
|
import 'server-only';
|
||||||
|
|
||||||
|
import { SupabaseClient } from '@supabase/supabase-js';
|
||||||
|
|
||||||
import { BillingConfig } from '@kit/billing';
|
import { BillingConfig } from '@kit/billing';
|
||||||
import { Database } from '@kit/supabase/database';
|
import { Database } from '@kit/supabase/database';
|
||||||
import { getSupabaseServerActionClient } from '@kit/supabase/server-actions-client';
|
|
||||||
|
|
||||||
import { BillingEventHandlerFactoryService } from './billing-event-handler-factory.service';
|
import { BillingEventHandlerFactoryService } from './billing-event-handler-factory.service';
|
||||||
import { createBillingEventHandlerService } from './billing-event-handler.service';
|
import { createBillingEventHandlerService } from './billing-event-handler.service';
|
||||||
|
|
||||||
// a function that returns a Supabase client
|
// a function that returns a Supabase client
|
||||||
type ClientProvider = () => ReturnType<typeof getSupabaseServerActionClient>;
|
type ClientProvider = () => SupabaseClient<Database>;
|
||||||
|
|
||||||
// the billing provider from the database
|
// the billing provider from the database
|
||||||
type BillingProvider = Database['public']['Enums']['billing_provider'];
|
type BillingProvider = Database['public']['Enums']['billing_provider'];
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import 'server-only';
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BillingProviderSchema,
|
type BillingProviderSchema,
|
||||||
BillingStrategyProviderService,
|
BillingStrategyProviderService,
|
||||||
} from '@kit/billing';
|
} from '@kit/billing';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { BillingProviderSchema } from '@kit/billing';
|
import type { BillingProviderSchema } from '@kit/billing';
|
||||||
import {
|
import {
|
||||||
CancelSubscriptionParamsSchema,
|
CancelSubscriptionParamsSchema,
|
||||||
CreateBillingCheckoutSchema,
|
CreateBillingCheckoutSchema,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { getCustomer } from '@lemonsqueezy/lemonsqueezy.js';
|
import { getCustomer } from '@lemonsqueezy/lemonsqueezy.js';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { CreateBillingPortalSessionSchema } from '@kit/billing/schema';
|
import type { CreateBillingPortalSessionSchema } from '@kit/billing/schema';
|
||||||
|
|
||||||
import { initializeLemonSqueezyClient } from './lemon-squeezy-sdk';
|
import { initializeLemonSqueezyClient } from './lemon-squeezy-sdk';
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
} from '@lemonsqueezy/lemonsqueezy.js';
|
} from '@lemonsqueezy/lemonsqueezy.js';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { CreateBillingCheckoutSchema } from '@kit/billing/schema';
|
import type { CreateBillingCheckoutSchema } from '@kit/billing/schema';
|
||||||
|
|
||||||
import { getLemonSqueezyEnv } from '../schema/lemon-squeezy-server-env.schema';
|
import { getLemonSqueezyEnv } from '../schema/lemon-squeezy-server-env.schema';
|
||||||
import { initializeLemonSqueezyClient } from './lemon-squeezy-sdk';
|
import { initializeLemonSqueezyClient } from './lemon-squeezy-sdk';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { BillingStrategyProviderService } from '@kit/billing';
|
import { BillingStrategyProviderService } from '@kit/billing';
|
||||||
import {
|
import type {
|
||||||
CancelSubscriptionParamsSchema,
|
CancelSubscriptionParamsSchema,
|
||||||
CreateBillingCheckoutSchema,
|
CreateBillingCheckoutSchema,
|
||||||
CreateBillingPortalSessionSchema,
|
CreateBillingPortalSessionSchema,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { Stripe } from 'stripe';
|
import type { Stripe } from 'stripe';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { CreateBillingPortalSessionSchema } from '@kit/billing/schema';
|
import type { CreateBillingPortalSessionSchema } from '@kit/billing/schema';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name createStripeBillingPortalSession
|
* @name createStripeBillingPortalSession
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { Stripe } from 'stripe';
|
import type { Stripe } from 'stripe';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { CreateBillingCheckoutSchema } from '@kit/billing/schema';
|
import type { CreateBillingCheckoutSchema } from '@kit/billing/schema';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name createStripeCheckout
|
* @name createStripeCheckout
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type { Stripe } from 'stripe';
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { BillingStrategyProviderService } from '@kit/billing';
|
import { BillingStrategyProviderService } from '@kit/billing';
|
||||||
import {
|
import type {
|
||||||
CancelSubscriptionParamsSchema,
|
CancelSubscriptionParamsSchema,
|
||||||
CreateBillingCheckoutSchema,
|
CreateBillingCheckoutSchema,
|
||||||
CreateBillingPortalSessionSchema,
|
CreateBillingPortalSessionSchema,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"./route-handler": "./src/keystatic-route-handler.ts"
|
"./route-handler": "./src/keystatic-route-handler.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@keystatic/core": "0.5.30",
|
"@keystatic/core": "0.5.32",
|
||||||
"@keystatic/next": "^5.0.1",
|
"@keystatic/next": "^5.0.1",
|
||||||
"@markdoc/markdoc": "^0.4.0"
|
"@markdoc/markdoc": "^0.4.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,10 +35,10 @@
|
|||||||
"@kit/ui": "workspace:^",
|
"@kit/ui": "workspace:^",
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
"@supabase/supabase-js": "^2.45.0",
|
"@supabase/supabase-js": "^2.45.0",
|
||||||
"@tanstack/react-query": "5.51.15",
|
"@tanstack/react-query": "5.51.16",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^18.3.0",
|
||||||
"lucide-react": "^0.417.0",
|
"lucide-react": "^0.418.0",
|
||||||
"next": "14.2.5",
|
"next": "14.2.5",
|
||||||
"next-themes": "0.3.0",
|
"next-themes": "0.3.0",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ export const UpdatePasswordForm = ({
|
|||||||
// if the user does not have an email assigned, it's possible they
|
// if the user does not have an email assigned, it's possible they
|
||||||
// don't have an email/password factor linked, and the UI is out of sync
|
// don't have an email/password factor linked, and the UI is out of sync
|
||||||
if (!email) {
|
if (!email) {
|
||||||
|
/* eslint-disable @typescript-eslint/prefer-promise-reject-errors */
|
||||||
return Promise.reject(t(`cannotUpdatePassword`));
|
return Promise.reject(t(`cannotUpdatePassword`));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,10 @@
|
|||||||
"@makerkit/data-loader-supabase-core": "^0.0.8",
|
"@makerkit/data-loader-supabase-core": "^0.0.8",
|
||||||
"@makerkit/data-loader-supabase-nextjs": "^1.2.3",
|
"@makerkit/data-loader-supabase-nextjs": "^1.2.3",
|
||||||
"@supabase/supabase-js": "^2.45.0",
|
"@supabase/supabase-js": "^2.45.0",
|
||||||
"@tanstack/react-query": "5.51.15",
|
"@tanstack/react-query": "5.51.16",
|
||||||
"@tanstack/react-table": "^8.19.3",
|
"@tanstack/react-table": "^8.19.3",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"lucide-react": "^0.417.0",
|
"lucide-react": "^0.418.0",
|
||||||
"next": "14.2.5",
|
"next": "14.2.5",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-dom": "18.3.1",
|
"react-dom": "18.3.1",
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
"@marsidev/react-turnstile": "^0.7.2",
|
"@marsidev/react-turnstile": "^0.7.2",
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
"@supabase/supabase-js": "^2.45.0",
|
"@supabase/supabase-js": "^2.45.0",
|
||||||
"@tanstack/react-query": "5.51.15",
|
"@tanstack/react-query": "5.51.16",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"lucide-react": "^0.417.0",
|
"lucide-react": "^0.418.0",
|
||||||
"next": "14.2.5",
|
"next": "14.2.5",
|
||||||
"react-hook-form": "^7.52.1",
|
"react-hook-form": "^7.52.1",
|
||||||
"react-i18next": "^15.0.0",
|
"react-i18next": "^15.0.0",
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export function OauthProviders(props: {
|
|||||||
const credential = await signInRequest();
|
const credential = await signInRequest();
|
||||||
|
|
||||||
if (!credential) {
|
if (!credential) {
|
||||||
return Promise.reject();
|
return Promise.reject(new Error('Failed to sign in with provider'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[],
|
[],
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export function PasswordSignInContainer({
|
|||||||
|
|
||||||
onSignIn(userId);
|
onSignIn(userId);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch {
|
||||||
// wrong credentials, do nothing
|
// wrong credentials, do nothing
|
||||||
} finally {
|
} finally {
|
||||||
resetCaptchaToken();
|
resetCaptchaToken();
|
||||||
|
|||||||
@@ -21,9 +21,9 @@
|
|||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@kit/ui": "workspace:*",
|
"@kit/ui": "workspace:*",
|
||||||
"@supabase/supabase-js": "^2.45.0",
|
"@supabase/supabase-js": "^2.45.0",
|
||||||
"@tanstack/react-query": "5.51.15",
|
"@tanstack/react-query": "5.51.16",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"lucide-react": "^0.417.0",
|
"lucide-react": "^0.418.0",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-dom": "18.3.1",
|
"react-dom": "18.3.1",
|
||||||
"react-i18next": "^15.0.0"
|
"react-i18next": "^15.0.0"
|
||||||
|
|||||||
@@ -33,13 +33,13 @@
|
|||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@kit/ui": "workspace:^",
|
"@kit/ui": "workspace:^",
|
||||||
"@supabase/supabase-js": "^2.45.0",
|
"@supabase/supabase-js": "^2.45.0",
|
||||||
"@tanstack/react-query": "5.51.15",
|
"@tanstack/react-query": "5.51.16",
|
||||||
"@tanstack/react-table": "^8.19.3",
|
"@tanstack/react-table": "^8.19.3",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^18.3.0",
|
||||||
"class-variance-authority": "^0.7.0",
|
"class-variance-authority": "^0.7.0",
|
||||||
"date-fns": "^3.6.0",
|
"date-fns": "^3.6.0",
|
||||||
"lucide-react": "^0.417.0",
|
"lucide-react": "^0.418.0",
|
||||||
"next": "14.2.5",
|
"next": "14.2.5",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-dom": "18.3.1",
|
"react-dom": "18.3.1",
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ function CreateOrganizationAccountForm(props: { onClose: () => void }) {
|
|||||||
startTransition(async () => {
|
startTransition(async () => {
|
||||||
try {
|
try {
|
||||||
await createTeamAccountAction(data);
|
await createTeamAccountAction(data);
|
||||||
} catch (error) {
|
} catch {
|
||||||
setError(true);
|
setError(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ function DeleteInvitationForm({
|
|||||||
await deleteInvitationAction({ invitationId });
|
await deleteInvitationAction({ invitationId });
|
||||||
|
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
} catch (e) {
|
} catch {
|
||||||
setError(true);
|
setError(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ function RenewInvitationForm({
|
|||||||
await renewInvitationAction({ invitationId });
|
await renewInvitationAction({ invitationId });
|
||||||
|
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
} catch (e) {
|
} catch {
|
||||||
setError(true);
|
setError(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ function UpdateInvitationForm({
|
|||||||
});
|
});
|
||||||
|
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
} catch (e) {
|
} catch {
|
||||||
setError(true);
|
setError(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ function RemoveMemberForm({
|
|||||||
await removeMemberFromAccountAction({ accountId, userId });
|
await removeMemberFromAccountAction({ accountId, userId });
|
||||||
|
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
} catch (e) {
|
} catch {
|
||||||
setError(true);
|
setError(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ function TransferOrganizationOwnershipForm({
|
|||||||
await transferOwnershipAction(data);
|
await transferOwnershipAction(data);
|
||||||
|
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
} catch (error) {
|
} catch {
|
||||||
setError(true);
|
setError(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ function UpdateMemberForm({
|
|||||||
});
|
});
|
||||||
|
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
} catch (e) {
|
} catch {
|
||||||
setError(true);
|
setError(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import { z } from 'zod';
|
|||||||
import { getLogger } from '@kit/shared/logger';
|
import { getLogger } from '@kit/shared/logger';
|
||||||
import { Database } from '@kit/supabase/database';
|
import { Database } from '@kit/supabase/database';
|
||||||
|
|
||||||
import { DeleteInvitationSchema } from '../../schema/delete-invitation.schema';
|
import type { DeleteInvitationSchema } from '../../schema/delete-invitation.schema';
|
||||||
import { InviteMembersSchema } from '../../schema/invite-members.schema';
|
import type { InviteMembersSchema } from '../../schema/invite-members.schema';
|
||||||
import { UpdateInvitationSchema } from '../../schema/update-invitation.schema';
|
import type { UpdateInvitationSchema } from '../../schema/update-invitation.schema';
|
||||||
|
|
||||||
export function createAccountInvitationsService(
|
export function createAccountInvitationsService(
|
||||||
client: SupabaseClient<Database>,
|
client: SupabaseClient<Database>,
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import { z } from 'zod';
|
|||||||
import { getLogger } from '@kit/shared/logger';
|
import { getLogger } from '@kit/shared/logger';
|
||||||
import { Database } from '@kit/supabase/database';
|
import { Database } from '@kit/supabase/database';
|
||||||
|
|
||||||
import { RemoveMemberSchema } from '../../schema/remove-member.schema';
|
import type { RemoveMemberSchema } from '../../schema/remove-member.schema';
|
||||||
import { TransferOwnershipConfirmationSchema } from '../../schema/transfer-ownership-confirmation.schema';
|
import type { TransferOwnershipConfirmationSchema } from '../../schema/transfer-ownership-confirmation.schema';
|
||||||
import { UpdateMemberRoleSchema } from '../../schema/update-member-role.schema';
|
import type { UpdateMemberRoleSchema } from '../../schema/update-member-role.schema';
|
||||||
import { createAccountPerSeatBillingService } from './account-per-seat-billing.service';
|
import { createAccountPerSeatBillingService } from './account-per-seat-billing.service';
|
||||||
|
|
||||||
export function createAccountMembersService(client: SupabaseClient<Database>) {
|
export function createAccountMembersService(client: SupabaseClient<Database>) {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"@kit/shared": "workspace:^",
|
"@kit/shared": "workspace:^",
|
||||||
"@kit/tailwind-config": "workspace:*",
|
"@kit/tailwind-config": "workspace:*",
|
||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@tanstack/react-query": "5.51.15",
|
"@tanstack/react-query": "5.51.16",
|
||||||
"react-i18next": "^15.0.0"
|
"react-i18next": "^15.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -19,12 +19,6 @@ Make sure the app installs the `@kit/mailers` package before using it.
|
|||||||
|
|
||||||
By default, the package uses `nodemailer`.
|
By default, the package uses `nodemailer`.
|
||||||
|
|
||||||
To use Cloudflare, please set the environment variable `MAILER_PROVIDER` to `cloudflare`.
|
|
||||||
|
|
||||||
```
|
|
||||||
MAILER_PROVIDER=cloudflare
|
|
||||||
```
|
|
||||||
|
|
||||||
To use [Resend](https:///resend.com)'s HTTP API, please set the environment variable `MAILER_PROVIDER` to `resend`.
|
To use [Resend](https:///resend.com)'s HTTP API, please set the environment variable `MAILER_PROVIDER` to `resend`.
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -48,10 +42,6 @@ async function sendEmail() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Cloudflare
|
|
||||||
|
|
||||||
If you're using the `cloudflare` provider, please also read the instructions of the package [Vercel Email](https://github.com/Sh4yy/vercel-email) to setup your Workers.
|
|
||||||
|
|
||||||
## Resend
|
## Resend
|
||||||
|
|
||||||
If you're using the `resend` provider, please add the following environment variables:
|
If you're using the `resend` provider, please add the following environment variables:
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
import 'server-only';
|
|
||||||
|
|
||||||
import Email from 'vercel-email';
|
|
||||||
import { z } from 'zod';
|
|
||||||
|
|
||||||
import { Mailer } from '../../mailer';
|
|
||||||
import { MailerSchema } from '../../schema/mailer.schema';
|
|
||||||
|
|
||||||
type Config = z.infer<typeof MailerSchema>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A class representing a mailer using Cloudflare's Workers thanks to the 'vercel-email' package.
|
|
||||||
* @implements {Mailer}
|
|
||||||
*/
|
|
||||||
export class CloudflareMailer implements Mailer {
|
|
||||||
async sendEmail(config: Config) {
|
|
||||||
const schema = {
|
|
||||||
to: config.to,
|
|
||||||
from: config.from,
|
|
||||||
subject: config.subject,
|
|
||||||
};
|
|
||||||
|
|
||||||
const content =
|
|
||||||
'text' in config ? { text: config.text } : { html: config.html };
|
|
||||||
|
|
||||||
return Email.send({
|
|
||||||
...schema,
|
|
||||||
...content,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@ import 'server-only';
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { Mailer } from '../../mailer';
|
import { Mailer } from '../../mailer';
|
||||||
import { MailerSchema } from '../../schema/mailer.schema';
|
import type { MailerSchema } from '../../schema/mailer.schema';
|
||||||
import { getSMTPConfiguration } from '../../smtp-configuration';
|
import { getSMTPConfiguration } from '../../smtp-configuration';
|
||||||
|
|
||||||
type Config = z.infer<typeof MailerSchema>;
|
type Config = z.infer<typeof MailerSchema>;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import 'server-only';
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { Mailer } from '../../mailer';
|
import { Mailer } from '../../mailer';
|
||||||
import { MailerSchema } from '../../schema/mailer.schema';
|
import type { MailerSchema } from '../../schema/mailer.schema';
|
||||||
|
|
||||||
type Config = z.infer<typeof MailerSchema>;
|
type Config = z.infer<typeof MailerSchema>;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
const MAILER_PROVIDER = z
|
const MAILER_PROVIDER = z
|
||||||
.enum(['nodemailer', 'cloudflare', 'resend'])
|
.enum(['nodemailer', 'resend'])
|
||||||
.default('nodemailer')
|
.default('nodemailer')
|
||||||
.parse(process.env.MAILER_PROVIDER);
|
.parse(process.env.MAILER_PROVIDER);
|
||||||
|
|
||||||
@@ -13,9 +13,6 @@ export async function getMailer() {
|
|||||||
case 'nodemailer':
|
case 'nodemailer':
|
||||||
return getNodemailer();
|
return getNodemailer();
|
||||||
|
|
||||||
case 'cloudflare':
|
|
||||||
return getCloudflareMailer();
|
|
||||||
|
|
||||||
case 'resend':
|
case 'resend':
|
||||||
return getResendMailer();
|
return getResendMailer();
|
||||||
|
|
||||||
@@ -36,12 +33,6 @@ async function getNodemailer() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getCloudflareMailer() {
|
|
||||||
const { CloudflareMailer } = await import('./impl/cloudflare');
|
|
||||||
|
|
||||||
return new CloudflareMailer();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getResendMailer() {
|
async function getResendMailer() {
|
||||||
const { ResendMailer } = await import('./impl/resend');
|
const { ResendMailer } = await import('./impl/resend');
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"./config/server": "./src/sentry.client.server.ts"
|
"./config/server": "./src/sentry.client.server.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry/nextjs": "^8.20.0"
|
"@sentry/nextjs": "^8.22.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@kit/eslint-config": "workspace:*",
|
"@kit/eslint-config": "workspace:*",
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
"@supabase/gotrue-js": "2.64.4",
|
"@supabase/gotrue-js": "2.64.4",
|
||||||
"@supabase/ssr": "^0.4.0",
|
"@supabase/ssr": "^0.4.0",
|
||||||
"@supabase/supabase-js": "^2.45.0",
|
"@supabase/supabase-js": "^2.45.0",
|
||||||
"@tanstack/react-query": "5.51.15",
|
"@tanstack/react-query": "5.51.16",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"next": "14.2.5",
|
"next": "14.2.5",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export function useUser(initialData?: User | null) {
|
|||||||
return response.data.user;
|
return response.data.user;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.reject('Unexpected result format');
|
return Promise.reject(new Error('Unexpected result format'));
|
||||||
};
|
};
|
||||||
|
|
||||||
return useQuery({
|
return useQuery({
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"cmdk": "1.0.0",
|
"cmdk": "1.0.0",
|
||||||
"input-otp": "1.2.4",
|
"input-otp": "1.2.4",
|
||||||
"lucide-react": "^0.417.0",
|
"lucide-react": "^0.418.0",
|
||||||
"react-top-loading-bar": "2.3.1",
|
"react-top-loading-bar": "2.3.1",
|
||||||
"tailwind-merge": "^2.4.0"
|
"tailwind-merge": "^2.4.0"
|
||||||
},
|
},
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
"@kit/tailwind-config": "workspace:*",
|
"@kit/tailwind-config": "workspace:*",
|
||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
"@tanstack/react-query": "5.51.15",
|
"@tanstack/react-query": "5.51.16",
|
||||||
"@tanstack/react-table": "^8.19.3",
|
"@tanstack/react-table": "^8.19.3",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^18.3.0",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
import { cn, isRouteActive } from '../utils';
|
import { cn, isRouteActive } from '../utils';
|
||||||
import { SidebarContext } from './context/sidebar.context';
|
import { SidebarContext } from './context/sidebar.context';
|
||||||
import { If } from './if';
|
import { If } from './if';
|
||||||
import { NavigationConfigSchema } from './navigation-config.schema';
|
import type { NavigationConfigSchema } from './navigation-config.schema';
|
||||||
import { Trans } from './trans';
|
import { Trans } from './trans';
|
||||||
|
|
||||||
export type SidebarConfig = z.infer<typeof NavigationConfigSchema>;
|
export type SidebarConfig = z.infer<typeof NavigationConfigSchema>;
|
||||||
|
|||||||
905
pnpm-lock.yaml
generated
905
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,7 @@ const config = {
|
|||||||
'@typescript-eslint/consistent-type-definitions': 'off',
|
'@typescript-eslint/consistent-type-definitions': 'off',
|
||||||
'@typescript-eslint/no-unsafe-member-access': 'off',
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
||||||
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
|
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
|
||||||
|
'@typescript-eslint/only-throw-error': 'off',
|
||||||
'@typescript-eslint/no-unused-vars': [
|
'@typescript-eslint/no-unused-vars': [
|
||||||
'error',
|
'error',
|
||||||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
"@next/eslint-plugin-next": "^14.2.5",
|
"@next/eslint-plugin-next": "^14.2.5",
|
||||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||||
"@types/eslint": "^8.56.10",
|
"@types/eslint": "^8.56.10",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||||
"@typescript-eslint/parser": "^7.18.0",
|
"@typescript-eslint/parser": "^8.0.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-config-turbo": "^2.0.9",
|
"eslint-config-turbo": "^2.0.11",
|
||||||
"eslint-plugin-import": "^2.29.1",
|
"eslint-plugin-import": "^2.29.1",
|
||||||
"eslint-plugin-react": "^7.35.0",
|
"eslint-plugin-react": "^7.35.0",
|
||||||
"eslint-plugin-react-hooks": "^4.6.2"
|
"eslint-plugin-react-hooks": "^4.6.2"
|
||||||
|
|||||||
Reference in New Issue
Block a user