@chidchanun/bcp 0.1.29 → 0.2.1
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 +199 -360
- package/docs/README.md +172 -365
- package/docs/api-manifest.json +129 -0
- package/docs/api-reference.md +214 -0
- package/docs/docs-web-manifest.json +29 -2
- package/docs/documentation-platform.md +136 -0
- package/docs/migration-0.2.md +173 -0
- package/docs/platform-contract.md +159 -0
- package/docs/platform-manifest.json +81 -0
- package/docs/releases/0.2.0.md +146 -0
- package/docs/releases/0.2.1.md +132 -0
- package/package.json +1 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"framework": "bcp",
|
|
4
|
+
"version": "0.2.1",
|
|
5
|
+
"releaseState": "unreleased",
|
|
6
|
+
"coverage": "public-entrypoints",
|
|
7
|
+
"entrypoints": [
|
|
8
|
+
{
|
|
9
|
+
"package": "bcp",
|
|
10
|
+
"source": "packages/client/src/index.tsx",
|
|
11
|
+
"environment": "universal",
|
|
12
|
+
"route": "/docs/api-reference#bcp",
|
|
13
|
+
"summary": "React application APIs for routing, links, forms, loader/guard data, islands, metadata and route error handling.",
|
|
14
|
+
"guides": [
|
|
15
|
+
"/docs/routing",
|
|
16
|
+
"/docs/server-data-loaders",
|
|
17
|
+
"/docs/route-guards",
|
|
18
|
+
"/docs/form-actions"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"package": "bcp/island",
|
|
23
|
+
"source": "packages/client/src/islands.tsx",
|
|
24
|
+
"environment": "universal",
|
|
25
|
+
"route": "/docs/api-reference#bcp-island",
|
|
26
|
+
"summary": "Partial-hydration island creation and island loading strategy types.",
|
|
27
|
+
"guides": [
|
|
28
|
+
"/docs/hydration"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"package": "bcp/cache",
|
|
33
|
+
"source": "packages/client/src/cache.ts",
|
|
34
|
+
"environment": "server-preferred",
|
|
35
|
+
"route": "/docs/api-reference#bcp-cache",
|
|
36
|
+
"summary": "Cache, deduplication, statistics and path/tag revalidation primitives.",
|
|
37
|
+
"guides": [
|
|
38
|
+
"/docs/caching"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"package": "bcp/config",
|
|
43
|
+
"source": "packages/client/src/config.ts",
|
|
44
|
+
"environment": "server",
|
|
45
|
+
"route": "/docs/api-reference#bcp-config",
|
|
46
|
+
"summary": "Typed BCP configuration definition, loading and resolution APIs.",
|
|
47
|
+
"guides": [
|
|
48
|
+
"/docs/configuration"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"package": "bcp/validation",
|
|
53
|
+
"source": "packages/client/src/validation.ts",
|
|
54
|
+
"environment": "universal",
|
|
55
|
+
"route": "/docs/api-reference#bcp-validation",
|
|
56
|
+
"summary": "Typed validators, parse helpers and structured validation errors.",
|
|
57
|
+
"guides": [
|
|
58
|
+
"/docs/validation"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"package": "bcp/error",
|
|
63
|
+
"source": "packages/client/src/http-error.ts",
|
|
64
|
+
"environment": "universal",
|
|
65
|
+
"route": "/docs/api-reference#bcp-error",
|
|
66
|
+
"summary": "Structured HTTP error creation, classification and response helpers.",
|
|
67
|
+
"guides": [
|
|
68
|
+
"/docs/error-handling"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"package": "bcp/database",
|
|
73
|
+
"source": "packages/client/src/database.ts",
|
|
74
|
+
"environment": "server",
|
|
75
|
+
"route": "/docs/api-reference#bcp-database",
|
|
76
|
+
"summary": "Database pool, prepared query/execute helpers and transaction primitives.",
|
|
77
|
+
"guides": [
|
|
78
|
+
"/docs/database",
|
|
79
|
+
"/docs/database-migrations"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"package": "bcp/auth",
|
|
84
|
+
"source": "packages/client/src/auth.ts",
|
|
85
|
+
"environment": "server",
|
|
86
|
+
"route": "/docs/api-reference#bcp-auth",
|
|
87
|
+
"summary": "Authentication, login/logout/session rotation and route authorization guards.",
|
|
88
|
+
"guides": [
|
|
89
|
+
"/docs/authentication",
|
|
90
|
+
"/docs/auth-route-guards",
|
|
91
|
+
"/docs/session-auth"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"package": "bcp/server",
|
|
96
|
+
"source": "packages/client/src/server.ts",
|
|
97
|
+
"environment": "server",
|
|
98
|
+
"route": "/docs/api-reference#bcp-server",
|
|
99
|
+
"summary": "Request context, cookies, logging, production hardening, upload, storage, response and session APIs.",
|
|
100
|
+
"guides": [
|
|
101
|
+
"/docs/server-request-apis",
|
|
102
|
+
"/docs/file-upload",
|
|
103
|
+
"/docs/storage",
|
|
104
|
+
"/docs/storage-ecosystem",
|
|
105
|
+
"/docs/production-hardening"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"package": "bcp/server-only",
|
|
110
|
+
"source": "packages/client/src/server-only.mjs",
|
|
111
|
+
"environment": "server-marker",
|
|
112
|
+
"route": "/docs/api-reference#bcp-server-only",
|
|
113
|
+
"summary": "Server-only module boundary marker that prevents accidental browser inclusion.",
|
|
114
|
+
"guides": [
|
|
115
|
+
"/docs/application-modules"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"package": "bcp/middleware",
|
|
120
|
+
"source": "packages/server/src/middleware.ts",
|
|
121
|
+
"environment": "server",
|
|
122
|
+
"route": "/docs/api-reference#bcp-middleware",
|
|
123
|
+
"summary": "Middleware System v2 request/response pipeline types and helpers.",
|
|
124
|
+
"guides": [
|
|
125
|
+
"/docs/middleware"
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# API Reference
|
|
2
|
+
|
|
3
|
+
BCP Framework exposes a small set of supported package entrypoints. Import application APIs through these entrypoints instead of private files under `packages/`.
|
|
4
|
+
|
|
5
|
+
The machine-readable source for this page is `docs/api-manifest.json`.
|
|
6
|
+
|
|
7
|
+
## `bcp`
|
|
8
|
+
|
|
9
|
+
Universal React application APIs.
|
|
10
|
+
|
|
11
|
+
Common exports include:
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import {
|
|
15
|
+
Form,
|
|
16
|
+
Link,
|
|
17
|
+
createIsland,
|
|
18
|
+
navigate,
|
|
19
|
+
notFound,
|
|
20
|
+
useActionData,
|
|
21
|
+
useActionError,
|
|
22
|
+
useFormStatus,
|
|
23
|
+
useGuardData,
|
|
24
|
+
useLoaderData,
|
|
25
|
+
useNavigation,
|
|
26
|
+
useRouter,
|
|
27
|
+
} from "bcp";
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Use this entrypoint for page/client-facing framework APIs, routing, forms, loader/guard data, islands and metadata types.
|
|
31
|
+
|
|
32
|
+
Related guides: [Routing](routing.md), [Server Data Loaders](server-data-loaders.md), [Route Guards](route-guards.md), [Form Actions](form-actions.md).
|
|
33
|
+
|
|
34
|
+
## `bcp/island`
|
|
35
|
+
|
|
36
|
+
Partial-hydration island APIs.
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import {
|
|
40
|
+
createIsland,
|
|
41
|
+
} from "bcp/island";
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Related guide: [Hydration](hydration.md).
|
|
45
|
+
|
|
46
|
+
## `bcp/cache`
|
|
47
|
+
|
|
48
|
+
Caching and revalidation APIs.
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import {
|
|
52
|
+
cache,
|
|
53
|
+
clearCache,
|
|
54
|
+
dedupe,
|
|
55
|
+
getCacheStats,
|
|
56
|
+
revalidatePath,
|
|
57
|
+
revalidateTag,
|
|
58
|
+
} from "bcp/cache";
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Related guide: [Caching](caching.md).
|
|
62
|
+
|
|
63
|
+
## `bcp/config`
|
|
64
|
+
|
|
65
|
+
Typed configuration APIs.
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
import {
|
|
69
|
+
defineConfig,
|
|
70
|
+
readResolvedBcpConfig,
|
|
71
|
+
resolveBcpConfig,
|
|
72
|
+
} from "bcp/config";
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Related guide: [Configuration](configuration.md).
|
|
76
|
+
|
|
77
|
+
## `bcp/validation`
|
|
78
|
+
|
|
79
|
+
Typed validation primitives and `ValidationError`.
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import {
|
|
83
|
+
array,
|
|
84
|
+
boolean,
|
|
85
|
+
literal,
|
|
86
|
+
nullable,
|
|
87
|
+
number,
|
|
88
|
+
object,
|
|
89
|
+
optional,
|
|
90
|
+
parse,
|
|
91
|
+
safeParse,
|
|
92
|
+
string,
|
|
93
|
+
union,
|
|
94
|
+
} from "bcp/validation";
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Related guide: [Validation](validation.md).
|
|
98
|
+
|
|
99
|
+
## `bcp/error`
|
|
100
|
+
|
|
101
|
+
Structured HTTP error helpers.
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
import {
|
|
105
|
+
HttpError,
|
|
106
|
+
badRequest,
|
|
107
|
+
conflict,
|
|
108
|
+
forbidden,
|
|
109
|
+
internalServerError,
|
|
110
|
+
isHttpError,
|
|
111
|
+
serviceUnavailable,
|
|
112
|
+
throwHttpError,
|
|
113
|
+
tooManyRequests,
|
|
114
|
+
unauthorized,
|
|
115
|
+
unprocessableEntity,
|
|
116
|
+
} from "bcp/error";
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Related guide: [Error Handling](error-handling.md).
|
|
120
|
+
|
|
121
|
+
## `bcp/database`
|
|
122
|
+
|
|
123
|
+
Server-only database primitives.
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
import {
|
|
127
|
+
createDatabase,
|
|
128
|
+
db,
|
|
129
|
+
} from "bcp/database";
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Use the public database helpers instead of importing framework-internal pool/runtime modules.
|
|
133
|
+
|
|
134
|
+
Related guides: [Database](database.md), [Database Migrations](database-migrations.md).
|
|
135
|
+
|
|
136
|
+
## `bcp/auth`
|
|
137
|
+
|
|
138
|
+
Authentication and authorization APIs.
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
import {
|
|
142
|
+
auth,
|
|
143
|
+
createAuth,
|
|
144
|
+
createAuthGuard,
|
|
145
|
+
createRoleGuard,
|
|
146
|
+
getGuardAuth,
|
|
147
|
+
getSession,
|
|
148
|
+
login,
|
|
149
|
+
logout,
|
|
150
|
+
requireAuth,
|
|
151
|
+
requireRole,
|
|
152
|
+
rotateSession,
|
|
153
|
+
} from "bcp/auth";
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Related guides: [Authentication](authentication.md), [Auth Route Guards](auth-route-guards.md), [JWT Sessions](session-auth.md).
|
|
157
|
+
|
|
158
|
+
## `bcp/server`
|
|
159
|
+
|
|
160
|
+
Server request/runtime APIs.
|
|
161
|
+
|
|
162
|
+
This entrypoint includes request context, cookies, logging, graceful shutdown hooks, multipart upload helpers, storage adapters, file delivery, response helpers and low-level session primitives.
|
|
163
|
+
|
|
164
|
+
```ts
|
|
165
|
+
import {
|
|
166
|
+
clientIp,
|
|
167
|
+
cookies,
|
|
168
|
+
createLocalStorage,
|
|
169
|
+
createLogger,
|
|
170
|
+
createS3Storage,
|
|
171
|
+
createStorageResponse,
|
|
172
|
+
getProductionHardeningConfig,
|
|
173
|
+
headers,
|
|
174
|
+
json,
|
|
175
|
+
redirect,
|
|
176
|
+
registerShutdownHook,
|
|
177
|
+
requestId,
|
|
178
|
+
requestMethod,
|
|
179
|
+
requestUrl,
|
|
180
|
+
storeMultipartFile,
|
|
181
|
+
} from "bcp/server";
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Related guides: [Server Request APIs](server-request-apis.md), [File Upload](file-upload.md), [Storage](storage.md), [Storage Ecosystem](storage-ecosystem.md), [Production Hardening](production-hardening.md).
|
|
185
|
+
|
|
186
|
+
## `bcp/server-only`
|
|
187
|
+
|
|
188
|
+
Server-only module boundary marker.
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
import "bcp/server-only";
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Place this import in application modules that must never enter a browser bundle.
|
|
195
|
+
|
|
196
|
+
Related guide: [Application Modules](application-modules.md).
|
|
197
|
+
|
|
198
|
+
## `bcp/middleware`
|
|
199
|
+
|
|
200
|
+
Middleware System v2 APIs and types.
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
import type {
|
|
204
|
+
MiddlewarePipelineHandler,
|
|
205
|
+
} from "bcp/middleware";
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Related guide: [Middleware](middleware.md).
|
|
209
|
+
|
|
210
|
+
## Stability
|
|
211
|
+
|
|
212
|
+
Only package entrypoints listed in both `docs/platform-manifest.json` and `docs/api-manifest.json` are part of the documented platform surface.
|
|
213
|
+
|
|
214
|
+
Files under internal `packages/*` paths are framework implementation details unless re-exported through a documented public package entrypoint.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"framework": "bcp",
|
|
4
|
-
"versionTarget": "0.1
|
|
4
|
+
"versionTarget": "0.2.1",
|
|
5
5
|
"releaseState": "unreleased",
|
|
6
6
|
"sections": [
|
|
7
7
|
{
|
|
8
8
|
"id": "getting-started",
|
|
9
9
|
"title": "Getting Started",
|
|
10
|
+
"description": "Create, configure, deploy and update BCP applications.",
|
|
10
11
|
"pages": [
|
|
11
12
|
{ "route": "/docs/getting-started", "source": "getting-started.md", "title": "Getting Started" },
|
|
12
13
|
{ "route": "/docs/configuration", "source": "configuration.md", "title": "Configuration" },
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
{
|
|
20
21
|
"id": "routing-data",
|
|
21
22
|
"title": "Routing & Data",
|
|
23
|
+
"description": "Routing, server data, mutations, validation and structured errors.",
|
|
22
24
|
"pages": [
|
|
23
25
|
{ "route": "/docs/routing", "source": "routing.md", "title": "Routing" },
|
|
24
26
|
{ "route": "/docs/server-data-loaders", "source": "server-data-loaders.md", "title": "Server Data Loaders" },
|
|
@@ -32,6 +34,7 @@
|
|
|
32
34
|
{
|
|
33
35
|
"id": "authentication",
|
|
34
36
|
"title": "Authentication",
|
|
37
|
+
"description": "Authentication core, auth-aware route guards and JWT cookie sessions.",
|
|
35
38
|
"pages": [
|
|
36
39
|
{ "route": "/docs/authentication", "source": "authentication.md", "title": "Authentication" },
|
|
37
40
|
{ "route": "/docs/auth-route-guards", "source": "auth-route-guards.md", "title": "Auth Route Guards" },
|
|
@@ -41,6 +44,7 @@
|
|
|
41
44
|
{
|
|
42
45
|
"id": "database",
|
|
43
46
|
"title": "Database",
|
|
47
|
+
"description": "Database primitives, transactions and migration workflows.",
|
|
44
48
|
"pages": [
|
|
45
49
|
{ "route": "/docs/database", "source": "database.md", "title": "Database" },
|
|
46
50
|
{ "route": "/docs/database-migrations", "source": "database-migrations.md", "title": "Database Migrations" }
|
|
@@ -49,6 +53,7 @@
|
|
|
49
53
|
{
|
|
50
54
|
"id": "runtime",
|
|
51
55
|
"title": "Runtime & Infrastructure",
|
|
56
|
+
"description": "Middleware, hydration, logging, caching, security and production hardening.",
|
|
52
57
|
"pages": [
|
|
53
58
|
{ "route": "/docs/middleware", "source": "middleware.md", "title": "Middleware" },
|
|
54
59
|
{ "route": "/docs/hydration", "source": "hydration.md", "title": "Hydration" },
|
|
@@ -61,6 +66,7 @@
|
|
|
61
66
|
{
|
|
62
67
|
"id": "storage",
|
|
63
68
|
"title": "Storage & Uploads",
|
|
69
|
+
"description": "Multipart uploads, storage adapters, file delivery and object-storage features.",
|
|
64
70
|
"pages": [
|
|
65
71
|
{ "route": "/docs/file-upload", "source": "file-upload.md", "title": "File Upload" },
|
|
66
72
|
{ "route": "/docs/storage", "source": "storage.md", "title": "Storage & File Delivery" },
|
|
@@ -71,14 +77,35 @@
|
|
|
71
77
|
{
|
|
72
78
|
"id": "developer-experience",
|
|
73
79
|
"title": "Developer Experience",
|
|
80
|
+
"description": "Project generators, diagnostics, project metadata and framework maintenance tooling.",
|
|
74
81
|
"pages": [
|
|
75
82
|
{ "route": "/docs/generators", "source": "generators.md", "title": "Project Generators" },
|
|
76
83
|
{ "route": "/docs/developer-tools", "source": "developer-tools.md", "title": "Doctor & Inspect" }
|
|
77
84
|
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "platform-compatibility",
|
|
88
|
+
"title": "Platform & Compatibility",
|
|
89
|
+
"description": "Supported platform contracts, documentation integration and migration guidance.",
|
|
90
|
+
"pages": [
|
|
91
|
+
{ "route": "/docs/platform-contract", "source": "platform-contract.md", "title": "Framework Platform Contract" },
|
|
92
|
+
{ "route": "/docs/documentation-platform", "source": "documentation-platform.md", "title": "Documentation Platform" },
|
|
93
|
+
{ "route": "/docs/migration-0.2", "source": "migration-0.2.md", "title": "Migrating to 0.2.x" }
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "api-reference",
|
|
98
|
+
"title": "API Reference",
|
|
99
|
+
"description": "Supported BCP package entrypoints and their guide ownership.",
|
|
100
|
+
"pages": [
|
|
101
|
+
{ "route": "/docs/api-reference", "source": "api-reference.md", "title": "API Reference" }
|
|
102
|
+
]
|
|
78
103
|
}
|
|
79
104
|
],
|
|
80
105
|
"releases": [
|
|
81
|
-
{ "route": "/releases/0.1
|
|
106
|
+
{ "route": "/releases/0.2.1", "source": "releases/0.2.1.md", "version": "0.2.1", "state": "unreleased" },
|
|
107
|
+
{ "route": "/releases/0.2.0", "source": "releases/0.2.0.md", "version": "0.2.0" },
|
|
108
|
+
{ "route": "/releases/0.1.29", "source": "releases/0.1.29.md", "version": "0.1.29" },
|
|
82
109
|
{ "route": "/releases/0.1.28", "source": "releases/0.1.28.md", "version": "0.1.28" },
|
|
83
110
|
{ "route": "/releases/0.1.27", "source": "releases/0.1.27.md", "version": "0.1.27" },
|
|
84
111
|
{ "route": "/releases/0.1.26", "source": "releases/0.1.26.md", "version": "0.1.26" },
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Documentation Platform
|
|
2
|
+
|
|
3
|
+
BCP Framework `0.2.1` defines a machine-readable documentation platform so the framework repository remains the source of truth while `bcp-docs-web` acts as the presentation, search and navigation layer.
|
|
4
|
+
|
|
5
|
+
## Source contracts
|
|
6
|
+
|
|
7
|
+
The documentation platform uses three manifests:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
docs/docs-web-manifest.json
|
|
11
|
+
Navigation, routes, page titles and release routes.
|
|
12
|
+
|
|
13
|
+
docs/platform-manifest.json
|
|
14
|
+
Framework runtime, public entrypoints, capabilities and compatibility baseline.
|
|
15
|
+
|
|
16
|
+
docs/api-manifest.json
|
|
17
|
+
Public package entrypoints, source ownership, environment boundary and guide mapping.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Markdown files under `docs/` remain the authored documentation content.
|
|
21
|
+
|
|
22
|
+
## Docs-web synchronization
|
|
23
|
+
|
|
24
|
+
`bcp-docs-web` should read the manifests first and then load the Markdown sources they reference.
|
|
25
|
+
|
|
26
|
+
Recommended flow:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
Framework repository / selected ref
|
|
30
|
+
↓
|
|
31
|
+
docs-web-manifest.json
|
|
32
|
+
platform-manifest.json
|
|
33
|
+
api-manifest.json
|
|
34
|
+
↓
|
|
35
|
+
validate matching framework/version
|
|
36
|
+
↓
|
|
37
|
+
load Markdown sources
|
|
38
|
+
↓
|
|
39
|
+
synchronize CMS/search/navigation
|
|
40
|
+
↓
|
|
41
|
+
render docs website
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The website must not maintain a competing hard-coded list of framework pages when a page exists in `docs-web-manifest.json`.
|
|
45
|
+
|
|
46
|
+
## Version and release state
|
|
47
|
+
|
|
48
|
+
The current documentation target and release state come from the framework manifests.
|
|
49
|
+
|
|
50
|
+
For an unreleased development target:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"version": "0.2.1",
|
|
55
|
+
"releaseState": "unreleased"
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
A release note existing in the repository does not mean that version has been published to npm. Release state should only move to a published value after the release workflow succeeds.
|
|
60
|
+
|
|
61
|
+
## API reference contract
|
|
62
|
+
|
|
63
|
+
`docs/api-manifest.json` describes supported public package entrypoints.
|
|
64
|
+
|
|
65
|
+
Each entry records:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
package name
|
|
69
|
+
source file
|
|
70
|
+
environment boundary
|
|
71
|
+
API-reference route
|
|
72
|
+
summary
|
|
73
|
+
related guide routes
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The manifest intentionally documents public package boundaries instead of private framework implementation modules.
|
|
77
|
+
|
|
78
|
+
Public entrypoints are also checked against `docs/platform-manifest.json` and the prepared npm package during release validation.
|
|
79
|
+
|
|
80
|
+
## Historical versions
|
|
81
|
+
|
|
82
|
+
The synchronization workflow accepts a Git ref. This allows documentation to be synchronized from a release tag instead of only from `main`.
|
|
83
|
+
|
|
84
|
+
Example:
|
|
85
|
+
|
|
86
|
+
```powershell
|
|
87
|
+
npm run docs:sync -- --ref=v0.2.0
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
A docs website may use this foundation for version snapshots without copying current documentation into a second manually maintained source tree.
|
|
91
|
+
|
|
92
|
+
## Search
|
|
93
|
+
|
|
94
|
+
Search should index the synchronized Markdown documents, not the manifest JSON itself. Manifest titles, categories and API entrypoint summaries may be added to the search index as metadata.
|
|
95
|
+
|
|
96
|
+
## Previous / next navigation
|
|
97
|
+
|
|
98
|
+
Previous and next document ordering should follow the order in `docs-web-manifest.json`.
|
|
99
|
+
|
|
100
|
+
This keeps sidebar order and previous/next navigation consistent.
|
|
101
|
+
|
|
102
|
+
## Security boundary
|
|
103
|
+
|
|
104
|
+
Documentation synchronization must only read files explicitly referenced by validated manifests.
|
|
105
|
+
|
|
106
|
+
Source paths must:
|
|
107
|
+
|
|
108
|
+
- be relative to `docs/`,
|
|
109
|
+
- reject `..` traversal,
|
|
110
|
+
- reject absolute paths,
|
|
111
|
+
- use expected Markdown or JSON source types,
|
|
112
|
+
- never ingest `.env`, credentials or application project secrets.
|
|
113
|
+
|
|
114
|
+
`bcp.project.json` is intentionally non-secret, but a documentation site should still avoid reading arbitrary application project files.
|
|
115
|
+
|
|
116
|
+
## Release validation
|
|
117
|
+
|
|
118
|
+
Before a Documentation Platform release:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npm run typecheck
|
|
122
|
+
npm run test:unit
|
|
123
|
+
npm run test:integration
|
|
124
|
+
npm run test:e2e
|
|
125
|
+
npm run test:package
|
|
126
|
+
npm run rc:check
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Validation should ensure:
|
|
130
|
+
|
|
131
|
+
- all docs-web page sources exist,
|
|
132
|
+
- all docs routes are unique,
|
|
133
|
+
- API entrypoints are unique,
|
|
134
|
+
- API entrypoints match the platform public-entrypoint baseline,
|
|
135
|
+
- manifest versions match the framework version,
|
|
136
|
+
- prepared npm artifacts contain the documentation contracts.
|