feat: add safe project upgrades and production performance fixes
This commit is contained in:
@@ -13,6 +13,7 @@ import { join, resolve } from "node:path";
|
||||
import { resolveProfile, loadEnv } from "@wrnexus/styles";
|
||||
import { runDev } from "./dev.ts";
|
||||
import { createApp } from "./create.ts";
|
||||
import { currentCliVersion, notifyIfUpdateAvailable } from "./update-notifier.ts";
|
||||
|
||||
/**
|
||||
* Resolve the active profile from `--profile=<name>` (or WRNEXUS_PROFILE / mode),
|
||||
@@ -51,7 +52,7 @@ Usage:
|
||||
wrnexus native list List cross-platform native capabilities
|
||||
wrnexus native add <capability...> Install capability packages for the configured mobile mode
|
||||
wrnexus eject <name...> Copy a Wire UI component into app/components
|
||||
wrnexus update [dir] [--latest] Upgrade @wrnexus/* deps + apply config/file migrations
|
||||
wrnexus update [dir] [--latest] Upgrade deps, migrate project files, and verify the app
|
||||
wrnexus db <cmd> Migrations: migrate | rollback | status | seed | generate | new
|
||||
wrnexus test [app-dir] [--watch] Run the app's tests (bun test, 'test' profile)
|
||||
wrnexus profiles [app-dir] List config profiles (dev/prod/uat/…) and their env files
|
||||
@@ -59,12 +60,16 @@ Usage:
|
||||
|
||||
Profiles: pass --profile=<name> to dev/build/db (or set WRNEXUS_PROFILE) to load
|
||||
that profile's .env cascade and config overrides. e.g. wrnexus dev --profile=uat
|
||||
|
||||
Update options: --dry-run previews changes; --no-verify skips post-update check/build.
|
||||
`);
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
const [command, ...rest] = process.argv.slice(2);
|
||||
|
||||
notifyIfUpdateAvailable(currentCliVersion(), command);
|
||||
|
||||
switch (command) {
|
||||
case "dev": {
|
||||
const appRoot = rest.find((a) => !a.startsWith("--")) ?? ".";
|
||||
|
||||
Reference in New Issue
Block a user