@cimplify/cli 0.6.15 → 0.6.16
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-6KEKFXOW.mjs → add-BBVSJ5ZJ.mjs} +1 -1
- package/dist/{chunk-DEWCHGWU.mjs → chunk-F5EGUNQZ.mjs} +25 -25
- package/dist/{chunk-JLSDFVML.mjs → chunk-GL2J7272.mjs} +1 -1
- package/dist/{chunk-OSS47KZP.mjs → chunk-KCKMGRII.mjs} +2 -2
- package/dist/dispatcher.mjs +9 -9
- package/dist/{doctor-WL25JRS3.mjs → doctor-T6NA3EMW.mjs} +2 -2
- package/dist/{explain-NY5A533M.mjs → explain-22NV6OL6.mjs} +2 -2
- package/dist/{introspect-J7GVKQK7.mjs → introspect-QOW24PJF.mjs} +2 -2
- package/dist/{list-FXOFYX4H.mjs → list-JHUIIMC2.mjs} +1 -1
- package/dist/{update-WNZKECFJ.mjs → update-IOMLDQEN.mjs} +1 -1
- package/package.json +2 -2
- package/templates/storefront-auto/app/categories/[slug]/page.tsx +2 -2
- package/templates/storefront-auto/app/collections/[slug]/page.tsx +2 -2
- package/templates/storefront-auto/app/llms.txt/route.ts +2 -2
- package/templates/storefront-auto/app/page.tsx +2 -2
- package/templates/storefront-auto/app/products/[slug]/page.tsx +2 -2
- package/templates/storefront-auto/app/shop/page.tsx +2 -2
- package/templates/storefront-auto/app/sitemap-page/page.tsx +2 -2
- package/templates/storefront-auto/bun.lock +2 -2
- package/templates/storefront-auto/package.json +1 -1
- package/templates/storefront-bakery/app/categories/[slug]/page.tsx +2 -2
- package/templates/storefront-bakery/app/collections/[slug]/page.tsx +2 -2
- package/templates/storefront-bakery/app/llms.txt/route.ts +2 -2
- package/templates/storefront-bakery/app/page.tsx +2 -2
- package/templates/storefront-bakery/app/shop/page.tsx +2 -2
- package/templates/storefront-bakery/app/sitemap-page/page.tsx +2 -2
- package/templates/storefront-bakery/bun.lock +2 -2
- package/templates/storefront-bakery/package.json +1 -1
- package/templates/storefront-fashion/app/categories/[slug]/page.tsx +2 -2
- package/templates/storefront-fashion/app/collections/[slug]/page.tsx +2 -2
- package/templates/storefront-fashion/app/llms.txt/route.ts +2 -2
- package/templates/storefront-fashion/app/page.tsx +2 -2
- package/templates/storefront-fashion/app/products/[slug]/page.tsx +2 -2
- package/templates/storefront-fashion/app/shop/page.tsx +2 -2
- package/templates/storefront-fashion/app/sitemap-page/page.tsx +2 -2
- package/templates/storefront-fashion/bun.lock +2 -2
- package/templates/storefront-fashion/package.json +1 -1
- package/templates/storefront-grocery/app/categories/[slug]/page.tsx +2 -2
- package/templates/storefront-grocery/app/collections/[slug]/page.tsx +2 -2
- package/templates/storefront-grocery/app/llms.txt/route.ts +2 -2
- package/templates/storefront-grocery/app/page.tsx +2 -2
- package/templates/storefront-grocery/app/shop/page.tsx +2 -2
- package/templates/storefront-grocery/app/sitemap-page/page.tsx +2 -2
- package/templates/storefront-grocery/bun.lock +2 -2
- package/templates/storefront-grocery/package.json +1 -1
- package/templates/storefront-pharmacy/app/categories/[slug]/page.tsx +2 -2
- package/templates/storefront-pharmacy/app/collections/[slug]/page.tsx +2 -2
- package/templates/storefront-pharmacy/app/llms.txt/route.ts +2 -2
- package/templates/storefront-pharmacy/app/page.tsx +2 -2
- package/templates/storefront-pharmacy/app/products/[slug]/page.tsx +2 -2
- package/templates/storefront-pharmacy/app/shop/page.tsx +2 -2
- package/templates/storefront-pharmacy/app/sitemap-page/page.tsx +2 -2
- package/templates/storefront-pharmacy/bun.lock +2 -2
- package/templates/storefront-pharmacy/package.json +1 -1
- package/templates/storefront-restaurant/app/categories/[slug]/page.tsx +2 -2
- package/templates/storefront-restaurant/app/collections/[slug]/page.tsx +2 -2
- package/templates/storefront-restaurant/app/llms.txt/route.ts +2 -2
- package/templates/storefront-restaurant/app/page.tsx +2 -2
- package/templates/storefront-restaurant/app/reservations/page.tsx +2 -2
- package/templates/storefront-restaurant/app/shop/page.tsx +2 -2
- package/templates/storefront-restaurant/app/sitemap-page/page.tsx +2 -2
- package/templates/storefront-restaurant/bun.lock +2 -2
- package/templates/storefront-restaurant/package.json +1 -1
- package/templates/storefront-retail/app/categories/[slug]/page.tsx +2 -2
- package/templates/storefront-retail/app/collections/[slug]/page.tsx +2 -2
- package/templates/storefront-retail/app/llms.txt/route.ts +2 -2
- package/templates/storefront-retail/app/page.tsx +2 -2
- package/templates/storefront-retail/app/products/[slug]/page.tsx +2 -2
- package/templates/storefront-retail/app/shop/page.tsx +2 -2
- package/templates/storefront-retail/app/sitemap-page/page.tsx +2 -2
- package/templates/storefront-retail/bun.lock +2 -2
- package/templates/storefront-retail/package.json +1 -1
- package/templates/storefront-services/app/book/page.tsx +2 -2
- package/templates/storefront-services/app/categories/[slug]/page.tsx +2 -2
- package/templates/storefront-services/app/collections/[slug]/page.tsx +2 -2
- package/templates/storefront-services/app/llms.txt/route.ts +2 -2
- package/templates/storefront-services/app/page.tsx +2 -2
- package/templates/storefront-services/app/shop/page.tsx +2 -2
- package/templates/storefront-services/app/sitemap-page/page.tsx +2 -2
- package/templates/storefront-services/bun.lock +2 -2
- package/templates/storefront-services/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { gitDetectRoot, gitCurrentBranch, gitCurrentSha, gitStatusPorcelain } from './chunk-K5464A3L.mjs';
|
|
3
3
|
import { parseEnvFile } from './chunk-DBZ3UOQ2.mjs';
|
|
4
|
-
import { package_default } from './chunk-
|
|
4
|
+
import { package_default } from './chunk-KCKMGRII.mjs';
|
|
5
5
|
import { parseArgs } from './chunk-C4M3DXKC.mjs';
|
|
6
6
|
import { readAuthOrNull, readProjectLinkOrNull, readProjectState } from './chunk-UBAI443T.mjs';
|
|
7
7
|
import { bold, dim, yellow, green, info, result, red } from './chunk-E2T2SBP5.mjs';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// package.json
|
|
3
3
|
var package_default = {
|
|
4
4
|
name: "@cimplify/cli",
|
|
5
|
-
version: "0.6.
|
|
5
|
+
version: "0.6.16",
|
|
6
6
|
description: "Cimplify CLI \u2014 deploy, manage env vars, link projects, and scaffold storefronts",
|
|
7
7
|
keywords: [
|
|
8
8
|
"cimplify",
|
|
@@ -47,7 +47,7 @@ var package_default = {
|
|
|
47
47
|
vitest: "^4.1.5"
|
|
48
48
|
},
|
|
49
49
|
dependencies: {
|
|
50
|
-
"@cimplify/sdk": "^0.49.
|
|
50
|
+
"@cimplify/sdk": "^0.49.2"
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
|
package/dist/dispatcher.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { TEMPLATES } from './chunk-
|
|
3
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { TEMPLATES } from './chunk-F5EGUNQZ.mjs';
|
|
3
|
+
import { package_default } from './chunk-KCKMGRII.mjs';
|
|
4
4
|
|
|
5
5
|
// src/dispatcher.ts
|
|
6
6
|
var VERSION = package_default.version ?? "unknown";
|
|
@@ -138,16 +138,16 @@ var COMMANDS = {
|
|
|
138
138
|
logs: () => import('./logs-YNN2PQ24.mjs'),
|
|
139
139
|
status: () => import('./status-JSYXM5RT.mjs'),
|
|
140
140
|
dev: () => import('./dev-ONW2S77K.mjs'),
|
|
141
|
-
introspect: () => import('./introspect-
|
|
141
|
+
introspect: () => import('./introspect-QOW24PJF.mjs'),
|
|
142
142
|
inspect: () => import('./inspect-CGYX4DDF.mjs'),
|
|
143
|
-
doctor: () => import('./doctor-
|
|
144
|
-
explain: () => import('./explain-
|
|
143
|
+
doctor: () => import('./doctor-T6NA3EMW.mjs'),
|
|
144
|
+
explain: () => import('./explain-22NV6OL6.mjs'),
|
|
145
145
|
assets: () => import('./assets-74SK63TR.mjs'),
|
|
146
146
|
repo: () => import('./repo-KNQMSPVV.mjs'),
|
|
147
|
-
list: () => import('./list-
|
|
148
|
-
add: () => import('./add-
|
|
149
|
-
update: () => import('./update-
|
|
150
|
-
upgrade: () => import('./update-
|
|
147
|
+
list: () => import('./list-JHUIIMC2.mjs'),
|
|
148
|
+
add: () => import('./add-BBVSJ5ZJ.mjs'),
|
|
149
|
+
update: () => import('./update-IOMLDQEN.mjs'),
|
|
150
|
+
upgrade: () => import('./update-IOMLDQEN.mjs'),
|
|
151
151
|
"auth-step-up": () => import('./auth-step-up-BIUYQJP6.mjs')
|
|
152
152
|
};
|
|
153
153
|
var COMMAND_PREFIXES = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { gatherIntrospection } from './chunk-
|
|
2
|
+
import { gatherIntrospection } from './chunk-GL2J7272.mjs';
|
|
3
3
|
import './chunk-K5464A3L.mjs';
|
|
4
4
|
import './chunk-DBZ3UOQ2.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-KCKMGRII.mjs';
|
|
6
6
|
import { parseArgs, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
7
7
|
import { ApiClient } from './chunk-MAOO6ZZ5.mjs';
|
|
8
8
|
import { readAuthOrNull } from './chunk-UBAI443T.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-KCKMGRII.mjs';
|
|
3
3
|
import { parseArgs } from './chunk-C4M3DXKC.mjs';
|
|
4
4
|
import { bold, dim, info, result, CliError, CLI_ERROR_CODE } from './chunk-E2T2SBP5.mjs';
|
|
5
5
|
|
|
@@ -157,7 +157,7 @@ var TOPICS = [
|
|
|
157
157
|
"title": "Revalidation",
|
|
158
158
|
"description": "Canonical cimplify:* cache-tag vocabulary + revalidate helpers",
|
|
159
159
|
"source_url": "https://cimplify.dev/docs/sdk/revalidation",
|
|
160
|
-
"body": 'Cimplify storefronts cache catalogue reads with Next 16\'s `\'use cache\'` + `cacheTag`. When the merchant edits a product, collection, or brand asset, Cimplify POSTs to your storefront\'s `/api/revalidate` with the canonical tag set, and your handler calls `revalidateTag(tag)` for each.\n\nThis page is the canonical contract between Cimplify and your storefront. Use the typed helpers \u2014 never hand-write tag strings \u2014 so the scheme stays in one place.\n\n## Tags\n\nAll tags are namespaced under `cimplify:` so they can\'t collide with consumer tags. Build them via `tags` from `@cimplify/sdk/server`:\n\n```ts\n\n// In a cached server function:\nasync function getProducts() {\n "use cache";\n cacheTag(tags.products());\n cacheLife("hours");\n // \u2026\n}\n```\n\n### Catalogue\n\n| Helper | Tag |\n| --- | --- |\n| `tags.products()` | `cimplify:products` |\n| `tags.product(id)` | `cimplify:product:{id}` |\n| `tags.categories()` | `cimplify:categories` |\n| `tags.category(id)` | `cimplify:category:{id}` |\n| `tags.categoryProducts(id)` | `cimplify:category:{id}:products` |\n| `tags.collections()` | `cimplify:collections` |\n| `tags.collection(id)` | `cimplify:collection:{id}` |\n| `tags.collectionProducts(id)` | `cimplify:collection:{id}:products` |\n| `tags.tag(name)` | `cimplify:tag:{name}` (product tag, e.g. "vegan") |\n| `tags.addons()` | `cimplify:addons` |\n| `tags.addon(id)` | `cimplify:addon:{id}` |\n| `tags.stock()` | `cimplify:stock` |\n| `tags.stockFor(productId)` | `cimplify:stock:{productId}` |\n\n### Brand / business\n\n| Helper | Tag |\n| --- | --- |\n| `tags.business()` | `cimplify:business` |\n| `tags.brand()` | `cimplify:brand` |\n| `tags.locations()` | `cimplify:locations` |\n| `tags.location(id)` | `cimplify:location:{id}` |\n| `tags.locale()` | `cimplify:locale` |\n\n### Pricing / subscriptions\n\n| Helper | Tag |\n| --- | --- |\n| `tags.pricing()` | `cimplify:pricing` |\n| `tags.subscriptions()` | `cimplify:subscriptions` |\n| `tags.subscription(id)` | `cimplify:subscription:{id}` |\n\n### Customer-scoped (Server Actions only)\n\n| Helper | Tag |\n| --- | --- |\n| `tags.orders(customerId)` | `cimplify:orders:{customerId}` |\n| `tags.order(id)` | `cimplify:order:{id}` |\n\n## Granularity\n\nTag with **both** a broad and a precise tag on every read so either-flavour invalidation works:\n\n```ts\ncacheTag(tags.products(), tags.product(id));\n```\n\nThe broad tag (`products`) catches "I changed something product-related, invalidate everything." The precise tag (`product:{id}`) catches "I changed exactly this one product, invalidate only its entries."\n\n## Revalidating from a Server Action\n\n```ts\n\nexport async function saveProduct(id: string, data: ProductInput) {\n await client.catalogue.updateProduct(id, data);\n await revalidateProduct(id);\n}\n```\n\nHelpers:\n\n| Helper | Invalidates |\n| --- | --- |\n| `revalidateProducts()` | `products` |\n| `revalidateProduct(id)` | `product:{id}` + `products` |\n| `revalidateCategories()` | `categories` |\n| `revalidateCategory(id)` | `category:{id}` + `category:{id}:products` + `categories` |\n| `revalidateCollections()` | `collections` |\n| `revalidateCollection(id)` | `collection:{id}` + `collection:{id}:products` + `collections` |\n| `revalidateBusiness()` | `business` |\n| `revalidateBrand()` | `brand` |\n| `revalidateLocations()` | `locations` |\n| `revalidateLocation(id)` | `location:{id}` + `locations` |\n| `revalidatePricing()` | `pricing` + `products` |\n| `revalidateAddOns()` | `addons` |\n| `revalidateAddOn(id)` | `addon:{id}` + `addons` |\n| `revalidateSubscriptions()` | `subscriptions` |\n| `revalidateSubscription(id)` | `subscription:{id}` + `subscriptions` |\n| `revalidateStock(productId?)` | `stock:{productId}` + `stock` (or just `stock` if no id) |\n| `revalidateByTag(tag)` | escape hatch for a raw tag |\n\n## The Cimplify \u2192 storefront contract\n\nWhen a merchant edits something in the dashboard, Cimplify POSTs to your storefront\'s `/api/revalidate` with the matching tag set:\n\n```http\nPOST /api/revalidate\nx-cimplify-timestamp: 1716480000000\nx-cimplify-signature: sha256=<hex>\ncontent-type: application/json\n\n{ "tags": ["cimplify:products", "cimplify:product:p_abc123"] }\n```\n\nYour handler verifies the HMAC (shared secret in `CIMPLIFY_REVALIDATE_SECRET`), iterates `revalidateTag(tag)` for each, and returns 200. The route handler ships in every Cimplify storefront template \u2014 you don\'t write it.\n\nThe tags Cimplify sends use the **exact strings** from this table. If you\'ve tagged your caches with the helpers above, your storefront stays in sync automatically.\n\n## Dynamic routes \u2014 tag by **ID**, never by slug\n\nCimplify dispatches revalidation tags **keyed by database ID**, not by URL slug. A `/products/[slug]` page that caches itself under `tags.product(slug)` will never be invalidated by an edit \u2014 the tag the storefront wrote doesn\'t match the tag Cimplify fires.\n\nAlways resolve the slug to a record first, then tag with `record.id`. Next 16 lets you call `cacheTag` **after** an `await`, so this is one function, not two:\n\n```ts title="app/products/[slug]/page.tsx \u2014 correct"\n\nasync function getProduct(slug: string) {\n "use cache";\n cacheLife(
|
|
160
|
+
"body": 'Cimplify storefronts cache catalogue reads with Next 16\'s `\'use cache\'` + `cacheTag`. When the merchant edits a product, collection, or brand asset, Cimplify POSTs to your storefront\'s `/api/revalidate` with the canonical tag set, and your handler calls `revalidateTag(tag)` for each.\n\nThis page is the canonical contract between Cimplify and your storefront. Use the typed helpers \u2014 never hand-write tag strings \u2014 so the scheme stays in one place.\n\n## Tags\n\nAll tags are namespaced under `cimplify:` so they can\'t collide with consumer tags. Build them via `tags` from `@cimplify/sdk/server`:\n\n```ts\n\n// In a cached server function:\nasync function getProducts() {\n "use cache";\n cacheTag(tags.products());\n cacheLife("hours");\n // \u2026\n}\n```\n\n### Catalogue\n\n| Helper | Tag |\n| --- | --- |\n| `tags.products()` | `cimplify:products` |\n| `tags.product(id)` | `cimplify:product:{id}` |\n| `tags.categories()` | `cimplify:categories` |\n| `tags.category(id)` | `cimplify:category:{id}` |\n| `tags.categoryProducts(id)` | `cimplify:category:{id}:products` |\n| `tags.collections()` | `cimplify:collections` |\n| `tags.collection(id)` | `cimplify:collection:{id}` |\n| `tags.collectionProducts(id)` | `cimplify:collection:{id}:products` |\n| `tags.tag(name)` | `cimplify:tag:{name}` (product tag, e.g. "vegan") |\n| `tags.addons()` | `cimplify:addons` |\n| `tags.addon(id)` | `cimplify:addon:{id}` |\n| `tags.stock()` | `cimplify:stock` |\n| `tags.stockFor(productId)` | `cimplify:stock:{productId}` |\n\n### Brand / business\n\n| Helper | Tag |\n| --- | --- |\n| `tags.business()` | `cimplify:business` |\n| `tags.brand()` | `cimplify:brand` |\n| `tags.locations()` | `cimplify:locations` |\n| `tags.location(id)` | `cimplify:location:{id}` |\n| `tags.locale()` | `cimplify:locale` |\n\n### Pricing / subscriptions\n\n| Helper | Tag |\n| --- | --- |\n| `tags.pricing()` | `cimplify:pricing` |\n| `tags.subscriptions()` | `cimplify:subscriptions` |\n| `tags.subscription(id)` | `cimplify:subscription:{id}` |\n\n### Customer-scoped (Server Actions only)\n\n| Helper | Tag |\n| --- | --- |\n| `tags.orders(customerId)` | `cimplify:orders:{customerId}` |\n| `tags.order(id)` | `cimplify:order:{id}` |\n\n## Granularity\n\nTag with **both** a broad and a precise tag on every read so either-flavour invalidation works:\n\n```ts\ncacheTag(tags.products(), tags.product(id));\n```\n\nThe broad tag (`products`) catches "I changed something product-related, invalidate everything." The precise tag (`product:{id}`) catches "I changed exactly this one product, invalidate only its entries."\n\n## Revalidating from a Server Action\n\n```ts\n\nexport async function saveProduct(id: string, data: ProductInput) {\n await client.catalogue.updateProduct(id, data);\n await revalidateProduct(id);\n}\n```\n\nHelpers:\n\n| Helper | Invalidates |\n| --- | --- |\n| `revalidateProducts()` | `products` |\n| `revalidateProduct(id)` | `product:{id}` + `products` |\n| `revalidateCategories()` | `categories` |\n| `revalidateCategory(id)` | `category:{id}` + `category:{id}:products` + `categories` |\n| `revalidateCollections()` | `collections` |\n| `revalidateCollection(id)` | `collection:{id}` + `collection:{id}:products` + `collections` |\n| `revalidateBusiness()` | `business` |\n| `revalidateBrand()` | `brand` |\n| `revalidateLocations()` | `locations` |\n| `revalidateLocation(id)` | `location:{id}` + `locations` |\n| `revalidatePricing()` | `pricing` + `products` |\n| `revalidateAddOns()` | `addons` |\n| `revalidateAddOn(id)` | `addon:{id}` + `addons` |\n| `revalidateSubscriptions()` | `subscriptions` |\n| `revalidateSubscription(id)` | `subscription:{id}` + `subscriptions` |\n| `revalidateStock(productId?)` | `stock:{productId}` + `stock` (or just `stock` if no id) |\n| `revalidateByTag(tag)` | escape hatch for a raw tag |\n\n## The Cimplify \u2192 storefront contract\n\nWhen a merchant edits something in the dashboard, Cimplify POSTs to your storefront\'s `/api/revalidate` with the matching tag set:\n\n```http\nPOST /api/revalidate\nx-cimplify-timestamp: 1716480000000\nx-cimplify-signature: sha256=<hex>\ncontent-type: application/json\n\n{ "tags": ["cimplify:products", "cimplify:product:p_abc123"] }\n```\n\nYour handler verifies the HMAC (shared secret in `CIMPLIFY_REVALIDATE_SECRET`), iterates `revalidateTag(tag)` for each, and returns 200. The route handler ships in every Cimplify storefront template \u2014 you don\'t write it.\n\nThe tags Cimplify sends use the **exact strings** from this table. If you\'ve tagged your caches with the helpers above, your storefront stays in sync automatically.\n\n## Dynamic routes \u2014 tag by **ID**, never by slug\n\nCimplify dispatches revalidation tags **keyed by database ID**, not by URL slug. A `/products/[slug]` page that caches itself under `tags.product(slug)` will never be invalidated by an edit \u2014 the tag the storefront wrote doesn\'t match the tag Cimplify fires.\n\nAlways resolve the slug to a record first, then tag with `record.id`. Next 16 lets you call `cacheTag` **after** an `await`, so this is one function, not two:\n\n```ts title="app/products/[slug]/page.tsx \u2014 correct"\n\nasync function getProduct(slug: string) {\n "use cache";\n cacheLife(CACHE_LIFE_DEFAULT);\n\n const r = await getServerClient().catalogue.getProductBySlug(slug);\n if (!r.ok) {\n // 404s tagged at the collection level so deleting + re-creating works.\n cacheTag(tags.products());\n return null;\n }\n\n // Tag with the resolved ID so revalidateProduct(id) from Cimplify hits.\n cacheTag(tags.product(r.value.id), tags.products());\n return r.value;\n}\n```\n\nThe same pattern applies to `[slug]` routes for categories, collections, addons, locations, and so on \u2014 always tag with the resolved `record.id`, never with the URL slug.\n\n### Why this matters\n\n- **Renames don\'t orphan.** The cache key is keyed on the slug (the function argument), so a renamed product gets a fresh cache entry under the new slug. The old slug-keyed entry is invalidated via the `tags.products()` collection tag and will 404 naturally.\n- **IDs are stable.** Cimplify\'s bus emits `ProductUpdated { id }` events; the slug isn\'t on the event payload, and adding it would create races with concurrent rename. Keeping the tag scheme ID-only keeps the contract simple.\n- **You get instant freshness.** With Cimplify\'s tag-cache + CDN-purge in place, a `CACHE_LIFE_DEFAULT` (`"max"`) entry can sit cached for days and still flip fresh within ~1s of an edit \u2014 but only if the tag actually matches.\n\n## `cacheLife` \u2014 use the SDK constants\n\nImport `CACHE_LIFE_DEFAULT` from `@cimplify/sdk/server` instead of passing the literal `"max"` to `cacheLife(...)`. Two reasons:\n\n- **Type-safe.** Next\'s `cacheLife(profile: string)` overload accepts any string \u2014 `cacheLife("maxx")` is silently treated as a custom-profile lookup at runtime. The SDK export is `"max" as const`, so a typo fails at the import site.\n- **Cimplify can change the recommendation later** without sweeping every storefront. Bump the SDK; templates pick up the new default on next deploy.\n\n| Use case | Constant | Resolves to |\n| --- | --- | --- |\n| Cached read with real data | `CACHE_LIFE_DEFAULT` | `"max"` (stale 5min, revalidate 30d, never expires) |\n| Cached read returned empty/error \u2014 **don\'t lock it in** | `CACHE_LIFE_PROBE` | `"seconds"` (stale 30s, revalidate 1s, expires 1min) |\n\nAnything Cimplify owns invalidates on-demand within ~1s, so short timer-based profiles aren\'t needed for Cimplify data. Override only when caching third-party APIs Cimplify can\'t see (a weather widget, an external CMS) \u2014 for those, pick a timer-based profile yourself.\n\n## Don\'t cache emptiness\n\nThe combination of long `cacheLife` + on-demand-only invalidation creates a real failure mode: **if a render produces empty results because of a transient backend hiccup, that empty render gets cached for the full `CACHE_LIFE_DEFAULT` window.** No timer expires it; no bus event invalidates it (because nothing actually changed in the database). Every visitor sees an empty storefront until someone manually triggers a revalidation.\n\nThe fix is a two-line guard in every cached fetch \u2014 branch on whether the result has real data, and only commit to `CACHE_LIFE_DEFAULT` when it does:\n\n```ts title="app/shop/page.tsx \u2014 listings"\n CACHE_LIFE_DEFAULT,\n CACHE_LIFE_PROBE,\n getServerClient,\n tags,\n} from "@cimplify/sdk/server";\n\nasync function getProducts() {\n "use cache";\n cacheTag(tags.products(), tags.categories());\n\n const r = await getServerClient().catalogue.getProducts();\n // Empty or failed? Don\'t lock the empty render in for "max" \u2014 a brief\n // backend blip would otherwise sit cached for the full window.\n if (!r.ok || r.value.items.length === 0) {\n cacheLife(CACHE_LIFE_PROBE);\n return r;\n }\n cacheLife(CACHE_LIFE_DEFAULT);\n return r;\n}\n```\n\nThe tag still gets attached either way, so a real `revalidateTag(...)` from Cimplify still drops the entry the moment the underlying data changes. The probe profile just means: if the merchant doesn\'t trigger an invalidation, the cache self-heals within a minute the next time someone visits.\n\nApply this pattern to **every** `\'use cache\'` helper that hits Cimplify \u2014 detail pages, listings, brand reads, location lookups. It\'s cheap and makes the cache impossible to poison with a transient empty.\n\n## Tag taxonomy is locked\n\nThe vocabulary above is the v1 contract. Adding new tag helpers is non-breaking; removing or renaming any of them bumps the SDK major version. Agents that bake these strings into prompts can pin to v0.x of `@cimplify/sdk`.\n'
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
"name": "inspect-suggestions",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { run as default, extractMockSeed, gatherIntrospection, renderIntrospection } from './chunk-
|
|
2
|
+
export { run as default, extractMockSeed, gatherIntrospection, renderIntrospection } from './chunk-GL2J7272.mjs';
|
|
3
3
|
import './chunk-K5464A3L.mjs';
|
|
4
4
|
import './chunk-DBZ3UOQ2.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-KCKMGRII.mjs';
|
|
6
6
|
import './chunk-C4M3DXKC.mjs';
|
|
7
7
|
import './chunk-UBAI443T.mjs';
|
|
8
8
|
import './chunk-E2T2SBP5.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { REGISTRY_INDEX } from './chunk-
|
|
2
|
+
import { REGISTRY_INDEX } from './chunk-F5EGUNQZ.mjs';
|
|
3
3
|
import { parseArgs, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
4
4
|
import { CliError, CLI_ERROR_CODE, info, bold, dim, green, result } from './chunk-E2T2SBP5.mjs';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-KCKMGRII.mjs';
|
|
3
3
|
import { promptYesNo } from './chunk-ITAFAORS.mjs';
|
|
4
4
|
import { parseArgs, flagBool, flagString } from './chunk-C4M3DXKC.mjs';
|
|
5
5
|
import { success, bold, info, dim, result, failure, CliError, CLI_ERROR_CODE, step, isJsonMode } from './chunk-E2T2SBP5.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cimplify/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.16",
|
|
4
4
|
"description": "Cimplify CLI — deploy, manage env vars, link projects, and scaffold storefronts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cimplify",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
"vitest": "^4.1.5"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@cimplify/sdk": "^0.49.
|
|
48
|
+
"@cimplify/sdk": "^0.49.2"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -4,7 +4,7 @@ import Link from "next/link";
|
|
|
4
4
|
import { notFound } from "next/navigation";
|
|
5
5
|
import { cacheTag, cacheLife } from "next/cache";
|
|
6
6
|
import {
|
|
7
|
-
getServerClient,
|
|
7
|
+
CACHE_LIFE_DEFAULT, getServerClient,
|
|
8
8
|
tags,
|
|
9
9
|
type Category,
|
|
10
10
|
type Product,
|
|
@@ -20,7 +20,7 @@ interface CategoryData {
|
|
|
20
20
|
async function getCategory(slug: string): Promise<CategoryData | null> {
|
|
21
21
|
"use cache";
|
|
22
22
|
cacheTag(tags.categories());
|
|
23
|
-
cacheLife(
|
|
23
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
24
24
|
|
|
25
25
|
const client = getServerClient();
|
|
26
26
|
const catRes = await client.catalogue.getCategoryBySlug(slug);
|
|
@@ -4,7 +4,7 @@ import Link from "next/link";
|
|
|
4
4
|
import { notFound } from "next/navigation";
|
|
5
5
|
import { cacheTag, cacheLife } from "next/cache";
|
|
6
6
|
import {
|
|
7
|
-
getServerClient,
|
|
7
|
+
CACHE_LIFE_DEFAULT, getServerClient,
|
|
8
8
|
tags,
|
|
9
9
|
type Collection,
|
|
10
10
|
type Product,
|
|
@@ -20,7 +20,7 @@ interface CollectionData {
|
|
|
20
20
|
async function getCollection(slug: string): Promise<CollectionData | null> {
|
|
21
21
|
"use cache";
|
|
22
22
|
cacheTag(tags.collections());
|
|
23
|
-
cacheLife(
|
|
23
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
24
24
|
|
|
25
25
|
const client = getServerClient();
|
|
26
26
|
const colRes = await client.catalogue.getCollectionBySlug(slug);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { cacheTag, cacheLife } from "next/cache";
|
|
2
|
-
import { getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
2
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
3
3
|
import { brand } from "@/lib/brand";
|
|
4
4
|
import { getSiteUrl } from "@/lib/site-url";
|
|
5
5
|
|
|
6
6
|
async function buildLlmsTxt(SITE_URL: string): Promise<string> {
|
|
7
7
|
"use cache";
|
|
8
8
|
cacheTag(tags.products(), tags.categories(), tags.collections());
|
|
9
|
-
cacheLife(
|
|
9
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
10
10
|
|
|
11
11
|
const client = getServerClient();
|
|
12
12
|
const [productsRes, categoriesRes, collectionsRes] = await Promise.all([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import { Suspense } from "react";
|
|
3
3
|
import { cacheTag, cacheLife } from "next/cache";
|
|
4
|
-
import { getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
4
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
5
5
|
import { AutoHero } from "@/components/auto-hero";
|
|
6
6
|
import { FitmentFinder } from "@/components/fitment-finder";
|
|
7
7
|
import { TrustBar } from "@/components/trust-bar";
|
|
@@ -19,7 +19,7 @@ export const metadata: Metadata = {
|
|
|
19
19
|
async function getHomeData() {
|
|
20
20
|
"use cache";
|
|
21
21
|
cacheTag(tags.products());
|
|
22
|
-
cacheLife(
|
|
22
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
23
23
|
|
|
24
24
|
const client = getServerClient();
|
|
25
25
|
const productsRes = await client.catalogue.getProducts({ limit: 12 });
|
|
@@ -4,7 +4,7 @@ import { notFound } from "next/navigation";
|
|
|
4
4
|
import Link from "next/link";
|
|
5
5
|
import { cacheTag, cacheLife } from "next/cache";
|
|
6
6
|
import {
|
|
7
|
-
getServerClient,
|
|
7
|
+
CACHE_LIFE_DEFAULT, getServerClient,
|
|
8
8
|
tags,
|
|
9
9
|
type Product,
|
|
10
10
|
type ProductWithDetails,
|
|
@@ -43,7 +43,7 @@ interface ProductData {
|
|
|
43
43
|
|
|
44
44
|
async function getProduct(slug: string): Promise<ProductData | null> {
|
|
45
45
|
"use cache";
|
|
46
|
-
cacheLife(
|
|
46
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
47
47
|
|
|
48
48
|
const client = getServerClient();
|
|
49
49
|
const r = await client.catalogue.getProductBySlug(slug);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import { Suspense } from "react";
|
|
3
3
|
import { cacheTag, cacheLife } from "next/cache";
|
|
4
|
-
import { getServerClient, tags } from "@cimplify/sdk/server";
|
|
4
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags } from "@cimplify/sdk/server";
|
|
5
5
|
import { ShopClient } from "./shop-client";
|
|
6
6
|
import { brand } from "@/lib/brand";
|
|
7
7
|
|
|
@@ -13,7 +13,7 @@ export const metadata: Metadata = {
|
|
|
13
13
|
async function getShopData() {
|
|
14
14
|
"use cache";
|
|
15
15
|
cacheTag(tags.products(), tags.categories());
|
|
16
|
-
cacheLife(
|
|
16
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
17
17
|
|
|
18
18
|
const client = getServerClient();
|
|
19
19
|
const [p, c] = await Promise.all([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import Link from "next/link";
|
|
3
3
|
import { cacheTag, cacheLife } from "next/cache";
|
|
4
|
-
import { getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
4
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
5
5
|
import { brand } from "@/lib/brand";
|
|
6
6
|
|
|
7
7
|
export const metadata: Metadata = {
|
|
@@ -18,7 +18,7 @@ interface SitemapData {
|
|
|
18
18
|
async function getSitemap(): Promise<SitemapData> {
|
|
19
19
|
"use cache";
|
|
20
20
|
cacheTag(tags.products(), tags.categories(), tags.collections());
|
|
21
|
-
cacheLife(
|
|
21
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
22
22
|
|
|
23
23
|
const client = getServerClient();
|
|
24
24
|
const [pRes, cRes, colRes] = await Promise.all([
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "__STOREFRONT_NAME__",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@cimplify/sdk": "^0.49.
|
|
8
|
+
"@cimplify/sdk": "^0.49.2",
|
|
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.49.
|
|
34
|
+
"@cimplify/sdk": ["@cimplify/sdk@0.49.2", "", { "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-W/PtzLztRYOPo4LCKmTvejfz56CQZUflXSdSshYl6ft1q17BIy8bnzfplbYnojiQb5OiCWr0FAzG68S2tvO93w=="],
|
|
35
35
|
|
|
36
36
|
"@date-fns/tz": ["@date-fns/tz@1.4.1", "", {}, "sha512-P5LUNhtbj6YfI3iJjw5EL9eUAG6OitD0W3fWQcpQjDRc/QIsL0tRNuO1PcDvPccWL1fSTXXdE1ds+l95DV/OFA=="],
|
|
37
37
|
|
|
@@ -4,7 +4,7 @@ import Link from "next/link";
|
|
|
4
4
|
import { notFound } from "next/navigation";
|
|
5
5
|
import { cacheTag, cacheLife } from "next/cache";
|
|
6
6
|
import {
|
|
7
|
-
getServerClient,
|
|
7
|
+
CACHE_LIFE_DEFAULT, getServerClient,
|
|
8
8
|
tags,
|
|
9
9
|
type Category,
|
|
10
10
|
type Product,
|
|
@@ -20,7 +20,7 @@ interface CategoryData {
|
|
|
20
20
|
async function getCategory(slug: string): Promise<CategoryData | null> {
|
|
21
21
|
"use cache";
|
|
22
22
|
cacheTag(tags.categories());
|
|
23
|
-
cacheLife(
|
|
23
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
24
24
|
|
|
25
25
|
const client = getServerClient();
|
|
26
26
|
const catRes = await client.catalogue.getCategoryBySlug(slug);
|
|
@@ -4,7 +4,7 @@ import Link from "next/link";
|
|
|
4
4
|
import { notFound } from "next/navigation";
|
|
5
5
|
import { cacheTag, cacheLife } from "next/cache";
|
|
6
6
|
import {
|
|
7
|
-
getServerClient,
|
|
7
|
+
CACHE_LIFE_DEFAULT, getServerClient,
|
|
8
8
|
tags,
|
|
9
9
|
type Collection,
|
|
10
10
|
type Product,
|
|
@@ -20,7 +20,7 @@ interface CollectionData {
|
|
|
20
20
|
async function getCollection(slug: string): Promise<CollectionData | null> {
|
|
21
21
|
"use cache";
|
|
22
22
|
cacheTag(tags.collections());
|
|
23
|
-
cacheLife(
|
|
23
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
24
24
|
|
|
25
25
|
const client = getServerClient();
|
|
26
26
|
const colRes = await client.catalogue.getCollectionBySlug(slug);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { cacheTag, cacheLife } from "next/cache";
|
|
2
|
-
import { getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
2
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
3
3
|
import { brand } from "@/lib/brand";
|
|
4
4
|
import { getSiteUrl } from "@/lib/site-url";
|
|
5
5
|
|
|
6
6
|
async function buildLlmsTxt(SITE_URL: string): Promise<string> {
|
|
7
7
|
"use cache";
|
|
8
8
|
cacheTag(tags.products(), tags.categories(), tags.collections());
|
|
9
|
-
cacheLife(
|
|
9
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
10
10
|
|
|
11
11
|
const client = getServerClient();
|
|
12
12
|
const [productsRes, categoriesRes, collectionsRes] = await Promise.all([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import { Suspense } from "react";
|
|
3
3
|
import { cacheTag, cacheLife } from "next/cache";
|
|
4
|
-
import { getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
4
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
5
5
|
import { Hero } from "@/components/hero";
|
|
6
6
|
import { CollectionStrip } from "@/components/collection-strip";
|
|
7
7
|
import { CategoryGrid } from "@/components/category-grid";
|
|
@@ -15,7 +15,7 @@ export const metadata: Metadata = {
|
|
|
15
15
|
async function getHomeData() {
|
|
16
16
|
"use cache";
|
|
17
17
|
cacheTag(tags.collections(), tags.categories(), tags.products());
|
|
18
|
-
cacheLife(
|
|
18
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
19
19
|
|
|
20
20
|
const client = getServerClient();
|
|
21
21
|
const [colRes, catRes] = await Promise.all([
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import { cacheTag, cacheLife } from "next/cache";
|
|
3
|
-
import { getServerClient, tags } from "@cimplify/sdk/server";
|
|
3
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags } from "@cimplify/sdk/server";
|
|
4
4
|
import { ShopClient } from "./shop-client";
|
|
5
5
|
import { brand } from "@/lib/brand";
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ export const metadata: Metadata = {
|
|
|
12
12
|
async function getShopData() {
|
|
13
13
|
"use cache";
|
|
14
14
|
cacheTag(tags.products(), tags.categories());
|
|
15
|
-
cacheLife(
|
|
15
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
16
16
|
|
|
17
17
|
const client = getServerClient();
|
|
18
18
|
const [p, c] = await Promise.all([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import Link from "next/link";
|
|
3
3
|
import { cacheTag, cacheLife } from "next/cache";
|
|
4
|
-
import { getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
4
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
5
5
|
import { brand } from "@/lib/brand";
|
|
6
6
|
|
|
7
7
|
export const metadata: Metadata = {
|
|
@@ -18,7 +18,7 @@ interface SitemapData {
|
|
|
18
18
|
async function getSitemap(): Promise<SitemapData> {
|
|
19
19
|
"use cache";
|
|
20
20
|
cacheTag(tags.products(), tags.categories(), tags.collections());
|
|
21
|
-
cacheLife(
|
|
21
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
22
22
|
|
|
23
23
|
const client = getServerClient();
|
|
24
24
|
const [pRes, cRes, colRes] = await Promise.all([
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "__STOREFRONT_NAME__",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@cimplify/sdk": "^0.49.
|
|
8
|
+
"@cimplify/sdk": "^0.49.2",
|
|
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.49.
|
|
34
|
+
"@cimplify/sdk": ["@cimplify/sdk@0.49.2", "", { "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-W/PtzLztRYOPo4LCKmTvejfz56CQZUflXSdSshYl6ft1q17BIy8bnzfplbYnojiQb5OiCWr0FAzG68S2tvO93w=="],
|
|
35
35
|
|
|
36
36
|
"@date-fns/tz": ["@date-fns/tz@1.5.0", "", {}, "sha512-lwYN/vDPeNRULcepoE/LO2Pgx+7/RV+S9ARfbc9lr2DtGkOD7pAiruHvbR1RX3Qyf6ja47EWJDMsNK5vK08DJg=="],
|
|
37
37
|
|
|
@@ -4,7 +4,7 @@ import Link from "next/link";
|
|
|
4
4
|
import { notFound } from "next/navigation";
|
|
5
5
|
import { cacheTag, cacheLife } from "next/cache";
|
|
6
6
|
import {
|
|
7
|
-
getServerClient,
|
|
7
|
+
CACHE_LIFE_DEFAULT, getServerClient,
|
|
8
8
|
tags,
|
|
9
9
|
type Category,
|
|
10
10
|
type Product,
|
|
@@ -20,7 +20,7 @@ interface CategoryData {
|
|
|
20
20
|
async function getCategory(slug: string): Promise<CategoryData | null> {
|
|
21
21
|
"use cache";
|
|
22
22
|
cacheTag(tags.categories());
|
|
23
|
-
cacheLife(
|
|
23
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
24
24
|
|
|
25
25
|
const client = getServerClient();
|
|
26
26
|
const catRes = await client.catalogue.getCategoryBySlug(slug);
|
|
@@ -4,7 +4,7 @@ import Link from "next/link";
|
|
|
4
4
|
import { notFound } from "next/navigation";
|
|
5
5
|
import { cacheTag, cacheLife } from "next/cache";
|
|
6
6
|
import {
|
|
7
|
-
getServerClient,
|
|
7
|
+
CACHE_LIFE_DEFAULT, getServerClient,
|
|
8
8
|
tags,
|
|
9
9
|
type Collection,
|
|
10
10
|
type Product,
|
|
@@ -20,7 +20,7 @@ interface CollectionData {
|
|
|
20
20
|
async function getCollection(slug: string): Promise<CollectionData | null> {
|
|
21
21
|
"use cache";
|
|
22
22
|
cacheTag(tags.collections());
|
|
23
|
-
cacheLife(
|
|
23
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
24
24
|
|
|
25
25
|
const client = getServerClient();
|
|
26
26
|
const colRes = await client.catalogue.getCollectionBySlug(slug);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { cacheTag, cacheLife } from "next/cache";
|
|
2
|
-
import { getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
2
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
3
3
|
import { brand } from "@/lib/brand";
|
|
4
4
|
import { getSiteUrl } from "@/lib/site-url";
|
|
5
5
|
|
|
6
6
|
async function buildLlmsTxt(SITE_URL: string): Promise<string> {
|
|
7
7
|
"use cache";
|
|
8
8
|
cacheTag(tags.products(), tags.categories(), tags.collections());
|
|
9
|
-
cacheLife(
|
|
9
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
10
10
|
|
|
11
11
|
const client = getServerClient();
|
|
12
12
|
const [productsRes, categoriesRes, collectionsRes] = await Promise.all([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import { Suspense } from "react";
|
|
3
3
|
import { cacheTag, cacheLife } from "next/cache";
|
|
4
|
-
import { getServerClient, tags, type Collection, type Product } from "@cimplify/sdk/server";
|
|
4
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags, type Collection, type Product } from "@cimplify/sdk/server";
|
|
5
5
|
import { FeatureHero } from "@/components/feature-hero";
|
|
6
6
|
import { CategoryTiles } from "@/components/category-tiles";
|
|
7
7
|
import { CollectionStrip } from "@/components/collection-strip";
|
|
@@ -27,7 +27,7 @@ interface CollectionWithProducts {
|
|
|
27
27
|
async function getHomeData() {
|
|
28
28
|
"use cache";
|
|
29
29
|
cacheTag(tags.collections(), tags.categories(), tags.products());
|
|
30
|
-
cacheLife(
|
|
30
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
31
31
|
|
|
32
32
|
const client = getServerClient();
|
|
33
33
|
const [colRes, catRes, productsRes] = await Promise.all([
|
|
@@ -4,7 +4,7 @@ import { notFound } from "next/navigation";
|
|
|
4
4
|
import Link from "next/link";
|
|
5
5
|
import { cacheTag, cacheLife } from "next/cache";
|
|
6
6
|
import {
|
|
7
|
-
getServerClient,
|
|
7
|
+
CACHE_LIFE_DEFAULT, getServerClient,
|
|
8
8
|
tags,
|
|
9
9
|
type Product,
|
|
10
10
|
type ProductWithDetails,
|
|
@@ -43,7 +43,7 @@ interface ProductData {
|
|
|
43
43
|
|
|
44
44
|
async function getProduct(slug: string): Promise<ProductData | null> {
|
|
45
45
|
"use cache";
|
|
46
|
-
cacheLife(
|
|
46
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
47
47
|
|
|
48
48
|
const client = getServerClient();
|
|
49
49
|
const r = await client.catalogue.getProductBySlug(slug);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import { Suspense } from "react";
|
|
3
3
|
import { cacheTag, cacheLife } from "next/cache";
|
|
4
|
-
import { getServerClient, tags } from "@cimplify/sdk/server";
|
|
4
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags } from "@cimplify/sdk/server";
|
|
5
5
|
import { ShopClient } from "./shop-client";
|
|
6
6
|
import { brand } from "@/lib/brand";
|
|
7
7
|
|
|
@@ -13,7 +13,7 @@ export const metadata: Metadata = {
|
|
|
13
13
|
async function getShopData() {
|
|
14
14
|
"use cache";
|
|
15
15
|
cacheTag(tags.products(), tags.categories());
|
|
16
|
-
cacheLife(
|
|
16
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
17
17
|
|
|
18
18
|
const client = getServerClient();
|
|
19
19
|
const [p, c] = await Promise.all([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import Link from "next/link";
|
|
3
3
|
import { cacheTag, cacheLife } from "next/cache";
|
|
4
|
-
import { getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
4
|
+
import { CACHE_LIFE_DEFAULT, getServerClient, tags, type Product } from "@cimplify/sdk/server";
|
|
5
5
|
import { brand } from "@/lib/brand";
|
|
6
6
|
|
|
7
7
|
export const metadata: Metadata = {
|
|
@@ -18,7 +18,7 @@ interface SitemapData {
|
|
|
18
18
|
async function getSitemap(): Promise<SitemapData> {
|
|
19
19
|
"use cache";
|
|
20
20
|
cacheTag(tags.products(), tags.categories(), tags.collections());
|
|
21
|
-
cacheLife(
|
|
21
|
+
cacheLife(CACHE_LIFE_DEFAULT);
|
|
22
22
|
|
|
23
23
|
const client = getServerClient();
|
|
24
24
|
const [pRes, cRes, colRes] = await Promise.all([
|