@pidgeon-ai/cli 1.44.0 → 2.1.0
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 +24 -0
- package/LICENSE +55 -21
- package/README.md +31 -90
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +12 -0
- package/dist/cli.d.ts +11 -2
- package/dist/cli.js +615 -24
- package/package.json +22 -45
- package/dist/chunk-FZA3INVW.js +0 -5172
- package/dist/chunk-FZA3INVW.js.map +0 -1
- package/dist/chunk-M4R74E7X.js +0 -3339
- package/dist/chunk-M4R74E7X.js.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands.gen.d.ts +0 -24
- package/dist/commands.gen.js +0 -8
- package/dist/commands.gen.js.map +0 -1
- package/dist/index.d.ts +0 -39
- package/dist/index.js +0 -19
- package/dist/index.js.map +0 -1
package/dist/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli.ts"],"sourcesContent":["import { run, UsageError } from './index.js';\n\n/**\n * The binary. Nothing else in this package runs anything.\n *\n * The same split the MCP package learned the hard way in §345: a module\n * that executes on import kills whatever imports it, and the tests import\n * `run` to drive it without a process.\n */\nasync function main() {\n try {\n process.stdout.write(\n `${await run(process.argv.slice(2), process.env, {\n stderr: (line) => process.stderr.write(`${line}\\n`),\n })}\\n`,\n );\n } catch (error) {\n const message = error instanceof Error ? error.message : 'Something went wrong.';\n process.stderr.write(`${message}\\n`);\n process.exit(error instanceof UsageError ? 2 : 1);\n }\n}\n\nvoid main();\n"],"mappings":";;;;;;;;AASA,eAAe,OAAO;AACpB,MAAI;AACF,YAAQ,OAAO;AAAA,MACb,GAAG,MAAM,IAAI,QAAQ,KAAK,MAAM,CAAC,GAAG,QAAQ,KAAK;AAAA,QAC/C,QAAQ,CAAC,SAAS,QAAQ,OAAO,MAAM,GAAG,IAAI;AAAA,CAAI;AAAA,MACpD,CAAC,CAAC;AAAA;AAAA,IACJ;AAAA,EACF,SAAS,OAAO;AACd,UAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU;AACzD,YAAQ,OAAO,MAAM,GAAG,OAAO;AAAA,CAAI;AACnC,YAAQ,KAAK,iBAAiB,aAAa,IAAI,CAAC;AAAA,EAClD;AACF;AAEA,KAAK,KAAK;","names":[]}
|
package/dist/commands.gen.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
type FlagKind = 'string' | 'number' | 'boolean' | 'list' | 'json';
|
|
2
|
-
interface Flag {
|
|
3
|
-
name: string;
|
|
4
|
-
kind: FlagKind;
|
|
5
|
-
required: boolean;
|
|
6
|
-
where: 'path' | 'query' | 'body' | 'header';
|
|
7
|
-
describe?: string;
|
|
8
|
-
/** The values the contract allows, where it names them. */
|
|
9
|
-
choices?: string[];
|
|
10
|
-
/** The header's own spelling, for a `header` flag. */
|
|
11
|
-
header?: string;
|
|
12
|
-
}
|
|
13
|
-
interface Command {
|
|
14
|
-
group: string;
|
|
15
|
-
name: string;
|
|
16
|
-
operationId: string;
|
|
17
|
-
method: string;
|
|
18
|
-
path: string;
|
|
19
|
-
summary: string;
|
|
20
|
-
flags: Flag[];
|
|
21
|
-
}
|
|
22
|
-
declare const COMMANDS: Command[];
|
|
23
|
-
|
|
24
|
-
export { COMMANDS, type Command, type Flag, type FlagKind };
|
package/dist/commands.gen.js
DELETED
package/dist/commands.gen.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Command } from './commands.gen.js';
|
|
2
|
-
|
|
3
|
-
interface Parsed {
|
|
4
|
-
path: Record<string, string>;
|
|
5
|
-
query: Record<string, unknown>;
|
|
6
|
-
body: Record<string, unknown>;
|
|
7
|
-
/** By the flag's name; `run` sends each under the header's own spelling. */
|
|
8
|
-
header: Record<string, unknown>;
|
|
9
|
-
}
|
|
10
|
-
/** Where `--verbose` lines go. Never stdout, which carries the answer a script parses. */
|
|
11
|
-
interface RunOptions {
|
|
12
|
-
stderr?: (line: string) => void;
|
|
13
|
-
}
|
|
14
|
-
declare class UsageError extends Error {
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* The API said no. Not a `UsageError`: the command was well-formed and the
|
|
18
|
-
* answer is the API's, so it exits 1 and leads with the API's `code`, which
|
|
19
|
-
* is what a script or an agent branches on. A refused send used to exit 2
|
|
20
|
-
* with only the sentence, which reads like a typo in the flags.
|
|
21
|
-
*/
|
|
22
|
-
declare class ApiError extends Error {
|
|
23
|
-
readonly status: number;
|
|
24
|
-
readonly code: string | undefined;
|
|
25
|
-
constructor(status: number, code: string | undefined, message: string);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* `--flag value`, `--flag=value`, and `--flag` alone for a boolean.
|
|
29
|
-
*
|
|
30
|
-
* Hand-rolled rather than a parser dependency, which is worth the forty
|
|
31
|
-
* lines: the flags are not known until the table is read, so a declarative
|
|
32
|
-
* parser would be configured from the same loop this is.
|
|
33
|
-
*/
|
|
34
|
-
declare function parse(command: Command, argv: string[]): Parsed;
|
|
35
|
-
declare function help(command?: Command): string;
|
|
36
|
-
declare function find(group?: string, name?: string): Command | undefined;
|
|
37
|
-
declare function run(argv: string[], env: NodeJS.ProcessEnv, options?: RunOptions): Promise<string>;
|
|
38
|
-
|
|
39
|
-
export { ApiError, type Parsed, type RunOptions, UsageError, find, help, parse, run };
|
package/dist/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
ApiError,
|
|
4
|
-
UsageError,
|
|
5
|
-
find,
|
|
6
|
-
help,
|
|
7
|
-
parse,
|
|
8
|
-
run
|
|
9
|
-
} from "./chunk-M4R74E7X.js";
|
|
10
|
-
import "./chunk-FZA3INVW.js";
|
|
11
|
-
export {
|
|
12
|
-
ApiError,
|
|
13
|
-
UsageError,
|
|
14
|
-
find,
|
|
15
|
-
help,
|
|
16
|
-
parse,
|
|
17
|
-
run
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|