Socket
Socket
Sign inDemoInstall

@wixc3/engine-runtime-node

Package Overview
Dependencies
Maintainers
176
Versions
201
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 21.1.3 to 21.1.5

2

dist/environments.js

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

const { resolvedContexts } = featureDefinition;
const deepDefsForFeature = engine_core_1.flattenTree(featureDefinition, (f) => f.dependencies.map((fName) => features.get(fName)));
const deepDefsForFeature = (0, engine_core_1.flattenTree)(featureDefinition, (f) => f.dependencies.map((fName) => features.get(fName)));
for (const { exportedEnvs = [] } of deepDefsForFeature) {

@@ -17,0 +17,0 @@ for (const exportedEnv of exportedEnvs) {

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

];
const { dispose } = await node_environment_1.runNodeEnvironment({
const { dispose } = await (0, node_environment_1.runNodeEnvironment)({
...options,

@@ -28,0 +28,0 @@ host,

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

async function launchEngineHttpServer({ staticDirPath, httpServerPort = exports.DEFAULT_PORT, socketServerOptions, routeMiddlewares = [], } = {}) {
const app = express_1.default();
const app = (0, express_1.default)();
for (const { path, handlers } of routeMiddlewares) {
app.use(path, handlers);
}
app.use(cors_1.default());
const { port, httpServer } = await create_listening_server_1.safeListeningHttpServer(httpServerPort, app);
app.use((0, cors_1.default)());
const { port, httpServer } = await (0, create_listening_server_1.safeListeningHttpServer)(httpServerPort, app);
if (staticDirPath) {

@@ -25,0 +25,0 @@ app.use('/', express_1.default.static(staticDirPath));

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

// mapping all found feature file requests to the current running context, so that external features, when importing feature files, will evaluate the files under the current context
[...features.values()].map(([, { packageName }]) => extrenal_request_mapper_1.remapToUserLibrary({
[...features.values()].map(([, { packageName }]) => (0, extrenal_request_mapper_1.remapToUserLibrary)({
test: (request) => request.includes(packageName),

@@ -60,3 +60,3 @@ context,

// mapping all features to be evaluated from the context of their package location
externalFeatures.map(({ packageName, packageBasePath }) => extrenal_request_mapper_1.remapToUserLibrary({
externalFeatures.map(({ packageName, packageBasePath }) => (0, extrenal_request_mapper_1.remapToUserLibrary)({
test: (request) => request.includes(packageName),

@@ -66,3 +66,3 @@ context: packageBasePath,

// initializing our module system tricks to be able to load all features from their proper context, so that features will not be loaded twice
extrenal_request_mapper_1.init();
(0, extrenal_request_mapper_1.init)();
}

@@ -81,5 +81,5 @@ for (const { scopedName: externalFeatureName, envEntries } of externalFeatures) {

if (context) {
extrenal_request_mapper_1.clear();
(0, extrenal_request_mapper_1.clear)();
}
const runtimeEngine = engine_core_1.runEngineApp({
const runtimeEngine = (0, engine_core_1.runEngineApp)({
config,

@@ -86,0 +86,0 @@ options: new Map(options),

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

}
const nodeEnvironments = environments_1.resolveEnvironments(featureName, featuresWithDefaults, 'node');
const nodeEnvironments = (0, environments_1.resolveEnvironments)(featureName, featuresWithDefaults, 'node');
// checking if already has running environments for this feature

@@ -270,3 +270,3 @@ const runningEnv = this.runningFeatures.get(featureId);

}
const { start } = ws_environment_1.runWSEnvironment(this.socketServer, nodeEnvironmentOptions);
const { start } = (0, ws_environment_1.runWSEnvironment)(this.socketServer, nodeEnvironmentOptions);
return {

@@ -278,7 +278,7 @@ start,

async runEnvironmentInNewServer(port, serverEnvironmentOptions) {
const { httpServer, port: realPort } = await create_listening_server_1.safeListeningHttpServer(port);
const { httpServer, port: realPort } = await (0, create_listening_server_1.safeListeningHttpServer)(port);
const socketServer = new socket_io_1.default.Server(httpServer, { cors: {}, ...this.socketServerOptions });
return {
start: async () => {
const { close } = await ws_environment_1.runWSEnvironment(socketServer, serverEnvironmentOptions).start();
const { close } = await (0, ws_environment_1.runWSEnvironment)(socketServer, serverEnvironmentOptions).start();
const openSockets = new Set();

@@ -339,3 +339,3 @@ const captureConnections = (socket) => {

async runRemoteNodeEnvironment(options) {
const { remoteNodeEnvironment, process: childProc } = await remote_node_environment_1.startRemoteNodeEnvironment(cliEntry, {
const { remoteNodeEnvironment, process: childProc } = await (0, remote_node_environment_1.startRemoteNodeEnvironment)(cliEntry, {
inspect: this.options.inspect,

@@ -351,3 +351,3 @@ port: this.options.port,

remoteNodeEnvironment.subscribe((message) => {
if (types_1.isEnvironmentStartMessage(message)) {
if ((0, types_1.isEnvironmentStartMessage)(message)) {
resolve();

@@ -354,0 +354,0 @@ }

@@ -11,5 +11,5 @@ "use strict";

function parseCliArguments(args) {
return Object.fromEntries(Object.entries(minimist_1.default(args)).map(([key, value]) => [exports.kebabCaseToCamelCase(key), value]));
return Object.fromEntries(Object.entries((0, minimist_1.default)(args)).map(([key, value]) => [(0, exports.kebabCaseToCamelCase)(key), value]));
}
exports.parseCliArguments = parseCliArguments;
//# sourceMappingURL=parse-cli-arguments.js.map

@@ -17,6 +17,6 @@ "use strict";

var _a, _b, _c, _d;
if (types_1.isEnvironmentPortMessage(message)) {
if ((0, types_1.isEnvironmentPortMessage)(message)) {
remoteProcess.postMessage({ id: 'port-request', payload: { port } });
}
else if (types_1.isEnvironmentStartMessage(message)) {
else if ((0, types_1.isEnvironmentStartMessage)(message)) {
// clearing because if running features one after the other on same engine, it is possible that some measuring were done on disposal of stuff, and the measures object will not be re-evaluated, so cleaning it

@@ -50,3 +50,3 @@ cross_performance_1.default.clearMarks();

};
const { close } = await ws_environment_1.runWSEnvironment(socketServer, {
const { close } = await (0, ws_environment_1.runWSEnvironment)(socketServer, {
...message.data,

@@ -65,3 +65,3 @@ config: [

}
else if (types_1.isEnvironmentCloseMessage(message) && environments[message.envName]) {
else if ((0, types_1.isEnvironmentCloseMessage)(message) && environments[message.envName]) {
await environments[message.envName]();

@@ -78,3 +78,3 @@ remoteProcess.off('message', messageHandler);

}
else if (types_1.isEnvironmentMetricsRequestMessage(message)) {
else if ((0, types_1.isEnvironmentMetricsRequestMessage)(message)) {
const metricsMessage = {

@@ -81,0 +81,0 @@ id: 'metrics-response',

@@ -27,6 +27,6 @@ "use strict";

const process_communication_1 = require("./process-communication");
const { preferredPort, socketServerOptions: socketServerOptionsJson, requiredPaths: requiredPathsJson, _: [providedPath = process.cwd()], } = parse_cli_arguments_1.parseCliArguments(process.argv.slice(1));
const { preferredPort, socketServerOptions: socketServerOptionsJson, requiredPaths: requiredPathsJson, _: [providedPath = process.cwd()], } = (0, parse_cli_arguments_1.parseCliArguments)(process.argv.slice(1));
const requiredPaths = JSON.parse(requiredPathsJson);
const socketServerOptions = JSON.parse(socketServerOptionsJson);
const basePath = path_1.resolve(providedPath);
const basePath = (0, path_1.resolve)(providedPath);
const httpServerPort = preferredPort ? parseInt(preferredPort, 10) : undefined;

@@ -43,4 +43,4 @@ (async () => {

}
const { socketServer, close, port } = await launch_http_server_1.launchEngineHttpServer({
staticDirPath: path_1.join(basePath, 'dist'),
const { socketServer, close, port } = await (0, launch_http_server_1.launchEngineHttpServer)({
staticDirPath: (0, path_1.join)(basePath, 'dist'),
httpServerPort,

@@ -50,3 +50,3 @@ socketServerOptions,

const parentProcess = new forked_process_1.ForkedProcess(process);
process_communication_1.createIPC(parentProcess, socketServer, { port, onClose: close });
(0, process_communication_1.createIPC)(parentProcess, socketServer, { port, onClose: close });
parentProcess.postMessage({ id: 'initiated' });

@@ -53,0 +53,0 @@ })().catch((e) => {

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

const execArgv = inspect ? ['--inspect'] : [];
const childProc = child_process_1.fork(entryFilePath, [
const childProc = (0, child_process_1.fork)(entryFilePath, [
'--preferredPort',

@@ -27,3 +27,3 @@ `${port}`,

});
await events_1.once(childProc, 'message');
await (0, events_1.once)(childProc, 'message');
childProc.on('error', (e) => console.error(`error in forked process`, e));

@@ -41,3 +41,3 @@ return { remoteNodeEnvironment: new RemoteNodeEnvironment(new forked_process_1.ForkedProcess(childProc)), process: childProc };

this.subscribe((message) => {
if (types_1.isEnvironmentPortMessage(message)) {
if ((0, types_1.isEnvironmentPortMessage)(message)) {
resolve(message.payload.port);

@@ -44,0 +44,0 @@ }

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

start: async () => {
const runtimeEngine = await node_environment_1.runNodeEnvironment({
const runtimeEngine = await (0, node_environment_1.runNodeEnvironment)({
...startEnvironmentOptions,

@@ -14,0 +14,0 @@ host: wsHost,

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

@@ -11,4 +11,4 @@ "types": "dist/index.d.ts",

"@wixc3/cross-performance": "^21.0.0",
"@wixc3/engine-core": "^21.1.3",
"@wixc3/engine-core-node": "^21.1.3",
"@wixc3/engine-core": "^21.1.5",
"@wixc3/engine-core-node": "^21.1.5",
"create-listening-server": "^1.0.0",

@@ -15,0 +15,0 @@ "minimist": "^1.2.5",

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

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