Open History to see the last commit
1import type {
2 StatusStepType,
3 AddOnOption,
4 AddOnOptions,
5} from '@tanstack/cta-engine'
6
7export type ApplicationMode = 'add' | 'setup' | 'none'
8
9export type StarterInfo = {
10 url: string
11 id: string
12 name: string
13 description: string
14 version: string
15 author: string
16 license: string
17 mode: string
18 typescript: boolean
19 tailwind: boolean
20 banner?: string
21 dependsOn?: Array<string>
22}
23
24// Files
25
26export type DryRunOutput = {
27 files: Record<string, string>
28 commands: Array<{
29 command: string
30 args: Array<string>
31 }>
32 deletedFiles: Array<string>
33}
34
35export type AddOnInfo = {
36 id: string
37 name: string
38 description: string
39 aiDescription?: string
40 type: 'add-on' | 'example' | 'starter' | 'toolchain' | 'deployment'
41 modes: Array<string>
42 smallLogo?: string
43 priority?: number
44 logo?: string
45 link: string
46 dependsOn?: Array<string>
47 options?: AddOnOptions
48}
49
50export type FileClass =
51 | 'unchanged'
52 | 'added'
53 | 'modified'
54 | 'deleted'
55 | 'overwritten'
56
57export type FileTreeItem = TreeDataItem & {
58 contents: string
59 fullPath: string
60 fileClass: FileClass | undefined
61 originalFile?: string
62 modifiedFile?: string
63}
64
65export type Registry = {
66 starters: Array<{
67 name: string
68 description: string
69 url: string
70 banner?: string
71 }>
72 'add-ons': Array<{
73 name: string
74 description: string
75 url: string
76 }>
77}
78
79export type InitialData = {
80 supportedModes: Record<
81 string,
82 {
83 displayName: string
84 description: string
85 forceTypescript: boolean
86 }
87 >
88 options: SerializedOptions
89 output: GeneratorOutput
90 localFiles: Record<string, string>
91 addOns: Record<string, Array<AddOnInfo>>
92 applicationMode: ApplicationMode
93 showDeploymentOptions?: boolean
94 forcedRouterMode?: string
95 forcedAddOns?: Array<string>
96 registry?: Registry | undefined
97}
98
99export type EventItem = {
100 msgType: 'start'
101 id: string
102 type: StatusStepType
103 message: string
104}
105export type EventFinish = {
106 msgType: 'finish'
107 id: string
108 message: string
109}
110
111export type StreamEvent = EventItem | EventFinish
112
113export type StreamItem = {
114 id: string
115 icon: typeof FileIcon
116 message: string
117}