Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*/
/*
default: {
module: 'resolve-readmodel-mongo',
options: {
url: 'mongodb://127.0.0.1:27017/ReadModelAdvancedSample'
}
}
*/
}
}
// mdis-stop dev-config
const config = merge(defaultResolveConfig, localConfig, appConfig, devConfig)
validateConfig(config)
export default config
*/
/*
default: {
module: 'resolve-readmodel-mongo',
options: {
url: 'mongodb://127.0.0.1:27017/ReadModelStoriesSample'
}
}
*/
}
}
// mdis-stop dev-config
const config = merge(defaultResolveConfig, localConfig, appConfig, devConfig)
validateConfig(config)
export default config
*/
/*
default: {
module: 'resolve-readmodel-mongo',
options: {
url: 'mongodb://127.0.0.1:27017/SagaSample'
}
}
*/
}
}
// mdis-stop dev-config
const config = merge(defaultResolveConfig, localConfig, appConfig, devConfig)
validateConfig(config)
export default config
// mdis-start dev-config
const devConfig = {
readModelConnectors: {
default: {
module: 'connector.js',
options: {
prefix: 'read-model-database'
}
}
}
}
// mdis-stop dev-config
const config = merge(defaultResolveConfig, localConfig, appConfig, devConfig)
validateConfig(config)
export default config
*/
/*
default: {
module: 'resolve-readmodel-mongo',
options: {
url: 'mongodb://127.0.0.1:27017/SagaMockSideEffectsSample'
}
}
*/
}
}
// mdis-stop dev-config
const config = merge(defaultResolveConfig, localConfig, appConfig, devConfig)
validateConfig(config)
export default config
*/
/*
default: {
module: 'resolve-readmodel-mongo',
options: {
url: 'mongodb://127.0.0.1:27017/ReadModelCommentsSample'
}
}
*/
}
}
// mdis-stop dev-config
const config = merge(defaultResolveConfig, localConfig, appConfig, devConfig)
validateConfig(config)
export default config
break
}
case 'build': {
await build(merge(defaultResolveConfig, appConfig, prodConfig))
break
}
case 'start': {
await start(merge(defaultResolveConfig, appConfig, prodConfig))
break
}
case 'test:functional': {
await runTestcafe({
resolveConfig: merge(
defaultResolveConfig,
appConfig,
testFunctionalConfig
),
functionalTestsDir: 'test/functional',
browser: process.argv[3]
})
break
}
default: {
throw new Error('Unknown option')
}
}
})().catch(error => {
// eslint-disable-next-line no-console
commonPackages
}),
functionalTestsDir: './test/functional',
browser: process.argv[3]
// customArgs: ['-r', 'json:report.json']
})
break
}
default: {
throw new Error('Unknown option')
}
}
await stop()
} catch (error) {
await stop(error)
}
})()
import { declareRuntimeEnv } from 'resolve-scripts'
const testFunctionalConfig = {
target: 'local',
port: declareRuntimeEnv('PORT', '3000'),
mode: 'development',
readModelConnectors: {
default: {
module: 'resolve-readmodel-lite',
options: {
databaseFile: 'data/read-models-test-functional.db'
}
}
},
storageAdapter: {
module: 'resolve-storage-lite',
options: {
databaseFile: 'data/event-store-test-functional.db'
}
},
eventBroker: {
dropReadModels: true,
dropSagas: true
})
await watch(resolveConfig)
break
}
case 'build': {
const resolveConfig = merge(defaultResolveConfig, appConfig, prodConfig)
await build(resolveConfig)
break
}
case 'cloud': {
await build(merge(defaultResolveConfig, appConfig, cloudConfig))
break
}
case 'start': {
await start(merge(defaultResolveConfig, appConfig, prodConfig))
break
}
case 'reset': {
const resolveConfig = merge(defaultResolveConfig, appConfig, devConfig)
await reset(resolveConfig, {
dropEventStore: false,
dropSnapshots: true,
dropReadModels: true,
dropSagas: true
})