@hed-hog/developer-mode 0.0.194 → 0.0.195
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hedhog/frontend/app/components/data.tsx.ejs +557 -0
- package/hedhog/frontend/app/components/icons.tsx.ejs +159 -0
- package/hedhog/frontend/app/components/sections.tsx.ejs +1251 -0
- package/hedhog/frontend/app/components/types.ts.ejs +86 -0
- package/hedhog/frontend/app/layout.tsx.ejs +10 -0
- package/hedhog/frontend/app/page.tsx.ejs +247 -0
- package/hedhog/frontend/app/provider.tsx.ejs +95 -0
- package/hedhog/frontend/messages/en.json +374 -0
- package/hedhog/frontend/messages/pt.json +374 -0
- package/package.json +3 -3
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Database,
|
|
3
|
+
FileCode,
|
|
4
|
+
Package,
|
|
5
|
+
Plus,
|
|
6
|
+
RefreshCw,
|
|
7
|
+
Rocket,
|
|
8
|
+
RotateCcw,
|
|
9
|
+
Upload,
|
|
10
|
+
} from 'lucide-react';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
import {
|
|
13
|
+
AngularIcon,
|
|
14
|
+
ExpoIcon,
|
|
15
|
+
NestJSIcon,
|
|
16
|
+
NextJSIcon,
|
|
17
|
+
ReactNativeIcon,
|
|
18
|
+
VueIcon,
|
|
19
|
+
} from './icons';
|
|
20
|
+
import {
|
|
21
|
+
AppInfo,
|
|
22
|
+
CommitInfo,
|
|
23
|
+
FrameworkType,
|
|
24
|
+
LibraryInfo,
|
|
25
|
+
QuickAction,
|
|
26
|
+
WizardConfig,
|
|
27
|
+
WizardSelectOption,
|
|
28
|
+
} from './types';
|
|
29
|
+
|
|
30
|
+
export type TranslationFn = (
|
|
31
|
+
key: string,
|
|
32
|
+
values?: Record<string, string | number>
|
|
33
|
+
) => string;
|
|
34
|
+
|
|
35
|
+
export const frameworkIcons: Record<FrameworkType, React.ReactNode> = {
|
|
36
|
+
nestjs: <NestJSIcon className="h-8 w-8" />,
|
|
37
|
+
nextjs: <NextJSIcon className="h-8 w-8" />,
|
|
38
|
+
angular: <AngularIcon className="h-8 w-8" />,
|
|
39
|
+
vue: <VueIcon className="h-8 w-8" />,
|
|
40
|
+
'react-native': <ReactNativeIcon className="h-8 w-8" />,
|
|
41
|
+
expo: <ExpoIcon className="h-8 w-8" />,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export function getFrameworkLabel(framework: FrameworkType, t: TranslationFn) {
|
|
45
|
+
return t(`framework.${framework}`);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const statusColors: Record<string, string> = {
|
|
49
|
+
running: 'bg-success/20 text-success border-success/30',
|
|
50
|
+
stopped: 'bg-muted text-muted-foreground border-border',
|
|
51
|
+
error: 'bg-destructive/20 text-destructive border-destructive/30',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export function getStatusLabel(status: string, t: TranslationFn) {
|
|
55
|
+
return t(`status.${status}`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function getQuickActions(t: TranslationFn): QuickAction[] {
|
|
59
|
+
return [
|
|
60
|
+
{
|
|
61
|
+
id: 'create-module',
|
|
62
|
+
label: t('quickActions.createModule.label'),
|
|
63
|
+
description: t('quickActions.createModule.description'),
|
|
64
|
+
icon: <Plus className="h-4 w-4" />,
|
|
65
|
+
variant: 'accent',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: 'add-module',
|
|
69
|
+
label: t('quickActions.addModule.label'),
|
|
70
|
+
description: t('quickActions.addModule.description'),
|
|
71
|
+
icon: <Package className="h-4 w-4" />,
|
|
72
|
+
variant: 'default',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'reset-modules',
|
|
76
|
+
label: t('quickActions.resetModules.label'),
|
|
77
|
+
description: t('quickActions.resetModules.description'),
|
|
78
|
+
icon: <RotateCcw className="h-4 w-4" />,
|
|
79
|
+
variant: 'warning',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: 'update-types',
|
|
83
|
+
label: t('quickActions.updateTypes.label'),
|
|
84
|
+
description: t('quickActions.updateTypes.description'),
|
|
85
|
+
icon: <Database className="h-4 w-4" />,
|
|
86
|
+
variant: 'info',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 'deploy-migrations',
|
|
90
|
+
label: t('quickActions.deployMigrations.label'),
|
|
91
|
+
description: t('quickActions.deployMigrations.description'),
|
|
92
|
+
icon: <Upload className="h-4 w-4" />,
|
|
93
|
+
variant: 'default',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: 'deploy-library',
|
|
97
|
+
label: t('quickActions.deployLibrary.label'),
|
|
98
|
+
description: t('quickActions.deployLibrary.description'),
|
|
99
|
+
icon: <Rocket className="h-4 w-4" />,
|
|
100
|
+
variant: 'default',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 'generate-crud',
|
|
104
|
+
label: t('quickActions.generateCrud.label'),
|
|
105
|
+
description: t('quickActions.generateCrud.description'),
|
|
106
|
+
icon: <FileCode className="h-4 w-4" />,
|
|
107
|
+
variant: 'info',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: 'sync-prisma',
|
|
111
|
+
label: t('quickActions.syncPrisma.label'),
|
|
112
|
+
description: t('quickActions.syncPrisma.description'),
|
|
113
|
+
icon: <RefreshCw className="h-4 w-4" />,
|
|
114
|
+
variant: 'default',
|
|
115
|
+
},
|
|
116
|
+
];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const variantStyles: Record<string, string> = {
|
|
120
|
+
default: 'hover:bg-secondary/80 hover:border-border',
|
|
121
|
+
warning: 'hover:bg-warning/10 hover:border-warning/30 hover:text-warning',
|
|
122
|
+
info: 'hover:bg-info/10 hover:border-info/30 hover:text-info',
|
|
123
|
+
accent: 'hover:bg-accent/10 hover:border-accent/30 hover:text-accent',
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export const mockStats = {
|
|
127
|
+
nodeVersion: 'v20.11.0',
|
|
128
|
+
diskUsage: '2.4 GB',
|
|
129
|
+
totalApps: 3,
|
|
130
|
+
totalLibraries: 12,
|
|
131
|
+
dbConnections: 5,
|
|
132
|
+
gitBranch: 'main',
|
|
133
|
+
lastCommit: '2h ago',
|
|
134
|
+
uptime: '3d 12h',
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export function getMockApps(t: TranslationFn): AppInfo[] {
|
|
138
|
+
return [
|
|
139
|
+
{
|
|
140
|
+
name: 'api',
|
|
141
|
+
path: '/apps/api',
|
|
142
|
+
framework: 'nestjs',
|
|
143
|
+
database: 'postgresql',
|
|
144
|
+
description: t('mock.apps.api.description'),
|
|
145
|
+
port: 3001,
|
|
146
|
+
status: 'running',
|
|
147
|
+
scripts: ['dev', 'build', 'test', 'lint'],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'admin',
|
|
151
|
+
path: '/apps/admin',
|
|
152
|
+
framework: 'nextjs',
|
|
153
|
+
description: t('mock.apps.admin.description'),
|
|
154
|
+
port: 3000,
|
|
155
|
+
status: 'running',
|
|
156
|
+
scripts: ['dev', 'build', 'start', 'lint'],
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: 'mobile',
|
|
160
|
+
path: '/apps/mobile',
|
|
161
|
+
framework: 'expo',
|
|
162
|
+
description: t('mock.apps.mobile.description'),
|
|
163
|
+
status: 'stopped',
|
|
164
|
+
scripts: ['start', 'android', 'ios', 'web'],
|
|
165
|
+
},
|
|
166
|
+
];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export function getMockLibraries(t: TranslationFn): LibraryInfo[] {
|
|
170
|
+
return [
|
|
171
|
+
{
|
|
172
|
+
name: 'core',
|
|
173
|
+
version: '1.2.3',
|
|
174
|
+
latestVersion: '1.2.3',
|
|
175
|
+
installed: true,
|
|
176
|
+
description: t('mock.libraries.core.description'),
|
|
177
|
+
scripts: [
|
|
178
|
+
{ name: 'build', command: 'npm run build' },
|
|
179
|
+
{ name: 'test', command: 'npm run test' },
|
|
180
|
+
{ name: 'lint', command: 'npm run lint' },
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: 'contact',
|
|
185
|
+
version: '1.1.0',
|
|
186
|
+
latestVersion: '1.2.0',
|
|
187
|
+
installed: true,
|
|
188
|
+
description: t('mock.libraries.contact.description'),
|
|
189
|
+
scripts: [
|
|
190
|
+
{ name: 'build', command: 'npm run build' },
|
|
191
|
+
{ name: 'migrate', command: 'npm run migrate' },
|
|
192
|
+
],
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'contact-us',
|
|
196
|
+
version: '1.0.5',
|
|
197
|
+
latestVersion: '1.0.5',
|
|
198
|
+
installed: true,
|
|
199
|
+
description: t('mock.libraries.contactUs.description'),
|
|
200
|
+
scripts: [{ name: 'build', command: 'npm run build' }],
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: 'faq',
|
|
204
|
+
version: '1.0.0',
|
|
205
|
+
latestVersion: '1.1.0',
|
|
206
|
+
installed: true,
|
|
207
|
+
description: t('mock.libraries.faq.description'),
|
|
208
|
+
scripts: [
|
|
209
|
+
{ name: 'build', command: 'npm run build' },
|
|
210
|
+
{ name: 'seed', command: 'npm run seed' },
|
|
211
|
+
],
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'tag',
|
|
215
|
+
version: '1.0.2',
|
|
216
|
+
installed: true,
|
|
217
|
+
description: t('mock.libraries.tag.description'),
|
|
218
|
+
scripts: [{ name: 'build', command: 'npm run build' }],
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: 'content',
|
|
222
|
+
version: '1.3.0',
|
|
223
|
+
installed: false,
|
|
224
|
+
description: t('mock.libraries.content.description'),
|
|
225
|
+
scripts: [],
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: 'category',
|
|
229
|
+
version: '1.0.0',
|
|
230
|
+
installed: false,
|
|
231
|
+
description: t('mock.libraries.category.description'),
|
|
232
|
+
scripts: [],
|
|
233
|
+
},
|
|
234
|
+
];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export const mockActivityData = [
|
|
238
|
+
{ date: 'Mon', commits: 12, builds: 8, deploys: 2 },
|
|
239
|
+
{ date: 'Tue', commits: 8, builds: 5, deploys: 1 },
|
|
240
|
+
{ date: 'Wed', commits: 15, builds: 10, deploys: 3 },
|
|
241
|
+
{ date: 'Thu', commits: 6, builds: 4, deploys: 0 },
|
|
242
|
+
{ date: 'Fri', commits: 20, builds: 12, deploys: 4 },
|
|
243
|
+
{ date: 'Sat', commits: 3, builds: 2, deploys: 0 },
|
|
244
|
+
{ date: 'Sun', commits: 5, builds: 3, deploys: 1 },
|
|
245
|
+
];
|
|
246
|
+
|
|
247
|
+
export function getMockCommits(t: TranslationFn): CommitInfo[] {
|
|
248
|
+
return [
|
|
249
|
+
{
|
|
250
|
+
hash: 'a1b2c3d4',
|
|
251
|
+
message: t('mock.commits.one.message'),
|
|
252
|
+
author: 'John Doe',
|
|
253
|
+
date: t('mock.commits.one.date'),
|
|
254
|
+
branch: 'main',
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
hash: 'e5f6g7h8',
|
|
258
|
+
message: t('mock.commits.two.message'),
|
|
259
|
+
author: 'Jane Smith',
|
|
260
|
+
date: t('mock.commits.two.date'),
|
|
261
|
+
branch: 'main',
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
hash: 'i9j0k1l2',
|
|
265
|
+
message: t('mock.commits.three.message'),
|
|
266
|
+
author: 'John Doe',
|
|
267
|
+
date: t('mock.commits.three.date'),
|
|
268
|
+
branch: 'main',
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
hash: 'm3n4o5p6',
|
|
272
|
+
message: t('mock.commits.four.message'),
|
|
273
|
+
author: 'Jane Smith',
|
|
274
|
+
date: t('mock.commits.four.date'),
|
|
275
|
+
branch: 'main',
|
|
276
|
+
},
|
|
277
|
+
];
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export function getModuleOptions(t: TranslationFn): WizardSelectOption[] {
|
|
281
|
+
return [
|
|
282
|
+
{
|
|
283
|
+
value: 'core',
|
|
284
|
+
label: 'core',
|
|
285
|
+
description: t('moduleOptions.core'),
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
value: 'contact',
|
|
289
|
+
label: 'contact',
|
|
290
|
+
description: t('moduleOptions.contact'),
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
value: 'contact-us',
|
|
294
|
+
label: 'contact-us',
|
|
295
|
+
description: t('moduleOptions.contactUs'),
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
value: 'faq',
|
|
299
|
+
label: 'faq',
|
|
300
|
+
description: t('moduleOptions.faq'),
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
value: 'tag',
|
|
304
|
+
label: 'tag',
|
|
305
|
+
description: t('moduleOptions.tag'),
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
value: 'content',
|
|
309
|
+
label: 'content',
|
|
310
|
+
description: t('moduleOptions.content'),
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
value: 'category',
|
|
314
|
+
label: 'category',
|
|
315
|
+
description: t('moduleOptions.category'),
|
|
316
|
+
},
|
|
317
|
+
];
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export function getWizardConfig(
|
|
321
|
+
actionId: string,
|
|
322
|
+
t: TranslationFn
|
|
323
|
+
): WizardConfig | null {
|
|
324
|
+
const moduleOptions = getModuleOptions(t);
|
|
325
|
+
const mockLibraries = getMockLibraries(t);
|
|
326
|
+
|
|
327
|
+
switch (actionId) {
|
|
328
|
+
case 'create-module':
|
|
329
|
+
return {
|
|
330
|
+
id: 'create-module',
|
|
331
|
+
title: t('wizards.createModule.title'),
|
|
332
|
+
icon: <Plus className="h-5 w-5" />,
|
|
333
|
+
steps: [
|
|
334
|
+
{
|
|
335
|
+
id: 'intro',
|
|
336
|
+
title: t('wizards.createModule.steps.intro.title'),
|
|
337
|
+
description: t('wizards.createModule.steps.intro.description'),
|
|
338
|
+
type: 'info',
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
id: 'config',
|
|
342
|
+
title: t('wizards.createModule.steps.config.title'),
|
|
343
|
+
description: t('wizards.createModule.steps.config.description'),
|
|
344
|
+
type: 'form',
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
id: 'dependencies',
|
|
348
|
+
title: t('wizards.createModule.steps.dependencies.title'),
|
|
349
|
+
description: t(
|
|
350
|
+
'wizards.createModule.steps.dependencies.description'
|
|
351
|
+
),
|
|
352
|
+
type: 'select',
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
id: 'progress',
|
|
356
|
+
title: t('wizards.createModule.steps.progress.title'),
|
|
357
|
+
description: t('wizards.createModule.steps.progress.description'),
|
|
358
|
+
type: 'progress',
|
|
359
|
+
},
|
|
360
|
+
],
|
|
361
|
+
formFields: [
|
|
362
|
+
{
|
|
363
|
+
name: 'moduleName',
|
|
364
|
+
label: t('wizards.createModule.fields.moduleName.label'),
|
|
365
|
+
placeholder: t(
|
|
366
|
+
'wizards.createModule.fields.moduleName.placeholder'
|
|
367
|
+
),
|
|
368
|
+
required: true,
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
name: 'description',
|
|
372
|
+
label: t('wizards.createModule.fields.description.label'),
|
|
373
|
+
placeholder: t(
|
|
374
|
+
'wizards.createModule.fields.description.placeholder'
|
|
375
|
+
),
|
|
376
|
+
},
|
|
377
|
+
],
|
|
378
|
+
selectOptions: moduleOptions,
|
|
379
|
+
selectMultiple: true,
|
|
380
|
+
};
|
|
381
|
+
case 'add-module':
|
|
382
|
+
return {
|
|
383
|
+
id: 'add-module',
|
|
384
|
+
title: t('wizards.addModule.title'),
|
|
385
|
+
icon: <Package className="h-5 w-5" />,
|
|
386
|
+
steps: [
|
|
387
|
+
{
|
|
388
|
+
id: 'select',
|
|
389
|
+
title: t('wizards.addModule.steps.select.title'),
|
|
390
|
+
description: t('wizards.addModule.steps.select.description'),
|
|
391
|
+
type: 'select',
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
id: 'progress',
|
|
395
|
+
title: t('wizards.addModule.steps.progress.title'),
|
|
396
|
+
description: t('wizards.addModule.steps.progress.description'),
|
|
397
|
+
type: 'progress',
|
|
398
|
+
},
|
|
399
|
+
],
|
|
400
|
+
selectOptions: moduleOptions.filter(
|
|
401
|
+
(moduleOption) =>
|
|
402
|
+
!mockLibraries.find(
|
|
403
|
+
(library) =>
|
|
404
|
+
library.name === moduleOption.value && library.installed
|
|
405
|
+
)
|
|
406
|
+
),
|
|
407
|
+
selectMultiple: false,
|
|
408
|
+
};
|
|
409
|
+
case 'reset-modules':
|
|
410
|
+
return {
|
|
411
|
+
id: 'reset-modules',
|
|
412
|
+
title: t('wizards.resetModules.title'),
|
|
413
|
+
icon: <RotateCcw className="h-5 w-5" />,
|
|
414
|
+
steps: [
|
|
415
|
+
{
|
|
416
|
+
id: 'warning',
|
|
417
|
+
title: t('wizards.resetModules.steps.warning.title'),
|
|
418
|
+
description: t('wizards.resetModules.steps.warning.description'),
|
|
419
|
+
type: 'info',
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
id: 'progress',
|
|
423
|
+
title: t('wizards.resetModules.steps.progress.title'),
|
|
424
|
+
description: t('wizards.resetModules.steps.progress.description'),
|
|
425
|
+
type: 'progress',
|
|
426
|
+
},
|
|
427
|
+
],
|
|
428
|
+
};
|
|
429
|
+
case 'update-types':
|
|
430
|
+
return {
|
|
431
|
+
id: 'update-types',
|
|
432
|
+
title: t('wizards.updateTypes.title'),
|
|
433
|
+
icon: <Database className="h-5 w-5" />,
|
|
434
|
+
steps: [
|
|
435
|
+
{
|
|
436
|
+
id: 'info',
|
|
437
|
+
title: t('wizards.updateTypes.steps.info.title'),
|
|
438
|
+
description: t('wizards.updateTypes.steps.info.description'),
|
|
439
|
+
type: 'info',
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
id: 'progress',
|
|
443
|
+
title: t('wizards.updateTypes.steps.progress.title'),
|
|
444
|
+
description: t('wizards.updateTypes.steps.progress.description'),
|
|
445
|
+
type: 'progress',
|
|
446
|
+
},
|
|
447
|
+
],
|
|
448
|
+
};
|
|
449
|
+
case 'deploy-migrations':
|
|
450
|
+
return {
|
|
451
|
+
id: 'deploy-migrations',
|
|
452
|
+
title: t('wizards.deployMigrations.title'),
|
|
453
|
+
icon: <Upload className="h-5 w-5" />,
|
|
454
|
+
steps: [
|
|
455
|
+
{
|
|
456
|
+
id: 'info',
|
|
457
|
+
title: t('wizards.deployMigrations.steps.info.title'),
|
|
458
|
+
description: t('wizards.deployMigrations.steps.info.description'),
|
|
459
|
+
type: 'info',
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
id: 'progress',
|
|
463
|
+
title: t('wizards.deployMigrations.steps.progress.title'),
|
|
464
|
+
description: t(
|
|
465
|
+
'wizards.deployMigrations.steps.progress.description'
|
|
466
|
+
),
|
|
467
|
+
type: 'progress',
|
|
468
|
+
},
|
|
469
|
+
],
|
|
470
|
+
};
|
|
471
|
+
case 'deploy-library':
|
|
472
|
+
return {
|
|
473
|
+
id: 'deploy-library',
|
|
474
|
+
title: t('wizards.deployLibrary.title'),
|
|
475
|
+
icon: <Rocket className="h-5 w-5" />,
|
|
476
|
+
steps: [
|
|
477
|
+
{
|
|
478
|
+
id: 'select',
|
|
479
|
+
title: t('wizards.deployLibrary.steps.select.title'),
|
|
480
|
+
description: t('wizards.deployLibrary.steps.select.description'),
|
|
481
|
+
type: 'select',
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
id: 'progress',
|
|
485
|
+
title: t('wizards.deployLibrary.steps.progress.title'),
|
|
486
|
+
description: t('wizards.deployLibrary.steps.progress.description'),
|
|
487
|
+
type: 'progress',
|
|
488
|
+
},
|
|
489
|
+
],
|
|
490
|
+
selectOptions: mockLibraries
|
|
491
|
+
.filter((library) => library.installed)
|
|
492
|
+
.map((library) => ({
|
|
493
|
+
value: library.name,
|
|
494
|
+
label: library.name,
|
|
495
|
+
description: library.description,
|
|
496
|
+
})),
|
|
497
|
+
selectMultiple: false,
|
|
498
|
+
};
|
|
499
|
+
case 'generate-crud':
|
|
500
|
+
return {
|
|
501
|
+
id: 'generate-crud',
|
|
502
|
+
title: t('wizards.generateCrud.title'),
|
|
503
|
+
icon: <FileCode className="h-5 w-5" />,
|
|
504
|
+
steps: [
|
|
505
|
+
{
|
|
506
|
+
id: 'config',
|
|
507
|
+
title: t('wizards.generateCrud.steps.config.title'),
|
|
508
|
+
description: t('wizards.generateCrud.steps.config.description'),
|
|
509
|
+
type: 'form',
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
id: 'progress',
|
|
513
|
+
title: t('wizards.generateCrud.steps.progress.title'),
|
|
514
|
+
description: t('wizards.generateCrud.steps.progress.description'),
|
|
515
|
+
type: 'progress',
|
|
516
|
+
},
|
|
517
|
+
],
|
|
518
|
+
formFields: [
|
|
519
|
+
{
|
|
520
|
+
name: 'entityName',
|
|
521
|
+
label: t('wizards.generateCrud.fields.entityName.label'),
|
|
522
|
+
placeholder: t(
|
|
523
|
+
'wizards.generateCrud.fields.entityName.placeholder'
|
|
524
|
+
),
|
|
525
|
+
required: true,
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
name: 'tableName',
|
|
529
|
+
label: t('wizards.generateCrud.fields.tableName.label'),
|
|
530
|
+
placeholder: t('wizards.generateCrud.fields.tableName.placeholder'),
|
|
531
|
+
},
|
|
532
|
+
],
|
|
533
|
+
};
|
|
534
|
+
case 'sync-prisma':
|
|
535
|
+
return {
|
|
536
|
+
id: 'sync-prisma',
|
|
537
|
+
title: t('wizards.syncPrisma.title'),
|
|
538
|
+
icon: <RefreshCw className="h-5 w-5" />,
|
|
539
|
+
steps: [
|
|
540
|
+
{
|
|
541
|
+
id: 'info',
|
|
542
|
+
title: t('wizards.syncPrisma.steps.info.title'),
|
|
543
|
+
description: t('wizards.syncPrisma.steps.info.description'),
|
|
544
|
+
type: 'info',
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
id: 'progress',
|
|
548
|
+
title: t('wizards.syncPrisma.steps.progress.title'),
|
|
549
|
+
description: t('wizards.syncPrisma.steps.progress.description'),
|
|
550
|
+
type: 'progress',
|
|
551
|
+
},
|
|
552
|
+
],
|
|
553
|
+
};
|
|
554
|
+
default:
|
|
555
|
+
return null;
|
|
556
|
+
}
|
|
557
|
+
}
|