@crossdelta/platform-sdk 0.12.0 → 0.13.0

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/README.md CHANGED
@@ -190,7 +190,7 @@ pf event publish orders.created
190
190
 
191
191
  | Command | What it does |
192
192
  |:--------|:-------------|
193
- | `pf dev` | 🚀 Start NATS + all services in watch mode |
193
+ | `pf dev` | 🚀 Start development infrastructure (NATS) + all services in watch mode |
194
194
  | `pf new hono-micro <path>` | ⚡ Create a Hono service (lightweight, Bun-optimized) |
195
195
  | `pf new nest-micro <path>` | 🏢 Create a NestJS service (full-featured, decorators) |
196
196
  | `pf event add <type> --service <path>` | 🔗 Add contract + handler + wire stream |
@@ -390,12 +390,13 @@ See [@crossdelta/infrastructure](https://www.npmjs.com/package/@crossdelta/infra
390
390
  **Contracts** live in `packages/contracts/` as the single source of truth:
391
391
 
392
392
  ```typescript
393
- // packages/contracts/src/events/orders-created.ts
393
+ // packages/contracts/src/events/orders/created.ts
394
394
  import { createContract } from '@crossdelta/cloudevents'
395
395
  import { z } from 'zod'
396
396
 
397
397
  export const OrdersCreatedContract = createContract({
398
398
  type: 'orders.created',
399
+ channel: { stream: 'ORDERS' },
399
400
  schema: z.object({ orderId: z.string(), total: z.number() }),
400
401
  })
401
402
  ```
@@ -424,11 +425,23 @@ See [@crossdelta/cloudevents](https://www.npmjs.com/package/@crossdelta/cloudeve
424
425
 
425
426
  <br />
426
427
 
427
- Every workspace includes pre-configured NATS with JetStream:
428
+ > **Local NATS started by `pf dev` is development infrastructure.**
429
+ > **Production streams are materialized via Pulumi from contracts.**
428
430
 
429
- - Auto-started with `pf dev`
431
+ Every workspace includes pre-configured NATS with JetStream for development:
432
+
433
+ **Development:**
434
+ - Auto-started with `pf dev` (docker-based, ephemeral)
430
435
  - Ports: `4222` (client), `8222` (monitoring)
431
436
  - Health check: `curl http://localhost:8222/healthz`
437
+ - Streams: Auto-created by services (transient)
438
+
439
+ **Production:**
440
+ - Deployed via Pulumi (`infra/`)
441
+ - Streams materialized from contracts
442
+ - Persistent storage with retention policies
443
+
444
+ See `infra/dev/README.md` for Dev-Infra vs Platform-Infra separation.
432
445
 
433
446
  </details>
434
447