@scrypted/server 0.94.10 → 0.94.12
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/bin/postinstall +21 -0
- package/package.json +3 -3
package/bin/postinstall
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
const child_process = require('child_process');
|
4
|
+
const python = require('@bjia56/portable-python-3.9');
|
5
|
+
const { once } = require('events');
|
6
|
+
|
7
|
+
async function pipInstall(pkg) {
|
8
|
+
const cp = child_process.spawn(python, ['-m', 'pip', 'install', pkg], {stdio: 'inherit'});
|
9
|
+
const [exitCode] = await once(cp, 'exit');
|
10
|
+
if (exitCode)
|
11
|
+
throw new Error('non-zero exit code: ' + exitCode);
|
12
|
+
}
|
13
|
+
|
14
|
+
async function installScryptedServerRequirements() {
|
15
|
+
await pipInstall('wheel');
|
16
|
+
await pipInstall('debugpy');
|
17
|
+
await pipInstall('psutil');
|
18
|
+
await pipInstall('ptpython');
|
19
|
+
}
|
20
|
+
|
21
|
+
installScryptedServerRequirements();
|
package/package.json
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"name": "@scrypted/server",
|
3
|
-
"version": "0.94.
|
3
|
+
"version": "0.94.12",
|
4
4
|
"description": "",
|
5
5
|
"dependencies": {
|
6
|
-
"@bjia56/portable-python-3.9": "^0.1.
|
6
|
+
"@bjia56/portable-python-3.9": "^0.1.10",
|
7
7
|
"@mapbox/node-pre-gyp": "^1.0.11",
|
8
8
|
"@scrypted/types": "^0.3.13",
|
9
9
|
"adm-zip": "^0.5.10",
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"main": "dist/scrypted-main-exports.js",
|
57
57
|
"types": "dist/scrypted-main-exports.d.ts",
|
58
58
|
"scripts": {
|
59
|
-
"postinstall": "node
|
59
|
+
"postinstall": "node bin/postinstall",
|
60
60
|
"preserve": "npm run build",
|
61
61
|
"serve": "node --expose-gc dist/scrypted-main.js",
|
62
62
|
"serve-no-build": "node --expose-gc dist/scrypted-main.js",
|