@acryldev/blends 1.7.18 → 1.7.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/pack/pack-blank-mac.mjs
CHANGED
|
@@ -483,10 +483,14 @@ if (shell === undefined)
|
|
|
483
483
|
throw new Error(
|
|
484
484
|
`pack-blank-mac: ${app} has no desktop shell (plugins/desktop-shell, or the @acryldev/desktop-shell package)`,
|
|
485
485
|
)
|
|
486
|
+
// The app's own icon, else ACRYL Blends' (the published desktop-shell carries it in lib/assets, its source in assets). Without one, electron-builder
|
|
487
|
+
// silently used Electron's own icon on every OS.
|
|
486
488
|
const appIcon = [
|
|
487
489
|
join(app, 'assets', 'icon.png'),
|
|
490
|
+
join(shell.root, 'lib', 'assets', 'acrylblends-logo.png'),
|
|
488
491
|
join(shell.root, 'assets', 'acrylblends-logo.png'),
|
|
489
492
|
].find((file) => existsSync(file))
|
|
493
|
+
if (appIcon === undefined) throw new Error(`no icon: neither ${join(app, 'assets', 'icon.png')} nor ACRYL Blends' logo in ${shell.root}`)
|
|
490
494
|
manifest.main = shell.main
|
|
491
495
|
manifest.productName = PRODUCT
|
|
492
496
|
manifest.description = DESCRIPTION
|
package/package.json
CHANGED
|
@@ -11,7 +11,17 @@
|
|
|
11
11
|
import { mkdirSync, readFileSync, unwatchFile, watchFile } from 'node:fs'
|
|
12
12
|
import { join } from 'node:path'
|
|
13
13
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
app,
|
|
16
|
+
BrowserWindow,
|
|
17
|
+
dialog,
|
|
18
|
+
ipcMain,
|
|
19
|
+
Menu,
|
|
20
|
+
MenuItem,
|
|
21
|
+
screen,
|
|
22
|
+
session,
|
|
23
|
+
shell,
|
|
24
|
+
} from 'electron'
|
|
15
25
|
import '@acryldev/node-server/register'
|
|
16
26
|
import { type AppInstance, instanceEnv, selectInstance, withRunEnv } from '@acryldev/instance'
|
|
17
27
|
import { readProduct } from '@acryldev/instance/bundle'
|
|
@@ -126,8 +136,17 @@ if (!app.requestSingleInstanceLock()) {
|
|
|
126
136
|
await running?.stop()
|
|
127
137
|
// The frame host this window started (never one it attached to) goes with the window, with every terminal it runs.
|
|
128
138
|
await host?.stop()
|
|
139
|
+
// What the window stored is written now: the process may end at `quit`, before Chromium's own late teardown would write it.
|
|
140
|
+
session.defaultSession.flushStorageData()
|
|
141
|
+
await session.defaultSession.cookies.flushStore()
|
|
129
142
|
},
|
|
130
143
|
(code) => {
|
|
144
|
+
// Electron emits `quit` as its last step and then ends its message loop; on macOS that loop sometimes keeps running with nothing left (no
|
|
145
|
+
// window, no helper process, every disposer done), about one SIGTERM in six for ACRYL ADE, so the process stayed up forever. It ends here
|
|
146
|
+
// instead. process.exit in Electron's main process goes back into app.exit, which is already under way; reallyExit is Node's plain exit.
|
|
147
|
+
app.once('quit', () => {
|
|
148
|
+
;(process as NodeJS.Process & { reallyExit(code: number): never }).reallyExit(code)
|
|
149
|
+
})
|
|
131
150
|
app.exit(code)
|
|
132
151
|
},
|
|
133
152
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acryldev/desktop-shell",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Run the app as a desktop app: an Electron window on the app's own server. `npm run desktop`; the app's code never imports electron.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|