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:
gbuomprisco
2024-08-01 14:57:55 +02:00
parent 5c28eaabeb
commit 23154c366d
48 changed files with 607 additions and 469 deletions

View File

@@ -30,7 +30,7 @@
"@supabase/supabase-js": "^2.45.0",
"@types/react": "^18.3.3",
"date-fns": "^3.6.0",
"lucide-react": "^0.417.0",
"lucide-react": "^0.418.0",
"next": "14.2.5",
"react": "18.3.1",
"react-hook-form": "^7.52.1",

View File

@@ -1,7 +1,7 @@
import { PlusSquare } from 'lucide-react';
import { z } from 'zod';
import { LineItemSchema } from '@kit/billing';
import type { LineItemSchema } from '@kit/billing';
import { formatCurrency } from '@kit/shared/utils';
import { If } from '@kit/ui/if';
import { Trans } from '@kit/ui/trans';

View File

@@ -10,7 +10,7 @@ import { z } from 'zod';
import {
BillingConfig,
LineItemSchema,
type LineItemSchema,
getPlanIntervals,
getPrimaryLineItem,
getProductPlanPair,

View File

@@ -10,7 +10,7 @@ import { z } from 'zod';
import {
BillingConfig,
LineItemSchema,
type LineItemSchema,
getPlanIntervals,
getPrimaryLineItem,
} from '@kit/billing';

View File

@@ -4,7 +4,7 @@ import { z } from 'zod';
import {
BillingConfig,
BillingProviderSchema,
type BillingProviderSchema,
BillingWebhookHandlerService,
} from '@kit/billing';

View File

@@ -1,14 +1,15 @@
import 'server-only';
import { SupabaseClient } from '@supabase/supabase-js';
import { BillingConfig } from '@kit/billing';
import { Database } from '@kit/supabase/database';
import { getSupabaseServerActionClient } from '@kit/supabase/server-actions-client';
import { BillingEventHandlerFactoryService } from './billing-event-handler-factory.service';
import { createBillingEventHandlerService } from './billing-event-handler.service';
// a function that returns a Supabase client
type ClientProvider = () => ReturnType<typeof getSupabaseServerActionClient>;
type ClientProvider = () => SupabaseClient<Database>;
// the billing provider from the database
type BillingProvider = Database['public']['Enums']['billing_provider'];

View File

@@ -3,7 +3,7 @@ import 'server-only';
import { z } from 'zod';
import {
BillingProviderSchema,
type BillingProviderSchema,
BillingStrategyProviderService,
} from '@kit/billing';

View File

@@ -1,6 +1,6 @@
import { z } from 'zod';
import { BillingProviderSchema } from '@kit/billing';
import type { BillingProviderSchema } from '@kit/billing';
import {
CancelSubscriptionParamsSchema,
CreateBillingCheckoutSchema,

View File

@@ -1,7 +1,7 @@
import { getCustomer } from '@lemonsqueezy/lemonsqueezy.js';
import { z } from 'zod';
import { CreateBillingPortalSessionSchema } from '@kit/billing/schema';
import type { CreateBillingPortalSessionSchema } from '@kit/billing/schema';
import { initializeLemonSqueezyClient } from './lemon-squeezy-sdk';

View File

@@ -5,7 +5,7 @@ import {
} from '@lemonsqueezy/lemonsqueezy.js';
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 { initializeLemonSqueezyClient } from './lemon-squeezy-sdk';

View File

@@ -12,7 +12,7 @@ import {
import { z } from 'zod';
import { BillingStrategyProviderService } from '@kit/billing';
import {
import type {
CancelSubscriptionParamsSchema,
CreateBillingCheckoutSchema,
CreateBillingPortalSessionSchema,

View File

@@ -1,7 +1,7 @@
import type { Stripe } from 'stripe';
import { z } from 'zod';
import { CreateBillingPortalSessionSchema } from '@kit/billing/schema';
import type { CreateBillingPortalSessionSchema } from '@kit/billing/schema';
/**
* @name createStripeBillingPortalSession

View File

@@ -1,7 +1,7 @@
import type { Stripe } from 'stripe';
import { z } from 'zod';
import { CreateBillingCheckoutSchema } from '@kit/billing/schema';
import type { CreateBillingCheckoutSchema } from '@kit/billing/schema';
/**
* @name createStripeCheckout

View File

@@ -4,7 +4,7 @@ import type { Stripe } from 'stripe';
import { z } from 'zod';
import { BillingStrategyProviderService } from '@kit/billing';
import {
import type {
CancelSubscriptionParamsSchema,
CreateBillingCheckoutSchema,
CreateBillingPortalSessionSchema,