refactor: split renderer ipc and unraid domains
This commit is contained in:
+11
-7
@@ -313,13 +313,17 @@ if (
|
||||
)
|
||||
throw new Error("PowerShell update helper must start directly with param(.");
|
||||
|
||||
const renderer = await readFile(path.join(root, "src/renderer/app.js"), "utf8");
|
||||
const renderer = (await Promise.all(["app.js", "views.js", "dialogs.js", "operations.js", "actions/shell.js", "actions/inventory.js", "actions/deployment-profile.js", "actions/deployment-operation.js", "actions/setup-and-settings.js", "actions/recovery.js", "actions/command.js", "events.js"].map((file) =>
|
||||
readFile(path.join(root, "src/renderer", file), "utf8"),
|
||||
))).join("\n");
|
||||
const styles = await readFile(
|
||||
path.join(root, "src/renderer/styles.css"),
|
||||
"utf8",
|
||||
);
|
||||
const preload = await readFile(path.join(root, "preload.cjs"), "utf8");
|
||||
const ipc = await readFile(path.join(root, "src/main/ipc.cjs"), "utf8");
|
||||
const ipc = (await Promise.all(["ipc.cjs", "ipc/repository-handlers.cjs", "ipc/deployment-handlers.cjs", "ipc/operations-handlers.cjs"].map((file) =>
|
||||
readFile(path.join(root, "src/main", file), "utf8"),
|
||||
))).join("\n");
|
||||
for (const phrase of [
|
||||
'data-action="commit-push"',
|
||||
"checkForUpdates",
|
||||
@@ -434,7 +438,10 @@ const configSource = await readFile(path.join(root, "src/main/config-store.cjs")
|
||||
for (const mode of ["server-git", "push-bundle", "monitor-only"]) {
|
||||
if (!configSource.includes(mode)) throw new Error(`Deployment configuration is missing mode: ${mode}`);
|
||||
}
|
||||
const unraidDirectSource = await readFile(path.join(root, "src/main/unraid-deployment-service.cjs"), "utf8");
|
||||
const unraidDirectSource = (await Promise.all([
|
||||
"unraid-deployment-service.cjs", "unraid-access-methods.cjs", "unraid-preflight-methods.cjs",
|
||||
"unraid-runtime-methods.cjs", "unraid-deployment-methods.cjs", "unraid-inventory-methods.cjs", "unraid-state-methods.cjs",
|
||||
].map((file) => readFile(path.join(root, "src/main", file), "utf8")))).join("\n");
|
||||
for (const requiredPhrase of [
|
||||
"executePushBundle",
|
||||
"executeServerGitBundle",
|
||||
@@ -462,10 +469,7 @@ const gitSource = await readFile(
|
||||
path.join(root, "src/main/git-service.cjs"),
|
||||
"utf8",
|
||||
);
|
||||
const unraidSource = await readFile(
|
||||
path.join(root, "src/main/unraid-deployment-service.cjs"),
|
||||
"utf8",
|
||||
);
|
||||
const unraidSource = unraidDirectSource;
|
||||
const publisher = await readFile(
|
||||
path.join(root, "Publish-ForgeFlow-Release.ps1"),
|
||||
"utf8",
|
||||
|
||||
Reference in New Issue
Block a user