@rshono/create 1.0.0-rc.2 → 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/README.md CHANGED
@@ -1,17 +1,26 @@
1
- # @rshono/create
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/rshono/rshono/main/logo.svg" alt="" width="72" height="72" />
3
+ </p>
2
4
 
3
- Scaffolds a new [rshono](https://github.com/rshono/rshono) app — Hono + Rspack + React Server Components.
5
+ <h1 align="center">@rshono/create</h1>
6
+
7
+ <p align="center">
8
+ Scaffolds a new <a href="https://github.com/rshono/rshono">rshono</a> app — Hono + Rspack + React Server Components.
9
+ </p>
4
10
 
5
11
  ```bash
6
- npm create @rshono@latest my-app
7
- pnpm create @rshono my-app
12
+ npx @rshono/create@latest my-app
13
+ pnx @rshono/create my-app
14
+ bunx @rshono/create my-app
8
15
  yarn create @rshono my-app
9
- bun create @rshono my-app
10
16
  ```
11
17
 
12
- The package manager that ran it is the one the project gets: it is read from `npm_config_user_agent`, used
13
- for the install, written into `packageManager` for Corepack, and used in every command the closing summary
14
- prints. Nothing asks you which one you meant.
18
+ The package manager that ran it is the one the project gets: it is read from `npm_config_user_agent`, which
19
+ every one of these runners sets, and it is used for the install, written into `packageManager` for Corepack,
20
+ and used in every command the closing summary prints. Nothing asks you which one you meant.
21
+
22
+ Yarn is the odd row out because `yarn dlx` is Berry-only, while `yarn create` works in either — and `pnx`
23
+ arrived in pnpm 10.16, before which it is `pnpm dlx`.
15
24
 
16
25
  ## The questions
17
26
 
@@ -32,7 +41,7 @@ the package manager that was detected, `--force` to scaffold into a directory th
32
41
  given. **A non-interactive terminal implies `-y`**, so this is one command in CI or from an agent:
33
42
 
34
43
  ```bash
35
- npm create @rshono@latest my-app -y --deploy cloudflare --tailwind --quality biome
44
+ npx @rshono/create@latest my-app -y --deploy cloudflare --tailwind --quality biome
36
45
  ```
37
46
 
38
47
  The deploy targets, and the deploy command each one prints, are generated from the framework's own
@@ -113,5 +122,5 @@ CREATE_RSHONO_E2E=1 pnpm --filter @rshono/create test # also: pack, install an
113
122
  refusal to overwrite somebody's files are checked. `e2e.test.mjs` is the opt-in one, and the only one that
114
123
  installs anything.
115
124
 
116
- `@clack/prompts` (MIT) is bundled rather than depended on, so `npm create` downloads one tarball before it
117
- can ask its first question.
125
+ `@clack/prompts` (MIT) is bundled rather than depended on, so `npx @rshono/create` downloads one tarball
126
+ before it can ask its first question.
File without changes
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.2';
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.1.0';
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 three targets that run the build themselves node, bun, deno each contribute their
520
- * own, and a platform target contributes a `deploy` instead, where its platform has one command to give.
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',
@@ -760,8 +725,9 @@ function packageManager(name, version) {
760
725
  }
761
726
  /**
762
727
  * Which package manager invoked us. Every one of them sets `npm_config_user_agent` for the process it
763
- * spawns — `pnpm/11.9.0 npm/? node/v22.14.0 darwin arm64` — so `pnpm create @rshono` scaffolds a pnpm
764
- * project without asking, and the exact version comes along for the `packageManager` field.
728
+ * spawns, from its runner as much as from `create` — `pnpm/11.9.0 npm/? node/v22.14.0 darwin arm64` — so
729
+ * `pnx @rshono/create` scaffolds a pnpm project without asking, and the exact version comes along for the
730
+ * `packageManager` field.
765
731
  *
766
732
  * Falls back to npm, which is also what a bare `node bin/create-rshono.mjs` gets.
767
733
  */ function detectPackageManager(userAgent = process.env.npm_config_user_agent) {
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.2';
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.1.0';
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 three targets that run the build themselves node, bun, deno each contribute their
3407
- * own, and a platform target contributes a `deploy` instead, where its platform has one command to give.
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',
@@ -3645,8 +3610,9 @@ function packageManager(name, version) {
3645
3610
  }
3646
3611
  /**
3647
3612
  * Which package manager invoked us. Every one of them sets `npm_config_user_agent` for the process it
3648
- * spawns — `pnpm/11.9.0 npm/? node/v22.14.0 darwin arm64` — so `pnpm create @rshono` scaffolds a pnpm
3649
- * project without asking, and the exact version comes along for the `packageManager` field.
3613
+ * spawns, from its runner as much as from `create` — `pnpm/11.9.0 npm/? node/v22.14.0 darwin arm64` — so
3614
+ * `pnx @rshono/create` scaffolds a pnpm project without asking, and the exact version comes along for the
3615
+ * `packageManager` field.
3650
3616
  *
3651
3617
  * Falls back to npm, which is also what a bare `node bin/create-rshono.mjs` gets.
3652
3618
  */ function detectPackageManager(userAgent = process.env.npm_config_user_agent) {
@@ -3773,7 +3739,7 @@ const DEFAULT_DIRECTORY = 'my-rshono-app';
3773
3739
  /** Every accepted name comes from `options.ts`, so the help cannot promise one the validation refuses. */ const HELP = `create-rshono — scaffold a new rshono app
3774
3740
 
3775
3741
  Usage:
3776
- npm create @rshono@latest [directory] [options]
3742
+ npx @rshono/create@latest [directory] [options]
3777
3743
 
3778
3744
  Options:
3779
3745
  -y, --yes accept the default for every question not given as a flag
@@ -3793,7 +3759,7 @@ Options:
3793
3759
  Every question can be answered by a flag, and a non-interactive terminal implies --yes — so one command
3794
3760
  scaffolds without prompting:
3795
3761
 
3796
- npm create @rshono@latest my-app -y --deploy cloudflare --tailwind --quality biome
3762
+ npx @rshono/create@latest my-app -y --deploy cloudflare --tailwind --quality biome
3797
3763
  `;
3798
3764
  function fail(message) {
3799
3765
  log.error(message);
@@ -3880,11 +3846,11 @@ function fail(message) {
3880
3846
  async function main() {
3881
3847
  const { values, positionals } = parse();
3882
3848
  if (values.help) return console.log(HELP);
3883
- if (values.version) return console.log("1.0.0-rc.2");
3849
+ if (values.version) return console.log("1.0.0-rc.4");
3884
3850
  /*
3885
3851
  * A pipe, a CI job or an agent gets the defaults rather than a prompt nothing can answer. Both streams
3886
- * have to be a terminal: the prompts draw on stdout but *read from stdin*, so `echo | npm create` with
3887
- * stdout still attached would otherwise ask a question with nothing behind the keyboard.
3852
+ * have to be a terminal: the prompts draw on stdout but *read from stdin*, so `echo | npx @rshono/create`
3853
+ * with stdout still attached would otherwise ask a question with nothing behind the keyboard.
3888
3854
  */ const interactive = Boolean(process.stdin.isTTY && process.stdout.isTTY) && !values.yes;
3889
3855
  const pmFlag = oneOf(values.pm, PACKAGE_MANAGERS, 'pm');
3890
3856
  const pm = pmFlag ? packageManager(pmFlag) : detectPackageManager();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rshono/create",
3
- "version": "1.0.0-rc.2",
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",
@@ -41,19 +41,18 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
+ "devDependencies": {
45
+ "@clack/prompts": "^1.7.0",
46
+ "@rspack/core": "2.1.5",
47
+ "@types/node": "^26.1.1",
48
+ "typescript": "^7.0.2",
49
+ "@rshono/core": "1.0.0-rc.4"
50
+ },
44
51
  "scripts": {
45
52
  "build": "node scripts/codegen.mjs && node scripts/build.mjs",
46
53
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
47
54
  "codegen": "node scripts/codegen.mjs",
48
55
  "typecheck": "node scripts/codegen.mjs && tsc --noEmit",
49
- "test": "npm run build && node --test --test-concurrency=1 \"test/*.test.mjs\"",
50
- "prepack": "npm run build"
51
- },
52
- "devDependencies": {
53
- "@clack/prompts": "^1.7.0",
54
- "@rspack/core": "2.1.5",
55
- "@types/node": "^26.1.1",
56
- "@rshono/core": "workspace:*",
57
- "typescript": "^7.0.2"
56
+ "test": "npm run build && node --test --test-concurrency=1 \"test/*.test.mjs\""
58
57
  }
59
- }
58
+ }
@@ -1 +1,2 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><title>Lightning bolt</title><text y=".9em" font-size="90">⚡</text></svg>
1
+ <!-- The rshono mark, as a placeholder — replace it with your own and the tab is yours. -->
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><title>rshono</title><path fill="#087EA4" d="M12.4365 0.2520325c0.062375 -0.0080215 0.11745 0.0077075 0.16515 0.0471875 1.755075 2.142025 3.40665 4.359855 4.954725 6.65348 1.14615 1.725625 2.121325 3.550175 2.92565 5.4738 1.2845 3.426025 0.616 6.40675 -2.005475 8.9421 -2.293725 1.938575 -4.936225 2.693575 -7.927575 2.265025 -3.57555 -0.729025 -6.00575 -2.7974 -7.290525 -6.205225 -0.33465 -1.109425 -0.44475 -2.241925 -0.3303 -3.397525 0.19055 -1.9891 0.662425 -3.9081 1.415625 -5.7569 0.31385 -0.75435 0.722825 -1.4464 1.2269 -2.076275 0.411225 0.4898 0.80445 0.993175 1.179675 1.510025 0.17375 0.181625 0.354625 0.35465 0.542675 0.51905C8.728325 5.378325 10.44285 2.7201 12.4365 0.2520325Z"/><path fill="#61DAFB" d="M12.10625 4.07425c1.73145 2.008325 3.296525 4.1475 4.695175 6.41755 0.438525 0.75115 0.800275 1.537625 1.085325 2.3594 0.593825 2.336175 -0.043225 4.26305 -1.9111 5.7805 -1.80655 1.2712 -3.788425 1.6487 -5.945675 1.132525 -2.326325 -0.721875 -3.671175 -2.286975 -4.034575 -4.6952 -0.088175 -0.7593 -0.009525 -1.4986 0.23595 -2.217825 0.35005 -0.888875 0.774725 -1.73825 1.274075 -2.54815 0.471875 -0.6921 0.94375 -1.38415 1.415625 -2.07625 1.071925 -1.378375 2.13365 -2.762525 3.1852 -4.15255Z"/></svg>
@@ -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-prefetch` warms a page on hover; `data-native` opts a link out of soft navigation. */}
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
- * `getContext<AppEnv>()`) and `ctx.var` is typed key by key instead of an open record — see
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-prefetch` warms a page on hover; `data-native` opts a link out of soft navigation. */}
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>