@evjs/cli 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +17 -23
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -20,7 +20,7 @@ Page tree is materialized as an SPA or MPA:
20
20
  - Shared HTML template: `./index.html`
21
21
  - Client dev server: port 3000
22
22
  - API server (dev): port 3001
23
- - Server functions auto-discovered via `"use server"` directive
23
+ - Reachable server functions discovered via the `"use server"` directive
24
24
  - Server request-route anchors auto-discovered from `./src/apis/**/api.*`
25
25
 
26
26
  `routing.mode` selects SPA or MPA materialization for the same semantic
@@ -39,15 +39,17 @@ Page-and-Route tree. It does not select a different file convention.
39
39
 
40
40
  ### `ev dev`
41
41
 
42
- Uses the default bundler adapter directly (no temp config files):
43
- 1. **dev server** (port 3000) — client bundle with HMR.
44
- 2. **Node API Server** (port 3001) — auto-starts when server bundle is emitted, uses `node --watch`.
42
+ Uses the default bundler adapter directly:
43
+
44
+ 1. **browser dev server** (preferred port 3000) — client bundle with HMR;
45
+ 2. **framework server** (preferred port 3001) — starts when the active
46
+ BuildPlan emits a server runtime.
45
47
 
46
48
  ### `ev build`
47
49
 
48
50
  Runs the production build through `@evjs/ev` with `NODE_ENV=production`:
49
51
  - `dist/client/` — optimized client assets with content hashes.
50
- - `dist/server/main.[hash].js` — server bundle.
52
+ - `dist/server/` — server artifacts when the BuildPlan requires them.
51
53
  - `dist/deployment-metadata.json` — canonical deployment metadata for tooling
52
54
  and adapters.
53
55
 
@@ -86,8 +88,8 @@ export default defineConfig({
86
88
 
87
89
  The `dev` and `server.dev` fields accept extra options that are merged with
88
90
  defaults. Change only `routing.mode` to `"mpa"` to materialize the same Page
89
- tree as Page-owned Documents. Dynamic-route output and React route facets in
90
- MPA remain staged; `ev inspect` and `ev build` report unsupported combinations.
91
+ tree as Page-owned Documents. MPA accepts static Page paths and rejects
92
+ dynamic/catch-all paths and router-only boundary facets.
91
93
 
92
94
  ## Project Structure
93
95
 
@@ -119,25 +121,17 @@ Only `page.*` creates a canonical client Page and Route. Other files below a
119
121
  Page directory, including `index.*`, are ordinary Page-private source and need
120
122
  no `_` prefix. The Page directory determines the URL in both SPA and MPA mode.
121
123
 
122
- ## Common Mistakes
124
+ ## Authoring Boundaries
123
125
 
124
- 1. **Do not create `src/main.tsx` or top-level `entry` for a canonical app** —
125
- add `src/pages/**/page.tsx` anchors and declare `routing.mode`.
126
- 2. **Do not use `index.tsx` as a new Page anchor** — it is ordinary private
127
- source in the canonical model.
128
- 3. **Do not create a custom bundler config file** — use `ev.config.ts` instead.
129
- 4. **Do not install bundler internals manually** — the default adapter is
130
- provided by `@evjs/cli`.
131
- 5. **Config file must be `ev.config.ts`** — not `evjs.config.ts`.
132
- 6. **Import `defineConfig` and `definePageConfig` from `@evjs/ev`** — not from
133
- `@evjs/server`.
126
+ 1. Canonical apps publish Pages through `src/pages/**/page.*` and declare
127
+ `routing.mode`; colocated `index.*` files remain ordinary source.
128
+ 2. Configure the framework in `ev.config.ts`; the CLI supplies the default
129
+ bundler adapter.
130
+ 3. Import `defineConfig` and `definePageConfig` from `@evjs/ev`.
134
131
 
135
132
  Explicit `application.routes` and `component`/`routes` config are SPA-only
136
- route-tree inputs in `@evjs/ev`; their converters normalize into the same Core
137
- graph, reject MPA materialization, and do not define additional canonical
138
- routing models. File-convention applications must use `page.tsx` for every
139
- published Page, keep Page configuration in `page.config.ts`, and select only
140
- `routing.mode: "spa" | "mpa"`.
133
+ route-tree inputs in `@evjs/ev`; they normalize into the same CoreGraph and
134
+ cannot be combined with canonical `routing` discovery.
141
135
 
142
136
  ## Bundled Dependencies
143
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evjs/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Command-line wrapper for the evjs framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,8 +28,8 @@
28
28
  "check-types": "tsc --noEmit"
29
29
  },
30
30
  "dependencies": {
31
- "@evjs/bundler-utoopack": "0.3.0",
32
- "@evjs/ev": "0.3.0",
31
+ "@evjs/bundler-utoopack": "0.3.1",
32
+ "@evjs/ev": "0.3.1",
33
33
  "@logtape/logtape": "^2.0.4",
34
34
  "commander": "^12.1.0"
35
35
  },