@kuckit/users-module 3.0.8 → 3.0.10

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 (2) hide show
  1. package/README.md +59 -0
  2. package/package.json +5 -5
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # @kuckit/users-module
2
+
3
+ > ⚠️ **LEGACY MODULE**: This module is kept for demonstrating advanced patterns.
4
+ > For the **canonical reference implementation**, use [`items-module`](../create-kuckit-app/templates/base/packages/items-module/).
5
+
6
+ ## Status
7
+
8
+ This module is **not the primary reference** for new module development. Use it only if you need to learn about:
9
+
10
+ - **Use case decorators** (caching, retry, logging)
11
+ - **Event publishing patterns**
12
+ - **Advanced DI patterns**
13
+
14
+ ## Canonical Reference
15
+
16
+ For creating new modules, use the **items-module** template:
17
+
18
+ ```bash
19
+ # Scaffolded projects include items-module by default
20
+ bunx create-kuckit-app my-app
21
+
22
+ # Or generate a new module based on the pattern
23
+ bunx kuckit generate module your-module
24
+ ```
25
+
26
+ See [items-module documentation](../create-kuckit-app/templates/base/packages/items-module/README.md).
27
+
28
+ ## Advanced Patterns Demonstrated
29
+
30
+ ### Use Case Decorators
31
+
32
+ ```typescript
33
+ // Caching decorator
34
+ useCase = withCaching(useCase, cacheStore, {
35
+ keyFn: (input) => `user:${input.userId}`,
36
+ ttlMs: 60000,
37
+ })
38
+
39
+ // Retry decorator
40
+ useCase = withRetry(useCase, {
41
+ maxAttempts: 3,
42
+ initialBackoffMs: 100,
43
+ })
44
+ ```
45
+
46
+ ### Event Publishing
47
+
48
+ ```typescript
49
+ // Publish domain events after mutations
50
+ await eventPublisher.publish({
51
+ type: 'user.profile.updated',
52
+ payload: { userId, changes },
53
+ })
54
+ ```
55
+
56
+ ## Documentation
57
+
58
+ - [AGENTS.md](./AGENTS.md) - Detailed patterns and AI guidance
59
+ - [items-module](../create-kuckit-app/templates/base/packages/items-module/) - Canonical reference
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuckit/users-module",
3
- "version": "3.0.8",
3
+ "version": "3.0.10",
4
4
  "description": "User management module for Kuckit SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,13 +24,13 @@
24
24
  "prepublishOnly": "npm run build && node ../../scripts/resolve-workspace-protocols.cjs && node ../../scripts/check-no-workspace-protocol.cjs"
25
25
  },
26
26
  "peerDependencies": {
27
- "@kuckit/sdk": "^3.0.8",
27
+ "@kuckit/sdk": "^3.0.10",
28
28
  "typescript": "^5"
29
29
  },
30
30
  "dependencies": {
31
- "@kuckit/domain": "^3.0.8",
32
- "@kuckit/application": "^3.0.8",
33
- "@kuckit/infrastructure": "^3.0.8"
31
+ "@kuckit/domain": "^3.0.10",
32
+ "@kuckit/application": "^3.0.10",
33
+ "@kuckit/infrastructure": "^3.0.10"
34
34
  },
35
35
  "devDependencies": {
36
36
  "tsdown": "catalog:"