@evjs/create-app 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.
package/README.md CHANGED
@@ -20,7 +20,7 @@ npx @evjs/create-app [name] [options]
20
20
 
21
21
  ## Templates
22
22
 
23
- Every template uses the same Core 0.3 authoring model: `page.tsx` anchors,
23
+ Every template uses the same Page-and-Route authoring model: `page.tsx` anchors,
24
24
  optional build-time `page.config.ts` for static title/named metadata and
25
25
  rendering, and directory-derived URLs.
26
26
  `routing.mode` is the only routing-mode configuration; SPA and MPA
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evjs/create-app",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Scaffold a new evjs project",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-api-routes",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "ev dev",
@@ -1,7 +1,7 @@
1
1
  # basic
2
2
 
3
3
  The standard starting point for an evjs application. It demonstrates the
4
- unified Core 0.3 Page-and-Route file convention alongside server functions.
4
+ Page-and-Route file convention alongside server functions.
5
5
 
6
6
  ## Run
7
7
 
@@ -38,9 +38,6 @@ npm run dev
38
38
  - `useMutation({ mutationFn: createUser })` for server-side mutations
39
39
  - `getFnQueryKey(getUsers)` for cache invalidation
40
40
 
41
- For source using explicit route configuration, this SPA Page tree is the
42
- canonical file-convention form. The `application.routes` converter accepts a
43
- SPA-only route tree and normalizes it into the same graph; after moving each
44
- route component to its URL directory as `page.tsx`, use
45
- `routing.mode: "spa"`. Explicit `component`/`routes` config does not define an
46
- MPA materialization mode.
41
+ This example uses the canonical `routing.mode: "spa"` file-convention profile.
42
+ Explicit `application.routes` is a separate SPA-only input into the same
43
+ normalized graph.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-basic",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "ev dev",
@@ -1,6 +1,6 @@
1
1
  # complex-routing
2
2
 
3
- Advanced SPA routing through the same Core 0.3 Page-and-Route file convention
3
+ Advanced SPA routing through the same Page-and-Route file convention
4
4
  used by the basic example.
5
5
 
6
6
  ## Run
@@ -29,7 +29,7 @@ npm run dev
29
29
  - Redirects through the `/old-blog` Page lifecycle
30
30
  - Page hooks such as `usePageParams()` and `usePageSearch()`
31
31
 
32
- This example intentionally uses SPA mode because its dynamic route and React
33
- route facets are not yet materialized by the MPA runtime. Canonical SPA and MPA
34
- apps still share the same `page.tsx` Page-anchor convention; `routing.mode`
35
- selects how supported Pages are materialized.
32
+ This example uses SPA mode because MPA rejects its dynamic route and
33
+ router-only React facets. Canonical SPA and MPA apps share the same `page.tsx`
34
+ Page-anchor convention; `routing.mode` selects how supported Pages are
35
+ materialized.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-complex-routing",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "ev dev",
@@ -1,6 +1,7 @@
1
1
  # custom-ws-transport
2
2
 
3
- Custom WebSocket transport for server function calls.
3
+ Client-side `TransportAdapter` example for sending server-function calls over
4
+ WebSocket. This repository does not provide the matching WebSocket server.
4
5
 
5
6
  ## Run
6
7
 
@@ -8,6 +9,10 @@ Custom WebSocket transport for server function calls.
8
9
  npm run dev
9
10
  ```
10
11
 
12
+ The page shell runs locally, but server-function calls require a same-origin
13
+ `/ws` endpoint that accepts the documented `{ id, fnId, args }` messages and
14
+ returns `{ id, result }` or `{ id, error }`.
15
+
11
16
  ## Key Files
12
17
 
13
18
  | File | Purpose |
@@ -22,6 +27,6 @@ npm run dev
22
27
 
23
28
  - Custom `TransportAdapter` over WebSocket
24
29
  - `initTransport({ adapter: { send } })` extension
25
- - `dispatch()` for protocol-agnostic server-side handling
26
- - Same server functions work over HTTP and WebSocket
30
+ - Request correlation and pending-call cleanup for a custom client protocol
31
+ - The client message contract a matching WebSocket server must implement
27
32
  - Transport setup inside the root Page scope
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-custom-ws-transport",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "ev dev",
@@ -1,6 +1,6 @@
1
1
  # Unified MPA
2
2
 
3
- Minimal Core 0.3 multi-page application using the same `page.tsx` file
3
+ Minimal multi-page application using the same `page.tsx` file
4
4
  convention as SPA applications.
5
5
 
6
6
  ## Run
@@ -50,9 +50,5 @@ npm run build
50
50
  - No `@evjs/client`, `@evjs/server`, or generated `route-types.d.ts`
51
51
  dependency is needed for this router-free client output
52
52
 
53
- Source trees whose published entries use `index.tsx` must rename them to
54
- `page.tsx`, map static title and supported named meta to `page.config.ts` core
55
- fields, and move remaining plugin-owned values to namespaced extensions.
56
- Core discovers only canonical Page anchors. Explicit `component`/`routes`
57
- config remains a SPA-only route-tree input and is not accepted as an MPA
58
- authoring model.
53
+ Explicit `component`/`routes` config is a SPA-only route-tree input and is not
54
+ accepted as an MPA authoring model.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-mpa",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "ev dev",
@@ -19,11 +19,9 @@ For plugins that need to declare generated `.ev` artifacts and attach them to
19
19
  framework slots, see the generated contributions documentation.
20
20
 
21
21
  Plugins use one `Plugin` shape: declare static capabilities in `describe()` and
22
- add semantic contributions through the corresponding framework APIs. Typed
23
- runtime hooks and semantic facet attachment are not implemented yet and remain
24
- outside this example's scope.
22
+ add semantic contributions through the corresponding framework APIs.
25
23
 
26
- The application itself uses the unified Core 0.3 model:
24
+ The application itself uses the canonical model:
27
25
  `src/pages/page.tsx` defines `/`, `src/pages/layout.tsx` supplies the SPA root
28
26
  layout, `ev.config.ts` configures the Application extension, and
29
27
  `src/pages/page.config.ts` configures the Page and its unique Route. The
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-plugin-authoring",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "ev dev",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-with-sqlite",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "ev dev",
@@ -1,6 +1,6 @@
1
1
  # with-tailwind
2
2
 
3
- Tailwind CSS v4 through the evjs PostCSS pipeline and unified Core 0.3 Page
3
+ Tailwind CSS v4 through the evjs PostCSS pipeline and canonical Page
4
4
  model.
5
5
 
6
6
  ## Run
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-with-tailwind",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "ev dev",
@@ -15,10 +15,11 @@ npm run dev
15
15
  | `ev.config.ts` | Selects SPA routing mode |
16
16
  | `src/pages/layout.tsx` | File-convention root layout |
17
17
  | `src/pages/page.tsx` | UI consuming both tRPC and evjs APIs |
18
- | `src/apis/trpc.server.ts` | tRPC router and evjs server functions |
18
+ | `src/trpc.ts` | tRPC router and procedure definitions |
19
+ | `src/apis/trpc.server.ts` | Server-function dispatcher bridge into the tRPC router |
19
20
 
20
21
  ## What It Demonstrates
21
22
 
22
23
  - tRPC client + server alongside evjs server functions
23
- - `@trpc/server` router defined inside a `"use server"` file
24
+ - A `"use server"` bridge dispatching calls into an `@trpc/server` router
24
25
  - Both APIs coexist in the same build pipeline
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "example-with-trpc",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "ev dev",