@vef-framework/dev 1.0.128 → 1.0.130

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.
Files changed (60) hide show
  1. package/cjs/cli.cjs +4 -227
  2. package/cjs/commitlint-config.cjs +1 -13
  3. package/cjs/config.cjs +1 -81
  4. package/cjs/constants.cjs +1 -26
  5. package/cjs/eslint-config.cjs +1 -412
  6. package/cjs/index.cjs +1 -15
  7. package/cjs/json/monaco.nls.json.cjs +15920 -7
  8. package/cjs/json/monaco.theme.github-light.json.cjs +349 -7
  9. package/cjs/modules.d.cjs +0 -2
  10. package/cjs/plugin-app-config.cjs +1 -36
  11. package/cjs/plugin-conventional-config.cjs +3 -107
  12. package/cjs/plugin-eslint.cjs +1 -22
  13. package/cjs/plugin-html.cjs +2 -70
  14. package/cjs/plugin-icons.cjs +1 -20
  15. package/cjs/plugin-initialization.cjs +3 -26
  16. package/cjs/plugin-injection.cjs +2 -19
  17. package/cjs/plugin-inspect.cjs +1 -13
  18. package/cjs/plugin-monaco-nls.cjs +3 -59
  19. package/cjs/plugin-react-swc.cjs +1 -12
  20. package/cjs/plugin-router.cjs +4 -40
  21. package/cjs/plugin-stylelint.cjs +1 -22
  22. package/cjs/plugin-svgr.cjs +1 -57
  23. package/cjs/plugin-tailwind.cjs +1 -10
  24. package/cjs/plugin-tailwindcss.cjs +2 -23
  25. package/cjs/plugin-tsconfig-paths.cjs +1 -12
  26. package/cjs/plugin-visualizer.cjs +1 -14
  27. package/cjs/plugin-webfont.cjs +1 -13
  28. package/cjs/stylelint-config.cjs +1 -66
  29. package/cjs/tailwind-config.cjs +1 -394
  30. package/cjs/types.cjs +0 -2
  31. package/esm/cli.js +4 -225
  32. package/esm/commitlint-config.js +1 -11
  33. package/esm/config.js +1 -79
  34. package/esm/constants.js +1 -14
  35. package/esm/eslint-config.js +1 -410
  36. package/esm/index.js +1 -7
  37. package/esm/json/monaco.nls.json.js +15920 -3
  38. package/esm/json/monaco.theme.github-light.json.js +349 -3
  39. package/esm/plugin-app-config.js +1 -34
  40. package/esm/plugin-conventional-config.js +3 -105
  41. package/esm/plugin-eslint.js +1 -20
  42. package/esm/plugin-html.js +2 -68
  43. package/esm/plugin-icons.js +1 -17
  44. package/esm/plugin-initialization.js +3 -24
  45. package/esm/plugin-injection.js +2 -17
  46. package/esm/plugin-inspect.js +1 -11
  47. package/esm/plugin-monaco-nls.js +3 -56
  48. package/esm/plugin-react-swc.js +1 -10
  49. package/esm/plugin-router.js +4 -38
  50. package/esm/plugin-stylelint.js +1 -20
  51. package/esm/plugin-svgr.js +1 -55
  52. package/esm/plugin-tailwind.js +1 -8
  53. package/esm/plugin-tailwindcss.js +2 -21
  54. package/esm/plugin-tsconfig-paths.js +1 -10
  55. package/esm/plugin-visualizer.js +1 -12
  56. package/esm/plugin-webfont.js +1 -11
  57. package/esm/stylelint-config.js +1 -64
  58. package/esm/tailwind-config.js +1 -392
  59. package/package.json +1 -1
  60. package/template/_package.json +5 -5
@@ -1,395 +1,2 @@
1
1
  "use strict";
2
- 'use strict';
3
-
4
- var containerQueries = require('@tailwindcss/container-queries');
5
- var colors = require('tailwindcss/colors');
6
-
7
- "use strict";
8
- function defineTailwindConfig() {
9
- return {
10
- content: ["./src/**/*.{ts,tsx}"],
11
- plugins: [containerQueries],
12
- theme: {
13
- colors: {
14
- "inherit": "inherit",
15
- "current": "currentColor",
16
- "transparent": "transparent",
17
- "black": "#000000",
18
- "white": "var(--vef-color-white)",
19
- "primary": "var(--vef-color-primary)",
20
- "primary-hover": "var(--vef-color-primary-hover)",
21
- "primary-active": "var(--vef-color-primary-active)",
22
- "success": "var(--vef-color-success)",
23
- "success-hover": "var(--vef-color-success-hover)",
24
- "success-active": "var(--vef-color-success-active)",
25
- "warning": "var(--vef-color-warning)",
26
- "warning-hover": "var(--vef-color-warning-hover)",
27
- "warning-active": "var(--vef-color-warning-active)",
28
- "error": "var(--vef-color-error)",
29
- "error-hover": "var(--vef-color-error-hover)",
30
- "error-active": "var(--vef-color-error-active)",
31
- "info": "var(--vef-color-info)",
32
- "info-hover": "var(--vef-color-info-hover)",
33
- "info-active": "var(--vef-color-info-active)",
34
- "link": "var(--vef-color-link)",
35
- "link-hover": "var(--vef-color-link-hover)",
36
- "link-active": "var(--vef-color-link-active)",
37
- "blue": {
38
- DEFAULT: "var(--vef-blue-6)",
39
- 1: "var(--vef-blue-1)",
40
- 2: "var(--vef-blue-2)",
41
- 3: "var(--vef-blue-3)",
42
- 4: "var(--vef-blue-4)",
43
- 5: "var(--vef-blue-5)",
44
- 6: "var(--vef-blue-6)",
45
- 7: "var(--vef-blue-7)",
46
- 8: "var(--vef-blue-8)",
47
- 9: "var(--vef-blue-9)",
48
- 10: "var(--vef-blue-10)"
49
- },
50
- "purple": {
51
- DEFAULT: "var(--vef-purple-6)",
52
- 1: "var(--vef-purple-1)",
53
- 2: "var(--vef-purple-2)",
54
- 3: "var(--vef-purple-3)",
55
- 4: "var(--vef-purple-4)",
56
- 5: "var(--vef-purple-5)",
57
- 6: "var(--vef-purple-6)",
58
- 7: "var(--vef-purple-7)",
59
- 8: "var(--vef-purple-8)",
60
- 9: "var(--vef-purple-9)",
61
- 10: "var(--vef-purple-10)"
62
- },
63
- "cyan": {
64
- DEFAULT: "var(--vef-cyan-6)",
65
- 1: "var(--vef-cyan-1)",
66
- 2: "var(--vef-cyan-2)",
67
- 3: "var(--vef-cyan-3)",
68
- 4: "var(--vef-cyan-4)",
69
- 5: "var(--vef-cyan-5)",
70
- 6: "var(--vef-cyan-6)",
71
- 7: "var(--vef-cyan-7)",
72
- 8: "var(--vef-cyan-8)",
73
- 9: "var(--vef-cyan-9)",
74
- 10: "var(--vef-cyan-10)"
75
- },
76
- "green": {
77
- DEFAULT: "var(--vef-green-6)",
78
- 1: "var(--vef-green-1)",
79
- 2: "var(--vef-green-2)",
80
- 3: "var(--vef-green-3)",
81
- 4: "var(--vef-green-4)",
82
- 5: "var(--vef-green-5)",
83
- 6: "var(--vef-green-6)",
84
- 7: "var(--vef-green-7)",
85
- 8: "var(--vef-green-8)",
86
- 9: "var(--vef-green-9)",
87
- 10: "var(--vef-green-10)"
88
- },
89
- "magenta": {
90
- DEFAULT: "var(--vef-magenta-6)",
91
- 1: "var(--vef-magenta-1)",
92
- 2: "var(--vef-magenta-2)",
93
- 3: "var(--vef-magenta-3)",
94
- 4: "var(--vef-magenta-4)",
95
- 5: "var(--vef-magenta-5)",
96
- 6: "var(--vef-magenta-6)",
97
- 7: "var(--vef-magenta-7)",
98
- 8: "var(--vef-magenta-8)",
99
- 9: "var(--vef-magenta-9)",
100
- 10: "var(--vef-magenta-10)"
101
- },
102
- "pink": {
103
- DEFAULT: "var(--vef-pink-6)",
104
- 1: "var(--vef-pink-1)",
105
- 2: "var(--vef-pink-2)",
106
- 3: "var(--vef-pink-3)",
107
- 4: "var(--vef-pink-4)",
108
- 5: "var(--vef-pink-5)",
109
- 6: "var(--vef-pink-6)",
110
- 7: "var(--vef-pink-7)",
111
- 8: "var(--vef-pink-8)",
112
- 9: "var(--vef-pink-9)",
113
- 10: "var(--vef-pink-10)"
114
- },
115
- "red": {
116
- DEFAULT: "var(--vef-red-6)",
117
- 1: "var(--vef-red-1)",
118
- 2: "var(--vef-red-2)",
119
- 3: "var(--vef-red-3)",
120
- 4: "var(--vef-red-4)",
121
- 5: "var(--vef-red-5)",
122
- 6: "var(--vef-red-6)",
123
- 7: "var(--vef-red-7)",
124
- 8: "var(--vef-red-8)",
125
- 9: "var(--vef-red-9)",
126
- 10: "var(--vef-red-10)"
127
- },
128
- "orange": {
129
- DEFAULT: "var(--vef-orange-6)",
130
- 1: "var(--vef-orange-1)",
131
- 2: "var(--vef-orange-2)",
132
- 3: "var(--vef-orange-3)",
133
- 4: "var(--vef-orange-4)",
134
- 5: "var(--vef-orange-5)",
135
- 6: "var(--vef-orange-6)",
136
- 7: "var(--vef-orange-7)",
137
- 8: "var(--vef-orange-8)",
138
- 9: "var(--vef-orange-9)",
139
- 10: "var(--vef-orange-10)"
140
- },
141
- "yellow": {
142
- DEFAULT: "var(--vef-yellow-6)",
143
- 1: "var(--vef-yellow-1)",
144
- 2: "var(--vef-yellow-2)",
145
- 3: "var(--vef-yellow-3)",
146
- 4: "var(--vef-yellow-4)",
147
- 5: "var(--vef-yellow-5)",
148
- 6: "var(--vef-yellow-6)",
149
- 7: "var(--vef-yellow-7)",
150
- 8: "var(--vef-yellow-8)",
151
- 9: "var(--vef-yellow-9)",
152
- 10: "var(--vef-yellow-10)"
153
- },
154
- "volcano": {
155
- DEFAULT: "var(--vef-volcano-6)",
156
- 1: "var(--vef-volcano-1)",
157
- 2: "var(--vef-volcano-2)",
158
- 3: "var(--vef-volcano-3)",
159
- 4: "var(--vef-volcano-4)",
160
- 5: "var(--vef-volcano-5)",
161
- 6: "var(--vef-volcano-6)",
162
- 7: "var(--vef-volcano-7)",
163
- 8: "var(--vef-volcano-8)",
164
- 9: "var(--vef-volcano-9)",
165
- 10: "var(--vef-volcano-10)"
166
- },
167
- "geekblue": {
168
- DEFAULT: "var(--vef-geekblue-6)",
169
- 1: "var(--vef-geekblue-1)",
170
- 2: "var(--vef-geekblue-2)",
171
- 3: "var(--vef-geekblue-3)",
172
- 4: "var(--vef-geekblue-4)",
173
- 5: "var(--vef-geekblue-5)",
174
- 6: "var(--vef-geekblue-6)",
175
- 7: "var(--vef-geekblue-7)",
176
- 8: "var(--vef-geekblue-8)",
177
- 9: "var(--vef-geekblue-9)",
178
- 10: "var(--vef-geekblue-10)"
179
- },
180
- "gold": {
181
- DEFAULT: "var(--vef-gold-6)",
182
- 1: "var(--vef-gold-1)",
183
- 2: "var(--vef-gold-2)",
184
- 3: "var(--vef-gold-3)",
185
- 4: "var(--vef-gold-4)",
186
- 5: "var(--vef-gold-5)",
187
- 6: "var(--vef-gold-6)",
188
- 7: "var(--vef-gold-7)",
189
- 8: "var(--vef-gold-8)",
190
- 9: "var(--vef-gold-9)",
191
- 10: "var(--vef-gold-10)"
192
- },
193
- "lime": {
194
- DEFAULT: "var(--vef-lime-6)",
195
- 1: "var(--vef-lime-1)",
196
- 2: "var(--vef-lime-2)",
197
- 3: "var(--vef-lime-3)",
198
- 4: "var(--vef-lime-4)",
199
- 5: "var(--vef-lime-5)",
200
- 6: "var(--vef-lime-6)",
201
- 7: "var(--vef-lime-7)",
202
- 8: "var(--vef-lime-8)",
203
- 9: "var(--vef-lime-9)",
204
- 10: "var(--vef-lime-10)"
205
- },
206
- "slate": {
207
- DEFAULT: colors.slate[500],
208
- 1: colors.slate[50],
209
- 2: colors.slate[100],
210
- 3: colors.slate[200],
211
- 4: colors.slate[300],
212
- 5: colors.slate[400],
213
- 6: colors.slate[500],
214
- 7: colors.slate[600],
215
- 8: colors.slate[700],
216
- 9: colors.slate[800],
217
- 10: colors.slate[900]
218
- }
219
- },
220
- extend: {
221
- textColor: {
222
- "primary-alt": "var(--vef-color-primary-text)",
223
- "primary-alt-hover": "var(--vef-color-primary-text-hover)",
224
- "primary-alt-active": "var(--vef-color-primary-text-active)",
225
- "success-alt": "var(--vef-color-success-text)",
226
- "success-alt-hover": "var(--vef-color-success-text-hover)",
227
- "success-alt-active": "var(--vef-color-success-text-active)",
228
- "warning-alt": "var(--vef-color-warning-text)",
229
- "warning-alt-hover": "var(--vef-color-warning-text-hover)",
230
- "warning-alt-active": "var(--vef-color-warning-text-active)",
231
- "error-alt": "var(--vef-color-error-text)",
232
- "error-alt-hover": "var(--vef-color-error-text-hover)",
233
- "error-alt-active": "var(--vef-color-error-text-active)",
234
- "info-alt": "var(--vef-color-info-text)",
235
- "info-alt-hover": "var(--vef-color-info-text-hover)",
236
- "info-alt-active": "var(--vef-color-info-text-active)",
237
- "base": "var(--vef-color-text-base)",
238
- "default": "var(--vef-color-text)",
239
- "secondary": "var(--vef-color-text-secondary)",
240
- "tertiary": "var(--vef-color-text-tertiary)",
241
- "quaternary": "var(--vef-color-text-quaternary)",
242
- "placeholder": "var(--vef-color-text-placeholder)",
243
- "disabled": "var(--vef-color-text-disabled)",
244
- "heading": "var(--vef-color-text-heading)",
245
- "label": "var(--vef-color-text-label)",
246
- "description": "var(--vef-color-text-description)",
247
- "light-solid": "var(--vef-color-text-light-solid)",
248
- "highlight": "var(--vef-color-highlight)",
249
- "icon": "var(--vef-color-icon)",
250
- "icon-hover": "var(--vef-color-icon-hover)"
251
- },
252
- outlineColor: {
253
- error: "var(--vef-color-error-outline)",
254
- warning: "var(--vef-color-warning-outline)"
255
- },
256
- backgroundColor: {
257
- "primary-alt": "var(--vef-color-primary-bg)",
258
- "primary-alt-hover": "var(--vef-color-primary-bg-hover)",
259
- "success-alt": "var(--vef-color-success-bg)",
260
- "success-alt-hover": "var(--vef-color-success-bg-hover)",
261
- "warning-alt": "var(--vef-color-warning-bg)",
262
- "warning-alt-hover": "var(--vef-color-warning-bg-hover)",
263
- "error-alt": "var(--vef-color-error-bg)",
264
- "error-alt-hover": "var(--vef-color-error-bg-hover)",
265
- "info-alt": "var(--vef-color-info-bg)",
266
- "info-alt-hover": "var(--vef-color-info-bg-hover)",
267
- "base": "var(--vef-color-bg-base)",
268
- "layout": "var(--vef-color-bg-layout)",
269
- "spotlight": "var(--vef-color-bg-spotlight)",
270
- "solid": "var(--vef-color-bg-solid)",
271
- "solid-hover": "var(--vef-color-bg-solid-hover)",
272
- "solid-active": "var(--vef-color-bg-solid-active)",
273
- "container": "var(--vef-color-bg-container)",
274
- "container-disabled": "var(--vef-color-bg-container-disabled)",
275
- "elevated": "var(--vef-color-bg-elevated)",
276
- "blur": "var(--vef-color-bg-blur)",
277
- "fill": "var(--vef-color-fill)",
278
- "fill-secondary": "var(--vef-color-fill-secondary)",
279
- "fill-tertiary": "var(--vef-color-fill-tertiary)",
280
- "fill-quaternary": "var(--vef-color-fill-quaternary)",
281
- "fill-content": "var(--vef-color-fill-content)",
282
- "fill-content-hover": "var(--vef-color-fill-content-hover)",
283
- "fill-alt": "var(--vef-color-fill-alter)",
284
- "mask": "var(--vef-color-bg-mask)",
285
- "text-hover": "var(--vef-color-bg-text-hover)",
286
- "text-active": "var(--vef-color-bg-text-active)",
287
- "control-item-hover": "var(--vef-control-item-bg-hover)",
288
- "control-item-active": "var(--vef-control-item-bg-active)",
289
- "control-item-active-hover": "var(--vef-control-item-bg-active-hover)",
290
- "control-item-active-disabled": "var(--vef-control-item-bg-active-disabled)"
291
- },
292
- borderColor: {
293
- "primary-alt": "var(--vef-color-primary-border)",
294
- "primary-alt-hover": "var(--vef-color-primary-border-hover)",
295
- "success-alt": "var(--vef-color-success-border)",
296
- "success-alt-hover": "var(--vef-color-success-border-hover)",
297
- "warning-alt": "var(--vef-color-warning-border)",
298
- "warning-alt-hover": "var(--vef-color-warning-border-hover)",
299
- "error-alt": "var(--vef-color-error-border)",
300
- "error-alt-hover": "var(--vef-color-error-border-hover)",
301
- "info-alt": "var(--vef-color-info-border)",
302
- "info-alt-hover": "var(--vef-color-info-border-hover)",
303
- "base": "var(--vef-color-border)",
304
- "secondary": "var(--vef-color-border-secondary)"
305
- },
306
- fontFamily: {
307
- base: "var(--vef-font-family)",
308
- code: "var(--vef-font-family-code)"
309
- },
310
- fontSize: {
311
- base: "var(--vef-font-size)",
312
- sm: "var(--vef-font-size-sm)",
313
- lg: "var(--vef-font-size-lg)",
314
- xl: "var(--vef-font-size-xl)",
315
- heading1: "var(--vef-font-size-heading-1)",
316
- heading2: "var(--vef-font-size-heading-2)",
317
- heading3: "var(--vef-font-size-heading-3)",
318
- heading4: "var(--vef-font-size-heading-4)",
319
- heading5: "var(--vef-font-size-heading-5)"
320
- },
321
- fontWeight: {
322
- strong: "var(--vef-font-weight-strong)"
323
- },
324
- borderWidth: {
325
- base: "var(--vef-line-width)",
326
- bold: "var(--vef-line-width-bold)"
327
- },
328
- borderRadius: {
329
- DEFAULT: "var(--vef-border-radius)",
330
- xs: "var(--vef-border-radius-xs)",
331
- sm: "var(--vef-border-radius-sm)",
332
- lg: "var(--vef-border-radius-lg)",
333
- outer: "var(--vef-border-radius-outer)"
334
- },
335
- height: {
336
- "control": "var(--vef-control-height)",
337
- "control-sm": "var(--vef-control-height-sm)",
338
- "control-xs": "var(--vef-control-height-xs)",
339
- "control-lg": "var(--vef-control-height-lg)",
340
- "font": "var(--vef-font-height)",
341
- "font-sm": "var(--vef-font-height-sm)",
342
- "font-lg": "var(--vef-font-height-lg)"
343
- },
344
- lineHeight: {
345
- "base": "var(--vef-line-height)",
346
- "sm": "var(--vef-line-height-sm)",
347
- "lg": "var(--vef-line-height-lg)",
348
- "heading-1": "var(--vef-line-height-heading-1)",
349
- "heading-2": "var(--vef-line-height-heading-2)",
350
- "heading-3": "var(--vef-line-height-heading-3)",
351
- "heading-4": "var(--vef-line-height-heading-4)",
352
- "heading-5": "var(--vef-line-height-heading-5)"
353
- },
354
- spacing: {
355
- base: "var(--vef-margin)",
356
- xxs: "var(--vef-margin-xxs)",
357
- xs: "var(--vef-margin-xs)",
358
- sm: "var(--vef-margin-sm)",
359
- md: "var(--vef-margin-md)",
360
- lg: "var(--vef-margin-lg)",
361
- xl: "var(--vef-margin-xl)",
362
- xxl: "var(--vef-margin-xxl)"
363
- },
364
- boxShadow: {
365
- base: "var(--vef-box-shadow)",
366
- secondary: "var(--vef-box-shadow-secondary)",
367
- tertiary: "var(--vef-box-shadow-tertiary)",
368
- card: "var(--vef-box-shadow-card)",
369
- elevated: "0 0 1px rgb(0 0 0 / 30%), 0 4px 14px rgb(0 0 0 / 10%)"
370
- },
371
- transitionDuration: {
372
- fast: "var(--vef-motion-duration-fast)",
373
- mid: "var(--vef-motion-duration-mid)",
374
- slow: "var(--vef-motion-duration-slow)"
375
- },
376
- transitionTimingFunction: {
377
- "ease-out-circ": "var(--vef-motion-ease-out-circ)",
378
- "ease-in-out-circ": "var(--vef-motion-ease-in-out-circ)",
379
- "ease-out": "var(--vef-motion-ease-out)",
380
- "ease-in-out": "var(--vef-motion-ease-in-out)",
381
- "ease-out-back": "var(--vef-motion-ease-out-back)",
382
- "ease-in-back": "var(--vef-motion-ease-in-back)",
383
- "ease-in-quint": "var(--vef-motion-ease-in-quint)",
384
- "ease-out-quint": "var(--vef-motion-ease-out-quint)"
385
- },
386
- zIndex: {
387
- base: "var(--vef-z-index-base)",
388
- popup: "var(--vef-z-index-popup)"
389
- }
390
- }
391
- }
392
- };
393
- }
394
-
395
- exports.defineTailwindConfig = defineTailwindConfig;
2
+ "use strict";var r=require("@tailwindcss/container-queries"),e=require("tailwindcss/colors");function v(){return{content:["./src/**/*.{ts,tsx}"],plugins:[r],theme:{colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000000",white:"var(--vef-color-white)",primary:"var(--vef-color-primary)","primary-hover":"var(--vef-color-primary-hover)","primary-active":"var(--vef-color-primary-active)",success:"var(--vef-color-success)","success-hover":"var(--vef-color-success-hover)","success-active":"var(--vef-color-success-active)",warning:"var(--vef-color-warning)","warning-hover":"var(--vef-color-warning-hover)","warning-active":"var(--vef-color-warning-active)",error:"var(--vef-color-error)","error-hover":"var(--vef-color-error-hover)","error-active":"var(--vef-color-error-active)",info:"var(--vef-color-info)","info-hover":"var(--vef-color-info-hover)","info-active":"var(--vef-color-info-active)",link:"var(--vef-color-link)","link-hover":"var(--vef-color-link-hover)","link-active":"var(--vef-color-link-active)",blue:{DEFAULT:"var(--vef-blue-6)",1:"var(--vef-blue-1)",2:"var(--vef-blue-2)",3:"var(--vef-blue-3)",4:"var(--vef-blue-4)",5:"var(--vef-blue-5)",6:"var(--vef-blue-6)",7:"var(--vef-blue-7)",8:"var(--vef-blue-8)",9:"var(--vef-blue-9)",10:"var(--vef-blue-10)"},purple:{DEFAULT:"var(--vef-purple-6)",1:"var(--vef-purple-1)",2:"var(--vef-purple-2)",3:"var(--vef-purple-3)",4:"var(--vef-purple-4)",5:"var(--vef-purple-5)",6:"var(--vef-purple-6)",7:"var(--vef-purple-7)",8:"var(--vef-purple-8)",9:"var(--vef-purple-9)",10:"var(--vef-purple-10)"},cyan:{DEFAULT:"var(--vef-cyan-6)",1:"var(--vef-cyan-1)",2:"var(--vef-cyan-2)",3:"var(--vef-cyan-3)",4:"var(--vef-cyan-4)",5:"var(--vef-cyan-5)",6:"var(--vef-cyan-6)",7:"var(--vef-cyan-7)",8:"var(--vef-cyan-8)",9:"var(--vef-cyan-9)",10:"var(--vef-cyan-10)"},green:{DEFAULT:"var(--vef-green-6)",1:"var(--vef-green-1)",2:"var(--vef-green-2)",3:"var(--vef-green-3)",4:"var(--vef-green-4)",5:"var(--vef-green-5)",6:"var(--vef-green-6)",7:"var(--vef-green-7)",8:"var(--vef-green-8)",9:"var(--vef-green-9)",10:"var(--vef-green-10)"},magenta:{DEFAULT:"var(--vef-magenta-6)",1:"var(--vef-magenta-1)",2:"var(--vef-magenta-2)",3:"var(--vef-magenta-3)",4:"var(--vef-magenta-4)",5:"var(--vef-magenta-5)",6:"var(--vef-magenta-6)",7:"var(--vef-magenta-7)",8:"var(--vef-magenta-8)",9:"var(--vef-magenta-9)",10:"var(--vef-magenta-10)"},pink:{DEFAULT:"var(--vef-pink-6)",1:"var(--vef-pink-1)",2:"var(--vef-pink-2)",3:"var(--vef-pink-3)",4:"var(--vef-pink-4)",5:"var(--vef-pink-5)",6:"var(--vef-pink-6)",7:"var(--vef-pink-7)",8:"var(--vef-pink-8)",9:"var(--vef-pink-9)",10:"var(--vef-pink-10)"},red:{DEFAULT:"var(--vef-red-6)",1:"var(--vef-red-1)",2:"var(--vef-red-2)",3:"var(--vef-red-3)",4:"var(--vef-red-4)",5:"var(--vef-red-5)",6:"var(--vef-red-6)",7:"var(--vef-red-7)",8:"var(--vef-red-8)",9:"var(--vef-red-9)",10:"var(--vef-red-10)"},orange:{DEFAULT:"var(--vef-orange-6)",1:"var(--vef-orange-1)",2:"var(--vef-orange-2)",3:"var(--vef-orange-3)",4:"var(--vef-orange-4)",5:"var(--vef-orange-5)",6:"var(--vef-orange-6)",7:"var(--vef-orange-7)",8:"var(--vef-orange-8)",9:"var(--vef-orange-9)",10:"var(--vef-orange-10)"},yellow:{DEFAULT:"var(--vef-yellow-6)",1:"var(--vef-yellow-1)",2:"var(--vef-yellow-2)",3:"var(--vef-yellow-3)",4:"var(--vef-yellow-4)",5:"var(--vef-yellow-5)",6:"var(--vef-yellow-6)",7:"var(--vef-yellow-7)",8:"var(--vef-yellow-8)",9:"var(--vef-yellow-9)",10:"var(--vef-yellow-10)"},volcano:{DEFAULT:"var(--vef-volcano-6)",1:"var(--vef-volcano-1)",2:"var(--vef-volcano-2)",3:"var(--vef-volcano-3)",4:"var(--vef-volcano-4)",5:"var(--vef-volcano-5)",6:"var(--vef-volcano-6)",7:"var(--vef-volcano-7)",8:"var(--vef-volcano-8)",9:"var(--vef-volcano-9)",10:"var(--vef-volcano-10)"},geekblue:{DEFAULT:"var(--vef-geekblue-6)",1:"var(--vef-geekblue-1)",2:"var(--vef-geekblue-2)",3:"var(--vef-geekblue-3)",4:"var(--vef-geekblue-4)",5:"var(--vef-geekblue-5)",6:"var(--vef-geekblue-6)",7:"var(--vef-geekblue-7)",8:"var(--vef-geekblue-8)",9:"var(--vef-geekblue-9)",10:"var(--vef-geekblue-10)"},gold:{DEFAULT:"var(--vef-gold-6)",1:"var(--vef-gold-1)",2:"var(--vef-gold-2)",3:"var(--vef-gold-3)",4:"var(--vef-gold-4)",5:"var(--vef-gold-5)",6:"var(--vef-gold-6)",7:"var(--vef-gold-7)",8:"var(--vef-gold-8)",9:"var(--vef-gold-9)",10:"var(--vef-gold-10)"},lime:{DEFAULT:"var(--vef-lime-6)",1:"var(--vef-lime-1)",2:"var(--vef-lime-2)",3:"var(--vef-lime-3)",4:"var(--vef-lime-4)",5:"var(--vef-lime-5)",6:"var(--vef-lime-6)",7:"var(--vef-lime-7)",8:"var(--vef-lime-8)",9:"var(--vef-lime-9)",10:"var(--vef-lime-10)"},slate:{DEFAULT:e.slate[500],1:e.slate[50],2:e.slate[100],3:e.slate[200],4:e.slate[300],5:e.slate[400],6:e.slate[500],7:e.slate[600],8:e.slate[700],9:e.slate[800],10:e.slate[900]}},extend:{textColor:{"primary-alt":"var(--vef-color-primary-text)","primary-alt-hover":"var(--vef-color-primary-text-hover)","primary-alt-active":"var(--vef-color-primary-text-active)","success-alt":"var(--vef-color-success-text)","success-alt-hover":"var(--vef-color-success-text-hover)","success-alt-active":"var(--vef-color-success-text-active)","warning-alt":"var(--vef-color-warning-text)","warning-alt-hover":"var(--vef-color-warning-text-hover)","warning-alt-active":"var(--vef-color-warning-text-active)","error-alt":"var(--vef-color-error-text)","error-alt-hover":"var(--vef-color-error-text-hover)","error-alt-active":"var(--vef-color-error-text-active)","info-alt":"var(--vef-color-info-text)","info-alt-hover":"var(--vef-color-info-text-hover)","info-alt-active":"var(--vef-color-info-text-active)",base:"var(--vef-color-text-base)",default:"var(--vef-color-text)",secondary:"var(--vef-color-text-secondary)",tertiary:"var(--vef-color-text-tertiary)",quaternary:"var(--vef-color-text-quaternary)",placeholder:"var(--vef-color-text-placeholder)",disabled:"var(--vef-color-text-disabled)",heading:"var(--vef-color-text-heading)",label:"var(--vef-color-text-label)",description:"var(--vef-color-text-description)","light-solid":"var(--vef-color-text-light-solid)",highlight:"var(--vef-color-highlight)",icon:"var(--vef-color-icon)","icon-hover":"var(--vef-color-icon-hover)"},outlineColor:{error:"var(--vef-color-error-outline)",warning:"var(--vef-color-warning-outline)"},backgroundColor:{"primary-alt":"var(--vef-color-primary-bg)","primary-alt-hover":"var(--vef-color-primary-bg-hover)","success-alt":"var(--vef-color-success-bg)","success-alt-hover":"var(--vef-color-success-bg-hover)","warning-alt":"var(--vef-color-warning-bg)","warning-alt-hover":"var(--vef-color-warning-bg-hover)","error-alt":"var(--vef-color-error-bg)","error-alt-hover":"var(--vef-color-error-bg-hover)","info-alt":"var(--vef-color-info-bg)","info-alt-hover":"var(--vef-color-info-bg-hover)",base:"var(--vef-color-bg-base)",layout:"var(--vef-color-bg-layout)",spotlight:"var(--vef-color-bg-spotlight)",solid:"var(--vef-color-bg-solid)","solid-hover":"var(--vef-color-bg-solid-hover)","solid-active":"var(--vef-color-bg-solid-active)",container:"var(--vef-color-bg-container)","container-disabled":"var(--vef-color-bg-container-disabled)",elevated:"var(--vef-color-bg-elevated)",blur:"var(--vef-color-bg-blur)",fill:"var(--vef-color-fill)","fill-secondary":"var(--vef-color-fill-secondary)","fill-tertiary":"var(--vef-color-fill-tertiary)","fill-quaternary":"var(--vef-color-fill-quaternary)","fill-content":"var(--vef-color-fill-content)","fill-content-hover":"var(--vef-color-fill-content-hover)","fill-alt":"var(--vef-color-fill-alter)",mask:"var(--vef-color-bg-mask)","text-hover":"var(--vef-color-bg-text-hover)","text-active":"var(--vef-color-bg-text-active)","control-item-hover":"var(--vef-control-item-bg-hover)","control-item-active":"var(--vef-control-item-bg-active)","control-item-active-hover":"var(--vef-control-item-bg-active-hover)","control-item-active-disabled":"var(--vef-control-item-bg-active-disabled)"},borderColor:{"primary-alt":"var(--vef-color-primary-border)","primary-alt-hover":"var(--vef-color-primary-border-hover)","success-alt":"var(--vef-color-success-border)","success-alt-hover":"var(--vef-color-success-border-hover)","warning-alt":"var(--vef-color-warning-border)","warning-alt-hover":"var(--vef-color-warning-border-hover)","error-alt":"var(--vef-color-error-border)","error-alt-hover":"var(--vef-color-error-border-hover)","info-alt":"var(--vef-color-info-border)","info-alt-hover":"var(--vef-color-info-border-hover)",base:"var(--vef-color-border)",secondary:"var(--vef-color-border-secondary)"},fontFamily:{base:"var(--vef-font-family)",code:"var(--vef-font-family-code)"},fontSize:{base:"var(--vef-font-size)",sm:"var(--vef-font-size-sm)",lg:"var(--vef-font-size-lg)",xl:"var(--vef-font-size-xl)",heading1:"var(--vef-font-size-heading-1)",heading2:"var(--vef-font-size-heading-2)",heading3:"var(--vef-font-size-heading-3)",heading4:"var(--vef-font-size-heading-4)",heading5:"var(--vef-font-size-heading-5)"},fontWeight:{strong:"var(--vef-font-weight-strong)"},borderWidth:{base:"var(--vef-line-width)",bold:"var(--vef-line-width-bold)"},borderRadius:{DEFAULT:"var(--vef-border-radius)",xs:"var(--vef-border-radius-xs)",sm:"var(--vef-border-radius-sm)",lg:"var(--vef-border-radius-lg)",outer:"var(--vef-border-radius-outer)"},height:{control:"var(--vef-control-height)","control-sm":"var(--vef-control-height-sm)","control-xs":"var(--vef-control-height-xs)","control-lg":"var(--vef-control-height-lg)",font:"var(--vef-font-height)","font-sm":"var(--vef-font-height-sm)","font-lg":"var(--vef-font-height-lg)"},lineHeight:{base:"var(--vef-line-height)",sm:"var(--vef-line-height-sm)",lg:"var(--vef-line-height-lg)","heading-1":"var(--vef-line-height-heading-1)","heading-2":"var(--vef-line-height-heading-2)","heading-3":"var(--vef-line-height-heading-3)","heading-4":"var(--vef-line-height-heading-4)","heading-5":"var(--vef-line-height-heading-5)"},spacing:{base:"var(--vef-margin)",xxs:"var(--vef-margin-xxs)",xs:"var(--vef-margin-xs)",sm:"var(--vef-margin-sm)",md:"var(--vef-margin-md)",lg:"var(--vef-margin-lg)",xl:"var(--vef-margin-xl)",xxl:"var(--vef-margin-xxl)"},boxShadow:{base:"var(--vef-box-shadow)",secondary:"var(--vef-box-shadow-secondary)",tertiary:"var(--vef-box-shadow-tertiary)",card:"var(--vef-box-shadow-card)",elevated:"0 0 1px rgb(0 0 0 / 30%), 0 4px 14px rgb(0 0 0 / 10%)"},transitionDuration:{fast:"var(--vef-motion-duration-fast)",mid:"var(--vef-motion-duration-mid)",slow:"var(--vef-motion-duration-slow)"},transitionTimingFunction:{"ease-out-circ":"var(--vef-motion-ease-out-circ)","ease-in-out-circ":"var(--vef-motion-ease-in-out-circ)","ease-out":"var(--vef-motion-ease-out)","ease-in-out":"var(--vef-motion-ease-in-out)","ease-out-back":"var(--vef-motion-ease-out-back)","ease-in-back":"var(--vef-motion-ease-in-back)","ease-in-quint":"var(--vef-motion-ease-in-quint)","ease-out-quint":"var(--vef-motion-ease-out-quint)"},zIndex:{base:"var(--vef-z-index-base)",popup:"var(--vef-z-index-popup)"}}}}}exports.defineTailwindConfig=v;
package/cjs/types.cjs CHANGED
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
- 'use strict';
3
-
4
2
  "use strict";
package/esm/cli.js CHANGED
@@ -1,226 +1,5 @@
1
1
  "use strict";
2
- import chalk from 'chalk';
3
- import { program } from 'commander';
4
- import consola from 'consola';
5
- import { execa } from 'execa';
6
- import fsExtra from 'fs-extra';
7
- import { resolve } from 'node:path';
8
- import process from 'node:process';
9
- import ora from 'ora';
10
- import prompts from 'prompts';
11
- import { loadConfigFromFile, createServer, build, preview } from 'vite';
12
-
13
- "use strict";
14
- const {
15
- exists,
16
- readJsonSync,
17
- writeFile,
18
- readJson,
19
- writeJson,
20
- copy,
21
- readFile,
22
- move
23
- } = fsExtra;
24
- const currentDir = process.cwd();
25
- function readPackageVersion() {
26
- const packageJsonPath = resolve(import.meta.dirname, "../package.json");
27
- const packageJson = readJsonSync(packageJsonPath, { encoding: "utf-8" });
28
- return packageJson.version;
29
- }
30
- const frameworkVersion = readPackageVersion();
31
- async function importHoistPatterns() {
32
- const hoistedPatterns = (await import('../bin/hoist-patterns.js')).default;
33
- return hoistedPatterns;
34
- }
35
- function resolveEnvMode(command, userMode) {
36
- if (userMode) {
37
- return userMode;
38
- }
39
- return command === "build" ? "production" : "development";
40
- }
41
- async function loadVefConfig(configPath, command, mode) {
42
- const vefConfigPath = resolve(currentDir, configPath || "vef.config.ts");
43
- if (!await exists(vefConfigPath)) {
44
- consola.error(`Config file not found: ${vefConfigPath}, it is required for VEF Framework`);
45
- throw new Error(`Config file not found: ${vefConfigPath}`);
46
- }
47
- const vefConfig = await loadConfigFromFile(
48
- {
49
- command,
50
- mode
51
- },
52
- vefConfigPath
53
- );
54
- return vefConfig?.config ?? {};
55
- }
56
- function handleError(phase, error) {
57
- consola.error(`Error during ${phase}:`, error);
58
- process.exit(1);
59
- }
60
- program.name("vef").description(chalk.magenta("VEF Framework CLI")).addHelpText("before", chalk.blue("VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus.")).addHelpText("before", chalk.bgGreenBright(`Version: ${frameworkVersion}`)).version(frameworkVersion).option("--mode <mode>", "Specify running mode (will override default NODE_ENV)");
61
- program.command("dev").description("Start dev server").option("-c, --config <file>", "Specify vef config file", "vef.config.ts").action(async (options) => {
62
- try {
63
- const mode = resolveEnvMode("serve", program.opts().mode);
64
- process.env.NODE_ENV = mode;
65
- process.env.VEF_FRAMEWORK_VERSION = frameworkVersion;
66
- const config = await loadVefConfig(options.config, "serve", mode);
67
- const server = await createServer({
68
- ...config,
69
- mode,
70
- configFile: false,
71
- logLevel: "info"
72
- });
73
- await server.listen();
74
- server.printUrls();
75
- server.bindCLIShortcuts({ print: true });
76
- } catch (e) {
77
- handleError("dev server startup", e);
78
- }
79
- });
80
- program.command("build").description("Build for production").option("-c, --config <file>", "Specify vef config file", "vef.config.ts").action(async (options) => {
81
- try {
82
- const mode = resolveEnvMode("build", program.opts().mode);
83
- process.env.NODE_ENV = mode;
84
- process.env.VEF_FRAMEWORK_VERSION = frameworkVersion;
85
- const config = await loadVefConfig(options.config, "build", mode);
86
- await build({
87
- ...config,
88
- mode,
89
- configFile: false,
90
- logLevel: "info"
91
- });
92
- consola.success("Build completed successfully!");
93
- } catch (e) {
94
- handleError("build", e);
95
- }
96
- });
97
- program.command("preview").description("Preview the build").option("-c, --config <file>", "Specify vef config file", "vef.config.ts").action(async (options) => {
98
- try {
99
- const mode = resolveEnvMode("build", program.opts().mode);
100
- process.env.NODE_ENV = mode;
101
- process.env.VEF_FRAMEWORK_VERSION = frameworkVersion;
102
- const config = await loadVefConfig(options.config, "build", mode);
103
- const server = await preview({
104
- ...config,
105
- mode,
106
- configFile: false,
107
- logLevel: "info"
108
- });
109
- server.printUrls();
110
- server.bindCLIShortcuts({ print: true });
111
- } catch (e) {
112
- handleError("preview server startup", e);
113
- }
114
- });
115
- program.command("prepare").description("Sets up the project for development mode").action(async () => {
116
- if (!await exists(resolve(currentDir, ".husky"))) {
117
- (await import('husky')).default();
118
- consola.success("Successfully set up husky");
119
- }
120
- if (!await exists(resolve(currentDir, ".husky/pre-commit"))) {
121
- await writeFile(
122
- resolve(currentDir, ".husky/pre-commit"),
123
- "pnpm dlx lint-staged"
124
- );
125
- consola.success("Successfully set up pre-commit hook");
126
- }
127
- if (!await exists(resolve(currentDir, ".husky/commit-msg"))) {
128
- await writeFile(
129
- resolve(currentDir, ".husky/commit-msg"),
130
- "pnpm dlx commitlint --edit $1"
131
- );
132
- consola.success("Successfully set up commit-msg hook");
133
- }
134
- const packageJson = await readJson(resolve(currentDir, "package.json"), { encoding: "utf-8" });
135
- const { scripts } = packageJson;
136
- let changed = false;
137
- if (!scripts.prepare) {
138
- scripts.prepare = "vef prepare";
139
- changed = true;
140
- }
141
- if (changed) {
142
- await writeJson(
143
- resolve(currentDir, "package.json"),
144
- packageJson,
145
- {
146
- encoding: "utf-8",
147
- spaces: 2
148
- }
149
- );
150
- consola.success("Successfully set up prepare script and lint-staged");
151
- }
152
- });
153
- program.command("install").description("Install the dependencies of the project").action(async () => {
154
- const hoistedPatterns = await importHoistPatterns();
155
- await execa({
156
- cwd: currentDir,
157
- stdio: "inherit"
158
- })("pnpm", ["install", ...hoistedPatterns.flatMap((pattern) => ["--public-hoist-pattern", pattern])]);
159
- });
160
- program.command("update").description("Update the dependencies of the vef framework to latest version").action(async () => {
161
- await execa({
162
- cwd: currentDir,
163
- stdio: "inherit"
164
- })("pnpm", ["update", "@vef-framework/*"]);
165
- });
166
- program.command("init").description("Initialize an empty VEF project").action(async () => {
167
- console.log(chalk.blue("Welcome to use the cli tool of VEF Framework\n"));
168
- const result = await prompts([
169
- {
170
- type: "text",
171
- name: "appName",
172
- message: "What is the name of your app?",
173
- validate: (value) => typeof value === "string" && value.trim().length > 0 ? true : "App name is required"
174
- },
175
- {
176
- type: "text",
177
- name: "appTitle",
178
- message: "What is the title of your app?",
179
- validate: (value) => typeof value === "string" && value.trim().length > 0 ? true : "App title is required"
180
- }
181
- ]);
182
- const { appName, appTitle } = result;
183
- await copy(resolve(import.meta.dirname, "../template"), resolve(currentDir, appName));
184
- consola.success("Successfully copied template files");
185
- await move(resolve(currentDir, appName, "_gitignore"), resolve(currentDir, appName, ".gitignore"));
186
- await move(resolve(currentDir, appName, "_tsconfig.json"), resolve(currentDir, appName, "tsconfig.json"));
187
- await move(resolve(currentDir, appName, "_package.json"), resolve(currentDir, appName, "package.json"));
188
- const packageJson = await readJson(resolve(currentDir, appName, "package.json"), { encoding: "utf-8" });
189
- packageJson.name = appName;
190
- await writeJson(resolve(currentDir, appName, "package.json"), packageJson, {
191
- encoding: "utf-8",
192
- spaces: 2
193
- });
194
- consola.success("Successfully replaced name and title in package.json");
195
- const envContent = await readFile(resolve(currentDir, appName, "env/.env"), { encoding: "utf-8" });
196
- const replacedEnvContent = envContent.replace(/APP_NAME=.*$/m, `APP_NAME=${appName}`).replace(/APP_TITLE=.*$/m, `APP_TITLE=${appTitle}`);
197
- await writeFile(resolve(currentDir, appName, "env/.env"), replacedEnvContent);
198
- consola.success("Successfully replaced name and title in .env file");
199
- const spinner = ora("Initializing git repository...").start();
200
- try {
201
- await execa`git --version`;
202
- await execa({
203
- cwd: resolve(currentDir, appName)
204
- })`git init`;
205
- spinner.succeed("Successfully initialized git repository");
206
- } catch (e) {
207
- spinner.fail("Failed to initialize git repository");
208
- handleError("init", e);
209
- }
210
- spinner.start("Installing dependencies...");
211
- try {
212
- const hoistedPatterns = await importHoistPatterns();
213
- await execa({
214
- cwd: resolve(currentDir, appName)
215
- })("pnpm", ["install", ...hoistedPatterns.flatMap((pattern) => ["--public-hoist-pattern", pattern])]);
216
- spinner.succeed("Successfully installed dependencies");
217
- } catch (e) {
218
- spinner.fail("Failed to install dependencies");
219
- handleError("init", e);
220
- }
221
- consola.success(chalk.green("\nšŸŽ‰šŸŽ‰šŸŽ‰ VEF project created successfully !"));
222
- console.log(chalk.blue("\n✨ Next steps:"));
223
- console.log(chalk.cyan(` cd ${appName}`));
224
- console.log(chalk.cyan(` pnpm dev`));
225
- });
226
- program.parse();
2
+ import p from"chalk";import{program as c}from"commander";import r from"consola";import{execa as m}from"execa";import V from"fs-extra";import{resolve as t}from"node:path";import l from"node:process";import _ from"ora";import N from"prompts";import{loadConfigFromFile as j,createServer as I,build as A,preview as x}from"vite";const{exists:g,readJsonSync:O,writeFile:w,readJson:E,writeJson:F,copy:$,readFile:P,move:y}=V,i=l.cwd();function R(){const o=t(import.meta.dirname,"../package.json");return O(o,{encoding:"utf-8"}).version}const f=R();async function k(){return(await import("../bin/hoist-patterns.js")).default}function v(o,e){return e||(o==="build"?"production":"development")}async function h(o,e,a){const n=t(i,o||"vef.config.ts");if(!await g(n))throw r.error(`Config file not found: ${n}, it is required for VEF Framework`),new Error(`Config file not found: ${n}`);return(await j({command:e,mode:a},n))?.config??{}}function u(o,e){r.error(`Error during ${o}:`,e),l.exit(1)}c.name("vef").description(p.magenta("VEF Framework CLI")).addHelpText("before",p.blue("VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus.")).addHelpText("before",p.bgGreenBright(`Version: ${f}`)).version(f).option("--mode <mode>","Specify running mode (will override default NODE_ENV)"),c.command("dev").description("Start dev server").option("-c, --config <file>","Specify vef config file","vef.config.ts").action(async o=>{try{const e=v("serve",c.opts().mode);l.env.NODE_ENV=e,l.env.VEF_FRAMEWORK_VERSION=f;const a=await h(o.config,"serve",e),n=await I({...a,mode:e,configFile:!1,logLevel:"info"});await n.listen(),n.printUrls(),n.bindCLIShortcuts({print:!0})}catch(e){u("dev server startup",e)}}),c.command("build").description("Build for production").option("-c, --config <file>","Specify vef config file","vef.config.ts").action(async o=>{try{const e=v("build",c.opts().mode);l.env.NODE_ENV=e,l.env.VEF_FRAMEWORK_VERSION=f;const a=await h(o.config,"build",e);await A({...a,mode:e,configFile:!1,logLevel:"info"}),r.success("Build completed successfully!")}catch(e){u("build",e)}}),c.command("preview").description("Preview the build").option("-c, --config <file>","Specify vef config file","vef.config.ts").action(async o=>{try{const e=v("build",c.opts().mode);l.env.NODE_ENV=e,l.env.VEF_FRAMEWORK_VERSION=f;const a=await h(o.config,"build",e),n=await x({...a,mode:e,configFile:!1,logLevel:"info"});n.printUrls(),n.bindCLIShortcuts({print:!0})}catch(e){u("preview server startup",e)}}),c.command("prepare").description("Sets up the project for development mode").action(async()=>{await g(t(i,".husky"))||((await import("husky")).default(),r.success("Successfully set up husky")),await g(t(i,".husky/pre-commit"))||(await w(t(i,".husky/pre-commit"),"pnpm dlx lint-staged"),r.success("Successfully set up pre-commit hook")),await g(t(i,".husky/commit-msg"))||(await w(t(i,".husky/commit-msg"),"pnpm dlx commitlint --edit $1"),r.success("Successfully set up commit-msg hook"));const o=await E(t(i,"package.json"),{encoding:"utf-8"}),{scripts:e}=o;let a=!1;e.prepare||(e.prepare="vef prepare",a=!0),a&&(await F(t(i,"package.json"),o,{encoding:"utf-8",spaces:2}),r.success("Successfully set up prepare script and lint-staged"))}),c.command("install").description("Install the dependencies of the project").action(async()=>{const o=await k();await m({cwd:i,stdio:"inherit"})("pnpm",["install",...o.flatMap(e=>["--public-hoist-pattern",e])])}),c.command("update").description("Update the dependencies of the vef framework to latest version").action(async()=>{await m({cwd:i,stdio:"inherit"})("pnpm",["update","@vef-framework/*"])}),c.command("init").description("Initialize an empty VEF project").action(async()=>{console.log(p.blue(`Welcome to use the cli tool of VEF Framework
3
+ `));const o=await N([{type:"text",name:"appName",message:"What is the name of your app?",validate:s=>typeof s=="string"&&s.trim().length>0?!0:"App name is required"},{type:"text",name:"appTitle",message:"What is the title of your app?",validate:s=>typeof s=="string"&&s.trim().length>0?!0:"App title is required"}]),{appName:e,appTitle:a}=o;await $(t(import.meta.dirname,"../template"),t(i,e)),r.success("Successfully copied template files"),await y(t(i,e,"_gitignore"),t(i,e,".gitignore")),await y(t(i,e,"_tsconfig.json"),t(i,e,"tsconfig.json")),await y(t(i,e,"_package.json"),t(i,e,"package.json"));const n=await E(t(i,e,"package.json"),{encoding:"utf-8"});n.name=e,await F(t(i,e,"package.json"),n,{encoding:"utf-8",spaces:2}),r.success("Successfully replaced name and title in package.json");const S=(await P(t(i,e,"env/.env"),{encoding:"utf-8"})).replace(/APP_NAME=.*$/m,`APP_NAME=${e}`).replace(/APP_TITLE=.*$/m,`APP_TITLE=${a}`);await w(t(i,e,"env/.env"),S),r.success("Successfully replaced name and title in .env file");const d=_("Initializing git repository...").start();try{await m`git --version`,await m({cwd:t(i,e)})`git init`,d.succeed("Successfully initialized git repository")}catch(s){d.fail("Failed to initialize git repository"),u("init",s)}d.start("Installing dependencies...");try{const s=await k();await m({cwd:t(i,e)})("pnpm",["install",...s.flatMap(b=>["--public-hoist-pattern",b])]),d.succeed("Successfully installed dependencies")}catch(s){d.fail("Failed to install dependencies"),u("init",s)}r.success(p.green(`
4
+ šŸŽ‰šŸŽ‰šŸŽ‰ VEF project created successfully !`)),console.log(p.blue(`
5
+ ✨ Next steps:`)),console.log(p.cyan(` cd ${e}`)),console.log(p.cyan(" pnpm dev"))}),c.parse();