rsc-kit 0.7.0 → 0.7.2

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
@@ -4,14 +4,13 @@ The command line for [rsc-kit](https://rsc-kit.dev) — React Server Components
4
4
  as a Vite plugin, on any JavaScript server.
5
5
 
6
6
  ```sh
7
- bunx rsc-kit init # add it to a project you already have
8
- bunx rsc-kit prerender # render every route once and store what it can
7
+ bunx rsc-kit@latest init # add it to a project you already have
9
8
  ```
10
9
 
11
10
  Starting from nothing instead:
12
11
 
13
12
  ```sh
14
- bun create rsc-kit my-app
13
+ bun create rsc-kit@latest my-app
15
14
  ```
16
15
 
17
16
  `init` never rewrites anything that exists. It writes the files you do not have,
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  // rsc-kit — the commands an app runs, and the door into an existing project.
3
3
  //
4
- // Two entry points exist on purpose. `bun create rsc-kit my-app` scaffolds a
4
+ // Two entry points exist on purpose. `bun create rsc-kit@latest my-app` scaffolds a
5
5
  // new one; this is what someone types when they already have a project, and it
6
6
  // has to work with nothing installed — which is why `init` delegates to
7
7
  // create-rsc-kit rather than reimplementing it. One implementation, two doors.
@@ -11,11 +11,18 @@ const HELP = `
11
11
 
12
12
  Usage
13
13
  rsc-kit init [options] add it to the project in this directory
14
- rsc-kit prerender [options] render every route once and store what it can
15
14
 
16
- Run \`rsc-kit <command> --help\` for what each takes.
17
- Starting a new app instead: bun create rsc-kit my-app
15
+ Run \`rsc-kit init --help\` for what it takes. Freezing pages is part of
16
+ \`vite build\` and has no command: it needs the bundle the build just wrote,
17
+ which is somewhere only the build knows.
18
+ Starting a new app instead: bun create rsc-kit@latest my-app
18
19
  `;
20
+ // Same trap as the scaffolder: `bunx rsc-kit init` reuses whatever bunx
21
+ // downloaded first, and this is the door a Laravel project comes through — so
22
+ // it is the one most likely to be years-old and silent about it. Started here
23
+ // so the request overlaps the work, and read at the end.
24
+ const { checkForNewer, notifyIfStale, selfVersion } = await import('create-rsc-kit/stale');
25
+ const staleCheck = checkForNewer('rsc-kit', selfVersion(import.meta.url));
19
26
  const [command, ...rest] = argv.slice(2);
20
27
  if (!command || command === '--help' || command === '-h') {
21
28
  stdout.write(HELP);
@@ -26,10 +33,7 @@ if (command === 'init') {
26
33
  // writes into a project rather than an empty directory.
27
34
  const { runInit } = await import('create-rsc-kit/init');
28
35
  await runInit(rest);
29
- }
30
- else if (command === 'prerender') {
31
- const { runPrerender } = await import('@rsc-kit/core/cli');
32
- await runPrerender(rest);
36
+ await notifyIfStale(staleCheck, 'bunx rsc-kit@latest init');
33
37
  }
34
38
  else {
35
39
  stdout.write(`\n Not an rsc-kit command: ${command}\n${HELP}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsc-kit",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "description": "The rsc-kit command line: add it to a project, and freeze what can be frozen.",
6
6
  "bin": {
@@ -27,8 +27,8 @@
27
27
  },
28
28
  "homepage": "https://rsc-kit.dev",
29
29
  "dependencies": {
30
- "@rsc-kit/core": "^0.7.0",
31
- "create-rsc-kit": "^0.7.0"
30
+ "@rsc-kit/core": "^0.7.2",
31
+ "create-rsc-kit": "^0.7.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^24.0.0",