@scrypted/server 0.7.46 → 0.7.49
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
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@scrypted/server",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.49",
|
4
4
|
"description": "",
|
5
5
|
"dependencies": {
|
6
6
|
"@mapbox/node-pre-gyp": "^1.0.10",
|
@@ -72,7 +72,8 @@
|
|
72
72
|
"prebeta": "npm version patch && git add package.json && npm run build && git commit -m prebeta",
|
73
73
|
"beta": "npm publish --tag beta",
|
74
74
|
"release": "npm publish",
|
75
|
-
"
|
75
|
+
"prepublish": "npm run build",
|
76
|
+
"postrelease": "git tag v$npm_package_version && git push origin v$npm_package_version && npm version patch && git add package.json && git commit -m postrelease",
|
76
77
|
"docker": "scripts/github-workflow-publish-docker.sh"
|
77
78
|
},
|
78
79
|
"author": "",
|
@@ -9,6 +9,19 @@ import rimraf from "rimraf";
|
|
9
9
|
import semver from 'semver';
|
10
10
|
import { ensurePluginVolume } from "./plugin-volume";
|
11
11
|
|
12
|
+
export function defaultNpmExec(args: string[], options: child_process.SpawnOptions) {
|
13
|
+
let npm = 'npm';
|
14
|
+
if (os.platform() === 'win32')
|
15
|
+
npm += '.cmd';
|
16
|
+
const cp = child_process.spawn(npm, args, options);
|
17
|
+
return cp;
|
18
|
+
}
|
19
|
+
|
20
|
+
let npmExecFunction = defaultNpmExec;
|
21
|
+
export function setNpmExecFunction(f: typeof npmExecFunction) {
|
22
|
+
npmExecFunction = f;
|
23
|
+
}
|
24
|
+
|
12
25
|
export function getPluginNodePath(name: string) {
|
13
26
|
const pluginVolume = ensurePluginVolume(name);
|
14
27
|
const nodeMajorVersion = semver.parse(process.version).major;
|
@@ -56,10 +69,7 @@ export async function installOptionalDependencies(console: Console, packageJson:
|
|
56
69
|
mkdirp.sync(nodePrefix);
|
57
70
|
fs.writeFileSync(packageJsonPath, JSON.stringify(reduced));
|
58
71
|
|
59
|
-
|
60
|
-
if (os.platform() === 'win32')
|
61
|
-
npm += '.cmd';
|
62
|
-
const cp = child_process.spawn(npm, ['--prefix', nodePrefix, 'install'], {
|
72
|
+
const cp = npmExecFunction(['--prefix', nodePrefix, 'install'], {
|
63
73
|
cwd: nodePrefix,
|
64
74
|
stdio: 'inherit',
|
65
75
|
});
|