@voltx/cli 0.4.5 → 0.4.7

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
@@ -62,20 +62,22 @@ Falls back to a 2-phase build (client + server) if no `src/entry-server.tsx` exi
62
62
 
63
63
  ## Project Structure
64
64
 
65
- All templates generate a full-stack project:
65
+ All templates generate a full-stack project with file-based routing:
66
66
 
67
67
  ```
68
68
  my-app/
69
- ├── api/ # Backend API routes (file-based routing)
69
+ ├── api/ # Backend API routes (auto-discovered via voltx/api)
70
70
  │ ├── index.ts # GET /api — health check
71
71
  │ ├── chat.ts # POST /api/chat (chatbot/agent-app)
72
72
  │ └── agent.ts # POST /api/agent (agent-app)
73
- ├── src/ # Frontend (React + Vite)
74
- │ ├── app.tsx # Root component
75
- ├── layout.tsx # Layout wrapper
73
+ ├── src/
74
+ │ ├── pages/ # Frontend pages (auto-discovered via voltx/router)
75
+ │ └── index.tsx # / — home page
76
+ │ ├── layout.tsx # Root layout wrapper
76
77
  │ ├── globals.css # Tailwind CSS v4
77
78
  │ ├── entry-client.tsx # Client hydration
78
79
  │ ├── entry-server.tsx # SSR rendering
80
+ │ ├── voltx-env.d.ts # Type declarations for voltx/router & voltx/api
79
81
  │ ├── components/ # React components
80
82
  │ ├── hooks/ # Custom hooks
81
83
  │ └── lib/ # Utilities (cn() if shadcn enabled)
@@ -83,7 +85,7 @@ my-app/
83
85
  ├── tools/ # Agent tools (agent-app)
84
86
  ├── public/ # Static assets (favicon, robots.txt, manifest)
85
87
  ├── server.ts # Hono app entry
86
- ├── vite.config.ts # Vite + Tailwind + dev server
88
+ ├── vite.config.ts # Vite + Tailwind + voltxRouter() + voltxAPI()
87
89
  ├── components.json # shadcn/ui config (if enabled)
88
90
  ├── voltx.config.ts # VoltX config
89
91
  └── tsconfig.json # TypeScript (with @/* path alias)
@@ -91,6 +93,9 @@ my-app/
91
93
 
92
94
  ## What's Included
93
95
 
96
+ - **File-based page routing** — `src/pages/*.tsx` auto-discovered via `voltxRouter()` Vite plugin
97
+ - **File-based API routing** — `api/**/*.ts` auto-discovered via `voltxAPI()` Vite plugin
98
+ - **Navigation** — `Link`, `NavLink`, `useNavigate`, `useParams` from `voltx/router`
94
99
  - **Tailwind CSS v4** — native Vite plugin, no PostCSS config needed
95
100
  - **Path aliases** — `@/*` maps to `src/*` in both TypeScript and Vite
96
101
  - **shadcn/ui** (optional) — `--shadcn` flag pre-configures `components.json`, `cn()` utility, and CSS variables
package/dist/cli.js CHANGED
@@ -1811,7 +1811,7 @@ var init_index = __esm({
1811
1811
  init_build();
1812
1812
  init_start();
1813
1813
  init_generate();
1814
- CLI_VERSION = "0.4.5";
1814
+ CLI_VERSION = "0.4.6";
1815
1815
  }
1816
1816
  });
1817
1817
 
package/dist/index.d.mts CHANGED
@@ -4,6 +4,6 @@ export { BuildOptions, runBuild } from './build.mjs';
4
4
  export { StartOptions, runStart } from './start.mjs';
5
5
  export { GenerateOptions, GeneratorType, runGenerate } from './generate.mjs';
6
6
 
7
- declare const CLI_VERSION = "0.4.5";
7
+ declare const CLI_VERSION = "0.4.6";
8
8
 
9
9
  export { CLI_VERSION };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,6 @@ export { BuildOptions, runBuild } from './build.js';
4
4
  export { StartOptions, runStart } from './start.js';
5
5
  export { GenerateOptions, GeneratorType, runGenerate } from './generate.js';
6
6
 
7
- declare const CLI_VERSION = "0.4.5";
7
+ declare const CLI_VERSION = "0.4.6";
8
8
 
9
9
  export { CLI_VERSION };
package/dist/index.js CHANGED
@@ -1747,7 +1747,7 @@ function toCamelCase(str) {
1747
1747
  }
1748
1748
 
1749
1749
  // src/index.ts
1750
- var CLI_VERSION = "0.4.5";
1750
+ var CLI_VERSION = "0.4.6";
1751
1751
  // Annotate the CommonJS export names for ESM import in node:
1752
1752
  0 && (module.exports = {
1753
1753
  CLI_VERSION,
package/dist/index.mjs CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  import "./chunk-IV352HZA.mjs";
17
17
 
18
18
  // src/index.ts
19
- var CLI_VERSION = "0.4.5";
19
+ var CLI_VERSION = "0.4.6";
20
20
  export {
21
21
  CLI_VERSION,
22
22
  createProject,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltx/cli",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "VoltX CLI — dev server, build, start, generate, and scaffolding",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  }
17
17
  },
18
18
  "dependencies": {
19
- "@voltx/core": "^0.4.5"
19
+ "@voltx/core": "^0.4.7"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "tsx": ">=4.0.0",