@crossdelta/platform-sdk 0.13.0 → 0.13.2
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 +8 -6
- package/package.json +1 -1
- package/bin/cli.js +0 -312
- package/bin/docs/generators/README.md +0 -56
- package/bin/docs/generators/code-style.md +0 -96
- package/bin/docs/generators/hono-bun.md +0 -181
- package/bin/docs/generators/hono-node.md +0 -194
- package/bin/docs/generators/nest.md +0 -358
- package/bin/docs/generators/service.md +0 -564
- package/bin/docs/generators/testing.md +0 -97
- package/bin/integration.collection.json +0 -18
- package/bin/templates/hono-microservice/Dockerfile.hbs +0 -16
- package/bin/templates/hono-microservice/biome.json.hbs +0 -3
- package/bin/templates/hono-microservice/src/index.ts.hbs +0 -18
- package/bin/templates/hono-microservice/tsconfig.json.hbs +0 -14
- package/bin/templates/nest-microservice/Dockerfile.hbs +0 -37
- package/bin/templates/nest-microservice/biome.json.hbs +0 -3
- package/bin/templates/nest-microservice/src/app.context.ts.hbs +0 -17
- package/bin/templates/nest-microservice/src/events/events.module.ts.hbs +0 -8
- package/bin/templates/nest-microservice/src/events/events.service.ts.hbs +0 -22
- package/bin/templates/nest-microservice/src/main.ts.hbs +0 -34
- package/bin/templates/workspace/.github/README.md +0 -70
- package/bin/templates/workspace/.github/actions/check-image-tag-exists/action.yml +0 -27
- package/bin/templates/workspace/.github/actions/check-image-tag-exists/index.js +0 -179
- package/bin/templates/workspace/.github/actions/check-path-changes/action.yml +0 -21
- package/bin/templates/workspace/.github/actions/check-path-changes/index.js +0 -192
- package/bin/templates/workspace/.github/actions/detect-skipped-services/action.yml +0 -38
- package/bin/templates/workspace/.github/actions/generate-scope-matrix/action.yml +0 -17
- package/bin/templates/workspace/.github/actions/generate-scope-matrix/index.js +0 -355
- package/bin/templates/workspace/.github/actions/prepare-build-context/action.yml +0 -49
- package/bin/templates/workspace/.github/actions/resolve-scope-tags/action.yml +0 -31
- package/bin/templates/workspace/.github/actions/resolve-scope-tags/index.js +0 -398
- package/bin/templates/workspace/.github/actions/setup-bun-install/action.yml.hbs +0 -57
- package/bin/templates/workspace/.github/copilot-chat-configuration.json +0 -49
- package/bin/templates/workspace/.github/copilot-instructions.md.hbs +0 -72
- package/bin/templates/workspace/.github/dependabot.yml +0 -18
- package/bin/templates/workspace/.github/workflows/build-and-deploy.yml.hbs +0 -231
- package/bin/templates/workspace/.github/workflows/lint-and-tests.yml.hbs +0 -32
- package/bin/templates/workspace/.github/workflows/publish-packages.yml +0 -155
- package/bin/templates/workspace/apps/.gitkeep +0 -0
- package/bin/templates/workspace/biome.json.hbs +0 -62
- package/bin/templates/workspace/bunfig.toml.hbs +0 -5
- package/bin/templates/workspace/docs/.gitkeep +0 -0
- package/bin/templates/workspace/editorconfig.hbs +0 -9
- package/bin/templates/workspace/gitignore.hbs +0 -15
- package/bin/templates/workspace/infra/Pulumi.dev.yaml.hbs +0 -5
- package/bin/templates/workspace/infra/Pulumi.yaml.hbs +0 -6
- package/bin/templates/workspace/infra/index.ts.hbs +0 -56
- package/bin/templates/workspace/infra/package.json.hbs +0 -21
- package/bin/templates/workspace/infra/services/.gitkeep +0 -0
- package/bin/templates/workspace/infra/tsconfig.json.hbs +0 -15
- package/bin/templates/workspace/npmrc.hbs +0 -2
- package/bin/templates/workspace/package.json.hbs +0 -51
- package/bin/templates/workspace/packages/.gitkeep +0 -0
- package/bin/templates/workspace/packages/contracts/README.md.hbs +0 -166
- package/bin/templates/workspace/packages/contracts/package.json.hbs +0 -22
- package/bin/templates/workspace/packages/contracts/src/events/index.ts +0 -16
- package/bin/templates/workspace/packages/contracts/src/index.ts +0 -10
- package/bin/templates/workspace/packages/contracts/src/stream-policies.ts.hbs +0 -40
- package/bin/templates/workspace/packages/contracts/tsconfig.json.hbs +0 -7
- package/bin/templates/workspace/pnpm-workspace.yaml.hbs +0 -5
- package/bin/templates/workspace/turbo.json +0 -37
- package/bin/templates/workspace/turbo.json.hbs +0 -29
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
|
|