Skip to content

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.

build: don't use edge runtime

Brad Barbin9e6152786809
diff --git a/apps/academy/app/root.tsx b/apps/academy/app/root.tsx
index ff8479aec4..af5978294d 100644
--- a/apps/academy/app/root.tsx
+++ b/apps/academy/app/root.tsx
@@ -55,8 +55,6 @@ import AvatarMenu from "./components/AvatarMenu";
import { useOptionalUser } from "./hooks/useUser";
import { path } from "./utils/path";
-export const config = { runtime: "edge", regions: ["iad1"] };
-
export function links() {
return [
{ rel: "stylesheet", href: Tailwind },
diff --git a/apps/academy/app/routes/_auth+/callback.tsx b/apps/academy/app/routes/_auth+/callback.tsx
index 12269ee352..46c3412cda 100644
--- a/apps/academy/app/routes/_auth+/callback.tsx
+++ b/apps/academy/app/routes/_auth+/callback.tsx
@@ -31,10 +31,6 @@ import {
import { LuTriangleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
diff --git a/apps/academy/app/routes/_auth+/login.tsx b/apps/academy/app/routes/_auth+/login.tsx
index e116978779..818b0a9747 100644
--- a/apps/academy/app/routes/_auth+/login.tsx
+++ b/apps/academy/app/routes/_auth+/login.tsx
@@ -32,10 +32,6 @@ import { LuCircleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export const meta: MetaFunction = () => {
return [{ title: "Carbon | Login" }];
};
diff --git a/apps/erp/app/root.tsx b/apps/erp/app/root.tsx
index 36ae559d09..cd99ec3dbf 100644
--- a/apps/erp/app/root.tsx
+++ b/apps/erp/app/root.tsx
@@ -31,8 +31,6 @@ import NProgress from "~/styles/nprogress.css?url";
import Tailwind from "~/styles/tailwind.css?url";
import { getTheme } from "./services/theme.server";
-export const config = { runtime: "edge", regions: ["iad1"] };
-
export const links: LinksFunction = () => {
return [
{ rel: "stylesheet", href: Tailwind },
diff --git a/apps/erp/app/routes/_public+/callback.tsx b/apps/erp/app/routes/_public+/callback.tsx
index fdc727446e..9bc6049cd1 100644
--- a/apps/erp/app/routes/_public+/callback.tsx
+++ b/apps/erp/app/routes/_public+/callback.tsx
@@ -26,10 +26,6 @@ import { Alert, AlertDescription, AlertTitle, cn, VStack } from "@carbon/react";
import { LuTriangleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
diff --git a/apps/erp/app/routes/_public+/invite.$code.tsx b/apps/erp/app/routes/_public+/invite.$code.tsx
index bf3a026ff1..b6bc6f1c5e 100644
--- a/apps/erp/app/routes/_public+/invite.$code.tsx
+++ b/apps/erp/app/routes/_public+/invite.$code.tsx
@@ -20,10 +20,6 @@ import { AnimatePresence, motion } from "framer-motion";
import { acceptInvite } from "~/modules/users/users.server";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export const meta: MetaFunction = () => {
return [{ title: "Accept Invite | Carbon" }];
};
diff --git a/apps/erp/app/routes/_public+/login.tsx b/apps/erp/app/routes/_public+/login.tsx
index db17aa9c3f..ac0c5214f7 100644
--- a/apps/erp/app/routes/_public+/login.tsx
+++ b/apps/erp/app/routes/_public+/login.tsx
@@ -46,10 +46,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Login" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
if (authSession && (await verifyAuthSession(authSession))) {
diff --git a/apps/erp/app/routes/_public+/verify.tsx b/apps/erp/app/routes/_public+/verify.tsx
index ea2b91c999..dfe3b5551e 100644
--- a/apps/erp/app/routes/_public+/verify.tsx
+++ b/apps/erp/app/routes/_public+/verify.tsx
@@ -29,7 +29,7 @@ import type {
import { json, redirect } from "@vercel/remix";
import crypto from "node:crypto";
import { LuCircleAlert } from "react-icons/lu";
-import { z } from 'zod/v3';
+import { z } from "zod/v3";
import type { FormActionData, Result } from "~/types";
import { path } from "~/utils/path";
@@ -38,10 +38,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Verify Email" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
const verifyValidator = z.object({
email: z.string().email(),
code: z.string().length(6),
diff --git a/apps/erp/app/routes/api+/assign.ts b/apps/erp/app/routes/api+/assign.ts
index 2b605e6860..d68cd69626 100644
--- a/apps/erp/app/routes/api+/assign.ts
+++ b/apps/erp/app/routes/api+/assign.ts
@@ -6,10 +6,6 @@ import { tasks } from "@trigger.dev/sdk";
import { json, type ActionFunctionArgs } from "@vercel/remix";
import { assign } from "~/modules/shared/shared.server";
-export const config = {
- runtime: "nodejs",
-};
-
export async function action({ request }: ActionFunctionArgs) {
const { client, companyId, userId } = await requirePermissions(request, {});
diff --git a/apps/erp/app/routes/api+/docs.ts b/apps/erp/app/routes/api+/docs.ts
index e3c4b89fd6..a62338ec88 100644
--- a/apps/erp/app/routes/api+/docs.ts
+++ b/apps/erp/app/routes/api+/docs.ts
@@ -5,10 +5,6 @@ import type { LoaderFunctionArgs, SerializeFrom } from "@vercel/remix";
import { json } from "@vercel/remix";
import { docsQuery } from "~/utils/react-query";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
await requirePermissions(request, {});
diff --git a/apps/erp/app/routes/api+/integrations.onshape.d.$did.versions.ts b/apps/erp/app/routes/api+/integrations.onshape.d.$did.versions.ts
index ed5fa0c66e..c7384cf7c4 100644
--- a/apps/erp/app/routes/api+/integrations.onshape.d.$did.versions.ts
+++ b/apps/erp/app/routes/api+/integrations.onshape.d.$did.versions.ts
@@ -10,10 +10,6 @@ export const shouldRevalidate: ShouldRevalidateFunction = () => {
return false;
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request, params }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {});
diff --git a/apps/erp/app/routes/api+/integrations.onshape.documents.ts b/apps/erp/app/routes/api+/integrations.onshape.documents.ts
index 42c379b3ec..df667fd84d 100644
--- a/apps/erp/app/routes/api+/integrations.onshape.documents.ts
+++ b/apps/erp/app/routes/api+/integrations.onshape.documents.ts
@@ -10,10 +10,6 @@ export const shouldRevalidate: ShouldRevalidateFunction = () => {
return false;
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {});
diff --git a/apps/erp/app/routes/api+/integrations.slack.install.ts b/apps/erp/app/routes/api+/integrations.slack.install.ts
index 7fd3c9b801..72afcfcad6 100644
--- a/apps/erp/app/routes/api+/integrations.slack.install.ts
+++ b/apps/erp/app/routes/api+/integrations.slack.install.ts
@@ -2,10 +2,6 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { getSlackInstallUrl } from "@carbon/ee/slack.server";
import { json, type LoaderFunctionArgs } from "@vercel/remix";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const { userId, companyId } = await requirePermissions(request, {});
diff --git a/apps/erp/app/routes/api+/integrations.slack.interactive.ts b/apps/erp/app/routes/api+/integrations.slack.interactive.ts
index 74e8255a0d..1593960519 100644
--- a/apps/erp/app/routes/api+/integrations.slack.interactive.ts
+++ b/apps/erp/app/routes/api+/integrations.slack.interactive.ts
@@ -9,7 +9,7 @@ import {
import type { SupabaseClient } from "@supabase/supabase-js";
import { FunctionRegion } from "@supabase/supabase-js";
import { json, type ActionFunctionArgs } from "@vercel/remix";
-import { z } from 'zod/v3';
+import { z } from "zod/v3";
import {
getIssueTypesList,
getIssueWorkflowsList,
@@ -19,10 +19,6 @@ import {
import { getNextSequence } from "~/modules/settings/settings.service";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
const slackInteractivePayloadSchema = z.object({
type: z.string(),
team: z
diff --git a/apps/erp/app/routes/api+/integrations.slack.oauth.ts b/apps/erp/app/routes/api+/integrations.slack.oauth.ts
index 06045ea2c3..68cc9249c1 100644
--- a/apps/erp/app/routes/api+/integrations.slack.oauth.ts
+++ b/apps/erp/app/routes/api+/integrations.slack.oauth.ts
@@ -13,14 +13,10 @@ import {
slackOAuthTokenResponseSchema,
} from "@carbon/ee/slack.server";
import { json, redirect, type LoaderFunctionArgs } from "@vercel/remix";
-import { z } from 'zod/v3';
+import { z } from "zod/v3";
import { upsertCompanyIntegration } from "~/modules/settings/settings.server";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const { client, userId, companyId } = await requirePermissions(request, {
update: "settings",
diff --git a/apps/erp/app/routes/api+/items.methods.$id.bom.tsx b/apps/erp/app/routes/api+/items.methods.$id.bom.tsx
index efaa09ec79..591b202fa7 100644
--- a/apps/erp/app/routes/api+/items.methods.$id.bom.tsx
+++ b/apps/erp/app/routes/api+/items.methods.$id.bom.tsx
@@ -8,10 +8,6 @@ import { getMethodTree } from "~/modules/items";
import { calculateTotalQuantity, generateBomIds } from "~/utils/bom";
import { makeDurations } from "~/utils/duration";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request, params }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "parts",
diff --git a/apps/erp/app/routes/api+/items.methods.$id.bom[.]csv.tsx b/apps/erp/app/routes/api+/items.methods.$id.bom[.]csv.tsx
index dd315ac100..af1c3a4756 100644
--- a/apps/erp/app/routes/api+/items.methods.$id.bom[.]csv.tsx
+++ b/apps/erp/app/routes/api+/items.methods.$id.bom[.]csv.tsx
@@ -8,10 +8,6 @@ import { getMethodTree } from "~/modules/items";
import { calculateTotalQuantity, generateBomIds } from "~/utils/bom";
import { makeDurations } from "~/utils/duration";
-export const config = {
- runtime: "nodejs",
-};
-
const bomHeaders = [
"ID",
"Item ID",
diff --git a/apps/erp/app/routes/api+/kanban.$id.tsx b/apps/erp/app/routes/api+/kanban.$id.tsx
index 5f3e21a46b..b3a93bfed6 100644
--- a/apps/erp/app/routes/api+/kanban.$id.tsx
+++ b/apps/erp/app/routes/api+/kanban.$id.tsx
@@ -27,10 +27,6 @@ import {
import { getNextSequence } from "~/modules/settings";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
async function handleKanban({
client,
companyId,
diff --git a/apps/erp/app/routes/api+/messaging.notify.ts b/apps/erp/app/routes/api+/messaging.notify.ts
index d6cf524a57..76ba13391d 100644
--- a/apps/erp/app/routes/api+/messaging.notify.ts
+++ b/apps/erp/app/routes/api+/messaging.notify.ts
@@ -5,11 +5,7 @@ import type { notifyTask } from "@carbon/jobs/trigger/notify";
import { NotificationEvent } from "@carbon/notifications";
import { tasks } from "@trigger.dev/sdk";
import { json, type ActionFunctionArgs } from "@vercel/remix";
-import { z } from 'zod/v3';
-
-export const config = {
- runtime: "nodejs",
-};
+import { z } from "zod/v3";
export const messagingNotifySchema = z.discriminatedUnion("type", [
z.object({
diff --git a/apps/erp/app/routes/api+/novu.ts b/apps/erp/app/routes/api+/novu.ts
index ad9f7bcc67..194a10ab51 100644
--- a/apps/erp/app/routes/api+/novu.ts
+++ b/apps/erp/app/routes/api+/novu.ts
@@ -19,8 +19,4 @@ const handler = serve({
],
});
-export const config = {
- runtime: "nodejs",
-};
-
export { handler as action, handler as loader };
diff --git a/apps/erp/app/routes/api+/production.methods.$id.bom.tsx b/apps/erp/app/routes/api+/production.methods.$id.bom.tsx
index 6c4f8d24a9..b8f25341f6 100644
--- a/apps/erp/app/routes/api+/production.methods.$id.bom.tsx
+++ b/apps/erp/app/routes/api+/production.methods.$id.bom.tsx
@@ -8,10 +8,6 @@ import type { JobMethod } from "~/modules/production/types";
import { calculateTotalQuantity, generateBomIds } from "~/utils/bom";
import { makeDurations } from "~/utils/duration";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request, params }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "parts",
diff --git a/apps/erp/app/routes/api+/production.methods.$id.bom[.]csv.tsx b/apps/erp/app/routes/api+/production.methods.$id.bom[.]csv.tsx
index 9fd77c2b96..acba11e824 100644
--- a/apps/erp/app/routes/api+/production.methods.$id.bom[.]csv.tsx
+++ b/apps/erp/app/routes/api+/production.methods.$id.bom[.]csv.tsx
@@ -6,10 +6,6 @@ import { getJobMethodTree } from "~/modules/production";
import { calculateTotalQuantity, generateBomIds } from "~/utils/bom";
import { makeDurations } from "~/utils/duration";
-export const config = {
- runtime: "nodejs",
-};
-
const bomHeaders = [
"ID",
"Item ID",
diff --git a/apps/erp/app/routes/api+/quality.documents.seed.ts b/apps/erp/app/routes/api+/quality.documents.seed.ts
index 58b14a2153..97be1a60f0 100644
--- a/apps/erp/app/routes/api+/quality.documents.seed.ts
+++ b/apps/erp/app/routes/api+/quality.documents.seed.ts
@@ -4,10 +4,6 @@ import { json, type ActionFunctionArgs } from "@vercel/remix";
import template from "lodash.template";
import { documents } from "./data/quality";
-export const config = {
- runtime: "nodejs",
-};
-
function interpolateContent(
content: any,
data: { company: { name: string } }
diff --git a/apps/erp/app/routes/api+/sales.quote.line.$id.bom.tsx b/apps/erp/app/routes/api+/sales.quote.line.$id.bom.tsx
index 4f659aa105..c4bc6a5dfd 100644
--- a/apps/erp/app/routes/api+/sales.quote.line.$id.bom.tsx
+++ b/apps/erp/app/routes/api+/sales.quote.line.$id.bom.tsx
@@ -6,10 +6,6 @@ import { getQuoteMethodTrees } from "~/modules/sales";
import { calculateTotalQuantity, generateBomIds } from "~/utils/bom";
import { makeDurations } from "~/utils/duration";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request, params }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "sales",
diff --git a/apps/erp/app/routes/api+/sales.quote.line.$id.bom[.]csv.tsx b/apps/erp/app/routes/api+/sales.quote.line.$id.bom[.]csv.tsx
index d6bb6e4f93..a81446c55f 100644
--- a/apps/erp/app/routes/api+/sales.quote.line.$id.bom[.]csv.tsx
+++ b/apps/erp/app/routes/api+/sales.quote.line.$id.bom[.]csv.tsx
@@ -6,10 +6,6 @@ import { getQuoteMethodTrees } from "~/modules/sales";
import { calculateTotalQuantity, generateBomIds } from "~/utils/bom";
import { makeDurations } from "~/utils/duration";
-export const config = {
- runtime: "nodejs",
-};
-
const bomHeaders = [
"ID",
"Item ID",
diff --git a/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.ts b/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.ts
index 5091273b88..99def95db9 100644
--- a/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.ts
+++ b/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.ts
@@ -4,13 +4,9 @@ import { tasks } from "@trigger.dev/sdk";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@vercel/remix";
import { json } from "@vercel/remix";
import crypto from "crypto";
-import { z } from 'zod/v3';
+import { z } from "zod/v3";
import { getIntegration } from "~/modules/settings/settings.service";
-export const config = {
- runtime: "nodejs",
-};
-
const integrationValidator = z.object({
apiKey: z.string(),
secretKey: z.string(),
diff --git a/apps/erp/app/routes/onboarding+/_layout.tsx b/apps/erp/app/routes/onboarding+/_layout.tsx
index ee5bb42d73..3964047b56 100644
--- a/apps/erp/app/routes/onboarding+/_layout.tsx
+++ b/apps/erp/app/routes/onboarding+/_layout.tsx
@@ -12,10 +12,6 @@ import { onboardingSequence, path } from "~/utils/path";
export const shouldRevalidate: ShouldRevalidateFunction = () => true;
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {});
diff --git a/apps/erp/app/routes/onboarding+/company.tsx b/apps/erp/app/routes/onboarding+/company.tsx
index e94c4815e5..10adb4ab28 100644
--- a/apps/erp/app/routes/onboarding+/company.tsx
+++ b/apps/erp/app/routes/onboarding+/company.tsx
@@ -41,10 +41,6 @@ import {
updateCompany,
} from "~/modules/settings";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: ActionFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {});
diff --git a/apps/erp/app/routes/x+/_layout.tsx b/apps/erp/app/routes/x+/_layout.tsx
index 863feae28b..b17d77a3ea 100644
--- a/apps/erp/app/routes/x+/_layout.tsx
+++ b/apps/erp/app/routes/x+/_layout.tsx
@@ -41,10 +41,6 @@ import { ERP_URL, MES_URL, path } from "~/utils/path";
import { getSavedViews } from "~/modules/shared/shared.service";
-export const config = {
- runtime: "nodejs",
-};
-
export const shouldRevalidate: ShouldRevalidateFunction = ({
currentUrl,
defaultShouldRevalidate,
diff --git a/apps/erp/app/routes/x+/account+/_layout.tsx b/apps/erp/app/routes/x+/account+/_layout.tsx
index 4faf24412c..1571adb53b 100644
--- a/apps/erp/app/routes/x+/account+/_layout.tsx
+++ b/apps/erp/app/routes/x+/account+/_layout.tsx
@@ -14,10 +14,6 @@ export const handle: Handle = {
module: "account",
};
-export const config = {
- runtime: "nodejs",
-};
-
export default function AccountRoute() {
// const { links } = useAccountSubmodules();
diff --git a/apps/erp/app/routes/x+/accounting+/_layout.tsx b/apps/erp/app/routes/x+/accounting+/_layout.tsx
index 7d6593d0df..81d8ffd62f 100644
--- a/apps/erp/app/routes/x+/accounting+/_layout.tsx
+++ b/apps/erp/app/routes/x+/accounting+/_layout.tsx
@@ -16,10 +16,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Finance" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export const handle: Handle = {
breadcrumb: "Finance",
to: path.to.currencies,
diff --git a/apps/erp/app/routes/x+/api+/$lang.table.$id.tsx b/apps/erp/app/routes/x+/api+/$lang.table.$id.tsx
index 18bf61b2f7..1e3fcbb5a1 100644
--- a/apps/erp/app/routes/x+/api+/$lang.table.$id.tsx
+++ b/apps/erp/app/routes/x+/api+/$lang.table.$id.tsx
@@ -4,10 +4,6 @@ import { TableDocs, useSelectedLang } from "~/modules/api";
const { SUPABASE_URL } = getBrowserEnv();
-export const config = {
- runtime: "nodejs",
-};
-
export default function Route() {
const selectedLang = useSelectedLang();
const { id } = useParams();
diff --git a/apps/erp/app/routes/x+/api+/_layout.tsx b/apps/erp/app/routes/x+/api+/_layout.tsx
index aadba6015a..6e79e0b99b 100644
--- a/apps/erp/app/routes/x+/api+/_layout.tsx
+++ b/apps/erp/app/routes/x+/api+/_layout.tsx
@@ -16,10 +16,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | API Docs" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export const handle: Handle = {
breadcrumb: "API Docs",
to: path.to.apiIntroduction,
diff --git a/apps/erp/app/routes/x+/consumable+/_layout.tsx b/apps/erp/app/routes/x+/consumable+/_layout.tsx
index 2d4892cd71..ea3c4e8a06 100644
--- a/apps/erp/app/routes/x+/consumable+/_layout.tsx
+++ b/apps/erp/app/routes/x+/consumable+/_layout.tsx
@@ -16,10 +16,6 @@ export const handle: Handle = {
module: "items",
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "parts",
diff --git a/apps/erp/app/routes/x+/documents+/_layout.tsx b/apps/erp/app/routes/x+/documents+/_layout.tsx
index 89de4e3f75..69a7328b32 100644
--- a/apps/erp/app/routes/x+/documents+/_layout.tsx
+++ b/apps/erp/app/routes/x+/documents+/_layout.tsx
@@ -13,10 +13,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Documents" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export const handle: Handle = {
breadcrumb: "Documents",
to: path.to.documents,
diff --git a/apps/erp/app/routes/x+/feedback.tsx b/apps/erp/app/routes/x+/feedback.tsx
index 41a3a51420..269ff8edcd 100644
--- a/apps/erp/app/routes/x+/feedback.tsx
+++ b/apps/erp/app/routes/x+/feedback.tsx
@@ -5,10 +5,6 @@ import { getSlackClient } from "@carbon/lib/slack.server";
import { json, type ActionFunctionArgs } from "@vercel/remix";
import { feedbackValidator } from "~/modules/shared";
-export const config = {
- runtime: "nodejs",
-};
-
export async function action({ request }: ActionFunctionArgs) {
const { userId, companyId } = await requirePermissions(request, {});
diff --git a/apps/erp/app/routes/x+/inventory+/_layout.tsx b/apps/erp/app/routes/x+/inventory+/_layout.tsx
index ca0dd7bab5..8ca2b6b648 100644
--- a/apps/erp/app/routes/x+/inventory+/_layout.tsx
+++ b/apps/erp/app/routes/x+/inventory+/_layout.tsx
@@ -20,10 +20,6 @@ export const handle: Handle = {
module: "inventory",
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "inventory",
diff --git a/apps/erp/app/routes/x+/issue+/update.tsx b/apps/erp/app/routes/x+/issue+/update.tsx
index 975f124c5c..7f50d8f7b4 100644
--- a/apps/erp/app/routes/x+/issue+/update.tsx
+++ b/apps/erp/app/routes/x+/issue+/update.tsx
@@ -3,10 +3,6 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { FunctionRegion } from "@supabase/supabase-js";
import { json, type ActionFunctionArgs } from "@vercel/remix";
-export const config = {
- runtime: "nodejs",
-};
-
export async function action({ request }: ActionFunctionArgs) {
const { client, companyId, userId } = await requirePermissions(request, {
update: "quality",
diff --git a/apps/erp/app/routes/x+/issue-workflow+/_layout.tsx b/apps/erp/app/routes/x+/issue-workflow+/_layout.tsx
index 1722bff343..57c4d05ff1 100644
--- a/apps/erp/app/routes/x+/issue-workflow+/_layout.tsx
+++ b/apps/erp/app/routes/x+/issue-workflow+/_layout.tsx
@@ -7,10 +7,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Issue Workflows" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export const handle: Handle = {
breadcrumb: "Quality",
to: path.to.quality,
diff --git a/apps/erp/app/routes/x+/items+/methods+/materials.tsx b/apps/erp/app/routes/x+/items+/methods+/materials.tsx
index e211ee953d..62b88da474 100644
--- a/apps/erp/app/routes/x+/items+/methods+/materials.tsx
+++ b/apps/erp/app/routes/x+/items+/methods+/materials.tsx
@@ -16,10 +16,6 @@ export const handle: Handle = {
to: path.to.methodMaterials,
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "production",
diff --git a/apps/erp/app/routes/x+/items+/methods+/operations.tsx b/apps/erp/app/routes/x+/items+/methods+/operations.tsx
index def700623e..a422ade4f1 100644
--- a/apps/erp/app/routes/x+/items+/methods+/operations.tsx
+++ b/apps/erp/app/routes/x+/items+/methods+/operations.tsx
@@ -16,10 +16,6 @@ export const handle: Handle = {
to: path.to.methodOperations,
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "production",
diff --git a/apps/erp/app/routes/x+/job+/$jobId.configure.tsx b/apps/erp/app/routes/x+/job+/$jobId.configure.tsx
index 679cfba182..264c6dac94 100644
--- a/apps/erp/app/routes/x+/job+/$jobId.configure.tsx
+++ b/apps/erp/app/routes/x+/job+/$jobId.configure.tsx
@@ -7,10 +7,6 @@ import { redirect, type ActionFunctionArgs } from "@vercel/remix";
import { upsertJobMethod } from "~/modules/production";
import { path, requestReferrer } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export async function action({ request, params }: ActionFunctionArgs) {
const { client, companyId, userId } = await requirePermissions(request, {
update: "production",
diff --git a/apps/erp/app/routes/x+/job+/update.tsx b/apps/erp/app/routes/x+/job+/update.tsx
index 16099705c4..1d0821fdda 100644
--- a/apps/erp/app/routes/x+/job+/update.tsx
+++ b/apps/erp/app/routes/x+/job+/update.tsx
@@ -8,10 +8,6 @@ import {
upsertJobMethod,
} from "~/modules/production";
-export const config = {
- runtime: "nodejs",
-};
-
export async function action({ request }: ActionFunctionArgs) {
const { client, companyId, userId } = await requirePermissions(request, {
update: "production",
diff --git a/apps/erp/app/routes/x+/material+/$itemId.view.details.tsx b/apps/erp/app/routes/x+/material+/$itemId.view.details.tsx
index 9de00776d3..91d2a2f606 100644
--- a/apps/erp/app/routes/x+/material+/$itemId.view.details.tsx
+++ b/apps/erp/app/routes/x+/material+/$itemId.view.details.tsx
@@ -12,7 +12,6 @@ import { usePermissions, useRouteData } from "~/hooks";
import type { ItemFile, MaterialSummary } from "~/modules/items";
import { materialValidator, upsertMaterial } from "~/modules/items";
import { ItemDocuments, ItemNotes } from "~/modules/items/ui/Item";
-
import { setCustomFields } from "~/utils/form";
import { path } from "~/utils/path";
diff --git a/apps/erp/app/routes/x+/material+/_layout.tsx b/apps/erp/app/routes/x+/material+/_layout.tsx
index 36d27365fe..59076ae6d7 100644
--- a/apps/erp/app/routes/x+/material+/_layout.tsx
+++ b/apps/erp/app/routes/x+/material+/_layout.tsx
@@ -20,10 +20,6 @@ export const handle: Handle = {
module: "items",
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "parts",
diff --git a/apps/erp/app/routes/x+/part+/$itemId.manufacturing.$methodId.make.$makeMethodId.tsx b/apps/erp/app/routes/x+/part+/$itemId.manufacturing.$methodId.make.$makeMethodId.tsx
index 61fad0998f..e93e3c92e0 100644
--- a/apps/erp/app/routes/x+/part+/$itemId.manufacturing.$methodId.make.$makeMethodId.tsx
+++ b/apps/erp/app/routes/x+/part+/$itemId.manufacturing.$methodId.make.$makeMethodId.tsx
@@ -14,7 +14,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { useRouteData } from "@carbon/remix";
import { Suspense } from "react";
-import type { z } from 'zod/v3';
+import type { z } from "zod/v3";
import { CadModel } from "~/components";
import { usePermissions } from "~/hooks/usePermissions";
import type {
diff --git a/apps/erp/app/routes/x+/part+/$itemId.manufacturing.$methodId.method.tsx b/apps/erp/app/routes/x+/part+/$itemId.manufacturing.$methodId.method.tsx
index 0b9bf153cc..c5271d916f 100644
--- a/apps/erp/app/routes/x+/part+/$itemId.manufacturing.$methodId.method.tsx
+++ b/apps/erp/app/routes/x+/part+/$itemId.manufacturing.$methodId.method.tsx
@@ -8,7 +8,7 @@ import type { PostgrestResponse } from "@supabase/supabase-js";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@vercel/remix";
import { json, redirect } from "@vercel/remix";
import { Suspense } from "react";
-import type { z } from 'zod/v3';
+import type { z } from "zod/v3";
import CadModel from "~/components/CadModel";
import { usePermissions, useRouteData } from "~/hooks";
import type {
diff --git a/apps/erp/app/routes/x+/part+/$itemId.view.details.tsx b/apps/erp/app/routes/x+/part+/$itemId.view.details.tsx
index 180a22ee88..ea9ad793f1 100644
--- a/apps/erp/app/routes/x+/part+/$itemId.view.details.tsx
+++ b/apps/erp/app/routes/x+/part+/$itemId.view.details.tsx
@@ -13,7 +13,6 @@ import { usePermissions, useRouteData } from "~/hooks";
import type { ItemFile, PartSummary } from "~/modules/items";
import { partValidator, upsertPart } from "~/modules/items";
import { ItemDocuments, ItemNotes } from "~/modules/items/ui/Item";
-
import { setCustomFields } from "~/utils/form";
import { path } from "~/utils/path";
diff --git a/apps/erp/app/routes/x+/part+/new.tsx b/apps/erp/app/routes/x+/part+/new.tsx
index 73f34e2b59..93993f5566 100644
--- a/apps/erp/app/routes/x+/part+/new.tsx
+++ b/apps/erp/app/routes/x+/part+/new.tsx
@@ -12,10 +12,6 @@ import { setCustomFields } from "~/utils/form";
import type { Handle } from "~/utils/handle";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export const handle: Handle = {
breadcrumb: "Parts",
to: path.to.parts,
diff --git a/apps/erp/app/routes/x+/people+/_layout.tsx b/apps/erp/app/routes/x+/people+/_layout.tsx
index 547880e176..53db6a642e 100644
--- a/apps/erp/app/routes/x+/people+/_layout.tsx
+++ b/apps/erp/app/routes/x+/people+/_layout.tsx
@@ -18,10 +18,6 @@ export const handle: Handle = {
module: "people",
};
-export const config = {
- runtime: "nodejs",
-};
-
export default function PeopleRoute() {
const { groups } = usePeopleSubmodules();
diff --git a/apps/erp/app/routes/x+/person+/$personId.tsx b/apps/erp/app/routes/x+/person+/$personId.tsx
index f823e6ffef..578275f233 100644
--- a/apps/erp/app/routes/x+/person+/$personId.tsx
+++ b/apps/erp/app/routes/x+/person+/$personId.tsx
@@ -19,10 +19,6 @@ export const handle: Handle = {
to: path.to.people,
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request, params }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "people",
diff --git a/apps/erp/app/routes/x+/person+/_layout.tsx b/apps/erp/app/routes/x+/person+/_layout.tsx
index f6ac725d5e..af9e0a9265 100644
--- a/apps/erp/app/routes/x+/person+/_layout.tsx
+++ b/apps/erp/app/routes/x+/person+/_layout.tsx
@@ -7,10 +7,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | People" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
await requirePermissions(request, {
view: "people",
diff --git a/apps/erp/app/routes/x+/procedure+/_layout.tsx b/apps/erp/app/routes/x+/procedure+/_layout.tsx
index 494b6d857d..95151199c5 100644
--- a/apps/erp/app/routes/x+/procedure+/_layout.tsx
+++ b/apps/erp/app/routes/x+/procedure+/_layout.tsx
@@ -7,10 +7,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Procedure" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export const handle: Handle = {
breadcrumb: "Production",
to: path.to.production,
diff --git a/apps/erp/app/routes/x+/purchase-invoice+/_layout.tsx b/apps/erp/app/routes/x+/purchase-invoice+/_layout.tsx
index 426d3347b4..d97aa1b533 100644
--- a/apps/erp/app/routes/x+/purchase-invoice+/_layout.tsx
+++ b/apps/erp/app/routes/x+/purchase-invoice+/_layout.tsx
@@ -13,10 +13,6 @@ export const handle: Handle = {
module: "purchasing",
};
-export const config = {
- runtime: "nodejs",
-};
-
export default function PurchaseInvoiceRoute() {
return <Outlet />;
}
diff --git a/apps/erp/app/routes/x+/quality+/_layout.tsx b/apps/erp/app/routes/x+/quality+/_layout.tsx
index 3396c577f9..c77031c928 100644
--- a/apps/erp/app/routes/x+/quality+/_layout.tsx
+++ b/apps/erp/app/routes/x+/quality+/_layout.tsx
@@ -17,10 +17,6 @@ export const handle: Handle = {
module: "quality",
};
-export const config = {
- runtime: "nodejs",
-};
-
export default function QualityRoute() {
const { groups } = useQualitySubmodules();
diff --git a/apps/erp/app/routes/x+/quality-document+/_layout.tsx b/apps/erp/app/routes/x+/quality-document+/_layout.tsx
index 645d6f6cb7..bf64eaa81b 100644
--- a/apps/erp/app/routes/x+/quality-document+/_layout.tsx
+++ b/apps/erp/app/routes/x+/quality-document+/_layout.tsx
@@ -7,10 +7,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Quality Document" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export const handle: Handle = {
breadcrumb: "Quality",
to: path.to.quality,
diff --git a/apps/erp/app/routes/x+/quote+/$quoteId.convert.tsx b/apps/erp/app/routes/x+/quote+/$quoteId.convert.tsx
index ace52492e0..306c113076 100644
--- a/apps/erp/app/routes/x+/quote+/$quoteId.convert.tsx
+++ b/apps/erp/app/routes/x+/quote+/$quoteId.convert.tsx
@@ -11,9 +11,6 @@ import { convertQuoteToOrder, selectedLinesValidator } from "~/modules/sales";
import { path } from "~/utils/path";
// the edge function grows larger than 2MB - so this is a workaround to avoid the edge function limit
-export const config = {
- runtime: "nodejs",
-};
export async function action({ request, params }: ActionFunctionArgs) {
assertIsPost(request);
diff --git a/apps/erp/app/routes/x+/receipt+/_layout.tsx b/apps/erp/app/routes/x+/receipt+/_layout.tsx
index 725ff18184..c513f13b2b 100644
--- a/apps/erp/app/routes/x+/receipt+/_layout.tsx
+++ b/apps/erp/app/routes/x+/receipt+/_layout.tsx
@@ -7,10 +7,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Receipt" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export const handle: Handle = {
breadcrumb: "Inventory",
to: path.to.inventory,
diff --git a/apps/erp/app/routes/x+/resources+/_layout.tsx b/apps/erp/app/routes/x+/resources+/_layout.tsx
index 6b383f28eb..44512d2dde 100644
--- a/apps/erp/app/routes/x+/resources+/_layout.tsx
+++ b/apps/erp/app/routes/x+/resources+/_layout.tsx
@@ -17,10 +17,6 @@ export const handle: Handle = {
module: "resources",
};
-export const config = {
- runtime: "nodejs",
-};
-
export default function ResourcesRoute() {
const { groups } = useResourcesSubmodules();
diff --git a/apps/erp/app/routes/x+/sales-invoice+/_layout.tsx b/apps/erp/app/routes/x+/sales-invoice+/_layout.tsx
index e891ca0c32..dcfb2ba721 100644
--- a/apps/erp/app/routes/x+/sales-invoice+/_layout.tsx
+++ b/apps/erp/app/routes/x+/sales-invoice+/_layout.tsx
@@ -13,10 +13,6 @@ export const handle: Handle = {
module: "sales",
};
-export const config = {
- runtime: "nodejs",
-};
-
export default function SalesInvoiceRoute() {
return <Outlet />;
}
diff --git a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.status.tsx b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.status.tsx
index 106903ff86..14bed6acdd 100644
--- a/apps/erp/app/routes/x+/sales-rfq+/$rfqId.status.tsx
+++ b/apps/erp/app/routes/x+/sales-rfq+/$rfqId.status.tsx
@@ -10,10 +10,6 @@ import { salesRFQStatusType, updateSalesRFQStatus } from "~/modules/sales";
import { getCompanySettings } from "~/modules/settings/settings.service";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export async function action({ request, params }: ActionFunctionArgs) {
assertIsPost(request);
const { client, companyId, userId } = await requirePermissions(request, {
diff --git a/apps/erp/app/routes/x+/scheduling+/_layout.tsx b/apps/erp/app/routes/x+/scheduling+/_layout.tsx
index 94ab37d91b..449c961b94 100644
--- a/apps/erp/app/routes/x+/scheduling+/_layout.tsx
+++ b/apps/erp/app/routes/x+/scheduling+/_layout.tsx
@@ -1,9 +1,5 @@
import { Outlet } from "@remix-run/react";
-export const config = {
- runtime: "nodejs",
-};
-
export default function SchedulingRoute() {
return <Outlet />;
}
diff --git a/apps/erp/app/routes/x+/settings+/_layout.tsx b/apps/erp/app/routes/x+/settings+/_layout.tsx
index 4e837c9fec..e3004ada28 100644
--- a/apps/erp/app/routes/x+/settings+/_layout.tsx
+++ b/apps/erp/app/routes/x+/settings+/_layout.tsx
@@ -19,10 +19,6 @@ export const handle: Handle = {
module: "settings",
};
-export const config = {
- runtime: "nodejs",
-};
-
export default function SettingsRoute() {
const permissions = usePermissions();
const { groups } = useSettingsSubmodules();
diff --git a/apps/erp/app/routes/x+/shipment+/_layout.tsx b/apps/erp/app/routes/x+/shipment+/_layout.tsx
index ac8c11ed77..2423b19674 100644
--- a/apps/erp/app/routes/x+/shipment+/_layout.tsx
+++ b/apps/erp/app/routes/x+/shipment+/_layout.tsx
@@ -7,10 +7,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Shipment" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export const handle: Handle = {
breadcrumb: "Inventory",
to: path.to.inventory,
diff --git a/apps/erp/app/routes/x+/stock-transfer+/_layout.tsx b/apps/erp/app/routes/x+/stock-transfer+/_layout.tsx
index 6dba389657..91ccf3741d 100644
--- a/apps/erp/app/routes/x+/stock-transfer+/_layout.tsx
+++ b/apps/erp/app/routes/x+/stock-transfer+/_layout.tsx
@@ -7,10 +7,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Stock Transfer" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export const handle: Handle = {
breadcrumb: "Inventory",
to: path.to.inventory,
diff --git a/apps/erp/app/routes/x+/supplier-quote+/$id.convert.tsx b/apps/erp/app/routes/x+/supplier-quote+/$id.convert.tsx
index 9a902b05dc..bcb9bc6b13 100644
--- a/apps/erp/app/routes/x+/supplier-quote+/$id.convert.tsx
+++ b/apps/erp/app/routes/x+/supplier-quote+/$id.convert.tsx
@@ -14,9 +14,6 @@ import {
import { path } from "~/utils/path";
// the edge function grows larger than 2MB - so this is a workaround to avoid the edge function limit
-export const config = {
- runtime: "nodejs",
-};
export async function action({ request, params }: ActionFunctionArgs) {
assertIsPost(request);
diff --git a/apps/erp/app/routes/x+/supplier-quote+/_layout.tsx b/apps/erp/app/routes/x+/supplier-quote+/_layout.tsx
index 2a6e98a173..4cf9180ae4 100644
--- a/apps/erp/app/routes/x+/supplier-quote+/_layout.tsx
+++ b/apps/erp/app/routes/x+/supplier-quote+/_layout.tsx
@@ -14,10 +14,6 @@ export const handle: Handle = {
module: "purchasing",
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
await requirePermissions(request, {
view: "purchasing",
diff --git a/apps/erp/app/routes/x+/tool+/$itemId.manufacturing.$methodId.method.tsx b/apps/erp/app/routes/x+/tool+/$itemId.manufacturing.$methodId.method.tsx
index 3fcc69a256..2fec366996 100644
--- a/apps/erp/app/routes/x+/tool+/$itemId.manufacturing.$methodId.method.tsx
+++ b/apps/erp/app/routes/x+/tool+/$itemId.manufacturing.$methodId.method.tsx
@@ -8,7 +8,7 @@ import type { PostgrestResponse } from "@supabase/supabase-js";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@vercel/remix";
import { json, redirect } from "@vercel/remix";
import { Suspense } from "react";
-import type { z } from 'zod/v3';
+import type { z } from "zod/v3";
import CadModel from "~/components/CadModel";
import { usePermissions, useRouteData } from "~/hooks";
import {
diff --git a/apps/erp/app/routes/x+/tool+/_layout.tsx b/apps/erp/app/routes/x+/tool+/_layout.tsx
index d7d145accf..cd89999cce 100644
--- a/apps/erp/app/routes/x+/tool+/_layout.tsx
+++ b/apps/erp/app/routes/x+/tool+/_layout.tsx
@@ -16,10 +16,6 @@ export const handle: Handle = {
module: "items",
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "parts",
diff --git a/apps/erp/app/routes/x+/users+/customers.new.tsx b/apps/erp/app/routes/x+/users+/customers.new.tsx
index b4072937ae..6696e862f0 100644
--- a/apps/erp/app/routes/x+/users+/customers.new.tsx
+++ b/apps/erp/app/routes/x+/users+/customers.new.tsx
@@ -15,10 +15,6 @@ import {
import { createCustomerAccount } from "~/modules/users/users.server";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export async function action({ request }: ActionFunctionArgs) {
assertIsPost(request);
const { client, companyId, userId } = await requirePermissions(request, {
diff --git a/apps/erp/app/routes/x+/users+/employees.new.tsx b/apps/erp/app/routes/x+/users+/employees.new.tsx
index bfaa9e196c..4b8a86f8fa 100644
--- a/apps/erp/app/routes/x+/users+/employees.new.tsx
+++ b/apps/erp/app/routes/x+/users+/employees.new.tsx
@@ -23,10 +23,6 @@ import {
import { createEmployeeAccount } from "~/modules/users/users.server";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
create: "users",
diff --git a/apps/erp/app/routes/x+/users+/suppliers.new.tsx b/apps/erp/app/routes/x+/users+/suppliers.new.tsx
index 6f56cc8498..ae3d2a309b 100644
--- a/apps/erp/app/routes/x+/users+/suppliers.new.tsx
+++ b/apps/erp/app/routes/x+/users+/suppliers.new.tsx
@@ -15,10 +15,6 @@ import {
import { createSupplierAccount } from "~/modules/users/users.server";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export async function action({ request }: ActionFunctionArgs) {
assertIsPost(request);
const { client, companyId, userId } = await requirePermissions(request, {
diff --git a/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.status.tsx b/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.status.tsx
index 709751d9c1..b50a72a225 100644
--- a/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.status.tsx
+++ b/apps/erp/app/routes/x+/warehouse-transfer+/$transferId.status.tsx
@@ -3,13 +3,12 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import type { ActionFunctionArgs } from "@vercel/remix";
import { redirect } from "@vercel/remix";
-import { warehouseTransferStatusType, updateWarehouseTransferStatus } from "~/modules/inventory";
+import {
+ warehouseTransferStatusType,
+ updateWarehouseTransferStatus,
+} from "~/modules/inventory";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export async function action({ request, params }: ActionFunctionArgs) {
assertIsPost(request);
const { client, userId } = await requirePermissions(request, {
@@ -20,7 +19,9 @@ export async function action({ request, params }: ActionFunctionArgs) {
if (!id) throw new Error("Could not find id");
const formData = await request.formData();
- const status = formData.get("status") as (typeof warehouseTransferStatusType)[number];
+ const status = formData.get(
+ "status"
+ ) as (typeof warehouseTransferStatusType)[number];
if (!status || !warehouseTransferStatusType.includes(status)) {
throw redirect(
@@ -29,12 +30,20 @@ export async function action({ request, params }: ActionFunctionArgs) {
);
}
- const update = await updateWarehouseTransferStatus(client, id, status, userId);
+ const update = await updateWarehouseTransferStatus(
+ client,
+ id,
+ status,
+ userId
+ );
if (update.error) {
throw redirect(
path.to.warehouseTransfer(id),
- await flash(request, error(update.error, "Failed to update warehouse transfer status"))
+ await flash(
+ request,
+ error(update.error, "Failed to update warehouse transfer status")
+ )
);
}
@@ -42,4 +51,4 @@ export async function action({ request, params }: ActionFunctionArgs) {
path.to.warehouseTransfer(id),
await flash(request, success("Updated warehouse transfer status"))
);
-}
\ No newline at end of file
+}
diff --git a/apps/erp/app/routes/x+/warehouse-transfer+/_layout.tsx b/apps/erp/app/routes/x+/warehouse-transfer+/_layout.tsx
index 20649e8d30..9a06da7e8c 100644
--- a/apps/erp/app/routes/x+/warehouse-transfer+/_layout.tsx
+++ b/apps/erp/app/routes/x+/warehouse-transfer+/_layout.tsx
@@ -7,10 +7,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Warehouse Transfer" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export const handle: Handle = {
breadcrumb: "Inventory",
to: path.to.inventory,
diff --git a/apps/mes/app/root.tsx b/apps/mes/app/root.tsx
index 127633034a..caad5deb9d 100644
--- a/apps/mes/app/root.tsx
+++ b/apps/mes/app/root.tsx
@@ -26,12 +26,9 @@ import { getMode, setMode } from "~/services/mode.server";
import Background from "~/styles/background.css?url";
import NProgress from "~/styles/nprogress.css?url";
import Tailwind from "~/styles/tailwind.css?url";
-
import { useMode } from "@carbon/remix";
import { getTheme } from "./services/theme.server";
-export const config = { runtime: "edge", regions: ["iad1"] };
-
export function links() {
return [
{ rel: "stylesheet", href: Tailwind },
diff --git a/apps/mes/app/routes/_public+/callback.tsx b/apps/mes/app/routes/_public+/callback.tsx
index 3a7dce3e59..d1a66c5182 100644
--- a/apps/mes/app/routes/_public+/callback.tsx
+++ b/apps/mes/app/routes/_public+/callback.tsx
@@ -33,10 +33,6 @@ import {
import { LuTriangleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
diff --git a/apps/mes/app/routes/_public+/login.tsx b/apps/mes/app/routes/_public+/login.tsx
index 8fec5ef0c3..7c802bbc78 100644
--- a/apps/mes/app/routes/_public+/login.tsx
+++ b/apps/mes/app/routes/_public+/login.tsx
@@ -40,10 +40,6 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Login" }];
};
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
if (authSession && (await verifyAuthSession(authSession))) {
diff --git a/apps/mes/app/routes/x+/_layout.tsx b/apps/mes/app/routes/x+/_layout.tsx
index f5b0c1baf8..210c708b22 100644
--- a/apps/mes/app/routes/x+/_layout.tsx
+++ b/apps/mes/app/routes/x+/_layout.tsx
@@ -33,10 +33,6 @@ import {
} from "~/services/operations.service";
import { ERP_URL, MES_URL, path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export const shouldRevalidate: ShouldRevalidateFunction = ({
currentUrl,
defaultShouldRevalidate,
diff --git a/apps/mes/app/routes/x+/feedback.tsx b/apps/mes/app/routes/x+/feedback.tsx
index 6643920f38..edbfad82a4 100644
--- a/apps/mes/app/routes/x+/feedback.tsx
+++ b/apps/mes/app/routes/x+/feedback.tsx
@@ -5,10 +5,6 @@ import { getSlackClient } from "@carbon/lib/slack.server";
import { json, type ActionFunctionArgs } from "@vercel/remix";
import { feedbackValidator } from "~/services/models";
-export const config = {
- runtime: "nodejs",
-};
-
export async function action({ request }: ActionFunctionArgs) {
const { userId, companyId } = await requirePermissions(request, {});
diff --git a/apps/starter/app/root.tsx b/apps/starter/app/root.tsx
index f2b9527fe3..bb6ec2fe00 100644
--- a/apps/starter/app/root.tsx
+++ b/apps/starter/app/root.tsx
@@ -26,12 +26,9 @@ import { getMode, setMode } from "~/services/mode.server";
import Background from "~/styles/background.css?url";
import NProgress from "~/styles/nprogress.css?url";
import Tailwind from "~/styles/tailwind.css?url";
-
import { useMode } from "@carbon/remix";
import { getTheme } from "./services/theme.server";
-export const config = { runtime: "edge", regions: ["iad1"] };
-
export function links() {
return [
{ rel: "stylesheet", href: Tailwind },
diff --git a/apps/starter/app/routes/_public+/callback.tsx b/apps/starter/app/routes/_public+/callback.tsx
index 46402e3177..94d5df0a29 100644
--- a/apps/starter/app/routes/_public+/callback.tsx
+++ b/apps/starter/app/routes/_public+/callback.tsx
@@ -31,10 +31,6 @@ import {
import { LuTriangleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
diff --git a/apps/starter/app/routes/_public+/login.tsx b/apps/starter/app/routes/_public+/login.tsx
index 5272130c3b..0159ab7121 100644
--- a/apps/starter/app/routes/_public+/login.tsx
+++ b/apps/starter/app/routes/_public+/login.tsx
@@ -32,10 +32,6 @@ import { LuCircleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
-export const config = {
- runtime: "nodejs",
-};
-
export const meta: MetaFunction = () => {
return [{ title: "Carbon | Login" }];
};