neonctl 1.27.3 → 1.27.5

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/README.md CHANGED
@@ -64,19 +64,19 @@ The Neon CLI supports autocompletion, which you can configure in a few easy step
64
64
 
65
65
  ## Commands
66
66
 
67
- | Command | Subcommands | Description |
68
- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------- | ---------------------------- |
69
- | [auth](https://neon.tech/docs/reference/cli-auth) | | Authenticate |
70
- | [projects](https://neon.tech/docs/reference/cli-projects) | `list`, `create`, `update`, `delete`, `get` | Manage projects |
71
- | [ip-allow](https://neon.tech/docs/reference/cli-ip-allow) | `list`, `add`, `remove`, `reset` | Manage IP Allow |
72
- | [me](https://neon.tech/docs/reference/cli-me) | | Show current user |
73
- | [branches](https://neon.tech/docs/reference/cli-branches) | `list`, `create`, `rename`, `add-compute`, `set-primary`, `delete`, `get` | Manage branches |
74
- | [databases](https://neon.tech/docs/reference/cli-databases) | `list`, `create`, `delete` | Manage databases |
75
- | [roles](https://neon.tech/docs/reference/cli-roles) | `list`, `create`, `delete` | Manage roles |
76
- | [operations](https://neon.tech/reference/cli-operations) | `list` | Manage operations |
77
- | [connection-string](https://neon.tech/reference/cli-connection-string) | | Get connection string |
78
- | [set-context](https://neon.tech/reference/cli-set-context) | | Set context for session |
79
- | [completion](https://neon.tech/reference/cli-completion) | | Generate a completion script |
67
+ | Command | Subcommands | Description |
68
+ | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ---------------------------- |
69
+ | [auth](https://neon.tech/docs/reference/cli-auth) | | Authenticate |
70
+ | [projects](https://neon.tech/docs/reference/cli-projects) | `list`, `create`, `update`, `delete`, `get` | Manage projects |
71
+ | [ip-allow](https://neon.tech/docs/reference/cli-ip-allow) | `list`, `add`, `remove`, `reset` | Manage IP Allow |
72
+ | [me](https://neon.tech/docs/reference/cli-me) | | Show current user |
73
+ | [branches](https://neon.tech/docs/reference/cli-branches) | `list`, `create`, `rename`, `add-compute`, `set-primary`, `delete`, `get` | Manage branches |
74
+ | [databases](https://neon.tech/docs/reference/cli-databases) | `list`, `create`, `delete` | Manage databases |
75
+ | [roles](https://neon.tech/docs/reference/cli-roles) | `list`, `create`, `delete` | Manage roles |
76
+ | [operations](https://neon.tech/docs/reference/cli-operations) | `list` | Manage operations |
77
+ | [connection-string](https://neon.tech/docs/reference/cli-connection-string) | | Get connection string |
78
+ | [set-context](https://neon.tech/docs/reference/cli-set-context) | | Set context for session |
79
+ | [completion](https://neon.tech/docs/reference/cli-completion) | | Generate a completion script |
80
80
 
81
81
  ## Global options
82
82
 
@@ -67,9 +67,8 @@ const list = async (props) => {
67
67
  };
68
68
  const add = async (props) => {
69
69
  if (props.ips.length <= 0) {
70
- log.error(`Enter individual IP addresses, define ranges with a dash, or use CIDR notation for more flexibility.
70
+ throw new Error(`Enter individual IP addresses, define ranges with a dash, or use CIDR notation for more flexibility.
71
71
  Example: neonctl ip-allow add 192.168.1.1, 192.168.1.20-192.168.1.50, 192.168.1.0/24 --project-id <id>`);
72
- return;
73
72
  }
74
73
  const project = {};
75
74
  const { data } = await props.apiClient.getProject(props.projectId);
@@ -89,8 +88,7 @@ const add = async (props) => {
89
88
  };
90
89
  const remove = async (props) => {
91
90
  if (props.ips.length <= 0) {
92
- log.error(`Remove individual IP addresses and ranges. Example: neonctl ip-allow remove 192.168.1.1 --project-id <id>`);
93
- return;
91
+ throw new Error(`Remove individual IP addresses and ranges. Example: neonctl ip-allow remove 192.168.1.1 --project-id <id>`);
94
92
  }
95
93
  const project = {};
96
94
  const { data } = await props.apiClient.getProject(props.projectId);
@@ -20,6 +20,7 @@ describe('ip-allow', () => {
20
20
  name: 'Add IP allow - Error',
21
21
  args: ['ip-allow', 'add', '--projectId', 'test'],
22
22
  expected: {
23
+ code: 1,
23
24
  stderr: `ERROR: Enter individual IP addresses, define ranges with a dash, or use CIDR notation for more flexibility.
24
25
  Example: neonctl ip-allow add 192.168.1.1, 192.168.1.20-192.168.1.50, 192.168.1.0/24 --project-id <id>`,
25
26
  },
@@ -43,6 +44,7 @@ describe('ip-allow', () => {
43
44
  name: 'Remove IP allow - Error',
44
45
  args: ['ip-allow', 'remove', '--project-id', 'test'],
45
46
  expected: {
47
+ code: 1,
46
48
  stderr: `ERROR: Remove individual IP addresses and ranges. Example: neonctl ip-allow remove 192.168.1.1 --project-id <id>`,
47
49
  },
48
50
  });
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.27.3",
8
+ "version": "1.27.5",
9
9
  "description": "CLI tool for NeonDB Cloud management",
10
10
  "main": "index.js",
11
11
  "author": "NeonDB",
@@ -80,7 +80,8 @@
80
80
  "targets": [
81
81
  "node18-linux-x64",
82
82
  "node18-macos-x64",
83
- "node18-win-x64"
83
+ "node18-win-x64",
84
+ "node18-linux-arm64"
84
85
  ]
85
86
  },
86
87
  "scripts": {