@chidchanun/bcp 0.2.17 → 0.2.19

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.
@@ -1,63 +1,62 @@
1
- # Migrating to BCP Framework 0.2.0
1
+ # Migrating within BCP Framework 0.2.x
2
2
 
3
- BCP Framework `0.2.0` establishes the Framework Platform baseline while preserving the public application model from `0.1.29`.
3
+ BCP Framework `0.2.19` is the final `0.2.x` stability/API-freeze baseline before `0.3.0`.
4
4
 
5
- > **Release state:** unreleased development target until RC validation and npm publication complete.
5
+ > **Current development target:** `0.2.19 Stability & API Freeze`
6
+ >
7
+ > Release state remains unreleased until the complete RC sequence, tagging and npm publication finish.
6
8
 
7
9
  ## Compatibility goal
8
10
 
9
- There are no intentional public-entrypoint removals from the `0.1.29` baseline in this milestone.
11
+ `0.2.19` declares no intentional breaking changes from `0.2.18`.
10
12
 
11
- Applications already running on `0.1.29` should normally be able to move to `0.2.0` without rewriting routing, loaders, guards, actions, middleware, storage or authentication code.
13
+ The supported `0.2.x` public entrypoint/package-resolution contract is frozen in:
12
14
 
13
- BCP remains pre-1.0, so every application should still validate the upgrade before production deployment.
15
+ ```text
16
+ docs/api-freeze-snapshot.json
17
+ ```
14
18
 
15
- ## 1. Check the current project
19
+ Applications should continue importing documented `bcp/*` entrypoints and avoid framework-private `packages/*` paths.
16
20
 
17
- From the application root:
21
+ ## 1. Inspect the current application
18
22
 
19
23
  ```powershell
20
24
  npm exec -- bcp-framework doctor
21
25
  npm exec -- bcp-framework inspect --json
26
+ npm exec -- bcp-framework update --check
22
27
  ```
23
28
 
24
- Resolve blocking `FAIL` results before upgrading, especially duplicate framework dependency declarations or invalid production-hardening settings.
29
+ Resolve blocking diagnostics before upgrading.
25
30
 
26
- ## 2. Check the available framework update
27
-
28
- ```powershell
29
- npm exec -- bcp-framework update --check
30
- ```
31
+ ## 2. Upgrade explicitly
31
32
 
32
- After `0.2.0` is published, update with:
33
+ After `0.2.19` is published:
33
34
 
34
35
  ```powershell
35
- npm exec -- bcp-framework update 0.2.0
36
+ npm exec -- bcp-framework update 0.2.19
36
37
  ```
37
38
 
38
- Generated projects can also use:
39
+ Generated applications can also use:
39
40
 
40
41
  ```powershell
41
- npm run update -- 0.2.0
42
+ npm run update -- 0.2.19
42
43
  ```
43
44
 
44
- ## 3. Keep one framework dependency
45
-
46
- The recommended project dependency remains:
45
+ The recommended dependency remains one BCP installation:
47
46
 
48
47
  ```json
49
48
  {
50
49
  "dependencies": {
51
- "bcp": "npm:@chidchanun/bcp@0.2.0"
50
+ "bcp": "npm:@chidchanun/bcp@0.2.19"
52
51
  }
53
52
  }
54
53
  ```
55
54
 
56
- Do not keep both `bcp` and a second direct `@chidchanun/bcp` dependency in the same application. Two installed framework copies can produce separate React/framework contexts.
55
+ Do not keep both the `bcp` alias and a second direct `@chidchanun/bcp` dependency in the same application.
57
56
 
58
- ## 4. Preserve server-only boundaries
57
+ ## 3. Keep public import boundaries
59
58
 
60
- Continue importing public APIs through supported entrypoints such as:
59
+ Examples:
61
60
 
62
61
  ```ts
63
62
  import {
@@ -65,37 +64,61 @@ import {
65
64
  } from "bcp";
66
65
 
67
66
  import {
68
- auth,
67
+ createAuth,
69
68
  } from "bcp/auth";
70
69
 
71
70
  import {
72
71
  db,
73
72
  } from "bcp/database";
74
73
 
74
+ import {
75
+ createJobQueue,
76
+ } from "bcp/jobs";
77
+
78
+ import {
79
+ createDeploymentRuntime,
80
+ } from "bcp/deployment";
81
+
75
82
  import {
76
83
  cookies,
77
84
  } from "bcp/server";
78
85
  ```
79
86
 
80
- Do not migrate application imports to framework-internal `packages/...` paths.
87
+ The frozen entrypoint list is documented in [Framework Platform Contract](platform-contract.md) and [Stability & API Freeze](stability-api-freeze.md).
81
88
 
82
- The current public entrypoint baseline is listed in `platform-manifest.json` and [Framework Platform Contract](platform-contract.md).
89
+ ## 4. Rebuild production artifacts
83
90
 
84
- ## 5. Validate generated-project metadata
91
+ Do not reuse an old `.bcp-framework/build` or `.bcp-framework/package` directory after changing framework versions.
85
92
 
86
- Projects created by `create-bcp-app` `0.1.29` or newer may contain:
93
+ Run:
87
94
 
88
- ```text
89
- bcp.project.json
95
+ ```powershell
96
+ npm run build
97
+ npm run package
98
+ ```
99
+
100
+ Then test the production runtime:
101
+
102
+ ```powershell
103
+ npm start
90
104
  ```
91
105
 
92
- This file is optional runtime metadata. Older applications do not need to create it manually to run on `0.2.0`.
106
+ ## 5. Deployment/runtime review
93
107
 
94
- If you choose to add it to an older application, keep it non-secret. Credentials, passwords, access keys, session secrets and tokens do not belong in this file.
108
+ For applications adopting Deployment Platform v2, consider registering long-lived resources such as:
109
+
110
+ ```text
111
+ database
112
+ cache/redis connections
113
+ background workers
114
+ realtime services
115
+ outbox dispatchers
116
+ workflow workers
117
+ ```
95
118
 
96
- ## 6. Validate production settings
119
+ in dependency order so reverse-order shutdown drains dependents before shared infrastructure closes.
97
120
 
98
- For standalone production, review:
121
+ Review production environment settings such as:
99
122
 
100
123
  ```dotenv
101
124
  BCP_REQUEST_TIMEOUT_MS=120000
@@ -105,35 +128,17 @@ BCP_SHUTDOWN_TIMEOUT_MS=10000
105
128
  BCP_TRUST_PROXY=false
106
129
  ```
107
130
 
108
- Only enable:
131
+ Deployment identity may additionally use:
109
132
 
110
133
  ```dotenv
111
- BCP_TRUST_PROXY=true
134
+ BCP_DEPLOYMENT_ID=
135
+ BCP_INSTANCE_ID=
136
+ BCP_RELEASE=
112
137
  ```
113
138
 
114
- when the BCP process is reachable only through a trusted reverse proxy/load balancer.
139
+ ## 6. Application validation
115
140
 
116
- ## 7. Rebuild the standalone artifact
117
-
118
- Do not reuse `.bcp-framework/build` from the previous framework version.
119
-
120
- Run:
121
-
122
- ```powershell
123
- npm run build
124
- ```
125
-
126
- Then test:
127
-
128
- ```powershell
129
- npm start
130
- ```
131
-
132
- The supported `0.2.0` production target remains the standalone Node.js artifact under `.bcp-framework/build/`.
133
-
134
- ## 8. Application validation checklist
135
-
136
- Recommended minimum after upgrading:
141
+ Recommended minimum:
137
142
 
138
143
  ```powershell
139
144
  npm run typecheck
@@ -142,32 +147,26 @@ npm exec -- bcp-framework routes
142
147
  npm exec -- bcp-framework doctor
143
148
  ```
144
149
 
145
- For applications using authentication, storage or database features, also exercise representative login/session, upload/download and database paths before production deployment.
150
+ For applications using authentication, databases, storage, jobs, workflows, events, realtime or cache, exercise representative production paths before rollout.
146
151
 
147
- ## Local storage projects
152
+ ## 7. What the 0.2.19 freeze means for applications
148
153
 
149
- Projects using the Local Server storage preset should keep the scaffold:
150
-
151
- ```text
152
- storage/
153
- ├─ .gitkeep
154
- └─ README.md
155
- ```
154
+ The freeze is a **framework release contract**, not a new runtime requirement for applications.
156
155
 
157
- Runtime storage objects remain ignored by Git.
156
+ Applications do not need to run the framework repository's `api:check` or `release:readiness` scripts. Those are maintainer release gates.
158
157
 
159
- ## Amazon S3 / Cloudflare R2 projects
158
+ The practical application rule is:
160
159
 
161
- No provider migration is required for the `0.2.0` platform baseline. Existing `createS3Storage()` configurations continue using server-only credentials/environment settings.
162
-
163
- ## What is not part of this migration
160
+ ```text
161
+ use documented bcp/* entrypoints
162
+ avoid private packages/* imports
163
+ validate upgrades before deployment
164
+ ```
164
165
 
165
- `0.2.0` does not introduce native executable compilation, desktop packaging, Android APK output or iOS application output.
166
+ ## 8. Moving from 0.2.19 to 0.3.0
166
167
 
167
- The supported build model remains:
168
+ `0.2.19` becomes the compatibility reference point for the next platform baseline.
168
169
 
169
- ```text
170
- BCP application -> bcp build -> standalone Node.js web application
171
- ```
170
+ If `0.3.0` intentionally changes the frozen public surface, its release should provide explicit compatibility metadata and migration guidance rather than silently changing a `0.2.x` contract.
172
171
 
173
- Future build targets can be added after the platform baseline without redefining the existing standalone contract.
172
+ Native executable/mobile/desktop compilation is still outside the current standalone Node.js web-application target.
@@ -1,30 +1,30 @@
1
1
  # Framework Platform Contract
2
2
 
3
- BCP Framework `0.2.0` establishes the first explicit framework-platform baseline. The goal is to make public entrypoints, supported runtime targets, CLI capabilities and documentation metadata visible and testable instead of relying on implicit package structure.
3
+ BCP Framework `0.2.x` exposes an explicit, machine-readable application-platform contract rather than relying on private repository structure.
4
4
 
5
- > **Release state:** unreleased development target until local RC validation, tagging and npm publication complete.
5
+ The current development baseline is **`0.2.19 — Stability & API Freeze`** and remains unreleased until the complete RC sequence passes, the exact release commit is tagged and npm publication completes.
6
6
 
7
- ## What the platform contract covers
7
+ ## Sources of truth
8
8
 
9
- The platform contract is represented by `docs/platform-manifest.json` and release/package smoke tests.
9
+ ```text
10
+ docs/platform-manifest.json
11
+ -> framework/runtime/capability/public-entrypoint contract
10
12
 
11
- It records:
13
+ docs/api-manifest.json
14
+ -> public package source/environment/documentation ownership
12
15
 
13
- - the framework version and release state,
14
- - the minimum supported Node.js runtime,
15
- - the supported production build target,
16
- - public package entrypoints,
17
- - documented CLI command families,
18
- - framework capability groups,
19
- - built-in/scaffolded storage-provider families,
20
- - compatibility expectations for the previous baseline,
21
- - documentation files used by `bcp-docs-web`.
16
+ docs/api-freeze-snapshot.json
17
+ -> frozen 0.2.19 CLI and prepared npm export contract
18
+
19
+ docs/docs-web-manifest.json
20
+ -> documentation routes and release navigation
21
+ ```
22
22
 
23
- The manifest is metadata. Framework source, package exports and tests remain authoritative for actual runtime behavior.
23
+ Framework source and tests remain authoritative for runtime behavior. The manifests make that supported surface testable during release validation.
24
24
 
25
- ## Public entrypoints
25
+ ## Frozen public entrypoints
26
26
 
27
- The `0.2.0` platform baseline recognizes these public application imports:
27
+ The `0.2.19` baseline supports:
28
28
 
29
29
  ```text
30
30
  bcp
@@ -35,125 +35,110 @@ bcp/validation
35
35
  bcp/error
36
36
  bcp/database
37
37
  bcp/auth
38
+ bcp/jobs
39
+ bcp/workflow
40
+ bcp/events
41
+ bcp/realtime
42
+ bcp/testing
43
+ bcp/plugins
44
+ bcp/observability
45
+ bcp/deployment
38
46
  bcp/server
39
47
  bcp/server-only
40
48
  bcp/middleware
41
49
  ```
42
50
 
43
- Application code should prefer these entrypoints instead of importing internal files under `packages/`.
51
+ Application code should use these entrypoints instead of private `packages/*` implementation paths.
44
52
 
45
- The release package contract smoke test verifies that the prepared npm artifact still exposes these entrypoints. Accidentally removing one from the publish manifest should fail package validation before release.
53
+ The prepared npm package also exposes `./package.json`; that package export is included in the freeze snapshot even though it is not an application API module.
46
54
 
47
55
  ## CLI baseline
48
56
 
49
- The framework-platform CLI baseline includes:
57
+ The frozen command families are:
50
58
 
51
59
  ```text
52
60
  bcp dev
53
61
  bcp build
62
+ bcp package
54
63
  bcp start
55
64
  bcp routes
56
65
  bcp update
57
66
  bcp db ...
58
67
  bcp generate ...
68
+ bcp config ...
59
69
  bcp doctor
60
70
  bcp inspect
61
71
  bcp help
62
72
  bcp version
63
73
  ```
64
74
 
65
- The Windows-safe `bcp-framework` executable remains an alias for the same CLI.
75
+ The Windows-safe `bcp-framework` executable is an alias for the same CLI.
66
76
 
67
77
  ## Runtime baseline
68
78
 
69
- BCP `0.2.0` continues to target a standalone Node.js web application:
70
-
71
- ```text
72
- BCP source application
73
-
74
- bcp build
75
-
76
- .bcp-framework/build/
77
- ├─ client/
78
- ├─ public/
79
- └─ server/
80
- └─ server.mjs
81
- ```
82
-
83
- Minimum runtime:
84
-
85
79
  ```text
86
80
  Node.js >= 24.11.0
87
81
  React 19
82
+ build target: standalone-node
83
+ package target: standalone-node
88
84
  ```
89
85
 
90
- The platform baseline does not yet promise native `.exe`, mobile or desktop application compilation. Those remain future build-target work rather than part of `0.2.0`.
86
+ Prepared server/runtime entrypoints resolve to compiled ESM where required by the package contract. Their exact `types`, `default` and `browser` targets are frozen in `api-freeze-snapshot.json`.
91
87
 
92
- ## Compatibility policy for 0.2.0
88
+ ## Compatibility policy
93
89
 
94
- `0.2.0` is intended to preserve applications that already work on `0.1.29`. This milestone does not intentionally remove public entrypoints or change the current standalone runtime model.
90
+ For `0.2.19`:
95
91
 
96
- Because BCP remains pre-1.0, applications should still validate upgrades through:
97
-
98
- ```bash
99
- bcp update --check
100
- bcp doctor
101
- npm run typecheck
102
- npm run build
92
+ ```text
93
+ previous baseline: 0.2.18
94
+ intentional breaking changes: false
95
+ freeze state: frozen
103
96
  ```
104
97
 
105
- See [Migrating to 0.2.0](migration-0.2.md).
98
+ Bug fixes may correct implementation behavior, but they must not silently remove a documented public entrypoint or change its prepared package-resolution/browser-boundary contract.
106
99
 
107
- ## Package consistency validation
100
+ Intentional public-platform changes should normally move to `0.3.0` with explicit compatibility metadata and migration documentation.
108
101
 
109
- The `0.2.0` release process adds a platform-contract package smoke check. It verifies the staged npm artifact rather than only source files.
102
+ ## API compatibility gate
110
103
 
111
- The check covers:
112
-
113
- 1. framework version consistency,
114
- 2. required public package exports,
115
- 3. both BCP CLI executable aliases,
116
- 4. minimum Node.js engine declaration,
117
- 5. inclusion of platform/docs metadata in the packed framework,
118
- 6. docs-web target/version consistency,
119
- 7. create-bcp-app version parity with the framework release.
120
-
121
- This is additive to existing unit, integration, E2E, storage, production-hardening and Developer Experience package smoke checks.
122
-
123
- ## Docs-web contract
104
+ ```bash
105
+ npm run api:check
106
+ ```
124
107
 
125
- `bcp-docs-web` should use two machine-readable files for different purposes:
108
+ The gate prepares the publish package, regenerates the current contract in memory and compares it to `docs/api-freeze-snapshot.json`.
126
109
 
127
- ```text
128
- docs/docs-web-manifest.json
129
- -> website sections, routes, source Markdown and release navigation
110
+ To intentionally regenerate the snapshot:
130
111
 
131
- docs/platform-manifest.json
132
- -> framework version, public entrypoints, runtime target and capability metadata
112
+ ```bash
113
+ npm run api:snapshot
133
114
  ```
134
115
 
135
- Do not duplicate the platform entrypoint list in application code when it can be sourced from `platform-manifest.json`.
116
+ Snapshot changes during `0.2.19` require explicit review; regeneration is not a routine fix for a failing compatibility check.
136
117
 
137
- ## Stability labels
118
+ ## Release readiness
138
119
 
139
- Documentation should distinguish:
120
+ ```bash
121
+ npm run release:readiness
122
+ npm run release:readiness:report
123
+ ```
140
124
 
141
- - **platform baseline** public surface covered by the `0.2.0` contract,
142
- - **supported** — behavior covered by current tests/docs,
143
- - **experimental/roadmap** — not guaranteed by the current platform manifest,
144
- - **internal** — not a public application import contract.
125
+ The readiness gate checks version/lock/manifests parity, compatibility metadata, freeze parity, release docs and stability capabilities. The optional local report is written to `.bcp-framework/release-readiness.json`.
145
126
 
146
127
  ## Release validation
147
128
 
148
- Before `0.2.0` is tagged or published:
129
+ Before `0.2.19` is tagged or published:
149
130
 
150
131
  ```bash
151
132
  npm run typecheck
152
133
  npm run test:unit
153
134
  npm run test:integration
154
- npm run test:package
155
135
  npm run test:e2e
136
+ npm run test:package
137
+ npm run api:check
138
+ npm run release:readiness
156
139
  npm run rc:check
157
140
  ```
158
141
 
159
- The release is not considered published until both `@chidchanun/bcp@0.2.0` and `create-bcp-app@0.2.0` are visible from npm.
142
+ `rc:check` must pass on the exact commit used for the release tag.
143
+
144
+ See [Stability & API Freeze](stability-api-freeze.md) and [Migrating to 0.2.x](migration-0.2.md).
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "framework": "bcp",
4
- "version": "0.2.17",
4
+ "version": "0.2.19",
5
5
  "releaseState": "unreleased",
6
- "baseline": "observability-platform-v3",
6
+ "baseline": "stability-api-freeze",
7
7
  "runtime": {
8
8
  "node": ">=24.11.0",
9
9
  "react": "19",
@@ -26,6 +26,7 @@
26
26
  "bcp/testing",
27
27
  "bcp/plugins",
28
28
  "bcp/observability",
29
+ "bcp/deployment",
29
30
  "bcp/server",
30
31
  "bcp/server-only",
31
32
  "bcp/middleware"
@@ -82,6 +83,24 @@
82
83
  "traceMetricsExporter": true,
83
84
  "traceLogFields": true,
84
85
  "compiledObservabilityRuntime": true,
86
+ "deploymentPlatformV2": true,
87
+ "deploymentRuntimeLifecycle": true,
88
+ "deploymentResourceRegistry": true,
89
+ "deploymentReadiness": true,
90
+ "deploymentDiagnostics": true,
91
+ "deploymentSignalHandling": true,
92
+ "deploymentShutdownHooks": true,
93
+ "deploymentRuntimeMetadata": true,
94
+ "compiledConfigRuntime": true,
95
+ "compiledAuthRuntime": true,
96
+ "compiledServerRuntime": true,
97
+ "compiledMiddlewareRuntime": true,
98
+ "stabilityApiFreeze": true,
99
+ "apiFreezeSnapshot": true,
100
+ "apiCompatibilityGate": true,
101
+ "releaseReadinessReport": true,
102
+ "packageExportParity": true,
103
+ "deploymentLifecycleIdempotency": true,
85
104
  "backgroundJobsPlatform": true,
86
105
  "jobQueueAdapterContract": true,
87
106
  "inMemoryJobQueue": true,
@@ -211,7 +230,7 @@
211
230
  "s3-compatible"
212
231
  ],
213
232
  "compatibility": {
214
- "previousBaseline": "0.2.16",
233
+ "previousBaseline": "0.2.18",
215
234
  "intentionalBreakingChangesFromPreviousBaseline": false,
216
235
  "migrationGuide": "migration-0.2.md"
217
236
  },
@@ -219,9 +238,11 @@
219
238
  "navigationManifest": "docs-web-manifest.json",
220
239
  "platformManifest": "platform-manifest.json",
221
240
  "apiManifest": "api-manifest.json",
241
+ "apiFreezeSnapshot": "api-freeze-snapshot.json",
222
242
  "platformContract": "platform-contract.md",
223
243
  "documentationPlatform": "documentation-platform.md",
224
244
  "apiReference": "api-reference.md",
245
+ "stabilityApiFreeze": "stability-api-freeze.md",
225
246
  "environmentValidation": "environment-validation.md",
226
247
  "applicationPackaging": "application-packaging.md",
227
248
  "authentication": "authentication.md",
@@ -229,6 +250,7 @@
229
250
  "authorizationSecurity": "authorization-security.md",
230
251
  "observability": "observability.md",
231
252
  "observabilityV3": "observability-v3.md",
253
+ "deploymentPlatformV2": "deployment-platform-v2.md",
232
254
  "backgroundJobs": "background-jobs.md",
233
255
  "jobScheduling": "job-scheduling.md",
234
256
  "durableJobs": "durable-jobs.md",
@@ -239,6 +261,6 @@
239
261
  "pluginModulePlatform": "plugin-module-platform.md",
240
262
  "cachePlatformV2": "cache-platform-v2.md",
241
263
  "migrationGuide": "migration-0.2.md",
242
- "releaseNotes": "releases/0.2.17.md"
264
+ "releaseNotes": "releases/0.2.19.md"
243
265
  }
244
266
  }