@cimplify/cli 0.6.9 → 0.6.11
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/{add-U4S5DBPN.mjs → add-5G7UZ6DA.mjs} +1 -1
- package/dist/{chunk-R3FDBXR6.mjs → chunk-CLNS2NBR.mjs} +4 -1
- package/dist/{chunk-CMF2X3SI.mjs → chunk-KOJZB3S4.mjs} +1 -1
- package/dist/chunk-OLZMA2TM.mjs +5707 -0
- package/dist/{chunk-4HDXZJMR.mjs → chunk-SNDMYYOK.mjs} +1 -1
- package/dist/{deploy-7BPO5BNB.mjs → deploy-YVCYHNSS.mjs} +48 -19
- package/dist/dispatcher.mjs +11 -11
- package/dist/{doctor-BTMEATD4.mjs → doctor-3UOTPOJ6.mjs} +2 -2
- package/dist/{explain-JH4TKGTP.mjs → explain-DXJ3R52F.mjs} +1 -1
- package/dist/{introspect-DOZCE52F.mjs → introspect-77SUZ5X5.mjs} +2 -2
- package/dist/{list-KO2QX42Q.mjs → list-QX7RM3P3.mjs} +1 -1
- package/dist/{repo-WOBWKEAO.mjs → repo-KNQMSPVV.mjs} +1 -1
- package/dist/{update-O2UR6PAW.mjs → update-UHKPFT6F.mjs} +1 -1
- package/package.json +1 -1
- package/templates/storefront-auto/app/layout.tsx +3 -1
- package/templates/storefront-auto/bun.lock +428 -0
- package/templates/storefront-auto/components/product-modal.tsx +104 -0
- package/templates/storefront-auto/lib/site-url.ts +3 -26
- package/templates/storefront-auto/lib/site.config.ts +7 -0
- package/templates/storefront-auto/next.config.ts +7 -0
- package/templates/storefront-bakery/app/layout.tsx +3 -1
- package/templates/storefront-bakery/lib/site-url.ts +3 -26
- package/templates/storefront-bakery/lib/site.config.ts +7 -0
- package/templates/storefront-bakery/next.config.ts +7 -0
- package/templates/storefront-fashion/app/layout.tsx +3 -1
- package/templates/storefront-fashion/bun.lock +437 -0
- package/templates/storefront-fashion/components/product-modal.tsx +104 -0
- package/templates/storefront-fashion/lib/site-url.ts +3 -26
- package/templates/storefront-fashion/lib/site.config.ts +7 -0
- package/templates/storefront-fashion/next.config.ts +7 -0
- package/templates/storefront-grocery/app/layout.tsx +3 -1
- package/templates/storefront-grocery/bun.lock +428 -0
- package/templates/storefront-grocery/lib/site-url.ts +3 -26
- package/templates/storefront-grocery/lib/site.config.ts +7 -0
- package/templates/storefront-grocery/next.config.ts +7 -0
- package/templates/storefront-pharmacy/app/layout.tsx +3 -1
- package/templates/storefront-pharmacy/bun.lock +428 -0
- package/templates/storefront-pharmacy/components/product-modal.tsx +104 -0
- package/templates/storefront-pharmacy/lib/site-url.ts +3 -26
- package/templates/storefront-pharmacy/lib/site.config.ts +7 -0
- package/templates/storefront-pharmacy/next.config.ts +7 -0
- package/templates/storefront-restaurant/app/layout.tsx +3 -1
- package/templates/storefront-restaurant/app/reservations/reservations-client.tsx +1 -1
- package/templates/storefront-restaurant/bun.lock +428 -0
- package/templates/storefront-restaurant/lib/site-url.ts +3 -26
- package/templates/storefront-restaurant/lib/site.config.ts +7 -0
- package/templates/storefront-restaurant/next.config.ts +7 -0
- package/templates/storefront-retail/app/layout.tsx +3 -1
- package/templates/storefront-retail/bun.lock +428 -0
- package/templates/storefront-retail/components/product-modal.tsx +104 -0
- package/templates/storefront-retail/lib/site-url.ts +3 -26
- package/templates/storefront-retail/lib/site.config.ts +7 -0
- package/templates/storefront-retail/next.config.ts +7 -0
- package/templates/storefront-services/app/book/book-client.tsx +2 -1
- package/templates/storefront-services/app/layout.tsx +3 -1
- package/templates/storefront-services/bun.lock +428 -0
- package/templates/storefront-services/lib/site-url.ts +3 -26
- package/templates/storefront-services/lib/site.config.ts +7 -0
- package/templates/storefront-services/next.config.ts +7 -0
- package/dist/chunk-EALN6SAN.mjs +0 -5707
- package/templates/storefront-auto/app/login/page.tsx +0 -17
- package/templates/storefront-auto/app/signup/page.tsx +0 -17
- package/templates/storefront-bakery/app/login/page.tsx +0 -17
- package/templates/storefront-bakery/app/signup/page.tsx +0 -17
- package/templates/storefront-fashion/app/login/page.tsx +0 -17
- package/templates/storefront-fashion/app/signup/page.tsx +0 -17
- package/templates/storefront-grocery/app/login/page.tsx +0 -17
- package/templates/storefront-grocery/app/signup/page.tsx +0 -17
- package/templates/storefront-pharmacy/app/login/page.tsx +0 -17
- package/templates/storefront-pharmacy/app/signup/page.tsx +0 -17
- package/templates/storefront-restaurant/app/login/page.tsx +0 -17
- package/templates/storefront-restaurant/app/signup/page.tsx +0 -17
- package/templates/storefront-retail/app/login/page.tsx +0 -17
- package/templates/storefront-retail/app/signup/page.tsx +0 -17
- package/templates/storefront-services/app/login/page.tsx +0 -17
- package/templates/storefront-services/app/signup/page.tsx +0 -17
|
@@ -1,29 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SITE_URL } from "./site.config";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Canonical absolute URL for this storefront, derived at request time.
|
|
5
|
-
*
|
|
6
|
-
* Resolution order:
|
|
7
|
-
* 1. `NEXT_PUBLIC_SITE_URL` — set when you need a fixed canonical
|
|
8
|
-
* (multiple domains, www-vs-apex preference, etc.).
|
|
9
|
-
* 2. The request `Host` header — works automatically on every deploy,
|
|
10
|
-
* including preview URLs and custom domains.
|
|
11
|
-
* 3. `https://example.com` — only ever returned during prerender of
|
|
12
|
-
* a page that has no live request (rare in App Router).
|
|
13
|
-
*/
|
|
3
|
+
/** Canonical absolute URL for this storefront. */
|
|
14
4
|
export async function getSiteUrl(): Promise<string> {
|
|
15
|
-
|
|
16
|
-
if (explicit) return explicit;
|
|
17
|
-
|
|
18
|
-
try {
|
|
19
|
-
const h = await headers();
|
|
20
|
-
const host = h.get("host");
|
|
21
|
-
if (host) {
|
|
22
|
-
const isLocal = host.startsWith("localhost") || host.startsWith("127.");
|
|
23
|
-
return `${isLocal ? "http" : "https"}://${host}`;
|
|
24
|
-
}
|
|
25
|
-
} catch {
|
|
26
|
-
// `headers()` is unavailable in some build contexts — fall through.
|
|
27
|
-
}
|
|
28
|
-
return "https://example.com";
|
|
5
|
+
return SITE_URL;
|
|
29
6
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical absolute URL. The platform overwrites this at build time with the
|
|
3
|
+
* storefront's primary domain; the default only applies to local builds. It's
|
|
4
|
+
* per-deploy config, not per-request, so it stays a static constant — keeping
|
|
5
|
+
* the root layout prerenderable under `cacheComponents`.
|
|
6
|
+
*/
|
|
7
|
+
export const SITE_URL = "https://example.com";
|
|
@@ -24,6 +24,13 @@ const nextConfig: NextConfig = {
|
|
|
24
24
|
// `cacheTag` / `cacheLife` for SSR caching. Cached chrome streams first,
|
|
25
25
|
// dynamic Suspense boundaries fill in when ready.
|
|
26
26
|
cacheComponents: true,
|
|
27
|
+
async redirects() {
|
|
28
|
+
// Config-level so cacheComponents needn't prerender a redirect()-only page.
|
|
29
|
+
return [
|
|
30
|
+
{ source: "/login", destination: "/account", permanent: false },
|
|
31
|
+
{ source: "/signup", destination: "/account", permanent: false },
|
|
32
|
+
];
|
|
33
|
+
},
|
|
27
34
|
async rewrites() {
|
|
28
35
|
return [
|
|
29
36
|
{ source: "/api/v1/:path*", destination: `${STOREFRONT_URL}/api/v1/:path*` },
|