1import { PromptObject } from 'prompts';
2
3/**
4 * Possible command options.
5 */
6export type CommandOptions = {
7  target: string;
8  source?: string;
9  withReadme: boolean;
10  withChangelog: boolean;
11  example: boolean;
12  local: boolean;
13};
14
15/**
16 * Represents an object that is passed to `ejs` when rendering the template.
17 */
18export type SubstitutionData = {
19  project: {
20    slug: string;
21    name: string;
22    version: string;
23    description: string;
24    package: string;
25    moduleName: string;
26    viewName: string;
27  };
28  author: string;
29  license: string;
30  repo: string;
31  type: 'remote';
32};
33
34export type LocalSubstitutionData = {
35  project: {
36    slug: string;
37    name: string;
38    package: string;
39    moduleName: string;
40    viewName: string;
41  };
42  type: 'local';
43};
44
45export type CustomPromptObject = PromptObject & {
46  name: string;
47  resolvedValue?: string | null;
48};
49
50export type Answers = Record<string, string>;
51