neonctl 1.21.0 → 1.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -28,6 +28,7 @@ import { showHelp } from './help.js';
28
28
  let builder = yargs(hideBin(process.argv));
29
29
  builder = builder
30
30
  .scriptName(pkg.name)
31
+ .locale('en')
31
32
  .usage('$0 <command> [options]')
32
33
  .parserConfiguration({
33
34
  'populate--': true,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git@github.com:neondatabase/neonctl.git"
6
6
  },
7
7
  "type": "module",
8
- "version": "1.21.0",
8
+ "version": "1.21.2",
9
9
  "description": "CLI tool for NeonDB Cloud management",
10
10
  "main": "index.js",
11
11
  "author": "NeonDB",
package/utils/psql.js CHANGED
@@ -11,6 +11,13 @@ export const psql = async (connection_uri, args = []) => {
11
11
  const psql = spawn(psqlPathOrNull, [connection_uri, ...args], {
12
12
  stdio: 'inherit',
13
13
  });
14
+ for (const signame of ['SIGINT', 'SIGTERM']) {
15
+ process.on(signame, (code) => {
16
+ if (!psql.killed && code !== null) {
17
+ psql.kill(code);
18
+ }
19
+ });
20
+ }
14
21
  psql.on('exit', (code) => {
15
22
  process.exit(code === null ? 1 : code);
16
23
  });