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