Socket
Socket
Sign inDemoInstall

@wixc3/engine-core

Package Overview
Dependencies
Maintainers
142
Versions
332
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wixc3/engine-core - npm Package Compare versions

Comparing version 4.0.4 to 5.0.0

19

cjs/com/communication.d.ts
import { Message } from './message-types';
import { AsyncApi, EnvironmentInstanceToken, SerializableArguments, Target, WindowHost } from './types';
import { AsyncEnvironment, AsyncSingleEndpointEnvironment } from '../entities/async-env';
import { NodeEnvironment, SingleEndpointContextualEnvironment } from '../entities/env';
import { EndpointType, Environment, NodeEnvironment, SingleEndpointContextualEnvironment } from '../entities/env';
import { IDTag } from '../types';
export interface ICommunicationOptions {
warnOnSlow?: boolean;
}
/**

@@ -11,4 +13,3 @@ * Main class that manage all api registration and message forwarding in each execution context.

private topology;
private contextMappings;
isServer: boolean;
private resolvedContexts;
private rootEnvId;

@@ -18,2 +19,3 @@ private rootEnvName;

private readonly callbackTimeout;
private readonly slowThreshold;
private callbacks;

@@ -27,3 +29,4 @@ private environments;

private apisOverrides;
constructor(host: Target, id: string, topology?: Record<string, string>, contextMappings?: Record<string, string>, isServer?: boolean);
private options;
constructor(host: Target, id: string, topology?: Record<string, string>, resolvedContexts?: Record<string, string>, options?: ICommunicationOptions);
/**

@@ -37,7 +40,7 @@ * Registers environments that spawned in the same execution context as the root environment.

registerAPI<T>({ id }: IDTag<string>, api: T): T;
spawnOrConnect(endPoint: SingleEndpointContextualEnvironment<string, AsyncSingleEndpointEnvironment[]>): Promise<{
spawnOrConnect(endPoint: SingleEndpointContextualEnvironment<string, Environment[]>): Promise<{
id: string;
}>;
getEnvironmentContext(endPoint: SingleEndpointContextualEnvironment<string, AsyncSingleEndpointEnvironment[]>): string;
spawn(endPoint: AsyncEnvironment, host?: WindowHost): Promise<{
getEnvironmentContext(endPoint: SingleEndpointContextualEnvironment<string, Environment[]>): string;
spawn(endPoint: Environment<string, EndpointType>, host?: WindowHost): Promise<{
id: string;

@@ -44,0 +47,0 @@ }>;

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

class Communication {
constructor(host, id, topology = {}, contextMappings = {}, isServer = false) {
constructor(host, id, topology = {}, resolvedContexts = {}, options) {
this.topology = topology;
this.contextMappings = contextMappings;
this.isServer = isServer;
this.resolvedContexts = resolvedContexts;
this.idsCounter = new helpers_1.MultiCounter();
this.callbackTimeout = 5000; // 5 seconds
this.callbackTimeout = 60000 * 2; // 2 minutes
this.slowThreshold = 5000; // 5 seconds
this.callbacks = {};

@@ -32,2 +32,3 @@ this.environments = {};

};
this.options = Object.assign({ warnOnSlow: false }, options);
this.rootEnvId = id;

@@ -65,3 +66,3 @@ this.rootEnvName = id.split('/')[0];

async spawnOrConnect(endPoint) {
const runtimeEnvironmentName = this.contextMappings[endPoint.env];
const runtimeEnvironmentName = this.resolvedContexts[endPoint.env];
const activeEnvironment = endPoint.environments.find(env => env.env === runtimeEnvironmentName);

@@ -74,3 +75,3 @@ activeEnvironment.env = endPoint.env;

getEnvironmentContext(endPoint) {
return this.contextMappings[endPoint.env];
return this.resolvedContexts[endPoint.env];
}

@@ -424,2 +425,10 @@ async spawn(endPoint, host) {

};
if (this.options.warnOnSlow) {
setTimeout(() => {
if (this.callbacks[callbackId]) {
// tslint:disable-next-line: no-console
console.error(errors_1.CALLBACK_TIMEOUT(callbackId, this.rootEnvId, removeMessageArgs(message)));
}
}, this.slowThreshold);
}
const timerId = setTimeout(() => {

@@ -433,3 +442,2 @@ reject(new Error(errors_1.CALLBACK_TIMEOUT(callbackId, this.rootEnvId, removeMessageArgs(message))));

};
// return callbackId
}

@@ -436,0 +444,0 @@ injectScript(win, rootComId, scriptUrl) {

import { Communication } from './com/communication';
import { LoggerService } from './com/logger-service';
import { Target } from './com/types';
import { AsyncEnvironment, AsyncSingleEndpointEnvironment } from './entities/async-env';
import { Config } from './entities/config';
import { AllEnvironments, NodeEnvironment, SingleEndpointContextualEnvironment } from './entities/env';
import { Environment, NodeEnvironment, SingleEndpointContextualEnvironment } from './entities/env';
import { Feature } from './entities/feature';

@@ -15,3 +14,3 @@ import { Service } from './entities/service';

topology: Record<string, string>;
contextMappings: Record<string, string>;
resolvedContexts: Record<string, string>;
loggerSeverity: LogLevel;

@@ -23,9 +22,9 @@ logToConsole?: boolean;

config: Config<IComConfig, import("./types").EnvVisibility>;
loggerTransports: Slot<import("./entities/slot").Registry<LoggerTransport>, import("./entities/env").Environment<"<Universal>", "multi">>;
loggerService: Service<LoggerService, LoggerService, import("./entities/env").Environment<"<Universal>", "multi">, import("./entities/env").Environment<"<Universal>", "multi">, false>;
spawn: Service<(endPoint: AsyncEnvironment, host?: HTMLIFrameElement | Window | undefined) => Promise<{
loggerTransports: Slot<import("./entities/slot").Registry<LoggerTransport>, Environment<"<Universal>", "multi">>;
loggerService: Service<LoggerService, LoggerService, Environment<"<Universal>", "multi">, Environment<"<Universal>", "multi">, false>;
spawn: Service<(endPoint: Environment<string, import("./entities/env").EndpointType>, host?: HTMLIFrameElement | Window | undefined) => Promise<{
id: string;
}>, (endPoint: AsyncEnvironment, host?: HTMLIFrameElement | Window | undefined) => Promise<{
}>, (endPoint: Environment<string, import("./entities/env").EndpointType>, host?: HTMLIFrameElement | Window | undefined) => Promise<{
id: string;
}>, AllEnvironments, AllEnvironments, false>;
}>, Environment<string, import("./entities/env").EndpointType>, Environment<string, import("./entities/env").EndpointType>, false>;
connect: Service<(endPoint: NodeEnvironment<string>) => Promise<{

@@ -35,11 +34,11 @@ id: string;

id: string;
}>, AllEnvironments, AllEnvironments, false>;
spawnOrConnect: Service<(endPoint: SingleEndpointContextualEnvironment<string, AsyncSingleEndpointEnvironment[]>) => Promise<{
}>, Environment<string, import("./entities/env").EndpointType>, Environment<string, import("./entities/env").EndpointType>, false>;
spawnOrConnect: Service<(endPoint: SingleEndpointContextualEnvironment<string, Environment<string, import("./entities/env").EndpointType>[]>) => Promise<{
id: string;
}>, (endPoint: SingleEndpointContextualEnvironment<string, AsyncSingleEndpointEnvironment[]>) => Promise<{
}>, (endPoint: SingleEndpointContextualEnvironment<string, Environment<string, import("./entities/env").EndpointType>[]>) => Promise<{
id: string;
}>, AllEnvironments, AllEnvironments, false>;
communication: Service<Communication, Communication, AllEnvironments, AllEnvironments, false>;
}>, Environment<string, import("./entities/env").EndpointType>, Environment<string, import("./entities/env").EndpointType>, false>;
communication: Service<Communication, Communication, Environment<string, import("./entities/env").EndpointType>, Environment<string, import("./entities/env").EndpointType>, false>;
}, Record<string, import("./types").Context<any>>>;
export default _default;
//# sourceMappingURL=communication.feature.d.ts.map

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

const slot_1 = require("./entities/slot");
const symbols_1 = require("./symbols");
const types_1 = require("./types");

@@ -21,4 +22,4 @@ exports.default = new feature_1.Feature({

topology: {},
contextMappings: {}
}, (a, b) => (Object.assign({}, a, b, { topology: Object.assign({}, a.topology, b.topology), contextMappings: Object.assign({}, a.contextMappings, b.contextMappings) }))),
resolvedContexts: {}
}, (a, b) => (Object.assign({}, a, b, { topology: Object.assign({}, a.topology, b.topology), resolvedContexts: Object.assign({}, a.resolvedContexts, b.resolvedContexts) }))),
loggerTransports: slot_1.Slot.withType().defineEntity(env_1.Universal),

@@ -31,3 +32,3 @@ loggerService: service_1.Service.withType().defineEntity(env_1.Universal),

}
}).setup(env_1.Universal, ({ config: { host, id, topology, maxLogMessages, loggerSeverity, logToConsole, contextMappings }, loggerTransports }) => {
}).setup(env_1.Universal, ({ config: { host, id, topology, maxLogMessages, loggerSeverity, logToConsole, resolvedContexts }, loggerTransports, [symbols_1.RUN_OPTIONS]: runOptions }) => {
// worker and iframe always get `name` when initialized as Environment.

@@ -37,13 +38,17 @@ // it can be overridden using top level config.

let communication;
const warnOnSlow = runOptions.has('warnOnSlow');
// TODO: find better way to detect node runtime
const communicationOptions = {
warnOnSlow
};
if (typeof process !== 'undefined' && process.title !== 'browser') {
if (host) {
communication = new communication_1.Communication(host, id || host.name || 'main', topology, contextMappings, true);
communication = new communication_1.Communication(host, id || host.name || 'main', topology, resolvedContexts, communicationOptions);
}
else {
communication = new communication_1.Communication(new base_host_1.BaseHost(), id || 'main', topology, contextMappings, true);
communication = new communication_1.Communication(new base_host_1.BaseHost(), id || 'main', topology, resolvedContexts, communicationOptions);
}
}
else {
communication = new communication_1.Communication(self, id || self.name || 'main', topology, contextMappings);
communication = new communication_1.Communication(self, id || self.name || 'main', topology, resolvedContexts, communicationOptions);
}

@@ -50,0 +55,0 @@ const loggerService = new logger_service_1.LoggerService(loggerTransports, { environment: communication.getEnvironmentId() }, { severity: loggerSeverity, maxLogMessages, logToConsole });

import { RuntimeEngine } from '../runtime-engine';
import { CREATE_RUNTIME, REGISTER_VALUE } from '../symbols';
import { EnvVisibility } from '../types';
import { AllEnvironments } from './env';
import { Environment } from './env';
import { FeatureInput } from './input';
declare type MergeConfigHook<T extends object> = (a: Readonly<T>, b: Readonly<Partial<T>>) => T;
export declare class Config<T extends object, VisibleAt extends EnvVisibility = AllEnvironments> extends FeatureInput<Readonly<T>, AllEnvironments, VisibleAt> {
export declare class Config<T extends object, VisibleAt extends EnvVisibility = Environment> extends FeatureInput<Readonly<T>, Environment, VisibleAt> {
defaultValue: Readonly<T>;

@@ -9,0 +9,0 @@ mergeConfig: MergeConfigHook<T>;

import { EnvironmentTypes } from '../com/types';
import { DisposableContext, EnvVisibility, MapBy } from '../types';
import { AsyncSingleEndpointEnvironment } from './async-env';
export interface AllEnvironments {
env: string;
endpointType: EndpointType;
}
export declare type EndpointType = 'single' | 'multi';
export declare class Environment<ID extends string, EType extends EndpointType = 'single'> {
export declare class Environment<ID extends string = string, EType extends EndpointType = EndpointType> {
env: ID;
envType: EnvironmentTypes;
endpointType: EType;
envType: EnvironmentTypes;
constructor(env: ID, endpointType?: EType, envType?: EnvironmentTypes);
constructor(env: ID, envType: EnvironmentTypes, endpointType: EType);
}

@@ -27,3 +22,3 @@ export declare class NodeEnvironment<ID extends string> extends Environment<ID, 'single'> {

}
export declare class SingleEndpointContextualEnvironment<ID extends string, T extends AsyncSingleEndpointEnvironment[]> extends Environment<ID, 'single'> {
export declare class SingleEndpointContextualEnvironment<ID extends string, T extends Array<Environment<string, EndpointType>>> extends Environment<ID, 'single'> {
environments: T;

@@ -36,3 +31,3 @@ envType: "context";

export declare const Universal: Environment<"<Universal>", "multi">;
export declare const AllEnvironments: AllEnvironments;
export declare const AllEnvironments: Environment;
export declare const NoEnvironments: Environment<"<None>", "multi">;

@@ -39,0 +34,0 @@ export declare function normEnvVisibility(envVisibility: EnvVisibility): Set<string>;

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

class Environment {
constructor(env, endpointType = 'single', envType = 'window') {
constructor(env, envType, endpointType) {
this.env = env;
this.envType = envType;
this.endpointType = endpointType;
this.envType = envType;
}

@@ -15,3 +15,3 @@ }

constructor(env) {
super(env, 'single', 'node');
super(env, 'node', 'single');
}

@@ -35,3 +35,3 @@ getLocalTopology(port) {

constructor(env, environments) {
super(env, 'single', 'context');
super(env, 'context', 'single');
this.environments = environments;

@@ -53,5 +53,5 @@ this.envType = 'context';

exports.SingleEndpointContextualEnvironment = SingleEndpointContextualEnvironment;
exports.Universal = new Environment('<Universal>', 'multi');
exports.AllEnvironments = new Environment('<All>', 'multi');
exports.NoEnvironments = new Environment('<None>', 'multi');
exports.Universal = new Environment('<Universal>', 'window', 'multi');
exports.AllEnvironments = new Environment('<All>', 'window', 'multi');
exports.NoEnvironments = new Environment('<None>', 'window', 'multi');
function normEnvVisibility(envVisibility) {

@@ -58,0 +58,0 @@ const envSet = new Set();

import { RuntimeEngine } from '../runtime-engine';
import { CREATE_RUNTIME, DISPOSE, RUN } from '../symbols';
import { DisposableContext, DisposeFunction, EntityMap, EnvironmentFilter, FeatureDef, MapToProxyType, PartialFeatureConfig, RunningFeatures, SetupHandler, SomeFeature } from '../types';
import { AllEnvironments } from './env';
/*************** FEATURE ***************/

@@ -9,7 +8,7 @@ export declare class RuntimeFeature<T extends SomeFeature, Deps extends SomeFeature[], API extends EntityMap> {

api: MapToProxyType<API>;
dependencies: RunningFeatures<Deps, AllEnvironments['env']>;
dependencies: RunningFeatures<Deps, string>;
private running;
private runHandlers;
private disposeHandlers;
constructor(feature: T, api: MapToProxyType<API>, dependencies: RunningFeatures<Deps, AllEnvironments['env']>);
constructor(feature: T, api: MapToProxyType<API>, dependencies: RunningFeatures<Deps, string>);
addRunHandler(fn: () => void): void;

@@ -32,4 +31,4 @@ addOnDisposeHandler(fn: DisposeFunction): void;

setupContext<T extends keyof EnvironmentContext>(environmentContext: T, contextHandler: () => EnvironmentContext[T]['type']): this;
[CREATE_RUNTIME](context: RuntimeEngine): RuntimeFeature<this, Deps, API>;
[CREATE_RUNTIME](runningEngine: RuntimeEngine): RuntimeFeature<this, Deps, API>;
}
//# sourceMappingURL=feature.d.ts.map

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

}
[symbols_1.CREATE_RUNTIME](context) {
[symbols_1.CREATE_RUNTIME](runningEngine) {
const deps = {};

@@ -83,9 +83,9 @@ const depsApis = {};

const feature = new RuntimeFeature(this, runningApi, deps);
context.features.set(this, feature);
runningEngine.features.set(this, feature);
for (const dep of this.dependencies) {
deps[dep.id] = context.initFeature(dep);
deps[dep.id] = runningEngine.initFeature(dep);
depsApis[dep.id] = deps[dep.id].api;
}
for (const [key, entity] of apiEntries) {
const provided = entity[symbols_1.CREATE_RUNTIME](context, this.id, key);
const provided = entity[symbols_1.CREATE_RUNTIME](runningEngine, this.id, key);
if (provided !== undefined) {

@@ -100,3 +100,3 @@ inputApi[key] = provided;

feature.addOnDisposeHandler(fn);
} });
}, [symbols_1.RUN_OPTIONS]: runningEngine.runOptions });
const emptyDispose = { dispose: () => undefined };

@@ -117,3 +117,3 @@ for (const [key, contextHandler] of this.contextHandlers) {

for (const [key, entity] of apiEntries) {
const registered = entity[symbols_1.REGISTER_VALUE](context, providedAPI[key], inputApi[key], this.id, key);
const registered = entity[symbols_1.REGISTER_VALUE](runningEngine, providedAPI[key], inputApi[key], this.id, key);
if (registered !== undefined) {

@@ -120,0 +120,0 @@ runningApi[key] = registered;

@@ -1,2 +0,1 @@

export * from './async-env';
export * from './config';

@@ -3,0 +2,0 @@ export * from './env';

@@ -6,3 +6,2 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./async-env"));
__export(require("./config"));

@@ -9,0 +8,0 @@ __export(require("./env"));

@@ -5,3 +5,3 @@ import { AsyncApi, EnvironmentInstanceToken } from '../com/types';

import { EnvVisibility } from '../types';
import { AllEnvironments, Environment } from './env';
import { Environment } from './env';
import { FeatureOutput } from './output';

@@ -19,3 +19,3 @@ declare type ServiceRuntime<Type, ProvidedFrom> = ProvidedFrom extends Environment<string, 'single'> ? AsyncApi<Type> : ProvidedFrom extends Environment<string, 'multi'> ? {

private constructor();
allowRemoteAccess(): Service<T, ServiceRuntime<T, ProvidedFrom>, ProvidedFrom, AllEnvironments, true>;
allowRemoteAccess(): Service<T, ServiceRuntime<T, ProvidedFrom>, ProvidedFrom, Environment<string, import("./env").EndpointType>, true>;
[REGISTER_VALUE](runtimeEngine: RuntimeEngine, providedValue: T | undefined, inputValue: PT, featureID: string, entityKey: string): any;

@@ -22,0 +22,0 @@ [CREATE_RUNTIME](context: RuntimeEngine, featureID: string, entityKey: string): any;

import { RuntimeEngine } from './runtime-engine';
import { SomeFeature, TopLevelConfig } from './types';
export declare function run(entryFeature: SomeFeature | SomeFeature[], topLevelConfig?: TopLevelConfig): RuntimeEngine;
import { IRunOptions, SomeFeature, TopLevelConfig } from './types';
export declare function run(entryFeature: SomeFeature | SomeFeature[], topLevelConfig?: TopLevelConfig, runOptions?: IRunOptions): RuntimeEngine;
export declare const getFeaturesDeep: (feature: import("./entities").Feature<any, any, any, any>) => Set<import("./entities").Feature<any, any, any, any>>;
export interface IFeatureLoader {
load: () => Promise<SomeFeature>;
load: (resolvedContexts: Record<string, string>) => Promise<SomeFeature>;
depFeatures: string[];

@@ -14,4 +14,5 @@ resolvedContexts: Record<string, string>;

config?: TopLevelConfig;
options?: Map<string, string>;
}
export declare function runEngineApp({ featureName, featureLoaders, config }: IRunEngineAppOptions): Promise<{
export declare function runEngineApp({ featureName, featureLoaders, config, options }: IRunEngineAppOptions): Promise<{
engine: RuntimeEngine;

@@ -18,0 +19,0 @@ runningFeature: import("./entities").Feature<any, any, any, any>;

@@ -9,22 +9,19 @@ "use strict";

const runtime_engine_1 = require("./runtime-engine");
function run(entryFeature, topLevelConfig = []) {
return new runtime_engine_1.RuntimeEngine(topLevelConfig).run(entryFeature);
function run(entryFeature, topLevelConfig = [], runOptions) {
return new runtime_engine_1.RuntimeEngine(topLevelConfig, runOptions).run(entryFeature);
}
exports.run = run;
exports.getFeaturesDeep = (feature) => flatten_tree_1.flattenTree(feature, f => f.dependencies);
async function runEngineApp({ featureName, featureLoaders, config = [] }) {
async function runEngineApp({ featureName, featureLoaders, config = [], options }) {
const featureNames = Object.keys(featureLoaders);
featureName = featureName || featureNames[0];
const rootFeatureDef = featureLoaders[featureName];
if (!rootFeatureDef) {
const rootFeatureLoader = featureName && featureLoaders[featureName];
if (!rootFeatureLoader) {
throw new Error(`cannot find feature "${featureName}". available features: ${featureNames.join(', ')}`);
}
const { resolvedContexts } = rootFeatureLoader;
const [runningFeature] = await Promise.all([
rootFeatureDef.load(),
...rootFeatureDef.depFeatures.map(depName => featureLoaders[depName].load())
rootFeatureLoader.load(resolvedContexts),
...rootFeatureLoader.depFeatures.map(depName => featureLoaders[depName].load(resolvedContexts))
]);
const engine = new runtime_engine_1.RuntimeEngine([
communication_feature_1.default.use({ config: { contextMappings: rootFeatureDef.resolvedContexts } }),
...config
]).run(runningFeature);
const engine = new runtime_engine_1.RuntimeEngine([communication_feature_1.default.use({ config: { resolvedContexts } }), ...config], options).run(runningFeature);
return {

@@ -31,0 +28,0 @@ engine,

import { RuntimeFeature } from './entities/feature';
import { SomeFeature, TopLevelConfig } from './types';
import { IRunOptions, SomeFeature, TopLevelConfig } from './types';
export declare class RuntimeEngine {
runOptions: IRunOptions;
features: Map<import("./entities/feature").Feature<any, any, any, any>, RuntimeFeature<any, any, any>>;
private running;
private topLevelConfigMap;
constructor(topLevelConfig?: TopLevelConfig);
constructor(topLevelConfig?: TopLevelConfig, runOptions?: IRunOptions);
get<T extends SomeFeature>(feature: T): RuntimeFeature<T, T['dependencies'], T['api']>;

@@ -19,7 +20,7 @@ run(features: SomeFeature | SomeFeature[]): RuntimeEngine;

loggerService: import("./entities").Service<import("./com").LoggerService, import("./com").LoggerService, import("./entities").Environment<"<Universal>", "multi">, import("./entities").Environment<"<Universal>", "multi">, false>;
spawn: import("./entities").Service<(endPoint: import("./entities").AsyncEnvironment, host?: HTMLIFrameElement | Window | undefined) => Promise<{
spawn: import("./entities").Service<(endPoint: import("./entities").Environment<string, import("./entities").EndpointType>, host?: HTMLIFrameElement | Window | undefined) => Promise<{
id: string;
}>, (endPoint: import("./entities").AsyncEnvironment, host?: HTMLIFrameElement | Window | undefined) => Promise<{
}>, (endPoint: import("./entities").Environment<string, import("./entities").EndpointType>, host?: HTMLIFrameElement | Window | undefined) => Promise<{
id: string;
}>, import("./entities").AllEnvironments, import("./entities").AllEnvironments, false>;
}>, import("./entities").Environment<string, import("./entities").EndpointType>, import("./entities").Environment<string, import("./entities").EndpointType>, false>;
connect: import("./entities").Service<(endPoint: import("./entities").NodeEnvironment<string>) => Promise<{

@@ -29,9 +30,9 @@ id: string;

id: string;
}>, import("./entities").AllEnvironments, import("./entities").AllEnvironments, false>;
spawnOrConnect: import("./entities").Service<(endPoint: import("./entities").SingleEndpointContextualEnvironment<string, import("./entities").AsyncSingleEndpointEnvironment[]>) => Promise<{
}>, import("./entities").Environment<string, import("./entities").EndpointType>, import("./entities").Environment<string, import("./entities").EndpointType>, false>;
spawnOrConnect: import("./entities").Service<(endPoint: import("./entities").SingleEndpointContextualEnvironment<string, import("./entities").Environment<string, import("./entities").EndpointType>[]>) => Promise<{
id: string;
}>, (endPoint: import("./entities").SingleEndpointContextualEnvironment<string, import("./entities").AsyncSingleEndpointEnvironment[]>) => Promise<{
}>, (endPoint: import("./entities").SingleEndpointContextualEnvironment<string, import("./entities").Environment<string, import("./entities").EndpointType>[]>) => Promise<{
id: string;
}>, import("./entities").AllEnvironments, import("./entities").AllEnvironments, false>;
communication: import("./entities").Service<import("./com").Communication, import("./com").Communication, import("./entities").AllEnvironments, import("./entities").AllEnvironments, false>;
}>, import("./entities").Environment<string, import("./entities").EndpointType>, import("./entities").Environment<string, import("./entities").EndpointType>, false>;
communication: import("./entities").Service<import("./com").Communication, import("./com").Communication, import("./entities").Environment<string, import("./entities").EndpointType>, import("./entities").Environment<string, import("./entities").EndpointType>, false>;
}, Record<string, import("./types").Context<any>>>, import("./entities/feature").Feature<any, any, any, any>[], {

@@ -41,7 +42,7 @@ config: import("./entities").Config<import("./communication.feature").IComConfig, import("./types").EnvVisibility>;

loggerService: import("./entities").Service<import("./com").LoggerService, import("./com").LoggerService, import("./entities").Environment<"<Universal>", "multi">, import("./entities").Environment<"<Universal>", "multi">, false>;
spawn: import("./entities").Service<(endPoint: import("./entities").AsyncEnvironment, host?: HTMLIFrameElement | Window | undefined) => Promise<{
spawn: import("./entities").Service<(endPoint: import("./entities").Environment<string, import("./entities").EndpointType>, host?: HTMLIFrameElement | Window | undefined) => Promise<{
id: string;
}>, (endPoint: import("./entities").AsyncEnvironment, host?: HTMLIFrameElement | Window | undefined) => Promise<{
}>, (endPoint: import("./entities").Environment<string, import("./entities").EndpointType>, host?: HTMLIFrameElement | Window | undefined) => Promise<{
id: string;
}>, import("./entities").AllEnvironments, import("./entities").AllEnvironments, false>;
}>, import("./entities").Environment<string, import("./entities").EndpointType>, import("./entities").Environment<string, import("./entities").EndpointType>, false>;
connect: import("./entities").Service<(endPoint: import("./entities").NodeEnvironment<string>) => Promise<{

@@ -51,9 +52,9 @@ id: string;

id: string;
}>, import("./entities").AllEnvironments, import("./entities").AllEnvironments, false>;
spawnOrConnect: import("./entities").Service<(endPoint: import("./entities").SingleEndpointContextualEnvironment<string, import("./entities").AsyncSingleEndpointEnvironment[]>) => Promise<{
}>, import("./entities").Environment<string, import("./entities").EndpointType>, import("./entities").Environment<string, import("./entities").EndpointType>, false>;
spawnOrConnect: import("./entities").Service<(endPoint: import("./entities").SingleEndpointContextualEnvironment<string, import("./entities").Environment<string, import("./entities").EndpointType>[]>) => Promise<{
id: string;
}>, (endPoint: import("./entities").SingleEndpointContextualEnvironment<string, import("./entities").AsyncSingleEndpointEnvironment[]>) => Promise<{
}>, (endPoint: import("./entities").SingleEndpointContextualEnvironment<string, import("./entities").Environment<string, import("./entities").EndpointType>[]>) => Promise<{
id: string;
}>, import("./entities").AllEnvironments, import("./entities").AllEnvironments, false>;
communication: import("./entities").Service<import("./com").Communication, import("./com").Communication, import("./entities").AllEnvironments, import("./entities").AllEnvironments, false>;
}>, import("./entities").Environment<string, import("./entities").EndpointType>, import("./entities").Environment<string, import("./entities").EndpointType>, false>;
communication: import("./entities").Service<import("./com").Communication, import("./com").Communication, import("./entities").Environment<string, import("./entities").EndpointType>, import("./entities").Environment<string, import("./entities").EndpointType>, false>;
}>;

@@ -60,0 +61,0 @@ private createConfigMap;

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

class RuntimeEngine {
constructor(topLevelConfig = []) {
constructor(topLevelConfig = [], runOptions = new Map()) {
this.runOptions = runOptions;
this.features = new Map();

@@ -12,0 +13,0 @@ this.running = false;

@@ -6,2 +6,3 @@ export declare const RUN: unique symbol;

export declare const SERVICE_CONFIG: unique symbol;
export declare const RUN_OPTIONS: unique symbol;
//# sourceMappingURL=symbols.d.ts.map

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

exports.SERVICE_CONFIG = Symbol('serviceConfig');
exports.RUN_OPTIONS = Symbol('RUN_OPTIONS');
//# sourceMappingURL=symbols.js.map
import { TupleToUnion } from 'typescript-type-utils';
import { LogMessage } from './common-types';
import { Config } from './entities/config';
import { AllEnvironments, Universal } from './entities/env';
import { Universal } from './entities/env';
import { Feature, RuntimeFeature } from './entities/feature';
import { RuntimeEngine } from './runtime-engine';
import { CREATE_RUNTIME, REGISTER_VALUE } from './symbols';
import { CREATE_RUNTIME, REGISTER_VALUE, RUN_OPTIONS } from './symbols';
/*************** HELPER TYPES ***************/

@@ -62,3 +62,3 @@ export declare type MapBy<T extends any[] | undefined, FIELD extends keyof TupleToUnion<T>> = {

}>;
export declare type EnvType<T extends EnvVisibility> = T extends [] ? AllEnvironments['env'] : T extends Array<{
export declare type EnvType<T extends EnvVisibility> = T extends [] ? string : T extends Array<{
env: infer U;

@@ -102,2 +102,6 @@ }> ? U : T extends {

};
export interface IRunOptions {
has(key: string): boolean;
get(key: string): string | null | undefined;
}
declare type SettingUpFeature<ID extends string, API extends EntityMap, ENV extends string> = {

@@ -107,2 +111,3 @@ id: ID;

onDispose: (fn: DisposeFunction) => void;
[RUN_OPTIONS]: IRunOptions;
} & MapVisibleInputs<API, ENV> & MapToProxyType<GetRemoteOutputs<API>> & MapToProxyType<GetOnlyLocalUniversalOutputs<API>>;

@@ -109,0 +114,0 @@ export declare type RegisteringFeature<API extends EntityMap, ENV extends string, ProvidedOutputs extends MapTypesForEnv<GetOutputs<API>, ENV, 'providedFrom'> = MapTypesForEnv<GetOutputs<API>, ENV, 'providedFrom'>> = keyof ProvidedOutputs extends never ? null : ProvidedOutputs;

{
"name": "@wixc3/engine-core",
"version": "4.0.4",
"version": "5.0.0",
"main": "cjs/index.js",

@@ -10,3 +10,3 @@ "types": "cjs/index.d.ts",

"build": "ts-build src --cjs",
"test": "run-s test:node test:browser",
"test": "yarn test:node && yarn test:browser",
"test:node": "mocha \"test/node/**/*.spec.ts?(x)\"",

@@ -13,0 +13,0 @@ "test:browser": "mocha-pup \"test/**/*.spec.ts?(x)\" -c ./test/webpack.config.js",

@@ -29,4 +29,3 @@ import {

import { SetMultiMap } from '@file-services/utils';
import { AsyncEnvironment, AsyncSingleEndpointEnvironment } from '../entities/async-env';
import { NodeEnvironment, SingleEndpointContextualEnvironment } from '../entities/env';
import { EndpointType, Environment, NodeEnvironment, SingleEndpointContextualEnvironment } from '../entities/env';
import { IDTag } from '../types';

@@ -36,2 +35,6 @@ import { BaseHost } from './base-host';

export interface ICommunicationOptions {
warnOnSlow?: boolean;
}
/**

@@ -44,3 +47,4 @@ * Main class that manage all api registration and message forwarding in each execution context.

private idsCounter = new MultiCounter();
private readonly callbackTimeout = 5000; // 5 seconds
private readonly callbackTimeout = 60_000 * 2; // 2 minutes
private readonly slowThreshold = 5_000; // 5 seconds
private callbacks: { [callbackId: string]: CallbackRecord<unknown> } = {};

@@ -54,2 +58,3 @@ private environments: { [environmentId: string]: EnvironmentRecord } = {};

private apisOverrides: RemoteAPIServicesMapping = {};
private options: Required<ICommunicationOptions>;
constructor(

@@ -59,5 +64,6 @@ host: Target,

private topology: Record<string, string> = {},
private contextMappings: Record<string, string> = {},
public isServer: boolean = false
private resolvedContexts: Record<string, string> = {},
options?: ICommunicationOptions
) {
this.options = { warnOnSlow: false, ...options };
this.rootEnvId = id;

@@ -95,6 +101,4 @@ this.rootEnvName = id.split('/')[0];

public async spawnOrConnect(
endPoint: SingleEndpointContextualEnvironment<string, AsyncSingleEndpointEnvironment[]>
) {
const runtimeEnvironmentName = this.contextMappings[endPoint.env];
public async spawnOrConnect(endPoint: SingleEndpointContextualEnvironment<string, Environment[]>) {
const runtimeEnvironmentName = this.resolvedContexts[endPoint.env];

@@ -106,12 +110,10 @@ const activeEnvironment = endPoint.environments.find(env => env.env === runtimeEnvironmentName)!;

? this.connect(activeEnvironment as NodeEnvironment<string>)
: this.spawn(activeEnvironment as AsyncEnvironment);
: this.spawn(activeEnvironment);
}
public getEnvironmentContext(
endPoint: SingleEndpointContextualEnvironment<string, AsyncSingleEndpointEnvironment[]>
) {
return this.contextMappings[endPoint.env];
public getEnvironmentContext(endPoint: SingleEndpointContextualEnvironment<string, Environment[]>) {
return this.resolvedContexts[endPoint.env];
}
public async spawn(endPoint: AsyncEnvironment, host?: WindowHost) {
public async spawn(endPoint: Environment<string, EndpointType>, host?: WindowHost) {
const { endpointType, env, envType } = endPoint;

@@ -498,2 +500,11 @@

};
if (this.options.warnOnSlow) {
setTimeout(() => {
if (this.callbacks[callbackId]) {
// tslint:disable-next-line: no-console
console.error(CALLBACK_TIMEOUT(callbackId, this.rootEnvId, removeMessageArgs(message)));
}
}, this.slowThreshold);
}
const timerId = setTimeout(() => {

@@ -507,3 +518,2 @@ reject(new Error(CALLBACK_TIMEOUT(callbackId, this.rootEnvId, removeMessageArgs(message))));

};
// return callbackId
}

@@ -510,0 +520,0 @@ private injectScript(win: Window, rootComId: string, scriptUrl: string) {

import { BaseHost } from './com/base-host';
import { Communication } from './com/communication';
import { Communication, ICommunicationOptions } from './com/communication';
import { LoggerService } from './com/logger-service';
import { Target, WindowHost } from './com/types';
import { AsyncEnvironment, AsyncSingleEndpointEnvironment } from './entities/async-env';
import { Config } from './entities/config';
import { AllEnvironments, NodeEnvironment, SingleEndpointContextualEnvironment, Universal } from './entities/env';
import {
AllEnvironments,
Environment,
NodeEnvironment,
SingleEndpointContextualEnvironment,
Universal
} from './entities/env';
import { Feature } from './entities/feature';
import { Service } from './entities/service';
import { Slot } from './entities/slot';
import { RUN_OPTIONS } from './symbols';
import { LoggerTransport, LogLevel } from './types';

@@ -17,3 +23,3 @@

topology: Record<string, string>;
contextMappings: Record<string, string>;
resolvedContexts: Record<string, string>;
loggerSeverity: LogLevel;

@@ -33,3 +39,3 @@ logToConsole?: boolean;

topology: {},
contextMappings: {}
resolvedContexts: {}
},

@@ -43,5 +49,5 @@ (a: IComConfig, b: Partial<IComConfig>) => ({

},
contextMappings: {
...a.contextMappings,
...b.contextMappings
resolvedContexts: {
...a.resolvedContexts,
...b.resolvedContexts
}

@@ -52,5 +58,5 @@ })

loggerService: Service.withType<LoggerService>().defineEntity(Universal),
spawn: Service.withType<
(endPoint: AsyncEnvironment, host?: WindowHost) => Promise<{ id: string }>
>().defineEntity(AllEnvironments),
spawn: Service.withType<(endPoint: Environment, host?: WindowHost) => Promise<{ id: string }>>().defineEntity(
AllEnvironments
),
connect: Service.withType<(endPoint: NodeEnvironment<string>) => Promise<{ id: string }>>().defineEntity(

@@ -60,5 +66,3 @@ AllEnvironments

spawnOrConnect: Service.withType<
(
endPoint: SingleEndpointContextualEnvironment<string, AsyncSingleEndpointEnvironment[]>
) => Promise<{ id: string }>
(endPoint: SingleEndpointContextualEnvironment<string, Environment[]>) => Promise<{ id: string }>
>().defineEntity(AllEnvironments),

@@ -70,4 +74,5 @@ communication: Service.withType<Communication>().defineEntity(AllEnvironments)

({
config: { host, id, topology, maxLogMessages, loggerSeverity, logToConsole, contextMappings },
loggerTransports
config: { host, id, topology, maxLogMessages, loggerSeverity, logToConsole, resolvedContexts },
loggerTransports,
[RUN_OPTIONS]: runOptions
}) => {

@@ -78,11 +83,33 @@ // worker and iframe always get `name` when initialized as Environment.

let communication: Communication;
const warnOnSlow = runOptions.has('warnOnSlow');
// TODO: find better way to detect node runtime
const communicationOptions: ICommunicationOptions = {
warnOnSlow
};
if (typeof process !== 'undefined' && process.title !== 'browser') {
if (host) {
communication = new Communication(host, id || host.name || 'main', topology, contextMappings, true);
communication = new Communication(
host,
id || host.name || 'main',
topology,
resolvedContexts,
communicationOptions
);
} else {
communication = new Communication(new BaseHost(), id || 'main', topology, contextMappings, true);
communication = new Communication(
new BaseHost(),
id || 'main',
topology,
resolvedContexts,
communicationOptions
);
}
} else {
communication = new Communication(self, id || self.name || 'main', topology, contextMappings);
communication = new Communication(
self,
id || self.name || 'main',
topology,
resolvedContexts,
communicationOptions
);
}

@@ -89,0 +116,0 @@

import { RuntimeEngine } from '../runtime-engine';
import { CREATE_RUNTIME, REGISTER_VALUE } from '../symbols';
import { EnvVisibility } from '../types';
import { AllEnvironments } from './env';
import { AllEnvironments, Environment } from './env';
import { FeatureInput } from './input';

@@ -9,5 +9,5 @@

export class Config<T extends object, VisibleAt extends EnvVisibility = AllEnvironments> extends FeatureInput<
export class Config<T extends object, VisibleAt extends EnvVisibility = Environment> extends FeatureInput<
Readonly<T>,
AllEnvironments,
Environment,
VisibleAt

@@ -14,0 +14,0 @@ > {

import { EnvironmentTypes } from '../com/types';
import { runtimeType } from '../entity-helpers';
import { DisposableContext, EnvVisibility, MapBy } from '../types';
import { AsyncSingleEndpointEnvironment } from './async-env';
export interface AllEnvironments {
env: string;
endpointType: EndpointType;
}
export type EndpointType = 'single' | 'multi';
export class Environment<ID extends string, EType extends EndpointType = 'single'> {
constructor(
public env: ID,
public endpointType: EType = 'single' as EType,
public envType: EnvironmentTypes = 'window'
) {}
export class Environment<ID extends string = string, EType extends EndpointType = EndpointType> {
constructor(public env: ID, public envType: EnvironmentTypes, public endpointType: EType) {}
}

@@ -23,3 +13,3 @@

constructor(env: ID) {
super(env, 'single', 'node');
super(env, 'node', 'single');
}

@@ -40,7 +30,7 @@

ID extends string,
T extends AsyncSingleEndpointEnvironment[]
T extends Array<Environment<string, EndpointType>>
> extends Environment<ID, 'single'> {
public envType = 'context' as const;
constructor(env: ID, public environments: T) {
super(env, 'single', 'context');
super(env, 'context', 'single');

@@ -67,5 +57,5 @@ if (environments.length === 0) {

export const Universal = new Environment('<Universal>', 'multi');
export const AllEnvironments: AllEnvironments = new Environment('<All>', 'multi');
export const NoEnvironments = new Environment('<None>', 'multi');
export const Universal = new Environment('<Universal>', 'window', 'multi');
export const AllEnvironments: Environment = new Environment('<All>', 'window', 'multi');
export const NoEnvironments = new Environment('<None>', 'window', 'multi');

@@ -72,0 +62,0 @@ export function normEnvVisibility(envVisibility: EnvVisibility): Set<string> {

import { RuntimeEngine } from '../runtime-engine';
import { CREATE_RUNTIME, DISPOSE, REGISTER_VALUE, RUN } from '../symbols';
import { CREATE_RUNTIME, DISPOSE, REGISTER_VALUE, RUN, RUN_OPTIONS } from '../symbols';
import {

@@ -16,3 +16,3 @@ DisposableContext,

} from '../types';
import { AllEnvironments, testEnvironmentCollision, Universal } from './env';
import { Environment, testEnvironmentCollision, Universal } from './env';

@@ -29,3 +29,3 @@ /*************** FEATURE ***************/

public api: MapToProxyType<API>,
public dependencies: RunningFeatures<Deps, AllEnvironments['env']>
public dependencies: RunningFeatures<Deps, string>
) {}

@@ -72,3 +72,3 @@ public addRunHandler(fn: () => void) {

private environmentIml = new Set<string>();
private setupHandlers = new Set<SetupHandler<AllEnvironments, ID, Deps, API, EnvironmentContext>>();
private setupHandlers = new Set<SetupHandler<Environment, ID, Deps, API, EnvironmentContext>>();
private contextHandlers = new Map<string | number | symbol, () => unknown>();

@@ -116,3 +116,3 @@ constructor(def: FeatureDef<ID, Deps, API, EnvironmentContext>) {

public [CREATE_RUNTIME](context: RuntimeEngine): RuntimeFeature<this, Deps, API> {
public [CREATE_RUNTIME](runningEngine: RuntimeEngine): RuntimeFeature<this, Deps, API> {
const deps: any = {};

@@ -127,6 +127,6 @@ const depsApis: any = {};

context.features.set(this, feature);
runningEngine.features.set(this, feature);
for (const dep of this.dependencies) {
deps[dep.id] = context.initFeature(dep);
deps[dep.id] = runningEngine.initFeature(dep);
depsApis[dep.id] = deps[dep.id].api;

@@ -136,3 +136,3 @@ }

for (const [key, entity] of apiEntries) {
const provided = entity[CREATE_RUNTIME](context, this.id, key);
const provided = entity[CREATE_RUNTIME](runningEngine, this.id, key);
if (provided !== undefined) {

@@ -151,3 +151,4 @@ inputApi[key] = provided;

feature.addOnDisposeHandler(fn);
}
},
[RUN_OPTIONS]: runningEngine.runOptions
};

@@ -172,3 +173,3 @@

for (const [key, entity] of apiEntries) {
const registered = entity[REGISTER_VALUE](context, providedAPI[key], inputApi[key], this.id, key);
const registered = entity[REGISTER_VALUE](runningEngine, providedAPI[key], inputApi[key], this.id, key);
if (registered !== undefined) {

@@ -175,0 +176,0 @@ runningApi[key] = registered;

@@ -1,2 +0,1 @@

export * from './async-env';
export * from './config';

@@ -3,0 +2,0 @@ export * from './env';

@@ -39,3 +39,3 @@ import { AsyncApi, EnvironmentInstanceToken } from '../com/types';

type U = ServiceRuntime<T, ProvidedFrom>;
return new Service<T, U, ProvidedFrom, AllEnvironments, true>(this.providedFrom, AllEnvironments, true);
return new Service<T, U, ProvidedFrom, Environment, true>(this.providedFrom, AllEnvironments, true);
}

@@ -42,0 +42,0 @@ // public allowRemoteAccess<U extends ServiceRuntime<T, ProvidedFrom>> = ServiceRuntime<T, ProvidedFrom>>() {

import COM from './communication.feature';
import { flattenTree } from './flatten-tree';
import { RuntimeEngine } from './runtime-engine';
import { SomeFeature, TopLevelConfig } from './types';
import { IRunOptions, SomeFeature, TopLevelConfig } from './types';
export function run(entryFeature: SomeFeature | SomeFeature[], topLevelConfig: TopLevelConfig = []): RuntimeEngine {
return new RuntimeEngine(topLevelConfig).run(entryFeature);
export function run(
entryFeature: SomeFeature | SomeFeature[],
topLevelConfig: TopLevelConfig = [],
runOptions?: IRunOptions
): RuntimeEngine {
return new RuntimeEngine(topLevelConfig, runOptions).run(entryFeature);
}

@@ -13,3 +17,3 @@

export interface IFeatureLoader {
load: () => Promise<SomeFeature>;
load: (resolvedContexts: Record<string, string>) => Promise<SomeFeature>;
depFeatures: string[];

@@ -23,22 +27,23 @@ resolvedContexts: Record<string, string>;

config?: TopLevelConfig;
options?: Map<string, string>;
}
export async function runEngineApp({ featureName, featureLoaders, config = [] }: IRunEngineAppOptions) {
export async function runEngineApp({ featureName, featureLoaders, config = [], options }: IRunEngineAppOptions) {
const featureNames = Object.keys(featureLoaders);
featureName = featureName || featureNames[0];
const rootFeatureDef = featureLoaders[featureName];
if (!rootFeatureDef) {
const rootFeatureLoader = featureName && featureLoaders[featureName];
if (!rootFeatureLoader) {
throw new Error(`cannot find feature "${featureName}". available features: ${featureNames.join(', ')}`);
}
const { resolvedContexts } = rootFeatureLoader;
const [runningFeature] = await Promise.all([
rootFeatureDef.load(),
...rootFeatureDef.depFeatures.map(depName => featureLoaders[depName].load())
rootFeatureLoader.load(resolvedContexts),
...rootFeatureLoader.depFeatures.map(depName => featureLoaders[depName].load(resolvedContexts))
]);
const engine = new RuntimeEngine([
COM.use({ config: { contextMappings: rootFeatureDef.resolvedContexts } }),
...config
]).run(runningFeature);
const engine = new RuntimeEngine([COM.use({ config: { resolvedContexts } }), ...config], options).run(
runningFeature
);

@@ -45,0 +50,0 @@ return {

import COM from './communication.feature';
import { RuntimeFeature } from './entities/feature';
import { CREATE_RUNTIME, DISPOSE, RUN } from './symbols';
import { SomeFeature, SomeRuntimeFeature, TopLevelConfig } from './types';
import { IRunOptions, SomeFeature, SomeRuntimeFeature, TopLevelConfig } from './types';

@@ -10,3 +10,3 @@ export class RuntimeEngine {

private topLevelConfigMap: Record<string, object[]>;
constructor(topLevelConfig: TopLevelConfig = []) {
constructor(topLevelConfig: TopLevelConfig = [], public runOptions: IRunOptions = new Map()) {
this.topLevelConfigMap = this.createConfigMap(topLevelConfig);

@@ -13,0 +13,0 @@ }

@@ -6,1 +6,2 @@ export const RUN = Symbol('RUN');

export const SERVICE_CONFIG = Symbol('serviceConfig');
export const RUN_OPTIONS = Symbol('RUN_OPTIONS');
import { TupleToUnion } from 'typescript-type-utils';
import { LogMessage } from './common-types';
import { Config } from './entities/config';
import { AllEnvironments, Universal } from './entities/env';
import { Universal } from './entities/env';
import { Feature, RuntimeFeature } from './entities/feature';
import { RuntimeEngine } from './runtime-engine';
import { CREATE_RUNTIME, REGISTER_VALUE } from './symbols';
import { CREATE_RUNTIME, REGISTER_VALUE, RUN_OPTIONS } from './symbols';

@@ -81,3 +81,3 @@ /*************** HELPER TYPES ***************/

export type EnvType<T extends EnvVisibility> = T extends []
? AllEnvironments['env']
? string
: T extends Array<{ env: infer U }>

@@ -145,2 +145,7 @@ ? U

export interface IRunOptions {
has(key: string): boolean;
get(key: string): string | null | undefined;
}
type SettingUpFeature<ID extends string, API extends EntityMap, ENV extends string> = {

@@ -150,2 +155,3 @@ id: ID;

onDispose: (fn: DisposeFunction) => void;
[RUN_OPTIONS]: IRunOptions;
} & MapVisibleInputs<API, ENV> &

@@ -152,0 +158,0 @@ MapToProxyType<GetRemoteOutputs<API>> &

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

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

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