favacli 0.0.10 → 0.0.11

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.
@@ -1,11 +1,15 @@
1
1
  import type { EntryMeta, EntryMetaWithToken } from 'favalib';
2
2
  import BaseCommand from './BaseCommand.mjs';
3
3
  import formatters from './formatters/index.mjs';
4
- import { JsonArray } from 'type-fest';
5
- export type Formatter = (entries: (EntryMeta | EntryMetaWithToken)[]) => JsonArray;
4
+ import { Jsonifiable } from 'type-fest';
5
+ export type Formatter = (entries: (EntryMeta | EntryMetaWithToken)[]) => Jsonifiable;
6
6
  declare abstract class BaseListOutputCommand extends BaseCommand {
7
7
  abstract getList(): EntryMeta[] | EntryMetaWithToken[];
8
8
  format: (typeof formatters)[0]["name"] | undefined;
9
- exec(): Promise<JsonArray>;
9
+ exec(): Promise<string | number | boolean | {
10
+ [x: string]: Jsonifiable | undefined;
11
+ } | {
12
+ toJSON: () => Jsonifiable;
13
+ } | import("type-fest/source/jsonifiable.js").JsonifiableArray | null>;
10
14
  }
11
15
  export default BaseListOutputCommand;
@@ -1,6 +1,8 @@
1
- const alfredFormatter = (entries) => entries.map((entry) => ({
2
- title: entry.issuer,
3
- subtitle: entry.name,
4
- arg: entry.token?.otp,
5
- }));
1
+ const alfredFormatter = (entries) => ({
2
+ items: entries.map((entry) => ({
3
+ title: entry.issuer,
4
+ subtitle: entry.name,
5
+ arg: entry.token?.otp,
6
+ })),
7
+ });
6
8
  export default { name: 'alfred', formatter: alfredFormatter };
package/build/main.mjs CHANGED
@@ -16,7 +16,7 @@ const [, , ...args] = process.argv;
16
16
  const cli = new Cli({
17
17
  binaryLabel: 'FavaCli',
18
18
  binaryName: `favacli`,
19
- binaryVersion: '0.0.10',
19
+ binaryVersion: '0.0.11',
20
20
  });
21
21
  cli.register(VaultCreateCommand);
22
22
  cli.register(VaultDeleteCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "favacli",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "author": "",