create-mercato-app 0.6.4-develop.4282.1.4d95e85930 → 0.6.4-develop.4305.1.efaf0ebab1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mercato-app",
3
- "version": "0.6.4-develop.4282.1.4d95e85930",
3
+ "version": "0.6.4-develop.4305.1.efaf0ebab1",
4
4
  "type": "module",
5
5
  "description": "Create a new Open Mercato application",
6
6
  "main": "./dist/index.js",
@@ -18,12 +18,12 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "picocolors": "^1.1.0",
21
- "tar": "^7.5.15"
21
+ "tar": "^7.5.16"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^25.9.1",
25
25
  "esbuild": "^0.28.0",
26
- "tsx": "^4.22.3",
26
+ "tsx": "^4.22.4",
27
27
  "typescript": "^6.0.3"
28
28
  },
29
29
  "publishConfig": {
@@ -3,6 +3,13 @@
3
3
  *
4
4
  * Demonstrates how a module can enrich another module's API responses.
5
5
  * This enricher adds todo count data to customer person records.
6
+ *
7
+ * It reads other modules' tables (todos and per-customer priority), so its
8
+ * output is not a pure function of the customer record's own cached state. It
9
+ * therefore keeps `cacheableOnListHit` at the fail-closed default and re-runs on
10
+ * every CRUD list cache hit so the counts stay fresh. See the
11
+ * `cacheableOnListHit` guidance in packages/core/AGENTS.md for when an enricher
12
+ * may opt into being served from the list cache on a hit.
6
13
  */
7
14
 
8
15
  import type { ResponseEnricher, EnricherContext } from '@open-mercato/shared/lib/crud/response-enricher'
@@ -52,6 +59,7 @@ const customerTodoCountEnricher: ResponseEnricher<CustomerRecord, TodoEnrichment
52
59
  targetEntity: 'customers.person',
53
60
  priority: 10,
54
61
  timeout: 2000,
62
+ cacheableOnListHit: false,
55
63
  fallback: {
56
64
  _example: { todoCount: 0, openTodoCount: 0, priority: 'normal' },
57
65
  },