From 269787a013a76203f14dcf6b47e5badff8d76cd9 Mon Sep 17 00:00:00 2001 From: Ramnique Singh <30795890+ramnique@users.noreply.github.com> Date: Fri, 6 Feb 2026 07:09:31 +0530 Subject: [PATCH] fix electron-squirrel-startup --- apps/x/apps/main/package.json | 1 + apps/x/apps/main/src/main.ts | 3 ++- apps/x/pnpm-lock.yaml | 10 +++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/x/apps/main/package.json b/apps/x/apps/main/package.json index 836fad96..a3ef9e56 100644 --- a/apps/x/apps/main/package.json +++ b/apps/x/apps/main/package.json @@ -24,6 +24,7 @@ "@electron-forge/maker-zip": "^7.10.2", "@electron-forge/publisher-github": "^7.11.1", "@electron-forge/publisher-s3": "^7.10.2", + "@types/electron-squirrel-startup": "^1.0.2", "@types/node": "^25.0.3", "electron": "^39.2.7", "esbuild": "^0.24.2" diff --git a/apps/x/apps/main/src/main.ts b/apps/x/apps/main/src/main.ts index e35a7c98..6bf82325 100644 --- a/apps/x/apps/main/src/main.ts +++ b/apps/x/apps/main/src/main.ts @@ -12,12 +12,13 @@ import { init as initGraphBuilder } from "@x/core/dist/knowledge/build_graph.js" import { init as initPreBuiltRunner } from "@x/core/dist/pre_built/runner.js"; import { init as initAgentRunner } from "@x/core/dist/agent-schedule/runner.js"; import { initConfigs } from "@x/core/dist/config/initConfigs.js"; +import started from "electron-squirrel-startup"; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); // run this as early in the main process as possible -if (require('electron-squirrel-startup')) app.quit(); +if (started) app.quit(); // Path resolution differs between development and production: const preloadPath = app.isPackaged diff --git a/apps/x/pnpm-lock.yaml b/apps/x/pnpm-lock.yaml index bd05ec61..129e92e2 100644 --- a/apps/x/pnpm-lock.yaml +++ b/apps/x/pnpm-lock.yaml @@ -78,6 +78,9 @@ importers: '@electron-forge/publisher-s3': specifier: ^7.10.2 version: 7.11.1 + '@types/electron-squirrel-startup': + specifier: ^1.0.2 + version: 1.0.2 '@types/node': specifier: ^25.0.3 version: 25.0.3 @@ -2849,6 +2852,9 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/electron-squirrel-startup@1.0.2': + resolution: {integrity: sha512-AzxnvBzNh8K/0SmxMmZtpJf1/IWoGXLP+pQDuUaVkPyotI8ryvAtBSqgxR/qOSvxWHYWrxkeNsJ+Ca5xOuUxJQ==} + '@types/eslint-scope@3.7.7': resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} @@ -6325,7 +6331,7 @@ packages: tar@6.2.1: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} - deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exhorbitant rates) by contacting i@izs.me + deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me temp@0.9.4: resolution: {integrity: sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==} @@ -10050,6 +10056,8 @@ snapshots: dependencies: '@types/ms': 2.1.0 + '@types/electron-squirrel-startup@1.0.2': {} + '@types/eslint-scope@3.7.7': dependencies: '@types/eslint': 9.6.1