@wix/himalaya-cli 0.2035.0 → 0.2037.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.
@@ -438,6 +438,7 @@ target the command read, e.g. `himi login --browser --target wix`.
438
438
  | `owner_login_required` | No usable owner login: the control token is missing or has no subject, or the plane answered 401/403 to the owner-apps read (`GET /v1/owner/apps`). Run `himi login`. Other failures of that read stay `app_ownership_unknown`. |
439
439
  | `flag_not_supported_with_ping` | A local-sender flag was passed with `--provider ping`; `flag` names it. `--badge` is one: Ping has no badge field, and for a Branded app Ping sets the iOS badge itself from the member's unseen Ping feed items. |
440
440
  | `all_members_not_supported_for_site_app` | `--all-members` with a site app's project token (a site lease). Its roster pre-check needs the account that owns the site, which the lease does not name; send to one member with `--member-email`. |
441
+ | `ping_family_not_targetable` | `notify send --provider ping` for an app whose served `pingAppName` no test-send path reaches: not `WixBranded*` (Ping's member send) and not `WixWebShell*` (the dashboard's owner push, unless the plane turned that sender off). The plane refuses with HTTP 409 before any member lookup; prove delivery with a real Wix product notification. |
441
442
  | `invalid_platforms` | `notify setup --platforms` named an unknown, empty or repeated store. Pass `ios`, `android` or `ios,android`. |
442
443
  | `ios_input_without_ios_platform` | `notify setup --platforms android` was given APNs or App Store Connect input (or `--apple-signing`). An Android-only run provisions no iOS store; drop the Apple input or add `ios`. |
443
444
 
@@ -379,8 +379,10 @@ build do not prove device delivery. See [QA builds](qa-builds.md) for prerequisi
379
379
  ## Send a test notification
380
380
 
381
381
  Once status is `ready` and a signed-in member's device has registered, send that member one
382
- notification through Ping. Himi Serve sends it as Himalaya, so you need no Apple or Firebase
383
- key files and no Wix internal tooling:
382
+ notification through Ping. You need no Apple or Firebase key files and no Wix internal tooling.
383
+ Himi Serve sends it as Himalaya, except to a WebShell app (`pingAppName: "WixWebShell"`, the
384
+ `brandy` template): Ping's gateway cannot reach that app, so the send goes out as the dashboard's
385
+ owner push, made with your site token, as the site owner:
384
386
 
385
387
  ```sh
386
388
  himi login --browser --target wix
@@ -396,7 +398,8 @@ himi notify send --provider ping --target wix --content ./liftgear \
396
398
 
397
399
  `--content` supplies the app and site (or pass `--app` and `--site`). Log in to both CLIs as
398
400
  the owner of the app and the site. Himi also mints a site token with `wix token --site`; the
399
- server uses it only to look up the member by login email on that one site. That token must
401
+ server uses it to look up the member by login email on that one site and, for a WebShell app
402
+ only, to send the notification itself. That token must
400
403
  belong to a Wix USER, so `notify send` needs `wix login` even when `WIX_API_KEY` is set —
401
404
  an API key is an app identity and the member lookup refuses it.
402
405
 
@@ -481,6 +484,7 @@ link, is a new notification.
481
484
  | Error | Meaning |
482
485
  | --- | --- |
483
486
  | `push_not_ready` | Run `himi notify setup` for this app and site first. |
487
+ | `ping_family_not_targetable` | No test-send path reaches the app's Ping family. `WixBranded*` apps use Ping's member send, and the site shell's `WixWebShell` uses the dashboard's owner push forced to WebShell (unless the plane turned that sender off). Any other family is refused: prove delivery with a real Wix product notification. |
484
488
  | `member_not_found` / `member_ambiguous` / `member_not_active` | Use the login email of one approved site member. |
485
489
  | `link_not_routable` | The link's scheme or screen is not in the published release, or a Wix link matches none of the app's `push.routes` (or names another site). |
486
490
  | `forbidden_site` / `site_token_invalid` | Both Wix logins must belong to the site owner. |
@@ -206,7 +206,8 @@ Android keeps its normal, account-neutral application ID.
206
206
  This pipeline produces QA builds **on demand**, **without any GitHub secrets** —
207
207
  the commit-triggered path folds into Falcon's Argus Job Service job: Mac for iOS,
208
208
  Linux for Android. Brokered `himi dist` jobs use Mac workers for iOS, and for Android when the
209
- key or format needs one; a signed QA APK builds on Linux ([Which runner builds an Android
209
+ key or format needs one. A signed QA APK builds on a Mac too unless the plane's Linux switch
210
+ (`HIMI_DIST_ANDROID_LINUX=1`) is on ([Which runner builds an Android
210
211
  job](#which-runner-builds-an-android-job)).
211
212
  CI credentials come from the Falcon databag; iOS signing certs are already on the Mac
212
213
  machines. It's modeled on `wix-private/ai-scheduling-assistant` `native-apps/scripts/ci-ios.sh`
@@ -242,8 +243,8 @@ There are two paths to the same artifact. Pick by whether you have the repo.
242
243
  | Good for | an off-repo developer or coding agent | a change you are already pushing |
243
244
 
244
245
  Both run `tools/mobile-dist/run-dist.ts`. Brokered requests use the Wix Job Service
245
- Mac pool, except a signed QA APK, which builds on its Linux runner ([Which runner builds an
246
- Android job](#which-runner-builds-an-android-job)); tagged commits use the validation job's pool
246
+ Mac pool; a signed QA APK goes to its Linux runner only while the plane's Linux switch is on
247
+ ([Which runner builds an Android job](#which-runner-builds-an-android-job)); tagged commits use the validation job's pool
247
248
  (Mac for iOS, Linux for Android). The brokered path replaces "push a commit and wait for Falcon"
248
249
  with "ask the serve plane".
249
250
 
@@ -1257,8 +1258,19 @@ indistinguishable downstream — it verifies, installs, uploads, and the job rep
1257
1258
 
1258
1259
  #### Which runner builds an Android job
1259
1260
 
1260
- A signed APK needs no Mac, so the plane sends it to Job Service's **Linux** runner
1261
- (`LINUX_NODE_COMMAND` on `bk-mobile-linux`, native-ci's `linux:dist:android`) when all of these hold:
1261
+ **Signed Android jobs build on a Mac by default.** A warm Mac runs a branded-lite QA APK in
1262
+ about 7 minutes; Job Service's Linux runner takes 10-13 with the Gradle cache below and 21-23 without.
1263
+ The Linux runner is kept as a switch for capacity tests:
1264
+
1265
+ | Serve config (Dev Portal "Configs") | Signed Android jobs build on |
1266
+ |---|---|
1267
+ | `HIMI_DIST_ANDROID_LINUX` unset, or anything but `1` | a Mac (the default) |
1268
+ | `HIMI_DIST_ANDROID_LINUX=1` | the Linux runner, for each job that passes every condition in the next table; the rest stay on the Mac |
1269
+
1270
+ The plane reads the switch at every dispatch, so a change takes effect on the next job, without a deploy.
1271
+
1272
+ With the switch on, the plane sends a signed APK to the **Linux** runner (`LINUX_NODE_COMMAND` on
1273
+ `bk-mobile-linux`, native-ci's `linux:dist:android`) when all of these hold:
1262
1274
 
1263
1275
  | Condition | Why |
1264
1276
  |---|---|
@@ -1267,21 +1279,55 @@ A signed APK needs no Mac, so the plane sends it to Job Service's **Linux** runn
1267
1279
  | no operator `DIST_ANDROID_KEYSTORE` in the plane's dist env | that names a file on the Mac machines |
1268
1280
  | the release's shell commit carries `linuxAndroidDist: 1` in its dist signing-protocol marker | an older commit was never proven there. It keeps building on the Mac |
1269
1281
 
1270
- Everything else builds on a Mac as before: `wix-keystore` (its `oneapp-production.keystore`
1271
- ships in the Mac image and its `oneapp-signing.gradle` comes from Vault `FILE_ONEAPP_SIGNING`; no
1272
- Linux agent is provisioned with either), every `--aab` (store builds, play-internal, OneApp
1273
- migrations) and every iOS / macOS / desktop build. An owner bundle (`unsigned`) was already on Linux.
1282
+ Everything else builds on a Mac, switch or no switch: `wix-keystore` (its `oneapp-production.keystore`
1283
+ ships in the Mac image and its `oneapp-signing.gradle` comes from Vault `FILE_ONEAPP_SIGNING`; a Linux
1284
+ job was seen with both in `/root/.signing`, but no Linux run has resolved or signed with them yet),
1285
+ every `--aab` (store builds, play-internal, OneApp migrations) and every iOS / macOS / desktop build. An
1286
+ owner bundle (`unsigned`) builds on Linux regardless of this switch, as it did before it existed.
1274
1287
  Nothing is refused by this choice: a marker that cannot be read sends the job to a Mac.
1275
- A Linux pod starts with no gradle cache, so a branded-lite compile takes 19-20 minutes there (about 4
1276
- on a warm Mac). So run-dist's per-command timeout is 40 minutes on Linux instead of 20
1288
+ A Linux pod starts with an empty Gradle home, so a cold branded-lite compile takes 19-21 minutes there
1289
+ (about 4 on a warm Mac). So run-dist's per-command timeout is 40 minutes on Linux instead of 20
1277
1290
  (`distCmdTimeoutMs`; `DIST_CMD_TIMEOUT_MS` still overrides it): the old default killed one measured
1278
1291
  run at 19m57s.
1279
- `HIMI_DIST_ANDROID_LINUX=0` on the serve config (Dev Portal "Configs") sends every signed Android
1280
- job back to a Mac without a deploy.
1281
1292
 
1282
- Moving `wix-keystore` APKs too would need `oneapp-production.keystore` and `oneapp-signing.gradle`
1283
- (Vault `FILE_ONEAPP_SIGNING`) installed in `~/.signing` or `/opt/files/.signing` on the
1284
- `bk-mobile-linux` agents, plus a `linuxAndroidDist`-style proof run.
1293
+ **A Gradle home cache for Linux jobs, OFF by default.** With `HIMI_DIST_GRADLE_CACHE=1` on the serve
1294
+ config (read at every dispatch, like the runner switch), a Linux job restores a tarball of `~/.gradle`
1295
+ (`caches/` and `wrapper/dists`: the Gradle distribution, the downloaded dependencies and their
1296
+ transforms) from the Android dist bucket before gradle runs, under
1297
+ `gradle-home-cache/himalaya/<shell>/gradle-<version>.tar.gz`. About 1 GB, restored in about 20 s.
1298
+ That takes gradle from about 21 minutes to 8-11, and the whole job from 21-23 minutes to 10-13, to
1299
+ the install link. It is the pattern MRE uses for its own Linux Android builds. It is off until
1300
+ snapshots carry a provenance check; see "Why the cache is off by default" below.
1301
+
1302
+ | | Saves the snapshot? |
1303
+ |---|---|
1304
+ | a job whose release commit is on `origin/master`, with no extension code in its contract | yes, after the result is delivered (about a minute, and never delays the install link) |
1305
+ | a branch commit, or a contract that carries extension code | no: it restores and never writes |
1306
+
1307
+ The build cache (`caches/build-cache-*`) is never saved, because a dist job's task outputs carry the
1308
+ customer's contract (name, icon, seed). Signing material is never in the Gradle home either. A missing
1309
+ snapshot, a failed download or a failed upload is logged and the job carries on as a cold build. A
1310
+ snapshot that is not made of plain folders and files (a symbolic link, a device, a FIFO, a socket, or a
1311
+ file where `caches` should be) is refused the same way as a missing one. A new Gradle version in the
1312
+ shell's wrapper starts a new snapshot. Owner bundles (the unsigned AABs, built on Linux) restore and
1313
+ save the same snapshot when the cache is on.
1314
+
1315
+ **Why the cache is off by default (provenance).** The "branch jobs never save" rule is enforced by the
1316
+ job's own code, not by S3. A branch job runs with the same bucket credentials as a master job (it needs
1317
+ them to upload its APK), so code on a branch could upload a crafted snapshot that a later master job
1318
+ restores and runs. The checks above bound where a bad snapshot can reach; they do not prove who wrote
1319
+ it. Before `HIMI_DIST_GRADLE_CACHE` can default on, one of these has to exist:
1320
+
1321
+ - **A plane-attested digest** (doable in this repo, no new infrastructure): the result callback reports
1322
+ the saved snapshot's sha256; serve-control records it only after GitHub confirms the job's release
1323
+ commit is on master; the contract hands it to later jobs, which restore only a snapshot whose sha256
1324
+ matches.
1325
+ - **An IAM split** (infrastructure this repo does not own): a policy that denies the dist credentials
1326
+ writes under `gradle-home-cache/`, plus a writer role used only by builds of master commits.
1327
+
1328
+ Moving `wix-keystore` APKs too would need a proof run that resolves and signs with
1329
+ `oneapp-production.keystore` and `oneapp-signing.gradle` on a `bk-mobile-linux` agent (one job listed
1330
+ both in `/root/.signing`), then a `linuxAndroidDist`-style marker bump.
1285
1331
 
1286
1332
  **`wix-keystore` is internal-only.** It resolves to the One App *store* signing key, so the public
1287
1333
  self-serve door refuses it with `403 android_signing_not_allowed` and names `qa-keystore` / `debug`
@@ -1379,11 +1425,11 @@ DIST_ANDROID_KEYSTORE=/path/to/key.jks DIST_ANDROID_KEYSTORE_PASS=… DIST_ANDRO
1379
1425
  ```
1380
1426
 
1381
1427
  That tier outranks every other source, so the committed key stops being used the moment a real one
1382
- exists. Delete it then — nothing else references it. **Provision it on both runners**: a QA APK
1383
- builds on the Linux runner ([Which runner builds an Android job](#which-runner-builds-an-android-job)),
1384
- and a key set only on the Mac machines would leave those builds on the committed key. Until the Linux
1385
- agents have it, set `HIMI_DIST_ANDROID_LINUX=0` so every APK builds on the Mac. (A key in the plane's
1386
- own dist env keeps its jobs on the Mac by itself.)
1428
+ exists. Delete it then — nothing else references it. **Provision it on both runners** before you
1429
+ turn on `HIMI_DIST_ANDROID_LINUX=1`: with that switch on, a QA APK builds on the Linux runner
1430
+ ([Which runner builds an Android job](#which-runner-builds-an-android-job)), and a key set only on the
1431
+ Mac machines would leave those builds on the committed key. With the switch off (the default) every
1432
+ APK builds on the Mac. (A key in the plane's own dist env keeps its jobs on the Mac by itself.)
1387
1433
 
1388
1434
  **One thing it does NOT yet buy.** The cert-derived features (SMS Retriever's hash, Google
1389
1435
  sign-in's SHA-1) need this certificate's SHA-1 *registered* with the relevant Wix/Google project,
@@ -1735,7 +1781,7 @@ uploads Himi didn't build, add `--min-version-code <the listing's highest + 1>`.
1735
1781
  - **Why unsigned, not QA-signed:** Google Play should refuse an unsigned file on upload, so forgetting
1736
1782
  to sign costs nothing. A QA signature would be accepted, and would tie the listing to a key committed
1737
1783
  to this repo.
1738
- - **It runs on Linux,** as a signed QA APK does ([Which runner builds an Android job](#which-runner-builds-an-android-job)): `linux:dist:android` runs
1784
+ - **It runs on Linux,** always, whatever the `HIMI_DIST_ANDROID_LINUX` switch says ([Which runner builds an Android job](#which-runner-builds-an-android-job)): `linux:dist:android` runs
1739
1785
  `native-ci/scripts/run-android.mjs`, which sets up the Android SDK and JDK before `run-dist`.
1740
1786
  - **The inputs come from the request:** `androidPackageName` and `googleServicesJson`, with nothing read
1741
1787
  from Branded, the Firebase pool or mobile-apps-containers-builder. The file must pass the check above
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.2035.0",
3
+ "version": "0.2037.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": [
@@ -82,5 +82,5 @@
82
82
  "artifactId": "himalaya-cli"
83
83
  }
84
84
  },
85
- "falconPackageHash": "98673c946d8793c51f175cb01eb8236085db6b499306f26583ebe20a"
85
+ "falconPackageHash": "646920f68cc67600fc8f1f7acf4524ebcd21a3fcf3fd7f93fc247c23"
86
86
  }
@@ -21,7 +21,7 @@ import {
21
21
  siteServesMemberCart,
22
22
  siteTopBarDefault,
23
23
  siteWebSdkCompanion,
24
- siteWixPingPush,
24
+ siteShellPush,
25
25
  type SiteShellConfig,
26
26
  type SiteWebSdk,
27
27
  } from "@himalaya/core";
@@ -268,14 +268,10 @@ export default defineApp({
268
268
  base44: base44Config,
269
269
  // Ask for notification permission on the first launch. Tapped notifications that carry one of
270
270
  // your site's URLs open the page's tab (`navigation.site` below).
271
- // With a Wix member login that names the site (`wix.siteId`), signed-in members register for Wix's own
272
- // member notifications (orders, bookings), and a tap opens the matching page of your site.
273
- push: wix?.siteId
274
- ? siteWixPingPush(site)
275
- : {
276
- registrar: "generic",
277
- requestPermissionOnLaunch: true,
278
- },
271
+ // With a Wix member login that names the site (`wix.siteId`), signed-in members register with Wix Ping
272
+ // as the WebShell app, so they get the pushes you send them, and a tap opens the matching page of your
273
+ // site. Wix's automatic member notifications (orders, bookings) do not reach a WebShell app yet.
274
+ push: siteShellPush(site, wix),
279
275
  // Your brand colours paint the NATIVE chrome (tabs, drawer, splash); the site paints its pages.
280
276
  designTokensPath: "./tokens.json",
281
277
  // "Ready" means the first page has painted, not just the app shell — otherwise the splash