vibingbase 0.12.37 → 0.12.39
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/assets/default/.gitignore.template +6 -6
- package/assets/default/AGENTS.md.template +43 -0
- package/assets/default/CLAUDE.md.template +3 -0
- package/assets/default/app/root.tsx.template +3 -1
- package/assets/default/src-tauri/Cargo.lock.template +6 -6
- package/assets/tailwind/.gitignore.template +6 -6
- package/assets/tailwind/AGENTS.md.template +44 -0
- package/assets/tailwind/CLAUDE.md.template +3 -0
- package/assets/tailwind/app/root.tsx.template +3 -1
- package/assets/tailwind/src-tauri/Cargo.lock.template +6 -6
- package/dist/index.js +7 -2
- package/package.json +5 -2
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
/.playwright-mcp
|
|
4
4
|
__MACOSX
|
|
5
5
|
.DS_Store
|
|
6
|
-
*.tsbuildinfo
|
|
7
|
-
*.db
|
|
8
|
-
.vars
|
|
9
|
-
.secrets
|
|
10
6
|
.env
|
|
11
7
|
.env.*
|
|
8
|
+
.vars
|
|
9
|
+
.secrets
|
|
12
10
|
node_modules
|
|
11
|
+
*.tsbuildinfo
|
|
12
|
+
tsconfig.api-extractor.json
|
|
13
|
+
.api-extractor
|
|
13
14
|
dist
|
|
14
15
|
.react-router
|
|
15
16
|
build
|
|
@@ -20,5 +21,4 @@ out
|
|
|
20
21
|
.vercel
|
|
21
22
|
target
|
|
22
23
|
gen
|
|
23
|
-
|
|
24
|
-
.api-extractor
|
|
24
|
+
*.db
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## Job Description
|
|
4
|
+
|
|
5
|
+
You must always deliver a fully-functional desktop app that the user can interact with and provide feedback on. If the user's requirements are unclear, you should still deliver a fully-functional desktop app based on your best assumptions.
|
|
6
|
+
|
|
7
|
+
## Tech Stack
|
|
8
|
+
|
|
9
|
+
- Web Components: TypeScript + React Router v7 (SPA) + React v19 + Vite v7
|
|
10
|
+
- Desktop Components: Rust + Tauri v2
|
|
11
|
+
|
|
12
|
+
## Project Structure
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
app/
|
|
16
|
+
├─ entry.server.tsx # Server-side entry point (SPA build script)
|
|
17
|
+
├─ entry.client.tsx # Client-side entry point (SPA load script)
|
|
18
|
+
├─ root.tsx # Root route
|
|
19
|
+
├─ routes.ts # Config-based routes
|
|
20
|
+
└─ routes/
|
|
21
|
+
├─ index.tsx # Index route
|
|
22
|
+
└─ … # Other routes
|
|
23
|
+
src-tauri/
|
|
24
|
+
├── capabilities/ # Tauri app capabilities
|
|
25
|
+
├── icons/ # Tauri app icons
|
|
26
|
+
├── src/ # Tauri source files
|
|
27
|
+
└── tauri.conf.json # Tauri configuration
|
|
28
|
+
react-router.config.js # React Router configuration
|
|
29
|
+
vite.config.js # Vite configuration
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## SPA Mode
|
|
33
|
+
|
|
34
|
+
The React Router v7 app must be built with "SPA Mode" enabled (`ssr: false` in `react-router.config.js`). Only `app/root.tsx` may have a `loader` function to load data at build time. All other routes must use `clientLoader` instead of `loader`. All other server-side features are unavailable (e.g., `action`, `middleware`, etc.) and should be substituted with client-side features (e.g., `clientAction`, `clientMiddleware`, etc.).
|
|
35
|
+
|
|
36
|
+
## Common Commands
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
<%= exec %> tauri dev
|
|
40
|
+
<%= exec %> tauri build
|
|
41
|
+
<%= exec %> react-router typegen
|
|
42
|
+
<%= exec %> tsc --noEmit
|
|
43
|
+
```
|
|
@@ -12,7 +12,9 @@ import {
|
|
|
12
12
|
ScrollRestoration,
|
|
13
13
|
} from "react-router";
|
|
14
14
|
|
|
15
|
-
export const meta: Route.MetaFunction = () => [
|
|
15
|
+
export const meta: Route.MetaFunction = () => [
|
|
16
|
+
{ title: "<%= name %>" },
|
|
17
|
+
];
|
|
16
18
|
|
|
17
19
|
export function Layout({ children }: PropsWithChildren) {
|
|
18
20
|
return (
|
|
@@ -114,9 +114,9 @@ dependencies = [
|
|
|
114
114
|
|
|
115
115
|
[[package]]
|
|
116
116
|
name = "async-lock"
|
|
117
|
-
version = "3.4.
|
|
117
|
+
version = "3.4.2"
|
|
118
118
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
119
|
-
checksum = "
|
|
119
|
+
checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311"
|
|
120
120
|
dependencies = [
|
|
121
121
|
"event-listener",
|
|
122
122
|
"event-listener-strategy",
|
|
@@ -1806,9 +1806,9 @@ dependencies = [
|
|
|
1806
1806
|
|
|
1807
1807
|
[[package]]
|
|
1808
1808
|
name = "itoa"
|
|
1809
|
-
version = "1.0.
|
|
1809
|
+
version = "1.0.16"
|
|
1810
1810
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1811
|
-
checksum = "
|
|
1811
|
+
checksum = "7ee5b5339afb4c41626dde77b7a611bd4f2c202b897852b4bcf5d03eddc61010"
|
|
1812
1812
|
|
|
1813
1813
|
[[package]]
|
|
1814
1814
|
name = "javascriptcore-rs"
|
|
@@ -3256,9 +3256,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
|
3256
3256
|
|
|
3257
3257
|
[[package]]
|
|
3258
3258
|
name = "ryu"
|
|
3259
|
-
version = "1.0.
|
|
3259
|
+
version = "1.0.21"
|
|
3260
3260
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3261
|
-
checksum = "
|
|
3261
|
+
checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea"
|
|
3262
3262
|
|
|
3263
3263
|
[[package]]
|
|
3264
3264
|
name = "same-file"
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
/.playwright-mcp
|
|
4
4
|
__MACOSX
|
|
5
5
|
.DS_Store
|
|
6
|
-
*.tsbuildinfo
|
|
7
|
-
*.db
|
|
8
|
-
.vars
|
|
9
|
-
.secrets
|
|
10
6
|
.env
|
|
11
7
|
.env.*
|
|
8
|
+
.vars
|
|
9
|
+
.secrets
|
|
12
10
|
node_modules
|
|
11
|
+
*.tsbuildinfo
|
|
12
|
+
tsconfig.api-extractor.json
|
|
13
|
+
.api-extractor
|
|
13
14
|
dist
|
|
14
15
|
.react-router
|
|
15
16
|
build
|
|
@@ -20,5 +21,4 @@ out
|
|
|
20
21
|
.vercel
|
|
21
22
|
target
|
|
22
23
|
gen
|
|
23
|
-
|
|
24
|
-
.api-extractor
|
|
24
|
+
*.db
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## Job Description
|
|
4
|
+
|
|
5
|
+
You must always deliver a fully-functional desktop app that the user can interact with and provide feedback on. If the user's requirements are unclear, you should still deliver a fully-functional desktop app based on your best assumptions.
|
|
6
|
+
|
|
7
|
+
## Tech Stack
|
|
8
|
+
|
|
9
|
+
- Web Components: TypeScript + React Router v7 (SPA) + React v19 + Tailwind CSS v4 + Vite v7
|
|
10
|
+
- Desktop Components: Rust + Tauri v2
|
|
11
|
+
|
|
12
|
+
## Project Structure
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
app/
|
|
16
|
+
├─ entry.server.tsx # Server-side entry point (SPA build script)
|
|
17
|
+
├─ entry.client.tsx # Client-side entry point (SPA load script)
|
|
18
|
+
├─ entry.client.css # Global styles
|
|
19
|
+
├─ root.tsx # Root route
|
|
20
|
+
├─ routes.ts # Config-based routes
|
|
21
|
+
└─ routes/
|
|
22
|
+
├─ index.tsx # Index route
|
|
23
|
+
└─ … # Other routes
|
|
24
|
+
src-tauri/
|
|
25
|
+
├── capabilities/ # Tauri app capabilities
|
|
26
|
+
├── icons/ # Tauri app icons
|
|
27
|
+
├── src/ # Tauri source files
|
|
28
|
+
└── tauri.conf.json # Tauri configuration
|
|
29
|
+
react-router.config.js # React Router configuration
|
|
30
|
+
vite.config.js # Vite configuration
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## SPA Mode
|
|
34
|
+
|
|
35
|
+
The React Router v7 app must be built with "SPA Mode" enabled (`ssr: false` in `react-router.config.js`). Only `app/root.tsx` may have a `loader` function to load data at build time. All other routes must use `clientLoader` instead of `loader`. All other server-side features are unavailable (e.g., `action`, `middleware`, etc.) and should be substituted with client-side features (e.g., `clientAction`, `clientMiddleware`, etc.).
|
|
36
|
+
|
|
37
|
+
## Common Commands
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
<%= exec %> tauri dev
|
|
41
|
+
<%= exec %> tauri build
|
|
42
|
+
<%= exec %> react-router typegen
|
|
43
|
+
<%= exec %> tsc --noEmit
|
|
44
|
+
```
|
|
@@ -12,7 +12,9 @@ import {
|
|
|
12
12
|
ScrollRestoration,
|
|
13
13
|
} from "react-router";
|
|
14
14
|
|
|
15
|
-
export const meta: Route.MetaFunction = () => [
|
|
15
|
+
export const meta: Route.MetaFunction = () => [
|
|
16
|
+
{ title: "<%= name %>" },
|
|
17
|
+
];
|
|
16
18
|
|
|
17
19
|
export function Layout({ children }: PropsWithChildren) {
|
|
18
20
|
return (
|
|
@@ -114,9 +114,9 @@ dependencies = [
|
|
|
114
114
|
|
|
115
115
|
[[package]]
|
|
116
116
|
name = "async-lock"
|
|
117
|
-
version = "3.4.
|
|
117
|
+
version = "3.4.2"
|
|
118
118
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
119
|
-
checksum = "
|
|
119
|
+
checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311"
|
|
120
120
|
dependencies = [
|
|
121
121
|
"event-listener",
|
|
122
122
|
"event-listener-strategy",
|
|
@@ -1806,9 +1806,9 @@ dependencies = [
|
|
|
1806
1806
|
|
|
1807
1807
|
[[package]]
|
|
1808
1808
|
name = "itoa"
|
|
1809
|
-
version = "1.0.
|
|
1809
|
+
version = "1.0.16"
|
|
1810
1810
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1811
|
-
checksum = "
|
|
1811
|
+
checksum = "7ee5b5339afb4c41626dde77b7a611bd4f2c202b897852b4bcf5d03eddc61010"
|
|
1812
1812
|
|
|
1813
1813
|
[[package]]
|
|
1814
1814
|
name = "javascriptcore-rs"
|
|
@@ -3256,9 +3256,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
|
3256
3256
|
|
|
3257
3257
|
[[package]]
|
|
3258
3258
|
name = "ryu"
|
|
3259
|
-
version = "1.0.
|
|
3259
|
+
version = "1.0.21"
|
|
3260
3260
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3261
|
-
checksum = "
|
|
3261
|
+
checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea"
|
|
3262
3262
|
|
|
3263
3263
|
[[package]]
|
|
3264
3264
|
name = "same-file"
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import*as
|
|
2
|
-
${
|
|
1
|
+
import{Command as Et}from"commander";import*as i from"@clack/prompts";import{capitalCase as ht}from"change-case";import{existsSync as wt}from"node:fs";import{rm as bt}from"node:fs/promises";import S from"node:path";import yt from"picocolors";var k="Create a new Vibingbase app";function M(){let t=process.env.npm_config_user_agent??"";return t.startsWith("pnpm")?"pnpm":t.startsWith("yarn")?"yarn":t.startsWith("bun")?"bun":"npm"}import{exec as nt}from"node:child_process";import{promisify as at}from"node:util";var h=at(nt);import*as L from"@clack/prompts";var u="Thanks for using Vibingbase!";function m(){L.outro(u),process.exit(0)}import{customAlphabet as st}from"nanoid";var mt="0123456789abcdefghijklmnopqrstuvwxyz",R=st(mt);function pt(t){switch(t){case"install":case"start":return!1;default:return!0}}function U(t,o){let e=t==="npm"&&pt(o)?`run ${o}`:o;return`${t} ${e}`}function z(t){switch(t){case"npm":return"npx";case"pnpm":return"pnpm exec";case"yarn":return"yarn";case"bun":return"bunx"}}import ct from"ejs";import{copyFile as ut,mkdir as lt,readdir as ft,readFile as dt,writeFile as gt}from"node:fs/promises";import _ from"node:path";var W=".template";async function D(t,o,e){await lt(o,{recursive:!0});let n=await ft(t,{withFileTypes:!0});await Promise.all(n.map(async r=>{let a=r.name.endsWith(W),f=_.join(t,r.name),c=_.join(o,a?r.name.slice(0,-W.length):r.name);if(r.isDirectory())await D(f,c,e);else if(a){let d=await dt(f,"utf8");await gt(c,ct.render(d,e))}else await ut(f,c)}))}function G(t){if(!t)return"App name is required";if(t.includes(" "))return"No double spaces allowed"}function H(t){if(!t)return"Directory name is required"}var J=process.env.NODE_ENV==="production"?"https://www.vibingbase.com":"http://localhost:59971";async function q(){i.intro(yt.bold(k));let t="my-app",o=await i.text({message:"Directory name:",placeholder:t,defaultValue:t,initialValue:t,validate:H});i.isCancel(o)&&m();let e=o.trim(),n=S.isAbsolute(e)?e:S.join(process.cwd(),e);if(wt(n)){let E=await i.confirm({message:"Overwrite existing directory?",initialValue:!1});(i.isCancel(E)||!E)&&m(),await bt(n,{recursive:!0,force:!0})}let r=ht(S.basename(e)),a=await i.text({message:"App name:",placeholder:r,defaultValue:r,initialValue:r,validate:G});i.isCancel(a)&&m();let f=a.trim(),c=await i.confirm({message:"Use Tailwind CSS?",initialValue:!0});i.isCancel(c)&&m();let d=await i.select({message:"Package manager:",initialValue:M(),options:[{value:"npm",label:"npm"},{value:"pnpm",label:"pnpm"},{value:"yarn",label:"yarn"},{value:"bun",label:"bun"}]});i.isCancel(d)&&m();let g=i.spinner();g.start("Generating project files..."),await D(S.join(import.meta.dirname,"..","assets",c?"tailwind":"default"),n,{websiteURL:J,name:f,id:R(),version:"1.0.0",exec:z(d)}),g.stop("Generated project files!"),g.start(`Installing ${d} dependencies...`),await h(`${d} install`,{cwd:n}),g.stop(`Installed ${d} dependencies!`),g.start("Installing cargo dependencies..."),await h("cargo fetch",{cwd:S.join(n,"src-tauri")}),g.stop("Installed cargo dependencies!"),g.start("Initializing Git..."),await h("git init",{cwd:n}),await h("git add .",{cwd:n}),await h('git commit -m "Initialize repository with Vibingbase CLI"',{cwd:n}),g.stop("Initialized Git!"),i.note(`cd ${e}
|
|
2
|
+
${U(d,"dev")}`,"Next steps"),i.outro(u)}import*as p from"@clack/prompts";import Ot from"picocolors";import{createAuthClient as Pt}from"better-auth/client";import{adminClient as At,organizationClient as Tt}from"better-auth/client/plugins";var B=process.env.NODE_ENV==="production"?"https://api.vibingbase.com":"http://localhost:23588";import{readFile as vt}from"node:fs/promises";import kt from"node:path";import{homedir as xt}from"node:os";import St from"node:path";var v=St.join(xt(),".vibingbase");var w=kt.join(v,"auth.json");import{z as Y}from"zod";var C=Y.object({token:Y.string().nullish()});async function I(){try{let t=await vt(w,"utf8");return C.parse(JSON.parse(t))}catch{return{}}}async function K(){return((await I()).token??"")||void 0}import{mkdir as Ct,writeFile as It}from"node:fs/promises";async function Q(t){await Ct(v,{recursive:!0}),await It(w,JSON.stringify(t))}async function P(t){let o=await I();await Q({...o,token:t})}var l=Pt({baseURL:B,basePath:"/v1/auth",plugins:[At(),Tt()],fetchOptions:{throw:!0,auth:{type:"Bearer",token:K},onSuccess:async({response:t})=>{let o=t.headers.get("set-auth-token");o&&await P(o)}}});import{rm as Nt}from"node:fs/promises";async function A(){await Nt(w,{force:!0})}var T="Sign in to your Vibingbase account";import*as ot from"@clack/prompts";import jt from"open";var X=process.env.NODE_ENV==="production"?"https://app.vibingbase.com":"http://localhost:1420";import*as Z from"@clack/prompts";function N(t){Z.note(`
|
|
3
|
+
Email: ${t.user.email}
|
|
4
|
+
Name: ${t.user.name}
|
|
5
|
+
`.trim(),"Account details")}import{createServer as Vt}from"node:http";function tt(){return new Promise(t=>{let o,e=new Promise(r=>{o=r}),n=Vt((r,a)=>{if(r.method==="OPTIONS"){a.writeHead(204,{"access-control-allow-origin":"*","access-control-allow-methods":"POST, OPTIONS","access-control-allow-headers":"content-type"}),a.end();return}if(r.method==="POST"){let f="";r.on("data",c=>{f+=c.toString()}),r.on("end",()=>{try{let{token:c}=C.parse(JSON.parse(f));if(!c)throw new Error("Failed to get auth token");a.writeHead(200,{"access-control-allow-origin":"*"}),a.end("OK"),n.close(),o(c)}catch{a.writeHead(400,{"access-control-allow-origin":"*"}),a.end("Bad Request")}});return}a.writeHead(405,{"access-control-allow-origin":"*"}),a.end("Method Not Allowed")});n.listen(0,"localhost",()=>{let r=n.address();if(typeof r!="object"||!r)throw new Error("Failed to start auth server");t({port:r.port,waitForToken:()=>e})})})}async function V(t){t.start("Opening browser for authentication...");let{port:o,waitForToken:e}=await tt(),n=`${X}/authorize-cli?port=${o}`;await jt(n),t.stop("Opened browser for authentication!"),ot.note(`
|
|
6
|
+
URL: ${n}
|
|
7
|
+
`.trim(),"Authentication details"),t.start("Waiting for authentication...");let r=await e();await P(r);let a=await l.getSession();if(!a)throw new Error("Failed to sign in");return t.stop("Signed in!"),N(a),a}async function et(){p.intro(Ot.bold(T));let t=await l.getSession();if(t){p.log.warn(`You're already signed in as ${t.user.email}!`);let e=await p.confirm({message:"Sign in with a different account?",initialValue:!1});(p.isCancel(e)||!e)&&m(),await l.signOut(),await A()}let o=p.spinner();await V(o),p.outro(u)}import*as s from"@clack/prompts";import $t from"picocolors";import*as b from"@clack/prompts";async function j(t,o){let e=await l.getSession();if(e)return[e,!0];if(!o)return[void 0,!1];b.log.warn("You're currently not signed in!");let n=await b.confirm({message:"Sign in to continue?",initialValue:!0});return(b.isCancel(n)||!n)&&m(),[await V(t),!1]}var O="Sign out of your Vibingbase account";async function rt(){s.intro($t.bold(O));let t=s.spinner(),[o]=await j(t,!1);if(!o){s.log.info("You're already signed out!"),s.outro(u);return}let e=await s.confirm({message:`Sign out of ${o.user.email}?`,initialValue:!1});(s.isCancel(e)||!e)&&m(),t.start("Signing out..."),await l.signOut(),await A(),t.stop("Signed out!"),s.outro(u)}import*as y from"@clack/prompts";import Ft from"picocolors";var $="Show your current Vibingbase account";async function it(){y.intro(Ft.bold($));let t=y.spinner(),[o,e]=await j(t,!0);e&&N(o),y.outro(u)}var F={name:"vibingbase",version:"0.12.39",description:"CLI for creating Vibingbase apps",keywords:["vibingbase","vibe-coding","ai-coding","low-code","no-code"],homepage:"https://www.vibingbase.com",bugs:{url:"https://github.com/vibingbase/apps/issues",email:"team@vibingbase.com"},license:"MIT",author:{name:"Vibingbase",email:"team@vibingbase.com"},type:"module",imports:{"#./*":"./*"},exports:{".":{development:"./lib/index.ts",import:"./dist/index.js"}},bin:"./bin/index.js",dependencies:{"@clack/prompts":"^0.11.0","better-auth":"^1.4.7","change-case":"^5.4.4",commander:"^14.0.2",ejs:"^3.1.10",nanoid:"^5.1.6",open:"^11.0.0",picocolors:"^1.1.1",zod:"^4.2.1"},devDependencies:{"@types/ejs":"^3.1.5","eslint-config-base":"workspace:^"}};var x=new Et;x.name(F.name).version(F.version).description(F.description);x.command("create",{isDefault:!0}).description(k).action(q);x.command("login").description(T).action(et);x.command("logout").description(O).action(rt);x.command("whoami").description($).action(it);await x.parseAsync();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibingbase",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.39",
|
|
4
4
|
"description": "CLI for creating Vibingbase apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vibingbase",
|
|
@@ -31,11 +31,14 @@
|
|
|
31
31
|
"bin": "./bin/index.js",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@clack/prompts": "^0.11.0",
|
|
34
|
+
"better-auth": "^1.4.7",
|
|
34
35
|
"change-case": "^5.4.4",
|
|
35
36
|
"commander": "^14.0.2",
|
|
36
37
|
"ejs": "^3.1.10",
|
|
37
38
|
"nanoid": "^5.1.6",
|
|
38
|
-
"
|
|
39
|
+
"open": "^11.0.0",
|
|
40
|
+
"picocolors": "^1.1.1",
|
|
41
|
+
"zod": "^4.2.1"
|
|
39
42
|
},
|
|
40
43
|
"files": [
|
|
41
44
|
"assets",
|