@andrei.fyi/picocli 0.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/README.md +357 -0
- package/dist/create-eQnnIhZu.d.cts +87 -0
- package/dist/create-eQnnIhZu.d.ts +87 -0
- package/dist/index.cjs +1175 -0
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +1166 -0
- package/dist/mcp/index.cjs +507 -0
- package/dist/mcp/index.d.cts +30 -0
- package/dist/mcp/index.d.ts +30 -0
- package/dist/mcp/index.js +502 -0
- package/dist/testing/testkit.cjs +115 -0
- package/dist/testing/testkit.d.cts +23 -0
- package/dist/testing/testkit.d.ts +23 -0
- package/dist/testing/testkit.js +112 -0
- package/package.json +94 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as zod from 'zod';
|
|
2
|
+
import { C as CommandDefinition, a as Context, b as Cli, A as AppDefinition, c as cli } from './create-eQnnIhZu.cjs';
|
|
3
|
+
export { d as CliFeatures, e as CommandErrorResult, f as CommandResult, g as CommandSuccessResult, O as OutputValidationMode, S as ServeOptions } from './create-eQnnIhZu.cjs';
|
|
4
|
+
|
|
5
|
+
declare class PicocliError extends Error {
|
|
6
|
+
readonly code: "COMMAND_NOT_FOUND" | "UNKNOWN" | "VALIDATION";
|
|
7
|
+
constructor(code: "COMMAND_NOT_FOUND" | "UNKNOWN" | "VALIDATION", message: string);
|
|
8
|
+
}
|
|
9
|
+
declare const isPicocliError: (e: unknown) => e is PicocliError;
|
|
10
|
+
|
|
11
|
+
type JsonValue = JsonValue[] | {
|
|
12
|
+
[key: string]: JsonValue;
|
|
13
|
+
} | boolean | number | string | null;
|
|
14
|
+
|
|
15
|
+
declare const create: <ArgsSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, OptionsSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, EnvSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, OutputSchema extends zod.ZodType | undefined = undefined>(name: string, def?: AppDefinition<ArgsSchema, OptionsSchema, EnvSchema, Context<ArgsSchema, OptionsSchema, EnvSchema>, OutputSchema>) => Cli<OptionsSchema, EnvSchema, "app">;
|
|
16
|
+
declare const command: <ArgsSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, OptionsSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, EnvSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, OutputSchema extends zod.ZodType | undefined = undefined>(name: string, def?: CommandDefinition<ArgsSchema, OptionsSchema, EnvSchema, Context<ArgsSchema, OptionsSchema, EnvSchema>, OutputSchema>) => Cli<OptionsSchema, EnvSchema, "command">;
|
|
17
|
+
|
|
18
|
+
export { AppDefinition, Cli, CommandDefinition, Context, type JsonValue, PicocliError, command, create, cli as default, isPicocliError };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as zod from 'zod';
|
|
2
|
+
import { C as CommandDefinition, a as Context, b as Cli, A as AppDefinition, c as cli } from './create-eQnnIhZu.js';
|
|
3
|
+
export { d as CliFeatures, e as CommandErrorResult, f as CommandResult, g as CommandSuccessResult, O as OutputValidationMode, S as ServeOptions } from './create-eQnnIhZu.js';
|
|
4
|
+
|
|
5
|
+
declare class PicocliError extends Error {
|
|
6
|
+
readonly code: "COMMAND_NOT_FOUND" | "UNKNOWN" | "VALIDATION";
|
|
7
|
+
constructor(code: "COMMAND_NOT_FOUND" | "UNKNOWN" | "VALIDATION", message: string);
|
|
8
|
+
}
|
|
9
|
+
declare const isPicocliError: (e: unknown) => e is PicocliError;
|
|
10
|
+
|
|
11
|
+
type JsonValue = JsonValue[] | {
|
|
12
|
+
[key: string]: JsonValue;
|
|
13
|
+
} | boolean | number | string | null;
|
|
14
|
+
|
|
15
|
+
declare const create: <ArgsSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, OptionsSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, EnvSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, OutputSchema extends zod.ZodType | undefined = undefined>(name: string, def?: AppDefinition<ArgsSchema, OptionsSchema, EnvSchema, Context<ArgsSchema, OptionsSchema, EnvSchema>, OutputSchema>) => Cli<OptionsSchema, EnvSchema, "app">;
|
|
16
|
+
declare const command: <ArgsSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, OptionsSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, EnvSchema extends zod.ZodObject<zod.ZodRawShape> | undefined = undefined, OutputSchema extends zod.ZodType | undefined = undefined>(name: string, def?: CommandDefinition<ArgsSchema, OptionsSchema, EnvSchema, Context<ArgsSchema, OptionsSchema, EnvSchema>, OutputSchema>) => Cli<OptionsSchema, EnvSchema, "command">;
|
|
17
|
+
|
|
18
|
+
export { AppDefinition, Cli, CommandDefinition, Context, type JsonValue, PicocliError, command, create, cli as default, isPicocliError };
|