@acryldev/blends 1.7.23 → 1.7.25
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/lib/deb.mjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the .deb of a packed app says about itself. electron-builder takes the package name from package.json's `name` (a Blend's is `blend`, the same for
|
|
3
|
+
* every product, so Control Center, ADE and SDE replaced one another and collided with any other `blend` package) and a default `Depends` without the
|
|
4
|
+
* sound library Electron loads at start (an installed app on a machine without it died with "libasound.so.2: cannot open shared object file").
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The Debian package name of a product: lower case letters, digits, `+`, `-` and `.`, at least two characters, starting with a letter or digit
|
|
9
|
+
* (Debian Policy 5.6.1). "ACRYL Control Center" and "acryl-control-center" both give `acryl-control-center`.
|
|
10
|
+
*/
|
|
11
|
+
export function debPackageName(product) {
|
|
12
|
+
const name = String(product ?? '')
|
|
13
|
+
.toLowerCase()
|
|
14
|
+
.replace(/[^a-z0-9+.]+/gu, '-')
|
|
15
|
+
.replace(/^[^a-z0-9]+|-+$/gu, '')
|
|
16
|
+
if (name.length < 2)
|
|
17
|
+
throw new Error(`no Debian package name can be made from ${JSON.stringify(product)}`)
|
|
18
|
+
return name
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The libraries Electron needs on a Debian or Ubuntu machine: electron-builder's own list, which a `depends` option replaces, and the sound library
|
|
23
|
+
* under both its names (`libasound2t64` from Ubuntu 24.04 and Debian 13, `libasound2` before).
|
|
24
|
+
*/
|
|
25
|
+
export const DEB_DEPENDS = [
|
|
26
|
+
'libgtk-3-0',
|
|
27
|
+
'libnotify4',
|
|
28
|
+
'libnss3',
|
|
29
|
+
'libxss1',
|
|
30
|
+
'libxtst6',
|
|
31
|
+
'xdg-utils',
|
|
32
|
+
'libatspi2.0-0',
|
|
33
|
+
'libuuid1',
|
|
34
|
+
'libsecret-1-0',
|
|
35
|
+
'libasound2t64 | libasound2',
|
|
36
|
+
]
|
package/pack/pack-blank-mac.mjs
CHANGED
|
@@ -34,6 +34,7 @@ import { basename, dirname, join, resolve } from 'node:path'
|
|
|
34
34
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
35
35
|
import { desktopEntry, launcherScript, tarballName } from './lib/arch-linux.mjs'
|
|
36
36
|
import { createSource, repositoryOnlyIn } from './lib/create-source.mjs'
|
|
37
|
+
import { DEB_DEPENDS, debPackageName } from './lib/deb.mjs'
|
|
37
38
|
import { osVersion } from './lib/os-version.mjs'
|
|
38
39
|
|
|
39
40
|
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
|
@@ -529,6 +530,9 @@ manifest.build = {
|
|
|
529
530
|
// One name for the program on every Linux: the .deb's, the tarball's launcher and the PKGBUILD's (acryl-control-center).
|
|
530
531
|
executableName: EXE,
|
|
531
532
|
},
|
|
533
|
+
// The .deb is named after the product (acryl-control-center), not after package.json's `name` (`blend` for every Blend), and depends on the sound library
|
|
534
|
+
// Electron loads at start (lib/deb.mjs).
|
|
535
|
+
deb: { packageName: debPackageName(EXE), depends: DEB_DEPENDS },
|
|
532
536
|
...(platform === 'mac' ? { afterPack: join(work, 'seal-bundle.cjs') } : {}),
|
|
533
537
|
}
|
|
534
538
|
// A Debian package names its maintainer and the app's home page; electron-builder reads both from the manifest.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acryldev/plugin-share",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Share plugins between people. Pull one someone released into the running app: fetched without running anything, checked by digest and for every OS, then installed live. Publish one, only as a plan a person confirmed.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,7 +34,9 @@ test('serves the index route: the first screen to a browser, the JSON hello to a
|
|
|
34
34
|
withApp(async (app) => {
|
|
35
35
|
const api = await app.root.router.request(`/`)
|
|
36
36
|
assert.equal(api.status, 200)
|
|
37
|
-
|
|
37
|
+
// The app answers with its instance's name: the folder's or the package's, which `create-acrylblends --from` and a WebBox change after the app was written.
|
|
38
|
+
const appName = app.root.get('appInstance')?.name ?? APP_NAME
|
|
39
|
+
assert.deepEqual(await api.json(), { app: appName, ok: true })
|
|
38
40
|
const page = await app.root.router.request(`/`, {
|
|
39
41
|
headers: { accept: 'text/html,application/xhtml+xml,*/*;q=0.8' },
|
|
40
42
|
})
|
|
@@ -42,7 +44,7 @@ test('serves the index route: the first screen to a browser, the JSON hello to a
|
|
|
42
44
|
assert.match(page.headers.get('content-type') ?? '', /text\/html/)
|
|
43
45
|
const html = await page.text()
|
|
44
46
|
// The ACRYL frame's first tile asks for a page: the root must never hand it JSON (Chrome's viewer is nearly invisible in the dark frame).
|
|
45
|
-
assert.ok(html.includes(`<h1>${
|
|
47
|
+
assert.ok(html.includes(`<h1>${appName}</h1>`), 'the page names the app')
|
|
46
48
|
assert.ok(html.includes('href="./about"'), 'the page links to About relatively')
|
|
47
49
|
}))
|
|
48
50
|
|