File tree 1 file changed +8
-1
lines changed
src/packages/pongo/src/commandLine
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
- import { JSONSerializer } from '@event-driven-io/dumbo' ;
1
+ import { JSONSerializer , SQL } from '@event-driven-io/dumbo' ;
2
2
import chalk from 'chalk' ;
3
3
import Table from 'cli-table3' ;
4
4
import { Command } from 'commander' ;
@@ -95,12 +95,19 @@ const startRepl = (options: {
95
95
96
96
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
97
97
r . context . db = db ;
98
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
99
+ r . context . SQL = SQL ;
98
100
99
101
// Intercept REPL output to display results as a table if they are arrays
100
102
r . on ( 'exit' , async ( ) => {
101
103
await teardown ( ) ;
102
104
process . exit ( ) ;
103
105
} ) ;
106
+
107
+ r . on ( 'SIGINT' , async ( ) => {
108
+ await teardown ( ) ;
109
+ process . exit ( ) ;
110
+ } ) ;
104
111
} ;
105
112
106
113
const teardown = async ( ) => {
You can’t perform that action at this time.
0 commit comments