1 | export interface Logger {
|
2 | ok: (msg: string) => void
|
3 | notice: (msg: string) => void
|
4 | warn: (msg: string) => void
|
5 | err: (msg: string) => void
|
6 | log: (msg: string) => void
|
7 | colorful: (msg: string) => void
|
8 | }
|
9 | export interface Prompter<Q, T> {
|
10 | prompt: (arg0: Q) => Promise<T>
|
11 | }
|
12 | export interface RenderedAction {
|
13 | file?: string
|
14 | attributes: any
|
15 | body: string
|
16 | }
|
17 | export interface RunnerConfig {
|
18 | exec?: (sh: string, body: string) => void
|
19 | templates?: string
|
20 | cwd?: string
|
21 | logger?: Logger
|
22 | debug?: boolean
|
23 | helpers?: any
|
24 | createPrompter?: <Q, T>() => Prompter<Q, T>
|
25 | }
|
26 |
|
27 | export interface ResolverIO {
|
28 | exists: (arg0: string) => Promise<boolean>
|
29 | load: (arg0: string) => Promise<Record<string, any>>
|
30 | none: (arg0: string) => Record<string, any>
|
31 | }
|
32 |
|
33 | export type ActionResult = any
|
34 |
|
35 | export interface RunnerResult {
|
36 | success: boolean
|
37 | time: number
|
38 | actions: ActionResult[]
|
39 | failure?: {
|
40 | message: string
|
41 | availableActions: string[]
|
42 | }
|
43 | }
|
44 |
|
45 | export type ParamsResult = {
|
46 | templates: string
|
47 | generator: string
|
48 | action: string
|
49 | subaction?: string
|
50 | actionfolder?: string
|
51 | name?: string
|
52 | dry?: boolean
|
53 | } & object
|