@crossdelta/platform-sdk 0.16.4 → 0.16.6
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 +6 -6
- package/bin/cli.js +167 -723
- package/bin/docs/generators/code-style.md +3 -3
- package/bin/docs/generators/hono-bun.md +2 -2
- package/bin/docs/generators/hono-node.md +2 -2
- package/bin/docs/generators/nest.md +3 -3
- package/bin/docs/generators/service.md +60 -36
- package/bin/templates/workspace/infra/package.json.hbs +1 -1
- package/bin/templates/workspace/packages/contracts/README.md.hbs +17 -17
- package/bin/templates/workspace/packages/contracts/package.json.hbs +1 -1
- package/package.json +1 -24
package/README.md
CHANGED
|
@@ -132,13 +132,13 @@ pf new hono-micro services/orders
|
|
|
132
132
|
pf new hono-micro services/notifications
|
|
133
133
|
|
|
134
134
|
# 2. Wire an event from orders → notifications
|
|
135
|
-
pf event add
|
|
135
|
+
pf event add order.created --service services/notifications
|
|
136
136
|
|
|
137
137
|
# 3. Restart to pick up new services
|
|
138
138
|
pf dev
|
|
139
139
|
|
|
140
140
|
# 4. Publish a test event — watch notifications react
|
|
141
|
-
pf event publish
|
|
141
|
+
pf event publish order.created
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
<br />
|
|
@@ -394,17 +394,17 @@ See [@crossdelta/infrastructure](https://www.npmjs.com/package/@crossdelta/infra
|
|
|
394
394
|
import { createContract } from '@crossdelta/cloudevents'
|
|
395
395
|
import { z } from 'zod'
|
|
396
396
|
|
|
397
|
-
export const
|
|
397
|
+
export const OrderCreatedSchema = z.object({
|
|
398
398
|
orderId: z.string(),
|
|
399
399
|
total: z.number(),
|
|
400
400
|
})
|
|
401
401
|
|
|
402
|
-
export type
|
|
402
|
+
export type OrderCreatedData = z.infer<typeof OrderCreatedSchema>
|
|
403
403
|
|
|
404
404
|
export const OrdersCreatedContract = createContract({
|
|
405
|
-
type: '
|
|
405
|
+
type: 'order.created',
|
|
406
406
|
channel: { stream: 'ORDERS' },
|
|
407
|
-
schema:
|
|
407
|
+
schema: OrderCreatedSchema,
|
|
408
408
|
})
|
|
409
409
|
```
|
|
410
410
|
|