@crossdelta/platform-sdk 0.13.0 → 0.13.1
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
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
|
-
<sub>
|
|
16
|
+
<sub>Frontend SDK coming soon — contract-based client models.</sub>
|
|
17
17
|
|
|
18
18
|
</p>
|
|
19
19
|
|
|
@@ -404,9 +404,9 @@ export const OrdersCreatedContract = createContract({
|
|
|
404
404
|
**Handlers** import contracts and delegate to use cases:
|
|
405
405
|
|
|
406
406
|
```typescript
|
|
407
|
-
// services/notifications/src/events/orders-created.
|
|
407
|
+
// services/notifications/src/events/orders-created.handler.ts
|
|
408
408
|
import { handleEvent } from '@crossdelta/cloudevents'
|
|
409
|
-
import { OrdersCreatedContract } from '@my-
|
|
409
|
+
import { OrdersCreatedContract } from '@my-platform/contracts'
|
|
410
410
|
import { sendOrderNotification } from '../use-cases/send-notification.use-case'
|
|
411
411
|
|
|
412
412
|
export default handleEvent(OrdersCreatedContract, async (data) => {
|
|
@@ -434,12 +434,14 @@ Every workspace includes pre-configured NATS with JetStream for development:
|
|
|
434
434
|
- Auto-started with `pf dev` (docker-based, ephemeral)
|
|
435
435
|
- Ports: `4222` (client), `8222` (monitoring)
|
|
436
436
|
- Health check: `curl http://localhost:8222/healthz`
|
|
437
|
-
- Streams: Auto-created by
|
|
437
|
+
- Streams: Auto-created by `pf dev` from contracts (memory, 1h retention)
|
|
438
438
|
|
|
439
439
|
**Production:**
|
|
440
440
|
- Deployed via Pulumi (`infra/`)
|
|
441
|
-
- Streams materialized from contracts
|
|
442
|
-
- Persistent storage with
|
|
441
|
+
- Streams materialized from contracts with retention policies
|
|
442
|
+
- Persistent storage (file-based) with explicit limits
|
|
443
|
+
|
|
444
|
+
> **Services never create streams** — in dev: `pf dev` auto-creates from contracts, in prod: Pulumi materializes.
|
|
443
445
|
|
|
444
446
|
See `infra/dev/README.md` for Dev-Infra vs Platform-Infra separation.
|
|
445
447
|
|
|
@@ -214,9 +214,6 @@ jobs:
|
|
|
214
214
|
cache-restore-keys: bun-$\{{ runner.os }}-
|
|
215
215
|
npm-token: $\{{ secrets.NPM_TOKEN }}
|
|
216
216
|
|
|
217
|
-
- name: Build infrastructure package
|
|
218
|
-
run: bun run --cwd packages/infrastructure build
|
|
219
|
-
|
|
220
217
|
- name: Pulumi up
|
|
221
218
|
uses: pulumi/actions@v6
|
|
222
219
|
with:
|
|
@@ -126,8 +126,7 @@ jobs:
|
|
|
126
126
|
fi
|
|
127
127
|
|
|
128
128
|
- name: Build
|
|
129
|
-
|
|
130
|
-
run: bun run --if-present build
|
|
129
|
+
run: bunx turbo run build --filter=${{ matrix.package.name }}
|
|
131
130
|
|
|
132
131
|
- name: Test
|
|
133
132
|
working-directory: ${{ matrix.package.dir }}
|