@wix/himalaya-cli 0.1723.0 → 0.1724.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/godot/src/index.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/attendance-classifier.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +3 -39
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +10 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/index.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/preview-surfaces.d.ts +24 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-web-sdk.d.ts +37 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-web-sdk.generated.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/wrapped-app-link.d.ts +13 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/checkout-source.d.ts +2 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-order-backend.d.ts +0 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance.d.ts +2 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/index.d.ts +4 -13
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +175 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +46 -502
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +5 -26
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +64 -648
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +1 -0
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/package-reader.js +4 -4
- package/dist/browser-plane/preview-deferred/{74e5b76ecf38392d7eb3f9a9512d60a0675de85d411c9c56293e123152b3f70b.bin → a6e25c06d2a17ab2b5e34bf2b5965fa3ddd76ce3da32a036e546a60938130d7b.bin} +1 -1
- package/dist/browser-plane/sw.js +9 -9
- package/dist/cli.mjs +1275 -408
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/himi-json-output.md +6 -2
- package/guides/iap-screen-adoption.md +4 -4
- package/guides/sdk-reference.json +11 -74
- package/guides/webview-page-sdk.md +14 -0
- package/guides/wix-business-context.md +24 -0
- package/guides/wix-site-to-himi-app.md +2 -1
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +5 -8
- package/templates/branded-lite/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +5 -8
- package/templates/brandy/README.md +13 -0
- package/templates/brandy/config.ts +15 -1
- package/templates/brandy/dev/index.ts +10 -7
- package/templates/community-club/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/conference/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/events-meetups/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +5 -8
- package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +5 -8
- package/templates/restaurant/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/retail-store/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +5 -8
- package/templates/salon-spa/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/wholesale-store/tier5-src/himi-store-account/index.ts +2 -2
- package/templates/wholesale-store/tier5-src/himi-store-product/index.ts +5 -8
- package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance-orders.d.ts +0 -10
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/online-programs-orders.d.ts +0 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/pricing-plans-orders.d.ts +0 -2
|
Binary file
|
|
@@ -163,7 +163,11 @@ configEdited, fields }`.
|
|
|
163
163
|
`himi ext list` exits 0 and reports problems in `findings[]` (`code`, `extension`, `file?`,
|
|
164
164
|
`line?`, `message`): the manifest and interface codes (`extension_manifest_invalid`,
|
|
165
165
|
`extension_name_invalid`, `extension_feature_unsupported`, `extension_action_invalid`,
|
|
166
|
-
`extension_interface_invalid`),
|
|
166
|
+
`extension_interface_invalid`), the dependency and privacy-manifest codes
|
|
167
|
+
(`extension_dependency_not_curated` — an `ios.spm` or `android.gradle` entry that is not on the curated
|
|
168
|
+
dependency list at that version; `extension_dependency_invalid` — a malformed one;
|
|
169
|
+
`extension_privacy_manifest_invalid` — an `ios.privacyManifest` that is missing or is not a valid privacy
|
|
170
|
+
manifest), `extension_unsafe_file`, `extension_too_large`,
|
|
167
171
|
`extension_sources_missing`, `extension_not_found`, `extension_declared_missing`,
|
|
168
172
|
`extension_not_declared` and `extension_view_shadows_core`, and coverage gaps in `warnings[]`:
|
|
169
173
|
`extension_range_unreserved`, `extension_single_platform`, `extension_web_unsupported` and
|
|
@@ -270,7 +274,7 @@ worker's bundle. These names are stable.
|
|
|
270
274
|
| `auth_provider_invalid` | The app's `config.ts` `auth` entry cannot be used: missing, no `providerId`, or a `config` that is not an object. `file`, `field` and `fix` say where and what to write. Nothing is published. Exit 2. The same code comes from `himi validate`, `render`, `test`, `pack` and `run` (see "`config.ts` failures" below). |
|
|
271
275
|
| `one_app_readiness_failed` | Reserved legacy refusal code. One App migration readiness is now advisory: publish and promotion report structured warnings instead. Other independent release checks may still refuse a push. |
|
|
272
276
|
| `control_token_expired` | The selected control token has expired. |
|
|
273
|
-
| `extension_invalid` | A native extension the app declares (config.ts `extensions`) cannot be uploaded: a missing `extensions/<name>/`, an invalid `himi-extension.json` or `interface.ts`, a refused build-time file (an SPM or Gradle script, a binary), or one over the size limit. `findings[]` carries `{ code, extension, file?, line?, message }` per problem. Nothing is published. Extension artifacts are uploaded even with `--no-source`. A publishing service that predates native extensions publishes without them; push then reports the warning `extensions_unenforced` (not a refusal, like `require_ota_unenforced`). |
|
|
277
|
+
| `extension_invalid` | A native extension the app declares (config.ts `extensions`) cannot be uploaded: a missing `extensions/<name>/`, an invalid `himi-extension.json` or `interface.ts`, a refused build-time file (an SPM or Gradle script, a binary), a dependency off the curated list (finding code `extension_dependency_not_curated`), or one over the size limit. `findings[]` carries `{ code, extension, file?, line?, message }` per problem. Nothing is published. Extension artifacts are uploaded even with `--no-source`. A publishing service that predates native extensions publishes without them; push then reports the warning `extensions_unenforced` (not a refusal, like `require_ota_unenforced`). |
|
|
274
278
|
| `app_source_contains_secrets` | Source archiving detected a possible credential. |
|
|
275
279
|
| `app_source_too_large` | The encoded source archive exceeds its limit. |
|
|
276
280
|
| `publish_body_too_large` | The complete publish request exceeds its limit. `bodyBytes` is the plain JSON and `limit` the 8,388,608-byte plain limit, as before. Added: `overageBytes`, `decodedLimit` (33,554,432), `decodedOverageBytes`; when push would gzip the body, `wireBytes`, `wireLimit` and `wireOverageBytes`; and `compressedUpload`, why the gzip upload was not admitted: `decoded_limit_exceeded`, `self_serve_credential`, `credential_unverified` (a static or opaque credential the CLI cannot read as a provisioned token) or `wire_limit_exceeded`. `appSourceBytes` and `breakdown` are unchanged. No credential or payload content is included. |
|
|
@@ -43,10 +43,10 @@ withdraw the shared checkout's access state; reading existing access never creat
|
|
|
43
43
|
|
|
44
44
|
The existing Stores adapter reads `paymentStatus: PAID` as granted. That proves payment,
|
|
45
45
|
not usable delivery of a download or course. It also lacks a verified member-scoped
|
|
46
|
-
existing-ownership read. Only the product screen installs `storesProductOrders` for sales
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
existing-ownership read. Only the product screen installs `storesProductOrders` for sales. Mapped
|
|
47
|
+
digital products without options are paid through wix-iap StartItemPayment: the device opens no eCom
|
|
48
|
+
checkout and makes no cashier charge. Plans, Programs, Bookings and Events are paid the same way; no
|
|
49
|
+
switch turns any of them off. Live digital fulfillment remains unverified.
|
|
50
50
|
The cart and list screens do not start Apple sales. A confirmed physical product retains its
|
|
51
51
|
regular checkout.
|
|
52
52
|
Unknown product facts, unsupported catalog apps and missing routing fail closed.
|
|
@@ -1877,7 +1877,7 @@
|
|
|
1877
1877
|
"name": "PackResult",
|
|
1878
1878
|
"kind": "interface",
|
|
1879
1879
|
"jsdoc": "",
|
|
1880
|
-
"decl": "export interface PackResult {\n status: PackStatus;\n /** Local path the verified pack was written to, when it got that far. */\n path?: string;\n}",
|
|
1880
|
+
"decl": "export interface PackResult {\n status: PackStatus;\n /** Local path the verified pack was written to, when it got that far. */\n path?: string;\n /** Why it failed, when the platform said: e.g. `http 404 host/v1/asset/<sha>`, `network -1009 host/…`,\n * `sri mismatch`. Never a query or a header, so it is safe to show. */\n detail?: string;\n}",
|
|
1881
1881
|
"verificationChecked": true
|
|
1882
1882
|
},
|
|
1883
1883
|
{
|
|
@@ -2797,27 +2797,6 @@
|
|
|
2797
2797
|
"decl": "export interface AppleSaleRule {\n appProductId(entityId: string): string;\n productType: \"NON_CONSUMABLE\" | \"CONSUMABLE\";\n}",
|
|
2798
2798
|
"verificationChecked": true
|
|
2799
2799
|
},
|
|
2800
|
-
{
|
|
2801
|
-
"name": "BOOKINGS_APPLE_SALES_ENABLED",
|
|
2802
|
-
"kind": "const",
|
|
2803
|
-
"jsdoc": "",
|
|
2804
|
-
"decl": "export const BOOKINGS_APPLE_SALES_ENABLED = true;",
|
|
2805
|
-
"verificationChecked": true
|
|
2806
|
-
},
|
|
2807
|
-
{
|
|
2808
|
-
"name": "EVENTS_APPLE_SALES_ENABLED",
|
|
2809
|
-
"kind": "const",
|
|
2810
|
-
"jsdoc": "",
|
|
2811
|
-
"decl": "export const EVENTS_APPLE_SALES_ENABLED = true;",
|
|
2812
|
-
"verificationChecked": true
|
|
2813
|
-
},
|
|
2814
|
-
{
|
|
2815
|
-
"name": "STORES_APPLE_SALES_ENABLED",
|
|
2816
|
-
"kind": "const",
|
|
2817
|
-
"jsdoc": "/**\n * Whether Wix Stores items sell through the App Store: the Stores rule in `APPLE_SALE_RULES` and the\n * product screen's Buy. A sale is wix-iap StartItemPayment (catalyst-server #24496), which places and\n * charges the member's eCom order for one catalog item server-side; the device never opens an eCom\n * checkout or a cashier charge for it. ON for mapped digital products.\n */",
|
|
2818
|
-
"decl": "export const STORES_APPLE_SALES_ENABLED = true;",
|
|
2819
|
-
"verificationChecked": true
|
|
2820
|
-
},
|
|
2821
2800
|
{
|
|
2822
2801
|
"name": "STORES_PRODUCT_SALE_RULE",
|
|
2823
2802
|
"kind": "const",
|
|
@@ -2825,13 +2804,6 @@
|
|
|
2825
2804
|
"decl": "export const STORES_PRODUCT_SALE_RULE: AppleSaleRule = { appProductId: (id) => id, productType: \"NON_CONSUMABLE\" };",
|
|
2826
2805
|
"verificationChecked": true
|
|
2827
2806
|
},
|
|
2828
|
-
{
|
|
2829
|
-
"name": "PRICING_PLAN_APPLE_SALES_ENABLED",
|
|
2830
|
-
"kind": "const",
|
|
2831
|
-
"jsdoc": "/** One-time unlimited plans sell through the App Store. Proven live in Sandbox on 2026-10-19: a member's\n * online plan order is charged with one cashier item whose id is the plan id, so StartPayment maps it to the\n * plan's Apple product, and the order reads ACTIVE and PAID. Recurring and time-limited plans stay outside\n * this rule; their Billing lifecycle is unfinished. */",
|
|
2832
|
-
"decl": "export const PRICING_PLAN_APPLE_SALES_ENABLED = true;",
|
|
2833
|
-
"verificationChecked": true
|
|
2834
|
-
},
|
|
2835
2807
|
{
|
|
2836
2808
|
"name": "VIDEOS_APPLE_SALES_ENABLED",
|
|
2837
2809
|
"kind": "const",
|
|
@@ -2839,46 +2811,11 @@
|
|
|
2839
2811
|
"decl": "export const VIDEOS_APPLE_SALES_ENABLED = false;",
|
|
2840
2812
|
"verificationChecked": true
|
|
2841
2813
|
},
|
|
2842
|
-
{
|
|
2843
|
-
"name": "PRICING_PLAN_ITEM_PAYMENT_ENABLED",
|
|
2844
|
-
"kind": "const",
|
|
2845
|
-
"jsdoc": "/**\n * Which verticals order through wix-iap StartItemPayment (catalyst-server #24878 Plans, #24880 Online\n * Programs, #24881 Bookings, #24882 Events) instead of the device's own checkout and StartPayment. The\n * server places the order as the member, charges it with appleIAP and names the App Store product. Each\n * OFF: that vertical keeps its client checkout. Turn one on only once production wix-iap and Serve's\n * generated client carry its fields; each flips on its own.\n */",
|
|
2846
|
-
"decl": "export const PRICING_PLAN_ITEM_PAYMENT_ENABLED = false;",
|
|
2847
|
-
"verificationChecked": true
|
|
2848
|
-
},
|
|
2849
|
-
{
|
|
2850
|
-
"name": "ONLINE_PROGRAM_ITEM_PAYMENT_ENABLED",
|
|
2851
|
-
"kind": "const",
|
|
2852
|
-
"jsdoc": "",
|
|
2853
|
-
"decl": "export const ONLINE_PROGRAM_ITEM_PAYMENT_ENABLED = false;",
|
|
2854
|
-
"verificationChecked": true
|
|
2855
|
-
},
|
|
2856
|
-
{
|
|
2857
|
-
"name": "BOOKINGS_ITEM_PAYMENT_ENABLED",
|
|
2858
|
-
"kind": "const",
|
|
2859
|
-
"jsdoc": "",
|
|
2860
|
-
"decl": "export const BOOKINGS_ITEM_PAYMENT_ENABLED = false;",
|
|
2861
|
-
"verificationChecked": true
|
|
2862
|
-
},
|
|
2863
|
-
{
|
|
2864
|
-
"name": "EVENTS_ITEM_PAYMENT_ENABLED",
|
|
2865
|
-
"kind": "const",
|
|
2866
|
-
"jsdoc": "",
|
|
2867
|
-
"decl": "export const EVENTS_ITEM_PAYMENT_ENABLED = false;",
|
|
2868
|
-
"verificationChecked": true
|
|
2869
|
-
},
|
|
2870
|
-
{
|
|
2871
|
-
"name": "CANCEL_PAYMENT_ENABLED",
|
|
2872
|
-
"kind": "const",
|
|
2873
|
-
"jsdoc": "/**\n * CancelPayment (catalyst-server #24894, not deployed) when the member closes the Apple sheet: it cancels\n * the pending Payment and releases the ticket reservation or booking it held. OFF: nothing is sent, and the\n * Payment expires on its own in about an hour.\n */",
|
|
2874
|
-
"decl": "export const CANCEL_PAYMENT_ENABLED = false;",
|
|
2875
|
-
"verificationChecked": true
|
|
2876
|
-
},
|
|
2877
2814
|
{
|
|
2878
2815
|
"name": "AppleSaleOptions",
|
|
2879
2816
|
"kind": "interface",
|
|
2880
|
-
"jsdoc": "/**\n * The one definition `himi store iap connect` writes mappings by and the mapping source reads them by,\n * keyed by catalog kind.
|
|
2881
|
-
"decl": "export interface AppleSaleOptions {\n
|
|
2817
|
+
"jsdoc": "/**\n * The one definition `himi store iap connect` writes mappings by and the mapping source reads them by,\n * keyed by catalog kind. Every vertical but Video sells through wix-iap StartItemPayment, which orders\n * the item server-side and names the App Store product by the item's own id.\n */",
|
|
2818
|
+
"decl": "export interface AppleSaleOptions {\n videosAppleSalesEnabled?: boolean;\n}",
|
|
2882
2819
|
"verificationChecked": true
|
|
2883
2820
|
},
|
|
2884
2821
|
{
|
|
@@ -2898,8 +2835,8 @@
|
|
|
2898
2835
|
{
|
|
2899
2836
|
"name": "APPLE_PROVISIONING_RULES",
|
|
2900
2837
|
"kind": "const",
|
|
2901
|
-
"jsdoc": "/** Catalog setup may precede activation
|
|
2902
|
-
"decl": "export const APPLE_PROVISIONING_RULES: Readonly<Record<string, AppleSaleRule>> = {\n ...APPLE_SALE_RULES,
|
|
2838
|
+
"jsdoc": "/** Catalog setup may precede activation: a video is provisioned while its sales stay off. */",
|
|
2839
|
+
"decl": "export const APPLE_PROVISIONING_RULES: Readonly<Record<string, AppleSaleRule>> = {\n ...APPLE_SALE_RULES, wixVideo: VIDEO_SALE_RULE,\n};",
|
|
2903
2840
|
"verificationChecked": true
|
|
2904
2841
|
},
|
|
2905
2842
|
{
|
|
@@ -3153,7 +3090,7 @@
|
|
|
3153
3090
|
{
|
|
3154
3091
|
"name": "attendanceCheckoutRoute",
|
|
3155
3092
|
"kind": "function",
|
|
3156
|
-
"jsdoc": "/** Applies platform support
|
|
3093
|
+
"jsdoc": "/** Applies platform support without sending uncertain iOS offers to web checkout. */",
|
|
3157
3094
|
"decl": "export function attendanceCheckoutRoute(item: BookingAttendance | TicketAttendance, currency: string, platform: string): \"regular\" | \"appleIap\" | \"blocked\";",
|
|
3158
3095
|
"verificationChecked": true
|
|
3159
3096
|
},
|
|
@@ -3448,28 +3385,28 @@
|
|
|
3448
3385
|
"name": "onlineProgramOrders",
|
|
3449
3386
|
"kind": "const",
|
|
3450
3387
|
"jsdoc": "",
|
|
3451
|
-
"decl": "export const onlineProgramOrders
|
|
3388
|
+
"decl": "export const onlineProgramOrders = onlineProgramItemPayments;",
|
|
3452
3389
|
"verificationChecked": true
|
|
3453
3390
|
},
|
|
3454
3391
|
{
|
|
3455
3392
|
"name": "pricingPlanOrders",
|
|
3456
3393
|
"kind": "const",
|
|
3457
3394
|
"jsdoc": "",
|
|
3458
|
-
"decl": "export const pricingPlanOrders
|
|
3395
|
+
"decl": "export const pricingPlanOrders = pricingPlanItemPayments;",
|
|
3459
3396
|
"verificationChecked": true
|
|
3460
3397
|
},
|
|
3461
3398
|
{
|
|
3462
3399
|
"name": "bookingOrders",
|
|
3463
3400
|
"kind": "const",
|
|
3464
3401
|
"jsdoc": "",
|
|
3465
|
-
"decl": "export const bookingOrders
|
|
3402
|
+
"decl": "export const bookingOrders = bookingItemPayments;",
|
|
3466
3403
|
"verificationChecked": true
|
|
3467
3404
|
},
|
|
3468
3405
|
{
|
|
3469
3406
|
"name": "eventTicketOrders",
|
|
3470
3407
|
"kind": "const",
|
|
3471
3408
|
"jsdoc": "",
|
|
3472
|
-
"decl": "export const eventTicketOrders
|
|
3409
|
+
"decl": "export const eventTicketOrders = eventTicketItemPayments;",
|
|
3473
3410
|
"verificationChecked": true
|
|
3474
3411
|
},
|
|
3475
3412
|
{
|
|
@@ -3482,7 +3419,7 @@
|
|
|
3482
3419
|
{
|
|
3483
3420
|
"name": "storesAppleSalesEnabled",
|
|
3484
3421
|
"kind": "function",
|
|
3485
|
-
"jsdoc": "/**
|
|
3422
|
+
"jsdoc": "/** @deprecated Always true: Wix Stores items always sell through the App Store (wix-iap StartItemPayment).\n * Kept because screens generated from earlier `himi init` templates still call it. */",
|
|
3486
3423
|
"decl": "export function storesAppleSalesEnabled(): boolean;",
|
|
3487
3424
|
"verificationChecked": true
|
|
3488
3425
|
},
|
|
@@ -247,6 +247,20 @@ every build. (Inside the Himi repository Brandy's customer build does the same:
|
|
|
247
247
|
for a local preview.) To expose
|
|
248
248
|
fewer methods, write your own companion and name it in `bundle` — a named bundle is used as is.
|
|
249
249
|
|
|
250
|
+
Each site screen must also carry the companion, so its pages can reach it. In a site-shell
|
|
251
|
+
content package (`himi init --template brandy`) `dev/index.ts` already does this for every page
|
|
252
|
+
with `withSiteWebSdk` from `@wix/himalaya/core`:
|
|
253
|
+
|
|
254
|
+
```ts
|
|
255
|
+
import { siteScreens, withSiteWebSdk } from "@wix/himalaya/core";
|
|
256
|
+
// provisioning.json's `webSdk` block; absent or empty ⇒ the screen is returned unchanged.
|
|
257
|
+
exact: { site_home: (ctx) => withSiteWebSdk(siteScreens(site).site_home, ctx, provisioning.webSdk) }
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
It names the bundle the build generates, declares `webview`, the enabled capabilities and anything
|
|
261
|
+
their SDKs call besides them, and returns `null` (the screen does not build) when the companion was
|
|
262
|
+
not built. A screen that carries a companion keeps its WebView form only.
|
|
263
|
+
|
|
250
264
|
Brandy accepts capabilities `himi dist` can add to an extensible shell. Capabilities requiring
|
|
251
265
|
app-specific boot wiring remain refused until that shell supplies the wiring — the list is in
|
|
252
266
|
[the web page guide](https://apps.wix.com/_api/himi-serve/docs/web-page-native-sdk.md#before-you-start-what-the-app-owner-must-enable).
|
|
@@ -211,6 +211,30 @@ bottom tabs; more than five → `drawer`), `branding.primaryColor` from its them
|
|
|
211
211
|
verticals added to `installedVerticals` unless a probe answered 428. To recreate the whole app rather
|
|
212
212
|
than seed a template from it, run `himi one-app migrate`.
|
|
213
213
|
|
|
214
|
+
### The retired Wix Forum (`book.legacyForum`)
|
|
215
|
+
|
|
216
|
+
Wix Forum was discontinued on 1 March 2026; Wix Groups replaced it. A site can still list the Forum
|
|
217
|
+
app, a `/forum` page or Forum sections in its mobile app, so analyze never treats `forum` as an
|
|
218
|
+
installed vertical: not from a probe, the published site or `book.mobileApp`. The app never gets
|
|
219
|
+
Forum screens, an empty Groups tab or Blog posts in their place. A stale "Forum" nav link names no
|
|
220
|
+
tab, `--site-pages` never embeds or maps the `/forum` page, and `himi template recommend --book`
|
|
221
|
+
does not count Forum (or Groups read as `none`).
|
|
222
|
+
|
|
223
|
+
When the Forum app is installed, its API answers, or the mobile app has Forum sections, the book
|
|
224
|
+
gets `legacyForum` (also `## Legacy Forum` in `book.md`, and one warning):
|
|
225
|
+
|
|
226
|
+
| `groups` | What the app gets | Owner step (`next`) |
|
|
227
|
+
|---|---|---|
|
|
228
|
+
| `found` | the site's real Wix Groups (`groupsMemberOnly` when the visitor read answered with none) | confirm in the dashboard that these groups hold the Forum's posts before saying it moved |
|
|
229
|
+
| `none` (a 428, or an empty owner read) | no community screen, even when the old app had a Groups section | the owner moves the forum to Wix Groups from the dashboard, if Wix still offers it, then re-runs analyze |
|
|
230
|
+
| `unknown` | no Forum screen; Groups only from another signal (the published site, or the old app's Groups section) | the owner Groups read failed (fix the token or permission), was not made (re-run with `--site`), or nothing was read (re-run with `--client-id`) |
|
|
231
|
+
|
|
232
|
+
`migration` is always `not-verified`. The Forum-to-Groups migration record (status, stage counts,
|
|
233
|
+
old-to-new ids) needs an app identity with Manage Social Groups, which analyze does not hold. So
|
|
234
|
+
analyze never reads it and never starts, retries or completes a migration; it also never invites
|
|
235
|
+
members or publishes the site. Do not tell an owner that their Forum moved, or promise to recover
|
|
236
|
+
posts after the deadline, from this chapter alone.
|
|
237
|
+
|
|
214
238
|
The plane has no headless browser (`look.unavailable: no_browser_on_plane`). Owner token is a **request field**, never spawned via `wix token` on the guest. Blobs in the book are **URLs** (Media Manager / wixstatic), not S3 and not base64.
|
|
215
239
|
|
|
216
240
|
`--apply` writes `appearance.homeLayout` + `navigation.navKind` plus identity/colors. It never silently overwrites committed Amit1 `apps/himi-branded-lite/provisioning.json`.
|
|
@@ -144,7 +144,8 @@ for **behavior** is the website; design authority for **layout** is
|
|
|
144
144
|
|
|
145
145
|
| Website | Mobile |
|
|
146
146
|
|---|---|
|
|
147
|
-
|
|
|
147
|
+
| Retired Wix Forum (`book.legacyForum`) | No Forum screen. The app shows the site's Wix Groups only when analyze found some; otherwise pass the `next` owner step on. Never a Blog post or an empty Groups tab instead (`himi docs wix-business-context`) |
|
|
148
|
+
| Vertical (book, shop, events, members, blog, groups) | Template/overlay screen; bind with `himi sdk` + live `@himalaya/wix-*`. Any screen showing a digital item's price (program, product, plan) also uses the shared IAP pricing layer — `himi docs iap-pricing` — whether it came from a template or you wrote it |
|
|
148
149
|
| Custom content / CMS / forms | One T5 screen per *job*; data = adopted CMS (`wixId`) or a form worker (`himi docs recipe-form-submit`) |
|
|
149
150
|
| Velo page modules | Briefing only: field names, collection ids, submit flow. **Rewrite** as a worker. Never copy Velo JS. Site HTTP functions (`/_functions/`) are a separate API: `himi docs wix-site-http-functions` / `himi site function` — analyze never invokes them |
|
|
150
151
|
| Lightboxes, popups, multi-column editors | Push screen or sheet — not a ported lightbox |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1724.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": [
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"artifactId": "himalaya-cli"
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
"falconPackageHash": "
|
|
84
|
+
"falconPackageHash": "aad0bbdce1ff36542b6167a0e6087ed91f11189e9990ddcce4a37333"
|
|
85
85
|
}
|
|
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
|
17
17
|
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
18
18
|
import { memberAccountRoutes } from "../_shared/member-account-routes.js";
|
|
19
19
|
import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
|
|
20
|
-
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders,
|
|
20
|
+
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
|
|
21
21
|
import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
|
|
22
22
|
|
|
23
23
|
interface AuthRouteInput {
|
|
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
|
|
|
615
615
|
// row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
|
|
616
616
|
// guest too: the restore itself asks them to sign in.
|
|
617
617
|
const commerce = createIapCommerce({
|
|
618
|
-
adapters: [onlineProgramOrders, pricingPlanOrders,
|
|
618
|
+
adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
|
|
619
619
|
onChange: () => { void svc.restorePublish(); },
|
|
620
620
|
});
|
|
621
621
|
const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
|
|
@@ -2,7 +2,7 @@ import { withOnlineWrites, offlineWritesEnabled, offlineWriteMessage } from "../
|
|
|
2
2
|
import { defineService as registerState } from "@himalaya/state";
|
|
3
3
|
// Tier-5 bundle: himi-store — product detail.
|
|
4
4
|
import { withIapPresentation } from "../_shared/iap-presentation.js";
|
|
5
|
-
import {
|
|
5
|
+
import { storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
|
|
6
6
|
import { iapPriceCopy, iapPurchaseCopy } from "../_shared/iap-worker.js";
|
|
7
7
|
import { share as shareSheet } from "@himalaya/share";
|
|
8
8
|
import { addToCurrentCart, getCurrentCart } from "@himalaya/wix-ecom";
|
|
@@ -466,10 +466,8 @@ function derive(s: S): S {
|
|
|
466
466
|
// read answering late — must not replace the badge the add set (#3468 review).
|
|
467
467
|
let cartBadgeEpoch = 0;
|
|
468
468
|
|
|
469
|
-
// A digital product with no options sells through the App Store
|
|
470
|
-
//
|
|
471
|
-
// Until then, and for any other product, an App Store route only blocks the regular checkout.
|
|
472
|
-
const SELLS_THROUGH_APPLE = storesAppleSalesEnabled();
|
|
469
|
+
// A digital product with no options sells through the App Store: wix-iap StartItemPayment places and
|
|
470
|
+
// charges its order. For any other product, an App Store route only blocks the regular checkout.
|
|
473
471
|
const WIX_STORES_APP = "215238eb-22a5-4c36-9e7b-e7c08025e04e";
|
|
474
472
|
const NOT_APPLE: IapPurchaseFields = { appleRoute: false, accessReady: false, buyLabel: "", buyDisabled: true, buyBusy: false, buyNote: "" };
|
|
475
473
|
|
|
@@ -477,7 +475,7 @@ let productPricing: IapCommerce;
|
|
|
477
475
|
let checkoutEntered = false;
|
|
478
476
|
const defineService = withIapPresentation<S>({
|
|
479
477
|
register: withOnlineWrites(registerState, ["beginAdd", "addToCart", "buy"], { derive, messageFields: action => action === "buy" ? ["buyNote"] : ["cartHint"] }),
|
|
480
|
-
adapters:
|
|
478
|
+
adapters: [storesProductOrders],
|
|
481
479
|
onCreate: commerce => { productPricing = commerce; }, prefix: "product",
|
|
482
480
|
transientKeys: ["optionValidationTarget", "optionValidationRequest", "opt1ScrollRequest", "opt2ScrollRequest", "opt3ScrollRequest", "galleryIndex", "price", "optionsIncomplete", "cartHint", "cartHidden", "buyHidden", "buyLabel", "buyDisabled", "buyNote", "purchasedNote", "addedSheetPresented", "shareHint"], contentActions: ["load", "paintCached"], concurrentPublishActions: ["buy"],
|
|
483
481
|
items: state => inputId() ? [{ reference: { kind: "storesProduct", id: inputId() }, commerceDisplayPrice: state.price }] : [],
|
|
@@ -508,7 +506,7 @@ const defineService = withIapPresentation<S>({
|
|
|
508
506
|
function applePurchase(state: S): IapPurchaseFields {
|
|
509
507
|
const id = inputId();
|
|
510
508
|
const loaded = !!id && lastLoadedId === id;
|
|
511
|
-
const sellable =
|
|
509
|
+
const sellable = loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
|
|
512
510
|
const copy = iapPurchaseCopy("product");
|
|
513
511
|
const fields = sellable ? productPricing.purchaseFields({ kind: "storesProduct", id }, copy) : NOT_APPLE;
|
|
514
512
|
return fields.appleRoute ? fields : NOT_APPLE;
|
|
@@ -516,7 +514,6 @@ function applePurchase(state: S): IapPurchaseFields {
|
|
|
516
514
|
|
|
517
515
|
/** On every entry: the first starts the checkout (recovering held purchases), later ones reconcile. */
|
|
518
516
|
function enterCheckout(): void {
|
|
519
|
-
if (!SELLS_THROUGH_APPLE) return;
|
|
520
517
|
void (checkoutEntered ? productPricing.reconcile() : productPricing.start());
|
|
521
518
|
checkoutEntered = true;
|
|
522
519
|
}
|
|
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
|
17
17
|
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
18
18
|
import { memberAccountRoutes } from "../_shared/member-account-routes.js";
|
|
19
19
|
import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
|
|
20
|
-
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders,
|
|
20
|
+
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
|
|
21
21
|
import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
|
|
22
22
|
|
|
23
23
|
interface AuthRouteInput {
|
|
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
|
|
|
615
615
|
// row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
|
|
616
616
|
// guest too: the restore itself asks them to sign in.
|
|
617
617
|
const commerce = createIapCommerce({
|
|
618
|
-
adapters: [onlineProgramOrders, pricingPlanOrders,
|
|
618
|
+
adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
|
|
619
619
|
onChange: () => { void svc.restorePublish(); },
|
|
620
620
|
});
|
|
621
621
|
const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
|
|
@@ -3,7 +3,7 @@ import { withOnlineWrites, offlineWritesEnabled, offlineWriteMessage } from "../
|
|
|
3
3
|
import { defineService as registerState } from "@himalaya/state";
|
|
4
4
|
// Tier-5 bundle: himi-store — product detail.
|
|
5
5
|
import { withIapPresentation } from "../_shared/iap-presentation.js";
|
|
6
|
-
import {
|
|
6
|
+
import { storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
|
|
7
7
|
import { iapPriceCopy, iapPurchaseCopy } from "../_shared/iap-worker.js";
|
|
8
8
|
import { share as shareSheet } from "@himalaya/share";
|
|
9
9
|
import { addToCurrentCart, getCurrentCart } from "@himalaya/wix-ecom";
|
|
@@ -451,10 +451,8 @@ function derive(s: S): S {
|
|
|
451
451
|
// read answering late — must not replace the badge the add set (#3468 review).
|
|
452
452
|
let cartBadgeEpoch = 0;
|
|
453
453
|
|
|
454
|
-
// A digital product with no options sells through the App Store
|
|
455
|
-
//
|
|
456
|
-
// Until then, and for any other product, an App Store route only blocks the regular checkout.
|
|
457
|
-
const SELLS_THROUGH_APPLE = storesAppleSalesEnabled();
|
|
454
|
+
// A digital product with no options sells through the App Store: wix-iap StartItemPayment places and
|
|
455
|
+
// charges its order. For any other product, an App Store route only blocks the regular checkout.
|
|
458
456
|
const WIX_STORES_APP = "215238eb-22a5-4c36-9e7b-e7c08025e04e";
|
|
459
457
|
const NOT_APPLE: IapPurchaseFields = { appleRoute: false, accessReady: false, buyLabel: "", buyDisabled: true, buyBusy: false, buyNote: "" };
|
|
460
458
|
|
|
@@ -462,7 +460,7 @@ let productPricing: IapCommerce;
|
|
|
462
460
|
let checkoutEntered = false;
|
|
463
461
|
const registerProduct = withIapPresentation<S>({
|
|
464
462
|
register: withOnlineWrites(registerState, ["beginAdd", "addToCart", "buy"], { derive, messageFields: action => action === "buy" ? ["buyNote"] : ["cartHint"] }),
|
|
465
|
-
adapters:
|
|
463
|
+
adapters: [storesProductOrders],
|
|
466
464
|
onCreate: commerce => { productPricing = commerce; }, prefix: "product",
|
|
467
465
|
transientKeys: ["optionValidationTarget", "optionValidationRequest", "opt1ScrollRequest", "opt2ScrollRequest", "opt3ScrollRequest", "galleryIndex", "price", "optionsIncomplete", "cartHint", "cartHidden", "buyHidden", "buyLabel", "buyDisabled", "buyNote", "purchasedNote", "addedSheetPresented", "shareHint"], contentActions: ["load", "readChanged"], concurrentPublishActions: ["buy"],
|
|
468
466
|
items: state => inputId() ? [{ reference: { kind: "storesProduct", id: inputId() }, commerceDisplayPrice: state.price }] : [],
|
|
@@ -513,7 +511,7 @@ const defineService = withReadLifecycle(registerProduct, "load", {
|
|
|
513
511
|
function applePurchase(state: S): IapPurchaseFields {
|
|
514
512
|
const id = inputId();
|
|
515
513
|
const loaded = !!id && lastLoadedId === id;
|
|
516
|
-
const sellable =
|
|
514
|
+
const sellable = loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
|
|
517
515
|
const copy = iapPurchaseCopy("product");
|
|
518
516
|
const fields = sellable ? productPricing.purchaseFields({ kind: "storesProduct", id }, copy) : NOT_APPLE;
|
|
519
517
|
return fields.appleRoute ? fields : NOT_APPLE;
|
|
@@ -521,7 +519,6 @@ function applePurchase(state: S): IapPurchaseFields {
|
|
|
521
519
|
|
|
522
520
|
/** On every entry: the first starts the checkout (recovering held purchases), later ones reconcile. */
|
|
523
521
|
function enterCheckout(): void {
|
|
524
|
-
if (!SELLS_THROUGH_APPLE) return;
|
|
525
522
|
void (checkoutEntered ? productPricing.reconcile() : productPricing.start());
|
|
526
523
|
checkoutEntered = true;
|
|
527
524
|
}
|
|
@@ -51,6 +51,19 @@ To review the map first, leave out `--apply`: the block is then only written to
|
|
|
51
51
|
`config.ts` validates the block whenever the app loads, so an `http` origin, a duplicate id or a map
|
|
52
52
|
with no tab fails `himi validate`, `himi render` and `himi push` rather than shipping.
|
|
53
53
|
|
|
54
|
+
## Let your pages call the phone
|
|
55
|
+
|
|
56
|
+
A `webSdk` block in `provisioning.json` lets your site's pages call native features through the
|
|
57
|
+
web page SDK (`himi docs webview-page-sdk`):
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
"webSdk": { "capabilities": ["haptic", "share"] }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`himi build` generates the worker that answers those calls, and `dev/index.ts` attaches it to every
|
|
64
|
+
page (`withSiteWebSdk`); `config.ts` adds the capabilities to the app, with any `permissionCopy`
|
|
65
|
+
wording for the ones that ask the user. Leave the block out and the pages call nothing native.
|
|
66
|
+
|
|
54
67
|
## Loop
|
|
55
68
|
|
|
56
69
|
```bash
|
|
@@ -14,7 +14,9 @@ import {
|
|
|
14
14
|
siteNavKind,
|
|
15
15
|
siteSidebar,
|
|
16
16
|
siteNavConfig,
|
|
17
|
+
siteWebSdkCompanion,
|
|
17
18
|
type SiteShellConfig,
|
|
19
|
+
type SiteWebSdk,
|
|
18
20
|
} from "@himalaya/core";
|
|
19
21
|
import { ConsoleTelemetrySink } from "@himalaya/telemetry-console";
|
|
20
22
|
import provisioning from "./provisioning.json" with { type: "json" };
|
|
@@ -31,6 +33,16 @@ if (nav.tabs[0]?.screenId !== "site_home") {
|
|
|
31
33
|
throw new Error('provisioning.json: the "home" page must be the first tab — list it first in site.pages');
|
|
32
34
|
}
|
|
33
35
|
|
|
36
|
+
/** The native capabilities your website's pages may call (`webSdk` in provisioning.json), e.g.
|
|
37
|
+
* `{ "capabilities": ["haptic", "share"] }`. `himi build` generates the worker that answers those
|
|
38
|
+
* calls, and dev/index.ts attaches it to every page. Absent: the pages call nothing native. */
|
|
39
|
+
export const webSdk = (provisioning as { webSdk?: SiteWebSdk & { permissionCopy?: Record<string, string> } }).webSdk;
|
|
40
|
+
// What the pages' worker declares: the page channel (`webview`), the enabled capabilities and
|
|
41
|
+
// anything their SDKs call besides them (`iap` also calls `wix_api`), taken from the worker's own
|
|
42
|
+
// declaration so the app grants exactly that. `push` and `base44` are listed by the app already.
|
|
43
|
+
const pageCapabilities = (siteWebSdkCompanion(webSdk)?.declaredCapabilities ?? [])
|
|
44
|
+
.filter((id) => id !== "push" && id !== "base44");
|
|
45
|
+
|
|
34
46
|
/** A Base44 site's app (`base44` in provisioning.json, or `bindings.base44`): members sign in on the
|
|
35
47
|
* native Account screen, and the app carries the session into the website's pages. Absent for a
|
|
36
48
|
* Wix site, which stays visitor-only. */
|
|
@@ -99,7 +111,9 @@ export default defineApp({
|
|
|
99
111
|
},
|
|
100
112
|
// `push` lets the app ask for notification permission and show the Notifications screen.
|
|
101
113
|
// `base44` (a Base44 site only) lets the Account screen sign members in to your Base44 app.
|
|
102
|
-
|
|
114
|
+
// Then whatever `webSdk` lets your pages call, with its permission wording.
|
|
115
|
+
capabilities: ["push", ...(base44 ? ["base44"] : []), ...pageCapabilities],
|
|
116
|
+
permissionCopy: webSdk?.permissionCopy,
|
|
103
117
|
// The Base44 app the native sign-in and the website pages' session talk to (none for a Wix site).
|
|
104
118
|
base44: base44Config,
|
|
105
119
|
// Ask for notification permission on the first launch. Tapped notifications that carry one of
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// Your app's screens. Each one is a page of your website — a WebView screen built from the
|
|
2
2
|
// `site` block of ../provisioning.json — so this file holds no screen of its own. Change the
|
|
3
|
-
// pages by changing that block, never this file.
|
|
4
|
-
|
|
5
|
-
import
|
|
3
|
+
// pages by changing that block, never this file. When provisioning.json enables page
|
|
4
|
+
// capabilities (`webSdk`), every page gets the worker that answers them (`withSiteWebSdk`).
|
|
5
|
+
import { siteScreens, withSiteWebSdk } from "@himalaya/core";
|
|
6
|
+
import config, { base44, BASE44_ACCOUNT_SCREEN_ID, site, webSdk } from "../config.js";
|
|
6
7
|
|
|
7
8
|
const SCREENS = siteScreens(site);
|
|
8
9
|
|
|
@@ -857,10 +858,11 @@ export default {
|
|
|
857
858
|
config,
|
|
858
859
|
homeScreenId: "site_home",
|
|
859
860
|
screens: {
|
|
860
|
-
// A fresh copy per build: descriptors are pure functions of the site block
|
|
861
|
-
//
|
|
861
|
+
// A fresh copy per build: descriptors are pure functions of the site block (withSiteWebSdk
|
|
862
|
+
// copies, and attaches the page worker when `webSdk` enables capabilities). A JSON round trip,
|
|
863
|
+
// not structuredClone: `himi test` builds screens in the contained realm, which withholds it.
|
|
862
864
|
exact: {
|
|
863
|
-
...Object.fromEntries(Object.keys(SCREENS).map((id) => [id, () =>
|
|
865
|
+
...Object.fromEntries(Object.keys(SCREENS).map((id) => [id, (ctx: Parameters<typeof withSiteWebSdk>[1]) => withSiteWebSdk(SCREENS[id]!, ctx, webSdk)])),
|
|
864
866
|
himi_notification_settings: () => JSON.parse(JSON.stringify(NOTIFICATIONS)),
|
|
865
867
|
...Object.fromEntries(Object.entries(ACCOUNT).map(([id, screen]) => [id, () => JSON.parse(JSON.stringify(screen))])),
|
|
866
868
|
},
|
|
@@ -869,6 +871,7 @@ export default {
|
|
|
869
871
|
actions: [],
|
|
870
872
|
createStore: () => ({}),
|
|
871
873
|
// Every page is seeded, so the whole tab bar and drawer work on a cold offline start (each
|
|
872
|
-
// WebView then shows its own offline state until the network returns).
|
|
874
|
+
// WebView then shows its own offline state until the network returns). The seed copy carries no
|
|
875
|
+
// page worker: the built worker's integrity is only known when the app is served.
|
|
873
876
|
seed: { screens: { ...SCREENS, himi_notification_settings: NOTIFICATIONS_SEED, ...ACCOUNT }, data: {} },
|
|
874
877
|
};
|
|
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
|
17
17
|
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
18
18
|
import { memberAccountRoutes } from "../_shared/member-account-routes.js";
|
|
19
19
|
import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
|
|
20
|
-
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders,
|
|
20
|
+
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
|
|
21
21
|
import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
|
|
22
22
|
|
|
23
23
|
interface AuthRouteInput {
|
|
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
|
|
|
615
615
|
// row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
|
|
616
616
|
// guest too: the restore itself asks them to sign in.
|
|
617
617
|
const commerce = createIapCommerce({
|
|
618
|
-
adapters: [onlineProgramOrders, pricingPlanOrders,
|
|
618
|
+
adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
|
|
619
619
|
onChange: () => { void svc.restorePublish(); },
|
|
620
620
|
});
|
|
621
621
|
const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
|
|
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
|
17
17
|
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
18
18
|
import { memberAccountRoutes } from "../_shared/member-account-routes.js";
|
|
19
19
|
import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
|
|
20
|
-
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders,
|
|
20
|
+
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
|
|
21
21
|
import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
|
|
22
22
|
|
|
23
23
|
interface AuthRouteInput {
|
|
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
|
|
|
615
615
|
// row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
|
|
616
616
|
// guest too: the restore itself asks them to sign in.
|
|
617
617
|
const commerce = createIapCommerce({
|
|
618
|
-
adapters: [onlineProgramOrders, pricingPlanOrders,
|
|
618
|
+
adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
|
|
619
619
|
onChange: () => { void svc.restorePublish(); },
|
|
620
620
|
});
|
|
621
621
|
const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
|
|
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
|
17
17
|
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
18
18
|
import { memberAccountRoutes } from "../_shared/member-account-routes.js";
|
|
19
19
|
import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
|
|
20
|
-
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders,
|
|
20
|
+
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
|
|
21
21
|
import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
|
|
22
22
|
|
|
23
23
|
interface AuthRouteInput {
|
|
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
|
|
|
615
615
|
// row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
|
|
616
616
|
// guest too: the restore itself asks them to sign in.
|
|
617
617
|
const commerce = createIapCommerce({
|
|
618
|
-
adapters: [onlineProgramOrders, pricingPlanOrders,
|
|
618
|
+
adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
|
|
619
619
|
onChange: () => { void svc.restorePublish(); },
|
|
620
620
|
});
|
|
621
621
|
const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
|
|
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
|
17
17
|
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
18
18
|
import { memberAccountRoutes } from "../_shared/member-account-routes.js";
|
|
19
19
|
import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
|
|
20
|
-
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders,
|
|
20
|
+
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
|
|
21
21
|
import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
|
|
22
22
|
|
|
23
23
|
interface AuthRouteInput {
|
|
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
|
|
|
615
615
|
// row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
|
|
616
616
|
// guest too: the restore itself asks them to sign in.
|
|
617
617
|
const commerce = createIapCommerce({
|
|
618
|
-
adapters: [onlineProgramOrders, pricingPlanOrders,
|
|
618
|
+
adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
|
|
619
619
|
onChange: () => { void svc.restorePublish(); },
|
|
620
620
|
});
|
|
621
621
|
const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
|