@chidchanun/bcp 0.2.17 → 0.2.18
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 +153 -292
- package/docs/README.md +33 -41
- package/docs/api-manifest.json +24 -16
- package/docs/api-reference.md +150 -140
- package/docs/deployment-platform-v2.md +449 -0
- package/docs/docs-web-manifest.json +5 -3
- package/docs/platform-manifest.json +18 -4
- package/docs/releases/0.2.18.md +136 -0
- package/package.json +10 -5
- package/packages/bundler/src/client-boundary.ts +1 -0
- package/packages/client/src/auth.mjs +1391 -0
- package/packages/client/src/config.mjs +1132 -0
- package/packages/client/src/deployment.mjs +609 -0
- package/packages/client/src/deployment.ts +20 -0
- package/packages/client/src/server.mjs +5615 -0
- package/packages/server/src/deployment.ts +936 -0
- package/packages/server/src/middleware.mjs +631 -0
package/docs/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `docs/` directory is the documentation source of truth for BCP Framework and is organized for **`bcp-docs-web`**.
|
|
4
4
|
|
|
5
|
-
> **Documentation target:** BCP Framework `0.2.
|
|
5
|
+
> **Documentation target:** BCP Framework `0.2.18 — Deployment Platform v2`
|
|
6
6
|
>
|
|
7
7
|
> **Release state:** unreleased development target until RC validation, tagging and npm publication complete.
|
|
8
8
|
|
|
@@ -43,64 +43,57 @@ Framework source and tests remain authoritative for runtime behavior.
|
|
|
43
43
|
| `0.2.15` | Plugin & Module Platform |
|
|
44
44
|
| `0.2.16` | Cache Platform v2 |
|
|
45
45
|
| `0.2.17` | Observability Platform v3 |
|
|
46
|
+
| `0.2.18` | Deployment Platform v2 |
|
|
46
47
|
|
|
47
|
-
## 0.2.
|
|
48
|
+
## 0.2.18 — Deployment Platform v2
|
|
48
49
|
|
|
49
|
-
`0.2.
|
|
50
|
+
`0.2.18` adds the server-only `bcp/deployment` entrypoint and completes compiled production runtime coverage for key server package surfaces.
|
|
50
51
|
|
|
51
|
-
Primary
|
|
52
|
+
Primary APIs:
|
|
52
53
|
|
|
53
54
|
```ts
|
|
54
55
|
import {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
createTraceMetricsExporter,
|
|
60
|
-
createTracer,
|
|
61
|
-
getTraceLogFields,
|
|
62
|
-
runWithTraceCarrier,
|
|
63
|
-
} from "bcp/observability";
|
|
56
|
+
createDeploymentDiagnosticsResponse,
|
|
57
|
+
createDeploymentReadinessResponse,
|
|
58
|
+
createDeploymentRuntime,
|
|
59
|
+
} from "bcp/deployment";
|
|
64
60
|
```
|
|
65
61
|
|
|
66
62
|
Runtime model:
|
|
67
63
|
|
|
68
64
|
```text
|
|
69
|
-
|
|
65
|
+
process start
|
|
70
66
|
|
|
|
71
67
|
v
|
|
72
|
-
|
|
68
|
+
DeploymentRuntime
|
|
73
69
|
|
|
|
74
|
-
+--
|
|
75
|
-
+--
|
|
76
|
-
+--
|
|
70
|
+
+-- resource start order
|
|
71
|
+
+-- readiness checks
|
|
72
|
+
+-- diagnostics
|
|
73
|
+
+-- deployment metadata
|
|
74
|
+
+-- SIGTERM / SIGINT
|
|
77
75
|
|
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
v
|
|
77
|
+
state = ready
|
|
78
|
+
|
|
|
79
|
+
shutdown/drain
|
|
80
80
|
|
|
|
81
81
|
v
|
|
82
|
-
|
|
83
|
-
+-- memory exporter
|
|
84
|
-
+-- trace metrics exporter
|
|
85
|
-
+-- application/vendor exporter
|
|
82
|
+
reverse-order resource stop
|
|
86
83
|
```
|
|
87
84
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
`createTraceCarrier()` and `runWithTraceCarrier()` provide explicit provider-neutral propagation through non-HTTP transports without changing persisted job/workflow/outbox schemas.
|
|
91
|
-
|
|
92
|
-
Prepared npm packages compile `bcp/observability` to `observability.mjs` for standalone Node runtime use.
|
|
85
|
+
Prepared npm runtime targets now include compiled ESM for `bcp/config`, `bcp/auth`, `bcp/deployment`, `bcp/server` and `bcp/middleware` in addition to the server entrypoints compiled in earlier releases.
|
|
93
86
|
|
|
94
87
|
New/updated sources:
|
|
95
88
|
|
|
96
89
|
| Source | Purpose |
|
|
97
90
|
| --- | --- |
|
|
98
|
-
| `
|
|
99
|
-
| `api-reference.md` | `bcp/
|
|
100
|
-
| `platform-manifest.json` |
|
|
101
|
-
| `api-manifest.json` |
|
|
102
|
-
| `docs-web-manifest.json` |
|
|
103
|
-
| `releases/0.2.
|
|
91
|
+
| `deployment-platform-v2.md` | Runtime lifecycle, readiness, diagnostics, metadata and graceful shutdown |
|
|
92
|
+
| `api-reference.md` | `bcp/deployment` APIs |
|
|
93
|
+
| `platform-manifest.json` | Deployment/compiled-runtime capability flags |
|
|
94
|
+
| `api-manifest.json` | `bcp/deployment` source/guide ownership |
|
|
95
|
+
| `docs-web-manifest.json` | Deployment v2 navigation and `0.2.18` release route |
|
|
96
|
+
| `releases/0.2.18.md` | Deployment Platform v2 release notes |
|
|
104
97
|
|
|
105
98
|
## Update rule
|
|
106
99
|
|
|
@@ -119,10 +112,8 @@ When framework behavior or public surface changes:
|
|
|
119
112
|
|
|
120
113
|
| Website route | Markdown source |
|
|
121
114
|
| --- | --- |
|
|
122
|
-
| `/docs/authentication` | `authentication.md` |
|
|
123
|
-
| `/docs/observability` | `observability.md` |
|
|
124
115
|
| `/docs/observability-v3` | `observability-v3.md` |
|
|
125
|
-
| `/docs/
|
|
116
|
+
| `/docs/deployment-platform-v2` | `deployment-platform-v2.md` |
|
|
126
117
|
| `/docs/durable-jobs` | `durable-jobs.md` |
|
|
127
118
|
| `/docs/workflow-orchestration` | `workflow-orchestration.md` |
|
|
128
119
|
| `/docs/transactional-outbox-events` | `transactional-outbox-events.md` |
|
|
@@ -131,7 +122,7 @@ When framework behavior or public surface changes:
|
|
|
131
122
|
| `/docs/plugin-module-platform` | `plugin-module-platform.md` |
|
|
132
123
|
| `/docs/cache-platform-v2` | `cache-platform-v2.md` |
|
|
133
124
|
| `/docs/api-reference` | `api-reference.md` |
|
|
134
|
-
| `/releases/0.2.
|
|
125
|
+
| `/releases/0.2.18` | `releases/0.2.18.md` |
|
|
135
126
|
|
|
136
127
|
Every route/source pair is validated by unit tests.
|
|
137
128
|
|
|
@@ -153,6 +144,7 @@ bcp/realtime
|
|
|
153
144
|
bcp/testing
|
|
154
145
|
bcp/plugins
|
|
155
146
|
bcp/observability
|
|
147
|
+
bcp/deployment
|
|
156
148
|
bcp/server
|
|
157
149
|
bcp/server-only
|
|
158
150
|
bcp/middleware
|
|
@@ -162,7 +154,7 @@ The API-manifest entrypoint set must match the platform public-entrypoint set ex
|
|
|
162
154
|
|
|
163
155
|
## Release validation
|
|
164
156
|
|
|
165
|
-
Before publishing `0.2.
|
|
157
|
+
Before publishing `0.2.18`:
|
|
166
158
|
|
|
167
159
|
```bash
|
|
168
160
|
npm run typecheck
|
|
@@ -173,6 +165,6 @@ npm run test:package
|
|
|
173
165
|
npm run rc:check
|
|
174
166
|
```
|
|
175
167
|
|
|
176
|
-
|
|
168
|
+
Deployment Platform v2 validation covers resource lifecycle ordering, startup rollback, readiness/diagnostics, runtime metadata, server-only boundaries, compiled production entrypoints and docs/platform/API parity.
|
|
177
169
|
|
|
178
170
|
The final release tag must point to the exact commit that passed the complete RC sequence.
|
package/docs/api-manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"framework": "bcp",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.18",
|
|
5
5
|
"releaseState": "unreleased",
|
|
6
6
|
"coverage": "public-entrypoints",
|
|
7
7
|
"entrypoints": [
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"source": "packages/client/src/config.ts",
|
|
35
35
|
"environment": "server",
|
|
36
36
|
"route": "/docs/api-reference#bcp-config",
|
|
37
|
-
"summary": "Typed BCP configuration, environment-schema validation and configuration diagnostics APIs.",
|
|
38
|
-
"guides": ["/docs/configuration", "/docs/environment-validation"]
|
|
37
|
+
"summary": "Typed BCP configuration, environment-schema validation and configuration diagnostics APIs with a compiled production runtime.",
|
|
38
|
+
"guides": ["/docs/configuration", "/docs/environment-validation", "/docs/deployment-platform-v2"]
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"package": "bcp/validation",
|
|
@@ -59,15 +59,15 @@
|
|
|
59
59
|
"environment": "server",
|
|
60
60
|
"route": "/docs/api-reference#bcp-database",
|
|
61
61
|
"summary": "Provider-neutral MySQL, PostgreSQL and SQLite query, transaction, lifecycle and migration primitives.",
|
|
62
|
-
"guides": ["/docs/database", "/docs/database-migrations", "/docs/transactional-outbox-events", "/docs/testing-platform", "/docs/observability-v3"]
|
|
62
|
+
"guides": ["/docs/database", "/docs/database-migrations", "/docs/transactional-outbox-events", "/docs/testing-platform", "/docs/observability-v3", "/docs/deployment-platform-v2"]
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"package": "bcp/auth",
|
|
66
66
|
"source": "packages/client/src/auth.ts",
|
|
67
67
|
"environment": "server",
|
|
68
68
|
"route": "/docs/api-reference#bcp-auth",
|
|
69
|
-
"summary": "Authentication Platform v2 plus permission checks, authorization policies and auth/guest/role/permission route guards.",
|
|
70
|
-
"guides": ["/docs/authentication", "/docs/auth-session-store", "/docs/auth-route-guards", "/docs/authorization-security", "/docs/session-auth", "/docs/testing-platform"]
|
|
69
|
+
"summary": "Authentication Platform v2 plus permission checks, authorization policies and auth/guest/role/permission route guards, published with a compiled Node runtime.",
|
|
70
|
+
"guides": ["/docs/authentication", "/docs/auth-session-store", "/docs/auth-route-guards", "/docs/authorization-security", "/docs/session-auth", "/docs/testing-platform", "/docs/deployment-platform-v2"]
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"package": "bcp/jobs",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"environment": "server",
|
|
76
76
|
"route": "/docs/api-reference#bcp-jobs",
|
|
77
77
|
"summary": "Background queues and schedules with visibility leases, heartbeats, stale recovery, DLQ maintenance and Redis-compatible durable adapters.",
|
|
78
|
-
"guides": ["/docs/background-jobs", "/docs/job-scheduling", "/docs/durable-jobs", "/docs/transactional-outbox-events", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability-v3"]
|
|
78
|
+
"guides": ["/docs/background-jobs", "/docs/job-scheduling", "/docs/durable-jobs", "/docs/transactional-outbox-events", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability-v3", "/docs/deployment-platform-v2"]
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"package": "bcp/workflow",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"environment": "server",
|
|
84
84
|
"route": "/docs/api-reference#bcp-workflow",
|
|
85
85
|
"summary": "Persistent workflow orchestration with sequential and parallel steps, retries, delays, compensation, run leases and optional durable queue execution.",
|
|
86
|
-
"guides": ["/docs/workflow-orchestration", "/docs/durable-jobs", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability-v3"]
|
|
86
|
+
"guides": ["/docs/workflow-orchestration", "/docs/durable-jobs", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability-v3", "/docs/deployment-platform-v2"]
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"package": "bcp/events",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"environment": "server",
|
|
92
92
|
"route": "/docs/api-reference#bcp-events",
|
|
93
93
|
"summary": "Transactional outbox and event delivery APIs with SQL persistence, dispatcher leases, retries, stale recovery, queue handoff and in-process event bus delivery.",
|
|
94
|
-
"guides": ["/docs/transactional-outbox-events", "/docs/database", "/docs/durable-jobs", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability-v3"]
|
|
94
|
+
"guides": ["/docs/transactional-outbox-events", "/docs/database", "/docs/durable-jobs", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability-v3", "/docs/deployment-platform-v2"]
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
"package": "bcp/realtime",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"environment": "server",
|
|
100
100
|
"route": "/docs/api-reference#bcp-realtime",
|
|
101
101
|
"summary": "Realtime channels, cross-hub broker delivery, presence, channel authorization, WebSocket adapter integration, heartbeat handling and built-in Server-Sent Events responses.",
|
|
102
|
-
"guides": ["/docs/realtime-platform", "/docs/authentication", "/docs/testing-platform", "/docs/observability-v3"]
|
|
102
|
+
"guides": ["/docs/realtime-platform", "/docs/authentication", "/docs/testing-platform", "/docs/observability-v3", "/docs/deployment-platform-v2"]
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"package": "bcp/testing",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"environment": "server",
|
|
116
116
|
"route": "/docs/api-reference#bcp-plugins",
|
|
117
117
|
"summary": "Plugin and module composition with dependency ordering, lifecycle hooks, typed config parsing, shared services and asynchronous extension hooks.",
|
|
118
|
-
"guides": ["/docs/plugin-module-platform", "/docs/configuration", "/docs/testing-platform", "/docs/observability-v3"]
|
|
118
|
+
"guides": ["/docs/plugin-module-platform", "/docs/configuration", "/docs/testing-platform", "/docs/observability-v3", "/docs/deployment-platform-v2"]
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
"package": "bcp/observability",
|
|
@@ -123,15 +123,23 @@
|
|
|
123
123
|
"environment": "server",
|
|
124
124
|
"route": "/docs/api-reference#bcp-observability",
|
|
125
125
|
"summary": "Metrics, Prometheus output, health checks and Observability Platform v3 distributed tracing with W3C trace context, correlation IDs, request tracing, span exporters and trace-to-metrics integration.",
|
|
126
|
-
"guides": ["/docs/observability", "/docs/observability-v3", "/docs/development-logging", "/docs/cache-platform-v2"]
|
|
126
|
+
"guides": ["/docs/observability", "/docs/observability-v3", "/docs/development-logging", "/docs/cache-platform-v2", "/docs/deployment-platform-v2"]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"package": "bcp/deployment",
|
|
130
|
+
"source": "packages/client/src/deployment.ts",
|
|
131
|
+
"environment": "server",
|
|
132
|
+
"route": "/docs/api-reference#bcp-deployment",
|
|
133
|
+
"summary": "Deployment Platform v2 runtime lifecycle with resource startup/shutdown ordering, readiness, diagnostics, deployment metadata, signal handling and framework shutdown-hook integration.",
|
|
134
|
+
"guides": ["/docs/deployment-platform-v2", "/docs/application-packaging", "/docs/production-hardening", "/docs/observability-v3"]
|
|
127
135
|
},
|
|
128
136
|
{
|
|
129
137
|
"package": "bcp/server",
|
|
130
138
|
"source": "packages/client/src/server.ts",
|
|
131
139
|
"environment": "server",
|
|
132
140
|
"route": "/docs/api-reference#bcp-server",
|
|
133
|
-
"summary": "Request context, cookies, CSRF/same-origin protection, logging, production hardening, upload, storage, response and session APIs.",
|
|
134
|
-
"guides": ["/docs/server-request-apis", "/docs/authorization-security", "/docs/file-upload", "/docs/storage", "/docs/storage-ecosystem", "/docs/production-hardening", "/docs/testing-platform", "/docs/observability-v3"]
|
|
141
|
+
"summary": "Request context, cookies, CSRF/same-origin protection, logging, production hardening, upload, storage, response and session APIs, published with a compiled Node runtime.",
|
|
142
|
+
"guides": ["/docs/server-request-apis", "/docs/authorization-security", "/docs/file-upload", "/docs/storage", "/docs/storage-ecosystem", "/docs/production-hardening", "/docs/testing-platform", "/docs/observability-v3", "/docs/deployment-platform-v2"]
|
|
135
143
|
},
|
|
136
144
|
{
|
|
137
145
|
"package": "bcp/server-only",
|
|
@@ -146,8 +154,8 @@
|
|
|
146
154
|
"source": "packages/server/src/middleware.ts",
|
|
147
155
|
"environment": "server",
|
|
148
156
|
"route": "/docs/api-reference#bcp-middleware",
|
|
149
|
-
"summary": "Middleware System v2 request/response pipeline types and helpers.",
|
|
150
|
-
"guides": ["/docs/middleware", "/docs/testing-platform", "/docs/observability-v3"]
|
|
157
|
+
"summary": "Middleware System v2 request/response pipeline types and helpers, published with a compiled Node runtime.",
|
|
158
|
+
"guides": ["/docs/middleware", "/docs/testing-platform", "/docs/observability-v3", "/docs/deployment-platform-v2"]
|
|
151
159
|
}
|
|
152
160
|
]
|
|
153
161
|
}
|