@wix/himalaya-cli 0.1876.0 → 0.1878.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.
Binary file
@@ -582,9 +582,9 @@ Apply these interpretation rules:
582
582
  (`tier5.*`) cannot be read before it runs, so it is listed in `unverified` and does not fail the check. The right
583
583
  side keeps the source's order among the controls both have (the platform view's resolved bar, else the Branded
584
584
  template's Cart, Notifications, Chat; a cart the source or the site turns off is simply absent), and the leading side
585
- holds only the profile avatar. An app with the avatar has no side menu: the side menu's Invite row stands for the
586
- header Invite button only while Profile's Pages group is shown (`showPages` on `himi_account`, which `header-badges`
587
- sets).
585
+ holds only the profile avatar. The header's Invite button is the Home's Invite row (see "Invite is the Home's
586
+ row" below); an author's own side-menu Invite row still counts, and in an app with the avatar only while Profile's
587
+ Pages group is shown (`showPages` on `himi_account`, which `header-badges` sets).
588
588
  - Apply the collected app theme before the first build: run
589
589
  `himi one-app validate-design --evidence-dir .himi/one-app --content . --fix`,
590
590
  resolve any remaining mismatches/unresolved values, then rebuild. The source is
@@ -701,7 +701,8 @@ Apply these interpretation rules:
701
701
  other screen, are ineligible. A Detailed Home whose page opens a shared vertical screen is generated as the Home.
702
702
  Props are the header's own: title/subtitle (explicit visibility), `showLogo` + `settings.logoImageUrl`, ordered
703
703
  `coverImagesUrls` (empty: the global covers), `coverImageTransitionTime` (default 3000). Run `provision` after
704
- `header-badges` to copy the bar again; `validate-topbar` reports drift.
704
+ `header-badges` to copy the bar again; `validate-topbar` reports drift. When that header shows Invite and a store
705
+ listing was verified, the Invite row follows the header (see "Invite is the Home's row" below); it is never inside it.
705
706
  - **Business contact is shared content.** For native contact sections
706
707
  `platform_general_contact_section` / `platform_general_contact_section_bp`, use
707
708
  `businessContactSection` and `createBusinessContactService` from
@@ -760,97 +761,71 @@ Apply these interpretation rules:
760
761
  access rules. Report unsupported avatar/logo/action behavior as a gap; do not
761
762
  invent member data, drop a configured CTA silently, or add an in-page toolbar
762
763
  to imitate a missing native control. On a Detailed Home, record only the controls its header drops.
763
- - **Invite is behavior, independent of the custom cover.** When the source header's
764
- `settings.showInviteButton` is true, use the reusable `inviteAction`, `inviteScreen`
765
- and service recipes from `@wix/himalaya/screens`. The source opens an Invite modal;
766
- the target uses a native screen whose explicit Share button owns creation and login.
767
- For each source screen, use the corresponding generated
768
- `.himi/one-app/invite-plan.json` metadata: its flag comes from the referenced
769
- header and `businessId` from collected `manifest.source.metaSiteId`. Do not use
770
- a public website as an invitation or copy an example business ID.
771
-
772
- **`himi one-app provision` writes the flow.** When the plan shows Invite and the collection has the
773
- source site id, `himi one-app provision --evidence-dir .himi/one-app --content .` adds, once and never
774
- over an existing file: the `source_invite` screen (the `inviteScreen` recipe's descriptor) with its
775
- `navigation.linkableScreens` entry, its screen worker `tier5-src/source-invite` (`createInviteService`,
776
- bound to the source site id and the starter's `himi_sign_in`), the availability service in the app's own
777
- nav worker (`createInviteAvailabilityService`), and `share`, `wix_api` and `app_info` in that worker's
778
- `declaredCapabilities`, plus the Share button's Hebrew catalog row; the side-menu row below follows in the
779
- same step. It reports `inviteFlow.status`: `set`, `unchanged` (the source hides Invite, or the app
780
- already has its own `source_invite` screen, which is kept whole), `absent` (no source site id: collect
781
- again) or `manual` (the nav worker is not in the app or its declarations are not an array literal: the
782
- reason says what to mount). Hand-build the flow below only for one of those cases or to change it.
783
- `validate-topbar` takes the working side-menu row (declared flow, live `$service:` flag, nav worker) as the
784
- source header's Invite button, so the top-bar `inviteAction` is optional; an app that adds it must
785
- follow the rules below.
786
-
787
- In the nav worker, mount `createInviteAvailabilityService({ source })` and
788
- declare `share` and `app_info`. It only reads availability. Register
789
- `inviteAction({ id: "source.invite", screenId: "source_invite" })` with the same
790
- ID and hidden binding in `topBarDefault.actions` and every complete screen
791
- override that needs it. A source screen with `showInviteButton: false` must
792
- exclude Invite from its effective actions (use a complete screen override if
793
- the default includes it). Unresolved top-bar visibility paths remain visible
794
- under the current native resolver policy; the screen always rechecks source
795
- availability and authorization before acting. The validator refuses opaque
796
- action entries, including nested handlers/parameters and computed helper options.
797
- Literal actions need literal `id`, `icon`, `label`, and `accessibilityLabel` values
798
- when supplied so classification cannot silently discard an unknown Invite;
799
- use native path bindings for live labels. If a disabled header flag conflicts with a collected native
800
- Invite action, resolve that source-policy conflict before authoring the target.
801
- Declare the Invite and existing member sign-in screens
802
- in `navigation.linkableScreens`. Add
803
- `inviteScreen({ screenId: "source_invite", bundleUrl: "/v1/bundles/source-invite" })`
804
- to the screen registry. Its separate screen worker mounts:
805
-
806
- ```ts
807
- import { createInviteService } from "@wix/himalaya/screens";
808
- export const invite = createInviteService({
809
- source: () => sourceInvite, // this migration's bound flag/businessId or verified URL
810
- signInScreenId: existingMemberSignInScreenId,
811
- });
764
+ - **Invite is the Home's row, written by `generate`.** A migrated app has one Invite: an `Invite` row right
765
+ after the Detailed Home header (see "The Detailed Home header is generated" above). Do not hand-build an Invite screen, a
766
+ side-menu row or a top-bar action for it. `himi one-app generate` writes the row only when **all** of these hold:
767
+ the Home got the Detailed header; that same source header (the one that owns the Home page, converted top tabs
768
+ and a shared-vertical Home included) sets `settings.showInviteButton: true`; the source is a Branded app; the
769
+ collection verified at least one public store listing of that app; and the scaffold has `himi_sign_in`. Another
770
+ screen's header, or an app-wide aggregate, never turns it on. In any other case the Home has no row and no gap
771
+ where it would be, and the app has **no** Invite surface at all. `generate` reports `homeInvite`: `{ applied:
772
+ true, stores, translated }` or `{ applied: false, reason }`, where `reason` is `no_detailed_header`, `invite_off`,
773
+ `not_branded`, `no_store_evidence` (collected before store listings were read: collect again),
774
+ `store_lookup_failed` (a read failed, so a listing may exist: collect again), `no_store_listing`, `no_app_name`
775
+ or `no_sign_in_screen`. Each reason except `invite_off` is also a gap for the migration report.
776
+
777
+ **Store evidence.** `himi one-app migrate` reads the Branded app's public stores config
778
+ (`GET https://www.wix.com/_api/branded-apps/v1/app/stores-config/bulk?metaSiteIds=<the source site>`, the requested
779
+ site's entry only, no credentials) and checks each platform on its own against its public store: the App Store
780
+ lookup (`itunes.apple.com/lookup?id=<appId>&country=<cc>`) must return that `trackId`, and its `bundleId` must
781
+ match Branded's when Branded has one (a saved `downloadLink` is used only for the storefront that verified it);
782
+ Google Play's public listing page must answer and name the package (a link Branded saved is not enough: a 404 is
783
+ `not_found`). At most three storefronts are tried per platform: the saved link's own, the app language's main
784
+ storefront, then the US. The sanitized result is `storeListings` in `invite-plan.json` (an additive field of that
785
+ hashed evidence file): an overall `status` (`verified`, `none`, `lookup_failed`, `not_branded`) and, per
786
+ platform, `verified` with its canonical `url` and `storefront`, or `absent`, `not_found`, `mismatch` or
787
+ `lookup_failed` with a reason. A read that fails never fails the collection.
788
+
789
+ **The row.** An `HStack` with one tonal `Button` (the line `share` icon, label `Invite`, translated by the app's
790
+ catalog: `provision` adds the `Invite` row for he, it, es, fr, de and pt) at `weight: 1`, inside the Home's 16pt
791
+ gutters, so a second control added later gets an equal share. Its ids are stable: `himi_branded_home.invite` and
792
+ `himi_branded_home.invite.button`. The Home's own content follows in the same order with the same ids. The action
793
+ is `tier5.himiPage_himi_branded_home_invite.invite` (`storeInviteAction` binds it to any tappable control).
794
+
795
+ **The behavior** is `createStoreInviteService` from `@wix/himalaya/screens`, mounted on the Home's worker beside
796
+ its section services (declare `share` and `ui`). A signed-in tap opens the OS share chooser with one plain-text
797
+ message, sent as the share SDK's `text` only (Android drops `text` when a separate `url` is sent):
798
+
799
+ ```text
800
+ Check out my app, {App Name}!
801
+
802
+ App Store
803
+ {App Store URL}
804
+
805
+ Google Play
806
+ {Google Play URL}
812
807
  ```
813
808
 
814
- The descriptor declares `share`, `wix_api` and `app_info`. `inviteButton` is also
815
- available for ordinary page content owned by this screen service. Bind the same
816
- current source metadata in both workers; never take the target from route params.
817
- The reusable screen recipes include an Invite integration example.
818
- **Side menu.** When the source header shows Invite, the side menu (drawer) also gets an
819
- "Invite" row that opens the same `source_invite` flow, hidden by the same availability flag as
820
- the top-bar action. Do not hand-write it: `himi one-app provision --evidence-dir .himi/one-app --content .`
821
- adds it right after the flow above (and again on a rerun once a hand-built `source_invite` is declared
822
- in `navigation.linkableScreens`). It reads the collected `invite-plan.json`, adds the row (`drawer_invite`) in front of the
823
- first section header, and reports `invite.status`: `set`, `unchanged` (the source hides Invite, or
824
- the row is there), `absent` (no side menu, no destination for it to follow because Invite never becomes the home screen, or the flow is not declared yet: the reason says so) or
825
- `manual`. The label's source text is `Invite`; with the row the step also adds its Hebrew translation
826
- (`tab.invite`) to the app's own `l10n/he.json` and lists the locales it wrote in `invite.translated` (a rerun
827
- also repairs a missing or empty row while the drawer row is already there). Any
828
- other locale catalog needs its row from `himi validate`'s missing-translation report.
829
- The native nav worker stays alive across account switches, so it must not own
830
- a fresh-load login continuation. The screen service uses shared confirmed
831
- consumer auth continuation: its Share tap begins
832
- an opaque host intent, opens the app's existing sign-in screen as a modal, and
833
- a fresh screen load rechecks source, sharing availability and member identity
834
- before atomically consuming the confirmed intent once. The sign-in worker must
835
- forward that token with its existing credential action. Cancellation, expiry,
836
- another account, bare routes and ordinary loads do not authorize an invitation.
837
- Unsupported hosts show an update-required message without starting a guest write.
838
- This requires the updated host continuation/auth SDK in rebuilt native binaries
839
- or the updated web host; OTA content alone cannot supply it.
840
-
841
- Business resolution additionally requires the explicit native host signal
842
- `oneAppInviteAvailable === true`, supplied by the updated native core.
843
- Old binaries and web fail closed for this resolver. A verified, already resolved
844
- source invite URL can use sharing on web, including guest login continuation
845
- on a supported host. An already signed-in member can share without a continuation.
846
- On web, an expired browser activation is resumed by a host-owned Share/Copy
847
- confirmation; this requires the updated web host and does not repeat the Invite
848
- action or create another invitation. A cancelled or degraded share retains
849
- incomplete-sharing feedback; it never reports a completed share.
850
- Only a validated HTTPS URL from bound metadata or the source Invite response is
851
- shared. No invitation is created while migrating or just loading the screen.
852
- Source Invite produces an `interaction` coverage row requiring behavioral proof;
853
- unresolved transport or permissions remain gaps, never silent omission.
809
+ with only the verified stores, in the app's language when the CLI ships it (he, it, es, fr, de, pt; else
810
+ English, which `generate` records as a gap). A guest's tap opens `himi_sign_in` as a modal with the host's
811
+ one-shot `authContinuation`; only that sign-in, confirmed by the host and consumed once by the next `load` (the
812
+ row's `onAppear`, or the fresh worker after the account change), opens the chooser. The Home asks with the
813
+ host continuation's non-destructive `claim` operation, which spends only the Invite's own confirmed request, so its
814
+ loads never cancel another feature's pending sign-in. **Older binaries** have no `claim`: there a guest's sign-in
815
+ is not resumed (nothing is shared or cleared automatically) and the guest taps Invite again, signed in, which opens
816
+ the chooser at once. Cancel, a failed sign-in,
817
+ another account, a changed message, ordinary loads, direct routes and late callbacks never share, and the user
818
+ stays on Home. A tap that cannot open the chooser shows a snackbar. Opening the chooser is not proof that a
819
+ recipient received anything. No invitation is created and no Invite API is called.
820
+
821
+ **`provision` retires the old side-menu flow.** Earlier versions wrote a `source_invite` screen, its worker, a
822
+ nav-worker availability mount and a side-menu (or Profile) row. `provision` no longer writes any of them, and
823
+ removes each piece an earlier run wrote while it is still exactly as written, whether or not the Home has the
824
+ row (`homeInvite.legacy`: `retired`, or `manual` with the pieces it `kept` because an author changed them).
825
+ An author's own Invite stays. `validate-topbar` takes the Home's row as the source header's Invite button; with
826
+ no row the button is reported under `omitted`, never as a failure, unless the evidence says the Home should
827
+ have the row (a verified listing and a Detailed Home): then it is `missing`. The `interaction` coverage row of
828
+ the Home-owning source screen's `showInviteButton` maps to `himi_branded_home.invite.button`.
854
829
  - **Preserve source badge behavior.** Collected button definitions retain
855
830
  `badgeObserverId`, `badgeListenerId` and `showBadgeOnVisitorMode`. Keep the
856
831
  counter's actual site/member/shopper scope and visitor policy; the source's
@@ -911,7 +886,7 @@ Apply these interpretation rules:
911
886
  off in every binary through the OTA config. `sideMenu` in the output says `emptied` (with the `carried`, `alreadyReachable`
912
887
  and `dropped` rows: a dropped row opened a screen the app does not have), `unchanged` on a rerun, or `kept` with the
913
888
  reason (a drawer that is the app's navigation, a Profile without the Pages group, a row that is not literal text). The
914
- Invite entry follows: `provision` writes it as a Profile row, not a drawer row, for an app with the avatar, in either order.
889
+ side menu holds no Invite row: a migration's Invite is the Home's row.
915
890
 
916
891
  **With the leading avatar, add no trailing profile icon.** The avatar is the app's one entry to Profile, and
917
892
  `validate-topbar` counts it as the source's profile button. A trailing action that opens `himi_account` (a person icon
@@ -1617,7 +1592,7 @@ template when the package has none), so `himi template trim --from-spec SPEC.md
1617
1592
  uses. The rows are every generated screen (`more` included), the starter screens its pages and generated buttons open (and the
1618
1593
  detail screens of the shared modules a generated page worker registers), the account core (account, settings, sign-in, delete
1619
1594
  account, app info, appearance, language), the screens of the header controls the source has (notifications, cart, the business
1620
- chat, or the Inbox instead when the manifest says `memberChat: true`) and `source_invite` when the source shows Invite, plus the
1595
+ chat, or the Inbox instead when the manifest says `memberChat: true`) and `source_invite` when the app has its own, plus the
1621
1596
  starter screens those (and the rows already in the table) need, found by asking the trim planner itself: a link `--links drop` cannot remove, and the target of a
1622
1597
  kept screen's main action (a shop's product and cart, a service list's booking time), and the destinations the worker of a kept
1623
1598
  starter screen opens at runtime, one hop (the shop's product, the Inbox's chat thread). Links of the sample Home the starter still
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1876.0",
3
+ "version": "0.1878.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": "464ec11d796ff0fcee50b0218140380506f82a3540138ab2b0b67631"
85
+ "falconPackageHash": "ba37be76defb955252aceda40f4260e8d64b0acc6bf5e6395681e39c"
86
86
  }