@wixc3/engine-runtime-node
Advanced tools
Comparing version 43.0.4 to 44.0.0
@@ -19,2 +19,3 @@ import { AnyEnvironment, MultiCounter } from '@wixc3/engine-core'; | ||
private configMapping; | ||
private loadModule; | ||
disposables: SafeDisposable; | ||
@@ -28,3 +29,3 @@ dispose: () => Promise<void>; | ||
url: string; | ||
}, featureEnvironmentsMapping: FeatureEnvironmentMapping, configMapping: ConfigurationEnvironmentMapping); | ||
}, featureEnvironmentsMapping: FeatureEnvironmentMapping, configMapping: ConfigurationEnvironmentMapping, loadModule?: (modulePath: string) => Promise<unknown>); | ||
autoLaunch(runtimeOptions?: Map<string, string | boolean | undefined>): Promise<{ | ||
@@ -31,0 +32,0 @@ port: number; |
@@ -14,6 +14,7 @@ "use strict"; | ||
class NodeEnvManager { | ||
constructor(importMeta, featureEnvironmentsMapping, configMapping) { | ||
constructor(importMeta, featureEnvironmentsMapping, configMapping, loadModule = async (modulePath) => (await require(modulePath)).default) { | ||
this.importMeta = importMeta; | ||
this.featureEnvironmentsMapping = featureEnvironmentsMapping; | ||
this.configMapping = configMapping; | ||
this.loadModule = loadModule; | ||
this.disposables = new patterns_1.SafeDisposable(NodeEnvManager.name); | ||
@@ -95,3 +96,3 @@ this.dispose = this.disposables.dispose; | ||
// TODO: make it work in esm via injection | ||
const configModule = (await require(filePath)).default; | ||
const configModule = (await this.loadModule(filePath)); | ||
if (verbose) { | ||
@@ -98,0 +99,0 @@ console.log(`[ENGINE]: loaded config file ${filePath} for env ${envName} successfully`); |
@@ -10,3 +10,3 @@ "use strict"; | ||
async function startRemoteNodeEnvironment(entryFilePath, { inspect, port, socketServerOptions = {}, requiredPaths = [] }) { | ||
const execArgv = inspect ? ['--inspect'] : []; | ||
const execArgv = inspect && !process.execArgv.includes('--inspect') ? ['--inspect'] : []; | ||
const childProccess = (0, node_child_process_1.fork)(entryFilePath, [ | ||
@@ -13,0 +13,0 @@ '--preferredPort', |
{ | ||
"name": "@wixc3/engine-runtime-node", | ||
"version": "43.0.4", | ||
"version": "44.0.0", | ||
"main": "dist/index.js", | ||
@@ -14,5 +14,5 @@ "exports": { | ||
"dependencies": { | ||
"@wixc3/common": "^16.1.0", | ||
"@wixc3/engine-core": "^43.0.4", | ||
"@wixc3/patterns": "^16.1.0", | ||
"@wixc3/common": "^16.1.3", | ||
"@wixc3/engine-core": "^44.0.0", | ||
"@wixc3/patterns": "^16.1.3", | ||
"create-listening-server": "^2.1.0", | ||
@@ -19,0 +19,0 @@ "express": "^4.18.2", |
@@ -44,2 +44,4 @@ import { | ||
private configMapping: ConfigurationEnvironmentMapping, | ||
private loadModule: (modulePath: string) => Promise<unknown> = async (modulePath) => | ||
(await require(modulePath)).default, | ||
) { | ||
@@ -140,3 +142,3 @@ this.disposables.add('open environments', () => | ||
// TODO: make it work in esm via injection | ||
const configModule = (await require(filePath)).default as ConfigModule; | ||
const configModule = (await this.loadModule(filePath)) as ConfigModule; | ||
if (verbose) { | ||
@@ -143,0 +145,0 @@ console.log(`[ENGINE]: loaded config file ${filePath} for env ${envName} successfully`); |
@@ -19,3 +19,3 @@ import { fork } from 'node:child_process'; | ||
) { | ||
const execArgv = inspect ? ['--inspect'] : []; | ||
const execArgv = inspect && !process.execArgv.includes('--inspect') ? ['--inspect'] : []; | ||
@@ -22,0 +22,0 @@ const childProccess = fork( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
267358
4377
+ Added@wixc3/engine-core@44.1.0(transitive)
- Removed@wixc3/engine-core@43.0.4(transitive)
Updated@wixc3/common@^16.1.3
Updated@wixc3/engine-core@^44.0.0
Updated@wixc3/patterns@^16.1.3