@fougere/cli 0.9.3-alpha.0 → 0.10.0-alpha.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.
Files changed (63) hide show
  1. package/app/commands/CheckCommand.ts +3 -2
  2. package/app/commands/ExplainCommand.ts +1 -1
  3. package/app/commands/LoadCommand.ts +2 -2
  4. package/app/commands/ServeCommand.ts +1 -1
  5. package/dist/bridge.d.ts.map +1 -1
  6. package/dist/bridge.js +24 -4
  7. package/dist/bridge.js.map +1 -1
  8. package/dist/machine.d.ts +1 -1
  9. package/dist/machine.js +1 -1
  10. package/dist/runner.d.ts +9 -1
  11. package/dist/runner.d.ts.map +1 -1
  12. package/dist/runner.js +13 -6
  13. package/dist/runner.js.map +1 -1
  14. package/dist/typescript/{EntityTypes.d.ts → EntityTypes/EntityTypes.d.ts} +1 -4
  15. package/dist/typescript/EntityTypes/EntityTypes.d.ts.map +1 -0
  16. package/dist/typescript/{EntityTypes.js → EntityTypes/EntityTypes.js} +1 -1
  17. package/dist/typescript/EntityTypes/EntityTypes.js.map +1 -0
  18. package/dist/typescript/EntityTypes/EntityTypesOptions.d.ts +5 -0
  19. package/dist/typescript/EntityTypes/EntityTypesOptions.d.ts.map +1 -0
  20. package/dist/typescript/EntityTypes/EntityTypesOptions.js +2 -0
  21. package/dist/typescript/EntityTypes/EntityTypesOptions.js.map +1 -0
  22. package/dist/typescript/FacadeTypes/FacadeTypes.d.ts +9 -0
  23. package/dist/typescript/FacadeTypes/FacadeTypes.d.ts.map +1 -0
  24. package/dist/typescript/{FacadeTypes.js → FacadeTypes/FacadeTypes.js} +1 -1
  25. package/dist/typescript/FacadeTypes/FacadeTypes.js.map +1 -0
  26. package/dist/typescript/FacadeTypes/FacadeTypesOptions.d.ts +6 -0
  27. package/dist/typescript/FacadeTypes/FacadeTypesOptions.d.ts.map +1 -0
  28. package/dist/typescript/FacadeTypes/FacadeTypesOptions.js +2 -0
  29. package/dist/typescript/FacadeTypes/FacadeTypesOptions.js.map +1 -0
  30. package/dist/typescript/FacadeTypes/OpDescriptor.d.ts +8 -0
  31. package/dist/typescript/FacadeTypes/OpDescriptor.d.ts.map +1 -0
  32. package/dist/typescript/FacadeTypes/OpDescriptor.js +2 -0
  33. package/dist/typescript/FacadeTypes/OpDescriptor.js.map +1 -0
  34. package/fronds/analysis/entities/Load.ts +1 -1
  35. package/fronds/analysis/handlers/BuildHandler.ts +25 -2
  36. package/fronds/analysis/handlers/CheckHandler.ts +39 -30
  37. package/fronds/analysis/handlers/LoadHandler.ts +6 -6
  38. package/fronds/scaffold/handlers/BuildFrondHandler.ts +1 -1
  39. package/fronds/scaffold/handlers/SyncHandler.ts +57 -18
  40. package/fronds/scaffold/services/ProjectWriter.ts +61 -3
  41. package/package.json +15 -9
  42. package/src/bridge.ts +27 -4
  43. package/src/machine.ts +1 -1
  44. package/src/runner.ts +13 -6
  45. package/src/typescript/{EntityTypes.ts → EntityTypes/EntityTypes.ts} +2 -6
  46. package/src/typescript/EntityTypes/EntityTypesOptions.ts +4 -0
  47. package/src/typescript/{FacadeTypes.ts → FacadeTypes/FacadeTypes.ts} +3 -15
  48. package/src/typescript/FacadeTypes/FacadeTypesOptions.ts +5 -0
  49. package/src/typescript/FacadeTypes/OpDescriptor.ts +8 -0
  50. package/templates/blog/fronds/blog/entities/Post.ts +1 -1
  51. package/templates/flat/CLAUDE.md +3 -3
  52. package/templates/frond/CLAUDE.md +3 -3
  53. package/templates/workspace/CLAUDE.md +3 -3
  54. package/dist/typescript/EntityTypes.d.ts.map +0 -1
  55. package/dist/typescript/EntityTypes.js.map +0 -1
  56. package/dist/typescript/FacadeTypes.d.ts +0 -19
  57. package/dist/typescript/FacadeTypes.d.ts.map +0 -1
  58. package/dist/typescript/FacadeTypes.js.map +0 -1
  59. package/templates/apps/nuxt/app/app.vue +0 -25
  60. package/templates/apps/nuxt/app/pages/index.vue +0 -33
  61. package/templates/apps/nuxt/nuxt.config.ts +0 -6
  62. package/templates/apps/nuxt/package.json +0 -19
  63. package/templates/apps/nuxt/tsconfig.json +0 -3
@@ -1,14 +1,31 @@
1
1
  import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import { upperFirst, type SchemaDescriptor } from '@fougere/schema';
4
- import { EntityTypes } from '../../../src/typescript/EntityTypes.js';
5
- import { FacadeTypes } from '../../../src/typescript/FacadeTypes.js';
4
+ import { EntityTypes } from '../../../src/typescript/EntityTypes/EntityTypes.js';
5
+ import { FacadeTypes } from '../../../src/typescript/FacadeTypes/FacadeTypes.js';
6
6
  // The card's shape is declared once, in core, and imported here. A private copy of it
7
7
  // lived in this file and went stale the day an op stopped being a bare name: nothing
8
8
  // compared the copy to the original, so the drift cost nothing until someone read it.
9
9
  import { assertIdentityCard, type IdentityCard } from '@fougere/core';
10
10
  import { type Conventions, resolveConventions, frondPackage } from '@fougere/core';
11
11
  import { loadConfig } from '@fougere/core/node';
12
+ import { facadeModule, type Served } from '@fougere/compiler';
13
+ import { ErrorCode } from '@fougere/core/contract';
14
+
15
+ /**
16
+ * A union of enum MEMBERS, from what the card said this operation refuses.
17
+ *
18
+ * `ErrorCode` is a string enum, so `'CONFLICT'` is not assignable to it: a literal reads as the
19
+ * right thing and then refuses to narrow `FougereError<Code>`, which is the whole point. A code
20
+ * this version does not know is dropped rather than written — the far side may be newer, and a
21
+ * name that resolves to nothing would stop the consumer's build.
22
+ */
23
+ function codesOf(errors: readonly string[] | undefined): string {
24
+ const known = (errors ?? []).filter((code) => code in ErrorCode);
25
+ if (known.length === 0) return 'never';
26
+
27
+ return known.map((code) => `ErrorCode.${code}`).join(' | ');
28
+ }
12
29
 
13
30
  function assertSafeName(kind: string, name: string): void {
14
31
  if (typeof name !== 'string' || !/^[A-Za-z_$][A-Za-z0-9_$-]*$/.test(name)) {
@@ -36,10 +53,10 @@ export function entityClassName(name: string): string {
36
53
  }
37
54
 
38
55
  /**
39
- * One entry — a door or a fact — validated the same way, because sync consumes the same two
56
+ * One entry — a facade or a fact — validated the same way, because sync consumes the same two
40
57
  * values from both: a name it can turn into a class, and a descriptor it can rebuild.
41
58
  *
42
- * A missing descriptor is legal on either side and means different things: a door that
59
+ * A missing descriptor is legal on either side and means different things: a facade that
43
60
  * stores nothing (a health check, a search across shapes), or a fact whose announced type
44
61
  * is not a declared entity. Neither produces a row class, and demanding one here refused
45
62
  * the WHOLE card over a single entry.
@@ -72,7 +89,7 @@ function assertEntry(kind: string, frondName: string, entry: { name: string; sch
72
89
 
73
90
  function identityCardOf(value: unknown): IdentityCard {
74
91
  // The card's own shape is validated by the package that declares it — `fronds`, and each
75
- // frond's `doors`. What stays here is what only a writer of files needs: a name safe to
92
+ // frond's `facades`. What stays here is what only a writer of files needs: a name safe to
76
93
  // become one, and the descriptor a class is generated from.
77
94
  const card = assertIdentityCard(value, 'Remote rpc.discover');
78
95
  for (const frond of card.fronds) {
@@ -83,7 +100,7 @@ function identityCardOf(value: unknown): IdentityCard {
83
100
  if (frond.facts !== undefined && !Array.isArray(frond.facts)) {
84
101
  throw new Error(`Remote frond '${frond.name}' has no valid facts array`);
85
102
  }
86
- for (const door of frond.doors) assertEntry('door', frond.name, door);
103
+ for (const facade of frond.facades) assertEntry('facade', frond.name, facade);
87
104
  for (const fact of frond.facts ?? []) assertEntry('fact', frond.name, fact);
88
105
  }
89
106
  return card;
@@ -142,17 +159,17 @@ export default class SyncHandler {
142
159
  /**
143
160
  * What was written under each name — the barrel below is a projection of exactly this.
144
161
  *
145
- * Three combinations, and all three occur: a door with rows behind it (both files), a
146
- * door with none (the façade type alone), and a fact (the row class alone, because
162
+ * Three combinations, and all three occur: a facade with rows behind it (both files), a
163
+ * facade with none (the façade type alone), and a fact (the row class alone, because
147
164
  * nothing calls a fact).
148
165
  */
149
- const generated = new Map<string, { row: boolean; door: boolean }>();
166
+ const generated = new Map<string, { row: boolean; facade: boolean }>();
150
167
  /** Absolute paths written by THIS run — anything else generated here is now stale. */
151
168
  const written = new Set<string>();
152
169
  const claim = (name: string): string => {
153
170
  const className = entityClassName(name);
154
171
  if (generated.has(className)) throw new Error(`Remote declares duplicate entity '${className}'`);
155
- generated.set(className, { row: false, door: false });
172
+ generated.set(className, { row: false, facade: false });
156
173
  return className;
157
174
  };
158
175
 
@@ -179,16 +196,24 @@ export default class SyncHandler {
179
196
  generated.get(className)!.row = true;
180
197
  };
181
198
 
182
- for (const { name, schema: descriptor, ops } of target.doors) {
183
- const className = claim(name);
184
- generated.get(className)!.door = true;
199
+ /** What the card says of each address — the same three facts a scan gives. */
200
+ const served: Served[] = [];
185
201
 
186
- // No shape behind this door: its operations still travel, its rows do not exist.
202
+ for (const { name, schema: descriptor, ops } of target.facades) {
203
+ const className = claim(name);
204
+ generated.get(className)!.facade = true;
205
+ served.push({
206
+ at: name,
207
+ handler: `import('./${handlers}/${className}Handler.js').${className}Handler`,
208
+ ops: (ops ?? []).map((op) => ({ name: op.name, codes: codesOf(op.errors) })),
209
+ });
210
+
211
+ // No shape behind this facade: its operations still travel, its rows do not exist.
187
212
  // `rowType` falls back to `unknown`, which is the truth rather than an empty class.
188
213
  if (descriptor !== undefined) writeRow(className, descriptor as SchemaDescriptor);
189
214
 
190
215
  /**
191
- * The door's type, next to the row's — what `Facade<T>` needs and what nothing
216
+ * The facade's type, next to the row's — what `Facade<T>` needs and what nothing
192
217
  * carried across a repository boundary.
193
218
  *
194
219
  * Writing `Facade<ArticleHandler>` used to require importing the handler's class.
@@ -229,12 +254,26 @@ export default class SyncHandler {
229
254
  writeRow(className, descriptor as SchemaDescriptor);
230
255
  }
231
256
 
257
+ /**
258
+ * The facade module, written from the CARD rather than from a scan.
259
+ *
260
+ * A frond in another repository cannot be scanned — there are no sources here. What the
261
+ * card carries is exactly the three facts the module needs: the addresses, the operations,
262
+ * and what each one refuses. The handler TYPE is the one thing it cannot carry, so the
263
+ * synthetic interface written above stands in its place: it names the same operations with
264
+ * the same answers, which is what a page reads.
265
+ *
266
+ * `facadeModule` is the compiler's own, not a copy: two spellings of one format would
267
+ * drift the day either gained a member.
268
+ */
269
+ writeFileSync(join(frondDir, 'facade.ts'), facadeModule(served, `${baseUrl} — a card, not a scan`));
270
+
232
271
  // Barrel index
233
272
  // One binding carries the value AND the type, because a class is both — the pair of
234
273
  // re-exports that stood here was the price of declaring them separately.
235
- const indexLines = [...generated].flatMap(([name, { row, door }]) => [
274
+ const indexLines = [...generated].flatMap(([name, { row, facade }]) => [
236
275
  ...(row ? [`export { default as ${name} } from './${entities}/${name}.js';`] : []),
237
- ...(door ? [`export type { ${name}Handler } from './${handlers}/${name}Handler.js';`] : []),
276
+ ...(facade ? [`export type { ${name}Handler } from './${handlers}/${name}Handler.js';`] : []),
238
277
  ]);
239
278
  writeFileSync(join(frondDir, 'index.ts'), indexLines.join('\n') + '\n');
240
279
 
@@ -265,7 +304,7 @@ export default class SyncHandler {
265
304
  * — but the FILE stayed, and the generated `package.json` exports `'./entities/*'` as
266
305
  * a wildcard, so `@fronds/blog/entities/Ticket.js` kept resolving to a class nothing
267
306
  * behind it answers for. The consumer compiles, its local validator accepts, and the call
268
- * comes back NOT_FOUND at the door — or never leaves, because the page dropped the
307
+ * comes back NOT_FOUND at the facade — or never leaves, because the page dropped the
269
308
  * call and kept the type.
270
309
  */
271
310
  const removed = [...this.prune(entitiesDir, written), ...this.prune(handlersDir, written)];
@@ -30,6 +30,52 @@ function monorepoPackages(): string | undefined {
30
30
  */
31
31
  const TEMPLATES = fileURLToPath(new URL('../../../templates/', import.meta.url));
32
32
 
33
+ /**
34
+ * Where a HOST keeps its starter, or nothing when it ships none.
35
+ *
36
+ * The package that owns the wiring owns the files: `@fougere/nuxt` knows what a
37
+ * `nuxt.config.ts` must say, and a copy of it here would be that knowledge written twice —
38
+ * which is how `templates/apps/` came to hold one host while six were published.
39
+ *
40
+ * Resolved from the main entry and walked up to the manifest, because a host does not export
41
+ * its own `package.json` and has no reason to.
42
+ *
43
+ * `import.meta.resolve` and not `createRequire().resolve`: a host's `exports` states only the
44
+ * `import` condition, so the CJS resolver answers `ERR_PACKAGE_PATH_NOT_EXPORTED` for every
45
+ * one of them.
46
+ */
47
+ function starterOf(pkg: string): string | undefined {
48
+ let dir: string;
49
+ try {
50
+ dir = dirname(fileURLToPath(import.meta.resolve(pkg)));
51
+ } catch { return undefined; }
52
+
53
+ while (!existsSync(join(dir, 'package.json')) && dir !== dirname(dir)) dir = dirname(dir);
54
+ const template = join(dir, 'template');
55
+
56
+ return existsSync(template) ? template : undefined;
57
+ }
58
+
59
+ /**
60
+ * The hosts this CLI can scaffold: its own `@fougere/*` dependencies that ship a starter.
61
+ *
62
+ * The dependency list IS the registry — nothing to declare, and a host added to the family
63
+ * appears here the day the CLI depends on it.
64
+ */
65
+ function hosts(): Map<string, string> {
66
+ const manifest = JSON.parse(readFileSync(fileURLToPath(new URL('../../../package.json', import.meta.url)), 'utf8')) as
67
+ { dependencies?: Record<string, string> };
68
+ const found = new Map<string, string>();
69
+
70
+ for (const pkg of Object.keys(manifest.dependencies ?? {})) {
71
+ if (!pkg.startsWith('@fougere/')) continue;
72
+ const starter = starterOf(pkg);
73
+ if (starter) found.set(pkg.slice('@fougere/'.length), starter);
74
+ }
75
+
76
+ return found;
77
+ }
78
+
33
79
  /** The version that scaffolds is the version the templates were written for. */
34
80
  const scaffoldVersion = (): string =>
35
81
  (JSON.parse(readFileSync(fileURLToPath(new URL('../../../package.json', import.meta.url)), 'utf8')) as
@@ -102,19 +148,31 @@ export default class ProjectWriter {
102
148
  return { path: dest };
103
149
  }
104
150
 
105
- /** Add an app (consumer) under apps/<name>. */
151
+ /** Add an app (consumer) under apps/<name>, from the host package that owns its wiring. */
106
152
  addApp(wsDir: string, template: string, name: string): { path: string } {
107
153
  const dest = join(wsDir, 'apps', name);
108
- cpSync(join(TEMPLATES, 'apps', template), dest, { recursive: true });
154
+ const starter = hosts().get(template);
155
+ if (!starter) throw new Error(`No host ships a starter for '${template}'. Served: ${[...hosts().keys()].join(', ')}.`);
156
+
157
+ cpSync(starter, dest, { recursive: true });
109
158
  restoreGitignore(dest);
110
159
  setPackageName(dest, name);
111
160
  return { path: dest };
112
161
  }
113
162
 
114
- /** Available templates of a kind ('fronds' | 'apps') — the directory is the registry. */
163
+ /**
164
+ * What can be scaffolded, of a kind.
165
+ *
166
+ * A FROND comes from this package: it is Fougere's own vocabulary, entities and handlers,
167
+ * and no other package owns it. An APP comes from its HOST — the registry is the hosts this
168
+ * CLI depends on, so `fougere new` offers what is published rather than what was copied here.
169
+ */
115
170
  listTemplates(kind: 'fronds' | 'apps'): string[] {
171
+ if (kind === 'apps') return [...hosts().keys()].sort();
172
+
116
173
  const dir = join(TEMPLATES, kind);
117
174
  if (!existsSync(dir)) return [];
175
+
118
176
  return readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name);
119
177
  }
120
178
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fougere/cli",
3
- "version": "0.9.3-alpha.0",
3
+ "version": "0.10.0-alpha.0",
4
4
  "description": "The Fougere CLI — compose a workspace, serve a frond, call an operation.",
5
5
  "keywords": [
6
6
  "fougere",
@@ -42,14 +42,20 @@
42
42
  "jiti": "^2.4.2",
43
43
  "picocolors": "^1.1.1",
44
44
  "safe-regex": "^2.1.1",
45
- "@fougere/transport-http": "0.9.3-alpha.0",
46
- "@fougere/adapter-sql": "0.9.3-alpha.0",
47
- "@fougere/testing": "0.9.3-alpha.0",
48
- "@fougere/defaults": "0.9.3-alpha.0",
49
- "@fougere/container": "0.9.3-alpha.0",
50
- "@fougere/schema": "0.9.3-alpha.0",
51
- "@fougere/compiler": "0.9.3-alpha.0",
52
- "@fougere/core": "0.9.3-alpha.0"
45
+ "@fougere/adapter-sql": "0.10.0-alpha.0",
46
+ "@fougere/core": "0.10.0-alpha.0",
47
+ "@fougere/defaults": "0.10.0-alpha.0",
48
+ "@fougere/nuxt": "0.10.0-alpha.0",
49
+ "@fougere/compiler": "0.10.0-alpha.0",
50
+ "@fougere/container": "0.10.0-alpha.0",
51
+ "@fougere/svelte": "0.10.0-alpha.0",
52
+ "@fougere/testing": "0.10.0-alpha.0",
53
+ "@fougere/react": "0.10.0-alpha.0",
54
+ "@fougere/transport-http": "0.10.0-alpha.0",
55
+ "@fougere/schema": "0.10.0-alpha.0",
56
+ "@fougere/next": "0.10.0-alpha.0",
57
+ "@fougere/admin": "0.10.0-alpha.0",
58
+ "@fougere/oclif": "0.10.0-alpha.0"
53
59
  },
54
60
  "devDependencies": {
55
61
  "vitest": "^4.1.0"
package/src/bridge.ts CHANGED
@@ -8,23 +8,46 @@ function toKebab(name: string): string {
8
8
  return name.replace(/[A-Z]/g, (c) => '-' + c.toLowerCase());
9
9
  }
10
10
 
11
+ /**
12
+ * What a caller supplies: the fields the axes admit, or the PRIMARY when they admit nothing.
13
+ *
14
+ * `Visibility.input` answers who may WRITE a field, and a primary is the server's — right for a
15
+ * form, wrong for an operation whose whole input is `Product.pick('id')`. That contract asks the
16
+ * caller to NAME a row, and the axes leave it with no argument at all: `product:archive abc-9`
17
+ * answered `Unexpected argument`.
18
+ *
19
+ * Only when nothing else remains, so `create` over a full entity is untouched — its input holds
20
+ * twelve writable fields and the primary stays the server's.
21
+ */
22
+ function suppliedIn(fields: Fields): Fields {
23
+ const written = Visibility.of(fields).input;
24
+ if (Object.keys(written).length > 0) return written;
25
+
26
+ return Object.fromEntries(
27
+ Object.entries(fields).filter(([, field]) => Role.of(field).isPrimary),
28
+ ) as Fields;
29
+ }
30
+
11
31
  /** Convert an Entity's fields into citty args definition. */
12
32
  export function entityToArgs(fields: Fields): ArgsDef {
13
33
  const args: ArgsDef = {};
14
34
  let positionalIndex = 0;
15
35
 
16
- // Axes-derived ingress membership; the CLI additionally skips ALL relations
17
- // (a ref is not a flag — supplying related rows is not a CLI gesture).
18
- for (const [key, field] of Object.entries(Visibility.of(fields).input)) {
36
+ // The CLI additionally skips ALL relations: a ref is not a flag — supplying related rows is
37
+ // not a CLI gesture.
38
+ for (const [key, field] of Object.entries(suppliedIn(fields))) {
19
39
  if (Role.of(field).isRelation) continue;
20
40
 
21
41
  // A `default(v)` travels as the create rule `{ value }` — citty shows it.
22
42
  const defaultValue = Lifecycle.of(field).literal?.value;
23
43
  const { base: shape, nullable } = Shapes.of(field.shape);
24
44
  const type = Shapes.typeOf(field.shape);
45
+ // Naming a row is required by definition: a generator fills a primary the server writes,
46
+ // never one a caller hands in to designate.
47
+ const designates = Role.of(field).isPrimary;
25
48
  const common = {
26
49
  description: field.meta?.description,
27
- required: !nullable && Lifecycle.of(field).requiredAtCreate,
50
+ required: designates || (!nullable && Lifecycle.of(field).requiredAtCreate),
28
51
  };
29
52
 
30
53
  // A closed set is citty's `enum`: the shape already names the legal values, so the
package/src/machine.ts CHANGED
@@ -4,7 +4,7 @@ export function machineWanted(raw: Record<string, unknown>): boolean {
4
4
  }
5
5
 
6
6
  /**
7
- * A `Map` serializes to `{}`, so the door converts it rather than each command flattening its own
7
+ * A `Map` serializes to `{}`, so the facade converts it rather than each command flattening its own
8
8
  * result: `GraphResult.nodes` is a Map, and `graph --json` would have printed a report with an
9
9
  * empty graph in it.
10
10
  */
package/src/runner.ts CHANGED
@@ -22,11 +22,11 @@ function toCamel(kebab: string): string {
22
22
 
23
23
  /** Scan app/commands/ for command classes. */
24
24
  async function loadAppCommands(
25
- cliRoot: string,
25
+ root: string,
26
26
  loader: (path: string) => Promise<Record<string, unknown>>,
27
27
  ): Promise<Map<string, new (...args: unknown[]) => { run: (raw: Record<string, unknown>) => Promise<void> }>> {
28
28
  const map = new Map();
29
- const dir = join(cliRoot, 'app', 'commands');
29
+ const dir = join(root, 'app', 'commands');
30
30
  const files = await readdir(dir, { withFileTypes: true }).catch(() => []);
31
31
 
32
32
  for (const f of files) {
@@ -42,14 +42,21 @@ async function loadAppCommands(
42
42
  return map;
43
43
  }
44
44
 
45
- export async function run(app: App): Promise<void> {
45
+ /**
46
+ * Every operation of an app, as a terminal command.
47
+ *
48
+ * `root` is where the PRESENTATION classes are looked for — `app/commands/`, one per command
49
+ * that wants to print something of its own. It defaults to this package, which is how
50
+ * `npx fougere` finds its fifteen; a project passes its own and gets the same treatment for
51
+ * the operations it declares, with no class at all where a default rendering will do.
52
+ */
53
+ export async function run(app: App, root = new URL('..', import.meta.url).pathname): Promise<void> {
46
54
  const terminal = ui();
47
- const cliRoot = new URL('..', import.meta.url).pathname;
48
55
 
49
56
  const { createJiti } = await import('jiti');
50
57
  const jiti = createJiti(import.meta.url, { interopDefault: true });
51
58
  const loader = (path: string) => jiti.import(path) as Promise<Record<string, unknown>>;
52
- const appCommands = await loadAppCommands(cliRoot, loader);
59
+ const appCommands = await loadAppCommands(root, loader);
53
60
 
54
61
  const subCommands: Record<string, ReturnType<typeof defineCommand>> = {};
55
62
 
@@ -86,7 +93,7 @@ export async function run(app: App): Promise<void> {
86
93
  meta: {
87
94
  name: cmdName,
88
95
  // `--help` reads the operation's own doc sentence, which the scan already
89
- // carries for every door (`OperationContract.description`). A table here
96
+ // carries for every facade (`OperationContract.description`). A table here
90
97
  // would be the same fact written twice, and it drifted: it described `add`
91
98
  // and `doctor`, which do not exist, and had nothing for `call` or `serve`.
92
99
  description: handlerEntry.operations.get('execute')?.description,
@@ -1,5 +1,6 @@
1
1
  import { upperFirst, type FieldDescriptor, type SchemaDescriptor } from '@fougere/schema';
2
- import { docCommentOf, propertyKey } from './syntax.js';
2
+ import { docCommentOf, propertyKey } from '../syntax.js';
3
+ import type { EntityTypesOptions } from './EntityTypesOptions.js';
3
4
 
4
5
  /** So a nullable field lands as a union. */
5
6
  function typeOf(field: FieldDescriptor): string {
@@ -41,11 +42,6 @@ function objectTypeOf(properties: Record<string, FieldDescriptor>, required: rea
41
42
  return `{ ${members.join('; ')} }`;
42
43
  }
43
44
 
44
- export interface EntityTypesOptions {
45
- name?: string;
46
- exported?: boolean;
47
- }
48
-
49
45
  /** So the generated class carries its row type. */
50
46
  function shapeTypeOf(descriptor: SchemaDescriptor, indent = ''): string {
51
47
  const entries = Object.entries(descriptor.properties ?? {});
@@ -0,0 +1,4 @@
1
+ export interface EntityTypesOptions {
2
+ name?: string;
3
+ exported?: boolean;
4
+ }
@@ -1,18 +1,6 @@
1
- import type { SchemaDescriptor } from '@fougere/schema';
2
- import { docCommentOf, propertyKey } from './syntax.js';
3
-
4
- export interface FacadeTypesOptions {
5
- name?: string;
6
- exported?: boolean;
7
- rowType?: string;
8
- }
9
-
10
- export interface OpDescriptor {
11
- name: string;
12
- description?: string;
13
- output?: SchemaDescriptor;
14
- cardinality?: 'one' | 'maybe' | 'many' | 'page' | 'none';
15
- }
1
+ import { docCommentOf, propertyKey } from '../syntax.js';
2
+ import type { FacadeTypesOptions } from './FacadeTypesOptions.js';
3
+ import type { OpDescriptor } from './OpDescriptor.js';
16
4
 
17
5
  /** So a consumer sees the cardinality in the type, not in a doc line. */
18
6
  function returnTypeOf(op: OpDescriptor, rowType: string): string {
@@ -0,0 +1,5 @@
1
+ export interface FacadeTypesOptions {
2
+ name?: string;
3
+ exported?: boolean;
4
+ rowType?: string;
5
+ }
@@ -0,0 +1,8 @@
1
+ import type { SchemaDescriptor } from '@fougere/schema';
2
+
3
+ export interface OpDescriptor {
4
+ name: string;
5
+ description?: string;
6
+ output?: SchemaDescriptor;
7
+ cardinality?: 'one' | 'maybe' | 'many' | 'page' | 'none';
8
+ }
@@ -7,6 +7,6 @@ export default class Post extends entity({
7
7
  createdAt: created(),
8
8
  // Server-owned: a post is born a draft and flipped by the publish
9
9
  // operation, never by a client writing the field. readOnly closes
10
- // the inbound door — the field is projected out, never accepted in.
10
+ // the inbound facade — the field is projected out, never accepted in.
11
11
  status: readOnly(oneOf('draft', 'published', { default: 'draft' })),
12
12
  }) {}
@@ -25,11 +25,11 @@ Two consequences worth stating, because they are what makes it hold:
25
25
 
26
26
  If you are about to write the same constraint in two places, you have missed the derivation.
27
27
 
28
- ## A surface is a door, never a logic
28
+ ## A surface is a facade, never a logic
29
29
 
30
- Every door goes through the handler **façade**, which is where validation sits: unknown-key refusal,
30
+ Every facade goes through the handler **façade**, which is where validation sits: unknown-key refusal,
31
31
  collectors. A resolver or route you wire yourself against the storage — or worse, against the database —
32
- is a second door with no validator behind it, and the rules declared in the entities stop applying there.
32
+ is a second facade with no validator behind it, and the rules declared in the entities stop applying there.
33
33
 
34
34
  Before adding a surface, reach for its **projection**:
35
35
 
@@ -25,11 +25,11 @@ Two consequences worth stating, because they are what makes it hold:
25
25
 
26
26
  If you are about to write the same constraint in two places, you have missed the derivation.
27
27
 
28
- ## A surface is a door, never a logic
28
+ ## A surface is a facade, never a logic
29
29
 
30
- Every door goes through the handler **façade**, which is where validation sits: unknown-key refusal,
30
+ Every facade goes through the handler **façade**, which is where validation sits: unknown-key refusal,
31
31
  collectors. A resolver or route you wire yourself against the storage — or worse, against the database —
32
- is a second door with no validator behind it, and the rules declared in the entities stop applying there.
32
+ is a second facade with no validator behind it, and the rules declared in the entities stop applying there.
33
33
 
34
34
  Before adding a surface, reach for its **projection**:
35
35
 
@@ -25,11 +25,11 @@ Two consequences worth stating, because they are what makes it hold:
25
25
 
26
26
  If you are about to write the same constraint in two places, you have missed the derivation.
27
27
 
28
- ## A surface is a door, never a logic
28
+ ## A surface is a facade, never a logic
29
29
 
30
- Every door goes through the handler **façade**, which is where validation sits: unknown-key refusal,
30
+ Every facade goes through the handler **façade**, which is where validation sits: unknown-key refusal,
31
31
  collectors. A resolver or route you wire yourself against the storage — or worse, against the database —
32
- is a second door with no validator behind it, and the rules declared in the entities stop applying there.
32
+ is a second facade with no validator behind it, and the rules declared in the entities stop applying there.
33
33
 
34
34
  Before adding a surface, reach for its **projection**:
35
35
 
@@ -1 +0,0 @@
1
- {"version":3,"file":"EntityTypes.d.ts","sourceRoot":"","sources":["../../src/typescript/EntityTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AA2C1F,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,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C,SAAS,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;aAClD,KAAK,CAAC,IAAI,CAAC;aACX,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;aAChD,IAAI,CAAC,IAAI,CAAC,CAAC;QAEd,OAAO,GAAG,QAAQ,SAAS,IAAI,gCAAgC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,IAAI,iBAAiB,CAAC;IACxH,CAAC;CACF;AAED,iFAAiF;AACjF,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,IAAI,IAAI,2EAA2E,CAAC,CAAC;IACvG,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,19 +0,0 @@
1
- import type { SchemaDescriptor } from '@fougere/schema';
2
- export interface FacadeTypesOptions {
3
- name?: string;
4
- exported?: boolean;
5
- rowType?: string;
6
- }
7
- export interface OpDescriptor {
8
- name: string;
9
- description?: string;
10
- output?: SchemaDescriptor;
11
- cardinality?: 'one' | 'maybe' | 'many' | 'page' | 'none';
12
- }
13
- export declare class FacadeTypes {
14
- private readonly operations;
15
- private constructor();
16
- static of(operations: readonly OpDescriptor[]): FacadeTypes;
17
- render(options?: FacadeTypesOptions): string;
18
- }
19
- //# sourceMappingURL=FacadeTypes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FacadeTypes.d.ts","sourceRoot":"","sources":["../../src/typescript/FacadeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGxD,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;I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AC,UAAU,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,OAAO,GAAuB,EAAE;QACrC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC;QACtC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC;QAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;YAChD,MAAM,GAAG,GAAG,YAAY,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;YACtD,OAAO,GAAG,GAAG,KAAK,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,sCAAsC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC;QAC1H,CAAC,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,GAAG,QAAQ,aAAa,IAAI,KAAK,CAAC;QACnE,OAAO,GAAG,QAAQ,aAAa,IAAI,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;IACpE,CAAC;CACF"}
@@ -1,25 +0,0 @@
1
- <template>
2
- <NuxtPage />
3
- </template>
4
-
5
- <style>
6
- :root { --fg: #1a1a1a; --muted: #6b7280; --border: #e5e7eb; --accent: #2563eb; }
7
- * { box-sizing: border-box; }
8
- body { margin: 0; font-family: system-ui, -apple-system, sans-serif; color: var(--fg); line-height: 1.6; }
9
- .wrap { max-width: 720px; margin: 3rem auto; padding: 0 1.5rem; }
10
- a { color: var(--accent); text-decoration: none; }
11
- a:hover { text-decoration: underline; }
12
- h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
13
- code { background: #f3f4f6; padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.9em; }
14
- table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
15
- th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); }
16
- th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
17
- label { display: block; font-size: 0.85rem; margin: 0.9rem 0 0.3rem; color: var(--muted); }
18
- input, textarea { width: 100%; padding: 0.5rem 0.6rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
19
- button { padding: 0.5rem 0.9rem; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font: inherit; cursor: pointer; }
20
- button:disabled { opacity: 0.5; cursor: default; }
21
- .badge { font-size: 0.72rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: #f3f4f6; color: var(--muted); }
22
- .badge.published { background: #dcfce7; color: #166534; }
23
- .muted { color: var(--muted); }
24
- .err { color: #b91c1c; font-size: 0.9rem; }
25
- </style>
@@ -1,33 +0,0 @@
1
- <script setup lang="ts">
2
- // The four primitives are auto-imported by @fougere/nuxt — no import line to write.
3
- // They take an ENTITY, so this page names none: what is composed here is yours, and a
4
- // scaffold that guessed at an entity shipped a page that could not run.
5
- //
6
- // import Post from '@fronds/<your-frond>/entities/Post'
7
- // const { items, loading } = await useQuery(Post, 'list')
8
- // const { values, errors, submit } = useFormFor(Post)
9
- // const { execute } = useCommand(Post, 'publish')
10
- const { user } = useCurrentUser();
11
- </script>
12
-
13
- <template>
14
- <main class="wrap">
15
- <h1>🌿 Fougere</h1>
16
- <p class="muted">
17
- The app boots, the fronds are scanned, the surface is mounted. Write a page against
18
- one of your entities — the commented block in this file is the whole API.
19
- </p>
20
- <p class="muted">Reader: <strong>{{ user?.name ?? 'nobody' }}</strong></p>
21
- <p class="muted">What to write, and why: <code>CLAUDE.md</code> at the workspace root.</p>
22
- </main>
23
- </template>
24
-
25
- <style>
26
- :root { --fg: #1a1a1a; --muted: #6b7280; }
27
- * { box-sizing: border-box; }
28
- body { margin: 0; font-family: system-ui, -apple-system, sans-serif; color: var(--fg); line-height: 1.6; }
29
- .wrap { max-width: 720px; margin: 3rem auto; padding: 0 1.5rem; }
30
- h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
31
- code { background: #f3f4f6; padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.9em; }
32
- .muted { color: var(--muted); }
33
- </style>
@@ -1,6 +0,0 @@
1
- export default defineNuxtConfig({
2
- modules: ['@fougere/nuxt'],
3
- // Fronds are shared at the workspace root, two levels up from apps/<name>.
4
- fougere: { root: '../..' },
5
- compatibilityDate: '2026-07-20',
6
- });