@chidchanun/bcp 0.2.18 → 0.3.0
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 +171 -218
- package/docs/README.md +81 -44
- package/docs/api-freeze-snapshot.json +243 -0
- package/docs/api-manifest.json +21 -13
- package/docs/api-reference.md +105 -12
- package/docs/application-platform.md +378 -0
- package/docs/docs-web-manifest.json +9 -4
- package/docs/migration-0.2.md +79 -80
- package/docs/migration-0.3.md +159 -0
- package/docs/platform-contract.md +92 -78
- package/docs/platform-manifest.json +29 -6
- package/docs/releases/0.2.19.md +125 -0
- package/docs/releases/0.3.0.md +129 -0
- package/docs/releasing.md +104 -179
- package/docs/stability-api-freeze.md +150 -0
- package/package.json +8 -2
- package/packages/bundler/src/client-boundary.ts +1 -0
- package/packages/client/src/application.mjs +1873 -0
- package/packages/client/src/application.ts +12 -0
- package/packages/server/src/application.ts +845 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"framework": "bcp",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"releaseState": "unreleased",
|
|
6
|
-
"baseline": "
|
|
6
|
+
"baseline": "application-platform",
|
|
7
7
|
"runtime": {
|
|
8
8
|
"node": ">=24.11.0",
|
|
9
9
|
"react": "19",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"bcp/plugins",
|
|
28
28
|
"bcp/observability",
|
|
29
29
|
"bcp/deployment",
|
|
30
|
+
"bcp/application",
|
|
30
31
|
"bcp/server",
|
|
31
32
|
"bcp/server-only",
|
|
32
33
|
"bcp/middleware"
|
|
@@ -95,6 +96,25 @@
|
|
|
95
96
|
"compiledAuthRuntime": true,
|
|
96
97
|
"compiledServerRuntime": true,
|
|
97
98
|
"compiledMiddlewareRuntime": true,
|
|
99
|
+
"applicationPlatform": true,
|
|
100
|
+
"applicationDefinitions": true,
|
|
101
|
+
"applicationRuntime": true,
|
|
102
|
+
"applicationConfigSchemas": true,
|
|
103
|
+
"applicationServiceRegistry": true,
|
|
104
|
+
"applicationPluginComposition": true,
|
|
105
|
+
"applicationModuleComposition": true,
|
|
106
|
+
"applicationResourceLifecycle": true,
|
|
107
|
+
"applicationReadiness": true,
|
|
108
|
+
"applicationDiagnostics": true,
|
|
109
|
+
"applicationLifecycleRollback": true,
|
|
110
|
+
"applicationLifecycleIdempotency": true,
|
|
111
|
+
"compiledApplicationRuntime": true,
|
|
112
|
+
"stabilityApiFreeze": true,
|
|
113
|
+
"apiFreezeSnapshot": true,
|
|
114
|
+
"apiCompatibilityGate": true,
|
|
115
|
+
"releaseReadinessReport": true,
|
|
116
|
+
"packageExportParity": true,
|
|
117
|
+
"deploymentLifecycleIdempotency": true,
|
|
98
118
|
"backgroundJobsPlatform": true,
|
|
99
119
|
"jobQueueAdapterContract": true,
|
|
100
120
|
"inMemoryJobQueue": true,
|
|
@@ -224,17 +244,20 @@
|
|
|
224
244
|
"s3-compatible"
|
|
225
245
|
],
|
|
226
246
|
"compatibility": {
|
|
227
|
-
"previousBaseline": "0.2.
|
|
247
|
+
"previousBaseline": "0.2.19",
|
|
228
248
|
"intentionalBreakingChangesFromPreviousBaseline": false,
|
|
229
|
-
"migrationGuide": "migration-0.
|
|
249
|
+
"migrationGuide": "migration-0.3.md"
|
|
230
250
|
},
|
|
231
251
|
"documentation": {
|
|
232
252
|
"navigationManifest": "docs-web-manifest.json",
|
|
233
253
|
"platformManifest": "platform-manifest.json",
|
|
234
254
|
"apiManifest": "api-manifest.json",
|
|
255
|
+
"apiFreezeSnapshot": "api-freeze-snapshot.json",
|
|
235
256
|
"platformContract": "platform-contract.md",
|
|
236
257
|
"documentationPlatform": "documentation-platform.md",
|
|
237
258
|
"apiReference": "api-reference.md",
|
|
259
|
+
"stabilityApiFreeze": "stability-api-freeze.md",
|
|
260
|
+
"applicationPlatform": "application-platform.md",
|
|
238
261
|
"environmentValidation": "environment-validation.md",
|
|
239
262
|
"applicationPackaging": "application-packaging.md",
|
|
240
263
|
"authentication": "authentication.md",
|
|
@@ -252,7 +275,7 @@
|
|
|
252
275
|
"testingPlatform": "testing-platform.md",
|
|
253
276
|
"pluginModulePlatform": "plugin-module-platform.md",
|
|
254
277
|
"cachePlatformV2": "cache-platform-v2.md",
|
|
255
|
-
"migrationGuide": "migration-0.
|
|
256
|
-
"releaseNotes": "releases/0.
|
|
278
|
+
"migrationGuide": "migration-0.3.md",
|
|
279
|
+
"releaseNotes": "releases/0.3.0.md"
|
|
257
280
|
}
|
|
258
281
|
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# BCP Framework 0.2.19
|
|
2
|
+
|
|
3
|
+
Status: **unreleased**
|
|
4
|
+
|
|
5
|
+
Milestone: **Stability & API Freeze**
|
|
6
|
+
|
|
7
|
+
`0.2.19` is the final `0.2.x` stabilization milestone before the next `0.3.0` application-platform baseline.
|
|
8
|
+
|
|
9
|
+
## Highlights
|
|
10
|
+
|
|
11
|
+
- freezes the documented `bcp/*` public entrypoint set;
|
|
12
|
+
- freezes the supported CLI command set;
|
|
13
|
+
- freezes prepared npm export resolution including browser boundaries;
|
|
14
|
+
- adds deterministic API snapshot generation;
|
|
15
|
+
- adds an API compatibility gate to RC validation;
|
|
16
|
+
- adds a release-readiness report;
|
|
17
|
+
- adds prepared-package Stability & API Freeze smoke coverage;
|
|
18
|
+
- adds deployment lifecycle idempotency regression coverage;
|
|
19
|
+
- keeps compatibility with `0.2.18` with no intentional breaking changes.
|
|
20
|
+
|
|
21
|
+
## API freeze snapshot
|
|
22
|
+
|
|
23
|
+
New source of truth:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
docs/api-freeze-snapshot.json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Generate intentionally with:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm run api:snapshot
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Validate without changing the snapshot:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm run api:check
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The compatibility check prepares the publish package and compares the current package/CLI/API ownership contract against the committed snapshot.
|
|
42
|
+
|
|
43
|
+
## Release readiness
|
|
44
|
+
|
|
45
|
+
New commands:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm run release:readiness
|
|
49
|
+
npm run release:readiness:report
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The persisted report is written locally to:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
.bcp-framework/release-readiness.json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Readiness includes package/lock/manifests version parity, freeze/baseline metadata, release-note/docs presence and public API parity.
|
|
59
|
+
|
|
60
|
+
## RC pipeline
|
|
61
|
+
|
|
62
|
+
`release:check` now includes:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
typecheck
|
|
66
|
+
full test suite
|
|
67
|
+
API compatibility check
|
|
68
|
+
release readiness check
|
|
69
|
+
release metadata check
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`test:package` / `package:check` also include `stability-api-freeze-package-smoke.mjs`.
|
|
73
|
+
|
|
74
|
+
## Compatibility
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
previous baseline: 0.2.18
|
|
78
|
+
intentional breaking changes: false
|
|
79
|
+
freeze state: frozen
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The existing public package surface remains unchanged from `0.2.18`:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
bcp
|
|
86
|
+
bcp/island
|
|
87
|
+
bcp/cache
|
|
88
|
+
bcp/config
|
|
89
|
+
bcp/validation
|
|
90
|
+
bcp/error
|
|
91
|
+
bcp/database
|
|
92
|
+
bcp/auth
|
|
93
|
+
bcp/jobs
|
|
94
|
+
bcp/workflow
|
|
95
|
+
bcp/events
|
|
96
|
+
bcp/realtime
|
|
97
|
+
bcp/testing
|
|
98
|
+
bcp/plugins
|
|
99
|
+
bcp/observability
|
|
100
|
+
bcp/deployment
|
|
101
|
+
bcp/server
|
|
102
|
+
bcp/server-only
|
|
103
|
+
bcp/middleware
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Validation before release
|
|
107
|
+
|
|
108
|
+
Run on the exact release commit:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
npm run typecheck
|
|
112
|
+
npm run test:unit
|
|
113
|
+
npm run test:integration
|
|
114
|
+
npm run test:e2e
|
|
115
|
+
npm run test:package
|
|
116
|
+
npm run api:check
|
|
117
|
+
npm run release:readiness
|
|
118
|
+
npm run rc:check
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Do not tag or publish until the complete RC sequence passes.
|
|
122
|
+
|
|
123
|
+
## Next baseline
|
|
124
|
+
|
|
125
|
+
`0.3.0` is the next planned BCP Application Platform baseline. Intentional public API changes should be made there with explicit migration and compatibility metadata rather than silently changing the frozen `0.2.19` contract.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# BCP Framework 0.3.0 — Application Platform
|
|
2
|
+
|
|
3
|
+
`0.3.0` establishes the first BCP Application Platform baseline on top of the infrastructure and API freeze completed in `0.2.x`.
|
|
4
|
+
|
|
5
|
+
> **Release state:** unreleased until the complete RC gate passes, `v0.3.0` is tagged and both npm packages are published successfully.
|
|
6
|
+
|
|
7
|
+
## Highlights
|
|
8
|
+
|
|
9
|
+
- Adds the server-only `bcp/application` public entrypoint.
|
|
10
|
+
- Adds `defineApp()` for validated application definitions.
|
|
11
|
+
- Adds `createApp()` for a unified application composition root.
|
|
12
|
+
- Reuses the existing Plugin Platform service registry and hook bus.
|
|
13
|
+
- Reuses existing plugin/module definitions without conversion.
|
|
14
|
+
- Reuses Deployment Platform resources, readiness, diagnostics, signal handling and shutdown hooks.
|
|
15
|
+
- Adds typed application-level config parsing.
|
|
16
|
+
- Adds deterministic application lifecycle ordering.
|
|
17
|
+
- Adds startup rollback and terminal cleanup through the deployment resource graph.
|
|
18
|
+
- Adds concurrent/repeated start and shutdown idempotency coverage.
|
|
19
|
+
- Publishes `application.mjs` as a compiled production runtime.
|
|
20
|
+
- Adds prepared-package smoke coverage for the new entrypoint and lifecycle.
|
|
21
|
+
|
|
22
|
+
## Public API
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import {
|
|
26
|
+
ApplicationLifecycleError,
|
|
27
|
+
createApp,
|
|
28
|
+
defineApp,
|
|
29
|
+
} from "bcp/application";
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Key types:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
Application
|
|
36
|
+
ApplicationConfigParser
|
|
37
|
+
ApplicationConfigSchema
|
|
38
|
+
ApplicationContext
|
|
39
|
+
ApplicationDefinition
|
|
40
|
+
ApplicationState
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Application composition
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
const app =
|
|
47
|
+
createApp({
|
|
48
|
+
name: "orders-api",
|
|
49
|
+
version: "1.0.0",
|
|
50
|
+
plugins: [
|
|
51
|
+
authPlugin,
|
|
52
|
+
jobsPlugin,
|
|
53
|
+
],
|
|
54
|
+
resources: [
|
|
55
|
+
databaseResource,
|
|
56
|
+
workerResource,
|
|
57
|
+
],
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
await app.start();
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The application exposes the shared platform objects directly:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
app.services
|
|
67
|
+
app.hooks
|
|
68
|
+
app.plugins
|
|
69
|
+
app.deployment
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Existing provider-native database, cache, job, workflow, event and realtime instances can be stored in the service registry or wrapped in deployment resources as appropriate.
|
|
73
|
+
|
|
74
|
+
## Lifecycle
|
|
75
|
+
|
|
76
|
+
Startup:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
application.setup
|
|
80
|
+
plugin setup/start
|
|
81
|
+
resources start in registration order
|
|
82
|
+
application.start
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Shutdown:
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
application.stop
|
|
89
|
+
resources stop in reverse order
|
|
90
|
+
plugin stop/dispose
|
|
91
|
+
application.dispose
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Startup failures roll back already-started resources in reverse order.
|
|
95
|
+
|
|
96
|
+
## Compatibility
|
|
97
|
+
|
|
98
|
+
The `0.2.19` Stability & API Freeze release is the compatibility baseline for `0.3.0`.
|
|
99
|
+
|
|
100
|
+
`0.3.0` intentionally adds:
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
bcp/application
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
No existing `0.2.19` public entrypoint is intentionally removed.
|
|
107
|
+
|
|
108
|
+
The API snapshot/compatibility tooling is updated to establish the reviewed `0.3.0` package baseline after the new entrypoint is added.
|
|
109
|
+
|
|
110
|
+
## Validation
|
|
111
|
+
|
|
112
|
+
Before tagging:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npm run typecheck
|
|
116
|
+
npm run test:unit
|
|
117
|
+
npm run test:integration
|
|
118
|
+
npm run test:e2e
|
|
119
|
+
npm run test:package
|
|
120
|
+
npm run api:check
|
|
121
|
+
npm run release:readiness
|
|
122
|
+
npm run rc:check
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Do not publish until these commands pass on the exact final release commit.
|
|
126
|
+
|
|
127
|
+
## Next milestone
|
|
128
|
+
|
|
129
|
+
`0.3.1 — Dependency Injection & Service Container` is planned to add typed service tokens, singleton/scoped/transient lifetimes, request scopes, factories and testing overrides on top of the shared Application Platform service composition model.
|