@wix/himalaya-cli 0.891.0 → 0.892.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 +78 -10
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -54301,7 +54301,7 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
54301
54301
  himi deeplinks --app <app> --release <id>
54302
54302
  nav map + web/player deeplinks for a release
54303
54303
  himi logs --app <app> [--release <id>] [--screen <id>] [--level <l>] [--follow] worker console read-back
54304
- himi promote --app <app> --release <id> [--force] flip a draft LIVE (then ring-promote via himi-serve)
54304
+ himi promote --app <app> --release <id> [--ring <r>] [--percent 0-100] [--force] flip a draft LIVE; --ring also points a rollout ring at it
54305
54305
  himi patch screen <id> --app <a> --file <descriptor.json> [--bundle <sha256|none>]
54306
54306
  himi patch bundle --app <a> --file <bundle.js> (--for-screen <id>[,<id>] | --no-rebind)
54307
54307
  himi patch tokens --app <a> --file <tokens.json>
@@ -54601,7 +54601,7 @@ var COMMANDS = [
54601
54601
  { name: "diagnose", summary: "remote screen triage against a pushed release (GET /v1/preview/\u2026/diagnose) \u2014 bindings/schema/boot; exit 1 if ok:false", required: "<screenId> --app --release" },
54602
54602
  { name: "deeplinks", summary: "nav map + web/player deeplinks for a release (GET /v1/preview/\u2026/deeplinks)", required: "--app --release" },
54603
54603
  { name: "logs", summary: "worker console read-back (GET /v1/telemetry/logs); --follow tails via the seq cursor", required: "--app [--release] [--screen] [--level] [--follow]" },
54604
- { name: "promote", summary: "flip a stored draft LIVE (POST /v1/admin/release/activate); a release pushed past errors needs an explicit --force override", required: "--app --release [--force] (--control-token)" },
54604
+ { name: "promote", summary: "flip a stored draft LIVE (POST /v1/admin/release/activate); --ring also points a rollout ring at it in the same command (POST /v1/admin/promote), which ring-based clients need in order to resolve at all \u2014 without it they stay unresolved and the warning goes to stderr; --percent sets that ring's rollout share; a release pushed past errors needs an explicit --force override", required: "--app --release [--ring <ring>] [--percent 0-100] [--force] (--control-token)" },
54605
54605
  { name: "patch", summary: 'change ONE item of a published app \u2014 a screen descriptor, a Tier-5 bundle, tokens, or the app-config baseline \u2014 from a RAW FILE, with no content package and no build. The low-level door: it does not lint your package, because there is no package here; `himi push --only <selector>` is the same edit with the full build + lint gate and is what to reach for when the package is in hand. Derives a new release from the app\'s current LIVE release, or from `--from-release <id>`. An explicit `--draft` or `--live` is REQUIRED \u2014 a patch has no default blast radius \u2014 and `--notes` is required with `--live` on a screen or app-config patch, because off-repo `gitSha` is "dev" and the ledger notes are then the only durable record of bytes that correspond to no commit. A branch does not merge: activating one derived from an older release reverts every item the patch does not move, so that case is refused until `--accept-regressions`. A bundle patch must repoint a screen (`--for-screen`) or the bytes land under a manifest key nothing reads. It cannot ADD a screen (screens are git-only, RFC 0012), never claims a slug \u2014 the app must already be published \u2014 and carries no attestation, source archive, assets, icon or minBinaryVersion, each named in the output.', required: "screen <id> --file <descriptor.json> [--bundle <sha256|none>] | bundle --file <bundle.js> (--for-screen <id>[,<id>] | --no-rebind) | tokens --file <tokens.json> | app-config --file <app-config.json> ; (--draft|--live) --app <a> [--from-release <id>] [--accept-regressions] [--label <n>] [--notes <t>] [--force] [--target <t>] (--control-token)" },
54606
54606
  { name: "visibility", summary: "read (no value) or set whether the public registry (/v1/apps + the Himi Player picker) LISTS the app. `public` lists it for everyone; `unlisted` hides it from listings while direct reads by app id \u2014 deep links, previews \u2014 keep working. App from --app or the content dir. Setting it needs no republish.", required: "[public|unlisted] [--app <a>] [--content <dir>] (--control-token)" },
54607
54607
  { name: "dist", summary: "build an INSTALLABLE QA binary (signed IPA / APK) on the Wix Job Service Mac pool and return an install link \u2014 the serve plane brokers the job, the pool builds it. WAITS for the build by default (~4 min) and prints the install link; `--no-wait` returns a jobId immediately instead. Omitting `--release` builds whatever is LIVE for the app. A named draft is refused unless `--allow-draft` makes that exceptional build explicit. `status <jobId>` / `watch <jobId>` / `list --app <a>` / `cancel <jobId>` inspect and stop builds (`watch` reports up front whether the job mints its own signing identity or borrows one, so a doomed iOS build is cancellable in seconds rather than after the archive). Off-repo, name a target \u2014 `--target wix` for a self-serve Wix login or `--target bo` for the internal employee path (the in-repo default is a local dev plane that isn't reachable off-repo); self-serve callers may build their OWN apps under a tighter budget (2 in flight / 5 per 24h), while a manage-only owner-role credential is refused. `--shell` picks the native host to sign into (branded-lite | owner-lite | player | demo-app). `--signing` defaults to `wix-managed` \u2014 the Wix Apple account mints a per-app signing identity for the build, so the caller provisions no Apple credentials of their own; `--signing byo` (sign with your own Apple account) is reserved and 501s. `--android-signing` is the Android counterpart and a SEPARATE axis (a keystore, not an Apple account): `qa-keystore` (default \u2014 the repo's committed QA key, identical on every pool machine, so a build installs over the previous one), `wix-keystore` (the Wix key the pool machine carries; the build FAILS naming the paths searched if it carries none, rather than quietly signing with something else), or `debug` (the old per-machine key \u2014 QA must uninstall any previous build first). NOT the normal way to ship: screens, Tier-5 bundles, tokens and app-config all go over the air with `himi push` in seconds \u2014 a binary trip is only needed for a NATIVE delta (a new SDUI component, a new declared capability/entitlement, a new bundle id, or a minBinaryVersion floor bump). Refuses to build an app whose launcher icon is missing, a placeholder, or one a store would reject \u2014 the one thing a binary carries that no later OTA push can fix; `--force` builds anyway", required: "[--app <a>] [--platform ios,android] [--release <id>] [--allow-draft] [--target <t>] [--shell branded-lite|owner-lite|player|demo-app] [--signing wix-managed|byo] [--android-signing qa-keystore|wix-keystore|debug] [--borrow-ios-id <bundleId>] [--no-wait] [--force] | status <jobId> [--target <t>] | watch <jobId> [--target <t>] [--interval <ms>] | list --app <a> [--target <t>] | cancel <jobId> [--target <t>]" },
@@ -58539,18 +58539,86 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
58539
58539
  return 2;
58540
58540
  }
58541
58541
  const target = targetName();
58542
- const r = await client2().activateRelease(app, release, flags.force === true);
58542
+ const force = flags.force === true;
58543
+ const ringGiven = flags.ring !== void 0;
58544
+ const ring = str5(flags.ring);
58545
+ if (ringGiven && !ring) {
58546
+ io.error(JSON.stringify({ error: "--ring needs a ring name, e.g. --ring ga" }));
58547
+ return 2;
58548
+ }
58549
+ const percentGiven = flags.percent !== void 0;
58550
+ const percent = num(flags.percent);
58551
+ if (percentGiven && (percent === void 0 || percent < 0 || percent > 100)) {
58552
+ io.error(JSON.stringify({ error: `--percent must be 0..100, got ${String(flags.percent)}` }));
58553
+ return 2;
58554
+ }
58555
+ if (percentGiven && !ring) {
58556
+ io.error(JSON.stringify({ error: "--percent sets a ring's rollout share, so it needs --ring" }));
58557
+ return 2;
58558
+ }
58559
+ const r = await client2().activateRelease(app, release, force);
58560
+ if (!r.ok || !ring) {
58561
+ if (r.ok) {
58562
+ io.error(JSON.stringify({
58563
+ warning: "no rollout ring was promoted \u2014 ring-based clients stay unresolved",
58564
+ next: `himi promote --app ${app} --release ${release} --ring <ring>${force ? " --force" : ""} --target ${target}`
58565
+ }));
58566
+ }
58567
+ print({
58568
+ status: r.status,
58569
+ ...r.json ?? {},
58570
+ ...r.ok ? {
58571
+ ringPromoted: false,
58572
+ note: "activation updates the live release but does not select a rollout ring; ring-based clients remain unresolved until a ring is promoted",
58573
+ // No `nextAuth` here: this `next` is a plain `himi promote`, which resolves its own
58574
+ // credential. It used to name `$TOK` because the hint was a `himi-serve` command.
58575
+ next: `himi promote --app ${app} --release ${release} --ring <ring>${force ? " --force" : ""} --target ${target}`
58576
+ } : {}
58577
+ });
58578
+ return r.ok ? 0 : 1;
58579
+ }
58580
+ const flagsFor = (o = {}) => `${o.percent !== void 0 ? ` --percent ${o.percent}` : ""}${force ? " --force" : ""} --target ${target}`;
58581
+ if (!percentGiven) {
58582
+ io.error(JSON.stringify({
58583
+ warning: `no --percent given: an existing ring "${ring}" keeps its current share, and a NEW one is created at the plane's default (100% on the hosted plane)`,
58584
+ next: `himi promote --app ${app} --release ${release} --ring ${ring}${flagsFor({ percent: "<0-100>" })}`
58585
+ }));
58586
+ }
58587
+ let p;
58588
+ const ringOnlyRetry = `himi-serve release promote --app ${app} --ring ${ring} --release ${release}${percent !== void 0 ? ` --percent ${percent}` : ""}${force ? " --force" : ""} --target ${target} --control-token "$TOK"`;
58589
+ try {
58590
+ p = await client2().promote(app, ring, release, percent, force);
58591
+ } catch (e) {
58592
+ io.error(JSON.stringify({
58593
+ error: `the release was ACTIVATED, but the ring request did not complete: ${e.message}`,
58594
+ activated: true,
58595
+ ringPromoted: false,
58596
+ ring,
58597
+ next: ringOnlyRetry,
58598
+ nextAuth: `set TOK to a serve-control token for target ${target}`
58599
+ }));
58600
+ return 1;
58601
+ }
58543
58602
  print({
58544
- status: r.status,
58603
+ status: p.status,
58604
+ // BOTH responses: the activation's own fields (`visibility`, any warning it carries)
58605
+ // are part of what happened and were being dropped on this path.
58545
58606
  ...r.json ?? {},
58546
- ...r.ok ? {
58547
- ringPromoted: false,
58548
- note: "activation updates the live release but does not select a rollout ring; ring-based clients remain unresolved until a ring is promoted",
58549
- next: `himi-serve release promote --app ${app} --ring <ring> --release ${release}${flags.force === true ? " --force" : ""} --target ${target} --control-token "$TOK"`,
58607
+ ...p.json ?? {},
58608
+ activated: true,
58609
+ ringPromoted: p.ok,
58610
+ ring,
58611
+ // REQUESTED, not applied. The git-backed `applyPromote` takes no percent at all
58612
+ // (promote.ts), so echoing `percent` as fact would report a share that plane never
58613
+ // set. Only the hosted CloudStore path honours it.
58614
+ ...percent !== void 0 ? { percentRequested: percent } : {},
58615
+ ...p.ok ? {} : {
58616
+ note: `the release was ACTIVATED, but promoting ring "${ring}" failed \u2014 retry the RING half alone with \`himi-serve release promote\`, which does not re-activate`,
58617
+ next: ringOnlyRetry,
58550
58618
  nextAuth: `set TOK to a serve-control token for target ${target}`
58551
- } : {}
58619
+ }
58552
58620
  });
58553
- return r.ok ? 0 : 1;
58621
+ return p.ok ? 0 : 1;
58554
58622
  }
58555
58623
  // The RAW-FILE patch door. No content package, no build, no package lint — that is the whole
58556
58624
  // reason it exists, and the reason `himi push --only` is the one to reach for when a package
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.891.0",
3
+ "version": "0.892.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": [
@@ -64,5 +64,5 @@
64
64
  "artifactId": "himalaya-cli"
65
65
  }
66
66
  },
67
- "falconPackageHash": "1043e5fb989a028cf5dffffc6f8a9aef5487b1e6464b630da5270431"
67
+ "falconPackageHash": "2711a3e2d76994157462ea36e3473ad10589cbb578b30f8ce051045a"
68
68
  }