@evjs/manifest 0.0.13 → 0.0.15

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 CHANGED
@@ -10,43 +10,43 @@ npm install @evjs/manifest
10
10
 
11
11
  ## Purpose
12
12
 
13
- Defines the structure of the unified manifest file emitted by `@evjs/bundler-webpack` and consumed by `@evjs/client` and `@evjs/server`. A single `dist/manifest.json` contains both server and client build metadata:
13
+ Defines the structure of the manifest files emitted by `@evjs/bundler-webpack` and consumed by `@evjs/client` and `@evjs/server`. Two separate manifests are emitted during the build:
14
14
 
15
- ## Manifest (v1)
15
+ ## Server Manifest (`dist/server/manifest.json`)
16
16
 
17
17
  ```json
18
18
  {
19
19
  "version": 1,
20
- "server": {
21
- "entry": "main.a1b2c3d4.js",
22
- "fns": {
23
- "<fnId>": {
24
- "moduleId": "f9b6...",
25
- "export": "getUsers"
26
- }
20
+ "entry": "main.a1b2c3d4.js",
21
+ "fns": {
22
+ "<fnId>": {
23
+ "moduleId": "f9b6...",
24
+ "export": "getUsers"
27
25
  }
28
- },
29
- "client": {
30
- "assets": {
31
- "js": ["main.abc123.js"],
32
- "css": ["main.def456.css"]
33
- },
34
- "routes": [
35
- { "path": "/" },
36
- { "path": "/posts/$postId" }
37
- ]
38
26
  }
39
27
  }
40
28
  ```
41
29
 
30
+ ## Client Manifest (`dist/client/manifest.json`)
31
+
32
+ ```json
33
+ {
34
+ "version": 1,
35
+ "assets": {
36
+ "js": ["main.abc123.js"],
37
+ "css": ["main.def456.css"]
38
+ },
39
+ "routes": [
40
+ { "path": "/" },
41
+ { "path": "/posts/$postId" }
42
+ ]
43
+ }
44
+ ```
45
+
42
46
  ## Exported Types
43
47
 
44
- - **`Manifest`** — unified manifest (`dist/manifest.json`) with `server` and `client` sections.
45
- - **`ServerManifestSection`** — server section (`{ entry, fns, rsc? }`).
46
- - **`ClientManifestSection`** — client section (`{ assets: { js, css }, routes? }`).
48
+ - **`ServerManifest`** — server manifest (`dist/server/manifest.json`) with `entry`, `fns`, and optional `rsc`.
49
+ - **`ClientManifest`** — client manifest (`dist/client/manifest.json`) with `assets` and optional `routes`.
47
50
  - **`ServerFnEntry`** — server function metadata (`{ moduleId, export }`).
48
51
  - **`RouteEntry`** — a discovered client route (`{ path }`).
49
52
  - **`RscEntry`** — React Server Components (reserved for future).
50
- - **`PageEntry`** — per-page assets for MPA (reserved for future).
51
- - **`ServerManifest`** — deprecated alias, use `Manifest` instead.
52
- - **`ClientManifest`** — deprecated alias, use `Manifest` instead.
package/esm/index.d.ts CHANGED
@@ -3,14 +3,10 @@
3
3
  *
4
4
  * Shared manifest schemas for the ev framework build system.
5
5
  *
6
- * A single unified manifest is emitted to `dist/manifest.json`,
7
- * containing both server and client build metadata.
6
+ * Two separate manifests are emitted during the build:
7
+ * - `dist/server/manifest.json` server build metadata
8
+ * - `dist/client/manifest.json` — client build metadata
8
9
  */
9
- /** Base manifest fields shared by all environment manifests. */
10
- interface ManifestBase {
11
- /** Schema version — bump on breaking changes. */
12
- version: 1;
13
- }
14
10
  /** A registered server function entry. */
15
11
  export interface ServerFnEntry {
16
12
  /** Webpack module identifier (hash-based, no source paths exposed). */
@@ -25,8 +21,14 @@ export interface RscEntry {
25
21
  /** Exported component name. */
26
22
  export: string;
27
23
  }
28
- /** Server section of the manifest. */
29
- export interface ServerManifestSection {
24
+ /**
25
+ * Server manifest — emitted to `dist/server/manifest.json`.
26
+ *
27
+ * Contains server bundle entry, registered server functions, and RSC metadata.
28
+ */
29
+ export interface ServerManifest {
30
+ /** Schema version — bump on breaking changes. */
31
+ version: 1;
30
32
  /** Server bundle entry filename (e.g. "main.js" or "main.a1b2c3d4.js"). Omitted when no server bundle exists. */
31
33
  entry?: string;
32
34
  /** Registered server functions (fnId → module + export). */
@@ -39,8 +41,14 @@ export interface RouteEntry {
39
41
  /** Route path (e.g. "/", "/posts/$postId", "*"). */
40
42
  path: string;
41
43
  }
42
- /** Client section of the manifest. */
43
- export interface ClientManifestSection {
44
+ /**
45
+ * Client manifest — emitted to `dist/client/manifest.json`.
46
+ *
47
+ * Contains client bundle assets and discovered routes.
48
+ */
49
+ export interface ClientManifest {
50
+ /** Schema version — bump on breaking changes. */
51
+ version: 1;
44
52
  /** Bundle asset paths for HTML injection. */
45
53
  assets: {
46
54
  /** JavaScript bundle paths. */
@@ -51,23 +59,3 @@ export interface ClientManifestSection {
51
59
  /** Discovered client routes. */
52
60
  routes?: RouteEntry[];
53
61
  }
54
- /**
55
- * Unified manifest — emitted to `dist/manifest.json`.
56
- *
57
- * Contains both server and client build metadata in a single file.
58
- */
59
- export interface Manifest extends ManifestBase {
60
- /** Server build metadata (entry, server functions, RSC). */
61
- server: ServerManifestSection;
62
- /** Client build metadata (bundles, CSS, routes). Optional until client manifest is implemented. */
63
- client?: ClientManifestSection;
64
- }
65
- /**
66
- * @deprecated Use `Manifest` instead. Kept for backward compatibility.
67
- */
68
- export type ServerManifest = ManifestBase & ServerManifestSection;
69
- /**
70
- * @deprecated Use `Manifest` instead. Kept for backward compatibility.
71
- */
72
- export type ClientManifest = ManifestBase & ClientManifestSection;
73
- export {};
package/esm/index.js CHANGED
@@ -3,7 +3,8 @@
3
3
  *
4
4
  * Shared manifest schemas for the ev framework build system.
5
5
  *
6
- * A single unified manifest is emitted to `dist/manifest.json`,
7
- * containing both server and client build metadata.
6
+ * Two separate manifests are emitted during the build:
7
+ * - `dist/server/manifest.json` server build metadata
8
+ * - `dist/client/manifest.json` — client build metadata
8
9
  */
9
10
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evjs/manifest",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Shared manifest types for the ev framework",
5
5
  "type": "module",
6
6
  "publishConfig": {