@holo-js/cli 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/dist/bin/holo.mjs +5455 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.mjs +5453 -0
- package/package.json +46 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { NormalizedHoloProjectConfig } from '@holo-js/db';
|
|
2
|
+
|
|
3
|
+
type CommandFlagValue = string | boolean | number | readonly string[];
|
|
4
|
+
interface LoadedProjectConfig {
|
|
5
|
+
readonly manifestPath?: string;
|
|
6
|
+
readonly config: NormalizedHoloProjectConfig;
|
|
7
|
+
}
|
|
8
|
+
interface CommandExecutionContext {
|
|
9
|
+
readonly projectRoot: string;
|
|
10
|
+
readonly cwd: string;
|
|
11
|
+
readonly args: readonly string[];
|
|
12
|
+
readonly flags: Readonly<Record<string, CommandFlagValue>>;
|
|
13
|
+
loadProject(): Promise<LoadedProjectConfig>;
|
|
14
|
+
}
|
|
15
|
+
interface HoloAppCommand {
|
|
16
|
+
readonly name?: string;
|
|
17
|
+
readonly aliases?: readonly string[];
|
|
18
|
+
readonly description: string;
|
|
19
|
+
readonly usage?: string;
|
|
20
|
+
run(context: CommandExecutionContext): unknown | Promise<unknown>;
|
|
21
|
+
}
|
|
22
|
+
declare function defineCommand<TCommand extends HoloAppCommand>(command: TCommand): TCommand;
|
|
23
|
+
|
|
24
|
+
type IoStreams = {
|
|
25
|
+
readonly cwd: string;
|
|
26
|
+
readonly stdin: NodeJS.ReadStream;
|
|
27
|
+
readonly stdout: NodeJS.WriteStream;
|
|
28
|
+
readonly stderr: NodeJS.WriteStream;
|
|
29
|
+
};
|
|
30
|
+
declare function runCli(argv: readonly string[], io: IoStreams): Promise<number>;
|
|
31
|
+
|
|
32
|
+
export { type CommandExecutionContext, type CommandFlagValue, type HoloAppCommand, defineCommand, runCli };
|