@wixc3/engine-runtime-node
Advanced tools
Comparing version 46.0.2 to 46.0.3
@@ -34,6 +34,7 @@ import { AnyEnvironment, BaseHost, IRunOptions, MultiCounter } from '@wixc3/engine-core'; | ||
closeAll(): Promise<void>; | ||
private closeEnv; | ||
private runFeatureEnvironments; | ||
private loadEnvironmentConfigurations; | ||
private createEnvironmentFileUrl; | ||
initializeWorkerEnvironment(envName: string, runtimeOptions: IRunOptions, host: BaseHost | MessagePort, verbose: boolean): Promise<() => Promise<void>>; | ||
initializeWorkerEnvironment(envName: string, runtimeOptions: IRunOptions, host: BaseHost | MessagePort, verbose: boolean): Promise<void>; | ||
collectMetricsFromAllOpenEnvironments(): Promise<{ | ||
@@ -40,0 +41,0 @@ marks: PerformanceEntry[]; |
@@ -84,4 +84,8 @@ "use strict"; | ||
async closeAll() { | ||
await Promise.all([...this.openEnvironments.values()].map((env) => env.dispose())); | ||
await Promise.all([...this.openEnvironments.values()].map((env) => this.closeEnv(env))); | ||
} | ||
closeEnv(env) { | ||
this.openEnvironments.delete(env.id, env); | ||
return env.dispose(); | ||
} | ||
async runFeatureEnvironments(verbose, runtimeOptions, host) { | ||
@@ -100,4 +104,3 @@ const featureName = runtimeOptions.get('feature'); | ||
} | ||
const disposes = await Promise.all(envNames.map((envName) => this.initializeWorkerEnvironment(envName, runtimeOptions, host, verbose))); | ||
return () => Promise.all(disposes.map((dispose) => dispose())); | ||
await Promise.all(envNames.map((envName) => this.initializeWorkerEnvironment(envName, runtimeOptions, host, verbose))); | ||
} | ||
@@ -141,6 +144,2 @@ async loadEnvironmentConfigurations(envName, configName, verbose = false) { | ||
} | ||
return () => { | ||
this.openEnvironments.delete(envName, runningEnv); | ||
return runningEnv.dispose(); | ||
}; | ||
} | ||
@@ -147,0 +146,0 @@ async collectMetricsFromAllOpenEnvironments() { |
{ | ||
"name": "@wixc3/engine-runtime-node", | ||
"version": "46.0.2", | ||
"version": "46.0.3", | ||
"main": "dist/index.js", | ||
@@ -15,3 +15,3 @@ "exports": { | ||
"@wixc3/common": "^17.1.1", | ||
"@wixc3/engine-core": "^46.0.2", | ||
"@wixc3/engine-core": "^46.0.3", | ||
"@wixc3/isomorphic-worker": "^1.2.5", | ||
@@ -18,0 +18,0 @@ "@wixc3/patterns": "^17.1.1", |
@@ -113,5 +113,10 @@ import { | ||
async closeAll() { | ||
await Promise.all([...this.openEnvironments.values()].map((env) => env.dispose())); | ||
await Promise.all([...this.openEnvironments.values()].map((env) => this.closeEnv(env))); | ||
} | ||
private closeEnv(env: RunningNodeEnvironment) { | ||
this.openEnvironments.delete(env.id, env); | ||
return env.dispose(); | ||
} | ||
private async runFeatureEnvironments( | ||
@@ -138,7 +143,5 @@ verbose: boolean, | ||
const disposes = await Promise.all( | ||
await Promise.all( | ||
envNames.map((envName) => this.initializeWorkerEnvironment(envName, runtimeOptions, host, verbose)), | ||
); | ||
return () => Promise.all(disposes.map((dispose) => dispose())); | ||
} | ||
@@ -192,7 +195,2 @@ | ||
} | ||
return () => { | ||
this.openEnvironments.delete(envName, runningEnv); | ||
return runningEnv.dispose(); | ||
}; | ||
} | ||
@@ -199,0 +197,0 @@ |
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
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
277957
4538
Updated@wixc3/engine-core@^46.0.3