@fougere/next 0.14.0-alpha.0 → 0.15.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/config.d.ts +8 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +15 -8
- package/dist/config.js.map +1 -1
- package/package.json +6 -5
- package/src/config.ts +15 -8
- package/template/app/%5Ffougere/call/[[...surface]]/route.ts +1 -0
- package/template/app/%5Ffougere/session/route.ts +1 -0
- package/template/app/page.tsx +11 -17
- package/template/app/welcome.css +21 -0
- package/template/scaffold.json +38 -0
- package/template/app/layout.tsx +0 -3
- package/template/next.config.mjs +0 -11
- package/template/package.json +0 -22
- package/template/tsconfig.json +0 -19
package/dist/config.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import type { NextConfig } from 'next';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* `root` is where the fronds are — `'../..'` for an app under `apps/`, the same option `fougere()`
|
|
4
|
+
* takes for Vite and `fougere:` for Nuxt. The facade is written in the app, where its tsconfig
|
|
5
|
+
* looks for it, and the boot learns the root through `FOUGERE_ROOT`, as it does under Vite.
|
|
6
|
+
*/
|
|
7
|
+
export declare function withFougere(config?: NextConfig, options?: {
|
|
8
|
+
root?: string;
|
|
9
|
+
}): NextConfig;
|
|
3
10
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAmCvC,wBAAgB,WAAW,CAAC,MAAM,GAAE,UAAe,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAmCvC;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,GAAE,UAAe,EAAE,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,UAAU,CAgDhG"}
|
package/dist/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** `withFougere(config)` — what Next has to be told so a Fougere app builds. */
|
|
2
2
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
3
|
-
import { dirname, join } from 'node:path';
|
|
3
|
+
import { dirname, join, resolve } from 'node:path';
|
|
4
4
|
import TerserPlugin from 'terser-webpack-plugin';
|
|
5
5
|
import { RUNTIME_PACKAGES } from '@fougere/compiler';
|
|
6
6
|
/** Where the facades land, and what a page imports them by. */
|
|
@@ -14,7 +14,7 @@ const SPECIFIER = '@fronds/facade';
|
|
|
14
14
|
* sources, so a TS-aware loader is installed first — without it `scanProject` throws and the
|
|
15
15
|
* module is silently never written.
|
|
16
16
|
*/
|
|
17
|
-
async function writeFacades(root) {
|
|
17
|
+
async function writeFacades(root, app) {
|
|
18
18
|
try {
|
|
19
19
|
const { scanProject, emitFacade, frondAliases } = await import('@fougere/compiler');
|
|
20
20
|
const { setModuleLoader } = await import('@fougere/core/node');
|
|
@@ -25,16 +25,23 @@ async function writeFacades(root) {
|
|
|
25
25
|
alias: await frondAliases(root, resolveConventions()),
|
|
26
26
|
});
|
|
27
27
|
setModuleLoader((filePath) => jiti.import(filePath));
|
|
28
|
-
const out = join(
|
|
28
|
+
const out = join(app, FACADE);
|
|
29
29
|
mkdirSync(dirname(out), { recursive: true });
|
|
30
30
|
writeFileSync(out, emitFacade(await scanProject(root), { outFile: out }));
|
|
31
31
|
}
|
|
32
32
|
catch { /* a host with no fronds, or a scan that could not run */ }
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
/**
|
|
35
|
+
* `root` is where the fronds are — `'../..'` for an app under `apps/`, the same option `fougere()`
|
|
36
|
+
* takes for Vite and `fougere:` for Nuxt. The facade is written in the app, where its tsconfig
|
|
37
|
+
* looks for it, and the boot learns the root through `FOUGERE_ROOT`, as it does under Vite.
|
|
38
|
+
*/
|
|
39
|
+
export function withFougere(config = {}, options = {}) {
|
|
35
40
|
const userWebpack = config.webpack;
|
|
36
|
-
const
|
|
37
|
-
const
|
|
41
|
+
const app = process.cwd();
|
|
42
|
+
const root = resolve(app, options.root ?? '.');
|
|
43
|
+
process.env.FOUGERE_ROOT = root;
|
|
44
|
+
const written = writeFacades(root, app);
|
|
38
45
|
return {
|
|
39
46
|
...config,
|
|
40
47
|
// Additive: whatever the app already listed is kept.
|
|
@@ -47,7 +54,7 @@ export function withFougere(config = {}) {
|
|
|
47
54
|
// project that never generated it fails to resolve rather than losing its types in silence.
|
|
48
55
|
turbopack: {
|
|
49
56
|
...config.turbopack,
|
|
50
|
-
resolveAlias: { ...config.turbopack?.resolveAlias, [SPECIFIER]: join(
|
|
57
|
+
resolveAlias: { ...config.turbopack?.resolveAlias, [SPECIFIER]: join(app, FACADE) },
|
|
51
58
|
},
|
|
52
59
|
webpack: (webpackConfig, context) => {
|
|
53
60
|
// The app's own webpack function runs FIRST, so it sees an untouched config
|
|
@@ -55,7 +62,7 @@ export function withFougere(config = {}) {
|
|
|
55
62
|
const base = userWebpack ? userWebpack(webpackConfig, context) : webpackConfig;
|
|
56
63
|
void written;
|
|
57
64
|
base.resolve ??= {};
|
|
58
|
-
base.resolve.alias = { ...base.resolve.alias, [SPECIFIER]: join(
|
|
65
|
+
base.resolve.alias = { ...base.resolve.alias, [SPECIFIER]: join(app, FACADE) };
|
|
59
66
|
base.optimization ??= {};
|
|
60
67
|
// ONLY the JS minifier is replaced. Next's minimizers are plain functions with
|
|
61
68
|
// no readable options, so they are told apart by their source: index 0 loads
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,EAAE,SAAS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AgD;YAChD,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;YAE/E,KAAK,OAAO,CAAC;YACb,IAAI,CAAC,OAAO,KAAK,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC;YAE/E,IAAI,CAAC,YAAY,KAAK,EAAE,CAAC;YACzB,+EAA+E;YAC/E,6EAA6E;YAC7E,gFAAgF;YAChF,gFAAgF;YAChF,yDAAyD;YACzD,MAAM,YAAY,GAAG,CAAC,CAAU,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;YACjF,IAAI,CAAC,YAAY,CAAC,SAAS,GAAG;gBAC5B,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;gBAC/E,2EAA2E;gBAC3E,0EAA0E;gBAC1E,+DAA+D;gBAC/D,IAAI,YAAY,CAAC,EAAE,aAAa,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,CAAC;aAC/D,CAAC;YAEF,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fougere/next",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0-alpha.0",
|
|
4
4
|
"description": "The Next.js adapter: mounting, and the one import that is genuinely Next.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fougere",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"./config": {
|
|
41
41
|
"types": "./dist/config.d.ts",
|
|
42
|
-
"import": "./dist/config.js"
|
|
42
|
+
"import": "./dist/config.js",
|
|
43
|
+
"default": "./dist/config.js"
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
46
|
"files": [
|
|
@@ -48,9 +49,9 @@
|
|
|
48
49
|
"template"
|
|
49
50
|
],
|
|
50
51
|
"dependencies": {
|
|
51
|
-
"@fougere/app": "0.
|
|
52
|
-
"@fougere/compiler": "0.
|
|
53
|
-
"@fougere/core": "0.
|
|
52
|
+
"@fougere/app": "0.15.0-alpha.0",
|
|
53
|
+
"@fougere/compiler": "0.15.0-alpha.0",
|
|
54
|
+
"@fougere/core": "0.15.0-alpha.0",
|
|
54
55
|
"jiti": "^2.7.0",
|
|
55
56
|
"terser-webpack-plugin": "^5.3.14"
|
|
56
57
|
},
|
package/src/config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** `withFougere(config)` — what Next has to be told so a Fougere app builds. */
|
|
2
2
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
3
|
-
import { dirname, join } from 'node:path';
|
|
3
|
+
import { dirname, join, resolve } from 'node:path';
|
|
4
4
|
import TerserPlugin from 'terser-webpack-plugin';
|
|
5
5
|
import type { NextConfig } from 'next';
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ const SPECIFIER = '@fronds/facade';
|
|
|
18
18
|
* sources, so a TS-aware loader is installed first — without it `scanProject` throws and the
|
|
19
19
|
* module is silently never written.
|
|
20
20
|
*/
|
|
21
|
-
async function writeFacades(root: string): Promise<void> {
|
|
21
|
+
async function writeFacades(root: string, app: string): Promise<void> {
|
|
22
22
|
try {
|
|
23
23
|
const { scanProject, emitFacade, frondAliases } = await import('@fougere/compiler');
|
|
24
24
|
const { setModuleLoader } = await import('@fougere/core/node');
|
|
@@ -31,16 +31,23 @@ async function writeFacades(root: string): Promise<void> {
|
|
|
31
31
|
});
|
|
32
32
|
setModuleLoader((filePath: string) => jiti.import(filePath) as Promise<Record<string, unknown>>);
|
|
33
33
|
|
|
34
|
-
const out = join(
|
|
34
|
+
const out = join(app, FACADE);
|
|
35
35
|
mkdirSync(dirname(out), { recursive: true });
|
|
36
36
|
writeFileSync(out, emitFacade(await scanProject(root), { outFile: out }));
|
|
37
37
|
} catch { /* a host with no fronds, or a scan that could not run */ }
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
/**
|
|
41
|
+
* `root` is where the fronds are — `'../..'` for an app under `apps/`, the same option `fougere()`
|
|
42
|
+
* takes for Vite and `fougere:` for Nuxt. The facade is written in the app, where its tsconfig
|
|
43
|
+
* looks for it, and the boot learns the root through `FOUGERE_ROOT`, as it does under Vite.
|
|
44
|
+
*/
|
|
45
|
+
export function withFougere(config: NextConfig = {}, options: { root?: string } = {}): NextConfig {
|
|
41
46
|
const userWebpack = config.webpack;
|
|
42
|
-
const
|
|
43
|
-
const
|
|
47
|
+
const app = process.cwd();
|
|
48
|
+
const root = resolve(app, options.root ?? '.');
|
|
49
|
+
process.env.FOUGERE_ROOT = root;
|
|
50
|
+
const written = writeFacades(root, app);
|
|
44
51
|
|
|
45
52
|
return {
|
|
46
53
|
...config,
|
|
@@ -54,7 +61,7 @@ export function withFougere(config: NextConfig = {}): NextConfig {
|
|
|
54
61
|
// project that never generated it fails to resolve rather than losing its types in silence.
|
|
55
62
|
turbopack: {
|
|
56
63
|
...config.turbopack,
|
|
57
|
-
resolveAlias: { ...config.turbopack?.resolveAlias, [SPECIFIER]: join(
|
|
64
|
+
resolveAlias: { ...config.turbopack?.resolveAlias, [SPECIFIER]: join(app, FACADE) },
|
|
58
65
|
},
|
|
59
66
|
webpack: (webpackConfig, context) => {
|
|
60
67
|
// The app's own webpack function runs FIRST, so it sees an untouched config
|
|
@@ -63,7 +70,7 @@ export function withFougere(config: NextConfig = {}): NextConfig {
|
|
|
63
70
|
|
|
64
71
|
void written;
|
|
65
72
|
base.resolve ??= {};
|
|
66
|
-
base.resolve.alias = { ...base.resolve.alias, [SPECIFIER]: join(
|
|
73
|
+
base.resolve.alias = { ...base.resolve.alias, [SPECIFIER]: join(app, FACADE) };
|
|
67
74
|
|
|
68
75
|
base.optimization ??= {};
|
|
69
76
|
// ONLY the JS minifier is replaced. Next's minimizers are plain functions with
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { POST } from '@fougere/next/call';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GET } from '@fougere/next/session';
|
package/template/app/page.tsx
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { invoke } from '@fougere/next';
|
|
3
|
-
// Replace with an entity your own frond declares.
|
|
4
|
-
import Post from '@fronds/blog/entities/Post';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A server component reading a Frond directly — no fetch, no endpoint, no route.
|
|
8
|
-
*
|
|
9
|
-
* `invoke` names the call and the runner places it: in memory here, over JSON-RPC the day
|
|
10
|
-
* `remotes:` names the frond in `fougere.config.ts`. A page that needs reactivity uses
|
|
11
|
-
* `useQuery` from `@fougere/react` instead, with a facade from `@fronds/facade`.
|
|
12
|
-
*/
|
|
13
|
-
export default async function Home() {
|
|
14
|
-
const { items: rows } = await invoke<Page<Post>>(Post, 'list');
|
|
1
|
+
import './welcome.css';
|
|
15
2
|
|
|
3
|
+
export default function Home() {
|
|
16
4
|
return (
|
|
17
|
-
<main
|
|
18
|
-
<h1
|
|
19
|
-
|
|
5
|
+
<main className="welcome">
|
|
6
|
+
<h1>🌿 Fougere</h1>
|
|
7
|
+
<p className="host">Your app is running on <strong>Next.js</strong>.</p>
|
|
8
|
+
<ol>
|
|
9
|
+
<li><a href="https://fougere.dev/docs/guides/business-logic">Handle your business logic <span>→</span></a></li>
|
|
10
|
+
<li><a href="https://fougere.dev/docs/guides/data">Store your data <span>→</span></a></li>
|
|
11
|
+
<li><a href="https://fougere.dev/docs/guides/topology">Shape your topology <span>→</span></a></li>
|
|
12
|
+
</ol>
|
|
13
|
+
<footer><a href="https://fougere.dev/docs">Docs</a></footer>
|
|
20
14
|
</main>
|
|
21
15
|
);
|
|
22
16
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: light dark;
|
|
3
|
+
--ink: #25372d; --muted: #65736a; --line: #dce3d9; --green: #38714c; --wash: #eaf0e6; --bg: #f7f8f4;
|
|
4
|
+
}
|
|
5
|
+
@media (prefers-color-scheme: dark) {
|
|
6
|
+
:root { --ink: #e0e8df; --muted: #9ca99e; --line: #303c32; --green: #9bc99d; --wash: #29392c; --bg: #151c18; }
|
|
7
|
+
}
|
|
8
|
+
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 system-ui, sans-serif; }
|
|
9
|
+
.welcome { max-width: 520px; margin: 0 auto; padding: 64px 24px 40px; }
|
|
10
|
+
.welcome h1 { margin: 0; font-size: 20px; font-weight: 600; }
|
|
11
|
+
.welcome .host { margin: 12px 0 40px; color: var(--muted); }
|
|
12
|
+
.welcome .host strong { color: var(--ink); font-weight: 500; }
|
|
13
|
+
.welcome ol { margin: 0; padding-left: 32px; }
|
|
14
|
+
.welcome li { padding-left: 8px; border-bottom: 1px solid var(--line); }
|
|
15
|
+
.welcome li::marker { color: var(--muted); font-size: 12px; }
|
|
16
|
+
.welcome li a { display: flex; justify-content: space-between; gap: 20px; padding: 17px 12px; border-radius: 6px; color: inherit; font-size: 18px; text-decoration: none; }
|
|
17
|
+
.welcome li a span { color: var(--muted); }
|
|
18
|
+
.welcome li:first-child a { background: var(--wash); color: var(--green); font-weight: 600; }
|
|
19
|
+
.welcome li a:hover { background: var(--wash); color: var(--green); }
|
|
20
|
+
.welcome footer { margin-top: 32px; font-size: 13px; }
|
|
21
|
+
.welcome footer a { color: var(--muted); }
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"create": [
|
|
3
|
+
"create-next-app@16",
|
|
4
|
+
"{dir}",
|
|
5
|
+
"--ts",
|
|
6
|
+
"--app",
|
|
7
|
+
"--skip-install",
|
|
8
|
+
"--disable-git",
|
|
9
|
+
"--use-pnpm",
|
|
10
|
+
"--yes",
|
|
11
|
+
"--no-tailwind",
|
|
12
|
+
"--no-eslint",
|
|
13
|
+
"--no-src-dir",
|
|
14
|
+
"--import-alias",
|
|
15
|
+
"@/*",
|
|
16
|
+
"--empty"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@fougere/core": "latest",
|
|
20
|
+
"@fougere/schema": "latest",
|
|
21
|
+
"@fougere/defaults": "latest",
|
|
22
|
+
"@fougere/container": "latest",
|
|
23
|
+
"better-sqlite3": "^13.0.3",
|
|
24
|
+
"kysely": "^0.28.17",
|
|
25
|
+
"@fougere/next": "latest",
|
|
26
|
+
"@fougere/react": "latest"
|
|
27
|
+
},
|
|
28
|
+
"wire": {
|
|
29
|
+
"kind": "wrapExport",
|
|
30
|
+
"file": "next.config.ts",
|
|
31
|
+
"from": "@fougere/next/config",
|
|
32
|
+
"imported": "withFougere",
|
|
33
|
+
"options": {
|
|
34
|
+
"root": "../.."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"tsconfig": "tsconfig.json"
|
|
38
|
+
}
|
package/template/app/layout.tsx
DELETED
package/template/next.config.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { withFougere } from '@fougere/next/config';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* `.mjs` and not `.ts`: Next loads a TypeScript config through a CommonJS require, and
|
|
5
|
-
* `@fougere/next` is ESM-only — the subpath does not resolve there. An `.mjs` config goes
|
|
6
|
-
* through Node's ESM loader, which resolves it fine.
|
|
7
|
-
*
|
|
8
|
-
* `withFougere` states the two things Next has to know: the packages a boot loads at runtime,
|
|
9
|
-
* and a minifier that keeps class names. Your own config goes in the object, untouched.
|
|
10
|
-
*/
|
|
11
|
-
export default withFougere();
|
package/template/package.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "fougere-app",
|
|
3
|
-
"private": true,
|
|
4
|
-
"type": "module",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "next dev",
|
|
7
|
-
"build": "next build"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"@fougere/core": "latest",
|
|
11
|
-
"@fougere/next": "latest",
|
|
12
|
-
"@fougere/react": "latest",
|
|
13
|
-
"@fougere/schema": "latest",
|
|
14
|
-
"@fougere/defaults": "latest",
|
|
15
|
-
"@fougere/container": "latest",
|
|
16
|
-
"better-sqlite3": "^13.0.3",
|
|
17
|
-
"kysely": "^0.28.17",
|
|
18
|
-
"next": "^15.0.0",
|
|
19
|
-
"react": "^19.0.0",
|
|
20
|
-
"react-dom": "^19.0.0"
|
|
21
|
-
}
|
|
22
|
-
}
|
package/template/tsconfig.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@fougere/core/tsconfig",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "ES2022",
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "Bundler",
|
|
7
|
-
"jsx": "preserve",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"noEmit": true,
|
|
10
|
-
"types": [
|
|
11
|
-
"node",
|
|
12
|
-
"react"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
"include": [
|
|
16
|
-
"app",
|
|
17
|
-
"next-env.d.ts"
|
|
18
|
-
]
|
|
19
|
-
}
|