@acryldev/blends 1.7.29 → 1.7.31
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/dist/index.js +3 -3
- package/lib/cordis/door.js +2 -2
- package/lib/door/host.js +1 -1
- package/lib/door/page.js +1 -1
- package/lib/door/protocol.js +1 -1
- package/lib/{protocol-BKXK53WF.js → protocol-Cfnz5uE-.js} +1 -0
- package/lib/{snapshot-text-BYY2gA98.js → snapshot-text-Dnofdwyl.js} +1 -1
- package/pack/lib/os-version.mjs +20 -7
- package/pack/pack-blank-mac.mjs +6 -4
- package/package.json +1 -1
- package/plugins/door/src/page/protocol.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ var packages = {
|
|
|
47
47
|
"path": "../plugins/app-shell"
|
|
48
48
|
},
|
|
49
49
|
"@acryldev/workspace": {
|
|
50
|
-
"version": "0.2.
|
|
50
|
+
"version": "0.2.5",
|
|
51
51
|
"path": "../plugins/workspace"
|
|
52
52
|
},
|
|
53
53
|
"@acryldev/settings": {
|
|
@@ -55,7 +55,7 @@ var packages = {
|
|
|
55
55
|
"path": "../plugins/settings"
|
|
56
56
|
},
|
|
57
57
|
"@acryldev/sign-in": {
|
|
58
|
-
"version": "0.2.
|
|
58
|
+
"version": "0.2.4",
|
|
59
59
|
"path": "../plugins/sign-in"
|
|
60
60
|
},
|
|
61
61
|
"@acryldev/control": {
|
|
@@ -95,7 +95,7 @@ var packages = {
|
|
|
95
95
|
"path": "../plugins/versions"
|
|
96
96
|
},
|
|
97
97
|
"@acryldev/blends-frame": {
|
|
98
|
-
"version": "0.2.
|
|
98
|
+
"version": "0.2.17",
|
|
99
99
|
"path": "../plugins/blends-frame"
|
|
100
100
|
}
|
|
101
101
|
};
|
package/lib/cordis/door.js
CHANGED
|
@@ -3,8 +3,8 @@ import { r as streamSSE } from "../streaming-CL2i3hX_.js";
|
|
|
3
3
|
import { o as pageAuthority } from "../loopback-only-0nTL30Zt.js";
|
|
4
4
|
import "../helpers-qmReU164.js";
|
|
5
5
|
import { n as clientModules } from "../client-modules-ChLgW0l9.js";
|
|
6
|
-
import { a as MAX_SNAPSHOT_NODES, d as UiControlError, f as WINDOW_ID, h as parseUiRequest, p as parseChannelToHost, s as MAX_WAIT_MS } from "../protocol-
|
|
7
|
-
import { a as INVALID_JSON, c as operatorOnly, d as AuditLog, f as auditPath, i as DOOR_PREFIX, l as privateApi, o as error, p as UiChannel, r as pageChannelRoutes, s as jsonBody, t as renderSnapshot, u as readJson } from "../snapshot-text-
|
|
6
|
+
import { a as MAX_SNAPSHOT_NODES, d as UiControlError, f as WINDOW_ID, h as parseUiRequest, p as parseChannelToHost, s as MAX_WAIT_MS } from "../protocol-Cfnz5uE-.js";
|
|
7
|
+
import { a as INVALID_JSON, c as operatorOnly, d as AuditLog, f as auditPath, i as DOOR_PREFIX, l as privateApi, o as error, p as UiChannel, r as pageChannelRoutes, s as jsonBody, t as renderSnapshot, u as readJson } from "../snapshot-text-Dnofdwyl.js";
|
|
8
8
|
import "../src-BycZ1HUQ.js";
|
|
9
9
|
import "../middleware-B8gJUDgl.js";
|
|
10
10
|
import { isAbsolute, join, relative, resolve } from "node:path";
|
package/lib/door/host.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as AuditLog, f as auditPath, n as HEARTBEAT_MS, p as UiChannel, r as pageChannelRoutes, t as renderSnapshot } from "../snapshot-text-
|
|
1
|
+
import { d as AuditLog, f as auditPath, n as HEARTBEAT_MS, p as UiChannel, r as pageChannelRoutes, t as renderSnapshot } from "../snapshot-text-Dnofdwyl.js";
|
|
2
2
|
export { AuditLog, HEARTBEAT_MS, UiChannel, auditPath, pageChannelRoutes, renderSnapshot };
|
package/lib/door/page.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MAX_SNAPSHOT_NODES, c as MUTATING_OPS, d as UiControlError, m as parseChannelToPage, s as MAX_WAIT_MS } from "../protocol-
|
|
1
|
+
import { a as MAX_SNAPSHOT_NODES, c as MUTATING_OPS, d as UiControlError, m as parseChannelToPage, s as MAX_WAIT_MS } from "../protocol-Cfnz5uE-.js";
|
|
2
2
|
//#region ../../../plugins/door/src/page/socket-source.ts
|
|
3
3
|
function socketSource(socket) {
|
|
4
4
|
const listeners = /* @__PURE__ */ new Map();
|
package/lib/door/protocol.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MAX_SNAPSHOT_NODES, c as MUTATING_OPS, d as UiControlError, f as WINDOW_ID, h as parseUiRequest, i as FRAME_CONTROL_KEY, l as UI_ERROR_CODES, m as parseChannelToPage, n as DEFAULT_SNAPSHOT_NODES, o as MAX_TEXT_LENGTH, p as parseChannelToHost, r as FRAME_ACTIONS, s as MAX_WAIT_MS, t as APP_PATH, u as UI_OPS } from "../protocol-
|
|
1
|
+
import { a as MAX_SNAPSHOT_NODES, c as MUTATING_OPS, d as UiControlError, f as WINDOW_ID, h as parseUiRequest, i as FRAME_CONTROL_KEY, l as UI_ERROR_CODES, m as parseChannelToPage, n as DEFAULT_SNAPSHOT_NODES, o as MAX_TEXT_LENGTH, p as parseChannelToHost, r as FRAME_ACTIONS, s as MAX_WAIT_MS, t as APP_PATH, u as UI_OPS } from "../protocol-Cfnz5uE-.js";
|
|
2
2
|
export { APP_PATH, DEFAULT_SNAPSHOT_NODES, FRAME_ACTIONS, FRAME_CONTROL_KEY, MAX_SNAPSHOT_NODES, MAX_TEXT_LENGTH, MAX_WAIT_MS, MUTATING_OPS, UI_ERROR_CODES, UI_OPS, UiControlError, WINDOW_ID, parseChannelToHost, parseChannelToPage, parseUiRequest };
|
|
@@ -64,6 +64,7 @@ const invalid = (message) => {
|
|
|
64
64
|
throw new UiControlError("invalid", message);
|
|
65
65
|
};
|
|
66
66
|
function ref(value) {
|
|
67
|
+
if (value === void 0) return invalid("ref is missing: name the element by its ref from the latest look (like 3.17; on the command line --ref 3.17)");
|
|
67
68
|
if (typeof value !== "string" || !REF.test(value)) return invalid("ref must look like 3.17, from the latest snapshot");
|
|
68
69
|
return value;
|
|
69
70
|
}
|
|
@@ -4,7 +4,7 @@ import { t as methodNotAllowed } from "./method-not-allowed-B3nMAp1f.js";
|
|
|
4
4
|
import { r as streamSSE } from "./streaming-CL2i3hX_.js";
|
|
5
5
|
import { a as loopbackOnly, i as loopbackAuthority } from "./loopback-only-0nTL30Zt.js";
|
|
6
6
|
import "./helpers-qmReU164.js";
|
|
7
|
-
import { d as UiControlError, f as WINDOW_ID, p as parseChannelToHost } from "./protocol-
|
|
7
|
+
import { d as UiControlError, f as WINDOW_ID, p as parseChannelToHost } from "./protocol-Cfnz5uE-.js";
|
|
8
8
|
import "./src-BycZ1HUQ.js";
|
|
9
9
|
import "./middleware-B8gJUDgl.js";
|
|
10
10
|
import { dirname, join } from "node:path";
|
package/pack/lib/os-version.mjs
CHANGED
|
@@ -19,25 +19,38 @@ export function osVersion(packageVersion, blendVersion) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* blend.yaml's text with `metadata
|
|
23
|
-
*
|
|
24
|
-
* is returned as it is.
|
|
22
|
+
* blend.yaml's text with `metadata.<key>` set to `value` (added under `metadata:` when missing), the rest of the text untouched. Without a `metadata:`
|
|
23
|
+
* block the text is returned as it is.
|
|
25
24
|
*/
|
|
26
|
-
|
|
25
|
+
function withMetadataField(text, key, value) {
|
|
27
26
|
const lines = text.split('\n')
|
|
28
27
|
const start = lines.findIndex((line) => /^metadata:\s*(#.*)?$/u.test(line))
|
|
29
28
|
if (start === -1) return text
|
|
30
29
|
let end = lines.findIndex((line, index) => index > start && /^\S/u.test(line))
|
|
31
30
|
if (end === -1) end = lines.length
|
|
32
31
|
const at = lines.findIndex(
|
|
33
|
-
(line, index) => index > start && index < end &&
|
|
32
|
+
(line, index) => index > start && index < end && new RegExp(`^\\s+${key}:`, 'u').test(line),
|
|
34
33
|
)
|
|
35
34
|
const indent =
|
|
36
35
|
lines
|
|
37
36
|
.slice(start + 1, end)
|
|
38
37
|
.find((line) => /^\s+\S/u.test(line))
|
|
39
38
|
?.match(/^\s+/u)?.[0] ?? ' '
|
|
40
|
-
if (at === -1) lines.splice(start + 1, 0, `${indent}
|
|
41
|
-
else lines[at] = `${lines[at].match(/^\s+/u)[0]}
|
|
39
|
+
if (at === -1) lines.splice(start + 1, 0, `${indent}${key}: ${value}`)
|
|
40
|
+
else lines[at] = `${lines[at].match(/^\s+/u)[0]}${key}: ${value}`
|
|
42
41
|
return lines.join('\n')
|
|
43
42
|
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* blend.yaml's text with `metadata.version` set to `version`. The packed copy carries the version the OS shows, so the frame's top bar, the About
|
|
46
|
+
* window and Installed apps name the same one.
|
|
47
|
+
*/
|
|
48
|
+
export const withManifestVersion = (text, version) => withMetadataField(text, 'version', version)
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* blend.yaml's text with `metadata.name` set to the product's name, as a JSON string (a name may hold a colon or a quote). The packed copy is the
|
|
52
|
+
* scaffold's, named for its folder (`blend`); the instance names an app by this field, so the window's title, the About panel and the Dock say the
|
|
53
|
+
* product ("ACRYL Control Center").
|
|
54
|
+
*/
|
|
55
|
+
export const withManifestName = (text, name) =>
|
|
56
|
+
withMetadataField(text, 'name', JSON.stringify(name))
|
package/pack/pack-blank-mac.mjs
CHANGED
|
@@ -35,7 +35,7 @@ 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
37
|
import { DEB_DEPENDS, debPackageName } from './lib/deb.mjs'
|
|
38
|
-
import { osVersion, withManifestVersion } from './lib/os-version.mjs'
|
|
38
|
+
import { osVersion, withManifestName, withManifestVersion } from './lib/os-version.mjs'
|
|
39
39
|
|
|
40
40
|
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
|
41
41
|
/**
|
|
@@ -552,11 +552,13 @@ const blendVersion = await (async () => {
|
|
|
552
552
|
}
|
|
553
553
|
})()
|
|
554
554
|
manifest.version = osVersion(manifest.version, blendVersion)
|
|
555
|
-
// The
|
|
556
|
-
|
|
555
|
+
// The packed blend.yaml is the scaffold's: it names the version the OS shows (the frame's top bar reads it, a release sets only package.json's) and the
|
|
556
|
+
// product (the instance names the app, so the window's title and the About panel, by it).
|
|
557
|
+
if (existsSync(join(app, 'blend.yaml'))) {
|
|
558
|
+
const written = readFileSync(join(app, 'blend.yaml'), 'utf8')
|
|
557
559
|
writeFileSync(
|
|
558
560
|
join(app, 'blend.yaml'),
|
|
559
|
-
withManifestVersion(
|
|
561
|
+
withManifestName(withManifestVersion(written, manifest.version), PRODUCT),
|
|
560
562
|
)
|
|
561
563
|
}
|
|
562
564
|
log(
|
package/package.json
CHANGED
|
@@ -140,6 +140,7 @@ const isRecord = (value: unknown): value is Record<string, unknown> => value !==
|
|
|
140
140
|
const invalid = (message: string): never => { throw new UiControlError('invalid', message) }
|
|
141
141
|
|
|
142
142
|
function ref(value: unknown): string {
|
|
143
|
+
if (value === undefined) return invalid('ref is missing: name the element by its ref from the latest look (like 3.17; on the command line --ref 3.17)')
|
|
143
144
|
if (typeof value !== 'string' || !REF.test(value)) return invalid('ref must look like 3.17, from the latest snapshot')
|
|
144
145
|
return value
|
|
145
146
|
}
|