0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/test/e2e-cli/utils/registry.ts
Juan Picado 93468211d6
chore: update eslint dependencies (#2126)
* chore: update eslint

* chore: update rules and style

* chore: aling formatting

* chore: update ci rules

* chore: aling formatting

* chore: aling formatting
2021-03-14 08:42:46 +01:00

21 lines
661 B
TypeScript

import { fork } from 'child_process';
export function prepareEnvironment(rootFolder: string, folderName: string) {}
export function spawnRegistry(verdaccioPath: string, args: string[], childOptions) {
return new Promise((resolve, reject) => {
let _childOptions = { silent: true, ...childOptions };
const childFork = fork(verdaccioPath, args, _childOptions);
childFork.on('message', (msg) => {
if ('verdaccio_started' in msg) {
resolve(childFork);
}
});
childFork.on('error', (err) => reject([err]));
childFork.on('disconnect', (err) => reject([err]));
childFork.on('exit', (err) => reject([err]));
});
}