Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const localEntry = async ({ assemblies, constants, domain, redux, routes }) => {
try {
const resolve = {
instanceId: `${process.pid}${Math.floor(Math.random() * 100000)}`,
seedClientEnvs: assemblies.seedClientEnvs,
...domain,
...constants,
eventBroker: {},
assemblies,
redux,
routes
}
resolve.aggregateActions = {}
for (const aggregate of domain.aggregates) {
Object.assign(resolve.aggregateActions, createActions(aggregate))
}
await initPerformanceTracer(resolve)
await initBroker(resolve)
await initExpress(resolve)
await initWebsockets(resolve)
await startExpress(resolve)
log.debug('Local entry point cold start success')
return emptyWorker
} catch (error) {
log.error('Local entry point cold start failure', error)
}
}
(result, aggregate) => ({ ...result, ...createActions(aggregate) }),
{}
(result, aggregate) => ({ ...result, ...createActions(aggregate) }),
{}
import { createActions } from 'resolve-redux'
import todoAggregate from '../../common/aggregates/todo'
export default createActions(todoAggregate, {
setVisibilityFilter: filter => ({
type: 'SET_VISIBILITY_FILTER',
filter
})
})