@wix/himalaya-cli 0.1657.0 → 0.1659.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +1334 -197
- package/guides/himi-json-output.md +14 -0
- package/guides/skill.md +3 -1
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -4571,6 +4571,9 @@ async function appRole(opts) {
|
|
|
4571
4571
|
async function verifyAppOwnership(opts) {
|
|
4572
4572
|
const claims = decodeControlTokenClaims(opts.controlToken);
|
|
4573
4573
|
if (!claims?.sub) return { state: "unknown", status: 0, check: "control_token" };
|
|
4574
|
+
if (claims.siteLease) {
|
|
4575
|
+
return Array.isArray(claims.apps) && claims.apps.includes(opts.declaredName) ? { state: "owned", slug: opts.declaredName, record: { slug: opts.declaredName } } : { state: "unknown", status: 0, check: "control_token" };
|
|
4576
|
+
}
|
|
4574
4577
|
const listed = await ownerApps({ ...opts, controlToken: opts.controlToken });
|
|
4575
4578
|
if (!listed.ok && (listed.status === 401 || listed.status === 403)) return { state: "login_required", status: listed.status };
|
|
4576
4579
|
if (!listed.ok) return { state: "unknown", status: listed.status, check: "list_apps" };
|
|
@@ -15902,7 +15905,6 @@ function webViewOriginAllowed(url, origins) {
|
|
|
15902
15905
|
}
|
|
15903
15906
|
var init_webview_origin = __esm({
|
|
15904
15907
|
"../../core/ts/src/webview-origin.ts"() {
|
|
15905
|
-
"use strict";
|
|
15906
15908
|
init_define_HHP_CATALOG();
|
|
15907
15909
|
}
|
|
15908
15910
|
});
|
|
@@ -28195,19 +28197,46 @@ var init_screen_map = __esm({
|
|
|
28195
28197
|
screenName: "wix.events.EventDashboard",
|
|
28196
28198
|
module: "wix",
|
|
28197
28199
|
rn: "@wix/wix-one-events@1.53.1743 [wix-private/wix-one-events] src/screen-ids.js:77",
|
|
28198
|
-
note: "src/screen-ids.js:77"
|
|
28200
|
+
note: "src/screen-ids.js:77",
|
|
28201
|
+
view: {
|
|
28202
|
+
src: 68,
|
|
28203
|
+
endpoint: "events-users",
|
|
28204
|
+
evid: 268,
|
|
28205
|
+
fields: {
|
|
28206
|
+
event_id: "$route.id",
|
|
28207
|
+
target_page: "wix.events.EventDashboard"
|
|
28208
|
+
}
|
|
28209
|
+
},
|
|
28210
|
+
viewRn: "screenOpened: wix-private/wix-one-events@7aa05d5 packages/wix-one-events/src/middlewares/bi/bi-events-map.ts:1140 on the owner event dashboard mount"
|
|
28199
28211
|
},
|
|
28200
28212
|
himi_owner_lite_event_form: {
|
|
28201
28213
|
screenName: "wix.events.EditEvent",
|
|
28202
28214
|
module: "wix",
|
|
28203
28215
|
rn: "@wix/wix-one-events@1.53.1743 [wix-private/wix-one-events] src/screen-ids.js:17",
|
|
28204
|
-
note: "Edit event; a new event uses wix.events.CreateEvent"
|
|
28216
|
+
note: "Edit event; a new event uses wix.events.CreateEvent",
|
|
28217
|
+
view: {
|
|
28218
|
+
src: 68,
|
|
28219
|
+
endpoint: "events-users",
|
|
28220
|
+
evid: 268,
|
|
28221
|
+
fields: {
|
|
28222
|
+
event_id: "$route.id",
|
|
28223
|
+
target_page: "wix.events.EditEvent"
|
|
28224
|
+
}
|
|
28225
|
+
},
|
|
28226
|
+
viewRn: "screenOpened: wix-private/wix-one-events@7aa05d5 packages/wix-one-events/src/middlewares/bi/bi-events-map.ts:1140 on the edit-event mount"
|
|
28205
28227
|
},
|
|
28206
28228
|
himi_owner_lite_events: {
|
|
28207
28229
|
screenName: "wix.events.managerApp.Index",
|
|
28208
28230
|
module: "wix",
|
|
28209
28231
|
rn: "@wix/wix-one-events@1.53.1743 [wix-private/wix-one-events] src/screen-ids.js:4",
|
|
28210
|
-
note: "Manage item screenIDs.MANAGER_INDEX (wix-one-events src/screen-ids.js:4)"
|
|
28232
|
+
note: "Manage item screenIDs.MANAGER_INDEX (wix-one-events src/screen-ids.js:4)",
|
|
28233
|
+
view: {
|
|
28234
|
+
src: 68,
|
|
28235
|
+
endpoint: "events-users",
|
|
28236
|
+
evid: 102,
|
|
28237
|
+
fields: {}
|
|
28238
|
+
},
|
|
28239
|
+
viewRn: "ownerEventListOpened: wix-private/wix-one-events@7aa05d5 packages/wix-one-events/src/middlewares/bi/bi-events-map.ts:437 <- components/event-list/event-list.tsx:44; RN also sends 68:268 on this mount, which one view cannot carry (#4979)"
|
|
28211
28240
|
},
|
|
28212
28241
|
himi_owner_lite_faq: {
|
|
28213
28242
|
screenName: "wix.faq.ManageScreen",
|
|
@@ -28241,13 +28270,33 @@ var init_screen_map = __esm({
|
|
|
28241
28270
|
screenName: "owners.inbox.screen",
|
|
28242
28271
|
module: "owners",
|
|
28243
28272
|
rn: "@wix/wix-owners-app-platform@1.3271.2847 [wix-private/mobile-modules] src/moduleAPI/components.ts:18",
|
|
28244
|
-
note: "Inbox tab root (src/constants/index.ts:20)"
|
|
28273
|
+
note: "Inbox tab root (src/constants/index.ts:20)",
|
|
28274
|
+
view: {
|
|
28275
|
+
src: 5,
|
|
28276
|
+
endpoint: "/",
|
|
28277
|
+
evid: 532,
|
|
28278
|
+
fields: {
|
|
28279
|
+
origin: "native"
|
|
28280
|
+
}
|
|
28281
|
+
},
|
|
28282
|
+
viewRn: "@wix/mobile-apps-inbox@1.0.2106 [wix-private/mobile-modules] src/biLogger/biLogger.service.ts:53-59 openChatTab -> engageTabClicked (crm-data v2, endpoint ''), from src/inbox/hooks/useReportChatTabBI.ts:13 on the Inbox list's first mount; RN fires it once per mount, here on every view; app_instance_id has no Himi source"
|
|
28245
28283
|
},
|
|
28246
28284
|
himi_owner_lite_inbox_thread: {
|
|
28247
28285
|
screenName: "chat.chatroom.screen",
|
|
28248
28286
|
module: "chat",
|
|
28249
28287
|
rn: "@wix/mobile-apps-inbox@1.0.2106 [wix-private/mobile-modules] src/module/deepLinks.ts:31",
|
|
28250
|
-
note: "Owner/business chatroom id (mobile-apps-inbox src/navigation/identifiers.ts:53)"
|
|
28288
|
+
note: "Owner/business chatroom id (mobile-apps-inbox src/navigation/identifiers.ts:53)",
|
|
28289
|
+
view: {
|
|
28290
|
+
src: 5,
|
|
28291
|
+
endpoint: "/",
|
|
28292
|
+
evid: 501,
|
|
28293
|
+
fields: {
|
|
28294
|
+
is_member: "false",
|
|
28295
|
+
chatRoomType: "business",
|
|
28296
|
+
origin: "native"
|
|
28297
|
+
}
|
|
28298
|
+
},
|
|
28299
|
+
viewRn: "@wix/mobile-apps-inbox@1.0.2106 [wix-private/mobile-modules] src/biLogger/biLogger.service.ts:358-364 logOpenConversation -> engageOpenConversation (endpoint ''), from chatroom/business-chatroom/business-chat-room.component.tsx:52-58 (isMember false, chatroomType business); contact_id omitted: the route id is a contact id only when kind=contact; referral_info is UI context"
|
|
28251
28300
|
},
|
|
28252
28301
|
himi_owner_lite_manage: {
|
|
28253
28302
|
screenName: "owners.manage.screen",
|
|
@@ -28287,7 +28336,17 @@ var init_screen_map = __esm({
|
|
|
28287
28336
|
screenName: "wix.ecomPlatform.GiftCardsSalesList",
|
|
28288
28337
|
module: "wix",
|
|
28289
28338
|
rn: "@wix/wix-one-app-ecom-platform@1.27.2235 [wix-private/mobile-modules] src/storesAPI.ts:88",
|
|
28290
|
-
note: "Manage item ScreenId.GiftCardsSalesList (ecom-platform src/moduleAPI/manageItems.ts:89)"
|
|
28339
|
+
note: "Manage item ScreenId.GiftCardsSalesList (ecom-platform src/moduleAPI/manageItems.ts:89)",
|
|
28340
|
+
view: {
|
|
28341
|
+
src: 125,
|
|
28342
|
+
endpoint: "gc-client-bm",
|
|
28343
|
+
evid: 4,
|
|
28344
|
+
fields: {
|
|
28345
|
+
pageName: "sales",
|
|
28346
|
+
providerAppDefId: "d80111c5-a0f4-47a8-b63a-65b54d774a27"
|
|
28347
|
+
}
|
|
28348
|
+
},
|
|
28349
|
+
viewRn: "giftCardPageLoadedInBm4 (@wix/bi-logger-gc-client-bm): @wix/wix-one-app-ecom-platform@1.27.2235 dist/src/bi/giftCards/useGiftCardsBiLogger.ts:45-52 <- GiftCardsSalesListScreen.tsx:81; providerAppDefId is AppId.Rise (constants.ts:35); RN sends 125:56 on the same mount too, which one view cannot carry (#4979)"
|
|
28291
28350
|
},
|
|
28292
28351
|
himi_owner_lite_module_groups: {
|
|
28293
28352
|
screenName: "groups.screens.manageGroups",
|
|
@@ -28347,13 +28406,34 @@ var init_screen_map = __esm({
|
|
|
28347
28406
|
screenName: "wix.ecomPlatform.OrderScreen",
|
|
28348
28407
|
module: "wix",
|
|
28349
28408
|
rn: "@wix/wix-one-app-ecom-platform@1.27.2235 [wix-private/mobile-modules] src/storesAPI.ts:21",
|
|
28350
|
-
note: "ecom-platform storesAPI.ts"
|
|
28409
|
+
note: "ecom-platform storesAPI.ts",
|
|
28410
|
+
view: {
|
|
28411
|
+
src: 130,
|
|
28412
|
+
endpoint: "ec-bm",
|
|
28413
|
+
evid: 212,
|
|
28414
|
+
fields: {
|
|
28415
|
+
id: "$route.id",
|
|
28416
|
+
pageName: "order",
|
|
28417
|
+
origin: "merchantView"
|
|
28418
|
+
}
|
|
28419
|
+
},
|
|
28420
|
+
viewRn: "storeDataRendered: screens/order/OrderScreen.tsx:1081 once the order loads; paymentStatus comes from the loaded order (layer 4/5)"
|
|
28351
28421
|
},
|
|
28352
28422
|
himi_owner_lite_orders: {
|
|
28353
28423
|
screenName: "wix.ecomPlatform.OrdersScreen",
|
|
28354
28424
|
module: "wix",
|
|
28355
28425
|
rn: "@wix/wix-one-app-ecom-platform@1.27.2235 [wix-private/mobile-modules] src/storesAPI.ts:19",
|
|
28356
|
-
note: "Manage item ScreenId.OrdersScreen (ecom-platform src/moduleAPI/manageItems.ts:32)"
|
|
28426
|
+
note: "Manage item ScreenId.OrdersScreen (ecom-platform src/moduleAPI/manageItems.ts:32)",
|
|
28427
|
+
view: {
|
|
28428
|
+
src: 130,
|
|
28429
|
+
endpoint: "ec-bm",
|
|
28430
|
+
evid: 212,
|
|
28431
|
+
fields: {
|
|
28432
|
+
pageName: "orders",
|
|
28433
|
+
origin: "merchantView"
|
|
28434
|
+
}
|
|
28435
|
+
},
|
|
28436
|
+
viewRn: "storeDataRendered: @wix/wix-one-app-ecom-platform@1.27.2235 dist/src/bi/storemanager.js:123; containers/Orders/utils.ts:39 <- Orders.tsx:122; state, catalogAppId, isPremium, hasPaymentMethod and hasOnlineStoreInstalled have no route source"
|
|
28357
28437
|
},
|
|
28358
28438
|
himi_owner_lite_overview: {
|
|
28359
28439
|
rn: null,
|
|
@@ -28387,7 +28467,18 @@ var init_screen_map = __esm({
|
|
|
28387
28467
|
screenName: "wix.stores.ProductScreen",
|
|
28388
28468
|
module: "wix",
|
|
28389
28469
|
rn: "@wix/wix-store-merchant-app@3.11212.3637 [wix-private/mobile-modules] src/storesAPI.ts:41",
|
|
28390
|
-
note: "Owner product screen (storesAPI.ts:31) \u2014 RN owner product page is the editable product screen; no separate read-only detail"
|
|
28470
|
+
note: "Owner product screen (storesAPI.ts:31) \u2014 RN owner product page is the editable product screen; no separate read-only detail",
|
|
28471
|
+
view: {
|
|
28472
|
+
src: 10,
|
|
28473
|
+
endpoint: "ec",
|
|
28474
|
+
evid: 212,
|
|
28475
|
+
fields: {
|
|
28476
|
+
id: "$route.id",
|
|
28477
|
+
pageName: "product",
|
|
28478
|
+
origin: "merchantView"
|
|
28479
|
+
}
|
|
28480
|
+
},
|
|
28481
|
+
viewRn: "storeDataRendered: ProductScreen.tsx:469 on the product screen mount; RN's detail and edit are one screen, so the Himi product form sends none"
|
|
28391
28482
|
},
|
|
28392
28483
|
himi_owner_lite_product_form: {
|
|
28393
28484
|
screenName: "wix.stores.ProductScreen",
|
|
@@ -28399,13 +28490,33 @@ var init_screen_map = __esm({
|
|
|
28399
28490
|
screenName: "wix.stores.AddProductScreen",
|
|
28400
28491
|
module: "wix",
|
|
28401
28492
|
rn: "@wix/wix-store-merchant-app@3.11212.3637 [wix-private/mobile-modules] src/storesAPI.ts:76",
|
|
28402
|
-
note: "storesAPI.ts:57"
|
|
28493
|
+
note: "storesAPI.ts:57",
|
|
28494
|
+
view: {
|
|
28495
|
+
src: 10,
|
|
28496
|
+
endpoint: "ec",
|
|
28497
|
+
evid: 212,
|
|
28498
|
+
fields: {
|
|
28499
|
+
pageName: "product_new",
|
|
28500
|
+
origin: "merchantView"
|
|
28501
|
+
}
|
|
28502
|
+
},
|
|
28503
|
+
viewRn: "storeDataRendered: ProductScreen.tsx:461 (pageName product_new) on the new-product screen"
|
|
28403
28504
|
},
|
|
28404
28505
|
himi_owner_lite_products: {
|
|
28405
28506
|
screenName: "wix.stores.ProductsScreen",
|
|
28406
28507
|
module: "wix",
|
|
28407
28508
|
rn: "@wix/wix-store-merchant-app@3.11212.3637 [wix-private/mobile-modules] src/storesAPI.ts:29",
|
|
28408
|
-
note: "Manage item ScreenId.ProductsScreen (store-merchant-app storesAPI.ts:23)"
|
|
28509
|
+
note: "Manage item ScreenId.ProductsScreen (store-merchant-app storesAPI.ts:23)",
|
|
28510
|
+
view: {
|
|
28511
|
+
src: 10,
|
|
28512
|
+
endpoint: "ec",
|
|
28513
|
+
evid: 212,
|
|
28514
|
+
fields: {
|
|
28515
|
+
pageName: "products",
|
|
28516
|
+
origin: "merchantView"
|
|
28517
|
+
}
|
|
28518
|
+
},
|
|
28519
|
+
viewRn: "storeDataRendered: @wix/wix-store-merchant-app@3.11212.3637 dist/src/features/home/bi/home.js:51; home/containers/Products/ProductsContainer.tsx:112 on the Products list mount; state, isV3, isPremium, hasPaymentMethod, previousPage and storeId have no route source"
|
|
28409
28520
|
},
|
|
28410
28521
|
himi_owner_lite_record_badges: {
|
|
28411
28522
|
screenName: "membersArea.BadgeMembersScreen",
|
|
@@ -28436,7 +28547,18 @@ var init_screen_map = __esm({
|
|
|
28436
28547
|
himi_owner_lite_record_giftCards: {
|
|
28437
28548
|
screenName: "wix.ecomPlatform.GiftCardSaleDetails",
|
|
28438
28549
|
module: "wix",
|
|
28439
|
-
rn: "@wix/wix-one-app-ecom-platform@1.27.2235 [wix-private/mobile-modules] src/storesAPI.ts:89"
|
|
28550
|
+
rn: "@wix/wix-one-app-ecom-platform@1.27.2235 [wix-private/mobile-modules] src/storesAPI.ts:89",
|
|
28551
|
+
view: {
|
|
28552
|
+
src: 125,
|
|
28553
|
+
endpoint: "gc-client-bm",
|
|
28554
|
+
evid: 4,
|
|
28555
|
+
fields: {
|
|
28556
|
+
pageName: "detailedView",
|
|
28557
|
+
giftCardId: "$route.id",
|
|
28558
|
+
providerAppDefId: "d80111c5-a0f4-47a8-b63a-65b54d774a27"
|
|
28559
|
+
}
|
|
28560
|
+
},
|
|
28561
|
+
viewRn: "giftCardPageLoadedInBm4: GiftCardSaleDetailsScreen.tsx:118; the record screen's id param is the sale record id"
|
|
28440
28562
|
},
|
|
28441
28563
|
himi_owner_lite_record_groups: {
|
|
28442
28564
|
screenName: "groups.screens.groupView",
|
|
@@ -28666,7 +28788,18 @@ var init_screen_map = __esm({
|
|
|
28666
28788
|
screenName: "chat.memberChatroomScreen",
|
|
28667
28789
|
module: "chat",
|
|
28668
28790
|
rn: "@wix/mobile-apps-inbox@1.0.2106 [wix-private/mobile-modules] src/module/deepLinks.ts:30",
|
|
28669
|
-
note: "Branded chat button invokes chat.openMemberToBusinessChatroom -> openMemberChatroomScreen (inbox src/external-api.ts:258) = chat.memberChatroomScreen; the member inbox list is chat.InboxForMember (branded-app stackNavigator.ts pushChatScreen)"
|
|
28791
|
+
note: "Branded chat button invokes chat.openMemberToBusinessChatroom -> openMemberChatroomScreen (inbox src/external-api.ts:258) = chat.memberChatroomScreen; the member inbox list is chat.InboxForMember (branded-app stackNavigator.ts pushChatScreen)",
|
|
28792
|
+
view: {
|
|
28793
|
+
src: 5,
|
|
28794
|
+
endpoint: "/",
|
|
28795
|
+
evid: 501,
|
|
28796
|
+
fields: {
|
|
28797
|
+
is_member: "true",
|
|
28798
|
+
chatRoomType: "member to business",
|
|
28799
|
+
origin: "native"
|
|
28800
|
+
}
|
|
28801
|
+
},
|
|
28802
|
+
viewRn: "@wix/mobile-apps-inbox@1.0.2106 [wix-private/mobile-modules] src/biLogger/biLogger.service.ts:358-364 logOpenConversation, from memberChatroomScreen.tsx:44-50 with MEMBER_TO_BUSINESS (memberChatroomScreen.presenter.ts:9-15); contact_id (RN: the Inbox instance id) and referral_info have no Himi source"
|
|
28670
28803
|
},
|
|
28671
28804
|
himi_business_contact: {
|
|
28672
28805
|
rn: null,
|
|
@@ -28676,7 +28809,14 @@ var init_screen_map = __esm({
|
|
|
28676
28809
|
screenName: "wix.ecomPlatform.Cart",
|
|
28677
28810
|
module: "wix",
|
|
28678
28811
|
rn: "@wix/wix-one-app-ecom-platform@1.27.2235 [wix-private/mobile-modules] src/storesAPI.ts:69",
|
|
28679
|
-
note: "ecom-platform"
|
|
28812
|
+
note: "ecom-platform",
|
|
28813
|
+
view: {
|
|
28814
|
+
src: 130,
|
|
28815
|
+
endpoint: "ec-site",
|
|
28816
|
+
evid: 124,
|
|
28817
|
+
fields: {}
|
|
28818
|
+
},
|
|
28819
|
+
viewRn: "cartLoaded: @wix/wix-one-app-ecom-platform@1.27.2235 dist/src/bi/storefront.js:290; screens/checkout/Cart.tsx:94; every RN field (cartId, cartType, itemsCount\u2026) is cart state (layer 4/5), so the view carries the event alone"
|
|
28680
28820
|
},
|
|
28681
28821
|
himi_chat_thread: {
|
|
28682
28822
|
screenName: "chat.memberChatroomScreen",
|
|
@@ -28685,13 +28825,15 @@ var init_screen_map = __esm({
|
|
|
28685
28825
|
note: "Member chatroom (mobile-apps-inbox src/navigation/identifiers.ts:2)",
|
|
28686
28826
|
view: {
|
|
28687
28827
|
src: 5,
|
|
28688
|
-
endpoint: "
|
|
28828
|
+
endpoint: "/",
|
|
28689
28829
|
evid: 501,
|
|
28690
28830
|
fields: {
|
|
28691
|
-
is_member: "true"
|
|
28831
|
+
is_member: "true",
|
|
28832
|
+
chatRoomType: "member to member",
|
|
28833
|
+
origin: "native"
|
|
28692
28834
|
}
|
|
28693
28835
|
},
|
|
28694
|
-
viewRn: "@wix/mobile-apps-inbox@1.0.2106 src/biLogger/biLogger.service.ts:358-365 logOpenConversation (endpoint
|
|
28836
|
+
viewRn: "@wix/mobile-apps-inbox@1.0.2106 [wix-private/mobile-modules] src/biLogger/biLogger.service.ts:358-365 logOpenConversation -> engageOpenConversation (crm-data v2, endpoint '': the frog root, not the legacy biSources 5:chat->engage, which logV2 never reads), from memberChatroomScreen.tsx:44-50; Himi routes the business room to himi_business_chat (_shared/inbox-rooms.ts), so this one is member to member; contact_id omitted: the Himi screen carries a member id, not a contact id"
|
|
28695
28837
|
},
|
|
28696
28838
|
himi_cms: {
|
|
28697
28839
|
rn: null,
|
|
@@ -28796,13 +28938,32 @@ var init_screen_map = __esm({
|
|
|
28796
28938
|
screenName: "forum.screens.Forum",
|
|
28797
28939
|
module: "forum",
|
|
28798
28940
|
rn: "@wix/wix-one-app-forum@1.5231.326 [wix-private/wix-one-app-forum] moduleJsons/module.admin.json:34 (registered component list)",
|
|
28799
|
-
note: "forum"
|
|
28941
|
+
note: "forum",
|
|
28942
|
+
view: {
|
|
28943
|
+
src: 69,
|
|
28944
|
+
endpoint: "forums-uou",
|
|
28945
|
+
evid: 501,
|
|
28946
|
+
fields: {
|
|
28947
|
+
origin: "oneapp_tab",
|
|
28948
|
+
main_display_type: "list_of_posts"
|
|
28949
|
+
}
|
|
28950
|
+
},
|
|
28951
|
+
viewRn: "MAIN_PAGE_OPENED: wix-private/wix-one-app-forum@7629a5a packages/wix-one-app-forum/src/sections/post-list/post-list.tsx:144 on the forum main page mount; instance_id and site_member_id have no Himi source, and a caller-passed origin is lost"
|
|
28800
28952
|
},
|
|
28801
28953
|
himi_forum_post: {
|
|
28802
28954
|
screenName: "forum.screens.PostScreenV2",
|
|
28803
28955
|
module: "forum",
|
|
28804
28956
|
rn: "@wix/wix-one-app-forum@1.5231.326 [wix-private/wix-one-app-forum] moduleJsons/module.admin.json:16 (registered component list)",
|
|
28805
|
-
note: "forum"
|
|
28957
|
+
note: "forum",
|
|
28958
|
+
view: {
|
|
28959
|
+
src: 69,
|
|
28960
|
+
endpoint: "forums-uou",
|
|
28961
|
+
evid: 517,
|
|
28962
|
+
fields: {
|
|
28963
|
+
post_id: "$route.id"
|
|
28964
|
+
}
|
|
28965
|
+
},
|
|
28966
|
+
viewRn: "POST_DRILL_IN_OPENED: wix-private/wix-one-app-forum@7629a5a packages/wix-one-app-forum/src/screens/post-view/post-with-new-comments/post-with-new-comments.tsx:82; post_slug, origin and posts_format have no route source"
|
|
28806
28967
|
},
|
|
28807
28968
|
himi_galleries: {
|
|
28808
28969
|
screenName: "progallery.screen.Galleries",
|
|
@@ -28840,9 +29001,32 @@ var init_screen_map = __esm({
|
|
|
28840
29001
|
screenName: "groups.screens.groupsList",
|
|
28841
29002
|
module: "groups",
|
|
28842
29003
|
rn: "@wix/mobile-apps-groups@2.859.0 [wix-private/mobile-apps-groups] moduleJsons/module.admin.json:65 (registered component list)",
|
|
28843
|
-
note: "groups"
|
|
29004
|
+
note: "groups",
|
|
29005
|
+
view: {
|
|
29006
|
+
src: 111,
|
|
29007
|
+
endpoint: "/",
|
|
29008
|
+
evid: 846,
|
|
29009
|
+
fields: {
|
|
29010
|
+
window_name: "group_list"
|
|
29011
|
+
}
|
|
29012
|
+
},
|
|
29013
|
+
viewRn: "groupsMobileAppWindowOpened (groups-data v2, endpoint ''): wix-private/mobile-apps-groups@2a9089b packages/mobile-apps-groups/src/features/group-list-with-search/screens/group-list-with-search/group-list-with-search.presenter.ts:61"
|
|
29014
|
+
},
|
|
29015
|
+
himi_inbox: {
|
|
29016
|
+
screenName: "chat.InboxForMember",
|
|
29017
|
+
module: "chat",
|
|
29018
|
+
rn: "branded-app stackNavigator.ts pushChatScreen (cited by the himi_business_chat entry above; not re-checked against the RN source)",
|
|
29019
|
+
note: "The member conversation list: the member inbox counterpart of chat.memberChatroomScreen",
|
|
29020
|
+
view: {
|
|
29021
|
+
src: 5,
|
|
29022
|
+
endpoint: "/",
|
|
29023
|
+
evid: 532,
|
|
29024
|
+
fields: {
|
|
29025
|
+
origin: "native"
|
|
29026
|
+
}
|
|
29027
|
+
},
|
|
29028
|
+
viewRn: "@wix/mobile-apps-inbox@1.0.2106 [wix-private/mobile-modules] src/biLogger/biLogger.service.ts:53-59 openChatTab -> engageTabClicked (endpoint ''); the member Inbox renders the same InboxScreen (src/navigation/Screens.ts:22-29 registers chat.InboxForMember on InboxContainer); fires on every view here, once per mount in RN"
|
|
28844
29029
|
},
|
|
28845
|
-
himi_inbox: { screenName: "chat.InboxForMember", module: "chat", rn: "branded-app stackNavigator.ts pushChatScreen (cited by the himi_business_chat entry above; not re-checked against the RN source)", note: "The member conversation list: the member inbox counterpart of chat.memberChatroomScreen" },
|
|
28846
29030
|
himi_invoice: {
|
|
28847
29031
|
screenName: "invoices.published-invoice",
|
|
28848
29032
|
module: "invoices",
|
|
@@ -28869,7 +29053,16 @@ var init_screen_map = __esm({
|
|
|
28869
29053
|
screenName: "membersArea.MemberProfileScreen",
|
|
28870
29054
|
module: "membersArea",
|
|
28871
29055
|
rn: "@wix/wix-one-app-members-area@1.30.803 [wix-private/wix-members-area-mobile] src/constants/component-ids.ts:40",
|
|
28872
|
-
note: "members-area"
|
|
29056
|
+
note: "members-area",
|
|
29057
|
+
view: {
|
|
29058
|
+
src: 67,
|
|
29059
|
+
endpoint: "oneapp",
|
|
29060
|
+
evid: 681,
|
|
29061
|
+
fields: {
|
|
29062
|
+
viewedMemberUuid: "$route.id"
|
|
29063
|
+
}
|
|
29064
|
+
},
|
|
29065
|
+
viewRn: "profilePageViewed (bi-logger-oneapp v2): wix-private/wix-members-area-mobile@0f72fc6 packages/wix-one-app-members-area/src/screens/profile/MemberProfileScreen.tsx:320-329; selfView is left out (it would be wrong on the member's own row), and contactId is host-stamped"
|
|
28873
29066
|
},
|
|
28874
29067
|
himi_member_programs: {
|
|
28875
29068
|
screenName: "wix-one-app-achievements.UserChallengesScreen",
|
|
@@ -28893,7 +29086,16 @@ var init_screen_map = __esm({
|
|
|
28893
29086
|
screenName: "restaurants.orders.DishScreen",
|
|
28894
29087
|
module: "restaurants",
|
|
28895
29088
|
rn: "@wix/wix-one-app-restaurants-member@1.13.713 [wix-private/wix-one-app-restaurants-member] moduleJsons/module.admin.json:7 (registered component list)",
|
|
28896
|
-
note: "restaurants-member"
|
|
29089
|
+
note: "restaurants-member",
|
|
29090
|
+
view: {
|
|
29091
|
+
src: 61,
|
|
29092
|
+
endpoint: "olo-members-view",
|
|
29093
|
+
evid: 902,
|
|
29094
|
+
fields: {
|
|
29095
|
+
dishId: "$route.id"
|
|
29096
|
+
}
|
|
29097
|
+
},
|
|
29098
|
+
viewRn: "openDishModal: @wix/wix-one-app-restaurants-member@1.13.713 src/screens/MenuScreen/useScreenHooks.ts:79 when a dish is opened from the menu; RN's origin (restaurants.orders.MenuScreen) is left out because Himi also opens a dish from Home; restaurantId, locationGuid and oloSessionId have no route source"
|
|
28897
29099
|
},
|
|
28898
29100
|
himi_my_events: {
|
|
28899
29101
|
screenName: "wix.events.MyEvents",
|
|
@@ -28935,13 +29137,33 @@ var init_screen_map = __esm({
|
|
|
28935
29137
|
screenName: "wix.ecomPlatform.MyOrder",
|
|
28936
29138
|
module: "wix",
|
|
28937
29139
|
rn: "@wix/wix-one-app-ecom-platform@1.27.2235 [wix-private/mobile-modules] src/storesAPI.ts:3",
|
|
28938
|
-
note: "ecom-platform member order"
|
|
29140
|
+
note: "ecom-platform member order",
|
|
29141
|
+
view: {
|
|
29142
|
+
src: 130,
|
|
29143
|
+
endpoint: "ec-site",
|
|
29144
|
+
evid: 212,
|
|
29145
|
+
fields: {
|
|
29146
|
+
pageName: "my_order",
|
|
29147
|
+
origin: "memberView"
|
|
29148
|
+
}
|
|
29149
|
+
},
|
|
29150
|
+
viewRn: "storeDataRendered: screens/MyOrder.tsx:94 (RN sends no order id)"
|
|
28939
29151
|
},
|
|
28940
29152
|
himi_orders: {
|
|
28941
29153
|
screenName: "wix.ecomPlatform.MyOrders",
|
|
28942
29154
|
module: "wix",
|
|
28943
29155
|
rn: "@wix/wix-one-app-ecom-platform@1.27.2235 [wix-private/mobile-modules] src/storesAPI.ts:4",
|
|
28944
|
-
note: "ecom-platform"
|
|
29156
|
+
note: "ecom-platform",
|
|
29157
|
+
view: {
|
|
29158
|
+
src: 130,
|
|
29159
|
+
endpoint: "ec-site",
|
|
29160
|
+
evid: 212,
|
|
29161
|
+
fields: {
|
|
29162
|
+
pageName: "my_orders",
|
|
29163
|
+
origin: "memberView"
|
|
29164
|
+
}
|
|
29165
|
+
},
|
|
29166
|
+
viewRn: "storeDataRendered: @wix/wix-one-app-ecom-platform@1.27.2235 dist/src/bi/storefront.js:182; screens/MyOrders.tsx:48 <- FrontOrderList.tsx:68"
|
|
28945
29167
|
},
|
|
28946
29168
|
himi_photo_album: {
|
|
28947
29169
|
screenName: "photoalbums.AlbumGallery",
|
|
@@ -29044,7 +29266,17 @@ var init_screen_map = __esm({
|
|
|
29044
29266
|
screenName: "wix.events.RegistrationForm",
|
|
29045
29267
|
module: "wix",
|
|
29046
29268
|
rn: "@wix/wix-one-events@1.53.1743 [wix-private/wix-one-events] src/screen-ids.js:30",
|
|
29047
|
-
note: "wix-one-events registration form"
|
|
29269
|
+
note: "wix-one-events registration form",
|
|
29270
|
+
view: {
|
|
29271
|
+
src: 68,
|
|
29272
|
+
endpoint: "events-users",
|
|
29273
|
+
evid: 268,
|
|
29274
|
+
fields: {
|
|
29275
|
+
event_id: "$route.id",
|
|
29276
|
+
target_page: "wix.events.RegistrationForm"
|
|
29277
|
+
}
|
|
29278
|
+
},
|
|
29279
|
+
viewRn: "screenOpened: wix-private/wix-one-events@7aa05d5 packages/wix-one-events/src/middlewares/bi/bi-events-map.ts:1140 <- components/hoc/provider/with-provider.tsx:21 on every Events screen mount; source_page and role are UI context"
|
|
29048
29280
|
},
|
|
29049
29281
|
himi_saved: {
|
|
29050
29282
|
rn: null,
|
|
@@ -29081,7 +29313,18 @@ var init_screen_map = __esm({
|
|
|
29081
29313
|
screenName: "wix.stores.MemberStoresFullScreen",
|
|
29082
29314
|
module: "wix",
|
|
29083
29315
|
rn: "@wix/wix-store-merchant-app@3.11212.3637 [wix-private/mobile-modules] src/storesAPI.ts:14",
|
|
29084
|
-
note: "Storefront full screen (store-merchant-app storesAPI.ts:14). Shop as a builder tab is wix.memberView.asScreen with wix.stores.MemberStoresScreen section"
|
|
29316
|
+
note: "Storefront full screen (store-merchant-app storesAPI.ts:14). Shop as a builder tab is wix.memberView.asScreen with wix.stores.MemberStoresScreen section",
|
|
29317
|
+
view: {
|
|
29318
|
+
src: 10,
|
|
29319
|
+
endpoint: "ec",
|
|
29320
|
+
evid: 212,
|
|
29321
|
+
fields: {
|
|
29322
|
+
pageName: "storeFront",
|
|
29323
|
+
origin: "memberView",
|
|
29324
|
+
previousPage: "memberView"
|
|
29325
|
+
}
|
|
29326
|
+
},
|
|
29327
|
+
viewRn: "storeDataRendered: @wix/wix-store-merchant-app@3.11212.3637 dist/src/features/front/bi/index.js:41; front/screens/MemberStoresScreen/MemberProductList.tsx:194; state, id and layoutSettings have no route source, and the empty variant (storeFrontEmpty) needs a worker signal"
|
|
29085
29328
|
},
|
|
29086
29329
|
himi_sign_in: {
|
|
29087
29330
|
screenName: "wix.branded.auth.LoginRoot",
|
|
@@ -29293,6 +29536,665 @@ var init_wix_api_rules = __esm({
|
|
|
29293
29536
|
rn: "bookingsSaveServiceX (@wix/bi-logger-bookings-data v2): bookings-mobile-catalog/src/adapters/api/services/update.ts:41-49, after the update request returns",
|
|
29294
29537
|
needs: [],
|
|
29295
29538
|
differs: "RN's image picker and visibility toggle reach the same update and send 'mobile_service_form' too; so does every update here."
|
|
29539
|
+
},
|
|
29540
|
+
{
|
|
29541
|
+
id: "chat.send-message",
|
|
29542
|
+
method: "POST",
|
|
29543
|
+
path: "/_api/chat-web/v2/chatrooms/:chatroomId/messages",
|
|
29544
|
+
src: 5,
|
|
29545
|
+
endpoint: "/",
|
|
29546
|
+
evid: 510,
|
|
29547
|
+
module: "chat",
|
|
29548
|
+
fields: {
|
|
29549
|
+
expand_mode: "false",
|
|
29550
|
+
is_demo: "false",
|
|
29551
|
+
origin: "native",
|
|
29552
|
+
msid: "$msid"
|
|
29553
|
+
},
|
|
29554
|
+
rn: "engageSendMessageClick (@wix/bi-logger-crm-data v2, endpoint ''): @wix/mobile-apps-inbox@1.0.2106 [wix-private/mobile-modules] src/biLogger/biLogger.service.ts:226-258 logSendMessage <- chatroom/basic-chatroom/services/chat-room-send-message.service.ts:7-24 <- toolbar/hooks/useSendMessages.ts:64; origin:'native' and msid from biLogger.utils.ts:7-13",
|
|
29555
|
+
needs: [
|
|
29556
|
+
"is_member",
|
|
29557
|
+
"contact_id",
|
|
29558
|
+
"chatRoomType",
|
|
29559
|
+
"textLength",
|
|
29560
|
+
"send_method_requested",
|
|
29561
|
+
"subjectLine",
|
|
29562
|
+
"attachment_type",
|
|
29563
|
+
"num_of_attachments",
|
|
29564
|
+
"activity_type",
|
|
29565
|
+
"appName",
|
|
29566
|
+
"app_instance_id"
|
|
29567
|
+
],
|
|
29568
|
+
differs: "RN sends it on the Send tap, before the network call, so a send that then fails still counts there; here only a message Wix stored is sent. RN's chat-room sends always carry is_member false, is_demo false and expand_mode false (chatroomToolbar.presenter.ts:67-77), so those are literals. Branded Lite's business chat posts a silent BUTTON_INTERACTION message to the same path when a Smart Chat button is tapped (_shared/business-chat-transport.ts sendButton), and a rule cannot tell it apart, so a button tap also sends 510 here. A member's typed message to the business goes through Smart Chat (/wix-assistant-widget/v1/messages/stream), not this path, so it is not covered (#4979). is_member is not sent: owners and Branded Lite members make the same call, so a literal would mislabel one of them."
|
|
29569
|
+
},
|
|
29570
|
+
{
|
|
29571
|
+
id: "chat.chatroom-archived",
|
|
29572
|
+
method: "PUT",
|
|
29573
|
+
path: "/_api/chat-web/v1/chatrooms/:chatroomId/archive",
|
|
29574
|
+
src: 5,
|
|
29575
|
+
endpoint: "/",
|
|
29576
|
+
evid: 518,
|
|
29577
|
+
module: "chat",
|
|
29578
|
+
fields: {
|
|
29579
|
+
action: "archive",
|
|
29580
|
+
origin: "native",
|
|
29581
|
+
msid: "$msid"
|
|
29582
|
+
},
|
|
29583
|
+
rn: "engageClickArchiveDelete (@wix/bi-logger-crm-data v2, endpoint ''): @wix/mobile-apps-inbox@1.0.2106 [wix-private/mobile-modules] src/biLogger/biLogger.service.ts:260-266 logArchiveConversation <- chatroom/business-chatroom/common.chatroom.actions.ts:78",
|
|
29584
|
+
needs: [
|
|
29585
|
+
"source",
|
|
29586
|
+
"contact_id",
|
|
29587
|
+
"app_instance_id"
|
|
29588
|
+
],
|
|
29589
|
+
differs: "RN logs as soon as the archive is triggered, without waiting for the server; here only an archive Wix accepted is sent. `source` (swipe, conversation, engage list, undo toast) is UI context; the owner inbox's only archive is a swipe today, but it is not a literal here."
|
|
29590
|
+
},
|
|
29591
|
+
{
|
|
29592
|
+
id: "chat.chatroom-unread",
|
|
29593
|
+
method: "PUT",
|
|
29594
|
+
path: "/_api/chat-web/v1/chatrooms/:chatroomId/unread",
|
|
29595
|
+
src: 5,
|
|
29596
|
+
endpoint: "/",
|
|
29597
|
+
evid: 518,
|
|
29598
|
+
module: "chat",
|
|
29599
|
+
fields: {
|
|
29600
|
+
action: "unread",
|
|
29601
|
+
origin: "native",
|
|
29602
|
+
msid: "$msid"
|
|
29603
|
+
},
|
|
29604
|
+
rn: "engageClickArchiveDelete (@wix/bi-logger-crm-data v2, endpoint ''): @wix/mobile-apps-inbox@1.0.2106 [wix-private/mobile-modules] src/biLogger/biLogger.service.ts:1114-1127 logUnreadConversation <- common.chatroom.actions.ts:148",
|
|
29605
|
+
needs: [
|
|
29606
|
+
"source",
|
|
29607
|
+
"app_instance_id"
|
|
29608
|
+
],
|
|
29609
|
+
differs: "RN logs it before the mark-unread call; here only a mark Wix accepted is sent. RN's explicit mark-as-read (action 'read') has no rule: Himi marks a room read automatically on open (PUT .../chatrooms/:chatroomId/users), which RN never logs."
|
|
29610
|
+
},
|
|
29611
|
+
{
|
|
29612
|
+
id: "stores.product-created-v1",
|
|
29613
|
+
method: "POST",
|
|
29614
|
+
path: "/stores/v1/products",
|
|
29615
|
+
src: 10,
|
|
29616
|
+
endpoint: "ec-sm",
|
|
29617
|
+
evid: 366,
|
|
29618
|
+
module: "stores",
|
|
29619
|
+
fields: {
|
|
29620
|
+
name: "$req.product.name",
|
|
29621
|
+
visibility: "$req.product.visible",
|
|
29622
|
+
productType: "$req.product.productType",
|
|
29623
|
+
isOwner: "true",
|
|
29624
|
+
msid: "$msid"
|
|
29625
|
+
},
|
|
29626
|
+
rn: "createProductClicked (10:ec-sm): @wix/wix-store-merchant-app@3.11212.3637 dist/src/features/product/bi/index.js:178; mobile-modules wix-store-merchant-app editProductActions.ts:541 (V1) / :634 (V3)",
|
|
29627
|
+
needs: [
|
|
29628
|
+
"storeId",
|
|
29629
|
+
"userId",
|
|
29630
|
+
"price_long",
|
|
29631
|
+
"useDescription",
|
|
29632
|
+
"numberOfImages",
|
|
29633
|
+
"sku",
|
|
29634
|
+
"type",
|
|
29635
|
+
"discount_long",
|
|
29636
|
+
"requireQuantity",
|
|
29637
|
+
"options",
|
|
29638
|
+
"weight_long",
|
|
29639
|
+
"customText",
|
|
29640
|
+
"manageVariance",
|
|
29641
|
+
"inventoryPolicy",
|
|
29642
|
+
"productTaxGroupId",
|
|
29643
|
+
"posVisibility",
|
|
29644
|
+
"ribbon",
|
|
29645
|
+
"numberOfInfoSection",
|
|
29646
|
+
"fulfillerType",
|
|
29647
|
+
"origin",
|
|
29648
|
+
"isDuplicate"
|
|
29649
|
+
],
|
|
29650
|
+
differs: "RN sends it on the Save tap, before the request, so a failed create still counts; here only a product Wix created is sent. The V3 body spells productType upper case (PHYSICAL). isOwner is a literal: RN sends business.isManager, and only a manager can write a product. RN's stores logger stamps storeId (the stores instance id) and userId too (utils/bi.js:38-46); neither is in the call."
|
|
29651
|
+
},
|
|
29652
|
+
{
|
|
29653
|
+
id: "stores.product-created-v3",
|
|
29654
|
+
method: "POST",
|
|
29655
|
+
path: "/stores/v3/products",
|
|
29656
|
+
src: 10,
|
|
29657
|
+
endpoint: "ec-sm",
|
|
29658
|
+
evid: 366,
|
|
29659
|
+
module: "stores",
|
|
29660
|
+
fields: {
|
|
29661
|
+
name: "$req.product.name",
|
|
29662
|
+
visibility: "$req.product.visible",
|
|
29663
|
+
productType: "$req.product.productType",
|
|
29664
|
+
isOwner: "true",
|
|
29665
|
+
msid: "$msid"
|
|
29666
|
+
},
|
|
29667
|
+
rn: "createProductClicked (10:ec-sm): @wix/wix-store-merchant-app@3.11212.3637 dist/src/features/product/bi/index.js:178; mobile-modules wix-store-merchant-app editProductActions.ts:541 (V1) / :634 (V3)",
|
|
29668
|
+
needs: [
|
|
29669
|
+
"storeId",
|
|
29670
|
+
"userId",
|
|
29671
|
+
"price_long",
|
|
29672
|
+
"useDescription",
|
|
29673
|
+
"numberOfImages",
|
|
29674
|
+
"sku",
|
|
29675
|
+
"type",
|
|
29676
|
+
"discount_long",
|
|
29677
|
+
"requireQuantity",
|
|
29678
|
+
"options",
|
|
29679
|
+
"weight_long",
|
|
29680
|
+
"customText",
|
|
29681
|
+
"manageVariance",
|
|
29682
|
+
"inventoryPolicy",
|
|
29683
|
+
"productTaxGroupId",
|
|
29684
|
+
"posVisibility",
|
|
29685
|
+
"ribbon",
|
|
29686
|
+
"numberOfInfoSection",
|
|
29687
|
+
"fulfillerType",
|
|
29688
|
+
"origin",
|
|
29689
|
+
"isDuplicate"
|
|
29690
|
+
],
|
|
29691
|
+
differs: "RN sends it on the Save tap, before the request, so a failed create still counts; here only a product Wix created is sent. The V3 body spells productType upper case (PHYSICAL). isOwner is a literal: RN sends business.isManager, and only a manager can write a product. RN's stores logger stamps storeId (the stores instance id) and userId too (utils/bi.js:38-46); neither is in the call."
|
|
29692
|
+
},
|
|
29693
|
+
{
|
|
29694
|
+
id: "stores.product-updated-v1",
|
|
29695
|
+
method: "PATCH",
|
|
29696
|
+
path: "/stores/v1/products/:productId",
|
|
29697
|
+
src: 10,
|
|
29698
|
+
endpoint: "ec-sm",
|
|
29699
|
+
evid: 367,
|
|
29700
|
+
module: "stores",
|
|
29701
|
+
fields: {
|
|
29702
|
+
id: "$path.productId",
|
|
29703
|
+
name: "$req.product.name",
|
|
29704
|
+
visibility: "$req.product.visible",
|
|
29705
|
+
isOwner: "true",
|
|
29706
|
+
msid: "$msid"
|
|
29707
|
+
},
|
|
29708
|
+
rn: "updateProductClicked (10:ec-sm): @wix/wix-store-merchant-app@3.11212.3637 dist/src/features/product/bi/index.js:176; editProductActions.ts:543 (V1) / :638 (V3)",
|
|
29709
|
+
needs: [
|
|
29710
|
+
"storeId",
|
|
29711
|
+
"userId",
|
|
29712
|
+
"price_long",
|
|
29713
|
+
"useDescription",
|
|
29714
|
+
"numberOfImages",
|
|
29715
|
+
"sku",
|
|
29716
|
+
"type",
|
|
29717
|
+
"discount_long",
|
|
29718
|
+
"requireQuantity",
|
|
29719
|
+
"options",
|
|
29720
|
+
"weight_long",
|
|
29721
|
+
"customText",
|
|
29722
|
+
"manageVariance",
|
|
29723
|
+
"inventoryPolicy",
|
|
29724
|
+
"productTaxGroupId",
|
|
29725
|
+
"posVisibility",
|
|
29726
|
+
"ribbon",
|
|
29727
|
+
"numberOfInfoSection",
|
|
29728
|
+
"fulfillerType",
|
|
29729
|
+
"origin"
|
|
29730
|
+
],
|
|
29731
|
+
differs: "RN sends it on the Save tap, before the request. Every product PATCH sends it here, including the detail screen's and Ask's show/hide toggle, which saves at once: RN's toggle is local state saved by the same Save that sends 367, and its own 10:299 tap is an action-map event (#4979). The V3 save first GETs the same path, which does not match. isOwner is a literal: RN sends business.isManager, and only a manager can write a product. RN's stores logger stamps storeId (the stores instance id) and userId too (utils/bi.js:38-46); neither is in the call."
|
|
29732
|
+
},
|
|
29733
|
+
{
|
|
29734
|
+
id: "stores.product-updated-v3",
|
|
29735
|
+
method: "PATCH",
|
|
29736
|
+
path: "/stores/v3/products/:productId",
|
|
29737
|
+
src: 10,
|
|
29738
|
+
endpoint: "ec-sm",
|
|
29739
|
+
evid: 367,
|
|
29740
|
+
module: "stores",
|
|
29741
|
+
fields: {
|
|
29742
|
+
id: "$path.productId",
|
|
29743
|
+
name: "$req.product.name",
|
|
29744
|
+
visibility: "$req.product.visible",
|
|
29745
|
+
isOwner: "true",
|
|
29746
|
+
msid: "$msid"
|
|
29747
|
+
},
|
|
29748
|
+
rn: "updateProductClicked (10:ec-sm): @wix/wix-store-merchant-app@3.11212.3637 dist/src/features/product/bi/index.js:176; editProductActions.ts:543 (V1) / :638 (V3)",
|
|
29749
|
+
needs: [
|
|
29750
|
+
"storeId",
|
|
29751
|
+
"userId",
|
|
29752
|
+
"price_long",
|
|
29753
|
+
"useDescription",
|
|
29754
|
+
"numberOfImages",
|
|
29755
|
+
"sku",
|
|
29756
|
+
"type",
|
|
29757
|
+
"discount_long",
|
|
29758
|
+
"requireQuantity",
|
|
29759
|
+
"options",
|
|
29760
|
+
"weight_long",
|
|
29761
|
+
"customText",
|
|
29762
|
+
"manageVariance",
|
|
29763
|
+
"inventoryPolicy",
|
|
29764
|
+
"productTaxGroupId",
|
|
29765
|
+
"posVisibility",
|
|
29766
|
+
"ribbon",
|
|
29767
|
+
"numberOfInfoSection",
|
|
29768
|
+
"fulfillerType",
|
|
29769
|
+
"origin"
|
|
29770
|
+
],
|
|
29771
|
+
differs: "RN sends it on the Save tap, before the request. Every product PATCH sends it here, including the detail screen's and Ask's show/hide toggle, which saves at once: RN's toggle is local state saved by the same Save that sends 367, and its own 10:299 tap is an action-map event (#4979). The V3 save first GETs the same path, which does not match. isOwner is a literal: RN sends business.isManager, and only a manager can write a product. RN's stores logger stamps storeId (the stores instance id) and userId too (utils/bi.js:38-46); neither is in the call."
|
|
29772
|
+
},
|
|
29773
|
+
{
|
|
29774
|
+
id: "stores.product-deleted-v1",
|
|
29775
|
+
method: "DELETE",
|
|
29776
|
+
path: "/stores/v1/products/:productId",
|
|
29777
|
+
src: 10,
|
|
29778
|
+
endpoint: "ec-sm",
|
|
29779
|
+
evid: 528,
|
|
29780
|
+
module: "stores",
|
|
29781
|
+
fields: {
|
|
29782
|
+
productId: "$path.productId",
|
|
29783
|
+
isOwner: "true",
|
|
29784
|
+
msid: "$msid"
|
|
29785
|
+
},
|
|
29786
|
+
rn: "deleteProductClicked (10:ec-sm): @wix/wix-store-merchant-app@3.11212.3637 dist/src/features/product/bi/index.js:290; ProductScreen.tsx:1043, home/containers/Products/ProductList.js:94",
|
|
29787
|
+
needs: [
|
|
29788
|
+
"origin",
|
|
29789
|
+
"storeId",
|
|
29790
|
+
"userId"
|
|
29791
|
+
],
|
|
29792
|
+
differs: "RN sends it on the Delete tap, before the confirm alert, so a cancelled delete still counts; here only a delete Wix accepted is sent, Ask's included. isOwner is a literal: RN sends business.isManager, and only a manager can write a product."
|
|
29793
|
+
},
|
|
29794
|
+
{
|
|
29795
|
+
id: "stores.product-deleted-v3",
|
|
29796
|
+
method: "DELETE",
|
|
29797
|
+
path: "/stores/v3/products/:productId",
|
|
29798
|
+
src: 10,
|
|
29799
|
+
endpoint: "ec-sm",
|
|
29800
|
+
evid: 528,
|
|
29801
|
+
module: "stores",
|
|
29802
|
+
fields: {
|
|
29803
|
+
productId: "$path.productId",
|
|
29804
|
+
isOwner: "true",
|
|
29805
|
+
msid: "$msid"
|
|
29806
|
+
},
|
|
29807
|
+
rn: "deleteProductClicked (10:ec-sm): @wix/wix-store-merchant-app@3.11212.3637 dist/src/features/product/bi/index.js:290; ProductScreen.tsx:1043, home/containers/Products/ProductList.js:94",
|
|
29808
|
+
needs: [
|
|
29809
|
+
"origin",
|
|
29810
|
+
"storeId",
|
|
29811
|
+
"userId"
|
|
29812
|
+
],
|
|
29813
|
+
differs: "RN sends it on the Delete tap, before the confirm alert, so a cancelled delete still counts; here only a delete Wix accepted is sent, Ask's included. isOwner is a literal: RN sends business.isManager, and only a manager can write a product."
|
|
29814
|
+
},
|
|
29815
|
+
{
|
|
29816
|
+
id: "stores.add-to-cart",
|
|
29817
|
+
method: "POST",
|
|
29818
|
+
path: "/ecom/v1/carts/current/add-to-cart",
|
|
29819
|
+
src: 10,
|
|
29820
|
+
endpoint: "ec-sf",
|
|
29821
|
+
evid: 63,
|
|
29822
|
+
module: "stores",
|
|
29823
|
+
fields: {
|
|
29824
|
+
productId: "$req.lineItems.0.catalogReference.catalogItemId",
|
|
29825
|
+
quantity: "$req.lineItems.0.quantity",
|
|
29826
|
+
origin: "OA StoreFront",
|
|
29827
|
+
msid: "$msid"
|
|
29828
|
+
},
|
|
29829
|
+
rn: "addToCartClicked (10:ec-sf): @wix/wix-store-merchant-app@3.11212.3637 dist/src/features/front/bi/index.js:62; front/screens/ProductViewScreen.tsx:695",
|
|
29830
|
+
needs: [
|
|
29831
|
+
"productType",
|
|
29832
|
+
"hasOptions",
|
|
29833
|
+
"options",
|
|
29834
|
+
"buttonType",
|
|
29835
|
+
"storeId",
|
|
29836
|
+
"isOwner"
|
|
29837
|
+
],
|
|
29838
|
+
differs: "RN sends it on the tap, before option validation and the add, so a failed add still counts; here only an add Wix accepted is sent. Re-ordering a past order (himi-branded-lite-order) posts here too, once per line, and is sent with the storefront origin; RN's re-order sends no 63. Only the first line is read."
|
|
29839
|
+
},
|
|
29840
|
+
{
|
|
29841
|
+
id: "ecom.cart-line-removed",
|
|
29842
|
+
method: "POST",
|
|
29843
|
+
path: "/ecom/v1/carts/current/remove-line-items",
|
|
29844
|
+
src: 130,
|
|
29845
|
+
endpoint: "ec-site",
|
|
29846
|
+
evid: 115,
|
|
29847
|
+
module: "ecom",
|
|
29848
|
+
fields: {
|
|
29849
|
+
productId: "$req.lineItemIds.0",
|
|
29850
|
+
cartId: "$res.cart.id",
|
|
29851
|
+
origin: "OA StoreFront",
|
|
29852
|
+
msid: "$msid"
|
|
29853
|
+
},
|
|
29854
|
+
rn: "cartProductRemoved (130:ec-site): @wix/wix-one-app-ecom-platform@1.27.2235 dist/src/bi/storefront.js:257; actions/cartActions.js:177, after removeCartItems resolves",
|
|
29855
|
+
needs: [
|
|
29856
|
+
"productType",
|
|
29857
|
+
"itemsCount",
|
|
29858
|
+
"catalogAppId",
|
|
29859
|
+
"checkoutId"
|
|
29860
|
+
],
|
|
29861
|
+
differs: "None in timing: RN also sends it after the removal resolves. RN's productId is the cart line id, as here. Only the first removed line is read. cartBasic (cartId, catalogAppId, origin) is RN's shared cart block (bi/storefront.js)."
|
|
29862
|
+
},
|
|
29863
|
+
{
|
|
29864
|
+
id: "ecom.cart-quantity-changed",
|
|
29865
|
+
method: "POST",
|
|
29866
|
+
path: "/ecom/v1/carts/:cartId/update-line-items-quantity",
|
|
29867
|
+
src: 130,
|
|
29868
|
+
endpoint: "ec-site",
|
|
29869
|
+
evid: 116,
|
|
29870
|
+
module: "ecom",
|
|
29871
|
+
fields: {
|
|
29872
|
+
cartId: "$path.cartId",
|
|
29873
|
+
productId: "$req.lineItems.0.id",
|
|
29874
|
+
itemsCount: "$req.lineItems.0.quantity",
|
|
29875
|
+
origin: "OA StoreFront",
|
|
29876
|
+
msid: "$msid"
|
|
29877
|
+
},
|
|
29878
|
+
rn: "cartQuantityChanged (130:ec-site): @wix/wix-one-app-ecom-platform@1.27.2235 dist/src/bi/storefront.js:261; actions/cartActions.js:281, after updateCartItems resolves",
|
|
29879
|
+
needs: [
|
|
29880
|
+
"catalogAppId",
|
|
29881
|
+
"cartType",
|
|
29882
|
+
"checkoutId"
|
|
29883
|
+
],
|
|
29884
|
+
differs: "None in timing: RN also sends it after the update resolves. Only the first line is read."
|
|
29885
|
+
},
|
|
29886
|
+
{
|
|
29887
|
+
id: "ecom.coupon-applied",
|
|
29888
|
+
method: "POST",
|
|
29889
|
+
path: "/ecom/v2/carts/current/add-coupon",
|
|
29890
|
+
src: 130,
|
|
29891
|
+
endpoint: "ec-site",
|
|
29892
|
+
evid: 119,
|
|
29893
|
+
module: "ecom",
|
|
29894
|
+
fields: {
|
|
29895
|
+
couponCode: "$req.coupon.code",
|
|
29896
|
+
cartId: "$res.cart.id",
|
|
29897
|
+
origin: "checkout",
|
|
29898
|
+
msid: "$msid"
|
|
29899
|
+
},
|
|
29900
|
+
rn: "couponApplied (130:ec-site): @wix/wix-one-app-ecom-platform@1.27.2235 dist/src/bi/storefront.js:277; actions/cartActions.js:315, checkoutActions.js:375",
|
|
29901
|
+
needs: [
|
|
29902
|
+
"couponId",
|
|
29903
|
+
"total_long",
|
|
29904
|
+
"catalogAppId",
|
|
29905
|
+
"checkoutId",
|
|
29906
|
+
"isMember"
|
|
29907
|
+
],
|
|
29908
|
+
differs: "RN sends it only when the answer carries a coupon id; here any 2xx sends it. couponId is not read: the coupon is not always the first applied discount."
|
|
29909
|
+
},
|
|
29910
|
+
{
|
|
29911
|
+
id: "ecom.coupon-removed",
|
|
29912
|
+
method: "POST",
|
|
29913
|
+
path: "/ecom/v2/carts/current/remove-coupon",
|
|
29914
|
+
src: 130,
|
|
29915
|
+
endpoint: "ec-site",
|
|
29916
|
+
evid: 118,
|
|
29917
|
+
module: "ecom",
|
|
29918
|
+
fields: {
|
|
29919
|
+
couponId: "$req.couponId",
|
|
29920
|
+
cartId: "$res.cart.id",
|
|
29921
|
+
origin: "checkout",
|
|
29922
|
+
msid: "$msid"
|
|
29923
|
+
},
|
|
29924
|
+
rn: "couponRemoved (130:ec-site): @wix/wix-one-app-ecom-platform@1.27.2235 dist/src/bi/storefront.js:271; actions/cartActions.js:349, checkoutActions.js:409",
|
|
29925
|
+
needs: [
|
|
29926
|
+
"couponCode",
|
|
29927
|
+
"checkoutId",
|
|
29928
|
+
"isMember"
|
|
29929
|
+
],
|
|
29930
|
+
differs: "None in timing: RN also sends it after the removal resolves."
|
|
29931
|
+
},
|
|
29932
|
+
{
|
|
29933
|
+
id: "ecom.checkout-created",
|
|
29934
|
+
method: "POST",
|
|
29935
|
+
path: "/ecom/v1/carts/current/create-checkout",
|
|
29936
|
+
src: 130,
|
|
29937
|
+
endpoint: "ec-site",
|
|
29938
|
+
evid: 114,
|
|
29939
|
+
module: "ecom",
|
|
29940
|
+
fields: {
|
|
29941
|
+
checkoutId: "$res.checkoutId",
|
|
29942
|
+
origin: "OA StoreFront",
|
|
29943
|
+
msid: "$msid"
|
|
29944
|
+
},
|
|
29945
|
+
rn: "checkoutClicked (130:ec-site): @wix/wix-one-app-ecom-platform@1.27.2235 dist/src/bi/storefront.js:255; hooks/useCartContainer.js:225 (onComplete), before login and createCheckoutFromCart",
|
|
29946
|
+
needs: [
|
|
29947
|
+
"cartId",
|
|
29948
|
+
"catalogAppId",
|
|
29949
|
+
"cartType",
|
|
29950
|
+
"itemsCount",
|
|
29951
|
+
"productsList",
|
|
29952
|
+
"validationMessage"
|
|
29953
|
+
],
|
|
29954
|
+
differs: "RN sends it on the checkout tap, before login and the checkout is created, so a failed one still counts; here only a checkout Wix created is sent. RN's checkoutId at tap time is the previous checkout, if any; here it is the new one."
|
|
29955
|
+
},
|
|
29956
|
+
{
|
|
29957
|
+
id: "events.ticket-reservation-created",
|
|
29958
|
+
method: "POST",
|
|
29959
|
+
path: "/events/v1/checkout/reservations",
|
|
29960
|
+
src: 68,
|
|
29961
|
+
endpoint: "events-users",
|
|
29962
|
+
evid: 181,
|
|
29963
|
+
module: "events",
|
|
29964
|
+
fields: {
|
|
29965
|
+
event_id: "$req.eventId",
|
|
29966
|
+
msid: "$msid"
|
|
29967
|
+
},
|
|
29968
|
+
rn: "createReservation.fulfilled (68:events-users): wix-private/wix-one-events@7aa05d5 packages/wix-one-events/src/middlewares/bi/bi-events-map.ts:765 <- components/tickets-picker/tickets-picker.tsx:196 -> actions/checkout.ts:85, after the reservation API returns",
|
|
29969
|
+
needs: [
|
|
29970
|
+
"origin",
|
|
29971
|
+
"ticket_count",
|
|
29972
|
+
"nonfree_ticket_count",
|
|
29973
|
+
"instance_id",
|
|
29974
|
+
"staff_member_id"
|
|
29975
|
+
],
|
|
29976
|
+
differs: "None in timing: RN also sends it after the hold is created. ticket_count and nonfree_ticket_count are sums over the ticket quantities, which a field reference cannot compute. RN first cancels a previous hold (checkout.ts:73-83); Himi does not. RN's events middleware adds instance_id (the Events app instance) and staff_member_id to every event (middlewares/bi/data.ts:37-41); neither is in the call."
|
|
29977
|
+
},
|
|
29978
|
+
{
|
|
29979
|
+
id: "events.ticket-checkout",
|
|
29980
|
+
method: "POST",
|
|
29981
|
+
path: "/events/v1/checkout",
|
|
29982
|
+
src: 68,
|
|
29983
|
+
endpoint: "events-users",
|
|
29984
|
+
evid: 63,
|
|
29985
|
+
module: "events",
|
|
29986
|
+
fields: {
|
|
29987
|
+
event_id: "$req.eventId",
|
|
29988
|
+
msid: "$msid"
|
|
29989
|
+
},
|
|
29990
|
+
rn: "ticketFormSubmitClicked (68:events-users): wix-private/wix-one-events@7aa05d5 packages/wix-one-events/src/middlewares/bi/bi-events-map.ts:345 <- components/checkout/checkout-form.tsx:122,163, on the form submit just before checkout() posts /checkout",
|
|
29991
|
+
needs: [
|
|
29992
|
+
"instance_id",
|
|
29993
|
+
"staff_member_id"
|
|
29994
|
+
],
|
|
29995
|
+
differs: "RN sends it on the checkout form's submit, before the call, so a failed checkout still counts; here only a checkout Wix accepted is sent. Himi has no buyer form: it checks out right after the hold, and a hosted-checkout ticket order makes no call and sends nothing. RN's events middleware adds instance_id (the Events app instance) and staff_member_id to every event (middlewares/bi/data.ts:37-41); neither is in the call."
|
|
29996
|
+
},
|
|
29997
|
+
{
|
|
29998
|
+
id: "events.event-updated",
|
|
29999
|
+
method: "PATCH",
|
|
30000
|
+
path: "/events/v3/events/:eventId",
|
|
30001
|
+
src: 68,
|
|
30002
|
+
endpoint: "events-users",
|
|
30003
|
+
evid: 104,
|
|
30004
|
+
module: "events",
|
|
30005
|
+
fields: {
|
|
30006
|
+
event_id: "$path.eventId",
|
|
30007
|
+
event_name: "$res.event.title",
|
|
30008
|
+
event_timezone: "$res.event.dateAndTimeSettings.timeZoneId",
|
|
30009
|
+
action: "save",
|
|
30010
|
+
create_event_button: "MOBILE_BO",
|
|
30011
|
+
is_first_event_save: "false",
|
|
30012
|
+
msid: "$msid"
|
|
30013
|
+
},
|
|
30014
|
+
rn: "updateEvent.fulfilled (68:events-users): wix-private/wix-one-events@7aa05d5 packages/wix-one-events/src/middlewares/bi/bi-events-map.ts:484, fields from middlewares/bi/data.ts:43-110, after the update API returns",
|
|
30015
|
+
needs: [
|
|
30016
|
+
"draft_event",
|
|
30017
|
+
"with_image",
|
|
30018
|
+
"has_tickets",
|
|
30019
|
+
"is_location_tbd",
|
|
30020
|
+
"event_location_type",
|
|
30021
|
+
"splitscreen_event_type",
|
|
30022
|
+
"event_occurrence_type",
|
|
30023
|
+
"recurrence_category_id",
|
|
30024
|
+
"occurrences_count",
|
|
30025
|
+
"is_time_tbd",
|
|
30026
|
+
"event_start_date",
|
|
30027
|
+
"event_finish_date",
|
|
30028
|
+
"display_timezone",
|
|
30029
|
+
"added_categories",
|
|
30030
|
+
"removed_categories",
|
|
30031
|
+
"video_conference_connected",
|
|
30032
|
+
"video_conference_type",
|
|
30033
|
+
"video_conferencing_provider",
|
|
30034
|
+
"include_link_in_reminder",
|
|
30035
|
+
"include_link_in_confirmation",
|
|
30036
|
+
"instance_id",
|
|
30037
|
+
"staff_member_id"
|
|
30038
|
+
],
|
|
30039
|
+
differs: "None in timing: RN also sends it after the update returns. RN computes its booleans and epoch-ms dates from the event, which a field reference cannot; event_location_type is left out until v3's location.type spelling is checked against RN's LocationType. Himi's form edits only the title and description."
|
|
30040
|
+
},
|
|
30041
|
+
{
|
|
30042
|
+
id: "forum.post-reacted",
|
|
30043
|
+
method: "PUT",
|
|
30044
|
+
path: "/forum/v1/posts/:postId/react",
|
|
30045
|
+
src: 69,
|
|
30046
|
+
endpoint: "forums-uou",
|
|
30047
|
+
evid: 521,
|
|
30048
|
+
module: "forum",
|
|
30049
|
+
fields: {
|
|
30050
|
+
post_id: "$path.postId",
|
|
30051
|
+
type: "post",
|
|
30052
|
+
flag: 1,
|
|
30053
|
+
reaction_type: "$req.reactionCode",
|
|
30054
|
+
msid: "$msid"
|
|
30055
|
+
},
|
|
30056
|
+
rn: "REACTION_CLICK flag 1 (69:forums-uou): wix-private/wix-one-app-forum@7629a5a packages/wix-one-app-forum/src/reducers/feed/actions.ts:295",
|
|
30057
|
+
needs: [
|
|
30058
|
+
"origin",
|
|
30059
|
+
"instance_id",
|
|
30060
|
+
"site_member_id"
|
|
30061
|
+
],
|
|
30062
|
+
differs: "RN sends it on the tap, before the API, so a failed reaction still counts; here only a reaction Wix accepted is sent. Himi only likes (':like:'). RN's forum logger adds instance_id and site_member_id to every event (services/bi-logger.ts:16-38)."
|
|
30063
|
+
},
|
|
30064
|
+
{
|
|
30065
|
+
id: "forum.post-unreacted",
|
|
30066
|
+
method: "DELETE",
|
|
30067
|
+
path: "/forum/v1/posts/:postId/react",
|
|
30068
|
+
src: 69,
|
|
30069
|
+
endpoint: "forums-uou",
|
|
30070
|
+
evid: 521,
|
|
30071
|
+
module: "forum",
|
|
30072
|
+
fields: {
|
|
30073
|
+
post_id: "$path.postId",
|
|
30074
|
+
type: "post",
|
|
30075
|
+
flag: 0,
|
|
30076
|
+
msid: "$msid"
|
|
30077
|
+
},
|
|
30078
|
+
rn: "REACTION_CLICK flag 0 (69:forums-uou): wix-private/wix-one-app-forum@7629a5a packages/wix-one-app-forum/src/reducers/feed/actions.ts:292",
|
|
30079
|
+
needs: [
|
|
30080
|
+
"origin",
|
|
30081
|
+
"reaction_type",
|
|
30082
|
+
"instance_id",
|
|
30083
|
+
"site_member_id"
|
|
30084
|
+
],
|
|
30085
|
+
differs: "RN sends it on the tap, before the API; here only a removal Wix accepted is sent. reaction_type is not read: it rides a DELETE body, which not every transport hands the rule."
|
|
30086
|
+
},
|
|
30087
|
+
{
|
|
30088
|
+
id: "groups.group-joined",
|
|
30089
|
+
method: "POST",
|
|
30090
|
+
path: "/social-groups/v2/groups/:groupId/join",
|
|
30091
|
+
src: 111,
|
|
30092
|
+
endpoint: "/",
|
|
30093
|
+
evid: 845,
|
|
30094
|
+
module: "groups",
|
|
30095
|
+
fields: {
|
|
30096
|
+
description: "join_group",
|
|
30097
|
+
group_id: "$path.groupId",
|
|
30098
|
+
msid: "$msid"
|
|
30099
|
+
},
|
|
30100
|
+
rn: "groupsMobileAppClickOnButton join_group (@wix/bi-logger-groups-data v2, endpoint ''): wix-private/mobile-apps-groups@2a9089b packages/mobile-apps-groups/src/features/change-group-membership-status/methods/join-group.method.ts:47, on the join modal's confirm, before joinGroupRequest",
|
|
30101
|
+
needs: [
|
|
30102
|
+
"origin"
|
|
30103
|
+
],
|
|
30104
|
+
differs: "RN sends it on the confirm tap, before the call, so a failed join still counts; here only a join Wix accepted is sent. Himi has no confirm modal and joins public groups only."
|
|
30105
|
+
},
|
|
30106
|
+
{
|
|
30107
|
+
id: "groups.group-left",
|
|
30108
|
+
method: "POST",
|
|
30109
|
+
path: "/social-groups/v2/groups/:groupId/leave",
|
|
30110
|
+
src: 111,
|
|
30111
|
+
endpoint: "/",
|
|
30112
|
+
evid: 845,
|
|
30113
|
+
module: "groups",
|
|
30114
|
+
fields: {
|
|
30115
|
+
description: "leave_group",
|
|
30116
|
+
group_id: "$path.groupId",
|
|
30117
|
+
msid: "$msid"
|
|
30118
|
+
},
|
|
30119
|
+
rn: "groupsMobileAppClickOnButton leave_group (groups-data v2, endpoint ''): wix-private/mobile-apps-groups@2a9089b packages/mobile-apps-groups/src/features/group-view/hooks/use-settings-action-sheet-options.ts:84-95, after leaveGroup returns",
|
|
30120
|
+
needs: [
|
|
30121
|
+
"origin"
|
|
30122
|
+
],
|
|
30123
|
+
differs: "None in timing: RN also sends it after the leave succeeds. RN's member-side origin is member_action_sheet, which is UI context."
|
|
30124
|
+
},
|
|
30125
|
+
{
|
|
30126
|
+
id: "members.member-followed",
|
|
30127
|
+
method: "POST",
|
|
30128
|
+
path: "/members/v3/followers/:memberId",
|
|
30129
|
+
src: 67,
|
|
30130
|
+
endpoint: "oneapp",
|
|
30131
|
+
evid: 685,
|
|
30132
|
+
module: "members",
|
|
30133
|
+
fields: {
|
|
30134
|
+
followStatus: "follow",
|
|
30135
|
+
viewedMemberUuid: "$path.memberId",
|
|
30136
|
+
instance_id: "$msid",
|
|
30137
|
+
platform: "oneApp",
|
|
30138
|
+
msid: "$msid"
|
|
30139
|
+
},
|
|
30140
|
+
rn: "followClicked (@wix/bi-logger-oneapp v2): wix-private/wix-members-area-mobile@0f72fc6 packages/wix-one-app-members-area/src/services/store/members/actions.ts:186-190, logged as the un-awaited follow request starts (:164-168)",
|
|
30141
|
+
needs: [
|
|
30142
|
+
"origin",
|
|
30143
|
+
"is_social",
|
|
30144
|
+
"site_member_id",
|
|
30145
|
+
"app_id"
|
|
30146
|
+
],
|
|
30147
|
+
differs: "RN logs it as soon as the request starts, so a failed follow still counts; here only a follow Wix accepted is sent. RN's members-area params set instance_id to the msid and platform to oneApp (services/bi/bi-events.ts:84-92); its app_id (membersArea) is a worker pipeline key here, so it is not sent."
|
|
30148
|
+
},
|
|
30149
|
+
{
|
|
30150
|
+
id: "members.member-unfollowed",
|
|
30151
|
+
method: "DELETE",
|
|
30152
|
+
path: "/members/v3/followers/:memberId",
|
|
30153
|
+
src: 67,
|
|
30154
|
+
endpoint: "oneapp",
|
|
30155
|
+
evid: 685,
|
|
30156
|
+
module: "members",
|
|
30157
|
+
fields: {
|
|
30158
|
+
followStatus: "unfollow",
|
|
30159
|
+
viewedMemberUuid: "$path.memberId",
|
|
30160
|
+
instance_id: "$msid",
|
|
30161
|
+
platform: "oneApp",
|
|
30162
|
+
msid: "$msid"
|
|
30163
|
+
},
|
|
30164
|
+
rn: "followClicked unfollow (@wix/bi-logger-oneapp v2): wix-private/wix-members-area-mobile@0f72fc6 packages/wix-one-app-members-area/src/services/store/members/actions.ts:186-190",
|
|
30165
|
+
needs: [
|
|
30166
|
+
"origin",
|
|
30167
|
+
"is_social",
|
|
30168
|
+
"site_member_id",
|
|
30169
|
+
"app_id"
|
|
30170
|
+
],
|
|
30171
|
+
differs: "As members.member-followed: RN logs as the request starts; here only an unfollow Wix accepted is sent."
|
|
30172
|
+
},
|
|
30173
|
+
{
|
|
30174
|
+
id: "restaurants.dish-added",
|
|
30175
|
+
method: "POST",
|
|
30176
|
+
path: "/ecom/v2/carts/current/add-line-items",
|
|
30177
|
+
src: 61,
|
|
30178
|
+
endpoint: "olo-members-view",
|
|
30179
|
+
evid: 904,
|
|
30180
|
+
module: "restaurants",
|
|
30181
|
+
fields: {
|
|
30182
|
+
dishId: "$req.catalogItems.0.catalogReference.catalogItemId",
|
|
30183
|
+
quantity: "$req.catalogItems.0.quantity",
|
|
30184
|
+
type: "click",
|
|
30185
|
+
msid: "$msid"
|
|
30186
|
+
},
|
|
30187
|
+
rn: "addToCart (@wix/bi-logger-olo-members-view): @wix/wix-one-app-restaurants-member@1.13.713 src/screens/DishScreen/useHooks.ts:118 (type click), screens/MenuScreen/useScreenHooks.ts:93 (type swipe)",
|
|
30188
|
+
needs: [
|
|
30189
|
+
"restaurantId",
|
|
30190
|
+
"locationGuid",
|
|
30191
|
+
"oloSessionId",
|
|
30192
|
+
"instanceId",
|
|
30193
|
+
"fee_type",
|
|
30194
|
+
"fee_id",
|
|
30195
|
+
"fee_count"
|
|
30196
|
+
],
|
|
30197
|
+
differs: "RN adds to its own local cart; Himi adds to the Wix eCom cart, and only from the dish screen, so type is the literal click. Wix can answer 200 and drop an item it refuses, which still sends 904 here. Only restaurant screens call this cart v2 path among the lite apps. RN's restaurants logger adds restaurantId, locationGuid, oloSessionId and msid to every event (services/biLogger/utils.ts getDefaultBiParams); Himi has no source for the first three."
|
|
29296
30198
|
}
|
|
29297
30199
|
]
|
|
29298
30200
|
};
|
|
@@ -30006,7 +30908,6 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
30006
30908
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
30007
30909
|
var init_idiom = __esm({
|
|
30008
30910
|
"../../core/ts/src/idiom.ts"() {
|
|
30009
|
-
"use strict";
|
|
30010
30911
|
init_define_HHP_CATALOG();
|
|
30011
30912
|
IDIOM_CONTEXTS = {
|
|
30012
30913
|
ios: { native: ["ios"] },
|
|
@@ -150797,14 +151698,20 @@ var init_captcha_service = __esm({
|
|
|
150797
151698
|
// src/wix-owner.ts
|
|
150798
151699
|
var wix_owner_exports = {};
|
|
150799
151700
|
__export(wix_owner_exports, {
|
|
151701
|
+
TOKEN_EXCHANGE_URL: () => TOKEN_EXCHANGE_URL,
|
|
151702
|
+
WIX_CLI_FIX: () => WIX_CLI_FIX,
|
|
150800
151703
|
WIX_VIDEO_GATEWAY_URL: () => WIX_VIDEO_GATEWAY_URL,
|
|
150801
151704
|
WixApiError: () => WixApiError,
|
|
151705
|
+
WixTokenError: () => WixTokenError,
|
|
150802
151706
|
accountToken: () => accountToken,
|
|
150803
151707
|
accountTokenNeedsWixCli: () => accountTokenNeedsWixCli,
|
|
151708
|
+
dropExchangedSiteToken: () => dropExchangedSiteToken,
|
|
151709
|
+
exchangeSiteToken: () => exchangeSiteToken,
|
|
150804
151710
|
heldWixToken: () => heldWixToken,
|
|
150805
151711
|
mapLimit: () => mapLimit,
|
|
150806
151712
|
ownerTransport: () => ownerTransport,
|
|
150807
151713
|
redactForError: () => redactForError,
|
|
151714
|
+
refreshableSiteToken: () => refreshableSiteToken,
|
|
150808
151715
|
resolveSiteId: () => resolveSiteId,
|
|
150809
151716
|
siteApiKey: () => siteApiKey,
|
|
150810
151717
|
siteToken: () => siteToken,
|
|
@@ -150813,6 +151720,7 @@ __export(wix_owner_exports, {
|
|
|
150813
151720
|
wixCliOnPath: () => wixCliOnPath
|
|
150814
151721
|
});
|
|
150815
151722
|
import { spawn as spawn3 } from "node:child_process";
|
|
151723
|
+
import { createHash as createHash22 } from "node:crypto";
|
|
150816
151724
|
import { accessSync as accessSync2, constants as fsConstants, statSync as statSync11 } from "node:fs";
|
|
150817
151725
|
import { delimiter, join as join37 } from "node:path";
|
|
150818
151726
|
function resolveSiteId(flag) {
|
|
@@ -150824,13 +151732,111 @@ function resolveSiteId(flag) {
|
|
|
150824
151732
|
}
|
|
150825
151733
|
return id;
|
|
150826
151734
|
}
|
|
150827
|
-
async function siteToken(msid, spawnImpl = spawn3) {
|
|
151735
|
+
async function siteToken(msid, spawnImpl = spawn3, fetchImpl = fetch) {
|
|
150828
151736
|
if (!process.env.WIX_TEST_TOKEN?.trim()) {
|
|
150829
151737
|
const key3 = siteApiKey();
|
|
150830
151738
|
if (key3) return key3;
|
|
151739
|
+
const held = heldWixToken();
|
|
151740
|
+
if (held) return await exchangeSiteToken(held, msid, { fetchImpl });
|
|
150831
151741
|
}
|
|
150832
151742
|
return await mintToken(["token", "--site", msid], `wix token --site ${msid}`, msid, spawnImpl);
|
|
150833
151743
|
}
|
|
151744
|
+
function subjectFingerprint(subject) {
|
|
151745
|
+
return createHash22("sha256").update(subject).digest("hex").slice(0, 16);
|
|
151746
|
+
}
|
|
151747
|
+
async function exchangeSiteToken(subject, msid, opts = {}) {
|
|
151748
|
+
const now = opts.now ?? Date.now;
|
|
151749
|
+
const fingerprint = subjectFingerprint(subject);
|
|
151750
|
+
const cached3 = exchangeCache.get(msid);
|
|
151751
|
+
if (cached3 && cached3.subject === fingerprint && now() < cached3.expiresAt) return cached3.token;
|
|
151752
|
+
const key3 = `${msid}:${fingerprint}`;
|
|
151753
|
+
const pending2 = exchangeInFlight.get(key3);
|
|
151754
|
+
if (pending2) return pending2;
|
|
151755
|
+
const p2 = exchangeOnce(subject, msid, fingerprint, opts).finally(() => exchangeInFlight.delete(key3));
|
|
151756
|
+
exchangeInFlight.set(key3, p2);
|
|
151757
|
+
return p2;
|
|
151758
|
+
}
|
|
151759
|
+
async function exchangeOnce(subject, msid, fingerprint, opts) {
|
|
151760
|
+
const now = opts.now ?? Date.now;
|
|
151761
|
+
const fetchImpl = opts.fetchImpl ?? fetch;
|
|
151762
|
+
const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
151763
|
+
const body = await withRetry2(`token exchange for site ${msid}`, async () => {
|
|
151764
|
+
let res;
|
|
151765
|
+
try {
|
|
151766
|
+
res = await fetchImpl(TOKEN_EXCHANGE_URL, {
|
|
151767
|
+
method: "POST",
|
|
151768
|
+
headers: { "Content-Type": "application/json", Accept: "application/json" },
|
|
151769
|
+
body: JSON.stringify({
|
|
151770
|
+
grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
|
|
151771
|
+
subject_token: subject,
|
|
151772
|
+
subject_token_type: "urn:ietf:params:oauth:token-type:access_token",
|
|
151773
|
+
site_id: msid
|
|
151774
|
+
}),
|
|
151775
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
151776
|
+
});
|
|
151777
|
+
} catch (e2) {
|
|
151778
|
+
throw new Error(`POST /oauth2/token (site ${msid}) failed: ${e2?.message ?? String(e2)}`);
|
|
151779
|
+
}
|
|
151780
|
+
const text16 = await res.text();
|
|
151781
|
+
let parsed = text16;
|
|
151782
|
+
try {
|
|
151783
|
+
parsed = text16 ? JSON.parse(text16) : null;
|
|
151784
|
+
} catch {
|
|
151785
|
+
}
|
|
151786
|
+
if (res.ok) return parsed;
|
|
151787
|
+
if (res.status === 429 || res.status >= 500) {
|
|
151788
|
+
throw new WixApiError(res.status, "POST", "/oauth2/token", redactTokens(parsed));
|
|
151789
|
+
}
|
|
151790
|
+
throw exchangeRefusal(res.status, parsed, msid);
|
|
151791
|
+
});
|
|
151792
|
+
const token = typeof body?.access_token === "string" ? body.access_token.trim() : "";
|
|
151793
|
+
if (!token) {
|
|
151794
|
+
throw new WixTokenError(
|
|
151795
|
+
"site_token_exchange_denied",
|
|
151796
|
+
`the token exchange for site ${msid} answered 200 without an access_token.`,
|
|
151797
|
+
SITE_TOKEN_EXCHANGE_FIX
|
|
151798
|
+
);
|
|
151799
|
+
}
|
|
151800
|
+
const ttlS = typeof body?.expires_in === "number" && body.expires_in > 0 ? body.expires_in : EXCHANGE_DEFAULT_TTL_S;
|
|
151801
|
+
recentExchanged.set(msid, [subjectFingerprint(token), ...recentExchanged.get(msid) ?? []].slice(0, RECENT_EXCHANGED_PER_SITE));
|
|
151802
|
+
exchangeCache.set(msid, {
|
|
151803
|
+
token,
|
|
151804
|
+
subject: fingerprint,
|
|
151805
|
+
expiresAt: now() + Math.max(0, ttlS * 1e3 - EXCHANGE_REFRESH_MARGIN_MS)
|
|
151806
|
+
});
|
|
151807
|
+
return token;
|
|
151808
|
+
}
|
|
151809
|
+
function dropExchangedSiteToken(msid, sent) {
|
|
151810
|
+
if (!recentExchanged.get(msid)?.includes(subjectFingerprint(sent))) return false;
|
|
151811
|
+
if (exchangeCache.get(msid)?.token === sent) exchangeCache.delete(msid);
|
|
151812
|
+
return true;
|
|
151813
|
+
}
|
|
151814
|
+
function refreshableSiteToken(msid, token) {
|
|
151815
|
+
if (exchangeCache.get(msid)?.token !== token) return void 0;
|
|
151816
|
+
return { current: () => siteToken(msid), invalidate: (sent) => dropExchangedSiteToken(msid, sent) };
|
|
151817
|
+
}
|
|
151818
|
+
function redactTokens(v2) {
|
|
151819
|
+
const s2 = typeof v2 === "string" ? v2 : JSON.stringify(v2 ?? null);
|
|
151820
|
+
return s2.replace(/OauthNG\.JWS\.[A-Za-z0-9._-]+/g, "OauthNG.JWS.<redacted>").slice(0, 300);
|
|
151821
|
+
}
|
|
151822
|
+
function exchangeRefusal(status, body, msid) {
|
|
151823
|
+
const b2 = body ?? {};
|
|
151824
|
+
const wixCode = typeof b2.error === "string" ? b2.error : "";
|
|
151825
|
+
const detail = String(b2.error_description ?? b2.message ?? (typeof body === "string" ? body : "") ?? "");
|
|
151826
|
+
const said = String(redactTokens(`${wixCode}${wixCode && detail ? ": " : ""}${detail}`)).replace(/^"|"$/g, "");
|
|
151827
|
+
if (status === 400 && wixCode === "invalid_request" && /account[- ]level/i.test(detail)) {
|
|
151828
|
+
return new WixTokenError(
|
|
151829
|
+
"site_token_subject_not_account",
|
|
151830
|
+
`WIX_TOKEN is a site-level token, and only an account-level token can be exchanged for site ${msid} (Wix answered ${status}: ${said}).`,
|
|
151831
|
+
"set WIX_TOKEN to the owner's ACCOUNT token (`wix token` without `--site`, or the token your platform holds for the owner's Wix account), not a site token"
|
|
151832
|
+
);
|
|
151833
|
+
}
|
|
151834
|
+
return new WixTokenError(
|
|
151835
|
+
"site_token_exchange_denied",
|
|
151836
|
+
`Wix refused to exchange WIX_TOKEN for a token on site ${msid} (${status}${said ? `: ${said}` : ""}). The site must be owned by the token's account, and the token must be an account token issued to a Wix app.`,
|
|
151837
|
+
SITE_TOKEN_EXCHANGE_FIX
|
|
151838
|
+
);
|
|
151839
|
+
}
|
|
150834
151840
|
async function userSiteToken(msid, spawnImpl = spawn3) {
|
|
150835
151841
|
return await mintToken(["token", "--site", msid], `wix token --site ${msid}`, `user:${msid}`, spawnImpl);
|
|
150836
151842
|
}
|
|
@@ -150882,7 +151888,7 @@ async function mintToken(args, label3, cacheKey, spawnImpl) {
|
|
|
150882
151888
|
try {
|
|
150883
151889
|
child = spawnImpl("wix", [...args]);
|
|
150884
151890
|
} catch (e2) {
|
|
150885
|
-
reject(
|
|
151891
|
+
reject(spawnFailure(label3, e2));
|
|
150886
151892
|
return;
|
|
150887
151893
|
}
|
|
150888
151894
|
let out2 = "";
|
|
@@ -150898,8 +151904,10 @@ async function mintToken(args, label3, cacheKey, spawnImpl) {
|
|
|
150898
151904
|
fn2();
|
|
150899
151905
|
};
|
|
150900
151906
|
const timer = setTimeout(
|
|
150901
|
-
() => done(() => reject(new
|
|
150902
|
-
|
|
151907
|
+
() => done(() => reject(new WixTokenError(
|
|
151908
|
+
"wix_cli_token_failed",
|
|
151909
|
+
`\`${label3}\` printed no OauthNG token within ${TOKEN_MINT_TIMEOUT_MS}ms. Is the Wix CLI logged in (\`wix login\`)? ${redactForError(out2)}`,
|
|
151910
|
+
mintFailedFix(label3)
|
|
150903
151911
|
))),
|
|
150904
151912
|
TOKEN_MINT_TIMEOUT_MS
|
|
150905
151913
|
);
|
|
@@ -150913,9 +151921,11 @@ async function mintToken(args, label3, cacheKey, spawnImpl) {
|
|
|
150913
151921
|
const m2 = out2.match(TOKEN_RE);
|
|
150914
151922
|
if (m2) done(() => resolve99(m2[0]));
|
|
150915
151923
|
});
|
|
150916
|
-
child.on("error", (e2) => done(() => reject(
|
|
150917
|
-
child.on("exit", (code) => done(() => reject(new
|
|
150918
|
-
|
|
151924
|
+
child.on("error", (e2) => done(() => reject(spawnFailure(label3, e2))));
|
|
151925
|
+
child.on("exit", (code) => done(() => reject(new WixTokenError(
|
|
151926
|
+
"wix_cli_token_failed",
|
|
151927
|
+
`\`${label3}\` exited (code ${code}) without printing an OauthNG token \u2014 is the Wix CLI logged in (\`wix login\`)? ${redactForError(out2)}`,
|
|
151928
|
+
mintFailedFix(label3)
|
|
150919
151929
|
))));
|
|
150920
151930
|
});
|
|
150921
151931
|
tokenCache.set(cacheKey, token);
|
|
@@ -150930,33 +151940,52 @@ ${trimmed.slice(0, 300)}` : "It printed nothing.";
|
|
|
150930
151940
|
function mintHelp(label3, detail) {
|
|
150931
151941
|
return `could not run \`${label3}\` (${detail}). Install the Wix CLI and log in (\`npm i -g @wix/cli && wix login\`), or, with no browser, export WIX_API_KEY (manage.wix.com/account/api-keys).`;
|
|
150932
151942
|
}
|
|
151943
|
+
function mintFailedFix(label3) {
|
|
151944
|
+
return `run \`${label3}\` yourself to see why. Usually \`wix login\` fixes it (check with \`wix whoami\`); if it reports an unsupported Node version, run it on a Node it supports. Or export WIX_API_KEY (manage.wix.com/account/api-keys), which needs no Wix CLI.`;
|
|
151945
|
+
}
|
|
151946
|
+
function spawnFailure(label3, e2) {
|
|
151947
|
+
const err = e2;
|
|
151948
|
+
const missing3 = err?.code === "ENOENT" || /\bENOENT\b/.test(err?.message ?? "");
|
|
151949
|
+
return new WixTokenError(
|
|
151950
|
+
missing3 ? "wix_cli_required" : "wix_cli_token_failed",
|
|
151951
|
+
mintHelp(label3, err?.message ?? String(e2)),
|
|
151952
|
+
missing3 ? WIX_CLI_FIX : mintFailedFix(label3)
|
|
151953
|
+
);
|
|
151954
|
+
}
|
|
150933
151955
|
function ownerTransport(msid, fetchImpl = fetch, timeoutMs = DEFAULT_TIMEOUT_MS, mint = siteToken) {
|
|
150934
151956
|
return async (method, path2, body) => {
|
|
150935
151957
|
if (/^[a-z]+:/i.test(path2) && path2 !== WIX_VIDEO_GATEWAY_URL) throw new Error(`${method} ${path2}: the owner transport sends an absolute URL only to the Wix Video gateway`);
|
|
150936
151958
|
const url = path2 === WIX_VIDEO_GATEWAY_URL ? path2 : `${API_BASE}${path2}`;
|
|
150937
|
-
const
|
|
150938
|
-
|
|
150939
|
-
|
|
150940
|
-
|
|
150941
|
-
|
|
150942
|
-
|
|
150943
|
-
|
|
150944
|
-
|
|
150945
|
-
|
|
150946
|
-
|
|
150947
|
-
|
|
150948
|
-
|
|
150949
|
-
|
|
150950
|
-
|
|
150951
|
-
|
|
150952
|
-
|
|
150953
|
-
|
|
150954
|
-
|
|
150955
|
-
|
|
150956
|
-
|
|
150957
|
-
|
|
151959
|
+
const send2 = async (authorization) => {
|
|
151960
|
+
const headers2 = {
|
|
151961
|
+
Authorization: authorization,
|
|
151962
|
+
"wix-site-id": msid,
|
|
151963
|
+
Accept: "application/json"
|
|
151964
|
+
};
|
|
151965
|
+
if (body !== void 0) headers2["Content-Type"] = "application/json";
|
|
151966
|
+
const started = Date.now();
|
|
151967
|
+
try {
|
|
151968
|
+
return await fetchImpl(url, {
|
|
151969
|
+
method,
|
|
151970
|
+
headers: headers2,
|
|
151971
|
+
body: body === void 0 ? void 0 : JSON.stringify(body),
|
|
151972
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
151973
|
+
});
|
|
151974
|
+
} catch (e2) {
|
|
151975
|
+
const err = e2;
|
|
151976
|
+
if (err?.name === "TimeoutError" || /aborted due to timeout/i.test(err?.message ?? "")) {
|
|
151977
|
+
throw new Error(
|
|
151978
|
+
`${method} ${path2} timed out after ${Date.now() - started}ms (limit ${timeoutMs}ms). Wix REST over a VPN'd link is slow and a large site's collection list can be ~1MB. Raise the ceiling with HIMI_WIX_TIMEOUT_MS=<ms>, or check the VPN.`
|
|
151979
|
+
);
|
|
151980
|
+
}
|
|
151981
|
+
throw new Error(`${method} ${path2} failed: ${err?.message ?? String(e2)}`);
|
|
150958
151982
|
}
|
|
150959
|
-
|
|
151983
|
+
};
|
|
151984
|
+
const sent = await mint(msid);
|
|
151985
|
+
let res = await send2(sent);
|
|
151986
|
+
if (res.status === 401 && dropExchangedSiteToken(msid, sent)) {
|
|
151987
|
+
const next = await mint(msid);
|
|
151988
|
+
if (next !== sent) res = await send2(next);
|
|
150960
151989
|
}
|
|
150961
151990
|
const text16 = await res.text();
|
|
150962
151991
|
let parsed = text16;
|
|
@@ -150975,6 +152004,7 @@ async function withRetry2(label3, fn2, attempts = 3) {
|
|
|
150975
152004
|
return await fn2();
|
|
150976
152005
|
} catch (err) {
|
|
150977
152006
|
lastErr = err;
|
|
152007
|
+
if (err instanceof WixTokenError) throw err;
|
|
150978
152008
|
const status = err instanceof WixApiError ? err.status : 0;
|
|
150979
152009
|
if (status && status !== 429 && status < 500) throw err;
|
|
150980
152010
|
if (i2 < attempts - 1) {
|
|
@@ -150997,7 +152027,7 @@ async function mapLimit(items, limit, fn2) {
|
|
|
150997
152027
|
}));
|
|
150998
152028
|
return results;
|
|
150999
152029
|
}
|
|
151000
|
-
var API_BASE, WIX_VIDEO_GATEWAY_URL, tokenCache, TOKEN_RE, TOKEN_MINT_TIMEOUT_MS, ACCOUNT_TOKEN_KEY, WixApiError, DEFAULT_TIMEOUT_MS;
|
|
152030
|
+
var API_BASE, WIX_VIDEO_GATEWAY_URL, tokenCache, TOKEN_RE, TOKEN_MINT_TIMEOUT_MS, TOKEN_EXCHANGE_URL, EXCHANGE_REFRESH_MARGIN_MS, EXCHANGE_DEFAULT_TTL_S, exchangeCache, recentExchanged, RECENT_EXCHANGED_PER_SITE, exchangeInFlight, SITE_TOKEN_EXCHANGE_FIX, ACCOUNT_TOKEN_KEY, WIX_CLI_FIX, WixTokenError, WixApiError, DEFAULT_TIMEOUT_MS;
|
|
151001
152031
|
var init_wix_owner = __esm({
|
|
151002
152032
|
"src/wix-owner.ts"() {
|
|
151003
152033
|
init_define_HHP_CATALOG();
|
|
@@ -151006,7 +152036,25 @@ var init_wix_owner = __esm({
|
|
|
151006
152036
|
tokenCache = /* @__PURE__ */ new Map();
|
|
151007
152037
|
TOKEN_RE = /OauthNG\.JWS\.[A-Za-z0-9._-]+/;
|
|
151008
152038
|
TOKEN_MINT_TIMEOUT_MS = 3e4;
|
|
152039
|
+
TOKEN_EXCHANGE_URL = `${API_BASE}/oauth2/token`;
|
|
152040
|
+
EXCHANGE_REFRESH_MARGIN_MS = 6e4;
|
|
152041
|
+
EXCHANGE_DEFAULT_TTL_S = 900;
|
|
152042
|
+
exchangeCache = /* @__PURE__ */ new Map();
|
|
152043
|
+
recentExchanged = /* @__PURE__ */ new Map();
|
|
152044
|
+
RECENT_EXCHANGED_PER_SITE = 2;
|
|
152045
|
+
exchangeInFlight = /* @__PURE__ */ new Map();
|
|
152046
|
+
SITE_TOKEN_EXCHANGE_FIX = "WIX_TOKEN must be an account-level token of the account that OWNS this site, minted for a Wix app client (the Wix CLI's `wix token`, without `--site`, is one). Check the site id, or unset WIX_TOKEN and use WIX_API_KEY or `wix login`";
|
|
151009
152047
|
ACCOUNT_TOKEN_KEY = "account:*";
|
|
152048
|
+
WIX_CLI_FIX = "export WIX_TOKEN (the site owner's Wix account token, exchanged for this site), or install the Wix CLI and log in on this machine (`npm i -g @wix/cli && wix login`), or export WIX_API_KEY (an account API key from manage.wix.com/account/api-keys)";
|
|
152049
|
+
WixTokenError = class extends Error {
|
|
152050
|
+
constructor(code, message2, fix) {
|
|
152051
|
+
super(message2);
|
|
152052
|
+
this.code = code;
|
|
152053
|
+
this.fix = fix;
|
|
152054
|
+
this.name = "WixTokenError";
|
|
152055
|
+
}
|
|
152056
|
+
exit = 1;
|
|
152057
|
+
};
|
|
151010
152058
|
WixApiError = class extends Error {
|
|
151011
152059
|
constructor(status, method, path2, body) {
|
|
151012
152060
|
const detail = typeof body === "string" ? body.slice(0, 300) : JSON.stringify(body)?.slice(0, 300);
|
|
@@ -151125,16 +152173,25 @@ function classifyHttp(status, count2) {
|
|
|
151125
152173
|
}
|
|
151126
152174
|
function makeTransport(fetchImpl, auth, timeoutMs = DEFAULT_TIMEOUT_MS2) {
|
|
151127
152175
|
return async (method, path2, body) => {
|
|
151128
|
-
const
|
|
151129
|
-
|
|
151130
|
-
|
|
151131
|
-
|
|
151132
|
-
|
|
151133
|
-
|
|
151134
|
-
|
|
151135
|
-
|
|
151136
|
-
|
|
151137
|
-
|
|
152176
|
+
const send2 = (token) => {
|
|
152177
|
+
const headers2 = { Accept: "application/json" };
|
|
152178
|
+
if (token) headers2.Authorization = token;
|
|
152179
|
+
if (auth?.msid) headers2["wix-site-id"] = auth.msid;
|
|
152180
|
+
if (body !== void 0) headers2["Content-Type"] = "application/json";
|
|
152181
|
+
return fetchImpl(resolveWixUrl(path2), {
|
|
152182
|
+
method,
|
|
152183
|
+
headers: headers2,
|
|
152184
|
+
body: body === void 0 ? void 0 : JSON.stringify(body),
|
|
152185
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
152186
|
+
});
|
|
152187
|
+
};
|
|
152188
|
+
const sent = auth?.current ? await auth.current() : auth?.token;
|
|
152189
|
+
let res = await send2(sent);
|
|
152190
|
+
if (res.status === 401 && sent && auth?.current) {
|
|
152191
|
+
auth.invalidate?.(sent);
|
|
152192
|
+
const next = await auth.current();
|
|
152193
|
+
if (next !== sent) res = await send2(next);
|
|
152194
|
+
}
|
|
151138
152195
|
const text16 = await res.text();
|
|
151139
152196
|
let parsed = text16;
|
|
151140
152197
|
try {
|
|
@@ -151146,7 +152203,7 @@ function makeTransport(fetchImpl, auth, timeoutMs = DEFAULT_TIMEOUT_MS2) {
|
|
|
151146
152203
|
};
|
|
151147
152204
|
}
|
|
151148
152205
|
function ownerTransportFrom(fetchImpl, owner) {
|
|
151149
|
-
return makeTransport(fetchImpl,
|
|
152206
|
+
return makeTransport(fetchImpl, owner);
|
|
151150
152207
|
}
|
|
151151
152208
|
function visitorTransportFrom(fetchImpl, token, msid) {
|
|
151152
152209
|
return makeTransport(fetchImpl, { token, msid });
|
|
@@ -158013,7 +159070,7 @@ var init_fxp = __esm({
|
|
|
158013
159070
|
});
|
|
158014
159071
|
|
|
158015
159072
|
// ../../packages/serve/src/pkcs12.ts
|
|
158016
|
-
import { X509Certificate, createHash as
|
|
159073
|
+
import { X509Certificate, createHash as createHash23, createPrivateKey as createPrivateKey2, createPublicKey, pbkdf2Sync, createDecipheriv } from "node:crypto";
|
|
158017
159074
|
function decodePkcs12(der, password) {
|
|
158018
159075
|
try {
|
|
158019
159076
|
const pfx = readSequence(der, 0);
|
|
@@ -158287,7 +159344,7 @@ function expand(src, v2) {
|
|
|
158287
159344
|
return out2;
|
|
158288
159345
|
}
|
|
158289
159346
|
function sha12(data) {
|
|
158290
|
-
return
|
|
159347
|
+
return createHash23("sha1").update(data).digest();
|
|
158291
159348
|
}
|
|
158292
159349
|
function readAt(buf, i2) {
|
|
158293
159350
|
if (i2 >= buf.length) return void 0;
|
|
@@ -158377,7 +159434,7 @@ var init_pkcs12 = __esm({
|
|
|
158377
159434
|
});
|
|
158378
159435
|
|
|
158379
159436
|
// ../../packages/serve/src/customer-signing-assets.ts
|
|
158380
|
-
import { createHash as
|
|
159437
|
+
import { createHash as createHash24 } from "node:crypto";
|
|
158381
159438
|
function readValue(node3) {
|
|
158382
159439
|
const [tag, children2] = Object.entries(node3)[0] ?? [];
|
|
158383
159440
|
if (!tag || !Array.isArray(children2)) return refuse2("customer_profile_invalid");
|
|
@@ -158455,7 +159512,7 @@ function toBundle(assets, expected, decoded2, profileType, apns, deviceCount) {
|
|
|
158455
159512
|
provisioningProfile: Buffer.from(assets.provisioningProfile).toString("base64"),
|
|
158456
159513
|
profileSha256: sha2564(assets.provisioningProfile),
|
|
158457
159514
|
certificateSha256: sha2564(decoded2.cert.raw),
|
|
158458
|
-
certificateSha1:
|
|
159515
|
+
certificateSha1: createHash24("sha1").update(decoded2.cert.raw).digest("hex").toUpperCase(),
|
|
158459
159516
|
expiresAt: new Date(Math.min(decoded2.expiration, Date.parse(decoded2.cert.validTo))).toISOString(),
|
|
158460
159517
|
...apns ? { apnsEnvironment: apns } : {},
|
|
158461
159518
|
deviceCount
|
|
@@ -158507,7 +159564,7 @@ var init_customer_signing_assets = __esm({
|
|
|
158507
159564
|
init_fxp();
|
|
158508
159565
|
init_pkcs12();
|
|
158509
159566
|
init_customer_dist_signing();
|
|
158510
|
-
sha2564 = (bytes2) =>
|
|
159567
|
+
sha2564 = (bytes2) => createHash24("sha256").update(bytes2).digest("hex");
|
|
158511
159568
|
refuse2 = (code) => {
|
|
158512
159569
|
throw new CustomerSigningError(code);
|
|
158513
159570
|
};
|
|
@@ -161665,7 +162722,7 @@ var NOTIFY_FAILURE_CODES, notifyCode, login, tokenFrom, repair, NOTIFY_HINTS;
|
|
|
161665
162722
|
var init_notify_errors = __esm({
|
|
161666
162723
|
"src/notify-errors.ts"() {
|
|
161667
162724
|
init_define_HHP_CATALOG();
|
|
161668
|
-
NOTIFY_FAILURE_CODES = ["control_token_expired", "owner_login_required", "flag_not_supported_with_ping"];
|
|
162725
|
+
NOTIFY_FAILURE_CODES = ["control_token_expired", "owner_login_required", "flag_not_supported_with_ping", "all_members_not_supported_for_site_app"];
|
|
161669
162726
|
notifyCode = (error) => NOTIFY_FAILURE_CODES.includes(error) ? { code: error } : {};
|
|
161670
162727
|
login = ({ name, ownerIssueUrl }) => {
|
|
161671
162728
|
const args = `--target ${name}${ownerIssueUrl ? ` --owner-issue-url ${ownerIssueUrl}` : ""}`;
|
|
@@ -161679,6 +162736,8 @@ var init_notify_errors = __esm({
|
|
|
161679
162736
|
ownerLoginRejected: (t2) => `the serve plane rejected ${tokenFrom(t2)} \u2014 ${repair(t2)}`,
|
|
161680
162737
|
// Ping's send request has no badge field: for a Branded app it computes the iOS badge itself.
|
|
161681
162738
|
badge: "Ping has no badge option: for a Branded app Ping sets the iOS badge itself from the member's unseen items in their Ping feed. Drop --badge.",
|
|
162739
|
+
// The roster pre-check needs the account that owns the site, which a site-lease token does not name.
|
|
162740
|
+
allMembersSiteApp: "A site app's project token cannot send to every member yet; send to one member with --member-email.",
|
|
161682
162741
|
flagNotSupportedWithPing: "This flag belongs to the local sender (notify send --token|--device|--all); drop it with --provider ping."
|
|
161683
162742
|
};
|
|
161684
162743
|
}
|
|
@@ -162367,7 +163426,7 @@ __export(pack_exports, {
|
|
|
162367
163426
|
unpackTo: () => unpackTo,
|
|
162368
163427
|
writeZip: () => writeZip
|
|
162369
163428
|
});
|
|
162370
|
-
import { createHash as
|
|
163429
|
+
import { createHash as createHash25 } from "node:crypto";
|
|
162371
163430
|
import { deflateRawSync, inflateRawSync } from "node:zlib";
|
|
162372
163431
|
import { existsSync as existsSync51, mkdirSync as mkdirSync26, readFileSync as readFileSync57, readdirSync as readdirSync28, rmSync as rmSync15, statSync as statSync16, writeFileSync as writeFileSync21 } from "node:fs";
|
|
162373
163432
|
import { dirname as dirname32, join as join44, resolve as resolve45 } from "node:path";
|
|
@@ -162517,11 +163576,11 @@ function gatherReleaseEntries(appDir3) {
|
|
|
162517
163576
|
return { entries, manifest: manifest2, skipped };
|
|
162518
163577
|
}
|
|
162519
163578
|
function sha256Hex4(bytes2) {
|
|
162520
|
-
return
|
|
163579
|
+
return createHash25("sha256").update(bytes2).digest("hex");
|
|
162521
163580
|
}
|
|
162522
163581
|
function computeContentHash(entries) {
|
|
162523
163582
|
const input = packageHashInput(entries.map((e2) => ({ path: e2.path, hash: sha256Hex4(e2.bytes) })));
|
|
162524
|
-
return "sha256-" +
|
|
163583
|
+
return "sha256-" + createHash25("sha256").update(input).digest("base64");
|
|
162525
163584
|
}
|
|
162526
163585
|
function buildEntries(appDir3, app, opts) {
|
|
162527
163586
|
const { entries: released, manifest: manifest2, skipped } = gatherReleaseEntries(appDir3);
|
|
@@ -162713,7 +163772,7 @@ __export(app_source_exports, {
|
|
|
162713
163772
|
writeConflicts: () => writeConflicts,
|
|
162714
163773
|
zipAppSource: () => zipAppSource
|
|
162715
163774
|
});
|
|
162716
|
-
import { createHash as
|
|
163775
|
+
import { createHash as createHash26 } from "node:crypto";
|
|
162717
163776
|
import { readdirSync as readdirSync29, lstatSync as lstatSync17, readFileSync as readFileSync58, mkdirSync as mkdirSync27, writeFileSync as writeFileSync22, existsSync as existsSync52, rmSync as rmSync16, rmdirSync as rmdirSync3, unlinkSync as unlinkSync3 } from "node:fs";
|
|
162718
163777
|
import { join as join45, resolve as resolve46, sep as sep15 } from "node:path";
|
|
162719
163778
|
import { createRequire as createRequire4 } from "node:module";
|
|
@@ -162829,13 +163888,13 @@ function sourceFingerprint(dir) {
|
|
|
162829
163888
|
dir,
|
|
162830
163889
|
(archivePath, hostRel) => {
|
|
162831
163890
|
if (/\.md$/i.test(archivePath)) return;
|
|
162832
|
-
files.push(`${archivePath}\0${
|
|
163891
|
+
files.push(`${archivePath}\0${createHash26("sha256").update(readFileSync58(join45(dir, hostRel))).digest("hex")}`);
|
|
162833
163892
|
},
|
|
162834
163893
|
() => {
|
|
162835
163894
|
}
|
|
162836
163895
|
);
|
|
162837
163896
|
files.sort();
|
|
162838
|
-
return
|
|
163897
|
+
return createHash26("sha256").update(files.join("\n")).digest("hex");
|
|
162839
163898
|
}
|
|
162840
163899
|
function largestEntries(entries, limit = 5) {
|
|
162841
163900
|
return entries.map((e2) => ({
|
|
@@ -163373,7 +164432,7 @@ __export(screen_state_exports, {
|
|
|
163373
164432
|
shotStateFor: () => shotStateFor,
|
|
163374
164433
|
withHomeCaveat: () => withHomeCaveat
|
|
163375
164434
|
});
|
|
163376
|
-
import { createHash as
|
|
164435
|
+
import { createHash as createHash27 } from "node:crypto";
|
|
163377
164436
|
import { lstatSync as lstatSync19, readFileSync as readFileSync60 } from "node:fs";
|
|
163378
164437
|
import { join as join47 } from "node:path";
|
|
163379
164438
|
function quotableLine(text16) {
|
|
@@ -163494,7 +164553,7 @@ var init_screen_state = __esm({
|
|
|
163494
164553
|
KEEP = 40;
|
|
163495
164554
|
LINE_MAX = 120;
|
|
163496
164555
|
str4 = (v2) => typeof v2 === "string" && v2.trim() ? v2 : void 0;
|
|
163497
|
-
sha256Of = (file2) =>
|
|
164556
|
+
sha256Of = (file2) => createHash27("sha256").update(readFileSync60(file2)).digest("hex");
|
|
163498
164557
|
}
|
|
163499
164558
|
});
|
|
163500
164559
|
|
|
@@ -163509,7 +164568,7 @@ __export(studio_reel_exports, {
|
|
|
163509
164568
|
thin: () => thin,
|
|
163510
164569
|
utcDay: () => utcDay
|
|
163511
164570
|
});
|
|
163512
|
-
import { createHash as
|
|
164571
|
+
import { createHash as createHash28 } from "node:crypto";
|
|
163513
164572
|
import { lstatSync as lstatSync20, readFileSync as readFileSync61 } from "node:fs";
|
|
163514
164573
|
import { basename as basename16, join as join48 } from "node:path";
|
|
163515
164574
|
function loadMemory2(dir) {
|
|
@@ -163598,7 +164657,7 @@ function inlineImages(dir, plan, budget = REEL_BUDGET_BYTES) {
|
|
|
163598
164657
|
const st2 = lstatSync20(path2);
|
|
163599
164658
|
if (!st2.isFile() || st2.nlink !== 1) return null;
|
|
163600
164659
|
const bytes2 = readFileSync61(path2);
|
|
163601
|
-
return
|
|
164660
|
+
return createHash28("sha256").update(bytes2).digest("hex") === f2.slice(0, 64) && imageExtension(bytes2) === f2.slice(65) ? bytes2 : null;
|
|
163602
164661
|
} catch {
|
|
163603
164662
|
return null;
|
|
163604
164663
|
}
|
|
@@ -163921,7 +164980,7 @@ __export(milestones_exports, {
|
|
|
163921
164980
|
watchUrlFor: () => watchUrlFor,
|
|
163922
164981
|
writeHandoverReel: () => writeHandoverReel
|
|
163923
164982
|
});
|
|
163924
|
-
import { createHash as
|
|
164983
|
+
import { createHash as createHash29, randomUUID as randomUUID10 } from "node:crypto";
|
|
163925
164984
|
import { spawn as spawn4 } from "node:child_process";
|
|
163926
164985
|
import { closeSync as closeSync5, existsSync as existsSync55, lstatSync as lstatSync21, readFileSync as readFileSync64, statSync as statSync18 } from "node:fs";
|
|
163927
164986
|
import { createServer as createServer3 } from "node:net";
|
|
@@ -164613,7 +165672,7 @@ var init_milestones = __esm({
|
|
|
164613
165672
|
INIT_SOURCE_FILE = join51(".himi", "init-source.json");
|
|
164614
165673
|
STARTING_POINT_REF = "starting-point";
|
|
164615
165674
|
TEMPLATE_NAME2 = /^[A-Za-z0-9._-]{1,64}$/;
|
|
164616
|
-
sha256Of2 = (file2) =>
|
|
165675
|
+
sha256Of2 = (file2) => createHash29("sha256").update(readFileSync64(file2)).digest("hex");
|
|
164617
165676
|
WATCH_REMINDER_EVERY_MS = 10 * 60 * 1e3;
|
|
164618
165677
|
REMINDERS_FILE = join51(".himi", "reminders.json");
|
|
164619
165678
|
pidAlive = (pid) => {
|
|
@@ -164932,7 +165991,8 @@ function surfaceIssues(dir, surfaceNav, strict) {
|
|
|
164932
165991
|
if (!envelopeUnreadable) {
|
|
164933
165992
|
for (const [key3, value2] of Object.entries(raw)) {
|
|
164934
165993
|
if (!VALID_PLATFORM_KEYS2.has(key3)) {
|
|
164935
|
-
|
|
165994
|
+
const valid = [...VALID_PLATFORM_KEYS2].sort().join(", ");
|
|
165995
|
+
error(key3 === "ios" || key3 === "android" ? `platforms.json: unknown key "${key3}" \u2014 iOS and Android are always on \u2014 remove this key (valid keys: ${valid})` : `platforms.json: unknown key "${key3}" \u2014 valid keys: ${valid}`);
|
|
164936
165996
|
} else if (typeof value2 !== "boolean") {
|
|
164937
165997
|
error(`platforms.json: "${key3}" must be a boolean (got ${JSON.stringify(value2)}) \u2014 the server silently drops non-boolean values`);
|
|
164938
165998
|
}
|
|
@@ -167278,7 +168338,7 @@ var init_glyphs = __esm({
|
|
|
167278
168338
|
|
|
167279
168339
|
// ../app-icons/plan.ts
|
|
167280
168340
|
import { existsSync as existsSync62, readFileSync as readFileSync71, readdirSync as readdirSync32 } from "node:fs";
|
|
167281
|
-
import { createHash as
|
|
168341
|
+
import { createHash as createHash30 } from "node:crypto";
|
|
167282
168342
|
import { dirname as dirname35, join as join59, resolve as resolve50 } from "node:path";
|
|
167283
168343
|
function stripComments(src) {
|
|
167284
168344
|
let out2 = "";
|
|
@@ -167365,7 +168425,7 @@ function parseIconConfig(configTs) {
|
|
|
167365
168425
|
return out2;
|
|
167366
168426
|
}
|
|
167367
168427
|
function idHash(id) {
|
|
167368
|
-
return
|
|
168428
|
+
return createHash30("sha1").update(id).digest();
|
|
167369
168429
|
}
|
|
167370
168430
|
function deriveGlyph(id) {
|
|
167371
168431
|
const h2 = idHash(id);
|
|
@@ -167543,7 +168603,7 @@ function placeholderHashes() {
|
|
|
167543
168603
|
}
|
|
167544
168604
|
function fileSha256(path2) {
|
|
167545
168605
|
try {
|
|
167546
|
-
return
|
|
168606
|
+
return createHash30("sha256").update(readFileSync71(path2)).digest("hex");
|
|
167547
168607
|
} catch {
|
|
167548
168608
|
return null;
|
|
167549
168609
|
}
|
|
@@ -174376,7 +175436,7 @@ __export(icon_exports, {
|
|
|
174376
175436
|
summarize: () => summarize3,
|
|
174377
175437
|
writePreparedIcon: () => writePreparedIcon
|
|
174378
175438
|
});
|
|
174379
|
-
import { createHash as
|
|
175439
|
+
import { createHash as createHash32 } from "node:crypto";
|
|
174380
175440
|
import { accessSync as accessSync3, constants as constants4, existsSync as existsSync71, mkdirSync as mkdirSync32, readFileSync as readFileSync81, statSync as statSync21, writeFileSync as writeFileSync29 } from "node:fs";
|
|
174381
175441
|
import { basename as basename19, dirname as dirname40, join as join68, resolve as resolve54, sep as sep19 } from "node:path";
|
|
174382
175442
|
function readManifest(dir) {
|
|
@@ -174465,7 +175525,7 @@ async function iconStatus(dir) {
|
|
|
174465
175525
|
...base,
|
|
174466
175526
|
templateIcon: templateIconMatch(png),
|
|
174467
175527
|
bytes: png.length,
|
|
174468
|
-
sha256:
|
|
175528
|
+
sha256: createHash32("sha256").update(png).digest("hex"),
|
|
174469
175529
|
header: pngHeader(png),
|
|
174470
175530
|
byteIssues
|
|
174471
175531
|
};
|
|
@@ -175985,7 +177045,7 @@ var init_policy = __esm({
|
|
|
175985
177045
|
|
|
175986
177046
|
// ../pre-pr-review/scope.mjs
|
|
175987
177047
|
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
175988
|
-
import { createHash as
|
|
177048
|
+
import { createHash as createHash33 } from "node:crypto";
|
|
175989
177049
|
import { resolve as resolve57, dirname as dirname42, isAbsolute as isAbsolute7, join as join73 } from "node:path";
|
|
175990
177050
|
import { fileURLToPath as fileURLToPath31 } from "node:url";
|
|
175991
177051
|
function resolveRepoRoot2(cwd = process.cwd()) {
|
|
@@ -176013,7 +177073,7 @@ function git(args, opts = {}) {
|
|
|
176013
177073
|
}).toString();
|
|
176014
177074
|
}
|
|
176015
177075
|
function diffHash(diff) {
|
|
176016
|
-
return
|
|
177076
|
+
return createHash33("sha256").update(diff).digest("hex");
|
|
176017
177077
|
}
|
|
176018
177078
|
var REPO_ROOT7, BASE_REF;
|
|
176019
177079
|
var init_scope = __esm({
|
|
@@ -176039,7 +177099,7 @@ import {
|
|
|
176039
177099
|
rmSync as rmSync20,
|
|
176040
177100
|
writeFileSync as writeFileSync31
|
|
176041
177101
|
} from "node:fs";
|
|
176042
|
-
import { createHash as
|
|
177102
|
+
import { createHash as createHash34 } from "node:crypto";
|
|
176043
177103
|
import { tmpdir as tmpdir4 } from "node:os";
|
|
176044
177104
|
import { basename as basename20, dirname as dirname43, join as join74, resolve as resolve58 } from "node:path";
|
|
176045
177105
|
import { pathToFileURL as pathToFileURL7 } from "node:url";
|
|
@@ -176117,7 +177177,7 @@ function stagedIdentity(head3, index, worktree) {
|
|
|
176117
177177
|
}
|
|
176118
177178
|
function blobOid(contents, algorithm) {
|
|
176119
177179
|
const body = Buffer.isBuffer(contents) ? contents : Buffer.from(contents);
|
|
176120
|
-
return
|
|
177180
|
+
return createHash34(algorithm).update(Buffer.from(`blob ${body.byteLength}\0`)).update(body).digest("hex");
|
|
176121
177181
|
}
|
|
176122
177182
|
function validationDiffHash(cwd = process.cwd()) {
|
|
176123
177183
|
const root = resolveRepoRoot2(cwd);
|
|
@@ -176291,7 +177351,7 @@ var init_diff_hash = __esm({
|
|
|
176291
177351
|
run: () => {
|
|
176292
177352
|
const { repo } = selfTestRepo({ withBase: true });
|
|
176293
177353
|
try {
|
|
176294
|
-
return validationDiffHash(repo) !==
|
|
177354
|
+
return validationDiffHash(repo) !== createHash34("sha256").update("validation-worktree-v2\0").digest("hex");
|
|
176295
177355
|
} finally {
|
|
176296
177356
|
rmSync20(repo, { recursive: true, force: true });
|
|
176297
177357
|
}
|
|
@@ -176349,7 +177409,7 @@ var init_diff_hash = __esm({
|
|
|
176349
177409
|
});
|
|
176350
177410
|
|
|
176351
177411
|
// ../../core/serve-storage/src/release-payload-hash.ts
|
|
176352
|
-
import { createHash as
|
|
177412
|
+
import { createHash as createHash35 } from "node:crypto";
|
|
176353
177413
|
function canonical2(value2) {
|
|
176354
177414
|
if (value2 === null || typeof value2 !== "object") return JSON.stringify(value2);
|
|
176355
177415
|
if (Array.isArray(value2)) return `[${value2.map(canonical2).join(",")}]`;
|
|
@@ -176357,7 +177417,7 @@ function canonical2(value2) {
|
|
|
176357
177417
|
return `{${Object.keys(record3).filter((key3) => record3[key3] !== void 0).sort().map((key3) => `${JSON.stringify(key3)}:${canonical2(record3[key3])}`).join(",")}}`;
|
|
176358
177418
|
}
|
|
176359
177419
|
function releasePayloadHash(payload) {
|
|
176360
|
-
const hash3 = (value2) =>
|
|
177420
|
+
const hash3 = (value2) => createHash35("sha256").update(canonical2(value2)).digest("hex");
|
|
176361
177421
|
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return hash3(payload);
|
|
176362
177422
|
const { catalogs: _catalogBytes, ...record3 } = payload;
|
|
176363
177423
|
const manifest2 = record3.manifest;
|
|
@@ -176376,7 +177436,7 @@ var init_release_payload_hash = __esm({
|
|
|
176376
177436
|
|
|
176377
177437
|
// src/attestation.ts
|
|
176378
177438
|
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
176379
|
-
import { createHash as
|
|
177439
|
+
import { createHash as createHash36, randomBytes as randomBytes2 } from "node:crypto";
|
|
176380
177440
|
import {
|
|
176381
177441
|
existsSync as existsSync76,
|
|
176382
177442
|
lstatSync as lstatSync24,
|
|
@@ -176455,7 +177515,7 @@ function currentGitUntrackedHash(contentDir2) {
|
|
|
176455
177515
|
encoding: "utf8",
|
|
176456
177516
|
maxBuffer: GIT_HASH_MAX_BUFFER
|
|
176457
177517
|
});
|
|
176458
|
-
const hash3 =
|
|
177518
|
+
const hash3 = createHash36("sha256");
|
|
176459
177519
|
for (const path2 of listed.split("\0").filter(Boolean).sort()) {
|
|
176460
177520
|
const local = relative15(absolute, join75(root, path2));
|
|
176461
177521
|
const segs = local.split(/[\\/]/);
|
|
@@ -176475,7 +177535,7 @@ function currentGitUntrackedHash(contentDir2) {
|
|
|
176475
177535
|
return hash3.digest("hex");
|
|
176476
177536
|
}
|
|
176477
177537
|
function sourceTreeHash(root) {
|
|
176478
|
-
const hash3 =
|
|
177538
|
+
const hash3 = createHash36("sha256");
|
|
176479
177539
|
const visit = (dir) => {
|
|
176480
177540
|
for (const entry of readdirSync35(dir, { withFileTypes: true }).sort((a2, b2) => a2.name < b2.name ? -1 : a2.name > b2.name ? 1 : 0)) {
|
|
176481
177541
|
if (entry.isDirectory() && (entry.name === ".git" || entry.name === "node_modules" || NOT_ATTESTED_DIRS.has(entry.name))) continue;
|
|
@@ -176751,7 +177811,7 @@ var init_attestation = __esm({
|
|
|
176751
177811
|
DEFAULT_MAX_RUNS = 20;
|
|
176752
177812
|
ATTESTATION_VERSION = 2;
|
|
176753
177813
|
GIT_HASH_MAX_BUFFER = 128 * 1024 * 1024;
|
|
176754
|
-
sha2565 = (bytes2) =>
|
|
177814
|
+
sha2565 = (bytes2) => createHash36("sha256").update(bytes2).digest("hex");
|
|
176755
177815
|
NOT_ATTESTED_DIRS = /* @__PURE__ */ new Set([".himi", ...AGENT_TOOLING_DIRS]);
|
|
176756
177816
|
stringRecord = (value2) => !!value2 && typeof value2 === "object" && !Array.isArray(value2) && Object.values(value2).every((item) => typeof item === "string");
|
|
176757
177817
|
}
|
|
@@ -177815,10 +178875,10 @@ var init_calls = __esm({
|
|
|
177815
178875
|
});
|
|
177816
178876
|
|
|
177817
178877
|
// ../../core/functions-runtime/src/queue.ts
|
|
177818
|
-
import { createHash as
|
|
178878
|
+
import { createHash as createHash37 } from "node:crypto";
|
|
177819
178879
|
function inputSchemaHash(definition) {
|
|
177820
178880
|
const schema2 = definition.input;
|
|
177821
|
-
return schema2 ?
|
|
178881
|
+
return schema2 ? createHash37("sha256").update(JSON.stringify(schema2.descriptor ?? { kind: schema2.kind, optional: schema2.optional === true })).digest("hex") : "";
|
|
177822
178882
|
}
|
|
177823
178883
|
function createFunctionEnqueueCapability(options) {
|
|
177824
178884
|
return {
|
|
@@ -177885,14 +178945,14 @@ var init_queue = __esm({
|
|
|
177885
178945
|
});
|
|
177886
178946
|
|
|
177887
178947
|
// ../../core/data-resources/src/plan.ts
|
|
177888
|
-
import { createHash as
|
|
178948
|
+
import { createHash as createHash38 } from "node:crypto";
|
|
177889
178949
|
function canonical4(value2) {
|
|
177890
178950
|
if (Array.isArray(value2)) return `[${value2.map(canonical4).join(",")}]`;
|
|
177891
178951
|
if (value2 && typeof value2 === "object") return `{${Object.entries(value2).sort(([a2], [b2]) => a2.localeCompare(b2)).map(([key3, item]) => `${JSON.stringify(key3)}:${canonical4(item)}`).join(",")}}`;
|
|
177892
178952
|
return JSON.stringify(value2);
|
|
177893
178953
|
}
|
|
177894
178954
|
function hashResourcePlan(plan) {
|
|
177895
|
-
return
|
|
178955
|
+
return createHash38("sha256").update(canonical4(plan)).digest("hex");
|
|
177896
178956
|
}
|
|
177897
178957
|
function finalize(input) {
|
|
177898
178958
|
return { ...input, hash: hashResourcePlan(input) };
|
|
@@ -180158,9 +181218,9 @@ async function runInputEvidenceChild(ctx) {
|
|
|
180158
181218
|
}
|
|
180159
181219
|
}
|
|
180160
181220
|
async function inputEvidenceSourceArchiveHash(dir) {
|
|
180161
|
-
const { createHash:
|
|
181221
|
+
const { createHash: createHash62 } = await import("node:crypto");
|
|
180162
181222
|
const { collectAppSource: collectAppSource2, zipAppSource: zipAppSource2 } = await Promise.resolve().then(() => (init_app_source(), app_source_exports));
|
|
180163
|
-
return
|
|
181223
|
+
return createHash62("sha256").update(zipAppSource2(collectAppSource2(dir).entries).toString("base64")).digest("hex");
|
|
180164
181224
|
}
|
|
180165
181225
|
var init_input_evidence_isolation = __esm({
|
|
180166
181226
|
"src/input-evidence-isolation.ts"() {
|
|
@@ -180507,7 +181567,7 @@ __export(browser_authoring_exports, {
|
|
|
180507
181567
|
sdkSubpathReader: () => sdkSubpathReader
|
|
180508
181568
|
});
|
|
180509
181569
|
import { createServer as createServer4 } from "node:http";
|
|
180510
|
-
import { createHash as
|
|
181570
|
+
import { createHash as createHash39, randomBytes as randomBytes4 } from "node:crypto";
|
|
180511
181571
|
import { existsSync as existsSync87, readdirSync as readdirSync38, readFileSync as readFileSync97, realpathSync as realpathSync11, statSync as statSync23 } from "node:fs";
|
|
180512
181572
|
import { join as join88, posix as posix3, relative as relative20, sep as sep21 } from "node:path";
|
|
180513
181573
|
function humanMs(ms2) {
|
|
@@ -180606,7 +181666,7 @@ function encodeJob(job) {
|
|
|
180606
181666
|
return Buffer.from(JSON.stringify(job), "utf8").toString("base64");
|
|
180607
181667
|
}
|
|
180608
181668
|
function mintToken2(payload, nonce = randomBytes4(16).toString("hex")) {
|
|
180609
|
-
const digest2 =
|
|
181669
|
+
const digest2 = createHash39("sha256").update(payload, "utf8").digest("base64url");
|
|
180610
181670
|
return `${nonce}.${digest2}`;
|
|
180611
181671
|
}
|
|
180612
181672
|
function defaultOpenBrowser(url) {
|
|
@@ -181337,7 +182397,7 @@ __export(coverage_exports, {
|
|
|
181337
182397
|
verifyCoverage: () => verifyCoverage,
|
|
181338
182398
|
verifyNativeProof: () => verifyNativeProof
|
|
181339
182399
|
});
|
|
181340
|
-
import { createHash as
|
|
182400
|
+
import { createHash as createHash40 } from "node:crypto";
|
|
181341
182401
|
import { existsSync as existsSync88, readFileSync as readFileSync98, writeFileSync as writeFileSync37 } from "node:fs";
|
|
181342
182402
|
import { isAbsolute as isAbsolute10, join as join89, resolve as resolve68 } from "node:path";
|
|
181343
182403
|
function sectionVisibilityProof(record3, contentDir2) {
|
|
@@ -181714,7 +182774,7 @@ var init_coverage = __esm({
|
|
|
181714
182774
|
otherRestricted: "hidden"
|
|
181715
182775
|
};
|
|
181716
182776
|
obj4 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
|
|
181717
|
-
sha = (v2) =>
|
|
182777
|
+
sha = (v2) => createHash40("sha256").update(v2).digest("hex");
|
|
181718
182778
|
REQUIRED_CHECK = {
|
|
181719
182779
|
route: "route-walkthrough",
|
|
181720
182780
|
placement: "visual-comparison",
|
|
@@ -181902,7 +182962,7 @@ __export(validate_topbar_exports, {
|
|
|
181902
182962
|
readVerifiedEvidence: () => readVerifiedEvidence,
|
|
181903
182963
|
runOneAppTopBarValidation: () => runOneAppTopBarValidation
|
|
181904
182964
|
});
|
|
181905
|
-
import { createHash as
|
|
182965
|
+
import { createHash as createHash41 } from "node:crypto";
|
|
181906
182966
|
import { existsSync as existsSync89, readFileSync as readFileSync99, statSync as statSync24 } from "node:fs";
|
|
181907
182967
|
import { resolve as resolve69, join as join90 } from "node:path";
|
|
181908
182968
|
import ts13 from "typescript";
|
|
@@ -182307,7 +183367,7 @@ function readHashedEvidenceJson(evidenceDir, name) {
|
|
|
182307
183367
|
const expected = object11(readJson8(join90(evidenceDir, "manifest.json")).sha256)?.[name];
|
|
182308
183368
|
if (typeof expected !== "string" || !/^[a-f0-9]{64}$/i.test(expected)) throw new Error(`manifest.json records no hash for ${name}; recollect the source.`);
|
|
182309
183369
|
const bytes2 = readFileSync99(path2);
|
|
182310
|
-
if (
|
|
183370
|
+
if (createHash41("sha256").update(bytes2).digest("hex") !== expected) throw new Error(`${name} does not match the hash recorded in manifest.json; recollect the source.`);
|
|
182311
183371
|
return JSON.parse(bytes2.toString("utf8"));
|
|
182312
183372
|
}
|
|
182313
183373
|
function readVerifiedEvidence(evidenceDir) {
|
|
@@ -182324,7 +183384,7 @@ function readVerifiedEvidence(evidenceDir) {
|
|
|
182324
183384
|
if (typeof expectedHash !== "string" || !/^[a-f0-9]{64}$/i.test(expectedHash)) {
|
|
182325
183385
|
throw new Error("manifest.json is missing a valid raw-structure.json hash.");
|
|
182326
183386
|
}
|
|
182327
|
-
if (
|
|
183387
|
+
if (createHash41("sha256").update(rawBytes).digest("hex") !== expectedHash) {
|
|
182328
183388
|
throw new Error("raw-structure.json does not match the hash recorded in manifest.json.");
|
|
182329
183389
|
}
|
|
182330
183390
|
const raw = JSON.parse(rawBytes.toString("utf8"));
|
|
@@ -182335,7 +183395,7 @@ function readVerifiedEvidence(evidenceDir) {
|
|
|
182335
183395
|
if (hash3 === void 0) continue;
|
|
182336
183396
|
if (typeof hash3 !== "string" || !/^[a-f0-9]{64}$/i.test(hash3)) throw new Error(`Invalid ${name} hash.`);
|
|
182337
183397
|
const bytes2 = readFileSync99(join90(evidenceDir, name));
|
|
182338
|
-
if (
|
|
183398
|
+
if (createHash41("sha256").update(bytes2).digest("hex") !== hash3) throw new Error(`${name} does not match manifest.json.`);
|
|
182339
183399
|
views[platform] = JSON.parse(bytes2.toString("utf8"));
|
|
182340
183400
|
}
|
|
182341
183401
|
return { raw, views };
|
|
@@ -191532,7 +192592,7 @@ var init_iap_catalog_api = __esm({
|
|
|
191532
192592
|
});
|
|
191533
192593
|
|
|
191534
192594
|
// ../store-release/iap-manifest.ts
|
|
191535
|
-
import { createHash as
|
|
192595
|
+
import { createHash as createHash45 } from "node:crypto";
|
|
191536
192596
|
function readTarget(reader, value2) {
|
|
191537
192597
|
const obj13 = reader.object(value2, "target", TARGET_KEYS);
|
|
191538
192598
|
return {
|
|
@@ -191678,7 +192738,7 @@ function canonicalJson3(value2) {
|
|
|
191678
192738
|
return JSON.stringify(sortKeys(value2));
|
|
191679
192739
|
}
|
|
191680
192740
|
function sha256Digest(value2) {
|
|
191681
|
-
return `sha256:${
|
|
192741
|
+
return `sha256:${createHash45("sha256").update(canonicalJson3(value2)).digest("hex")}`;
|
|
191682
192742
|
}
|
|
191683
192743
|
function manifestDigest(manifest2) {
|
|
191684
192744
|
return sha256Digest(manifest2);
|
|
@@ -192038,7 +193098,7 @@ var init_screenshot_display_types = __esm({
|
|
|
192038
193098
|
});
|
|
192039
193099
|
|
|
192040
193100
|
// ../store-release/iap-review-screenshot.ts
|
|
192041
|
-
import { createHash as
|
|
193101
|
+
import { createHash as createHash46 } from "node:crypto";
|
|
192042
193102
|
import { basename as basename26, resolve as resolve77 } from "node:path";
|
|
192043
193103
|
function pngSize(bytes2) {
|
|
192044
193104
|
const signed = PNG_SIGNATURE.every((b2, i2) => bytes2[i2] === b2);
|
|
@@ -192057,7 +193117,7 @@ function readImageSize(bytes2) {
|
|
|
192057
193117
|
return pngSize(buffer) ?? jpegSize(buffer);
|
|
192058
193118
|
}
|
|
192059
193119
|
function md5Hex(bytes2) {
|
|
192060
|
-
return
|
|
193120
|
+
return createHash46("md5").update(bytes2).digest("hex");
|
|
192061
193121
|
}
|
|
192062
193122
|
function isAppStoreScreenshotSize(file2) {
|
|
192063
193123
|
return displayTypeForSize(file2.width, file2.height) !== null;
|
|
@@ -193082,11 +194142,11 @@ var init_credential_profile = __esm({
|
|
|
193082
194142
|
});
|
|
193083
194143
|
|
|
193084
194144
|
// ../store-release/iap-credentials.ts
|
|
193085
|
-
import { createHash as
|
|
194145
|
+
import { createHash as createHash47 } from "node:crypto";
|
|
193086
194146
|
import { existsSync as existsSync104, readFileSync as readFileSync119, realpathSync as realpathSync14 } from "node:fs";
|
|
193087
194147
|
import { homedir as homedir12 } from "node:os";
|
|
193088
194148
|
function accountFingerprint(keyId, issuerId) {
|
|
193089
|
-
return `sha256:${
|
|
194149
|
+
return `sha256:${createHash47("sha256").update(`${issuerId}:${keyId}`).digest("hex").slice(0, 16)}`;
|
|
193090
194150
|
}
|
|
193091
194151
|
function requireExplicitProfile(profileFlag, target) {
|
|
193092
194152
|
const profile = profileFlag?.trim();
|
|
@@ -193158,7 +194218,7 @@ var init_iap_credentials = __esm({
|
|
|
193158
194218
|
});
|
|
193159
194219
|
|
|
193160
194220
|
// ../store-release/iap-draft.ts
|
|
193161
|
-
import { createHash as
|
|
194221
|
+
import { createHash as createHash48 } from "node:crypto";
|
|
193162
194222
|
function fit(text16, max) {
|
|
193163
194223
|
const chars = [...text16];
|
|
193164
194224
|
return chars.length <= max ? text16 : `${chars.slice(0, max - 1).join("").trimEnd()}${ELLIPSIS}`;
|
|
@@ -193314,7 +194374,7 @@ var init_iap_draft = __esm({
|
|
|
193314
194374
|
TIER_DESCRIPTION = "Unlocks one item in the app";
|
|
193315
194375
|
ELLIPSIS = "\u2026";
|
|
193316
194376
|
entityKey = (entityType, entityId) => `${entityType}:${entityId}`;
|
|
193317
|
-
sha2 = (text16) =>
|
|
194377
|
+
sha2 = (text16) => createHash48("sha256").update(text16).digest("hex");
|
|
193318
194378
|
ENTITIES2 = { "&": "&", " ": " ", "<": "<", ">": ">", """: '"', "'": "'" };
|
|
193319
194379
|
MAX_SUFFIX = 24;
|
|
193320
194380
|
ReferenceNames = class {
|
|
@@ -195797,7 +196857,7 @@ __export(preflight_app_exports, {
|
|
|
195797
196857
|
readXcconfigVars: () => readXcconfigVars
|
|
195798
196858
|
});
|
|
195799
196859
|
import { readFileSync as readFileSync123, existsSync as existsSync107, readdirSync as readdirSync43, statSync as statSync29 } from "node:fs";
|
|
195800
|
-
import { createHash as
|
|
196860
|
+
import { createHash as createHash49 } from "node:crypto";
|
|
195801
196861
|
import { dirname as dirname55, join as join111 } from "node:path";
|
|
195802
196862
|
function analyze(projectYml, storeConfig, icon, account, adopted) {
|
|
195803
196863
|
const f2 = [];
|
|
@@ -196196,7 +197256,7 @@ function placeholderHashes2() {
|
|
|
196196
197256
|
const p2 = join111(templateIos, target, "Assets.xcassets", "AppIcon.appiconset", "icon_1024.png");
|
|
196197
197257
|
try {
|
|
196198
197258
|
if (!statSync29(p2).isFile()) continue;
|
|
196199
|
-
return [LEGACY_PLACEHOLDER_SHA2562,
|
|
197259
|
+
return [LEGACY_PLACEHOLDER_SHA2562, createHash49("sha256").update(readFileSync123(p2)).digest("hex")];
|
|
196200
197260
|
} catch {
|
|
196201
197261
|
}
|
|
196202
197262
|
}
|
|
@@ -196233,7 +197293,7 @@ async function appIconState(iosDir) {
|
|
|
196233
197293
|
try {
|
|
196234
197294
|
if (!statSync29(p2).isFile()) continue;
|
|
196235
197295
|
const bytes2 = readFileSync123(p2);
|
|
196236
|
-
const hash3 =
|
|
197296
|
+
const hash3 = createHash49("sha256").update(bytes2).digest("hex");
|
|
196237
197297
|
const pixels = await pixelIssues(bytes2);
|
|
196238
197298
|
return {
|
|
196239
197299
|
exists: true,
|
|
@@ -197060,7 +198120,7 @@ var init_site_member = __esm({
|
|
|
197060
198120
|
});
|
|
197061
198121
|
|
|
197062
198122
|
// src/notify-ping-all.ts
|
|
197063
|
-
import { createHash as
|
|
198123
|
+
import { createHash as createHash51 } from "node:crypto";
|
|
197064
198124
|
async function listApprovedMembers(input) {
|
|
197065
198125
|
const first = await scanMembers(input);
|
|
197066
198126
|
const second = await scanMembers(input);
|
|
@@ -197114,7 +198174,7 @@ async function scanMembers(input) {
|
|
|
197114
198174
|
}
|
|
197115
198175
|
}
|
|
197116
198176
|
function campaignRequestId(campaignId, memberId) {
|
|
197117
|
-
const bytes2 =
|
|
198177
|
+
const bytes2 = createHash51("sha256").update(JSON.stringify(["himi-push-campaign", campaignId, memberId])).digest().subarray(0, 16);
|
|
197118
198178
|
bytes2[6] = bytes2[6] & 15 | 80;
|
|
197119
198179
|
bytes2[8] = bytes2[8] & 63 | 128;
|
|
197120
198180
|
const hex2 = bytes2.toString("hex");
|
|
@@ -197209,7 +198269,9 @@ async function runNotifyPing(flags, io2, deps = {}) {
|
|
|
197209
198269
|
}
|
|
197210
198270
|
async function runAllMembers(args) {
|
|
197211
198271
|
const { input, siteToken: siteToken2, session, requestId: requestId2, flags, io: io2, deps } = args;
|
|
197212
|
-
const
|
|
198272
|
+
const claims = decodeControlTokenClaims(session.controlToken);
|
|
198273
|
+
if (claims?.siteLease) return refuse6(io2, "all_members_not_supported_for_site_app", NOTIFY_HINTS.allMembersSiteApp);
|
|
198274
|
+
const ownerAccountId = claims?.sub;
|
|
197213
198275
|
if (!ownerAccountId) return refuse6(io2, "owner_login_required", NOTIFY_HINTS.ownerLoginMissing(session.loginTarget));
|
|
197214
198276
|
const readiness = await pushSetupRequest({
|
|
197215
198277
|
target: session.target,
|
|
@@ -197681,7 +198743,7 @@ __export(auth_gate_copy_exports, {
|
|
|
197681
198743
|
scanProse: () => scanProse,
|
|
197682
198744
|
scanThrownMessages: () => scanThrownMessages
|
|
197683
198745
|
});
|
|
197684
|
-
import { createHash as
|
|
198746
|
+
import { createHash as createHash52 } from "node:crypto";
|
|
197685
198747
|
import { existsSync as existsSync111, readdirSync as readdirSync44, readFileSync as readFileSync131, writeFileSync as writeFileSync45 } from "node:fs";
|
|
197686
198748
|
import { dirname as dirname58, join as join117, relative as relative24, resolve as resolve81 } from "node:path";
|
|
197687
198749
|
import { fileURLToPath as fileURLToPath37 } from "node:url";
|
|
@@ -197752,7 +198814,7 @@ ${rows}
|
|
|
197752
198814
|
`;
|
|
197753
198815
|
}
|
|
197754
198816
|
function rowId(key3) {
|
|
197755
|
-
return "n_" +
|
|
198817
|
+
return "n_" + createHash52("sha1").update("auth-gate:" + key3).digest("hex").slice(0, 12);
|
|
197756
198818
|
}
|
|
197757
198819
|
function injectGateRows(catalog4, table = loadTable()) {
|
|
197758
198820
|
const prior = catalog4.messages ?? {};
|
|
@@ -197800,7 +198862,7 @@ function loadAppTable(appDir3) {
|
|
|
197800
198862
|
return out2;
|
|
197801
198863
|
}
|
|
197802
198864
|
function nativeRowId(key3) {
|
|
197803
|
-
return "n_" +
|
|
198865
|
+
return "n_" + createHash52("sha1").update("app-native:" + key3).digest("hex").slice(0, 12);
|
|
197804
198866
|
}
|
|
197805
198867
|
function injectNativeRows(catalog4, table, keys) {
|
|
197806
198868
|
const prior = catalog4.messages ?? {};
|
|
@@ -198116,10 +199178,10 @@ var init_auth_gate_copy = __esm({
|
|
|
198116
199178
|
|
|
198117
199179
|
// ../l10n/extract.ts
|
|
198118
199180
|
import { resolve as resolve82, join as join118, relative as relative25, dirname as dirname59 } from "node:path";
|
|
198119
|
-
import { createHash as
|
|
199181
|
+
import { createHash as createHash53 } from "node:crypto";
|
|
198120
199182
|
import { fileURLToPath as fileURLToPath38 } from "node:url";
|
|
198121
199183
|
function keyOf(source) {
|
|
198122
|
-
return "h_" +
|
|
199184
|
+
return "h_" + createHash53("sha1").update(source).digest("hex").slice(0, 12);
|
|
198123
199185
|
}
|
|
198124
199186
|
var ROOT7;
|
|
198125
199187
|
var init_extract = __esm({
|
|
@@ -198859,7 +199921,7 @@ __export(generate_exports, {
|
|
|
198859
199921
|
withHeader: () => withHeader,
|
|
198860
199922
|
writeGenerated: () => writeGenerated
|
|
198861
199923
|
});
|
|
198862
|
-
import { createHash as
|
|
199924
|
+
import { createHash as createHash54 } from "node:crypto";
|
|
198863
199925
|
import { existsSync as existsSync114, mkdirSync as mkdirSync48, readdirSync as readdirSync46, readFileSync as readFileSync134, writeFileSync as writeFileSync48 } from "node:fs";
|
|
198864
199926
|
import { dirname as dirname61, join as join121 } from "node:path";
|
|
198865
199927
|
function withHeader(body) {
|
|
@@ -199026,7 +200088,7 @@ var init_generate = __esm({
|
|
|
199026
200088
|
GENERATED_HEADER = "// @generated by himi base44 screens \u2014 sha256:";
|
|
199027
200089
|
HEADER_RE = /^\/\/ @generated by himi base44 screens — sha256:([0-9a-f]{64})\n/;
|
|
199028
200090
|
ENGINE_FILES = ["tier5-src/_shared/entity-list.ts", "tier5-src/_shared/entity-detail.ts", "tier5-src/_shared/entity-plan.ts", "dev/entity-screens.ts"];
|
|
199029
|
-
sha2566 = (s2) =>
|
|
200091
|
+
sha2566 = (s2) => createHash54("sha256").update(s2).digest("hex");
|
|
199030
200092
|
planFile = (p2) => `${p2.ids.bundleDetail}-plan`;
|
|
199031
200093
|
ident = (p2) => `plan_${p2.ids.detail.replace(/^b44_/, "")}`;
|
|
199032
200094
|
json8 = (v2) => JSON.stringify(v2, null, 2);
|
|
@@ -205152,7 +206214,7 @@ var init_one_app_page = __esm({
|
|
|
205152
206214
|
});
|
|
205153
206215
|
|
|
205154
206216
|
// src/one-app/pages.ts
|
|
205155
|
-
import { createHash as
|
|
206217
|
+
import { createHash as createHash55 } from "node:crypto";
|
|
205156
206218
|
function oneAppPagePlacements(raw) {
|
|
205157
206219
|
const sections = object14(raw.sections);
|
|
205158
206220
|
const placements = [];
|
|
@@ -205214,7 +206276,7 @@ var init_pages = __esm({
|
|
|
205214
206276
|
init_errors2();
|
|
205215
206277
|
object14 = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : {};
|
|
205216
206278
|
pointer = (s2) => s2.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
205217
|
-
hash2 = (s2) =>
|
|
206279
|
+
hash2 = (s2) => createHash55("sha256").update(s2).digest("hex");
|
|
205218
206280
|
ONE_APP_PAGES_BASE = "https://apps.wix.com/social-content/api/v1/pages/";
|
|
205219
206281
|
}
|
|
205220
206282
|
});
|
|
@@ -205227,7 +206289,7 @@ __export(collect_exports, {
|
|
|
205227
206289
|
resolveSourceLocale: () => resolveSourceLocale,
|
|
205228
206290
|
sourceMemberChat: () => sourceMemberChat
|
|
205229
206291
|
});
|
|
205230
|
-
import { createHash as
|
|
206292
|
+
import { createHash as createHash56 } from "node:crypto";
|
|
205231
206293
|
function isObject2(value2) {
|
|
205232
206294
|
return value2 !== null && typeof value2 === "object" && !Array.isArray(value2);
|
|
205233
206295
|
}
|
|
@@ -205343,7 +206405,7 @@ function semanticFingerprint(structure) {
|
|
|
205343
206405
|
}
|
|
205344
206406
|
return JSON.stringify(value2);
|
|
205345
206407
|
};
|
|
205346
|
-
return
|
|
206408
|
+
return createHash56("sha256").update(canonical7(structure, true)).digest("hex");
|
|
205347
206409
|
}
|
|
205348
206410
|
async function collectOneApp(input, deps = {}) {
|
|
205349
206411
|
const locale = resolveSourceLocale(input.locale);
|
|
@@ -206783,7 +207845,7 @@ __export(validate_identity_exports, {
|
|
|
206783
207845
|
ricosTexts: () => ricosTexts,
|
|
206784
207846
|
runOneAppIdentityValidation: () => runOneAppIdentityValidation
|
|
206785
207847
|
});
|
|
206786
|
-
import { createHash as
|
|
207848
|
+
import { createHash as createHash57 } from "node:crypto";
|
|
206787
207849
|
import { existsSync as existsSync123, readFileSync as readFileSync141, writeFileSync as writeFileSync55 } from "node:fs";
|
|
206788
207850
|
import ts17 from "typescript";
|
|
206789
207851
|
import { join as join131, resolve as resolve89 } from "node:path";
|
|
@@ -206871,7 +207933,7 @@ function fixAppName(configSource, slug, displayName3) {
|
|
|
206871
207933
|
function sourceIdentity(evidenceDir) {
|
|
206872
207934
|
const { manifest: manifest2, raw } = verifiedEvidence(evidenceDir);
|
|
206873
207935
|
const bytes2 = readFileSync141(join131(evidenceDir, "business-context.json"));
|
|
206874
|
-
const hash3 =
|
|
207936
|
+
const hash3 = createHash57("sha256").update(bytes2).digest("hex");
|
|
206875
207937
|
if (obj7(manifest2.sha256)["business-context.json"] !== hash3) throw Error("business-context.json differs from the collected evidence.");
|
|
206876
207938
|
const name = obj7(JSON.parse(bytes2.toString("utf8"))).displayName;
|
|
206877
207939
|
if (typeof name !== "string" || !name.trim()) throw Error("The collected business display name is unavailable; recollect the source identity.");
|
|
@@ -206892,7 +207954,7 @@ function sourceIdentity(evidenceDir) {
|
|
|
206892
207954
|
const pagesPath = join131(evidenceDir, "pages-content.json");
|
|
206893
207955
|
if (existsSync123(pagesPath)) {
|
|
206894
207956
|
const pagesBytes = readFileSync141(pagesPath);
|
|
206895
|
-
if (obj7(manifest2.sha256)["pages-content.json"] !==
|
|
207957
|
+
if (obj7(manifest2.sha256)["pages-content.json"] !== createHash57("sha256").update(pagesBytes).digest("hex")) throw Error("pages-content.json differs from the collected evidence.");
|
|
206896
207958
|
for (const document2 of obj7(JSON.parse(pagesBytes.toString("utf8"))).documents ?? []) authoredText.push(...ricosTexts(obj7(obj7(document2).page).documentJson));
|
|
206897
207959
|
}
|
|
206898
207960
|
return { displayName: name, authoredText };
|
|
@@ -206997,7 +208059,7 @@ var init_validate_identity = __esm({
|
|
|
206997
208059
|
});
|
|
206998
208060
|
|
|
206999
208061
|
// src/one-app/invite-drawer.ts
|
|
207000
|
-
import { createHash as
|
|
208062
|
+
import { createHash as createHash58 } from "node:crypto";
|
|
207001
208063
|
import ts18 from "typescript";
|
|
207002
208064
|
function sourceShowsInvite(plan) {
|
|
207003
208065
|
const screens = obj8(plan).screens;
|
|
@@ -207067,7 +208129,7 @@ function withInviteTranslation(catalogText, locale) {
|
|
|
207067
208129
|
existing.translation = translation;
|
|
207068
208130
|
if (typeof existing.key !== "string" || !existing.key) existing.key = "tab.invite";
|
|
207069
208131
|
} else {
|
|
207070
|
-
messages[`h_${
|
|
208132
|
+
messages[`h_${createHash58("sha1").update(INVITE_LABEL).digest("hex").slice(0, 12)}`] = { source: INVITE_LABEL, key: "tab.invite", translation };
|
|
207071
208133
|
}
|
|
207072
208134
|
return `${JSON.stringify({ ...catalog4, messages }, null, 2)}
|
|
207073
208135
|
`;
|
|
@@ -207806,7 +208868,7 @@ var init_generate_cli = __esm({
|
|
|
207806
208868
|
|
|
207807
208869
|
// src/one-app/access.ts
|
|
207808
208870
|
import ts21 from "typescript";
|
|
207809
|
-
import { createHash as
|
|
208871
|
+
import { createHash as createHash59 } from "node:crypto";
|
|
207810
208872
|
function gateKey(layoutItemId) {
|
|
207811
208873
|
let out2 = "g_";
|
|
207812
208874
|
for (const char of layoutItemId.toLowerCase()) out2 += char >= "a" && char <= "z" || char >= "0" && char <= "9" ? char : "_";
|
|
@@ -207865,7 +208927,7 @@ function planAccess(raw, screens, previous = []) {
|
|
|
207865
208927
|
for (const gate of gates.filter((item) => !written.has(item.layoutItemId))) byKey.set(gate.key, [...byKey.get(gate.key) ?? [], gate]);
|
|
207866
208928
|
for (const [key3, group] of byKey) {
|
|
207867
208929
|
if (group.length < 2 && !writtenKeys.has(key3)) continue;
|
|
207868
|
-
for (const gate of group) gate.key = `${key3}_${
|
|
208930
|
+
for (const gate of group) gate.key = `${key3}_${createHash59("sha256").update(gate.layoutItemId).digest("hex").slice(0, 10)}`;
|
|
207869
208931
|
warnings.push(`layout items ${group.map((gate) => gate.layoutItemId).join(", ")} normalize to a gate key another page has: each gets a hash suffix`);
|
|
207870
208932
|
}
|
|
207871
208933
|
if (new Set(gates.map((gate) => gate.key)).size !== gates.length) throw new Error("two layout items still share a gate key after the hash suffix: rename one in the source");
|
|
@@ -208258,7 +209320,7 @@ ${indent}`);
|
|
|
208258
209320
|
});
|
|
208259
209321
|
|
|
208260
209322
|
// src/one-app/access-cli.ts
|
|
208261
|
-
import { createHash as
|
|
209323
|
+
import { createHash as createHash60 } from "node:crypto";
|
|
208262
209324
|
import { existsSync as existsSync127, readFileSync as readFileSync145, rmSync as rmSync38, statSync as statSync33, writeFileSync as writeFileSync58 } from "node:fs";
|
|
208263
209325
|
import { join as join135, resolve as resolve92 } from "node:path";
|
|
208264
209326
|
function parseArgs5(args) {
|
|
@@ -208395,7 +209457,7 @@ function recordedLoginPolicy(evidenceDir) {
|
|
|
208395
209457
|
const expected = manifest2.sha256?.["access-policy.json"];
|
|
208396
209458
|
if (expected === void 0) return void 0;
|
|
208397
209459
|
const bytes2 = readFileSync145(join135(evidenceDir, "access-policy.json"));
|
|
208398
|
-
if (
|
|
209460
|
+
if (createHash60("sha256").update(bytes2).digest("hex") !== expected) throw new Error("access-policy.json does not match the hash recorded in manifest.json.");
|
|
208399
209461
|
const value2 = JSON.parse(bytes2.toString("utf8")).visitorModeEnabled;
|
|
208400
209462
|
return typeof value2 === "boolean" ? value2 : void 0;
|
|
208401
209463
|
}
|
|
@@ -208940,7 +210002,7 @@ __export(cli_exports2, {
|
|
|
208940
210002
|
runOneAppCommand: () => runOneAppCommand
|
|
208941
210003
|
});
|
|
208942
210004
|
import { closeSync as closeSync9, constants as constants9, lstatSync as lstatSync29, mkdirSync as mkdirSync53, openSync as openSync8, readFileSync as readFileSync147, realpathSync as realpathSync17, writeFileSync as writeFileSync59 } from "node:fs";
|
|
208943
|
-
import { createHash as
|
|
210005
|
+
import { createHash as createHash61 } from "node:crypto";
|
|
208944
210006
|
import { isIP as isIP2 } from "node:net";
|
|
208945
210007
|
import { dirname as dirname65, join as join137, parse as parse4, resolve as resolve94 } from "node:path";
|
|
208946
210008
|
function nativeSiteHost(host) {
|
|
@@ -209158,7 +210220,7 @@ validate-payments checks site-bound payment evidence and explicit paid-flow deci
|
|
|
209158
210220
|
throw new OneAppError("artifact_write_failed", "Could not save the migration evidence. Existing files were kept.", { stage });
|
|
209159
210221
|
}
|
|
209160
210222
|
artifacts[name] = path2;
|
|
209161
|
-
hashes[name] =
|
|
210223
|
+
hashes[name] = createHash61("sha256").update(content).digest("hex");
|
|
209162
210224
|
return path2;
|
|
209163
210225
|
};
|
|
209164
210226
|
const progress = (nextStage) => {
|
|
@@ -210830,7 +211892,7 @@ async function readMobileApp(fetchImpl, auth, deps = {}) {
|
|
|
210830
211892
|
}
|
|
210831
211893
|
try {
|
|
210832
211894
|
const collected = await collectOneApp(
|
|
210833
|
-
{ metaSiteId: auth.msid, appInstance: "branded", authorization: auth.token },
|
|
211895
|
+
{ metaSiteId: auth.msid, appInstance: "branded", authorization: auth.current ? await auth.current() : auth.token },
|
|
210834
211896
|
{ fetchImpl, timeoutMs: deps.timeoutMs ?? TIMEOUT_MS5, pages: false, inbox: false }
|
|
210835
211897
|
);
|
|
210836
211898
|
const catalog4 = deps.catalog?.size ? deps.catalog : loadSectionCatalog();
|
|
@@ -212801,7 +213863,7 @@ async function runSiteAnalyze(opts) {
|
|
|
212801
213863
|
if (!ownerSite) throw new Error("no owner site for this run");
|
|
212802
213864
|
const token = await siteToken(ownerSite);
|
|
212803
213865
|
msid = ownerSite;
|
|
212804
|
-
ownerAuth = { token, msid };
|
|
213866
|
+
ownerAuth = { token, msid, ...refreshableSiteToken(ownerSite, token) };
|
|
212805
213867
|
} catch {
|
|
212806
213868
|
msid = opts.siteFlag?.trim() || void 0;
|
|
212807
213869
|
}
|
|
@@ -213362,7 +214424,10 @@ var init_site_create = __esm({
|
|
|
213362
214424
|
var site_oauth_client_exports = {};
|
|
213363
214425
|
__export(site_oauth_client_exports, {
|
|
213364
214426
|
DEFAULT_CLIENT_NAME: () => DEFAULT_CLIENT_NAME,
|
|
214427
|
+
SITE_CLIENT_ENSURE_USAGE: () => SITE_CLIENT_ENSURE_USAGE,
|
|
214428
|
+
SITE_CLIENT_LIST_USAGE: () => SITE_CLIENT_LIST_USAGE,
|
|
213365
214429
|
SITE_CLIENT_USAGE: () => SITE_CLIENT_USAGE,
|
|
214430
|
+
WixTokenError: () => WixTokenError,
|
|
213366
214431
|
isMobileClient: () => isMobileClient,
|
|
213367
214432
|
pickClient: () => pickClient,
|
|
213368
214433
|
runSiteClientEnsure: () => runSiteClientEnsure,
|
|
@@ -213370,6 +214435,27 @@ __export(site_oauth_client_exports, {
|
|
|
213370
214435
|
sameNamedForeignTypes: () => sameNamedForeignTypes,
|
|
213371
214436
|
toRow: () => toRow
|
|
213372
214437
|
});
|
|
214438
|
+
async function requireSiteCredential(msid, seams = {}) {
|
|
214439
|
+
if (process.env.WIX_TEST_TOKEN?.trim() || siteApiKey()) return;
|
|
214440
|
+
const dashboardUrl = `${DASHBOARD_BASE}/${msid}/oauth-apps-settings`;
|
|
214441
|
+
if (!heldWixToken() && !(seams.wixCliOnPath ?? wixCliOnPath)()) {
|
|
214442
|
+
throw Object.assign(
|
|
214443
|
+
new WixTokenError(
|
|
214444
|
+
"wix_cli_required",
|
|
214445
|
+
`\`himi site client\` needs a site-scoped Wix credential for site ${msid}, and this machine has none: WIX_TOKEN and WIX_API_KEY are not set and the \`wix\` CLI is not on PATH. A himi login (\`--device\`, \`--wix\`, \`--browser\`) signs you in to Himi only; it cannot read or create the site's OAuth client.`,
|
|
214446
|
+
`${WIX_CLI_FIX}. Without any of these, the site owner can copy the client id from ${dashboardUrl}.`
|
|
214447
|
+
),
|
|
214448
|
+
{ dashboardUrl }
|
|
214449
|
+
);
|
|
214450
|
+
}
|
|
214451
|
+
try {
|
|
214452
|
+
await (seams.mint ?? siteToken)(msid);
|
|
214453
|
+
} catch (e2) {
|
|
214454
|
+
if (!(e2 instanceof WixTokenError) && heldWixToken()) throw e2;
|
|
214455
|
+
const err = e2 instanceof WixTokenError ? e2 : new WixTokenError("wix_cli_token_failed", e2?.message ?? String(e2), WIX_CLI_FIX);
|
|
214456
|
+
throw Object.assign(err, { dashboardUrl });
|
|
214457
|
+
}
|
|
214458
|
+
}
|
|
213373
214459
|
function explainOwnerFailure(err, msid) {
|
|
213374
214460
|
if (!(err instanceof WixApiError)) return void 0;
|
|
213375
214461
|
if (err.status === 401 || err.status === 403) {
|
|
@@ -213413,6 +214499,7 @@ function toRow(app, redirectUri) {
|
|
|
213413
214499
|
async function runSiteClientList(opts = {}) {
|
|
213414
214500
|
const msid = resolveSiteId(opts.siteFlag);
|
|
213415
214501
|
const redirectUri = opts.redirectUri?.trim() || DEFAULT_REDIRECT_URI;
|
|
214502
|
+
if (!opts.call || opts.credential) await requireSiteCredential(msid, opts.credential);
|
|
213416
214503
|
const call = opts.call ?? ownerTransport(msid);
|
|
213417
214504
|
const { apps, truncated, total } = await queryClients(call, msid);
|
|
213418
214505
|
return {
|
|
@@ -213447,12 +214534,13 @@ async function runSiteClientEnsure(opts = {}) {
|
|
|
213447
214534
|
const msid = resolveSiteId(opts.siteFlag);
|
|
213448
214535
|
const name = opts.name?.trim() || DEFAULT_CLIENT_NAME;
|
|
213449
214536
|
const redirectUri = opts.redirectUri?.trim() ? assertRedirectUri(opts.redirectUri) : DEFAULT_REDIRECT_URI;
|
|
213450
|
-
const call = opts.call ?? ownerTransport(msid);
|
|
213451
214537
|
const dashboardUrl = `${DASHBOARD_BASE}/${msid}/oauth-apps-settings`;
|
|
213452
214538
|
const base = { siteId: msid, name, redirectUri, dashboardUrl };
|
|
213453
214539
|
if (opts.siteUrl !== void 0 && opts.siteUrl.trim() !== "") {
|
|
213454
|
-
assertAbsoluteHttpUrl(opts.siteUrl.trim(), { exit: 2, usage:
|
|
214540
|
+
assertAbsoluteHttpUrl(opts.siteUrl.trim(), { exit: 2, usage: SITE_CLIENT_ENSURE_USAGE });
|
|
213455
214541
|
}
|
|
214542
|
+
if (!opts.call || opts.credential) await requireSiteCredential(msid, opts.credential);
|
|
214543
|
+
const call = opts.call ?? ownerTransport(msid);
|
|
213456
214544
|
const found = opts.new === true ? void 0 : await queryClients(call, msid);
|
|
213457
214545
|
const existing = found ? pickClient(found.apps, name, redirectUri) : void 0;
|
|
213458
214546
|
const alreadyUsable = existing && (existing.allowedRedirectUris ?? []).includes(redirectUri);
|
|
@@ -213577,14 +214665,17 @@ function binding(result, msid, opts) {
|
|
|
213577
214665
|
...redirectUri ? { redirectUri } : {}
|
|
213578
214666
|
};
|
|
213579
214667
|
}
|
|
213580
|
-
var SITE_CLIENT_USAGE, DEFAULT_CLIENT_NAME;
|
|
214668
|
+
var SITE_CLIENT_ENSURE_USAGE, SITE_CLIENT_LIST_USAGE, SITE_CLIENT_USAGE, DEFAULT_CLIENT_NAME;
|
|
213581
214669
|
var init_site_oauth_client = __esm({
|
|
213582
214670
|
"src/site-oauth-client.ts"() {
|
|
213583
214671
|
init_define_HHP_CATALOG();
|
|
213584
214672
|
init_wix_owner();
|
|
214673
|
+
init_wix_owner();
|
|
213585
214674
|
init_types2();
|
|
213586
214675
|
init_site_create();
|
|
213587
|
-
|
|
214676
|
+
SITE_CLIENT_ENSURE_USAGE = "himi site client ensure --site <msid> [--name <name>] [--redirect-uri <uri>] [--new] [--write-provisioning [path]] [--site-url <url>] [--json] --yes";
|
|
214677
|
+
SITE_CLIENT_LIST_USAGE = "himi site client list --site <msid> [--redirect-uri <uri>] [--json]";
|
|
214678
|
+
SITE_CLIENT_USAGE = `${SITE_CLIENT_ENSURE_USAGE} | ${SITE_CLIENT_LIST_USAGE}`;
|
|
213588
214679
|
DEFAULT_CLIENT_NAME = "himi client";
|
|
213589
214680
|
}
|
|
213590
214681
|
});
|
|
@@ -214783,10 +215874,6 @@ function nativeCapture(devices, opts) {
|
|
|
214783
215874
|
frames.push({ surface: platform, screen, variant, skipped: { reason: `no ${platform}${variant === "tablet" ? " tablet" : ""} device passed (${flag})` } });
|
|
214784
215875
|
continue;
|
|
214785
215876
|
}
|
|
214786
|
-
if (Object.keys(entry.params ?? {}).length) {
|
|
214787
|
-
frames.push({ surface: platform, screen, variant, skipped: { reason: "screen params are not carried by the Player's deep link yet (#5377)" } });
|
|
214788
|
-
continue;
|
|
214789
|
-
}
|
|
214790
215877
|
try {
|
|
214791
215878
|
const mismatch = platform === "ios" ? await originMismatch(id) : "";
|
|
214792
215879
|
if (mismatch) {
|
|
@@ -216222,9 +217309,12 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
216222
217309
|
later complete read, moving the resolved clientId between
|
|
216223
217310
|
runs. --name cannot narrow it (the name is applied after
|
|
216224
217311
|
the rows arrive), so the recovery is the dashboard. Auth
|
|
216225
|
-
is SITE-scoped
|
|
216226
|
-
|
|
216227
|
-
|
|
217312
|
+
is SITE-scoped: WIX_API_KEY, else the account token in
|
|
217313
|
+
WIX_TOKEN exchanged for the site (no wix CLI needed),
|
|
217314
|
+
else 'wix token --site <msid>'. Owner-of-that-site only.
|
|
217315
|
+
himi site client list --site <msid> [--redirect-uri <uri>] [--json]
|
|
217316
|
+
every Headless OAuth client on the site (read-only). With
|
|
217317
|
+
--redirect-uri, each row reports hasRedirect/shippable. Act
|
|
216228
217318
|
on the 'shippable' column, not 'hasRedirect': shippable
|
|
216229
217319
|
also requires a MOBILE applicationType, because ensure
|
|
216230
217320
|
refuses a WEB client \u2014 so a WEB one carrying your
|
|
@@ -216366,7 +217456,7 @@ var COMMANDS = [
|
|
|
216366
217456
|
{ name: "connector", summary: "personal access tokens for the hosted MCP connector (Wix Native App Builder), for an AI tool that cannot sign in with OAuth (e.g. Base44's builder): `token create` opens a Wix sign-in page and prints a long-lived token once, to paste into the tool as `Authorization: Bearer <token>`; `token list` / `token revoke <id>` manage them with the `himi login --browser` token. The token can only build and publish DRAFTS.", required: "token create [--name <n>] [--days <1-90>] [--no-open] | token list | token revoke <id> [--target <t>]" },
|
|
216367
217457
|
{ name: "notify", summary: "Hosted --all-members requires --yes for a live send; --dry-run checks ownership/readiness and counts approved recipients without sending. `setup` optionally configures Branded/Ping from local customer key files; `status --refresh` reads live backend readiness. Setup may be deferred while building. These use serve-control and require owner plus Wix account authentication. `send`, `tokens`, `doctor`: send a REAL push notification to registered devices (RFC 0036 WS5) \u2014 APNs .p8 over HTTP/2 for iOS, FCM v1 for Android. `send` targets one device (--token / --device <registry id>) or fans out to the whole app (--all), reporting a per-device result; a token the provider says is uninstalled (APNs 410 Unregistered / FCM UNREGISTERED) is auto-disabled, while a merely wrong one (BadDeviceToken \u2014 usually a sandbox/production mismatch) is recorded and left enabled. `tokens` lists the registry. `doctor` reports which credentials resolve and which sender each platform picks. Talks to the admin-server via --admin-url/HIMALAYA_ADMIN_URL, authenticated with --admin-session/HIMALAYA_ADMIN_SESSION. `send --provider ping` is the hosted alternative: the serve plane sends to one site member (--member-email) or all approved members (--all-members) through Ping as Himalaya, with owner login instead of provider keys, and reports acceptance, never delivery. NOT `himi push`, which publishes a release.", required: "setup|status [--content <dir>] [--target <t>] [--refresh] [--yes] [--no-push-setup] | send --provider ping [--content <dir>] [--app <a>] [--site <msid>] (--member-email <email> | --all-members (--dry-run | --yes)) --title <s> [--body <s>] --link <url> [--request-id <uuid>] [--dry-run] [--json] | send|tokens|doctor [--app <a>] [--token <t> | --device <id> | --all] [--title <s>] [--body <s>] [--link <url>] [--platform ios|android] [--badge <n>] [--channel <id>] [--silent] [--dry-run] [--json]" },
|
|
216368
217458
|
{ name: "signing", summary: "READ-ONLY App Store Connect inventory for customer BYO TestFlight readiness. `inspect` lists whether the bundle id, distribution certificate, IOS_APP_STORE profile, and ASC app record exist for --bundle-id / --team-id using a local ASC .p8 (flags or ASC_KEY_* env). Never uploads or mutates Apple resources. Optional --cert-file/--profile-file classify on-disk material.", required: "inspect --bundle-id <id> --team-id <id> --asc-key-file <path> --asc-key-id <id> --asc-issuer-id <id> [--cert-file <p12> --cert-password <pw> --profile-file <mobileprovision>] [--json]" },
|
|
216369
|
-
{ name: "site", summary: "PROVISION a Wix project, then analyze or extend it. `create` is the one door that makes a site instead of adopting one: POST /funnel/projects/v1/create (a WIX site, a HEADLESS backend, a BRANDED_APP, or a VIBE site), and for headless it also mints the OAuth app whose id IS the `WIX_CLIENT_ID` \u2014 with --redirect-uri already registered, because an unregistered redirect makes native signInDirect fail at redirect-session. `--verticals` REQUIRES `--template` and reports only what Wix confirmed: measured, installing onto a project created from the BLANK template returns 200 while the vertical's API answers 428 forever, because there is no site for it to attach to (the install asks for CREATE_SITE). A real template ships its verticals installed and populated, and installing further ones onto it then works. It MUTATES your Wix account and needs --yes; without it you get the payload and nothing is sent. `list` is the read-only site inventory (with each site's premium flag, which is what explains an installed-but-428 vertical). Auth is the account-scoped `wix token` (no --site), falling back to WIX_API_KEY + WIX_ACCOUNT_ID. `client` is the same OAuth step for a site that ALREADY exists \u2014 the one himi adopts rather than makes \u2014 so a clientId no longer means a manual trip to the dashboard: `client ensure` reconciles rather than mints, because a site can already carry a client with NO registered redirect and shipping that one fails signInDirect at runtime; it reuses a client that carries --redirect-uri, PATCHes one that matches --name but lacks it (unioning, so another app's redirect survives), and creates only when there is nothing to reuse (--new forces a fresh one). --name IS the idempotency key. `client` auth is SITE-scoped (`wix token --site <msid>`) because minting is owner-of-that-site, and --yes gates every mutation: a site that already has a usable client resolves WITHOUT it, but --write-provisioning needs --yes even then because it rewrites a manifest on disk (the dry run's planned.provisioning names the file). That query endpoint IGNORES paging (measured: query.paging, cursorPaging and a top-level paging all return the full set at offset 0), so when pagingMetadata reports more clients than came back, `ensure` REFUSES EVERY outcome \u2014 create, patch AND reuse. Reuse is refused too because pickClient breaks ties on the OLDEST createdDate, so an omitted older same-named MOBILE client with the same redirect would win a later complete read and the resolved clientId would MOVE between runs \u2014 and it gets written into provisioning.json; convergence is what makes a stray duplicate untidy rather than harmful. --name cannot narrow the query (no filter is sent; the name is applied to the rows after they arrive), so the recovery is the dashboard; --new skips the query entirely. A `patched` result is verified against what Wix STORED \u2014 the redirect list is read off the PATCH response, and re-read via GET when the response omits it, because falling back to the list himi just sent would make the guard pass vacuously on exactly the silent no-op it exists to catch. `client list` is the read-only inventory of a site's clients: act on its `shippable` column rather than `hasRedirect`, because shippable ALSO requires a MOBILE applicationType and `ensure` refuses a WEB client \u2014 a WEB one carrying your redirect looks right and is not a candidate \u2014 and it sets truncated:true rather than presenting a partial inventory as the whole one. `analyze --read-only` returns API-only generation context as JSON (identity, access probes, CMS permissions and selected redacted Velo source); it needs no browser and never uploads or applies anything. A URL is optional there: `--url` lets it read the published page's Velo code-app ids (credential-free, pinned transport) so the backend source is found on sites where the owner code-app probe 404s. `analyze` reads a site into a business-book folder (REST + Playwright, GET-only); `--url` alone is the visitor-only pass over the published pages, and `--client-id` adds the vertical probes and the app binding `--apply` requires; with no Playwright/Chromium it refuses before any work (code \"browser_unavailable\", the install command in `fix`) unless `--no-browser` asks for the static-HTML-only pass; `site function` list/get/put/publish/invokes that site's Velo HTTP functions and is not `himi functions` (serve-plane jobs). `--apply` bakes into a brandable shell (a site shell needs no `--client-id`: it is visitor-only and binds no client); `--shell` takes the same names `himi dist --shell` does and defaults to branded-lite, and a shell that ships no prepare:customer is refused by name rather than half-built. `--shell brandy` (the site shell, RFC 0062) also derives the site's page map from its published pages and header menu \u2014 Home first, up to four tabs for the pages a visitor returns to, the rest in the drawer \u2014 into the overlay's `site` block, so it can be edited before `--apply`; only a site shell ever receives that block. It never overwrites any shell's committed apps/<shell>/provisioning.json. `member-app set|clear|show <msid>` is the site's member app in Spaces (#4091): the himi app the site's members open in Spaces Lite instead of Branded Lite. `set --app <id>` takes the site's own app or one your account owns (an owned app not yet tied to the site is linked first; another account's app is refused, 403); `clear` returns the site to Branded Lite; `show` prints the pick plus the COMPUTED verdict \u2014 the picked release's requirements judged against the Spaces host manifest (checkHostCompatibility, `--platform` to judge one phone platform) \u2014 and `reason` when it falls back to Branded Lite. Auth is your `himi login` control token plus the account `wix token`, which the plane uses to verify you own the site.", required: "create <name> [--type wix|headless|branded-app|vibe] [--template <guid>] [--verticals stores,bookings,\u2026] [--folder <guid>] [--redirect-uri <uri>] [--no-oauth-app] [--write-provisioning [path]] [--site-url <url>] [--json] --yes | list | client ensure|list --site <msid> [--name <name>] [--redirect-uri <uri>] [--new] [--write-provisioning [path]] [--site-url <url>] [--json] --yes | analyze --read-only [--site <msid>] [--client-id <id>] [--url <https>] [--json] | analyze --url <https> [--client-id <id>] [--site <msid>] [--out <dir>] [--redirect-uri <uri>] [--apply] [--no-browser] [--shell " + SHELL_ENUM + "] | function list|get|put|publish|invoke [--site <msid>] [--url <https>] [--method GET|POST|PUT|DELETE] [--source <file>] [--body <json>] [--publish] [--invoke] | member-app set|clear|show <msid> [--app <id>] [--platform ios|android]" },
|
|
217459
|
+
{ name: "site", summary: "PROVISION a Wix project, then analyze or extend it. `create` is the one door that makes a site instead of adopting one: POST /funnel/projects/v1/create (a WIX site, a HEADLESS backend, a BRANDED_APP, or a VIBE site), and for headless it also mints the OAuth app whose id IS the `WIX_CLIENT_ID` \u2014 with --redirect-uri already registered, because an unregistered redirect makes native signInDirect fail at redirect-session. `--verticals` REQUIRES `--template` and reports only what Wix confirmed: measured, installing onto a project created from the BLANK template returns 200 while the vertical's API answers 428 forever, because there is no site for it to attach to (the install asks for CREATE_SITE). A real template ships its verticals installed and populated, and installing further ones onto it then works. It MUTATES your Wix account and needs --yes; without it you get the payload and nothing is sent. `list` is the read-only site inventory (with each site's premium flag, which is what explains an installed-but-428 vertical). Auth is the account-scoped `wix token` (no --site), falling back to WIX_API_KEY + WIX_ACCOUNT_ID. `client` is the same OAuth step for a site that ALREADY exists \u2014 the one himi adopts rather than makes \u2014 so a clientId no longer means a manual trip to the dashboard: `client ensure` reconciles rather than mints, because a site can already carry a client with NO registered redirect and shipping that one fails signInDirect at runtime; it reuses a client that carries --redirect-uri, PATCHes one that matches --name but lacks it (unioning, so another app's redirect survives), and creates only when there is nothing to reuse (--new forces a fresh one). --name IS the idempotency key. `client` auth is SITE-scoped (WIX_API_KEY, else the owner's account token in WIX_TOKEN exchanged for that site, else `wix token --site <msid>`) because minting is owner-of-that-site, and --yes gates every mutation: a site that already has a usable client resolves WITHOUT it, but --write-provisioning needs --yes even then because it rewrites a manifest on disk (the dry run's planned.provisioning names the file). That query endpoint IGNORES paging (measured: query.paging, cursorPaging and a top-level paging all return the full set at offset 0), so when pagingMetadata reports more clients than came back, `ensure` REFUSES EVERY outcome \u2014 create, patch AND reuse. Reuse is refused too because pickClient breaks ties on the OLDEST createdDate, so an omitted older same-named MOBILE client with the same redirect would win a later complete read and the resolved clientId would MOVE between runs \u2014 and it gets written into provisioning.json; convergence is what makes a stray duplicate untidy rather than harmful. --name cannot narrow the query (no filter is sent; the name is applied to the rows after they arrive), so the recovery is the dashboard; --new skips the query entirely. A `patched` result is verified against what Wix STORED \u2014 the redirect list is read off the PATCH response, and re-read via GET when the response omits it, because falling back to the list himi just sent would make the guard pass vacuously on exactly the silent no-op it exists to catch. `client list` is the read-only inventory of a site's clients: act on its `shippable` column rather than `hasRedirect`, because shippable ALSO requires a MOBILE applicationType and `ensure` refuses a WEB client \u2014 a WEB one carrying your redirect looks right and is not a candidate \u2014 and it sets truncated:true rather than presenting a partial inventory as the whole one. `analyze --read-only` returns API-only generation context as JSON (identity, access probes, CMS permissions and selected redacted Velo source); it needs no browser and never uploads or applies anything. A URL is optional there: `--url` lets it read the published page's Velo code-app ids (credential-free, pinned transport) so the backend source is found on sites where the owner code-app probe 404s. `analyze` reads a site into a business-book folder (REST + Playwright, GET-only); `--url` alone is the visitor-only pass over the published pages, and `--client-id` adds the vertical probes and the app binding `--apply` requires; with no Playwright/Chromium it refuses before any work (code \"browser_unavailable\", the install command in `fix`) unless `--no-browser` asks for the static-HTML-only pass; `site function` list/get/put/publish/invokes that site's Velo HTTP functions and is not `himi functions` (serve-plane jobs). `--apply` bakes into a brandable shell (a site shell needs no `--client-id`: it is visitor-only and binds no client); `--shell` takes the same names `himi dist --shell` does and defaults to branded-lite, and a shell that ships no prepare:customer is refused by name rather than half-built. `--shell brandy` (the site shell, RFC 0062) also derives the site's page map from its published pages and header menu \u2014 Home first, up to four tabs for the pages a visitor returns to, the rest in the drawer \u2014 into the overlay's `site` block, so it can be edited before `--apply`; only a site shell ever receives that block. It never overwrites any shell's committed apps/<shell>/provisioning.json. `member-app set|clear|show <msid>` is the site's member app in Spaces (#4091): the himi app the site's members open in Spaces Lite instead of Branded Lite. `set --app <id>` takes the site's own app or one your account owns (an owned app not yet tied to the site is linked first; another account's app is refused, 403); `clear` returns the site to Branded Lite; `show` prints the pick plus the COMPUTED verdict \u2014 the picked release's requirements judged against the Spaces host manifest (checkHostCompatibility, `--platform` to judge one phone platform) \u2014 and `reason` when it falls back to Branded Lite. Auth is your `himi login` control token plus the account `wix token`, which the plane uses to verify you own the site.", required: "create <name> [--type wix|headless|branded-app|vibe] [--template <guid>] [--verticals stores,bookings,\u2026] [--folder <guid>] [--redirect-uri <uri>] [--no-oauth-app] [--write-provisioning [path]] [--site-url <url>] [--json] --yes | list | client ensure|list --site <msid> [--name <name>] [--redirect-uri <uri>] [--new] [--write-provisioning [path]] [--site-url <url>] [--json] --yes | analyze --read-only [--site <msid>] [--client-id <id>] [--url <https>] [--json] | analyze --url <https> [--client-id <id>] [--site <msid>] [--out <dir>] [--redirect-uri <uri>] [--apply] [--no-browser] [--shell " + SHELL_ENUM + "] | function list|get|put|publish|invoke [--site <msid>] [--url <https>] [--method GET|POST|PUT|DELETE] [--source <file>] [--body <json>] [--publish] [--invoke] | member-app set|clear|show <msid> [--app <id>] [--platform ios|android]" },
|
|
216370
217460
|
{ name: "base44", summary: "read a BASE44 app into an app book (book.json + BOOK.md) for the agent building a Himi app from it \u2014 the Base44 counterpart of `site analyze`, READ-ONLY. `analyze --url <published app>` is the VISITOR pass: the app id, name, favicon and colours from the published SPA, its router paths, and screenshots + look tokens from the Playwright crawl. `analyze --app-id <id>` adds the OWNER pass and needs a session: the project source under <out>/source/ (the read half of `base44 eject` \u2014 GET api/apps/<id>/eject \u2014 through the same deny-list and secret scan `himi push` uses, widened by the book's token shapes; `eject` itself is never run because it CREATES a copy of the app), every entity's JSON schema, required fields and RLS rules with up to --sample redacted rows (default 5, 0 = off), backend functions, agents, connectors (names and scopes only, never tokens), secret NAMES (never values), auth visibility + providers, and the route \u2192 component \u2192 entities map from the source router. Every chapter it could not read is listed in `gaps` rather than failing the run. `login` runs Base44's device sign-in and stores the session in ~/.himi/base44/session.json (never the repo; --from-base44-cli imports `npx base44 login`'s session instead); BASE44_ACCESS_TOKEN in the environment wins, for CI. `whoami` prints who is signed in (never the token); `logout` removes the stored session. `auth-check --url <tenant> --ios-app-id <PREFIX.bundle.id>` and/or `--android-package <package> --android-sha256 <fingerprint>` checks public native-login associations and prints missing entries; it never reads an owner token. --json prints the book itself. himi docs base44-app-context. `adopt` turns the book into a reviewable base44-entities.ts of ADOPTED entity + function declarations for config.ts (never edits config.ts, never overwrites); `entities query` is READ-ONLY and reports, per declared entity, ownership, row count and schema drift against the live app, plus foreign entities. `entities create` provisions the app's OWNED Himi<App>* entities: Base44's schema write is a destructive full-set sync, so the single PUT carries every entity in a freshly read eject snapshot (foreign ones verbatim) and the run refuses BEFORE sending when one would be dropped, the snapshot is unreadable or empty, or it moved since the plan; removing an owned field/entity needs --allow-destructive, rewriting owned RLS needs --apply-permissions. `entities seed` bulk-inserts seed rows into empty owned entities only (--ai writes base44-seed.json offline). `functions deploy` ships owned functions one PUT each, never the bulk sync or DELETE, and refuses a name deployed by someone else. All three print a plan and write only with --yes, which needs a `login --write` (apps:write) session. `types` writes tier5-src/_shared/base44-entities.ts \u2014 a row type and a typed `entities<Row>()` handle per declared entity, byte-stable \u2014 and `himi validate` reports base44-types-stale when that file falls behind the block (nothing when it is absent). himi docs base44-entities. `screens` (base44-starter packages) writes one generated list + detail screen per declared entity over the template's shared engine, with write controls gated by the entity's rls; an unchanged config reports every file `unchanged`, a hand-edited generated file is `skipped-edited` unless --force; never calls Base44. himi docs base44-app-to-himi-app", required: "analyze (--url <https://\u2026> | --app-id <id>) [--out .himi/base44-book] [--sample <n>] [--json] | adopt [--book .himi/base44-book] [--entities A,B] [--write [path]] [--json] | entities query [--content <dir>] [--all] [--json] | entities create [--app <a>] [--yes] [--allow-destructive] [--apply-permissions] [--empty-app-ok] | entities seed [--app <a>] [--yes] [--only A,B] [--ai] | functions deploy [--app <a>] [--yes] [--only a,b] | types [--content <dir>] [--json] | screens [--content <dir>] [--force] [--dry-run] [--json] | login [--write] [--from-base44-cli] | whoami | logout | auth-check --url <https://tenant> [--ios-app-id <PREFIX.bundle.id>] [--android-package <package> --android-sha256 <fingerprint>]" },
|
|
216371
217461
|
{ name: "doctor", summary: 'off-VPN preflight in one shot: probe the PUBLIC data plane (www.wixapis.com \u2014 reachable off-VPN), the INTERNAL serve/control plane for the selected target (VPN-gated), and report auth state (dpx session on disk + stored control token). --dpx additionally runs a live, EADDRINUSE-safe `dpx whoami`. Machine-readable with --json (an unreachable internal plane carries a stable code:"needs_vpn" so an agent branches on the code, not the prose); human-readable otherwise. Also reports whether Playwright and its Chromium are installed (code:"browser_unavailable" + the exact `fix` command when not \u2014 `himi site analyze`, `render --png` and the screenshot paths need them); --install-browser downloads the Chromium the CLI\'s own Playwright launches, then re-checks. Never loads the authoring runtime \u2014 works off-repo.', required: "[--target <t>] [--dpx] [--install-browser] [--json] [--data-url <url>] [--timeout <ms>]" },
|
|
216372
217462
|
{ name: "upgrade", summary: "install the newest published CLI (`npm i -g @wix/himalaya-cli@latest`) and report what moved. This is the explicit door: himi also updates itself when the running build is more than a week old \u2014 unattended it just does it and re-runs your command, at a terminal it asks first \u2014 and `HIMI_NO_UPDATE_CHECK=1` turns that off, leaving this command as the way to catch up. Reports `unchanged` rather than claiming success when npm exits 0 without moving the version, which is what a registry mirror serving its own pinned copy looks like.", required: "[--json]" },
|
|
@@ -216647,7 +217737,7 @@ init_store();
|
|
|
216647
217737
|
init_wix_placeholders();
|
|
216648
217738
|
init_lint_report();
|
|
216649
217739
|
import { mkdtempSync as mkdtempSync2, readFileSync as readFileSync79, existsSync as existsSync69, rmSync as rmSync19 } from "node:fs";
|
|
216650
|
-
import { createHash as
|
|
217740
|
+
import { createHash as createHash31 } from "node:crypto";
|
|
216651
217741
|
import { tmpdir as tmpdir3 } from "node:os";
|
|
216652
217742
|
import { join as join66, resolve as resolve52, basename as basename18 } from "node:path";
|
|
216653
217743
|
|
|
@@ -217141,7 +218231,7 @@ async function templateCommand(ctx) {
|
|
|
217141
218231
|
if (!iconPath) return void 0;
|
|
217142
218232
|
try {
|
|
217143
218233
|
const bytes2 = readFileSync79(iconPath);
|
|
217144
|
-
return { bytes: bytes2, hash:
|
|
218234
|
+
return { bytes: bytes2, hash: createHash31("sha256").update(bytes2).digest("hex") };
|
|
217145
218235
|
} catch {
|
|
217146
218236
|
return void 0;
|
|
217147
218237
|
}
|
|
@@ -217152,7 +218242,7 @@ async function templateCommand(ctx) {
|
|
|
217152
218242
|
template: name,
|
|
217153
218243
|
app: templateAppId,
|
|
217154
218244
|
published: false,
|
|
217155
|
-
sourceHash:
|
|
218245
|
+
sourceHash: createHash31("sha256").update(JSON.stringify(catalogView())).digest("hex"),
|
|
217156
218246
|
iconHash: launcherIcon()?.hash ?? null
|
|
217157
218247
|
});
|
|
217158
218248
|
return 0;
|
|
@@ -218192,7 +219282,7 @@ init_attestation();
|
|
|
218192
219282
|
init_wix_placeholders();
|
|
218193
219283
|
init_lint_report();
|
|
218194
219284
|
import { existsSync as existsSync92, readFileSync as readFileSync102, rmSync as rmSync24 } from "node:fs";
|
|
218195
|
-
import { createHash as
|
|
219285
|
+
import { createHash as createHash42 } from "node:crypto";
|
|
218196
219286
|
import { join as join93 } from "node:path";
|
|
218197
219287
|
init_crawl_layers();
|
|
218198
219288
|
init_cli_shared();
|
|
@@ -218636,7 +219726,7 @@ async function testCommand(ctx) {
|
|
|
218636
219726
|
sourceArchiveHash,
|
|
218637
219727
|
gitDiffHash: attestation.gitDiffHash,
|
|
218638
219728
|
gitUntrackedHash: attestation.gitUntrackedHash,
|
|
218639
|
-
testConfigHash: capturedConfig == null ? "absent" :
|
|
219729
|
+
testConfigHash: capturedConfig == null ? "absent" : createHash42("sha256").update(capturedConfig).digest("hex"),
|
|
218640
219730
|
testRunId: attestation.runId
|
|
218641
219731
|
};
|
|
218642
219732
|
}
|
|
@@ -219086,7 +220176,7 @@ init_release();
|
|
|
219086
220176
|
init_attestation();
|
|
219087
220177
|
init_preview_surfaces();
|
|
219088
220178
|
init_lint_report();
|
|
219089
|
-
import { createHash as
|
|
220179
|
+
import { createHash as createHash43 } from "node:crypto";
|
|
219090
220180
|
import { existsSync as existsSync97 } from "node:fs";
|
|
219091
220181
|
import { join as join100, relative as relative22 } from "node:path";
|
|
219092
220182
|
init_owner_claim();
|
|
@@ -219379,7 +220469,7 @@ async function pushCommand(ctx) {
|
|
|
219379
220469
|
let localSourceHash;
|
|
219380
220470
|
try {
|
|
219381
220471
|
const { collectAppSource: collectAppSource2, zipAppSource: zipAppSource2 } = await Promise.resolve().then(() => (init_app_source(), app_source_exports));
|
|
219382
|
-
localSourceHash =
|
|
220472
|
+
localSourceHash = createHash43("sha256").update(zipAppSource2(collectAppSource2(dir).entries).toString("base64")).digest("hex");
|
|
219383
220473
|
} catch {
|
|
219384
220474
|
}
|
|
219385
220475
|
const staleShared = staleSharedWarnings(report8);
|
|
@@ -221177,7 +222267,7 @@ init_define_HHP_CATALOG();
|
|
|
221177
222267
|
init_lint_report();
|
|
221178
222268
|
init_cli_shared();
|
|
221179
222269
|
import { readFileSync as readFileSync114, existsSync as existsSync102 } from "node:fs";
|
|
221180
|
-
import { createHash as
|
|
222270
|
+
import { createHash as createHash44 } from "node:crypto";
|
|
221181
222271
|
var PATCH_HELP = `himi patch \u2014 change ONE item of a published app, from a raw file, on a machine
|
|
221182
222272
|
that does not have the content package.
|
|
221183
222273
|
|
|
@@ -221384,7 +222474,7 @@ async function patchCommand(ctx) {
|
|
|
221384
222474
|
});
|
|
221385
222475
|
}
|
|
221386
222476
|
const bytes2 = readFileSync114(file2);
|
|
221387
|
-
const sha3 =
|
|
222477
|
+
const sha3 = createHash44("sha256").update(bytes2).digest("hex");
|
|
221388
222478
|
const forScreens = (str3(flags["for-screen"]) ?? "").split(",").map((s2) => s2.trim()).filter(Boolean);
|
|
221389
222479
|
if (flags["no-rebind"] !== void 0 && flags["no-rebind"] !== true) {
|
|
221390
222480
|
io2.error(JSON.stringify({ ok: false, error: "no_rebind_takes_no_value", message: "--no-rebind is a switch and takes no value; pass it bare.", usage: PATCH_USAGE }));
|
|
@@ -223127,18 +224217,41 @@ init_cli_shared();
|
|
|
223127
224217
|
var PUBLIC_WIX_API_BASE = "https://www.wixapis.com";
|
|
223128
224218
|
async function probeReachable(url, opts = {}) {
|
|
223129
224219
|
if (!url) return { url, reachable: false, error: "no url configured for this plane" };
|
|
223130
|
-
const { timeoutMs = DOCTOR_TIMEOUT_MS, fetchImpl = fetch } = opts;
|
|
223131
|
-
const
|
|
223132
|
-
|
|
223133
|
-
|
|
223134
|
-
|
|
223135
|
-
|
|
223136
|
-
|
|
223137
|
-
|
|
223138
|
-
|
|
223139
|
-
|
|
224220
|
+
const { timeoutMs = DOCTOR_TIMEOUT_MS, fetchImpl = fetch, retries = 1 } = opts;
|
|
224221
|
+
const attempts = retries + 1;
|
|
224222
|
+
for (let attempt = 1; ; attempt++) {
|
|
224223
|
+
const ctrl = new AbortController();
|
|
224224
|
+
let timedOut = false;
|
|
224225
|
+
const timer = setTimeout(() => {
|
|
224226
|
+
timedOut = true;
|
|
224227
|
+
ctrl.abort();
|
|
224228
|
+
}, timeoutMs);
|
|
224229
|
+
try {
|
|
224230
|
+
const resp = await fetchImpl(url, { method: "GET", signal: ctrl.signal, redirect: "manual" });
|
|
224231
|
+
return { url, reachable: true, status: resp.status };
|
|
224232
|
+
} catch (e2) {
|
|
224233
|
+
if (!timedOut) return { url, reachable: false, error: e2.message };
|
|
224234
|
+
if (attempt < attempts) continue;
|
|
224235
|
+
return {
|
|
224236
|
+
url,
|
|
224237
|
+
reachable: false,
|
|
224238
|
+
timedOut: true,
|
|
224239
|
+
timeoutMs,
|
|
224240
|
+
error: `timed out after ${timeoutMs}ms${attempts > 1 ? ` (${attempts} attempts)` : ""}`
|
|
224241
|
+
};
|
|
224242
|
+
} finally {
|
|
224243
|
+
clearTimeout(timer);
|
|
224244
|
+
}
|
|
223140
224245
|
}
|
|
223141
224246
|
}
|
|
224247
|
+
function probeMark(r3) {
|
|
224248
|
+
if (r3.reachable) return `reachable${r3.status ? ` [${r3.status}]` : ""}`;
|
|
224249
|
+
if (r3.timedOut) return `TIMED OUT${r3.error ? ` ${r3.error.replace(/^timed out /, "")}` : ""}`;
|
|
224250
|
+
return `UNREACHABLE${r3.error ? ` (${r3.error})` : ""}`;
|
|
224251
|
+
}
|
|
224252
|
+
function dataPlaneHint(data) {
|
|
224253
|
+
return data.timedOut ? `Data plane timed out after ${data.timeoutMs}ms (${data.url}) \u2014 no answer is not a refusal; run \`himi doctor\` again, or raise \`--timeout <ms>\`, before treating this as a network problem.` : "Data plane unreachable \u2014 check basic connectivity.";
|
|
224254
|
+
}
|
|
223142
224255
|
async function probeControlToken(controlUrl, token, opts = {}) {
|
|
223143
224256
|
if (!controlUrl) return { unauthorized: false, error: "no control url" };
|
|
223144
224257
|
const hostRefusal = credentialHostRefusal(controlUrl);
|
|
@@ -223228,7 +224341,13 @@ function buildDoctorReport(input) {
|
|
|
223228
224341
|
ok: ok3,
|
|
223229
224342
|
target,
|
|
223230
224343
|
version: version5,
|
|
223231
|
-
dataPlane: {
|
|
224344
|
+
dataPlane: {
|
|
224345
|
+
...data,
|
|
224346
|
+
note: "public Wix APIs \u2014 reachable off-VPN",
|
|
224347
|
+
// A stable code to branch on: `timeout` (nothing answered in the budget — retry, or raise
|
|
224348
|
+
// --timeout) is not `unreachable` (a transport error: DNS, refused, reset) (#5638).
|
|
224349
|
+
...data.reachable ? {} : { code: data.timedOut ? "timeout" : "unreachable" }
|
|
224350
|
+
},
|
|
223232
224351
|
servePlane: {
|
|
223233
224352
|
...serve,
|
|
223234
224353
|
target,
|
|
@@ -223247,7 +224366,7 @@ function buildDoctorReport(input) {
|
|
|
223247
224366
|
},
|
|
223248
224367
|
...versions ? { versions } : {},
|
|
223249
224368
|
...browser ? { browser } : {},
|
|
223250
|
-
...versionSkew ? { hint: "version skew detected \u2014 upgrade before diagnosing authoring or template failures" } : !serve.reachable ? { hint: serveUnreachableHint(target) } : !data.reachable ? { hint:
|
|
224369
|
+
...versionSkew ? { hint: "version skew detected \u2014 upgrade before diagnosing authoring or template failures" } : !serve.reachable ? { hint: serveUnreachableHint(target) } : !data.reachable ? { hint: dataPlaneHint(data) } : hostRefused ? { hint: auth.controlTokenHint ?? "refusing to send a Wix credential to this control host" } : staleToken ? { hint: auth.controlTokenHint ?? STALE_TOKEN_HINT } : {}
|
|
223251
224370
|
};
|
|
223252
224371
|
}
|
|
223253
224372
|
async function doctorCommand(ctx) {
|
|
@@ -223330,7 +224449,7 @@ async function doctorCommand(ctx) {
|
|
|
223330
224449
|
print(report8);
|
|
223331
224450
|
return exit;
|
|
223332
224451
|
}
|
|
223333
|
-
const mark =
|
|
224452
|
+
const mark = probeMark;
|
|
223334
224453
|
io2.log(`himi doctor \u2014 target "${target}" (himi v${cliVersion()})
|
|
223335
224454
|
`);
|
|
223336
224455
|
io2.log(` data plane ${dataUrl}`);
|
|
@@ -223367,7 +224486,7 @@ async function doctorCommand(ctx) {
|
|
|
223367
224486
|
}
|
|
223368
224487
|
io2.log(
|
|
223369
224488
|
`
|
|
223370
|
-
${report8.ok ? "OK \u2014 data + serve plane reachable." : typeof report8.hint === "string" && report8.hint ? report8.hint : serve.reachable ?
|
|
224489
|
+
${report8.ok ? "OK \u2014 data + serve plane reachable." : typeof report8.hint === "string" && report8.hint ? report8.hint : serve.reachable ? dataPlaneHint(data) : serveUnreachableHint(target)}`
|
|
223371
224490
|
);
|
|
223372
224491
|
return exit;
|
|
223373
224492
|
}
|
|
@@ -224352,7 +225471,7 @@ ${s2.fields.map((f2) => ` ${f2.key} (${f2.type})`).join("\n")}`
|
|
|
224352
225471
|
}
|
|
224353
225472
|
|
|
224354
225473
|
// src/data.ts
|
|
224355
|
-
import { createHash as
|
|
225474
|
+
import { createHash as createHash50 } from "node:crypto";
|
|
224356
225475
|
async function planData(options) {
|
|
224357
225476
|
const kv = [];
|
|
224358
225477
|
for (const spec of options.data?.kv ?? []) {
|
|
@@ -224411,7 +225530,7 @@ var HttpDataKvAdminProvider = class {
|
|
|
224411
225530
|
url.searchParams.set("site", scope2.siteId);
|
|
224412
225531
|
url.searchParams.set("environment", scope2.environment);
|
|
224413
225532
|
const serialized = body === void 0 ? void 0 : JSON.stringify(body);
|
|
224414
|
-
const idempotencyKey = serialized === void 0 ? void 0 :
|
|
225533
|
+
const idempotencyKey = serialized === void 0 ? void 0 : createHash50("sha256").update(`${scope2.app}\0${scope2.siteId}\0${scope2.environment}\0${method}\0${name}\0${serialized}`).digest("hex");
|
|
224415
225534
|
const response = await this.fetchImpl(url, { method, headers: { authorization: `Bearer ${this.token}`, "content-type": "application/json", ...idempotencyKey ? { "idempotency-key": idempotencyKey } : {} }, ...serialized === void 0 ? {} : { body: serialized } });
|
|
224416
225535
|
if (response.status === 404 && method === "GET") return { exists: false };
|
|
224417
225536
|
if (!response.ok) throw new Error(`data admin ${method} failed (${response.status}): ${(await response.text()).slice(0, 256)}`);
|
|
@@ -225314,7 +226433,14 @@ async function siteCommand(ctx) {
|
|
|
225314
226433
|
}
|
|
225315
226434
|
}
|
|
225316
226435
|
if (sub === "client") {
|
|
225317
|
-
const {
|
|
226436
|
+
const {
|
|
226437
|
+
runSiteClientEnsure: runSiteClientEnsure2,
|
|
226438
|
+
runSiteClientList: runSiteClientList2,
|
|
226439
|
+
WixTokenError: WixTokenError2,
|
|
226440
|
+
SITE_CLIENT_USAGE: SITE_CLIENT_USAGE2,
|
|
226441
|
+
SITE_CLIENT_ENSURE_USAGE: SITE_CLIENT_ENSURE_USAGE2,
|
|
226442
|
+
SITE_CLIENT_LIST_USAGE: SITE_CLIENT_LIST_USAGE2
|
|
226443
|
+
} = await Promise.resolve().then(() => (init_site_oauth_client(), site_oauth_client_exports));
|
|
225318
226444
|
const op = pos[2];
|
|
225319
226445
|
if (op !== "ensure" && op !== "list") {
|
|
225320
226446
|
io2.error(JSON.stringify({
|
|
@@ -225323,11 +226449,14 @@ async function siteCommand(ctx) {
|
|
|
225323
226449
|
}));
|
|
225324
226450
|
return 2;
|
|
225325
226451
|
}
|
|
226452
|
+
const credential = ctx.deps.wixCliOnPath ? { wixCliOnPath: ctx.deps.wixCliOnPath } : void 0;
|
|
225326
226453
|
try {
|
|
225327
226454
|
const r3 = op === "list" ? await runSiteClientList2({
|
|
225328
226455
|
siteFlag: str3(flags.site),
|
|
225329
|
-
redirectUri: str3(flags["redirect-uri"])
|
|
226456
|
+
redirectUri: str3(flags["redirect-uri"]),
|
|
226457
|
+
credential
|
|
225330
226458
|
}) : await runSiteClientEnsure2({
|
|
226459
|
+
credential,
|
|
225331
226460
|
siteFlag: str3(flags.site),
|
|
225332
226461
|
name: str3(flags.name),
|
|
225333
226462
|
redirectUri: str3(flags["redirect-uri"]),
|
|
@@ -225341,7 +226470,14 @@ async function siteCommand(ctx) {
|
|
|
225341
226470
|
return r3.ok ? 0 : 1;
|
|
225342
226471
|
} catch (e2) {
|
|
225343
226472
|
const err = e2;
|
|
225344
|
-
|
|
226473
|
+
const coded = e2 instanceof WixTokenError2 ? e2 : void 0;
|
|
226474
|
+
io2.error(JSON.stringify({
|
|
226475
|
+
...coded ? { ok: false, code: coded.code } : {},
|
|
226476
|
+
error: err.message,
|
|
226477
|
+
...coded ? { fix: coded.fix } : {},
|
|
226478
|
+
...coded && err.dashboardUrl ? { dashboardUrl: err.dashboardUrl } : {},
|
|
226479
|
+
usage: err.usage ?? (op === "list" ? SITE_CLIENT_LIST_USAGE2 : SITE_CLIENT_ENSURE_USAGE2)
|
|
226480
|
+
}));
|
|
225345
226481
|
return err.exit ?? 1;
|
|
225346
226482
|
}
|
|
225347
226483
|
}
|
|
@@ -226119,6 +227255,7 @@ export {
|
|
|
226119
227255
|
previewTokenNote,
|
|
226120
227256
|
previewWebUrl,
|
|
226121
227257
|
probeControlToken,
|
|
227258
|
+
probeMark,
|
|
226122
227259
|
probeReachable,
|
|
226123
227260
|
pushAuthHint,
|
|
226124
227261
|
readUpdateCache,
|