@mashroom/mashroom
Advanced tools
Comparing version 1.7.8 to 1.7.9
@@ -22,5 +22,6 @@ "use strict"; | ||
ignorePlugins: [], | ||
indexPage: '/' | ||
indexPage: '/', | ||
devModeNpmExecutionTimeoutSec: undefined | ||
}; | ||
var _default = config; | ||
exports.default = _default; |
@@ -44,3 +44,3 @@ "use strict"; | ||
this._logger = loggerFactory('mashroom.plugins.build'); | ||
this._npmUtils = new _NpmUtils.default(loggerFactory); | ||
this._npmUtils = new _NpmUtils.default(loggerFactory, config.devModeNpmExecutionTimeoutSec || undefined); | ||
this._eventEmitter = new _events.EventEmitter(); | ||
@@ -47,0 +47,0 @@ |
@@ -10,3 +10,3 @@ "use strict"; | ||
const EXECUTION_TIMEOUT = 3 * 60 * 1000; // 3min | ||
const DEFAULT_NPM_EXECUTION_TIMEOUT_SEC = 3 * 60; // 3min | ||
@@ -18,3 +18,4 @@ /** | ||
class NpmUtils { | ||
constructor(loggerFactory) { | ||
constructor(loggerFactory, _npmExecutionTimeoutSec = DEFAULT_NPM_EXECUTION_TIMEOUT_SEC) { | ||
this._npmExecutionTimeoutSec = _npmExecutionTimeoutSec; | ||
this._logger = loggerFactory('mashroom.plugins.build'); | ||
@@ -62,3 +63,3 @@ } | ||
cwd: packagePath, | ||
timeout: EXECUTION_TIMEOUT, | ||
timeout: this._npmExecutionTimeoutSec * 1000, | ||
windowsHide: true | ||
@@ -76,3 +77,3 @@ }; // Execute in a child process | ||
if (childProc.killed) { | ||
reject(new Error(`Execution of command '${commandString}' aborted because it took longer than ${EXECUTION_TIMEOUT / 1000}sec!`)); | ||
reject(new Error(`Execution of command '${commandString}' aborted because it took longer than ${this._npmExecutionTimeoutSec}sec!`)); | ||
} else { | ||
@@ -79,0 +80,0 @@ reject(error); |
@@ -7,3 +7,3 @@ { | ||
"license": "MIT", | ||
"version": "1.7.8", | ||
"version": "1.7.9", | ||
"main": "dist", | ||
@@ -21,3 +21,3 @@ "files": [ | ||
"dependencies": { | ||
"@mashroom/mashroom-utils": "1.7.8", | ||
"@mashroom/mashroom-utils": "1.7.9", | ||
"@types/express": "^4.17.11", | ||
@@ -24,0 +24,0 @@ "anymatch": "^3.1.1", |
@@ -60,5 +60,3 @@ | ||
| string | ||
| { | ||
[lang: string]: string; | ||
}; | ||
| { [lang: string]: string; }; | ||
@@ -374,2 +372,3 @@ /** | ||
readonly indexPage: string; | ||
readonly devModeNpmExecutionTimeoutSec: number | null | undefined; | ||
@@ -376,0 +375,0 @@ [key: string]: any; |
@@ -281,2 +281,3 @@ // @flow | ||
+indexPage: string, | ||
+devModeNpmExecutionTimeoutSec: ?number, | ||
[key: string]: any | ||
@@ -283,0 +284,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
186567
4613
+ Added@mashroom/mashroom-utils@1.7.9(transitive)
+ Added@types/node@22.9.3(transitive)
- Removed@mashroom/mashroom-utils@1.7.8(transitive)
- Removed@types/node@22.9.1(transitive)