create-nisc 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/CHANGELOG.md +11 -0
- package/README.md +17 -7
- package/dist/{chunk-A4727PE2.js → chunk-IUJYP2OS.js} +3 -3
- package/dist/{chunk-A4727PE2.js.map → chunk-IUJYP2OS.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -2
- package/dist/chunk-TEYNNEJA.js +0 -173
- package/dist/chunk-TEYNNEJA.js.map +0 -1
- package/templates/moss-dom/.turbo/turbo-build.log +0 -32
- package/templates/moss-dom/.turbo/turbo-test.log +0 -15
- package/templates/moss-dom/.turbo/turbo-typecheck.log +0 -4
- package/templates/moss-react/.turbo/turbo-build.log +0 -32
- package/templates/moss-react/.turbo/turbo-test.log +0 -15
- package/templates/moss-react/.turbo/turbo-typecheck.log +0 -4
- package/templates/shell-dom/.turbo/turbo-build.log +0 -31
- package/templates/shell-dom/.turbo/turbo-test.log +0 -12
- package/templates/shell-dom/.turbo/turbo-typecheck.log +0 -4
- package/templates/shell-react/.turbo/turbo-build.log +0 -31
- package/templates/shell-react/.turbo/turbo-test.log +0 -12
- package/templates/shell-react/.turbo/turbo-typecheck.log +0 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# create-nisc
|
|
2
|
+
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
No changes in this release.
|
|
6
|
+
|
|
7
|
+
## 0.2.1
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- d24bce8: The package no longer carries the templates' local `.turbo` logs or a stale build chunk, and `check:create` holds its tarball to the templates as source and nothing built or local.
|
package/README.md
CHANGED
|
@@ -19,8 +19,17 @@ npm create nisc my-app -- --page --dom # flags answer the questions
|
|
|
19
19
|
npm create nisc my-app -- --yes # the defaults: moss, React
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
| | |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `dir` | where the app goes (default `my-nisc-app`) |
|
|
25
|
+
| `--moss` / `--page` | the shell on a server (the default), or in the page |
|
|
26
|
+
| `--react` / `--dom` | React draws the screen (the default), or plain DOM |
|
|
27
|
+
| `--yes` | take the defaults for anything not given, and ask nothing |
|
|
28
|
+
| `--help`, `-h` | this list |
|
|
29
|
+
|
|
30
|
+
With no terminal to ask in, the flags are all there is and the rest takes the
|
|
31
|
+
defaults. An option it does not know is an error, never ignored — a typo must
|
|
32
|
+
not quietly make a different app.
|
|
24
33
|
|
|
25
34
|
## What you get
|
|
26
35
|
|
|
@@ -29,15 +38,16 @@ The structure the rulebook describes, and a first screen that works:
|
|
|
29
38
|
- one action on a canvas, a kit of five primitives with its stylesheet, and an
|
|
30
39
|
entry — the first screen **arrives as markup** (drawn by the server, or
|
|
31
40
|
written at build) and is picked up by the page;
|
|
32
|
-
- `npm run dev`, `build`, `check
|
|
33
|
-
command; `nisc dev` runs a moss app's server inside vite, so its
|
|
41
|
+
- `npm run dev`, `build`, `check` and `start` — and, with the shell in the
|
|
42
|
+
page, `export` — all the `nisc` command; `nisc dev` runs a moss app's server inside vite, so its
|
|
34
43
|
`vite.config.ts` holds nothing but the framework's plugin;
|
|
35
44
|
- three checks: the artifacts are pure, schema-valid JSON; the source is at the
|
|
36
45
|
installed grammars (`strata.lock.json`); the welcome screen is served, drawn
|
|
37
46
|
and pressed;
|
|
38
|
-
- every `@niscorp` package
|
|
39
|
-
|
|
40
|
-
itself, which pins that set
|
|
47
|
+
- every `@niscorp` package at **the release this create-nisc was built and
|
|
48
|
+
checked against** — a caret range from each one's version (such as `^0.2.0`), not
|
|
49
|
+
whatever is newest — and `@niscorp/nisc` itself, which pins that set
|
|
50
|
+
exactly and carries the rulebook.
|
|
41
51
|
|
|
42
52
|
And two documents:
|
|
43
53
|
|
|
@@ -3,7 +3,7 @@ import { join, extname, dirname } from 'path';
|
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
4
|
|
|
5
5
|
// <define:__NISC_SET__>
|
|
6
|
-
var define_NISC_SET_default = { "@niscorp/charter": "0.1.
|
|
6
|
+
var define_NISC_SET_default = { "@niscorp/charter": "0.1.1", "@niscorp/cli": "0.2.1", "@niscorp/cortex": "0.1.1", "@niscorp/loom": "0.1.1", "@niscorp/moss": "0.2.2", "@niscorp/nisc": "0.2.2", "@niscorp/nova": "0.1.2", "@niscorp/prism": "0.1.2", "@niscorp/signal": "0.1.1", "@niscorp/solid": "0.1.0", "@niscorp/strata": "0.1.1", "@niscorp/tide": "0.1.1", "@niscorp/vex": "0.1.1" };
|
|
7
7
|
|
|
8
8
|
// src/docs.ts
|
|
9
9
|
var uiName = (ui) => ui === "react" ? "React" : "plain DOM (nova\u2019s DOM adapter \u2014 no framework in the page)";
|
|
@@ -170,5 +170,5 @@ var testedSet = () => {
|
|
|
170
170
|
};
|
|
171
171
|
|
|
172
172
|
export { TEMPLATES, generate, templateOf, testedSet, validName };
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
174
|
-
//# sourceMappingURL=chunk-
|
|
173
|
+
//# sourceMappingURL=chunk-IUJYP2OS.js.map
|
|
174
|
+
//# sourceMappingURL=chunk-IUJYP2OS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["%3Cdefine:__NISC_SET__%3E","../src/docs.ts","../src/generate.ts","../src/set.ts"],"names":[],"mappings":";;;;;AAAA,IAAA,uBAAA,GAAA,EAAC,kBAAA,EAAmB,OAAA,EAAQ,cAAA,EAAe,OAAA,EAAQ,iBAAA,EAAkB,SAAQ,eAAA,EAAgB,OAAA,EAAQ,eAAA,EAAgB,OAAA,EAAQ,eAAA,EAAgB,OAAA,EAAQ,iBAAgB,OAAA,EAAQ,gBAAA,EAAiB,OAAA,EAAQ,iBAAA,EAAkB,OAAA,EAAQ,gBAAA,EAAiB,OAAA,EAAQ,iBAA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PE2.js","sourcesContent":["{\"@niscorp/charter\":\"0.1.0\",\"@niscorp/cli\":\"0.2.0\",\"@niscorp/cortex\":\"0.1.0\",\"@niscorp/loom\":\"0.1.0\",\"@niscorp/moss\":\"0.2.0\",\"@niscorp/nisc\":\"0.2.0\",\"@niscorp/nova\":\"0.1.1\",\"@niscorp/prism\":\"0.1.1\",\"@niscorp/signal\":\"0.1.0\",\"@niscorp/solid\":\"0.1.0\",\"@niscorp/strata\":\"0.1.0\",\"@niscorp/tide\":\"0.1.0\",\"@niscorp/vex\":\"0.1.0\"}","import type { Posture, Ui } from './generate';\n\n// ═══════════════════════════════════════════════════════════════\n// The two documents only a new app has.\n//\n// AGENTS.md says where the rules are — the installed @niscorp/nisc carries\n// them, for the version installed — and what is particular to this app. It\n// does not restate a rule: a copy would be frozen at the version it was made\n// with, and the rules move with releases.\n//\n// PLAN.md is the interview's record (AGENTS.md, \"Before any code\"). The\n// walkthrough asks what shapes the files; everything else is written down as\n// OPEN, and an open decision point blocks the build until it is answered or\n// delegated by name.\n// ═══════════════════════════════════════════════════════════════\n\ntype Facts = { name: string; posture: Posture; ui: Ui; today: string; nisc: string };\n\nconst uiName = (ui: Ui): string => (ui === 'react' ? 'React' : 'plain DOM (nova’s DOM adapter — no framework in the page)');\n\nconst layoutOf = (facts: Facts): string =>\n facts.posture === 'moss'\n ? `src/app/ ARTIFACTS ONLY — the manifest (app.ts), the charter, the actions, the shell\nsrc/server/ the environment (runtime.ts), the boot, how a screen is drawn (document.ts)\nsrc/ui/ the kit — the only renderer code, with ${facts.ui === 'react' ? 'src/main.tsx' : 'src/main.ts'}, the terminal entry\nsrc/dev/ the checks (\\`npm run check\\`) — a new feature adds its own\nnisc.config.ts how the app boots and how a screen is drawn, for the \\`nisc\\` command\nstrata.lock.json the grammar versions the source is written at (rule 20) — moved only\n by \\`npm run strata verify\\`, never by hand`\n : `src/app/ ARTIFACTS ONLY — the actions and the shell's canvases\nsrc/boot.ts the shell factory: the artifacts plus everything environmental\nsrc/ui/ the kit and the screen — the only renderer code, with ${facts.ui === 'react' ? 'src/main.tsx' : 'src/main.ts'}, the entry\nsrc/dev/ the checks (\\`npm run check\\`) — a new feature adds its own\nnisc.config.ts how the app boots and how its screen is drawn and picked up, for the \\`nisc\\` command\nstrata.lock.json the grammar versions the source is written at (rule 20) — moved only\n by \\`npm run strata verify\\`, never by hand`;\n\nexport const agentsDoc = (facts: Facts): string => `# ${facts.name}\n\nA nisc application. **The rules it is built by are \\`node_modules/@niscorp/nisc/AGENTS.md\\`** — read all of it before changing anything here (it is there once the app's dependencies are installed). It is the rulebook for the nisc version this app has installed, and \\`STYLE_GUIDE.md\\` sits beside it. The grammars it names — a layout node, an \\`ActionDefinition\\`, a Prism config, a charter, a Vex DSL — are in each package's own \\`README.md\\` and \\`DESIGN.md\\`, under \\`node_modules/@niscorp/<name>/\\`.\n\nWhat is particular to this app:\n\n- **Its decisions are in PLAN.md.** What was answered when it was made, what was derived, and what is still open. An open decision point is asked before anything is built on it, never resolved silently.\n- **It is ${facts.posture === 'moss' ? 'behind moss' : 'its own shell'}**, drawn with ${uiName(facts.ui)}.\n- **Where things go:**\n\n\\`\\`\\`\n${layoutOf(facts)}\n\\`\\`\\`\n\n- **How it runs:** \\`npm run dev\\`, \\`npm run build\\`, \\`npm run check\\`${facts.posture === 'page' ? ', `npm run export`' : ', `npm start`'} — all of them the \\`nisc\\` command — and \\`npm run strata status\\` for the grammars.\n`;\n\nconst d1 = (posture: Posture): string =>\n posture === 'moss'\n ? `| D1 Posture | answered | **A moss server app.** The shell runs on the server, one per person; the browser is a canvas terminal over a socket. The charter is enforced there: a principal reaches only the actions and the data it is granted. |`\n : `| D1 Posture | answered | **Its own shell, in the page — no server.** The shell, its actions and its endpoints run in the browser. Consequence, said plainly: **the charter is not enforcement here.** Whatever data and policy the page has, its user has; nothing in this posture is a security boundary. An app that needs one needs a server — moss. |`;\n\nconst d2 = (posture: Posture): string =>\n posture === 'moss'\n ? `| D2 Environment | derived · **open for deployment** | Development and the checks run on PGlite, an in-memory Postgres that starts empty every boot (\\`src/server/runtime.ts\\`). Open: the Postgres a deployment hands it, and where it runs. |`\n : `| D2 Environment | **open** | The app has no data yet. Open: what serves its endpoints — in-memory fixtures, PGlite in the page (your data lives in one browser profile: no sync, no other devices, gone if site data is cleared), a real backend, or a mix. |`;\n\nconst d5 = (posture: Posture): string =>\n posture === 'moss'\n ? `| D5 Routing | derived · **partly open** | The first screen is drawn on the server and adopted by the terminal — it costs nothing while nobody can sign in. Open: once sign-in exists, the wire keeps a cookie copy of the session token so a page can be drawn for the person asking (AGENTS.md rule 12), and a page drawn for somebody is theirs alone (\\`private, no-store\\`). Open: which paths are **pages** rather than the app, and whether the app's shell state syncs to the address bar. |`\n : `| D5 Routing | derived · **partly open** | The first screen is drawn at build (\\`nisc export\\`) — one file per path, the screen as nobody in particular sees it — and the page's own shell picks it up. Open: which paths exist beyond \\`/\\`, and whether shell state syncs to the address bar. |`;\n\nexport const planDoc = (facts: Facts): string => `# PLAN — ${facts.name}\n\nMade ${facts.today} by \\`npm create nisc\\`, on nisc ${facts.nisc}. This is the record AGENTS.md's interview asks for (\"Before any code\"). The walkthrough asked what shapes the files; everything else is **open**, and an open decision blocks the build that depends on it until it is answered by the user or delegated by name. A blanket \"go\" delegates nothing.\n\n## Decision points\n\n| | Tier | |\n|---|---|---|\n${d1(facts.posture)}\n${d2(facts.posture)}\n| D3 Reads | **open** | Vex entries (\\`{ fingerprint, context }\\`, the shape an AI feature can reach later) or plain endpoints with hand-written handlers. |\n| D4 Writes | **open** | Vex mutation entries or plain endpoint handlers. Either way a write is an endpoint, never inline. |\n${d5(facts.posture)}\n\n## Answered when it was made\n\n- **What draws the screen:** ${uiName(facts.ui)}. The kit in \\`src/ui/\\` is where the look lives; a layout names components, never styles.\n\n## The dial-in — open\n\n- The entities, and how they relate.\n- Expected scale.\n- Who uses it: one person, or roles. More than one principal sketches its roles and charter now, not later.\n- AI features: now, later, never. (Later still shapes D3.)\n- Look and feel.\n- Where it is deployed.\n- What happens to the data long-term.\n\n## Order of work\n\n1. **The interview** — every open item above, answered or delegated by name. ← here\n2. **Scaffold** — done: ${facts.posture === 'moss' ? 'manifest, runtime and terminal' : 'the shell factory and the entry'}, one action rendering, and its checks (the artifacts, the grammar lock, the welcome screen).\n3. **Kit** — the primitives, against a kitchen-sink action; lock the look before any feature.\n4. **Data layer** — per D2/D3: schema, seed, entries; one read end to end.\n5. **Actions** — domain by domain: list → detail → form.\n6. **Writes** — per D4; one round trip: create → announce → re-read.\n7. **Checks and polish** — a check per feature in \\`src/dev/\\`; empty states and transitions last.\n`;\n\n// What a nisc app keeps out of git. Lines, so an existing .gitignore can be\n// given only the ones it lacks.\nexport const gitignoreLines = ['node_modules/', 'dist/', 'out/', '.strata/', '*.tsbuildinfo', '.env', '.env.*', '!.env.example'];\n","import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';\nimport { dirname, extname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { agentsDoc, gitignoreLines, planDoc } from './docs';\n\n// ═══════════════════════════════════════════════════════════════\n// A new app, from a template — and nothing in it that the walkthrough did not\n// decide or PLAN.md does not record.\n//\n// The templates (../templates) are real apps: members of the nisc repository's\n// workspace, typechecked, built and checked by its CI like any other. What a\n// new app gets is one of them, copied, with three things changed: its name, the\n// `workspace:^` versions turned into the released set the template was checked\n// against, and the two documents that only exist for a new app — PLAN.md (the\n// decisions) and AGENTS.md (where the rules are).\n//\n// It never overwrites. A folder that already holds something is fine — a fresh\n// repository's .git, a LICENSE — as long as nothing it would write is there\n// already; if anything is, it writes nothing at all and says which files.\n// ═══════════════════════════════════════════════════════════════\n\n// Where the shell runs (D1): on a server (moss), or in the page.\nexport type Posture = 'moss' | 'page';\n// What draws the screen: React, or plain DOM.\nexport type Ui = 'react' | 'dom';\n\nexport type CreateOptions = {\n // where the app goes\n dir: string;\n // its package name\n name: string;\n posture: Posture;\n ui: Ui;\n // the @niscorp versions to depend on: package name → version\n versions: Readonly<Record<string, string>>;\n // the day it was made (PLAN.md), as YYYY-MM-DD\n today: string;\n};\n\nexport type Created = {\n // every file written, relative to the app\n files: string[];\n // files that were already there and were left as they were\n kept: string[];\n // files that were already there and were added to\n extended: string[];\n};\n\nexport const TEMPLATES = fileURLToPath(new URL('../templates', import.meta.url));\n\nexport const templateOf = (posture: Posture, ui: Ui): string => `${posture === 'moss' ? 'moss' : 'shell'}-${ui}`;\n\n// The token each template is named by — its package name, and wherever the\n// name shows (the page title, the welcome screen, its README).\nconst tokenOf = (template: string): string => `nisc-template-${template}`;\n\nconst SKIP = new Set(['node_modules', 'dist', 'out', '.turbo']);\nconst TEXT = new Set(['.ts', '.tsx', '.json', '.html', '.css', '.md']);\n// A file of the app's own that an existing folder may already have, and keeps.\nconst KEEP_THEIRS = new Set(['README.md']);\n\n// npm's rule for a package name, as the app's directory will mostly be named.\nexport const validName = (name: string): boolean => /^[a-z0-9][a-z0-9._-]*$/.test(name) && name.length <= 214;\n\nconst filesIn = (dir: string, base = ''): string[] =>\n readdirSync(join(dir, base), { withFileTypes: true }).flatMap((entry) => {\n if (SKIP.has(entry.name)) return [];\n const rel = base === '' ? entry.name : `${base}/${entry.name}`;\n return entry.isDirectory() ? filesIn(dir, rel) : [rel];\n });\n\nconst isRecord = (value: unknown): value is Record<string, unknown> => value !== null && typeof value === 'object' && !Array.isArray(value);\n\n// `workspace:^` → `^<the released version>`, for every dependency the template\n// takes from the workspace. A version the set does not have is a broken set,\n// not something to guess.\nconst pinned = (deps: unknown, versions: Readonly<Record<string, string>>): Record<string, string> => {\n if (!isRecord(deps)) return {};\n return Object.fromEntries(\n Object.entries(deps).map(([name, spec]): [string, string] => {\n if (typeof spec !== 'string') throw new Error(`create-nisc: ${name} has no version in the template`);\n if (!spec.startsWith('workspace:')) return [name, spec];\n const version = versions[name];\n if (version === undefined) throw new Error(`create-nisc: the nisc release has no ${name} — the set it was given is incomplete`);\n return [name, `^${version}`];\n }),\n );\n};\n\nexport const generate = (options: CreateOptions): Created => {\n const template = templateOf(options.posture, options.ui);\n const source = join(TEMPLATES, template);\n if (!existsSync(source)) throw new Error(`create-nisc: no template \"${template}\"`);\n if (!validName(options.name)) throw new Error(`create-nisc: \"${options.name}\" is not a package name (lowercase letters, digits, - . _)`);\n if (existsSync(options.dir) && !statSync(options.dir).isDirectory()) throw new Error(`create-nisc: ${options.dir} is a file`);\n\n // ── everything it would write, worked out before anything is written ──\n const token = tokenOf(template);\n const planned = new Map<string, string | Buffer>();\n for (const rel of filesIn(source)) {\n const from = join(source, rel);\n if (rel === 'package.json') {\n const manifest: unknown = JSON.parse(readFileSync(from, 'utf8'));\n if (!isRecord(manifest)) throw new Error(`create-nisc: ${template}/package.json is not an object`);\n const app = {\n ...manifest,\n name: options.name,\n dependencies: pinned(manifest['dependencies'], options.versions),\n devDependencies: pinned(manifest['devDependencies'], options.versions),\n };\n planned.set(rel, `${JSON.stringify(app, null, 2)}\\n`);\n } else if (TEXT.has(extname(rel))) {\n planned.set(rel, readFileSync(from, 'utf8').split(token).join(options.name));\n } else {\n planned.set(rel, readFileSync(from));\n }\n }\n const facts = { name: options.name, posture: options.posture, ui: options.ui, today: options.today, nisc: options.versions['@niscorp/nisc'] ?? 'unknown' };\n planned.set('AGENTS.md', agentsDoc(facts));\n planned.set('PLAN.md', planDoc(facts));\n\n // ── what is already there ──\n const there = (rel: string): boolean => existsSync(join(options.dir, rel));\n const kept = [...planned.keys()].filter((rel) => KEEP_THEIRS.has(rel) && there(rel));\n const collisions = [...planned.keys()].filter((rel) => !KEEP_THEIRS.has(rel) && there(rel)).sort();\n if (collisions.length > 0) {\n throw new Error(\n `create-nisc: ${options.dir} already has ${collisions.length === 1 ? 'a file' : 'files'} a new app would write — nothing was written:\\n ${collisions.join('\\n ')}\\nMake the app in an empty folder, or in a subfolder of this one.`,\n );\n }\n for (const rel of kept) planned.delete(rel);\n\n // .gitignore is the one file that is added to: theirs, plus what is missing.\n const ignorePath = join(options.dir, '.gitignore');\n const theirs = existsSync(ignorePath) ? readFileSync(ignorePath, 'utf8') : undefined;\n const have = new Set((theirs ?? '').split('\\n').map((line) => line.trim()));\n const missing = gitignoreLines.filter((line) => !have.has(line));\n const extended = theirs !== undefined && missing.length > 0 ? ['.gitignore'] : [];\n if (theirs === undefined) planned.set('.gitignore', `${gitignoreLines.join('\\n')}\\n`);\n else if (missing.length > 0) planned.set('.gitignore', `${theirs.replace(/\\n*$/, '\\n')}${missing.join('\\n')}\\n`);\n\n // ── only now ──\n for (const [rel, content] of planned) {\n const to = join(options.dir, rel);\n mkdirSync(dirname(to), { recursive: true });\n writeFileSync(to, content);\n }\n return { files: [...planned.keys()].filter((rel) => !extended.includes(rel)).sort(), kept, extended };\n};\n","// The versions a new app depends on: the nisc release its template was checked\n// against — written into this package when it is built (tsup.config.ts reads\n// them off the workspace), never looked up.\n//\n// \"Whatever is newest on npm\" would be a set nobody tested the templates with.\n// This is the set the repository's CI built, typechecked and checked every\n// template against, at the commit this package was built from; create-nisc is\n// versioned in lockstep with @niscorp/nisc, so the newest create-nisc carries\n// the newest set. It also means making an app needs no network.\ndeclare const __NISC_SET__: Readonly<Record<string, string>> | undefined;\n\nexport const testedSet = (): Readonly<Record<string, string>> => {\n if (typeof __NISC_SET__ === 'undefined') throw new Error('create-nisc: this copy was not built — it carries no nisc release to pin a new app to');\n return __NISC_SET__;\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["%3Cdefine:__NISC_SET__%3E","../src/docs.ts","../src/generate.ts","../src/set.ts"],"names":[],"mappings":";;;;;AAAA,IAAA,uBAAA,GAAA,EAAC,kBAAA,EAAmB,OAAA,EAAQ,cAAA,EAAe,OAAA,EAAQ,iBAAA,EAAkB,SAAQ,eAAA,EAAgB,OAAA,EAAQ,eAAA,EAAgB,OAAA,EAAQ,eAAA,EAAgB,OAAA,EAAQ,iBAAgB,OAAA,EAAQ,gBAAA,EAAiB,OAAA,EAAQ,iBAAA,EAAkB,OAAA,EAAQ,gBAAA,EA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BAAA;AACT","file":"chunk-IUJYP2OS.js","sourcesContent":["{\"@niscorp/charter\":\"0.1.1\",\"@niscorp/cli\":\"0.2.1\",\"@niscorp/cortex\":\"0.1.1\",\"@niscorp/loom\":\"0.1.1\",\"@niscorp/moss\":\"0.2.2\",\"@niscorp/nisc\":\"0.2.2\",\"@niscorp/nova\":\"0.1.2\",\"@niscorp/prism\":\"0.1.2\",\"@niscorp/signal\":\"0.1.1\",\"@niscorp/solid\":\"0.1.0\",\"@niscorp/strata\":\"0.1.1\",\"@niscorp/tide\":\"0.1.1\",\"@niscorp/vex\":\"0.1.1\"}","import type { Posture, Ui } from './generate';\n\n// ═══════════════════════════════════════════════════════════════\n// The two documents only a new app has.\n//\n// AGENTS.md says where the rules are — the installed @niscorp/nisc carries\n// them, for the version installed — and what is particular to this app. It\n// does not restate a rule: a copy would be frozen at the version it was made\n// with, and the rules move with releases.\n//\n// PLAN.md is the interview's record (AGENTS.md, \"Before any code\"). The\n// walkthrough asks what shapes the files; everything else is written down as\n// OPEN, and an open decision point blocks the build until it is answered or\n// delegated by name.\n// ═══════════════════════════════════════════════════════════════\n\ntype Facts = { name: string; posture: Posture; ui: Ui; today: string; nisc: string };\n\nconst uiName = (ui: Ui): string => (ui === 'react' ? 'React' : 'plain DOM (nova’s DOM adapter — no framework in the page)');\n\nconst layoutOf = (facts: Facts): string =>\n facts.posture === 'moss'\n ? `src/app/ ARTIFACTS ONLY — the manifest (app.ts), the charter, the actions, the shell\nsrc/server/ the environment (runtime.ts), the boot, how a screen is drawn (document.ts)\nsrc/ui/ the kit — the only renderer code, with ${facts.ui === 'react' ? 'src/main.tsx' : 'src/main.ts'}, the terminal entry\nsrc/dev/ the checks (\\`npm run check\\`) — a new feature adds its own\nnisc.config.ts how the app boots and how a screen is drawn, for the \\`nisc\\` command\nstrata.lock.json the grammar versions the source is written at (rule 20) — moved only\n by \\`npm run strata verify\\`, never by hand`\n : `src/app/ ARTIFACTS ONLY — the actions and the shell's canvases\nsrc/boot.ts the shell factory: the artifacts plus everything environmental\nsrc/ui/ the kit and the screen — the only renderer code, with ${facts.ui === 'react' ? 'src/main.tsx' : 'src/main.ts'}, the entry\nsrc/dev/ the checks (\\`npm run check\\`) — a new feature adds its own\nnisc.config.ts how the app boots and how its screen is drawn and picked up, for the \\`nisc\\` command\nstrata.lock.json the grammar versions the source is written at (rule 20) — moved only\n by \\`npm run strata verify\\`, never by hand`;\n\nexport const agentsDoc = (facts: Facts): string => `# ${facts.name}\n\nA nisc application. **The rules it is built by are \\`node_modules/@niscorp/nisc/AGENTS.md\\`** — read all of it before changing anything here (it is there once the app's dependencies are installed). It is the rulebook for the nisc version this app has installed, and \\`STYLE_GUIDE.md\\` sits beside it. The grammars it names — a layout node, an \\`ActionDefinition\\`, a Prism config, a charter, a Vex DSL — are in each package's own \\`README.md\\` and \\`DESIGN.md\\`, under \\`node_modules/@niscorp/<name>/\\`.\n\nWhat is particular to this app:\n\n- **Its decisions are in PLAN.md.** What was answered when it was made, what was derived, and what is still open. An open decision point is asked before anything is built on it, never resolved silently.\n- **It is ${facts.posture === 'moss' ? 'behind moss' : 'its own shell'}**, drawn with ${uiName(facts.ui)}.\n- **Where things go:**\n\n\\`\\`\\`\n${layoutOf(facts)}\n\\`\\`\\`\n\n- **How it runs:** \\`npm run dev\\`, \\`npm run build\\`, \\`npm run check\\`${facts.posture === 'page' ? ', `npm run export`' : ', `npm start`'} — all of them the \\`nisc\\` command — and \\`npm run strata status\\` for the grammars.\n`;\n\nconst d1 = (posture: Posture): string =>\n posture === 'moss'\n ? `| D1 Posture | answered | **A moss server app.** The shell runs on the server, one per person; the browser is a canvas terminal over a socket. The charter is enforced there: a principal reaches only the actions and the data it is granted. |`\n : `| D1 Posture | answered | **Its own shell, in the page — no server.** The shell, its actions and its endpoints run in the browser. Consequence, said plainly: **the charter is not enforcement here.** Whatever data and policy the page has, its user has; nothing in this posture is a security boundary. An app that needs one needs a server — moss. |`;\n\nconst d2 = (posture: Posture): string =>\n posture === 'moss'\n ? `| D2 Environment | derived · **open for deployment** | Development and the checks run on PGlite, an in-memory Postgres that starts empty every boot (\\`src/server/runtime.ts\\`). Open: the Postgres a deployment hands it, and where it runs. |`\n : `| D2 Environment | **open** | The app has no data yet. Open: what serves its endpoints — in-memory fixtures, PGlite in the page (your data lives in one browser profile: no sync, no other devices, gone if site data is cleared), a real backend, or a mix. |`;\n\nconst d5 = (posture: Posture): string =>\n posture === 'moss'\n ? `| D5 Routing | derived · **partly open** | The first screen is drawn on the server and adopted by the terminal — it costs nothing while nobody can sign in. Open: once sign-in exists, the wire keeps a cookie copy of the session token so a page can be drawn for the person asking (AGENTS.md rule 12), and a page drawn for somebody is theirs alone (\\`private, no-store\\`). Open: which paths are **pages** rather than the app, and whether the app's shell state syncs to the address bar. |`\n : `| D5 Routing | derived · **partly open** | The first screen is drawn at build (\\`nisc export\\`) — one file per path, the screen as nobody in particular sees it — and the page's own shell picks it up. Open: which paths exist beyond \\`/\\`, and whether shell state syncs to the address bar. |`;\n\nexport const planDoc = (facts: Facts): string => `# PLAN — ${facts.name}\n\nMade ${facts.today} by \\`npm create nisc\\`, on nisc ${facts.nisc}. This is the record AGENTS.md's interview asks for (\"Before any code\"). The walkthrough asked what shapes the files; everything else is **open**, and an open decision blocks the build that depends on it until it is answered by the user or delegated by name. A blanket \"go\" delegates nothing.\n\n## Decision points\n\n| | Tier | |\n|---|---|---|\n${d1(facts.posture)}\n${d2(facts.posture)}\n| D3 Reads | **open** | Vex entries (\\`{ fingerprint, context }\\`, the shape an AI feature can reach later) or plain endpoints with hand-written handlers. |\n| D4 Writes | **open** | Vex mutation entries or plain endpoint handlers. Either way a write is an endpoint, never inline. |\n${d5(facts.posture)}\n\n## Answered when it was made\n\n- **What draws the screen:** ${uiName(facts.ui)}. The kit in \\`src/ui/\\` is where the look lives; a layout names components, never styles.\n\n## The dial-in — open\n\n- The entities, and how they relate.\n- Expected scale.\n- Who uses it: one person, or roles. More than one principal sketches its roles and charter now, not later.\n- AI features: now, later, never. (Later still shapes D3.)\n- Look and feel.\n- Where it is deployed.\n- What happens to the data long-term.\n\n## Order of work\n\n1. **The interview** — every open item above, answered or delegated by name. ← here\n2. **Scaffold** — done: ${facts.posture === 'moss' ? 'manifest, runtime and terminal' : 'the shell factory and the entry'}, one action rendering, and its checks (the artifacts, the grammar lock, the welcome screen).\n3. **Kit** — the primitives, against a kitchen-sink action; lock the look before any feature.\n4. **Data layer** — per D2/D3: schema, seed, entries; one read end to end.\n5. **Actions** — domain by domain: list → detail → form.\n6. **Writes** — per D4; one round trip: create → announce → re-read.\n7. **Checks and polish** — a check per feature in \\`src/dev/\\`; empty states and transitions last.\n`;\n\n// What a nisc app keeps out of git. Lines, so an existing .gitignore can be\n// given only the ones it lacks.\nexport const gitignoreLines = ['node_modules/', 'dist/', 'out/', '.strata/', '*.tsbuildinfo', '.env', '.env.*', '!.env.example'];\n","import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';\nimport { dirname, extname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { agentsDoc, gitignoreLines, planDoc } from './docs';\n\n// ═══════════════════════════════════════════════════════════════\n// A new app, from a template — and nothing in it that the walkthrough did not\n// decide or PLAN.md does not record.\n//\n// The templates (../templates) are real apps: members of the nisc repository's\n// workspace, typechecked, built and checked by its CI like any other. What a\n// new app gets is one of them, copied, with three things changed: its name, the\n// `workspace:^` versions turned into the released set the template was checked\n// against, and the two documents that only exist for a new app — PLAN.md (the\n// decisions) and AGENTS.md (where the rules are).\n//\n// It never overwrites. A folder that already holds something is fine — a fresh\n// repository's .git, a LICENSE — as long as nothing it would write is there\n// already; if anything is, it writes nothing at all and says which files.\n// ═══════════════════════════════════════════════════════════════\n\n// Where the shell runs (D1): on a server (moss), or in the page.\nexport type Posture = 'moss' | 'page';\n// What draws the screen: React, or plain DOM.\nexport type Ui = 'react' | 'dom';\n\nexport type CreateOptions = {\n // where the app goes\n dir: string;\n // its package name\n name: string;\n posture: Posture;\n ui: Ui;\n // the @niscorp versions to depend on: package name → version\n versions: Readonly<Record<string, string>>;\n // the day it was made (PLAN.md), as YYYY-MM-DD\n today: string;\n};\n\nexport type Created = {\n // every file written, relative to the app\n files: string[];\n // files that were already there and were left as they were\n kept: string[];\n // files that were already there and were added to\n extended: string[];\n};\n\nexport const TEMPLATES = fileURLToPath(new URL('../templates', import.meta.url));\n\nexport const templateOf = (posture: Posture, ui: Ui): string => `${posture === 'moss' ? 'moss' : 'shell'}-${ui}`;\n\n// The token each template is named by — its package name, and wherever the\n// name shows (the page title, the welcome screen, its README).\nconst tokenOf = (template: string): string => `nisc-template-${template}`;\n\nconst SKIP = new Set(['node_modules', 'dist', 'out', '.turbo']);\nconst TEXT = new Set(['.ts', '.tsx', '.json', '.html', '.css', '.md']);\n// A file of the app's own that an existing folder may already have, and keeps.\nconst KEEP_THEIRS = new Set(['README.md']);\n\n// npm's rule for a package name, as the app's directory will mostly be named.\nexport const validName = (name: string): boolean => /^[a-z0-9][a-z0-9._-]*$/.test(name) && name.length <= 214;\n\nconst filesIn = (dir: string, base = ''): string[] =>\n readdirSync(join(dir, base), { withFileTypes: true }).flatMap((entry) => {\n if (SKIP.has(entry.name)) return [];\n const rel = base === '' ? entry.name : `${base}/${entry.name}`;\n return entry.isDirectory() ? filesIn(dir, rel) : [rel];\n });\n\nconst isRecord = (value: unknown): value is Record<string, unknown> => value !== null && typeof value === 'object' && !Array.isArray(value);\n\n// `workspace:^` → `^<the released version>`, for every dependency the template\n// takes from the workspace. A version the set does not have is a broken set,\n// not something to guess.\nconst pinned = (deps: unknown, versions: Readonly<Record<string, string>>): Record<string, string> => {\n if (!isRecord(deps)) return {};\n return Object.fromEntries(\n Object.entries(deps).map(([name, spec]): [string, string] => {\n if (typeof spec !== 'string') throw new Error(`create-nisc: ${name} has no version in the template`);\n if (!spec.startsWith('workspace:')) return [name, spec];\n const version = versions[name];\n if (version === undefined) throw new Error(`create-nisc: the nisc release has no ${name} — the set it was given is incomplete`);\n return [name, `^${version}`];\n }),\n );\n};\n\nexport const generate = (options: CreateOptions): Created => {\n const template = templateOf(options.posture, options.ui);\n const source = join(TEMPLATES, template);\n if (!existsSync(source)) throw new Error(`create-nisc: no template \"${template}\"`);\n if (!validName(options.name)) throw new Error(`create-nisc: \"${options.name}\" is not a package name (lowercase letters, digits, - . _)`);\n if (existsSync(options.dir) && !statSync(options.dir).isDirectory()) throw new Error(`create-nisc: ${options.dir} is a file`);\n\n // ── everything it would write, worked out before anything is written ──\n const token = tokenOf(template);\n const planned = new Map<string, string | Buffer>();\n for (const rel of filesIn(source)) {\n const from = join(source, rel);\n if (rel === 'package.json') {\n const manifest: unknown = JSON.parse(readFileSync(from, 'utf8'));\n if (!isRecord(manifest)) throw new Error(`create-nisc: ${template}/package.json is not an object`);\n const app = {\n ...manifest,\n name: options.name,\n dependencies: pinned(manifest['dependencies'], options.versions),\n devDependencies: pinned(manifest['devDependencies'], options.versions),\n };\n planned.set(rel, `${JSON.stringify(app, null, 2)}\\n`);\n } else if (TEXT.has(extname(rel))) {\n planned.set(rel, readFileSync(from, 'utf8').split(token).join(options.name));\n } else {\n planned.set(rel, readFileSync(from));\n }\n }\n const facts = { name: options.name, posture: options.posture, ui: options.ui, today: options.today, nisc: options.versions['@niscorp/nisc'] ?? 'unknown' };\n planned.set('AGENTS.md', agentsDoc(facts));\n planned.set('PLAN.md', planDoc(facts));\n\n // ── what is already there ──\n const there = (rel: string): boolean => existsSync(join(options.dir, rel));\n const kept = [...planned.keys()].filter((rel) => KEEP_THEIRS.has(rel) && there(rel));\n const collisions = [...planned.keys()].filter((rel) => !KEEP_THEIRS.has(rel) && there(rel)).sort();\n if (collisions.length > 0) {\n throw new Error(\n `create-nisc: ${options.dir} already has ${collisions.length === 1 ? 'a file' : 'files'} a new app would write — nothing was written:\\n ${collisions.join('\\n ')}\\nMake the app in an empty folder, or in a subfolder of this one.`,\n );\n }\n for (const rel of kept) planned.delete(rel);\n\n // .gitignore is the one file that is added to: theirs, plus what is missing.\n const ignorePath = join(options.dir, '.gitignore');\n const theirs = existsSync(ignorePath) ? readFileSync(ignorePath, 'utf8') : undefined;\n const have = new Set((theirs ?? '').split('\\n').map((line) => line.trim()));\n const missing = gitignoreLines.filter((line) => !have.has(line));\n const extended = theirs !== undefined && missing.length > 0 ? ['.gitignore'] : [];\n if (theirs === undefined) planned.set('.gitignore', `${gitignoreLines.join('\\n')}\\n`);\n else if (missing.length > 0) planned.set('.gitignore', `${theirs.replace(/\\n*$/, '\\n')}${missing.join('\\n')}\\n`);\n\n // ── only now ──\n for (const [rel, content] of planned) {\n const to = join(options.dir, rel);\n mkdirSync(dirname(to), { recursive: true });\n writeFileSync(to, content);\n }\n return { files: [...planned.keys()].filter((rel) => !extended.includes(rel)).sort(), kept, extended };\n};\n","// The versions a new app depends on: the nisc release its template was checked\n// against — written into this package when it is built (tsup.config.ts reads\n// them off the workspace), never looked up.\n//\n// \"Whatever is newest on npm\" would be a set nobody tested the templates with.\n// This is the set the repository's CI built, typechecked and checked every\n// template against, at the commit this package was built from; create-nisc is\n// versioned in lockstep with @niscorp/nisc, so the newest create-nisc carries\n// the newest set. It also means making an app needs no network.\ndeclare const __NISC_SET__: Readonly<Record<string, string>> | undefined;\n\nexport const testedSet = (): Readonly<Record<string, string>> => {\n if (typeof __NISC_SET__ === 'undefined') throw new Error('create-nisc: this copy was not built — it carries no nisc release to pin a new app to');\n return __NISC_SET__;\n};\n"]}
|
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { validName, generate, testedSet } from './chunk-
|
|
1
|
+
import { validName, generate, testedSet } from './chunk-IUJYP2OS.js';
|
|
2
2
|
import { existsSync, readdirSync } from 'fs';
|
|
3
3
|
import { basename, resolve, relative } from 'path';
|
|
4
4
|
import { intro, text, confirm, cancel, select, note, outro, isCancel } from '@clack/prompts';
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-nisc",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "npm create nisc — a new nisc application: a few questions, then an app with the right structure, its rulebook, and a first screen that works.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"!templates/*/node_modules",
|
|
29
29
|
"!templates/*/dist",
|
|
30
30
|
"!templates/*/out",
|
|
31
|
+
"!templates/*/.turbo",
|
|
31
32
|
"*.md",
|
|
32
33
|
"LICENSE"
|
|
33
34
|
],
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
"vitest": "^4.1.2"
|
|
48
49
|
},
|
|
49
50
|
"scripts": {
|
|
50
|
-
"build": "tsup",
|
|
51
|
+
"build": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsup",
|
|
51
52
|
"test": "vitest run",
|
|
52
53
|
"typecheck": "tsc --noEmit -p tsconfig.test.json"
|
|
53
54
|
}
|
package/dist/chunk-TEYNNEJA.js
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { existsSync, statSync, readdirSync, mkdirSync, readFileSync, writeFileSync, cpSync } from 'fs';
|
|
2
|
-
import { join, extname } from 'path';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
|
|
5
|
-
// src/generate.ts
|
|
6
|
-
|
|
7
|
-
// src/docs.ts
|
|
8
|
-
var uiName = (ui) => ui === "react" ? "React" : "plain DOM (nova\u2019s DOM adapter \u2014 no framework in the page)";
|
|
9
|
-
var layoutOf = (facts) => facts.posture === "moss" ? `src/app/ ARTIFACTS ONLY \u2014 the manifest (app.ts), the charter, the actions, the shell
|
|
10
|
-
src/server/ the environment (runtime.ts), the boot, how a screen is drawn (document.ts)
|
|
11
|
-
src/ui/ the kit \u2014 the only renderer code, with ${facts.ui === "react" ? "src/main.tsx" : "src/main.ts"}, the terminal entry
|
|
12
|
-
src/dev/ the checks (\`npm run check\`)
|
|
13
|
-
nisc.config.ts how the app boots and how a screen is drawn, for the \`nisc\` command` : `src/app/ ARTIFACTS ONLY \u2014 the actions and the shell's canvases
|
|
14
|
-
src/boot.ts the shell factory: the artifacts plus everything environmental
|
|
15
|
-
src/ui/ the kit and the screen \u2014 the only renderer code, with ${facts.ui === "react" ? "src/main.tsx" : "src/main.ts"}, the entry
|
|
16
|
-
src/dev/ the checks (\`npm run check\`)
|
|
17
|
-
nisc.config.ts how the app boots and how its screen is drawn and picked up, for the \`nisc\` command`;
|
|
18
|
-
var agentsDoc = (facts) => `# ${facts.name}
|
|
19
|
-
|
|
20
|
-
A nisc application. **The rules it is built by are \`node_modules/@niscorp/nisc/AGENTS.md\`** \u2014 read all of it before changing anything here (install first: \`npm install\`). It is the rulebook for the nisc version this app has installed, and \`STYLE_GUIDE.md\` sits beside it. The grammars it names \u2014 a layout node, an \`ActionDefinition\`, a Prism config, a charter, a Vex DSL \u2014 are in each package's own \`README.md\` and \`DESIGN.md\`, under \`node_modules/@niscorp/<name>/\`.
|
|
21
|
-
|
|
22
|
-
What is particular to this app:
|
|
23
|
-
|
|
24
|
-
- **Its decisions are in PLAN.md.** What was answered when it was made, what was derived, and what is still open. An open decision point is asked before anything is built on it, never resolved silently.
|
|
25
|
-
- **It is ${facts.posture === "moss" ? "behind moss" : "its own shell"}**, drawn with ${uiName(facts.ui)}.
|
|
26
|
-
- **Where things go:**
|
|
27
|
-
|
|
28
|
-
\`\`\`
|
|
29
|
-
${layoutOf(facts)}
|
|
30
|
-
\`\`\`
|
|
31
|
-
|
|
32
|
-
- **How it runs:** \`npm run dev\`, \`npm run build\`, \`npm run check\`${facts.posture === "page" ? ", `npm run export`" : ", `npm start`"} \u2014 all of them the \`nisc\` command.
|
|
33
|
-
`;
|
|
34
|
-
var d1 = (posture) => posture === "moss" ? `| D1 Posture | answered | **A moss server app.** The shell runs on the server, one per person; the browser is a canvas terminal over a socket. The charter is enforced there, and data never leaves the server except as the screens a principal is granted. |` : `| D1 Posture | answered | **Its own shell, in the page \u2014 no server.** The shell, its actions and its endpoints run in the browser. Consequence, said plainly: **the charter is not enforcement here.** Whatever data and policy the page has, its user has; nothing in this posture is a security boundary. An app that needs one needs a server \u2014 moss. |`;
|
|
35
|
-
var d2 = (posture) => posture === "moss" ? `| D2 Environment | derived \xB7 **open for deployment** | Development and the checks run on PGlite, an in-memory Postgres that starts empty every boot (\`src/server/runtime.ts\`). Open: the Postgres a deployment hands it, and where it runs. |` : `| D2 Environment | **open** | The app has no data yet. Open: what serves its endpoints \u2014 in-memory fixtures, PGlite in the page (your data lives in one browser profile: no sync, no other devices, gone if site data is cleared), a real backend, or a mix. |`;
|
|
36
|
-
var d5 = (posture) => posture === "moss" ? `| D5 Routing | derived \xB7 **partly open** | The first screen is drawn on the server and adopted by the terminal \u2014 it costs nothing while nobody can sign in. Open: once sign-in exists, the wire keeps a cookie copy of the session token so a page can be drawn for the person asking (AGENTS.md rule 12), and a page drawn for somebody is theirs alone (\`private, no-store\`). Open: which paths are **pages** rather than the app, and whether the app's shell state syncs to the address bar. |` : `| D5 Routing | derived \xB7 **partly open** | The first screen is drawn at build (\`nisc export\`) \u2014 one file per path, the screen as nobody in particular sees it \u2014 and the page's own shell picks it up. Open: which paths exist beyond \`/\`, and whether shell state syncs to the address bar. |`;
|
|
37
|
-
var planDoc = (facts) => `# PLAN \u2014 ${facts.name}
|
|
38
|
-
|
|
39
|
-
Made ${facts.today} by \`npm create nisc\`, on nisc ${facts.nisc}. This is the record AGENTS.md's interview asks for ("Before any code"). The walkthrough asked what shapes the files; everything else is **open**, and an open decision blocks the build that depends on it until it is answered by the user or delegated by name. A blanket "go" delegates nothing.
|
|
40
|
-
|
|
41
|
-
## Decision points
|
|
42
|
-
|
|
43
|
-
| | Tier | |
|
|
44
|
-
|---|---|---|
|
|
45
|
-
${d1(facts.posture)}
|
|
46
|
-
${d2(facts.posture)}
|
|
47
|
-
| D3 Reads | **open** | Vex entries (\`{ fingerprint, context }\`, the shape an AI feature can reach later) or plain endpoints with hand-written handlers. |
|
|
48
|
-
| D4 Writes | **open** | Vex mutation entries or plain endpoint handlers. Either way a write is an endpoint, never inline. |
|
|
49
|
-
${d5(facts.posture)}
|
|
50
|
-
|
|
51
|
-
## Answered when it was made
|
|
52
|
-
|
|
53
|
-
- **What draws the screen:** ${uiName(facts.ui)}. The kit in \`src/ui/\` is where the look lives; a layout names components, never styles.
|
|
54
|
-
|
|
55
|
-
## The dial-in \u2014 open
|
|
56
|
-
|
|
57
|
-
- The entities, and how they relate.
|
|
58
|
-
- Expected scale.
|
|
59
|
-
- Who uses it: one person, or roles. More than one principal sketches its roles and charter now, not later.
|
|
60
|
-
- AI features: now, later, never. (Later still shapes D3.)
|
|
61
|
-
- Look and feel.
|
|
62
|
-
- Where it is deployed.
|
|
63
|
-
- What happens to the data long-term.
|
|
64
|
-
|
|
65
|
-
## Order of work
|
|
66
|
-
|
|
67
|
-
1. **The interview** \u2014 every open item above, answered or delegated by name. \u2190 here
|
|
68
|
-
2. **Scaffold** \u2014 done: ${facts.posture === "moss" ? "manifest, runtime and terminal" : "the shell factory and the entry"}, one action rendering, a check.
|
|
69
|
-
3. **Kit** \u2014 the primitives, against a kitchen-sink action; lock the look before any feature.
|
|
70
|
-
4. **Data layer** \u2014 per D2/D3: schema, seed, entries; one read end to end.
|
|
71
|
-
5. **Actions** \u2014 domain by domain: list \u2192 detail \u2192 form.
|
|
72
|
-
6. **Writes** \u2014 per D4; one round trip: create \u2192 announce \u2192 re-read.
|
|
73
|
-
7. **Checks and polish** \u2014 a check per feature in \`src/dev/\`; empty states and transitions last.
|
|
74
|
-
`;
|
|
75
|
-
var gitignore = `node_modules/
|
|
76
|
-
dist/
|
|
77
|
-
out/
|
|
78
|
-
*.tsbuildinfo
|
|
79
|
-
.env
|
|
80
|
-
.env.*
|
|
81
|
-
!.env.example
|
|
82
|
-
`;
|
|
83
|
-
|
|
84
|
-
// src/generate.ts
|
|
85
|
-
var TEMPLATES = fileURLToPath(new URL("../templates", import.meta.url));
|
|
86
|
-
var templateOf = (posture, ui) => `${posture === "moss" ? "moss" : "shell"}-${ui}`;
|
|
87
|
-
var tokenOf = (template) => `nisc-template-${template}`;
|
|
88
|
-
var SKIP = /* @__PURE__ */ new Set(["node_modules", "dist", "out", ".turbo"]);
|
|
89
|
-
var TEXT = /* @__PURE__ */ new Set([".ts", ".tsx", ".json", ".html", ".css", ".md"]);
|
|
90
|
-
var validName = (name) => /^[a-z0-9][a-z0-9._-]*$/.test(name) && name.length <= 214;
|
|
91
|
-
var filesIn = (dir, base = "") => readdirSync(join(dir, base), { withFileTypes: true }).flatMap((entry) => {
|
|
92
|
-
if (SKIP.has(entry.name)) return [];
|
|
93
|
-
const rel = base === "" ? entry.name : `${base}/${entry.name}`;
|
|
94
|
-
return entry.isDirectory() ? filesIn(dir, rel) : [rel];
|
|
95
|
-
});
|
|
96
|
-
var isRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
97
|
-
var pinned = (deps, versions) => {
|
|
98
|
-
if (!isRecord(deps)) return {};
|
|
99
|
-
return Object.fromEntries(
|
|
100
|
-
Object.entries(deps).map(([name, spec]) => {
|
|
101
|
-
if (typeof spec !== "string") throw new Error(`create-nisc: ${name} has no version in the template`);
|
|
102
|
-
if (!spec.startsWith("workspace:")) return [name, spec];
|
|
103
|
-
const version = versions[name];
|
|
104
|
-
if (version === void 0) throw new Error(`create-nisc: the nisc release has no ${name} \u2014 the set it was given is incomplete`);
|
|
105
|
-
return [name, `^${version}`];
|
|
106
|
-
})
|
|
107
|
-
);
|
|
108
|
-
};
|
|
109
|
-
var generate = (options) => {
|
|
110
|
-
const template = templateOf(options.posture, options.ui);
|
|
111
|
-
const source = join(TEMPLATES, template);
|
|
112
|
-
if (!existsSync(source)) throw new Error(`create-nisc: no template "${template}"`);
|
|
113
|
-
if (!validName(options.name)) throw new Error(`create-nisc: "${options.name}" is not a package name (lowercase letters, digits, - . _)`);
|
|
114
|
-
if (existsSync(options.dir) && (!statSync(options.dir).isDirectory() || readdirSync(options.dir).length > 0)) {
|
|
115
|
-
throw new Error(`create-nisc: ${options.dir} already exists and is not empty`);
|
|
116
|
-
}
|
|
117
|
-
mkdirSync(options.dir, { recursive: true });
|
|
118
|
-
const token = tokenOf(template);
|
|
119
|
-
const written = [];
|
|
120
|
-
for (const rel of filesIn(source)) {
|
|
121
|
-
const from = join(source, rel);
|
|
122
|
-
const to = join(options.dir, rel);
|
|
123
|
-
mkdirSync(join(to, ".."), { recursive: true });
|
|
124
|
-
if (rel === "package.json") {
|
|
125
|
-
const manifest = JSON.parse(readFileSync(from, "utf8"));
|
|
126
|
-
if (!isRecord(manifest)) throw new Error(`create-nisc: ${template}/package.json is not an object`);
|
|
127
|
-
const app = {
|
|
128
|
-
...manifest,
|
|
129
|
-
name: options.name,
|
|
130
|
-
dependencies: pinned(manifest["dependencies"], options.versions),
|
|
131
|
-
devDependencies: pinned(manifest["devDependencies"], options.versions)
|
|
132
|
-
};
|
|
133
|
-
writeFileSync(to, `${JSON.stringify(app, null, 2)}
|
|
134
|
-
`);
|
|
135
|
-
} else if (TEXT.has(extname(rel))) {
|
|
136
|
-
writeFileSync(to, readFileSync(from, "utf8").split(token).join(options.name));
|
|
137
|
-
} else {
|
|
138
|
-
cpSync(from, to);
|
|
139
|
-
}
|
|
140
|
-
written.push(rel);
|
|
141
|
-
}
|
|
142
|
-
const facts = { name: options.name, posture: options.posture, ui: options.ui, today: options.today, nisc: options.versions["@niscorp/nisc"] ?? "unknown" };
|
|
143
|
-
writeFileSync(join(options.dir, "AGENTS.md"), agentsDoc(facts));
|
|
144
|
-
writeFileSync(join(options.dir, "PLAN.md"), planDoc(facts));
|
|
145
|
-
writeFileSync(join(options.dir, ".gitignore"), gitignore);
|
|
146
|
-
return [...written, "AGENTS.md", "PLAN.md", ".gitignore"].sort();
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
// src/versions.ts
|
|
150
|
-
var isRecord2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
151
|
-
var releasedSet = async (registry) => {
|
|
152
|
-
const url = `${registry.replace(/\/$/, "")}/@niscorp%2fnisc/latest`;
|
|
153
|
-
let response;
|
|
154
|
-
try {
|
|
155
|
-
response = await fetch(url, { headers: { accept: "application/json" } });
|
|
156
|
-
} catch (error) {
|
|
157
|
-
throw new Error(`create-nisc: could not reach ${registry} to ask which nisc release is current (${error instanceof Error ? error.message : String(error)})`);
|
|
158
|
-
}
|
|
159
|
-
if (!response.ok) throw new Error(`create-nisc: ${url} answered ${response.status}`);
|
|
160
|
-
const manifest = await response.json();
|
|
161
|
-
if (!isRecord2(manifest) || typeof manifest["version"] !== "string" || !isRecord2(manifest["dependencies"])) {
|
|
162
|
-
throw new Error(`create-nisc: ${url} is not a package manifest`);
|
|
163
|
-
}
|
|
164
|
-
const set = { "@niscorp/nisc": manifest["version"] };
|
|
165
|
-
for (const [name, version] of Object.entries(manifest["dependencies"])) {
|
|
166
|
-
if (typeof version === "string") set[name] = version.replace(/^[\^~=]/, "");
|
|
167
|
-
}
|
|
168
|
-
return set;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
export { TEMPLATES, generate, releasedSet, templateOf, validName };
|
|
172
|
-
//# sourceMappingURL=chunk-TEYNNEJA.js.map
|
|
173
|
-
//# sourceMappingURL=chunk-TEYNNEJA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/docs.ts","../src/generate.ts","../src/versions.ts"],"names":["isRecord"],"mappings":";;;;;;;AAkBA,IAAM,MAAA,GAAS,CAAC,EAAA,KAAoB,EAAA,KAAO,UAAU,OAAA,GAAU,qEAAA;AAE/D,IAAM,QAAA,GAAW,CAAC,KAAA,KAChB,KAAA,CAAM,YAAY,MAAA,GACd,CAAA;AAAA;AAAA,4DAAA,EAEmD,KAAA,CAAM,EAAA,KAAO,OAAA,GAAU,cAAA,GAAiB,aAAa,CAAA;AAAA;AAAA,qFAAA,CAAA,GAGxG,CAAA;AAAA;AAAA,2EA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AgB,GAAG,CAAA,0BAAA,CAA4B,CAAA;AAAA,EACjE;AACA,EAAA,MAAM,GAAA,GAA8B,EAAE,eAAA,EAAiB,QAAA,CAAS,SAAS,CAAA,EAAE;AAC3E,EAAA,KAAA,MAAW,CAAC,MAAM,OAAO,CAAA,IAAK,OAAO,OAAA,CAAQ,QAAA,CAAS,cAAc,CAAC,CAAA,EAAG;AACtE,IAAA,IAAI,OAAO,YAAY,QAAA,EAAU,GAAA,CAAI,IAAI,CAAA,GAAI,OAAA,CAAQ,OAAA,CAAQ,SAAA,EAAW,EAAE,CAAA;AAAA,EAC5E;AACA,EAAA,OAAO,GAAA;AACT","file":"chunk-TEYNNEJA.js","sourcesContent":["import type { Posture, Ui } from './generate';\n\n// ═══════════════════════════════════════════════════════════════\n// The two documents only a new app has.\n//\n// AGENTS.md says where the rules are — the installed @niscorp/nisc carries\n// them, for the version installed — and what is particular to this app. It\n// does not restate a rule: a copy would be frozen at the version it was made\n// with, and the rules move with releases.\n//\n// PLAN.md is the interview's record (AGENTS.md, \"Before any code\"). The\n// walkthrough asks what shapes the files; everything else is written down as\n// OPEN, and an open decision point blocks the build until it is answered or\n// delegated by name.\n// ═══════════════════════════════════════════════════════════════\n\ntype Facts = { name: string; posture: Posture; ui: Ui; today: string; nisc: string };\n\nconst uiName = (ui: Ui): string => (ui === 'react' ? 'React' : 'plain DOM (nova’s DOM adapter — no framework in the page)');\n\nconst layoutOf = (facts: Facts): string =>\n facts.posture === 'moss'\n ? `src/app/ ARTIFACTS ONLY — the manifest (app.ts), the charter, the actions, the shell\nsrc/server/ the environment (runtime.ts), the boot, how a screen is drawn (document.ts)\nsrc/ui/ the kit — the only renderer code, with ${facts.ui === 'react' ? 'src/main.tsx' : 'src/main.ts'}, the terminal entry\nsrc/dev/ the checks (\\`npm run check\\`)\nnisc.config.ts how the app boots and how a screen is drawn, for the \\`nisc\\` command`\n : `src/app/ ARTIFACTS ONLY — the actions and the shell's canvases\nsrc/boot.ts the shell factory: the artifacts plus everything environmental\nsrc/ui/ the kit and the screen — the only renderer code, with ${facts.ui === 'react' ? 'src/main.tsx' : 'src/main.ts'}, the entry\nsrc/dev/ the checks (\\`npm run check\\`)\nnisc.config.ts how the app boots and how its screen is drawn and picked up, for the \\`nisc\\` command`;\n\nexport const agentsDoc = (facts: Facts): string => `# ${facts.name}\n\nA nisc application. **The rules it is built by are \\`node_modules/@niscorp/nisc/AGENTS.md\\`** — read all of it before changing anything here (install first: \\`npm install\\`). It is the rulebook for the nisc version this app has installed, and \\`STYLE_GUIDE.md\\` sits beside it. The grammars it names — a layout node, an \\`ActionDefinition\\`, a Prism config, a charter, a Vex DSL — are in each package's own \\`README.md\\` and \\`DESIGN.md\\`, under \\`node_modules/@niscorp/<name>/\\`.\n\nWhat is particular to this app:\n\n- **Its decisions are in PLAN.md.** What was answered when it was made, what was derived, and what is still open. An open decision point is asked before anything is built on it, never resolved silently.\n- **It is ${facts.posture === 'moss' ? 'behind moss' : 'its own shell'}**, drawn with ${uiName(facts.ui)}.\n- **Where things go:**\n\n\\`\\`\\`\n${layoutOf(facts)}\n\\`\\`\\`\n\n- **How it runs:** \\`npm run dev\\`, \\`npm run build\\`, \\`npm run check\\`${facts.posture === 'page' ? ', `npm run export`' : ', `npm start`'} — all of them the \\`nisc\\` command.\n`;\n\nconst d1 = (posture: Posture): string =>\n posture === 'moss'\n ? `| D1 Posture | answered | **A moss server app.** The shell runs on the server, one per person; the browser is a canvas terminal over a socket. The charter is enforced there, and data never leaves the server except as the screens a principal is granted. |`\n : `| D1 Posture | answered | **Its own shell, in the page — no server.** The shell, its actions and its endpoints run in the browser. Consequence, said plainly: **the charter is not enforcement here.** Whatever data and policy the page has, its user has; nothing in this posture is a security boundary. An app that needs one needs a server — moss. |`;\n\nconst d2 = (posture: Posture): string =>\n posture === 'moss'\n ? `| D2 Environment | derived · **open for deployment** | Development and the checks run on PGlite, an in-memory Postgres that starts empty every boot (\\`src/server/runtime.ts\\`). Open: the Postgres a deployment hands it, and where it runs. |`\n : `| D2 Environment | **open** | The app has no data yet. Open: what serves its endpoints — in-memory fixtures, PGlite in the page (your data lives in one browser profile: no sync, no other devices, gone if site data is cleared), a real backend, or a mix. |`;\n\nconst d5 = (posture: Posture): string =>\n posture === 'moss'\n ? `| D5 Routing | derived · **partly open** | The first screen is drawn on the server and adopted by the terminal — it costs nothing while nobody can sign in. Open: once sign-in exists, the wire keeps a cookie copy of the session token so a page can be drawn for the person asking (AGENTS.md rule 12), and a page drawn for somebody is theirs alone (\\`private, no-store\\`). Open: which paths are **pages** rather than the app, and whether the app's shell state syncs to the address bar. |`\n : `| D5 Routing | derived · **partly open** | The first screen is drawn at build (\\`nisc export\\`) — one file per path, the screen as nobody in particular sees it — and the page's own shell picks it up. Open: which paths exist beyond \\`/\\`, and whether shell state syncs to the address bar. |`;\n\nexport const planDoc = (facts: Facts): string => `# PLAN — ${facts.name}\n\nMade ${facts.today} by \\`npm create nisc\\`, on nisc ${facts.nisc}. This is the record AGENTS.md's interview asks for (\"Before any code\"). The walkthrough asked what shapes the files; everything else is **open**, and an open decision blocks the build that depends on it until it is answered by the user or delegated by name. A blanket \"go\" delegates nothing.\n\n## Decision points\n\n| | Tier | |\n|---|---|---|\n${d1(facts.posture)}\n${d2(facts.posture)}\n| D3 Reads | **open** | Vex entries (\\`{ fingerprint, context }\\`, the shape an AI feature can reach later) or plain endpoints with hand-written handlers. |\n| D4 Writes | **open** | Vex mutation entries or plain endpoint handlers. Either way a write is an endpoint, never inline. |\n${d5(facts.posture)}\n\n## Answered when it was made\n\n- **What draws the screen:** ${uiName(facts.ui)}. The kit in \\`src/ui/\\` is where the look lives; a layout names components, never styles.\n\n## The dial-in — open\n\n- The entities, and how they relate.\n- Expected scale.\n- Who uses it: one person, or roles. More than one principal sketches its roles and charter now, not later.\n- AI features: now, later, never. (Later still shapes D3.)\n- Look and feel.\n- Where it is deployed.\n- What happens to the data long-term.\n\n## Order of work\n\n1. **The interview** — every open item above, answered or delegated by name. ← here\n2. **Scaffold** — done: ${facts.posture === 'moss' ? 'manifest, runtime and terminal' : 'the shell factory and the entry'}, one action rendering, a check.\n3. **Kit** — the primitives, against a kitchen-sink action; lock the look before any feature.\n4. **Data layer** — per D2/D3: schema, seed, entries; one read end to end.\n5. **Actions** — domain by domain: list → detail → form.\n6. **Writes** — per D4; one round trip: create → announce → re-read.\n7. **Checks and polish** — a check per feature in \\`src/dev/\\`; empty states and transitions last.\n`;\n\nexport const gitignore = `node_modules/\ndist/\nout/\n*.tsbuildinfo\n.env\n.env.*\n!.env.example\n`;\n","import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';\nimport { extname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { agentsDoc, gitignore, planDoc } from './docs';\n\n// ═══════════════════════════════════════════════════════════════\n// A new app, from a template — and nothing in it that the walkthrough did not\n// decide or PLAN.md does not record.\n//\n// The templates (../templates) are real apps: members of the nisc repository's\n// workspace, typechecked, built and checked by its CI like any other. What a\n// new app gets is one of them, copied, with three things changed: its name, the\n// `workspace:^` versions turned into the published set, and the two documents\n// that only exist for a new app — PLAN.md (the decisions) and AGENTS.md (where\n// the rules are).\n// ═══════════════════════════════════════════════════════════════\n\n// Where the shell runs (D1): on a server (moss), or in the page.\nexport type Posture = 'moss' | 'page';\n// What draws the screen: React, or plain DOM.\nexport type Ui = 'react' | 'dom';\n\nexport type CreateOptions = {\n // where the app goes — must not exist, or be empty\n dir: string;\n // its package name\n name: string;\n posture: Posture;\n ui: Ui;\n // the @niscorp versions to depend on: package name → version\n versions: Readonly<Record<string, string>>;\n // the day it was made (PLAN.md), as YYYY-MM-DD\n today: string;\n};\n\nexport const TEMPLATES = fileURLToPath(new URL('../templates', import.meta.url));\n\nexport const templateOf = (posture: Posture, ui: Ui): string => `${posture === 'moss' ? 'moss' : 'shell'}-${ui}`;\n\n// The token each template is named by — its package name, and wherever the\n// name shows (the page title, the welcome screen).\nconst tokenOf = (template: string): string => `nisc-template-${template}`;\n\nconst SKIP = new Set(['node_modules', 'dist', 'out', '.turbo']);\nconst TEXT = new Set(['.ts', '.tsx', '.json', '.html', '.css', '.md']);\n\n// npm's rule for a package name, as the app's directory will mostly be named.\nexport const validName = (name: string): boolean => /^[a-z0-9][a-z0-9._-]*$/.test(name) && name.length <= 214;\n\nconst filesIn = (dir: string, base = ''): string[] =>\n readdirSync(join(dir, base), { withFileTypes: true }).flatMap((entry) => {\n if (SKIP.has(entry.name)) return [];\n const rel = base === '' ? entry.name : `${base}/${entry.name}`;\n return entry.isDirectory() ? filesIn(dir, rel) : [rel];\n });\n\nconst isRecord = (value: unknown): value is Record<string, unknown> => value !== null && typeof value === 'object' && !Array.isArray(value);\n\n// `workspace:^` → `^<the published version>`, for every dependency the\n// template takes from the workspace. A version the set does not have is a\n// broken set, not something to guess.\nconst pinned = (deps: unknown, versions: Readonly<Record<string, string>>): Record<string, string> => {\n if (!isRecord(deps)) return {};\n return Object.fromEntries(\n Object.entries(deps).map(([name, spec]): [string, string] => {\n if (typeof spec !== 'string') throw new Error(`create-nisc: ${name} has no version in the template`);\n if (!spec.startsWith('workspace:')) return [name, spec];\n const version = versions[name];\n if (version === undefined) throw new Error(`create-nisc: the nisc release has no ${name} — the set it was given is incomplete`);\n return [name, `^${version}`];\n }),\n );\n};\n\nexport const generate = (options: CreateOptions): string[] => {\n const template = templateOf(options.posture, options.ui);\n const source = join(TEMPLATES, template);\n if (!existsSync(source)) throw new Error(`create-nisc: no template \"${template}\"`);\n if (!validName(options.name)) throw new Error(`create-nisc: \"${options.name}\" is not a package name (lowercase letters, digits, - . _)`);\n if (existsSync(options.dir) && (!statSync(options.dir).isDirectory() || readdirSync(options.dir).length > 0)) {\n throw new Error(`create-nisc: ${options.dir} already exists and is not empty`);\n }\n mkdirSync(options.dir, { recursive: true });\n\n const token = tokenOf(template);\n const written: string[] = [];\n for (const rel of filesIn(source)) {\n const from = join(source, rel);\n const to = join(options.dir, rel);\n mkdirSync(join(to, '..'), { recursive: true });\n if (rel === 'package.json') {\n const manifest: unknown = JSON.parse(readFileSync(from, 'utf8'));\n if (!isRecord(manifest)) throw new Error(`create-nisc: ${template}/package.json is not an object`);\n const app = {\n ...manifest,\n name: options.name,\n dependencies: pinned(manifest['dependencies'], options.versions),\n devDependencies: pinned(manifest['devDependencies'], options.versions),\n };\n writeFileSync(to, `${JSON.stringify(app, null, 2)}\\n`);\n } else if (TEXT.has(extname(rel))) {\n writeFileSync(to, readFileSync(from, 'utf8').split(token).join(options.name));\n } else {\n cpSync(from, to);\n }\n written.push(rel);\n }\n\n const facts = { name: options.name, posture: options.posture, ui: options.ui, today: options.today, nisc: options.versions['@niscorp/nisc'] ?? 'unknown' };\n writeFileSync(join(options.dir, 'AGENTS.md'), agentsDoc(facts));\n writeFileSync(join(options.dir, 'PLAN.md'), planDoc(facts));\n writeFileSync(join(options.dir, '.gitignore'), gitignore);\n return [...written, 'AGENTS.md', 'PLAN.md', '.gitignore'].sort();\n};\n","// The versions a new app depends on: the set @niscorp/nisc was released with.\n//\n// That package exists to say which versions of every @niscorp package belong\n// together — its dependencies pin each one exactly — so a new app asks it,\n// rather than taking whatever is newest of each and hoping they agree.\n\nconst isRecord = (value: unknown): value is Record<string, unknown> => value !== null && typeof value === 'object' && !Array.isArray(value);\n\nexport const releasedSet = async (registry: string): Promise<Record<string, string>> => {\n const url = `${registry.replace(/\\/$/, '')}/@niscorp%2fnisc/latest`;\n let response: Response;\n try {\n response = await fetch(url, { headers: { accept: 'application/json' } });\n } catch (error) {\n throw new Error(`create-nisc: could not reach ${registry} to ask which nisc release is current (${error instanceof Error ? error.message : String(error)})`);\n }\n if (!response.ok) throw new Error(`create-nisc: ${url} answered ${response.status}`);\n const manifest: unknown = await response.json();\n if (!isRecord(manifest) || typeof manifest['version'] !== 'string' || !isRecord(manifest['dependencies'])) {\n throw new Error(`create-nisc: ${url} is not a package manifest`);\n }\n const set: Record<string, string> = { '@niscorp/nisc': manifest['version'] };\n for (const [name, version] of Object.entries(manifest['dependencies'])) {\n if (typeof version === 'string') set[name] = version.replace(/^[\\^~=]/, '');\n }\n return set;\n};\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> nisc-template-moss-dom@0.0.0 build /Users/max/Development/niscorp/.claude/worktrees/prerender/packages/create-nisc/templates/moss-dom
|
|
3
|
-
> tsc --noEmit && nisc build
|
|
4
|
-
|
|
5
|
-
vite v7.3.2 building client environment for production...
|
|
6
|
-
transforming...
|
|
7
|
-
../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js (400:0): A comment
|
|
8
|
-
|
|
9
|
-
"// Wrapped in a `@__PURE__` IIFE: esbuild never tree-shakes a top-level initializer that contains a member access on `Number`, so the bare object literal survived into every bundle."
|
|
10
|
-
|
|
11
|
-
in "../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
|
|
12
|
-
../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js (74:0): A comment
|
|
13
|
-
|
|
14
|
-
"/** Anchors a pattern source. The interpolation lives here rather than at the call site because
|
|
15
|
-
* esbuild will not drop a `@__PURE__` call whose own argument interpolates a variable, but it
|
|
16
|
-
* will drop `anchor(dateSource)`. Keeping it inline pinned `date` into every bundle. */"
|
|
17
|
-
|
|
18
|
-
in "../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
|
|
19
|
-
✓ 138 modules transformed.
|
|
20
|
-
rendering chunks...
|
|
21
|
-
computing gzip size...
|
|
22
|
-
dist/index.html 0.41 kB │ gzip: 0.27 kB
|
|
23
|
-
dist/assets/index-DALMMv7I.css 0.74 kB │ gzip: 0.43 kB
|
|
24
|
-
dist/assets/index-BDUN-Hte.js 103.14 kB │ gzip: 31.36 kB
|
|
25
|
-
✓ built in 4.00s
|
|
26
|
-
[vex] reads are not bounded: this database cannot enforce statement_timeout (10000ms asked). Fine for development; production wants Postgres.
|
|
27
|
-
|
|
28
|
-
Route What Served as Because
|
|
29
|
-
● / the app server welcome: a person can act on it
|
|
30
|
-
|
|
31
|
-
○ file drawn once, for nobody in particular; nothing on it can still happen
|
|
32
|
-
● server something on it can still happen; it wants moss behind it
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> nisc-template-moss-dom@0.0.0 test /Users/max/Development/niscorp/.claude/worktrees/prerender/packages/create-nisc/templates/moss-dom
|
|
3
|
-
> nisc check
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
── welcome-check — the welcome screen: served, drawn, and pressed
|
|
7
|
-
[vex] reads are not bounded: this database cannot enforce statement_timeout (10000ms asked). Fine for development; production wants Postgres.
|
|
8
|
-
[pass] the anonymous principal is served the welcome action
|
|
9
|
-
[pass] its screen has a button to press
|
|
10
|
-
[pass] the page arrives drawn
|
|
11
|
-
[pass] a page drawn for nobody may be kept by a cache
|
|
12
|
-
[pass] a press reaches the shell on the server
|
|
13
|
-
[pass] welcome: all checks passed
|
|
14
|
-
|
|
15
|
-
All 1 checks pass.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> nisc-template-moss-react@0.0.0 build /Users/max/Development/niscorp/.claude/worktrees/prerender/packages/create-nisc/templates/moss-react
|
|
3
|
-
> tsc --noEmit && nisc build
|
|
4
|
-
|
|
5
|
-
vite v7.3.2 building client environment for production...
|
|
6
|
-
transforming...
|
|
7
|
-
../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js (400:0): A comment
|
|
8
|
-
|
|
9
|
-
"// Wrapped in a `@__PURE__` IIFE: esbuild never tree-shakes a top-level initializer that contains a member access on `Number`, so the bare object literal survived into every bundle."
|
|
10
|
-
|
|
11
|
-
in "../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
|
|
12
|
-
../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js (74:0): A comment
|
|
13
|
-
|
|
14
|
-
"/** Anchors a pattern source. The interpolation lives here rather than at the call site because
|
|
15
|
-
* esbuild will not drop a `@__PURE__` call whose own argument interpolates a variable, but it
|
|
16
|
-
* will drop `anchor(dateSource)`. Keeping it inline pinned `date` into every bundle. */"
|
|
17
|
-
|
|
18
|
-
in "../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
|
|
19
|
-
✓ 163 modules transformed.
|
|
20
|
-
rendering chunks...
|
|
21
|
-
computing gzip size...
|
|
22
|
-
dist/index.html 0.41 kB │ gzip: 0.27 kB
|
|
23
|
-
dist/assets/index-DALMMv7I.css 0.74 kB │ gzip: 0.43 kB
|
|
24
|
-
dist/assets/index-DvixsGlk.js 299.53 kB │ gzip: 92.01 kB
|
|
25
|
-
✓ built in 6.32s
|
|
26
|
-
[vex] reads are not bounded: this database cannot enforce statement_timeout (10000ms asked). Fine for development; production wants Postgres.
|
|
27
|
-
|
|
28
|
-
Route What Served as Because
|
|
29
|
-
● / the app server welcome: a person can act on it
|
|
30
|
-
|
|
31
|
-
○ file drawn once, for nobody in particular; nothing on it can still happen
|
|
32
|
-
● server something on it can still happen; it wants moss behind it
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> nisc-template-moss-react@0.0.0 test /Users/max/Development/niscorp/.claude/worktrees/prerender/packages/create-nisc/templates/moss-react
|
|
3
|
-
> nisc check
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
── welcome-check — the welcome screen: served, drawn, and pressed
|
|
7
|
-
[vex] reads are not bounded: this database cannot enforce statement_timeout (10000ms asked). Fine for development; production wants Postgres.
|
|
8
|
-
[pass] the anonymous principal is served the welcome action
|
|
9
|
-
[pass] its screen has a button to press
|
|
10
|
-
[pass] the page arrives drawn
|
|
11
|
-
[pass] a page drawn for nobody may be kept by a cache
|
|
12
|
-
[pass] a press reaches the shell on the server
|
|
13
|
-
[pass] welcome: all checks passed
|
|
14
|
-
|
|
15
|
-
All 1 checks pass.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> nisc-template-shell-dom@0.0.0 build /Users/max/Development/niscorp/.claude/worktrees/prerender/packages/create-nisc/templates/shell-dom
|
|
3
|
-
> tsc --noEmit && nisc build
|
|
4
|
-
|
|
5
|
-
vite v7.3.2 building client environment for production...
|
|
6
|
-
transforming...
|
|
7
|
-
../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js (74:0): A comment
|
|
8
|
-
|
|
9
|
-
"/** Anchors a pattern source. The interpolation lives here rather than at the call site because
|
|
10
|
-
* esbuild will not drop a `@__PURE__` call whose own argument interpolates a variable, but it
|
|
11
|
-
* will drop `anchor(dateSource)`. Keeping it inline pinned `date` into every bundle. */"
|
|
12
|
-
|
|
13
|
-
in "../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
|
|
14
|
-
../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js (400:0): A comment
|
|
15
|
-
|
|
16
|
-
"// Wrapped in a `@__PURE__` IIFE: esbuild never tree-shakes a top-level initializer that contains a member access on `Number`, so the bare object literal survived into every bundle."
|
|
17
|
-
|
|
18
|
-
in "../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
|
|
19
|
-
✓ 141 modules transformed.
|
|
20
|
-
rendering chunks...
|
|
21
|
-
computing gzip size...
|
|
22
|
-
dist/index.html 0.41 kB │ gzip: 0.28 kB
|
|
23
|
-
dist/assets/index-DALMMv7I.css 0.74 kB │ gzip: 0.43 kB
|
|
24
|
-
dist/assets/index-xeXwGVAt.js 228.66 kB │ gzip: 69.82 kB
|
|
25
|
-
✓ built in 5.17s
|
|
26
|
-
|
|
27
|
-
Route First screen
|
|
28
|
-
○ / drawn · whole · same twice · adopted (welcome)
|
|
29
|
-
|
|
30
|
-
○ a file: the first screen, drawn for nobody in particular; the page’s own shell picks it up
|
|
31
|
-
✗ not written: a check did not hold
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> nisc-template-shell-dom@0.0.0 test /Users/max/Development/niscorp/.claude/worktrees/prerender/packages/create-nisc/templates/shell-dom
|
|
3
|
-
> nisc check
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
── welcome-check — the welcome screen: whole, and pressed
|
|
7
|
-
[pass] the first screen is whole
|
|
8
|
-
[pass] the welcome action opens on the main canvas
|
|
9
|
-
[pass] a press reaches the shell
|
|
10
|
-
[pass] welcome: all checks passed
|
|
11
|
-
|
|
12
|
-
All 1 checks pass.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> nisc-template-shell-react@0.0.0 build /Users/max/Development/niscorp/.claude/worktrees/prerender/packages/create-nisc/templates/shell-react
|
|
3
|
-
> tsc --noEmit && nisc build
|
|
4
|
-
|
|
5
|
-
vite v7.3.2 building client environment for production...
|
|
6
|
-
transforming...
|
|
7
|
-
../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js (74:0): A comment
|
|
8
|
-
|
|
9
|
-
"/** Anchors a pattern source. The interpolation lives here rather than at the call site because
|
|
10
|
-
* esbuild will not drop a `@__PURE__` call whose own argument interpolates a variable, but it
|
|
11
|
-
* will drop `anchor(dateSource)`. Keeping it inline pinned `date` into every bundle. */"
|
|
12
|
-
|
|
13
|
-
in "../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
|
|
14
|
-
../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js (400:0): A comment
|
|
15
|
-
|
|
16
|
-
"// Wrapped in a `@__PURE__` IIFE: esbuild never tree-shakes a top-level initializer that contains a member access on `Number`, so the bare object literal survived into every bundle."
|
|
17
|
-
|
|
18
|
-
in "../../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
|
|
19
|
-
✓ 164 modules transformed.
|
|
20
|
-
rendering chunks...
|
|
21
|
-
computing gzip size...
|
|
22
|
-
dist/index.html 0.41 kB │ gzip: 0.28 kB
|
|
23
|
-
dist/assets/index-DALMMv7I.css 0.74 kB │ gzip: 0.43 kB
|
|
24
|
-
dist/assets/index-B7o5cB3b.js 426.35 kB │ gzip: 131.56 kB
|
|
25
|
-
✓ built in 8.56s
|
|
26
|
-
|
|
27
|
-
Route First screen
|
|
28
|
-
○ / drawn · whole · same twice · adopted (welcome)
|
|
29
|
-
|
|
30
|
-
○ a file: the first screen, drawn for nobody in particular; the page’s own shell picks it up
|
|
31
|
-
✗ not written: a check did not hold
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> nisc-template-shell-react@0.0.0 test /Users/max/Development/niscorp/.claude/worktrees/prerender/packages/create-nisc/templates/shell-react
|
|
3
|
-
> nisc check
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
── welcome-check — the welcome screen: whole, and pressed
|
|
7
|
-
[pass] the first screen is whole
|
|
8
|
-
[pass] the welcome action opens on the main canvas
|
|
9
|
-
[pass] a press reaches the shell
|
|
10
|
-
[pass] welcome: all checks passed
|
|
11
|
-
|
|
12
|
-
All 1 checks pass.
|