view-contracts 0.5.13 → 0.5.15
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/cli-contract.yaml +1 -1
- package/dist/preview.mjs +153 -153
- package/dist/preview.mjs.map +4 -4
- package/dist/types/src/generated/cli/program.d.ts +12 -2
- package/dist/view-contracts.bundle.mjs +213 -213
- package/dist/view-contracts.bundle.mjs.map +4 -4
- package/docs/cli-reference.md +1 -1
- package/package.json +11 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
1
|
+
import { Command, type CommanderError } from "commander";
|
|
2
2
|
export interface CommandHandlers {
|
|
3
3
|
compile: (options: {
|
|
4
4
|
config?: string;
|
|
@@ -25,4 +25,14 @@ export interface CommandHandlers {
|
|
|
25
25
|
screen?: string;
|
|
26
26
|
}, parentOpts: Record<string, unknown>) => Promise<void>;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
28
|
+
export interface ProgramOptions {
|
|
29
|
+
/**
|
|
30
|
+
* Ends an invocation whose arguments commander rejects (an unknown option,
|
|
31
|
+
* an option without its value, a missing argument): writes what the
|
|
32
|
+
* contract declares for invalid arguments and returns the exit code.
|
|
33
|
+
* commander then writes nothing of its own. Without it, commander writes
|
|
34
|
+
* its message and exits 1.
|
|
35
|
+
*/
|
|
36
|
+
onUsageError?: (error: CommanderError, command: Command) => number;
|
|
37
|
+
}
|
|
38
|
+
export declare function createProgram(handlers: CommandHandlers, version: string, options?: ProgramOptions): Command;
|