@promakeai/cli 0.4.3 ā 0.4.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/dist/index.js +168 -166
- package/dist/registry/contact-page-centered.json +3 -3
- package/dist/registry/contact-page-map-overlay.json +3 -3
- package/dist/registry/contact-page-map-split.json +3 -3
- package/dist/registry/contact-page-split.json +3 -3
- package/dist/registry/contact-page.json +3 -3
- package/dist/registry/payment-success-block.json +1 -1
- package/package.json +53 -53
- package/template/package.json +3 -1
- package/template/src/components/FormField.tsx +43 -0
- package/template/src/components/FormFileInput.tsx +76 -0
- package/template/src/components/Stack.tsx +39 -0
- package/template/src/constants/constants.json +67 -63
- package/template/src/lib/api.ts +345 -236
- package/template/vite.config.ts +65 -132
package/template/vite.config.ts
CHANGED
|
@@ -1,132 +1,65 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import tailwindcss from "@tailwindcss/vite";
|
|
3
|
-
import react from "@vitejs/plugin-react";
|
|
4
|
-
import { defineConfig, type Plugin } from "vite";
|
|
5
|
-
import { inspectorDebugger } from "@promakeai/inspector/plugin";
|
|
6
|
-
|
|
7
|
-
// Plugin: Restart dev server when new lang files are added
|
|
8
|
-
function langWatchPlugin(): Plugin {
|
|
9
|
-
return {
|
|
10
|
-
name: "lang-watch",
|
|
11
|
-
configureServer(server) {
|
|
12
|
-
server.watcher.on("add", (file) => {
|
|
13
|
-
const normalizedPath = file.replace(/\\/g, "/");
|
|
14
|
-
const isModuleLang = normalizedPath.includes("/modules/") && normalizedPath.includes("/lang/");
|
|
15
|
-
const isGlobalLang = normalizedPath.includes("/src/lang/");
|
|
16
|
-
|
|
17
|
-
if ((isModuleLang || isGlobalLang) && file.endsWith(".json")) {
|
|
18
|
-
console.log("\nš New translation file detected!");
|
|
19
|
-
console.log("š Restarting server to load translations...\n");
|
|
20
|
-
server.restart();
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// https://vite.dev/config/
|
|
28
|
-
export default defineConfig(({ mode }) => ({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
resolve: {
|
|
37
|
-
alias: {
|
|
38
|
-
"@": path.resolve(__dirname, "./src"),
|
|
39
|
-
},
|
|
40
|
-
preserveSymlinks: true,
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"@radix-ui/react-switch",
|
|
67
|
-
"@radix-ui/react-toggle",
|
|
68
|
-
"@radix-ui/react-toggle-group",
|
|
69
|
-
|
|
70
|
-
// State management - ESM issues
|
|
71
|
-
"@tanstack/react-query",
|
|
72
|
-
"zustand",
|
|
73
|
-
|
|
74
|
-
// Form libraries - external deps
|
|
75
|
-
"react-hook-form",
|
|
76
|
-
"@hookform/resolvers",
|
|
77
|
-
"zod",
|
|
78
|
-
|
|
79
|
-
// UI libraries - CJS/ESM mixed
|
|
80
|
-
"cmdk",
|
|
81
|
-
"vaul",
|
|
82
|
-
"sonner",
|
|
83
|
-
|
|
84
|
-
// Date libraries - CJS format
|
|
85
|
-
"date-fns",
|
|
86
|
-
"react-day-picker",
|
|
87
|
-
|
|
88
|
-
// Charts - many sub-dependencies
|
|
89
|
-
"recharts",
|
|
90
|
-
|
|
91
|
-
// Carousel - external deps
|
|
92
|
-
"embla-carousel-react",
|
|
93
|
-
|
|
94
|
-
// HTTP client - CJS format
|
|
95
|
-
"axios",
|
|
96
|
-
|
|
97
|
-
// i18n - external deps
|
|
98
|
-
"i18next",
|
|
99
|
-
"react-i18next",
|
|
100
|
-
"i18next-browser-languagedetector",
|
|
101
|
-
|
|
102
|
-
// Animation - ESM issues
|
|
103
|
-
"motion",
|
|
104
|
-
|
|
105
|
-
// Database - WASM loader
|
|
106
|
-
"sql.js",
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
server: {
|
|
110
|
-
host: '0.0.0.0',
|
|
111
|
-
allowedHosts: true,
|
|
112
|
-
hmr: false,
|
|
113
|
-
port: 5174,
|
|
114
|
-
watch: {
|
|
115
|
-
usePolling: true,
|
|
116
|
-
interval: 500,
|
|
117
|
-
},
|
|
118
|
-
headers: {
|
|
119
|
-
"Cache-Control": "no-cache, no-store, must-revalidate",
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
preview: {
|
|
123
|
-
port: 4173,
|
|
124
|
-
},
|
|
125
|
-
build: {
|
|
126
|
-
rollupOptions: {
|
|
127
|
-
output: {
|
|
128
|
-
manualChunks: undefined,
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
}));
|
|
1
|
+
import path from "path";
|
|
2
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
3
|
+
import react from "@vitejs/plugin-react";
|
|
4
|
+
import { defineConfig, type Plugin } from "vite";
|
|
5
|
+
import { inspectorDebugger } from "@promakeai/inspector/plugin";
|
|
6
|
+
|
|
7
|
+
// Plugin: Restart dev server when new lang files are added
|
|
8
|
+
function langWatchPlugin(): Plugin {
|
|
9
|
+
return {
|
|
10
|
+
name: "lang-watch",
|
|
11
|
+
configureServer(server) {
|
|
12
|
+
server.watcher.on("add", (file) => {
|
|
13
|
+
const normalizedPath = file.replace(/\\/g, "/");
|
|
14
|
+
const isModuleLang = normalizedPath.includes("/modules/") && normalizedPath.includes("/lang/");
|
|
15
|
+
const isGlobalLang = normalizedPath.includes("/src/lang/");
|
|
16
|
+
|
|
17
|
+
if ((isModuleLang || isGlobalLang) && file.endsWith(".json")) {
|
|
18
|
+
console.log("\nš New translation file detected!");
|
|
19
|
+
console.log("š Restarting server to load translations...\n");
|
|
20
|
+
server.restart();
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// https://vite.dev/config/
|
|
28
|
+
export default defineConfig(({ mode }) => ({
|
|
29
|
+
cacheDir: '/tmp/.vite-cache',
|
|
30
|
+
plugins: [
|
|
31
|
+
inspectorDebugger({ enabled: mode === "development" }),
|
|
32
|
+
react(),
|
|
33
|
+
tailwindcss(),
|
|
34
|
+
mode === "development" && langWatchPlugin(),
|
|
35
|
+
].filter(Boolean),
|
|
36
|
+
resolve: {
|
|
37
|
+
alias: {
|
|
38
|
+
"@": path.resolve(__dirname, "./src"),
|
|
39
|
+
},
|
|
40
|
+
preserveSymlinks: true,
|
|
41
|
+
},
|
|
42
|
+
server: {
|
|
43
|
+
host: '0.0.0.0',
|
|
44
|
+
allowedHosts: true,
|
|
45
|
+
hmr: false,
|
|
46
|
+
port: 5174,
|
|
47
|
+
watch: {
|
|
48
|
+
usePolling: true,
|
|
49
|
+
interval: 500,
|
|
50
|
+
},
|
|
51
|
+
headers: {
|
|
52
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
preview: {
|
|
56
|
+
port: 4173,
|
|
57
|
+
},
|
|
58
|
+
build: {
|
|
59
|
+
rollupOptions: {
|
|
60
|
+
output: {
|
|
61
|
+
manualChunks: undefined,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
}));
|