herdr-remote 0.2.38 → 0.2.39
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.
|
@@ -2,9 +2,8 @@ import { execFileSync } from 'node:child_process';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import net from 'node:net';
|
|
4
4
|
import path from 'node:path';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
5
|
import { PtySession } from '../pty-session.js';
|
|
7
|
-
import { stateDir } from '../paths.js';
|
|
6
|
+
import { PACKAGE_ROOT, stateDir } from '../paths.js';
|
|
8
7
|
import { ADMIN_BROKER_MAX_MESSAGE_BYTES, adminBrokerTaskName, adminBrokerTokenMatches, connectAdminBroker, listenAdminBroker, publishAdminBrokerEndpoint, sendAdminBrokerMessage, } from './adminBrokerEndpoint.js';
|
|
9
8
|
const BROKER_PING_TIMEOUT_MS = 1_000;
|
|
10
9
|
const BROKER_START_TIMEOUT_MS = 5_000;
|
|
@@ -34,7 +33,9 @@ function runPowerShell(script, t) {
|
|
|
34
33
|
}
|
|
35
34
|
/** Registers and starts the broker's logon task; run elevated. */
|
|
36
35
|
export function adminBrokerTaskScript() {
|
|
37
|
-
|
|
36
|
+
// Not this module's own URL: a release bundles it into a shared chunk, and
|
|
37
|
+
// only this entry point runs the broker when started.
|
|
38
|
+
const brokerPath = path.join(PACKAGE_ROOT, 'dist', 'connector', 'admin-broker.js');
|
|
38
39
|
// Pinned so the broker publishes its endpoint where this install's callers look.
|
|
39
40
|
const brokerCommand = `$env:HERDR_REMOTE_STATE_DIR = ${powershellQuote(stateDir())}; & ${powershellQuote(process.execPath)} ${powershellQuote(brokerPath)}`;
|
|
40
41
|
const encodedBrokerCommand = Buffer.from(brokerCommand, 'utf16le').toString('base64');
|
package/dist/font-subset.js
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { createRequire } from 'node:module';
|
|
16
16
|
import fs from 'node:fs';
|
|
17
|
+
import path from 'node:path';
|
|
18
|
+
import { PACKAGE_ROOT } from './paths.js';
|
|
17
19
|
/** How long a loaded font may sit unused before its memory is released. */
|
|
18
20
|
const IDLE_RELEASE_MS = 60_000;
|
|
19
21
|
/** Never cut more than this many characters in one go. */
|
|
@@ -22,7 +24,11 @@ const HB_MEMORY_MODE_READONLY = 1;
|
|
|
22
24
|
let wasmModule = null;
|
|
23
25
|
function loadModule() {
|
|
24
26
|
if (!wasmModule) {
|
|
25
|
-
|
|
27
|
+
// A release bundles harfbuzzjs away and ships only this file beside the bundle.
|
|
28
|
+
const bundled = path.join(PACKAGE_ROOT, 'dist', 'harfbuzz-subset.wasm');
|
|
29
|
+
const file = fs.existsSync(bundled)
|
|
30
|
+
? bundled
|
|
31
|
+
: createRequire(import.meta.url).resolve('harfbuzzjs/dist/harfbuzz-subset.wasm');
|
|
26
32
|
wasmModule = new WebAssembly.Module(fs.readFileSync(file));
|
|
27
33
|
}
|
|
28
34
|
return wasmModule;
|
package/herdr-plugin.toml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "herdr-remote",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.39",
|
|
4
4
|
"description": "Browser access to Herdr workspaces: plugin, host connector, and configuration TUI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"harfbuzzjs": "^1.6.2",
|
|
48
|
-
"herdr-remote-relay": "0.3.
|
|
48
|
+
"herdr-remote-relay": "0.3.30",
|
|
49
49
|
"ink": "^7.1.1",
|
|
50
50
|
"node-pty": "^1.1.0",
|
|
51
51
|
"qrcode": "^1.5.4",
|