fix(release): package app entry files

This commit is contained in:
777genius 2026-05-24 01:37:22 +03:00
parent cbf5356fdc
commit 6e5346094d
3 changed files with 34 additions and 15 deletions

View file

@ -46,6 +46,7 @@ jobs:
cache: pnpm cache: pnpm
- name: Restore pnpm node-gyp executable bit - name: Restore pnpm node-gyp executable bit
shell: bash
run: | run: |
PNPM_STORE="$(pnpm store path)" PNPM_STORE="$(pnpm store path)"
find "$PNPM_STORE" -path '*/node-gyp/gyp/gyp_main.py' -exec chmod +x {} \; 2>/dev/null || true find "$PNPM_STORE" -path '*/node-gyp/gyp/gyp_main.py' -exec chmod +x {} \; 2>/dev/null || true
@ -463,6 +464,7 @@ jobs:
python-version: '3.11' python-version: '3.11'
- name: Restore pnpm node-gyp executable bit - name: Restore pnpm node-gyp executable bit
shell: bash
run: | run: |
PNPM_STORE="$(pnpm store path)" PNPM_STORE="$(pnpm store path)"
find "$PNPM_STORE" -path '*/node-gyp/gyp/gyp_main.py' -exec chmod +x {} \; 2>/dev/null || true find "$PNPM_STORE" -path '*/node-gyp/gyp/gyp_main.py' -exec chmod +x {} \; 2>/dev/null || true

View file

@ -251,10 +251,29 @@
"output": "release" "output": "release"
}, },
"files": [ "files": [
"out/renderer/**", {
"dist-electron/**", "from": "out/renderer",
"package.json", "to": "out/renderer",
"!**/*.map" "filter": [
"**/*",
"!**/*.map"
]
},
{
"from": "dist-electron",
"to": "dist-electron",
"filter": [
"**/*",
"!**/*.map"
]
},
{
"from": ".",
"to": ".",
"filter": [
"package.json"
]
}
], ],
"asar": true, "asar": true,
"asarUnpack": [ "asarUnpack": [

View file

@ -1,19 +1,17 @@
type StartupIdleTask = () => void; type StartupIdleTask = () => void;
type StartupIdleDeadline = {
interface StartupIdleDeadline {
didTimeout: boolean; didTimeout: boolean;
timeRemaining: () => number; timeRemaining: () => number;
}; }
type StartupIdleCallback = (deadline: StartupIdleDeadline) => void; type StartupIdleCallback = (deadline: StartupIdleDeadline) => void;
type StartupIdleHandle = number;
export interface StartupIdleTaskScheduler { export interface StartupIdleTaskScheduler {
setTimeout: typeof setTimeout; setTimeout: typeof setTimeout;
clearTimeout: typeof clearTimeout; clearTimeout: typeof clearTimeout;
requestIdleCallback?: ( requestIdleCallback?: (callback: StartupIdleCallback, options?: { timeout?: number }) => number;
callback: StartupIdleCallback, cancelIdleCallback?: (handle: number) => void;
options?: { timeout?: number }
) => StartupIdleHandle;
cancelIdleCallback?: (handle: StartupIdleHandle) => void;
} }
export interface StartupIdleTaskOptions { export interface StartupIdleTaskOptions {
@ -34,8 +32,8 @@ function getDefaultStartupIdleTaskScheduler(): StartupIdleTaskScheduler {
}); });
return { return {
setTimeout: timerHost.setTimeout.bind(timerHost) as typeof setTimeout, setTimeout: timerHost.setTimeout.bind(timerHost),
clearTimeout: timerHost.clearTimeout.bind(timerHost) as typeof clearTimeout, clearTimeout: timerHost.clearTimeout.bind(timerHost),
requestIdleCallback: idleWindow?.requestIdleCallback?.bind(idleWindow), requestIdleCallback: idleWindow?.requestIdleCallback?.bind(idleWindow),
cancelIdleCallback: idleWindow?.cancelIdleCallback?.bind(idleWindow), cancelIdleCallback: idleWindow?.cancelIdleCallback?.bind(idleWindow),
}; };
@ -51,7 +49,7 @@ export function scheduleStartupIdleTask(
let cancelled = false; let cancelled = false;
let ran = false; let ran = false;
let delayTimer: ReturnType<typeof setTimeout> | null = null; let delayTimer: ReturnType<typeof setTimeout> | null = null;
let idleHandle: StartupIdleHandle | null = null; let idleHandle: number | null = null;
const runOnce = (): void => { const runOnce = (): void => {
if (cancelled || ran) { if (cancelled || ran) {