diff --git a/firestore-stripe-web-sdk/package.json b/firestore-stripe-web-sdk/package.json index c5bed58a..b31e062a 100644 --- a/firestore-stripe-web-sdk/package.json +++ b/firestore-stripe-web-sdk/package.json @@ -3,6 +3,7 @@ "version": "0.0.7", "description": "Client SDK for the firestore-stripe-payments Firebase Extension", "main": "./lib/index.js", + "type": "module", "typings": "./lib/index.d.ts", "scripts": { "api-documenter": "api-documenter markdown --input-folder temp --output-folder markdown", diff --git a/firestore-stripe-web-sdk/src/index.ts b/firestore-stripe-web-sdk/src/index.ts index 5ad1b28d..7126782e 100644 --- a/firestore-stripe-web-sdk/src/index.ts +++ b/firestore-stripe-web-sdk/src/index.ts @@ -20,7 +20,7 @@ export { StripePaymentsErrorCode, StripePaymentsOptions, getStripePayments, -} from "./init"; +} from "./init.js"; export { CREATE_SESSION_TIMEOUT_MILLIS, @@ -36,7 +36,7 @@ export { PriceIdSessionCreateParams, Session, SessionCreateParams, -} from "./session"; +} from "./session.js"; export { GetPaymentsOptions, @@ -47,7 +47,7 @@ export { getCurrentUserPayment, getCurrentUserPayments, onCurrentUserPaymentUpdate, -} from "./payment"; +} from "./payment.js"; export { GetProductOptions, @@ -60,7 +60,7 @@ export { getPrices, getProduct, getProducts, -} from "./product"; +} from "./product.js"; export { getCurrentUserSubscription, @@ -71,4 +71,4 @@ export { SubscriptionChangeType, SubscriptionSnapshot, SubscriptionStatus, -} from "./subscription"; +} from "./subscription.js"; diff --git a/firestore-stripe-web-sdk/src/payment.ts b/firestore-stripe-web-sdk/src/payment.ts index 108774d9..d28c19d5 100644 --- a/firestore-stripe-web-sdk/src/payment.ts +++ b/firestore-stripe-web-sdk/src/payment.ts @@ -36,9 +36,9 @@ import { QuerySnapshot, where, } from "@firebase/firestore"; -import { StripePayments, StripePaymentsError } from "./init"; -import { getCurrentUser, getCurrentUserSync } from "./user"; -import { checkNonEmptyArray, checkNonEmptyString } from "./utils"; +import { StripePayments, StripePaymentsError } from "./init.js"; +import { getCurrentUser, getCurrentUserSync } from "./user.js"; +import { checkNonEmptyArray, checkNonEmptyString } from "./utils.js"; /** * Interface of a Stripe payment stored in the app database. diff --git a/firestore-stripe-web-sdk/src/product.ts b/firestore-stripe-web-sdk/src/product.ts index 1ce3fa37..37045e0a 100644 --- a/firestore-stripe-web-sdk/src/product.ts +++ b/firestore-stripe-web-sdk/src/product.ts @@ -36,8 +36,8 @@ import { where, WhereFilterOp, } from "@firebase/firestore"; -import { StripePayments, StripePaymentsError } from "./init"; -import { checkNonEmptyString } from "./utils"; +import { StripePayments, StripePaymentsError } from "./init.js"; +import { checkNonEmptyString } from "./utils.js"; /** * Interface of a Stripe Product stored in the app database. diff --git a/firestore-stripe-web-sdk/src/session.ts b/firestore-stripe-web-sdk/src/session.ts index decbc1d4..ad86b7e5 100644 --- a/firestore-stripe-web-sdk/src/session.ts +++ b/firestore-stripe-web-sdk/src/session.ts @@ -31,13 +31,13 @@ import { Timestamp, Unsubscribe, } from "@firebase/firestore"; -import { StripePayments, StripePaymentsError } from "./init"; -import { getCurrentUser } from "./user"; +import { StripePayments, StripePaymentsError } from "./init.js"; +import { getCurrentUser } from "./user.js"; import { checkNonEmptyArray, checkNonEmptyString, checkPositiveNumber, -} from "./utils"; +} from "./utils.js"; /** * Parameters common across all session types. diff --git a/firestore-stripe-web-sdk/src/subscription.ts b/firestore-stripe-web-sdk/src/subscription.ts index 09115667..35bd66c4 100644 --- a/firestore-stripe-web-sdk/src/subscription.ts +++ b/firestore-stripe-web-sdk/src/subscription.ts @@ -37,9 +37,9 @@ import { Timestamp, where, } from "@firebase/firestore"; -import { StripePayments, StripePaymentsError } from "./init"; -import { getCurrentUser, getCurrentUserSync } from "./user"; -import { checkNonEmptyArray, checkNonEmptyString } from "./utils"; +import { StripePayments, StripePaymentsError } from "./init.js"; +import { getCurrentUser, getCurrentUserSync } from "./user.js"; +import { checkNonEmptyArray, checkNonEmptyString } from "./utils.js"; /** * Interface of a Stripe Subscription stored in the app database. diff --git a/firestore-stripe-web-sdk/src/user.ts b/firestore-stripe-web-sdk/src/user.ts index c3203858..1f992428 100644 --- a/firestore-stripe-web-sdk/src/user.ts +++ b/firestore-stripe-web-sdk/src/user.ts @@ -16,7 +16,7 @@ import { FirebaseApp } from "@firebase/app"; import { Auth, getAuth } from "@firebase/auth"; -import { StripePayments, StripePaymentsError } from "./init"; +import { StripePayments, StripePaymentsError } from "./init.js"; /** * Internal API for retrieving the currently signed in user. Rejects with "unauthenticated" if