@govela/create 0.6.0 → 0.7.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govela/create",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Creates a Vela application: npm create @govela. Manifest generated by the compiler repository; do not edit.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
"node": "^20.19.0 || >=22.12.0"
|
|
22
22
|
},
|
|
23
23
|
"govela": {
|
|
24
|
-
"app": "0.
|
|
24
|
+
"app": "0.3.0"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -19,6 +19,14 @@ When a compiler diagnostic disagrees with an example, trust the diagnostic.
|
|
|
19
19
|
loaders in `server/routes` (the same tree) return each component's
|
|
20
20
|
`data` prop; `npx vela-app scaffold` adds the missing ones.
|
|
21
21
|
- `src/_app`, `internal/appgen` and `out/` are generated; never edit them.
|
|
22
|
+
- A component at any depth reads the route, the form and the data of the
|
|
23
|
+
page with `getPage()` from `#app/page.js` (call it in the script; keep it
|
|
24
|
+
as `$state.deep(getPage())` to follow navigation) instead of passing
|
|
25
|
+
`route` and `data` down as props.
|
|
26
|
+
- Permission checks go in `guard.go` (`func Guard(ctx, r) error`, `npx
|
|
27
|
+
vela-app scaffold -guard /route`), never in a layout loader: a guard runs
|
|
28
|
+
before every loader and action below its directory. Read the user from
|
|
29
|
+
an `app.Local` set by middleware.
|
|
22
30
|
- Code that runs during the first render is translated to Go: keep it free
|
|
23
31
|
of browser APIs. Treat every `VELA-SSR-*` diagnostic as an error to fix.
|
|
24
32
|
- Tests are `*.test.__EXT__` files next to the components, run by Vitest with
|