@promakeai/cli 0.5.8 ā 0.6.0
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 +71 -71
- package/dist/index.js +259 -254
- package/dist/registry/about-page.json +3 -3
- package/dist/registry/about-section.json +4 -4
- package/dist/registry/animations.json +2 -2
- package/dist/registry/announcement-bar.json +4 -4
- package/dist/registry/api.json +1 -1
- package/dist/registry/auth-core.json +3 -3
- package/dist/registry/bento-grid-section.json +4 -4
- package/dist/registry/blog-core.json +5 -5
- package/dist/registry/blog-list-page.json +4 -4
- package/dist/registry/blog-section.json +4 -4
- package/dist/registry/cards-carousel-section.json +4 -4
- package/dist/registry/cart-drawer.json +4 -4
- package/dist/registry/cart-page.json +4 -4
- package/dist/registry/case-study-page.json +3 -3
- package/dist/registry/category-section.json +4 -4
- package/dist/registry/checkout-page.json +4 -4
- package/dist/registry/coming-soon-page-minimal.json +4 -4
- package/dist/registry/coming-soon-page.json +4 -4
- package/dist/registry/contact-info-grid.json +4 -4
- package/dist/registry/contact-page-centered.json +4 -4
- 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 +4 -4
- package/dist/registry/contact-page.json +4 -4
- package/dist/registry/content-section.json +4 -4
- package/dist/registry/cookie-consent.json +4 -4
- package/dist/registry/cookies-page.json +3 -3
- package/dist/registry/cta-section.json +3 -3
- package/dist/registry/ecommerce-core.json +8 -8
- package/dist/registry/empty-page.json +3 -3
- package/dist/registry/faq-categorized.json +4 -4
- package/dist/registry/faq-simple.json +4 -4
- package/dist/registry/favorites-blog-block.json +1 -1
- package/dist/registry/favorites-blog-page.json +4 -4
- package/dist/registry/favorites-ecommerce-block.json +1 -1
- package/dist/registry/favorites-ecommerce-page.json +4 -4
- package/dist/registry/feature-section.json +3 -3
- package/dist/registry/featured-products.json +4 -4
- package/dist/registry/footer-detailed.json +4 -4
- package/dist/registry/footer-minimal.json +3 -3
- package/dist/registry/footer.json +3 -3
- package/dist/registry/forgot-password-page-split.json +4 -4
- package/dist/registry/forgot-password-page.json +4 -4
- package/dist/registry/google-adsense.json +4 -4
- package/dist/registry/google-map.json +2 -2
- package/dist/registry/header-centered-pill.json +4 -4
- package/dist/registry/header-ecommerce.json +4 -4
- package/dist/registry/header-mega.json +4 -4
- package/dist/registry/header-minimal.json +4 -4
- package/dist/registry/header-simple.json +3 -3
- package/dist/registry/hero-carousel.json +3 -3
- package/dist/registry/hero-cta.json +4 -4
- package/dist/registry/hero-gradient.json +4 -4
- package/dist/registry/hero-grid.json +4 -4
- package/dist/registry/hero-profile.json +3 -3
- package/dist/registry/hero.json +3 -3
- package/dist/registry/index.json +103 -103
- package/dist/registry/landing-page-app.json +3 -3
- package/dist/registry/landing-page-saas.json +3 -3
- package/dist/registry/login-page-split.json +4 -4
- package/dist/registry/login-page.json +4 -4
- package/dist/registry/logo-cloud.json +4 -4
- package/dist/registry/masonry-grid.json +3 -3
- package/dist/registry/my-orders-page.json +4 -4
- package/dist/registry/newsletter-section.json +4 -4
- package/dist/registry/order-card-compact.json +1 -1
- package/dist/registry/order-confirmation-page.json +4 -4
- package/dist/registry/order-detail-block.json +1 -1
- package/dist/registry/orders-list-block.json +1 -1
- package/dist/registry/payment-success-block.json +2 -2
- package/dist/registry/portfolio-page.json +4 -4
- package/dist/registry/post-card.json +4 -4
- package/dist/registry/post-detail-block.json +2 -2
- package/dist/registry/post-detail-page.json +4 -4
- package/dist/registry/pricing-card.json +3 -3
- package/dist/registry/pricing-page.json +4 -4
- package/dist/registry/pricing-section.json +4 -4
- package/dist/registry/privacy-page.json +3 -3
- package/dist/registry/product-card-detailed.json +4 -4
- package/dist/registry/product-card-hover.json +4 -4
- package/dist/registry/product-card.json +4 -4
- package/dist/registry/product-detail-block.json +2 -2
- package/dist/registry/product-detail-page.json +4 -4
- package/dist/registry/product-detail-section.json +4 -4
- package/dist/registry/product-quick-view.json +4 -4
- package/dist/registry/products-page.json +4 -4
- package/dist/registry/reading-progress.json +4 -4
- package/dist/registry/register-page-split.json +4 -4
- package/dist/registry/register-page.json +4 -4
- package/dist/registry/related-posts-block.json +1 -1
- package/dist/registry/related-products-block.json +2 -2
- package/dist/registry/reset-password-page-split.json +4 -4
- package/dist/registry/reset-password-page.json +4 -4
- package/dist/registry/service-card.json +1 -1
- package/dist/registry/share-buttons.json +4 -4
- package/dist/registry/skill-card.json +1 -1
- package/dist/registry/team-page.json +4 -4
- package/dist/registry/terms-page.json +3 -3
- package/dist/registry/testimonials-carousel.json +4 -4
- package/dist/registry/testimonials-grid.json +4 -4
- package/dist/registry/timeline-section.json +4 -4
- package/dist/registry/video-hero.json +4 -4
- package/dist/registry/youtube-embed.json +4 -4
- package/package.json +59 -56
- package/template/.env +6 -6
- package/template/README.md +54 -54
- package/template/eslint.config.js +41 -41
- package/template/package.json +95 -95
- package/template/public/_redirects +1 -1
- package/template/public/robots.txt +14 -14
- package/template/scripts/init-db.ts +18 -18
- package/template/src/App.tsx +19 -19
- package/template/src/components/FormField.tsx +48 -48
- package/template/src/components/FormFileInput.tsx +75 -75
- package/template/src/components/GoogleAnalytics.tsx +34 -34
- package/template/src/components/LanguageSwitcher.tsx +53 -53
- package/template/src/components/PasswordInput.tsx +60 -60
- package/template/src/components/ScriptInjector.tsx +62 -62
- package/template/src/components/Stack.tsx +39 -39
- package/template/src/constants/constants.json +67 -67
- package/template/src/db/index.ts +20 -20
- package/template/src/db/provider.tsx +78 -78
- package/template/src/db/schema.json +258 -258
- package/template/src/db/types.ts +195 -195
- package/template/src/hooks/use-debounced-value.ts +12 -12
- package/template/src/lang/index.ts +90 -90
- package/template/src/lib/api.ts +345 -345
- package/template/src/lib/env.ts +19 -19
- package/template/src/router.tsx +14 -14
- package/template/src/vite-env.d.ts +1 -1
- package/template/vite.config.ts +68 -64
- package/template/public/data/database.db-shm +0 -0
- package/template/public/data/database.db-wal +0 -0
package/template/src/lib/env.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
// Environment deÄiÅkenlerini window'a export et
|
|
2
|
-
declare global {
|
|
3
|
-
interface Window {
|
|
4
|
-
ENV: {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
window.ENV = {
|
|
11
|
-
...Object.keys(import.meta.env)
|
|
12
|
-
.filter((key) => key.startsWith('VITE_'))
|
|
13
|
-
.reduce(
|
|
14
|
-
(acc, key) => ({
|
|
15
|
-
...acc,
|
|
16
|
-
[key]: import.meta.env[key],
|
|
17
|
-
}),
|
|
18
|
-
{},
|
|
19
|
-
),
|
|
1
|
+
// Environment deÄiÅkenlerini window'a export et
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
ENV: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
window.ENV = {
|
|
11
|
+
...Object.keys(import.meta.env)
|
|
12
|
+
.filter((key) => key.startsWith('VITE_'))
|
|
13
|
+
.reduce(
|
|
14
|
+
(acc, key) => ({
|
|
15
|
+
...acc,
|
|
16
|
+
[key]: import.meta.env[key],
|
|
17
|
+
}),
|
|
18
|
+
{},
|
|
19
|
+
),
|
|
20
20
|
};
|
package/template/src/router.tsx
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { BrowserRouter, Routes, Route } from "react-router";
|
|
2
|
-
import Index from "./pages/Index";
|
|
3
|
-
import NotFound from "./pages/NotFound";
|
|
4
|
-
|
|
5
|
-
export const Router = () => {
|
|
6
|
-
return (
|
|
7
|
-
<BrowserRouter>
|
|
8
|
-
<Routes>
|
|
9
|
-
<Route path="/" element={<Index />} />
|
|
10
|
-
<Route path="*" element={<NotFound />} />
|
|
11
|
-
</Routes>
|
|
12
|
-
</BrowserRouter>
|
|
13
|
-
);
|
|
14
|
-
};
|
|
1
|
+
import { BrowserRouter, Routes, Route } from "react-router";
|
|
2
|
+
import Index from "./pages/Index";
|
|
3
|
+
import NotFound from "./pages/NotFound";
|
|
4
|
+
|
|
5
|
+
export const Router = () => {
|
|
6
|
+
return (
|
|
7
|
+
<BrowserRouter>
|
|
8
|
+
<Routes>
|
|
9
|
+
<Route path="/" element={<Index />} />
|
|
10
|
+
<Route path="*" element={<NotFound />} />
|
|
11
|
+
</Routes>
|
|
12
|
+
</BrowserRouter>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
1
|
+
/// <reference types="vite/client" />
|
package/template/vite.config.ts
CHANGED
|
@@ -1,65 +1,69 @@
|
|
|
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
|
|
8
|
-
function langWatchPlugin(): Plugin {
|
|
9
|
-
return {
|
|
10
|
-
name: "lang-watch",
|
|
11
|
-
configureServer(server) {
|
|
12
|
-
|
|
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
|
-
|
|
19
|
-
console.log(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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 lang files are added or changed
|
|
8
|
+
function langWatchPlugin(): Plugin {
|
|
9
|
+
return {
|
|
10
|
+
name: "lang-watch",
|
|
11
|
+
configureServer(server) {
|
|
12
|
+
const handleLangFile = (file: string, event: string) => {
|
|
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
|
+
const label = event === "add" ? "New translation file detected" : "Translation file changed";
|
|
19
|
+
console.log(`\nš ${label}!`);
|
|
20
|
+
console.log("š Restarting server to load translations...\n");
|
|
21
|
+
server.restart();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
server.watcher.on("add", (file) => handleLangFile(file, "add"));
|
|
26
|
+
server.watcher.on("change", (file) => handleLangFile(file, "change"));
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// https://vite.dev/config/
|
|
32
|
+
export default defineConfig(({ mode }) => ({
|
|
33
|
+
cacheDir: '/tmp/.vite-cache',
|
|
34
|
+
plugins: [
|
|
35
|
+
inspectorDebugger({ enabled: mode === "development" }),
|
|
36
|
+
react(),
|
|
37
|
+
tailwindcss(),
|
|
38
|
+
mode === "development" && langWatchPlugin(),
|
|
39
|
+
].filter(Boolean),
|
|
40
|
+
resolve: {
|
|
41
|
+
alias: {
|
|
42
|
+
"@": path.resolve(__dirname, "./src"),
|
|
43
|
+
},
|
|
44
|
+
preserveSymlinks: true,
|
|
45
|
+
},
|
|
46
|
+
server: {
|
|
47
|
+
host: '0.0.0.0',
|
|
48
|
+
allowedHosts: true,
|
|
49
|
+
hmr: false,
|
|
50
|
+
port: 5174,
|
|
51
|
+
watch: {
|
|
52
|
+
usePolling: true,
|
|
53
|
+
interval: 500,
|
|
54
|
+
},
|
|
55
|
+
headers: {
|
|
56
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
preview: {
|
|
60
|
+
port: 4173,
|
|
61
|
+
},
|
|
62
|
+
build: {
|
|
63
|
+
rollupOptions: {
|
|
64
|
+
output: {
|
|
65
|
+
manualChunks: undefined,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
65
69
|
}));
|
|
Binary file
|
|
File without changes
|