vela 0.9.0 → 0.9.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/README.md +24 -155
- package/dist/bin.js +3 -3
- package/dist/bin.js.map +1 -1
- package/package.json +3 -3
- package/templates/minimal/package.template.json +1 -1
package/README.md
CHANGED
|
@@ -1,186 +1,55 @@
|
|
|
1
1
|
# vela
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Full-stack SvelteKit, without the setup.**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Node 20.19+ or 22.12+
|
|
8
|
-
- No separate PocketBase install — generated projects run it locally via `pocketbase-server`
|
|
9
|
-
|
|
10
|
-
## Install
|
|
5
|
+
`vela` scaffolds a SvelteKit app with a real backend already wired up — database, auth, payments, typed data access — and keeps generating the boring parts as you build. Everything it writes is ordinary source in your project. No runtime to learn, no lock-in, nothing hidden behind a flag.
|
|
11
6
|
|
|
12
7
|
```sh
|
|
13
|
-
npm
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
This installs two command names, `vela` and `velastack`. They are equivalent.
|
|
17
|
-
|
|
18
|
-
## Quick start
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
vela create my-app
|
|
8
|
+
npm create vela my-app
|
|
22
9
|
cd my-app
|
|
23
10
|
npm run dev
|
|
24
11
|
```
|
|
25
12
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
### Templates
|
|
29
|
-
|
|
30
|
-
| Template | Adapter | Backend | Dev server |
|
|
31
|
-
| --------- | ---------------- | --------------------------------- | ---------- |
|
|
32
|
-
| `minimal` | `adapter-auto` | PocketBase, wired up and migrated | `vela dev` |
|
|
33
|
-
| `static` | `adapter-static` | none — frontend only | `vite dev` |
|
|
34
|
-
|
|
35
|
-
```sh
|
|
36
|
-
vela create my-app --template static
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
The `static` template is a prerendered frontend: no PocketBase, no superuser, no
|
|
40
|
-
`.env`, and its scripts call `vite` directly rather than the `vela` commands that
|
|
41
|
-
need a database. Site metadata lives in `src/lib/site.ts` — set `url` there to
|
|
42
|
-
where the site is deployed before building for production. The frontend commands
|
|
43
|
-
(`vela ui`, `vela legal`, `vela routes`, `vela i18n`) still work.
|
|
13
|
+
That's a running app with a database behind it. No separate PocketBase install, no Docker, no config.
|
|
44
14
|
|
|
45
|
-
|
|
46
|
-
`vela legal terms` generate. Until they exist, the dev server answers those paths
|
|
47
|
-
with the command that creates them, and the build warns instead of failing. Every
|
|
48
|
-
other broken link is still a build error.
|
|
15
|
+
## What you get
|
|
49
16
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
| `--password <password>` | Superuser password, skips the prompt (backend only) |
|
|
56
|
-
| `--no-install` | Skip installing dependencies |
|
|
17
|
+
- **A backend on day one.** PocketBase, migrated and running locally, with types synced from your schema as it changes.
|
|
18
|
+
- **Auth, payments, teams, email, i18n** — one command each, generated into your project as code you own.
|
|
19
|
+
- **CRUD you didn't write.** `vela generate scaffold post title:text body:editor` gives you the model, schema, forms, and pages.
|
|
20
|
+
- **Describe it instead.** Pass `--ai "a blog post with tags and a cover image"` and review the collection it designs before anything is written.
|
|
21
|
+
- **shadcn-svelte components** on tap, and fixtures and seeds for realistic data while you work.
|
|
57
22
|
|
|
58
|
-
|
|
23
|
+
## The shape of a day
|
|
59
24
|
|
|
60
25
|
```sh
|
|
61
|
-
vela
|
|
26
|
+
vela enable auth # sign-in, sessions, OAuth scaffold
|
|
27
|
+
vela generate scaffold post title:text body:editor # model, forms, list and detail pages
|
|
28
|
+
vela migrate up # schema, versioned and in git
|
|
29
|
+
vela ui add button card dialog # components, into your project
|
|
62
30
|
```
|
|
63
31
|
|
|
64
|
-
|
|
32
|
+
Changed your mind? `vela destroy` and `vela disable` take it back out.
|
|
65
33
|
|
|
66
|
-
##
|
|
34
|
+
## Already have a project?
|
|
67
35
|
|
|
68
36
|
```sh
|
|
69
|
-
vela
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
| Command | Description |
|
|
73
|
-
| ---------------------------------------------- | -------------------------------------------------- |
|
|
74
|
-
| `generate scaffold <model> [fields...]` | Model, forms, list and detail pages — the full set |
|
|
75
|
-
| `generate resource <model> [fields...]` | Model plus CRUD pages |
|
|
76
|
-
| `generate schema <model> [fields...]` | Zod schema only |
|
|
77
|
-
| `generate form [model] [fields...]` | Form only |
|
|
78
|
-
| `generate migration <collection> <op> [args…]` | Migration against an existing collection |
|
|
79
|
-
|
|
80
|
-
`generate scaffold`, `schema`, and `form` accept `--ai <description>` in place of an explicit field list, which designs the collection (and its form layout) from a natural-language prompt and previews it before writing anything.
|
|
81
|
-
|
|
82
|
-
Anything generated can be removed again:
|
|
83
|
-
|
|
84
|
-
```sh
|
|
85
|
-
vela destroy scaffold post
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
`destroy` mirrors `generate` with `scaffold`, `resource`, `schema`, and `form`.
|
|
89
|
-
|
|
90
|
-
## Features
|
|
91
|
-
|
|
92
|
-
Features are added as real source in your project, not hidden behind a runtime flag.
|
|
93
|
-
|
|
94
|
-
```sh
|
|
95
|
-
vela enable auth
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
| Feature | Description |
|
|
99
|
-
| --------------------- | ----------------------------------------------------- |
|
|
100
|
-
| `auth` | Email/password authentication plus an OAuth scaffold |
|
|
101
|
-
| `backend` | The PocketBase backend |
|
|
102
|
-
| `api` | The PocketBase REST API |
|
|
103
|
-
| `api-keys` | API key issuing and verification |
|
|
104
|
-
| `teams` | Teams / multi-tenancy |
|
|
105
|
-
| `payments` | Stripe payments |
|
|
106
|
-
| `subscriptions` | Stripe subscriptions (requires `auth` and `payments`) |
|
|
107
|
-
| `s3` | S3 file storage |
|
|
108
|
-
| `smtp` | SMTP for transactional email |
|
|
109
|
-
| `i18n` | Internationalization |
|
|
110
|
-
| `content-negotiation` | `sveltekit-negotiate` content negotiation |
|
|
111
|
-
| `blog` | An mdsvex blog with posts, tags, and RSS |
|
|
112
|
-
|
|
113
|
-
Every feature except `blog` and `subscriptions` has a matching `vela disable <feature>`.
|
|
114
|
-
|
|
115
|
-
## Data
|
|
116
|
-
|
|
117
|
-
```sh
|
|
118
|
-
vela migrate up
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
| Command | Description |
|
|
122
|
-
| ----------------------- | --------------------------------------------------- |
|
|
123
|
-
| `migrate up` | Apply pending migrations |
|
|
124
|
-
| `migrate down [n]` | Revert the last N migrations |
|
|
125
|
-
| `migrate create <name>` | New blank migration |
|
|
126
|
-
| `migrate collections` | Snapshot local collections into a new migration |
|
|
127
|
-
| `migrate history-sync` | Drop `_migrations` rows whose files no longer exist |
|
|
128
|
-
|
|
129
|
-
Fixtures are generated fake data for development; seeds are real records you want to keep.
|
|
130
|
-
|
|
131
|
-
| Command | Description |
|
|
132
|
-
| ------------------- | ---------------------------------------------------- |
|
|
133
|
-
| `fixtures generate` | Generate fixture data |
|
|
134
|
-
| `fixtures load` | Load fixtures into the database |
|
|
135
|
-
| `fixtures clear` | Remove loaded fixtures |
|
|
136
|
-
| `fixtures reset` | Clear and reload |
|
|
137
|
-
| `fixtures regen` | Clear the database, regenerate the files, and reload |
|
|
138
|
-
| `seeds save` | Save current data as seeds |
|
|
139
|
-
| `seeds load` | Load seeds into the database |
|
|
140
|
-
| `seeds clear` | Remove seeded records |
|
|
141
|
-
|
|
142
|
-
## UI
|
|
143
|
-
|
|
144
|
-
```sh
|
|
145
|
-
vela ui add button card dialog
|
|
146
|
-
vela ui base slate
|
|
37
|
+
vela bless
|
|
147
38
|
```
|
|
148
39
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
## Everyday commands
|
|
152
|
-
|
|
153
|
-
| Command | Description |
|
|
154
|
-
| ------------- | ---------------------------------------------------------------- |
|
|
155
|
-
| `dev` | Start SvelteKit and PocketBase together, syncing types on change |
|
|
156
|
-
| `build` | Build the app |
|
|
157
|
-
| `preview` | Preview the built app |
|
|
158
|
-
| `sync` | Regenerate types from the live database schema |
|
|
159
|
-
| `test:server` | Run server tests |
|
|
160
|
-
| `routes` | List the project's routes |
|
|
161
|
-
| `i18n` | `extract`, `watch`, `status`, and `clean` for translations |
|
|
162
|
-
| `legal` | Generate placeholder `terms` and `privacy` documents |
|
|
40
|
+
Adds the backend and the rest of the setup to a vanilla SvelteKit project, in place.
|
|
163
41
|
|
|
164
|
-
##
|
|
42
|
+
## It stays your code
|
|
165
43
|
|
|
166
|
-
|
|
167
|
-
vela signup
|
|
168
|
-
vela login
|
|
169
|
-
vela whoami
|
|
170
|
-
vela logout
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
Authenticates against [velastack.dev](https://velastack.dev) for hosted features.
|
|
44
|
+
Generated files are yours to edit — no framework wrapping your app, no magic you can't read. Each project pins the CLI version it was created with, so builds match across your team and in CI no matter what's installed on any one machine.
|
|
174
45
|
|
|
175
|
-
##
|
|
176
|
-
|
|
177
|
-
Each project records the CLI version it was created with, so `vela` produces the same migrations, scaffolds, and builds for everyone on the team and in CI — regardless of what any one machine has installed globally. When your global CLI and a project's pinned version differ, the global one hands off to the pinned one automatically, so you never have to think about which is running.
|
|
46
|
+
## Requirements
|
|
178
47
|
|
|
179
|
-
|
|
48
|
+
Node 20.19+ or 22.12+. That's it.
|
|
180
49
|
|
|
181
50
|
## Docs
|
|
182
51
|
|
|
183
|
-
Full documentation
|
|
52
|
+
Full documentation, every command and flag: [docs.velastack.dev](https://docs.velastack.dev)
|
|
184
53
|
|
|
185
54
|
## License
|
|
186
55
|
|
package/dist/bin.js
CHANGED
|
@@ -7,7 +7,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
|
7
7
|
// package.json
|
|
8
8
|
var package_default = {
|
|
9
9
|
name: "vela",
|
|
10
|
-
version: "0.9.
|
|
10
|
+
version: "0.9.1",
|
|
11
11
|
type: "module",
|
|
12
12
|
description: "A CLI for creating and updating SvelteKit projects",
|
|
13
13
|
license: "MIT",
|
|
@@ -41,8 +41,8 @@ var package_default = {
|
|
|
41
41
|
dependencies: {
|
|
42
42
|
"@clack/prompts": "^1.7.0",
|
|
43
43
|
"@faker-js/faker": "^10.6.0",
|
|
44
|
-
"@velastack/patterns": "^0.0.
|
|
45
|
-
"@velastack/pocketbase": "^0.0
|
|
44
|
+
"@velastack/patterns": "^0.0.61",
|
|
45
|
+
"@velastack/pocketbase": "^0.1.0",
|
|
46
46
|
"annotate-json-schema": "^0.1.0",
|
|
47
47
|
commander: "^13.1.0",
|
|
48
48
|
"cross-spawn": "^7.0.6",
|