@wixc3/engine-core
Advanced tools
Comparing version 7.0.0 to 7.0.3
@@ -17,6 +17,5 @@ import { RuntimeEngine } from './runtime-engine'; | ||
export declare function runEngineApp({ featureName, featureLoaders, config, options }: IRunEngineAppOptions): Promise<{ | ||
engine: RuntimeEngine; | ||
runningFeature: import("./entities").Feature<any, any, any, any>; | ||
dispose(): Promise<void>; | ||
}>; | ||
export declare function getTopWindow(win: Window): Window; | ||
//# sourceMappingURL=run-engine-app.d.ts.map |
@@ -21,10 +21,14 @@ "use strict"; | ||
const { resolvedContexts } = rootFeatureLoader; | ||
const [runningFeature] = await Promise.all([ | ||
const allFeatures = await Promise.all([ | ||
rootFeatureLoader.load(resolvedContexts), | ||
...rootFeatureLoader.depFeatures.map(depName => featureLoaders[depName].load(resolvedContexts)) | ||
]); | ||
const [runningFeature] = allFeatures; | ||
const engine = new runtime_engine_1.RuntimeEngine([communication_feature_1.default.use({ config: { resolvedContexts } }), ...config], options).run(runningFeature); | ||
return { | ||
engine, | ||
runningFeature | ||
async dispose() { | ||
for (const feature of allFeatures) { | ||
await engine.dispose(feature); | ||
} | ||
} | ||
}; | ||
@@ -31,0 +35,0 @@ } |
{ | ||
"name": "@wixc3/engine-core", | ||
"version": "7.0.0", | ||
"version": "7.0.3", | ||
"main": "cjs/index.js", | ||
@@ -5,0 +5,0 @@ "types": "cjs/index.d.ts", |
@@ -39,6 +39,7 @@ import COM from './communication.feature'; | ||
const [runningFeature] = await Promise.all([ | ||
const allFeatures = await Promise.all([ | ||
rootFeatureLoader.load(resolvedContexts), | ||
...rootFeatureLoader.depFeatures.map(depName => featureLoaders[depName].load(resolvedContexts)) | ||
]); | ||
const [runningFeature] = allFeatures; | ||
@@ -50,4 +51,7 @@ const engine = new RuntimeEngine([COM.use({ config: { resolvedContexts } }), ...config], options).run( | ||
return { | ||
engine, | ||
runningFeature | ||
async dispose() { | ||
for (const feature of allFeatures) { | ||
await engine.dispose(feature); | ||
} | ||
} | ||
}; | ||
@@ -54,0 +58,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
255509
4255