fix(fake-driver): create cjs executable entry point
This driver wasn't working properly when used directly
MODIFY
packages/fake-driver/index.js
packages/fake-driver/index.js
#!/usr/bin/env node
-module.exports = require('./build/lib');
+const {asyncify} = require('asyncbox');
+
+const fakeDriver = require('./build/lib/index.js');
+
+if (require.main === module) {
+ asyncify(fakeDriver.main);
+}
+
+module.exports = fakeDriver;

MODIFY
packages/fake-driver/lib/index.js
packages/fake-driver/lib/index.js
-#!/usr/bin/env node
// transpile:main
-import { asyncify } from 'asyncbox';
import * as driver from './driver';
import * as server from './server';
-
const { FakeDriver } = driver;
const { startServer } = server;
@@ -22,8 +19,4 @@ async function main () {
return await startServer(port, host);
}
-if (require.main === module) {
- asyncify(main);
-}
-
-export { FakeDriver, startServer };
+export { FakeDriver, startServer, main };

fix(fake-driver): create cjs executable entry point

This driver wasn't working properly when used directly