@cimplify/cli 0.6.16 → 0.7.2
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-BBVSJ5ZJ.mjs → add-5NW7N5CJ.mjs} +1 -1
- package/dist/{chunk-GL2J7272.mjs → chunk-26ETGFW6.mjs} +1 -1
- package/dist/{chunk-F5EGUNQZ.mjs → chunk-CVQRL2VH.mjs} +81 -25
- package/dist/{chunk-KCKMGRII.mjs → chunk-ZVEQGQ2Z.mjs} +2 -2
- package/dist/dispatcher.mjs +9 -9
- package/dist/{doctor-T6NA3EMW.mjs → doctor-XLBDC6NO.mjs} +2 -2
- package/dist/{explain-22NV6OL6.mjs → explain-PKTL7ZR6.mjs} +4 -4
- package/dist/{introspect-QOW24PJF.mjs → introspect-FPBV3O4N.mjs} +2 -2
- package/dist/{list-JHUIIMC2.mjs → list-N7FKBQ3Y.mjs} +1 -1
- package/dist/{update-IOMLDQEN.mjs → update-ZC3JGKLI.mjs} +1 -1
- package/package.json +2 -2
- package/templates/storefront-auto/.claude/skills/cimplify-storefront/SKILL.md +34 -18
- package/templates/storefront-auto/CLAUDE.md +3 -2
- package/templates/storefront-auto/app/categories/[slug]/page.tsx +39 -17
- package/templates/storefront-auto/app/collections/[slug]/page.tsx +39 -17
- package/templates/storefront-auto/app/llms.txt/route.ts +13 -9
- package/templates/storefront-auto/app/page.tsx +3 -6
- package/templates/storefront-auto/app/products/[slug]/page.tsx +51 -21
- package/templates/storefront-auto/app/shop/page.tsx +10 -8
- package/templates/storefront-auto/app/shop/shop-client.tsx +1 -1
- package/templates/storefront-auto/app/sitemap-page/page.tsx +13 -9
- package/templates/storefront-auto/bun.lock +2 -2
- package/templates/storefront-auto/components/footer.tsx +0 -1
- package/templates/storefront-auto/lib/site.config.ts +1 -1
- package/templates/storefront-auto/next.config.ts +6 -5
- package/templates/storefront-auto/package.json +1 -1
- package/templates/storefront-bakery/.claude/skills/cimplify-storefront/SKILL.md +34 -18
- package/templates/storefront-bakery/AGENTS.md +4 -3
- package/templates/storefront-bakery/CLAUDE.md +3 -2
- package/templates/storefront-bakery/app/categories/[slug]/page.tsx +39 -17
- package/templates/storefront-bakery/app/collections/[slug]/page.tsx +39 -17
- package/templates/storefront-bakery/app/llms.txt/route.ts +13 -9
- package/templates/storefront-bakery/app/page.tsx +19 -9
- package/templates/storefront-bakery/app/shop/page.tsx +10 -8
- package/templates/storefront-bakery/app/shop/shop-client.tsx +1 -1
- package/templates/storefront-bakery/app/sitemap-page/page.tsx +13 -9
- package/templates/storefront-bakery/bun.lock +2 -2
- package/templates/storefront-bakery/components/footer.tsx +0 -1
- package/templates/storefront-bakery/lib/site.config.ts +1 -1
- package/templates/storefront-bakery/next.config.ts +6 -5
- package/templates/storefront-bakery/package.json +1 -1
- package/templates/storefront-fashion/.claude/skills/cimplify-storefront/SKILL.md +34 -18
- package/templates/storefront-fashion/CLAUDE.md +3 -2
- package/templates/storefront-fashion/app/categories/[slug]/page.tsx +39 -17
- package/templates/storefront-fashion/app/collections/[slug]/page.tsx +39 -17
- package/templates/storefront-fashion/app/llms.txt/route.ts +13 -9
- package/templates/storefront-fashion/app/page.tsx +23 -10
- package/templates/storefront-fashion/app/products/[slug]/page.tsx +51 -21
- package/templates/storefront-fashion/app/shop/page.tsx +10 -8
- package/templates/storefront-fashion/app/shop/shop-client.tsx +1 -1
- package/templates/storefront-fashion/app/sitemap-page/page.tsx +13 -9
- package/templates/storefront-fashion/bun.lock +2 -2
- package/templates/storefront-fashion/components/footer.tsx +0 -1
- package/templates/storefront-fashion/lib/site.config.ts +1 -1
- package/templates/storefront-fashion/next.config.ts +6 -5
- package/templates/storefront-fashion/package.json +1 -1
- package/templates/storefront-grocery/.claude/skills/cimplify-storefront/SKILL.md +34 -18
- package/templates/storefront-grocery/CLAUDE.md +3 -2
- package/templates/storefront-grocery/app/categories/[slug]/page.tsx +39 -17
- package/templates/storefront-grocery/app/collections/[slug]/page.tsx +39 -17
- package/templates/storefront-grocery/app/llms.txt/route.ts +13 -9
- package/templates/storefront-grocery/app/page.tsx +19 -9
- package/templates/storefront-grocery/app/shop/page.tsx +10 -8
- package/templates/storefront-grocery/app/shop/shop-client.tsx +1 -1
- package/templates/storefront-grocery/app/sitemap-page/page.tsx +13 -9
- package/templates/storefront-grocery/bun.lock +2 -2
- package/templates/storefront-grocery/components/footer.tsx +0 -1
- package/templates/storefront-grocery/lib/site.config.ts +1 -1
- package/templates/storefront-grocery/next.config.ts +6 -5
- package/templates/storefront-grocery/package.json +1 -1
- package/templates/storefront-pharmacy/.claude/skills/cimplify-storefront/SKILL.md +34 -18
- package/templates/storefront-pharmacy/CLAUDE.md +3 -2
- package/templates/storefront-pharmacy/app/categories/[slug]/page.tsx +39 -17
- package/templates/storefront-pharmacy/app/collections/[slug]/page.tsx +39 -17
- package/templates/storefront-pharmacy/app/llms.txt/route.ts +13 -9
- package/templates/storefront-pharmacy/app/page.tsx +3 -6
- package/templates/storefront-pharmacy/app/products/[slug]/page.tsx +51 -21
- package/templates/storefront-pharmacy/app/shop/page.tsx +10 -8
- package/templates/storefront-pharmacy/app/shop/shop-client.tsx +1 -1
- package/templates/storefront-pharmacy/app/sitemap-page/page.tsx +13 -9
- package/templates/storefront-pharmacy/bun.lock +2 -2
- package/templates/storefront-pharmacy/components/footer.tsx +0 -1
- package/templates/storefront-pharmacy/lib/site.config.ts +1 -1
- package/templates/storefront-pharmacy/next.config.ts +6 -5
- package/templates/storefront-pharmacy/package.json +1 -1
- package/templates/storefront-restaurant/.claude/skills/cimplify-storefront/SKILL.md +34 -18
- package/templates/storefront-restaurant/CLAUDE.md +3 -2
- package/templates/storefront-restaurant/app/categories/[slug]/page.tsx +39 -17
- package/templates/storefront-restaurant/app/collections/[slug]/page.tsx +39 -17
- package/templates/storefront-restaurant/app/llms.txt/route.ts +13 -9
- package/templates/storefront-restaurant/app/page.tsx +19 -9
- package/templates/storefront-restaurant/app/reservations/page.tsx +7 -7
- package/templates/storefront-restaurant/app/shop/page.tsx +10 -8
- package/templates/storefront-restaurant/app/shop/shop-client.tsx +1 -1
- package/templates/storefront-restaurant/app/sitemap-page/page.tsx +13 -9
- package/templates/storefront-restaurant/bun.lock +2 -2
- package/templates/storefront-restaurant/components/footer.tsx +0 -1
- package/templates/storefront-restaurant/lib/site.config.ts +1 -1
- package/templates/storefront-restaurant/next.config.ts +6 -5
- package/templates/storefront-restaurant/package.json +1 -1
- package/templates/storefront-retail/.claude/skills/cimplify-storefront/SKILL.md +34 -18
- package/templates/storefront-retail/CLAUDE.md +3 -2
- package/templates/storefront-retail/app/categories/[slug]/page.tsx +39 -17
- package/templates/storefront-retail/app/collections/[slug]/page.tsx +39 -17
- package/templates/storefront-retail/app/llms.txt/route.ts +13 -9
- package/templates/storefront-retail/app/page.tsx +23 -10
- package/templates/storefront-retail/app/products/[slug]/page.tsx +51 -21
- package/templates/storefront-retail/app/shop/page.tsx +10 -8
- package/templates/storefront-retail/app/shop/shop-client.tsx +1 -1
- package/templates/storefront-retail/app/sitemap-page/page.tsx +13 -9
- package/templates/storefront-retail/bun.lock +2 -2
- package/templates/storefront-retail/components/footer.tsx +0 -1
- package/templates/storefront-retail/lib/site.config.ts +1 -1
- package/templates/storefront-retail/next.config.ts +6 -5
- package/templates/storefront-retail/package.json +1 -1
- package/templates/storefront-services/.claude/skills/cimplify-storefront/SKILL.md +34 -18
- package/templates/storefront-services/CLAUDE.md +3 -2
- package/templates/storefront-services/app/book/page.tsx +7 -7
- package/templates/storefront-services/app/categories/[slug]/page.tsx +39 -17
- package/templates/storefront-services/app/collections/[slug]/page.tsx +39 -17
- package/templates/storefront-services/app/llms.txt/route.ts +13 -9
- package/templates/storefront-services/app/page.tsx +19 -9
- package/templates/storefront-services/app/shop/page.tsx +10 -8
- package/templates/storefront-services/app/shop/shop-client.tsx +1 -1
- package/templates/storefront-services/app/sitemap-page/page.tsx +13 -9
- package/templates/storefront-services/bun.lock +2 -2
- package/templates/storefront-services/components/footer.tsx +0 -1
- package/templates/storefront-services/lib/site.config.ts +1 -1
- package/templates/storefront-services/next.config.ts +6 -5
- package/templates/storefront-services/package.json +1 -1
- package/templates/storefront-auto/app/api/revalidate/route.ts +0 -5
- package/templates/storefront-bakery/app/api/revalidate/route.ts +0 -5
- package/templates/storefront-fashion/app/api/revalidate/route.ts +0 -5
- package/templates/storefront-grocery/app/api/revalidate/route.ts +0 -5
- package/templates/storefront-pharmacy/app/api/revalidate/route.ts +0 -5
- package/templates/storefront-restaurant/app/api/revalidate/route.ts +0 -5
- package/templates/storefront-retail/app/api/revalidate/route.ts +0 -5
- package/templates/storefront-services/app/api/revalidate/route.ts +0 -5
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import { Suspense } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { CACHE_LIFE_DEFAULT, getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
3
|
+
import { getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
5
4
|
import { Hero } from "@/components/hero";
|
|
6
5
|
import { CollectionStrip } from "@/components/collection-strip";
|
|
7
6
|
import { CategoryGrid } from "@/components/category-grid";
|
|
@@ -12,22 +11,33 @@ export const metadata: Metadata = {
|
|
|
12
11
|
description: brand.description,
|
|
13
12
|
};
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
"use cache";
|
|
17
|
-
cacheTag(tags.collections(), tags.categories(), tags.products());
|
|
18
|
-
cacheLife(CACHE_LIFE_DEFAULT);
|
|
14
|
+
export const revalidate = 3600;
|
|
19
15
|
|
|
16
|
+
async function getHomeData() {
|
|
20
17
|
const client = getServerClient();
|
|
21
18
|
const [colRes, catRes] = await Promise.all([
|
|
22
|
-
client.catalogue.getCollections(
|
|
23
|
-
|
|
19
|
+
client.catalogue.getCollections({
|
|
20
|
+
cacheOptions: { revalidate: 3600, tags: [tags.collections()] },
|
|
21
|
+
}),
|
|
22
|
+
client.catalogue.getCategories({
|
|
23
|
+
cacheOptions: { revalidate: 3600, tags: [tags.categories()] },
|
|
24
|
+
}),
|
|
24
25
|
]);
|
|
25
26
|
const collections = colRes.ok ? colRes.value : [];
|
|
26
27
|
const categories = catRes.ok ? catRes.value : [];
|
|
27
28
|
|
|
28
29
|
const collectionsWithProducts = await Promise.all(
|
|
29
30
|
collections.map(async (col) => {
|
|
30
|
-
const r = await client.catalogue.getCollectionProducts(
|
|
31
|
+
const r = await client.catalogue.getCollectionProducts(
|
|
32
|
+
col.id,
|
|
33
|
+
undefined,
|
|
34
|
+
{
|
|
35
|
+
cacheOptions: {
|
|
36
|
+
revalidate: 3600,
|
|
37
|
+
tags: [tags.collectionProducts(col.id)],
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
);
|
|
31
41
|
const items = r.ok
|
|
32
42
|
? ((r.value as { items?: Product[] }).items ?? (r.value as Product[]))
|
|
33
43
|
: [];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
|
-
import {
|
|
3
|
-
import { CACHE_LIFE_DEFAULT, getServerClient, tags } from "@cimplify/sdk/server";
|
|
2
|
+
import { getServerClient, tags } from "@cimplify/sdk/server";
|
|
4
3
|
import { ShopClient } from "./shop-client";
|
|
5
4
|
import { brand } from "@/lib/brand";
|
|
6
5
|
|
|
@@ -9,15 +8,18 @@ export const metadata: Metadata = {
|
|
|
9
8
|
description: brand.description,
|
|
10
9
|
};
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
"use cache";
|
|
14
|
-
cacheTag(tags.products(), tags.categories());
|
|
15
|
-
cacheLife(CACHE_LIFE_DEFAULT);
|
|
11
|
+
export const revalidate = 3600;
|
|
16
12
|
|
|
13
|
+
async function getShopData() {
|
|
17
14
|
const client = getServerClient();
|
|
18
15
|
const [p, c] = await Promise.all([
|
|
19
|
-
client.catalogue.getProducts(
|
|
20
|
-
|
|
16
|
+
client.catalogue.getProducts(
|
|
17
|
+
{ limit: 50 },
|
|
18
|
+
{ cacheOptions: { revalidate: 3600, tags: [tags.products()] } },
|
|
19
|
+
),
|
|
20
|
+
client.catalogue.getCategories({
|
|
21
|
+
cacheOptions: { revalidate: 3600, tags: [tags.categories()] },
|
|
22
|
+
}),
|
|
21
23
|
]);
|
|
22
24
|
return {
|
|
23
25
|
products: p.ok ? p.value.items : [],
|
|
@@ -6,7 +6,7 @@ import { StoreProductCard } from "@/components/store-product-card";
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Client island for the shop page. Server-side fetches all products and
|
|
9
|
-
* categories (cached
|
|
9
|
+
* categories (ISR-cached in `app/shop/page.tsx`), then hands
|
|
10
10
|
* them to `<CataloguePage>` which owns the interactive filter / sort state.
|
|
11
11
|
*/
|
|
12
12
|
export function ShopClient({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import Link from "next/link";
|
|
3
|
-
import {
|
|
4
|
-
import { CACHE_LIFE_DEFAULT, getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
3
|
+
import { getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
5
4
|
import { brand } from "@/lib/brand";
|
|
6
5
|
|
|
7
6
|
export const metadata: Metadata = {
|
|
@@ -9,6 +8,8 @@ export const metadata: Metadata = {
|
|
|
9
8
|
description: "A human-readable index of every page on this site.",
|
|
10
9
|
};
|
|
11
10
|
|
|
11
|
+
export const revalidate = 3600;
|
|
12
|
+
|
|
12
13
|
interface SitemapData {
|
|
13
14
|
products: { slug: string; name: string }[];
|
|
14
15
|
categories: { slug: string; name: string }[];
|
|
@@ -16,15 +17,18 @@ interface SitemapData {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
async function getSitemap(): Promise<SitemapData> {
|
|
19
|
-
"use cache";
|
|
20
|
-
cacheTag(tags.products(), tags.categories(), tags.collections());
|
|
21
|
-
cacheLife(CACHE_LIFE_DEFAULT);
|
|
22
|
-
|
|
23
20
|
const client = getServerClient();
|
|
24
21
|
const [pRes, cRes, colRes] = await Promise.all([
|
|
25
|
-
client.catalogue.getProducts(
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
client.catalogue.getProducts(
|
|
23
|
+
{ limit: 500 },
|
|
24
|
+
{ cacheOptions: { revalidate: 3600, tags: [tags.products()] } },
|
|
25
|
+
),
|
|
26
|
+
client.catalogue.getCategories({
|
|
27
|
+
cacheOptions: { revalidate: 3600, tags: [tags.categories()] },
|
|
28
|
+
}),
|
|
29
|
+
client.catalogue.getCollections({
|
|
30
|
+
cacheOptions: { revalidate: 3600, tags: [tags.collections()] },
|
|
31
|
+
}),
|
|
28
32
|
]);
|
|
29
33
|
return {
|
|
30
34
|
products: (pRes.ok ? pRes.value.items : []).map((p: Product) => ({
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "__STOREFRONT_NAME__",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@cimplify/sdk": "^0.
|
|
8
|
+
"@cimplify/sdk": "^0.54.0",
|
|
9
9
|
"next": "^16.2.6",
|
|
10
10
|
"react": "^19.0.0",
|
|
11
11
|
"react-dom": "^19.0.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
"@base-ui/utils": ["@base-ui/utils@0.2.9", "", { "dependencies": { "@babel/runtime": "^7.29.2", "@floating-ui/utils": "^0.2.11", "reselect": "^5.1.1", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "@types/react": "^17 || ^18 || ^19", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@types/react"] }, "sha512-x/PDDCYzoqPpjrdyb3VcyylTI2IjUXEtYDGi5foh7KsnmNJIIaVwA2GLgDH1dps1GgXiJbA60hM+AyuTfQzIvw=="],
|
|
33
33
|
|
|
34
|
-
"@cimplify/sdk": ["@cimplify/sdk@0.
|
|
34
|
+
"@cimplify/sdk": ["@cimplify/sdk@0.54.0", "", { "dependencies": { "@base-ui/react": "^1.4.1", "clsx": "^2.1.1", "date-fns": "^4.1.0", "libphonenumber-js": "1.12.41", "react-day-picker": "^9.14.0", "tailwind-merge": "^3.5.0", "zod": "^4.4.3" }, "peerDependencies": { "@paystack/inline-js": "^2.22.8", "msw": ">=2.0.0", "react": ">=17.0.0", "vitest": ">=2.0.0" }, "optionalPeers": ["@paystack/inline-js", "msw", "react", "vitest"], "bin": { "cimplify-mock": "dist/mock/cli.mjs" } }, "sha512-YUN/lOqViHci1v9USWWwAWty29pEXBdLTuKarSl8EpafWh5jkdGZ1Q+Ne9/bfgTZmR8iTUltA8U7glV2FoRSgg=="],
|
|
35
35
|
|
|
36
36
|
"@date-fns/tz": ["@date-fns/tz@1.4.1", "", {}, "sha512-P5LUNhtbj6YfI3iJjw5EL9eUAG6OitD0W3fWQcpQjDRc/QIsL0tRNuO1PcDvPccWL1fSTXXdE1ds+l95DV/OFA=="],
|
|
37
37
|
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Canonical absolute URL. The platform overwrites this at build time with the
|
|
3
3
|
* storefront's primary domain; the default only applies to local builds. It's
|
|
4
4
|
* per-deploy config, not per-request, so it stays a static constant — keeping
|
|
5
|
-
* the root layout prerenderable
|
|
5
|
+
* the root layout prerenderable.
|
|
6
6
|
*/
|
|
7
7
|
export const SITE_URL = "https://example.com";
|
|
@@ -19,13 +19,14 @@ if (STOREFRONT_URL === "http://127.0.0.1:8787") {
|
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// Cache Components ('use cache' + cacheTag/cacheLife) require Node-specific
|
|
23
|
+
// setTimeout atomicity and serialize a postponed state that routinely exceeds
|
|
24
|
+
// CF Workers' 128MB zlib limit. We're on Cloudflare Workers via opennext, so
|
|
25
|
+
// we stay on Next 16's "Previous Model" — `fetch.next.{revalidate,tags}` via
|
|
26
|
+
// the SDK's `cacheOptions`, plus `export const revalidate` per page. See
|
|
27
|
+
// https://nextjs.org/docs/app/guides/caching-without-cache-components.
|
|
22
28
|
const nextConfig: NextConfig = {
|
|
23
|
-
// Enable Next 16's `cacheComponents` mode so we can use `'use cache'` +
|
|
24
|
-
// `cacheTag` / `cacheLife` for SSR caching. Cached chrome streams first,
|
|
25
|
-
// dynamic Suspense boundaries fill in when ready.
|
|
26
|
-
cacheComponents: true,
|
|
27
29
|
async redirects() {
|
|
28
|
-
// Config-level so cacheComponents needn't prerender a redirect()-only page.
|
|
29
30
|
return [
|
|
30
31
|
{ source: "/login", destination: "/account", permanent: false },
|
|
31
32
|
{ source: "/signup", destination: "/account", permanent: false },
|