core: use @scrypted/node-pty

This commit is contained in:
Koushik Dutta
2024-03-14 14:33:44 -07:00
parent a23a73942d
commit e21ac6283b
6 changed files with 39 additions and 41 deletions

View File

@@ -1,16 +1,16 @@
{
"name": "@scrypted/core",
"version": "0.3.9",
"version": "0.3.11",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/core",
"version": "0.3.9",
"version": "0.3.11",
"license": "Apache-2.0",
"dependencies": {
"@homebridge/node-pty-prebuilt-multiarch": "^0.11.13",
"@scrypted/common": "file:../../common",
"@scrypted/node-pty": "^1.0.5",
"@scrypted/sdk": "file:../../sdk",
"mime": "^3.0.0",
"node-pty-prebuilt-multiarch": "^0.10.1-pre.5",
@@ -124,17 +124,20 @@
"typedoc": "^0.23.21"
}
},
"node_modules/@homebridge/node-pty-prebuilt-multiarch": {
"version": "0.11.13",
"resolved": "https://registry.npmjs.org/@homebridge/node-pty-prebuilt-multiarch/-/node-pty-prebuilt-multiarch-0.11.13.tgz",
"integrity": "sha512-/ciAaBoQ72B94fOrFW6qx0HmHfjTmzWxhrdhNQACDfPTpzTs71KFTmF5EnTZB5d1SmPIZK+e/634kz5sn0u9xQ==",
"node_modules/@scrypted/common": {
"resolved": "../../common",
"link": true
},
"node_modules/@scrypted/node-pty": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@scrypted/node-pty/-/node-pty-1.0.5.tgz",
"integrity": "sha512-C3Q7mcrLq8irKC34hgMk6cpUdnJh4LHQ4pnUjVJvsZ5zIRO1G4Z7HZHqUCAn7wGfHmBSmVAbNR1ZL6KvXSRacQ==",
"hasInstallScript": true,
"dependencies": {
"nan": "github:ajgassner/nan#electron-29-workaround",
"prebuild-install": "^7.1.2"
}
},
"node_modules/@homebridge/node-pty-prebuilt-multiarch/node_modules/decompress-response": {
"node_modules/@scrypted/node-pty/node_modules/decompress-response": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
"integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
@@ -148,7 +151,7 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@homebridge/node-pty-prebuilt-multiarch/node_modules/detect-libc": {
"node_modules/@scrypted/node-pty/node_modules/detect-libc": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz",
"integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==",
@@ -156,7 +159,7 @@
"node": ">=8"
}
},
"node_modules/@homebridge/node-pty-prebuilt-multiarch/node_modules/mimic-response": {
"node_modules/@scrypted/node-pty/node_modules/mimic-response": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
"integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
@@ -167,7 +170,7 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@homebridge/node-pty-prebuilt-multiarch/node_modules/node-abi": {
"node_modules/@scrypted/node-pty/node_modules/node-abi": {
"version": "3.56.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.56.0.tgz",
"integrity": "sha512-fZjdhDOeRcaS+rcpve7XuwHBmktS1nS1gzgghwKUQQ8nTy2FdSDr6ZT8k6YhvlJeHmmQMYiT/IH9hfco5zeW2Q==",
@@ -178,7 +181,7 @@
"node": ">=10"
}
},
"node_modules/@homebridge/node-pty-prebuilt-multiarch/node_modules/prebuild-install": {
"node_modules/@scrypted/node-pty/node_modules/prebuild-install": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz",
"integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==",
@@ -203,7 +206,7 @@
"node": ">=10"
}
},
"node_modules/@homebridge/node-pty-prebuilt-multiarch/node_modules/semver": {
"node_modules/@scrypted/node-pty/node_modules/semver": {
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
"integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
@@ -217,7 +220,7 @@
"node": ">=10"
}
},
"node_modules/@homebridge/node-pty-prebuilt-multiarch/node_modules/simple-get": {
"node_modules/@scrypted/node-pty/node_modules/simple-get": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
"integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
@@ -241,10 +244,6 @@
"simple-concat": "^1.0.0"
}
},
"node_modules/@scrypted/common": {
"resolved": "../../common",
"link": true
},
"node_modules/@scrypted/sdk": {
"resolved": "../../sdk",
"link": true
@@ -931,12 +930,22 @@
}
},
"dependencies": {
"@homebridge/node-pty-prebuilt-multiarch": {
"version": "0.11.13",
"resolved": "https://registry.npmjs.org/@homebridge/node-pty-prebuilt-multiarch/-/node-pty-prebuilt-multiarch-0.11.13.tgz",
"integrity": "sha512-/ciAaBoQ72B94fOrFW6qx0HmHfjTmzWxhrdhNQACDfPTpzTs71KFTmF5EnTZB5d1SmPIZK+e/634kz5sn0u9xQ==",
"@scrypted/common": {
"version": "file:../../common",
"requires": {
"@scrypted/sdk": "file:../sdk",
"@scrypted/server": "file:../server",
"@types/node": "^20.11.0",
"http-auth-utils": "^5.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
}
},
"@scrypted/node-pty": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@scrypted/node-pty/-/node-pty-1.0.5.tgz",
"integrity": "sha512-C3Q7mcrLq8irKC34hgMk6cpUdnJh4LHQ4pnUjVJvsZ5zIRO1G4Z7HZHqUCAn7wGfHmBSmVAbNR1ZL6KvXSRacQ==",
"requires": {
"nan": "github:ajgassner/nan#electron-29-workaround",
"prebuild-install": "^7.1.2"
},
"dependencies": {
@@ -1005,17 +1014,6 @@
}
}
},
"@scrypted/common": {
"version": "file:../../common",
"requires": {
"@scrypted/sdk": "file:../sdk",
"@scrypted/server": "file:../server",
"@types/node": "^20.11.0",
"http-auth-utils": "^5.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
}
},
"@scrypted/sdk": {
"version": "file:../../sdk",
"requires": {
@@ -1264,7 +1262,7 @@
},
"nan": {
"version": "git+ssh://git@github.com/ajgassner/nan.git#f4933dedce0fb160927ffe5d7896b33ef461f17c",
"from": "nan@github:ajgassner/nan#electron-29-workaround"
"from": "nan@^2.14.2"
},
"napi-build-utils": {
"version": "1.0.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/core",
"version": "0.3.9",
"version": "0.3.11",
"description": "Scrypted Core plugin. Provides the UI, websocket, and engine.io APIs.",
"author": "Scrypted",
"license": "Apache-2.0",
@@ -38,8 +38,8 @@
]
},
"dependencies": {
"@homebridge/node-pty-prebuilt-multiarch": "^0.11.13",
"@scrypted/common": "file:../../common",
"@scrypted/node-pty": "^1.0.5",
"@scrypted/sdk": "file:../../sdk",
"mime": "^3.0.0",
"node-pty-prebuilt-multiarch": "^0.10.1-pre.5",

View File

@@ -180,7 +180,7 @@ export class TerminalService extends ScryptedDeviceBase implements StreamService
throw new Error();
}
catch (e) {
spawn = require('@homebridge/node-pty-prebuilt-multiarch').spawn as typeof ptySpawn;
spawn = require('@scrypted/node-pty').spawn as typeof ptySpawn;
}
cp = new InteractiveTerminal(parsed.cmd, spawn);
}

View File

@@ -1 +0,0 @@
const homebridgenodeptyprebuiltmultiarch = __non_webpack_require__('@homebridge/node-pty-prebuilt-multiarch'); module.exports = homebridgenodeptyprebuiltmultiarch;

View File

@@ -0,0 +1 @@
const scryptednodepty = __non_webpack_require__('@scrypted/node-pty'); module.exports = scryptednodepty;

View File

@@ -50,7 +50,7 @@ if (process.env.WEBPACK_ANALYZER) {
const alias = {};
const polyfills = [
'node-pty-prebuilt-multiarch',
'@homebridge/node-pty-prebuilt-multiarch',
'@scrypted/node-pty',
'node-forge',
'sharp',
'source-map-support/register',