@fougere/nuxt 0.2.0-alpha.2 → 0.3.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.
package/dist/module.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { SeedEntry, FougereConfig } from '@fougere/core';
|
|
|
2
2
|
export interface FougereModuleOptions {
|
|
3
3
|
/** Override fougere.config.ts values from nuxt.config. Optional. */
|
|
4
4
|
db?: FougereConfig['db'];
|
|
5
|
-
frondsDir?: string;
|
|
6
5
|
/**
|
|
7
6
|
* Where `fronds/` lives, relative to the app's rootDir. Default: the app
|
|
8
7
|
* itself. Set to `../..` for an app under `apps/*` in a workspace whose
|
|
@@ -12,5 +11,7 @@ export interface FougereModuleOptions {
|
|
|
12
11
|
}
|
|
13
12
|
declare const module: import("@nuxt/schema").NuxtModule<FougereModuleOptions, FougereModuleOptions, false>;
|
|
14
13
|
export default module;
|
|
15
|
-
export declare function generateBootPlugin(config: FougereConfig, seeds: SeedEntry[], fougereAppPath: string
|
|
14
|
+
export declare function generateBootPlugin(config: FougereConfig, seeds: SeedEntry[], fougereAppPath: string,
|
|
15
|
+
/** The module `emitScan` wrote. Absent only in the tests that predate it. */
|
|
16
|
+
scanPath?: string): string;
|
|
16
17
|
//# sourceMappingURL=module.d.ts.map
|
package/dist/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAK9D,MAAM,WAAW,oBAAoB;IACnC,oEAAoE;IACpE,EAAE,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IACzB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAGD,QAAA,MAAM,MAAM,sFA2NV,CAAC;eAEY,MAAM;AAiDrB,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,SAAS,EAAE,EAClB,cAAc,EAAE,MAAM;AACtB,6EAA6E;AAC7E,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAsGR"}
|
package/dist/module.js
CHANGED
|
@@ -3,20 +3,18 @@
|
|
|
3
3
|
* primitives (useQuery/useCommand, useFormFor, useCurrentUser) and the
|
|
4
4
|
* server surface (call envelope, session, REST bridge, auth).
|
|
5
5
|
*/
|
|
6
|
-
import { defineNuxtModule, addServerHandler, addServerImportsDir, addServerPlugin, addPlugin, addTemplate, addImports, createResolver, } from '@nuxt/kit';
|
|
7
|
-
import {
|
|
6
|
+
import { defineNuxtModule, addServerHandler, addServerImportsDir, addServerPlugin, addPlugin, addTemplate, addImports, createResolver, useLogger, } from '@nuxt/kit';
|
|
7
|
+
import { orderSeeds } from '@fougere/core';
|
|
8
|
+
import { scanProject, emitScan, frondAliases, watchPathsOf, resolveConventions, setModuleLoader, loadCascadedConfig, } from '@fougere/core/node';
|
|
8
9
|
import { declaresStorage } from '@fougere/defaults';
|
|
9
10
|
import { createJiti } from 'jiti';
|
|
10
11
|
import { resolve } from 'node:path';
|
|
11
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
12
|
+
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
12
13
|
const module = defineNuxtModule({
|
|
13
14
|
meta: {
|
|
14
15
|
name: '@fougere/nuxt',
|
|
15
16
|
configKey: 'fougere',
|
|
16
17
|
},
|
|
17
|
-
defaults: {
|
|
18
|
-
frondsDir: 'fronds',
|
|
19
|
-
},
|
|
20
18
|
async setup(options, nuxt) {
|
|
21
19
|
const { resolve: resolveModule } = createResolver(import.meta.url);
|
|
22
20
|
const runtimeResolve = (...path) => resolveModule('../src/runtime', ...path);
|
|
@@ -43,34 +41,41 @@ const module = defineNuxtModule({
|
|
|
43
41
|
// invoke reads the current request (state) through nitro's async context
|
|
44
42
|
nitroConfig.experimental = { ...nitroConfig.experimental, asyncContext: true };
|
|
45
43
|
});
|
|
46
|
-
// ── 0.
|
|
44
|
+
// ── 0. A TS-aware loader, installed twice on purpose ──
|
|
47
45
|
// The Vite alias below covers `.vue` pages; this covers the SCAN, which loads a
|
|
48
|
-
// frond's own sources — so `@
|
|
46
|
+
// frond's own sources — so `@fronds/user/entities/User.js` inside a handler resolves
|
|
49
47
|
// for the same reason it does in a page.
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
//
|
|
49
|
+
// The FIRST install carries no aliases, because the config names the scope they are
|
|
50
|
+
// built from: reading it must not need them. Safe because nothing in
|
|
51
|
+
// `fougere.config.ts` may import `@fronds/*` — the one import that would need the
|
|
52
|
+
// name to read the file that declares it.
|
|
53
|
+
const installLoader = (alias) => {
|
|
54
|
+
const jiti = createJiti(import.meta.url, { interopDefault: true, ...(alias ? { alias } : {}) });
|
|
55
|
+
setModuleLoader((filePath) => jiti.import(filePath));
|
|
56
|
+
};
|
|
57
|
+
installLoader();
|
|
52
58
|
// ── 0b. Load fougere.config.ts along the workspace→app cascade (scanRoot is
|
|
53
59
|
// the workspace when the app declares `root`); module options override. ──
|
|
54
60
|
const fileConfig = await loadCascadedConfig(scanRoot, rootDir);
|
|
55
61
|
const optionsOverride = Object.fromEntries(Object.entries(options).filter(([, v]) => v !== undefined));
|
|
56
62
|
const config = { db: 'sqlite', ...fileConfig, ...optionsOverride };
|
|
63
|
+
const conventions = resolveConventions(config.conventions);
|
|
64
|
+
// Now the names are known, so the loader can resolve them — and the scan below runs
|
|
65
|
+
// with them installed, which is what lets it read a frond that names its neighbour.
|
|
66
|
+
installLoader(await frondAliases(scanRoot, conventions));
|
|
57
67
|
// ── 1. Scan fronds (filtered by FOUGERE_FRONDS env var) ──
|
|
58
68
|
const frondsFilter = process.env.FOUGERE_FRONDS?.split(',').map((s) => s.trim()).filter(Boolean);
|
|
59
|
-
const
|
|
60
|
-
|
|
69
|
+
const scan = await scanProject(scanRoot, frondsFilter, conventions);
|
|
70
|
+
const { fronds } = scan;
|
|
71
|
+
// ── 1b. Register @fronds/* aliases for all fronds, and watch them ──
|
|
61
72
|
// The scanned fronds ARE the watch list — nothing to declare. Without this, a
|
|
62
73
|
// frond under `apps/../..` sits outside rootDir, so Nuxt never restarts: the scan,
|
|
63
74
|
// the additive migration (once per boot) and the seeds all keep the previous shape,
|
|
64
75
|
// and a field you just added is simply absent with no error anywhere.
|
|
65
|
-
// The root frond IS the scan root, so watching its path would match every write in
|
|
66
|
-
// the project — `.nuxt/`, `node_modules/`, the build output. Its convention
|
|
67
|
-
// directories are the frond, and they are what changes when the domain changes.
|
|
68
76
|
for (const frond of fronds) {
|
|
69
|
-
nuxt.options.alias[
|
|
70
|
-
|
|
71
|
-
? FROND_DIRS.map((dir) => resolve(scanRoot, dir))
|
|
72
|
-
: [frond.source.path];
|
|
73
|
-
nuxt.options.watch.push(...watched);
|
|
77
|
+
nuxt.options.alias[frond.source.package] = frond.source.path;
|
|
78
|
+
nuxt.options.watch.push(...watchPathsOf(frond, scanRoot, conventions));
|
|
74
79
|
}
|
|
75
80
|
// ── 1b-bis. Keep entity names through minification ──────────────────────
|
|
76
81
|
//
|
|
@@ -86,7 +91,22 @@ const module = defineNuxtModule({
|
|
|
86
91
|
// The list is exact rather than guessed: the scan just ran, so these are the
|
|
87
92
|
// classes themselves, read before any bundler touched them. `@fougere/vite`
|
|
88
93
|
// does the same for the hosts that have no module to do it for them.
|
|
89
|
-
|
|
94
|
+
// What this app can DESIGNATE, never what it hosts. A CONSUMER hosts nothing and
|
|
95
|
+
// designates everything through `remotes:` — and the guard below used to read
|
|
96
|
+
// `fronds`, so the app most in need of the reservation got none: measured on a Nuxt
|
|
97
|
+
// worker consuming a remote frond, `Product` minified to `f` and the call left as
|
|
98
|
+
// `f.list`, answered `No declared remote hosts 'f'`. The error names the mangled
|
|
99
|
+
// letter, which is the only reason it was findable at all.
|
|
100
|
+
const designated = [
|
|
101
|
+
...fronds.flatMap((frond) => frond.entities.map((e) => e.entityClass.name)),
|
|
102
|
+
...(await syncedEntityNames(rootDir, conventions)),
|
|
103
|
+
];
|
|
104
|
+
const entityNames = [...new Set(designated)];
|
|
105
|
+
if (Object.keys(config.remotes ?? {}).length > 0 && entityNames.length === 0) {
|
|
106
|
+
useLogger('fougere').warn('fougere: this app declares `remotes:` and no entity name could be reserved against the minifier.\n'
|
|
107
|
+
+ ' A class name IS the JSON-RPC method, so a mangled one leaves as `f.list` and the remote refuses it.\n'
|
|
108
|
+
+ ' Run `fougere sync` so the remote entities land in .fougere/, or keep a frond of your own.');
|
|
109
|
+
}
|
|
90
110
|
if (entityNames.length > 0) {
|
|
91
111
|
const vite = (nuxt.options.vite ??= {});
|
|
92
112
|
const build = (vite.build ??= {});
|
|
@@ -102,8 +122,9 @@ const module = defineNuxtModule({
|
|
|
102
122
|
const remotes = JSON.parse(readFileSync(remotesPath, 'utf-8'));
|
|
103
123
|
for (const [name, meta] of Object.entries(remotes)) {
|
|
104
124
|
// Don't override locally scanned fronds
|
|
105
|
-
|
|
106
|
-
|
|
125
|
+
const specifier = `${conventions.scope}/${name}`;
|
|
126
|
+
if (!nuxt.options.alias[specifier]) {
|
|
127
|
+
nuxt.options.alias[specifier] = meta.path;
|
|
107
128
|
// Ensure Vite/Nitro can resolve files inside synced remotes
|
|
108
129
|
nuxt.options.build.transpile.push(meta.path);
|
|
109
130
|
}
|
|
@@ -163,12 +184,27 @@ const module = defineNuxtModule({
|
|
|
163
184
|
handler: runtimeResolve('server/auth/routes/api/me.get'),
|
|
164
185
|
});
|
|
165
186
|
}
|
|
166
|
-
// ── 6.
|
|
187
|
+
// ── 6. The scan, written down (virtual — lives in .nuxt/) ───
|
|
188
|
+
//
|
|
189
|
+
// The module ALREADY scanned, above. Without this the generated plugin scanned a
|
|
190
|
+
// second time, at runtime — which is right on a server and impossible on a Worker:
|
|
191
|
+
// measured on workerd, `readdir` throws through unenv's shim and the app boots with
|
|
192
|
+
// ZERO fronds. Every page renders, every door answers NOT_FOUND, and only the scan
|
|
193
|
+
// diagnostics say why. One scan, one value, handed to the boot.
|
|
194
|
+
//
|
|
195
|
+
// `emitScan` writes imports relative to where the module SITS, so the destination is
|
|
196
|
+
// settled before the source is produced — `dst` is that path.
|
|
197
|
+
const scanTpl = addTemplate({
|
|
198
|
+
filename: 'fougere-scan.mjs',
|
|
199
|
+
write: true,
|
|
200
|
+
getContents: ({ nuxt: n }) => emitScan(scan, { outFile: resolve(n.options.buildDir, 'fougere-scan.mjs') }),
|
|
201
|
+
});
|
|
202
|
+
// ── 6b. Boot plugin (virtual — lives in .nuxt/) ───
|
|
167
203
|
const allSeeds = orderSeeds(fronds);
|
|
168
204
|
const bootTpl = addTemplate({
|
|
169
205
|
filename: 'fougere-boot.ts',
|
|
170
206
|
write: true,
|
|
171
|
-
getContents: () => generateBootPlugin(config, allSeeds, runtimeResolve('server/utils/boot')),
|
|
207
|
+
getContents: () => generateBootPlugin(config, allSeeds, runtimeResolve('server/utils/boot'), scanTpl.dst),
|
|
172
208
|
});
|
|
173
209
|
addServerPlugin(bootTpl.dst);
|
|
174
210
|
},
|
|
@@ -177,27 +213,85 @@ export default module;
|
|
|
177
213
|
// ── Boot plugin generation ─────────────────────────
|
|
178
214
|
// Exported (not just module-internal) so its output is unit-testable without
|
|
179
215
|
// spinning up a whole Nuxt build.
|
|
180
|
-
|
|
216
|
+
/**
|
|
217
|
+
* What of the config a generated plugin can carry: values, never providers.
|
|
218
|
+
*
|
|
219
|
+
* `auth` holds a live object built by `betterAuth(...)`, so it cannot be written into a
|
|
220
|
+
* module — and it needs a database, which a codegen'd host has already resolved its own
|
|
221
|
+
* way. The rest is data and travels.
|
|
222
|
+
*/
|
|
223
|
+
function carried(config) {
|
|
224
|
+
const { remotes, adapters, sources } = config;
|
|
225
|
+
return {
|
|
226
|
+
...(remotes ? { remotes } : {}),
|
|
227
|
+
...(adapters ? { adapters } : {}),
|
|
228
|
+
...(sources ? { sources } : {}),
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* The entity names a SYNCED remote brought in — `fougere sync` writes the classes under
|
|
233
|
+
* `.fougere/`, and a consumer designates them exactly as it designates its own.
|
|
234
|
+
*
|
|
235
|
+
* By filename and not by loading them: this runs before the loader is installed, and a
|
|
236
|
+
* class file is named after its class by the same convention the scan reads.
|
|
237
|
+
*/
|
|
238
|
+
async function syncedEntityNames(rootDir, conventions) {
|
|
239
|
+
const remotesPath = resolve(rootDir, '.fougere', 'remotes.json');
|
|
240
|
+
if (!existsSync(remotesPath))
|
|
241
|
+
return [];
|
|
242
|
+
try {
|
|
243
|
+
const remotes = JSON.parse(readFileSync(remotesPath, 'utf-8'));
|
|
244
|
+
const names = [];
|
|
245
|
+
for (const { path } of Object.values(remotes)) {
|
|
246
|
+
const dir = resolve(path, conventions.dirs.entities);
|
|
247
|
+
if (!existsSync(dir))
|
|
248
|
+
continue;
|
|
249
|
+
for (const file of readdirSync(dir)) {
|
|
250
|
+
const name = file.replace(/\.(ts|js|tsx)$/, '');
|
|
251
|
+
if (name !== file)
|
|
252
|
+
names.push(name);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return names;
|
|
256
|
+
}
|
|
257
|
+
catch {
|
|
258
|
+
return [];
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
export function generateBootPlugin(config, seeds, fougereAppPath,
|
|
262
|
+
/** The module `emitScan` wrote. Absent only in the tests that predate it. */
|
|
263
|
+
scanPath) {
|
|
181
264
|
const lines = [];
|
|
182
265
|
lines.push(`// Auto-generated by @fougere/nuxt — do not edit`);
|
|
183
266
|
// Explicit imports — nitro's auto-imports don't reach this template in a prod build
|
|
184
267
|
lines.push(`import { defineNitroPlugin } from 'nitropack/runtime';`);
|
|
185
268
|
lines.push(`import { configureFougere } from '${fougereAppPath}';`);
|
|
186
|
-
|
|
187
|
-
|
|
269
|
+
// A STATIC import, because that is the one thing a bundler needs spelled out — and the
|
|
270
|
+
// whole point is that nothing reads a directory once this file is built.
|
|
271
|
+
if (scanPath)
|
|
272
|
+
lines.push(`import { scan } from '${scanPath}';`);
|
|
188
273
|
const db = config.db ?? 'sqlite';
|
|
189
274
|
const sources = config.sources;
|
|
190
275
|
// `declaresStorage` is the canonical reader of `db:` — asked, not re-interpreted.
|
|
191
276
|
// Reading `dialect` here made this codegen a SECOND reader, and the two disagreed:
|
|
192
277
|
// any value but 'sqlite' emitted an empty plugin, so no config, no seeds, not a word.
|
|
193
278
|
// resolveStorage now refuses an unresolvable dialect by name, at boot, out loud.
|
|
279
|
+
// An app with no storage still has FRONDS, and the scan is what says so. This used to
|
|
280
|
+
// emit an empty plugin, which threw the scan away with the storage — two unrelated
|
|
281
|
+
// facts, one early return. What a plugin with no storage states is exactly the scan.
|
|
194
282
|
if (!declaresStorage(db)) {
|
|
195
|
-
lines.push(
|
|
283
|
+
lines.push(``);
|
|
284
|
+
lines.push(`export default defineNitroPlugin(() => {`);
|
|
285
|
+
if (scanPath)
|
|
286
|
+
lines.push(` configureFougere({ scan, config: ${JSON.stringify(carried(config))} });`);
|
|
287
|
+
lines.push(`});`);
|
|
196
288
|
return lines.join('\n') + '\n';
|
|
197
289
|
}
|
|
198
290
|
// The generated plugin names no storage package — resolution lives in
|
|
199
291
|
// @fougere/defaults, the one place that knows which engine backs `db:`.
|
|
200
292
|
lines.push(`import { resolveStorage } from '@fougere/defaults';`);
|
|
293
|
+
// After the early return above: an app that declares no storage generates no imports.
|
|
294
|
+
lines.push(`import { migrating${seeds.length ? ', runSeeds' : ''} } from '@fougere/core';`);
|
|
201
295
|
lines.push(``);
|
|
202
296
|
// Seed imports
|
|
203
297
|
for (let i = 0; i < seeds.length; i++) {
|
|
@@ -207,35 +301,62 @@ export function generateBootPlugin(config, seeds, fougereAppPath) {
|
|
|
207
301
|
lines.push(``);
|
|
208
302
|
// Wrap all init in the plugin callback to avoid top-level native calls
|
|
209
303
|
lines.push(`export default defineNitroPlugin(async () => {`);
|
|
304
|
+
// The SCAN first, and on its own line: it names no engine, so nothing below can stop it
|
|
305
|
+
// from being stated. Measured on workerd — `resolveStorage` threw on a native driver,
|
|
306
|
+
// Nitro swallowed the plugin whole, and the app came up with zero fronds and not a word.
|
|
307
|
+
// Two unrelated facts had been sharing one failure.
|
|
308
|
+
// The scan AND what the config says about topology — both read at build, both stated
|
|
309
|
+
// here rather than re-derived. `remotes` is the whole reason a consumer boots at all:
|
|
310
|
+
// without it the app hosts nothing and reaches nothing, and its pages render empty.
|
|
311
|
+
if (scanPath)
|
|
312
|
+
lines.push(` configureFougere({ scan, config: ${JSON.stringify(carried(config))} });`);
|
|
313
|
+
lines.push(` try {`);
|
|
210
314
|
// Pass `db` through unchanged — resolveStorage (@fougere/defaults → setupSqlite)
|
|
211
315
|
// is the one place that defaults an absent path, so both call sites (this
|
|
212
316
|
// codegen'd plugin and fougereApp.ts's own fallback) land on the same file.
|
|
213
317
|
// The second argument only appears when there is something to say: an app with one
|
|
214
318
|
// database generates exactly the line it generated before.
|
|
215
319
|
const sourcesArg = sources ? `, ${JSON.stringify(sources)}` : '';
|
|
216
|
-
lines.push(`
|
|
320
|
+
lines.push(` const storage = resolveStorage(${JSON.stringify(db)}${sourcesArg});`);
|
|
217
321
|
lines.push(``);
|
|
218
|
-
lines.push(`
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
lines.push(`
|
|
222
|
-
lines.push(`
|
|
322
|
+
lines.push(` configureFougere({`);
|
|
323
|
+
if (scanPath)
|
|
324
|
+
lines.push(` scan,`);
|
|
325
|
+
lines.push(` config: ${JSON.stringify(carried(config))},`);
|
|
326
|
+
lines.push(` db: storage.db,`);
|
|
327
|
+
lines.push(` ormFactory: storage.ormFactory,`);
|
|
328
|
+
// Two members of the ascent, named — not a claim on everything after the boot. The
|
|
329
|
+
// storage's is core's own declaration (`migrating`), so this codegen states no order and
|
|
330
|
+
// cannot mistype the name it would otherwise be silently adding beside.
|
|
331
|
+
lines.push(` extensions: [`);
|
|
332
|
+
lines.push(` migrating(storage.migrate),`);
|
|
223
333
|
if (seeds.length) {
|
|
224
334
|
// The seeding LOOP is core's (`runSeeds`), not written out here: a second copy
|
|
225
335
|
// drifted, and the one that had lost its storage fallback was this one — the one
|
|
226
336
|
// that actually runs when you open the app. Codegen's only job is the static
|
|
227
337
|
// imports, which is the one thing a bundler needs spelled out.
|
|
228
338
|
//
|
|
339
|
+
// Naming it 'seeds' REPLACES core's default member rather than running beside it —
|
|
340
|
+
// which is what the old `afterBoot` claim achieved by taking over the whole post-boot.
|
|
341
|
+
//
|
|
229
342
|
// `report` is passed: its default is a no-op, so the boot you actually open said
|
|
230
343
|
// nothing about a skipped seed — the very silence F-12 was aggravated by.
|
|
231
|
-
lines.push(`
|
|
344
|
+
lines.push(` { name: 'seeds', up: (app) => runSeeds(app, [`);
|
|
232
345
|
for (let i = 0; i < seeds.length; i++) {
|
|
233
|
-
lines.push(`
|
|
346
|
+
lines.push(` { entityName: '${seeds[i].entityName}', data: seed_${i}, filePath: ${JSON.stringify(seeds[i].filePath)} },`);
|
|
234
347
|
}
|
|
235
|
-
lines.push(`
|
|
348
|
+
lines.push(` ], (message) => console.log('[fougere:seed]' + message)) },`);
|
|
236
349
|
}
|
|
237
|
-
lines.push(`
|
|
238
|
-
lines.push(`
|
|
350
|
+
lines.push(` ],`);
|
|
351
|
+
lines.push(` });`);
|
|
352
|
+
// A storage that could not be opened is REPORTED, never swallowed. Nitro takes a
|
|
353
|
+
// throwing plugin quietly, and the app then serves its pages with an empty domain —
|
|
354
|
+
// the failure mode this whole file exists to make impossible. The scan above already
|
|
355
|
+
// stands, so what is lost here is the storage and nothing else, and the line says which.
|
|
356
|
+
lines.push(` } catch (cause) {`);
|
|
357
|
+
lines.push(` console.error('[fougere] storage could not be opened — the app serves its fronds with no rows.');`);
|
|
358
|
+
lines.push(` console.error(cause);`);
|
|
359
|
+
lines.push(` }`);
|
|
239
360
|
lines.push(`});`);
|
|
240
361
|
return lines.join('\n') + '\n';
|
|
241
362
|
}
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,WAAW,EACX,UAAU,EACV,cAAc,GACf,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAenD,MAAM,MAAM,GAAG,gBAAgB,CAAuB;IACpD,IAAI,EAAE;QACJ,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,SAAS;KACrB;IAED,QAAQ,EAAE;QACR,SAAS,EAAE,QAAQ;KACpB;IAED,KAAK,CAAC,KAAK,CAAC,OAA6B,EAAE,IAAU;QACnD,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnE,MAAM,cAAc,GAAG,CAAC,GAAG,IAAc,EAAE,EAAE,CAC3C,aAAa,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;QACrC,4FAA4F;QAC5F,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,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AAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACvB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtB,iFAAiF;IACjF,oFAAoF;IACpF,qFAAqF;IACrF,yFAAyF;IACzF,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAClC,KAAK,CAAC,IAAI,CAAC,uGAAuG,CAAC,CAAC;IACpH,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IACxC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAElB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fougere/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-alpha.0",
|
|
4
4
|
"description": "The Nuxt module: Fougere's client primitives and server surface.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fougere",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@nuxt/kit": "^4.5.1",
|
|
35
35
|
"jiti": "^2.6.1",
|
|
36
|
-
"@fougere/
|
|
37
|
-
"@fougere/
|
|
38
|
-
"@fougere/defaults": "0.
|
|
36
|
+
"@fougere/core": "0.3.0-alpha.0",
|
|
37
|
+
"@fougere/app": "0.3.0-alpha.0",
|
|
38
|
+
"@fougere/defaults": "0.3.0-alpha.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@nuxt/schema": "^4.5.1",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* the same `{ path, message }` shape whoever judged.
|
|
10
10
|
*/
|
|
11
11
|
import { reactive, computed } from 'vue';
|
|
12
|
-
import {
|
|
12
|
+
import { registrationKeyOf, validationErrorsOf } from '@fougere/core/contract';
|
|
13
13
|
import { useCommand } from './useFougereData.js';
|
|
14
14
|
import { formFieldsOf, payloadOf, errorsByField, type FormEntity, type FormField } from '@fougere/app/client';
|
|
15
15
|
|
|
@@ -23,7 +23,7 @@ export interface FormOptions {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export function useFormFor<T = Record<string, unknown>>(entity: FormEntity, options: FormOptions = {}) {
|
|
26
|
-
const entityKey =
|
|
26
|
+
const entityKey = registrationKeyOf(entity.name);
|
|
27
27
|
const fields: FormField[] = formFieldsOf(entity, entityKey);
|
|
28
28
|
|
|
29
29
|
// `initial` wins over the declared default: editing a row shows the row, including a
|
|
@@ -59,8 +59,9 @@ export function useFormFor<T = Record<string, unknown>>(entity: FormEntity, opti
|
|
|
59
59
|
try {
|
|
60
60
|
return await command.execute({ params: options.params, body: payloadOf(values) });
|
|
61
61
|
} catch (err) {
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
const refusals = validationErrorsOf(err);
|
|
63
|
+
if (refusals) {
|
|
64
|
+
Object.assign(errors, errorsByField(refusals));
|
|
64
65
|
return null;
|
|
65
66
|
}
|
|
66
67
|
throw err;
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
* So the codegen imports this file by absolute path, and this file — which does sit
|
|
10
10
|
* in `@fougere/nuxt` — does the resolving. One indirection, one reason.
|
|
11
11
|
*/
|
|
12
|
-
export { configureFougere, useFougereApp, type FougereServerConfig } from '@fougere/app';
|
|
12
|
+
export { configureFougere, extendFougere, useFougereApp, type FougereServerConfig } from '@fougere/app';
|