@betterstart/cli 0.1.3 → 0.1.5
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/README.md +133 -0
- package/dist/cli.d.ts +1 -9
- package/dist/cli.js +13585 -367
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +24 -266
- package/dist/index.js +4 -11378
- package/dist/index.js.map +1 -1
- package/package.json +29 -42
- package/templates/schema.json +959 -0
- package/templates/tiptap/hooks/use-composed-ref.ts +43 -0
- package/templates/tiptap/hooks/use-cursor-visibility.ts +68 -0
- package/templates/tiptap/hooks/use-element-rect.ts +166 -0
- package/templates/tiptap/hooks/use-is-breakpoint.ts +32 -0
- package/templates/tiptap/hooks/use-menu-navigation.ts +182 -0
- package/templates/tiptap/hooks/use-scrolling.ts +64 -0
- package/templates/tiptap/hooks/use-throttled-callback.ts +146 -0
- package/templates/tiptap/hooks/use-tiptap-editor.ts +46 -0
- package/templates/tiptap/hooks/use-unmount.ts +21 -0
- package/templates/tiptap/hooks/use-window-size.ts +87 -0
- package/templates/tiptap/lib/tiptap-utils.ts +587 -0
- package/templates/tiptap/styles/_keyframe-animations.scss +91 -0
- package/templates/tiptap/styles/_variables.scss +296 -0
- package/templates/tiptap/tiptap-extension/node-background-extension.ts +138 -0
- package/templates/tiptap/tiptap-icons/align-center-icon.tsx +38 -0
- package/templates/tiptap/tiptap-icons/align-justify-icon.tsx +38 -0
- package/templates/tiptap/tiptap-icons/align-left-icon.tsx +38 -0
- package/templates/tiptap/tiptap-icons/align-right-icon.tsx +38 -0
- package/templates/tiptap/tiptap-icons/arrow-left-icon.tsx +24 -0
- package/templates/tiptap/tiptap-icons/ban-icon.tsx +26 -0
- package/templates/tiptap/tiptap-icons/blockquote-icon.tsx +44 -0
- package/templates/tiptap/tiptap-icons/bold-icon.tsx +26 -0
- package/templates/tiptap/tiptap-icons/chevron-down-icon.tsx +26 -0
- package/templates/tiptap/tiptap-icons/close-icon.tsx +24 -0
- package/templates/tiptap/tiptap-icons/code-block-icon.tsx +38 -0
- package/templates/tiptap/tiptap-icons/code2-icon.tsx +32 -0
- package/templates/tiptap/tiptap-icons/corner-down-left-icon.tsx +26 -0
- package/templates/tiptap/tiptap-icons/external-link-icon.tsx +28 -0
- package/templates/tiptap/tiptap-icons/heading-five-icon.tsx +28 -0
- package/templates/tiptap/tiptap-icons/heading-four-icon.tsx +28 -0
- package/templates/tiptap/tiptap-icons/heading-icon.tsx +24 -0
- package/templates/tiptap/tiptap-icons/heading-one-icon.tsx +28 -0
- package/templates/tiptap/tiptap-icons/heading-six-icon.tsx +30 -0
- package/templates/tiptap/tiptap-icons/heading-three-icon.tsx +36 -0
- package/templates/tiptap/tiptap-icons/heading-two-icon.tsx +28 -0
- package/templates/tiptap/tiptap-icons/highlighter-icon.tsx +26 -0
- package/templates/tiptap/tiptap-icons/image-plus-icon.tsx +26 -0
- package/templates/tiptap/tiptap-icons/italic-icon.tsx +24 -0
- package/templates/tiptap/tiptap-icons/link-icon.tsx +28 -0
- package/templates/tiptap/tiptap-icons/list-icon.tsx +56 -0
- package/templates/tiptap/tiptap-icons/list-ordered-icon.tsx +56 -0
- package/templates/tiptap/tiptap-icons/list-todo-icon.tsx +50 -0
- package/templates/tiptap/tiptap-icons/moon-star-icon.tsx +30 -0
- package/templates/tiptap/tiptap-icons/redo2-icon.tsx +26 -0
- package/templates/tiptap/tiptap-icons/strike-icon.tsx +28 -0
- package/templates/tiptap/tiptap-icons/subscript-icon.tsx +38 -0
- package/templates/tiptap/tiptap-icons/sun-icon.tsx +58 -0
- package/templates/tiptap/tiptap-icons/superscript-icon.tsx +38 -0
- package/templates/tiptap/tiptap-icons/trash-icon.tsx +26 -0
- package/templates/tiptap/tiptap-icons/underline-icon.tsx +26 -0
- package/templates/tiptap/tiptap-icons/undo2-icon.tsx +26 -0
- package/templates/tiptap/tiptap-node/blockquote-node/blockquote-node.scss +37 -0
- package/templates/tiptap/tiptap-node/code-block-node/code-block-node.scss +54 -0
- package/templates/tiptap/tiptap-node/heading-node/heading-node.scss +45 -0
- package/templates/tiptap/tiptap-node/horizontal-rule-node/horizontal-rule-node-extension.ts +10 -0
- package/templates/tiptap/tiptap-node/horizontal-rule-node/horizontal-rule-node.scss +25 -0
- package/templates/tiptap/tiptap-node/image-node/image-node.scss +35 -0
- package/templates/tiptap/tiptap-node/image-upload-node/image-upload-node-extension.ts +154 -0
- package/templates/tiptap/tiptap-node/image-upload-node/image-upload-node.scss +249 -0
- package/templates/tiptap/tiptap-node/image-upload-node/image-upload-node.tsx +522 -0
- package/templates/tiptap/tiptap-node/image-upload-node/index.tsx +1 -0
- package/templates/tiptap/tiptap-node/list-node/list-node.scss +208 -0
- package/templates/tiptap/tiptap-node/paragraph-node/paragraph-node.scss +273 -0
- package/templates/tiptap/tiptap-ui/blockquote-button/blockquote-button.tsx +104 -0
- package/templates/tiptap/tiptap-ui/blockquote-button/index.tsx +2 -0
- package/templates/tiptap/tiptap-ui/blockquote-button/use-blockquote.ts +252 -0
- package/templates/tiptap/tiptap-ui/code-block-button/code-block-button.tsx +106 -0
- package/templates/tiptap/tiptap-ui/code-block-button/index.tsx +2 -0
- package/templates/tiptap/tiptap-ui/code-block-button/use-code-block.ts +261 -0
- package/templates/tiptap/tiptap-ui/color-highlight-button/color-highlight-button.scss +49 -0
- package/templates/tiptap/tiptap-ui/color-highlight-button/color-highlight-button.tsx +153 -0
- package/templates/tiptap/tiptap-ui/color-highlight-button/index.tsx +2 -0
- package/templates/tiptap/tiptap-ui/color-highlight-button/use-color-highlight.ts +345 -0
- package/templates/tiptap/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx +207 -0
- package/templates/tiptap/tiptap-ui/color-highlight-popover/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui/heading-button/heading-button.tsx +107 -0
- package/templates/tiptap/tiptap-ui/heading-button/index.tsx +2 -0
- package/templates/tiptap/tiptap-ui/heading-button/use-heading.ts +314 -0
- package/templates/tiptap/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.tsx +131 -0
- package/templates/tiptap/tiptap-ui/heading-dropdown-menu/index.tsx +2 -0
- package/templates/tiptap/tiptap-ui/heading-dropdown-menu/use-heading-dropdown-menu.ts +130 -0
- package/templates/tiptap/tiptap-ui/image-upload-button/image-upload-button.tsx +114 -0
- package/templates/tiptap/tiptap-ui/image-upload-button/index.tsx +2 -0
- package/templates/tiptap/tiptap-ui/image-upload-button/use-image-upload.ts +192 -0
- package/templates/tiptap/tiptap-ui/link-popover/index.tsx +2 -0
- package/templates/tiptap/tiptap-ui/link-popover/link-popover.tsx +285 -0
- package/templates/tiptap/tiptap-ui/link-popover/use-link-popover.ts +286 -0
- package/templates/tiptap/tiptap-ui/list-button/index.tsx +2 -0
- package/templates/tiptap/tiptap-ui/list-button/list-button.tsx +108 -0
- package/templates/tiptap/tiptap-ui/list-button/use-list.ts +329 -0
- package/templates/tiptap/tiptap-ui/list-dropdown-menu/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui/list-dropdown-menu/list-dropdown-menu.tsx +123 -0
- package/templates/tiptap/tiptap-ui/list-dropdown-menu/use-list-dropdown-menu.ts +203 -0
- package/templates/tiptap/tiptap-ui/mark-button/index.tsx +2 -0
- package/templates/tiptap/tiptap-ui/mark-button/mark-button.tsx +107 -0
- package/templates/tiptap/tiptap-ui/mark-button/use-mark.ts +206 -0
- package/templates/tiptap/tiptap-ui/text-align-button/index.tsx +2 -0
- package/templates/tiptap/tiptap-ui/text-align-button/text-align-button.tsx +118 -0
- package/templates/tiptap/tiptap-ui/text-align-button/use-text-align.ts +212 -0
- package/templates/tiptap/tiptap-ui/undo-redo-button/index.tsx +2 -0
- package/templates/tiptap/tiptap-ui/undo-redo-button/undo-redo-button.tsx +105 -0
- package/templates/tiptap/tiptap-ui/undo-redo-button/use-undo-redo.ts +173 -0
- package/templates/tiptap/tiptap-ui-primitive/badge/badge-colors.scss +395 -0
- package/templates/tiptap/tiptap-ui-primitive/badge/badge-group.scss +16 -0
- package/templates/tiptap/tiptap-ui-primitive/badge/badge.scss +99 -0
- package/templates/tiptap/tiptap-ui-primitive/badge/badge.tsx +46 -0
- package/templates/tiptap/tiptap-ui-primitive/badge/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui-primitive/button/button-colors.scss +429 -0
- package/templates/tiptap/tiptap-ui-primitive/button/button-group.scss +22 -0
- package/templates/tiptap/tiptap-ui-primitive/button/button.scss +314 -0
- package/templates/tiptap/tiptap-ui-primitive/button/button.tsx +102 -0
- package/templates/tiptap/tiptap-ui-primitive/button/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui-primitive/card/card.scss +77 -0
- package/templates/tiptap/tiptap-ui-primitive/card/card.tsx +59 -0
- package/templates/tiptap/tiptap-ui-primitive/card/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss +63 -0
- package/templates/tiptap/tiptap-ui-primitive/dropdown-menu/dropdown-menu.tsx +95 -0
- package/templates/tiptap/tiptap-ui-primitive/dropdown-menu/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui-primitive/input/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui-primitive/input/input.scss +45 -0
- package/templates/tiptap/tiptap-ui-primitive/input/input.tsx +18 -0
- package/templates/tiptap/tiptap-ui-primitive/popover/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui-primitive/popover/popover.scss +63 -0
- package/templates/tiptap/tiptap-ui-primitive/popover/popover.tsx +33 -0
- package/templates/tiptap/tiptap-ui-primitive/separator/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui-primitive/separator/separator.scss +23 -0
- package/templates/tiptap/tiptap-ui-primitive/separator/separator.tsx +33 -0
- package/templates/tiptap/tiptap-ui-primitive/spacer/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui-primitive/spacer/spacer.tsx +21 -0
- package/templates/tiptap/tiptap-ui-primitive/toolbar/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui-primitive/toolbar/toolbar.scss +98 -0
- package/templates/tiptap/tiptap-ui-primitive/toolbar/toolbar.tsx +113 -0
- package/templates/tiptap/tiptap-ui-primitive/tooltip/index.tsx +1 -0
- package/templates/tiptap/tiptap-ui-primitive/tooltip/tooltip.scss +43 -0
- package/templates/tiptap/tiptap-ui-primitive/tooltip/tooltip.tsx +223 -0
- package/templates/ui/accordion.tsx +52 -0
- package/templates/ui/alert-dialog.tsx +116 -0
- package/templates/ui/alert.tsx +48 -0
- package/templates/ui/aspect-ratio.tsx +7 -0
- package/templates/ui/avatar.tsx +46 -0
- package/templates/ui/badge.tsx +32 -0
- package/templates/ui/breadcrumb.tsx +98 -0
- package/templates/ui/button-group.tsx +77 -0
- package/templates/ui/button.tsx +48 -0
- package/templates/ui/calendar.tsx +176 -0
- package/templates/ui/card.tsx +54 -0
- package/templates/ui/carousel.tsx +234 -0
- package/templates/ui/chart.tsx +349 -0
- package/templates/ui/checkbox.tsx +27 -0
- package/templates/ui/collapsible.tsx +11 -0
- package/templates/ui/command.tsx +142 -0
- package/templates/ui/context-menu.tsx +188 -0
- package/templates/ui/curriculum-editor.tsx +601 -0
- package/templates/ui/date-picker.tsx +70 -0
- package/templates/ui/dialog.tsx +103 -0
- package/templates/ui/drawer.tsx +99 -0
- package/templates/ui/dropdown-menu.tsx +185 -0
- package/templates/ui/dynamic-list-field.tsx +95 -0
- package/templates/ui/empty.tsx +90 -0
- package/templates/ui/field.tsx +231 -0
- package/templates/ui/file-upload-example.tsx +113 -0
- package/templates/ui/form.tsx +172 -0
- package/templates/ui/hover-card.tsx +28 -0
- package/templates/ui/icon-picker.tsx +435 -0
- package/templates/ui/icons-data.ts +6 -0
- package/templates/ui/image-upload-field.tsx +360 -0
- package/templates/ui/input-group.tsx +160 -0
- package/templates/ui/input-otp.tsx +70 -0
- package/templates/ui/input.tsx +21 -0
- package/templates/ui/item.tsx +171 -0
- package/templates/ui/kbd.tsx +28 -0
- package/templates/ui/label.tsx +20 -0
- package/templates/ui/logo.tsx +113 -0
- package/templates/ui/markdown-editor.tsx +303 -0
- package/templates/ui/markdown-utils.ts +128 -0
- package/templates/ui/media-upload-field.tsx +255 -0
- package/templates/ui/menubar.tsx +230 -0
- package/templates/ui/navigation-menu.tsx +119 -0
- package/templates/ui/pagination.tsx +96 -0
- package/templates/ui/placeholder.tsx +25 -0
- package/templates/ui/popover.tsx +32 -0
- package/templates/ui/progress.tsx +24 -0
- package/templates/ui/radio-group.tsx +37 -0
- package/templates/ui/resizable.tsx +41 -0
- package/templates/ui/rich-text-editor.tsx +374 -0
- package/templates/ui/scroll-area.tsx +45 -0
- package/templates/ui/select.tsx +151 -0
- package/templates/ui/separator.tsx +25 -0
- package/templates/ui/sheet.tsx +120 -0
- package/templates/ui/sidebar.tsx +687 -0
- package/templates/ui/skeleton.tsx +7 -0
- package/templates/ui/slider.tsx +24 -0
- package/templates/ui/sonner.tsx +29 -0
- package/templates/ui/spinner.tsx +15 -0
- package/templates/ui/switch.tsx +28 -0
- package/templates/ui/table.tsx +93 -0
- package/templates/ui/tabs.tsx +54 -0
- package/templates/ui/textarea.tsx +20 -0
- package/templates/ui/toast.tsx +127 -0
- package/templates/ui/toggle-group.tsx +56 -0
- package/templates/ui/toggle.tsx +43 -0
- package/templates/ui/tooltip.tsx +31 -0
- package/templates/ui/use-mobile.tsx +19 -0
- package/templates/ui/video-upload-field.tsx +368 -0
- package/dist/chunk-EIH4RRIJ.js +0 -183
- package/dist/chunk-EIH4RRIJ.js.map +0 -1
- package/dist/chunk-NKRQYAS6.js +0 -260
- package/dist/chunk-NKRQYAS6.js.map +0 -1
- package/dist/chunk-QLVSHP7X.js +0 -235
- package/dist/chunk-QLVSHP7X.js.map +0 -1
- package/dist/chunk-WY6BC55D.js +0 -357
- package/dist/chunk-WY6BC55D.js.map +0 -1
- package/dist/config/index.d.ts +0 -93
- package/dist/config/index.js +0 -58
- package/dist/config/index.js.map +0 -1
- package/dist/core/index.d.ts +0 -415
- package/dist/core/index.js +0 -906
- package/dist/core/index.js.map +0 -1
- package/dist/import-resolver-BaZ-rzkH.d.ts +0 -123
- package/dist/logger-awLb347n.d.ts +0 -81
- package/dist/plugins/index.d.ts +0 -213
- package/dist/plugins/index.js +0 -365
- package/dist/plugins/index.js.map +0 -1
- package/dist/types-ByX_gl6y.d.ts +0 -232
- package/dist/types-eI549DEG.d.ts +0 -331
package/dist/index.d.ts
CHANGED
|
@@ -1,272 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import './logger-awLb347n.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Generate server actions file in packages/lib/src/actions/
|
|
11
|
-
*/
|
|
12
|
-
declare function generateActions(schema: Schema, options: GeneratorOptions): Promise<string>;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Generate all cache files based on all schemas
|
|
16
|
-
*/
|
|
17
|
-
declare function generateCache(_schema: Schema, _options: GeneratorOptions): Promise<string[]>;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Generate columns file
|
|
21
|
-
*/
|
|
22
|
-
declare function generateColumns(schema: Schema, options: GeneratorOptions): Promise<string>;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Generate create page component
|
|
26
|
-
*/
|
|
27
|
-
declare function generateCreatePage(schema: Schema, options: GeneratorOptions): Promise<string>;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Generate database schema and migration files
|
|
31
|
-
*/
|
|
32
|
-
declare function generateDatabase(schema: Schema, options: GeneratorOptions): Promise<string[]>;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Generate edit page component
|
|
36
|
-
*/
|
|
37
|
-
declare function generateEditPage(schema: Schema, options: GeneratorOptions): Promise<string>;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Generate email template for form submission notifications
|
|
41
|
-
*/
|
|
42
|
-
declare function generateEmailTemplate(schema: FormSchema, options?: GeneratorOptions): Promise<string | null>;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Generate form component
|
|
46
|
-
*/
|
|
47
|
-
declare function generateForm$1(schema: Schema, options: GeneratorOptions): Promise<string>;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Generate admin page for form submissions
|
|
51
|
-
*/
|
|
52
|
-
declare function generateFormAdminPages(schema: FormSchema, _options: GeneratorOptions): Promise<void>;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Generate database schema for form submissions
|
|
56
|
-
*/
|
|
57
|
-
declare function generateFormDatabase(schema: FormSchema, options?: GeneratorOptions): Promise<string>;
|
|
58
|
-
/**
|
|
59
|
-
* Generate server actions for form submissions
|
|
60
|
-
*/
|
|
61
|
-
declare function generateFormActions(schema: FormSchema, options?: GeneratorOptions): Promise<string>;
|
|
62
|
-
/**
|
|
63
|
-
* Generate React Query hook for form submissions
|
|
64
|
-
*/
|
|
65
|
-
declare function generateFormHook(schema: FormSchema, options?: GeneratorOptions): Promise<string>;
|
|
66
|
-
/**
|
|
67
|
-
* Generate public form component (supports both single-step and multi-step)
|
|
68
|
-
*/
|
|
69
|
-
declare function generateFormComponent(schema: FormSchema, options?: GeneratorOptions): Promise<string>;
|
|
70
|
-
/**
|
|
71
|
-
* Main form generation orchestrator
|
|
72
|
-
*/
|
|
73
|
-
declare function generateForm(formName: string, options?: GeneratorOptions): Promise<void>;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Update navigation.ts to include form submission item in Forms group
|
|
77
|
-
*/
|
|
78
|
-
declare function updateFormNavigation(schema: FormSchema, options: GeneratorOptions): Promise<void>;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Generate React Query hooks in packages/hooks/src/
|
|
82
|
-
*/
|
|
83
|
-
declare function generateHook(schema: Schema, options: GeneratorOptions): Promise<string>;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Update navigation.ts to include new menu item
|
|
87
|
-
*/
|
|
88
|
-
declare function updateNavigation(schema: Schema, options: GeneratorOptions): Promise<void>;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Generate page component
|
|
92
|
-
*/
|
|
93
|
-
declare function generatePage(schema: Schema, options: GeneratorOptions): Promise<string>;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Generate page content component (client component with state management)
|
|
97
|
-
*/
|
|
98
|
-
declare function generatePageContent(schema: Schema, options: GeneratorOptions): Promise<string>;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Ensure fields have an ID field - automatically injects one if not present
|
|
102
|
-
*/
|
|
103
|
-
declare function ensureIdField(fields: SchemaField[]): SchemaField[];
|
|
104
|
-
/**
|
|
105
|
-
* Flatten group and tabs fields into individual fields for database operations
|
|
106
|
-
* Automatically ensures an ID field exists
|
|
107
|
-
*/
|
|
108
|
-
declare function flattenFields(fields: SchemaField[]): SchemaField[];
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Generate table component
|
|
112
|
-
*/
|
|
113
|
-
declare function generateTable(schema: Schema, options: GeneratorOptions): Promise<string>;
|
|
114
|
-
|
|
115
|
-
interface RegistryFile {
|
|
116
|
-
path: string;
|
|
117
|
-
content: string;
|
|
118
|
-
type?: string;
|
|
119
|
-
target?: string;
|
|
1
|
+
interface BetterstartPaths {
|
|
2
|
+
cms: string;
|
|
3
|
+
schemas: string;
|
|
4
|
+
pages: string;
|
|
5
|
+
login: string;
|
|
6
|
+
api: string;
|
|
120
7
|
}
|
|
121
|
-
interface
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
dependencies?: string[];
|
|
125
|
-
devDependencies?: string[];
|
|
126
|
-
registryDependencies?: string[];
|
|
127
|
-
files: RegistryFile[];
|
|
128
|
-
cssVars?: Record<string, Record<string, string>>;
|
|
129
|
-
tailwind?: {
|
|
130
|
-
config?: Record<string, unknown>;
|
|
131
|
-
};
|
|
8
|
+
interface BetterstartDatabase {
|
|
9
|
+
provider: 'neon';
|
|
10
|
+
migrationsDir: string;
|
|
132
11
|
}
|
|
133
|
-
interface
|
|
134
|
-
|
|
135
|
-
type: string;
|
|
136
|
-
registryDependencies?: string[];
|
|
137
|
-
dependencies?: string[];
|
|
138
|
-
files?: Array<{
|
|
139
|
-
path: string;
|
|
140
|
-
type: string;
|
|
141
|
-
}>;
|
|
12
|
+
interface BetterstartFeatures {
|
|
13
|
+
email: boolean;
|
|
142
14
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
skipMissing?: boolean;
|
|
148
|
-
target?: TargetPackage;
|
|
15
|
+
interface BetterstartGenerated {
|
|
16
|
+
entities: string[];
|
|
17
|
+
singles: string[];
|
|
18
|
+
forms: string[];
|
|
149
19
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
20
|
+
interface BetterstartConfig {
|
|
21
|
+
srcDir: boolean;
|
|
22
|
+
paths: BetterstartPaths;
|
|
23
|
+
database: BetterstartDatabase;
|
|
24
|
+
features: BetterstartFeatures;
|
|
25
|
+
linter: 'biome' | 'eslint' | 'none';
|
|
26
|
+
generated: BetterstartGenerated;
|
|
154
27
|
}
|
|
155
|
-
declare
|
|
156
|
-
declare const DEFAULT_TARGET: TargetPackage;
|
|
157
|
-
|
|
158
|
-
declare const listComponents: () => Promise<void>;
|
|
159
|
-
declare const addComponents: (componentNames: string[], options?: AddComponentOptions) => Promise<void>;
|
|
160
|
-
declare const addAllComponents: (options?: AddComponentOptions) => Promise<void>;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Update the components index.ts to include exports for new components
|
|
164
|
-
*/
|
|
165
|
-
declare const updateExports: (componentNames: string[], target?: TargetPackage) => void;
|
|
166
|
-
/**
|
|
167
|
-
* Check if an export already exists
|
|
168
|
-
*/
|
|
169
|
-
declare const exportExists: (componentName: string, target?: TargetPackage) => boolean;
|
|
170
|
-
|
|
171
|
-
declare const fetchComponent: (name: string) => Promise<RegistryItem>;
|
|
172
|
-
declare const tryFetchComponent: (name: string) => Promise<RegistryItem | null>;
|
|
173
|
-
declare const fetchIndex: () => Promise<RegistryIndex>;
|
|
174
|
-
declare const resolveRegistryDeps: (names: string[], seen?: Set<string>, options?: {
|
|
175
|
-
skipMissing?: boolean;
|
|
176
|
-
}) => Promise<RegistryItem[]>;
|
|
177
|
-
declare const getAvailableComponents: () => Promise<string[]>;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Transform shadcn component source code for project compatibility
|
|
181
|
-
*/
|
|
182
|
-
declare const transformSource: (content: string) => string;
|
|
183
|
-
/**
|
|
184
|
-
* Extract the component file name from registry path
|
|
185
|
-
*/
|
|
186
|
-
declare const extractFileName: (registryPath: string) => string;
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Initialize paths for the monorepo
|
|
190
|
-
* Detects monorepo root and sets up all package paths
|
|
191
|
-
*/
|
|
192
|
-
declare function initPaths(startDir?: string): MonorepoPaths;
|
|
193
|
-
/**
|
|
194
|
-
* Set pre-resolved paths (e.g., from config-based resolution)
|
|
195
|
-
* This allows the CLI to seed paths from the config system
|
|
196
|
-
* so that generators work in both monorepo and standalone projects.
|
|
197
|
-
*/
|
|
198
|
-
declare function setPaths(paths: MonorepoPaths): void;
|
|
199
|
-
/**
|
|
200
|
-
* Get monorepo paths (must call initPaths or setPaths first)
|
|
201
|
-
*/
|
|
202
|
-
declare function getPaths(): MonorepoPaths;
|
|
203
|
-
/**
|
|
204
|
-
* Get the monorepo root directory
|
|
205
|
-
* @deprecated Use getPaths().root instead
|
|
206
|
-
*/
|
|
207
|
-
declare function getProjectRoot(): string;
|
|
208
|
-
/**
|
|
209
|
-
* Initialize the import resolver from config
|
|
210
|
-
*/
|
|
211
|
-
declare function initImportResolver(config: BetterstartConfig): ImportResolver;
|
|
212
|
-
/**
|
|
213
|
-
* Get the import resolver (must call initImportResolver first, or falls back to monorepo defaults)
|
|
214
|
-
*/
|
|
215
|
-
declare function getImportResolver(): ImportResolver;
|
|
216
|
-
/**
|
|
217
|
-
* Convert a string to PascalCase
|
|
218
|
-
*/
|
|
219
|
-
declare function toPascalCase(str: string): string;
|
|
220
|
-
/**
|
|
221
|
-
* Convert a string to camelCase
|
|
222
|
-
*/
|
|
223
|
-
declare function toCamelCase(str: string): string;
|
|
224
|
-
/**
|
|
225
|
-
* Convert a string to kebab-case
|
|
226
|
-
*/
|
|
227
|
-
declare function toKebabCase(str: string): string;
|
|
228
|
-
/**
|
|
229
|
-
* Convert a string to snake_case
|
|
230
|
-
*/
|
|
231
|
-
declare function toSnakeCase(str: string): string;
|
|
232
|
-
/**
|
|
233
|
-
* Convert a string to SCREAMING_SNAKE_CASE
|
|
234
|
-
*/
|
|
235
|
-
declare function toScreamingSnakeCase(str: string): string;
|
|
236
|
-
/**
|
|
237
|
-
* Ensure a directory exists, create it if it doesn't
|
|
238
|
-
*/
|
|
239
|
-
declare function ensureDir(dirPath: string): void;
|
|
240
|
-
/**
|
|
241
|
-
* Format a timestamp for migration files
|
|
242
|
-
*/
|
|
243
|
-
declare function getMigrationTimestamp(): string;
|
|
244
|
-
/**
|
|
245
|
-
* Pluralize a string
|
|
246
|
-
*/
|
|
247
|
-
declare function pluralize(str: string): string;
|
|
248
|
-
/**
|
|
249
|
-
* Singularize a string
|
|
250
|
-
*/
|
|
251
|
-
declare function singularize(str: string): string;
|
|
252
|
-
/**
|
|
253
|
-
* Quote a property name if it's not a valid JavaScript identifier.
|
|
254
|
-
* Properties with hyphens, spaces, or starting with numbers need quotes.
|
|
255
|
-
*/
|
|
256
|
-
declare function quotePropertyName(name: string): string;
|
|
257
|
-
/**
|
|
258
|
-
* Singularize a label (e.g., "Trusted Companies" -> "Trusted Company")
|
|
259
|
-
* Handles display labels with proper capitalization
|
|
260
|
-
*/
|
|
261
|
-
declare function singularizeLabel(label: string): string;
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Validate the schema structure
|
|
265
|
-
*/
|
|
266
|
-
declare function validateSchema(schema: Schema): string[];
|
|
267
|
-
/**
|
|
268
|
-
* Main generator function - generates all files for a schema
|
|
269
|
-
*/
|
|
270
|
-
declare function generate(schemaName: string, options?: GeneratorOptions): Promise<void>;
|
|
28
|
+
declare function defineConfig(config: BetterstartConfig): BetterstartConfig;
|
|
271
29
|
|
|
272
|
-
export { type
|
|
30
|
+
export { type BetterstartConfig, type BetterstartDatabase, type BetterstartFeatures, type BetterstartGenerated, type BetterstartPaths, defineConfig };
|