create-fullstack-scaffold 0.4.5 → 0.4.7
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/dist/cli/index.js +25 -1
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
- package/template/drizzle/0003_ambiguous_magdalene.sql +100 -0
- package/template/drizzle/meta/0003_snapshot.json +1837 -0
- package/template/drizzle/meta/_journal.json +7 -0
- package/template/src/server/module-plugin/services/plugin-seed-service.ts +7 -1
package/dist/cli/index.js
CHANGED
|
@@ -2807,6 +2807,24 @@ function generatePresetUIConfig(resolved, presetId) {
|
|
|
2807
2807
|
const hasAuth = resolved.modules.has("auth");
|
|
2808
2808
|
const navConfig = getNavConfigForPreset(presetType, hasAuth);
|
|
2809
2809
|
const routes = getRoutesForPreset(presetType, resolved);
|
|
2810
|
+
const aliases = {};
|
|
2811
|
+
if (presetId !== presetType) {
|
|
2812
|
+
aliases[presetId] = presetType;
|
|
2813
|
+
}
|
|
2814
|
+
const allAliases = {
|
|
2815
|
+
"todo-app": "todo",
|
|
2816
|
+
"xbrowser-marketplace": "plugin",
|
|
2817
|
+
ecommerce: "ecommerce",
|
|
2818
|
+
"fullstack-admin": "saas",
|
|
2819
|
+
forum: "community",
|
|
2820
|
+
minimal: "todo",
|
|
2821
|
+
saas: "saas"
|
|
2822
|
+
};
|
|
2823
|
+
for (const [alias, type] of Object.entries(allAliases)) {
|
|
2824
|
+
if (type === presetType && alias !== presetType) {
|
|
2825
|
+
aliases[alias] = presetType;
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2810
2828
|
const desktopNav = filterNavByModules(navConfig.desktopNav, resolved);
|
|
2811
2829
|
const mobileTabs = filterNavByModules(navConfig.mobileTabs, resolved);
|
|
2812
2830
|
const routeDefs = routes.map((r) => {
|
|
@@ -2876,6 +2894,11 @@ export interface PresetUIConfig {
|
|
|
2876
2894
|
|
|
2877
2895
|
const ${constName}: PresetTheme = ${theme}
|
|
2878
2896
|
|
|
2897
|
+
// Preset ID aliases: allows dev:xxx scripts and VITE_PRESET to use config IDs
|
|
2898
|
+
const PRESET_ALIASES: Record<string, '${presetType}'> = {
|
|
2899
|
+
${Object.entries(aliases).map(([k, v]) => ` '${k}': '${v}',`).join("\n")}
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2879
2902
|
export const PRESET_UI_CONFIGS: Record<PresetType, PresetUIConfig> = {
|
|
2880
2903
|
${presetType}: {
|
|
2881
2904
|
id: '${presetType}',
|
|
@@ -2898,7 +2921,8 @@ ${routeDefs.join(",\n")}
|
|
|
2898
2921
|
}
|
|
2899
2922
|
|
|
2900
2923
|
export function getPresetUIConfig(id: string): PresetUIConfig {
|
|
2901
|
-
|
|
2924
|
+
const resolvedId = PRESET_ALIASES[id] ?? (id as PresetType)
|
|
2925
|
+
return PRESET_UI_CONFIGS[resolvedId] ?? PRESET_UI_CONFIGS['${presetType}']
|
|
2902
2926
|
}
|
|
2903
2927
|
|
|
2904
2928
|
export function getPresetUIConfigs(): Record<PresetType, PresetUIConfig> {
|