lg-dev-manager-bridge 1.0.2 → 1.0.3

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/README.md CHANGED
@@ -188,6 +188,12 @@ pnpm app # the standalone app for this computer → apps/bridge/relea
188
188
  `tools/mock-tv` fakes webOS TVs (SSH, luna-send, key server, logs) so everything can be tested without a TV.
189
189
  Contributors, human or AI: read [AGENTS.md](https://github.com/Scoty/lg-dev-manager/blob/main/AGENTS.md) and [PLAN.md](https://github.com/Scoty/lg-dev-manager/blob/main/PLAN.md) first.
190
190
 
191
+ ## 🙋 Problems and ideas
192
+
193
+ [Open an issue](https://github.com/Scoty/lg-dev-manager/issues/new/choose): there are forms for bugs, connection
194
+ problems and feature requests that ask for what helps track a problem down. Security problems: please report them
195
+ privately (see the [security policy](https://github.com/Scoty/lg-dev-manager/security/policy)).
196
+
191
197
  ## 📄 License
192
198
 
193
199
  [Apache-2.0](https://github.com/Scoty/lg-dev-manager/blob/main/LICENSE). You may use, change and share the app and its code freely, including commercially, as long
package/dist/cli.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/config.ts
4
- import { randomBytes } from "crypto";
5
- import { chmodSync, existsSync as existsSync2, mkdirSync, readFileSync, renameSync, writeFileSync } from "fs";
6
- import { fileURLToPath as fileURLToPath2 } from "url";
7
- import { homedir } from "os";
8
- import { join } from "path";
4
+ import { randomBytes } from "node:crypto";
5
+ import { chmodSync, existsSync as existsSync2, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
6
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
7
+ import { homedir } from "node:os";
8
+ import { join } from "node:path";
9
9
 
10
10
  // ../../packages/protocol/src/envelope.ts
11
11
  import { z } from "zod";
@@ -743,9 +743,9 @@ var REPO_URL = "https://github.com/Scoty/lg-dev-manager";
743
743
  var RELEASES_URL = `${REPO_URL}/releases/latest`;
744
744
 
745
745
  // src/standalone.ts
746
- import { existsSync } from "fs";
747
- import { fileURLToPath } from "url";
748
- import * as sea from "sea";
746
+ import { existsSync } from "node:fs";
747
+ import { fileURLToPath } from "node:url";
748
+ import * as sea from "node:sea";
749
749
  function isStandalone() {
750
750
  try {
751
751
  return sea.isSea();
@@ -868,7 +868,7 @@ function parseArgs(argv) {
868
868
  }
869
869
 
870
870
  // src/server.ts
871
- import { createServer } from "http";
871
+ import { createServer } from "node:http";
872
872
  import { WebSocketServer } from "ws";
873
873
 
874
874
  // src/rpc/errors.ts
@@ -886,16 +886,16 @@ var RpcError = class extends Error {
886
886
  };
887
887
 
888
888
  // src/rpc/handlers.ts
889
- import { StringDecoder as StringDecoder3 } from "string_decoder";
890
- import { timingSafeEqual } from "crypto";
891
- import { platform } from "os";
892
- import { randomUUID as randomUUID2 } from "crypto";
889
+ import { StringDecoder as StringDecoder3 } from "node:string_decoder";
890
+ import { timingSafeEqual } from "node:crypto";
891
+ import { platform } from "node:os";
892
+ import { randomUUID as randomUUID2 } from "node:crypto";
893
893
 
894
894
  // src/version.ts
895
- var BRIDGE_VERSION = "1.0.2";
895
+ var BRIDGE_VERSION = "1.0.3";
896
896
 
897
897
  // src/ssh/logged.ts
898
- import { randomUUID } from "crypto";
898
+ import { randomUUID } from "node:crypto";
899
899
  var MAX_LOG_OUTPUT = 8 * 1024;
900
900
  var targetOf = (t) => `${t.username}@${t.host}:${t.port}`;
901
901
  function summarize(stdout, stderr) {
@@ -1000,16 +1000,16 @@ var LoggedSsh = class {
1000
1000
  };
1001
1001
 
1002
1002
  // src/devices/scan.ts
1003
- import { createSocket } from "dgram";
1004
- import { request } from "http";
1005
- import { networkInterfaces } from "os";
1003
+ import { createSocket } from "node:dgram";
1004
+ import { request } from "node:http";
1005
+ import { networkInterfaces } from "node:os";
1006
1006
 
1007
1007
  // src/devices/ports.ts
1008
- import { connect as connect2 } from "net";
1008
+ import { connect as connect2 } from "node:net";
1009
1009
 
1010
1010
  // src/devices/webos.ts
1011
1011
  import WebSocket from "ws";
1012
- import { connect } from "net";
1012
+ import { connect } from "node:net";
1013
1013
  var PROBE_TIMEOUT_MS = 1500;
1014
1014
  function probeSsap(host, port, secure, timeoutMs = PROBE_TIMEOUT_MS) {
1015
1015
  return new Promise((resolve2) => {
@@ -1273,7 +1273,7 @@ async function scanNetwork(opts = {}) {
1273
1273
  }
1274
1274
 
1275
1275
  // src/ssh/luna.ts
1276
- import { StringDecoder } from "string_decoder";
1276
+ import { StringDecoder } from "node:string_decoder";
1277
1277
  function shellQuote(value) {
1278
1278
  return value.split("'").map((s) => `'${s}'`).join("\\'");
1279
1279
  }
@@ -1394,7 +1394,7 @@ async function lunaSubscribe(pool, device, uri, params, onMessage, opts = {}) {
1394
1394
  }
1395
1395
 
1396
1396
  // src/devices/keys.ts
1397
- import { createHash } from "crypto";
1397
+ import { createHash } from "node:crypto";
1398
1398
  import ssh2 from "ssh2";
1399
1399
  var { utils } = ssh2;
1400
1400
  function verifyKey(privateKey, passphrase) {
@@ -1415,7 +1415,7 @@ function verifyKey(privateKey, passphrase) {
1415
1415
  }
1416
1416
 
1417
1417
  // src/devices/keyserver.ts
1418
- import { request as request2 } from "http";
1418
+ import { request as request2 } from "node:http";
1419
1419
  var MAX_KEY_RESPONSE = 65536;
1420
1420
  var TIMEOUT_MS = 1e4;
1421
1421
  var MAX_REDIRECTS = 5;
@@ -1495,7 +1495,7 @@ async function fetchKey(host, port = KEY_SERVER_PORT) {
1495
1495
  }
1496
1496
 
1497
1497
  // src/devices/info.ts
1498
- import { createHash as createHash2 } from "crypto";
1498
+ import { createHash as createHash2 } from "node:crypto";
1499
1499
  import ssh22 from "ssh2";
1500
1500
 
1501
1501
  // src/ssh/transfer.ts
@@ -1778,8 +1778,8 @@ async function renewDevMode(pool, device) {
1778
1778
  }
1779
1779
 
1780
1780
  // src/apps/apps.ts
1781
- import { createHash as createHash3 } from "crypto";
1782
- import { posix } from "path";
1781
+ import { createHash as createHash3 } from "node:crypto";
1782
+ import { posix } from "node:path";
1783
1783
 
1784
1784
  // src/ssh/serve.ts
1785
1785
  var HEADER_LIMIT = 16 * 1024;
@@ -1868,7 +1868,7 @@ Connection: close\r
1868
1868
  }
1869
1869
 
1870
1870
  // src/apps/ipk.ts
1871
- import { gunzipSync } from "zlib";
1871
+ import { gunzipSync } from "node:zlib";
1872
1872
  function readIpkControl(ipk) {
1873
1873
  try {
1874
1874
  const control = arMember(ipk, /^control\.tar\.gz\/?$/);
@@ -2174,7 +2174,7 @@ async function installDownloadable(pool, device, pkg, download, progress) {
2174
2174
  }
2175
2175
 
2176
2176
  // src/files/files.ts
2177
- import { posix as posix2 } from "path";
2177
+ import { posix as posix2 } from "node:path";
2178
2178
  var S_IFMT = 61440;
2179
2179
  var TYPES = {
2180
2180
  16384: "d",
@@ -2413,9 +2413,9 @@ async function removePath(pool, device, path) {
2413
2413
  }
2414
2414
 
2415
2415
  // src/debug/debug.ts
2416
- import { posix as posix3 } from "path";
2417
- import { StringDecoder as StringDecoder2 } from "string_decoder";
2418
- import { createGunzip } from "zlib";
2416
+ import { posix as posix3 } from "node:path";
2417
+ import { StringDecoder as StringDecoder2 } from "node:string_decoder";
2418
+ import { createGunzip } from "node:zlib";
2419
2419
  var requireRoot = (device, what) => {
2420
2420
  if (device.username !== "root") {
2421
2421
  throw new RpcError(DeviceErrorCodes.WrongLogin, `${what} needs a rooted TV (logged in as root).`);
@@ -2924,8 +2924,8 @@ async function dispatch(raw, session, ctx) {
2924
2924
  }
2925
2925
 
2926
2926
  // src/http/static.ts
2927
- import { createReadStream, statSync } from "fs";
2928
- import { extname, join as join2, normalize, posix as posix4, resolve, sep } from "path";
2927
+ import { createReadStream, statSync } from "node:fs";
2928
+ import { extname, join as join2, normalize, posix as posix4, resolve, sep } from "node:path";
2929
2929
  var MIME = {
2930
2930
  ".html": "text/html; charset=utf-8",
2931
2931
  ".js": "text/javascript; charset=utf-8",
@@ -3019,7 +3019,7 @@ function serveStatic(root, req, res) {
3019
3019
  }
3020
3020
 
3021
3021
  // src/ssh/pool.ts
3022
- import { createHash as createHash4 } from "crypto";
3022
+ import { createHash as createHash4 } from "node:crypto";
3023
3023
  import ssh23 from "ssh2";
3024
3024
  var { Client } = ssh23;
3025
3025
  var IDLE_MS = 12e4;
@@ -3347,7 +3347,7 @@ var SshPool = class {
3347
3347
  };
3348
3348
 
3349
3349
  // src/rpc/uploads.ts
3350
- import { randomUUID as randomUUID3 } from "crypto";
3350
+ import { randomUUID as randomUUID3 } from "node:crypto";
3351
3351
  var UploadBudget = class {
3352
3352
  constructor(limit = MAX_UPLOAD_BYTES) {
3353
3353
  this.limit = limit;
@@ -3450,13 +3450,13 @@ var UploadStore = class {
3450
3450
  };
3451
3451
 
3452
3452
  // src/repo/repo.ts
3453
- import { createHash as createHash5 } from "crypto";
3454
- import { lookup } from "dns/promises";
3455
- import { lookup as dnsLookup } from "dns";
3456
- import { request as httpRequest } from "http";
3457
- import { request as httpsRequest } from "https";
3458
- import { BlockList, isIP } from "net";
3459
- import { Readable } from "stream";
3453
+ import { createHash as createHash5 } from "node:crypto";
3454
+ import { lookup } from "node:dns/promises";
3455
+ import { lookup as dnsLookup } from "node:dns";
3456
+ import { request as httpRequest } from "node:http";
3457
+ import { request as httpsRequest } from "node:https";
3458
+ import { BlockList, isIP } from "node:net";
3459
+ import { Readable } from "node:stream";
3460
3460
  var untraced = (_t, _c, fn) => fn();
3461
3461
  var CACHE_MS = 5 * 6e4;
3462
3462
  var JSON_MAX_BYTES = 16 * 1024 * 1024;
@@ -4015,7 +4015,7 @@ function lookup2(entries, tag, variant) {
4015
4015
  }
4016
4016
 
4017
4017
  // src/shell/shells.ts
4018
- import { randomUUID as randomUUID4 } from "crypto";
4018
+ import { randomUUID as randomUUID4 } from "node:crypto";
4019
4019
  var MAX_SHELLS = 8;
4020
4020
  var FLUSH_MS2 = 8;
4021
4021
  var FLUSH_BYTES = 64 * 1024;
@@ -4296,7 +4296,7 @@ function startServer(config, pool = new SshPool(), repo = new RepoClient(config.
4296
4296
  }
4297
4297
 
4298
4298
  // src/open.ts
4299
- import { spawn } from "child_process";
4299
+ import { spawn } from "node:child_process";
4300
4300
  function openInBrowser(url2) {
4301
4301
  if (!/^https:\/\/[a-z0-9.-]+\/?$/i.test(url2)) return;
4302
4302
  const [cmd, args] = process.platform === "darwin" ? ["open", [url2]] : process.platform === "win32" ? ["rundll32", ["url.dll,FileProtocolHandler", url2]] : ["xdg-open", [url2]];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lg-dev-manager-bridge",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Local bridge for LG Dev Manager: lets the web app at lg.scoty.uk (or its local copy) manage LG webOS TVs over SSH",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Scoty (https://github.com/Scoty)",
@@ -51,8 +51,8 @@
51
51
  "tsx": "^4.20.0",
52
52
  "typescript": "^5.9.0",
53
53
  "vitest": "^4.1.11",
54
- "@lgdm/mock-tv": "1.0.2",
55
- "@lgdm/protocol": "1.0.2"
54
+ "@lgdm/mock-tv": "1.0.3",
55
+ "@lgdm/protocol": "1.0.3"
56
56
  },
57
57
  "scripts": {
58
58
  "dev": "tsx watch src/cli.ts --dev",