@rshono/create 1.0.0-rc.3 → 1.0.0-rc.4
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/api.mjs +4 -39
- package/dist/cli.mjs +5 -40
- package/package.json +2 -2
- package/templates/base/rshono.config.ts +0 -2
- package/templates/base/src/components/layout.tsx +1 -4
- package/templates/base/src/server.ts +1 -1
- package/templates/tailwind/rshono.config.ts +0 -2
- package/templates/tailwind/src/components/layout.tsx +1 -4
package/dist/api.mjs
CHANGED
|
@@ -79,11 +79,11 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
79
79
|
|
|
80
80
|
;// CONCATENATED MODULE: ./src/generated/framework.ts
|
|
81
81
|
// GENERATED by scripts/codegen.mjs from packages/core — do not edit. Run `pnpm --filter @rshono/create codegen`.
|
|
82
|
-
/** The framework release a scaffolded app is pinned to: this package and rshono ship together. */ const RSHONO_VERSION = '1.0.0-rc.
|
|
82
|
+
/** The framework release a scaffolded app is pinned to: this package and rshono ship together. */ const RSHONO_VERSION = '1.0.0-rc.4';
|
|
83
83
|
/**
|
|
84
84
|
* The Node range rshono itself declares, restated in every scaffolded app's `engines` — so a CI image
|
|
85
85
|
* or a contributor on an older Node hears it from their package manager rather than from a stack trace.
|
|
86
|
-
*/ const NODE_ENGINE = '>=22.
|
|
86
|
+
*/ const NODE_ENGINE = '>=22.18.0';
|
|
87
87
|
/**
|
|
88
88
|
* The dependency versions rshono is tested against, copied from its own manifest. Exact where it is
|
|
89
89
|
* exact — React's RSC internals are coupled across builds, and a generated app has no workspace
|
|
@@ -105,22 +105,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
105
105
|
name: 'cloudflare',
|
|
106
106
|
hint: 'deploy with `wrangler deploy`'
|
|
107
107
|
},
|
|
108
|
-
{
|
|
109
|
-
name: 'bun',
|
|
110
|
-
hint: 'run `bun dist/server/main.mjs`'
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: 'deno',
|
|
114
|
-
hint: 'run `deno serve -A dist/server/main.mjs`'
|
|
115
|
-
},
|
|
116
108
|
{
|
|
117
109
|
name: 'vercel',
|
|
118
110
|
hint: 'deploy with `vercel deploy --prebuilt`'
|
|
119
111
|
},
|
|
120
|
-
{
|
|
121
|
-
name: 'netlify',
|
|
122
|
-
hint: 'deploy with `netlify deploy --build=false --dir=.netlify/publish`'
|
|
123
|
-
},
|
|
124
112
|
{
|
|
125
113
|
name: 'aws-lambda',
|
|
126
114
|
hint: 'zip dist/ with the handler at dist/server/main.mjs'
|
|
@@ -194,20 +182,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
194
182
|
start: 'rshono start'
|
|
195
183
|
}
|
|
196
184
|
},
|
|
197
|
-
// `rshono start` is the Node target's launcher and refuses a build made for another platform, so
|
|
198
|
-
// these two get the command their own runtime uses under the same script name.
|
|
199
|
-
bun: {
|
|
200
|
-
id: 'deploy-bun',
|
|
201
|
-
scripts: {
|
|
202
|
-
start: 'bun dist/server/main.mjs'
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
deno: {
|
|
206
|
-
id: 'deploy-deno',
|
|
207
|
-
scripts: {
|
|
208
|
-
start: 'deno serve -A dist/server/main.mjs'
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
185
|
cloudflare: {
|
|
212
186
|
id: 'deploy-cloudflare',
|
|
213
187
|
devDependencies: {
|
|
@@ -240,15 +214,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
240
214
|
'--prebuilt uploads what rshono build assembled; the platform must not rebuild it.'
|
|
241
215
|
]
|
|
242
216
|
},
|
|
243
|
-
netlify: {
|
|
244
|
-
id: 'deploy-netlify',
|
|
245
|
-
scripts: {
|
|
246
|
-
deploy: 'rshono build && netlify deploy --build=false --dir=.netlify/publish'
|
|
247
|
-
},
|
|
248
|
-
gitignore: [
|
|
249
|
-
'.netlify/'
|
|
250
|
-
]
|
|
251
|
-
},
|
|
252
217
|
'aws-lambda': {
|
|
253
218
|
id: 'deploy-aws-lambda',
|
|
254
219
|
notes: [
|
|
@@ -516,8 +481,8 @@ const QUALITY_PRESETS = [
|
|
|
516
481
|
|
|
517
482
|
/**
|
|
518
483
|
* The scripts every app gets. `start` is not among them, because it means something different per
|
|
519
|
-
* platform: the
|
|
520
|
-
*
|
|
484
|
+
* platform: `node` is the one target that runs the build itself, so it contributes its own, and a
|
|
485
|
+
* platform target contributes a `deploy` instead, where its platform has one command to give.
|
|
521
486
|
*/ const BASE_SCRIPTS = {
|
|
522
487
|
dev: 'rshono dev',
|
|
523
488
|
build: 'rshono build',
|
package/dist/cli.mjs
CHANGED
|
@@ -2943,11 +2943,11 @@ function hasGit(cwd) {
|
|
|
2943
2943
|
|
|
2944
2944
|
;// CONCATENATED MODULE: ./src/generated/framework.ts
|
|
2945
2945
|
// GENERATED by scripts/codegen.mjs from packages/core — do not edit. Run `pnpm --filter @rshono/create codegen`.
|
|
2946
|
-
/** The framework release a scaffolded app is pinned to: this package and rshono ship together. */ const RSHONO_VERSION = '1.0.0-rc.
|
|
2946
|
+
/** The framework release a scaffolded app is pinned to: this package and rshono ship together. */ const RSHONO_VERSION = '1.0.0-rc.4';
|
|
2947
2947
|
/**
|
|
2948
2948
|
* The Node range rshono itself declares, restated in every scaffolded app's `engines` — so a CI image
|
|
2949
2949
|
* or a contributor on an older Node hears it from their package manager rather than from a stack trace.
|
|
2950
|
-
*/ const NODE_ENGINE = '>=22.
|
|
2950
|
+
*/ const NODE_ENGINE = '>=22.18.0';
|
|
2951
2951
|
/**
|
|
2952
2952
|
* The dependency versions rshono is tested against, copied from its own manifest. Exact where it is
|
|
2953
2953
|
* exact — React's RSC internals are coupled across builds, and a generated app has no workspace
|
|
@@ -2969,22 +2969,10 @@ function hasGit(cwd) {
|
|
|
2969
2969
|
name: 'cloudflare',
|
|
2970
2970
|
hint: 'deploy with `wrangler deploy`'
|
|
2971
2971
|
},
|
|
2972
|
-
{
|
|
2973
|
-
name: 'bun',
|
|
2974
|
-
hint: 'run `bun dist/server/main.mjs`'
|
|
2975
|
-
},
|
|
2976
|
-
{
|
|
2977
|
-
name: 'deno',
|
|
2978
|
-
hint: 'run `deno serve -A dist/server/main.mjs`'
|
|
2979
|
-
},
|
|
2980
2972
|
{
|
|
2981
2973
|
name: 'vercel',
|
|
2982
2974
|
hint: 'deploy with `vercel deploy --prebuilt`'
|
|
2983
2975
|
},
|
|
2984
|
-
{
|
|
2985
|
-
name: 'netlify',
|
|
2986
|
-
hint: 'deploy with `netlify deploy --build=false --dir=.netlify/publish`'
|
|
2987
|
-
},
|
|
2988
2976
|
{
|
|
2989
2977
|
name: 'aws-lambda',
|
|
2990
2978
|
hint: 'zip dist/ with the handler at dist/server/main.mjs'
|
|
@@ -3170,20 +3158,6 @@ const QUALITY_PRESETS = [
|
|
|
3170
3158
|
start: 'rshono start'
|
|
3171
3159
|
}
|
|
3172
3160
|
},
|
|
3173
|
-
// `rshono start` is the Node target's launcher and refuses a build made for another platform, so
|
|
3174
|
-
// these two get the command their own runtime uses under the same script name.
|
|
3175
|
-
bun: {
|
|
3176
|
-
id: 'deploy-bun',
|
|
3177
|
-
scripts: {
|
|
3178
|
-
start: 'bun dist/server/main.mjs'
|
|
3179
|
-
}
|
|
3180
|
-
},
|
|
3181
|
-
deno: {
|
|
3182
|
-
id: 'deploy-deno',
|
|
3183
|
-
scripts: {
|
|
3184
|
-
start: 'deno serve -A dist/server/main.mjs'
|
|
3185
|
-
}
|
|
3186
|
-
},
|
|
3187
3161
|
cloudflare: {
|
|
3188
3162
|
id: 'deploy-cloudflare',
|
|
3189
3163
|
devDependencies: {
|
|
@@ -3216,15 +3190,6 @@ const QUALITY_PRESETS = [
|
|
|
3216
3190
|
'--prebuilt uploads what rshono build assembled; the platform must not rebuild it.'
|
|
3217
3191
|
]
|
|
3218
3192
|
},
|
|
3219
|
-
netlify: {
|
|
3220
|
-
id: 'deploy-netlify',
|
|
3221
|
-
scripts: {
|
|
3222
|
-
deploy: 'rshono build && netlify deploy --build=false --dir=.netlify/publish'
|
|
3223
|
-
},
|
|
3224
|
-
gitignore: [
|
|
3225
|
-
'.netlify/'
|
|
3226
|
-
]
|
|
3227
|
-
},
|
|
3228
3193
|
'aws-lambda': {
|
|
3229
3194
|
id: 'deploy-aws-lambda',
|
|
3230
3195
|
notes: [
|
|
@@ -3403,8 +3368,8 @@ function stylingFeature(styling) {
|
|
|
3403
3368
|
|
|
3404
3369
|
/**
|
|
3405
3370
|
* The scripts every app gets. `start` is not among them, because it means something different per
|
|
3406
|
-
* platform: the
|
|
3407
|
-
*
|
|
3371
|
+
* platform: `node` is the one target that runs the build itself, so it contributes its own, and a
|
|
3372
|
+
* platform target contributes a `deploy` instead, where its platform has one command to give.
|
|
3408
3373
|
*/ const BASE_SCRIPTS = {
|
|
3409
3374
|
dev: 'rshono dev',
|
|
3410
3375
|
build: 'rshono build',
|
|
@@ -3881,7 +3846,7 @@ function fail(message) {
|
|
|
3881
3846
|
async function main() {
|
|
3882
3847
|
const { values, positionals } = parse();
|
|
3883
3848
|
if (values.help) return console.log(HELP);
|
|
3884
|
-
if (values.version) return console.log("1.0.0-rc.
|
|
3849
|
+
if (values.version) return console.log("1.0.0-rc.4");
|
|
3885
3850
|
/*
|
|
3886
3851
|
* A pipe, a CI job or an agent gets the defaults rather than a prompt nothing can answer. Both streams
|
|
3887
3852
|
* have to be a terminal: the prompts draw on stdout but *read from stdin*, so `echo | npx @rshono/create`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rshono/create",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
4
|
"description": "Scaffold a new rshono app — Hono + Rspack + React Server Components",
|
|
5
5
|
"author": "Lasse <lasse@lassetange.com> (https://www.lassetange.com)",
|
|
6
6
|
"license": "ISC",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@rspack/core": "2.1.5",
|
|
47
47
|
"@types/node": "^26.1.1",
|
|
48
48
|
"typescript": "^7.0.2",
|
|
49
|
-
"@rshono/core": "1.0.0-rc.
|
|
49
|
+
"@rshono/core": "1.0.0-rc.4"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "node scripts/codegen.mjs && node scripts/build.mjs",
|
|
@@ -25,8 +25,6 @@ export default defineConfig({
|
|
|
25
25
|
// csp: false, // strict per-request-nonce Content-Security-Policy
|
|
26
26
|
// cspDirectives: {}, // widen it, e.g. { 'img-src': "'self' https://cdn.example.com" }
|
|
27
27
|
// bodySizeLimit: '1mb',// request body cap before a 413; false disables it
|
|
28
|
-
// renderTimeout: 10_000, // ms deadline for a request (action + flight + SSR)
|
|
29
|
-
// compress: true, // gzip; turn off behind a proxy that already does it
|
|
30
28
|
|
|
31
29
|
// Escape hatch: mutate the generated Rspack config just before it compiles. Called once per compiler.
|
|
32
30
|
// rspack(config, { isServer, isDev }) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { NavigationProgress } from '@rshono/core/client';
|
|
2
1
|
import type { ReactNode } from 'react';
|
|
3
2
|
import { publicEnv } from '../lib/env';
|
|
4
3
|
import '../styles.css';
|
|
@@ -20,14 +19,12 @@ export function Layout({ title, description, children }: { title?: string; descr
|
|
|
20
19
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
21
20
|
</head>
|
|
22
21
|
<body>
|
|
23
|
-
{/* Paints during a soft navigation, so a slow page still feels answered. */}
|
|
24
|
-
<NavigationProgress />
|
|
25
22
|
<header>
|
|
26
23
|
<nav>
|
|
27
24
|
<a href="/">
|
|
28
25
|
<strong>{publicEnv.appName}</strong>
|
|
29
26
|
</a>
|
|
30
|
-
{/* `data-
|
|
27
|
+
{/* `data-native` opts a link out of soft navigation and does a full browser load. */}
|
|
31
28
|
<a href="/api/health" data-native>
|
|
32
29
|
/api/health
|
|
33
30
|
</a>
|
|
@@ -4,7 +4,7 @@ import { trimTrailingSlash } from 'hono/trailing-slash';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* What this app's middleware puts on the Hono context. Pass it to `PageProps<path, AppEnv>` (or
|
|
7
|
-
* `
|
|
7
|
+
* `getRequestContext<AppEnv>()`) and `ctx.var` is typed key by key instead of an open record — see
|
|
8
8
|
* `components/home.tsx`.
|
|
9
9
|
*/
|
|
10
10
|
export type AppEnv = { Variables: { requestId: string } };
|
|
@@ -25,8 +25,6 @@ export default defineConfig({
|
|
|
25
25
|
// csp: false, // strict per-request-nonce Content-Security-Policy
|
|
26
26
|
// cspDirectives: {}, // widen it, e.g. { 'img-src': "'self' https://cdn.example.com" }
|
|
27
27
|
// bodySizeLimit: '1mb',// request body cap before a 413; false disables it
|
|
28
|
-
// renderTimeout: 10_000, // ms deadline for a request (action + flight + SSR)
|
|
29
|
-
// compress: true, // gzip; turn off behind a proxy that already does it
|
|
30
28
|
|
|
31
29
|
/**
|
|
32
30
|
* Tailwind, and the only thing the build needs to know about it.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { NavigationProgress } from '@rshono/core/client';
|
|
2
1
|
import type { ReactNode } from 'react';
|
|
3
2
|
import { publicEnv } from '../lib/env';
|
|
4
3
|
import '../styles.css';
|
|
@@ -20,14 +19,12 @@ export function Layout({ title, description, children }: { title?: string; descr
|
|
|
20
19
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
21
20
|
</head>
|
|
22
21
|
<body className="bg-zinc-50 text-zinc-900 antialiased dark:bg-zinc-950 dark:text-zinc-100">
|
|
23
|
-
{/* Paints during a soft navigation, so a slow page still feels answered. */}
|
|
24
|
-
<NavigationProgress />
|
|
25
22
|
<header className="mx-auto max-w-2xl px-6 py-5">
|
|
26
23
|
<nav className="flex items-center justify-between gap-4">
|
|
27
24
|
<a href="/" className="font-semibold no-underline">
|
|
28
25
|
{publicEnv.appName}
|
|
29
26
|
</a>
|
|
30
|
-
{/* `data-
|
|
27
|
+
{/* `data-native` opts a link out of soft navigation and does a full browser load. */}
|
|
31
28
|
<a href="/api/health" data-native className="text-sm">
|
|
32
29
|
/api/health
|
|
33
30
|
</a>
|