create-githolon 0.2.0 → 0.2.2
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/index.mjs +3 -1
- package/package.json +1 -1
- package/template/README.md +11 -3
- package/template/package.json +5 -4
- package/template/test/e2e.mts +4 -1
- package/template/tsconfig.json +1 -0
package/index.mjs
CHANGED
|
@@ -77,10 +77,12 @@ if (!noGit) {
|
|
|
77
77
|
const rel = path.relative(process.cwd(), targetDir) || ".";
|
|
78
78
|
process.stdout.write(
|
|
79
79
|
`\nScaffolded ${appName} into ${rel}/${gitInited ? " (git repo)" : ""}\n` +
|
|
80
|
+
`\nRead docs/01-mental-model.md first — the docs travel with you, offline.\n` +
|
|
80
81
|
`\nNext:\n` +
|
|
81
82
|
` cd ${rel}\n` +
|
|
82
83
|
` npm install\n` +
|
|
83
|
-
` npx githolon compile # → build/: deployable package + manifests + typed client\n` +
|
|
84
|
+
` npx githolon compile # → build/: deployable package + manifests + typed client + a generated proof\n` +
|
|
85
|
+
` npx githolon proof # run that proof live — GENERATED from your own law, no test rewriting\n` +
|
|
84
86
|
` npx githolon login --agent # a verified identity, no browser\n\n` +
|
|
85
87
|
`Then pick a path (README.md walks both):\n` +
|
|
86
88
|
` A) npx githolon ws create <ws> && npx githolon deploy <ws>\n` +
|
package/package.json
CHANGED
package/template/README.md
CHANGED
|
@@ -4,9 +4,13 @@ Scaffolded by `npm create githolon`. One domain file, one config, one command
|
|
|
4
4
|
then an offline-first typed client against Nomos Cloud. Two ways to get a live
|
|
5
5
|
workspace; both end in the same place.
|
|
6
6
|
|
|
7
|
+
New here? Read [docs/01-mental-model.md](./docs/01-mental-model.md) first — the
|
|
8
|
+
docs travel with you, offline (the full index is [below](#docs--in-the-box)).
|
|
9
|
+
|
|
7
10
|
```bash
|
|
8
11
|
npm install
|
|
9
|
-
npx githolon compile # → build/: deployable package + manifests + typed client
|
|
12
|
+
npx githolon compile # → build/: deployable package + manifests + typed client + a generated proof
|
|
13
|
+
npx githolon proof # run that proof live — GENERATED from your own law, no test rewriting
|
|
10
14
|
npx githolon login --agent # self-onboard a verified identity (no browser; linkable to a full account later)
|
|
11
15
|
```
|
|
12
16
|
|
|
@@ -70,8 +74,10 @@ The starter is the tutorial; this is the exact path from guestbook to your own l
|
|
|
70
74
|
```bash
|
|
71
75
|
npx githolon compile && cat build/<pkg>.summary.txt
|
|
72
76
|
```
|
|
73
|
-
4. **Re-point the proof** —
|
|
74
|
-
|
|
77
|
+
4. **Re-point the proof** — `build/<pkg>.proof.mts` needs nothing: it is
|
|
78
|
+
REGENERATED from your law on every compile (`npx githolon proof` runs it).
|
|
79
|
+
The narrated `test/e2e.mts` is yours to reshape: update the client import and
|
|
80
|
+
the directive/query/count names; `npm run typecheck` names every stale
|
|
75
81
|
reference until it's clean.
|
|
76
82
|
5. **Prove it live:** `npm run e2e` — your law deploys to a throwaway workspace,
|
|
77
83
|
an offline write syncs through admission, the cloud answers your declared
|
|
@@ -107,6 +113,8 @@ pages, each under a screen and a half:
|
|
|
107
113
|
are auto-discovered from exports).
|
|
108
114
|
- `build/guestbook.client.ts` — GENERATED typed TS client (payload types from
|
|
109
115
|
the engine's zod, read models from the field kinds, the law hash baked in).
|
|
116
|
+
- `build/guestbook.proof.mts` — GENERATED runnable proof, synthesized from your
|
|
117
|
+
own directives/queries/counts on every compile; `npx githolon proof` runs it.
|
|
110
118
|
- `test/e2e.mts` — proves compile → deploy → typed offline write/query →
|
|
111
119
|
edge admission → cloud declared query, against the live cloud.
|
|
112
120
|
- `holon/` (after `ledger init`) — YOUR ledger, a normal git repo. Inspect it:
|
package/template/package.json
CHANGED
|
@@ -3,19 +3,20 @@
|
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
|
-
"description": "A Nomos domain package
|
|
6
|
+
"description": "A Nomos domain package \u2014 authored in @githolon/dsl, compiled with `githolon compile`, deployed to Nomos Cloud with one POST.",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"compile": "githolon compile",
|
|
9
|
+
"proof": "githolon proof",
|
|
9
10
|
"e2e": "tsx test/e2e.mts",
|
|
10
11
|
"typecheck": "tsc --noEmit"
|
|
11
12
|
},
|
|
12
13
|
"dependencies": {
|
|
13
|
-
"@githolon/dsl": "^0.2.
|
|
14
|
-
"@githolon/client": "^0.2.
|
|
14
|
+
"@githolon/dsl": "^0.2.1",
|
|
15
|
+
"@githolon/client": "^0.2.1",
|
|
15
16
|
"zod": "^4.4.3"
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|
|
18
|
-
"githolon": "^0.2.
|
|
19
|
+
"githolon": "^0.2.1",
|
|
19
20
|
"@types/node": "^25.9.2",
|
|
20
21
|
"tsx": "^4.19.2",
|
|
21
22
|
"typescript": "^5.6.3"
|
package/template/test/e2e.mts
CHANGED
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
// TYPED declared query routes LOCALLY → sync + edge admission → the CLOUD's
|
|
7
7
|
// declared query returns the entry.
|
|
8
8
|
//
|
|
9
|
-
// docs/
|
|
9
|
+
// The docs travel with you, offline: docs/01-mental-model.md first, then
|
|
10
|
+
// docs/03-client.md explains every call here. This file is the NARRATED
|
|
11
|
+
// walkthrough you reshape by hand; its GENERATED sibling — build/<name>.proof.mts,
|
|
12
|
+
// emitted by every compile from your own law — needs no rewriting: `githolon proof`.
|
|
10
13
|
//
|
|
11
14
|
// Run from this directory AFTER `npx nomos-compile`: npx tsx test/e2e.mts
|
|
12
15
|
import { readFileSync } from "node:fs";
|