1 | import { AsyncSeriesBailHook, AsyncSeriesWaterfallHook } from "tapable";
|
2 | import { ILogger } from "./utils/logger";
|
3 | import { AutoRc, RepoInformation, AuthorInformation, PluginConfig } from "./types";
|
4 | export interface InteractiveInitHooks {
|
5 |
|
6 | writeRcFile: AsyncSeriesBailHook<[AutoRc], true | void>;
|
7 |
|
8 | getRepo: AsyncSeriesBailHook<[], RepoInformation | true | void>;
|
9 |
|
10 | getAuthor: AsyncSeriesBailHook<[], AuthorInformation | true | void>;
|
11 |
|
12 | configurePlugin: AsyncSeriesBailHook<[string], PluginConfig | void>;
|
13 |
|
14 | createEnv: AsyncSeriesWaterfallHook<[Array<{
|
15 |
|
16 | variable: string;
|
17 |
|
18 | message: string;
|
19 | }>]>;
|
20 | }
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | export default class InteractiveInit {
|
27 |
|
28 | hooks: InteractiveInitHooks;
|
29 |
|
30 | logger: ILogger;
|
31 |
|
32 | constructor(options: {
|
33 |
|
34 | logger: ILogger;
|
35 | });
|
36 | /** Run a prompt to get the author information */
|
37 | getAuthorInformation(): Promise<{
|
38 | name?: string | undefined;
|
39 | email?: string | undefined;
|
40 | }>;
|
41 |
|
42 | getRepoInformation(): Promise<{
|
43 | repo?: string | undefined;
|
44 | owner?: string | undefined;
|
45 | }>;
|
46 |
|
47 | private tapDefaults;
|
48 |
|
49 | run(): Promise<void>;
|
50 | }
|
51 |
|
\ | No newline at end of file |