-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdemo.ts
More file actions
26 lines (21 loc) · 784 Bytes
/
demo.ts
File metadata and controls
26 lines (21 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// tslint:disable:no-console
import * as sourceMapSupport from 'source-map-support';
sourceMapSupport.install();
import serviceFactory from '@js-migrations/core/dist/factory';
import repoFactory from '@js-migrations/core/dist/utils/tests/testRepoFactory';
import { Command } from 'commander';
import factory from './factory';
const program = new Command();
const service = serviceFactory({
repo: repoFactory([{
down: async () => { console.log('A log from test1 down'); },
key: 'test1',
up: async () => { console.log('A log from test1 up'); },
}, {
down: async () => { console.log('A log from test2 down'); },
key: 'test2',
up: async () => { console.log('A log from test2 up'); },
}]),
});
factory({ program, service });
program.parse(process.argv);