mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 10:53:23 +00:00
fix: resolve module resolution errors by replacing path aliases with relative imports
- Replace all @/ path aliases with proper relative imports and .js extensions - Update @mollie/api-client peer dependency to support v4.x (^3.7.0 || ^4.0.0) - Bump version to 0.1.5 - Ensure ESM compatibility for plugin distribution Fixes module resolution error: "Cannot find package '@/collections'" when using the plugin in external PayloadCMS projects. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export * from './mollie'
|
||||
export * from './stripe'
|
||||
export * from './types'
|
||||
export * from './currency'
|
||||
export * from './mollie.js'
|
||||
export * from './stripe.js'
|
||||
export * from './types.js'
|
||||
export * from './currency.js'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Payment } from '@/plugin/types/payments'
|
||||
import type { PaymentProvider } from '@/plugin/types'
|
||||
import type { Payment } from '../plugin/types/payments.js'
|
||||
import type { PaymentProvider } from '../plugin/types/index.js'
|
||||
import type { Payload } from 'payload'
|
||||
import { createSingleton } from '@/plugin/singleton'
|
||||
import { createSingleton } from '../plugin/singleton.js'
|
||||
import type { createMollieClient, MollieClient } from '@mollie/api-client'
|
||||
import {
|
||||
webhookResponses,
|
||||
@@ -10,8 +10,8 @@ import {
|
||||
updateInvoiceOnPaymentSuccess,
|
||||
handleWebhookError,
|
||||
validateProductionUrl
|
||||
} from './utils'
|
||||
import { formatAmountForProvider, isValidAmount, isValidCurrencyCode } from './currency'
|
||||
} from './utils.js'
|
||||
import { formatAmountForProvider, isValidAmount, isValidCurrencyCode } from './currency.js'
|
||||
|
||||
const symbol = Symbol('mollie')
|
||||
export type MollieProviderConfig = Parameters<typeof createMollieClient>[0]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Payment } from '@/plugin/types/payments'
|
||||
import type { PaymentProvider, ProviderData } from '@/plugin/types'
|
||||
import type { Payment } from '../plugin/types/payments.js'
|
||||
import type { PaymentProvider, ProviderData } from '../plugin/types/index.js'
|
||||
import type { Payload } from 'payload'
|
||||
import { createSingleton } from '@/plugin/singleton'
|
||||
import { createSingleton } from '../plugin/singleton.js'
|
||||
import type Stripe from 'stripe'
|
||||
import {
|
||||
webhookResponses,
|
||||
@@ -10,8 +10,8 @@ import {
|
||||
updateInvoiceOnPaymentSuccess,
|
||||
handleWebhookError,
|
||||
logWebhookEvent
|
||||
} from './utils'
|
||||
import { isValidAmount, isValidCurrencyCode } from './currency'
|
||||
} from './utils.js'
|
||||
import { isValidAmount, isValidCurrencyCode } from './currency.js'
|
||||
|
||||
const symbol = Symbol('stripe')
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Payment } from '@/plugin/types/payments'
|
||||
import type { Payment } from '../plugin/types/payments.js'
|
||||
import type { Config, Payload } from 'payload'
|
||||
import type { BillingPluginConfig } from '@/plugin/config'
|
||||
import type { BillingPluginConfig } from '../plugin/config.js'
|
||||
|
||||
export type InitPayment = (payload: Payload, payment: Partial<Payment>) => Promise<Partial<Payment>>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { Payload } from 'payload'
|
||||
import type { Payment } from '@/plugin/types/payments'
|
||||
import type { BillingPluginConfig } from '@/plugin/config'
|
||||
import type { ProviderData } from './types'
|
||||
import { defaults } from '@/plugin/config'
|
||||
import { extractSlug, toPayloadId } from '@/plugin/utils'
|
||||
import type { Payment } from '../plugin/types/payments.js'
|
||||
import type { BillingPluginConfig } from '../plugin/config.js'
|
||||
import type { ProviderData } from './types.js'
|
||||
import { defaults } from '../plugin/config.js'
|
||||
import { extractSlug, toPayloadId } from '../plugin/utils.js'
|
||||
|
||||
/**
|
||||
* Common webhook response utilities
|
||||
|
||||
Reference in New Issue
Block a user