chore: bump version to 0.4.5 (#346)

* chore: bump version to 0.4.5 and add desktop app to README

* style: auto-format with Biome

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Dayuan Jiang
2025-12-22 10:39:28 +09:00
committed by GitHub
parent f58274bb84
commit fc5eca877a
6 changed files with 82 additions and 35 deletions

View File

@@ -6,19 +6,19 @@
const { cpSync, existsSync } = require("fs")
const path = require("path")
module.exports = async function (context) {
module.exports = async (context) => {
const appOutDir = context.appOutDir
const resourcesDir = path.join(
appOutDir,
context.packager.platform.name === "mac"
? `${context.packager.appInfo.productFilename}.app/Contents/Resources`
: "resources"
: "resources",
)
const standaloneDir = path.join(resourcesDir, "standalone")
const sourceNodeModules = path.join(
context.packager.projectDir,
"electron-standalone",
"node_modules"
"node_modules",
)
const targetNodeModules = path.join(standaloneDir, "node_modules")
@@ -29,11 +29,15 @@ module.exports = async function (context) {
console.log("[afterPack] node_modules copied successfully")
} else {
console.error("[afterPack] Source or target directory not found!")
console.error(` Source: ${sourceNodeModules} exists: ${existsSync(sourceNodeModules)}`)
console.error(` Target dir: ${standaloneDir} exists: ${existsSync(standaloneDir)}`)
console.error(
` Source: ${sourceNodeModules} exists: ${existsSync(sourceNodeModules)}`,
)
console.error(
` Target dir: ${standaloneDir} exists: ${existsSync(standaloneDir)}`,
)
throw new Error(
"[afterPack] Failed: Required directories not found. " +
"Ensure 'npm run electron:prepare' was run before building."
"Ensure 'npm run electron:prepare' was run before building.",
)
}
}