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' | 'deployment'
36 modes: Array<string>
37 smallLogo?: string
38 logo?: string
39 link: string
40 dependsOn?: Array<string>
41 options?: Record<string, any>
42}
43
44export type FileClass =
45 | 'unchanged'
46 | 'added'
47 | 'modified'
48 | 'deleted'
49 | 'overwritten'
50
51export type FileTreeItem = TreeDataItem & {
52 contents: string
53 fullPath: string
54 fileClass: FileClass | undefined
55 originalFile?: string
56 modifiedFile?: string
57}
58
59export type Registry = {
60 starters: Array<{
61 name: string
62 description: string
63 url: string
64 banner?: string
65 }>
66 'add-ons': Array<{
67 name: string
68 description: string
69 url: string
70 }>
71}
72
73export type InitialData = {
74 supportedModes: Record<
75 string,
76 {
77 displayName: string
78 description: string
79 forceTypescript: boolean
80 }
81 >
82 options: SerializedOptions
83 output: GeneratorOutput
84 localFiles: Record<string, string>
85 addOns: Record<string, Array<AddOnInfo>>
86 applicationMode: ApplicationMode
87 forcedRouterMode?: string
88 forcedAddOns?: Array<string>
89 registry?: Registry | undefined
90}
91
92export type EventItem = {
93 msgType: 'start'
94 id: string
95 type: StatusStepType
96 message: string
97}
98export type EventFinish = {
99 msgType: 'finish'
100 id: string
101 message: string
102}
103
104export type StreamEvent = EventItem | EventFinish
105
106export type StreamItem = {
107 id: string
108 icon: typeof FileIcon
109 message: string
110}