Skip to content

Commit c87e95d

Browse files
committed
Added SQL global and killing shell with ctrl+c
1 parent 0bd6b23 commit c87e95d

File tree

1 file changed

+8
-1
lines changed
  • src/packages/pongo/src/commandLine

1 file changed

+8
-1
lines changed

src/packages/pongo/src/commandLine/shell.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { JSONSerializer } from '@event-driven-io/dumbo';
1+
import { JSONSerializer, SQL } from '@event-driven-io/dumbo';
22
import chalk from 'chalk';
33
import Table from 'cli-table3';
44
import { Command } from 'commander';
@@ -95,12 +95,19 @@ const startRepl = (options: {
9595

9696
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
9797
r.context.db = db;
98+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
99+
r.context.SQL = SQL;
98100

99101
// Intercept REPL output to display results as a table if they are arrays
100102
r.on('exit', async () => {
101103
await teardown();
102104
process.exit();
103105
});
106+
107+
r.on('SIGINT', async () => {
108+
await teardown();
109+
process.exit();
110+
});
104111
};
105112

106113
const teardown = async () => {

0 commit comments

Comments
 (0)