@wervt/cli 0.2.5 → 0.2.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/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 = p.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)`);
@@ -221,7 +239,8 @@ const deploy = defineCommand({
221
239
  extract: "Extracting",
222
240
  migrate: "Migrating database",
223
241
  storage: "Setting up storage",
224
- activate: "Activating"
242
+ activate: "Activating",
243
+ boot: "Starting"
225
244
  };
226
245
  const decoder = new TextDecoder();
227
246
  let buffer = "";
@@ -237,11 +256,23 @@ const deploy = defineCommand({
237
256
  return;
238
257
  }
239
258
  if (event.done) {
240
- spinner.stop(`Release ${event.release}`);
241
- p.outro(`Deployed → ${event.url}`);
259
+ spinner.stop(`Release ${event.release}${event.bootMs === void 0 ? "" : `, started in ${event.bootMs} ms`}`);
260
+ outro(`Deployed → ${event.url}`);
242
261
  if (process.env.GITHUB_OUTPUT) await appendFile(process.env.GITHUB_OUTPUT, `url=${event.url}\nrelease=${event.release}\n`);
243
262
  return;
244
263
  }
264
+ if (event.step === "boot-unchecked") {
265
+ p.log.warn("Couldn't check that the release starts. Open the app to make sure.");
266
+ continue;
267
+ }
268
+ if (event.step === "boot-failed") {
269
+ spinner.error(`Release ${event.release} didn't start`);
270
+ p.log.message(event.message);
271
+ if (event.restored) p.log.info(`${name} is back on ${event.restored}.`);
272
+ else p.log.warn(`${name} has no earlier release to go back to.`);
273
+ process.exitCode = 1;
274
+ return;
275
+ }
245
276
  if (event.step === "storage-failed") {
246
277
  p.log.warn(`Storage isn't set up: ${event.message}. The app runs; files won't work yet.`);
247
278
  continue;
@@ -745,7 +776,7 @@ async function browserLogin(url) {
745
776
  });
746
777
  if (p.isCancel(go)) throw new Error("Cancelled");
747
778
  if (go) await openBrowser(login.verifyUrl);
748
- const spinner = p.spinner();
779
+ const spinner = progress();
749
780
  spinner.start("Waiting for approval in the dashboard");
750
781
  const deadline = new Date(login.expiresAt).getTime();
751
782
  while (Date.now() < deadline) {
@@ -803,7 +834,7 @@ const login = defineCommand({
803
834
  url,
804
835
  token
805
836
  });
806
- p.outro(`Signed in to ${url} (saved to ${file})`);
837
+ outro(`Signed in to ${url} (saved to ${file})`);
807
838
  }
808
839
  });
809
840
  runMain(defineCommand({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wervt/cli",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Deploy and manage apps on wervt.",
5
5
  "keywords": [
6
6
  "agents",
package/skill/SKILL.md CHANGED
@@ -45,6 +45,9 @@ 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.
49
52
  - After changing `server/db/schema.ts`: `pnpm db:generate`, and commit the migration.
50
53
  - `pnpm dev` runs against a local wervt stack, which the user may not have. When it isn't running,