@acryldev/blends 1.7.22 → 1.7.24

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.
@@ -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
+ ]
@@ -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/blends",
3
- "version": "1.7.22",
3
+ "version": "1.7.24",
4
4
  "description": "The Acryl web framework (import { Acryl } from \"acrylblends\") and the acrylblends command that scaffolds Cordis apps.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/plugin-share",
3
- "version": "0.1.5",
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": {