Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
currentSandboxModule => currentSandboxModule.shortid === module.shortid
).code,
})),
});
Object.assign(state.editor.sandboxes[state.editor.currentId], sandbox);
state.editor.modulesByPath = effects.vscode.sandboxFsSync.create(sandbox);
effects.live.sendModuleStateSyncRequest();
};
export const liveMessageReceived: Operator = pipe(
filter((_, payload) =>
Object.values(LiveMessageEvent).includes(payload.event)
),
fork((_, payload) => payload.event, {
[LiveMessageEvent.JOIN]: liveMessage.onJoin,
[LiveMessageEvent.MODULE_STATE]: liveMessage.onModuleState,
[LiveMessageEvent.USER_ENTERED]: liveMessage.onUserEntered,
[LiveMessageEvent.USER_LEFT]: liveMessage.onUserLeft,
[LiveMessageEvent.MODULE_SAVED]: liveMessage.onModuleSaved,
[LiveMessageEvent.MODULE_CREATED]: liveMessage.onModuleCreated,
[LiveMessageEvent.MODULE_MASS_CREATED]: liveMessage.onModuleMassCreated,
[LiveMessageEvent.MODULE_UPDATED]: liveMessage.onModuleUpdated,
[LiveMessageEvent.MODULE_DELETED]: liveMessage.onModuleDeleted,
[LiveMessageEvent.DIRECTORY_CREATED]: liveMessage.onDirectoryCreated,
[LiveMessageEvent.DIRECTORY_UPDATED]: liveMessage.onDirectoryUpdated,
[LiveMessageEvent.DIRECTORY_DELETED]: liveMessage.onDirectoryDeleted,
[LiveMessageEvent.USER_SELECTION]: liveMessage.onUserSelection,
[LiveMessageEvent.USER_CURRENT_MODULE]: liveMessage.onUserCurrentModule,
[LiveMessageEvent.LIVE_MODE]: liveMessage.onLiveMode,
[LiveMessageEvent.LIVE_CHAT_ENABLED]: liveMessage.onLiveChatEnabled,
) => Operator> = (paths) =>
fork((_, value) => value.type, paths) as Operator>