@crossdelta/platform-sdk 0.18.3 → 0.18.4
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/CHANGELOG.md +40 -0
- package/bin/cli.js +158 -149
- package/bin/docs/generators/service.md +9 -0
- package/bin/templates/workspace/infra/package.json.hbs +1 -1
- package/bin/templates/workspace/packages/contracts/README.md.hbs +2 -2
- package/bin/templates/workspace/packages/contracts/package.json.hbs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,46 @@ All notable changes to `@crossdelta/platform-sdk` will be documented in this fil
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.18.4] - 2025-12-25
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Pluralization Consistency** - Stream names now correctly pluralize all cases
|
|
12
|
+
- `max.updated` → Stream `MAXES`, Subject `maxes.>` (was `MAXS` / `max.>`)
|
|
13
|
+
- Uses central `pluralize`/`singularize` from `@crossdelta/cloudevents`
|
|
14
|
+
- Handles edge cases: consonant+y (`policy`→`policies`), sibilants (`batch`→`batches`, `max`→`maxes`)
|
|
15
|
+
|
|
16
|
+
- **Contract Exists Check** - `pf event add` no longer prompts when contract exists in singular folder
|
|
17
|
+
- `contractExists()` now checks both `events/orders/created.ts` AND `events/order/created.ts`
|
|
18
|
+
- Prevents duplicate contract creation during AI scaffolding
|
|
19
|
+
|
|
20
|
+
- **typeToZod Mapping** - Added support for `datetime` type
|
|
21
|
+
- `datetime` → `z.string().datetime()` (was throwing invalid Zod error)
|
|
22
|
+
- `date` → `z.string().datetime()` (consistent with datetime)
|
|
23
|
+
- Unknown types now fallback to `z.string()` with warning instead of `z.undefined()`
|
|
24
|
+
|
|
25
|
+
- **Circular Dependency** - Fixed module initialization race condition
|
|
26
|
+
- `pkgJson` now lazy-loaded via Proxy to avoid circular import issues
|
|
27
|
+
- Tests no longer fail with "Cannot access before initialization" errors
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- **Event Naming Convention** - Event types must be SINGULAR
|
|
31
|
+
- ✅ `order.created`, `customer.updated`, `max.updated`
|
|
32
|
+
- ❌ `orders.created`, `customers.updated`
|
|
33
|
+
- Updated all documentation and examples
|
|
34
|
+
|
|
35
|
+
- **pf event add** - Now uses workflow command pattern with interactive prompts
|
|
36
|
+
- `--interactive` flag for step-by-step prompts
|
|
37
|
+
- Service selection from completion cache
|
|
38
|
+
- Better error messages and progress display
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
- **Service Discovery** - Completion cache now includes service paths
|
|
42
|
+
- `pf event add --service <TAB>` shows available services
|
|
43
|
+
- Scans `services/` and `apps/` directories
|
|
44
|
+
|
|
45
|
+
- **Orphan Cleanup** - `pf dev` removes orphaned infra configs on restart
|
|
46
|
+
- When `services/foo` is deleted, `infra/services/foo.ts` is auto-removed
|
|
47
|
+
|
|
8
48
|
## [0.18.0] - 2025-12-22
|
|
9
49
|
|
|
10
50
|
### Changed
|