@chidchanun/bcp 0.2.18 → 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.
@@ -0,0 +1,232 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "framework": "bcp",
4
+ "version": "0.2.19",
5
+ "baselineVersion": "0.2.18",
6
+ "state": "frozen",
7
+ "intentionalBreakingChanges": false,
8
+ "publicEntrypoints": [
9
+ "bcp",
10
+ "bcp/island",
11
+ "bcp/cache",
12
+ "bcp/config",
13
+ "bcp/validation",
14
+ "bcp/error",
15
+ "bcp/database",
16
+ "bcp/auth",
17
+ "bcp/jobs",
18
+ "bcp/workflow",
19
+ "bcp/events",
20
+ "bcp/realtime",
21
+ "bcp/testing",
22
+ "bcp/plugins",
23
+ "bcp/observability",
24
+ "bcp/deployment",
25
+ "bcp/server",
26
+ "bcp/server-only",
27
+ "bcp/middleware"
28
+ ],
29
+ "cliCommands": [
30
+ "dev",
31
+ "build",
32
+ "package",
33
+ "start",
34
+ "routes",
35
+ "update",
36
+ "db",
37
+ "generate",
38
+ "config",
39
+ "doctor",
40
+ "inspect",
41
+ "help",
42
+ "version"
43
+ ],
44
+ "packageExports": {
45
+ ".": {
46
+ "default": "./packages/client/src/index.tsx",
47
+ "types": "./packages/client/src/index.tsx"
48
+ },
49
+ "./auth": {
50
+ "browser": "./packages/client/src/server-only.browser.mjs",
51
+ "default": "./packages/client/src/auth.mjs",
52
+ "types": "./packages/client/src/auth.ts"
53
+ },
54
+ "./cache": {
55
+ "default": "./packages/client/src/cache.mjs",
56
+ "types": "./packages/client/src/cache.ts"
57
+ },
58
+ "./config": {
59
+ "default": "./packages/client/src/config.mjs",
60
+ "types": "./packages/client/src/config.ts"
61
+ },
62
+ "./database": {
63
+ "browser": "./packages/client/src/server-only.browser.mjs",
64
+ "default": "./packages/client/src/database.mjs",
65
+ "types": "./packages/client/src/database.ts"
66
+ },
67
+ "./deployment": {
68
+ "browser": "./packages/client/src/server-only.browser.mjs",
69
+ "default": "./packages/client/src/deployment.mjs",
70
+ "types": "./packages/client/src/deployment.ts"
71
+ },
72
+ "./error": {
73
+ "default": "./packages/client/src/http-error.ts",
74
+ "types": "./packages/client/src/http-error.ts"
75
+ },
76
+ "./events": {
77
+ "browser": "./packages/client/src/server-only.browser.mjs",
78
+ "default": "./packages/client/src/events.mjs",
79
+ "types": "./packages/client/src/events.ts"
80
+ },
81
+ "./island": {
82
+ "default": "./packages/client/src/islands.tsx",
83
+ "types": "./packages/client/src/islands.tsx"
84
+ },
85
+ "./jobs": {
86
+ "browser": "./packages/client/src/server-only.browser.mjs",
87
+ "default": "./packages/client/src/jobs.mjs",
88
+ "types": "./packages/client/src/jobs.ts"
89
+ },
90
+ "./middleware": {
91
+ "default": "./packages/server/src/middleware.mjs",
92
+ "types": "./packages/server/src/middleware.ts"
93
+ },
94
+ "./observability": {
95
+ "browser": "./packages/client/src/server-only.browser.mjs",
96
+ "default": "./packages/client/src/observability.mjs",
97
+ "types": "./packages/client/src/observability.ts"
98
+ },
99
+ "./package.json": "./package.json",
100
+ "./plugins": {
101
+ "browser": "./packages/client/src/server-only.browser.mjs",
102
+ "default": "./packages/client/src/plugins.mjs",
103
+ "types": "./packages/client/src/plugins.ts"
104
+ },
105
+ "./realtime": {
106
+ "browser": "./packages/client/src/server-only.browser.mjs",
107
+ "default": "./packages/client/src/realtime.mjs",
108
+ "types": "./packages/client/src/realtime.ts"
109
+ },
110
+ "./server": {
111
+ "browser": "./packages/client/src/server-only.browser.mjs",
112
+ "default": "./packages/client/src/server.mjs",
113
+ "types": "./packages/client/src/server.ts"
114
+ },
115
+ "./server-only": {
116
+ "browser": "./packages/client/src/server-only.browser.mjs",
117
+ "default": "./packages/client/src/server-only.mjs",
118
+ "types": "./packages/client/src/server-only.d.ts"
119
+ },
120
+ "./testing": {
121
+ "browser": "./packages/client/src/server-only.browser.mjs",
122
+ "default": "./packages/client/src/testing.mjs",
123
+ "types": "./packages/client/src/testing.ts"
124
+ },
125
+ "./validation": {
126
+ "default": "./packages/client/src/validation.ts",
127
+ "types": "./packages/client/src/validation.ts"
128
+ },
129
+ "./workflow": {
130
+ "browser": "./packages/client/src/server-only.browser.mjs",
131
+ "default": "./packages/client/src/workflow.mjs",
132
+ "types": "./packages/client/src/workflow.ts"
133
+ }
134
+ },
135
+ "apiOwnership": [
136
+ {
137
+ "package": "bcp",
138
+ "source": "packages/client/src/index.tsx",
139
+ "environment": "universal"
140
+ },
141
+ {
142
+ "package": "bcp/island",
143
+ "source": "packages/client/src/islands.tsx",
144
+ "environment": "universal"
145
+ },
146
+ {
147
+ "package": "bcp/cache",
148
+ "source": "packages/client/src/cache.ts",
149
+ "environment": "server-preferred"
150
+ },
151
+ {
152
+ "package": "bcp/config",
153
+ "source": "packages/client/src/config.ts",
154
+ "environment": "server"
155
+ },
156
+ {
157
+ "package": "bcp/validation",
158
+ "source": "packages/client/src/validation.ts",
159
+ "environment": "universal"
160
+ },
161
+ {
162
+ "package": "bcp/error",
163
+ "source": "packages/client/src/http-error.ts",
164
+ "environment": "universal"
165
+ },
166
+ {
167
+ "package": "bcp/database",
168
+ "source": "packages/client/src/database.ts",
169
+ "environment": "server"
170
+ },
171
+ {
172
+ "package": "bcp/auth",
173
+ "source": "packages/client/src/auth.ts",
174
+ "environment": "server"
175
+ },
176
+ {
177
+ "package": "bcp/jobs",
178
+ "source": "packages/client/src/jobs.ts",
179
+ "environment": "server"
180
+ },
181
+ {
182
+ "package": "bcp/workflow",
183
+ "source": "packages/client/src/workflow.ts",
184
+ "environment": "server"
185
+ },
186
+ {
187
+ "package": "bcp/events",
188
+ "source": "packages/client/src/events.ts",
189
+ "environment": "server"
190
+ },
191
+ {
192
+ "package": "bcp/realtime",
193
+ "source": "packages/client/src/realtime.ts",
194
+ "environment": "server"
195
+ },
196
+ {
197
+ "package": "bcp/testing",
198
+ "source": "packages/client/src/testing.ts",
199
+ "environment": "server"
200
+ },
201
+ {
202
+ "package": "bcp/plugins",
203
+ "source": "packages/client/src/plugins.ts",
204
+ "environment": "server"
205
+ },
206
+ {
207
+ "package": "bcp/observability",
208
+ "source": "packages/client/src/observability.ts",
209
+ "environment": "server"
210
+ },
211
+ {
212
+ "package": "bcp/deployment",
213
+ "source": "packages/client/src/deployment.ts",
214
+ "environment": "server"
215
+ },
216
+ {
217
+ "package": "bcp/server",
218
+ "source": "packages/client/src/server.ts",
219
+ "environment": "server"
220
+ },
221
+ {
222
+ "package": "bcp/server-only",
223
+ "source": "packages/client/src/server-only.mjs",
224
+ "environment": "server-marker"
225
+ },
226
+ {
227
+ "package": "bcp/middleware",
228
+ "source": "packages/server/src/middleware.ts",
229
+ "environment": "server"
230
+ }
231
+ ]
232
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "framework": "bcp",
4
- "version": "0.2.18",
4
+ "version": "0.2.19",
5
5
  "releaseState": "unreleased",
6
6
  "coverage": "public-entrypoints",
7
7
  "entrypoints": [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "framework": "bcp",
4
- "versionTarget": "0.2.18",
4
+ "versionTarget": "0.2.19",
5
5
  "releaseState": "unreleased",
6
6
  "sections": [
7
7
  {
@@ -102,9 +102,10 @@
102
102
  {
103
103
  "id": "platform-compatibility",
104
104
  "title": "Platform & Compatibility",
105
- "description": "Supported platform contracts, documentation integration and migration guidance.",
105
+ "description": "Supported platform contracts, API freeze, documentation integration and migration guidance.",
106
106
  "pages": [
107
107
  { "route": "/docs/platform-contract", "source": "platform-contract.md", "title": "Framework Platform Contract" },
108
+ { "route": "/docs/stability-api-freeze", "source": "stability-api-freeze.md", "title": "Stability & API Freeze" },
108
109
  { "route": "/docs/documentation-platform", "source": "documentation-platform.md", "title": "Documentation Platform" },
109
110
  { "route": "/docs/migration-0.2", "source": "migration-0.2.md", "title": "Migrating to 0.2.x" }
110
111
  ]
@@ -119,7 +120,8 @@
119
120
  }
120
121
  ],
121
122
  "releases": [
122
- { "route": "/releases/0.2.18", "source": "releases/0.2.18.md", "version": "0.2.18", "state": "unreleased" },
123
+ { "route": "/releases/0.2.19", "source": "releases/0.2.19.md", "version": "0.2.19", "state": "unreleased" },
124
+ { "route": "/releases/0.2.18", "source": "releases/0.2.18.md", "version": "0.2.18" },
123
125
  { "route": "/releases/0.2.17", "source": "releases/0.2.17.md", "version": "0.2.17" },
124
126
  { "route": "/releases/0.2.16", "source": "releases/0.2.16.md", "version": "0.2.16" },
125
127
  { "route": "/releases/0.2.15", "source": "releases/0.2.15.md", "version": "0.2.15" },
@@ -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.