create-rsc-kit 0.29.6 → 0.29.8

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/init.js CHANGED
@@ -394,7 +394,7 @@ function manualPluginStep(o, existing) {
394
394
  const p = t.paths(o);
395
395
  const shown = [
396
396
  `sourceDir: '${p.sourceDir}'`,
397
- `outDir: '${p.outDir}'`,
397
+ ...(p.outDir ? [`outDir: '${p.outDir}'`] : []),
398
398
  ...(p.hotFile ? [`hotFile: '${p.hotFile}'`] : []),
399
399
  ].join(', ');
400
400
  return {
@@ -559,7 +559,9 @@ function gitignore(o, dir) {
559
559
  // Everything the build writes: the bundles, Nitro's output, and the hot
560
560
  // file. The hot file is the worst of them to commit — it points every other
561
561
  // machine at a dev server that is not running there.
562
- const all = ['.output', p.outDir, ...(p.hotFile ? [p.hotFile] : [])];
562
+ // dist: the compiled binary or a static export. *.bun-build: what
563
+ // bun build --compile leaves behind in the project.
564
+ const all = ['.output', 'dist', '*.bun-build', ...(p.outDir ? [p.outDir] : []), ...(p.hotFile ? [p.hotFile] : [])];
563
565
  const outputs = all.filter((path) => !all.some((other) => other !== path && path.startsWith(other + '/')));
564
566
  // A backend's secret lives in .env, which is the file whose commit is
565
567
  // noticed late. Only when there is one: a project without a backend has
@@ -2,8 +2,11 @@ import type { Host, Options } from './options.js';
2
2
  export interface Paths {
3
3
  /** Where the app/ route tree lives. */
4
4
  sourceDir: string;
5
- /** Where the bundles land. The server imports the rsc one from here. */
6
- outDir: string;
5
+ /**
6
+ * Where the build writes the route table, its report and the server
7
+ * entries. Left out, the default: .rsc-kit/, beside the generated types.
8
+ */
9
+ outDir?: string;
7
10
  /** Written while the dev server runs, for a backend that has to find it. */
8
11
  hotFile?: string;
9
12
  }
@@ -42,6 +45,11 @@ export declare const configFile: (_o: Options) => string;
42
45
  * combines with the stock scripts and only steps aside for a script somebody
43
46
  * wrote themselves.
44
47
  */
48
+ /**
49
+ * Another of the lockstep packages, at the same version as the engine: the
50
+ * same range, or - for a local checkout - its folder beside packages/core.
51
+ */
52
+ export declare function sibling(core: string, dir: 'cli' | 'mcp'): string;
45
53
  export declare function scripts(o: Options): Record<string, string>;
46
54
  export declare function packageJson(o: Options): string;
47
55
  /** One server per app, so it needs no qualifier. */
@@ -93,7 +101,7 @@ export declare function counter(o: Options): string;
93
101
  * and nothing warns — the page just arrives unstyled.
94
102
  */
95
103
  export declare const styles = "@import 'tailwindcss';\n\n/* The whole source tree, not just this directory. A client component is found\n automatically because it enters the browser bundle; a server component never\n does, so anything it uses has to be declared here or it is silently absent\n from the stylesheet. */\n@source '../';\n";
96
- export declare const gitignore = "node_modules\nbuild\n.output\n.rsc\ndist\n*.log\n.DS_Store\n\n# Rewritten by the build every run: the ambient declarations, and the stub\n# module the app imports its server actions from.\n.rsc-kit/\nsrc/server-actions.generated.ts\n\n# Secrets. The example is the one to commit.\n.env\n.env.*\n!.env.example\n";
104
+ export declare const gitignore = "node_modules\n.output\ndist\n*.bun-build\n*.log\n.DS_Store\n\n# Rewritten by the build every run: the types, the route table and the build\n# report, and the stub module the app imports its server actions from.\n.rsc-kit/\nsrc/server-actions.generated.ts\n\n# Secrets. The example is the one to commit.\n.env\n.env.*\n!.env.example\n";
97
105
  /**
98
106
  * oxlint, with the React Compiler's own rules turned on.
99
107
  *
package/dist/templates.js CHANGED
@@ -20,7 +20,7 @@ const PORT = 3000;
20
20
  */
21
21
  export function paths(o) {
22
22
  if (o.host !== 'laravel') {
23
- return { sourceDir: o.sourceDir, outDir: 'build' };
23
+ return { sourceDir: o.sourceDir };
24
24
  }
25
25
  return {
26
26
  sourceDir: o.sourceDir,
@@ -48,6 +48,13 @@ export const configFile = (_o) => 'vite.config.ts';
48
48
  * combines with the stock scripts and only steps aside for a script somebody
49
49
  * wrote themselves.
50
50
  */
51
+ /**
52
+ * Another of the lockstep packages, at the same version as the engine: the
53
+ * same range, or - for a local checkout - its folder beside packages/core.
54
+ */
55
+ export function sibling(core, dir) {
56
+ return core.startsWith('file:') ? core.replace(/packages[\\/]core\/?$/, `packages/${dir}`) : core;
57
+ }
51
58
  export function scripts(o) {
52
59
  if (o.host === 'laravel') {
53
60
  return {
@@ -154,6 +161,14 @@ export function packageJson(o) {
154
161
  // and the build fails on a specifier nothing in the app depends on.
155
162
  '@vitejs/plugin-rsc': '^0.5.34',
156
163
  };
164
+ // The CLI and the MCP server, at the engine's own version. Not installed,
165
+ // bunx and npx fetched the newest of each: rsc-kit agents wrote a newer
166
+ // version's rules into AGENTS.md, the MCP server answered how_to and rules
167
+ // for features this app does not have, and rsc-kit info described a build
168
+ // the installed engine would not make. Installed, the local copy runs, and
169
+ // upgrading rsc-kit upgrades all three together.
170
+ dev['rsc-kit'] = sibling(o.core, 'cli');
171
+ dev['@rsc-kit/mcp'] = sibling(o.core, 'mcp');
157
172
  if (o.host !== 'node')
158
173
  dev['@types/bun'] = '^1.4.0';
159
174
  else
@@ -220,7 +235,7 @@ export function viteConfig(o) {
220
235
  // .output/public and serves them itself.
221
236
  const options = [
222
237
  `sourceDir: '${p.sourceDir}'`,
223
- `outDir: '${p.outDir}'`,
238
+ ...(p.outDir ? [`outDir: '${p.outDir}'`] : []),
224
239
  ...(p.hotFile ? [`hotFile: '${p.hotFile}'`] : []),
225
240
  // The actions and functions PHP offers, written as dev and every build
226
241
  // start - reflection through Composer's autoloader, which only PHP has.
@@ -496,15 +511,14 @@ export const styles = `@import 'tailwindcss';
496
511
  @source '../';
497
512
  `;
498
513
  export const gitignore = `node_modules
499
- build
500
514
  .output
501
- .rsc
502
515
  dist
516
+ *.bun-build
503
517
  *.log
504
518
  .DS_Store
505
519
 
506
- # Rewritten by the build every run: the ambient declarations, and the stub
507
- # module the app imports its server actions from.
520
+ # Rewritten by the build every run: the types, the route table and the build
521
+ # report, and the stub module the app imports its server actions from.
508
522
  .rsc-kit/
509
523
  src/server-actions.generated.ts
510
524
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rsc-kit",
3
- "version": "0.29.6",
3
+ "version": "0.29.8",
4
4
  "type": "module",
5
5
  "description": "Scaffold an RSC app on Bun, Hono, Elysia or Node.",
6
6
  "bin": {