Improve environment variable handling

This commit is contained in:
Dominic Ferrando
2026-06-23 15:55:10 -04:00
parent 720aa61c66
commit 39d3e5ab52
3 changed files with 28 additions and 12 deletions
+7 -6
View File
@@ -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);