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
- name: Restore pnpm node-gyp executable bit
shell: bash
run: |
PNPM_STORE="$(pnpm store path)"
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'
- name: Restore pnpm node-gyp executable bit
shell: bash
run: |
PNPM_STORE="$(pnpm store path)"
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"
},
"files": [
"out/renderer/**",
"dist-electron/**",
"package.json",
"!**/*.map"
{
"from": "out/renderer",
"to": "out/renderer",
"filter": [
"**/*",
"!**/*.map"
]
},
{
"from": "dist-electron",
"to": "dist-electron",
"filter": [
"**/*",
"!**/*.map"
]
},
{
"from": ".",
"to": ".",
"filter": [
"package.json"
]
}
],
"asar": true,
"asarUnpack": [

View file

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