@anna-ai/cli 0.1.32 → 0.1.33

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.
@@ -32,9 +32,10 @@ function declaresUiBundle(version) {
32
32
  return typeof entry === "string" && entry.length > 0;
33
33
  }
34
34
  function statusGuard(app) {
35
- if (app.status === "APPROVED" || app.status === "PUBLISHED") return;
35
+ const status = (app.status ?? "").toUpperCase();
36
+ if (status === "APPROVED" || status === "PUBLISHED") return;
36
37
  let hint;
37
- switch (app.status) {
38
+ switch (status) {
38
39
  case "DRAFT":
39
40
  case "REJECTED":
40
41
  hint = "submit for review first: `anna-app apps submit-review`";
@@ -76,7 +77,7 @@ async function runAppsRelease(opts) {
76
77
  if (!bundle || bundle.status !== "bundle_ready") throw new CliError(`version ${opts.version} declares a UI bundle but it is not finalized (status=${bundle?.status ?? "missing"}) — re-run 'anna-app apps publish'`, 4);
77
78
  }
78
79
  statusGuard(app);
79
- if (target.is_latest && app.status === "PUBLISHED") {
80
+ if (target.is_latest && (app.status ?? "").toUpperCase() === "PUBLISHED") {
80
81
  if (opts.json) {
81
82
  console.log(JSON.stringify({
82
83
  host,
@@ -45,7 +45,7 @@ async function runAppsStatus(opts) {
45
45
  });
46
46
  }
47
47
  function colorStatus(s) {
48
- switch (s) {
48
+ switch (s.toUpperCase()) {
49
49
  case "PUBLISHED": return green(s);
50
50
  case "PENDING_REVIEW": return yellow(s);
51
51
  case "REJECTED": return red(s);
package/dist/cli.js CHANGED
@@ -740,7 +740,7 @@ apps.command("discard").description("Drop the mutable working draft (leaves cut
740
740
  }));
741
741
  });
742
742
  apps.command("release <version>").description("Freeze & publish an existing remote version (go live)").option("--slug <slug>", "App slug (default: resolve from .anna/app.json cache)").option("--cwd <dir>", "Project root for identity cache (default: cwd)").option("--allow-create", "If the version isn't on the server, run 'apps publish' first, then release", false).option("--dry-run", "Resolve target + pre-flight but don't publish", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (version, opts) => {
743
- const { runAppsRelease } = await import("./apps-release-DZK30eF_.js");
743
+ const { runAppsRelease } = await import("./apps-release-CyAPmWPU.js");
744
744
  process.exit(await runAppsRelease({
745
745
  version,
746
746
  slug: opts.slug,
@@ -772,7 +772,7 @@ apps.command("submit-review [slug]").description("Move an app into review (DRAFT
772
772
  }));
773
773
  });
774
774
  apps.command("status <slug>").description("Show server-known state for one Anna App").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (slug, opts) => {
775
- const { runAppsStatus } = await import("./apps-status-Ca6MdXZd.js");
775
+ const { runAppsStatus } = await import("./apps-status-DV8V_y35.js");
776
776
  process.exit(await runAppsStatus({
777
777
  slug,
778
778
  account: opts.account,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anna-ai/cli",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "Anna App developer CLI: scaffold, validate, harness (Phase 2 MVP: init + validate).",
5
5
  "license": "MIT",
6
6
  "type": "module",