Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mm.cluster = (options) => {
if (process.env.MIDWAY_BASE_DIR && !options.baseDir) { options.baseDir = process.env.MIDWAY_BASE_DIR; }
if (process.env.MIDWAY_FRAMEWORK_PATH && !options.framework) { options.framework = process.env.MIDWAY_FRAMEWORK_PATH; }
// @ts-ignore
return mock.cluster(Object.assign({
framework: options.framework || defaultFramework,
typescript: !!require.extensions['.ts'],
}, options));
};
exports.cluster = (name, options) => {
options = formatOptions(name, options);
return mm.cluster(options);
};