create-waku 0.10.5 → 0.10.6

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.
Files changed (80) hide show
  1. package/package.json +1 -1
  2. package/template/01_template/package.json +6 -6
  3. package/template/01_template/tsconfig.tsbuildinfo +1 -1
  4. package/template/02_template_js/package.json +5 -5
  5. package/template/03_demo/package.json +6 -6
  6. package/template/03_demo/src/lib/index.ts +1 -1
  7. package/template/03_demo/src/pages/[slug].tsx +2 -3
  8. package/template/03_demo/tsconfig.tsbuildinfo +1 -1
  9. package/template/04_cssmodules/package.json +5 -5
  10. package/template/04_cssmodules/src/styles.css +12 -12
  11. package/template/04_cssmodules/tsconfig.tsbuildinfo +1 -1
  12. package/template/11_fs-router/package.json +5 -5
  13. package/template/11_fs-router/src/pages/nested/[name].tsx +3 -1
  14. package/template/11_fs-router/tsconfig.tsbuildinfo +1 -1
  15. package/template/12_nossr/package.json +6 -6
  16. package/template/12_nossr/tsconfig.tsbuildinfo +1 -1
  17. package/template/21_create-pages/package.json +5 -5
  18. package/template/21_create-pages/tsconfig.tsbuildinfo +1 -1
  19. package/template/22_define-router/package.json +5 -5
  20. package/template/22_define-router/src/components/HomeLayout.tsx +6 -0
  21. package/template/22_define-router/src/entries.tsx +38 -0
  22. package/template/22_define-router/tsconfig.tsbuildinfo +1 -1
  23. package/template/31_minimal/package.json +5 -5
  24. package/template/31_minimal/tsconfig.tsbuildinfo +1 -1
  25. package/template/32_minimal_js/package.json +4 -4
  26. package/template/32_minimal_js/src/entries.jsx +13 -22
  27. package/template/32_minimal_js/waku.config.ts +11 -0
  28. package/template/33_promise/package.json +5 -5
  29. package/template/33_promise/src/entries.tsx +31 -29
  30. package/template/33_promise/tsconfig.tsbuildinfo +1 -1
  31. package/template/33_promise/waku.config.ts +11 -0
  32. package/template/34_functions/package.json +5 -5
  33. package/template/34_functions/tsconfig.tsbuildinfo +1 -1
  34. package/template/35_nesting/package.json +5 -5
  35. package/template/35_nesting/tsconfig.tsbuildinfo +1 -1
  36. package/template/36_form/package.json +5 -5
  37. package/template/36_form/src/als.ts +16 -0
  38. package/template/36_form/src/components/funcs.ts +1 -1
  39. package/template/36_form/src/entries.tsx +25 -22
  40. package/template/36_form/tsconfig.json +1 -1
  41. package/template/36_form/tsconfig.tsbuildinfo +1 -1
  42. package/template/36_form/waku.config.ts +11 -0
  43. package/template/37_css/package.json +6 -6
  44. package/template/37_css/src/entries.tsx +29 -26
  45. package/template/37_css/tsconfig.tsbuildinfo +1 -1
  46. package/template/37_css/waku.config.ts +11 -0
  47. package/template/38_cookies/package.json +8 -8
  48. package/template/38_cookies/src/components/App.tsx +1 -1
  49. package/template/38_cookies/tsconfig.tsbuildinfo +1 -1
  50. package/template/39_api/package.json +5 -5
  51. package/template/39_api/tsconfig.tsbuildinfo +1 -1
  52. package/template/41_path-alias/package.json +6 -6
  53. package/template/41_path-alias/src/entries.tsx +14 -22
  54. package/template/41_path-alias/tsconfig.tsbuildinfo +1 -1
  55. package/template/41_path-alias/waku.config.ts +11 -0
  56. package/template/42_react-tweet/package.json +6 -6
  57. package/template/42_react-tweet/src/entries.tsx +1 -1
  58. package/template/42_react-tweet/src/main.tsx +1 -1
  59. package/template/42_react-tweet/tsconfig.tsbuildinfo +1 -1
  60. package/template/43_weave-render/package.json +5 -5
  61. package/template/43_weave-render/src/components/BarLayout.tsx +1 -1
  62. package/template/43_weave-render/src/components/FooLayout.tsx +4 -8
  63. package/template/43_weave-render/src/components/HomeLayout.tsx +38 -41
  64. package/template/43_weave-render/src/entries.tsx +1 -1
  65. package/template/43_weave-render/src/main.tsx +1 -1
  66. package/template/43_weave-render/tsconfig.tsbuildinfo +1 -1
  67. package/template/44_cloudflare/.wrangler/types/runtime.d.ts +5701 -0
  68. package/template/44_cloudflare/package.json +27 -0
  69. package/template/44_cloudflare/public/404.html +1 -0
  70. package/template/44_cloudflare/src/components/App.tsx +51 -0
  71. package/template/44_cloudflare/src/components/Counter.tsx +16 -0
  72. package/template/44_cloudflare/src/entries.tsx +18 -0
  73. package/template/44_cloudflare/src/main.tsx +17 -0
  74. package/template/44_cloudflare/tsconfig.eslint.json +7 -0
  75. package/template/44_cloudflare/tsconfig.json +15 -0
  76. package/template/44_cloudflare/tsconfig.tsbuildinfo +1 -0
  77. package/template/44_cloudflare/waku.cloudflare-dev-server.ts +22 -0
  78. package/template/44_cloudflare/waku.config.ts +37 -0
  79. package/template/44_cloudflare/worker-configuration.d.ts +6 -0
  80. package/template/44_cloudflare/wrangler.toml +15 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-waku",
3
- "version": "0.10.5",
3
+ "version": "0.10.6",
4
4
  "author": "Daishi Kato",
5
5
  "type": "module",
6
6
  "contributors": [
@@ -9,16 +9,16 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "18.3.12",
19
19
  "@types/react-dom": "18.3.1",
20
20
  "autoprefixer": "10.4.20",
21
- "tailwindcss": "3.4.14",
22
- "typescript": "5.6.3"
21
+ "tailwindcss": "3.4.15",
22
+ "typescript": "5.7.2"
23
23
  }
24
24
  }
@@ -1 +1 @@
1
- {"root":["./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.6.3"}
1
+ {"root":["./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.7.2"}
@@ -9,13 +9,13 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "autoprefixer": "10.4.20",
19
- "tailwindcss": "3.4.14"
19
+ "tailwindcss": "3.4.15"
20
20
  }
21
21
  }
@@ -9,16 +9,16 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "18.3.12",
19
19
  "@types/react-dom": "18.3.1",
20
20
  "autoprefixer": "10.4.20",
21
- "tailwindcss": "3.4.14",
22
- "typescript": "5.6.3"
21
+ "tailwindcss": "3.4.15",
22
+ "typescript": "5.7.2"
23
23
  }
24
24
  }
@@ -20,6 +20,6 @@ const shuffle = (array: Array<any>) => {
20
20
  /**
21
21
  * Mock static paths
22
22
  */
23
- export const getPokemonPaths = async () => {
23
+ export const getPokemonPaths = async (): Promise<string[]> => {
24
24
  return pokemon.map((row: any) => row.slug);
25
25
  };
@@ -1,11 +1,10 @@
1
1
  import { Link } from 'waku';
2
+ import type { PageProps } from 'waku/router';
2
3
 
3
4
  import { getPokemonPaths } from '../lib';
4
5
  import { pokemon } from '../lib/pokemon';
5
6
 
6
- type PokemonPageProps = { slug: string };
7
-
8
- export default async function PokemonPage({ slug }: PokemonPageProps) {
7
+ export default async function PokemonPage({ slug }: PageProps<'/[slug]'>) {
9
8
  const pokemon = await getPokemon(slug);
10
9
 
11
10
  if (!pokemon) {
@@ -1 +1 @@
1
- {"root":["./src/components/footer.tsx","./src/components/header.tsx","./src/components/reload.tsx","./src/lib/index.ts","./src/lib/pokemon.ts","./src/pages/[slug].tsx","./src/pages/_layout.tsx","./src/pages/index.tsx"],"version":"5.6.3"}
1
+ {"root":["./src/components/footer.tsx","./src/components/header.tsx","./src/components/reload.tsx","./src/lib/index.ts","./src/lib/pokemon.ts","./src/pages/[slug].tsx","./src/pages/_layout.tsx","./src/pages/index.tsx"],"version":"5.7.2"}
@@ -9,14 +9,14 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "18.3.12",
19
19
  "@types/react-dom": "18.3.1",
20
- "typescript": "5.6.3"
20
+ "typescript": "5.7.2"
21
21
  }
22
22
  }
@@ -201,9 +201,9 @@ video {
201
201
  font-display: swap;
202
202
  src: url(https://fonts.gstatic.com/s/nunito/v26/XRXX3I6Li01BKofIMNaMRs7nczIHNHI.woff2)
203
203
  format('woff2');
204
- unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
205
- U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
206
- U+1EA0-1EF9, U+20AB;
204
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
205
+ U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
206
+ U+0329, U+1EA0-1EF9, U+20AB;
207
207
  }
208
208
  @font-face {
209
209
  font-family: 'Nunito';
@@ -252,9 +252,9 @@ video {
252
252
  font-display: swap;
253
253
  src: url(https://fonts.gstatic.com/s/nunito/v26/XRXX3I6Li01BKofIMNaMRs7nczIHNHI.woff2)
254
254
  format('woff2');
255
- unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
256
- U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
257
- U+1EA0-1EF9, U+20AB;
255
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
256
+ U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
257
+ U+0329, U+1EA0-1EF9, U+20AB;
258
258
  }
259
259
  @font-face {
260
260
  font-family: 'Nunito';
@@ -303,9 +303,9 @@ video {
303
303
  font-display: swap;
304
304
  src: url(https://fonts.gstatic.com/s/nunito/v26/XRXV3I6Li01BKofIOuaBTMnFcQIG.woff2)
305
305
  format('woff2');
306
- unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
307
- U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
308
- U+1EA0-1EF9, U+20AB;
306
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
307
+ U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
308
+ U+0329, U+1EA0-1EF9, U+20AB;
309
309
  }
310
310
  @font-face {
311
311
  font-family: 'Nunito';
@@ -354,9 +354,9 @@ video {
354
354
  font-display: swap;
355
355
  src: url(https://fonts.gstatic.com/s/nunito/v26/XRXV3I6Li01BKofIOuaBTMnFcQIG.woff2)
356
356
  format('woff2');
357
- unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
358
- U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
359
- U+1EA0-1EF9, U+20AB;
357
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
358
+ U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
359
+ U+0329, U+1EA0-1EF9, U+20AB;
360
360
  }
361
361
  @font-face {
362
362
  font-family: 'Nunito';
@@ -1 +1 @@
1
- {"root":["./src/types.d.ts","./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.6.3"}
1
+ {"root":["./src/types.d.ts","./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.7.2"}
@@ -9,14 +9,14 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "18.3.12",
19
19
  "@types/react-dom": "18.3.1",
20
- "typescript": "5.6.3"
20
+ "typescript": "5.7.2"
21
21
  }
22
22
  }
@@ -1,4 +1,6 @@
1
- const Page = ({ name }: { name: string }) => (
1
+ import type { PageProps } from 'waku/router';
2
+
3
+ const Page = ({ name }: PageProps<'/nested/[name]'>) => (
2
4
  <div>
3
5
  <h2>Nested / {name}</h2>
4
6
  </div>
@@ -1 +1 @@
1
- {"root":["./src/entries.tsx","./src/main.tsx","./src/components/Counter.tsx","./src/pages/_layout.tsx","./src/pages/_root.tsx","./src/pages/bar.tsx","./src/pages/index.tsx","./src/pages/foo/index.tsx","./src/pages/nested/[name].tsx"],"version":"5.6.3"}
1
+ {"root":["./src/entries.tsx","./src/main.tsx","./src/components/Counter.tsx","./src/pages/_layout.tsx","./src/pages/_root.tsx","./src/pages/bar.tsx","./src/pages/index.tsx","./src/pages/foo/index.tsx","./src/pages/nested/[name].tsx"],"version":"5.7.2"}
@@ -9,17 +9,17 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "18.3.12",
19
19
  "@types/react-dom": "18.3.1",
20
20
  "autoprefixer": "10.4.20",
21
- "tailwindcss": "3.4.14",
22
- "typescript": "5.6.3",
21
+ "tailwindcss": "3.4.15",
22
+ "typescript": "5.7.2",
23
23
  "vite": "5.4.10"
24
24
  }
25
25
  }
@@ -1 +1 @@
1
- {"root":["./waku.config.ts","./src/entries.ts","./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.6.3"}
1
+ {"root":["./waku.config.ts","./src/entries.ts","./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.7.2"}
@@ -9,15 +9,15 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "18.3.12",
19
19
  "@types/react-dom": "18.3.1",
20
20
  "server-only": "0.0.1",
21
- "typescript": "5.6.3"
21
+ "typescript": "5.7.2"
22
22
  }
23
23
  }
@@ -1 +1 @@
1
- {"root":["./src/entries.tsx","./src/main.tsx","./src/components/BarPage.tsx","./src/components/Counter.tsx","./src/components/FooPage.tsx","./src/components/HomeLayout.tsx","./src/components/HomePage.tsx","./src/components/NestedBazPage.tsx","./src/components/NestedQuxPage.tsx","./src/components/Root.tsx","./src/components/funcs.ts"],"version":"5.6.3"}
1
+ {"root":["./src/entries.tsx","./src/main.tsx","./src/components/BarPage.tsx","./src/components/Counter.tsx","./src/components/FooPage.tsx","./src/components/HomeLayout.tsx","./src/components/HomePage.tsx","./src/components/NestedBazPage.tsx","./src/components/NestedQuxPage.tsx","./src/components/Root.tsx","./src/components/funcs.ts"],"version":"5.7.2"}
@@ -9,14 +9,14 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "18.3.12",
19
19
  "@types/react-dom": "18.3.1",
20
- "typescript": "5.6.3"
20
+ "typescript": "5.7.2"
21
21
  }
22
22
  }
@@ -45,6 +45,12 @@ const HomeLayout = ({ children }: { children: ReactNode }) => (
45
45
  <li>
46
46
  <Link to="/nested/baz">Nested / Baz</Link>
47
47
  </li>
48
+ <li>
49
+ <Link to="/dynamic/foo">Dynamic / foo</Link>
50
+ </li>
51
+ <li>
52
+ <Link to="/dynamic/bar">Dynamic / bar</Link>
53
+ </li>
48
54
  </ul>
49
55
  {children}
50
56
  </div>
@@ -54,6 +54,20 @@ export default new_defineRouter({
54
54
  'page:/nested/baz': { isStatic: true },
55
55
  },
56
56
  },
57
+ {
58
+ pattern: '/dynamic/([^/]+)',
59
+ path: [
60
+ { type: 'literal', name: 'dynamic' },
61
+ { type: 'group', name: 'slug' },
62
+ ],
63
+ routeElement: { isStatic: true },
64
+ elements: {
65
+ root: { isStatic: true },
66
+ 'layout:/': { isStatic: true },
67
+ // using `[slug]` syntax is just an example and it technically conflicts with others. So, it's better to use a different prefix like `dynamic-page:`.
68
+ 'page:/dynamic/[slug]': {},
69
+ },
70
+ },
57
71
  ];
58
72
  },
59
73
  renderRoute: async (path) => {
@@ -153,6 +167,30 @@ export default new_defineRouter({
153
167
  },
154
168
  };
155
169
  }
170
+ if (path.startsWith('/dynamic/')) {
171
+ return {
172
+ routeElement: (
173
+ <Slot id="root">
174
+ <Slot id="layout:/">
175
+ <Slot id="page:/dynamic/[slug]" />
176
+ </Slot>
177
+ </Slot>
178
+ ),
179
+ elements: {
180
+ root: (
181
+ <Root>
182
+ <Children />
183
+ </Root>
184
+ ),
185
+ 'layout:/': (
186
+ <HomeLayout>
187
+ <Children />
188
+ </HomeLayout>
189
+ ),
190
+ 'page:/dynamic/[slug]': <h3>{path}</h3>,
191
+ },
192
+ };
193
+ }
156
194
  throw new Error('renderRoute: No such path:' + path);
157
195
  },
158
196
  });
@@ -1 +1 @@
1
- {"root":["./src/entries.tsx","./src/main.tsx","./src/components/BarPage.tsx","./src/components/Counter.tsx","./src/components/FooPage.tsx","./src/components/HomeLayout.tsx","./src/components/HomePage.tsx","./src/components/NestedBazPage.tsx","./src/components/Root.tsx"],"version":"5.6.3"}
1
+ {"root":["./src/entries.tsx","./src/main.tsx","./src/components/BarPage.tsx","./src/components/Counter.tsx","./src/components/FooPage.tsx","./src/components/HomeLayout.tsx","./src/components/HomePage.tsx","./src/components/NestedBazPage.tsx","./src/components/Root.tsx"],"version":"5.7.2"}
@@ -9,14 +9,14 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "18.3.12",
19
19
  "@types/react-dom": "18.3.1",
20
- "typescript": "5.6.3"
20
+ "typescript": "5.7.2"
21
21
  }
22
22
  }
@@ -1 +1 @@
1
- {"root":["./waku.config.ts","./src/entries.tsx","./src/main.tsx","./src/components/App.tsx","./src/components/Counter.tsx"],"version":"5.6.3"}
1
+ {"root":["./waku.config.ts","./src/entries.tsx","./src/main.tsx","./src/components/App.tsx","./src/components/Counter.tsx"],"version":"5.7.2"}
@@ -9,9 +9,9 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  }
17
17
  }
@@ -1,27 +1,18 @@
1
- import { defineEntries } from 'waku/server';
2
- import { Slot } from 'waku/client';
1
+ import { new_defineEntries } from 'waku/minimal/server';
2
+ import { Slot } from 'waku/minimal/client';
3
3
 
4
4
  import App from './components/app';
5
5
 
6
- export default defineEntries(
7
- // renderEntries
8
- async (rscPath) => {
9
- return {
10
- App: <App name={rscPath || 'Waku'} />,
11
- };
12
- },
13
- // getBuildConfig
14
- async () => [{ pathname: '/', entries: [{ rscPath: '' }] }],
15
- // getSsrConfig
16
- async (pathname) => {
17
- switch (pathname) {
18
- case '/':
19
- return {
20
- rscPath: '',
21
- html: <Slot id="App" />,
22
- };
23
- default:
24
- return null;
6
+ export default new_defineEntries({
7
+ unstable_handleRequest: async (input, { renderRsc, renderHtml }) => {
8
+ if (input.type === 'component') {
9
+ return renderRsc({ App: <App name={input.rscPath || 'Waku'} /> });
10
+ }
11
+ if (input.type === 'custom' && input.pathname === '/') {
12
+ return renderHtml({ App: <App name="Waku" /> }, <Slot id="App" />, '');
25
13
  }
26
14
  },
27
- );
15
+ unstable_getBuildConfig: async () => [
16
+ { pathSpec: [], entries: [{ rscPath: '' }] },
17
+ ],
18
+ });
@@ -0,0 +1,11 @@
1
+ // This is a temporary file while experimenting new_defineEntries
2
+
3
+ import { defineConfig } from 'waku/config';
4
+
5
+ export default defineConfig({
6
+ middleware: () => [
7
+ import('waku/middleware/context'),
8
+ import('waku/middleware/dev-server'),
9
+ import('waku/middleware/handler'),
10
+ ],
11
+ });
@@ -9,14 +9,14 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "18.3.12",
19
19
  "@types/react-dom": "18.3.1",
20
- "typescript": "5.6.3"
20
+ "typescript": "5.7.2"
21
21
  }
22
22
  }
@@ -1,34 +1,36 @@
1
- import { defineEntries } from 'waku/server';
2
- import { Children, Slot } from 'waku/client';
1
+ import { new_defineEntries } from 'waku/minimal/server';
2
+ import { Children, Slot } from 'waku/minimal/client';
3
+
3
4
  import App from './components/App';
4
5
 
5
- export default defineEntries(
6
- // renderEntries
7
- async (rscPath) => {
8
- return {
9
- App: (
10
- <App name={rscPath || 'Waku'}>
11
- <Children />
12
- </App>
13
- ),
14
- };
15
- },
16
- // getBuildConfig
17
- async () => [{ pathname: '/', entries: [{ rscPath: '' }] }],
18
- // getSsrConfig
19
- async (pathname) => {
20
- switch (pathname) {
21
- case '/':
22
- return {
23
- rscPath: '',
24
- html: (
25
- <Slot id="App">
26
- <h3>A client element</h3>
27
- </Slot>
6
+ export default new_defineEntries({
7
+ unstable_handleRequest: async (input, { renderRsc, renderHtml }) => {
8
+ if (input.type === 'component') {
9
+ return renderRsc({
10
+ App: (
11
+ <App name={input.rscPath || 'Waku'}>
12
+ <Children />
13
+ </App>
14
+ ),
15
+ });
16
+ }
17
+ if (input.type === 'custom' && input.pathname === '/') {
18
+ return renderHtml(
19
+ {
20
+ App: (
21
+ <App name="Waku">
22
+ <Children />
23
+ </App>
28
24
  ),
29
- };
30
- default:
31
- return null;
25
+ },
26
+ <Slot id="App">
27
+ <h3>A client element</h3>
28
+ </Slot>,
29
+ '',
30
+ );
32
31
  }
33
32
  },
34
- );
33
+ unstable_getBuildConfig: async () => [
34
+ { pathSpec: [], entries: [{ rscPath: '' }] },
35
+ ],
36
+ });
@@ -1 +1 @@
1
- {"root":["./src/entries.tsx","./src/main.tsx","./src/components/App.tsx","./src/components/Counter.tsx","./src/components/Hello.tsx"],"version":"5.6.3"}
1
+ {"root":["./waku.config.ts","./src/entries.tsx","./src/main.tsx","./src/components/App.tsx","./src/components/Counter.tsx","./src/components/Hello.tsx"],"version":"5.7.2"}
@@ -0,0 +1,11 @@
1
+ // This is a temporary file while experimenting new_defineEntries
2
+
3
+ import { defineConfig } from 'waku/config';
4
+
5
+ export default defineConfig({
6
+ middleware: () => [
7
+ import('waku/middleware/context'),
8
+ import('waku/middleware/dev-server'),
9
+ import('waku/middleware/handler'),
10
+ ],
11
+ });
@@ -9,15 +9,15 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
15
  "react-wrap-balancer": "1.1.0",
16
- "waku": "0.21.6"
16
+ "waku": "0.21.7"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/react": "18.3.12",
20
20
  "@types/react-dom": "18.3.1",
21
- "typescript": "5.6.3"
21
+ "typescript": "5.7.2"
22
22
  }
23
23
  }
@@ -1 +1 @@
1
- {"root":["./waku.config.ts","./src/als.ts","./src/entries.tsx","./src/main.tsx","./src/components2/App.tsx","./src/components2/ButtonClient.tsx","./src/components2/ButtonServer.tsx","./src/components2/Counter.tsx","./src/components2/TextBox.tsx","./src/components2/funcs.ts","./src/components2/funcs2.ts"],"version":"5.6.3"}
1
+ {"root":["./waku.config.ts","./src/als.ts","./src/entries.tsx","./src/main.tsx","./src/components2/App.tsx","./src/components2/ButtonClient.tsx","./src/components2/ButtonServer.tsx","./src/components2/Counter.tsx","./src/components2/TextBox.tsx","./src/components2/funcs.ts","./src/components2/funcs2.ts"],"version":"5.7.2"}
@@ -9,14 +9,14 @@
9
9
  "start": "waku start"
10
10
  },
11
11
  "dependencies": {
12
- "react": "19.0.0-rc-5c56b873-20241107",
13
- "react-dom": "19.0.0-rc-5c56b873-20241107",
14
- "react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
15
- "waku": "0.21.6"
12
+ "react": "19.0.0-rc-7670501b-20241124",
13
+ "react-dom": "19.0.0-rc-7670501b-20241124",
14
+ "react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
15
+ "waku": "0.21.7"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/react": "18.3.12",
19
19
  "@types/react-dom": "18.3.1",
20
- "typescript": "5.6.3"
20
+ "typescript": "5.7.2"
21
21
  }
22
22
  }