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: use buffer instead of btoa
Brad Barbinabeafb3b7097
diff --git a/apps/erp/app/integrations/onshape/lib/client.ts b/apps/erp/app/integrations/onshape/lib/client.tsindex a2ed841042..d0210816e1 100644--- a/apps/erp/app/integrations/onshape/lib/client.ts+++ b/apps/erp/app/integrations/onshape/lib/client.ts@@ -31,7 +31,9 @@ export class OnshapeClient {return {"Content-Type": "application/json",Accept: "application/json;charset=UTF-8; qs=0.09",- Authorization: `Basic ${btoa(`${this.accessKey}:${this.secretKey}`)}`,+ Authorization: `Basic ${Buffer.from(+ `${this.accessKey}:${this.secretKey}`+ ).toString("base64")}`,};}@@ -54,6 +56,7 @@ export class OnshapeClient {if (!response.ok) {const errorText = await response.text();+ console.log("Onshape API error headers:", headers);throw new Error(`Onshape API error (${response.status}): ${errorText}`);}