@evjs/manifest 0.0.1-rc.13 → 0.0.1-rc.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/AGENT.md CHANGED
@@ -4,19 +4,24 @@ Shared manifest schema types for the ev framework build system.
4
4
 
5
5
  ## Types
6
6
 
7
- - `ServerManifest` — Server manifest interface (`dist/server/manifest.json`).
8
- - `ClientManifest` — Client manifest interface (reserved for future `dist/client/manifest.json`).
7
+ - `Manifest` — Unified manifest interface (`dist/manifest.json`) with `server` and `client` sections.
8
+ - `ServerManifestSection` — Server section: `{ entry: string; fns: Record<string, ServerFnEntry>; rsc?: ... }`.
9
+ - `ClientManifestSection` — Client section: `{ js: string[]; css: string[]; pages?: ... }`.
9
10
  - `ServerFnEntry` — `{ moduleId: string; export: string }` — server function metadata.
10
11
  - `RscEntry` — Reserved for future (React Server Components).
11
12
  - `PageEntry` — Reserved for future (MPA per-page assets).
13
+ - `ServerManifest` — Deprecated alias for backward compat.
14
+ - `ClientManifest` — Deprecated alias for backward compat.
12
15
 
13
- ## Server Manifest (v1)
16
+ ## Manifest (v1)
14
17
  ```json
15
18
  {
16
19
  "version": 1,
17
- "entry": "main.a1b2c3d4.js",
18
- "fns": {
19
- "<fnId>": { "moduleId": "f9b6...", "export": "getUsers" }
20
+ "server": {
21
+ "entry": "main.a1b2c3d4.js",
22
+ "fns": {
23
+ "<fnId>": { "moduleId": "f9b6...", "export": "getUsers" }
24
+ }
20
25
  }
21
26
  }
22
27
  ```
@@ -24,5 +29,5 @@ Shared manifest schema types for the ev framework build system.
24
29
  ## Usage
25
30
  Produced by `@evjs/webpack-plugin`, consumed by `@evjs/runtime` and adapters:
26
31
  ```ts
27
- import type { ServerManifest, ServerFnEntry } from "@evjs/manifest";
32
+ import type { Manifest, ServerFnEntry } from "@evjs/manifest";
28
33
  ```
package/README.md CHANGED
@@ -10,30 +10,36 @@ npm install @evjs/manifest
10
10
 
11
11
  ## Purpose
12
12
 
13
- Defines the structure of per-environment manifest files emitted by `@evjs/webpack-plugin` and consumed by `@evjs/runtime`. Each environment gets its own `manifest.json`:
13
+ Defines the structure of the unified manifest file emitted by `@evjs/webpack-plugin` and consumed by `@evjs/runtime`. A single `dist/manifest.json` contains both server and client build metadata:
14
14
 
15
- - `dist/server/manifest.json` → `ServerManifest`
16
- - `dist/client/manifest.json` → `ClientManifest` (future)
17
-
18
- ## Server Manifest (v1)
15
+ ## Manifest (v1)
19
16
 
20
17
  ```json
21
18
  {
22
19
  "version": 1,
23
- "entry": "main.a1b2c3d4.js",
24
- "fns": {
25
- "<fnId>": {
26
- "moduleId": "f9b6...",
27
- "export": "getUsers"
20
+ "server": {
21
+ "entry": "main.a1b2c3d4.js",
22
+ "fns": {
23
+ "<fnId>": {
24
+ "moduleId": "f9b6...",
25
+ "export": "getUsers"
26
+ }
28
27
  }
28
+ },
29
+ "client": {
30
+ "js": ["main.abc123.js"],
31
+ "css": ["main.def456.css"]
29
32
  }
30
33
  }
31
34
  ```
32
35
 
33
36
  ## Exported Types
34
37
 
35
- - **`ServerManifest`** — server manifest (`dist/server/manifest.json`).
36
- - **`ClientManifest`** — client manifest (reserved for future).
38
+ - **`Manifest`** — unified manifest (`dist/manifest.json`) with `server` and `client` sections.
39
+ - **`ServerManifestSection`** — server section (`{ entry, fns, rsc? }`).
40
+ - **`ClientManifestSection`** — client section (`{ js, css, pages? }`).
37
41
  - **`ServerFnEntry`** — server function metadata (`{ moduleId, export }`).
38
42
  - **`RscEntry`** — React Server Components (reserved for future).
39
43
  - **`PageEntry`** — per-page assets for MPA (reserved for future).
44
+ - **`ServerManifest`** — deprecated alias, use `Manifest` instead.
45
+ - **`ClientManifest`** — deprecated alias, use `Manifest` instead.
package/esm/index.d.ts CHANGED
@@ -3,9 +3,8 @@
3
3
  *
4
4
  * Shared manifest schemas for the ev framework build system.
5
5
  *
6
- * Each environment emits its own manifest file:
7
- * - dist/server/manifest.json ServerManifest
8
- * - dist/client/manifest.json → ClientManifest (future)
6
+ * A single unified manifest is emitted to `dist/manifest.json`,
7
+ * containing both server and client build metadata.
9
8
  */
10
9
  /** Base manifest fields shared by all environment manifests. */
11
10
  interface ManifestBase {
@@ -26,13 +25,8 @@ export interface RscEntry {
26
25
  /** Exported component name. */
27
26
  export: string;
28
27
  }
29
- /**
30
- * Server manifest — emitted to `dist/server/manifest.json`.
31
- *
32
- * Contains everything needed to boot and serve the server bundle:
33
- * entry filename, registered server functions, and future RSC/SSR metadata.
34
- */
35
- export interface ServerManifest extends ManifestBase {
28
+ /** Server section of the manifest. */
29
+ export interface ServerManifestSection {
36
30
  /** Server bundle entry filename (e.g. "main.js" or "main.a1b2c3d4.js"). */
37
31
  entry: string;
38
32
  /** Registered server functions (fnId → module + export). */
@@ -47,12 +41,8 @@ export interface PageEntry {
47
41
  /** CSS bundle paths for this page. */
48
42
  css: string[];
49
43
  }
50
- /**
51
- * Client manifest — emitted to `dist/client/manifest.json` (future).
52
- *
53
- * Contains everything needed for SSR HTML injection and asset preloading.
54
- */
55
- export interface ClientManifest extends ManifestBase {
44
+ /** Client section of the manifest. */
45
+ export interface ClientManifestSection {
56
46
  /** JavaScript bundle paths for HTML injection. */
57
47
  js: string[];
58
48
  /** CSS bundle paths for HTML injection. */
@@ -60,4 +50,23 @@ export interface ClientManifest extends ManifestBase {
60
50
  /** Per-page assets for MPA support (future — reserved). */
61
51
  pages?: Record<string, PageEntry>;
62
52
  }
53
+ /**
54
+ * Unified manifest — emitted to `dist/manifest.json`.
55
+ *
56
+ * Contains both server and client build metadata in a single file.
57
+ */
58
+ export interface Manifest extends ManifestBase {
59
+ /** Server build metadata (entry, server functions, RSC). */
60
+ server: ServerManifestSection;
61
+ /** Client build metadata (bundles, CSS, pages). Optional until client manifest is implemented. */
62
+ client?: ClientManifestSection;
63
+ }
64
+ /**
65
+ * @deprecated Use `Manifest` instead. Kept for backward compatibility.
66
+ */
67
+ export type ServerManifest = ManifestBase & ServerManifestSection;
68
+ /**
69
+ * @deprecated Use `Manifest` instead. Kept for backward compatibility.
70
+ */
71
+ export type ClientManifest = ManifestBase & ClientManifestSection;
63
72
  export {};
package/esm/index.js CHANGED
@@ -3,8 +3,7 @@
3
3
  *
4
4
  * Shared manifest schemas for the ev framework build system.
5
5
  *
6
- * Each environment emits its own manifest file:
7
- * - dist/server/manifest.json ServerManifest
8
- * - dist/client/manifest.json → ClientManifest (future)
6
+ * A single unified manifest is emitted to `dist/manifest.json`,
7
+ * containing both server and client build metadata.
9
8
  */
10
9
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evjs/manifest",
3
- "version": "0.0.1-rc.13",
3
+ "version": "0.0.1-rc.15",
4
4
  "description": "Shared manifest types for the ev framework",
5
5
  "type": "module",
6
6
  "publishConfig": {