Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
fix: validate job parameters in getNotificationLink function
naveenkashd2caff9de61f
diff --git a/packages/notifications/src/index.ts b/packages/notifications/src/index.tsindex f841afe247..b923632cd8 100644--- a/packages/notifications/src/index.ts+++ b/packages/notifications/src/index.ts@@ -132,6 +132,7 @@ export function getNotificationLink(case NotificationEvent.JobOperationAssignment:case NotificationEvent.JobOperationMessage: {const { jobId, operationId, makeMethodId, materialId } = context ?? {};+ if (!jobId || !operationId || !makeMethodId) return null;const link = materialId? path.to.jobMakeMethod(jobId, makeMethodId): path.to.jobMethod(jobId, makeMethodId);diff --git a/packages/paths/src/index.ts b/packages/paths/src/index.tsindex 2d5a454fd0..d569a4eb5d 100644--- a/packages/paths/src/index.ts+++ b/packages/paths/src/index.ts@@ -6,13 +6,9 @@ const file = "/file"; // from ~/routes/file+ folderconst share = "/share"; // from ~/routes/shared+ folderconst onboarding = "/onboarding"; // from ~/routes/onboarding+ folder-// Resolve app URLs from env without importing @carbon/env / @carbon/auth.-// Those packages have re-export chains that don't resolve in raw-Node ESM-// runtimes (e.g. Inngest), and importing them here pulls @carbon/utils-// back into a cycle. Keep this file self-contained.-const env =- (typeof process !== "undefined" && process.env) ||- ({} as Record<string, string | undefined>);+const env: Record<string, string | undefined> =+ (globalThis as { process?: { env?: Record<string, string | undefined> } })+ .process?.env ?? {};const isProd = env.VERCEL_ENV === "production" || env.NODE_ENV === "production";const isPreview = env.VERCEL_ENV === "preview";const isControlled =