@evjs/manifest 0.0.1-alpha.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 +35 -0
- package/esm/index.d.ts +58 -0
- package/esm/index.js +8 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @evjs/manifest
|
|
2
|
+
|
|
3
|
+
Shared manifest schema types for the **ev** framework build system.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @evjs/manifest
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
Defines the structure of `manifest.json` emitted by `@evjs/webpack-plugin` and consumed by `@evjs/runtime`. Provides a single source of truth for the build manifest schema.
|
|
14
|
+
|
|
15
|
+
## Schema (v1)
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"version": 1,
|
|
20
|
+
"serverFunctions": {
|
|
21
|
+
"<fnId>": {
|
|
22
|
+
"file": "src/api/users.server.ts",
|
|
23
|
+
"export": "getUsers"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Exported Types
|
|
30
|
+
|
|
31
|
+
- **`EvManifest`** — the root manifest interface (versioned).
|
|
32
|
+
- **`ServerFnEntry`** — server function metadata (current).
|
|
33
|
+
- **`SsrEntry`** — SSR configuration (reserved for Stage 3).
|
|
34
|
+
- **`AssetsEntry`** — client JS/CSS assets (reserved for Stage 3).
|
|
35
|
+
- **`RscEntry`** — React Server Components (reserved for future).
|
package/esm/index.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @evjs/manifest
|
|
3
|
+
*
|
|
4
|
+
* Shared manifest schema for the ev framework build system.
|
|
5
|
+
* This package defines the structure of `manifest.json` emitted
|
|
6
|
+
* by @evjs/webpack-plugin and consumed by @evjs/runtime.
|
|
7
|
+
*/
|
|
8
|
+
/** A registered server function entry. */
|
|
9
|
+
export interface ServerFnEntry {
|
|
10
|
+
/** Webpack module identifier (hash-based, no source paths exposed). */
|
|
11
|
+
moduleId: string;
|
|
12
|
+
/** Exported function name. */
|
|
13
|
+
export: string;
|
|
14
|
+
}
|
|
15
|
+
/** Server-side rendering configuration. */
|
|
16
|
+
export interface SsrEntry {
|
|
17
|
+
/** Path to the server entry bundle. */
|
|
18
|
+
serverEntry: string;
|
|
19
|
+
/** Path to the client entry bundle. */
|
|
20
|
+
clientEntry: string;
|
|
21
|
+
}
|
|
22
|
+
/** Client assets for HTML injection during SSR. */
|
|
23
|
+
export interface AssetsEntry {
|
|
24
|
+
/** JavaScript bundle paths. */
|
|
25
|
+
js: string[];
|
|
26
|
+
/** CSS bundle paths. */
|
|
27
|
+
css: string[];
|
|
28
|
+
}
|
|
29
|
+
/** A React Server Component entry. */
|
|
30
|
+
export interface RscEntry {
|
|
31
|
+
/** Webpack module ID. */
|
|
32
|
+
moduleId: string;
|
|
33
|
+
/** Exported component name. */
|
|
34
|
+
export: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The ev build manifest.
|
|
38
|
+
*
|
|
39
|
+
* Version 1 supports:
|
|
40
|
+
* - `serverFunctions`: AJAX RPC server functions.
|
|
41
|
+
*
|
|
42
|
+
* Future versions will add:
|
|
43
|
+
* - `ssr`: Server-side rendering entry points.
|
|
44
|
+
* - `assets`: Client JS/CSS assets for HTML injection.
|
|
45
|
+
* - `serverComponents`: React Server Components.
|
|
46
|
+
*/
|
|
47
|
+
export interface EvManifest {
|
|
48
|
+
/** Schema version — bump on breaking changes. */
|
|
49
|
+
version: 1;
|
|
50
|
+
/** Server function registry (Stage 2). */
|
|
51
|
+
serverFunctions: Record<string, ServerFnEntry>;
|
|
52
|
+
/** SSR configuration (Stage 3 — reserved). */
|
|
53
|
+
ssr?: SsrEntry;
|
|
54
|
+
/** Client assets (Stage 3 — reserved). */
|
|
55
|
+
assets?: AssetsEntry;
|
|
56
|
+
/** React Server Components (future — reserved). */
|
|
57
|
+
serverComponents?: Record<string, RscEntry>;
|
|
58
|
+
}
|
package/esm/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@evjs/manifest",
|
|
3
|
+
"version": "0.0.1-alpha.1",
|
|
4
|
+
"description": "Shared manifest types for the ev framework",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./esm/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./esm/index.d.ts",
|
|
10
|
+
"import": "./esm/index.js",
|
|
11
|
+
"require": "./esm/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"check-types": "tsc --noEmit",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"esm"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"ev",
|
|
24
|
+
"manifest"
|
|
25
|
+
],
|
|
26
|
+
"author": "xusd320",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"typescript": "^5.7.3"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/evjs/evjs#readme",
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/evjs/evjs/issues"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/evjs/evjs.git"
|
|
38
|
+
}
|
|
39
|
+
}
|