@wix/himalaya-cli 0.867.0 → 0.868.0

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +47 -4
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -27348,7 +27348,6 @@ function shouldRevealError(args) {
27348
27348
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
27349
27349
  var init_validation = __esm({
27350
27350
  "../../core/ts/src/validation.ts"() {
27351
- "use strict";
27352
27351
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
27353
27352
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
27354
27353
  INTEGER_RE = /^[+-]?[0-9]+$/;
@@ -30772,7 +30771,6 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
30772
30771
  var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
30773
30772
  var init_worker_subtree = __esm({
30774
30773
  "../../core/ts/src/worker-subtree.ts"() {
30775
- "use strict";
30776
30774
  init_worker_subtree_safe_types_generated();
30777
30775
  WORKER_SUBTREE_CEILINGS = Object.freeze({
30778
30776
  maxEncodedBytes: 65536,
@@ -62972,7 +62970,7 @@ var COMMANDS = [
62972
62970
  { name: "sdk", summary: "list importable @himalaya SDKs + descriptions; a name = that SDK's typed API (offline)", required: "[<name>] [--json]" },
62973
62971
  { name: "skills", summary: "list the authoring topics you can learn, grouped by category (offline)", required: "[--json]" },
62974
62972
  { name: "agent-init", summary: "seed a dir with HIMALAYA.md + component reference + the counter example so a coding agent can author Himi apps", required: "[--dir <dir>]" },
62975
- { name: "apps", summary: "the owner app registry (public dev loop). `list` (default) prints the apps your Wix identity owns; `claim <slug>` takes ownership of a slug so `himi push` can publish under it \u2014 though `himi push` now claims a brand-new app's slug for you (namespaced per owner as `<ownerPrefix>.<name>`, composed offline from the token \u2014 himalaya.content.json is not rewritten), so this is mostly for taking a name ahead of time. Auth is the control token `himi login --browser` stored, or an explicitly forwarded Wix session (--cookie / HIMI_WIX_COOKIE) for a scripted call with no browser \u2014 a write through the public gateway needs the XSRF-TOKEN cookie too. Reads (list) work with either.", required: "[list] | claim <slug> [--display-name <n>] [--account-id <id>] [--target <t>] [--cookie <c>] [--control-token <t>]" },
62973
+ { name: "apps", summary: "the owner app registry (public dev loop). `list` (default) prints the apps your Wix identity owns; `claim <slug>` takes ownership of a slug so `himi push` can publish under it \u2014 though `himi push` now claims a brand-new app's slug for you (namespaced per owner as `<ownerPrefix>.<name>`, composed offline from the token \u2014 himalaya.content.json is not rewritten), so this is mostly for taking a name ahead of time. `release <slug> --yes` gives a name BACK, freeing it for anyone to claim \u2014 refused for an app that has ever been published (devices may still resolve it), owner-only, and it signs you out everywhere because your token carries the app in its frozen scope. Auth is the control token `himi login --browser` stored, or an explicitly forwarded Wix session (--cookie / HIMI_WIX_COOKIE) for a scripted call with no browser \u2014 a write through the public gateway needs the XSRF-TOKEN cookie too. Reads (list) work with either.", required: "[list] | claim <slug> [--display-name <n>] [--account-id <id>] | release <slug> --yes [--target <t>] [--cookie <c>] [--control-token <t>]" },
62976
62974
  { name: "fonts", summary: "the curated font vocabulary an app may name, and what THIS app will actually ship. `list` (default) prints every family with its category, weights, byte cost and licence \u2014 `--licenses` adds the notice text OFL requires travel with the font. `check` is OFFLINE and runs the same computation the release build and the CI gate do: which faces pack into the binary, which are declared for OTA fetch, and any family that would silently render as the system font (a non-zero exit, because that degrade is invisible at runtime). `add <Family>` resolves a name (exact, normalized or alias) and reports the licence being accepted.", required: "[list] [--licenses] | check [--content <dir>] | add <Family>" },
62977
62975
  { name: "assets", summary: "app-owned resources declared under assets/ \u2014 images, Godot content packs, fonts, Rive files, video. `list` (default) reports each with hash, size, whether it bakes into the binary, and any budget problem that would make `himi push` refuse; reference one from a descriptor as `asset:<name>`. `verify` diffs assets/ on disk against what a release carries, flagging CLI-uploaded assets as DRIFT (they work at runtime but are not in git). `add <file>` uploads one imperatively (origin=cli, NOT baked, NOT in git \u2014 prefer committing to assets/); `rm <name>` drops the record so the next resolve falls back to the baked copy.", required: "[list] [--content <dir>] | verify [--app <a>] [--release <id>] | add <file> [--name <n>] [--live] | rm <name> [--live]" },
62978
62976
  { name: "secrets", summary: "manage encrypted secret metadata for an app's server functions. `set`/`rotate` read the secret value from stdin (never an argv); `list` shows names + environments, never values. Preview and production are separate scopes. Remote (BO) mode reads the DPX session; local mode uses the operator functions plane.", required: "set|list|rotate --app <app> --name <name> [--environment preview|production] [--target <t>] [--functions-url <url>] [--release <id>]" },
@@ -63154,6 +63152,18 @@ function previewPlayerLink(app, release, screenId) {
63154
63152
  function previewPlayerDebugLink(app, release, screenId, previewToken) {
63155
63153
  return buildHimiPreviewUrl({ app, releaseId: release, screenId, previewToken, source: "cli" });
63156
63154
  }
63155
+ function releaseHint(error) {
63156
+ if (error === "app_published_cannot_release") {
63157
+ return { hint: "a name that has been published keeps its owner, because devices may still resolve it \u2014 ask an operator if it really must be freed" };
63158
+ }
63159
+ if (error === "release_unavailable") {
63160
+ return { hint: "this plane cannot release safely right now (it cannot prove the app was never published, or cannot revoke your token) \u2014 nothing changed, so retrying later is safe" };
63161
+ }
63162
+ if (error === "release_unsupported") return { hint: "this plane's store has no atomic swap, so it will not release a name \u2014 nothing changed" };
63163
+ if (error === "conflict") return { hint: "the app changed while releasing it \u2014 nothing was released, so re-run to pick up the new state" };
63164
+ if (error === "forbidden_requires_owner") return { hint: "only the app's OWNER may give its name away \u2014 an editor cannot" };
63165
+ return {};
63166
+ }
63157
63167
  function claimHint(status, error) {
63158
63168
  if (error === "slug_published") return { hint: "that app already exists on the serve plane and is not yours \u2014 pick another slug" };
63159
63169
  if (error === "slug_taken") return { hint: "someone else already claimed that slug \u2014 pick another" };
@@ -67741,8 +67751,41 @@ ${label2}`);
67741
67751
  print({ ok: true, ...j2 });
67742
67752
  return 0;
67743
67753
  }
67754
+ if (sub === "release") {
67755
+ const slug = pos[2];
67756
+ if (!slug) {
67757
+ io.error(JSON.stringify({ error: "usage: himi apps release <slug> --yes" }));
67758
+ return 2;
67759
+ }
67760
+ if (flags.yes !== true) {
67761
+ io.error(JSON.stringify({
67762
+ error: "confirmation_required",
67763
+ hint: `releasing "${slug}" frees the name for anyone to claim and signs you out everywhere \u2014 re-run with --yes`
67764
+ }));
67765
+ return 2;
67766
+ }
67767
+ const r2 = await fetch(`${base}/v1/owner/apps/release`, {
67768
+ method: "POST",
67769
+ headers: { ...headers2, "content-type": "application/json" },
67770
+ body: JSON.stringify({ slug })
67771
+ });
67772
+ const j2 = await r2.json().catch(() => ({}));
67773
+ if (!r2.ok) {
67774
+ const err = j2.error;
67775
+ io.error(JSON.stringify({
67776
+ ok: false,
67777
+ status: r2.status,
67778
+ ...j2,
67779
+ ...ownerPlaneHint(r2.status, err, target),
67780
+ ...releaseHint(err)
67781
+ }));
67782
+ return 1;
67783
+ }
67784
+ print({ ok: true, ...j2 });
67785
+ return 0;
67786
+ }
67744
67787
  if (sub && sub !== "list") {
67745
- io.error(JSON.stringify({ error: `unknown subcommand "${sub}" \u2014 usage: himi apps [list] | himi apps claim <slug>` }));
67788
+ io.error(JSON.stringify({ error: `unknown subcommand "${sub}" \u2014 usage: himi apps [list] | himi apps claim <slug> | himi apps release <slug> --yes` }));
67746
67789
  return 2;
67747
67790
  }
67748
67791
  const r = await fetch(`${base}/v1/owner/apps`, { headers: headers2 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.867.0",
3
+ "version": "0.868.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -63,5 +63,5 @@
63
63
  "artifactId": "himalaya-cli"
64
64
  }
65
65
  },
66
- "falconPackageHash": "be3740c3591eb9efb018d5a74579406de0d7aae46132f7b14bc8a423"
66
+ "falconPackageHash": "8fbad929c25341a6f5c5c7eea5279a98f7729861f603b37bff5b9465"
67
67
  }