AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
fix(ci): normalize Windows ASAR paths in package audit
tianma-if95f2b8acb4c8
diff --git a/scripts/desktop-build-workflow.test.mjs b/scripts/desktop-build-workflow.test.mjsindex 497318d3..035e5d4f 100644--- a/scripts/desktop-build-workflow.test.mjs+++ b/scripts/desktop-build-workflow.test.mjs@@ -3,6 +3,7 @@ import { describe, expect, test } from "bun:test";const workflow = readFileSync(new URL("../.github/workflows/desktop-build.yml", import.meta.url), "utf8");const mobileWorkflow = readFileSync(new URL("../.github/workflows/mobile-build.yml", import.meta.url), "utf8");+const desktopPackageVerifier = readFileSync(new URL("./verify-desktop-package.mjs", import.meta.url), "utf8");function step(name) {const start = workflow.indexOf(` - name: ${name}\n`);@@ -78,5 +79,8 @@ describe("desktop release workflow", () => {expect(workflow).toContain("allow-missing-windows-signature");expect(workflow).toContain("name: Audit signed Windows update");expect(workflow).toContain("verify-windows-update-release.mjs");+ expect(desktopPackageVerifier).toContain(+ 'path.replaceAll("\\\\", "/")',+ );});});diff --git a/scripts/verify-desktop-package.mjs b/scripts/verify-desktop-package.mjsindex 4632d1e7..45f5d922 100644--- a/scripts/verify-desktop-package.mjs+++ b/scripts/verify-desktop-package.mjs@@ -25,6 +25,9 @@ const files = walk(outputDirectory);const matchingPrefix = (prefix) => files.filter((path) => basename(path).startsWith(prefix));const requestedPlatform = process.env.EDGE_EVER_VERIFY_TARGET ?? process.platform;const requestedArch = process.env.EDGE_EVER_DESKTOP_ARCH ?? process.arch;+const listAsarFiles = (asarPath) => new Set(+ listPackage(asarPath).map((path) => path.replaceAll("\\", "/")),+);const verifyMachOArch = (path, arch, label) => {const result = spawnSync("lipo", ["-archs", path], { encoding: "utf8" });@@ -72,7 +75,7 @@ if (requestedPlatform === "darwin") {verifyMachOArch(sidecar, requestedArch, "Rust sidecar");const asarPath = join(appResources, "app.asar");assert.ok(existsSync(asarPath), `macOS app bundle is missing app.asar: ${asarPath}`);- const asarFiles = new Set(listPackage(asarPath));+ const asarFiles = listAsarFiles(asarPath);assert.ok(asarFiles.has("/src/preload/index.cjs"), "macOS app bundle must contain the sandbox-compatible CommonJS preload");assert.ok(!asarFiles.has("/src/preload/index.mjs"), "macOS app bundle must not contain the unsupported ESM preload");const appIconPath = join(appResources, "icon.icns");@@ -100,7 +103,7 @@ if (requestedPlatform === "darwin") {verifyPeX64(sidecar, "Rust sidecar");const asarPath = join(resources, "app.asar");assert.ok(existsSync(asarPath), `Windows app bundle is missing app.asar: ${asarPath}`);- const asarFiles = new Set(listPackage(asarPath));+ const asarFiles = listAsarFiles(asarPath);assert.ok(asarFiles.has("/src/preload/index.cjs"), "Windows app bundle must contain the sandbox-compatible CommonJS preload");assert.ok(!asarFiles.has("/src/preload/index.mjs"), "Windows app bundle must not contain the unsupported ESM preload");} else if (requestedPlatform === "linux") {