create-wervt 0.2.11 → 0.2.13
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 +12 -1
- package/index.js +5 -3
- package/package.json +1 -1
- package/template/AGENTS.md +3 -1
- package/template/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
# create-wervt
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Scaffolds a [wervt](https://wervt.app) app: Nuxt with `@wervt/nuxt`, Drizzle, valibot and Vite+,
|
|
4
|
+
a todo example, an `AGENTS.md` for your agent and a GitHub Actions workflow that deploys on push.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
vp create wervt my-app # or: pnpm create wervt my-app
|
|
8
|
+
cd my-app
|
|
9
|
+
vp exec wervt deploy
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`--empty` leaves out the todo example. Sign in first with
|
|
13
|
+
`vpx @wervt/cli login --url <control plane URL>`. See the
|
|
14
|
+
[quickstart](https://wervt.app/getting-started/quickstart).
|
package/index.js
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
import { existsSync } from 'node:fs'
|
|
4
4
|
import { cp, readFile, rename, rm, writeFile } from 'node:fs/promises'
|
|
5
5
|
import { dirname, join, relative, resolve } from 'node:path'
|
|
6
|
+
import { fileURLToPath } from 'node:url'
|
|
6
7
|
import * as p from '@clack/prompts'
|
|
7
8
|
import { defineCommand, runMain } from 'citty'
|
|
8
9
|
import { downloadTemplate } from 'giget'
|
|
9
10
|
import { installDependencies } from 'nypm'
|
|
10
11
|
|
|
11
12
|
// templates/app, copied into the package when it's packed (see copy-template.js).
|
|
12
|
-
const BUNDLED_TEMPLATE = new URL('./template', import.meta.url)
|
|
13
|
+
const BUNDLED_TEMPLATE = fileURLToPath(new URL('./template', import.meta.url))
|
|
13
14
|
const NAME_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/
|
|
14
15
|
|
|
15
16
|
// Without a terminal (CI logs, agent shells), clack's spinner prints every frame as text.
|
|
@@ -173,9 +174,10 @@ const main = defineCommand({
|
|
|
173
174
|
[
|
|
174
175
|
cd && `cd ${cd}`,
|
|
175
176
|
!args.install && 'pnpm install',
|
|
176
|
-
'pnpm dev',
|
|
177
177
|
monorepo && `pnpm app:deploy ${name} # from the repo root`,
|
|
178
|
-
!monorepo && 'pnpm exec wervt deploy # or
|
|
178
|
+
!monorepo && 'pnpm exec wervt deploy # or push: .github/workflows/deploy.yml',
|
|
179
|
+
// The local stack is optional, so the dev server comes second: a deploy is the real test.
|
|
180
|
+
'pnpm dev # optional; the database needs the local wervt stack',
|
|
179
181
|
]
|
|
180
182
|
.filter(Boolean)
|
|
181
183
|
.join('\n'),
|
package/package.json
CHANGED
package/template/AGENTS.md
CHANGED
|
@@ -302,7 +302,9 @@ Queries are LogsQL. Logs may contain user data: quote only what's needed.
|
|
|
302
302
|
|
|
303
303
|
## Commands
|
|
304
304
|
|
|
305
|
-
- `pnpm dev`: dev server
|
|
305
|
+
- `pnpm dev`: dev server. Pages and API routes work on their own; the database, live data and
|
|
306
|
+
files need the local wervt stack (`docker compose up -d` in the wervt repo), which is optional.
|
|
307
|
+
Without it, check database work on the deployed app.
|
|
306
308
|
- `pnpm db:generate`: generate a migration from the schema.
|
|
307
309
|
- `pnpm exec vp check --fix`: format, lint and type check. Run it before finishing.
|
|
308
310
|
- Deploys: pushing to `main` deploys through `.github/workflows/deploy.yml`.
|
package/template/package.json
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"postinstall": "nuxt prepare"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@wervt/nuxt": "^0.3.
|
|
12
|
+
"@wervt/nuxt": "^0.3.1",
|
|
13
13
|
"drizzle-orm": "1.0.0-rc.4",
|
|
14
14
|
"nuxt": "npm:nuxt-nightly@5x",
|
|
15
15
|
"valibot": "^1.5.0",
|
|
16
16
|
"vue": "^3.5.43"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@wervt/cli": "^0.2.
|
|
19
|
+
"@wervt/cli": "^0.2.12",
|
|
20
20
|
"drizzle-kit": "1.0.0-rc.4",
|
|
21
21
|
"vite-plus": "^1.0.0"
|
|
22
22
|
}
|