@wix/himalaya-cli 0.1393.0 → 0.1394.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.
package/dist/cli.mjs CHANGED
@@ -7711,7 +7711,6 @@ function resolveTranslation(value, catalog3, sourceCatalog) {
7711
7711
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
7712
7712
  var init_bindings = __esm({
7713
7713
  "../../core/ts/src/bindings.ts"() {
7714
- "use strict";
7715
7714
  BINDING_SIGILS = ["service", "flag", "item", "t"];
7716
7715
  BINDING_SIGIL_RE = new RegExp(
7717
7716
  `^\\$(?:${BINDING_SIGILS.filter((s2) => s2 !== "t").join("|")})\\b|^\\$t:`
@@ -161962,6 +161961,10 @@ function createReviewScreenRenderer() {
161962
161961
  });
161963
161962
  }
161964
161963
  },
161964
+ async ready() {
161965
+ const { pngAvailable: pngAvailable2 } = await Promise.resolve().then(() => (init_render_descriptor(), render_descriptor_exports));
161966
+ return pngAvailable2();
161967
+ },
161965
161968
  async close() {
161966
161969
  if (browser) await (await browser.catch(() => void 0))?.close().catch(() => {
161967
161970
  });
@@ -162515,11 +162518,14 @@ async function screenshotsCommand(flags, deps, out2) {
162515
162518
  const contentDir2 = requireFlag(flags, "content", "screenshots");
162516
162519
  const manifestText = readInput(deps, manifestPath, "manifest");
162517
162520
  const manifest = parseIapManifest(manifestText, manifestPath);
162518
- const facts = await appleFacts(flags, deps, out2, manifest);
162519
162521
  const renderer = (deps.reviewScreenRenderer ?? createReviewScreenRenderer)();
162522
+ const dryRun = flags["dry-run"] === true;
162523
+ if (!dryRun && renderer.ready && !await renderer.ready()) {
162524
+ return out2.fail("taking screenshots needs a headless Chromium, installed once with `npx playwright install chromium` (~170MB) \u2014 nothing was rendered or written", { ok: false, code: "browser_unavailable" });
162525
+ }
162526
+ const facts = await appleFacts(flags, deps, out2, manifest);
162520
162527
  const only = textFlag(flags, "only");
162521
162528
  const outDir = textFlag(flags, "out-dir");
162522
- const dryRun = flags["dry-run"] === true;
162523
162529
  let report3;
162524
162530
  try {
162525
162531
  report3 = await takeReviewScreenshots({
@@ -179621,7 +179627,8 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
179621
179627
  signed-in member sees it on a bound iPhone (Apple price, buy
179622
179628
  button), save it at 1290\xD72796 and name it as the item's
179623
179629
  reviewScreenshot. --profile reads Apple's price (read-only)
179624
- and skips live products. Guide: himi docs iap-products
179630
+ and skips live products. Needs Chromium, once:
179631
+ npx playwright install chromium. Guide: himi docs iap-products
179625
179632
  himi logout [--target <t>] clear the stored control token for a target
179626
179633
  himi notify setup --content <dir> [--target wix] [--yes] [--no-push-setup]
179627
179634
  Optional Branded/Ping setup. Prompts for site, native IDs and APNs key file.
@@ -107,6 +107,7 @@ existing `problems` list.
107
107
  | Code | Meaning |
108
108
  |---|---|
109
109
  | `screenshots_incomplete` | At least one selected item has no screenshot. Each one in `items` carries a `skipped` reason: no purchase screen, no Apple price yet, an existing screenshot kept without `--force`, a screen that did not show the Apple price, or a failed read of the item. The screenshots that were made are saved and named in the manifest. Exit 1. |
110
+ | `browser_unavailable` | The headless Chromium the screenshots are taken in is not installed. Run `npx playwright install chromium` once. Nothing was rendered or written. Exit 2. |
110
111
 
111
112
  An invalid manifest fails with `manifest_invalid`, like the other `store iap` commands.
112
113
 
@@ -239,6 +239,11 @@ hosts only ever get the file's bytes, never the API key's token.
239
239
  `himi store iap screenshots --manifest <file> --content <app dir> [--profile <name>]` makes each
240
240
  product's review screenshot from the app's own purchase screen, so nobody has to take them on a phone:
241
241
 
242
+ **One-time setup.** The screenshots are taken in a headless Chromium on your machine, so no phone,
243
+ simulator or Xcode is needed. The Playwright library comes with himi; the browser is a separate
244
+ download (~170MB) that you run once: `npx playwright install chromium`. Without it the command stops
245
+ before rendering anything and says so (`browser_unavailable`). A `--dry-run` doesn't need it.
246
+
242
247
  1. **It renders the screen.** For each item it opens that Wix item's detail screen: `himi_product_<id>`,
243
248
  `himi_program_<id>` or `himi_plan_<id>`, or the plain screen given the `id` when the app has no such
244
249
  route. For a plan it falls back to the plans list (`himi_plans`), where older apps sell plans. The
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1393.0",
3
+ "version": "0.1394.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": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "himalaya-cli"
72
72
  }
73
73
  },
74
- "falconPackageHash": "8438ef8c93d3b33dc841736c9681aa8e0b3cbd4934159b026ce97558"
74
+ "falconPackageHash": "1554f1e7d7c70e78f8d9d6f9c96640b7b624bec6b4aa9ae454345280"
75
75
  }