Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(desktop): stabilize renderer OTA compatibility and full-release state (#19410)

Inneibb97d0527717
diff --git a/apps/desktop/package.json b/apps/desktop/package.json
index b87ec577ddb..6ca0bd63f29 100644
--- a/apps/desktop/package.json
+++ b/apps/desktop/package.json
@@ -82,6 +82,8 @@
"@lobechat/utils": "workspace:*",
"@lobehub/i18n-cli": "^1.27.0",
"@modelcontextprotocol/sdk": "^1.29.0",
+ "@sentry/electron": "7.15.0",
+ "@sentry/vite-plugin": "5.3.0",
"@t3-oss/env-core": "^0.13.11",
"@types/resolve": "^1.20.6",
"@types/semver": "^7.7.1",
@@ -112,6 +114,7 @@
"https-proxy-agent": "^7.0.6",
"i18next": "^25.10.10",
"just-diff": "^6.0.2",
+ "magic-string": "0.30.21",
"prettier": "^3.9.4",
"remark-cli": "^12.0.1",
"resolve": "^1.22.12",
diff --git a/apps/desktop/pnpm-lock.yaml b/apps/desktop/pnpm-lock.yaml
index 8ad70aa7c4f..022868cf506 100644
--- a/apps/desktop/pnpm-lock.yaml
+++ b/apps/desktop/pnpm-lock.yaml
@@ -23,7 +23,7 @@ importers:
version: 0.0.16
'@lobehub/fluent-emoji':
specifier: ^4.1.0
'@lydell/node-pty':
specifier: 1.2.0-beta.12
version: 1.2.0-beta.12
@@ -35,7 +35,7 @@ importers:
version: 2.1.0
get-windows:
specifier: ^9.3.0
+ version: 9.3.0([email protected])
node-screenshots:
specifier: ^0.2.8
version: 0.2.8
@@ -48,19 +48,19 @@ importers:
'@electron-toolkit/eslint-config-prettier':
specifier: ^3.0.0
'@electron-toolkit/eslint-config-ts':
specifier: ^3.1.0
'@electron-toolkit/preload':
specifier: ^3.0.2
+ version: 3.0.2([email protected])
'@electron-toolkit/tsconfig':
specifier: ^2.0.0
version: 2.0.0(@types/[email protected])
'@electron-toolkit/utils':
specifier: ^4.0.0
+ version: 4.0.0([email protected])
'@lobechat/chat-adapter-imessage':
specifier: workspace:*
version: link:../../packages/chat-adapter-imessage
@@ -108,10 +108,16 @@ importers:
version: link:../../packages/utils
'@lobehub/i18n-cli':
specifier: ^1.27.0
'@modelcontextprotocol/sdk':
specifier: ^1.29.0
+ version: 1.29.0([email protected])
+ '@sentry/electron':
+ specifier: 7.15.0
+ version: 7.15.0(@opentelemetry/[email protected](@opentelemetry/[email protected]))
+ '@sentry/vite-plugin':
+ specifier: 5.3.0
'@t3-oss/env-core':
specifier: ^0.13.11
@@ -132,7 +138,7 @@ importers:
version: 1.21.1([email protected])
'@vanilla-extract/vite-plugin':
specifier: ^5.2.3
consola:
specifier: ^3.4.2
version: 3.4.2
@@ -150,19 +156,19 @@ importers:
version: 0.31.10
drizzle-orm:
specifier: ^0.45.2
- version: 0.45.2
+ version: 0.45.2(@opentelemetry/[email protected])
electron:
specifier: 43.2.0
- version: 43.2.0([email protected])
+ version: 43.2.0
electron-builder:
specifier: 26.16.1
+ version: 26.16.1([email protected])
electron-store:
specifier: ^8.2.0
version: 8.2.0
electron-updater:
specifier: ^6.8.9
- version: 6.8.9([email protected])
+ version: 6.8.9
electron-window-state:
specifier: ^5.0.3
version: 5.0.3
@@ -171,7 +177,7 @@ importers:
version: 1.52.0
eslint:
specifier: 10.0.0
+ version: 10.0.0([email protected])
execa:
specifier: ^9.6.1
version: 9.6.1
@@ -192,22 +198,25 @@ importers:
version: 20.10.6
http-proxy-agent:
specifier: ^7.0.2
- version: 7.0.2([email protected])
+ version: 7.0.2
https-proxy-agent:
specifier: ^7.0.6
- version: 7.0.6([email protected])
+ version: 7.0.6
i18next:
specifier: ^25.10.10
version: 25.10.10([email protected])
just-diff:
specifier: ^6.0.2
version: 6.0.2
+ magic-string:
+ specifier: 0.30.21
+ version: 0.30.21
prettier:
specifier: ^3.9.4
version: 3.9.5
remark-cli:
specifier: ^12.0.1
+ version: 12.0.1
resolve:
specifier: ^1.22.12
version: 1.22.12
@@ -222,7 +231,7 @@ importers:
version: 6.0.1
stylelint:
specifier: ^15.11.0
+ version: 15.11.0([email protected])
superjson:
specifier: ^2.2.6
version: 2.2.6
@@ -243,7 +252,7 @@ importers:
vitest:
specifier: 5.0.0
zod:
specifier: 4.5.4
version: 4.5.4
@@ -259,7 +268,7 @@ importers:
devDependencies:
vitest:
specifier: 5.0.0
../../packages/agent-tracing:
dependencies:
@@ -278,20 +287,20 @@ importers:
devDependencies:
vitest:
specifier: 5.0.0
../../packages/chat-adapter-imessage:
dependencies:
chat:
specifier: ~4.38.0
+ version: 4.38.1([email protected])
devDependencies:
'@types/node':
specifier: ^24.13.2
version: 24.13.3
tsup:
specifier: ^8.5.1
typescript:
specifier: ^6.0.3
version: 6.0.3
@@ -306,7 +315,7 @@ importers:
version: link:../../apps/desktop/stubs/business-const
'@lobehub/ui':
specifier: ^5
query-string:
specifier: ^9.4.1
version: 9.5.1
@@ -346,7 +355,7 @@ importers:
devDependencies:
vitest:
specifier: 5.0.0
../../packages/device-gateway-client:
dependencies:
@@ -362,7 +371,7 @@ importers:
version: 8.18.1
vitest:
specifier: 5.0.0
../../packages/device-identity:
dependencies:
@@ -372,7 +381,7 @@ importers:
devDependencies:
vitest:
specifier: 5.0.0
../../packages/device-sandbox:
dependencies:
@@ -382,7 +391,7 @@ importers:
devDependencies:
vitest:
specifier: 5.0.0
../../packages/electron-client-ipc:
dependencies:
@@ -398,7 +407,7 @@ importers:
devDependencies:
electron:
specifier: ^43.2.0
- version: 43.2.0([email protected])
+ version: 43.2.0
../../packages/electron-mac-notifications:
dependencies:
@@ -417,7 +426,7 @@ importers:
dependencies:
debug:
specifier: ^4.4.3
- version: 4.4.3([email protected])
+ version: 4.4.3
devDependencies:
'@types/debug':
specifier: ^4.1.13
@@ -446,7 +455,7 @@ importers:
version: 2.0.0
debug:
specifier: ^4.4.3
- version: 4.4.3([email protected])
+ version: 4.4.3
mammoth:
specifier: ^1.12.0
version: 1.12.0
@@ -480,7 +489,7 @@ importers:
dependencies:
'@anthropic-ai/claude-agent-sdk':
specifier: 0.3.204
+ version: 0.3.204(@anthropic-ai/[email protected]([email protected]))(@modelcontextprotocol/[email protected]([email protected]))([email protected])
'@anthropic-ai/sdk':
specifier: ^0.93.0
version: 0.93.0([email protected])
@@ -495,10 +504,10 @@ importers:
version: link:../utils
'@lobehub/icons':
specifier: ^5.15.0
'@modelcontextprotocol/sdk':
specifier: ^1.29.0
+ version: 1.29.0([email protected])
diff:
specifier: ^8.0.4
version: 8.0.4
@@ -537,7 +546,7 @@ importers:
version: link:../file-loaders
debug:
specifier: ^4.4.3
- version: 4.4.3([email protected])
+ version: 4.4.3
diff:
specifier: ^8.0.4
version: 8.0.4
@@ -600,7 +609,7 @@ importers:
devDependencies:
vitest:
specifier: 5.0.0
../../packages/tool-runtime:
dependencies:
@@ -619,13 +628,13 @@ importers:
dependencies:
'@lobehub/market-sdk':
specifier: 0.41.0
+ version: 0.41.0([email protected])
'@lobehub/market-types':
specifier: ^1.17.1
version: 1.17.1
'@lobehub/ui':
specifier: ^5
ajv:
specifier: ^8.20.0
version: 8.20.0
@@ -673,7 +682,7 @@ importers:
version: 1.11.23
debug:
specifier: ^4.4.3
- version: 4.4.3([email protected])
+ version: 4.4.3
dompurify:
specifier: ^3.4.11
version: 3.4.15
@@ -685,7 +694,7 @@ importers:
version: 3.1.3
file-type:
specifier: ^21.3.4
- version: 21.3.4([email protected])
+ version: 21.3.4
mime:
specifier: ^4.1.0
version: 4.1.0
@@ -703,10 +712,10 @@ importers:
version: 7.0.1
remark:
specifier: ^15.0.1
- version: 15.0.1([email protected])
+ version: 15.0.1
remark-gfm:
specifier: ^4.0.1
- version: 4.0.1([email protected])
+ version: 4.0.1
remark-html:
specifier: ^16.0.1
version: 16.0.1
@@ -728,7 +737,7 @@ importers:
devDependencies:
vitest-canvas-mock:
specifier: ^1.1.4
../cli:
dependencies:
@@ -795,7 +804,7 @@ importers:
version: 1.11.23
debug:
specifier: ^4.4.3
- version: 4.4.3([email protected])
+ version: 4.4.3
diff:
specifier: ^8.0.4
version: 8.0.4
@@ -945,6 +954,17 @@ packages:
zod:
optional: true
+ '@apm-js-collab/[email protected]':
+ resolution: {integrity: sha512-YxLBY5nGlurL7QeJLq6e5g0ouBpAp0pwgyA/5rHXEXwhiPLn9ZHbT+Y2LlP90GT872cSocfjWRYu/fnpuBudNQ==}
+ engines: {node: '>=18.0.0'}
+
+ '@apm-js-collab/[email protected]':
+ resolution: {integrity: sha512-XmXYVs8CzJ1Aj79noVbn2weUO/XWtRyURpGqx7aU7DOXlUQhR0WKOQNF0okh7PCeY37vxf7kU3v57OAkEPm3ww==}
+ hasBin: true
+
+ '@apm-js-collab/[email protected]':
+ resolution: {integrity: sha512-w2OWXR7FWrKqSziuE9+QclaZrStxO/8+OwbXM635s/zs0Eez1Qo3ivSPdB2WsaPY/iznKTytONPx/PitD7IXcA==}
+
'@auv-js/[email protected]':
resolution: {integrity: sha512-02uUXhJLgolpYeFP5Y0FPoFBCt8ZxRH0HcSIj9Ac3aXfHNJdXFWxDtiWhtVIcviW8oEPyMWJkqCl5/f3IUFB2w==}
@@ -2361,6 +2381,48 @@ packages:
resolution: {integrity: sha512-xhfYPXoV5Dy4UkY0D+v2KkwvnDfiA/8Mt3sWCGI/hM03NsYIH8ZaG6QzS9x7pje5vHZBZJ2v6VRFVTWACnqcmQ==}
engines: {node: ^16.14.0 || >=18.0.0}
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==}
+ engines: {node: '>=8.0.0'}
+
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==}
+ engines: {node: '>=8.0.0'}
+
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-7YP44XH0tV6+Mb54x2YGf84i7yi+31MBZlE8JwvozkxyTvXbSp10X7cI7YE49ChJ3shMJoBmCJF3+1QFBJctGA==}
+ engines: {node: ^18.19.0 || >=20.6.0}
+ peerDependencies:
+ '@opentelemetry/api': '>=1.0.0 <1.10.0'
+
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-MHqEX5Dk59cqVah5LiARMACku7jXSVk9iVDWOea4x3cr7VfdByeDCURK6o1lntT1JS/Tsovw01UJrBhN3/uC5w==}
+ engines: {node: ^18.19.0 || >=20.6.0}
+ peerDependencies:
+ '@opentelemetry/api': ^1.3.0
+
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-Ie7+8q8MDF4FAEQCKVMTx3ReUvxiIAgIiiW3c9JdmP8+HMcDy20puT+AHjexnExgnbvBxjQ9fjkFDWrikJ2jQA==}
+ engines: {node: ^18.19.0 || >=20.6.0}
+ peerDependencies:
+ '@opentelemetry/api': '>=1.3.0 <1.10.0'
+
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-H19x/TX/LZdqiYOjM7fqtSxwlplC5pgelavqbQdHbhdq0q/AI/TGkM2dfGuuynTXmJPeF2HoZVoPDu+TGoW78A==}
+ engines: {node: ^18.19.0 || >=20.6.0}
+ peerDependencies:
+ '@opentelemetry/api': '>=1.3.0 <1.10.0'
+
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-fFnTqGm8/G73GQVnxYi7LXa1ZVYEUvgL6XI1LpvV0bPC7WQ/ZGgKxCSl8FnlZBKto9JHHEFTO6s6CUpvvtwFrA==}
+ engines: {node: ^18.19.0 || >=20.6.0}
+ peerDependencies:
+ '@opentelemetry/api': '>=1.3.0 <1.10.0'
+
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg==}
+ engines: {node: '>=14'}
+
'@oxc-project/[email protected]':
resolution: {integrity: sha512-aIYXQBo4lCbO4z0R3FHeucQHpF46l2LbMdxRvqvuRuW2OxdnSkcng5B8+K12spgLDj93rtN3+J2Vac/TIO+ciQ==}
@@ -3281,6 +3343,152 @@ packages:
'@sec-ant/[email protected]':
resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==}
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-p4q8gn8wcFqZGP/s2MnJCAAd8fTikaU6A0mM97RDHQgStcrYiaS0Sc5zUNfb1V+UOLPuvdEdL6MwyxfzjYJQTA==}
+ engines: {node: '>= 18'}
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-mS9HVVuWIdye9o0xUGFmzNOBqktF4n5kugrF8NCOYYDrr5ZV8Cx7BlquHQn5UpCeViVhZtcDlEm4iOK7++Px7A==}
+ engines: {node: '>=18'}
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-uJi0yPssB3Nt/cZ8/S8opW42gaM59/6IyNtPFYD7C0ciudi/nIo5QMVpCYBBI3jnKFOIQLlsMT4pDlOLuxxNuQ==}
+ engines: {node: '>=18'}
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-L5T60sWdAI3qWwdg3Ptwek/0TY59PERrxyqp4XMUkroayQvGd9r5dIW9Q1kSeXX9iJ442nXbFZKAOyCKV4Z13Q==}
+ engines: {node: '>= 18'}
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-udAVvcyfNa0R+95GvPz/+43/N3TC0TYKdkQ7D7jhPSzbcMc7l2fxRNN5yB3UpCA5fWFnW4toeaqwDBhb/Wh3LA==}
+ engines: {node: '>=10'}
+ os: [darwin]
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-q8mEcNNmeXMy5i+jWT30TVpH7LcP4HD21CD5XRSPAd/a912HF6EpK0ybf/1USO14WOhoXbAGi9txwaWabSe33g==}
+ engines: {node: '>=10'}
+ cpu: [arm64]
+ os: [linux, freebsd, android]
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-pD0LAt5PcUzAinBwvDqc66x9+2CabHEv486yP0gRjWO7SakbaxmfVq/EXd8VLq/Tzi39LAu422UYK1lpW3MILw==}
+ engines: {node: '>=10'}
+ cpu: [arm]
+ os: [linux, freebsd, android]
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-q8vNJi1eOV/4vxAFWBsEwLHoSYapaZHIf4j76KJGJXFKTkEbsjCOOsKbwUIBTQQhRgV4DFWh3ryfsPS/que4Kg==}
+ engines: {node: '>=10'}
+ cpu: [x86, ia32]
+ os: [linux, freebsd, android]
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-DZu956Mhi3ZRjTBe1WdbGV46ldVbA8d2rgp/fh51GsI25zjBHah4wZnPTSzpc+YqxU6pJpg579B/r3jrIK530Q==}
+ engines: {node: '>=10'}
+ cpu: [x64]
+ os: [linux, freebsd, android]
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-nj0Ff/kmAB73EPDhR8B4O9r+NUHK5GkPCkGWC+kXVemqAJWL5jcJ5KdxG0l/S0z6RoEoltID8/43/B+TaMlT7A==}
+ engines: {node: '>=10'}
+ cpu: [arm64]
+ os: [win32]
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-WNZiDzPbgsEMQWq4avsQ391v/xWKJDIWWWo9GYl+N/w5qcYKkoDW7wQG7T9FasI6ENn68phChTOAPXXxbfAdOg==}
+ engines: {node: '>=10'}
+ cpu: [x86, ia32]
+ os: [win32]
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-R35WJ17oF4D2eqI1DR2sQQqr0fjRTt5xoP16WrTu91XM2lndRMFsnjh+/GttbxapLCBNlrjzia99MJ0PZHZpgA==}
+ engines: {node: '>=10'}
+ cpu: [x64]
+ os: [win32]
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-baBcNPLLfUi9WuL+Tpri9BFaAdvugZIKelC5X0tt0Zdy+K0K+PCVSrnNmwMWU/HyaF/SEv6b6UHnXIdqanBlcg==}
+ engines: {node: '>= 10'}
+ hasBin: true
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-z1JQrl/1SLY+8wpzvork6vl+fpsg/oCCxM7HWWhUnI/R+OGNyoIzieQuggX3uUMY7NBtp8UWCQx6FeFazzOF9g==}
+ engines: {node: '>=14'}
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-tV69fMg2sS5DUFmQSnS7Jd5qJAp0izxwcsvBVz2ieTM9VMRi99IfOSYW9UYr3p1yfuksk41kefN5PEbeedUE+A==}
+ engines: {node: '>=18'}
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-hx3HoTb9mbAlbr+NQG3yrG9Nrk579sYBXM5K32LumQ+PmgHdvaiw8cHu/gi0dDT75jECCdqPZyZ2KXFbRwErtw==}
+ peerDependencies:
+ '@sentry/node-native': 10.62.0
+ peerDependenciesMeta:
+ '@sentry/node-native':
+ optional: true
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-d0BVjJVny6qpBgGJgWL0fbcoQHjtD3z3R8EK/KzTS3RO92JX5n3A536n5D/rh0gZFgcIwiUzBXegmyPOSQn9ng==}
+ engines: {node: '>=18'}
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-V7rDgbxViiHU0OpcFEDp3l41IFvWTasKHfXw8SQ6yIgtZ8VpFqmz2TR5N7X85iIOmWIvK5HV0yp0eDdsly0+rA==}
+ engines: {node: '>=18'}
+ peerDependencies:
+ '@opentelemetry/api': ^1.9.0
+ '@opentelemetry/core': ^1.30.1 || ^2.1.0
+ '@opentelemetry/exporter-trace-otlp-http': '>=0.57.0 <1'
+ '@opentelemetry/instrumentation': '>=0.57.1 <1'
+ '@opentelemetry/sdk-trace-base': ^1.30.1 || ^2.1.0
+ peerDependenciesMeta:
+ '@opentelemetry/api':
+ optional: true
+ '@opentelemetry/core':
+ optional: true
+ '@opentelemetry/exporter-trace-otlp-http':
+ optional: true
+ '@opentelemetry/instrumentation':
+ optional: true
+ '@opentelemetry/sdk-trace-base':
+ optional: true
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-4hoU67bJY0o3irEDMZu2UIztAOsvEqFkLXA7EUKl1LXMA3Ba1Lb32OUVqlsTypiEInSDs/BtM+aAFKojZ3P3Fw==}
+ engines: {node: '>=18'}
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-nFwBgtjfwgY8P5lAuQFWfAsQW1MXxuQ6kR/HtBs+A6julqwGGS2QnQ65OCWMzz6IqDEL/pRgT1405/gU+OXU3A==}
+ engines: {node: '>=18'}
+ peerDependencies:
+ '@opentelemetry/api': ^1.9.0
+ '@opentelemetry/core': ^1.30.1 || ^2.1.0
+ '@opentelemetry/sdk-trace-base': ^1.30.1 || ^2.1.0
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-CzPAxmpe5US/ABGA1TzpjFKOFZN5uqlzrRh/uM9/daVuzLVKIAQ0XRNxo/PPEXvlDm/PoMdI5L0qIODuIKnyyw==}
+ engines: {node: '>=18'}
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-rWp4hBhZOmdQhisxcKzAwTGiRk/LvWnNaElWe7nbRhjsM/usp2095yfjq4iJ47v9MtO7xxY6eUz++fLBycqXKg==}
+ engines: {node: '>=18'}
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-hgPGPYdQJ/G1cGYOxAb7d4z3V+/k/E5/P/5TFPEEBLuIbFFk+JG0CISUDJdzXJjO382Lb99PBJuXGbueBmO79w==}
+ engines: {node: '>= 18'}
+ peerDependencies:
+ rollup: '>=3.2.0'
+ peerDependenciesMeta:
+ rollup:
+ optional: true
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-S5szsj6kKBhxw97b2HA98fYp/PpWXvSizlisEzb2rnL4IH6RAJ8wP05/fnth8pSywTH+gtUu+i6Wn8e8rX5HvA==}
+ engines: {node: '>=18'}
+
+ '@sentry/[email protected]':
+ resolution: {integrity: sha512-qcoSzo4n2MulVQ70UUPLq6dTleb2a2HwL2wuwvAgWhPChrYTuk6A6mDg6aQb9fairPAwFPiU9PzOANpoDJcz1A==}
+ engines: {node: '>= 18'}
+
'@shikijs/[email protected]':
resolution: {integrity: sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA==}
@@ -4263,6 +4471,9 @@ packages:
resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-Ca8swihM+/4yKecYHY52kgJd300hi2lADU/a1RxNTRe+RJ9jvqQlESpbz9DnG9mowez8qwXHB8qYdIUw9e+F5Q==}
+
resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==}
@@ -5056,6 +5267,9 @@ packages:
resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==}
+ resolution: {integrity: sha512-BuIB67FngDSyQ/dpQNOZybwdEBDUGJQvOqwWr4ha/ufYiqzuEwPkKO2zLhRAgay28tStRIHUeWmszZAJo3GCOg==}
+
resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==}
engines: {node: '>= 0.4'}
@@ -5549,6 +5763,10 @@ packages:
deprecated: Old versions of glob 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 [email protected]
hasBin: true
+ resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==}
+ engines: {node: 18 || 20 || >=22}
+
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
deprecated: Old versions of glob 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 [email protected]
@@ -5789,6 +6007,10 @@ packages:
resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==}
engines: {node: '>=6'}
+ resolution: {integrity: sha512-O6wo8l0lhBuytKz3x8S65TvacFtoopji+gCVeEBbjCaRy75gkk4bCBQoVmY7OEZ63cbFK+yf77pDCTWaadV7hQ==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==}
engines: {node: '>=8'}
@@ -6320,6 +6542,10 @@ packages:
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
+ resolution: {integrity: sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==}
+ engines: {node: 20 || >=22}
+
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
@@ -6491,6 +6717,10 @@ packages:
resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
engines: {node: '>= 8'}
+ resolution: {integrity: sha512-Sz8FzjzI0kN13GK/6MVEsVzMZEPvOhnmmI1lU5+/1cGOiK3QUahntrNNtdVeihrO7t9JpoH75iMNXg6R6uWflQ==}
+ engines: {node: '>=18.0.0'}
+
resolution: {integrity: sha512-Jo9N377Wb4MSnHFPTbLi2SxFpsQl4eVHoxnW5U1Md9EazvgMp3s+4ohDxr81YNTgbn5Kj7HJ3yslrSJ52kwpbA==}
@@ -6735,6 +6965,9 @@ packages:
resolution: {integrity: sha512-sEKPVl2rM+MNVkGQt3ChdmD8YsigmXdn5NifZn6jiwn9LRJpWm8F3guhaqrJT/JOat6pwpbXEk6kv+b9DMIjsQ==}
+ resolution: {integrity: sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==}
+
resolution: {integrity: sha512-i/+ZKXMDf6aqYtBhuOcej71YSlbjT3wCO/4H1j8rPvxDJEifdwgg5MaFyu6iYAT8GBZJg2z0dkgK4YMzvURALQ==}
@@ -7139,6 +7372,10 @@ packages:
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
engines: {node: '>=16 || 14 >=14.18'}
+ resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==}
+ engines: {node: 18 || 20 || >=22}
+
resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==}
@@ -7323,6 +7560,9 @@ packages:
resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}
engines: {node: '>= 0.10'}
+ resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
+
resolution: {integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==}
@@ -7687,6 +7927,10 @@ packages:
resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}
engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==}
+ engines: {node: '>=9.3.0 || >=8.10.0 <9.0.0'}
+
resolution: {integrity: sha512-oyrU88skkMtDdauHDuKVrgR+zuItqr6/c//FXzvmxRGMexSDc6hNvJInGW3LL46n+8b50RykrvwSUIIQH2LQ5A==}
@@ -7832,6 +8076,9 @@ packages:
resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==}
engines: {node: '>=4'}
+ resolution: {integrity: sha512-xXR3KGeoxTNWPD4aBvL5NUpMTT7WMANr3EWnaS190QVkY52lqqcVRD7Q05UVbBhiWDGWMlJEUam9m7uFFGVScw==}
+
resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==}
@@ -9083,10 +9330,10 @@ snapshots:
'@anthropic-ai/[email protected]':
optional: true
dependencies:
'@anthropic-ai/sdk': 0.93.0([email protected])
- '@modelcontextprotocol/sdk': 1.29.0([email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.29.0([email protected])
zod: 4.5.4
optionalDependencies:
'@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.204
@@ -9111,6 +9358,30 @@ snapshots:
optionalDependencies:
zod: 4.5.4
+ '@apm-js-collab/[email protected]':
+ dependencies:
+ '@apm-js-collab/code-transformer': 0.15.0
+ es-module-lexer: 2.3.2
+ magic-string: 0.30.21
+ module-details-from-path: 1.0.4
+
+ '@apm-js-collab/[email protected]':
+ dependencies:
+ '@types/estree': 1.0.9
+ astring: 1.9.0
+ esquery: 1.7.0
+ meriyah: 6.1.4
+ semifies: 1.0.0
+ source-map: 0.6.1
+
+ '@apm-js-collab/[email protected]':
+ dependencies:
+ '@apm-js-collab/code-transformer': 0.15.0
+ debug: 4.4.3
+ module-details-from-path: 1.0.4
+ transitivePeerDependencies:
+ - supports-color
+
'@auv-js/[email protected]': {}
'@auv-js/[email protected]':
@@ -9155,20 +9426,20 @@ snapshots:
'@babel/[email protected]': {}
+ '@babel/[email protected]':
dependencies:
'@babel/code-frame': 7.29.7
'@babel/generator': 7.29.7
'@babel/helper-compilation-targets': 7.29.7
- '@babel/helper-module-transforms': 7.29.7(@babel/[email protected]([email protected]))([email protected])
+ '@babel/helper-module-transforms': 7.29.7(@babel/[email protected])
'@babel/helpers': 7.29.7
'@babel/parser': 7.29.7
'@babel/template': 7.29.7
- '@babel/traverse': 7.29.7([email protected])
+ '@babel/traverse': 7.29.7
'@babel/types': 7.29.7
'@jridgewell/remapping': 2.3.5
convert-source-map: 2.0.0
- debug: 4.4.3([email protected])
+ debug: 4.4.3
gensync: 1.0.0-beta.2
json5: 2.2.3
semver: 6.3.1
@@ -9202,19 +9473,19 @@ snapshots:
'@babel/[email protected]': {}
+ '@babel/[email protected]':
dependencies:
- '@babel/traverse': 7.29.7([email protected])
+ '@babel/traverse': 7.29.7
'@babel/types': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
- '@babel/core': 7.29.7([email protected])
- '@babel/helper-module-imports': 7.29.7([email protected])
+ '@babel/core': 7.29.7
+ '@babel/helper-module-imports': 7.29.7
'@babel/helper-validator-identifier': 7.29.7
- '@babel/traverse': 7.29.7([email protected])
+ '@babel/traverse': 7.29.7
transitivePeerDependencies:
- supports-color
@@ -9249,9 +9520,9 @@ snapshots:
dependencies:
'@babel/types': 8.0.4
dependencies:
- '@babel/core': 7.29.7([email protected])
+ '@babel/core': 7.29.7
'@babel/helper-plugin-utils': 7.29.7
'@babel/[email protected]': {}
@@ -9264,7 +9535,7 @@ snapshots:
'@babel/parser': 7.29.7
'@babel/types': 7.29.7
+ '@babel/[email protected]':
dependencies:
'@babel/code-frame': 7.29.7
'@babel/generator': 7.29.7
@@ -9272,7 +9543,7 @@ snapshots:
'@babel/parser': 7.29.7
'@babel/template': 7.29.7
'@babel/types': 7.29.7
- debug: 4.4.3([email protected])
+ debug: 4.4.3
transitivePeerDependencies:
- supports-color
@@ -9398,37 +9669,37 @@ snapshots:
'@electron-internal/[email protected]': {}
dependencies:
- eslint-config-prettier: 10.1.8([email protected]([email protected])([email protected]))
+ eslint: 10.0.0([email protected])
+ eslint-config-prettier: 10.1.8([email protected]([email protected]))
prettier: 3.9.5
transitivePeerDependencies:
- '@types/eslint'
dependencies:
'@eslint/js': 9.39.4
+ eslint: 10.0.0([email protected])
globals: 16.5.0
optionalDependencies:
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
+ '@electron-toolkit/[email protected]([email protected])':
dependencies:
- electron: 43.2.0([email protected])
+ electron: 43.2.0
'@electron-toolkit/[email protected](@types/[email protected])':
dependencies:
'@types/node': 24.13.3
+ '@electron-toolkit/[email protected]([email protected])':
dependencies:
- electron: 43.2.0([email protected])
+ electron: 43.2.0
'@electron/[email protected]':
dependencies:
@@ -9442,45 +9713,45 @@ snapshots:
fs-extra: 9.1.0
minimist: 1.2.8
+ '@electron/[email protected]':
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
env-paths: 2.2.1
fs-extra: 8.1.0
got: 11.8.6
progress: 2.0.3
semver: 6.3.1
- sumchecker: 3.0.1([email protected])
+ sumchecker: 3.0.1
optionalDependencies:
global-agent: 3.0.0
transitivePeerDependencies:
- supports-color
+ '@electron/[email protected]':
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
env-paths: 3.0.0
graceful-fs: 4.2.11
progress: 2.0.3
semver: 7.8.5
- sumchecker: 3.0.1([email protected])
+ sumchecker: 3.0.1
optionalDependencies:
undici: 7.28.0
transitivePeerDependencies:
- supports-color
+ '@electron/[email protected]':
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
fs-extra: 9.1.0
promise-retry: 2.0.1
transitivePeerDependencies:
- supports-color
+ '@electron/[email protected]':
dependencies:
compare-version: 0.1.2
- debug: 4.4.3([email protected])
+ debug: 4.4.3
fs-extra: 10.1.0
isbinaryfile: 4.0.10
minimist: 1.2.8
@@ -9488,22 +9759,22 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@electron/[email protected]':
dependencies:
'@malept/cross-spawn-promise': 2.0.0
- debug: 4.4.3([email protected])
+ debug: 4.4.3
node-abi: 4.33.0
node-api-version: 0.2.1
node-gyp: 12.4.0
- read-binary-file-arch: 1.0.6([email protected])
+ read-binary-file-arch: 1.0.6
transitivePeerDependencies:
- supports-color
+ '@electron/[email protected]':
dependencies:
'@electron/asar': 3.4.1
'@malept/cross-spawn-promise': 2.0.0
- debug: 4.4.3([email protected])
+ debug: 4.4.3
dir-compare: 4.2.0
fs-extra: 11.4.0
minimatch: 9.0.9
@@ -9511,10 +9782,10 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@electron/[email protected]':
dependencies:
cross-dirname: 0.1.0
- debug: 4.4.3([email protected])
+ debug: 4.4.3
fs-extra: 11.4.0
minimist: 1.2.8
postject: 1.0.0-alpha.6
@@ -9545,9 +9816,9 @@ snapshots:
emoji-mart: 5.6.0
react: 19.2.7
+ '@emotion/[email protected]':
dependencies:
- '@babel/helper-module-imports': 7.29.7([email protected])
+ '@babel/helper-module-imports': 7.29.7
'@babel/runtime': 7.29.7
'@emotion/hash': 0.9.2
'@emotion/memoize': 0.9.0
@@ -9569,9 +9840,9 @@ snapshots:
'@emotion/weak-memoize': 0.4.0
stylis: 4.2.0
+ '@emotion/[email protected]':
dependencies:
- '@emotion/babel-plugin': 11.13.5([email protected])
+ '@emotion/babel-plugin': 11.13.5
'@emotion/cache': 11.14.0
'@emotion/serialize': 1.3.3
'@emotion/sheet': 1.4.0
@@ -9589,10 +9860,10 @@ snapshots:
'@emotion/[email protected]': {}
dependencies:
'@babel/runtime': 7.29.7
- '@emotion/babel-plugin': 11.13.5([email protected])
+ '@emotion/babel-plugin': 11.13.5
'@emotion/cache': 11.14.0
'@emotion/serialize': 1.3.3
'@emotion/use-insertion-effect-with-fallbacks': 1.2.0([email protected])
@@ -9939,17 +10210,17 @@ snapshots:
'@esbuild/[email protected]':
optional: true
dependencies:
+ eslint: 10.0.0([email protected])
eslint-visitor-keys: 3.4.3
'@eslint-community/[email protected]': {}
+ '@eslint/[email protected]':
dependencies:
'@eslint/object-schema': 3.0.5
- debug: 4.4.3([email protected])
+ debug: 4.4.3
minimatch: 10.2.5
transitivePeerDependencies:
- supports-color
@@ -10105,10 +10376,10 @@ snapshots:
'@lobehub/[email protected]': {}
dependencies:
'@lobehub/emojilib': 1.0.0
emoji-regex: 10.6.0
es-toolkit: 1.52.0
lucide-react: 0.562.0([email protected])
@@ -10120,7 +10391,7 @@ snapshots:
- antd
- supports-color
dependencies:
'@lobehub/cli-ui': 1.13.0(@types/[email protected])
chalk: 5.6.2
@@ -10143,9 +10414,9 @@ snapshots:
p-map: 7.0.5
pangu: 4.0.7
react: 19.2.7
- remark-frontmatter: 5.0.0([email protected])
- remark-gfm: 4.0.1([email protected])
- remark-parse: 11.0.0([email protected])
+ remark-frontmatter: 5.0.0
+ remark-gfm: 4.0.1
+ remark-parse: 11.0.0
remark-stringify: 11.0.0
swr: 2.4.2([email protected])
unified: 11.0.5
@@ -10165,11 +10436,11 @@ snapshots:
- ws
- zod
dependencies:
es-toolkit: 1.51.0
lucide-react: 0.469.0([email protected])
polished: 4.3.1
@@ -10179,10 +10450,10 @@ snapshots:
- '@types/react'
- supports-color
dependencies:
'@lobehub/market-types': 1.17.1
- debug: 4.4.3([email protected])
+ debug: 4.4.3
jose: 6.2.4
url-join: 5.0.0
zod: 4.5.4
@@ -10193,7 +10464,7 @@ snapshots:
dependencies:
zod: 3.25.76
dependencies:
@@ -10206,9 +10477,9 @@ snapshots:
'@emotion/is-prop-valid': 1.4.0
'@floating-ui/react': 0.27.20([email protected]([email protected]))([email protected])
- '@mdx-js/mdx': 3.1.1([email protected])
+ '@mdx-js/mdx': 3.1.1
'@mdx-js/react': 3.1.1(@types/[email protected])([email protected])
'@radix-ui/react-slot': 1.3.3(@types/[email protected])([email protected])
@@ -10217,7 +10488,7 @@ snapshots:
'@splinetool/runtime': 0.9.526
chroma-js: 3.2.0
class-variance-authority: 0.7.1
clsx: 2.1.1
@@ -10225,7 +10496,7 @@ snapshots:
emoji-mart: 5.6.0
es-toolkit: 1.51.0
fast-deep-equal: 3.1.3
- hast-util-to-jsx-runtime: 2.3.6([email protected])
+ hast-util-to-jsx-runtime: 2.3.6
html-url-attributes: 3.0.1
immer: 11.1.18
katex: 0.16.47
@@ -10248,7 +10519,7 @@ snapshots:
react-dom: 19.2.7([email protected])
react-error-boundary: 6.1.3(@types/[email protected])([email protected])
- react-markdown: 10.1.0(@types/[email protected])([email protected])([email protected])
+ react-markdown: 10.1.0(@types/[email protected])([email protected])
react-merge-refs: 3.0.2([email protected])
@@ -10256,11 +10527,11 @@ snapshots:
rehype-katex: 7.0.1
rehype-raw: 7.0.0
remark-breaks: 4.0.0
- remark-gfm: 4.0.1([email protected])
+ remark-gfm: 4.0.1
remark-github: 12.0.0
- remark-math: 6.0.0([email protected])
- remark-parse: 11.0.0([email protected])
+ remark-math: 6.0.0
+ remark-parse: 11.0.0
remark-rehype: 11.1.2
remend: 1.3.0
shiki: 4.4.3
@@ -10317,19 +10588,19 @@ snapshots:
dependencies:
cross-spawn: 7.0.6
+ '@malept/[email protected]':
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
fs-extra: 9.1.0
lodash: 4.18.1
tmp-promise: 3.0.3
transitivePeerDependencies:
- supports-color
dependencies:
detect-libc: 2.1.2
- https-proxy-agent: 5.0.1([email protected])
+ https-proxy-agent: 5.0.1
make-dir: 3.1.0
node-fetch: 2.7.0([email protected])
nopt: 5.0.0
@@ -10342,7 +10613,7 @@ snapshots:
- supports-color
optional: true
+ '@mdx-js/[email protected]':
dependencies:
'@types/estree': 1.0.9
'@types/estree-jsx': 1.0.5
@@ -10354,14 +10625,14 @@ snapshots:
estree-util-is-identifier-name: 3.0.0
estree-util-scope: 1.0.1
estree-walker: 3.0.3
- hast-util-to-jsx-runtime: 2.3.6([email protected])
+ hast-util-to-jsx-runtime: 2.3.6
markdown-extensions: 2.0.0
recma-build-jsx: 1.0.0
recma-jsx: 1.0.1([email protected])
recma-stringify: 1.0.0
- rehype-recma: 1.0.0([email protected])
- remark-mdx: 3.1.1([email protected])
- remark-parse: 11.0.0([email protected])
+ rehype-recma: 1.0.0
+ remark-mdx: 3.1.1
+ remark-parse: 11.0.0
remark-rehype: 11.1.2
source-map: 0.7.6
unified: 11.0.5
@@ -10382,7 +10653,7 @@ snapshots:
dependencies:
'@chevrotain/types': 11.1.2
+ '@modelcontextprotocol/[email protected]([email protected])':
dependencies:
'@hono/node-server': 1.19.14([email protected])
ajv: 8.20.0
@@ -10392,8 +10663,8 @@ snapshots:
cross-spawn: 7.0.6
eventsource: 3.0.7
eventsource-parser: 3.1.0
- express: 5.2.1([email protected])
- express-rate-limit: 8.5.2([email protected]([email protected]))
+ express: 5.2.1
+ express-rate-limit: 8.5.2([email protected])
hono: 4.12.28
jose: 6.2.3
json-schema-typed: 8.0.2
@@ -10477,10 +10748,10 @@ snapshots:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.20.1
+ '@npmcli/[email protected]':
dependencies:
'@npmcli/map-workspaces': 3.0.6
- '@npmcli/package-json': 5.2.1([email protected])
+ '@npmcli/package-json': 5.2.1
ci-info: 4.4.0
ini: 4.1.3
nopt: 7.2.1
@@ -10490,14 +10761,14 @@ snapshots:
transitivePeerDependencies:
- bluebird
+ '@npmcli/[email protected]':
dependencies:
'@npmcli/promise-spawn': 7.0.2
ini: 4.1.3
lru-cache: 10.4.3
npm-pick-manifest: 9.1.0
proc-log: 4.2.0
- promise-inflight: 1.0.1([email protected])
+ promise-inflight: 1.0.1
promise-retry: 2.0.1
semver: 7.8.5
which: 4.0.0
@@ -10513,9 +10784,9 @@ snapshots:
'@npmcli/[email protected]': {}
+ '@npmcli/[email protected]':
dependencies:
- '@npmcli/git': 5.0.8([email protected])
+ '@npmcli/git': 5.0.8
glob: 10.5.0
hosted-git-info: 7.0.2
json-parse-even-better-errors: 3.0.2
@@ -10529,6 +10800,49 @@ snapshots:
dependencies:
which: 4.0.0
+ '@opentelemetry/[email protected]':
+ dependencies:
+ '@opentelemetry/api': 1.9.1
+
+ '@opentelemetry/[email protected]': {}
+
+ '@opentelemetry/[email protected](@opentelemetry/[email protected])':
+ dependencies:
+ '@opentelemetry/api': 1.9.1
+ '@opentelemetry/semantic-conventions': 1.43.0
+
+ '@opentelemetry/[email protected](@opentelemetry/[email protected])':
+ dependencies:
+ '@opentelemetry/api': 1.9.1
+ '@opentelemetry/api-logs': 0.214.0
+ import-in-the-middle: 3.5.0
+ require-in-the-middle: 8.0.1
+ transitivePeerDependencies:
+ - supports-color
+
+ '@opentelemetry/[email protected](@opentelemetry/[email protected])':
+ dependencies:
+ '@opentelemetry/api': 1.9.1
+ '@opentelemetry/core': 2.11.0(@opentelemetry/[email protected])
+ '@opentelemetry/semantic-conventions': 1.43.0
+
+ '@opentelemetry/[email protected](@opentelemetry/[email protected])':
+ dependencies:
+ '@opentelemetry/api': 1.9.1
+ '@opentelemetry/core': 2.11.0(@opentelemetry/[email protected])
+ '@opentelemetry/resources': 2.11.0(@opentelemetry/[email protected])
+ '@opentelemetry/sdk-trace': 2.11.0(@opentelemetry/[email protected])
+ '@opentelemetry/semantic-conventions': 1.43.0
+
+ '@opentelemetry/[email protected](@opentelemetry/[email protected])':
+ dependencies:
+ '@opentelemetry/api': 1.9.1
+ '@opentelemetry/core': 2.11.0(@opentelemetry/[email protected])
+ '@opentelemetry/resources': 2.11.0(@opentelemetry/[email protected])
+ '@opentelemetry/semantic-conventions': 1.43.0
+
+ '@opentelemetry/[email protected]': {}
+
'@oxc-project/[email protected]': {}
'@oxc-project/[email protected]': {}
@@ -11320,6 +11634,171 @@ snapshots:
'@sec-ant/[email protected]': {}
+ '@sentry/[email protected]': {}
+
+ '@sentry/[email protected]':
+ dependencies:
+ '@sentry/core': 10.62.0
+
+ '@sentry/[email protected]':
+ dependencies:
+ '@sentry/browser-utils': 10.62.0
+ '@sentry/core': 10.62.0
+ '@sentry/feedback': 10.62.0
+ '@sentry/replay': 10.62.0
+ '@sentry/replay-canvas': 10.62.0
+
+ dependencies:
+ '@babel/core': 7.29.7
+ '@sentry/babel-plugin-component-annotate': 5.3.0
+ '@sentry/cli': 2.58.6([email protected])
+ dotenv: 16.6.1
+ find-up: 5.0.0
+ glob: 13.0.6
+ magic-string: 0.30.21
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+
+ '@sentry/[email protected]':
+ optional: true
+
+ '@sentry/[email protected]':
+ optional: true
+
+ '@sentry/[email protected]':
+ optional: true
+
+ '@sentry/[email protected]':
+ optional: true
+
+ '@sentry/[email protected]':
+ optional: true
+
+ '@sentry/[email protected]':
+ optional: true
+
+ '@sentry/[email protected]':
+ optional: true
+
+ '@sentry/[email protected]':
+ optional: true
+
+ dependencies:
+ https-proxy-agent: 5.0.1
+ node-fetch: 2.7.0([email protected])
+ progress: 2.0.3
+ proxy-from-env: 1.1.0
+ which: 2.0.2
+ optionalDependencies:
+ '@sentry/cli-darwin': 2.58.6
+ '@sentry/cli-linux-arm': 2.58.6
+ '@sentry/cli-linux-arm64': 2.58.6
+ '@sentry/cli-linux-i686': 2.58.6
+ '@sentry/cli-linux-x64': 2.58.6
+ '@sentry/cli-win32-arm64': 2.58.6
+ '@sentry/cli-win32-i686': 2.58.6
+ '@sentry/cli-win32-x64': 2.58.6
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+
+ '@sentry/[email protected]': {}
+
+ '@sentry/[email protected]': {}
+
+ '@sentry/[email protected](@opentelemetry/[email protected](@opentelemetry/[email protected]))':
+ dependencies:
+ '@sentry/browser': 10.62.0
+ '@sentry/core': 10.62.0
+ '@sentry/node': 10.62.0(@opentelemetry/[email protected](@opentelemetry/[email protected]))
+ transitivePeerDependencies:
+ - '@opentelemetry/core'
+ - '@opentelemetry/exporter-trace-otlp-http'
+ - supports-color
+
+ '@sentry/[email protected]':
+ dependencies:
+ '@sentry/core': 10.62.0
+
+ '@sentry/[email protected](@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))':
+ dependencies:
+ '@sentry/conventions': 0.12.0
+ '@sentry/core': 10.62.0
+ '@sentry/opentelemetry': 10.62.0(@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))
+ import-in-the-middle: 3.5.0
+ optionalDependencies:
+ '@opentelemetry/api': 1.9.1
+ '@opentelemetry/core': 2.11.0(@opentelemetry/[email protected])
+ '@opentelemetry/instrumentation': 0.214.0(@opentelemetry/[email protected])
+ '@opentelemetry/sdk-trace-base': 2.11.0(@opentelemetry/[email protected])
+
+ '@sentry/[email protected](@opentelemetry/[email protected](@opentelemetry/[email protected]))':
+ dependencies:
+ '@opentelemetry/api': 1.9.1
+ '@opentelemetry/instrumentation': 0.214.0(@opentelemetry/[email protected])
+ '@opentelemetry/sdk-trace-base': 2.11.0(@opentelemetry/[email protected])
+ '@opentelemetry/semantic-conventions': 1.43.0
+ '@sentry/core': 10.62.0
+ '@sentry/node-core': 10.62.0(@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))
+ '@sentry/opentelemetry': 10.62.0(@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))
+ '@sentry/server-utils': 10.62.0
+ import-in-the-middle: 3.5.0
+ transitivePeerDependencies:
+ - '@opentelemetry/core'
+ - '@opentelemetry/exporter-trace-otlp-http'
+ - supports-color
+
+ '@sentry/[email protected](@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))':
+ dependencies:
+ '@opentelemetry/api': 1.9.1
+ '@opentelemetry/core': 2.11.0(@opentelemetry/[email protected])
+ '@opentelemetry/sdk-trace-base': 2.11.0(@opentelemetry/[email protected])
+ '@sentry/conventions': 0.12.0
+ '@sentry/core': 10.62.0
+
+ '@sentry/[email protected]':
+ dependencies:
+ '@sentry/core': 10.62.0
+ '@sentry/replay': 10.62.0
+
+ '@sentry/[email protected]':
+ dependencies:
+ '@sentry/browser-utils': 10.62.0
+ '@sentry/core': 10.62.0
+
+ dependencies:
+ '@sentry/bundler-plugin-core': 5.3.0([email protected])
+ magic-string: 0.30.21
+ optionalDependencies:
+ rollup: 4.62.2
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+
+ '@sentry/[email protected]':
+ dependencies:
+ '@apm-js-collab/code-transformer': 0.15.0
+ '@apm-js-collab/code-transformer-bundler-plugins': 0.5.0
+ '@apm-js-collab/tracing-hooks': 0.10.1
+ '@sentry/conventions': 0.12.0
+ '@sentry/core': 10.62.0
+ magic-string: 0.30.21
+ transitivePeerDependencies:
+ - supports-color
+
+ dependencies:
+ '@sentry/bundler-plugin-core': 5.3.0([email protected])
+ '@sentry/rollup-plugin': 5.3.0([email protected])([email protected])
+ transitivePeerDependencies:
+ - encoding
+ - rollup
+ - supports-color
+
'@shikijs/[email protected]':
dependencies:
'@shikijs/types': 3.23.0
@@ -11429,9 +11908,9 @@ snapshots:
typescript: 6.0.3
zod: 4.5.4
+ '@tokenizer/[email protected]':
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
token-types: 6.1.2
transitivePeerDependencies:
- supports-color
@@ -11692,15 +12171,15 @@ snapshots:
dependencies:
'@types/node': 24.13.3
dependencies:
'@eslint-community/regexpp': 4.12.2
+ '@typescript-eslint/parser': 8.63.0([email protected]([email protected]))([email protected])
'@typescript-eslint/scope-manager': 8.63.0
+ '@typescript-eslint/type-utils': 8.63.0([email protected]([email protected]))([email protected])
+ '@typescript-eslint/utils': 8.63.0([email protected]([email protected]))([email protected])
'@typescript-eslint/visitor-keys': 8.63.0
+ eslint: 10.0.0([email protected])
ignore: 7.0.5
natural-compare: 1.4.0
ts-api-utils: 2.5.0([email protected])
@@ -11708,23 +12187,23 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@typescript-eslint/scope-manager': 8.63.0
'@typescript-eslint/types': 8.63.0
- '@typescript-eslint/typescript-estree': 8.63.0([email protected])([email protected])
+ '@typescript-eslint/typescript-estree': 8.63.0([email protected])
'@typescript-eslint/visitor-keys': 8.63.0
- debug: 4.4.3([email protected])
+ debug: 4.4.3
+ eslint: 10.0.0([email protected])
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
+ '@typescript-eslint/[email protected]([email protected])':
dependencies:
'@typescript-eslint/tsconfig-utils': 8.63.0([email protected])
'@typescript-eslint/types': 8.63.0
- debug: 4.4.3([email protected])
+ debug: 4.4.3
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -11738,13 +12217,13 @@ snapshots:
dependencies:
typescript: 6.0.3
dependencies:
'@typescript-eslint/types': 8.63.0
- '@typescript-eslint/typescript-estree': 8.63.0([email protected])([email protected])
- debug: 4.4.3([email protected])
+ '@typescript-eslint/typescript-estree': 8.63.0([email protected])
+ '@typescript-eslint/utils': 8.63.0([email protected]([email protected]))([email protected])
+ debug: 4.4.3
+ eslint: 10.0.0([email protected])
ts-api-utils: 2.5.0([email protected])
typescript: 6.0.3
transitivePeerDependencies:
@@ -11752,13 +12231,13 @@ snapshots:
'@typescript-eslint/[email protected]': {}
+ '@typescript-eslint/[email protected]([email protected])':
dependencies:
- '@typescript-eslint/project-service': 8.63.0([email protected])([email protected])
+ '@typescript-eslint/project-service': 8.63.0([email protected])
'@typescript-eslint/tsconfig-utils': 8.63.0([email protected])
'@typescript-eslint/types': 8.63.0
'@typescript-eslint/visitor-keys': 8.63.0
- debug: 4.4.3([email protected])
+ debug: 4.4.3
minimatch: 10.2.5
semver: 7.8.5
tinyglobby: 0.2.17
@@ -11767,13 +12246,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
- '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected])([email protected]))
+ '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected]))
'@typescript-eslint/scope-manager': 8.63.0
'@typescript-eslint/types': 8.63.0
- '@typescript-eslint/typescript-estree': 8.63.0([email protected])([email protected])
+ '@typescript-eslint/typescript-estree': 8.63.0([email protected])
+ eslint: 10.0.0([email protected])
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -11830,16 +12309,16 @@ snapshots:
'@use-gesture/core': 10.3.1
react: 19.2.7
- '@vanilla-extract/[email protected]([email protected])':
+ '@vanilla-extract/[email protected]':
dependencies:
- '@babel/core': 7.29.7([email protected])
+ '@babel/core': 7.29.7
transitivePeerDependencies:
- supports-color
dependencies:
'@vanilla-extract/css': 1.21.1([email protected])
- '@vanilla-extract/integration': 8.0.10([email protected])([email protected])
+ '@vanilla-extract/integration': 8.0.10([email protected])
transitivePeerDependencies:
@@ -11874,11 +12353,11 @@ snapshots:
transitivePeerDependencies:
- babel-plugin-macros
+ '@vanilla-extract/[email protected]([email protected])':
dependencies:
- '@babel/core': 7.29.7([email protected])
- '@babel/plugin-syntax-typescript': 7.29.7(@babel/[email protected]([email protected]))
- '@vanilla-extract/babel-plugin-debug-ids': 1.2.2([email protected])
+ '@babel/core': 7.29.7
+ '@babel/plugin-syntax-typescript': 7.29.7(@babel/[email protected])
+ '@vanilla-extract/babel-plugin-debug-ids': 1.2.2
'@vanilla-extract/css': 1.21.1([email protected])
dedent: 1.7.2([email protected])
esbuild: 0.28.1
@@ -11892,10 +12371,10 @@ snapshots:
'@vanilla-extract/[email protected]': {}
dependencies:
- '@vanilla-extract/integration': 8.0.10([email protected])([email protected])
+ '@vanilla-extract/integration': 8.0.10([email protected])
transitivePeerDependencies:
- '@types/node'
@@ -11979,12 +12458,11 @@ snapshots:
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
transitivePeerDependencies:
- supports-color
- optional: true
@@ -12049,13 +12527,13 @@ snapshots:
dependencies:
'@babel/runtime': 7.29.7
'@emotion/cache': 11.14.0
- '@emotion/css': 11.13.5([email protected])
- '@emotion/react': 11.14.0(@types/[email protected])([email protected])([email protected])
+ '@emotion/css': 11.13.5
+ '@emotion/react': 11.14.0(@types/[email protected])([email protected])
'@emotion/serialize': 1.3.3
'@emotion/utils': 1.4.2
@@ -12129,33 +12607,33 @@ snapshots:
normalize-path: 3.0.0
picomatch: 2.3.2
dependencies:
'@electron/asar': 3.4.1
'@electron/fuses': 1.8.0
- '@electron/get': 3.1.0([email protected])
- '@electron/notarize': 2.5.0([email protected])
- '@electron/osx-sign': 1.3.3([email protected])
- '@electron/rebuild': 4.2.0([email protected])
- '@electron/universal': 2.0.3([email protected])
- '@malept/flatpak-bundler': 0.4.0([email protected])
+ '@electron/get': 3.1.0
+ '@electron/notarize': 2.5.0
+ '@electron/osx-sign': 1.3.3
+ '@electron/rebuild': 4.2.0
+ '@electron/universal': 2.0.3
+ '@malept/flatpak-bundler': 0.4.0
'@noble/hashes': 1.8.0
'@peculiar/webcrypto': 1.7.1
'@types/fs-extra': 9.0.13
ajv: 8.20.0
asn1js: 3.0.10
async-exit-hook: 2.0.1
- builder-util: 26.16.0([email protected])
- builder-util-runtime: 9.7.0([email protected])
+ builder-util: 26.16.0
+ builder-util-runtime: 9.7.0
chromium-pickle-js: 0.2.0
ci-info: 4.3.1
- debug: 4.4.3([email protected])
- dmg-builder: 26.16.1([email protected])([email protected])
+ debug: 4.4.3
+ dmg-builder: 26.16.1([email protected])
dotenv: 16.6.1
dotenv-expand: 11.0.7
ejs: 3.1.10
- electron-builder-squirrel-windows: 26.16.1([email protected])([email protected])
- electron-publish: 26.16.0([email protected])
+ electron-builder-squirrel-windows: 26.16.1([email protected])
+ electron-publish: 26.16.0
fs-extra: 10.1.0
hosted-git-info: 4.1.0
isbinaryfile: 5.0.7
@@ -12270,11 +12748,11 @@ snapshots:
dependencies:
bytes: 3.1.2
content-type: 2.0.0
- debug: 4.4.3([email protected])
+ debug: 4.4.3
http-errors: 2.0.1
iconv-lite: 0.7.3
on-finished: 2.4.1
@@ -12338,23 +12816,23 @@ snapshots:
base64-js: 1.5.1
ieee754: 1.2.1
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
sax: 1.6.0
transitivePeerDependencies:
- supports-color
dependencies:
'@types/debug': 4.1.13
- builder-util-runtime: 9.7.0([email protected])
+ builder-util-runtime: 9.7.0
chalk: 4.1.2
cross-spawn: 7.0.6
- debug: 4.4.3([email protected])
+ debug: 4.4.3
fs-extra: 10.1.0
- http-proxy-agent: 7.0.2([email protected])
- https-proxy-agent: 7.0.6([email protected])
+ http-proxy-agent: 7.0.2
+ https-proxy-agent: 7.0.6
js-yaml: 4.3.0
sanitize-filename: 1.6.4
source-map-support: 0.5.21
@@ -12440,12 +12918,12 @@ snapshots:
dependencies:
'@workflow/serde': 4.1.0-beta.2
mdast-util-to-string: 4.0.0
- remark-gfm: 4.0.1([email protected])
- remark-parse: 11.0.0([email protected])
+ remark-gfm: 4.0.1
+ remark-parse: 11.0.0
remark-stringify: 11.0.0
remend: 1.3.0
unified: 11.0.5
@@ -12483,6 +12961,8 @@ snapshots:
+
dependencies:
clsx: 2.1.1
@@ -12903,11 +13383,9 @@ snapshots:
dependencies:
mimic-function: 5.0.1
dependencies:
ms: 2.1.3
- optionalDependencies:
- supports-color: 9.4.0
dependencies:
@@ -13000,10 +13478,10 @@ snapshots:
unescape-js: 1.1.4
utf8: 3.0.0
dependencies:
- builder-util: 26.16.0([email protected])
+ app-builder-lib: 26.16.1([email protected])([email protected])
+ builder-util: 26.16.0
fs-extra: 10.1.0
js-yaml: 4.3.0
transitivePeerDependencies:
@@ -13039,7 +13517,9 @@ snapshots:
esbuild: 0.25.12
tsx: 4.23.0
+ optionalDependencies:
+ '@opentelemetry/api': 1.9.1
@@ -13067,23 +13547,23 @@ snapshots:
dependencies:
- builder-util: 26.16.0([email protected])
- electron-winstaller: 5.4.0([email protected])
+ app-builder-lib: 26.16.1([email protected])([email protected])
+ builder-util: 26.16.0
+ electron-winstaller: 5.4.0
transitivePeerDependencies:
- dmg-builder
- supports-color
dependencies:
- builder-util: 26.16.0([email protected])
- builder-util-runtime: 9.7.0([email protected])
+ app-builder-lib: 26.16.1([email protected])([email protected])
+ builder-util: 26.16.0
+ builder-util-runtime: 9.7.0
chalk: 4.1.2
ci-info: 4.4.0
- dmg-builder: 26.16.1([email protected])([email protected])
+ dmg-builder: 26.16.1([email protected])
fs-extra: 10.1.0
lazy-val: 1.0.5
simple-update-notifier: 2.0.0
@@ -13094,12 +13574,12 @@ snapshots:
dependencies:
'@types/fs-extra': 9.0.13
aws4: 1.13.2
- builder-util: 26.16.0([email protected])
- builder-util-runtime: 9.7.0([email protected])
+ builder-util: 26.16.0
+ builder-util-runtime: 9.7.0
chalk: 4.1.2
form-data: 4.0.6
fs-extra: 10.1.0
@@ -13115,9 +13595,9 @@ snapshots:
dependencies:
- builder-util-runtime: 9.7.0([email protected])
+ builder-util-runtime: 9.7.0
fs-extra: 10.1.0
js-yaml: 4.3.0
lazy-val: 1.0.5
@@ -13133,22 +13613,22 @@ snapshots:
jsonfile: 4.0.0
mkdirp: 0.5.6
dependencies:
'@electron/asar': 3.4.1
- debug: 4.4.3([email protected])
+ debug: 4.4.3
fs-extra: 7.0.1
lodash: 4.18.1
temp: 0.9.4
optionalDependencies:
- '@electron/windows-sign': 1.2.2([email protected])
+ '@electron/windows-sign': 1.2.2
transitivePeerDependencies:
- supports-color
dependencies:
'@electron-internal/extract-zip': 1.0.5
- '@electron/get': 5.1.0([email protected])
+ '@electron/get': 5.1.0
'@types/node': 24.13.3
transitivePeerDependencies:
- supports-color
@@ -13198,6 +13678,8 @@ snapshots:
+
dependencies:
es-errors: 1.3.0
@@ -13354,18 +13836,18 @@ snapshots:
dependencies:
+ eslint: 10.0.0([email protected])
dependencies:
+ eslint: 10.0.0([email protected])
prettier: 3.9.5
prettier-linter-helpers: 1.0.1
synckit: 0.11.13
optionalDependencies:
- eslint-config-prettier: 10.1.8([email protected]([email protected])([email protected]))
+ eslint-config-prettier: 10.1.8([email protected]([email protected]))
dependencies:
@@ -13378,11 +13860,11 @@ snapshots:
dependencies:
- '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected])([email protected]))
+ '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected]))
'@eslint-community/regexpp': 4.12.2
- '@eslint/config-array': 0.23.5([email protected])
+ '@eslint/config-array': 0.23.5
'@eslint/config-helpers': 0.5.5
'@eslint/core': 1.2.1
'@eslint/plugin-kit': 0.6.1
@@ -13392,7 +13874,7 @@ snapshots:
'@types/estree': 1.0.9
ajv: 6.15.0
cross-spawn: 7.0.6
- debug: 4.4.3([email protected])
+ debug: 4.4.3
escape-string-regexp: 4.0.0
eslint-scope: 9.1.2
eslint-visitor-keys: 5.0.1
@@ -13516,25 +13998,25 @@ snapshots:
dependencies:
- express: 5.2.1([email protected])
+ express: 5.2.1
ip-address: 10.2.0
dependencies:
accepts: 2.0.0
- body-parser: 2.3.0([email protected])
+ body-parser: 2.3.0
content-disposition: 1.1.0
content-type: 1.0.5
cookie: 0.7.2
cookie-signature: 1.2.2
- debug: 4.4.3([email protected])
+ debug: 4.4.3
depd: 2.0.0
encodeurl: 2.0.0
escape-html: 1.0.3
etag: 1.8.1
- finalhandler: 2.1.1([email protected])
+ finalhandler: 2.1.1
fresh: 2.0.0
http-errors: 2.0.1
merge-descriptors: 2.0.0
@@ -13545,9 +14027,9 @@ snapshots:
proxy-addr: 2.0.7
qs: 6.15.3
range-parser: 1.3.0
- router: 2.2.0([email protected])
- send: 1.2.1([email protected])
- serve-static: 2.2.1([email protected])
+ router: 2.2.0
+ send: 1.2.1
+ serve-static: 2.2.1
statuses: 2.0.2
type-is: 2.1.0
vary: 1.1.2
@@ -13639,9 +14121,9 @@ snapshots:
strtok3: 6.3.0
token-types: 4.2.1
dependencies:
- '@tokenizer/inflate': 0.4.1([email protected])
+ '@tokenizer/inflate': 0.4.1
strtok3: 10.3.5
token-types: 6.1.2
uint8array-extras: 1.5.0
@@ -13661,9 +14143,9 @@ snapshots:
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
encodeurl: 2.0.0
escape-html: 1.0.3
on-finished: 2.4.1
@@ -13851,9 +14333,9 @@ snapshots:
optionalDependencies:
- '@mapbox/node-pre-gyp': 1.0.11([email protected])([email protected])
+ '@mapbox/node-pre-gyp': 1.0.11([email protected])
node-addon-api: 8.9.0
node-gyp: 12.4.0
transitivePeerDependencies:
@@ -13881,6 +14363,12 @@ snapshots:
package-json-from-dist: 1.0.1
path-scurry: 1.11.1
+ dependencies:
+ minimatch: 10.2.5
+ minipass: 7.1.3
+ path-scurry: 2.0.2
+
dependencies:
fs.realpath: 1.0.0
@@ -14063,7 +14551,7 @@ snapshots:
'@ungap/structured-clone': 1.3.3
unist-util-position: 5.0.0
dependencies:
'@types/estree': 1.0.9
'@types/estree-jsx': 1.0.5
@@ -14073,9 +14561,9 @@ snapshots:
estree-util-attach-comments: 3.0.0
estree-util-is-identifier-name: 3.0.0
hast-util-whitespace: 3.0.0
- mdast-util-mdx-expression: 2.0.1([email protected])
- mdast-util-mdx-jsx: 3.2.0([email protected])
- mdast-util-mdxjs-esm: 2.0.1([email protected])
+ mdast-util-mdx-expression: 2.0.1
+ mdast-util-mdx-jsx: 3.2.0
+ mdast-util-mdxjs-esm: 2.0.1
property-information: 7.2.0
space-separated-tokens: 2.0.2
style-to-js: 1.1.21
@@ -14098,7 +14586,7 @@ snapshots:
stringify-entities: 4.0.4
zwitch: 2.0.4
dependencies:
'@types/estree': 1.0.9
'@types/hast': 3.0.5
@@ -14107,9 +14595,9 @@ snapshots:
devlop: 1.1.0
estree-util-is-identifier-name: 3.0.0
hast-util-whitespace: 3.0.0
- mdast-util-mdx-expression: 2.0.1([email protected])
- mdast-util-mdx-jsx: 3.2.0([email protected])
- mdast-util-mdxjs-esm: 2.0.1([email protected])
+ mdast-util-mdx-expression: 2.0.1
+ mdast-util-mdx-jsx: 3.2.0
+ mdast-util-mdxjs-esm: 2.0.1
property-information: 7.2.0
space-separated-tokens: 2.0.2
style-to-js: 1.1.21
@@ -14179,10 +14667,10 @@ snapshots:
statuses: 2.0.2
toidentifier: 1.0.1
dependencies:
agent-base: 7.1.4
- debug: 4.4.3([email protected])
+ debug: 4.4.3
transitivePeerDependencies:
- supports-color
@@ -14191,18 +14679,17 @@ snapshots:
quick-lru: 5.1.1
resolve-alpn: 1.2.1
dependencies:
- agent-base: 6.0.2([email protected])
- debug: 4.4.3([email protected])
+ agent-base: 6.0.2
+ debug: 4.4.3
transitivePeerDependencies:
- supports-color
- optional: true
dependencies:
agent-base: 7.1.4
- debug: 4.4.3([email protected])
+ debug: 4.4.3
transitivePeerDependencies:
- supports-color
@@ -14245,6 +14732,12 @@ snapshots:
parent-module: 1.0.1
resolve-from: 4.0.0
+ dependencies:
+ cjs-module-lexer: 2.2.1
+ es-module-lexer: 3.0.2
+ module-details-from-path: 1.0.4
+
@@ -14639,9 +15132,9 @@ snapshots:
lit-element: 4.2.2
lit-html: 3.3.3
dependencies:
- '@npmcli/config': 8.3.4([email protected])
+ '@npmcli/config': 8.3.4
import-meta-resolve: 4.2.0
transitivePeerDependencies:
- bluebird
@@ -14687,6 +15180,8 @@ snapshots:
+
dependencies:
yallist: 3.1.1
@@ -14763,14 +15258,14 @@ snapshots:
unist-util-is: 6.0.1
unist-util-visit-parents: 6.0.2
dependencies:
'@types/mdast': 4.0.4
'@types/unist': 3.0.3
decode-named-character-reference: 1.3.0
devlop: 1.1.0
mdast-util-to-string: 4.0.0
- micromark: 4.0.2([email protected])
+ micromark: 4.0.2
micromark-util-decode-numeric-character-reference: 2.0.2
micromark-util-decode-string: 2.0.1
micromark-util-normalize-identifier: 2.0.1
@@ -14780,12 +15275,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@types/mdast': 4.0.4
devlop: 1.1.0
escape-string-regexp: 5.0.0
- mdast-util-from-markdown: 2.0.3([email protected])
+ mdast-util-from-markdown: 2.0.3
mdast-util-to-markdown: 2.1.2
micromark-extension-frontmatter: 2.0.0
transitivePeerDependencies:
@@ -14799,79 +15294,79 @@ snapshots:
mdast-util-find-and-replace: 3.0.2
micromark-util-character: 2.1.1
dependencies:
'@types/mdast': 4.0.4
devlop: 1.1.0
- mdast-util-from-markdown: 2.0.3([email protected])
+ mdast-util-from-markdown: 2.0.3
mdast-util-to-markdown: 2.1.2
micromark-util-normalize-identifier: 2.0.1
transitivePeerDependencies:
- supports-color
dependencies:
'@types/mdast': 4.0.4
- mdast-util-from-markdown: 2.0.3([email protected])
+ mdast-util-from-markdown: 2.0.3
mdast-util-to-markdown: 2.1.2
transitivePeerDependencies:
- supports-color
dependencies:
'@types/mdast': 4.0.4
devlop: 1.1.0
markdown-table: 3.0.4
- mdast-util-from-markdown: 2.0.3([email protected])
+ mdast-util-from-markdown: 2.0.3
mdast-util-to-markdown: 2.1.2
transitivePeerDependencies:
- supports-color
dependencies:
'@types/mdast': 4.0.4
devlop: 1.1.0
- mdast-util-from-markdown: 2.0.3([email protected])
+ mdast-util-from-markdown: 2.0.3
mdast-util-to-markdown: 2.1.2
transitivePeerDependencies:
- supports-color
dependencies:
- mdast-util-from-markdown: 2.0.3([email protected])
+ mdast-util-from-markdown: 2.0.3
mdast-util-gfm-autolink-literal: 2.0.1
- mdast-util-gfm-footnote: 2.1.0([email protected])
- mdast-util-gfm-strikethrough: 2.0.0([email protected])
- mdast-util-gfm-table: 2.0.0([email protected])
- mdast-util-gfm-task-list-item: 2.0.0([email protected])
+ mdast-util-gfm-footnote: 2.1.0
+ mdast-util-gfm-strikethrough: 2.0.0
+ mdast-util-gfm-table: 2.0.0
+ mdast-util-gfm-task-list-item: 2.0.0
mdast-util-to-markdown: 2.1.2
transitivePeerDependencies:
- supports-color
dependencies:
'@types/hast': 3.0.5
'@types/mdast': 4.0.4
devlop: 1.1.0
longest-streak: 3.1.0
- mdast-util-from-markdown: 2.0.3([email protected])
+ mdast-util-from-markdown: 2.0.3
mdast-util-to-markdown: 2.1.2
unist-util-remove-position: 5.0.0
transitivePeerDependencies:
- supports-color
dependencies:
'@types/estree-jsx': 1.0.5
'@types/hast': 3.0.5
'@types/mdast': 4.0.4
devlop: 1.1.0
- mdast-util-from-markdown: 2.0.3([email protected])
+ mdast-util-from-markdown: 2.0.3
mdast-util-to-markdown: 2.1.2
transitivePeerDependencies:
- supports-color
dependencies:
'@types/estree-jsx': 1.0.5
'@types/hast': 3.0.5
@@ -14879,7 +15374,7 @@ snapshots:
'@types/unist': 3.0.3
ccount: 2.0.1
devlop: 1.1.0
- mdast-util-from-markdown: 2.0.3([email protected])
+ mdast-util-from-markdown: 2.0.3
mdast-util-to-markdown: 2.1.2
parse-entities: 4.0.2
stringify-entities: 4.0.4
@@ -14888,23 +15383,23 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
- mdast-util-from-markdown: 2.0.3([email protected])
- mdast-util-mdx-expression: 2.0.1([email protected])
- mdast-util-mdx-jsx: 3.2.0([email protected])
- mdast-util-mdxjs-esm: 2.0.1([email protected])
+ mdast-util-from-markdown: 2.0.3
+ mdast-util-mdx-expression: 2.0.1
+ mdast-util-mdx-jsx: 3.2.0
+ mdast-util-mdxjs-esm: 2.0.1
mdast-util-to-markdown: 2.1.2
transitivePeerDependencies:
- supports-color
dependencies:
'@types/estree-jsx': 1.0.5
'@types/hast': 3.0.5
'@types/mdast': 4.0.4
devlop: 1.1.0
- mdast-util-from-markdown: 2.0.3([email protected])
+ mdast-util-from-markdown: 2.0.3
mdast-util-to-markdown: 2.1.2
transitivePeerDependencies:
- supports-color
@@ -14993,6 +15488,8 @@ snapshots:
+
dependencies:
'@braintree/sanitize-url': 7.1.2
@@ -15045,10 +15542,10 @@ snapshots:
optionalDependencies:
micromark-util-types: 2.0.2
dependencies:
devlop: 1.1.0
- micromark: 4.0.2([email protected])
+ micromark: 4.0.2
micromark-extension-cjk-friendly-util: 3.0.1([email protected])
micromark-util-chunked: 2.0.1
micromark-util-resolve-all: 2.0.1
@@ -15296,10 +15793,10 @@ snapshots:
dependencies:
'@types/debug': 4.1.13
- debug: 4.4.3([email protected])
+ debug: 4.4.3
decode-named-character-reference: 1.3.0
devlop: 1.1.0
micromark-core-commonmark: 2.0.3
@@ -15414,6 +15911,8 @@ snapshots:
+
dependencies:
color-name: 1.1.4
@@ -15778,6 +16277,11 @@ snapshots:
lru-cache: 10.4.3
minipass: 7.1.3
+ dependencies:
+ lru-cache: 11.5.2
+ minipass: 7.1.3
+
@@ -15897,9 +16401,7 @@ snapshots:
- optionalDependencies:
- bluebird: 3.7.2
dependencies:
@@ -15941,6 +16443,8 @@ snapshots:
forwarded: 0.2.0
ipaddr.js: 1.9.1
+
dependencies:
end-of-stream: 1.4.5
@@ -16145,17 +16649,17 @@ snapshots:
dependencies:
'@types/hast': 3.0.5
'@types/mdast': 4.0.4
'@types/react': 19.2.17
devlop: 1.1.0
- hast-util-to-jsx-runtime: 2.3.6([email protected])
+ hast-util-to-jsx-runtime: 2.3.6
html-url-attributes: 3.0.1
mdast-util-to-hast: 13.2.1
react: 19.2.7
- remark-parse: 11.0.0([email protected])
+ remark-parse: 11.0.0
remark-rehype: 11.1.2
unified: 11.0.5
unist-util-visit: 5.1.0
@@ -16187,9 +16691,9 @@ snapshots:
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
transitivePeerDependencies:
- supports-color
@@ -16320,11 +16824,11 @@ snapshots:
hast-util-raw: 9.1.0
vfile: 6.0.3
dependencies:
'@types/estree': 1.0.9
'@types/hast': 3.0.5
- hast-util-to-estree: 3.1.3([email protected])
+ hast-util-to-estree: 3.1.3
transitivePeerDependencies:
- supports-color
@@ -16334,10 +16838,10 @@ snapshots:
mdast-util-newline-to-break: 2.0.0
unified: 11.0.5
dependencies:
mdast-util-to-markdown-cjk-friendly: 1.0.0(@types/[email protected])([email protected])
- micromark-extension-cjk-friendly: 2.0.1([email protected])([email protected]([email protected]))
+ micromark-extension-cjk-friendly: 2.0.1([email protected])([email protected])
unified: 11.0.5
optionalDependencies:
'@types/mdast': 4.0.4
@@ -16345,31 +16849,31 @@ snapshots:
- micromark
- micromark-util-types
dependencies:
import-meta-resolve: 4.2.0
markdown-extensions: 2.0.0
- remark: 15.0.1([email protected])
- unified-args: 11.0.1([email protected])([email protected])
+ remark: 15.0.1
+ unified-args: 11.0.1
transitivePeerDependencies:
- bluebird
- supports-color
dependencies:
'@types/mdast': 4.0.4
- mdast-util-frontmatter: 2.0.1([email protected])
+ mdast-util-frontmatter: 2.0.1
micromark-extension-frontmatter: 2.0.0
unified: 11.0.5
transitivePeerDependencies:
- supports-color
dependencies:
'@types/mdast': 4.0.4
- mdast-util-gfm: 3.1.0([email protected])
+ mdast-util-gfm: 3.1.0
micromark-extension-gfm: 3.0.0
- remark-parse: 11.0.0([email protected])
+ remark-parse: 11.0.0
remark-stringify: 11.0.0
unified: 11.0.5
transitivePeerDependencies:
@@ -16392,26 +16896,26 @@ snapshots:
mdast-util-to-hast: 13.2.1
unified: 11.0.5
dependencies:
'@types/mdast': 4.0.4
- mdast-util-math: 3.0.0([email protected])
+ mdast-util-math: 3.0.0
micromark-extension-math: 3.1.0
unified: 11.0.5
transitivePeerDependencies:
- supports-color
dependencies:
- mdast-util-mdx: 3.0.0([email protected])
+ mdast-util-mdx: 3.0.0
micromark-extension-mdxjs: 3.0.0
transitivePeerDependencies:
- supports-color
dependencies:
'@types/mdast': 4.0.4
- mdast-util-from-markdown: 2.0.3([email protected])
+ mdast-util-from-markdown: 2.0.3
micromark-util-types: 2.0.2
unified: 11.0.5
transitivePeerDependencies:
@@ -16431,10 +16935,10 @@ snapshots:
mdast-util-to-markdown: 2.1.2
unified: 11.0.5
dependencies:
'@types/mdast': 4.0.4
- remark-parse: 11.0.0([email protected])
+ remark-parse: 11.0.0
remark-stringify: 11.0.0
unified: 11.0.5
transitivePeerDependencies:
@@ -16450,6 +16954,13 @@ snapshots:
+ dependencies:
+ debug: 4.4.3
+ module-details-from-path: 1.0.4
+ transitivePeerDependencies:
+ - supports-color
+
@@ -16607,9 +17118,9 @@ snapshots:
points-on-curve: 0.2.0
points-on-path: 0.2.1
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
depd: 2.0.0
is-promise: 4.0.0
parseurl: 1.3.3
@@ -16652,6 +17163,8 @@ snapshots:
extend-shallow: 2.0.1
kind-of: 6.0.3
+
@@ -16662,9 +17175,9 @@ snapshots:
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
encodeurl: 2.0.0
escape-html: 1.0.3
etag: 1.8.1
@@ -16683,12 +17196,12 @@ snapshots:
type-fest: 0.13.1
optional: true
dependencies:
encodeurl: 2.0.0
escape-html: 1.0.3
parseurl: 1.3.3
- send: 1.2.1([email protected])
+ send: 1.2.1
transitivePeerDependencies:
- supports-color
@@ -16956,7 +17469,7 @@ snapshots:
dependencies:
inline-style-parser: 0.2.7
dependencies:
'@csstools/css-parser-algorithms': 2.7.1(@csstools/[email protected])
'@csstools/css-tokenizer': 2.4.1
@@ -16967,7 +17480,7 @@ snapshots:
cosmiconfig: 8.3.6([email protected])
css-functions-list: 3.3.3
css-tree: 2.3.1
- debug: 4.4.3([email protected])
+ debug: 4.4.3
fast-glob: 3.3.3
fastest-levenshtein: 1.0.16
file-entry-cache: 7.0.2
@@ -17016,9 +17529,9 @@ snapshots:
tinyglobby: 0.2.17
ts-interface-checker: 0.1.13
dependencies:
- debug: 4.4.3([email protected])
+ debug: 4.4.3
transitivePeerDependencies:
- supports-color
@@ -17218,13 +17731,13 @@ snapshots:
dependencies:
bundle-require: 5.1.0([email protected])
cac: 6.7.14
chokidar: 4.0.3
consola: 3.4.2
- debug: 4.4.3([email protected])
+ debug: 4.4.3
esbuild: 0.27.7
fix-dts-default-cjs-exports: 1.0.1
joycon: 3.1.1
@@ -17279,13 +17792,13 @@ snapshots:
dependencies:
- '@typescript-eslint/typescript-estree': 8.63.0([email protected])([email protected])
+ '@typescript-eslint/parser': 8.63.0([email protected]([email protected]))([email protected])
+ '@typescript-eslint/typescript-estree': 8.63.0([email protected])
+ '@typescript-eslint/utils': 8.63.0([email protected]([email protected]))([email protected])
+ eslint: 10.0.0([email protected])
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -17321,7 +17834,7 @@ snapshots:
dependencies:
'@types/text-table': 0.2.5
chalk: 5.6.2
@@ -17331,12 +17844,12 @@ snapshots:
minimist: 1.2.8
strip-ansi: 7.2.0
text-table: 0.2.0
- unified-engine: 11.2.2([email protected])([email protected])
+ unified-engine: 11.2.2
transitivePeerDependencies:
- bluebird
- supports-color
dependencies:
'@types/concat-stream': 2.0.3
'@types/debug': 4.1.13
@@ -17344,13 +17857,13 @@ snapshots:
'@types/node': 22.20.1
'@types/unist': 3.0.3
concat-stream: 2.0.0
- debug: 4.4.3([email protected])
+ debug: 4.4.3
extend: 3.0.2
glob: 10.5.0
ignore: 6.0.2
is-empty: 1.2.0
is-plain-obj: 4.1.0
- load-plugin: 6.0.3([email protected])
+ load-plugin: 6.0.3
parse-json: 7.1.1
trough: 2.2.0
unist-util-inspect: 8.1.0
@@ -17576,13 +18089,13 @@ snapshots:
tsx: 4.23.0
yaml: 2.9.0
dependencies:
cssfontparser: 1.2.1
moo-color: 1.0.3
dependencies:
'@types/chai': 5.2.3
@@ -17599,6 +18112,7 @@ snapshots:
why-is-node-running: 2.3.0
optionalDependencies:
+ '@opentelemetry/api': 1.9.1
'@types/node': 24.13.3
happy-dom: 20.10.6
transitivePeerDependencies:
diff --git a/apps/desktop/pnpm-workspace.yaml b/apps/desktop/pnpm-workspace.yaml
index d3b06613e09..48196a9cae6 100644
--- a/apps/desktop/pnpm-workspace.yaml
+++ b/apps/desktop/pnpm-workspace.yaml
@@ -47,6 +47,7 @@ publicHoistPattern:
- 'pdfjs-dist'
allowBuilds:
+ '@sentry/cli': true
electron: true
electron-builder: true
electron-winstaller: false
diff --git a/apps/desktop/scripts/__tests__/mainHash.test.mjs b/apps/desktop/scripts/__tests__/mainHash.test.mjs
index f22df69d203..82b309f81d8 100644
--- a/apps/desktop/scripts/__tests__/mainHash.test.mjs
+++ b/apps/desktop/scripts/__tests__/mainHash.test.mjs
@@ -1,9 +1,13 @@
+import { execFile } from 'node:child_process';
import { cp, mkdir, mkdtemp, readFile, rm, symlink, writeFile } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import path from 'node:path';
+import { pathToFileURL } from 'node:url';
+import { promisify } from 'node:util';
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
+import { viteOsPlatformResolve } from '../../../../plugins/vite/osPlatformResolve';
import { collectSourceInputs, collectViteGraph } from '../mainHash.mjs';
import {
diffInputs,
@@ -19,8 +23,27 @@ const put = async (file, content = '') => {
await writeFile(target, content);
return target;
};
-const hash = (options = {}) =>
- collectSourceInputs({ repoRoot: root, publicKey: 'test-key', sourcePackages: [], ...options });
+const collect = (entry, resolve) =>
+ collectViteGraph({
+ configFile: false,
+ root,
+ resolve,
+ build: { lib: { entry, formats: ['es'] }, ssr: true },
+ });
+const hash = async (options = {}) =>
+ collectSourceInputs({
+ repoRoot: root,
+ publicKey: 'test-key',
+ sourcePackages: [],
+ graph:
+ options.graph ??
+ (await Promise.all(
+ ['main', 'preload'].map((target) =>
+ collect(path.join(options.repoRoot ?? root, `apps/desktop/src/${target}/index.ts`)),
+ ),
+ )),
+ ...options,
+ });
beforeEach(async () => {
root = await mkdtemp(path.join(tmpdir(), 'main hash '));
@@ -36,10 +59,12 @@ beforeEach(async () => {
'external-runtime-deps.config.mjs',
'module-deps.config.mjs',
'scripts/mainHash.mjs',
+ 'scripts/mainHashGraph.mjs',
])
await put(`apps/desktop/${file}`, 'export {};\n');
for (const dir of ['main', 'preload', 'common'])
await put(`apps/desktop/src/${dir}/index.ts`, 'export {};\n');
+ await put('apps/desktop/src/main/index.ts', "export * from '../common/index';\n");
await put('apps/desktop/resources/error.html', '<html>error</html>\n');
await put('plugins/vite/platform.ts', 'export {};\n');
await put('packages/native/binding.gyp', '{}');
@@ -55,7 +80,6 @@ describe('source main hash', () => {
['apps/desktop/src/main/index.ts', 'export const changed = true;'],
['apps/desktop/src/preload/index.ts', 'export const changed = true;'],
['apps/desktop/src/common/index.ts', 'export const changed = true;'],
- ['apps/desktop/src/main/capture.windows.ts', 'export const capture = true;'],
['packages/native/native/addon.mm', '// native v2'],
['packages/native/binding.gyp', '{"targets":[]}'],
['apps/desktop/pnpm-lock.yaml', 'lockfileVersion: 9\npackages: {changed: true}\n'],
@@ -67,7 +91,7 @@ describe('source main hash', () => {
await put(file, content);
const after = await hash();
expect(after.mainHash).not.toBe(before.mainHash);
- expect(diffInputs(before, after).some((line) => line.startsWith(`oss/${file}:`))).toBe(true);
+ expect(diffInputs(before, after).some((line) => line.includes(`oss/${file}:`))).toBe(true);
expect(() => validateInputManifest(after)).not.toThrow();
});
@@ -93,7 +117,7 @@ describe('source main hash', () => {
await put('apps/desktop/package.json', '{"version":"1.0.0","name":"desktop"}\n');
const before = await hash();
await put('apps/desktop/package.json', '{"version":"1.0.0","name":"desktop"}\r\n');
- await put('apps/desktop/src/main/index.ts', 'export {};\r\n');
+ await put('apps/desktop/src/main/index.ts', "export * from '../common/index';\r\n");
expect((await hash()).mainHash).toBe(before.mainHash);
await put('apps/desktop/package.json', '{"name":"desktop","version":"1.0.0"}\n');
expect((await hash()).mainHash).not.toBe(before.mainHash);
@@ -124,18 +148,15 @@ describe('source main hash', () => {
await writeFile(path.join(cloud, 'package.json'), '{"dependencies":{"sentry":"1.0.0"}}');
const source = path.join(cloud, 'runtime.ts');
await writeFile(source, 'export const value = 1;');
- const options = {
- cloudRoot: cloud,
- graph: [{ files: [source], configFiles: [], defines: {} }],
- };
- const before = await hash(options);
+ const cloudHash = async () => hash({ cloudRoot: cloud, graph: [await collect(source)] });
+ const before = await cloudHash();
await writeFile(path.join(cloud, 'renderer.ts'), 'renderer-only change');
- expect((await hash(options)).mainHash).toBe(before.mainHash);
+ expect((await cloudHash()).mainHash).toBe(before.mainHash);
await writeFile(source, 'export const value = 2;');
- const changed = await hash(options);
+ const changed = await cloudHash();
expect(changed.mainHash).not.toBe(before.mainHash);
await writeFile(path.join(cloud, 'package.json'), '{"dependencies":{"sentry":"2.0.0"}}');
- expect((await hash(options)).mainHash).not.toBe(changed.mainHash);
+ expect((await cloudHash()).mainHash).not.toBe(changed.mainHash);
} finally {
await rm(cloud, { force: true, recursive: true });
}
@@ -185,7 +206,10 @@ describe('workspace Vite graph', () => {
await put('packages/shared/package.json', '{"type":"module"}');
const graph = await collect();
const before = await hash({ graph: [graph] });
- const paths = before.inputs.map((input) => input.path);
+ const paths = [
+ ...before.inputs.map((input) => input.path.replace(/^\$graph\/main\//, '')),
+ ...before.graph.flatMap((target) => target.modules.flatMap((node) => node.inlined)),
+ ];
expect(paths).toContain('oss/packages/shared/src/runtime.ts');
expect(paths).toContain('oss/packages/shared/src/effect.ts');
expect(paths).toContain('oss/packages/shared/src/lazy.ts');
@@ -202,32 +226,276 @@ describe('workspace Vite graph', () => {
expect((await hash({ graph: [await collect()] })).mainHash).not.toBe(before.mainHash);
});
- it('uses relative real source paths and whole-source fallback for differing workspace graphs', async () => {
- await put('packages/shared/src/mac.ts', 'export const value = "mac";');
- const win = await put('packages/shared/src/windows.ts', 'export const value = "windows";');
- const link = path.join(root, 'linked-shared');
- await symlink(
- path.join(root, 'packages/shared'),
- link,
- process.platform === 'win32' ? 'junction' : 'dir',
+ it('ignores types, comments and unused forwarding exports, but detects a live binding swap', async () => {
+ await put('apps/desktop/src/main/a.ts', 'export const a = 11;');
+ await put('apps/desktop/src/main/b.ts', 'export const b = 22;');
+ await put('apps/desktop/src/main/forward.ts', "export { a } from './a';");
+ await put('apps/desktop/src/main/types.ts', 'export interface Value { name: string }');
+ const barrel = 'apps/desktop/src/main/barrel.ts';
+ await put(barrel, "export { a as selected } from './a';");
+ await put(
+ 'apps/desktop/src/main/index.ts',
+ `
+ import { selected } from './barrel';
+ import { a } from './a';
+ import { b } from './b';
+ export const result = [selected, a, b];
+ `,
+ );
+ const capture = async () => {
+ let code;
+ const graph = await collectViteGraph({
+ configFile: false,
+ root,
+ build: {
+ lib: { entry: path.join(root, 'apps/desktop/src/main/index.ts'), formats: ['es'] },
+ },
+ plugins: [
+ {
+ name: 'capture-result',
+ generateBundle(_options, bundle) {
+ code = Object.values(bundle).find((item) => item.type === 'chunk').code;
+ },
+ },
+ ],
+ });
+ const output = await import(
+ `data:text/javascript;base64,${Buffer.from(code).toString('base64')}`
+ );
+ return { manifest: await hash({ graph: [graph] }), result: output.result };
+ };
+ const before = await capture();
+ expect(before.result).toEqual([11, 11, 22]);
+ for (const source of [
+ "// another comment\nexport { a as selected } from './a'; export type { Value } from './types';",
+ "export { a as selected } from './a'; export * from './types';",
+ "export { a as selected } from './a'; export { b as unused } from './b';",
+ "export { a as selected } from './forward';",
+ ]) {
+ await put(barrel, source);
+ const after = await capture();
+ expect(after.result).toEqual(before.result);
+ expect(after.manifest.mainHash).toBe(before.manifest.mainHash);
+ }
+ await put(barrel, "export { b as selected } from './b';");
+ const swapped = await capture();
+ expect(swapped.result).toEqual([22, 11, 22]);
+ expect(swapped.manifest.mainHash).not.toBe(before.manifest.mainHash);
+ });
+
+ it.each([
+ [
+ "import { selected } from './barrel'; export const result = selected;",
+ "export { a as selected } from './a';",
+ "export { b as selected } from './b';",
+ ],
+ [
+ "import selected from './barrel'; export const result = selected;",
+ "export { a as default } from './a';",
+ "export { b as default } from './b';",
+ ],
+ [
+ "import * as value from './barrel'; export const result = value.selected;",
+ "export { a as selected } from './a';",
+ "export { b as selected } from './b';",
+ ],
+ [
+ "export const load = () => import('./barrel');",
+ "export { a as selected } from './a';",
+ "export { b as selected } from './b';",
+ ],
+ ])(
+ 'tracks named, default, namespace and dynamic bindings: %s',
+ async (entry, beforeSource, afterSource) => {
+ await put('apps/desktop/src/main/a.ts', 'export const a = 11;');
+ await put('apps/desktop/src/main/b.ts', 'export const b = 22;');
+ await put(
+ 'apps/desktop/src/main/index.ts',
+ `${entry}\nexport { a } from './a'; export { b } from './b';`,
+ );
+ await put('apps/desktop/src/main/barrel.ts', beforeSource);
+ const before = await hash();
+ await put('apps/desktop/src/main/barrel.ts', afterSource);
+ expect((await hash()).mainHash).not.toBe(before.mainHash);
+ },
+ );
+
+ it('preserves side-effect order through omitted forwarding modules', async () => {
+ await put('apps/desktop/src/main/a.ts', 'globalThis.order = "a";');
+ await put('apps/desktop/src/main/b.ts', 'globalThis.order += "b";');
+ await put(
+ 'apps/desktop/src/main/index.ts',
+ "import './barrel'; export const result = globalThis.order;",
+ );
+ await put('apps/desktop/src/main/barrel.ts', "import './a'; import './b';");
+ const before = await hash();
+ await put('apps/desktop/src/main/barrel.ts', "import './b'; import './a';");
+ expect((await hash()).mainHash).not.toBe(before.mainHash);
+ });
+
+ it('ignores ordinary comments while preserving tree-shaking annotations', async () => {
+ await put('apps/desktop/src/main/index.ts', 'export const result = 1; globalThis.effect();');
+ const before = await hash();
+ await put(
+ 'apps/desktop/src/main/index.ts',
+ '// comment\nexport const result = 1; /* another */ globalThis.effect();',
+ );
+ expect((await hash()).mainHash).toBe(before.mainHash);
+ await put(
+ 'apps/desktop/src/main/index.ts',
+ 'export const result = 1; /* @__PURE__ */ globalThis.effect();',
+ );
+ expect((await hash()).mainHash).not.toBe(before.mainHash);
+ });
+
+ it('keeps transitive definitions used by constant folding', async () => {
+ await put('apps/desktop/src/main/a.ts', 'export const a = 11;');
+ await put('apps/desktop/src/main/barrel.ts', "export { a } from './a';");
+ await put(
+ 'apps/desktop/src/main/b.ts',
+ "import { a } from './barrel'; export const b = a + 1;",
+ );
+ await put(
+ 'apps/desktop/src/main/index.ts',
+ "import { b } from './b'; export const result = b + 1;",
+ );
+ const before = await hash();
+ await put('apps/desktop/src/main/a.ts', 'export const a = 22;');
+ expect((await hash()).mainHash).not.toBe(before.mainHash);
+ });
+
+ it('ignores unread namespace exports, but includes the namespace receiver of method calls', async () => {
+ await put(
+ 'apps/desktop/src/main/a.ts',
+ 'export const a = 11; export function read() { return this.spare; }',
+ );
+ await put('apps/desktop/src/main/b.ts', 'export const b = 22;');
+ const barrel = 'apps/desktop/src/main/barrel.ts';
+ const entry = 'apps/desktop/src/main/index.ts';
+ await put(barrel, "export { a as selected, a as spare, read } from './a';");
+ await put(
+ entry,
+ "import * as ns from './barrel'; export const result = ns.selected; export { a } from './a'; export { b } from './b';",
+ );
+ const before = await hash();
+ await put(
+ barrel,
+ "export { a as selected, read } from './a'; export { b as spare } from './b';",
+ );
+ expect((await hash()).mainHash).toBe(before.mainHash);
+ await put(
+ entry,
+ "import * as ns from './barrel'; export const result = ns.read(); export { a } from './a'; export { b } from './b';",
+ );
+ const call = await hash();
+ await put(barrel, "export { a as selected, a as spare, read } from './a';");
+ expect((await hash()).mainHash).not.toBe(call.mainHash);
+ });
+
+ it('rejects bundled npm code resolved outside the frozen Desktop installation', async () => {
+ await mkdir(path.join(root, 'apps/desktop/node_modules'), { recursive: true });
+ await put(
+ 'node_modules/floating/package.json',
+ '{"name":"floating","type":"module","main":"index.js"}',
);
- const macGraph = [{ files: [path.join(link, 'src/mac.ts')], configFiles: [], defines: {} }];
- const winGraph = [{ files: [win], configFiles: [], defines: {} }];
- const before = await hash({ graph: macGraph });
- expect(before.inputs.find((input) => input.path.endsWith('/mac.ts')).path).toBe(
- 'oss/packages/shared/src/mac.ts',
+ await put('node_modules/floating/index.js', 'export const value = 1;');
+ await put(
+ 'apps/desktop/src/main/index.ts',
+ "import { value } from 'floating'; export const result = value;",
);
- const other = await hash({ graph: winGraph });
- expect(other.mainHash).not.toBe(before.mainHash);
- expect(diffInputs(before, other).join('\n')).toContain('(missing)');
- const fallback = { sourcePackages: ['packages/shared'] };
- expect((await hash({ ...fallback, graph: macGraph })).mainHash).toBe(
- (await hash({ ...fallback, graph: winGraph })).mainHash,
+ const graph = await collectViteGraph({
+ configFile: false,
+ root,
+ build: {
+ lib: { entry: path.join(root, 'apps/desktop/src/main/index.ts'), formats: ['es'] },
+ ssr: true,
+ },
+ ssr: { noExternal: true },
+ });
+ await expect(hash({ graph: [graph] })).rejects.toThrow("outside Desktop's locked installation");
+ });
+
+ it('tracks star forwarding, cycles and CommonJS without dropping runtime dependencies', async () => {
+ await put('apps/desktop/src/main/a.ts', 'export const selected = 11;');
+ await put('apps/desktop/src/main/b.ts', 'export const selected = 22;');
+ await put('apps/desktop/src/main/barrel.ts', "export * from './forward';");
+ await put('apps/desktop/src/main/forward.ts', "export * from './barrel'; export * from './a';");
+ await put(
+ 'apps/desktop/src/main/index.ts',
+ "export { selected } from './barrel'; export { selected as a } from './a'; export { selected as b } from './b';",
+ );
+ const before = await hash();
+ await put('apps/desktop/src/main/forward.ts', "export * from './barrel'; export * from './b';");
+ expect((await hash()).mainHash).not.toBe(before.mainHash);
+ await put('apps/desktop/src/main/legacy.cjs', 'module.exports = { value: 11 };');
+ await put(
+ 'apps/desktop/src/main/index.ts',
+ "import value from './legacy.cjs'; export const result = value.value;",
+ );
+ const legacy = await hash();
+ await put('apps/desktop/src/main/legacy.cjs', 'module.exports = { value: 22 };');
+ expect((await hash()).mainHash).not.toBe(legacy.mainHash);
+ });
+
+ it('covers unselected platform branches and keeps shared descendants in the runtime graph', async () => {
+ await put(
+ 'apps/desktop/src/main/index.ts',
+ "export { platform } from './platform'; export { shared } from './shared';",
+ );
+ await put('apps/desktop/src/main/platform.ts', "export const platform = 'default';");
+ await put(
+ 'apps/desktop/src/main/platform.mac.ts',
+ "import { shared } from './shared'; import { mac } from './mac-only'; export const platform = shared + mac;",
);
+ await put('apps/desktop/src/main/shared.ts', 'export const shared = 1;');
+ await put('apps/desktop/src/main/mac-only.ts', 'export const mac = 2;');
+ const platformHash = async () => {
+ const graph = [];
+ for (const os of ['mac', 'linux', 'windows']) {
+ graph.push({
+ ...(await collectViteGraph({
+ configFile: false,
+ root,
+ build: {
+ lib: { entry: path.join(root, 'apps/desktop/src/main/index.ts'), formats: ['es'] },
+ },
+ plugins: [viteOsPlatformResolve(os)],
+ })),
+ label: `main/${os}`,
+ });
+ }
+ return hash({ graph });
+ };
+ const before = await platformHash();
+ expect(
+ before.inputs.some((item) => item.path.endsWith('/mac-only.ts') && item.group === 'platform'),
+ ).toBe(true);
+ await put('apps/desktop/src/main/mac-only.ts', 'export const mac = 3;');
+ const platformChange = await platformHash();
+ expect(platformChange.mainHash).not.toBe(before.mainHash);
+ await put('apps/desktop/src/main/shared.ts', 'export const shared = 4;');
+ expect((await platformHash()).mainHash).not.toBe(platformChange.mainHash);
});
});
describe('release hash validation', () => {
+ it('validates release manifests without installing Vite in the publishing job', async () => {
+ const directory = path.join(root, 'validator');
+ await mkdir(directory);
+ for (const file of ['mainHash.mjs', 'mainHashGraph.mjs', 'validateMainHash.mjs']) {
+ await cp(new URL(`../${file}`, import.meta.url), path.join(directory, file));
+ }
+ const manifest = await hash();
+ const module = pathToFileURL(path.join(directory, 'validateMainHash.mjs')).href;
+ await expect(
+ promisify(execFile)(process.execPath, [
+ '--input-type=module',
+ '-e',
+ `import { validateInputManifest } from ${JSON.stringify(module)}; validateInputManifest(${JSON.stringify(manifest)});`,
+ ]),
+ ).resolves.toMatchObject({ stdout: '', stderr: '' });
+ });
+
it('requires r0, the source manifest and the packaged hash to agree', async () => {
const inputs = await hash();
const release = path.join(root, 'release');
diff --git a/apps/desktop/scripts/mainHash.mjs b/apps/desktop/scripts/mainHash.mjs
index 2b5f91ea817..0f7a731bccf 100644
--- a/apps/desktop/scripts/mainHash.mjs
+++ b/apps/desktop/scripts/mainHash.mjs
@@ -3,11 +3,13 @@ import { glob, mkdir, readFile, realpath, stat, writeFile } from 'node:fs/promis
import path from 'node:path';
import { fileURLToPath } from 'node:url';
+import { createModuleRecord, moduleRequests, parseModule, walkGraph } from './mainHashGraph.mjs';
+
const scriptPath = fileURLToPath(import.meta.url);
const defaultRoot = path.resolve(path.dirname(scriptPath), '../../..');
const collectEnv = 'RENDERER_OTA_COLLECT_INPUTS';
export const MAIN_HASH_PLACEHOLDER = '__LOBEMAINHASH_SOURCE_GRAPH__';
-export const MAIN_HASH_ALGORITHM = 'source-v1';
+export const MAIN_HASH_ALGORITHM = 'graph-v2';
// A workspace with platform-dependent imports can opt into whole-source hashing.
// Keep this list in source control: every build and OTA gate must use the same scope.
@@ -63,10 +65,10 @@ export function createInputManifest(inputs) {
};
}
-/** Uses the transformed module graph, never generated bundle bytes or installed package versions. */
+/** Capture pre-render code and final retention; chunk-generated names never enter the hash. */
export async function collectViteGraph(options) {
- const { build } = await import('vite');
- const files = new Set();
+ const { build, parseSync } = await import('vite');
+ const nodes = new Map();
const configFiles = new Set();
let defines;
await build({
@@ -81,16 +83,46 @@ export async function collectViteGraph(options) {
for (const file of config.configFileDependencies) configFiles.add(file);
defines = config.define;
},
- buildEnd(error) {
- if (error) return;
+ async generateBundle(_options, bundle) {
+ const retained = new Set(
+ Object.values(bundle).flatMap((chunk) =>
+ chunk.type === 'chunk' ? Object.keys(chunk.modules) : [],
+ ),
+ );
for (const id of this.getModuleIds()) {
- if (!this.getModuleInfo(id)?.isExternal) files.add(id);
+ const info = this.getModuleInfo(id);
+ const owned = !slash(id).includes('/node_modules/') && !info.isExternal;
+ if (owned && retained.has(id) && info.code == null) {
+ throw new Error(`Missing transformed code for retained main hash module: ${id}`);
+ }
+ const ast =
+ owned && info.code != null ? parseModule(info.code, id, parseSync) : undefined;
+ const resolutions = {};
+ if (ast) {
+ for (const source of moduleRequests(ast)) {
+ const resolved = await this.resolve(source, id);
+ if (!resolved) throw new Error(`Unresolved main hash input ${source} in ${id}`);
+ resolutions[source] = resolved.id;
+ }
+ }
+ nodes.set(id, {
+ id,
+ ast,
+ resolutions,
+ entry: info.isEntry,
+ external: info.isExternal,
+ inputFormat: info.inputFormat,
+ exports: info.exports,
+ imports: info.importedIds,
+ dynamicImports: info.dynamicallyImportedIds,
+ retained: retained.has(id),
+ });
}
},
},
],
});
- return { configFiles: [...configFiles], defines, files: [...files] };
+ return { configFiles: [...configFiles], defines, nodes };
}
export async function collectSourceInputs({
@@ -133,40 +165,153 @@ export async function collectSourceInputs({
}
};
- for (const [index, target] of graph.entries()) {
- for (const file of target.files) {
- await addFile(file, 'workspace');
- // Package exports/sideEffects can change the graph without changing its source files.
+ const sourceFile = (id) => id.replace(/^\0/, '').split('?')[0];
+ let installedRoot;
+ for (const target of graph) {
+ for (const id of target.nodes.keys()) {
+ const file = sourceFile(id);
+ if (!path.isAbsolute(file) || !slash(file).includes('/node_modules/')) continue;
+ installedRoot ??= await realpath(path.join(repoRoot, 'apps/desktop/node_modules'));
+ if (!inside(installedRoot, await realpath(file))) {
+ throw new Error(`Main hash dependency is outside Desktop's locked installation: ${file}`);
+ }
+ }
+ }
+ const identity = (id) => {
+ let normalized = slash(id);
+ for (const [prefix, root] of roots) normalized = normalized.replaceAll(slash(root), prefix);
+ return normalized;
+ };
+ const sourceRoots = new Map();
+ for (const relative of sourcePackages)
+ sourceRoots.set(path.join(repoRoot, relative), 'workspace');
+ for (const [, root] of roots) {
+ for await (const binding of glob('packages/*/binding.gyp', { cwd: root })) {
+ sourceRoots.set(path.join(root, path.dirname(binding)), 'native');
+ }
+ }
+ const inSourceTree = (id) => [...sourceRoots.keys()].some((dir) => inside(dir, sourceFile(id)));
+ const families = new Map();
+ for (const target of graph) {
+ for (const id of target.nodes.keys()) {
+ const file = sourceFile(id);
if (!path.isAbsolute(file) || slash(file).includes('/node_modules/')) continue;
- let dir = path.dirname(await realpath(file.split('?')[0]));
- const owner = roots.find(([, root]) => inside(root, dir));
- while (owner && dir !== owner[1]) {
- const manifest = path.join(dir, 'package.json');
+ const base = file.replace(/\.(mac|linux|windows)(?=\.[^.]+$)/, '');
+ const ext = path.extname(base);
+ if (!/\.[cm]?[jt]sx?$/.test(ext)) continue;
+ const variants = [];
+ for (const suffix of ['', '.mac', '.linux', '.windows']) {
+ const variant = base.slice(0, -ext.length) + suffix + ext;
try {
- await addFile(manifest, 'config');
- break;
+ if ((await stat(variant)).isFile()) variants.push(variant);
} catch (error) {
if (error.code !== 'ENOENT') throw error;
}
- dir = path.dirname(dir);
+ }
+ if (variants.some((variant) => variant !== base)) {
+ for (const variant of variants) {
+ families.set(variant, base);
+ await addFile(variant, 'platform');
+ }
}
}
- for (const file of target.configFiles) await addFile(file, 'config');
- // Values are hashed, not stored: defines may contain deployment configuration.
- addValue(
- `$defines/${index === 0 ? 'main' : 'preload'}`,
- stableJson(target.defines ?? {}),
- 'config',
+ }
+ const diagnostics = [];
+ for (const [index, target] of graph.entries()) {
+ const label = target.label ?? (index === 0 ? 'main' : 'preload');
+ const nodes = target.nodes;
+ const boundaries = new Set(
+ [...nodes.keys()].filter((id) => families.has(sourceFile(id)) || inSourceTree(id)),
);
+ const common = walkGraph(
+ nodes,
+ [...nodes.values()].filter((node) => node.entry).map((node) => node.id),
+ boundaries,
+ );
+ const exclusive = new Set([...walkGraph(nodes, boundaries)].filter((id) => !common.has(id)));
+ const opaque = (id, source) => {
+ const file = sourceFile(id);
+ if (families.has(file)) return `platform:${identity(families.get(file))}`;
+ if (inSourceTree(id)) return `source:${source ?? identity(file)}`;
+ if (
+ !nodes.has(id) &&
+ path.isAbsolute(file) &&
+ !slash(file).includes('/node_modules/') &&
+ roots.some(([, root]) => inside(root, file))
+ ) {
+ throw new Error(
+ `Runtime source is outside the Vite graph; declare its package in wholeSourcePackages: ${file}`,
+ );
+ }
+ if (slash(id).includes('/node_modules/') || !nodes.has(id) || nodes.get(id)?.external)
+ return `package:${source ?? id}`;
+ if (exclusive.has(id)) return `platform:${identity(file)}`;
+ return undefined;
+ };
+ const summary = [];
+ for (const [id, node] of nodes) {
+ const file = sourceFile(id);
+ if (slash(id).includes('/node_modules/') || node.external) continue;
+ if (path.isAbsolute(file)) {
+ let dir = path.dirname(file);
+ const owner = roots.find(([, root]) => inside(root, dir));
+ if (!owner) throw new Error(`Main hash input is outside the source roots: ${file}`);
+ while (dir !== owner[1]) {
+ try {
+ await addFile(path.join(dir, 'package.json'), 'config');
+ break;
+ } catch (error) {
+ if (error.code !== 'ENOENT') throw error;
+ }
+ dir = path.dirname(dir);
+ }
+ }
+ if (exclusive.has(id) || inSourceTree(id)) {
+ if (path.isAbsolute(file)) await addFile(file, 'platform');
+ continue;
+ }
+ if (!node.retained || !node.ast) continue;
+ const record = createModuleRecord(node, { nodes, identity, opaque });
+ const name = `$graph/${label}/${identity(id)}`;
+ addValue(name, stableJson(record), 'runtime');
+ summary.push({
+ id: identity(id),
+ retained: true,
+ sha256: inputs.get(name).sha256,
+ bindings: record.bindings,
+ dynamicBindings: record.dynamicBindings,
+ effects: record.effects,
+ inlined: Object.keys(record.inlined),
+ fallback: Object.keys(record.fallback),
+ });
+ }
+ diagnostics.push({
+ label,
+ nodes: [...nodes.values()]
+ .map((node) => ({
+ id: identity(node.id),
+ imports: node.imports.map(identity),
+ dynamicImports: node.dynamicImports.map(identity),
+ retained: node.retained,
+ boundary: opaque(node.id)
+ ? exclusive.has(node.id)
+ ? 'platform'
+ : 'dependency'
+ : undefined,
+ codeHash: node.ast ? sha256(stableJson(node.ast)) : undefined,
+ }))
+ .sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0)),
+ modules: summary.sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0)),
+ });
+ for (const file of target.configFiles) await addFile(file, 'config');
+ addValue(`$defines/${label}`, stableJson(target.defines ?? {}), 'config');
}
- for (const relative of sourcePackages) await addTree(repoRoot, relative, 'workspace');
- for (const relative of ['src/main', 'src/preload', 'src/common', 'resources']) {
- await addTree(repoRoot, `apps/desktop/${relative}`, 'desktop');
+ for (const [dir, group] of sourceRoots) {
+ const owner = roots.find(([, root]) => inside(root, dir));
+ await addTree(owner[1], path.relative(owner[1], dir), group);
}
+ await addTree(repoRoot, 'apps/desktop/resources', 'desktop');
for (const [prefix, root] of roots) {
- for await (const binding of glob('packages/*/binding.gyp', { cwd: root })) {
- await addTree(root, path.dirname(binding), 'native');
- }
// Cloud's plugin helpers are loaded at config time, outside the application graph.
if (prefix === 'cloud') {
await addTree(root, 'scripts/cloud-desktop', 'config');
@@ -193,6 +338,7 @@ export async function collectSourceInputs({
'apps/desktop/external-runtime-deps.config.mjs',
'apps/desktop/module-deps.config.mjs',
'apps/desktop/scripts/mainHash.mjs',
+ 'apps/desktop/scripts/mainHashGraph.mjs',
]) {
await addFile(
path.join(repoRoot, file),
@@ -201,12 +347,13 @@ export async function collectSourceInputs({
}
await addTree(repoRoot, 'plugins/vite', 'config');
addValue('$public-key', publicKey.replaceAll('\r\n', '\n').trim(), 'metadata');
- return createInputManifest(inputs.values());
+ return { ...createInputManifest(inputs.values()), graph: diagnostics };
}
export async function computeMainHash() {
const desktopRoot = path.join(defaultRoot, 'apps/desktop');
const previous = process.env[collectEnv];
+ const previousPlatform = process.env.npm_config_platform;
process.env[collectEnv] = '1';
// Vite config messages must not contaminate the CLI hash on stdout.
const originalInfo = console.info;
@@ -216,19 +363,26 @@ export async function computeMainHash() {
let manifest;
try {
const graph = [];
- for (const target of ['main', 'preload']) {
- graph.push(
- await collectViteGraph({
- configFile: path.join(desktopRoot, `vite.${target}.config.ts`),
- mode: 'production',
- }),
- );
+ // All hosts inspect the same platform implementations, including unselected branches.
+ for (const platform of ['darwin', 'linux', 'win32']) {
+ process.env.npm_config_platform = platform;
+ for (const target of ['main', 'preload']) {
+ graph.push({
+ ...(await collectViteGraph({
+ configFile: path.join(desktopRoot, `vite.${target}.config.ts`),
+ mode: 'production',
+ })),
+ label: `${target}/${platform}`,
+ });
+ }
}
manifest = await collectSourceInputs({
cloudRoot: process.env.CLOUD_DESKTOP === '1' ? path.dirname(defaultRoot) : undefined,
graph,
});
} finally {
+ if (previousPlatform === undefined) delete process.env.npm_config_platform;
+ else process.env.npm_config_platform = previousPlatform;
console.info = originalInfo;
console.log = originalLog;
if (previous === undefined) delete process.env[collectEnv];
diff --git a/apps/desktop/scripts/mainHashGraph.mjs b/apps/desktop/scripts/mainHashGraph.mjs
new file mode 100644
index 00000000000..eb0a1e70678
--- /dev/null
+++ b/apps/desktop/scripts/mainHashGraph.mjs
@@ -0,0 +1,376 @@
+const name = (node) => node?.name ?? node?.value;
+const positions = new Set(['start', 'end', 'loc', 'raw']);
+const bindingNames = (pattern) => {
+ if (!pattern) return [];
+ if (pattern.type === 'Identifier') return [pattern.name];
+ if (pattern.type === 'RestElement') return bindingNames(pattern.argument);
+ if (pattern.type === 'AssignmentPattern') return bindingNames(pattern.left);
+ if (pattern.type === 'ArrayPattern') return pattern.elements.flatMap(bindingNames);
+ if (pattern.type === 'ObjectPattern')
+ return pattern.properties.flatMap((item) =>
+ bindingNames(item.type === 'RestElement' ? item.argument : item.value),
+ );
+ return [];
+};
+
+// Keep tree-shaking directives: moving a PURE annotation can change runtime behavior.
+export function parseModule(code, id, parseSync) {
+ const { program, comments, errors } = parseSync(id, code);
+ if (errors.length) throw new Error(`Cannot parse main hash module ${id}: ${errors[0].message}`);
+ const nodes = [];
+ const visit = (value) => {
+ if (!value || typeof value !== 'object') return;
+ if (typeof value.type === 'string') nodes.push(value);
+ for (const child of Object.values(value)) {
+ if (Array.isArray(child)) child.forEach(visit);
+ else visit(child);
+ }
+ };
+ visit(program);
+ const annotations = new Map();
+ for (const comment of comments) {
+ if (!/[@#]__(?:PURE|NO_SIDE_EFFECTS)__|@vite-/.test(comment.value)) continue;
+ const start = Math.min(
+ ...nodes.filter((node) => node.start >= comment.end).map((node) => node.start),
+ );
+ const target = Number.isFinite(start) ? start : program.start;
+ annotations.set(target, [...(annotations.get(target) ?? []), comment.value.trim()]);
+ }
+ return JSON.parse(
+ JSON.stringify(program, (key, value) => {
+ if (positions.has(key)) return undefined;
+ if (typeof value === 'bigint') return String(value);
+ if (value?.type && annotations.has(value.start)) {
+ return { ...value, annotations: annotations.get(value.start) };
+ }
+ return value;
+ }),
+ );
+}
+
+export function moduleRequests(ast) {
+ const requests = new Set();
+ const visit = (node) => {
+ if (!node || typeof node !== 'object') return;
+ if (node.source?.type === 'Literal' && typeof node.source.value === 'string') {
+ requests.add(node.source.value);
+ }
+ if (
+ node.type === 'CallExpression' &&
+ node.callee?.name === 'require' &&
+ node.arguments?.[0]?.type === 'Literal' &&
+ typeof node.arguments[0].value === 'string'
+ ) {
+ requests.add(node.arguments[0].value);
+ }
+ for (const value of Object.values(node)) {
+ if (Array.isArray(value)) value.forEach(visit);
+ else if (value && typeof value === 'object') visit(value);
+ }
+ };
+ visit(ast);
+ return [...requests];
+}
+
+export function walkGraph(nodes, starts, stops = new Set()) {
+ const seen = new Set();
+ const pending = [...starts];
+ while (pending.length) {
+ const id = pending.pop();
+ if (seen.has(id) || stops.has(id)) continue;
+ seen.add(id);
+ const node = nodes.get(id);
+ if (node) pending.push(...node.imports, ...node.dynamicImports);
+ }
+ return seen;
+}
+
+const pureExpression = (node) =>
+ !node || ['Literal', 'FunctionExpression', 'ArrowFunctionExpression'].includes(node.type);
+const hasOwnEffects = (ast) =>
+ ast.body.some((statement) => {
+ if (
+ [
+ 'ImportDeclaration',
+ 'ExportAllDeclaration',
+ 'EmptyStatement',
+ 'FunctionDeclaration',
+ ].includes(statement.type)
+ )
+ return false;
+ const declaration =
+ statement.type === 'ExportNamedDeclaration' ? statement.declaration : statement;
+ if (!declaration || declaration.type === 'FunctionDeclaration') return false;
+ if (declaration.type === 'VariableDeclaration')
+ return declaration.declarations.some((item) => !pureExpression(item.init));
+ return true;
+ });
+
+const namespaceReads = (ast, local) => {
+ const names = new Set();
+ let escapes = false;
+ const visit = (node, parent, grandparent) => {
+ if (!node || typeof node !== 'object' || node.type === 'ImportDeclaration') return;
+ if (node.type === 'Identifier' && node.name === local) {
+ const member = parent?.type === 'MemberExpression' && parent.object === node;
+ const property =
+ member &&
+ (!parent.computed
+ ? name(parent.property)
+ : parent.property.type === 'Literal'
+ ? parent.property.value
+ : undefined);
+ // Calling ns.method() exposes the entire namespace through `this`.
+ if (
+ typeof property !== 'string' ||
+ (grandparent?.type === 'CallExpression' && grandparent.callee === parent) ||
+ (grandparent?.type === 'TaggedTemplateExpression' && grandparent.tag === parent)
+ )
+ escapes = true;
+ else names.add(property);
+ }
+ for (const child of Object.values(node)) {
+ if (Array.isArray(child)) child.forEach((item) => visit(item, node, parent));
+ else if (child && typeof child === 'object') visit(child, node, parent);
+ }
+ };
+ visit(ast);
+ return escapes ? undefined : [...names].sort();
+};
+
+/**
+ * Resolve forwarding modules even when Rolldown omitted them from chunk.modules.
+ * Unsupported/cyclic bindings retain their source closure instead of assuming equality.
+ */
+export function createModuleRecord(node, { nodes, identity, opaque, seen = new Set() }) {
+ if (seen.has(node.id)) {
+ return {
+ cycle: Object.fromEntries(
+ [...walkGraph(nodes, [node.id])]
+ .filter((id) => !opaque(id) && nodes.get(id)?.ast)
+ .sort()
+ .map((id) => [identity(id), nodes.get(id).ast]),
+ ),
+ };
+ }
+ seen = new Set([...seen, node.id]);
+ const seenFallbacks = new Set();
+ const inlinedSources = new Set();
+ const terminal = (id, local) => {
+ // Constant folding can remove the contributing module from chunk.modules entirely.
+ if (!nodes.get(id)?.retained) inlinedSources.add(id);
+ return { module: identity(id), local };
+ };
+ const fallback = (id) => {
+ const files = [...walkGraph(nodes, [id])].filter(
+ (item) => !opaque(item) && nodes.get(item)?.ast,
+ );
+ for (const file of files) seenFallbacks.add(file);
+ return { fallback: identity(id) };
+ };
+ const request = (from, source) => {
+ const resolution = nodes.get(from)?.resolutions[source];
+ if (!resolution) throw new Error(`Unresolved main hash binding ${source} in ${from}`);
+ return resolution;
+ };
+ const exportNames = (id, seen = new Set()) => {
+ if (seen.has(id)) return [];
+ seen = new Set([...seen, id]);
+ const names = new Set();
+ for (const statement of nodes.get(id)?.ast?.body ?? []) {
+ if (statement.type === 'ExportDefaultDeclaration') names.add('default');
+ if (statement.type === 'ExportNamedDeclaration') {
+ for (const specifier of statement.specifiers) names.add(name(specifier.exported));
+ for (const binding of bindingNames(statement.declaration?.id)) names.add(binding);
+ for (const item of statement.declaration?.declarations ?? []) {
+ for (const binding of bindingNames(item.id)) names.add(binding);
+ }
+ }
+ if (statement.type === 'ExportAllDeclaration') {
+ if (statement.exported) names.add(name(statement.exported));
+ else {
+ const child = request(id, statement.source.value);
+ if (!opaque(child))
+ for (const binding of exportNames(child, seen)) {
+ if (binding !== 'default') names.add(binding);
+ }
+ }
+ }
+ }
+ return [...names].sort();
+ };
+ const imported = (from, source, exported, seen) => {
+ const id = request(from, source);
+ // Use the import spelling at package boundaries, not bundled/external IDs.
+ if (opaque(id)) return { module: opaque(id, source), exported };
+ return resolve(id, exported, seen);
+ };
+ const local = (id, binding, seen) => {
+ for (const statement of nodes.get(id)?.ast?.body ?? []) {
+ if (statement.type !== 'ImportDeclaration') continue;
+ const specifier = statement.specifiers.find((item) => name(item.local) === binding);
+ if (specifier)
+ return imported(
+ id,
+ statement.source.value,
+ specifier.type === 'ImportNamespaceSpecifier'
+ ? '*'
+ : specifier.type === 'ImportDefaultSpecifier'
+ ? 'default'
+ : name(specifier.imported),
+ seen,
+ );
+ }
+ return terminal(id, binding);
+ };
+ const resolve = (id, exported, seen = new Set()) => {
+ const key = `${id}\0${exported}`;
+ if (seen.has(key)) return fallback(id);
+ seen = new Set([...seen, key]);
+ const target = nodes.get(id);
+ if (!target?.ast) return fallback(id);
+ if (exported === '*') {
+ if (
+ target.ast.body.some(
+ (item) =>
+ item.type === 'ExportAllDeclaration' &&
+ !item.exported &&
+ opaque(request(id, item.source.value)),
+ )
+ )
+ return fallback(id);
+ const names = exportNames(id);
+ if (!names.length && target.inputFormat === 'cjs') return fallback(id);
+ return {
+ namespace: Object.fromEntries(names.map((item) => [item, resolve(id, item, seen)])),
+ };
+ }
+ for (const statement of target.ast.body) {
+ if (exported === 'default' && statement.type === 'ExportDefaultDeclaration') {
+ // A default expression is a value snapshot, unlike a live export specifier.
+ return target.retained ? { module: identity(id), exported } : fallback(id);
+ }
+ if (statement.type === 'ExportAllDeclaration' && name(statement.exported) === exported) {
+ return imported(id, statement.source.value, '*', seen);
+ }
+ if (statement.type !== 'ExportNamedDeclaration') continue;
+ const specifier = statement.specifiers.find((item) => name(item.exported) === exported);
+ if (specifier)
+ return statement.source
+ ? imported(id, statement.source.value, name(specifier.local), seen)
+ : local(id, name(specifier.local), seen);
+ const declaration = statement.declaration;
+ if (
+ bindingNames(declaration?.id).includes(exported) ||
+ declaration?.declarations?.some((item) => bindingNames(item.id).includes(exported))
+ ) {
+ return terminal(id, exported);
+ }
+ }
+ if (exported !== 'default') {
+ const matches = [];
+ for (const statement of target.ast.body) {
+ if (statement.type !== 'ExportAllDeclaration' || statement.exported) continue;
+ const child = request(id, statement.source.value);
+ if (opaque(child)) return fallback(id);
+ if (exportNames(child).includes(exported)) matches.push(resolve(child, exported, seen));
+ }
+ const unique = [...new Map(matches.map((item) => [JSON.stringify(item), item])).values()];
+ if (unique.length === 1) return unique[0];
+ }
+ return fallback(id);
+ };
+ const effects = (id, seen = new Set()) => {
+ if (seen.has(id)) return [];
+ seen.add(id);
+ const target = nodes.get(id);
+ if (!target?.ast) return [];
+ const result = [];
+ for (const statement of target.ast.body) {
+ if (
+ !statement.source ||
+ !['ImportDeclaration', 'ExportNamedDeclaration', 'ExportAllDeclaration'].includes(
+ statement.type,
+ )
+ )
+ continue;
+ const child = request(id, statement.source.value);
+ if (opaque(child)) result.push(opaque(child, statement.source.value));
+ else result.push(...effects(child, seen));
+ }
+ if (target.retained && hasOwnEffects(target.ast)) result.push(identity(id));
+ return [...new Set(result)];
+ };
+ const bindings = [];
+ for (const statement of node.ast.body) {
+ if (statement.type !== 'ImportDeclaration') continue;
+ for (const specifier of statement.specifiers) {
+ const selected =
+ specifier.type === 'ImportNamespaceSpecifier'
+ ? namespaceReads(node.ast, name(specifier.local))
+ : undefined;
+ bindings.push({
+ local: name(specifier.local),
+ origin: selected
+ ? {
+ namespace: Object.fromEntries(
+ selected.map((item) => [item, imported(node.id, statement.source.value, item)]),
+ ),
+ }
+ : imported(
+ node.id,
+ statement.source.value,
+ specifier.type === 'ImportNamespaceSpecifier'
+ ? '*'
+ : specifier.type === 'ImportDefaultSpecifier'
+ ? 'default'
+ : name(specifier.imported),
+ ),
+ });
+ }
+ }
+ const dynamicBindings = node.dynamicImports.map((id) => {
+ const source =
+ Object.keys(node.resolutions).find((key) => node.resolutions[key] === id) ?? identity(id);
+ return opaque(id) ? { module: opaque(id, source) } : resolve(id, '*');
+ });
+ const visit = (value) => {
+ if (!value || typeof value !== 'object') return;
+ if (value.type === 'ImportExpression' && typeof value.source?.value === 'string') {
+ dynamicBindings.push(imported(node.id, value.source.value, '*'));
+ }
+ if (
+ value.type === 'CallExpression' &&
+ value.callee?.name === 'require' &&
+ typeof value.arguments?.[0]?.value === 'string'
+ ) {
+ const source = value.arguments[0].value;
+ const child = request(node.id, source);
+ dynamicBindings.push(opaque(child) ? { module: opaque(child, source) } : fallback(child));
+ }
+ for (const child of Object.values(value)) {
+ if (Array.isArray(child)) child.forEach(visit);
+ else if (child && typeof child === 'object') visit(child);
+ }
+ };
+ visit(node.ast);
+ const exports = node.entry ? resolve(node.id, '*') : undefined;
+ return {
+ code: node.ast,
+ bindings,
+ dynamicBindings,
+ effects: effects(node.id),
+ exports,
+ inlined: Object.fromEntries(
+ [...inlinedSources]
+ .sort()
+ .map((id) => [
+ identity(id),
+ createModuleRecord(nodes.get(id), { nodes, identity, opaque, seen }),
+ ]),
+ ),
+ fallback: Object.fromEntries(
+ [...seenFallbacks].sort().map((id) => [identity(id), nodes.get(id).ast]),
+ ),
+ };
+}
diff --git a/apps/desktop/scripts/renderer-ota-test/README.md b/apps/desktop/scripts/renderer-ota-test/README.md
index 9a963b8eb6f..5a636511469 100644
--- a/apps/desktop/scripts/renderer-ota-test/README.md
+++ b/apps/desktop/scripts/renderer-ota-test/README.md
@@ -7,6 +7,7 @@
## 协议边界
- V2 客户端只访问 `/<channel>/<appVersion>/renderer/v2`,本地状态只写入 `renderer-ota-v2`。
+- 本地状态按 `renderer-ota-v2/<channel>/<appVersion>` 隔离:full 升级即使 mainHash 相同,也从新版本内置的 r0 开始,不复用旧版本的 current/staged/blacklist。
- `latest.json` / `versions/rN.json` 只负责选择 pack;目标文件 tree 与 delta 重建信息放在所选 ZIP 的 `meta.json` 中。
- 新构建不包含 V1 manifest/CAS 解析、URL fallback 或 pointer 迁移。
- 发布流程不会删除或覆盖远端既有 V1 feed/object;旧客户端继续停留在冻结的 V1 数据上。
@@ -64,7 +65,7 @@ node scripts/renderer-ota-test/serveOta.mjs /tmp/ota-feed 8787
- serveOta 日志:每次检查只下载一个 `packs/<sha256>.zip`;pack 内 `meta.json` 携带目标 tree,增量 pack 另含新增对象与 zstd dictionary patch
- 应用左下角出现「新版本已就绪,刷新即可使用」toast
- 点「立即刷新」: 窗口 reload (应用不重启), 改动的文案出现
-- `~/Library/Application Support/<dev userData>/renderer-ota-v2/stable/pointer.json`:
+- `~/Library/Application Support/<dev userData>/renderer-ota-v2/stable/<appVersion>/pointer.json`:
`current: "r1"`, 收到 boot ping 后 `pendingBootCheck: false`
- `versions/` 只留 current (+previous)
diff --git a/apps/desktop/src/main/core/infrastructure/rendererOta/RendererUpdateManager.ts b/apps/desktop/src/main/core/infrastructure/rendererOta/RendererUpdateManager.ts
index e6efb3d0b14..63781ef27bb 100644
--- a/apps/desktop/src/main/core/infrastructure/rendererOta/RendererUpdateManager.ts
+++ b/apps/desktop/src/main/core/infrastructure/rendererOta/RendererUpdateManager.ts
@@ -80,7 +80,8 @@ export class RendererUpdateManager {
}
private get otaDir() {
- return path.join(this.otaRootDir, this.activeChannel);
+ // Patch numbers restart at r0 for each full release, even when mainHash is unchanged.
+ return path.join(this.otaRootDir, this.activeChannel, APP_VERSION);
}
private get disabledReasons() {
diff --git a/apps/desktop/src/main/core/infrastructure/rendererOta/__tests__/RendererUpdateManager.int.test.ts b/apps/desktop/src/main/core/infrastructure/rendererOta/__tests__/RendererUpdateManager.int.test.ts
index 5827bb645c6..34a6650a56f 100644
--- a/apps/desktop/src/main/core/infrastructure/rendererOta/__tests__/RendererUpdateManager.int.test.ts
+++ b/apps/desktop/src/main/core/infrastructure/rendererOta/__tests__/RendererUpdateManager.int.test.ts
@@ -58,7 +58,8 @@ const makeApp = () => ({
storeManager: { get: vi.fn(() => 'stable') },
});
-const channelDir = (channel = 'stable') => path.join(userDataDir, 'renderer-ota-v2', channel);
+const channelDir = (channel = 'stable') =>
+ path.join(userDataDir, 'renderer-ota-v2', channel, APP_VERSION);
const signManifest = (unsigned: Omit<RendererManifest, 'signature'>): RendererManifest => ({
...unsigned,
@@ -188,6 +189,52 @@ afterEach(() => {
});
describe('RendererUpdateManager V2 lifecycle', () => {
+ it.each(['', '0.9.0'])(
+ 'ignores prior full-release state with the same mainHash (%s)',
+ async (version) => {
+ const oldDir = path.join(userDataDir, 'renderer-ota-v2', 'stable', version);
+ const oldEntry = path.join(oldDir, 'versions', 'r9', 'apps', 'desktop', 'index.html');
+ mkdirSync(path.dirname(oldEntry), { recursive: true });
+ writeFileSync(oldEntry, '<html>previous full release</html>');
+ writePointer(oldDir, {
+ ...emptyPointer(MAIN_HASH),
+ blacklist: ['r1'],
+ current: 'r9',
+ staged: 'r9',
+ });
+
+ const app = makeApp();
+ const manager = await loadManager(app);
+ manager.initialize();
+ expect(app.rendererUrlManager.setActiveRendererDir).toHaveBeenLastCalledWith(null);
+ expect(manager.getStatus()).toMatchObject({ current: null, staged: null });
+ expect(readFileSync(oldEntry, 'utf8')).toContain('previous full release');
+
+ stubFetch(
+ buildFeed('r0', {
+ 'apps/desktop/index.html': entryHtml('builtin'),
+ 'assets/entry-e2e.js': 'console.log("builtin")',
+ }),
+ );
+ await manager.checkForUpdates();
+ expect(app.browserManager.broadcastToAllWindows).not.toHaveBeenCalled();
+ expect(fetch).toHaveBeenCalledTimes(1);
+
+ stubFetch(
+ buildFeed('r1', {
+ 'apps/desktop/index.html': entryHtml('new patch'),
+ 'assets/entry-e2e.js': 'console.log("new patch")',
+ }),
+ );
+ await manager.checkForUpdates();
+ expect(manager.getStatus().staged).toBe('r1');
+ expect(app.browserManager.broadcastToAllWindows).toHaveBeenCalledWith('updateReady', {
+ kind: 'renderer',
+ version: APP_VERSION,
+ });
+ },
+ );
+
it('records both compatibility hashes and rejects the patch before downloading', async () => {
const app = makeApp();
const manager = await loadManager(app);
diff --git a/apps/desktop/vite.main.config.ts b/apps/desktop/vite.main.config.ts
index 488aba0262e..9a69da8dfec 100644
--- a/apps/desktop/vite.main.config.ts
+++ b/apps/desktop/vite.main.config.ts
@@ -126,6 +126,7 @@ export default defineConfig(async (env) => {
publicDir: false,
resolve: {
alias: mainProcessAlias,
+ dedupe: ['@sentry/electron'],
conditions: ['node'],
mainFields: ['module', 'jsnext:main', 'jsnext'],
},
diff --git a/apps/desktop/vite.preload.config.ts b/apps/desktop/vite.preload.config.ts
index 4865a62b0dd..33db9bf1e23 100644
--- a/apps/desktop/vite.preload.config.ts
+++ b/apps/desktop/vite.preload.config.ts
@@ -44,6 +44,7 @@ export default defineConfig(async (env) => {
publicDir: false,
resolve: {
alias: mainProcessAlias,
+ dedupe: ['@sentry/electron'],
},
root: __dirname,
ssr: {
diff --git a/apps/desktop/vite.sentry.test.ts b/apps/desktop/vite.sentry.test.ts
new file mode 100644
index 00000000000..19babb81d13
--- /dev/null
+++ b/apps/desktop/vite.sentry.test.ts
@@ -0,0 +1,49 @@
+import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';
+import { tmpdir } from 'node:os';
+import path from 'node:path';
+
+import { build, resolveConfig } from 'vite';
+import { expect, it, vi } from 'vitest';
+
+it.each(['main', 'preload'])('resolves Cloud Sentry imports from Desktop in %s', async (target) => {
+ const directory = await mkdtemp(path.join(tmpdir(), 'desktop-sentry-'));
+ vi.stubEnv('MAIN_HASH', '0'.repeat(64));
+ try {
+ const desktop = path.join(directory, 'desktop');
+ const cloud = path.join(directory, 'cloud');
+ for (const root of [desktop, cloud]) {
+ const pkg = path.join(root, 'node_modules/@sentry/electron');
+ await mkdir(pkg, { recursive: true });
+ await writeFile(
+ path.join(pkg, 'package.json'),
+ JSON.stringify({ exports: { './main': './index.js' }, name: '@sentry/electron' }),
+ );
+ await writeFile(path.join(pkg, 'index.js'), `export default ${JSON.stringify(root)};`);
+ }
+ const entry = path.join(cloud, 'entry.js');
+ await writeFile(entry, "export { default } from '@sentry/electron/main';");
+ const config = await resolveConfig(
+ { configFile: path.resolve(`vite.${target}.config.ts`) },
+ 'build',
+ 'development',
+ );
+ const result = await build({
+ build: { lib: { entry, formats: ['es'] }, minify: false, write: false },
+ configFile: false,
+ logLevel: 'silent',
+ resolve: config.resolve,
+ root: desktop,
+ });
+ const outputs = Array.isArray(result) ? result : [result];
+ const code = outputs
+ .flatMap((output) => ('output' in output ? output.output : []))
+ .filter((output) => output.type === 'chunk')
+ .map((output) => output.code)
+ .join('\n');
+ expect(code).toContain(desktop);
+ expect(code).not.toContain(cloud);
+ } finally {
+ vi.unstubAllEnvs();
+ await rm(directory, { force: true, recursive: true });
+ }
+});
diff --git a/apps/desktop/vite.shared.test.ts b/apps/desktop/vite.shared.test.ts
index 509449bd3dc..df2727503f9 100644
--- a/apps/desktop/vite.shared.test.ts
+++ b/apps/desktop/vite.shared.test.ts
@@ -1,4 +1,4 @@
-import { mkdtemp, rm, writeFile } from 'node:fs/promises';
+import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import path from 'node:path';
@@ -44,6 +44,38 @@ describe('applyDesktopViteConfigExtension', () => {
expect(config.define).toEqual({ __TEST_TARGET__: '"main"' });
});
+
+ it('loads Cloud build tools from the locked Desktop installation', async () => {
+ const directory = await mkdtemp(path.join(tmpdir(), 'lobe-cloud-tools-'));
+ temporaryDirectories.push(directory);
+ for (const name of ['@sentry/vite-plugin', 'magic-string']) {
+ const pkg = path.join(directory, 'node_modules', name);
+ await mkdir(pkg, { recursive: true });
+ await writeFile(path.join(pkg, 'package.json'), JSON.stringify({ main: 'index.js', name }));
+ await writeFile(
+ path.join(pkg, 'index.js'),
+ 'throw new Error("Loaded unlocked Cloud dependency");',
+ );
+ }
+ const extensionPath = path.join(directory, 'extension.mts');
+ await writeFile(
+ extensionPath,
+ `
+ import { sentryVitePlugin } from '@sentry/vite-plugin';
+ import MagicString from 'magic-string';
+ export const extendDesktopViteConfig = ({ config }) => ({
+ ...config, define: { tool: typeof sentryVitePlugin, text: new MagicString('locked').toString() },
+ });
+ `,
+ );
+ vi.stubEnv('LOBE_DESKTOP_VITE_CONFIG_EXTENSION', extensionPath);
+ const config = await applyDesktopViteConfigExtension(
+ 'main',
+ {},
+ { command: 'build', mode: 'development' },
+ );
+ expect(config.define).toEqual({ tool: 'function', text: 'locked' });
+ });
});
describe('reactDevtoolsPlugin', () => {
diff --git a/apps/desktop/vite.shared.ts b/apps/desktop/vite.shared.ts
index 87956ab002b..8c98b328786 100644
--- a/apps/desktop/vite.shared.ts
+++ b/apps/desktop/vite.shared.ts
@@ -107,7 +107,12 @@ export const applyDesktopViteConfigExtension = async (
const { module: extensionModule } = await runnerImport<DesktopViteConfigExtensionModule>(
extensionPath,
- { configFile: false, root: path.dirname(extensionPath) },
+ {
+ configFile: false,
+ // The module runner resolves these build tools from Desktop's frozen installation.
+ resolve: { dedupe: ['@sentry/vite-plugin', 'magic-string'] },
+ root: DESKTOP_DIR,
+ },
);
if (typeof extensionModule.extendDesktopViteConfig !== 'function') {
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 9dbbd78ed8c..6b138d73da2 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -40,6 +40,7 @@ childConcurrency: 1
allowBuilds:
'@google/genai': true
'@lobehub/editor': true
+ '@sentry/cli': true
'@vercel/speed-insights': true
core-js: false
es5-ext: false