@scrypted/server 0.7.24 → 0.7.25
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.
Potentially problematic release.
This version of @scrypted/server might be problematic. Click here for more details.
package/package.json
CHANGED
package/python/plugin_remote.py
CHANGED
@@ -373,8 +373,14 @@ class PluginRemote:
|
|
373
373
|
sys.version_info[0])+"."+str(sys.version_info[1])
|
374
374
|
print('python version:', python_version)
|
375
375
|
|
376
|
+
python_versioned_directory = '%s-%s-%s' % (python_version, platform.system(), platform.machine())
|
377
|
+
SCRYPTED_BASE_VERSION = os.environ.get('SCRYPTED_BASE_VERSION')
|
378
|
+
if SCRYPTED_BASE_VERSION:
|
379
|
+
python_versioned_directory += SCRYPTED_BASE_VERSION
|
380
|
+
|
376
381
|
python_prefix = os.path.join(
|
377
|
-
plugin_volume,
|
382
|
+
plugin_volume, python_versioned_directory)
|
383
|
+
|
378
384
|
if not os.path.exists(python_prefix):
|
379
385
|
os.makedirs(python_prefix)
|
380
386
|
|
@@ -1,18 +1,22 @@
|
|
1
|
-
import { ensurePluginVolume } from "./plugin-volume";
|
2
|
-
import fs from 'fs';
|
3
1
|
import child_process from 'child_process';
|
4
|
-
import path from 'path';
|
5
2
|
import { once } from 'events';
|
6
|
-
import
|
3
|
+
import fs from 'fs';
|
7
4
|
import mkdirp from "mkdirp";
|
8
|
-
import semver from 'semver';
|
9
5
|
import os from 'os';
|
6
|
+
import path from 'path';
|
7
|
+
import process from 'process';
|
10
8
|
import rimraf from "rimraf";
|
9
|
+
import semver from 'semver';
|
10
|
+
import { ensurePluginVolume } from "./plugin-volume";
|
11
11
|
|
12
12
|
export function getPluginNodePath(name: string) {
|
13
13
|
const pluginVolume = ensurePluginVolume(name);
|
14
14
|
const nodeMajorVersion = semver.parse(process.version).major;
|
15
|
-
|
15
|
+
let nodeVersionedDirectory = `node${nodeMajorVersion}-${process.platform}-${process.arch}`;
|
16
|
+
const scryptedBase = process.env.SCRYPTED_BASE_VERSION;
|
17
|
+
if (scryptedBase)
|
18
|
+
nodeVersionedDirectory += '-' + nodeVersionedDirectory;
|
19
|
+
const nodePrefix = path.join(pluginVolume, nodeVersionedDirectory);
|
16
20
|
return nodePrefix;
|
17
21
|
}
|
18
22
|
|