mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 07:12:12 +03:00
fix(env-repair): replace dynamic import with static to fix prod build (#1601)
Integrated into release/v3.7.0
This commit is contained in:
7
src/app/api/system/env/repair/route.ts
vendored
7
src/app/api/system/env/repair/route.ts
vendored
@@ -7,14 +7,13 @@
|
||||
*/
|
||||
import { copyFileSync, existsSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { pathToFileURL } from "node:url";
|
||||
import { NextResponse } from "next/server";
|
||||
import { isAuthenticated } from "@/shared/utils/apiAuth";
|
||||
|
||||
const SYNC_HELPER_PATH = join(process.cwd(), "scripts/sync-env.mjs");
|
||||
// @ts-expect-error - .mjs without types
|
||||
import { getEnvSyncPlan, syncEnv } from "../../../../../../scripts/sync-env.mjs";
|
||||
|
||||
async function loadSyncHelpers() {
|
||||
return import(pathToFileURL(SYNC_HELPER_PATH).href);
|
||||
return { getEnvSyncPlan, syncEnv };
|
||||
}
|
||||
|
||||
function createEnvBackup() {
|
||||
|
||||
Reference in New Issue
Block a user