create-nifra 2.10.0 → 2.11.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/auth.js +1 -1
- package/dist/scaffold/frameworks.d.ts +1 -1
- package/dist/scaffold/frameworks.d.ts.map +1 -1
- package/dist/scaffold/frameworks.js +2 -3
- package/dist/scaffold/frameworks.js.map +1 -1
- package/dist/scaffold/site-files.js +1 -1
- package/package.json +1 -1
- package/template/package.json +4 -4
- package/template-batteries/package.json +7 -7
- package/template-isr/package.json +6 -6
- package/template-site/README.md +2 -2
- package/template-site/gitignore +4 -1
- package/template-site/nifra.config.ts +2 -4
- package/template-site-preact/README.md +2 -2
- package/template-site-preact/nifra.config.ts +2 -4
- package/template-site-solid/README.md +1 -1
- package/template-site-svelte/README.md +1 -1
- package/template-site-vue/README.md +1 -1
package/dist/auth.js
CHANGED
|
@@ -33,7 +33,7 @@ export const AUTH_PRESETS = {
|
|
|
33
33
|
label: "better-auth",
|
|
34
34
|
note: "email/password + sessions, mounted at /api/auth/* - add OAuth providers in auth.ts.",
|
|
35
35
|
// @nifrajs/better-auth mounts it; better-auth is the implementation (peer-installed alongside).
|
|
36
|
-
deps: { "@nifrajs/better-auth": "^2.
|
|
36
|
+
deps: { "@nifrajs/better-auth": "^2.11.0", "better-auth": "^1.2.0" },
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
39
|
/** The better-auth `database` adapter expression + its import line, for the scaffolded DB's ORM. */
|
|
@@ -62,7 +62,7 @@ export interface FrameworkSpec {
|
|
|
62
62
|
* ships templates installing the PREVIOUS release. `scaffold-version.test.ts` now fails when this
|
|
63
63
|
* drifts from what core is publishing, so the footgun is a red test rather than a silent regression.
|
|
64
64
|
*/
|
|
65
|
-
export declare const NIFRA_DEP_RANGE = "^2.
|
|
65
|
+
export declare const NIFRA_DEP_RANGE = "^2.11.0";
|
|
66
66
|
/**
|
|
67
67
|
* React is first because it is the default (`--framework` omitted scaffolds it), and because the
|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U,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAA;IAC/F,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAClD,sFAAsF;IACtF,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,2EAA2E;IAC3E,QAAQ,CAAC,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAC9D,0FAA0F;IAC1F,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAC1D,sDAAsD;IACtD,QAAQ,CAAC,UAAU,EAAE;QACnB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;QACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;QAClC,kGAAkG;QAClG,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAC9B,CAAA;CACF;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,YAAY,CAAA;AAExC;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CA+DnE,CAAA;AAED,eAAO,MAAM,aAAa,UAA+B,CAAA;AAEzD,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAMvD"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* ships templates installing the PREVIOUS release. `scaffold-version.test.ts` now fails when this
|
|
21
21
|
* drifts from what core is publishing, so the footgun is a red test rather than a silent regression.
|
|
22
22
|
*/
|
|
23
|
-
export const NIFRA_DEP_RANGE = "^2.
|
|
23
|
+
export const NIFRA_DEP_RANGE = "^2.11.0";
|
|
24
24
|
/**
|
|
25
25
|
* React is first because it is the default (`--framework` omitted scaffolds it), and because the
|
|
26
26
|
* other four are most easily read as deltas from it.
|
|
@@ -34,7 +34,6 @@ export const FRAMEWORK_SPECS = {
|
|
|
34
34
|
devDependencies: {
|
|
35
35
|
"@types/react": "^19.0.0",
|
|
36
36
|
"@types/react-dom": "^19.0.0",
|
|
37
|
-
"@vitejs/plugin-react": "^4.3.0",
|
|
38
37
|
},
|
|
39
38
|
typescript: { jsx: "react-jsx", types: ["react", "react-dom"] },
|
|
40
39
|
},
|
|
@@ -43,7 +42,7 @@ export const FRAMEWORK_SPECS = {
|
|
|
43
42
|
adapter: "preactAdapter",
|
|
44
43
|
package: "@nifrajs/web-preact",
|
|
45
44
|
runtimeDependencies: { preact: "^10.25.0" },
|
|
46
|
-
devDependencies: {
|
|
45
|
+
devDependencies: {},
|
|
47
46
|
typescript: { jsx: "react-jsx", jsxImportSource: "preact" },
|
|
48
47
|
},
|
|
49
48
|
solid: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frameworks.js","sourceRoot":"","sources":["../../src/scaffold/frameworks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAwCH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAA;AAExC;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAA4C;IACtE,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,OAAO,EAAE,cAAc;QACvB,OAAO,EAAE,oBAAoB;QAC7B,mBAAmB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE;QACjE,eAAe,EAAE;YACf,cAAc,EAAE,SAAS;YACzB,kBAAkB,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"frameworks.js","s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BAAsB,EAAE,eAAe,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACpF,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/package.json
CHANGED
package/template/package.json
CHANGED
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"typecheck": "tsc --noEmit"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@nifrajs/client": "^2.
|
|
15
|
-
"@nifrajs/core": "^2.
|
|
16
|
-
"@nifrajs/schema": "^2.
|
|
14
|
+
"@nifrajs/client": "^2.11.0",
|
|
15
|
+
"@nifrajs/core": "^2.11.0",
|
|
16
|
+
"@nifrajs/schema": "^2.11.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@nifrajs/cli": "^2.
|
|
19
|
+
"@nifrajs/cli": "^2.11.0",
|
|
20
20
|
"@types/bun": "latest",
|
|
21
21
|
"typescript": "^6.0.3"
|
|
22
22
|
}
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"typecheck": "tsc --noEmit"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@nifrajs/cache": "^2.
|
|
15
|
-
"@nifrajs/client": "^2.
|
|
16
|
-
"@nifrajs/core": "^2.
|
|
17
|
-
"@nifrajs/jobs": "^2.
|
|
18
|
-
"@nifrajs/schema": "^2.
|
|
19
|
-
"@nifrajs/storage": "^2.
|
|
14
|
+
"@nifrajs/cache": "^2.11.0",
|
|
15
|
+
"@nifrajs/client": "^2.11.0",
|
|
16
|
+
"@nifrajs/core": "^2.11.0",
|
|
17
|
+
"@nifrajs/jobs": "^2.11.0",
|
|
18
|
+
"@nifrajs/schema": "^2.11.0",
|
|
19
|
+
"@nifrajs/storage": "^2.11.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@nifrajs/cli": "^2.
|
|
22
|
+
"@nifrajs/cli": "^2.11.0",
|
|
23
23
|
"@types/bun": "latest",
|
|
24
24
|
"typescript": "^6.0.3"
|
|
25
25
|
}
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
"check": "nifra check && nifra assure"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@nifrajs/client": "^2.
|
|
14
|
-
"@nifrajs/core": "^2.
|
|
15
|
-
"@nifrajs/schema": "^2.
|
|
16
|
-
"@nifrajs/web": "^2.
|
|
17
|
-
"@nifrajs/web-react": "^2.
|
|
13
|
+
"@nifrajs/client": "^2.11.0",
|
|
14
|
+
"@nifrajs/core": "^2.11.0",
|
|
15
|
+
"@nifrajs/schema": "^2.11.0",
|
|
16
|
+
"@nifrajs/web": "^2.11.0",
|
|
17
|
+
"@nifrajs/web-react": "^2.11.0",
|
|
18
18
|
"react": "^19.0.0",
|
|
19
19
|
"react-dom": "^19.0.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@nifrajs/cli": "^2.
|
|
22
|
+
"@nifrajs/cli": "^2.11.0",
|
|
23
23
|
"@types/react": "^19.0.0",
|
|
24
24
|
"@types/react-dom": "^19.0.0",
|
|
25
25
|
"typescript": "^6.0.3"
|
package/template-site/README.md
CHANGED
|
@@ -6,7 +6,7 @@ is Web-standard, so only the server entry + build target differ per platform.
|
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
bun install
|
|
9
|
-
bun run dev # nifra dev → true-HMR dev server (
|
|
9
|
+
bun run dev # nifra dev → true-HMR dev server (Bun + nifra SSR) at http://localhost:3000
|
|
10
10
|
bun run preview # wrangler pages dev dist → preview the built Cloudflare bundle (run `bun run build` first)
|
|
11
11
|
```
|
|
12
12
|
|
|
@@ -34,7 +34,7 @@ the vendor CLI.
|
|
|
34
34
|
```
|
|
35
35
|
routes/ index.tsx (landing), _layout.tsx (chrome), _404.tsx
|
|
36
36
|
framework.ts the render adapter (imported by the server entries - kept edge-bundlable)
|
|
37
|
-
nifra.config.ts the nifra CLI's dev/build config (adapter + clientModule
|
|
37
|
+
nifra.config.ts the nifra CLI's dev/build config (adapter + clientModule) - read by `nifra dev`
|
|
38
38
|
backend.ts your contract (loaders/actions call it in-process)
|
|
39
39
|
server-bun.ts Bun entry (Bun.serve) build-bun.ts → dist-bun/
|
|
40
40
|
_worker.ts Cloudflare Pages entry build.ts → dist/
|
package/template-site/gitignore
CHANGED
|
@@ -12,5 +12,8 @@ dist-deno
|
|
|
12
12
|
.wrangler
|
|
13
13
|
# generated by buildServer next to the entry
|
|
14
14
|
server-manifest.ts
|
|
15
|
-
# generated by `nifra dev`
|
|
15
|
+
# generated by `nifra dev` at the project root: the Vite pipeline's client entry, the Bun pipeline's
|
|
16
|
+
# client entry + HTML, and the Bun pipeline's generated bunfig/boundary plugin.
|
|
16
17
|
.nifra-vite-entry.tsx
|
|
18
|
+
.nifra-bun/
|
|
19
|
+
.nifra/
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// The nifra CLI's config - read by `nifra dev|build|start`. Separate from `framework.ts` (which the
|
|
2
2
|
// edge/server entries import, so it must stay edge-bundlable): THIS file is imported only by the CLI
|
|
3
|
-
// (which runs on Bun), so it's the place for dev
|
|
4
|
-
//
|
|
5
|
-
import react from "@vitejs/plugin-react"
|
|
3
|
+
// (which runs on Bun), so it's the place for CLI-only build/dev tooling. React JSX is Bun-native,
|
|
4
|
+
// so the default dev loop needs no Vite plugin.
|
|
6
5
|
|
|
7
6
|
export { adapter } from "./framework"
|
|
8
7
|
export const clientModule = "@nifrajs/web-react/client"
|
|
9
|
-
export const vitePlugins = [react()]
|
|
@@ -6,7 +6,7 @@ is Web-standard, so only the server entry + build target differ per platform.
|
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
bun install
|
|
9
|
-
bun run dev # nifra dev → true-HMR dev server (
|
|
9
|
+
bun run dev # nifra dev → true-HMR dev server (Bun + nifra SSR) at http://localhost:3000
|
|
10
10
|
bun run preview # wrangler pages dev dist → preview the built Cloudflare bundle (run `bun run build` first)
|
|
11
11
|
```
|
|
12
12
|
|
|
@@ -33,7 +33,7 @@ configs (`Dockerfile`, `deno.json`, `wrangler.toml`, Vercel Build Output API); y
|
|
|
33
33
|
```
|
|
34
34
|
routes/ index.tsx (landing), _layout.tsx (chrome), _404.tsx
|
|
35
35
|
framework.ts the adapter (preactAdapter) - imported by the server entries (edge-bundlable)
|
|
36
|
-
nifra.config.ts the nifra CLI's dev/build config (adapter + clientModule
|
|
36
|
+
nifra.config.ts the nifra CLI's dev/build config (adapter + clientModule) - read by `nifra dev`
|
|
37
37
|
backend.ts your contract (loaders/actions call it in-process)
|
|
38
38
|
server-bun.ts Bun entry (Bun.serve) build-bun.ts → dist-bun/
|
|
39
39
|
_worker.ts Cloudflare Pages entry build.ts → dist/
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// The nifra CLI's config - read by `nifra dev|build|start`. Separate from `framework.ts` (which the
|
|
2
2
|
// edge/server entries import, so it must stay edge-bundlable): THIS file is imported only by the CLI
|
|
3
|
-
// (which runs on Bun), so it's the place for dev
|
|
4
|
-
//
|
|
5
|
-
import preact from "@preact/preset-vite"
|
|
3
|
+
// (which runs on Bun), so it's the place for CLI-only build/dev tooling. Preact JSX is Bun-native,
|
|
4
|
+
// so the default dev loop needs no Vite plugin.
|
|
6
5
|
|
|
7
6
|
export { adapter } from "./framework"
|
|
8
7
|
export const clientModule = "@nifrajs/web-preact/client"
|
|
9
|
-
export const vitePlugins = [preact()]
|
|
@@ -6,7 +6,7 @@ is Web-standard, so only the server entry + build target differ per platform.
|
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
bun install
|
|
9
|
-
bun run dev # nifra dev → true-HMR dev server (
|
|
9
|
+
bun run dev # nifra dev → true-HMR dev server (Bun + nifra SSR) at http://localhost:3000
|
|
10
10
|
bun run preview # wrangler pages dev dist → preview the built Cloudflare bundle (run `bun run build` first)
|
|
11
11
|
```
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ is Web-standard, so only the server entry + build target differ per platform.
|
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
bun install
|
|
9
|
-
bun run dev # nifra dev → true-HMR dev server (
|
|
9
|
+
bun run dev # nifra dev → true-HMR dev server (Bun + nifra SSR) at http://localhost:3000
|
|
10
10
|
bun run preview # wrangler pages dev dist → preview the built Cloudflare bundle (run `bun run build` first)
|
|
11
11
|
```
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ is Web-standard, so only the server entry + build target differ per platform.
|
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
bun install
|
|
9
|
-
bun run dev # nifra dev → true-HMR dev server (
|
|
9
|
+
bun run dev # nifra dev → true-HMR dev server (Bun + nifra SSR) at http://localhost:3000
|
|
10
10
|
bun run preview # wrangler pages dev dist → preview the built Cloudflare bundle (run `bun run build` first)
|
|
11
11
|
```
|
|
12
12
|
|