Improve environment variable handling
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
} from "@blade-and-brawn/commerce";
|
||||
import zipcodesUs from "zipcodes-us";
|
||||
import z from "zod";
|
||||
import { env } from "./env";
|
||||
|
||||
// SERVICES
|
||||
// -----------
|
||||
@@ -28,15 +29,15 @@ const levelCalculator = new LevelCalculator(
|
||||
);
|
||||
|
||||
const printful = new PrintfulClient({
|
||||
token: Bun.env.PRINTFUL_AUTH!,
|
||||
storeId: Bun.env.PRINTFUL_STORE_ID!,
|
||||
token: env.PRINTFUL_AUTH,
|
||||
storeId: env.PRINTFUL_STORE_ID,
|
||||
});
|
||||
|
||||
const webflow = new WebflowClient({
|
||||
siteId: Bun.env.WEBFLOW_SITE_ID!,
|
||||
collectionsId: Bun.env.WEBFLOW_COLLECTION_ID!,
|
||||
token: Bun.env.WEBFLOW_AUTH!,
|
||||
webhookSecret: Bun.env.WEBFLOW_WEBHOOK_SECRET!,
|
||||
siteId: env.WEBFLOW_SITE_ID,
|
||||
collectionsId: env.WEBFLOW_COLLECTION_ID,
|
||||
token: env.WEBFLOW_AUTH,
|
||||
webhookSecret: env.WEBFLOW_WEBHOOK_SECRET,
|
||||
});
|
||||
|
||||
const productSyncer = new ProductSyncer(printful, webflow);
|
||||
|
||||
Reference in New Issue
Block a user