@referalli/cli 0.4.5 → 0.4.6

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/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ All notable changes to `@referalli/cli` are recorded here. The format follows
5
5
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Before 1.0, a minor
6
6
  bump may include breaking changes; they are called out under **Changed**.
7
7
 
8
+ ## 0.4.6 - 2026-11-05
9
+
10
+ - `keys create --programs ''` explains itself rather than printing the server's bare 400.
11
+
8
12
  ## 0.4.5 - 2026-11-05
9
13
 
10
14
  - `keys create` takes `--programs ID,…` and `--expires-at ISO`.
@@ -352,8 +352,12 @@ export async function keys(io, sub, arg, flags) {
352
352
  body.expiresInDays = Number(flags['expires-days']);
353
353
  if (typeof flags['expires-at'] === 'string')
354
354
  body.expiresAt = flags['expires-at'];
355
- if (typeof flags.programs === 'string')
356
- body.programIds = flags.programs.split(',').map((x) => x.trim()).filter(Boolean);
355
+ if (flags.programs !== undefined) {
356
+ const programIds = String(flags.programs).split(',').map((x) => x.trim()).filter(Boolean);
357
+ if (programIds.length === 0)
358
+ throw new CliError('--programs needs at least one program id');
359
+ body.programIds = programIds;
360
+ }
357
361
  const res = await client.request('POST', '/v1/api-keys', body);
358
362
  const issued = 'live' in res ? [res.live, res.test] : [res];
359
363
  io.out('Each key is shown once. Store it now (a password manager or your secrets store):');
@@ -1,2 +1,2 @@
1
1
  /** Kept in step with package.json by test/version.test.ts. */
2
- export declare const VERSION = "0.4.5";
2
+ export declare const VERSION = "0.4.6";
@@ -1,2 +1,2 @@
1
1
  /** Kept in step with package.json by test/version.test.ts. */
2
- export const VERSION = '0.4.5';
2
+ export const VERSION = '0.4.6';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@referalli/cli",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "The Referalli command line: sign in, forward webhooks to localhost, trigger test events, tail events and API logs.",
5
5
  "license": "MIT",
6
6
  "type": "module",