@netrojs/create-vono 0.0.1 → 0.1.1

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/index.js CHANGED
@@ -7,7 +7,7 @@ import { execSync } from "child_process";
7
7
  import { fileURLToPath } from "url";
8
8
  import prompts from "prompts";
9
9
  import { bold, cyan, dim, green, red } from "kolorist";
10
- var VONO_VERSION = "0.0.1";
10
+ var VONO_VERSION = "0.1.1";
11
11
  var FILES_DIR = join(dirname(fileURLToPath(import.meta.url)), "..", "files");
12
12
  function banner() {
13
13
  console.log();
@@ -82,11 +82,17 @@ function scaffold(dir, a) {
82
82
  bun: "bun --bun vite build",
83
83
  deno: "deno run -A npm:vite build"
84
84
  };
85
+ const startCmds = {
86
+ node: "node dist/server/server.js",
87
+ bun: "bun dist/server/server.js",
88
+ deno: "deno run -A dist/server/server.js"
89
+ };
85
90
  const vars = {
86
91
  PROJECT_NAME: a.projectName,
87
92
  VONO_VERSION,
88
93
  DEV_CMD: devCmds[a.runtime],
89
- BUILD_CMD: buildCmds[a.runtime]
94
+ BUILD_CMD: buildCmds[a.runtime],
95
+ START_CMD: startCmds[a.runtime]
90
96
  };
91
97
  mkdirSync(dir, { recursive: true });
92
98
  for (const srcPath of walk(FILES_DIR)) {
@@ -6,7 +6,7 @@
6
6
  "scripts": {
7
7
  "dev": "{{DEV_CMD}}",
8
8
  "build": "{{BUILD_CMD}}",
9
- "start": "node dist/server/server.js",
9
+ "start": "{{START_CMD}}",
10
10
  "typecheck": "vue-tsc --noEmit"
11
11
  },
12
12
  "dependencies": {
@@ -92,14 +92,6 @@ const postsApi = defineApiRoute('/api/posts', (app) => {
92
92
  })
93
93
 
94
94
  const statsApi = defineApiRoute('/api/stats', (app) => {
95
- app.get('/', (_c) => c.json({
96
- totalUsers: 4200,
97
- totalPosts: POSTS.length,
98
- totalViews: POSTS.reduce((s, p) => s + p.views, 0),
99
- }))
100
- })
101
- // (Fix the accidental `c` → use the handler param)
102
- const statsApiFixed = defineApiRoute('/api/stats', (app) => {
103
95
  app.get('/', (c) => c.json({
104
96
  totalUsers: 4200,
105
97
  totalPosts: POSTS.length,
@@ -263,7 +255,7 @@ export { default as NotFoundPage } from './pages/404.vue'
263
255
 
264
256
  export const routes = [
265
257
  postsApi,
266
- statsApiFixed,
258
+ statsApi,
267
259
  homePage,
268
260
  blogListPage,
269
261
  blogPostPage,
@@ -32,7 +32,10 @@ export default defineConfig({
32
32
  }),
33
33
 
34
34
  // Routes all dev-mode requests through the Vono Hono app (app.ts default export)
35
- devServer({ entry: 'app.ts' }),
35
+ // injectClientScript: false — Vono injects the client script itself
36
+ // via buildShellParts(); letting the dev server inject a second copy
37
+ // causes a double-hydration error.
38
+ devServer({ entry: 'app.ts', injectClientScript: false }),
36
39
  ],
37
40
 
38
41
  server: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netrojs/create-vono",
3
- "version": "0.0.1",
3
+ "version": "0.1.1",
4
4
  "description": "Create a new Vono app \u2014 Vue 3 streaming SSR + SPA, Hono, TypeScript",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Netro Solutions
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.