Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
948 changes: 530 additions & 418 deletions app/package-lock.json

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,71 +42,71 @@
"@next-auth/prisma-adapter": "^1.0.7",
"@prisma/adapter-pg": "^7.8.0",
"@prisma/client": "^7.8.0",
"@radix-ui/react-slot": "^1.2.4",
"@rgrove/parse-xml": "^4.2.0",
"@tanstack/react-query": "^5.100.9",
"@trpc/client": "^11.17.0",
"@trpc/react-query": "^11.17.0",
"@radix-ui/react-slot": "^1.3.0",
"@rgrove/parse-xml": "^4.2.1",
"@tanstack/react-query": "^5.101.2",
"@trpc/client": "^11.18.0",
"@trpc/react-query": "^11.18.0",
"@trpc/server": "^11.17.0",
"@types/jsonwebtoken": "^9.0.10",
"@types/nodemailer": "^8.0.0",
"axios": "^1.16.1",
"axios": "^1.18.1",
"chart.js": "^4.5.1",
"class-variance-authority": "^0.7.1",
"clsx": "2.1.1",
"csv-parser": "3.2.1",
"date-fns": "^4.2.1",
"date-fns": "^4.4.0",
"formidable": "3.5.4",
"googleapis": "^171.4.0",
"handlebars": "4.7.9",
"jsonwebtoken": "^9.0.3",
"jspdf": "^4.2.1",
"lucide-react": "^1.16.0",
"lucide-react": "^1.22.0",
"mustache": "4.2.0",
"next": "^16.2.6",
"next": "^16.2.9",
"next-auth": "^4.24.14",
"nodemailer": "^8.0.10",
"papaparse": "5.5.3",
"nodemailer": "^9.0.3",
"papaparse": "5.5.4",
"pdf-parse": "^1.1.1",
"pdfjs-dist": "4.10.38",
"pg": "^8.21.0",
"react": "^19.2.6",
"pg": "^8.22.0",
"react": "^19.2.7",
"react-chartjs-2": "5.3.1",
"react-dom": "^19.2.6",
"react-dom": "^19.2.7",
"react-toastify": "^11.1.0",
"sanitize-html": "^2.17.4",
"stripe": "^22.1.1",
"sanitize-html": "^2.17.5",
"stripe": "^22.3.0",
"superjson": "^2.2.6",
"tailwind-merge": "^3.6.0",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
"zod": "^4.4.3"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.3",
"@tailwindcss/postcss": "^4.3.0",
"@tailwindcss/postcss": "^4.3.1",
"@types/formidable": "^3.5.1",
"@types/jest": "^30.0.0",
"@types/node": "^22.19.19",
"@types/node": "^22.20.0",
"@types/papaparse": "^5.5.2",
"@types/pg": "^8.20.0",
"@types/react": "^19.2.14",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@types/sanitize-html": "^2.16.1",
"autoprefixer": "^10.5.0",
"autoprefixer": "^10.5.2",
"eslint": "^9.39.2",
"eslint-config-next": "^16.2.6",
"eslint-config-next": "^16.2.9",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-sonarjs": "^4.0.3",
"eslint-plugin-sonarjs": "^4.1.0",
"jest": "^30.4.2",
"nyc": "^18.0.0",
"postcss": "^8.5.10",
"prettier": "^3.8.3",
"prettier": "^3.9.3",
"prisma": "^7.8.0",
"tailwindcss": "^4.3.0",
"ts-jest": "^29.4.10",
"ts-jest": "^29.4.11",
"ts-node": "10.9.2",
"typescript": "5.9.3",
"typescript-eslint": "^8.59.4"
"typescript-eslint": "^8.62.0"
},
"overrides": {
"uuid": "^14.0.0",
Expand All @@ -116,15 +116,15 @@
"glob": {
"minimatch": "^10.2.5"
},
"form-data": "4.0.4",
"form-data": "^4.0.6",
"postcss": "^8.5.10",
"cookie": "0.7.2",
"follow-redirects": "^1.16.0",
"semver": "7.6.3",
"dompurify": "^3.4.1",
"dompurify": "^3.4.11",
"hono": "^4.12.21",
"fast-uri": "^3.1.1",
"@hono/node-server": "^1.19.13",
"nodemailer": "^8.0.10"
"nodemailer": "^9.0.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ interface PerformanceResponse {
start: string | null;
end: string;
source:
| "actualReceivedDate"
| "expectedDeliveryDate"
| "expectedShipMonth"
| "fallback-full-history";
"actualReceivedDate" | "expectedDeliveryDate" | "expectedShipMonth" | "fallback-full-history";
message: string;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ export function TrafficReportView() {
const topStore = data.byStore[0] ?? null;
const busiestHour = data.byHour
.filter((h) => h.visitors > 0)
.reduce<
(typeof data.byHour)[number] | null
>((best, row) => (best === null || row.visitors > best.visitors ? row : best), null);
.reduce<(typeof data.byHour)[number] | null>(
(best, row) => (best === null || row.visitors > best.visitors ? row : best),
null,
);
return { totalVisitors, avgPerDay, days, busiest, topStore, busiestHour };
}, [data]);

Expand Down
4 changes: 1 addition & 3 deletions app/src/lib/arEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ export interface ReconDeposit {
amount: Money;
}
export type ReconDiscrepancyKind =
| "INVOICE_OVERAPPLIED"
| "PAYMENT_OVERAPPLIED"
| "NEGATIVE_AMOUNT";
"INVOICE_OVERAPPLIED" | "PAYMENT_OVERAPPLIED" | "NEGATIVE_AMOUNT";
export interface ReconDiscrepancy {
kind: ReconDiscrepancyKind;
ref: string;
Expand Down
5 changes: 1 addition & 4 deletions app/src/lib/buyPerformanceWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ export interface BuyPoForWindow {
}

export type SalesWindowSource =
| "actualReceivedDate"
| "expectedDeliveryDate"
| "expectedShipMonth"
| "fallback-full-history";
"actualReceivedDate" | "expectedDeliveryDate" | "expectedShipMonth" | "fallback-full-history";

export interface SalesWindow {
/** Inclusive lower bound on orderDate. null = no lower bound (full history). */
Expand Down
5 changes: 1 addition & 4 deletions app/src/lib/customerLedgerBackfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,7 @@ const round2 = (n: number): number => Math.round(n * 100) / 100;
export interface BackfillResult {
customerId: number;
status:
| "skipped-already-backfilled"
| "skipped-no-orders"
| "backfilled"
| "backfilled-with-drift";
"skipped-already-backfilled" | "skipped-no-orders" | "backfilled" | "backfilled-with-drift";
entriesCreated: number;
finalBalance: number;
validation: LedgerValidation;
Expand Down
3 changes: 1 addition & 2 deletions app/src/lib/mailchimpSyncRunners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ function parseReport(report: Record<string, unknown>): ParsedReport {
const safeInt = (val: unknown): number => (typeof val === "number" ? val : 0);
const opens = report.opens as { opens_total?: number; unique_opens?: number } | undefined;
const clicks = report.clicks as
| { clicks_total?: number; unique_subscriber_clicks?: number }
| undefined;
{ clicks_total?: number; unique_subscriber_clicks?: number } | undefined;
const bounces = report.bounces as { hard_bounces?: number; soft_bounces?: number } | undefined;
return {
emailsSent: safeInt(report.emails_sent),
Expand Down
7 changes: 1 addition & 6 deletions app/src/lib/secureUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,7 @@ export const UPLOAD_PRESETS: Record<string, UploadPreset> = {
};

export type UploadPresetName =
| "CSV_XLSX"
| "PDF"
| "IMAGE"
| "INVENTORY_SCAN"
| "TICKET_ATTACHMENT"
| "DELIVERY_PROOF";
"CSV_XLSX" | "PDF" | "IMAGE" | "INVENTORY_SCAN" | "TICKET_ATTACHMENT" | "DELIVERY_PROOF";

interface CreateFormOptions {
/** Optional override to place files in a preset's named sub-subdirectory
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/stripe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function getStripe(): Promise<Stripe> {
);
}
if (!_stripe || _stripe.key !== key) {
_stripe = { key, client: new Stripe(key, { apiVersion: "2026-04-22.dahlia" }) };
_stripe = { key, client: new Stripe(key, { apiVersion: "2026-06-24.dahlia" }) };
}
return _stripe.client;
}
Expand Down
Loading