@crossdelta/platform-sdk 0.8.0 → 0.8.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 +26 -37
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,12 +58,25 @@ bun add -g @crossdelta/platform-sdk
|
|
|
58
58
|
<details>
|
|
59
59
|
<summary>Alternative: Auto-installer or run without installing</summary>
|
|
60
60
|
|
|
61
|
+
**Unix/macOS:**
|
|
61
62
|
```bash
|
|
62
63
|
# Auto-installer (installs CLI globally, prompts to install Bun if missing)
|
|
63
64
|
curl -fsSL https://unpkg.com/@crossdelta/platform-sdk@latest/install.sh | bash
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Windows:**
|
|
68
|
+
```powershell
|
|
69
|
+
# Recommended: Use npm directly
|
|
70
|
+
npm install -g @crossdelta/platform-sdk
|
|
64
71
|
|
|
65
|
-
# Or
|
|
72
|
+
# Or use WSL (Windows Subsystem for Linux)
|
|
73
|
+
wsl bash -c "curl -fsSL https://unpkg.com/@crossdelta/platform-sdk@latest/install.sh | bash"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Run without installing:**
|
|
77
|
+
```bash
|
|
66
78
|
bunx @crossdelta/platform-sdk new workspace my-platform
|
|
79
|
+
# or: npx @crossdelta/platform-sdk new workspace my-platform
|
|
67
80
|
```
|
|
68
81
|
|
|
69
82
|
</details>
|
|
@@ -90,25 +103,22 @@ pf dev
|
|
|
90
103
|
|
|
91
104
|
---
|
|
92
105
|
|
|
93
|
-
##
|
|
106
|
+
## 5-Minute Tutorial
|
|
94
107
|
|
|
95
|
-
|
|
108
|
+
After running Quick Start, add services and wire events:
|
|
96
109
|
|
|
97
110
|
```bash
|
|
98
|
-
# 1.
|
|
99
|
-
pf new workspace my-platform -y && cd my-platform
|
|
100
|
-
|
|
101
|
-
# 2. Add two services
|
|
111
|
+
# 1. Add two services
|
|
102
112
|
pf new hono-micro services/orders
|
|
103
113
|
pf new hono-micro services/notifications
|
|
104
114
|
|
|
105
|
-
#
|
|
115
|
+
# 2. Wire an event between them
|
|
106
116
|
pf event add orders.created --service services/notifications
|
|
107
117
|
|
|
108
|
-
#
|
|
118
|
+
# 3. Restart to pick up new services
|
|
109
119
|
pf dev
|
|
110
120
|
|
|
111
|
-
#
|
|
121
|
+
# 4. Publish a test event — watch notifications react
|
|
112
122
|
pf event publish orders.created
|
|
113
123
|
```
|
|
114
124
|
|
|
@@ -116,19 +126,9 @@ That's it. Two services, one event contract, auto-discovered handlers, no manual
|
|
|
116
126
|
|
|
117
127
|
---
|
|
118
128
|
|
|
119
|
-
## 🧭
|
|
120
|
-
|
|
121
|
-
### Start a new platform
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
pf new workspace my-platform --github-owner my-org --pulumi-stack dev -y
|
|
125
|
-
cd my-platform
|
|
126
|
-
pf dev
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
This scaffolds a complete Turborepo monorepo with NATS, Pulumi infrastructure, GitHub Actions workflows, and auto-generated environment variables.
|
|
129
|
+
## 🧭 Commands & Options
|
|
130
130
|
|
|
131
|
-
###
|
|
131
|
+
### Service generators
|
|
132
132
|
|
|
133
133
|
**Hono** (lightweight, Bun-optimized):
|
|
134
134
|
```bash
|
|
@@ -140,31 +140,22 @@ pf new hono-micro services/orders
|
|
|
140
140
|
pf new nest-micro services/orders
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
Or use AI generation with either:
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
pf new hono-micro services/orders --ai -d "Handle order creation and publish order events"
|
|
147
|
-
```
|
|
148
|
-
|
|
149
143
|
Both generate the service structure, Pulumi config in `infra/services/`, and wire everything automatically.
|
|
150
144
|
|
|
151
|
-
###
|
|
152
|
-
|
|
153
|
-
Configure your AI provider once:
|
|
145
|
+
### AI-assisted generation (optional)
|
|
154
146
|
|
|
147
|
+
Configure once:
|
|
155
148
|
```bash
|
|
156
149
|
pf setup --ai # OpenAI or Anthropic
|
|
157
150
|
```
|
|
158
151
|
|
|
159
|
-
Then use `--ai` with any
|
|
160
|
-
|
|
152
|
+
Then use `--ai` with any generator:
|
|
161
153
|
```bash
|
|
162
154
|
pf new hono-micro services/notifications --ai -d "Send emails on order events"
|
|
163
155
|
```
|
|
164
156
|
|
|
165
157
|
AI generates: service code, event handlers, use cases, tests, and documentation.
|
|
166
|
-
|
|
167
|
-
AI is a productivity layer — all generated code follows the same conventions and can be written manually without loss of functionality.
|
|
158
|
+
All generated code follows the same conventions and can be written manually.
|
|
168
159
|
|
|
169
160
|
### Daily commands
|
|
170
161
|
|
|
@@ -174,8 +165,6 @@ AI is a productivity layer — all generated code follows the same conventions a
|
|
|
174
165
|
| `pf test` | Run tests across the monorepo |
|
|
175
166
|
| `pf lint` | Lint and format with Biome |
|
|
176
167
|
| `pf build` | Build all packages and services |
|
|
177
|
-
| `pf new hono-micro <path>` | Create Hono microservice (lightweight) |
|
|
178
|
-
| `pf new nest-micro <path>` | Create NestJS microservice (full-featured) |
|
|
179
168
|
| `pf event add <type> --service <path>` | Add contract, mock, handler + wire stream |
|
|
180
169
|
| `pf event list` | List available events and their consumers |
|
|
181
170
|
| `pf event publish <type>` | Publish mock event to NATS |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossdelta/platform-sdk",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Opinionated platform toolkit for event-driven microservices. Scaffold Turborepo workspaces, generate services from natural language, and deploy via Pulumi.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|