@saltcorn/plugins-loader 1.0.0-rc.2 → 1.0.0-rc.4
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/package.json +2 -2
- package/plugin_installer.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/plugins-loader",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
4
|
"description": "Saltcorn plugin loader",
|
|
5
5
|
"homepage": "https://saltcorn.com",
|
|
6
6
|
"scripts": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"env-paths": "^2.2.0",
|
|
13
13
|
"npm-registry-fetch": "17.1.0",
|
|
14
|
-
"@saltcorn/data": "1.0.0-rc.
|
|
14
|
+
"@saltcorn/data": "1.0.0-rc.4"
|
|
15
15
|
},
|
|
16
16
|
"author": "Christian Hugo",
|
|
17
17
|
"license": "MIT",
|
package/plugin_installer.js
CHANGED
|
@@ -58,6 +58,7 @@ class PluginInstaller {
|
|
|
58
58
|
this.tempDir = join(this.tempRootFolder, "temp_install", ...tokens);
|
|
59
59
|
this.tempPckJsonPath = join(this.tempDir, "package.json");
|
|
60
60
|
this.scVersion = opts.scVersion;
|
|
61
|
+
this.envVars = opts.envVars || {};
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
/**
|
|
@@ -257,6 +258,7 @@ class PluginInstaller {
|
|
|
257
258
|
) {
|
|
258
259
|
const child = spawn("npm", ["install"], {
|
|
259
260
|
cwd: this.tempDir,
|
|
261
|
+
env: { ...process.env, ...this.envVars },
|
|
260
262
|
...(isWindows ? { shell: true } : {}),
|
|
261
263
|
});
|
|
262
264
|
return new Promise((resolve, reject) => {
|