@wix/himalaya-cli 0.1751.0 → 0.1752.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 (25) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +1 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +3 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +16 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/index.d.ts +1 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/native-engine.d.ts +49 -3
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/copy.generated.d.ts +16 -1
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/feedback.d.ts +1 -1
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/auth.mjs +27 -2
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +27 -2
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +1 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth/worker.mjs +133 -13
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth.mjs +139 -13
  13. package/dist/browser-plane/assets.json +5 -5
  14. package/dist/browser-plane/preview-deferred/{21f35a12bd94f4ab97a9a75453c4adcadc438daf024a4b1950d5c356c123bd01.bin → 2671d1cadb15daa5e59440f4c924e30c221ab3d405e8a56a0ab1cdbe4764af3d.bin} +1 -1
  15. package/dist/browser-plane/sw.js +1 -1
  16. package/dist/cli.mjs +3876 -3340
  17. package/dist/preview-assets.generated.bin +0 -0
  18. package/guides/app-config.md +1 -1
  19. package/guides/himi-json-output.md +25 -3
  20. package/guides/push-cli-onboarding.md +13 -0
  21. package/guides/qa-builds.md +3 -1
  22. package/guides/releasing-with-himi-serve.md +51 -0
  23. package/guides/store-submission.md +46 -1
  24. package/package.json +2 -2
  25. package/templates/fitness-gym/tier5-src/himi-fitcoach-goal/index.ts +3 -4
Binary file
@@ -137,7 +137,7 @@ does not include answers `module_not_linked` on device. Some components need one
137
137
  and `himi validate` errors on a screen that uses one the app does not declare.
138
138
  `presigned_upload.putFile` also requires `files` on the calling screen.
139
139
 
140
- App-level capability vocabulary: `camera`, `barcode_scanner`, `biometrics`, `secure_storage`, `share`, `push`, `file_picker`, `files`, `open_url`, `pdf`, `clipboard`, `theme`, `l10n`, `photos`, `presigned_upload`, `ui`, `calendar`, `contacts`, `tasks`, `audio_record`, `audio_record_background`, `calls`, `location`, `location_background`, `motion`, `health`, `media_playback`, `webview`, `browser_auth`, `haptic`, `himi_apps`, `iap`, `keyboard`, `torch`, `network`, `wix_cashier`, `wix_chat`, `live_activity`, `local_database`, `speech`, `speaker_diarization`, `system_intents`, `on_device_ai`, `text_recognition`, `translation`, `image_labeling`, `barcode_detection`, `text_embedding`, `entity_extraction`, `app_info`, `release_control`, `legacy_import`, `godot`, `base44`, `animation`, `video_playback`.
140
+ App-level capability vocabulary: `camera`, `barcode_scanner`, `biometrics`, `secure_storage`, `share`, `push`, `file_picker`, `files`, `open_url`, `pdf`, `clipboard`, `theme`, `l10n`, `photos`, `presigned_upload`, `ui`, `calendar`, `contacts`, `tasks`, `audio_record`, `audio_record_background`, `calls`, `location`, `location_background`, `motion`, `health`, `media_playback`, `webview`, `browser_auth`, `haptic`, `himi_apps`, `iap`, `keyboard`, `torch`, `network`, `wix_cashier`, `wix_chat`, `live_activity`, `local_database`, `speech`, `speaker_diarization`, `system_intents`, `on_device_ai`, `text_recognition`, `translation`, `image_labeling`, `barcode_detection`, `text_embedding`, `entity_extraction`, `app_info`, `release_control`, `legacy_import`, `godot`, `base44`, `animation`, `video_playback`, `apple_sign_in`, `google_sign_in`.
141
141
 
142
142
  ## What `himi validate` checks (7 passes)
143
143
 
@@ -1073,6 +1073,28 @@ A failure after your yes says what was already written on the Wix side, in `erro
1073
1073
  the recorded consent (`consentId`), and `packageName` only when this run saved the package; for `create-app`,
1074
1074
  `packageName` when this run saved it. Running the command again asks for your yes once more and goes on from there.
1075
1075
 
1076
+ ## `himi store google testers pool-add|pool-remove|pool-check` codes
1077
+
1078
+ The owner's side of Wix's closed-test pool: the pool's Google Group (`HIMI_POOL_TESTER_GROUP`) on the app's closed
1079
+ track. The result is one JSON line on stdout (`ok: true`, `onTrack`, `groups`, and for a change the gplay job's `jobId`
1080
+ and `status`), or a failure on stderr with one of these codes. None of them prints a token.
1081
+
1082
+ | Code | Meaning |
1083
+ |---|---|
1084
+ | `invalid_usage` | A missing or malformed op or flag: no package (neither `packageName` in `store/google-play.json` nor `--android-package`), a track that is not a closed track, a malformed group address or developer id, or `--yes` (there is none). Nothing ran. |
1085
+ | `node_too_old` | Needs Node 24 or newer. Nothing ran. |
1086
+ | `pool_group_unset` | `HIMI_POOL_TESTER_GROUP` is not set. Checked first, so nothing was read or changed. |
1087
+ | `confirmation_required` | `pool-add` or `pool-remove` with no terminal to type yes at. Nothing was read or changed. |
1088
+ | `google_signin_failed` | Google sign-in was declined, aborted or failed (`reason`). Nothing was changed. |
1089
+ | `not_signed_in` | `pool-check` with no stored Google sign-in: it only reads and never starts a sign-in. Run `pool-add` or sign in first. Nothing was read or changed. |
1090
+ | `developer_unknown` | Your Play developer account is not known: set `developerId` in `store/google-play.json` or pass `--developer <id>`. Nothing was changed. |
1091
+ | `track_missing` | The app has no closed track by that name. Nothing was changed. |
1092
+ | `pool_group_last` | `pool-remove` when the pool's group is the track's only group: Google Play's API cannot set an empty list, so the error gives the Play Console step instead. Nothing was changed. |
1093
+ | `plan_unexpected` | The job's plan held a change you were not shown (anything beyond the track's testers, or groups that changed since they were read), so it was not approved. Nothing was changed. |
1094
+ | `groups_changed` | The track's groups changed between the plan and your yes (someone edited them meanwhile), so nothing was approved or written. Run the command again. |
1095
+ | `consent_declined` | You did not type yes. The job stays planned and unapproved; nothing was changed. |
1096
+ | `job_failed` | The gplay job failed or did not read back; `jobId` and `status` say where it stopped (`gplay-node jobs show <jobId>`). |
1097
+
1076
1098
  ## `himi store google keygen|resign` codes
1077
1099
 
1078
1100
  The owner-signed path's upload key (`keygen <package>`) and signature (`resign <in.aab> --keystore <file.p12>
@@ -1092,8 +1114,8 @@ keystore password is never printed.
1092
1114
 
1093
1115
  `himi store app set|show --app <id> --site <msid>` prints one envelope. A refusal from the publishing
1094
1116
  service keeps the service's own code in `serverError` (for example `forbidden_app`,
1095
- `store_app_linked_to_other_site`, `store_app_site_taken`, `premium_plan_required`) and its HTTP
1096
- `status`; the CLI `code` is one of:
1117
+ `store_app_linked_to_other_site`, `store_app_site_taken`, `premium_plan_required`,
1118
+ `store_app_service_refused`) and its HTTP `status`; the CLI `code` is one of:
1097
1119
 
1098
1120
  | Code | Meaning |
1099
1121
  |---|---|
@@ -1103,6 +1125,6 @@ service keeps the service's own code in `serverError` (for example `forbidden_ap
1103
1125
  | `wix_token_unavailable` | The account Wix token (`wix token`) could not be minted; the publishing service needs it to verify you own the app and the site. Nothing was sent. |
1104
1126
  | `unauthorized` | The control token was refused or revoked (401). |
1105
1127
  | `forbidden` | Not your app, not your site, or the token may not act for the app (403); `serverError` says which. |
1106
- | `refused` | A rule refused it (another 4xx): the package name, another app holding the site's store app, the app linked to another site, no saved package name, the site's plan; `serverError` says which. |
1128
+ | `refused` | A rule refused it (another 4xx): the package name, another app holding the site's store app, the app linked to another site, no saved package name, the site's plan; `serverError` says which. `store_app_service_refused` is Wix's store-app service refusing for a reason the plane has no code for: `error` carries the service's own words (scrubbed), and a `set` it refused leaves the app unlinked, so another site can be tried. |
1107
1129
  | `control_unreachable` | The publishing service could not be reached. |
1108
1130
  | `request_failed` | Any other failure (5xx); `status` and `serverError` say which. |
@@ -81,6 +81,19 @@ checks. The output separates the saved setup state, backend configuration readin
81
81
  Apple signing readiness, native build, Himi routing and device delivery. A server that
82
82
  cannot provide live verification is reported as `live_verification_unavailable`.
83
83
 
84
+ The same output has a `social` block: whether member Apple and Google sign-in will be
85
+ accepted by the site, read from the Branded record on `--refresh` only (without it every
86
+ check is `not_checked`). `appleReady`, `googleIosReady` and `googleAndroidReady` are
87
+ `true`, `false` or `null`; `null` means unknown or not required, never ready. Each check
88
+ in `social.checks` names what is missing with a `code`, such as `bundle_id_missing`,
89
+ `ios_client_missing`, `android_client_missing`, `ios_client_mismatch` or `sha1_missing`. `appleReady` is `true`
90
+ only when the Apple connection is on the bundle and the App Store profile stored on the site
91
+ grants Sign in with Apple. It is `false` when the connection is missing or on another bundle.
92
+ Otherwise it is `null` when there is no stored profile for the bundle (`apple_capability_unreadable`),
93
+ or when that profile lacks Sign in with Apple (`stored_profile_lacks_apple_sign_in`), because the
94
+ binary may be signed with another profile.
95
+ The social block never changes the push `ok` verdict.
96
+
84
97
  A setup response of HTTP 202 may mean `needs_attention`, not a running background job.
85
98
  After a timeout the CLI reads status once and reports an uncertain submission; it never
86
99
  repeats the provisioning POST automatically. Inspect status before retrying.
@@ -1448,7 +1448,9 @@ himi dist --app <app> --platform android --aab --wait --target bo
1448
1448
  already linked to another site (`409 store_app_linked_to_other_site`; moving needs Wix support,
1449
1449
  because a build may have locked the package name). It records a link (app → site, one site per
1450
1450
  app), holds the site's store app (`409 store_app_site_taken` if another app holds it), and saves
1451
- the package name; the response says `linked: true` the first time. Only the Google Play package
1451
+ the package name; the response says `linked: true` the first time. A `set` the service refuses
1452
+ outright (`400 store_app_service_refused`, `409 package_name_in_use`, …) leaves no link behind, so
1453
+ the app can be linked to another site. Only the Google Play package
1452
1454
  name is saved this way (`400 store_app_link_android_only` for iOS ids): App Store builds stay
1453
1455
  Containers-only. Before a link exists, the check and `GET /v1/admin/site/store-app` answer
1454
1456
  `409 store_app_requires_site_binding`, the code an unbound app always got.
@@ -219,6 +219,57 @@ himi-serve release visibility --app <app> public # flip without repu
219
219
  `"visibility": "unlisted"` in `himalaya.content.json`.) The verb is `POST
220
220
  /v1/admin/app-settings` — owner-role callable, scope-checked, audited.
221
221
 
222
+ ### The closed-test pool for Himi apps (RelOps, operator config)
223
+
224
+ himi serve puts a Himi app's Google closed test (12 testers x 14 days) on the
225
+ branded closed-testing pool (catalyst-server `mobile-apps-branded-google-closed-testing`, `ClosedTestingService`).
226
+ RelOps drives it with `himi store relops pool add|status|end [--all-himi]` (see the store-submission guide).
227
+
228
+ | Route | What |
229
+ |---|---|
230
+ | `POST /v1/admin/site/store-pool?app&site` | add: `CreateTestedApp(package, msid)`; 201 with the owner's step |
231
+ | `GET /v1/admin/site/store-pool?app&site` | status: installed/12, day N of 14, our state, the service status |
232
+ | `DELETE /v1/admin/site/store-pool?app&site` | end: `UpdateTestedAppStatus(CANCELLED)`; never a delete |
233
+ | `POST /v1/admin/store-pool/teardown` | resolve `adding` rows, cancel every active entry in Himi's table, wait (bounded, 45 s) for archive, report what is left (`pool end --all-himi`) |
234
+ | `POST /v1/admin/store-pool/sweep` | the daily sweep; the operator credential or a RelOps login |
235
+
236
+ The gate, every call audited (`reason: store_pool_refused`, the code in `storeAppStatus`, with the underlying cause on
237
+ 5xx): a RelOps login on `HIMI_RELOPS_ACCOUNTS` (anyone else, the owner included: 403 `relops_only`; the sweep also takes
238
+ the operator static credential). **The toggle `specs.himalaya.ClosedTestPool` gates new adds only** (off or
239
+ unconducted: 404 `store_pool_disabled`): the sweep, teardown, status and end run whenever Himi's table has entries, so a
240
+ toggle opened per user, or closed again, never strands an entry on the pool. Add and status need the owner's
241
+ `play-console` consent under 90 days (403 `relops_consent_required`); **end and teardown need no consent** (they only
242
+ cancel Himi's own entries, which reduces exposure, so RelOps can always end). Add holds at most `HIMI_POOL_MAX_ACTIVE`
243
+ (default 5) open entries (429 `store_pool_full`), reserved atomically on the index row before the service is called.
244
+ The package is always the Containers app's saved package for the site the app holds.
245
+
246
+ Himi's own table lives in cloudStore (`himi/store-pool/<app>/<msid>` plus the index row `himi/store-pool/index`): package,
247
+ msid, addedBy, addedAt, deadline (addedAt + 21 days), state `adding | active | ending | archived | stuck | failed`.
248
+ **No orphans:** an add writes the index (its cap slot) first, then an `adding` row, and only then calls the service; a
249
+ definite refusal frees the slot (`failed`), an ambiguous one (timeout, unavailable) keeps `adding` with the error. A
250
+ retry of the add resumes it (asks the service first), and the sweep resolves an `adding` row older than 10 minutes: the
251
+ service has the package for our site ⇒ adopted as active; none ⇒ `failed`. Every row write is a compare-and-swap on
252
+ the state the writer read. Archived and failed keys leave the index 30 days after they closed (the rows stay). Only
253
+ entries in the table are ever cancelled. A package the service already tracks: if it is ours (an archived Himi entry for
254
+ the same package and site) the add calls `RestartTestedApp`, otherwise it is refused 409 `tested_app_exists_not_ours`
255
+ and left alone; a restart the service refuses is 409 `store_pool_readd_unsupported`.
256
+
257
+ Errors: 503 `store_pool_service_unavailable` (the closed-testing service; `serviceCode` says which),
258
+ 503 `store_pool_table_write_failed` / `store_pool_table_read_failed` (cloudStore), 503 `store_pool_unconfigured`,
259
+ 409 `store_pool_state_changed` (a concurrent write won), 500 `store_pool_internal_error`.
260
+
261
+ **The sweep** cancels an active entry past its deadline, whose consent expired, whose app no longer holds the site, or
262
+ that is done (COMPLETED, or 12 installs on day 14), then follows each cancelled entry until the service sets
263
+ `archivedDate`. Not archived 3 days after it ended: state `stuck` and a Slack alert. serve has no scheduler of its own,
264
+ so the sweep is an internal route: schedule a daily `POST /v1/admin/store-pool/sweep` with the operator control token
265
+ (a Buildkite scheduled pipeline or a Wix cron job).
266
+
267
+ Config: `HIMI_POOL_MAX_ACTIVE`, `HIMI_POOL_TESTER_GROUP` (the Google Group owners add to track `alpha`),
268
+ `HIMI_POOL_ALERT_CHANNEL` (posted by the `MREBOT_SLACK_TOKEN` bot; unset: a log line). The closed-testing client
269
+ calls with Himalaya's service identity, which needs
270
+ `MOBILE_APPS.BRANDED_GOOGLE_CLOSED_TESTING_{CREATE,GET,UPDATE}` (restart uses UPDATE). It is not wired yet: until the spike confirms the
271
+ generated ambassador package, the routes answer 503 `store_pool_unconfigured` with the toggle on.
272
+
222
273
  ## Patching one item of a release
223
274
 
224
275
  A whole `himi push` sends every screen, bundle, tokens and app-config in one body. To change
@@ -352,6 +352,51 @@ As with `wix-submit`, `--app` and `--site` can come from the app folder's `wix`
352
352
  It shows the app name, the package name (a package name can never be reused or changed once an app exists), and each
353
353
  declaration Google asks you to accept when creating an app, then asks for a typed `yes`.
354
354
 
355
+ ### RelOps only: Wix's closed-test pool
356
+
357
+ A personal Play account needs a closed test of **12 testers for 14 days** before Google allows production. For an app
358
+ RelOps works on, Wix can run that test on its own pool of 12 test phones. Only Wix's release team can start it; you
359
+ cannot, and neither can any other customer. It needs your RelOps consent with the Google scopes (`relops request
360
+ --platform android`), under 90 days old.
361
+
362
+ RelOps runs (Wix staff only, not in the customer help):
363
+
364
+ ```
365
+ himi store relops pool add --app <app id> --site <msid>
366
+ himi store relops pool status --app <app id> --site <msid>
367
+ himi store relops pool end --app <app id> --site <msid>
368
+ ```
369
+
370
+ - `add` puts the app on the pool, using the package name saved for the site's app (never one typed on the command
371
+ line), and prints **your one step**: add the pool's Google Group to the testers of the closed track `alpha`, with
372
+ `himi store google testers pool-add` (below) or by hand in Play Console. The phones opt in after that.
373
+ - `status` shows how many phones installed the app (out of 12), which day of 14 it is, and the entry's state.
374
+ - `end` stops the test and prints **your step**: remove the pool's Google Group from the track, with
375
+ `himi store google testers pool-remove`. The phones uninstall the app. A test is never deleted, only cancelled, so its history stays. RelOps can always end a test, even after
376
+ your consent expired.
377
+
378
+ Your steps, on your own computer and with your own Google sign-in (a RelOps seat cannot change your testers):
379
+
380
+ ```
381
+ export HIMI_POOL_TESTER_GROUP=<the pool group address RelOps gives you>
382
+ himi store google testers pool-add [--dir <app>] [--track alpha]
383
+ himi store google testers pool-check [--dir <app>] [--track alpha]
384
+ himi store google testers pool-remove [--dir <app>] [--track alpha]
385
+ ```
386
+
387
+ - `pool-add` reads the track's Google Groups, plans a `gplay.closedTest.setup` job with the same groups plus the pool's,
388
+ shows you the change and applies it only after your typed `yes` (there is no `--yes`). Then it reads the track back.
389
+ - `pool-remove` does the same with the pool's group taken out. Every other group you have stays. If the pool's group is
390
+ the track's only group, it stops and gives you the Play Console step instead: Google Play's API cannot set an empty
391
+ group list.
392
+ - `pool-check` only reads: it says whether the pool's group is on the track.
393
+ - The app comes from `packageName` (and `developerId`) in the app folder's `store/google-play.json`, or
394
+ `--android-package` and `--developer`. With `HIMI_POOL_TESTER_GROUP` unset, each of them stops before reading
395
+ anything. Codes: `himi docs himi-json-output`.
396
+
397
+ A test that is not ended is stopped for you after 21 days, when your consent expires, or when the app no longer holds
398
+ the site's store app. The pool takes only a few apps at a time; when it is full, RelOps is told to try later.
399
+
355
400
  ### Limits
356
401
 
357
402
  - **The owner's yes is a typed yes on a terminal.** No `himi mcp` tool can give it, so a chat message that says "the
@@ -359,7 +404,7 @@ declaration Google asks you to accept when creating an app, then asks for a type
359
404
  the yes as a strong habit, not a lock.
360
405
  - **Closed testing on a personal account.** Google requires a personal account to run a closed test with **12
361
406
  testers for 14 days** before it will allow production. An organization account is exempt. The plan says this up
362
- front. You find your own testers; Wix's tester pool is used only for apps Wix submits for you.
407
+ front. You find your own testers; Wix's tester pool is used only for RelOps apps (see "RelOps only: Wix's closed-test pool").
363
408
  - **Nothing has run live yet.** The Google steps are tested against fakes, not a real Play account. The first real
364
409
  run may find problems.
365
410
  - A reply to a policy issue cannot be unsent, and a package name cannot be changed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1751.0",
3
+ "version": "0.1752.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": "a2c172ddd85b96143f79e91b6d24f318ea40053308c64808a194f4e5"
85
+ "falconPackageHash": "88829bcebae37fdbdc23997d9a9a3e45022b83d12c70aaed01b8dc27"
86
86
  }
@@ -57,11 +57,10 @@ export function nameLines(title: string): [string, string] {
57
57
  return [words.slice(0, -1).join(" "), words[words.length - 1]];
58
58
  }
59
59
 
60
- /** A CMS image value: a URL, a `wix:image://v1/<id>/…` reference or a media id. */
60
+ /** A CMS image value: a URL, a `wix:image://v1/<id>/…` reference or a media id — `wixMediaUrl`
61
+ * resolves each of them itself, then sizes it. */
61
62
  export function cmsImage(value: unknown): string {
62
- const raw = clean(value);
63
- const ref = /^wix:image:\/\/v1\/([^/#]+)/.exec(raw);
64
- return wixMediaUrl(ref ? ref[1] : raw);
63
+ return wixMediaUrl(clean(value));
65
64
  }
66
65
 
67
66
  const minutesOf = (service: WixService): number => {