@wervt/cli 0.2.6 → 0.2.8
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.mjs +22 -4
- package/package.json +1 -1
- package/skill/SKILL.md +5 -0
package/dist/index.mjs
CHANGED
|
@@ -122,6 +122,24 @@ async function deploySource(dir) {
|
|
|
122
122
|
}
|
|
123
123
|
//#endregion
|
|
124
124
|
//#region src/index.ts
|
|
125
|
+
const interactive = process.stdout.isTTY === true && !process.env.CI;
|
|
126
|
+
function progress() {
|
|
127
|
+
if (interactive) return p.spinner();
|
|
128
|
+
let last = "";
|
|
129
|
+
const step = (message) => {
|
|
130
|
+
if (message && message !== last) p.log.step(last = message);
|
|
131
|
+
};
|
|
132
|
+
return {
|
|
133
|
+
start: step,
|
|
134
|
+
message: step,
|
|
135
|
+
stop: (message) => message && p.log.success(message),
|
|
136
|
+
error: (message) => message && p.log.error(message)
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function outro(message) {
|
|
140
|
+
if (interactive) p.outro(message);
|
|
141
|
+
else console.log(message);
|
|
142
|
+
}
|
|
125
143
|
const connection = {
|
|
126
144
|
url: {
|
|
127
145
|
type: "string",
|
|
@@ -203,7 +221,7 @@ const deploy = defineCommand({
|
|
|
203
221
|
throwOnError: false
|
|
204
222
|
})).exitCode !== 0) throw new Error("Build failed");
|
|
205
223
|
}
|
|
206
|
-
const spinner =
|
|
224
|
+
const spinner = progress();
|
|
207
225
|
spinner.start("Packing");
|
|
208
226
|
const bundle = await createBundle(dir);
|
|
209
227
|
spinner.stop(`Packed ${bundle.files} files (${(bundle.data.byteLength / 1024).toFixed(0)} kB)`);
|
|
@@ -239,7 +257,7 @@ const deploy = defineCommand({
|
|
|
239
257
|
}
|
|
240
258
|
if (event.done) {
|
|
241
259
|
spinner.stop(`Release ${event.release}${event.bootMs === void 0 ? "" : `, started in ${event.bootMs} ms`}`);
|
|
242
|
-
|
|
260
|
+
outro(`Deployed → ${event.url}`);
|
|
243
261
|
if (process.env.GITHUB_OUTPUT) await appendFile(process.env.GITHUB_OUTPUT, `url=${event.url}\nrelease=${event.release}\n`);
|
|
244
262
|
return;
|
|
245
263
|
}
|
|
@@ -758,7 +776,7 @@ async function browserLogin(url) {
|
|
|
758
776
|
});
|
|
759
777
|
if (p.isCancel(go)) throw new Error("Cancelled");
|
|
760
778
|
if (go) await openBrowser(login.verifyUrl);
|
|
761
|
-
const spinner =
|
|
779
|
+
const spinner = progress();
|
|
762
780
|
spinner.start("Waiting for approval in the dashboard");
|
|
763
781
|
const deadline = new Date(login.expiresAt).getTime();
|
|
764
782
|
while (Date.now() < deadline) {
|
|
@@ -816,7 +834,7 @@ const login = defineCommand({
|
|
|
816
834
|
url,
|
|
817
835
|
token
|
|
818
836
|
});
|
|
819
|
-
|
|
837
|
+
outro(`Signed in to ${url} (saved to ${file})`);
|
|
820
838
|
}
|
|
821
839
|
});
|
|
822
840
|
runMain(defineCommand({
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -45,7 +45,12 @@ existing app, work in its repository instead.
|
|
|
45
45
|
- Keep the app small and complete: data in Postgres through `useDb()`, writes through API routes,
|
|
46
46
|
lists through `useShape` so every open tab stays live. Ask only when the request is genuinely
|
|
47
47
|
ambiguous; otherwise choose sensible defaults and say what you chose.
|
|
48
|
+
- UI: Nuxt UI for clean apps and sites, Reka UI + Tailwind with own styles for playful or
|
|
49
|
+
individual designs, Nuxt UI + the `nuxt-ui-mobile` skill for pure phone apps. Details in the
|
|
50
|
+
app's `AGENTS.md`.
|
|
48
51
|
- Users: wervt signs people in. Use `useWervtUser()`; never build login, passwords or OAuth.
|
|
52
|
+
- Browser agents: add a tool in `server/tools/` (`defineTool`) for each main thing a user does in
|
|
53
|
+
the app, so agents in the browser can do it too (WebMCP). Details in the app's `AGENTS.md`.
|
|
49
54
|
- After changing `server/db/schema.ts`: `pnpm db:generate`, and commit the migration.
|
|
50
55
|
- `pnpm dev` runs against a local wervt stack, which the user may not have. When it isn't running,
|
|
51
56
|
don't set one up: `pnpm build` plus `pnpm exec vp check --fix` are the checks, and the
|