Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.on('data', (line) => mainStory.info(line))
.on('end', () => { if (!program.server) process.exit(); });
_write(chunk: string, enc: string, next: Function) {
const str = chunk.toString();
if (str && str.length) {
mainStory.info('http', str.replace('\n', ''));
}
next();
}
}
httpServer.on('listening', () => {
mainStory.info('http', `Listening on port ${chalk.cyan.bold(port)}`);
});
httpServer.listen(port);
log: (data) => {
mainStory.info('webpack', data);
}
});
mainStory.trace('scanner', 'Added a new track', {attach: file.props});
}).catch(err => {
mainStory.warn('scanner', err.message);
mainStory.trace('scanner', 'Library scan encountered an error', {attach: err});
});
}
return Promise.resolve();
case 'unlink':
return File.findOne({path: filePath}).then((file) => {
if (!file) {
return Promise.resolve();
}
return file.remove();
});
case 'mkdir':
mainStory.info('scanner', 'Scanning new dir ' + filePath);
case 'rmdir':
return Promise.resolve();
}
}
const operationMapperFactory = module.exports.operationMapperFactory = (models, mediastic) => {
async endAdminParty () {
const node = await this.getNode();
mainStory.info('configure', 'Ending admin party...');
const url = `http://${
this.opts.couchHost
}:${this.opts.couchPort}/_node/${
node
}/_config/admins/${this.opts.adminUsername}`;
mainStory.info('configure', 'PUT ' + url);
const res: any = await fetch(url, {
method: 'PUT',
body: `"${this.opts.adminPassword}"`
}).then((res) => res.json());
mainStory.info('configure', 'CouchDB responded with', {attach: res});
}
getNode (): Promise {
function initStats() {
calcStats();
mainStory.info('db', 'Initial stats', { attach: _stats });
}
function initKeys() {
_keyPath = path.join(_localeDir, 'keys.json');
try {
fs.statSync(_keyPath);
} catch (err) {
saveKeys();
} finally {
mainStory.info('db', `Reading file ${chalk.cyan.bold(_keyPath)}...`);
readKeys();
}
}
async getPatch () {
const serialized = await this.getSerializedEntries(config.get('dataDirectory'));
mainStory.info('scanner', `Already scanned ${serialized.length} items...`);
const staled = FSTree.fromEntries(serialized || []);
const current = FSTree.fromEntries(this.entries || []);
return staled.calculatePatch(current);
}
new Promise((resolve, reject) => {
const { pkgPath } = allSpecs[pkgName];
const nodeModulesPath = path.join(pkgPath, 'node_modules');
mainStory.info(`Removing ${chalk.cyan.bold(nodeModulesPath)}...`);
rimraf(nodeModulesPath, err => {
if (err) {
reject(err);
return;
}
resolve();
});
})
)