@chidchanun/bcp 0.2.16 → 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/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.16Cache Platform v2`
5
+ > **Documentation target:** BCP Framework `0.2.18Deployment Platform v2`
6
6
  >
7
7
  > **Release state:** unreleased development target until RC validation, tagging and npm publication complete.
8
8
 
@@ -42,60 +42,58 @@ Framework source and tests remain authoritative for runtime behavior.
42
42
  | `0.2.14` | Testing Platform |
43
43
  | `0.2.15` | Plugin & Module Platform |
44
44
  | `0.2.16` | Cache Platform v2 |
45
+ | `0.2.17` | Observability Platform v3 |
46
+ | `0.2.18` | Deployment Platform v2 |
45
47
 
46
- ## 0.2.16Cache Platform v2
48
+ ## 0.2.18Deployment Platform v2
47
49
 
48
- `0.2.16` extends the existing `bcp/cache` public entrypoint while keeping its original process-local APIs backward compatible.
50
+ `0.2.18` adds the server-only `bcp/deployment` entrypoint and completes compiled production runtime coverage for key server package surfaces.
49
51
 
50
- Primary Cache Store v2 APIs:
52
+ Primary APIs:
51
53
 
52
54
  ```ts
53
55
  import {
54
- createCacheMetrics,
55
- createCacheStore,
56
- createMemoryCacheAdapter,
57
- createMemoryCacheLockAdapter,
58
- createRedisCacheAdapter,
59
- createRedisCacheLockAdapter,
60
- } from "bcp/cache";
56
+ createDeploymentDiagnosticsResponse,
57
+ createDeploymentReadinessResponse,
58
+ createDeploymentRuntime,
59
+ } from "bcp/deployment";
61
60
  ```
62
61
 
63
62
  Runtime model:
64
63
 
65
64
  ```text
66
- Application
65
+ process start
67
66
  |
68
67
  v
69
- CacheStore
68
+ DeploymentRuntime
70
69
  |
71
- +-- CacheAdapter
72
- | +-- memory
73
- | +-- Redis-compatible
70
+ +-- resource start order
71
+ +-- readiness checks
72
+ +-- diagnostics
73
+ +-- deployment metadata
74
+ +-- SIGTERM / SIGINT
74
75
  |
75
- +-- CacheLockAdapter
76
- | +-- memory
77
- | +-- Redis-compatible
76
+ v
77
+ state = ready
78
+ |
79
+ shutdown/drain
78
80
  |
79
- +-- local singleflight
80
- +-- distributed cache-fill lease
81
- +-- TTL / tags / paths
82
- +-- metrics sink
81
+ v
82
+ reverse-order resource stop
83
83
  ```
84
84
 
85
- `getOrSet()` deduplicates cache fills inside one process. With a shared lock adapter, multiple processes coordinate cache misses through owner-scoped leases, optional lock renewal and wait/poll behavior.
86
-
87
- The Redis reference adapter uses the default hash-tagged namespace `bcp:{cache}` and does not install or own a Redis client.
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.
88
86
 
89
87
  New/updated sources:
90
88
 
91
89
  | Source | Purpose |
92
90
  | --- | --- |
93
- | `cache-platform-v2.md` | Adapter contracts, Redis cache/locks, stampede protection, TTL/invalidation and metrics |
94
- | `api-reference.md` | `bcp/cache` Cache Platform v2 APIs |
95
- | `platform-manifest.json` | Cache v2 capability flags |
96
- | `api-manifest.json` | Updated `bcp/cache` source/guide ownership |
97
- | `docs-web-manifest.json` | Cache v2 docs navigation and `0.2.16` release route |
98
- | `releases/0.2.16.md` | Cache Platform v2 release notes |
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 |
99
97
 
100
98
  ## Update rule
101
99
 
@@ -114,9 +112,8 @@ When framework behavior or public surface changes:
114
112
 
115
113
  | Website route | Markdown source |
116
114
  | --- | --- |
117
- | `/docs/authentication` | `authentication.md` |
118
- | `/docs/observability` | `observability.md` |
119
- | `/docs/background-jobs` | `background-jobs.md` |
115
+ | `/docs/observability-v3` | `observability-v3.md` |
116
+ | `/docs/deployment-platform-v2` | `deployment-platform-v2.md` |
120
117
  | `/docs/durable-jobs` | `durable-jobs.md` |
121
118
  | `/docs/workflow-orchestration` | `workflow-orchestration.md` |
122
119
  | `/docs/transactional-outbox-events` | `transactional-outbox-events.md` |
@@ -125,7 +122,7 @@ When framework behavior or public surface changes:
125
122
  | `/docs/plugin-module-platform` | `plugin-module-platform.md` |
126
123
  | `/docs/cache-platform-v2` | `cache-platform-v2.md` |
127
124
  | `/docs/api-reference` | `api-reference.md` |
128
- | `/releases/0.2.16` | `releases/0.2.16.md` |
125
+ | `/releases/0.2.18` | `releases/0.2.18.md` |
129
126
 
130
127
  Every route/source pair is validated by unit tests.
131
128
 
@@ -147,6 +144,7 @@ bcp/realtime
147
144
  bcp/testing
148
145
  bcp/plugins
149
146
  bcp/observability
147
+ bcp/deployment
150
148
  bcp/server
151
149
  bcp/server-only
152
150
  bcp/middleware
@@ -156,7 +154,7 @@ The API-manifest entrypoint set must match the platform public-entrypoint set ex
156
154
 
157
155
  ## Release validation
158
156
 
159
- Before publishing `0.2.16`:
157
+ Before publishing `0.2.18`:
160
158
 
161
159
  ```bash
162
160
  npm run typecheck
@@ -167,6 +165,6 @@ npm run test:package
167
165
  npm run rc:check
168
166
  ```
169
167
 
170
- Cache Platform v2 validation covers TTL/tag/path invalidation, local singleflight, cross-store distributed locking, lock timeout behavior, Redis command contracts, metrics integration, compiled `cache.mjs` package execution and docs/platform/API parity.
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.
171
169
 
172
170
  The final release tag must point to the exact commit that passed the complete RC sequence.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "framework": "bcp",
4
- "version": "0.2.16",
4
+ "version": "0.2.18",
5
5
  "releaseState": "unreleased",
6
6
  "coverage": "public-entrypoints",
7
7
  "entrypoints": [
@@ -27,15 +27,15 @@
27
27
  "environment": "server-preferred",
28
28
  "route": "/docs/api-reference#bcp-cache",
29
29
  "summary": "Backward-compatible request/data caching plus Cache Platform v2 adapters, Redis-compatible distributed cache and locks, stampede protection, TTL/tag/path invalidation and metrics integration.",
30
- "guides": ["/docs/caching", "/docs/cache-platform-v2", "/docs/observability"]
30
+ "guides": ["/docs/caching", "/docs/cache-platform-v2", "/docs/observability-v3"]
31
31
  },
32
32
  {
33
33
  "package": "bcp/config",
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"]
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"]
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"]
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"]
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"]
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",
@@ -107,7 +107,7 @@
107
107
  "environment": "server",
108
108
  "route": "/docs/api-reference#bcp-testing",
109
109
  "summary": "Framework-native testing utilities for Request/Response handlers, signed auth sessions, rollback transactions, page/server execution, middleware, jobs, workflows, outbox delivery, realtime sockets and SSE.",
110
- "guides": ["/docs/testing-platform", "/docs/authentication", "/docs/database", "/docs/durable-jobs", "/docs/workflow-orchestration", "/docs/transactional-outbox-events", "/docs/realtime-platform"]
110
+ "guides": ["/docs/testing-platform", "/docs/authentication", "/docs/database", "/docs/durable-jobs", "/docs/workflow-orchestration", "/docs/transactional-outbox-events", "/docs/realtime-platform", "/docs/observability-v3"]
111
111
  },
112
112
  {
113
113
  "package": "bcp/plugins",
@@ -115,23 +115,31 @@
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"]
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",
122
122
  "source": "packages/client/src/observability.ts",
123
123
  "environment": "server",
124
124
  "route": "/docs/api-reference#bcp-observability",
125
- "summary": "In-process metrics, Prometheus exposition, request metrics middleware and health/readiness checks.",
126
- "guides": ["/docs/observability", "/docs/development-logging", "/docs/cache-platform-v2"]
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", "/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"]
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"]
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
  }