@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 +12 -7
- package/README.md +18 -12
- package/esm/index.d.ts +25 -16
- package/esm/index.js +2 -3
- package/package.json +1 -1
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
|
-
- `
|
|
8
|
-
- `
|
|
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
|
-
##
|
|
16
|
+
## Manifest (v1)
|
|
14
17
|
```json
|
|
15
18
|
{
|
|
16
19
|
"version": 1,
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
"
|
|
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 {
|
|
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
|
|
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
|
-
|
|
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
|
-
"
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
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
|
-
- **`
|
|
36
|
-
- **`
|
|
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
|
-
*
|
|
7
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
7
|
-
*
|
|
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 {};
|