fix(build): unblock release build and settings state updates
Add targeted TypeScript annotations and module declarations to reduce type errors in open-sse services, executors, and shared utilities while temporarily disabling checking in legacy files that still need migration. Reset stale `.next/standalone` output before isolated builds so release artifacts are generated from a clean state. Update the dashboard proxy settings UI to bypass cached settings reads and immediately roll back debug mode when the PATCH request fails, which prevents stale data and inconsistent toggle state.
This commit is contained in:
@@ -104,6 +104,16 @@ export function resolveNextBuildEnv(baseEnv = process.env) {
|
||||
};
|
||||
}
|
||||
|
||||
async function resetStandaloneOutput(rootDir = projectRoot, fsImpl = fs) {
|
||||
const standaloneRoot = path.join(rootDir, ".next", "standalone");
|
||||
if (!(await exists(standaloneRoot))) return;
|
||||
|
||||
const staleStandaloneBackup = path.join(backupRoot, "standalone-stale");
|
||||
|
||||
await movePath(standaloneRoot, staleStandaloneBackup, fsImpl);
|
||||
console.log("[build-next-isolated] Moved stale standalone output out of the build path");
|
||||
}
|
||||
|
||||
export async function pruneStandaloneArtifacts(rootDir = projectRoot, fsImpl = fs) {
|
||||
const standaloneRoot = path.join(rootDir, ".next", "standalone");
|
||||
const pruneTargets = [path.join(standaloneRoot, "_tasks")];
|
||||
@@ -128,6 +138,8 @@ export async function main() {
|
||||
movedPaths.push(entry);
|
||||
}
|
||||
|
||||
await resetStandaloneOutput(projectRoot);
|
||||
|
||||
const result = await runNextBuild();
|
||||
if (result.code === 0 && (await exists(path.join(projectRoot, ".next", "standalone")))) {
|
||||
console.log("[build-next-isolated] Copying static assets for standalone server...");
|
||||
|
||||
Reference in New Issue
Block a user