@cimplify/cli 0.6.14 → 0.6.15

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.
Files changed (32) hide show
  1. package/dist/{add-6SPMUMSJ.mjs → add-6KEKFXOW.mjs} +1 -1
  2. package/dist/chunk-DEWCHGWU.mjs +5707 -0
  3. package/dist/{chunk-CNIFXKZV.mjs → chunk-JLSDFVML.mjs} +1 -1
  4. package/dist/{chunk-RGF2RSSR.mjs → chunk-OSS47KZP.mjs} +2 -2
  5. package/dist/dispatcher.mjs +9 -9
  6. package/dist/{doctor-726TVOXT.mjs → doctor-WL25JRS3.mjs} +2 -2
  7. package/dist/{explain-6BWR5MCK.mjs → explain-NY5A533M.mjs} +2 -2
  8. package/dist/{introspect-4LD27NVX.mjs → introspect-J7GVKQK7.mjs} +2 -2
  9. package/dist/{list-2YRVKBXY.mjs → list-FXOFYX4H.mjs} +1 -1
  10. package/dist/{update-J65Z6Q7E.mjs → update-WNZKECFJ.mjs} +1 -1
  11. package/package.json +2 -2
  12. package/templates/storefront-auto/app/products/[slug]/page.tsx +8 -3
  13. package/templates/storefront-auto/bun.lock +10 -681
  14. package/templates/storefront-auto/package.json +1 -1
  15. package/templates/storefront-bakery/bun.lock +10 -681
  16. package/templates/storefront-bakery/package.json +1 -1
  17. package/templates/storefront-fashion/app/products/[slug]/page.tsx +8 -3
  18. package/templates/storefront-fashion/bun.lock +12 -683
  19. package/templates/storefront-fashion/package.json +1 -1
  20. package/templates/storefront-grocery/bun.lock +10 -681
  21. package/templates/storefront-grocery/package.json +1 -1
  22. package/templates/storefront-pharmacy/app/products/[slug]/page.tsx +8 -3
  23. package/templates/storefront-pharmacy/bun.lock +10 -681
  24. package/templates/storefront-pharmacy/package.json +1 -1
  25. package/templates/storefront-restaurant/bun.lock +10 -681
  26. package/templates/storefront-restaurant/package.json +1 -1
  27. package/templates/storefront-retail/app/products/[slug]/page.tsx +8 -3
  28. package/templates/storefront-retail/bun.lock +10 -681
  29. package/templates/storefront-retail/package.json +1 -1
  30. package/templates/storefront-services/bun.lock +10 -681
  31. package/templates/storefront-services/package.json +1 -1
  32. package/dist/chunk-RIOQDUQO.mjs +0 -5707
@@ -17,7 +17,7 @@
17
17
  "check": "bun run typecheck && bun run test:run"
18
18
  },
19
19
  "dependencies": {
20
- "@cimplify/sdk": "^0.49.0",
20
+ "@cimplify/sdk": "^0.49.1",
21
21
  "next": "^16.2.6",
22
22
  "react": "^19.0.0",
23
23
  "react-dom": "^19.0.0"
@@ -43,12 +43,17 @@ interface ProductData {
43
43
 
44
44
  async function getProduct(slug: string): Promise<ProductData | null> {
45
45
  "use cache";
46
- cacheTag(tags.product(slug), tags.products());
47
- cacheLife("hours");
46
+ cacheLife("max");
48
47
 
49
48
  const client = getServerClient();
50
49
  const r = await client.catalogue.getProductBySlug(slug);
51
- if (!r.ok) return null;
50
+ if (!r.ok) {
51
+ cacheTag(tags.products());
52
+ return null;
53
+ }
54
+ // Tag with the resolved ID — Cimplify dispatches tags.product(id), not slug.
55
+ // See https://cimplify.dev/docs/sdk/revalidation#dynamic-routes--tag-by-id-never-by-slug
56
+ cacheTag(tags.product(r.value.id), tags.products());
52
57
 
53
58
  const related = r.value.category_id
54
59
  ? await client.catalogue