Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wixc3/engine-runtime-node

Package Overview
Dependencies
Maintainers
64
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wixc3/engine-runtime-node - npm Package Compare versions

Comparing version 42.0.2 to 42.1.0

8

dist/core-node/create-application-metadata-provider.js

@@ -49,11 +49,9 @@ "use strict";

// use disposables to ignore multiple dispose calls
const disposables = (0, patterns_1.createDisposables)();
disposables.add(() => metadataProviderCom.dispose(), {
name: 'metadataProvider metadataProviderCom',
});
const disposables = (0, patterns_1.createDisposables)('metadataProvider');
disposables.add('metadataProvider metadataProviderCom', metadataProviderCom);
return {
metadataPromise,
disposeCommunication: disposables.dispose,
disposeCommunication: () => disposables.dispose(),
};
});
//# sourceMappingURL=create-application-metadata-provider.js.map

@@ -8,3 +8,3 @@ "use strict";

const node_environment_js_1 = require("./node-environment.js");
const disposables = (0, patterns_1.createDisposables)();
const disposables = (0, patterns_1.createDisposables)('workerThreadEntry');
const handleStartupMessage = async (command) => {

@@ -37,6 +37,10 @@ const { requiredModules, basePath, environmentName, config, environmentContextName, featureName, features, parentEnvName, env, runtimeOptions, } = command.runOptions;

});
disposables.add(() => {
worker_scope_1.worker.removeEventListener('message', messageHandler);
return engine.shutdown();
}, { name: `workerThreadEntry engine shutdown ${engine.entityID}`, timeout: 10000 });
disposables.add({
name: `workerThreadEntry engine shutdown ${engine.entityID}`,
timeout: 10000,
dispose: () => {
worker_scope_1.worker.removeEventListener('message', messageHandler);
return engine.shutdown();
},
});
};

@@ -43,0 +47,0 @@ const messageHandler = (message) => {

@@ -10,9 +10,10 @@ "use strict";

function workerThreadInitializer({ communication, env, environmentStartupOptions, }) {
const disposables = (0, patterns_1.createDisposables)();
const disposables = (0, patterns_1.createDisposables)('workerThreadInitializer');
const instanceId = communication.getEnvironmentInstanceId(env.env, env.endpointType);
const envIsReady = communication.envReady(instanceId);
const metadataProvider = (0, create_application_metadata_provider_js_1.createMetadataProvider)(communication);
disposables.add(() => metadataProvider.dispose(), {
disposables.add({
name: 'worker thread metadataProvider',
timeout: 5000,
dispose: metadataProvider,
});

@@ -27,5 +28,6 @@ const initialize = async () => {

});
disposables.add(() => worker.terminate(), {
disposables.add({
name: `worker thread ${instanceId} terminate`,
timeout: 5000,
dispose: () => worker.terminate(),
});

@@ -35,7 +37,5 @@ const host = new engine_core_1.UniversalWorkerHost(worker, instanceId);

communication.registerMessageHandler(host);
disposables.add(() => {
disposables.add(`worker thread ${instanceId} communication cleanup`, () => {
communication.clearEnvironment(instanceId);
communication.removeMessageHandler(host);
}, {
name: `worker thread ${instanceId} communication cleanup`,
});

@@ -69,3 +69,3 @@ const runOptions = {

initialize,
dispose: disposables.dispose,
dispose: () => disposables.dispose(),
};

@@ -72,0 +72,0 @@ }

@@ -9,3 +9,3 @@ "use strict";

function workerThreadInitializer2({ communication, env, workerURL, runtimeOptions, }) {
const disposables = (0, patterns_1.createDisposables)();
const disposables = (0, patterns_1.createDisposables)('workerThreadInitializer');
const instanceId = communication.getEnvironmentInstanceId(env.env, env.endpointType);

@@ -22,7 +22,7 @@ const envIsReady = communication.envReady(instanceId);

});
disposables.add(() => worker.terminate());
disposables.add('terminate worker', () => worker.terminate());
const host = new engine_core_1.UniversalWorkerHost(worker, instanceId);
communication.registerEnv(instanceId, host);
communication.registerMessageHandler(host);
disposables.add(() => {
disposables.add('communication', () => {
communication.clearEnvironment(instanceId);

@@ -36,3 +36,3 @@ communication.removeMessageHandler(host);

initialize,
dispose: disposables.dispose,
dispose: () => disposables.dispose(),
getMetrics: () => (0, metrics_utils_1.getMetricsFromWorker)(worker),

@@ -39,0 +39,0 @@ };

{
"name": "@wixc3/engine-runtime-node",
"version": "42.0.2",
"version": "42.1.0",
"main": "dist/index.js",

@@ -14,5 +14,5 @@ "exports": {

"dependencies": {
"@wixc3/common": "^13.4.0",
"@wixc3/engine-core": "^42.0.2",
"@wixc3/patterns": "^13.4.0",
"@wixc3/common": "^14.1.0",
"@wixc3/engine-core": "^42.1.0",
"@wixc3/patterns": "^14.1.0",
"create-listening-server": "^2.1.0",

@@ -19,0 +19,0 @@ "express": "^4.18.2",

@@ -60,11 +60,9 @@ import { Communication } from '@wixc3/engine-core';

// use disposables to ignore multiple dispose calls
const disposables = createDisposables();
disposables.add(() => metadataProviderCom.dispose(), {
name: 'metadataProvider metadataProviderCom',
});
const disposables = createDisposables('metadataProvider');
disposables.add('metadataProvider metadataProviderCom', metadataProviderCom);
return {
metadataPromise,
disposeCommunication: disposables.dispose,
disposeCommunication: () => disposables.dispose(),
};
});

@@ -8,3 +8,3 @@ import { COM, reportError, UniversalWorkerHost } from '@wixc3/engine-core';

const disposables = createDisposables();
const disposables = createDisposables('workerThreadEntry');

@@ -55,9 +55,10 @@ const handleStartupMessage = async (command: WorkerThreadStartupCommand) => {

disposables.add(
() => {
disposables.add({
name: `workerThreadEntry engine shutdown ${engine.entityID}`,
timeout: 10_000,
dispose: () => {
worker.removeEventListener('message', messageHandler);
return engine.shutdown();
},
{ name: `workerThreadEntry engine shutdown ${engine.entityID}`, timeout: 10_000 },
);
});
};

@@ -64,0 +65,0 @@

@@ -27,3 +27,3 @@ import { COM, UniversalWorkerHost, type InitializerOptions } from '@wixc3/engine-core';

}: WorkerThreadInitializerOptions): WorkerThreadInitializer {
const disposables = createDisposables();
const disposables = createDisposables('workerThreadInitializer');

@@ -35,5 +35,6 @@ const instanceId = communication.getEnvironmentInstanceId(env.env, env.endpointType);

const metadataProvider = createMetadataProvider(communication);
disposables.add(() => metadataProvider.dispose(), {
disposables.add({
name: 'worker thread metadataProvider',
timeout: 5_000,
dispose: metadataProvider,
});

@@ -52,5 +53,6 @@

disposables.add(() => worker.terminate(), {
disposables.add({
name: `worker thread ${instanceId} terminate`,
timeout: 5_000,
dispose: () => worker.terminate(),
});

@@ -62,11 +64,6 @@

disposables.add(
() => {
communication.clearEnvironment(instanceId);
communication.removeMessageHandler(host);
},
{
name: `worker thread ${instanceId} communication cleanup`,
},
);
disposables.add(`worker thread ${instanceId} communication cleanup`, () => {
communication.clearEnvironment(instanceId);
communication.removeMessageHandler(host);
});

@@ -103,4 +100,4 @@ const runOptions: WorkerThreadEnvironmentStartupOptions = {

initialize,
dispose: disposables.dispose,
dispose: ()=>disposables.dispose(),
};
}

@@ -26,3 +26,3 @@ import { IRunOptions, InitializerOptions, UniversalWorkerHost } from '@wixc3/engine-core';

}: WorkerThreadInitializerOptions2): WorkerThreadInitializer2 {
const disposables = createDisposables();
const disposables = createDisposables('workerThreadInitializer');
const instanceId = communication.getEnvironmentInstanceId(env.env, env.endpointType);

@@ -41,3 +41,3 @@ const envIsReady = communication.envReady(instanceId);

disposables.add(() => worker.terminate());
disposables.add('terminate worker', () => worker.terminate());

@@ -48,3 +48,3 @@ const host = new UniversalWorkerHost(worker, instanceId);

disposables.add(() => {
disposables.add('communication', () => {
communication.clearEnvironment(instanceId);

@@ -60,5 +60,5 @@ communication.removeMessageHandler(host);

initialize,
dispose: disposables.dispose,
dispose: () => disposables.dispose(),
getMetrics: () => getMetricsFromWorker(worker),
};
}

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc