@chidchanun/bcp 0.2.5 → 0.2.7
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 +166 -67
- package/docs/README.md +43 -53
- package/docs/api-manifest.json +16 -3
- package/docs/api-reference.md +78 -6
- package/docs/auth-route-guards.md +58 -50
- package/docs/authorization-security.md +298 -0
- package/docs/development-logging.md +44 -1
- package/docs/docs-web-manifest.json +10 -6
- package/docs/observability.md +445 -0
- package/docs/platform-manifest.json +18 -4
- package/docs/releases/0.2.6.md +194 -0
- package/docs/releases/0.2.7.md +205 -0
- package/docs/security.md +55 -1
- package/package.json +6 -1
- package/packages/bundler/src/client-boundary.ts +1 -0
- package/packages/client/src/auth.ts +20 -0
- package/packages/client/src/observability.ts +22 -0
- package/packages/client/src/server.ts +16 -0
- package/packages/server/src/auth-guard.ts +111 -15
- package/packages/server/src/authorization.ts +368 -0
- package/packages/server/src/observability.ts +1258 -0
- package/packages/server/src/request-security.ts +596 -0
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# BCP Framework
|
|
2
2
|
|
|
3
|
-
BCP Framework is a React full-stack framework for file-based routing, SSR, SPA navigation, server data loading, guarded application flows, API routes, authentication, database access, validation, uploads, storage and standalone Node.js production deployment.
|
|
3
|
+
BCP Framework is a React full-stack framework for file-based routing, SSR, SPA navigation, server data loading, guarded application flows, API routes, authentication, authorization, database access, observability, validation, uploads, storage and standalone Node.js production deployment.
|
|
4
4
|
|
|
5
|
-
> **Development target:** `0.2.
|
|
5
|
+
> **Development target:** `0.2.7 — Observability Platform v2`
|
|
6
6
|
>
|
|
7
|
-
> `0.2.
|
|
7
|
+
> `0.2.7` is an unreleased development target until local validation, RC checks, tagging and npm publication complete.
|
|
8
8
|
|
|
9
9
|
## 0.2 platform
|
|
10
10
|
|
|
11
|
-
`0.2.0` established the Framework Platform baseline, `0.2.1` added the Documentation Platform, `0.2.2` added Configuration & Environment v2, `0.2.3` added Database Platform v2, `0.2.4` added Application Packaging, and `0.2.
|
|
11
|
+
`0.2.0` established the Framework Platform baseline, `0.2.1` added the Documentation Platform, `0.2.2` added Configuration & Environment v2, `0.2.3` added Database Platform v2, `0.2.4` added Application Packaging, `0.2.5` added Authentication Platform v2, `0.2.6` added Authorization & Security v2, and `0.2.7` adds dependency-free metrics, Prometheus exposition, request metrics and health/readiness checks without intentionally changing the existing application model.
|
|
12
12
|
|
|
13
13
|
Machine-readable platform contracts:
|
|
14
14
|
|
|
@@ -31,13 +31,14 @@ docs/api-manifest.json
|
|
|
31
31
|
| Routing | Static, dynamic, catch-all, optional catch-all and route groups |
|
|
32
32
|
| Server data | Route `loader.ts`, request-scoped server APIs |
|
|
33
33
|
| Mutations | Route-owned `actions.ts` and `<Form>` |
|
|
34
|
-
| Authorization | `guard.ts`, `requireAuth()`, `requireGuest()`, `requireRole()` |
|
|
35
34
|
| Authentication | JWT cookie sessions, optional server-side session stores, revocation, logout-all, idle timeout and rotation |
|
|
35
|
+
| Authorization | Auth/guest/role/permission route guards, flat permissions and resource-aware policies |
|
|
36
|
+
| Request security | Same-origin validation and signed CSRF tokens for unsafe mutations |
|
|
36
37
|
| Middleware | Middleware System v2 with onion execution |
|
|
38
|
+
| Observability | Structured logs, counters/gauges/histograms, Prometheus output, request metrics and health/readiness checks |
|
|
37
39
|
| Validation | Typed validators and structured validation errors |
|
|
38
40
|
| Error handling | HTTP error helpers and consistent error responses |
|
|
39
41
|
| Database | Provider-neutral MySQL, PostgreSQL and SQLite adapters, transactions, lifecycle and migrations |
|
|
40
|
-
| Logging | Structured logger, request logger and request IDs |
|
|
41
42
|
| Uploads | Buffered multipart helpers and production multipart streaming |
|
|
42
43
|
| Storage | Local + S3-compatible storage, streaming, list/copy/move, metadata, bulk delete and signed URLs |
|
|
43
44
|
| Caching | Response cache and revalidation primitives |
|
|
@@ -155,8 +156,6 @@ await db.connect();
|
|
|
155
156
|
await db.disconnect();
|
|
156
157
|
```
|
|
157
158
|
|
|
158
|
-
`db.close()` remains available for backward-compatible shutdown handling.
|
|
159
|
-
|
|
160
159
|
Migration CLI:
|
|
161
160
|
|
|
162
161
|
```bash
|
|
@@ -166,8 +165,6 @@ bcp db status
|
|
|
166
165
|
bcp db rollback
|
|
167
166
|
```
|
|
168
167
|
|
|
169
|
-
BCP makes framework migration bookkeeping provider-aware. Application migration SQL itself is not automatically translated between SQL dialects.
|
|
170
|
-
|
|
171
168
|
Read more:
|
|
172
169
|
|
|
173
170
|
- [Database](docs/database.md)
|
|
@@ -175,7 +172,7 @@ Read more:
|
|
|
175
172
|
|
|
176
173
|
## Application Packaging — 0.2.4
|
|
177
174
|
|
|
178
|
-
Create a fresh production build and
|
|
175
|
+
Create a fresh production build and deployment package:
|
|
179
176
|
|
|
180
177
|
```bash
|
|
181
178
|
bcp package
|
|
@@ -200,8 +197,6 @@ Output:
|
|
|
200
197
|
└─ README.md
|
|
201
198
|
```
|
|
202
199
|
|
|
203
|
-
The package layer creates production-only dependency metadata, deployment/environment manifests, SHA-256 file integrity metadata and a Node 24 Alpine Docker starter.
|
|
204
|
-
|
|
205
200
|
Read more:
|
|
206
201
|
|
|
207
202
|
- [Application Packaging](docs/application-packaging.md)
|
|
@@ -209,7 +204,7 @@ Read more:
|
|
|
209
204
|
|
|
210
205
|
## Authentication Platform v2 — 0.2.5
|
|
211
206
|
|
|
212
|
-
|
|
207
|
+
Stateless signed JWT-cookie authentication remains supported:
|
|
213
208
|
|
|
214
209
|
```ts
|
|
215
210
|
import {
|
|
@@ -232,49 +227,169 @@ const sessionStore =
|
|
|
232
227
|
|
|
233
228
|
export const appAuth =
|
|
234
229
|
createAuth({
|
|
235
|
-
store:
|
|
236
|
-
|
|
237
|
-
idleTimeout:
|
|
238
|
-
60 * 30,
|
|
230
|
+
store: sessionStore,
|
|
231
|
+
idleTimeout: 60 * 30,
|
|
239
232
|
});
|
|
240
233
|
```
|
|
241
234
|
|
|
242
|
-
With a store configured, authentication requires both a valid signed JWT cookie and an active `sid` record.
|
|
235
|
+
With a store configured, authentication requires both a valid signed JWT cookie and an active `sid` record. The built-in memory store is intended for development/tests; production multi-instance deployments should implement `AuthSessionStore` with shared storage.
|
|
236
|
+
|
|
237
|
+
Read more:
|
|
238
|
+
|
|
239
|
+
- [Authentication](docs/authentication.md)
|
|
240
|
+
- [Auth Session Stores](docs/auth-session-store.md)
|
|
241
|
+
- [Auth Route Guards](docs/auth-route-guards.md)
|
|
243
242
|
|
|
244
|
-
|
|
243
|
+
## Authorization & Security v2 — 0.2.6
|
|
244
|
+
|
|
245
|
+
Use flat permissions directly from `bcp/auth`:
|
|
245
246
|
|
|
246
247
|
```ts
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
await appAuth.rotateSession();
|
|
252
|
-
```
|
|
248
|
+
import {
|
|
249
|
+
hasPermission,
|
|
250
|
+
requirePermission,
|
|
251
|
+
} from "bcp/auth";
|
|
253
252
|
|
|
254
|
-
|
|
253
|
+
hasPermission(
|
|
254
|
+
user,
|
|
255
|
+
"users.read"
|
|
256
|
+
);
|
|
257
|
+
|
|
258
|
+
await requirePermission(
|
|
259
|
+
[
|
|
260
|
+
"users.read",
|
|
261
|
+
"users.write",
|
|
262
|
+
],
|
|
263
|
+
{
|
|
264
|
+
match: "all",
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
```
|
|
255
268
|
|
|
256
|
-
|
|
269
|
+
Resource-aware policies:
|
|
257
270
|
|
|
258
271
|
```ts
|
|
259
272
|
import {
|
|
260
|
-
|
|
273
|
+
authorize,
|
|
274
|
+
defineAuthorizationPolicy,
|
|
261
275
|
} from "bcp/auth";
|
|
262
276
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
277
|
+
const updateProject =
|
|
278
|
+
defineAuthorizationPolicy(
|
|
279
|
+
({
|
|
280
|
+
user,
|
|
281
|
+
resource,
|
|
282
|
+
}) =>
|
|
283
|
+
resource.ownerId ===
|
|
284
|
+
user.id
|
|
285
|
+
);
|
|
286
|
+
|
|
287
|
+
await authorize(
|
|
288
|
+
updateProject,
|
|
289
|
+
{
|
|
290
|
+
user,
|
|
291
|
+
resource: project,
|
|
292
|
+
}
|
|
293
|
+
);
|
|
268
294
|
```
|
|
269
295
|
|
|
270
|
-
|
|
296
|
+
Request-security helpers are exposed from `bcp/server`:
|
|
271
297
|
|
|
272
|
-
|
|
298
|
+
```ts
|
|
299
|
+
import {
|
|
300
|
+
createCsrfToken,
|
|
301
|
+
requireCsrfRequest,
|
|
302
|
+
requireSameOriginRequest,
|
|
303
|
+
} from "bcp/server";
|
|
304
|
+
```
|
|
273
305
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
306
|
+
Read more: [Authorization & Security v2](docs/authorization-security.md)
|
|
307
|
+
|
|
308
|
+
## Observability Platform v2 — 0.2.7
|
|
309
|
+
|
|
310
|
+
Create one application metrics registry:
|
|
311
|
+
|
|
312
|
+
```ts
|
|
313
|
+
import {
|
|
314
|
+
createMetricsRegistry,
|
|
315
|
+
} from "bcp/observability";
|
|
316
|
+
|
|
317
|
+
export const metrics =
|
|
318
|
+
createMetricsRegistry();
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Supported metric types:
|
|
322
|
+
|
|
323
|
+
```text
|
|
324
|
+
counter
|
|
325
|
+
gauge
|
|
326
|
+
histogram
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Expose Prometheus-compatible text:
|
|
330
|
+
|
|
331
|
+
```ts
|
|
332
|
+
import {
|
|
333
|
+
createMetricsResponse,
|
|
334
|
+
} from "bcp/observability";
|
|
335
|
+
|
|
336
|
+
export function GET() {
|
|
337
|
+
return createMetricsResponse(
|
|
338
|
+
metrics
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Instrument HTTP requests through Middleware System v2:
|
|
344
|
+
|
|
345
|
+
```ts
|
|
346
|
+
import {
|
|
347
|
+
createRequestMetricsMiddleware,
|
|
348
|
+
} from "bcp/observability";
|
|
349
|
+
|
|
350
|
+
export const requestMetrics =
|
|
351
|
+
createRequestMetricsMiddleware(
|
|
352
|
+
metrics
|
|
353
|
+
);
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Default request metrics use only bounded labels:
|
|
357
|
+
|
|
358
|
+
```text
|
|
359
|
+
bcp_http_requests_total{method,status}
|
|
360
|
+
bcp_http_request_duration_seconds{method,status}
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
Raw paths are not attached by default.
|
|
364
|
+
|
|
365
|
+
Health/readiness registry:
|
|
366
|
+
|
|
367
|
+
```ts
|
|
368
|
+
import {
|
|
369
|
+
createHealthRegistry,
|
|
370
|
+
} from "bcp/observability";
|
|
371
|
+
|
|
372
|
+
export const health =
|
|
373
|
+
createHealthRegistry();
|
|
374
|
+
|
|
375
|
+
health.register(
|
|
376
|
+
"database",
|
|
377
|
+
async () => {
|
|
378
|
+
await db.query("SELECT 1");
|
|
379
|
+
return true;
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Use:
|
|
385
|
+
|
|
386
|
+
```ts
|
|
387
|
+
return health.response();
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
Health responses return `200` when every check passes and `503` when any registered dependency is unhealthy or times out.
|
|
391
|
+
|
|
392
|
+
Read more: [Observability Platform v2](docs/observability.md)
|
|
278
393
|
|
|
279
394
|
## Public entrypoints
|
|
280
395
|
|
|
@@ -289,6 +404,7 @@ bcp/validation
|
|
|
289
404
|
bcp/error
|
|
290
405
|
bcp/database
|
|
291
406
|
bcp/auth
|
|
407
|
+
bcp/observability
|
|
292
408
|
bcp/server
|
|
293
409
|
bcp/server-only
|
|
294
410
|
bcp/middleware
|
|
@@ -337,40 +453,23 @@ bcp generate middleware
|
|
|
337
453
|
bcp generate migration create_users
|
|
338
454
|
```
|
|
339
455
|
|
|
340
|
-
Page/API/middleware generators require `--force` before replacing an existing scaffold target.
|
|
341
|
-
|
|
342
456
|
## Application model
|
|
343
457
|
|
|
344
458
|
```text
|
|
345
459
|
Browser
|
|
346
460
|
↓
|
|
347
|
-
|
|
461
|
+
Origin / CSRF / middleware / cache
|
|
348
462
|
↓
|
|
349
|
-
|
|
463
|
+
Authentication + authorization guard
|
|
350
464
|
↓
|
|
351
465
|
Loader / action / API route
|
|
352
466
|
↓
|
|
353
467
|
React SSR
|
|
354
468
|
↓
|
|
355
469
|
Hydration / SPA navigation
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
Typical route structure:
|
|
359
470
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
├─ layout.tsx
|
|
363
|
-
├─ page.tsx
|
|
364
|
-
├─ dashboard/
|
|
365
|
-
│ ├─ guard.ts
|
|
366
|
-
│ └─ users/
|
|
367
|
-
│ └─ [id]/
|
|
368
|
-
│ ├─ loader.ts
|
|
369
|
-
│ ├─ actions.ts
|
|
370
|
-
│ └─ page.tsx
|
|
371
|
-
└─ api/
|
|
372
|
-
└─ upload/
|
|
373
|
-
└─ route.ts
|
|
471
|
+
Operational side channels:
|
|
472
|
+
structured logs + metrics + health/readiness
|
|
374
473
|
```
|
|
375
474
|
|
|
376
475
|
## Production build
|
|
@@ -388,7 +487,7 @@ Deployment package:
|
|
|
388
487
|
bcp package
|
|
389
488
|
```
|
|
390
489
|
|
|
391
|
-
Both current targets remain Node.js `standalone-node` applications.
|
|
490
|
+
Both current targets remain Node.js `standalone-node` applications.
|
|
392
491
|
|
|
393
492
|
## Documentation Platform
|
|
394
493
|
|
|
@@ -402,8 +501,6 @@ docs/platform-manifest.json
|
|
|
402
501
|
docs/api-manifest.json
|
|
403
502
|
```
|
|
404
503
|
|
|
405
|
-
The manifests provide navigation order, routes, Markdown sources, version/release state, public entrypoints and API guide ownership.
|
|
406
|
-
|
|
407
504
|
## Release validation
|
|
408
505
|
|
|
409
506
|
Framework releases must pass:
|
|
@@ -418,7 +515,7 @@ npm run test:e2e
|
|
|
418
515
|
npm run rc:check
|
|
419
516
|
```
|
|
420
517
|
|
|
421
|
-
`0.2.
|
|
518
|
+
`0.2.7` adds Observability Platform v2 unit and prepared-package smoke checks covering metrics, Prometheus exposition, request timing, cardinality-safe default labels, health/readiness responses and timeout handling.
|
|
422
519
|
|
|
423
520
|
Do not tag or publish until the final release commit passes the complete RC sequence.
|
|
424
521
|
|
|
@@ -438,12 +535,14 @@ Do not tag or publish until the final release commit passes the complete RC sequ
|
|
|
438
535
|
| `0.2.3` | Database Platform v2 |
|
|
439
536
|
| `0.2.4` | Application Packaging |
|
|
440
537
|
| `0.2.5` | Authentication Platform v2 |
|
|
538
|
+
| `0.2.6` | Authorization & Security v2 |
|
|
539
|
+
| `0.2.7` | Observability Platform v2 |
|
|
441
540
|
|
|
442
541
|
## Roadmap
|
|
443
542
|
|
|
444
|
-
`0.2.
|
|
543
|
+
`0.2.7 — Observability Platform v2` establishes process-level metrics and health/readiness contracts on top of the existing structured logging and Middleware System v2 runtime.
|
|
445
544
|
|
|
446
|
-
|
|
545
|
+
Future `0.2.x` work can add distributed tracing or exporter integrations without changing the application metrics/health contract introduced here. Native `.exe`, desktop and mobile compilation remain later roadmap work.
|
|
447
546
|
|
|
448
547
|
## License
|
|
449
548
|
|
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.7 — Observability Platform v2`
|
|
6
6
|
>
|
|
7
7
|
> **Release state:** unreleased development target until RC validation, tagging and npm publication complete.
|
|
8
8
|
|
|
@@ -51,62 +51,50 @@ Framework source and tests remain authoritative for runtime behavior.
|
|
|
51
51
|
| `0.2.3` | Database Platform v2 |
|
|
52
52
|
| `0.2.4` | Application Packaging |
|
|
53
53
|
| `0.2.5` | Authentication Platform v2 |
|
|
54
|
+
| `0.2.6` | Authorization & Security v2 |
|
|
55
|
+
| `0.2.7` | Observability Platform v2 |
|
|
54
56
|
|
|
55
|
-
## 0.2.
|
|
57
|
+
## 0.2.7 — Observability Platform v2
|
|
56
58
|
|
|
57
|
-
`0.2.
|
|
59
|
+
`0.2.7` adds a server-only observability layer without adding third-party runtime dependencies.
|
|
58
60
|
|
|
59
61
|
New/updated documentation sources:
|
|
60
62
|
|
|
61
63
|
| Source | Purpose |
|
|
62
64
|
| --- | --- |
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `api-
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `releases/0.2.5.md` | Authentication Platform v2 release notes |
|
|
65
|
+
| `observability.md` | Metrics registry, Prometheus output, request metrics and health/readiness checks |
|
|
66
|
+
| `api-reference.md` | Public `bcp/observability` exports |
|
|
67
|
+
| `platform-manifest.json` | Observability capability flags and new public entrypoint |
|
|
68
|
+
| `api-manifest.json` | `bcp/observability` guide ownership |
|
|
69
|
+
| `docs-web-manifest.json` | Observability navigation and `0.2.7` release route |
|
|
70
|
+
| `releases/0.2.7.md` | Observability Platform v2 release notes |
|
|
70
71
|
|
|
71
|
-
Primary
|
|
72
|
+
Primary APIs:
|
|
72
73
|
|
|
73
74
|
```ts
|
|
74
75
|
import {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
logoutAll,
|
|
81
|
-
requireAuth,
|
|
82
|
-
requireGuest,
|
|
83
|
-
requireRole,
|
|
84
|
-
} from "bcp/auth";
|
|
76
|
+
createHealthRegistry,
|
|
77
|
+
createMetricsRegistry,
|
|
78
|
+
createMetricsResponse,
|
|
79
|
+
createRequestMetricsMiddleware,
|
|
80
|
+
} from "bcp/observability";
|
|
85
81
|
```
|
|
86
82
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Default mode:
|
|
83
|
+
Runtime model:
|
|
90
84
|
|
|
91
85
|
```text
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
86
|
+
structured logs
|
|
87
|
+
+
|
|
88
|
+
process-local metrics
|
|
89
|
+
+
|
|
90
|
+
Prometheus exposition
|
|
91
|
+
+
|
|
92
|
+
health/readiness checks
|
|
97
93
|
```
|
|
98
94
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```text
|
|
102
|
-
signed HttpOnly JWT cookie
|
|
103
|
-
+
|
|
104
|
-
server-side sid store
|
|
105
|
-
↓
|
|
106
|
-
revocable authenticated session
|
|
107
|
-
```
|
|
95
|
+
The request metrics middleware intentionally uses bounded `method` and `status` labels by default rather than raw paths.
|
|
108
96
|
|
|
109
|
-
The built-in
|
|
97
|
+
The built-in metrics registry is process-local; distributed aggregation remains deployment infrastructure or future exporter work.
|
|
110
98
|
|
|
111
99
|
## Update rule
|
|
112
100
|
|
|
@@ -130,7 +118,7 @@ Current sections:
|
|
|
130
118
|
```text
|
|
131
119
|
Getting Started
|
|
132
120
|
Routing & Data
|
|
133
|
-
Authentication
|
|
121
|
+
Authentication & Authorization
|
|
134
122
|
Database
|
|
135
123
|
Runtime & Infrastructure
|
|
136
124
|
Storage & Uploads
|
|
@@ -145,12 +133,13 @@ Important current routes:
|
|
|
145
133
|
| Website route | Markdown source |
|
|
146
134
|
| --- | --- |
|
|
147
135
|
| `/docs/authentication` | `authentication.md` |
|
|
148
|
-
| `/docs/
|
|
149
|
-
| `/docs/
|
|
136
|
+
| `/docs/authorization-security` | `authorization-security.md` |
|
|
137
|
+
| `/docs/observability` | `observability.md` |
|
|
138
|
+
| `/docs/development-logging` | `development-logging.md` |
|
|
150
139
|
| `/docs/application-packaging` | `application-packaging.md` |
|
|
151
140
|
| `/docs/database` | `database.md` |
|
|
152
141
|
| `/docs/api-reference` | `api-reference.md` |
|
|
153
|
-
| `/releases/0.2.
|
|
142
|
+
| `/releases/0.2.7` | `releases/0.2.7.md` |
|
|
154
143
|
|
|
155
144
|
Every route/source pair is validated by unit tests.
|
|
156
145
|
|
|
@@ -190,6 +179,7 @@ bcp/validation
|
|
|
190
179
|
bcp/error
|
|
191
180
|
bcp/database
|
|
192
181
|
bcp/auth
|
|
182
|
+
bcp/observability
|
|
193
183
|
bcp/server
|
|
194
184
|
bcp/server-only
|
|
195
185
|
bcp/middleware
|
|
@@ -229,7 +219,7 @@ synchronize CMS/search/navigation
|
|
|
229
219
|
|
|
230
220
|
## Release validation
|
|
231
221
|
|
|
232
|
-
Before publishing `0.2.
|
|
222
|
+
Before publishing `0.2.7`:
|
|
233
223
|
|
|
234
224
|
```bash
|
|
235
225
|
npm run typecheck
|
|
@@ -240,16 +230,16 @@ npm run test:e2e
|
|
|
240
230
|
npm run rc:check
|
|
241
231
|
```
|
|
242
232
|
|
|
243
|
-
|
|
233
|
+
Observability Platform v2 validation covers:
|
|
244
234
|
|
|
245
|
-
-
|
|
246
|
-
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
252
|
-
- public `bcp/
|
|
235
|
+
- counter/gauge/histogram behavior,
|
|
236
|
+
- Prometheus exposition,
|
|
237
|
+
- metric definition validation,
|
|
238
|
+
- request count and duration middleware,
|
|
239
|
+
- cardinality-safe default request labels,
|
|
240
|
+
- health/readiness response semantics,
|
|
241
|
+
- health check timeout handling,
|
|
242
|
+
- public `bcp/observability` exports,
|
|
253
243
|
- prepared npm package contents,
|
|
254
244
|
- docs/platform/API version parity.
|
|
255
245
|
|
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.7",
|
|
5
5
|
"releaseState": "unreleased",
|
|
6
6
|
"coverage": "public-entrypoints",
|
|
7
7
|
"entrypoints": [
|
|
@@ -85,22 +85,35 @@
|
|
|
85
85
|
"source": "packages/client/src/auth.ts",
|
|
86
86
|
"environment": "server",
|
|
87
87
|
"route": "/docs/api-reference#bcp-auth",
|
|
88
|
-
"summary": "Authentication Platform v2
|
|
88
|
+
"summary": "Authentication Platform v2 plus permission checks, authorization policies and auth/guest/role/permission route guards.",
|
|
89
89
|
"guides": [
|
|
90
90
|
"/docs/authentication",
|
|
91
91
|
"/docs/auth-session-store",
|
|
92
92
|
"/docs/auth-route-guards",
|
|
93
|
+
"/docs/authorization-security",
|
|
93
94
|
"/docs/session-auth"
|
|
94
95
|
]
|
|
95
96
|
},
|
|
97
|
+
{
|
|
98
|
+
"package": "bcp/observability",
|
|
99
|
+
"source": "packages/client/src/observability.ts",
|
|
100
|
+
"environment": "server",
|
|
101
|
+
"route": "/docs/api-reference#bcp-observability",
|
|
102
|
+
"summary": "In-process metrics, Prometheus exposition, request metrics middleware and health/readiness checks.",
|
|
103
|
+
"guides": [
|
|
104
|
+
"/docs/observability",
|
|
105
|
+
"/docs/development-logging"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
96
108
|
{
|
|
97
109
|
"package": "bcp/server",
|
|
98
110
|
"source": "packages/client/src/server.ts",
|
|
99
111
|
"environment": "server",
|
|
100
112
|
"route": "/docs/api-reference#bcp-server",
|
|
101
|
-
"summary": "Request context, cookies, logging, production hardening, upload, storage, response and session APIs.",
|
|
113
|
+
"summary": "Request context, cookies, CSRF/same-origin protection, logging, production hardening, upload, storage, response and session APIs.",
|
|
102
114
|
"guides": [
|
|
103
115
|
"/docs/server-request-apis",
|
|
116
|
+
"/docs/authorization-security",
|
|
104
117
|
"/docs/file-upload",
|
|
105
118
|
"/docs/storage",
|
|
106
119
|
"/docs/storage-ecosystem",
|